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 = ""; }); }