From 4fe6041ee0bfbf3c1b4cbe34e59f684728891d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E8=AF=9D?= <752718920@qq.com> Date: Sat, 30 Apr 2022 11:58:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8D=95=E6=8D=AE=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E7=95=8C=E9=9D=A2=EF=BC=8C=E6=8E=A7=E5=88=B6=E5=88=97?= =?UTF-8?q?=E7=9A=84=E5=8A=A8=E6=80=81=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecgbiz/modal/JSelectMaterialModal.vue | 12 +++--- .../src/views/bill/dialog/BillDetail.vue | 38 ++++++++++++++++--- 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue b/jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue index ab9186ac..88501139 100644 --- a/jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue +++ b/jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue @@ -101,14 +101,14 @@ }, categoryTree:[], columns: [ - {dataIndex: 'mBarCode', title: '条码', width: 100, align: 'left'}, + {dataIndex: 'mBarCode', title: '条码', width: 100, align: 'left', ellipsis:true}, {dataIndex: 'name', title: '名称', width: 120, ellipsis:true}, - {dataIndex: 'categoryName', title: '类别', width: 80}, - {dataIndex: 'standard', title: '规格', width: 80}, - {dataIndex: 'model', title: '型号', width: 80}, - {dataIndex: 'color', title: '颜色', width: 80}, + {dataIndex: 'categoryName', title: '类别', width: 80, ellipsis:true}, + {dataIndex: 'standard', title: '规格', width: 80, ellipsis:true}, + {dataIndex: 'model', title: '型号', width: 80, ellipsis:true}, + {dataIndex: 'color', title: '颜色', width: 80, ellipsis:true}, {dataIndex: 'unit', title: '单位', width: 70, ellipsis:true}, - {dataIndex: 'sku', title: '多属性', width: 80}, + {dataIndex: 'sku', title: '多属性', width: 80, ellipsis:true}, {dataIndex: 'stock', title: '库存', width: 60}, {dataIndex: 'expand', title: '扩展信息', width: 80, ellipsis:true}, {dataIndex: 'enableSerialNumber', title: '序列号', width: 60, align: "center", diff --git a/jshERP-web/src/views/bill/dialog/BillDetail.vue b/jshERP-web/src/views/bill/dialog/BillDetail.vue index a62add98..5732a31f 100644 --- a/jshERP-web/src/views/bill/dialog/BillDetail.vue +++ b/jshERP-web/src/views/bill/dialog/BillDetail.vue @@ -1236,7 +1236,7 @@ created () { }, methods: { - initSetting(record, type) { + initSetting(record, type, ds) { if (type === '零售出库') { this.defColumns = this.retailOutColumns } else if (type === '零售退货入库') { @@ -1266,13 +1266,39 @@ } else if (type === '盘点复盘') { this.defColumns = this.stockCheckReplayColumns } - //不是部分采购|部分销售的时候移除列 + //判断序列号、批号、有效期、多属性是否有值 + let needAddkeywords = [] + for (let i = 0; i < ds.length; i++) { + if(ds[i].snList) { + needAddkeywords.push('snList') + } + if(ds[i].batchNumber) { + needAddkeywords.push('batchNumber') + } + if(ds[i].expirationDate) { + needAddkeywords.push('expirationDate') + } + if(ds[i].sku) { + needAddkeywords.push('sku') + } + } if(record.status === '3') { + //部分采购|部分销售的时候显示全部列 this.columns = this.defColumns } else { let currentCol = [] for(let i=0; i-1) { let info = {} info.title = this.defColumns[i].title info.dataIndex = this.defColumns[i].dataIndex @@ -1294,7 +1320,6 @@ }) }, show(record, type) { - this.initSetting(record, type) this.billType = type //附件下载 this.fileList = record.fileName @@ -1314,14 +1339,15 @@ mpList: getMpListShort(Vue.ls.get('materialPropertyList')) //扩展属性 } let url = this.readOnly ? this.url.detailList : this.url.detailList; - this.requestSubTableData(url, params); + this.requestSubTableData(record, type, url, params); this.initPlatform() }, - requestSubTableData(url, params, success) { + requestSubTableData(record, type, url, params, success) { this.loading = true getAction(url, params).then(res => { if(res && res.code === 200){ this.dataSource = res.data.rows + this.initSetting(record, type, this.dataSource) typeof success === 'function' ? success(res) : '' } }).finally(() => {