cz il y a 1 an
Parent
commit
3265aa18e6

+ 5 - 1
src/components/notice/index.vue

@@ -169,8 +169,11 @@ const toDealWith = (item) => {
     6: "Abnormal",
     hisMsg: "HisMsg",
   };
+  // proxy.$router.push({
+  //   name: urlConfig[item.businessType],
+  // });
   proxy.$router.push({
-    name: urlConfig[item.businessType],
+    name: "HisMsg",
   });
 };
 
@@ -302,6 +305,7 @@ const getPushInfo = (flag) => {
       data.value = res.rows.map((x) => ({
         title: "提示",
         businessData: `${x.title}(${x.businessType == 0 ? "流程" : "业务"})`,
+        id: x.id,
       }));
       value.value = true;
     }

+ 3 - 2
src/layout/components/AppMain.vue

@@ -11,7 +11,7 @@
           />
         </keep-alive> -->
         <!-- 2023/7/31更改的 -->
-        <keep-alive>
+        <keep-alive :exclude="excludePage">
           <component
             v-if="!route.meta.link"
             :is="Component"
@@ -29,7 +29,8 @@ import iframeToggle from "./IframeToggle/index";
 import useTagsViewStore from "@/store/modules/tagsView";
 
 const tagsViewStore = useTagsViewStore();
-console.log(tagsViewStore);
+console.log(tagsViewStore, "ada");
+const excludePage = ref(["Backlog"]);
 </script>
 
 <style lang="scss" scoped>

+ 4 - 0
src/views/WDLY/outInBound/logistics/index.vue

@@ -280,6 +280,7 @@ import byForm from "@/components/byForm/index";
 import { computed, defineComponent, ref } from "vue";
 import useUserStore from "@/store/modules/user";
 import SelectProduct from "@/components/WDLY/product/SelectProduct";
+const route = useRoute();
 const loading = ref(false);
 const submitLoading = ref(false);
 const sourceList = ref({
@@ -816,6 +817,9 @@ const getDict = () => {
   });
 };
 getDict();
+if (route.query && route.query.keyword) {
+  sourceList.value.pagination.keyword = route.query.keyword;
+}
 getList();
 getLogisticsData();
 onMounted(() => {

+ 17 - 5
src/views/WDLY/outInBound/waitInBound/index.vue

@@ -31,7 +31,7 @@
     <el-dialog
       title="入库"
       v-model="dialogVisible"
-      width="800"
+      width="1000"
       v-loading="loading"
       destroy-on-close
     >
@@ -47,10 +47,22 @@
             <el-table :data="formData.data.stockWaitDetailsList">
               <el-table-column prop="productCustomCode" label="物品编码" />
               <el-table-column prop="productName" label="物品名称" />
-              <el-table-column prop="purchaseQuantity" label="采购数量" />
-              <el-table-column prop="arrivalQuantity" label="本次发货" />
-              <el-table-column prop="receiptQuantity" label="已入库" />
-              <el-table-column prop="quantity" label="本次入库" min-width="150">
+              <el-table-column
+                prop="purchaseQuantity"
+                label="采购数量"
+                width="100"
+              />
+              <el-table-column
+                prop="arrivalQuantity"
+                label="本次发货"
+                width="100"
+              />
+              <el-table-column
+                prop="receiptQuantity"
+                label="已入库"
+                width="100"
+              />
+              <el-table-column prop="quantity" label="本次入库" width="200">
                 <template #default="{ row, $index }">
                   <el-form-item
                     :prop="'stockWaitDetailsList.' + $index + '.quantity'"

+ 30 - 29
src/views/WDLY/outInBound/waitOutBound/index.vue

@@ -361,35 +361,36 @@ const config = computed(() => {
                 },
               }
             : {},
-          // {
-          //   attrs: {
-          //     label: "结束",
-          //     type: "primary",
-          //     text: true,
-          //     disabled: false,
-          //   },
-          //   el: "button",
-          //   click() {
-          //     ElMessageBox.confirm(`您确定执行此操作吗?`, "提示", {
-          //       confirmButtonText: "确定",
-          //       cancelButtonText: "取消",
-          //       type: "warning",
-          //     }).then(() => {
-          //       // 删除
-          //       proxy
-          //         .post("/orderInfo/edit", {
-          //           id: row.id,
-          //         })
-          //         .then((res) => {
-          //           ElMessage({
-          //             message: "操作成功",
-          //             type: "success",
-          //           });
-          //           getList();
-          //         });
-          //     });
-          //   },
-          // },
+          {
+            attrs: {
+              label: "结束",
+              type: "primary",
+              text: true,
+              disabled: false,
+            },
+            el: "button",
+            click() {
+              ElMessageBox.confirm(`您确定执行此操作吗?`, "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
+                // 删除
+                proxy
+                  .post("/stockWait/edit", {
+                    ...row,
+                    status: 3,
+                  })
+                  .then((res) => {
+                    ElMessage({
+                      message: "操作成功",
+                      type: "success",
+                    });
+                    getList();
+                  });
+              });
+            },
+          },
         ];
       },
     },

