Browse Source

批量添加,失去焦点添加参数可选可空的判断

hella_online_20240919
yufei_wang 2 months ago
parent
commit
492753db1a
  1. 13
      src/api/wms/business/inputBlur.ts

13
src/api/wms/business/inputBlur.ts

@ -49,7 +49,9 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f
params.value[searchCondition[i].key] == '' ||
params.value[searchCondition[i].key] == undefined
) {
isNull = true
if(!searchCondition[i].isOptional){ // 添加参数可选可空的判断
isNull = true
}
}
if (isNull) {
message.warning(
@ -58,6 +60,9 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f
row[headerItem.field] = ''
return
}
if(searchCondition[i].isOptional&&!params.value[searchCondition[i].key]){ // 添加参数可选可空的判断
continue
}
filters.push({
action: searchCondition[i].action || '==',
column: searchCondition[i].key,
@ -493,7 +498,11 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form
params.value[searchCondition1[i].key] == '' ||
params.value[searchCondition1[i].key] == undefined
) {
isNull = true
if(!searchCondition1[i].isOptional){ // 添加参数可选可空的判断
if(!searchCondition1[i].isOptional){ // 添加参数可选可空的判断
isNull = true
}
}
}
if (isNull) {
message.warning(

Loading…
Cancel
Save