diff --git a/src/views/sjzx/bomwh.vue b/src/views/sjzx/bomwh.vue
index 84ad14e..1815da7 100644
--- a/src/views/sjzx/bomwh.vue
+++ b/src/views/sjzx/bomwh.vue
@@ -91,6 +91,7 @@
+
- 选取文件夹
+ 选取文件夹
@@ -153,7 +154,7 @@
-
+
@@ -1023,17 +1024,24 @@ export default {
// this.xclqList=[],
// this.bctjList=[],
// this.xctjList=[],
- this.tltList=[],
- this.tltList2=[],
+ this.tltList=[]
+ this.tltList2=[]
// this.ljList=[],
- this.tableupload=[],
-
+ this.tableupload=[]
+ this.$refs.upload.clearFiles()
this.$nextTick(() => {
// if (this.queryParam.dcch === ''|| this.queryParam.dcpl === '' ) {
// this.filedis=true
// this.$message.error('请输入正确船号 批量!')
// }else{
+ this.$refs.upload.clearFiles()
this.filedis=false
+ this.tltList=[]
+ this.tltList2=[]
+ // this.ljList=[],
+ this.tableupload=[]
+ this.fileList=[]
+ this.fileList2=[]
this.$refs.upload.$children[0].$refs.input.webkitdirectory = true
// }
@@ -1057,6 +1065,8 @@ export default {
this.dialogVisible2=true;
},
handleChange(file, fileList) {
+ console.log(fileList)
+ console.log(file)
this.fileList = fileList
const bcph=""
if (file.name.includes(".BC")||file.name.includes(".LST")||file.name.includes(".XC") || file.name.includes(".txt") ){
@@ -1126,17 +1136,17 @@ export default {
// else
// //上传pdf 20240530
//
- if ( file.name.includes('.pdf') ) {
+ else if ( file.name.includes('.pdf') ) {
this.tltList2.push(file)
- let a={czbh:this.czbhu,ph:this.phu,type:"",stype:"数控套料图",name:file.name,sort:7}
+ let a={czbh:'',ph:'',type:"",stype:"数控套料图",name:file.name,sort:7}
this.tableupload.push(a);
this.tableupload.sort((a,b)=>{
return( a.sort - b.sort)
})
}
- if ( file.name.includes('.QG') ) {
+ else if ( file.name.includes('.QG') ) {
this.tltList2.push(file)
- let a={czbh:this.czbhu,ph:this.phu,type:"",stype:"切割文件",name:file.name,sort:8}
+ let a={czbh:'',ph:'',type:"",stype:"切割文件",name:file.name,sort:8}
this.tableupload.push(a);
this.tableupload.sort((a,b)=>{
return( a.sort - b.sort)
@@ -1224,11 +1234,12 @@ export default {
formData.append('isupload', '01')
uploadBom(formData).then(res=>{
-
+ this.tltList2=[]
if (res.data.zt == "01") {
this.dialogVisible=false;
this.tableData=res.data.data;
this.$message.success('上传成功');
+ this.$refs.upload.clearFiles()
} else if (res.data.zt == "02") { //重新导入
this.$alert('该批量已导入数据,是否重新导入并覆盖该批量数据?', '提示', {
confirmButtonText: '确定',
@@ -1242,7 +1253,7 @@ export default {
this.$message({ message: '导入成功', type: 'success' })
this.dialogVisible=false;
this.tableData=res.data.data;
- this.tableupload=[]
+ //this.tableupload=[]
// if (res.data.zt == "01") {
// this.$message({ message: '导入成功', type: 'success' })
// this.dialogVisible=false;
@@ -1257,9 +1268,12 @@ export default {
//fixme 临时显示数据结束
//this.$message.error('上传的套料图PDF格式错误,请联系开发人员!');
}
- this.fileList = []
- this.tltList=[]
+
})
+ this.fileList = []
+ this.tltList=[]
+ this.tltList2=[]
+ this.tableupload=[]
//自定义的接口也可以用ajax或者自己封装的接口
},
@@ -1304,6 +1318,16 @@ export default {
})
},
+ handleClose(){
+ console.log("1");
+ console.log(this.fileList)
+ this.fileList=[];
+ this.uploadData=[];
+ console.log("1");
+ console.log(this.fileList)
+ console.log(this.uploadData)
+ location.reload();
+ },
initList() {
// if (this.queryParam.dcch === '') {
// this.$message.warning('选择船只编号')