From 3dc27963d198b2682ae75e70d0f712beab9234f8 Mon Sep 17 00:00:00 2001 From: liuyp Date: Tue, 13 Aug 2024 22:53:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=AD=BE=E6=94=B6=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E9=A1=B5=EF=BC=8C=E5=A4=9A=E6=9D=A1=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E6=97=B6=E4=B8=8A=E4=BC=A0=E5=92=8C=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=8C=89=E9=92=AE=E8=A2=AB=E7=A6=81=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../emis/emisTmsScanRecord/signAndRecord.vue | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/src/views/emis/emisTmsScanRecord/signAndRecord.vue b/src/views/emis/emisTmsScanRecord/signAndRecord.vue index 16c86738..478a27ed 100644 --- a/src/views/emis/emisTmsScanRecord/signAndRecord.vue +++ b/src/views/emis/emisTmsScanRecord/signAndRecord.vue @@ -142,7 +142,7 @@ - + @@ -161,7 +161,7 @@ type="primary" plain size="mini" - :disabled="multiple" + :disabled="disableBtn" @click="handleScanUpload" v-hasPermi="['emis:emisTmsScanRecord:add']" >上传 @@ -172,7 +172,7 @@ plain icon="el-icon-delete" size="mini" - :disabled="multiple" + :disabled="disableBtn" @click="clearSelectionBatch" v-hasPermi="['emis:emisTmsScanRecord:remove']" >删除 @@ -284,7 +284,7 @@ export default { // 非单个禁用 single: true, // 非多个禁用 - multiple: true, + disableBtn: true, checkedDetail:[], // 遮罩层 loading: false, @@ -308,7 +308,8 @@ export default { }, //查询信息展示 - record:null + record:{}, + sender:{} }; }, watch: { @@ -557,8 +558,16 @@ export default { // 多选框选中数据 handleSelectionChange(selection) { this.ids = selection.map(item => item.billCode) - this.single = selection.length!==1 - this.multiple = !selection.length + // this.single = selection.length!==1 + this.disableBtn = selection.length < 1; + if(selection.length == 1){ + let record =Object.assign({}, selection[0]); + this.record = record; + this.sender = record.sender || {}; + }else{ + this.record = {} + this.sender = {}; + } }, // 扫描上传 handleScanUpload(){ @@ -610,6 +619,7 @@ export default { this.emisTmsScanRecordList = newList // 清空数据 this.record={}; + this.sender={} this.$modal.msgSuccess(scanRstItem.message); }); }, @@ -683,7 +693,14 @@ export default { let indexBillCode=record.billCode; this.dataMap[indexBillCode]=record; this.emisTmsScanRecordList.push(record); - isBatch || this.emisTmsScanRecordList.length > 1 ? this.record = {} : this.record = record; + console.log(this.emisTmsScanRecordList) + if(isBatch || this.emisTmsScanRecordList.length > 1){ + this.record = {} + this.sender = {}; + }else{ + this.record = record; + this.sender = record.sender || {}; + } this.form.picUrl = ""; }); }