lxf 1 年之前
父節點
當前提交
6af422fa9a
共有 2 個文件被更改,包括 4 次插入69 次删除
  1. 0 64
      src/views/group/order/management/detail.vue
  2. 4 5
      src/views/subsidiary/order/management/add.vue

+ 0 - 64
src/views/group/order/management/detail.vue

@@ -289,20 +289,6 @@
             </div>
           </div>
         </template>
-        <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"
-              :on-success="handleSuccess"
-              :on-preview="onPreviewFile">
-              <el-button style="background: #20b2aa; color: #fff; border: 1px solid #20b2aa">上传</el-button>
-            </el-upload>
-          </div>
-        </template>
         <template #remark>
           <div style="width: 100%">
             <div v-html="getStyle(formData.data.remark)"></div>
@@ -357,7 +343,6 @@ const formOption = reactive({
 const formData = reactive({
   data: {
     remark: "",
-    fileList: [],
     orderSkuList: [],
   },
 });
@@ -476,35 +461,6 @@ const getDemandData = () => {
   });
 };
 getDemandData();
-const uploadProductData = ref({});
-const uploadProductFile = async (file) => {
-  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
-  uploadProductData.value = res.uploadBody;
-  file.id = res.id;
-  file.fileName = res.fileName;
-  file.fileUrl = res.fileUrl;
-  return true;
-};
-const handleProductSuccess = (uploadFile, index) => {
-  formData.data.orderSkuList[index].blueprint = uploadFile.raw.fileUrl;
-};
-const uploadData = ref({});
-const fileList = 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;
-  file.uploadState = true;
-  return true;
-};
-const handleSuccess = (any, UploadFile) => {
-  UploadFile.raw.uploadState = false;
-};
-const onPreviewFile = (file) => {
-  window.open(file.raw.fileUrl, "_blank");
-};
 const openFile = (path) => {
   window.open(path);
 };
@@ -608,26 +564,6 @@ const getOrderDetail = (parameter) => {
     if (res.orderSkuList && res.orderSkuList.length > 0) {
       list = list.concat(res.orderSkuList.map((item) => item.id));
     }
-    proxy.post("/fileInfo/getList", { businessIdList: list }).then((fileObj) => {
-      if (fileObj) {
-        if (fileObj[res.id] && fileObj[res.id].length > 0) {
-          fileList.value = fileObj[res.id].map((item) => {
-            return {
-              raw: item,
-              name: item.fileName,
-              url: item.fileUrl,
-            };
-          });
-        }
-        if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
-          for (let i = 0; i < formData.data.orderSkuList.length; i++) {
-            if (fileObj[formData.data.orderSkuList[i].id] && fileObj[formData.data.orderSkuList[i].id].length > 0) {
-              formData.data.orderSkuList[i].blueprint = fileObj[formData.data.orderSkuList[i].id][0];
-            }
-          }
-        }
-      }
-    });
   });
 };
 const getStyle = (text) => {

+ 4 - 5
src/views/subsidiary/order/management/add.vue

@@ -147,7 +147,7 @@
                           <el-button style="background: #20b2aa; color: #fff; border: 1px solid #20b2aa" @click="clickDrawingFile(index)">选择</el-button>
                           <el-image
                             fit="scale-down"
-                            style="width: 148px; height: 148px; margin-top: 20px;"
+                            style="width: 148px; height: 148px; margin-top: 20px"
                             v-if="row.blueprint"
                             :src="row.blueprint"
                             @click="openFile(row.blueprint)" />
@@ -460,9 +460,8 @@ const clickDrawingFile = (index) => {
   openDrawingFile.value = true;
 };
 const selectPic = (row) => {
-  console.log(row);
   formData.data.orderSkuList[drawingFileIndex.value].blueprint = row.imgUrl;
-  formData.data.orderSkuList[drawingFileIndex.value].productionDocument = row.fileUrl;
+  formData.data.orderSkuList[drawingFileIndex.value].productionDocument = row.artworkName + "/" + row.fileName;
   ElMessage({ message: "选择完成", type: "success" });
   openDrawingFile.value = false;
 };
@@ -485,10 +484,10 @@ const submitForm = (status) => {
       if (route.query.status) {
         for (let i = 0; i < formData.data.orderSkuList.length; i++) {
           if (!formData.data.orderSkuList[i].blueprint) {
-            return ElMessage("请上传设计图");
+            return ElMessage("请选择设计图");
           }
           if (!formData.data.orderSkuList[i].productionDocument) {
-            return ElMessage("请上传生产文件");
+            return ElMessage("请选择生产文件");
           }
         }
         formData.data.status = route.query.status;