2024-12-16 17:59:18 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="app-container" id="">
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
|
|
|
|
<el-form-item label="时间范围" prop="time">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="queryParams.time"
|
|
|
|
|
range-separator="至"
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
type="daterange"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
2024-12-20 18:33:52 +08:00
|
|
|
style="width: 200px"
|
2024-12-16 17:59:18 +08:00
|
|
|
></el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label="关键字" prop="keyWord">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.keyWord"
|
|
|
|
|
placeholder="请输入关键字"
|
|
|
|
|
clearable :maxlength="20"
|
2024-12-20 18:33:52 +08:00
|
|
|
style="width: 200px"
|
2024-12-16 17:59:18 +08:00
|
|
|
/>
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<el-form-item label="往来单位" prop="unitId">
|
2024-12-30 11:32:23 +08:00
|
|
|
<treeselect
|
|
|
|
|
v-model="queryParams.unitId"
|
|
|
|
|
:options="unitList" :normalizer="normalizer"
|
|
|
|
|
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
|
|
|
|
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
|
|
|
|
placeholder="请选择往来单位" @select="unitChange"
|
|
|
|
|
/>
|
|
|
|
|
<!-- <el-cascader v-model="unitId"
|
2024-12-16 17:59:18 +08:00
|
|
|
:show-all-levels="false"
|
|
|
|
|
:options="unitList"
|
|
|
|
|
:props="selectTreeProps"
|
|
|
|
|
filterable
|
|
|
|
|
clearable
|
|
|
|
|
collapse-tags
|
|
|
|
|
@change="unitChange"
|
|
|
|
|
placeholder="请选择往来单位"
|
2024-12-30 11:32:23 +08:00
|
|
|
></el-cascader> -->
|
2024-12-16 17:59:18 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="工程名称" prop="proId">
|
2024-12-30 11:32:23 +08:00
|
|
|
<treeselect
|
|
|
|
|
v-model="queryParams.proId"
|
|
|
|
|
:options="proList" :normalizer="normalizer"
|
|
|
|
|
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
|
|
|
|
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
|
|
|
|
placeholder="请选择工程名称" @select="proChange"
|
|
|
|
|
/>
|
|
|
|
|
<!-- <el-cascader v-model="projectId"
|
2024-12-16 17:59:18 +08:00
|
|
|
:show-all-levels="false"
|
|
|
|
|
:options="proList"
|
|
|
|
|
:props="selectTreeProps"
|
|
|
|
|
filterable clearable
|
|
|
|
|
collapse-tags
|
|
|
|
|
@change="proChange"
|
|
|
|
|
placeholder="请选择工程名称"
|
2024-12-30 11:32:23 +08:00
|
|
|
></el-cascader> -->
|
2024-12-16 17:59:18 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物资名称" prop="typeName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.typeName"
|
|
|
|
|
placeholder="请输入物资名称"
|
|
|
|
|
clearable :maxlength="20"
|
2024-12-20 18:33:52 +08:00
|
|
|
style="width: 200px"
|
2024-12-16 17:59:18 +08:00
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="规格型号" prop="typeModelName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.typeModelName"
|
|
|
|
|
placeholder="请输入规格型号"
|
|
|
|
|
clearable :maxlength="20"
|
2024-12-20 18:33:52 +08:00
|
|
|
style="width: 200px"
|
2024-12-16 17:59:18 +08:00
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
2024-12-20 18:33:52 +08:00
|
|
|
<el-form-item label="出库方式" prop="outStyle">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.outStyle"
|
2024-12-16 17:59:18 +08:00
|
|
|
filterable clearable
|
2024-12-20 18:33:52 +08:00
|
|
|
style="width: 200px"
|
2024-12-16 17:59:18 +08:00
|
|
|
placeholder="请选择"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
2024-12-20 18:33:52 +08:00
|
|
|
v-for="item in outStyleList"
|
2024-12-16 17:59:18 +08:00
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
2024-12-20 18:33:52 +08:00
|
|
|
</el-select>
|
2024-12-16 17:59:18 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
icon="el-icon-search"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleQuery"
|
|
|
|
|
>查询</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
icon="el-icon-refresh"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="resetQuery"
|
|
|
|
|
>重置</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="warning"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-download"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
>导出</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
<el-table v-loading="loading" :data="tableList" border>
|
|
|
|
|
<el-table-column label="序号" align="center" width="80" type="index">
|
|
|
|
|
<template scope="scope">
|
|
|
|
|
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index+1 }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="工程名称" align="center" prop="proName" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="往来单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="协议号" align="center" prop="agreementCode" :show-overflow-tooltip="true"/>
|
2025-01-08 10:00:56 +08:00
|
|
|
<el-table-column label="实施单位" align="center" prop="impUnitName" width="150px" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="合同主体单位" align="center" prop="contractPart" width="150px" :show-overflow-tooltip="true"/>
|
2024-12-16 17:59:18 +08:00
|
|
|
<el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
|
|
|
|
<el-table-column label="计量单位" align="center" prop="unit" :show-overflow-tooltip="true"/>
|
2024-12-20 18:33:52 +08:00
|
|
|
<el-table-column label="出库数量" align="center" prop="outNum" :show-overflow-tooltip="true"></el-table-column>
|
|
|
|
|
<el-table-column label="出库人员" align="center" prop="outUser" :show-overflow-tooltip="true"></el-table-column>
|
|
|
|
|
<el-table-column label="出库时间" align="center" prop="outTime" :show-overflow-tooltip="true"></el-table-column>
|
2024-12-25 18:02:54 +08:00
|
|
|
<el-table-column label="领料单号" align="center" prop="leaseCode" :show-overflow-tooltip="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span class="clickText" @click="jumpLease(scope.row.leaseCode)">
|
|
|
|
|
{{ scope.row.leaseCode }}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-12-20 18:33:52 +08:00
|
|
|
<el-table-column label="出库方式" align="center" prop="outStyle" :show-overflow-tooltip="true"/>
|
2024-12-16 17:59:18 +08:00
|
|
|
</el-table>
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="total > 0"
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
:page-sizes="[5, 10, 15, 20, 30]"
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
2024-12-20 18:33:52 +08:00
|
|
|
getOutRecordListApi
|
2024-12-16 17:59:18 +08:00
|
|
|
} from '@/api/stquery/stquery';
|
|
|
|
|
import {
|
|
|
|
|
getProjectList,
|
|
|
|
|
getUnitList,
|
|
|
|
|
} from '@/api/back/index.js'
|
2024-12-30 11:32:23 +08:00
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
2024-12-16 17:59:18 +08:00
|
|
|
export default {
|
|
|
|
|
name: '',
|
|
|
|
|
dicts: [],
|
2024-12-30 11:32:23 +08:00
|
|
|
components: { Treeselect },
|
2024-12-16 17:59:18 +08:00
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: false,
|
|
|
|
|
// 选中数组
|
|
|
|
|
ids: [],
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: '查看',
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
single: true,
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
multiple: true,
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
showSearch: true,
|
|
|
|
|
selectTreeProps: {
|
|
|
|
|
children: 'children',
|
|
|
|
|
label: 'name',
|
|
|
|
|
// multiple: false,
|
|
|
|
|
value: 'id',
|
|
|
|
|
// multiple: true,
|
|
|
|
|
},
|
|
|
|
|
unitId: null,
|
|
|
|
|
projectId: null,
|
|
|
|
|
unitList: [],
|
|
|
|
|
proList: [],
|
2024-12-20 18:33:52 +08:00
|
|
|
outStyleList:[{id:'标准箱',name:'标准箱'},{id:'编码',name:'编码'},{id:'二维码',name:'二维码'},{id:'数量',name:'数量'}],
|
2024-12-16 17:59:18 +08:00
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
// 主表格数据
|
|
|
|
|
tableList: [],
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
time: null,
|
|
|
|
|
keyWord: null,
|
2024-12-30 11:32:23 +08:00
|
|
|
unitId: null,
|
|
|
|
|
proId: null,
|
2024-12-16 17:59:18 +08:00
|
|
|
typeName: null, //物资名称
|
2024-12-27 10:15:11 +08:00
|
|
|
typeModelName: null, //
|
|
|
|
|
outStyle:null
|
2024-12-16 17:59:18 +08:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.initSelectData()
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
initSelectData() {
|
|
|
|
|
this.GetUnitData()
|
|
|
|
|
this.GetProData()
|
|
|
|
|
},
|
2024-12-30 11:32:23 +08:00
|
|
|
/** 转换菜单数据结构 */
|
|
|
|
|
normalizer(node) {
|
|
|
|
|
if (node.children && !node.children.length) {
|
|
|
|
|
delete node.children;
|
|
|
|
|
}
|
|
|
|
|
return {
|
|
|
|
|
id: node.id,
|
|
|
|
|
label: node.name,
|
|
|
|
|
children: node.children,
|
|
|
|
|
};
|
|
|
|
|
},
|
2024-12-16 17:59:18 +08:00
|
|
|
// 获取 来往单位 列表数据
|
|
|
|
|
async GetUnitData() {
|
|
|
|
|
const params = {
|
2024-12-30 11:32:23 +08:00
|
|
|
// projectId: this.queryParams.proId /* */,
|
2024-12-16 17:59:18 +08:00
|
|
|
}
|
|
|
|
|
const res = await getUnitList(params)
|
|
|
|
|
this.unitList = res.data
|
|
|
|
|
},
|
|
|
|
|
unitChange(val){
|
2024-12-30 11:32:23 +08:00
|
|
|
// if(val&&val.length>0){
|
|
|
|
|
// this.queryParams.unitId=this.unitId[this.unitId.length - 1]
|
|
|
|
|
// }else if(val&&val.length==0){
|
|
|
|
|
// this.queryParams.unitId=""
|
|
|
|
|
// }
|
|
|
|
|
// this.GetProData()
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
this.GetProData()
|
|
|
|
|
},500)
|
2024-12-16 17:59:18 +08:00
|
|
|
},
|
|
|
|
|
// 获取 工程名称 列表数据
|
|
|
|
|
async GetProData() {
|
|
|
|
|
const params = { unitId: this.queryParams.unitId}
|
|
|
|
|
const res = await getProjectList(params)
|
|
|
|
|
this.proList = res.data
|
2024-12-30 11:32:23 +08:00
|
|
|
this.queryParams.proId=null
|
2024-12-16 17:59:18 +08:00
|
|
|
},
|
|
|
|
|
proChange(val){
|
2024-12-30 11:32:23 +08:00
|
|
|
// if(val&&val.length>0){
|
|
|
|
|
// this.queryParams.proId=this.projectId[this.projectId.length - 1]
|
|
|
|
|
// }else if(val&&val.length==0){
|
|
|
|
|
// this.queryParams.proId=""
|
|
|
|
|
// }
|
|
|
|
|
// this.GetUnitData()
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
this.GetUnitData()
|
|
|
|
|
},500)
|
2024-12-16 17:59:18 +08:00
|
|
|
},
|
2024-12-25 18:02:54 +08:00
|
|
|
//跳转领料
|
|
|
|
|
jumpLease(code){
|
|
|
|
|
this.$router.push({ path: "/lease/outBound", query: {'code':code} });
|
|
|
|
|
},
|
2024-12-16 17:59:18 +08:00
|
|
|
// 获取列表
|
|
|
|
|
async getList() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
const params = {
|
|
|
|
|
unitId: this.queryParams.unitId,
|
|
|
|
|
proId: this.queryParams.proId,
|
|
|
|
|
keyWord: this.queryParams.keyWord,
|
2024-12-20 18:33:52 +08:00
|
|
|
outStyle: this.queryParams.outStyle,
|
2024-12-27 10:15:11 +08:00
|
|
|
typeName: this.queryParams.typeName,
|
|
|
|
|
typeModelName: this.queryParams.typeModelName,
|
2024-12-16 17:59:18 +08:00
|
|
|
startTime: this.queryParams.time && this.queryParams.time[0],
|
|
|
|
|
endTime: this.queryParams.time && this.queryParams.time[1],
|
|
|
|
|
pageSize: this.queryParams.pageSize,
|
|
|
|
|
pageNum: this.queryParams.pageNum
|
|
|
|
|
}
|
2024-12-20 18:33:52 +08:00
|
|
|
const res = await getOutRecordListApi(params)
|
2024-12-16 17:59:18 +08:00
|
|
|
this.loading = false
|
|
|
|
|
if(res.data.rows.length>0){
|
|
|
|
|
this.tableList = res.data.rows;
|
|
|
|
|
// let obj = {
|
|
|
|
|
// leaseNum: res.data.rows[0].projUsingDto.totalLeaseNum||0,
|
|
|
|
|
// backNum: res.data.rows[0].projUsingDto.totalBackNum||0,
|
|
|
|
|
// usNum: res.data.rows[0].projUsingDto.totalUsNum||0,
|
|
|
|
|
// usPrice: res.data.rows[0].projUsingDto.totalUsPrice||0,
|
|
|
|
|
// totalPrice: res.data.rows[0].projUsingDto.totalTotalPrice||0,
|
|
|
|
|
// isSltName:''
|
|
|
|
|
// }
|
|
|
|
|
// this.tableList.unshift(obj)
|
|
|
|
|
}else{
|
|
|
|
|
this.tableList=[]
|
|
|
|
|
}
|
|
|
|
|
this.total = res.data.total;
|
|
|
|
|
},
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
handleQuery() {
|
|
|
|
|
this.queryParams.pageNum = 1
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
resetQuery() {
|
|
|
|
|
this.queryParams.time=[]
|
2024-12-27 10:15:11 +08:00
|
|
|
this.unitId=[]
|
|
|
|
|
this.projectId=[]
|
2024-12-16 17:59:18 +08:00
|
|
|
this.resetForm('queryForm')
|
|
|
|
|
this.handleQuery()
|
|
|
|
|
},
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
handleExport() {
|
|
|
|
|
this.download(
|
2024-12-20 18:33:52 +08:00
|
|
|
'material/complex_query/exportOutRecord',
|
2024-12-16 17:59:18 +08:00
|
|
|
{
|
|
|
|
|
...this.queryParams,
|
|
|
|
|
},
|
2024-12-20 18:33:52 +08:00
|
|
|
`综合查询_出库记录_${new Date().getTime()}.xlsx`,
|
2024-12-16 17:59:18 +08:00
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
::v-deep.el-table .fixed-width .el-button--mini {
|
|
|
|
|
width: 60px !important;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
.clickText {
|
|
|
|
|
color: #02a7f0;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
</style>
|