Parcourir la source

订单整改: 不干胶图片, 订单类型, 附件

lxf il y a 1 an
Parent
commit
36f2c4d810

+ 114 - 105
src/views/group/order/management/detail.vue

@@ -6,58 +6,18 @@
         <span style="font-size: 18px; font-weight: 700" v-if="formData.data.wlnCode"> ({{ formData.data.wlnCode }})</span>
       </div>
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
-        <template #deliveryAddress>
+        <template #type>
           <div style="width: 100%">
-            <el-row>
-              <el-col :span="3">
-                <el-form-item label-width="0" prop="province" style="width: 100%">
-                  <el-input v-model="formData.data.province" placeholder="请输入省" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="3">
-                <el-form-item label-width="0" prop="city" style="width: 100%">
-                  <el-input v-model="formData.data.city" placeholder="请输入市" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="3">
-                <el-form-item label-width="0" prop="county" style="width: 100%">
-                  <el-input v-model="formData.data.county" placeholder="请输入区/县" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="11">
-                <el-form-item label-width="0" prop="detailedAddress" style="width: 100%">
-                  <el-input v-model="formData.data.detailedAddress" placeholder="请输入详细地址" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="4">
-                <el-form-item label-width="0" prop="postcode" style="width: 100%">
-                  <el-input v-model="formData.data.postcode" placeholder="请输入邮编" />
-                </el-form-item>
-              </el-col>
-            </el-row>
+            <el-radio-group v-model="formData.data.type">
+              <el-radio v-for="(itemType, index) in typeList" :key="index" :label="itemType.dictKey">{{ itemType.dictValue }}</el-radio>
+            </el-radio-group>
           </div>
         </template>
-        <template #consignee>
+        <template #departmentId>
           <div style="width: 100%">
-            <el-row>
-              <el-col :span="6">
-                <el-form-item label-width="0" prop="consignee" style="width: 100%">
-                  <el-input v-model="formData.data.consignee" placeholder="请输入联系人" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label-width="0" prop="consigneeNumber" style="width: 100%">
-                  <el-input v-model="formData.data.consigneeNumber" placeholder="请输入联系电话" />
-                </el-form-item>
-              </el-col>
-              <el-col :span="6">
-                <el-form-item label-width="0" prop="departmentId" style="width: 100%">
-                  <el-select v-model="formData.data.departmentId" placeholder="请选择事业部" clearable style="width: 100%">
-                    <el-option v-for="item in departmentList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
-                  </el-select>
-                </el-form-item>
-              </el-col>
-            </el-row>
+            <el-select v-model="formData.data.departmentId" placeholder="请选择事业部" clearable style="width: 100%">
+              <el-option v-for="item in departmentList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+            </el-select>
           </div>
         </template>
         <template #orderSkuList>
@@ -191,30 +151,39 @@
                     </el-table-column>
                     <el-table-column label="产品图稿" width="400">
                       <template #default="{ row }">
-                        <el-form-item :prop="'orderSkuList.' + index + '.blueprint'">
-                          <div style="display: flex; width: 100%">
-                            <div style="width: 65px">设计图:</div>
-                            <div style="width: calc(100% - 65px)">
-                              <el-image
-                                fit="scale-down"
-                                style="width: 148px; height: 148px; margin-right: 10px"
-                                v-if="row.blueprint"
-                                :src="row.blueprint"
-                                @click="openFile(row.blueprint)" />
-                            </div>
+                        <div style="display: flex; width: 100%">
+                          <div style="width: 80px">设计图:</div>
+                          <div style="width: calc(100% - 80px)">
+                            <el-image
+                              fit="scale-down"
+                              style="width: 148px; height: 148px; margin-right: 10px"
+                              v-if="row.blueprint"
+                              :src="row.blueprint"
+                              @click="openFile(row.blueprint)" />
                           </div>
