|
@@ -82,19 +82,50 @@
|
|
v-if="row.blueprint"
|
|
v-if="row.blueprint"
|
|
:src="row.blueprint"
|
|
:src="row.blueprint"
|
|
@click="openFile(row.blueprint)" />
|
|
@click="openFile(row.blueprint)" />
|
|
- <el-button type="primary" style="transform: translateY(-2px)" @click="clickDrawingFile(index)" text>选择文件</el-button>
|
|
|
|
|
|
+ <div style="display: flex">
|
|
|
|
+ <el-button type="primary" @click="clickDrawingFile(index)" text>选择图稿</el-button>
|
|
|
|
+ <el-upload
|
|
|
|
+ :show-file-list="false"
|
|
|
|
+ action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
|
+ :data="uploadImgData"
|
|
|
|
+ :before-upload="uploadImgFile"
|
|
|
|
+ :on-success="
|
|
|
|
+ (response, uploadFile) => {
|
|
|
|
+ return handleImgSuccess(uploadFile, index);
|
|
|
|
+ }
|
|
|
|
+ "
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ accept=".docx,.jpg,.jpeg,.png,.GIF,.JPG,.PNG">
|
|
|
|
+ <el-button type="primary" style="margin-left: 12px" text>上传图片</el-button>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="display: flex; margin-top: 20px; width: 100%">
|
|
<div style="display: flex; margin-top: 20px; width: 100%">
|
|
<div style="width: 65px">图稿文件:</div>
|
|
<div style="width: 65px">图稿文件:</div>
|
|
<div style="width: calc(100% - 65px)">
|
|
<div style="width: calc(100% - 65px)">
|
|
<a
|
|
<a
|
|
- style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
|
|
|
|
|
|
+ style="color: #16e5c1; cursor: pointer; word-break: break-all; margin-right: 10px"
|
|
@click="openFile(row.productionDocument)"
|
|
@click="openFile(row.productionDocument)"
|
|
v-if="row.productionDocument">
|
|
v-if="row.productionDocument">
|
|
{{ row.productionDocument }}
|
|
{{ row.productionDocument }}
|
|
</a>
|
|
</a>
|
|
- <el-button type="primary" style="transform: translateY(-2px)" @click="clickDrawingFile(index)" text>选择文件</el-button>
|
|
|
|
|
|
+ <div style="display: flex">
|
|
|
|
+ <el-button type="primary" @click="clickDrawingFile(index)" text>选择图稿</el-button>
|
|
|
|
+ <el-upload
|
|
|
|
+ :show-file-list="false"
|
|
|
|
+ action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
|
+ :data="uploadData"
|
|
|
|
+ :before-upload="uploadFile"
|
|
|
|
+ :on-success="
|
|
|
|
+ (response, uploadFile) => {
|
|
|
|
+ return handleSuccess(uploadFile, index);
|
|
|
|
+ }
|
|
|
|
+ "
|
|
|
|
+ style="width: 100%">
|
|
|
|
+ <el-button type="primary" style="margin-left: 12px" text>上传文件</el-button>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -452,6 +483,30 @@ const printType = ref([
|
|
dictValue: "双面",
|
|
dictValue: "双面",
|
|
},
|
|
},
|
|
]);
|
|
]);
|
|
|
|
+const uploadData = ref({});
|
|
|
|
+const uploadFile = async (file) => {
|
|
|
|
+ const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
|
|
|
|
+ uploadData.value = res.uploadBody;
|
|
|
|
+ file.id = res.id;
|
|
|
|
+ file.fileName = res.fileName;
|
|
|
|
+ file.fileUrl = res.fileUrl;
|
|
|
|
+ return true;
|
|
|
|
+};
|
|
|
|
+const handleSuccess = (UploadFile, index) => {
|
|
|
|
+ formData.data.orderSkuList[index].productionDocument = UploadFile.raw.fileUrl;
|
|
|
|
+};
|
|
|
|
+const uploadImgData = ref({});
|
|
|
|
+const uploadImgFile = async (file) => {
|
|
|
|
+ const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
|
|
|
|
+ uploadImgData.value = res.uploadBody;
|
|
|
|
+ file.id = res.id;
|
|
|
|
+ file.fileName = res.fileName;
|
|
|
|
+ file.fileUrl = res.fileUrl;
|
|
|
|
+ return true;
|
|
|
|
+};
|
|
|
|
+const handleImgSuccess = (UploadFile, index) => {
|
|
|
|
+ formData.data.orderSkuList[index].blueprint = UploadFile.raw.fileUrl;
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|