|
@@ -39,8 +39,34 @@ const sourceList = ref({
|
|
|
pageSize: 10,
|
|
|
bomSpecCode: "",
|
|
|
bomSpecName: "",
|
|
|
+ sortField: "turnoverRate",
|
|
|
+ sortBy: 2,
|
|
|
},
|
|
|
});
|
|
|
+const sortField = ref([
|
|
|
+ {
|
|
|
+ dictKey: "turnoverRate",
|
|
|
+ dictValue: "周转率",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dictKey: "predictOutStorageDays",
|
|
|
+ dictValue: "预计消耗天数",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dictKey: "nextDeliveryDays",
|
|
|
+ dictValue: "下一批到货天数",
|
|
|
+ },
|
|
|
+]);
|
|
|
+const sortBy = ref([
|
|
|
+ {
|
|
|
+ dictKey: 1,
|
|
|
+ dictValue: "升序",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dictKey: 2,
|
|
|
+ dictValue: "降序",
|
|
|
+ },
|
|
|
+]);
|
|
|
const loading = ref(false);
|
|
|
const searchConfig = computed(() => {
|
|
|
return [
|
|
@@ -54,6 +80,18 @@ const searchConfig = computed(() => {
|
|
|
prop: "bomSpecName",
|
|
|
label: "品名",
|
|
|
},
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "sortField",
|
|
|
+ label: "排序字段",
|
|
|
+ data: sortField.value,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "sortBy",
|
|
|
+ label: "排序方式",
|
|
|
+ data: sortBy.value,
|
|
|
+ },
|
|
|
];
|
|
|
});
|
|
|
const config = computed(() => {
|
|
@@ -203,6 +241,8 @@ const getList = async (req, status) => {
|
|
|
sourceList.value.pagination = {
|
|
|
pageNum: sourceList.value.pagination.pageNum,
|
|
|
pageSize: sourceList.value.pagination.pageSize,
|
|
|
+ sortField: "turnoverRate",
|
|
|
+ sortBy: 2,
|
|
|
};
|
|
|
} else {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|