Browse Source

查询弹窗 新增前置条件为空时提示信息

master
陈薪名 10 months ago
parent
commit
3884bc3dae
  1. 37
      src/components/BasicForm/src/BasicForm.vue
  2. 6
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

37
src/components/BasicForm/src/BasicForm.vue

@ -282,30 +282,39 @@ const opensearchTable = (
if (searchCondition && searchCondition.length > 0) { if (searchCondition && searchCondition.length > 0) {
// //
let filters: any[] = [] let filters: any[] = []
searchCondition.forEach((item) => { for (var i=0; i< searchCondition.length; i++ ) {
// searchCondition.forEach((item) => {
// row // row
// 20231127 row[item.value]?row[item.value] row?row[item.value] 'null' if (searchCondition[i].isMainValue) {
if (item.isMainValue) { _searchCondition[searchCondition[i].key] = formRef.value.formModel[searchCondition[i].value]
_searchCondition[item.key] = formRef.value.formModel[item.value] ? formRef.value.formModel[searchCondition[i].value]
? formRef.value.formModel[item.value]
: props.detailData : props.detailData
? props.detailData[item.value] ? props.detailData[searchCondition[i].value]
: row : row
? row[item.value] ? row[searchCondition[i].value]
: 'null' : ''
//
let isNull = false
if (_searchCondition[searchCondition[i].key] == '' || _searchCondition[searchCondition[i].key] == undefined) {
isNull = true
}
if (isNull) {
message.warning(searchCondition[i].message)
return
}
} else { } else {
// //
if (item.isSearch) { if (searchCondition[i].isSearch) {
filters.push({ filters.push({
action: item.action, action: searchCondition[i].action,
column: item.key, column: searchCondition[i].key,
value: item.value value: searchCondition[i].value
}) })
} else { } else {
_searchCondition[item.key] = item.value _searchCondition[searchCondition[i].key] = searchCondition[i].value
} }
} }
}) }
if (filters.length > 0) { if (filters.length > 0) {
_searchCondition.isSearch = true _searchCondition.isSearch = true
_searchCondition.filters = filters _searchCondition.filters = filters

6
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -435,6 +435,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
},{ },{
key: 'workshopCode', key: 'workshopCode',
value: 'workshopCode', value: 'workshopCode',
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
isMainValue: true isMainValue: true
}] }]
} }
@ -453,6 +454,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
},{ },{
key: 'workshopCode', key: 'workshopCode',
value: 'workshopCode', value: 'workshopCode',
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
isMainValue: true isMainValue: true
}] }]
}, },
@ -480,10 +482,12 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
},{ },{
key: 'workshopCode', key: 'workshopCode',
value: 'workshopCode', value: 'workshopCode',
message: '请选择车间信息!',
isMainValue: true isMainValue: true
},{ },{
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请选择生产线信息!',
isMainValue: true isMainValue: true
}] }]
} }
@ -502,10 +506,12 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
},{ },{
key: 'workshopCode', key: 'workshopCode',
value: 'workshopCode', value: 'workshopCode',
message: '请选择车间信息!',
isMainValue: true isMainValue: true
},{ },{
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请选择生产线信息!',
isMainValue: true isMainValue: true
}] }]
}, },

Loading…
Cancel
Save