+ 155 - 1
src/views/WDLY/purchaseManage/alreadyPurchase/index.vue

@@ -342,12 +342,30 @@
                     >
                       <div default>
                         <el-table :data="row.purchaseBackDetailsList">
-                          <el-table-column label="申请时间" prop="createTime" />
+                          <el-table-column
+                            label="申请时间"
+                            prop="createTime"
+                            width="155"
+                          />
                           <el-table-column label="申请数量" prop="quantity" />
                           <el-table-column
                             label="已退数量"
                             prop="returnedQuantity"
                           />
+                          <el-table-column
+                            label="操作"
+                            width="90"
+                            align="center"
+                          >
+                            <template #default="{ row, $index }">
+                              <el-button
+                                type="primary"
+                                text
+                                @click="handleClickStatus(row)"
+                                >查看关联</el-button
+                              >
+                            </template>
+                          </el-table-column>
                         </el-table>
                       </div>
                       <template #reference>
@@ -681,6 +699,48 @@
       </template>
     </el-dialog>
 
+    <el-dialog
+      :title="'查看'"
+      v-model="recordDialog"
+      width="900"
+      destroy-on-close
+    >
+      <byForm
+        :formConfig="recordFormConfig"
+        :formOption="recordFormOption"
+        v-model="recordFormData.data"
+      >
+        <template #products>
+          <div style="width: 100%">
+            <el-table :data="recordFormData.data.list">
+              <el-table-column
+                prop="logisticsCompanyName"
+                label="物流/快递公司"
+              />
+              <el-table-column prop="code" label="物流/快递单号" />
+              <el-table-column
+                prop="logisticsStatus"
+                label="物流状态"
+                width="100"
+                :formatter="(row) => handleShowKdStatus(row.logisticsStatus)"
+              />
+              <el-table-column prop="createTime" label="创建时间" width="155" />
+              <el-table-column label="操作" width="90" align="center">
+                <template #default="{ row, $index }">
+                  <el-button type="primary" text @click="pushKdRoute(row)"
+                    >查看</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="recordDialog = false" size="large">取 消</el-button>
+      </template>
+    </el-dialog>
+
     <!-- <el-drawer v-model="dialogVisibleThree" direction="rtl">
       <template #header>
         <h4>高级检索</h4>
@@ -1520,6 +1580,100 @@ const handleReset = () => {
   };
   handleQuery();
 };
