物资厂家

This commit is contained in:
jjLv 2024-10-30 15:06:31 +08:00
parent 4f078ed5a7
commit a1eb8e0f0d
1 changed files with 2 additions and 24 deletions

View File

@ -231,7 +231,7 @@
</template>
<script>
import { getListFacturer,getFacturerDetail,editFacturer,addFacturer,delFacturer,deleteFile } from "@/api/ma/supplier";
import { getListFacturer,getFacturerDetail,editFacturer,addFacturer,delFacturer } from "@/api/ma/supplier";
import { imgUpLoadThree, fileUpLoad } from '@/api/system/upload'
import { downloadFile,downloadFileData } from '@/utils/download'
import { getToken } from '@/utils/auth'
@ -388,10 +388,6 @@
}
})
this.businessLicenseListTemp.splice(sum, 1)
if(file.status=='success'){
this.delBusinessFileIdList.push(file.url);
}
console.log('delBusinessFileIdList',this.delBusinessFileIdList)
},
isImage(file){
@ -488,7 +484,6 @@
handleAdd() {
this.reset()
this.uploadKey = Date.now();
this.delBusinessFileIdList=[];
this.businessLicenseListTemp=[];
this.businessLicenseFileList=[];
this.showHouse = true
@ -498,7 +493,6 @@
handleUpdate(row){
this.reset()
this.uploadKey = Date.now();
this.delBusinessFileIdList=[];
this.businessLicenseListTemp=[];
this.businessLicenseFileList=[];
const supplierId = row.supplierId;
@ -545,10 +539,8 @@
if(this.businessLicenseListTemp.length!=0){
await this.getImaUploadEdit(),
await this.editFacturerTemp(this.form);
await this.deleteFile();
}else{
await this.editFacturerTemp(this.form);
await this.deleteFile();
}
} else {
@ -562,7 +554,6 @@
}
}
});
this.uploadKey = Date.now();
},
@ -611,7 +602,6 @@
this.$modal.msgSuccess("新增成功");
this.showHouse = false;
this.getList();
this.delBusinessFileIdList=[];
this.businessLicenseListTemp=[];
this.businessLicenseFileList=[];
@ -624,27 +614,15 @@
this.$modal.msgSuccess("修改成功");
this.showHouse = false;
this.getList();
this.delBusinessFileIdList=[];
this.businessLicenseListTemp=[];
this.businessLicenseFileList=[];
});
},
async deleteFile(){
if(this.delBusinessFileIdList.length>0){
this.delBusinessFileIdList.forEach(item=>{
const objectKey = item;
console.log('objectKey',objectKey)
deleteFile(objectKey);
})
}
},
//
cancel() {
this.showHouse = false;
this.delBusinessFileIdList=[];
this.businessLicenseListTemp=[];
this.businessLicenseListTemp=[]
this.businessLicenseFileList=[];
this.uploadKey = Date.now();
this.reset();