Jelajahi Sumber

出入库BUG

lxf 1 tahun lalu
induk
melakukan
3c440f04c0

+ 18 - 0
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -30,6 +30,7 @@ import { ElMessage } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
+const productType = ref([]);
 const status = ref([
   {
     label: "待出库",
@@ -61,6 +62,14 @@ const businessType = ref([
     label: "退货出库",
     value: 4,
   },
+  {
+    label: "京东订单",
+    value: 5,
+  },
+  {
+    label: "销售订单出库",
+    value: 6,
+  },
 ]);
 const sourceList = ref({
   data: [],
@@ -108,6 +117,9 @@ const config = computed(() => {
         prop: "productType",
         width: 120,
       },
+      render(type) {
+        return proxy.dictValueLabel(type, productType.value);
+      },
     },
     {
       attrs: {
@@ -191,6 +203,12 @@ const getDict = () => {
       });
     }
   });
+  proxy.getDictOne(["product_type"]).then((res) => {
+    productType.value = res["product_type"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };

+ 31 - 11
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -30,6 +30,7 @@ import { ElMessage } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
+const productType = ref([]);
 const status = ref([
   {
     label: "待入库",
@@ -61,6 +62,14 @@ const businessType = ref([
     label: "退货出库",
     value: 4,
   },
+  {
+    label: "京东订单",
+    value: 5,
+  },
+  {
+    label: "销售订单出库",
+    value: 6,
+  },
 ]);
 const sourceList = ref({
   data: [],
@@ -108,6 +117,9 @@ const config = computed(() => {
         prop: "productType",
         width: 120,
       },
+      render(type) {
+        return proxy.dictValueLabel(type, productType.value);
+      },
     },
     {
       attrs: {
@@ -162,17 +174,19 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          {
-            attrs: {
-              label: "入库",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              clickOperation(row);
-            },
-          },
+          row.status !== 2
+            ? {
+                attrs: {
+                  label: "入库",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickOperation(row);
+                },
+              }
+            : {},
         ];
       },
     },
@@ -189,6 +203,12 @@ const getDict = () => {
       });
     }
   });
+  proxy.getDictOne(["product_type"]).then((res) => {
+    productType.value = res["product_type"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };