Переглянути джерело

库存相关页面仓库查询条件改为下拉选项

lxf 1 рік тому
батько
коміт
20ac70d37c

+ 17 - 4
src/views/production/warehouse/check/index.vue

@@ -55,6 +55,7 @@ import byTable from "/src/components/byTable/index";
 const { proxy } = getCurrentInstance();
 const activeName = ref("first");
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
+const warehouseList = ref([]);
 const status = ref([
   { dictKey: "0", dictValue: "正常" },
   { dictKey: "1", dictValue: "异常" },
@@ -98,8 +99,9 @@ const searchConfig = computed(() => {
     },
     {
       type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -134,8 +136,9 @@ const searchConfigTwo = computed(() => {
     },
     {
       type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -349,6 +352,16 @@ const getDemandData = () => {
       );
     }
   });
+  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      warehouseList.value = res.rows.map((item) => {
+        return {
+          dictKey: item.id,
+          dictValue: item.name,
+        };
+      });
+    }
+  });
 };
 getDemandData();
 const clickModal = () => {

+ 14 - 2
src/views/production/warehouse/flow-record/index.vue

@@ -24,6 +24,7 @@ import byTable from "/src/components/byTable/index";
 
 const { proxy } = getCurrentInstance();
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
+const warehouseList = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -67,8 +68,9 @@ const searchConfig = computed(() => {
     },
     {
       type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -229,6 +231,16 @@ const getDemandData = () => {
       );
     }
   });
+  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      warehouseList.value = res.rows.map((item) => {
+        return {
+          dictKey: item.id,
+          dictValue: item.name,
+        };
+      });
+    }
+  });
 };
 getDemandData();
 const deriveExcel = () => {

+ 17 - 4
src/views/production/warehouse/outbound/index.vue

@@ -62,6 +62,7 @@ import byTable from "/src/components/byTable/index";
 const { proxy } = getCurrentInstance();
 const activeName = ref("first");
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
+const warehouseList = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -112,8 +113,9 @@ const searchConfig = computed(() => {
     },
     {
       type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -158,8 +160,9 @@ const searchConfigTwo = computed(() => {
     },
     {
       type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -401,6 +404,16 @@ const getDemandData = () => {
       );
     }
   });
+  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      warehouseList.value = res.rows.map((item) => {
+        return {
+          dictKey: item.id,
+          dictValue: item.name,
+        };
+      });
+    }
+  });
 };
 getDemandData();
 const clickCode = (row) => {

+ 17 - 4
src/views/production/warehouse/putInStorage/index.vue

@@ -58,6 +58,7 @@ import byTable from "/src/components/byTable/index";
 const { proxy } = getCurrentInstance();
 const activeName = ref("first");
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
+const warehouseList = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -107,8 +108,9 @@ const searchConfig = computed(() => {
     },
     {
       type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -153,8 +155,9 @@ const searchConfigTwo = computed(() => {
     },
     {
       type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -396,6 +399,16 @@ const getDemandData = () => {
       );
     }
   });
+  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      warehouseList.value = res.rows.map((item) => {
+        return {
+          dictKey: item.id,
+          dictValue: item.name,
+        };
+      });
+    }
+  });
 };
 getDemandData();
 const clickCode = (row) => {