1.上传建垛文件限制一个文件

master
x_z 3 years ago
parent 7854de8275
commit dde5b8c4f1

@ -107,7 +107,8 @@
:action="this.uploadUrl"
:before-upload="beforeUpload"
:on-success="uploadHandleSuccess"
:limit="3"
:on-remove="removeFile"
:limit="1"
:file-list="fileList">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传 xls/xlsx 文件</div>
@ -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();

Loading…
Cancel
Save