lxf 1 rok temu
rodzic
commit
ba30045fe2

+ 21 - 4
src/views/production/schedule/order-inquiry/index.vue

@@ -27,13 +27,14 @@
 import byTable from "/src/components/byTable/index";
 
 const { proxy } = getCurrentInstance();
+const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
 const sourceList = ref({
   data: [],
   pagination: {
     total: 0,
     pageNum: 1,
     pageSize: 10,
-    departmentName: "",
+    departmentId: "",
     code: "",
     wlnCode: "",
     status: "",
@@ -55,9 +56,10 @@ const searchConfig = computed(() => {
       label: "万里牛单号",
     },
     {
-      type: "input",
-      prop: "departmentName",
-      label: "事业部名称",
+      type: "select",
+      prop: "departmentId",
+      data: departmentList.value,
+      label: "事业部",
     },
     {
       type: "select",
@@ -146,6 +148,21 @@ const config = computed(() => {
     },
   ];
 });
+const getDemandData = () => {
+  proxy.post("/department/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      departmentList.value = departmentList.value.concat(
+        res.rows.map((item) => {
+          return {
+            dictKey: item.id,
+            dictValue: item.name,
+          };
+        })
+      );
+    }
+  });
+};
+getDemandData();
 const getList = async (req, status) => {
   if (status) {
     sourceList.value.pagination = {