From dde5b8c4f13275e64fbb5333f58917df1400cb91 Mon Sep 17 00:00:00 2001 From: x_z Date: Sun, 23 Oct 2022 19:10:23 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=B8=8A=E4=BC=A0=E5=BB=BA=E5=9E=9B=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=99=90=E5=88=B6=E4=B8=80=E4=B8=AA=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/production/stackManage.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/views/production/stackManage.vue b/src/views/production/stackManage.vue index d4fe814..7083418 100644 --- a/src/views/production/stackManage.vue +++ b/src/views/production/stackManage.vue @@ -107,7 +107,8 @@ :action="this.uploadUrl" :before-upload="beforeUpload" :on-success="uploadHandleSuccess" - :limit="3" + :on-remove="removeFile" + :limit="1" :file-list="fileList"> 点击上传
只能上传 xls/xlsx 文件
@@ -467,12 +468,14 @@ export default { uploadHandleSuccess(response) { if (response.code === 20000) { this.filePath = response.data.path; + this.fileList.push(this.filePath); } else { this.$message.error("上传失败:" + response.message); } }, importStackOrder() { - if (isBlank(this.filePath)) { + debugger + if (isBlank(this.filePath) || this.fileList.length === 0) { this.$message.error("请上传文件") return; } @@ -491,13 +494,12 @@ export default { }) }, exportStackCode(orderId) { - let params = { - orderId: orderId, - customerId: this.$store.getters.customerId - }; window.open(BASE_URL + "/udims/stack/order/exportStackOrder" + "?orderId=" + orderId + "&customerId=" + this.$store.getters.customerId); this.getList(); }, + removeFile(file, fileList) { + this.fileList = fileList; + }, }, created() { this.getList();