|
@@ -387,7 +387,7 @@
|
|
|
<el-table-column label="数量" width="160">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'contractShipmentList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
|
|
|
+ <el-form-item :prop="'contractShipmentList.' + $index + '.quantity'" :inline-message="true">
|
|
|
<el-input-number
|
|
|
v-model="row.quantity"
|
|
|
placeholder="请输入数量"
|
|
@@ -430,6 +430,7 @@
|
|
|
:data="uploadData"
|
|
|
multiple
|
|
|
:before-upload="uploadFile"
|
|
|
+ :on-success="handleSuccess"
|
|
|
:on-preview="onPreviewFile">
|
|
|
<el-button>选择</el-button>
|
|
|
</el-upload>
|
|
@@ -954,19 +955,30 @@ const uploadFile = async (file) => {
|
|
|
file.id = res.id;
|
|
|
file.fileName = res.fileName;
|
|
|
file.fileUrl = res.fileUrl;
|
|
|
+ file.uploadState = false;
|
|
|
return true;
|
|
|
};
|
|
|
+const handleSuccess = (any, UploadFile) => {
|
|
|
+ UploadFile.raw.uploadState = true;
|
|
|
+};
|
|
|
const onPreviewFile = (file) => {
|
|
|
window.open(file.raw.fileUrl, "_blank");
|
|
|
};
|
|
|
const submitHandoverForm = () => {
|
|
|
formData.data.contractProductList[productIndex.value].remark = productRow.data.remark;
|
|
|
if (fileList.value && fileList.value.length > 0) {
|
|
|
+ for (let i = 0; i < fileList.value.length; i++) {
|
|
|
+ if (!fileList.value[i].raw.uploadState) {
|
|
|
+ ElMessage("文件上传中,请稍后提交");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
formData.data.contractProductList[productIndex.value].fileList = fileList.value.map((item) => {
|
|
|
return {
|
|
|
id: item.raw.id,
|
|
|
fileName: item.raw.fileName,
|
|
|
fileUrl: item.raw.fileUrl,
|
|
|
+ uploadState: item.raw.uploadState,
|
|
|
};
|
|
|
});
|
|
|
} else {
|