diff --git a/src/views/distribution/signfor/distributionSignforedt.vue b/src/views/distribution/signfor/distributionSignforedt.vue index 6248d7bb..214477db 100644 --- a/src/views/distribution/signfor/distributionSignforedt.vue +++ b/src/views/distribution/signfor/distributionSignforedt.vue @@ -376,75 +376,26 @@ > - - - - - - + + @@ -833,40 +784,40 @@ const menuData1 = ref([ { prop: 'orderCode', label: '订单自编号', - type: 1, + type: 2, values: '', width: '130', checkarr: [], - fixed: false, + fixed: true, sortable: true, head: false, }, { prop: 'serviceNumber', label: '服务号', - type: 1, + type: 2, values: '', width: '250', checkarr: [], - fixed: false, + fixed: true, sortable: true, head: false, }, { prop: 'waybillNumber', label: '运单号', - type: 1, + type: 2, values: '', width: '150', checkarr: [], - fixed: false, + fixed: true, sortable: true, head: false, }, { prop: 'warehouse', label: '仓库', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -938,7 +889,7 @@ const menuData1 = ref([ { prop: 'brand', label: '品牌', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -949,7 +900,7 @@ const menuData1 = ref([ { prop: 'mallName', label: '商场名称', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -960,7 +911,7 @@ const menuData1 = ref([ { prop: 'storeName', label: '门店名称', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -972,7 +923,7 @@ const menuData1 = ref([ { prop: 'descriptionGoods', label: '货物名称', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -995,7 +946,7 @@ const menuData1 = ref([ { prop: 'consigneeUnit', label: '收获单位', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -1006,7 +957,7 @@ const menuData1 = ref([ { prop: 'consigneePerson', label: '运单收货人', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -1017,7 +968,7 @@ const menuData1 = ref([ { prop: 'consigneeAddress', label: '运单收货地址', - type: 1, + type: 2, values: '', width: '250', checkarr: [], @@ -1028,7 +979,7 @@ const menuData1 = ref([ { prop: 'consigneeMobile', label: '运单收获电话', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -1039,7 +990,7 @@ const menuData1 = ref([ { prop: 'customerName', label: '终端收货人', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -1050,7 +1001,7 @@ const menuData1 = ref([ { prop: 'customerAddress', label: '终端收获地址', - type: 1, + type: 2, values: '', width: '400', checkarr: [], @@ -1061,7 +1012,7 @@ const menuData1 = ref([ { prop: 'customerTelephone', label: '终端收获电话', - type: 1, + type: 2, values: '', width: '200', checkarr: [], @@ -1240,7 +1191,7 @@ const menuData2 = ref([ { prop: 'firsts', label: '一级品类', - type: 1, + type: 2, values: '', width: '150', checkarr: [], @@ -1251,7 +1202,7 @@ const menuData2 = ref([ { prop: 'second', label: '二级品类', - type: 1, + type: 2, values: '', width: '200', checkarr: [], @@ -1262,7 +1213,7 @@ const menuData2 = ref([ { prop: 'thirdProduct', label: '三级品类', - type: 1, + type: 2, values: '', width: '200', checkarr: [], @@ -1350,7 +1301,7 @@ const menuData2 = ref([ { prop: 'driverName', label: '计划装车人', - type: 1, + type: 2, values: '', width: '200', checkarr: [], @@ -1361,7 +1312,7 @@ const menuData2 = ref([ { prop: 'scanUser', label: '实际装车人', - type: 1, + type: 2, values: '', width: '200', checkarr: [], @@ -1386,7 +1337,7 @@ const menuData3 = ref([ { prop: 'sku', label: 'sku', - type: 1, + type: 2, values: '', width: '200', checkarr: [], @@ -1397,7 +1348,7 @@ const menuData3 = ref([ { prop: 'descriptionGoods', label: '物料名称', - type: 1, + type: 2, values: '', width: '200', checkarr: [], @@ -1408,7 +1359,7 @@ const menuData3 = ref([ { prop: 'cargoNumber', label: '物料编号', - type: 1, + type: 2, values: '', width: '200', checkarr: [], @@ -1419,7 +1370,7 @@ const menuData3 = ref([ { prop: 'cargoNorms', label: '物料规格', - type: 1, + type: 2, values: '', width: '200', checkarr: [], @@ -1441,7 +1392,7 @@ const menuData3 = ref([ { prop: 'category', label: '品分类', - type: 1, + type: 2, values: '', width: '200', checkarr: [], @@ -1498,7 +1449,7 @@ const menuData3 = ref([ { prop: 'signUser', label: '签收人', - type: 1, + type: 2, values: '', width: '200', checkarr: [], @@ -1670,14 +1621,26 @@ const Tabs = ref([ type: 'order', query: {}, data: [], + renderData: [], }, { label: '包件列表', name: '1', + /** 列表表头 */ columnList: menuData2.value, type: 'package', + /** 搜索值 */ query: {}, + /** 所有值 */ data: [], + /** 已签收数组 */ + signeData: [], + /** 未签收数组 */ + noSigneData: [], + /** 渲染值 */ + renderData: [], + /** 把内部激活Tab值 */ + activeName: 'haveBeenSigned', }, { label: '库存品列表', @@ -1686,6 +1649,7 @@ const Tabs = ref([ type: 'inventory', query: {}, data: [], + renderData: [], }, ]); // 增值服务标题栏 @@ -1751,7 +1715,7 @@ const doubledCount = computed(() => { const setTableHeight = () => { const node = document.querySelectorAll('.goodsTable'); - setNodeHeight(node, '500px'); + setNodeHeight(node, '600px'); }; onMounted(async () => { @@ -2045,7 +2009,9 @@ getDetail(RouterId.value).then(res => { active.value = 3; //文员已签收 } form.value = res.data.data; //基础信息 - InitializeTable.value = res.data.data.orderInfo; //表格数据(订单列表) + // InitializeTable.value = res.data.data.orderInfo; //表格数据(订单列表) + Tabs.value[0].data = res.data.data.orderInfo || []; //表格数据(订单列表) + Tabs.value[0].renderData = res.data.data.orderInfo || []; onLoad(); // 照片回显分类 DoorstepPhoto.value = []; @@ -2094,8 +2060,23 @@ function PackageList() { const { code } = res.data; if (code !== 200) return; console.log(res.data.data, '包件列表'); - data.value = res.data.data || []; - Tabs.value[1].data = res.data.data; + // data.value = res.data.data || []; + + const data = res.data.data || []; + + const _item = Tabs.value[1]; + + _item.signeData = []; + _item.noSigneData = []; + + data.forEach(val => { + if (Number(val.orderPackageStatus) === 70) _item.signeData.push(val); + else _item.noSigneData.push(val); + }); + + _item.data = _item.activeName === 'haveBeenSigned' ? _item.signeData : _item.noSigneData; + + _item.renderData = _item.data; editLoading.value = false; //表格加载结束 }); } @@ -2104,9 +2085,11 @@ function InventoryList() { editLoading.value = true; //表格加载开启 data.value = []; signforInventoryList(RouterId.value).then(res => { + if (res.data.code !== 200) return; console.log(res, '库存品列表'); - data.value = res.data.data || []; - Tabs.value[2].data = data; + // data.value = res.data.data || []; + Tabs.value[2].data = data || []; + Tabs.value[2].renderData = data || []; editLoading.value = false; //表格加载结束 }); } @@ -2117,7 +2100,7 @@ const tabClick = val => { case '0': console.log(data.value, 'datavalue'); switchTableFields(menuData1.value); - data.value = InitializeTable.value; + // data.value = InitializeTable.value; break; case '1': switchTableFields(menuData2.value); @@ -2299,9 +2282,34 @@ const inputsc = (value, row, type) => { console.log('reg :>> ', reg); - if (Object.keys(_item.query).length === 0) return (_item.data = data.value); + if (Object.keys(_item.query).length === 0) return (_item.renderData = _item.data); + + const _data = _item.data.filter(value => { + let _flag = true; + for (let key in _item.query) { + console.log('_item.query[key].test(value[key]) :>> ', _item.query[key].test(value[key])); + if (!_item.query[key].test(value[key])) _flag = false; + if (!_flag) break; + } + + return _flag; + }); + + console.log('_data :>> ', _data); + _item.renderData = _data; +}; + +/** 选择签收状态 */ +const handleChooseSigneState = val => { + console.log('val :>> ', val); + console.log('Tabs.value :>> ', Tabs.value); + const _item = Tabs.value[1]; + console.log('_item :>> ', _item); + _item.data = val === 'haveBeenSigned' ? _item.signeData : _item.noSigneData; + + if (Object.keys(_item.query).length === 0) return (_item.renderData = _item.data); - const _data = data.value.filter(value => { + const _data = _item.data.filter(value => { let _flag = true; for (let key in _item.query) { console.log('_item.query[key].test(value[key]) :>> ', _item.query[key].test(value[key])); @@ -2313,7 +2321,7 @@ const inputsc = (value, row, type) => { }); console.log('_data :>> ', _data); - _item.data = _data; + _item.renderData = _data; }; @@ -2466,4 +2474,18 @@ const inputsc = (value, row, type) => { margin-top: 20px; display: block; } + +// 标签页 +:deep(.el-tab-pane) { + display: flex; +} + +:deep(.el-tabs--left) { + flex: none; +} + +// 表格 +.goodsTable { + flex: 1; +}