|
|
|
|
@ -412,22 +412,21 @@ export default { |
|
|
|
|
console.log(file); |
|
|
|
|
const fileUrl = file.url || (file.response && file.response.result && file.response.result.fileUrl); |
|
|
|
|
if (!fileUrl) return; |
|
|
|
|
|
|
|
|
|
// 如果需要携带 Token,且后端支持 URL 参数传参,可以拼接 Token |
|
|
|
|
// const token = this.$store.getters.access_token; |
|
|
|
|
// const previewUrl = `${fileUrl}?token=${token}`; |
|
|
|
|
|
|
|
|
|
// 大多数情况下,OSS 或静态资源服务器是公开读的,直接打开即可 |
|
|
|
|
window.open(fileUrl, '_blank'); |
|
|
|
|
}, |
|
|
|
|
handleExceed(files, fileList) { |
|
|
|
|
this.$message.warning(`当前限制选择 6 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); |
|
|
|
|
}, |
|
|
|
|
beforeRemove(file, fileList) { |
|
|
|
|
|
|
|
|
|
return this.$confirm(`确定移除 ${file.name}?`); |
|
|
|
|
}, |
|
|
|
|
handleUploadSuccess(response, file, fileList) { |
|
|
|
|
this.fileList = fileList; |
|
|
|
|
console.log(response, file, fileList); |
|
|
|
|
this.fileList.push({ |
|
|
|
|
...response.data.result, |
|
|
|
|
name:response.data.result.fileName |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
beforeAvatarUpload(file) { |
|
|
|
|
// 1. 校验文件类型 |
|
|
|
|
@ -472,7 +471,8 @@ export default { |
|
|
|
|
stat.theInboundQuantity = detail.theInboundQuantity; //本次入库数量 |
|
|
|
|
stat.totalQuantity = stat.num + detail.theInboundQuantity; |
|
|
|
|
stat.unitPrice = detail.unitPrice; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
if (stat.type == "NY" && stat.num != 0) { |
|
|
|
|
stat.theInboundQuantity = 0; //本次入库数 |
|
|
|
|
stat.unitPrice = stat.unitPrice; |
|
|
|
|
stat.totalQuantity = stat.num + detail.theInboundQuantity; |
|
|
|
|
@ -493,6 +493,7 @@ export default { |
|
|
|
|
(item) => |
|
|
|
|
item.materialId === stat.materialId && item.type === stat.type |
|
|
|
|
); |
|
|
|
|
console.log(detail,'detail',this.sizeForm.singleData); |
|
|
|
|
if (stat.type == "YH") { |
|
|
|
|
stat.theInboundQuantity = detail.theInboundQuantity; //本次入库数量 |
|
|
|
|
stat.totalQuantity = stat.num + detail.theInboundQuantity; |
|
|
|
|
@ -502,7 +503,8 @@ export default { |
|
|
|
|
stat.theInboundQuantity = detail.theInboundQuantity; //本次入库数量 |
|
|
|
|
stat.totalQuantity = stat.num + detail.theInboundQuantity; |
|
|
|
|
stat.unitPrice = detail.unitPrice; |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
if (stat.type == "NY" && stat.num != 0) { |
|
|
|
|
stat.theInboundQuantity = 0; //本次入库数 |
|
|
|
|
stat.unitPrice = stat.unitPrice; |
|
|
|
|
stat.totalQuantity = stat.num + detail.theInboundQuantity; |
|
|
|
|
@ -836,13 +838,12 @@ export default { |
|
|
|
|
this.sizeForm.onePutStorageFilesList = [] |
|
|
|
|
this.fileList.forEach(item => { |
|
|
|
|
this.sizeForm.onePutStorageFilesList.push({ |
|
|
|
|
fileName: item.response.result.fileName, |
|
|
|
|
fileUrl: item.response.result.fileUrl, |
|
|
|
|
mediaId: item.response.result.mediaId, |
|
|
|
|
fileName: item.fileName, |
|
|
|
|
fileUrl: item.fileUrl, |
|
|
|
|
mediaId: item.mediaId, |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
console.log(this.sizeForm, 99); |
|
|
|
|
try { |
|
|
|
|
const res = await submitData(this.sizeForm); |
|
|
|
|
if (res.data.success) { |
|
|
|
|
|