Browse Source

site

master
han\hanst 5 days ago
parent
commit
a0006eaf98
  1. 24
      src/views/modules/common/uploadFileList1.vue

24
src/views/modules/common/uploadFileList1.vue

@ -95,7 +95,7 @@ export default {
},
site:{
type: [String,Number],
default: ''
required: true
},
bu:{
type: [String,Number],
@ -185,6 +185,12 @@ export default {
}
},
methods: {
resolveUploadSite () {
if (this.site !== null && this.site !== undefined && this.site !== '') {
return this.site
}
return ''
},
triggerUpload() {
this.fileName = ''; //
this.$refs.uploadFile.clearFiles(); //
@ -219,6 +225,11 @@ export default {
}
},
upload() {
const currentSite = this.resolveUploadSite()
if (currentSite === '') {
this.$message.warning("未获取到工厂,请重新选择数据后再上传")
return;
}
if (this.fileList.length === 0) {
this.$message.warning("未选择需要上传的文件")
return;
@ -233,7 +244,7 @@ export default {
}
let data = new FormData();
data.append("file", this.fileList[0].raw);
data.append("orderRef1", this.$store.state.user.site);
data.append("orderRef1", currentSite);
data.append("orderRef2", this.proofingId);
data.append("orderRef3", this.id);
data.append("orderRef4", this.projectId);
@ -314,8 +325,13 @@ export default {
});
},
getProofDocument() {
const currentSite = this.resolveUploadSite()
if (currentSite === '') {
this.proofDocumentList = []
return
}
let tempData = {
site: this.$store.state.user.site,
site: currentSite,
username: this.$store.state.user.name,
buNo: this.bu,
proofingId: this.proofingId,
@ -332,7 +348,7 @@ export default {
if (data && data.code === 0) {
this.proofDocumentList = data.page.list
for (let i = 0; i < this.proofDocumentList.length; i++) {
this.proofDocumentList[i].buNo = this.proofDocumenCurrentRow.buNo
this.proofDocumentList[i].buNo = this.bu
}
} else {
this.proofDocumentList = []

Loading…
Cancel
Save