浏览代码

新需求

cz 1 年之前
父节点
当前提交
9e59288c00

二进制
public/static/WaitOutBoundImportTemplate.xlsx


+ 2 - 1
src/components/byForm/index.vue

@@ -31,7 +31,8 @@
           <el-select v-model="formData[i.prop]" :multiple="i.multiple || false" v-else-if="i.type == 'select'"
           <el-select v-model="formData[i.prop]" :multiple="i.multiple || false" v-else-if="i.type == 'select'"
                      :placeholder="i.placeholder || $t('common.pleaseSelect')" @change="(e) => commonsEmit(e, i)"
                      :placeholder="i.placeholder || $t('common.pleaseSelect')" @change="(e) => commonsEmit(e, i)"
                      :disabled="i.disabled ? i.disabled : false" :clearable="i.clearable ? i.clearable : false"
                      :disabled="i.disabled ? i.disabled : false" :clearable="i.clearable ? i.clearable : false"
-                     :filterable="i.filterable ? true : false" :style="i.style" :readonly="i.readonly ? i.readonly : false">
+                     :filterable="i.filterable ? true : false" :style="i.style ? i.style : {width:'100%'}"
+                     :readonly="i.readonly ? i.readonly : false">
             <el-option :label="j.title || j.name || j.label" :value="j.id || j.value" v-for="j in i.data" :key="j.id">
             <el-option :label="j.title || j.name || j.label" :value="j.id || j.value" v-for="j in i.data" :key="j.id">
             </el-option>
             </el-option>
           </el-select>
           </el-select>

文件差异内容过多而无法显示
+ 384 - 321
src/views/WDLY/jd/abnormalDetails/index.vue


+ 235 - 134
src/views/WDLY/jd/order/index.vue

@@ -3,30 +3,41 @@
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
     <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
              :selectConfig="selectConfig" :table-events="{
              :selectConfig="selectConfig" :table-events="{
                     select: select,
                     select: select,
-                }" :action-list="[]" @get-list="getList" @moreSearch="() => (queryDialogVisible = true)"
-    >
+                }" :action-list="[]" @get-list="getList" @moreSearch="() => (queryDialogVisible = true)">
 
 
       <template #orderId="{ item }">
       <template #orderId="{ item }">
-          <div style="display: flex; justify-content: flex-start;line-height: 34px;height: 34px" @click="getDtl(item);">
-            <div v-if="item.hasEx=='1'">
-              <img src="@/assets/images/jdyc.png" alt=""  style="width: 34px"/>
-            </div>
-            <div v-else style="width: 34px">
-
-            </div>
-            <span  style="color: blue">{{item.orderId}}</span>
+        <div style="display: flex; justify-content: flex-start;line-height: 34px;height: 34px" @click="getDtl(item);">
+          <div v-if="item.hasEx=='1'">
+            <img src="@/assets/images/jdyc.png" alt="" style="width: 34px" />
+          </div>
+          <div v-else style="width: 34px">
+
+          </div>
+          <span style="color: blue">{{item.orderId}}</span>
+        </div>
+      </template>
+
+      <template #diversionType="{item}">
+        <div style="width:100%">
+          <div v-if="item.diversionType">
+            {{dictValueLabel(item.diversionType,diversionTypeData)}}
+          </div>
+          <div v-else>
+            <el-button type="primary" text @click="handleDiversionType(item)">分流</el-button>
+          </div>
         </div>
         </div>
       </template>
       </template>
+
       <template #remark="{ item }">
       <template #remark="{ item }">
-          <div style="width: 200px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
-            <div v-if="item.hasEx == '1'" @click="showTipRemark(item)">
-              <i class="iconfont icon-iconm_banli" style="margin-right: 5px" ></i>
-              <span v-if="isNullOrUndefined(item.remark)">编辑备注</span>
-              <el-tooltip v-else class="item" effect="dark" :content="item.remark" placement="top">
-                {{item.remark}}
-              </el-tooltip>
-            </div>
+        <div style="width: 200px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
+          <div v-if="item.hasEx == '1'" @click="showTipRemark(item)">
+            <i class="iconfont icon-iconm_banli" style="margin-right: 5px"></i>
+            <span v-if="isNullOrUndefined(item.remark)">编辑备注</span>
+            <el-tooltip v-else class="item" effect="dark" :content="item.remark" placement="top">
+              {{item.remark}}
+            </el-tooltip>
           </div>
           </div>
