Browse Source

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

master
陈薪名 11 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) {
//
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

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

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

Loading…
Cancel
Save