-                          <div style="display: flex; margin-top: 20px; width: 100%">
-                            <div style="width: 65px">图稿文件:</div>
-                            <div style="width: calc(100% - 65px)">
-                              <a
-                                style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
-                                @click="openFile(row.productionDocument)"
-                                v-if="row.productionDocument">
-                                {{ row.productionDocument }}
-                              </a>
-                            </div>
+                        </div>
+                        <div style="display: flex; margin-top: 20px; width: 100%">
+                          <div style="width: 80px">图稿文件:</div>
+                          <div style="width: calc(100% - 80px)">
+                            <a
+                              style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
+                              @click="openFile(row.productionDocument)"
+                              v-if="row.productionDocument">
+                              {{ row.productionDocument }}
+                            </a>
+                          </div>
+                        </div>
+                        <div style="display: flex; margin-top: 20px; width: 100%">
+                          <div style="width: 80px">不干胶图片:</div>
+                          <div style="width: calc(100% - 80px)">
+                            <a
+                              style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
+                              @click="openFile(row.selfAdhesiveStickerFile.fileUrl)"
+                              v-if="row.selfAdhesiveStickerFile && row.selfAdhesiveStickerFile.fileName">
+                              {{ row.selfAdhesiveStickerFile.fileName }}
+                            </a>
                           </div>
-                        </el-form-item>
+                        </div>
                       </template>
                     </el-table-column>
                     <el-table-column label="包材配件/单品" min-width="400">