+
+const kdStatusData = ref([
+  {
+    label: "在途",
+    value: "0",
+  },
+  {
+    label: "揽收",
+    value: "1",
+  },
+  {
+    label: "疑难",
+    value: "2",
+  },
+  {
+    label: "签收",
+    value: "3",
+  },
+  {
+    label: "退签",
+    value: "4",
+  },
+  {
+    label: "派件",
+    value: "5",
+  },
+  {
+    label: "退回",
+    value: "6",
+  },
+  {
+    label: "转投",
+    value: "7",
+  },
+  {
+    label: "清关",
+    value: "8",
+  },
+  {
+    label: "拒签",
+    value: "14",
+  },
+  {
+    label: "完成",
+    value: "15",
+  },
+]);
+const recordDialog = ref(false);
+const recordFormOption = reactive({
+  disabled: false,
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const recordFormConfig = reactive([
+  {
+    type: "title",
+    title: "物流数据",
+  },
+  {
+    type: "slot",
+    slotName: "products",
+  },
+]);
+const recordFormData = reactive({
+  data: {
+    list: [],
+  },
+});
+const handleClickStatus = (row) => {
+  recordDialog.value = true;
+  proxy
+    .post("/purchaseBack/getLogisticsInfo", { id: row.purchaseBackId })
+    .then((res) => {
+      recordFormData.data.list = res;
+    });
+};
+const handleShowKdStatus = (status) => {
+  const current = kdStatusData.value.find((x) => x.value === status);
+  if (current && current.label) {
+    return current.label;
+  } else {
+    return "异常";
+  }
+};
+const pushKdRoute = (row) => {
+  proxy.$router.push({
+    name: "Logistics",
+    query: {
+      keyword: row.code,
+    },
+  });
+};
 </script>
   
 <style lang="scss" scoped>

+ 60 - 74
src/views/WDLY/purchaseManage/purchase/index.vue

@@ -11,13 +11,14 @@
         :selectConfig="selectConfig"
         :table-events="{
           //element talbe事件都能传
-          select: selectRow,
+          select: (data) => selectRow(data, 'row'),
+          'select-all': (data) => selectAll(data, 'all'),
           'sort-change': sortChange,
         }"
         :action-list="[
           {
             text: '采购',
-            disabled: selectData.length === 0,
+            disabled: selectData.length === 0 && selectAllData.length === 0,
             action: () => start(20),
           },
         ]"
@@ -35,32 +36,6 @@
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加供应商' : '编辑供应商'"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="loading"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
-      </byForm>
-      <template #footer>
-        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm('byform')"
-          size="large"
-          :loading="submitLoading"
-        >
-          确 定
-        </el-button>
-      </template>
-    </el-dialog>
   </div>
 </template>
   
@@ -82,7 +57,6 @@ const sourceList = ref({
   },
 });
 const dialogVisible = ref(false);
-const modalType = ref("add");
 let rules = ref({
   name: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
 });
@@ -340,34 +314,18 @@ const getList = async (req) => {
     });
 };
 
-const submitForm = () => {
-  byform.value.handleSubmit((valid) => {
-    formData.data.fileList = fileList.value;
-    submitLoading.value = true;
-    proxy.post("/productionProcesses/" + modalType.value, formData.data).then(
-      (res) => {
-        ElMessage({
-          message: modalType.value == "add" ? "添加成功" : "编辑成功",
-          type: "success",
-        });
-        fileList.value = [];
-        dialogVisible.value = false;
-        submitLoading.value = false;
-        getList();
-      },
-      (err) => {
-        console.log(err, "aswwwww");
-        submitLoading.value = false;
-      }
-    );
-  });
-};
-
 const selectData = ref([]);
 const selectDataOne = ref([]);
