|
@@ -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 };
|