\"fix: let frontend dictate warning sort flag and add SQL numeric casting\"

This commit is contained in:
DXC
2026-03-12 08:53:09 +08:00
parent f0ec9a68d7
commit 7e403a87cd
2 changed files with 16 additions and 22 deletions

View File

@ -580,6 +580,7 @@ interface QueryParams {
isAsc: string | undefined;
advancedFilters?: any[];
has_stock?: string;
enableWarningSort?: boolean;
}
interface CascaderOption {
@ -880,6 +881,8 @@ const querySearchType = (queryString: string, cb: any) => {
const getList = () => {
loading.value = true;
// 强制注入预警排序开关(基于权限)
queryParams.enableWarningSort = userStore.hasPermission('material_list:view_warning');
// Stringify advancedFilters to JSON string as backend expects
const params = {
...queryParams,