+        </div>
       </template>
       </template>
     </byTable>
     </byTable>
     <!--回告-->
     <!--回告-->
@@ -255,9 +266,9 @@
         <el-row>
         <el-row>
           <el-descriptions title="采购单明细" />
           <el-descriptions title="采购单明细" />
           <div style="line-height: 34px;height: 34px;display: flex">
           <div style="line-height: 34px;height: 34px;display: flex">
-              <span>(</span>
-             <span><img src="@/assets/images/jdsh.png" alt=""  style="width: 34px"/></span><span>多货</span>
-              <span><img src="@/assets/images/jddh.png" alt="" style="width: 34px"/></span><span>少货</span>
+            <span>(</span>
+            <span><img src="@/assets/images/jdsh.png" alt="" style="width: 34px" /></span><span>多货</span>
+            <span><img src="@/assets/images/jddh.png" alt="" style="width: 34px" /></span><span>少货</span>
             <span>)</span>
             <span>)</span>
           </div>
           </div>
 
 
@@ -267,12 +278,13 @@
               <template #default="scope">
               <template #default="scope">
                 <div style="display: flex; justify-content: center;line-height: 34px;height: 34px">
                 <div style="display: flex; justify-content: center;line-height: 34px;height: 34px">
                   <div v-if="scope.row.exDesc=='1'">
                   <div v-if="scope.row.exDesc=='1'">
-                    <img src="@/assets/images/jdsh.png" alt=""  style="width: 34px"/>
+                    <img src="@/assets/images/jdsh.png" alt="" style="width: 34px" />
                   </div>
                   </div>
                   <div v-if="scope.row.exDesc=='2'">
                   <div v-if="scope.row.exDesc=='2'">
-                    <img src="@/assets/images/jddh.png" alt="" style="width: 34px"/>
+                    <img src="@/assets/images/jddh.png" alt="" style="width: 34px" />
                   </div>
                   </div>
-                  <div :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">
+                  <div
+                       :style="scope.row.productName=='' || scope.row.productName == undefined || scope.row.productName == 'undefined'?'color: red':''">
                     {{scope.row.wareId}}
                     {{scope.row.wareId}}
                   </div>
                   </div>
                 </div>
                 </div>
@@ -307,7 +319,7 @@
     <el-dialog :z-index="1500" title="编辑备注" v-if="remarkDialogVisible" v-model="formData.data" width="800px" v-loading="loading">
     <el-dialog :z-index="1500" title="编辑备注" v-if="remarkDialogVisible" v-model="formData.data" width="800px" v-loading="loading">
       <el-form label-width="auto" :rules="rules">
       <el-form label-width="auto" :rules="rules">
         <el-row>
         <el-row>
-          <el-col >
+          <el-col>
             <el-form-item label="备注:" :span="8">
             <el-form-item label="备注:" :span="8">
               <el-input type="textarea" :rows="3" v-model="formData.data.remark" placeholder="请输入备注" />
               <el-input type="textarea" :rows="3" v-model="formData.data.remark" placeholder="请输入备注" />
             </el-form-item>
             </el-form-item>
@@ -324,10 +336,10 @@
     <el-dialog :title="'高级检索'" v-model="queryDialogVisible" width="500px" destroy-on-close>
     <el-dialog :title="'高级检索'" v-model="queryDialogVisible" width="500px" destroy-on-close>
       <el-form :model="sourceList.pagination" label-width="100px" label-position="top">
       <el-form :model="sourceList.pagination" label-width="100px" label-position="top">
         <el-form-item label="采购单号">
         <el-form-item label="采购单号">
-          <el-input v-model="sourceList.pagination.orderId" placeholder="请输入采购单号" oninput="value=value.replace(/[^\d.]/g,'')"/>
+          <el-input v-model="sourceList.pagination.orderId" placeholder="请输入采购单号" oninput="value=value.replace(/[^\d.]/g,'')" />
         </el-form-item>
         </el-form-item>
         <el-form-item label="京东商品编号">
         <el-form-item label="京东商品编号">
