diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 7d569b1b4..93b9dc293 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -282,30 +282,39 @@ const opensearchTable = ( if (searchCondition && searchCondition.length > 0) { // 转换筛选条件所需 let filters: any[] = [] - searchCondition.forEach((item) => { + for (var i=0; i< searchCondition.length; i++ ) { + // searchCondition.forEach((item) => { // 查询条件为主表某字段,需要赋值主表数据,数据来源是详情的,赋值需要从row中获取 - // 20231127 row[item.value]?row[item.value] 修改为 row?row[item.value] 返回'null' 为了查询不到任何数据 - if (item.isMainValue) { - _searchCondition[item.key] = formRef.value.formModel[item.value] - ? formRef.value.formModel[item.value] + if (searchCondition[i].isMainValue) { + _searchCondition[searchCondition[i].key] = formRef.value.formModel[searchCondition[i].value] + ? formRef.value.formModel[searchCondition[i].value] : props.detailData - ? props.detailData[item.value] + ? props.detailData[searchCondition[i].value] : row - ? row[item.value] - : 'null' + ? row[searchCondition[i].value] + : '' + // 是否含有空参数情况 + let isNull = false + if (_searchCondition[searchCondition[i].key] == '' || _searchCondition[searchCondition[i].key] == undefined) { + isNull = true + } + if (isNull) { + message.warning(searchCondition[i].message) + return + } } else { // 扩展 转换为筛选条件进行查询 - if (item.isSearch) { + if (searchCondition[i].isSearch) { filters.push({ - action: item.action, - column: item.key, - value: item.value + action: searchCondition[i].action, + column: searchCondition[i].key, + value: searchCondition[i].value }) } else { - _searchCondition[item.key] = item.value + _searchCondition[searchCondition[i].key] = searchCondition[i].value } } - }) + } if (filters.length > 0) { _searchCondition.isSearch = true _searchCondition.filters = filters diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 53b2d9954..d779eb2d6 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -435,6 +435,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive