|
|
|
@ -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 = [] |
|
|
|
|