-          <el-input v-model="sourceList.pagination.wareId" placeholder="请输入京东商品编号" oninput="value=value.replace(/[^\d.]/g,'')"/>
+          <el-input v-model="sourceList.pagination.wareId" placeholder="请输入京东商品编号" oninput="value=value.replace(/[^\d.]/g,'')" />
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>
       <template #footer>
       <template #footer>
@@ -335,6 +347,17 @@
         <el-button @click="handleQuery" type="primary" size="large">搜索</el-button>
         <el-button @click="handleQuery" type="primary" size="large">搜索</el-button>
       </template>
       </template>
     </el-dialog>
     </el-dialog>
+
+    <el-dialog :title="'设置分流'" v-model="dialogVisibleOne" width="500" destroy-on-close>
+      <byForm v-loading="submitLoading" :formConfig="formConfig" :formOption="formOption" v-model="formData.dataOne" :rules="rulesOne" ref="byform">
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisibleOne = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitFormOne('byform')" size="large" :loading="submitLoading">
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -343,9 +366,14 @@ import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import byForm from "@/components/byForm/index";
 import { computed, nextTick, reactive, ref } from "vue";
 import { computed, nextTick, reactive, ref } from "vue";
-import {isNullOrUndefined} from "@tinymce/tinymce-vue/lib/es2015/main/ts/Utils";
+import { isNullOrUndefined } from "@tinymce/tinymce-vue/lib/es2015/main/ts/Utils";
 const { proxy } = getCurrentInstance();
 const { proxy } = getCurrentInstance();
-
+const props = defineProps({
+  selectStatus: {
+    type: Boolean,
+    default: false,
+  },
+});
 const router = useRouter();
 const router = useRouter();
 const loading = ref(false);
 const loading = ref(false);
 const deliveryCenter = ref([]);
 const deliveryCenter = ref([]);
@@ -364,6 +392,17 @@ const sourceList = ref({
   },
   },
 });
 });
 
 
+const diversionTypeData = ref([
+  {
+    label: "仓库发货",
+    value: "10",
+  },
+  {
+    label: "工厂发货",
+    value: "20",
+  },
+]);
+
 let rules = ref({
 let rules = ref({
   deliverCenterId: [
   deliverCenterId: [
     { required: true, message: "请选择配送中心", trigger: "blur" },
     { required: true, message: "请选择配送中心", trigger: "blur" },
@@ -471,6 +510,11 @@ const selectConfig = computed(() => {
         },
         },
       ],
       ],
     },
     },
+    {
+      label: "分流",
+      prop: "diversionType",
+      data: diversionTypeData.value,
+    },
   ];
   ];
 });
 });
 
 
