浏览代码

Merge branch '生产备料增加订单备料类型'

lxf 1 年之前
父节点
当前提交
f7e113d6fb
共有 2 个文件被更改,包括 32 次插入14 次删除
  1. 14 0
      src/views/production/operation/batching/index.vue
  2. 18 14
      src/views/production/operation/batching/quick.vue

+ 14 - 0
src/views/production/operation/batching/index.vue

@@ -130,6 +130,10 @@ import Quick from "/src/views/production/operation/batching/quick";
 const { proxy } = getCurrentInstance();
 const activeName = ref("first");
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
+const orderStockType = ref([
+  { dictKey: "0", dictValue: "半成品" },
+  { dictKey: "1", dictValue: "成品" },
+]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -138,6 +142,7 @@ const sourceList = ref({
     skuSpecCode: "",
     skuSpecName: "",
     departmentId: "1689164627162529793",
+    orderStockType: "0",
   },
 });
 const sourceListTwo = ref({
@@ -187,6 +192,13 @@ const searchConfig = computed(() => {
       label: "事业部",
       clearable: true,
     },
+    {
+      type: "select",
+      prop: "orderStockType",
+      data: orderStockType.value,
+      label: "订单备料类型",
+      clearable: true,
+    },
   ];
 });
 const searchConfigTwo = computed(() => {
@@ -352,6 +364,7 @@ const getList = async (req, status) => {
   if (status) {
     sourceList.value.pagination = {
       departmentId: "1689164627162529793",
+      orderStockType: "0",
     };
   } else {
     sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -373,6 +386,7 @@ const getListTwo = async (req, status) => {
     sourceListTwo.value.pagination = {
       pageNum: sourceListTwo.value.pagination.pageNum,
       pageSize: sourceListTwo.value.pagination.pageSize,
+      type: "1",
     };
   } else {
     sourceListTwo.value.pagination = { ...sourceListTwo.value.pagination, ...req };

+ 18 - 14
src/views/production/operation/batching/quick.vue

@@ -147,22 +147,26 @@ const clickCancel = () => {
   emit("clickCancel", false);
 };
 onMounted(() => {
-  proxy.post("/stockPreparation/outBomList", formData.data).then((res) => {
-    if (res && res.length > 0) {
-      inOutStorageBomList.value = Object.freeze(res.filter((item) => !["吊牌", "不干胶"].includes(item.classifyName)));
-    } else {
-      inOutStorageBomList.value = [];
-    }
-  });
+  changeDepartment();
 });
 const changeDepartment = () => {
-  proxy.post("/stockPreparation/outBomList", formData.data).then((res) => {
-    if (res && res.length > 0) {
-      inOutStorageBomList.value = Object.freeze(res.filter((item) => !["吊牌", "不干胶"].includes(item.classifyName)));
-    } else {
-      inOutStorageBomList.value = [];
-    }
-  });
+  if (props.pagination.orderStockType == "1") {
+    proxy.post("/stockPreparation/outSkuList", formData.data).then((res) => {
+      if (res && res.length > 0) {
+        inOutStorageBomList.value = Object.freeze(res.filter((item) => !["吊牌", "不干胶"].includes(item.classifyName)));
+      } else {
+        inOutStorageBomList.value = [];
+      }
+    });
+  } else {
+    proxy.post("/stockPreparation/outBomList", formData.data).then((res) => {
+      if (res && res.length > 0) {
+        inOutStorageBomList.value = Object.freeze(res.filter((item) => !["吊牌", "不干胶"].includes(item.classifyName)));
+      } else {
+        inOutStorageBomList.value = [];
+      }
+    });
+  }
 };
 const statisticalQuantity = () => {
   let quantity = 0;