|
|
|
@ -8,10 +8,11 @@ export type MergePageParamFunction = <U>(
|
|
|
|
|
keyword?: string
|
|
|
|
|
},
|
|
|
|
|
sorter: Record<string, SortOrder>,
|
|
|
|
|
filter: Record<string, VueKey[] | null>
|
|
|
|
|
filter: Record<string, VueKey[] | null>,
|
|
|
|
|
salesmanType?: number | undefined
|
|
|
|
|
) => Record<string, any>
|
|
|
|
|
|
|
|
|
|
export const mergePageParam: MergePageParamFunction = (params, sorter, filter) => {
|
|
|
|
|
export const mergePageParam: MergePageParamFunction = (params, sorter, filter, salesmanType?) => {
|
|
|
|
|
const sort = []
|
|
|
|
|
for (const key in sorter) {
|
|
|
|
|
sort.push(sorter[key] === 'ascend' ? `${key},asc` : `${key},desc`)
|
|
|
|
@ -24,6 +25,7 @@ export const mergePageParam: MergePageParamFunction = (params, sorter, filter) =
|
|
|
|
|
page: current,
|
|
|
|
|
...rest,
|
|
|
|
|
...filter,
|
|
|
|
|
sort
|
|
|
|
|
sort,
|
|
|
|
|
salesmanType
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|