From 3a38c66d0f41b35fd0e5d407432d52bb45e7792e Mon Sep 17 00:00:00 2001 From: lzh Date: Tue, 31 Jan 2023 03:41:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=B8=AD=E5=BF=83-=E7=83=9F?= =?UTF-8?q?=E8=8D=89=E8=AE=A2=E5=8D=95=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tobaccopurchaseapplicationAdd.vue | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/supervise-customer-ui/src/views/supervise/tobaccopurchaseapplication/tobaccopurchaseapplicationAdd.vue b/supervise-customer-ui/src/views/supervise/tobaccopurchaseapplication/tobaccopurchaseapplicationAdd.vue index db55d453..09a209c9 100644 --- a/supervise-customer-ui/src/views/supervise/tobaccopurchaseapplication/tobaccopurchaseapplicationAdd.vue +++ b/supervise-customer-ui/src/views/supervise/tobaccopurchaseapplication/tobaccopurchaseapplicationAdd.vue @@ -32,6 +32,7 @@ :data="currentOrderSid" name="filename" :file-list="fileListDetails" + :before-upload="beforeUploadDetail" :on-success="handleSuccessDetail" :multiple="true" :show-file-list="false" @@ -39,6 +40,7 @@ 上传《报烟明细.csv》 + 重新加载订单数据 关闭 @@ -131,13 +133,13 @@
- - - - - - - + + + + + + +
@@ -180,6 +182,7 @@ export default { updateActionDetails: process.env.VUE_APP_BASE_API + '/purchaserequisitiontobaccodetails/importCsvBatch', fileList: [], fileListDetails: [], + deatilsNum: 0, amountInTotal: '', // 合计金额 currentOrderSid: { sid: '' @@ -294,14 +297,23 @@ export default { this.$message({ showClose: true, type: 'error', message: resp.msg }) } }, + beforeUploadDetail(file) { + this.deatilsNum = 0 + }, handleSuccessDetail(resp, file, fileList) { // this.fileListDetails = [] const _this = this + _this.deatilsNum++ + console.log('_this.deatilsNum: ' + _this.deatilsNum + '--- _this.fileListDetails.length= ' + fileList.length) if (resp.success) { this.$message({ showClose: true, type: 'success', message: '导入成功' }) - _this.loadData() + if (_this.deatilsNum == fileList.length) { + _this.loadData() + _this.fileListDetails = [] + } } else { this.$message({ showClose: true, type: 'error', message: resp.msg }) + _this.fileListDetails = [] } }, loadData() {