@@ -486,6 +530,22 @@ const config = computed(() => {
     },
     },
     {
     {
       attrs: {
       attrs: {
+        label: "分流",
+        slot: "diversionType",
+        align: "left",
+        width: 80,
+      },
+      render(val) {
+        if (val) {
+          return proxy.dictValueLabel(val, diversionTypeData.value);
+        } else {
+          return "";
+        }
+      },
+    },
+
+    {
+      attrs: {
         label: "订购时间",
         label: "订购时间",
         prop: "createdDate",
         prop: "createdDate",
         align: "left",
         align: "left",
@@ -557,7 +617,7 @@ const config = computed(() => {
         label: "详细地址",
         label: "详细地址",
         prop: "address",
         prop: "address",
         align: "left",
         align: "left",
-        "min-width": 200,
+        "min-width": 250,
       },
       },
     },
     },
     {
     {
@@ -595,10 +655,10 @@ const config = computed(() => {
     // },
     // },
     {
     {
       attrs: {
       attrs: {
-        label: "是否确认",
+        label: "系统是否确认",
         prop: "businessStatus",
         prop: "businessStatus",
         align: "left",
         align: "left",
-        width: 80,
+        width: 110,
       },
       },
       render(value) {
       render(value) {
         let label = "未确认";
         let label = "未确认";
@@ -606,7 +666,7 @@ const config = computed(() => {
           label = "已确认(无需出库)";
           label = "已确认(无需出库)";
         } else if (value == "2") {
         } else if (value == "2") {
           label = "已回告";
           label = "已回告";
-        }else if (value == "3") {
+        } else if (value == "3") {
           label = "已确认(需出库)";
           label = "已确认(需出库)";
         }
         }
         return label;
         return label;
@@ -620,12 +680,12 @@ const config = computed(() => {
         width: 100,
         width: 100,
       },
       },
       render(type) {
       render(type) {
-        if (type == '2' ){
-          return '已处理'
-        }else if (type == '1' ){
-          return '未处理'
-        }else {
-          return ''
+        if (type == "2") {
+          return "已处理";
+        } else if (type == "1") {
+          return "未处理";
+        } else {
+          return "";
         }
         }
       },
       },
     },
     },
@@ -637,69 +697,84 @@ const config = computed(() => {
         fixed: "right",
         fixed: "right",
       },
       },
       renderHTML(row) {
       renderHTML(row) {
-        return [
-          //   {
-          //     attrs: {
-          //       label: "详情",
-          //       type: "primary",
-          //       text: true,
-          //     },
-          //     el: "button",
-          //     click() {
-          //       getDtl(row);
-          //     },
-          //   },
-          row.businessStatus == 0
-            ? {
-                attrs: {
-                  label: "采购单确认(需出库)",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  ElMessageBox.confirm("是否确认当前采购单状态?", "提示", {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
-                    type: "warning",
-                  }).then(() => {
-                    confirmBusinessStatus(row,true);
-                  });
-                },
-              }
-            : {},row.businessStatus == 0
-            ? {
+        return props.selectStatus
+          ? [
+              {
                 attrs: {
                 attrs: {
-                  label: "采购单确认(无需出库)",
-                  type: "danger",
+                  label: "选择",
+                  type: "primary",
                   text: true,
                   text: true,
                 },
                 },
                 el: "button",
                 el: "button",
                 click() {
                 click() {
-                  ElMessageBox.confirm("是否确认当前采购单状态?", "提示", {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
-                    type: "warning",
-                  }).then(() => {
-                    confirmBusinessStatus(row,false);
-                  });
+                  proxy.$emit("selectOrder", row);
                 },
                 },
-              }
-            : {},
-          // row.businessStatus == 1 && row.isCanConfirm
-          //   ? {
-          //       attrs: {
-          //         label: "回告",
-          //         type: "danger",
-          //         text: true,
-          //       },
-          //       el: "button",
-          //       click() {
-          //         getTellDtl(row);
-          //       },
-          //     }
-          //   : {},
-        ];
+              },
+            ]
+          : [
+              //   {
+              //     attrs: {
+              //       label: "详情",
+              //       type: "primary",
+              //       text: true,
+              //     },
+              //     el: "button",
+              //     click() {
+              //       getDtl(row);
+              //     },
+              //   },
+              row.businessStatus == 0 && row.diversionType == "10"
+                ? {
+                    attrs: {
+                      label: "采购单确认(需出库)",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      ElMessageBox.confirm("是否确认当前采购单状态?", "提示", {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning",
+                      }).then(() => {
+                        confirmBusinessStatus(row, true);
+                      });
+                    },
+                  }
+                : {},
+              row.businessStatus == 0 && row.diversionType == "10"
+                ? {
+                    attrs: {
+                      label: "采购单确认(无需出库)",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      ElMessageBox.confirm("是否确认当前采购单状态?", "提示", {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning",
+                      }).then(() => {
+                        confirmBusinessStatus(row, false);
+                      });
+                    },
+                  }
+                : {},
+              // row.businessStatus == 1 && row.isCanConfirm
+              //   ? {
+              //       attrs: {
+              //         label: "回告",
+              //         type: "danger",
+              //         text: true,
+              //       },
+              //       el: "button",
+              //       click() {
+              //         getTellDtl(row);
+              //       },
+              //     }
+              //   : {},
+            ];
       },
       },
     },
     },
   ];
   ];
@@ -710,35 +785,7 @@ let formData = reactive({
     coverList: [],
     coverList: [],
     audioList: [],
     audioList: [],
   },
   },
-});
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-  rules: [],
-});
-const byform = ref(null);
-
-const formConfig = computed(() => {
-  return [
-    {
-      type: "input",
-      prop: "orderId",
-      label: "京东订单号",
-      readonly: true,
-    },
-    {
-      type: "input",
-      prop: "createdDate",
-      label: "订购时间",
-      readonly: true,
-    },
-    {
-      type: "input",
-      label: "采购单明细,应该是个一对多还没弄",
-      readonly: true,
-    },
-  ];
+  dataOne: {},
 });
 });
 
 
 const getDictlist = async () => {
 const getDictlist = async () => {
@@ -763,6 +810,9 @@ const getDictlist = async () => {
 const getList = async (req) => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   loading.value = true;
+  if (props.selectStatus) {
+    sourceList.value.pagination.diversionType = "10";
+  }
   proxy.post("/jdOrder/page", sourceList.value.pagination).then((res) => {
   proxy.post("/jdOrder/page", sourceList.value.pagination).then((res) => {
     sourceList.value.data = res.rows;
     sourceList.value.data = res.rows;
     sourceList.value.pagination.total = res.total;
     sourceList.value.pagination.total = res.total;
@@ -780,9 +830,6 @@ const getList = async (req) => {
 //   }
 //   }
 // }
 // }
 
 
-
-
-
 const openModal = () => {
 const openModal = () => {
   dialogVisible.value = true;
   dialogVisible.value = true;
   modalType.value = "add";
   modalType.value = "add";
@@ -816,8 +863,8 @@ const getTellDtl = (row) => {
 const showTipRemark = (row) => {
 const showTipRemark = (row) => {
   remarkDialogVisible.value = true;
   remarkDialogVisible.value = true;
   formData.data = {
   formData.data = {
-    id:row.id,
-    remark:row.remark
+    id: row.id,
+    remark: row.remark,
   };
   };
 };
 };
 
 
@@ -825,7 +872,7 @@ const showTipRemark = (row) => {
  * 确认采购单状态
  * 确认采购单状态
  * @param row
  * @param row
  */
  */
-const confirmBusinessStatus = (row,flag) => {
+const confirmBusinessStatus = (row, flag) => {
   let businessStatus = row.businessStatus == "1" ? 0 : 1;
   let businessStatus = row.businessStatus == "1" ? 0 : 1;
   proxy
   proxy
     .post("/jdOrder/confirmBusinessStatus", {
     .post("/jdOrder/confirmBusinessStatus", {
@@ -927,10 +974,65 @@ const handleQuery = () => {
   getList();
   getList();
 };
 };
 
 
-
-
 getDictlist();
 getDictlist();
 getList();
 getList();
+
+const dialogVisibleOne = ref(false);
+const byform = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const rulesOne = ref({
+  diversionType: [{ required: true, message: "请选择分流", trigger: "change" }],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "select",
+      prop: "diversionType",
+      label: "分流",
+      readonly: true,
+      data: diversionTypeData.value,
+      // style: {
+      //   width: "100%",
+      // },
+    },
+  ];
+});
+const handleDiversionType = (row) => {
+  formData.dataOne = {
+    id: row.id,
+    diversionType: "",
+  };
+  dialogVisibleOne.value = true;
+};
+
+const submitFormOne = () => {
+  byform.value.handleSubmit((valid) => {
+    ElMessageBox.confirm("是否确认当前操作?", "提示", {
+      confirmButtonText: "确定",
+      cancelButtonText: "取消",
+      type: "warning",
+    }).then(() => {
+      submitLoading.value = true;
+      proxy.post("/jdOrder/saveDiversion", formData.dataOne).then(
+        (res) => {
+          ElMessage({
+            message: "操作成功",
+            type: "success",
+          });
+          dialogVisibleOne.value = false;
+          submitLoading.value = false;
+          getList();
+        },
+        (err) => (submitLoading.value = false)
+      );
+    });
+  });
+};
 </script>
 </script>
 
 
 <style lang='scss' scoped>
 <style lang='scss' scoped>
@@ -943,5 +1045,4 @@ getList();
 .el-table .error-row {
 .el-table .error-row {
   background: rgba(245, 108, 108, 0.68);
   background: rgba(245, 108, 108, 0.68);
 }
 }
-
 </style>
 </style>

+ 99 - 7
src/views/WDLY/outInBound/waitOutBound/index.vue

@@ -42,13 +42,15 @@
 
 
         <template #products>
         <template #products>
           <div style="width: 100%">
           <div style="width: 100%">
-            <el-table :data="formData.data.jdOrderDetailsList" show-summary :summary-method="getSummaries">
-              <el-table-column prop="productCustomCode" label="物品编码" />
+            <el-button type="primary" plain @click="handleShortcut"> 快捷填写</el-button>
+            <el-button type="primary" @click="openExcel = true"> Excel导入</el-button>
+            <el-table :data="formData.data.jdOrderDetailsList" show-summary :summary-method="getSummaries" style="margin-top:16px">
+              <el-table-column prop="productCustomCode" label="物品编码" width="150" />
               <el-table-column prop="productName" label="物品名称" />
               <el-table-column prop="productName" label="物品名称" />
-              <el-table-column prop="productSpec" label="规格" />
-              <el-table-column prop="waitQuantity" label="应出库" />
-              <el-table-column prop="receiptQuantity" label="已出库" />
-              <el-table-column prop="quantity" label="本次出库" min-width="150">
+              <el-table-column prop="productSpec" label="规格" width="130" />
+              <el-table-column prop="waitQuantity" label="应出库" width="100" />
+              <el-table-column prop="receiptQuantity" label="已出库" width="100" />
+              <el-table-column prop="quantity" label="本次出库" width="150">
                 <template #default="{ row, $index }">
                 <template #default="{ row, $index }">
                   <el-form-item :prop="'jdOrderDetailsList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
                   <el-form-item :prop="'jdOrderDetailsList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
                     <el-input-number v-model="row.quantity" :precision="2" :controls="false" :min="0" onmousewheel="return false;" />
                     <el-input-number v-model="row.quantity" :precision="2" :controls="false" :min="0" onmousewheel="return false;" />
@@ -87,6 +89,21 @@
       </template>
       </template>
     </el-dialog>
     </el-dialog>
 
 
+    <el-dialog v-model="openExcel" title="excel导入" width="30%" append-to-body>
+      <div v-loading="excelLoading">
+        <div style="margin: 15px 0">
+          <el-button @click="downloadTemplate" type="primary">Excel模板下载</el-button>
+        </div>
+        <el-upload :action="actionUrl + '/stockWait/issueExcelImport'" :headers="headers" :before-upload="useImportExcelStore().updateRequestHeaders"
+                   :on-success="handleSuccess" :on-progress="handleProgress" :show-file-list="false" :on-error="handleError" accept=".xls, .xlsx">
+          <el-button type="primary" plain>点击导入</el-button>
+        </el-upload>
+      </div>
+      <template #footer>
+        <el-button @click="openExcel = false" size="large">取 消</el-button>
+      </template>
+    </el-dialog>
+
     <el-dialog v-model="openProduct" title="选择产品" width="70%" append-to-body>
     <el-dialog v-model="openProduct" title="选择产品" width="70%" append-to-body>
       <InventoryInquiry :selectStatus="true" :warehouseId="formData.data.outWarehouseId" @cancel="openProduct = false" @select="select"
       <InventoryInquiry :selectStatus="true" :warehouseId="formData.data.outWarehouseId" @cancel="openProduct = false" @select="select"
                         :key="formData.data.outWarehouseId"></InventoryInquiry>
                         :key="formData.data.outWarehouseId"></InventoryInquiry>
@@ -107,7 +124,9 @@ import byForm from "@/components/byForm/index";
 import InventoryInquiry from "@/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index";
 import InventoryInquiry from "@/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index";
 import { computed } from "vue";
 import { computed } from "vue";
 import selectCity from "@/components/selectCity/index.vue";
 import selectCity from "@/components/selectCity/index.vue";
-
+const actionUrl = import.meta.env.VITE_APP_BASE_API;
+import useImportExcelStore from "@/store/modules/importExcel";
+const headers = computed(() => useImportExcelStore().requestHeaders);
 const loading = ref(false);
 const loading = ref(false);
 const submitLoading = ref(false);
 const submitLoading = ref(false);
 const sourceList = ref({
 const sourceList = ref({
@@ -230,6 +249,7 @@ const config = computed(() => {
       attrs: {
       attrs: {
         label: "数据来源",
         label: "数据来源",
         prop: "businessType",
         prop: "businessType",
+        width: 110,
       },
       },
       render(type) {
       render(type) {
         const current = businessType.find((x) => x.value == type);
         const current = businessType.find((x) => x.value == type);
@@ -242,18 +262,21 @@ const config = computed(() => {
       attrs: {
       attrs: {
         label: "关联单号",
         label: "关联单号",
         prop: "businessCode",
         prop: "businessCode",
+        width: 220,
       },
       },
     },
     },
     {
     {
       attrs: {
       attrs: {
         label: "操作人",
         label: "操作人",
         prop: "operatorName",
         prop: "operatorName",
+        width: 110,
       },
       },
     },
     },
     {
     {
       attrs: {
       attrs: {
         label: "操作时间",
         label: "操作时间",
         prop: "createTime",
         prop: "createTime",
+        width: 160,
       },
       },
     },
     },
     {
     {
@@ -267,6 +290,7 @@ const config = computed(() => {
       attrs: {
       attrs: {
         label: "出库状态",
         label: "出库状态",
         prop: "status",
         prop: "status",
+        width: 100,
       },
       },
       render(status) {
       render(status) {
         return status == 0 ? "未出库" : status == 1 ? "部分出库" : "出库完成";
         return status == 0 ? "未出库" : status == 1 ? "部分出库" : "出库完成";
@@ -1135,6 +1159,74 @@ const getSummaries = (param) => {
   });
   });
   return sums;
   return sums;
 };
 };
+
+const handleShortcut = () => {
+  for (let i = 0; i < formData.data.jdOrderDetailsList.length; i++) {
+    const row = formData.data.jdOrderDetailsList[i];
+    row.quantity = Number(
+      parseFloat(
+        Number(row.waitQuantity) - Number(row.receiptQuantity)
+      ).toFixed(2)
+    );
+  }
+};
+
+const excelLoading = ref(false);
+const openExcel = ref(false);
+const downloadTemplate = () => {
+  fetch("/static/WaitOutBoundImportTemplate.xlsx")
+    .then((res) => res.blob())
+    .then((res) => {
+      const url = window.URL.createObjectURL(res);
+      let filename = "待出库导入模板.xlsx";
+      const link = document.createElement("a");
+      link.style.display = "none";
+      link.href = url;
+      link.setAttribute("download", filename);
+      document.body.appendChild(link);
+      link.click();
+    });
+};
+const handleProgress = () => {
+  excelLoading.value = true;
+};
+const handleSuccess = (res) => {
+  if (res.code != 200) {
+    excelLoading.value = false;
+    return ElMessage({
+      message: `${res.msg},请重试!`,
+      type: "info",
+    });
+  } else {
+    ElMessage({
+      message: "导入成功!",
+      type: "success",
+    });
+    if (res && res.data && res.data.length > 0) {
+      for (let i = 0; i < formData.data.jdOrderDetailsList.length; i++) {
+        const row = formData.data.jdOrderDetailsList[i];
+        for (let j = 0; j < res.data.length; j++) {
+          const data = res.data[j];
+          if (row.productId == data.productId) {
+            row.quantity = Number(data.count);
+            break;
+          }
+        }
+      }
+    }
+    openExcel.value = false;
+    excelLoading.value = false;
+  }
+};
+
+const handleError = (err) => {
+  ElMessage({
+    message: `${err},请重试!`,
+    type: "info",
+  });
+  openExcel.value = false;
+  excelLoading.value = false;
+};
 </script>
 </script>
   
   
 <style lang="scss" scoped>
 <style lang="scss" scoped>

部分文件因为文件数量过多而无法显示