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();