lxf 1 year ago
parent
commit
1e5a4cf134

+ 17 - 8
src/views/sell/draft-design/drawing/index.vue

@@ -70,9 +70,9 @@
                   <div style="width: calc(100% - 70px); line-height: 32px">
                     <a
                       style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
-                      @click="openFile(row.proofingDocument)"
-                      v-if="row.proofingDocument">
-                      {{ row.proofingDocument }}
+                      @click="openFile(row.productionDocument)"
+                      v-if="row.productionDocument">
+                      {{ row.productionDocument }}
                     </a>
                     <el-upload
                       :show-file-list="false"
@@ -81,7 +81,7 @@
                       :before-upload="uploadFile"
                       :on-success="handleSuccess"
                       style="width: 100%">
-                      <el-button type="primary" text>上传EZ3文件</el-button>
+                      <el-button type="primary" text>上传ez3/dxf文件</el-button>
                     </el-upload>
                   </div>
                 </div>
@@ -139,7 +139,7 @@ import { useRoute, useRouter } from "vue-router";
 import useTagsViewStore from "/src/store/modules/tagsView.js";
 import byForm from "/src/components/byForm/index";
 import { nextTick } from "vue";
-// import { ElMessage } from "element-plus";
+import { ElMessage } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const route = useRoute();
@@ -224,7 +224,7 @@ const uploadFile = async (file) => {
   return true;
 };
 const handleSuccess = (response, UploadFile) => {
-  formData.data.proofingDocument = UploadFile.raw.fileUrl;
+  formData.data.productionDocument = UploadFile.raw.fileUrl;
 };
 const openDrawing = ref(false);
 const width = ref(0);
@@ -506,8 +506,17 @@ const clickCancel = () => {
   router.replace({ path: "/sell/draft-design/draft-design-management" });
 };
 const clickSubmit = () => {
-  submit.value.handleSubmit(() => {
-    console.log(formData.data);
+  if (!formData.data.proofingImg) {
+    return ElMessage("请上传设计样图");
+  }
+  if (!formData.data.productionDocument) {
+    return ElMessage("请上传图稿文件");
+  }
+  proxy.post("/orderSkuArtworkMake/edit", formData.data).then(() => {
+    ElMessage({ message: "提交成功", type: "success" });
+    const useTagsStore = useTagsViewStore();
+    useTagsStore.delVisitedView(router.currentRoute.value);
+    router.replace({ path: "/sell/draft-design/draft-design-management" });
   });
 };
 </script>

+ 1 - 1
src/views/sell/draft-design/management/index.vue

@@ -13,7 +13,7 @@
   </el-card>
 </template>
 
-<script setup>
+<script setup name="Draft-design-management">
 import byTable from "/src/components/byTable/index";
 
 const { proxy } = getCurrentInstance();