lxf 1 年之前
父節點
當前提交
f97d8a5ef0
共有 1 個文件被更改,包括 24 次插入0 次删除
  1. 24 0
      src/views/group/data-board/sku-quoted-price/index.vue

+ 24 - 0
src/views/group/data-board/sku-quoted-price/index.vue

@@ -40,10 +40,12 @@ import byTable from "/src/components/byTable/index";
 import { ElMessageBox } from "element-plus";
 
 const { proxy } = getCurrentInstance();
+const departmentList = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
     total: 0,
+    departmentId: "100",
     skuSpecCode: "",
     skuSpecName: "",
   },
@@ -52,6 +54,12 @@ const loading = ref(false);
 const searchConfig = computed(() => {
   return [
     {
+      type: "select",
+      prop: "departmentId",
+      data: departmentList.value,
+      label: "事业部",
+    },
+    {
       type: "input",
       prop: "skuSpecCode",
       label: "SKU品号",
@@ -102,11 +110,27 @@ 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 = {
       pageNum: sourceList.value.pagination.pageNum,
       pageSize: sourceList.value.pagination.pageSize,
+      departmentId: "100",
     };
   } else {
     sourceList.value.pagination = { ...sourceList.value.pagination, ...req };