1
This commit is contained in:
parent
598f60c6a3
commit
39eae631ea
@ -889,6 +889,7 @@ import {
|
||||
fallbackOrderAvailableFields,
|
||||
waveBatchColumns,
|
||||
waveWhereAllowedFields,
|
||||
waveWhereTextOperatorFields,
|
||||
getWaveToolbarButtons,
|
||||
waveStrategyFormRules,
|
||||
waveStrategyStatusOptions,
|
||||
@ -1553,8 +1554,13 @@ function buildWhereConditions(rawConditions: Record<string, any>) {
|
||||
if (value === undefined || value === null || value === '' || (Array.isArray(value) && value.length === 0)) {
|
||||
return
|
||||
}
|
||||
// order.wave.batchList where 为标量白名单:等值/模糊字段直接透传 value(store_id 支持数组 in)
|
||||
where[key] = value
|
||||
// order.wave.batchList where:文本/多值字段按 { operator, value } 显式下发(对齐 WaveBatchListWhere),
|
||||
// 避免 wave_no 等多值场景丢失操作符语义;等值/选择等标量白名单字段仍直接透传 value
|
||||
if (waveWhereTextOperatorFields.has(key)) {
|
||||
where[key] = { operator: condition.operator || 'eq', value }
|
||||
} else {
|
||||
where[key] = value
|
||||
}
|
||||
return
|
||||
}
|
||||
if (condition !== undefined && condition !== null && condition !== '') {
|
||||
|
||||
@ -487,6 +487,7 @@ import {
|
||||
waveAvailableFields,
|
||||
waveBatchColumns,
|
||||
waveWhereAllowedFields,
|
||||
waveWhereTextOperatorFields,
|
||||
getWaveToolbarButtons,
|
||||
waveStatusTextMap,
|
||||
waveTypeTextMap,
|
||||
@ -991,8 +992,13 @@ function buildWhereConditions(rawConditions: Record<string, any>) {
|
||||
if (value === undefined || value === null || value === '' || (Array.isArray(value) && value.length === 0)) {
|
||||
return
|
||||
}
|
||||
// order.wave.batchList where 为标量白名单:等值/模糊字段直接透传 value(store_id 支持数组 in)
|
||||
where[key] = value
|
||||
// order.wave.batchList where:文本/多值字段按 { operator, value } 显式下发(对齐 WaveBatchListWhere),
|
||||
// 避免 wave_no 等多值场景丢失操作符语义;等值/选择等标量白名单字段仍直接透传 value
|
||||
if (waveWhereTextOperatorFields.has(key)) {
|
||||
where[key] = { operator: condition.operator || 'eq', value }
|
||||
} else {
|
||||
where[key] = value
|
||||
}
|
||||
return
|
||||
}
|
||||
if (condition !== undefined && condition !== null && condition !== '') {
|
||||
|
||||
@ -418,6 +418,14 @@ export const waveWhereAllowedFieldList = [
|
||||
|
||||
export const waveWhereAllowedFields = new Set<string>(waveWhereAllowedFieldList)
|
||||
|
||||
/**
|
||||
* order.wave.batchList where 中需按 { operator, value } 显式下发的文本/多值字段
|
||||
* (对齐 src/api/order/order.ts 的 WaveBatchListWhere 声明:wave_no / creator / logistics_name 支持对象结构;
|
||||
* 避免裸值/裸数组丢失操作符语义,数组是 in/contains 还是模糊由显式 operator 决定)
|
||||
*/
|
||||
export const waveWhereTextOperatorFieldList = ['wave_no', 'creator', 'logistics_name'] as const
|
||||
export const waveWhereTextOperatorFields = new Set<string>(waveWhereTextOperatorFieldList)
|
||||
|
||||
/** 列表/详情展示:接口可能返回英文枚举或历史中文 */
|
||||
const waveExpressAssignmentStatusLabelMap: Record<string, string> = {
|
||||
unassigned: '未分配',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user