@@ -403,13 +372,33 @@ const formOption = reactive({
 const formData = reactive({
   data: {
     remark: "",
+    type: 1,
     orderSkuList: [],
+    fileList: [],
   },
 });
 const formConfig = computed(() => {
   return [
     {
       type: "title",
+      title: "类型",
+      label: "",
+    },
+    {
+      type: "slot",
+      prop: "type",
+      slotName: "type",
+      label: "订单类型",
+    },
+    {
+      type: "slot",
+      prop: "departmentId",
+      slotName: "departmentId",
+      label: "事业部",
+      itemWidth: 25,
+    },
+    {
+      type: "title",
       title: "产品",
       label: "",
     },
@@ -418,27 +407,6 @@ const formConfig = computed(() => {
       prop: "orderSkuList",
       slotName: "orderSkuList",
     },
-    route.query && route.query.detailId
-      ? {}
-      : {
-          type: "title",
-          title: "地址",
-          label: "",
-        },
-    route.query && route.query.detailId
-      ? {}
-      : {
-          type: "slot",
-          slotName: "deliveryAddress",
-          label: "收货地址",
-        },
-    route.query && route.query.detailId
-      ? {}
-      : {
-          type: "slot",
-          slotName: "consignee",
-          label: "收货人",
-        },
     {
       type: "title",
       title: "贸易",
@@ -515,6 +483,8 @@ const rules = ref({
   //   expressDeliveryId: [{ required: true, message: "请选择快递", trigger: "change" }],
   commercePlatform: [{ required: true, message: "请选择电商平台", trigger: "change" }],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
+  type: [{ required: true, message: "请选择订单类型", trigger: "change" }],
+  departmentId: [{ required: true, message: "请选择事业部", trigger: "change" }],
 });
 const getDemandData = () => {
   proxy.post("/department/page", { pageNum: 1, pageSize: 999 }).then((res) => {
@@ -577,22 +547,35 @@ const getOrderDetail = (parameter) => {
       activeNames.value = allIndex;
       formOption.disabled = true;
     }
-    proxy.post("/fileInfo/getList", { businessIdList: [formData.data.id] }).then((fileObj) => {
-      if (fileObj[formData.data.id] && fileObj[formData.data.id].length > 0) {
-        let list = fileObj[formData.data.id].filter((item) => item.businessType == "0");
-        if (list && list.length > 0) {
-          fileList.value = list.map((item) => {
-            return {
-              raw: item,
-              name: item.fileName,
-              url: item.fileUrl,
+    let list = [formData.data.id];
+    if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
+      list = list.concat(formData.data.orderSkuList.map((item) => item.id));
+      proxy.post("/fileInfo/getList", { businessIdList: list }).then((fileObj) => {
+        if (fileObj[formData.data.id] && fileObj[formData.data.id].length > 0) {
+          let file = fileObj[formData.data.id].filter((item) => item.businessType == "0");
+          if (file && file.length > 0) {
+            fileList.value = file.map((item) => {
+              return {
+                raw: item,
+                name: item.fileName,
+                url: item.fileUrl,
+              };
+            });
+          } else {
+            fileList.value = [];
+          }
+        }
+        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].selfAdhesiveStickerFile = {
+              id: fileObj[formData.data.orderSkuList[i].id][0].id,
+              fileName: fileObj[formData.data.orderSkuList[i].id][0].fileName,
+              fileUrl: fileObj[formData.data.orderSkuList[i].id][0].fileUrl,
             };
-          });
-        } else {
-          fileList.value = [];
+          }
         }
-      }
-    });
+      });
+    }
   });
 };
 const getStyle = (text) => {
@@ -612,6 +595,16 @@ const printType = ref([
     dictValue: "双面",
   },
 ]);
+const typeList = ref([
+  {
+    dictKey: 1,
+    dictValue: "自主订单",
+  },
+  {
+    dictKey: 2,
+    dictValue: "委外订单",
+  },
+]);
 const changePrice = reactive({
   data: {},
 });
@@ -858,6 +851,22 @@ const onSuccessFile = (any, UploadFile) => {
 const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
+const uploadAdhesiveData = ref({});
+const uploadAdhesiveFile = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadAdhesiveData.value = res.uploadBody;
+  file.id = res.id;
+  file.fileName = res.fileName;
+  file.fileUrl = res.fileUrl;
+  return true;
+};
+const handleAdhesiveSuccess = (UploadFile, index) => {
+  formData.data.orderSkuList[index].selfAdhesiveStickerFile = {
+    id: UploadFile.raw.id,
+    fileName: UploadFile.raw.fileName,
+    fileUrl: UploadFile.raw.fileUrl,
+  };
+};
 </script>
 
 <style lang="scss" scoped>

+ 165 - 74
src/views/subsidiary/order/management/add.vue

@@ -6,6 +6,20 @@
         <span style="font-size: 18px; font-weight: 700" v-if="formData.data.wlnCode"> ({{ formData.data.wlnCode }})</span>
       </div>
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+        <template #type>
+          <div style="width: 100%">
+            <el-radio-group v-model="formData.data.type">
+              <el-radio v-for="(itemType, index) in typeList" :key="index" :label="itemType.dictKey">{{ itemType.dictValue }}</el-radio>
+            </el-radio-group>
+          </div>
+        </template>
+        <template #departmentId>
+          <div style="width: 100%">
+            <el-select v-model="formData.data.departmentId" placeholder="请选择事业部" clearable style="width: 100%">
+              <el-option v-for="item in departmentList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+            </el-select>
+          </div>
+        </template>
         <template #deliveryAddress>
           <div style="width: 100%">
             <el-row>
@@ -50,13 +64,6 @@
                   <el-input v-model="formData.data.consigneeNumber" placeholder="请输入联系电话" />
                 </el-form-item>
               </el-col>
-              <el-col :span="6">
-                <el-form-item label-width="0" prop="departmentId" style="width: 100%">
-                  <el-select v-model="formData.data.departmentId" placeholder="请选择事业部" clearable style="width: 100%">
-                    <el-option v-for="item in departmentList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
-                  </el-select>
-                </el-form-item>
-              </el-col>
             </el-row>
           </div>
         </template>
@@ -147,63 +154,87 @@
                     </el-table-column>
                     <el-table-column label="产品图稿" width="400">
                       <template #default="{ row }">
-                        <el-form-item :prop="'orderSkuList.' + index + '.blueprint'">
-                          <div style="display: flex; width: 100%">
-                            <div style="width: 65px">设计图:</div>
-                            <div style="width: calc(100% - 65px)">
-                              <el-image
-                                fit="scale-down"
-                                style="width: 148px; height: 148px; margin-right: 10px"
-                                v-if="row.blueprint"
-                                :src="row.blueprint"
-                                @click="openFile(row.blueprint)" />
-                              <div style="display: flex" v-if="!(route.query && route.query.detailId)">
-                                <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 style="display: flex; width: 100%">
+                          <div style="width: 80px">设计图:</div>
+                          <div style="width: calc(100% - 80px)">
+                            <el-image
+                              fit="scale-down"
+                              style="width: 148px; height: 148px; margin-right: 10px"
+                              v-if="row.blueprint"
+                              :src="row.blueprint"
+                              @click="openFile(row.blueprint)" />
+                            <div style="display: flex" v-if="!(route.query && route.query.detailId)">
+                              <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 style="display: flex; margin-top: 20px; width: 100%">
-                            <div style="width: 65px">图稿文件:</div>
-                            <div style="width: calc(100% - 65px)">
-                              <a
-                                style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
-                                @click="openFile(row.productionDocument)"
-                                v-if="row.productionDocument">
-                                {{ row.productionDocument }}
-                              </a>
-                              <div style="display: flex" v-if="!(route.query && route.query.detailId)">
-                                <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 style="display: flex; margin-top: 20px; width: 100%">
+                          <div style="width: 80px">图稿文件:</div>
+                          <div style="width: calc(100% - 80px)">
+                            <a
+                              style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
+                              @click="openFile(row.productionDocument)"
+                              v-if="row.productionDocument">
+                              {{ row.productionDocument }}
+                            </a>
+                            <div style="display: flex" v-if="!(route.query && route.query.detailId)">
+                              <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>
-                        </el-form-item>
+                        </div>
+                        <div style="display: flex; margin-top: 20px; width: 100%">
+                          <div style="width: 80px">不干胶图片:</div>
+                          <div style="width: calc(100% - 80px)">
+                            <a
+                              style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
+                              @click="openFile(row.selfAdhesiveStickerFile.fileUrl)"
+                              v-if="row.selfAdhesiveStickerFile && row.selfAdhesiveStickerFile.fileName">
+                              {{ row.selfAdhesiveStickerFile.fileName }}
+                            </a>
+                            <div style="display: flex" v-if="!(route.query && route.query.detailId)">
+                              <el-upload
+                                :show-file-list="false"
+                                action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+                                :data="uploadAdhesiveData"
+                                :before-upload="uploadAdhesiveFile"
+                                :on-success="
+                                  (response, uploadFile) => {
+                                    return handleAdhesiveSuccess(uploadFile, index);
+                                  }
+                                "
+                                style="width: 100%">
+                                <el-button type="primary" text>上传文件</el-button>
+                              </el-upload>
+                            </div>
+                          </div>
+                        </div>
                       </template>
                     </el-table-column>
                     <el-table-column label="包材配件/单品" min-width="400">
@@ -401,6 +432,7 @@ const formOption = reactive({
 const formData = reactive({
   data: {
     remark: "",
+    type: 1,
     orderSkuList: [],
     fileList: [],
   },
@@ -409,6 +441,24 @@ const formConfig = computed(() => {
   return [
     {
       type: "title",
+      title: "类型",
+      label: "",
+    },
+    {
+      type: "slot",
+      prop: "type",
+      slotName: "type",
+      label: "订单类型",
+    },
+    {
+      type: "slot",
+      prop: "departmentId",
+      slotName: "departmentId",
+      label: "事业部",
+      itemWidth: 25,
+    },
+    {
+      type: "title",
       title: "产品",
       label: "",
     },
@@ -515,6 +565,8 @@ const rules = ref({
   sourcePlatform: [{ required: true, message: "请选择店铺来源", trigger: "change" }],
   shopName: [{ required: true, message: "请选择店铺", trigger: "change" }],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
+  type: [{ required: true, message: "请选择订单类型", trigger: "change" }],
+  departmentId: [{ required: true, message: "请选择事业部", trigger: "change" }],
 });
 const getDemandData = () => {
   proxy.post("/department/page", { pageNum: 1, pageSize: 999 }).then((res) => {
@@ -668,22 +720,35 @@ const getOrderDetail = (parameter) => {
       activeNames.value = allIndex;
       formOption.disabled = true;
     }
-    proxy.post("/fileInfo/getList", { businessIdList: [formData.data.id] }).then((fileObj) => {
-      if (fileObj[formData.data.id] && fileObj[formData.data.id].length > 0) {
-        let list = fileObj[formData.data.id].filter((item) => item.businessType == "0");
-        if (list && list.length > 0) {
-          fileList.value = list.map((item) => {
-            return {
-              raw: item,
-              name: item.fileName,
-              url: item.fileUrl,
+    let list = [formData.data.id];
+    if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
+      list = list.concat(formData.data.orderSkuList.map((item) => item.id));
+      proxy.post("/fileInfo/getList", { businessIdList: list }).then((fileObj) => {
+        if (fileObj[formData.data.id] && fileObj[formData.data.id].length > 0) {
+          let file = fileObj[formData.data.id].filter((item) => item.businessType == "0");
+          if (file && file.length > 0) {
+            fileList.value = file.map((item) => {
+              return {
+                raw: item,
+                name: item.fileName,
+                url: item.fileUrl,
+              };
+            });
+          } else {
+            fileList.value = [];
+          }
+        }
+        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].selfAdhesiveStickerFile = {
+              id: fileObj[formData.data.orderSkuList[i].id][0].id,
+              fileName: fileObj[formData.data.orderSkuList[i].id][0].fileName,
+              fileUrl: fileObj[formData.data.orderSkuList[i].id][0].fileUrl,
             };
-          });
-        } else {
-          fileList.value = [];
+          }
         }
-      }
-    });
+      });
+    }
   });
 };
 const getStyle = (text) => {
@@ -707,6 +772,16 @@ const printType = ref([
     dictValue: "双面",
   },
 ]);
+const typeList = ref([
+  {
+    dictKey: 1,
+    dictValue: "自主订单",
+  },
+  {
+    dictKey: 2,
+    dictValue: "委外订单",
+  },
+]);
 const selectProduct = (row, SKU) => {
   if (row.id) {
     let list = formData.data.orderSkuList.filter((item) => item.skuSpecId === row.id && item.bomSpecId === row.bomSpecId);
@@ -943,6 +1018,22 @@ const onSuccessFile = (any, UploadFile) => {
 const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
+const uploadAdhesiveData = ref({});
+const uploadAdhesiveFile = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadAdhesiveData.value = res.uploadBody;
+  file.id = res.id;
+  file.fileName = res.fileName;
+  file.fileUrl = res.fileUrl;
+  return true;
+};
+const handleAdhesiveSuccess = (UploadFile, index) => {
+  formData.data.orderSkuList[index].selfAdhesiveStickerFile = {
+    id: UploadFile.raw.id,
+    fileName: UploadFile.raw.fileName,
+    fileUrl: UploadFile.raw.fileUrl,
+  };
+};
 </script>
 
 <style lang="scss" scoped>

+ 166 - 67
src/views/subsidiary/order/management/design.vue

@@ -6,6 +6,20 @@
         <span style="font-size: 18px; font-weight: 700" v-if="formData.data.wlnCode"> ({{ formData.data.wlnCode }})</span>
       </div>
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+        <template #type>
+          <div style="width: 100%">
+            <el-radio-group v-model="formData.data.type">
+              <el-radio v-for="(itemType, index) in typeList" :key="index" :label="itemType.dictKey">{{ itemType.dictValue }}</el-radio>
+            </el-radio-group>
+          </div>
+        </template>
+        <template #departmentId>
+          <div style="width: 100%">
+            <el-select v-model="formData.data.departmentId" placeholder="请选择事业部" clearable style="width: 100%">
+              <el-option v-for="item in departmentList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+            </el-select>
+          </div>
+        </template>
         <template #orderSkuList>
           <div style="width: 100%; padding: 0 20px">
             <el-collapse v-model="activeNames">
@@ -76,63 +90,87 @@
                     </el-table-column>
                     <el-table-column label="产品图稿" width="400">
                       <template #default="{ row }">
-                        <el-form-item :prop="'orderSkuList.' + index + '.blueprint'">
-                          <div style="display: flex; width: 100%">
-                            <div style="width: 65px">设计图:</div>
-                            <div style="width: calc(100% - 65px)">
-                              <el-image
-                                fit="scale-down"
-                                style="width: 148px; height: 148px; margin-right: 10px"
-                                v-if="row.blueprint"
-                                :src="row.blueprint"
-                                @click="openFile(row.blueprint)" />
-                              <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 style="display: flex; width: 100%">
+                          <div style="width: 80px">设计图:</div>
+                          <div style="width: calc(100% - 80px)">
+                            <el-image
+                              fit="scale-down"
+                              style="width: 148px; height: 148px; margin-right: 10px"
+                              v-if="row.blueprint"
+                              :src="row.blueprint"
+                              @click="openFile(row.blueprint)" />
+                            <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 style="display: flex; margin-top: 20px; width: 100%">
-                            <div style="width: 65px">图稿文件:</div>
-                            <div style="width: calc(100% - 65px)">
-                              <a
-                                style="color: #16e5c1; cursor: pointer; word-break: break-all; margin-right: 10px"
-                                @click="openFile(row.productionDocument)"
-                                v-if="row.productionDocument">
-                                {{ row.productionDocument }}
-                              </a>
-                              <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 style="display: flex; margin-top: 20px; width: 100%">
+                          <div style="width: 80px">图稿文件:</div>
+                          <div style="width: calc(100% - 80px)">
+                            <a
+                              style="color: #16e5c1; cursor: pointer; word-break: break-all; margin-right: 10px"
+                              @click="openFile(row.productionDocument)"
+                              v-if="row.productionDocument">
+                              {{ row.productionDocument }}
+                            </a>
+                            <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 style="display: flex; margin-top: 20px; width: 100%">
+                          <div style="width: 80px">不干胶图片:</div>
+                          <div style="width: calc(100% - 80px)">
+                            <a
+                              style="color: #409eff; cursor: pointer; word-break: break-all; margin-right: 10px"
+                              @click="openFile(row.selfAdhesiveStickerFile.fileUrl)"
+                              v-if="row.selfAdhesiveStickerFile && row.selfAdhesiveStickerFile.fileName">
+                              {{ row.selfAdhesiveStickerFile.fileName }}
+                            </a>
+                            <div style="display: flex" v-if="!(route.query && route.query.detailId)">
+                              <el-upload
+                                :show-file-list="false"
+                                action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+                                :data="uploadAdhesiveData"
+                                :before-upload="uploadAdhesiveFile"
+                                :on-success="
+                                  (response, uploadFile) => {
+                                    return handleAdhesiveSuccess(uploadFile, index);
+                                  }
+                                "
+                                style="width: 100%">
+                                <el-button type="primary" text>上传文件</el-button>
+                              </el-upload>
                             </div>
                           </div>
-                        </el-form-item>
+                        </div>
                       </template>
                     </el-table-column>
                     <el-table-column label="包材配件/单品" min-width="400">
@@ -308,13 +346,33 @@ const formOption = reactive({
 const formData = reactive({
   data: {
     remark: "",
+    type: 1,
     orderSkuList: [],
+    fileList: [],
   },
 });
 const formConfig = computed(() => {
   return [
     {
       type: "title",
+      title: "类型",
+      label: "",
+    },
+    {
+      type: "slot",
+      prop: "type",
+      slotName: "type",
+      label: "订单类型",
+    },
+    {
+      type: "slot",
+      prop: "departmentId",
+      slotName: "departmentId",
+      label: "事业部",
+      itemWidth: 25,
+    },
+    {
+      type: "title",
       title: "产品",
       label: "",
     },
@@ -393,6 +451,8 @@ const rules = ref({
   sourcePlatform: [{ required: true, message: "请选择店铺来源", trigger: "change" }],
   shopName: [{ required: true, message: "请选择店铺", trigger: "change" }],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
+  type: [{ required: true, message: "请选择订单类型", trigger: "change" }],
+  departmentId: [{ required: true, message: "请选择事业部", trigger: "change" }],
 });
 const getDemandData = () => {
   proxy.post("/department/page", { pageNum: 1, pageSize: 999 }).then((res) => {
@@ -510,22 +570,35 @@ const getOrderDetail = (parameter) => {
       activeNames.value = allIndex;
       formOption.disabled = true;
     }
-    proxy.post("/fileInfo/getList", { businessIdList: [formData.data.id] }).then((fileObj) => {
-      if (fileObj[formData.data.id] && fileObj[formData.data.id].length > 0) {
-        let list = fileObj[formData.data.id].filter((item) => item.businessType == "0");
-        if (list && list.length > 0) {
-          fileList.value = list.map((item) => {
-            return {
-              raw: item,
-              name: item.fileName,
-              url: item.fileUrl,
+    let list = [formData.data.id];
+    if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
+      list = list.concat(formData.data.orderSkuList.map((item) => item.id));
+      proxy.post("/fileInfo/getList", { businessIdList: list }).then((fileObj) => {
+        if (fileObj[formData.data.id] && fileObj[formData.data.id].length > 0) {
+          let file = fileObj[formData.data.id].filter((item) => item.businessType == "0");
+          if (file && file.length > 0) {
+            fileList.value = file.map((item) => {
+              return {
+                raw: item,
+                name: item.fileName,
+                url: item.fileUrl,
+              };
+            });
+          } else {
+            fileList.value = [];
+          }
+        }
+        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].selfAdhesiveStickerFile = {
+              id: fileObj[formData.data.orderSkuList[i].id][0].id,
+              fileName: fileObj[formData.data.orderSkuList[i].id][0].fileName,
+              fileUrl: fileObj[formData.data.orderSkuList[i].id][0].fileUrl,
             };
-          });
-        } else {
-          fileList.value = [];
+          }
         }
-      }
-    });
+      });
+    }
   });
 };
 const getStyle = (text) => {
@@ -545,6 +618,16 @@ const printType = ref([
     dictValue: "双面",
   },
 ]);
+const typeList = ref([
+  {
+    dictKey: 1,
+    dictValue: "自主订单",
+  },
+  {
+    dictKey: 2,
+    dictValue: "委外订单",
+  },
+]);
 const uploadData = ref({});
 const uploadFile = async (file) => {
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
@@ -707,6 +790,22 @@ const onSuccessFile = (any, UploadFile) => {
 const onPreviewFile = (file) => {
   window.open(file.raw.fileUrl, "_blank");
 };
+const uploadAdhesiveData = ref({});
+const uploadAdhesiveFile = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadAdhesiveData.value = res.uploadBody;
+  file.id = res.id;
+  file.fileName = res.fileName;
+  file.fileUrl = res.fileUrl;
+  return true;
+};
+const handleAdhesiveSuccess = (UploadFile, index) => {
+  formData.data.orderSkuList[index].selfAdhesiveStickerFile = {
+    id: UploadFile.raw.id,
+    fileName: UploadFile.raw.fileName,
+    fileUrl: UploadFile.raw.fileUrl,
+  };
+};
 </script>
 
 <style lang="scss" scoped>