|
@@ -164,6 +164,23 @@
|
|
|
<el-table-column label="图稿(生产文件)" width="320">
|
|
|
<template #default="{ row }">
|
|
|
<div style="color: black; line-height: 35px">共享文件夹路径(点击下方链接并上传文件):</div>
|
|
|
+ <div v-if="row.productionDocument">
|
|
|
+ <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="openFile(row.productionDocument)">
|
|
|
+ {{ row.productionDocument }}
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <el-upload
|
|
|
+ action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
+ :data="uploadData"
|
|
|
+ :show-file-list="false"
|
|
|
+ :before-upload="beforeUpload"
|
|
|
+ :on-success="
|
|
|
+ (response, uploadFile) => {
|
|
|
+ return handleSuccess(uploadFile, index);
|
|
|
+ }
|
|
|
+ ">
|
|
|
+ <el-button style="background: #20b2aa; color: #fff; border: 1px solid #20b2aa">上传</el-button>
|
|
|
+ </el-upload>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="包材配件/单品" min-width="400">
|
|
@@ -272,20 +289,20 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template #attachments>
|
|
|
+ <!-- <template #attachments>
|
|
|
<div style="width: 100%">
|
|
|
<el-upload
|
|
|
v-model:fileList="fileList"
|
|
|
action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
|
|
|
:data="uploadData"
|
|
|
multiple
|
|
|
- :before-upload="uploadFile"
|
|
|
+ :before-upload="beforeUpload"
|
|
|
:on-success="handleSuccess"
|
|
|
:on-preview="onPreviewFile">
|
|
|
<el-button style="background: #20b2aa; color: #fff; border: 1px solid #20b2aa">上传</el-button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
<template #remark>
|
|
|
<div style="width: 100%">
|
|
|
<div v-if="route.query && route.query.detailId">
|
|
@@ -298,7 +315,7 @@
|
|
|
<div style="width: 100%; text-align: center; margin: 10px">
|
|
|
<el-button @click="clickCancel()" v-if="route.query && route.query.detailId" size="large">关 闭</el-button>
|
|
|
<el-button @click="clickCancel()" v-if="!(route.query && route.query.detailId)" size="large">取 消</el-button>
|
|
|
- <el-button @click="submitForm('0')" v-if="!(route.query && route.query.detailId)" size="large" v-preReClick>暂 存</el-button>
|
|
|
+ <el-button @click="submitForm('0')" v-if="!(route.query && route.query.detailId) && !route.query.status" size="large" v-preReClick>暂 存</el-button>
|
|
|
<el-button type="primary" @click="submitForm('10')" v-if="!(route.query && route.query.detailId)" size="large" v-preReClick>确 定</el-button>
|
|
|
</div>
|
|
|
</el-card>
|
|
@@ -419,16 +436,16 @@ const formConfig = computed(() => {
|
|
|
prop: "totalMonet",
|
|
|
slotName: "totalMonet",
|
|
|
},
|
|
|
- {
|
|
|
- type: "title",
|
|
|
- title: "附件",
|
|
|
- label: "",
|
|
|
- },
|
|
|
- {
|
|
|
- type: "slot",
|
|
|
- slotName: "attachments",
|
|
|
- label: "附件",
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // type: "title",
|
|
|
+ // title: "附件",
|
|
|
+ // label: "",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "slot",
|
|
|
+ // slotName: "attachments",
|
|
|
+ // label: "附件",
|
|
|
+ // },
|
|
|
{
|
|
|
type: "title",
|
|
|
title: "订单备注",
|
|
@@ -477,7 +494,7 @@ const handleProductSuccess = (uploadFile, index) => {
|
|
|
};
|
|
|
const uploadData = ref({});
|
|
|
const fileList = ref([]);
|
|
|
-const uploadFile = async (file) => {
|
|
|
+const beforeUpload = async (file) => {
|
|
|
const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
|
|
|
uploadData.value = res.uploadBody;
|
|
|
file.id = res.id;
|
|
@@ -486,12 +503,15 @@ const uploadFile = async (file) => {
|
|
|
file.uploadState = true;
|
|
|
return true;
|
|
|
};
|
|
|
-const handleSuccess = (any, UploadFile) => {
|
|
|
- UploadFile.raw.uploadState = false;
|
|
|
+const handleSuccess = (uploadFile, index) => {
|
|
|
+ formData.data.orderSkuList[index].productionDocument = uploadFile.raw.fileUrl;
|
|
|
};
|
|
|
const onPreviewFile = (file) => {
|
|
|
window.open(file.raw.fileUrl, "_blank");
|
|
|
};
|
|
|
+const openFile = (path) => {
|
|
|
+ window.open(path);
|
|
|
+};
|
|
|
const updatePackageRemark = (val, index) => {
|
|
|
formData.data.orderSkuList[index].packageRemark = val;
|
|
|
};
|
|
@@ -521,11 +541,23 @@ const submitForm = (status) => {
|
|
|
} else {
|
|
|
formData.data.fileList = [];
|
|
|
}
|
|
|
+ if (route.query.status) {
|
|
|
+ for (let i = 0; i < formData.data.orderSkuList.length; i++) {
|
|
|
+ if (!formData.data.orderSkuList[i].blueprint) {
|
|
|
+ return ElMessage("请上传设计图");
|
|
|
+ }
|
|
|
+ if (!formData.data.orderSkuList[i].productionDocument) {
|
|
|
+ return ElMessage("请上传生产文件");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ formData.data.status = route.query.status;
|
|
|
+ } else {
|
|
|
+ formData.data.status = status;
|
|
|
+ }
|
|
|
let type = "add";
|
|
|
if (formData.data.id) {
|
|
|
type = "edit";
|
|
|
}
|
|
|
- formData.data.status = status;
|
|
|
proxy.post("/orderInfo/" + type, formData.data).then(() => {
|
|
|
ElMessage({
|
|
|
message: type == "add" ? "添加成功" : "编辑成功",
|