-const selectRow = (data) => {
+const selectAllData = ref([]);
+const selectType = ref("row");
+const selectRow = (data, type) => {
+  selectType.value = type;
   selectData.value = data;
 };
+const selectAll = (data, type) => {
+  selectType.value = type;
+  selectAllData.value = data;
+};
 watch(selectData, (newVal, oldVal) => {
   if (newVal.length == 0) {
     sourceList.value.data.forEach((x) => {
@@ -380,7 +338,10 @@ watch(selectData, (newVal, oldVal) => {
   } else if (newVal.length == 1) {
     const current = newVal[0];
     sourceList.value.data.forEach((x) => {
-      if (x.receiptWarehouseId !== current.receiptWarehouseId) {
+      if (
+        x.receiptWarehouseId !== current.receiptWarehouseId ||
+        x.deptId !== current.deptId
+      ) {
         x.isCheck = false;
       }
     });
@@ -388,24 +349,49 @@ watch(selectData, (newVal, oldVal) => {
 });
 
 const start = (type) => {
-  modalType.value = "add";
-  let ids = [];
-  let row = {};
-  if (type === 10) {
-    row = selectDataOne.value[0];
-    ids = selectDataOne.value.map((x) => x.id).join();
-  } else if (type === 20) {
-    ids = selectData.value.map((x) => x.id).join();
-    row = selectData.value[0];
+  if (selectType.value === "all") {
+    let row = selectAllData.value[0];
+    let receiptWarehouseId = row.receiptWarehouseId;
+    let deptId = row.deptId;
+    const flagReceiptWarehouseId = selectAllData.value.every(
+      (x) => x.receiptWarehouseId === receiptWarehouseId
+    );
+    const flagDeptId = selectAllData.value.every((x) => x.deptId === deptId);
+    if (flagReceiptWarehouseId && flagDeptId) {
+      let ids = selectAllData.value.map((x) => x.id).join();
+      proxy.$router.replace({
+        path: "/platform_manage/process/processApproval",
+        query: {
+          flowKey: "wdly_purchase",
+          ids,
+          flowName: "采购申请",
+        },
+      });
+    } else {
+      return ElMessage({
+        message: `不能采购不同仓库或不同部门的商品`,
+        type: "info",
+      });
+    }
+  } else {
+    let ids = [];
+    let row = {};
+    if (type === 10) {
+      row = selectDataOne.value[0];
+      ids = selectDataOne.value.map((x) => x.id).join();
+    } else if (type === 20) {
+      ids = selectData.value.map((x) => x.id).join();
+      row = selectData.value[0];
+    }
+    proxy.$router.replace({
+      path: "/platform_manage/process/processApproval",
+      query: {
+        flowKey: "wdly_purchase",
+        ids,
+        flowName: "采购申请",
+      },
+    });
   }
-  proxy.$router.replace({
-    path: "/platform_manage/process/processApproval",
-    query: {
-      flowKey: "wdly_purchase",
-      ids,
-      flowName: "采购申请",
-    },
-  });
 };
 
 const warehouseList = ref([]);
@@ -483,9 +469,9 @@ const handleClickFile = (file) => {
 .tenant {
   padding: 20px;
 }
-:deep(.el-table__header-wrapper .el-checkbox) {
-  display: none;
-}
+// :deep(.el-table__header-wrapper .el-checkbox) {
+//   display: none;
+// }
 .pic {
   object-fit: contain;
   width: 50px;

+ 159 - 17
src/views/WDLY/salesMange/jdOrder/index.vue

@@ -40,6 +40,15 @@
             {{ item.cityName }}
           </div>
         </template>
+
+        <template #status="{ item }">
+          <div
+            style="cursor: pointer; color: #409eff"
+            @click="handleClickStatus(item)"
+          >
+            {{ dictValueLabel(item.status, outboundType) }}
+          </div>
+        </template>
       </byTable>
     </div>
     <el-dialog
@@ -267,6 +276,48 @@
         <el-button @click="openExcelDialog = false">取 消</el-button>
       </template>
     </el-dialog>
+
+    <el-dialog
+      :title="'查看'"
+      v-model="recordDialog"
+      width="900"
+      destroy-on-close
+    >
+      <byForm
+        :formConfig="recordFormConfig"
+        :formOption="recordFormOption"
+        v-model="recordFormData.data"
+      >
+        <template #products>
+          <div style="width: 100%">
+            <el-table :data="recordFormData.data.list">
+              <el-table-column
+                prop="logisticsCompanyName"
+                label="物流/快递公司"
+              />
+              <el-table-column prop="code" label="物流/快递单号" />
+              <el-table-column
+                prop="logisticsStatus"
+                label="物流状态"
+                width="100"
+                :formatter="(row) => handleShowKdStatus(row.logisticsStatus)"
+              />
+              <el-table-column prop="createTime" label="创建时间" width="155" />
+              <el-table-column label="操作" width="90" align="center">
+                <template #default="{ row, $index }">
+                  <el-button type="primary" text @click="pushKdRoute(row)"
+                    >查看</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="recordDialog = false" size="large">取 消</el-button>
+      </template>
+    </el-dialog>
   </div>
 </template>
   
@@ -388,24 +439,25 @@ let rules = ref({
   ],
 });
 const { proxy } = getCurrentInstance();
+const outboundType = ref([
+  {
+    label: "未出库",
+    value: "1",
+  },
+  {
+    label: "部分出库",
+    value: "2",
+  },
+  {
+    label: "已出库",
+    value: "3",
+  },
+]);
 const selectConfig = reactive([
   {
     label: "入库状态",
     prop: "status",
-    data: [
-      {
-        label: "未出库",
-        value: "1",
-      },
-      {
-        label: "部分出库",
-        value: "2",
-      },
-      {
-        label: "已出库",
-        value: "3",
-      },
-    ],
+    data: outboundType.value,
   },
 ]);
 
@@ -468,9 +520,7 @@ const config = computed(() => {
       attrs: {
         label: "出库状态",
         prop: "status",
-      },
-      render(status) {
-        return status == 1 ? "未出库" : status == 2 ? "部分出库" : "已出库";
+        slot: "status",
       },
     },
   ];
@@ -825,6 +875,98 @@ const getDistributionCenter = () => {
   );
 };
 getDistributionCenter();
+
+const kdStatusData = ref([
+  {
+    label: "在途",
+    value: "0",
+  },
+  {
+    label: "揽收",
+    value: "1",
+  },
+  {
+    label: "疑难",
+    value: "2",
+  },
+  {
+    label: "签收",
+    value: "3",
+  },
+  {
+    label: "退签",
+    value: "4",
+  },
+  {
+    label: "派件",
+    value: "5",
+  },
+  {
+    label: "退回",
+    value: "6",
+  },
+  {
+    label: "转投",
+    value: "7",
+  },
+  {
+    label: "清关",
+    value: "8",
+  },
+  {
+    label: "拒签",
+    value: "14",
+  },
+  {
+    label: "完成",
+    value: "15",
+  },
+]);
+const recordDialog = ref(false);
+const recordFormOption = reactive({
+  disabled: false,
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const recordFormConfig = reactive([
+  {
+    type: "title",
+    title: "物流数据",
+  },
+  {
+    type: "slot",
+    slotName: "products",
+  },
+]);
+const recordFormData = reactive({
+  data: {
+    list: [],
+  },
+});
+const handleClickStatus = (row) => {
+  recordDialog.value = true;
+  proxy.post("/jdOrder/getLogisticsInfo", { id: row.id }).then((res) => {
+    recordFormData.data.list = res;
+  });
+};
+const handleShowKdStatus = (status) => {
+  const current = kdStatusData.value.find((x) => x.value === status);
+  if (current && current.label) {
+    return current.label;
+  } else {
+    return "异常";
+  }
+};
+const pushKdRoute = (row) => {
+  proxy.$router.push({
+    name: "Logistics",
+    query: {
+      keyword: row.code,
+    },
+  });
+};
 </script>
   
 <style lang="scss" scoped>

+ 81 - 11
src/views/WDLY/salesMange/order/index.vue

@@ -30,8 +30,10 @@
           </div>
         </template>
         <template #status="{ item }">
-          <div style="cursor: pointer; color: #409eff">
-            <!-- @click="handleClickStatus(item)" -->
+          <div
+            style="cursor: pointer; color: #409eff"
+            @click="handleClickStatus(item)"
+          >
             {{ dictValueLabel(item.status, statusData) }}
           </div>
         </template>
@@ -225,7 +227,7 @@
     <el-dialog
       :title="'查看'"
       v-model="recordDialog"
-      width="800"
+      width="900"
       destroy-on-close
     >
       <byForm
@@ -237,16 +239,20 @@
           <div style="width: 100%">
             <el-table :data="recordFormData.data.list">
               <el-table-column
-                prop="物流/快递公司"
+                prop="logisticsCompanyName"
                 label="物流/快递公司"
-                width="155"
               />
-              <el-table-column prop="qualityUserName" label="物流/快递单号" />
-              <el-table-column prop="qualityUserName" label="物流状态" />
-              <el-table-column prop="qualityUserName" label="创建时间" />
-              <el-table-column label="操作" width="100" align="center">
+              <el-table-column prop="code" label="物流/快递单号" />
+              <el-table-column
+                prop="logisticsStatus"
+                label="物流状态"
+                width="100"
+                :formatter="(row) => handleShowKdStatus(row.logisticsStatus)"
+              />
+              <el-table-column prop="createTime" label="创建时间" width="155" />
+              <el-table-column label="操作" width="90" align="center">
                 <template #default="{ row, $index }">
-                  <el-button type="primary" text @click="pushRoute(row)"
+                  <el-button type="primary" text @click="pushKdRoute(row)"
                     >查看</el-button
                   >
                 </template>
@@ -763,7 +769,52 @@ const handleClickCode = (row) => {
   formData.orderData = row;
   openDetails.value = true;
 };
-
+const kdStatusData = ref([
+  {
+    label: "在途",
+    value: "0",
+  },
+  {
+    label: "揽收",
+    value: "1",
+  },
+  {
+    label: "疑难",
+    value: "2",
+  },
+  {
+    label: "签收",
+    value: "3",
+  },
+  {
+    label: "退签",
+    value: "4",
+  },
+  {
+    label: "派件",
+    value: "5",
+  },
+  {
+    label: "退回",
+    value: "6",
+  },
+  {
+    label: "转投",
+    value: "7",
+  },
+  {
+    label: "清关",
+    value: "8",
+  },
+  {
+    label: "拒签",
+    value: "14",
+  },
+  {
+    label: "完成",
+    value: "15",
+  },
+]);
 const recordDialog = ref(false);
 const recordFormOption = reactive({
   disabled: false,
@@ -789,6 +840,25 @@ const recordFormData = reactive({
 });
 const handleClickStatus = (row) => {
   recordDialog.value = true;
+  proxy.post("/orderInfo/getLogisticsInfo", { id: row.id }).then((res) => {
+    recordFormData.data.list = res;
+  });
+};
+const handleShowKdStatus = (status) => {
+  const current = kdStatusData.value.find((x) => x.value === status);
+  if (current && current.label) {
+    return current.label;
+  } else {
+    return "异常";
+  }
+};
+const pushKdRoute = (row) => {
+  proxy.$router.push({
+    name: "Logistics",
+    query: {
+      keyword: row.code,
+    },
+  });
 };
 </script>
   

+ 293 - 0
src/views/WDLY/stockManage/analysis/index.vue

@@ -0,0 +1,293 @@
+<template>
+  <div class="tenant">
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        :selectConfig="selectConfig"
+        highlight-current-row
+        :action-list="[
+          {
+            text: '导出Excel',
+            action: () => deriveExcel(),
+          },
+        ]"
+        @get-list="getList"
+      >
+        <template #warehouseName="{ item }">
+          <div>
+            <!-- <span v-if="item.opType == 1">{{ item.toWarehouseName }}</span>
+            <span v-else>{{ item.warehouseName }}</span> -->
+            <span>{{ item.warehouseName }}</span>
+          </div>
+        </template>
+      </byTable>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ElMessage, ElMessageBox } from "element-plus";
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import { getToken } from "@/utils/auth";
+const actionUrl = import.meta.env.VITE_APP_BASE_API;
+const { proxy } = getCurrentInstance();
+const deptList = ref([
+  {
+    label: "入库",
+    value: "1",
+  },
+  {
+    label: "出库",
+    value: "2",
+  },
+]);
+const productType = ref([]);
+const warehouseList = ref([]);
+const productUnit = ref([]);
+const isCombination = ref([
+  {
+    label: "是",
+    value: "1",
+  },
+  {
+    label: "否",
+    value: "0",
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    isCombination: "",
+    deptId: "",
+    productType: "",
+  },
+});
+const loading = ref(false);
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "项目组",
+      prop: "deptId",
+      data: deptList.value,
+    },
+    {
+      label: "产品类型",
+      prop: "productType",
+      data: productType.value,
+    },
+    {
+      label: "是否组合",
+      prop: "isCombination",
+      data: isCombination.value,
+    },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "商品类型",
+        prop: "productType",
+        fixed: "left",
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, productType.value);
+      },
+    },
+    {
+      attrs: {
+        label: "商品编码",
+        prop: "productCustomCode",
+        fixed: "left",
+        width: 180,
+      },
+    },
+    {
+      attrs: {
+        label: "商品名称",
+        prop: "productName",
+        fixed: "left",
+        width: 180,
+      },
+    },
+    {
+      attrs: {
+        label: "规格型号",
+        prop: "productSpec",
+        fixed: "left",
+        width: 180,
+      },
+    },
+    {
+      attrs: {
+        label: "是否组合",
+        prop: "isCombination",
+        width: 100,
+      },
+      render(isCombination) {
+        return isCombination == 1 ? "是" : "否";
+      },
+    },
+    {
+      attrs: {
+        label: "管理部门",
+        prop: "deptName",
+        width: 180,
+      },
+    },
+    {
+      attrs: {
+        label: "待采购数量",
+        prop: "purchaseWaitQuantity",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "待入库数量",
+        prop: "stockWaitInQuantity",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "待出库数量",
+        prop: "stockWaitOutQuantity",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "可支配库存",
+        prop: "disposableQuantity",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "可用库存",
+        prop: "quantity",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "冻结库存",
+        prop: "frozenQuantity",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "次品库存",
+        prop: "defectiveQuantity",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "京东在途",
+        prop: "jdInTransitQuantity",
+        fixed: "right",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "总库存",
+        prop: "totalQuantity",
+        fixed: "right",
+        width: 120,
+      },
+    },
+
+    {
+      attrs: {
+        label: "结存单价",
+        prop: "unitPrice",
+        fixed: "right",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "库存金额",
+        prop: "amount",
+        fixed: "right",
+        width: 120,
+      },
+    },
+  ];
+});
+const getDict = () => {
+  proxy.getDictOne(["product_type"]).then((res) => {
+    productType.value = res["product_type"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
+  proxy.get("/logisticsInfos/getDepts").then((res) => {
+    deptList.value = res.data.map((x) => ({
+      ...x,
+      label: x.deptName,
+      value: x.deptId,
+    }));
+  });
+};
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/stock/stockAnalysis", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+getDict();
+getList();
+
+const deriveExcel = () => {
+  ElMessage({
+    message: "请稍后",
+    type: "success",
+  });
+  proxy
+    .postTwo("/stock/stockAnalysis/exportExcel", sourceList.value.pagination)
+    .then((res) => {
+      const content = res;
+      const blob = new Blob([content], { type: "application/ms-excel" });
+      const fileName = "库存分析.xlsx";
+      if ("download" in document.createElement("a")) {
+        // 非IE下载
+        const elink = document.createElement("a");
+        elink.download = fileName;
+        elink.style.display = "none";
+        elink.href = URL.createObjectURL(blob);
+        document.body.appendChild(elink);
+        elink.click();
+        URL.revokeObjectURL(elink.href); // 释放URL 对象
+        document.body.removeChild(elink);
+      } else {
+        navigator.msSaveBlob(blob, fileName);
+      }
+    });
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+</style>

+ 1 - 1
src/views/process/dealWith/backlog.vue

@@ -51,7 +51,7 @@
   </div>
 </template>
     
-  <script setup >
+  <script setup name="Backlog">
 /* eslint-disable vue/no-unused-components */
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";