diff --git a/src/api/wms/business/inputBlur.ts b/src/api/wms/business/inputBlur.ts index 20a179bb8..905a255d5 100644 --- a/src/api/wms/business/inputBlur.ts +++ b/src/api/wms/business/inputBlur.ts @@ -68,6 +68,22 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f column: searchCondition[i].key, value: formRef.formModel[searchCondition[i].value] }) + } else if (searchCondition[i].isTableRowValue) { + if (searchCondition[i].required) { + if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) { + message.warning( + searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!' + ) + row[headerItem.field] = '' + return + } + } + //查询当前table表数据的值 + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: row[searchCondition[i].value] + }) } else { // 扩展 转换为筛选条件进行查询 if (searchCondition[i].isSearch) { @@ -85,14 +101,24 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f return } } + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: formRef.formModel[searchCondition[i].value] + }) + } else { + filters.push({ + action: searchCondition[i].action || '==', + column: searchCondition[i].key, + value: searchCondition[i].value + }) } + } else { filters.push({ action: searchCondition[i].action || '==', column: searchCondition[i].key, - value: formRef.formModel[searchCondition[i].value] + value: searchCondition[i].value }) - } else { - params.value[searchCondition[i].key] = searchCondition[i].value } } } @@ -110,11 +136,6 @@ export const tableFormBlurVer = async (headerItem, val, row, index, routeName, f ? formRef.formModel[verificationParams[i].value] : val.trim() }) - filters.push({ - action: searchCondition[i].action || '==', - column: searchCondition[i].key, - value: formRef.formModel[searchCondition[i].value] - }) } else { filters.push({ action: searchCondition[i].action || '==', diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts index f83af7467..d2e2d5928 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts @@ -975,6 +975,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive( action: '==', // 查询拼接条件 isSearch: true, // 使用自定义拼接条件 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 - }] + }], + verificationParams: [{ + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } }, isForm: true, @@ -966,6 +974,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive([ searchField: 'code', // 查询弹窗赋值字段 searchTitle: '供应商信息', // 查询弹窗标题 searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 - searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法 + searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -209,6 +217,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, disabled:true, isSearchList: true, // 开启查询弹窗 searchListPlaceholder: '请选择采购收货记录单号', // 输入框占位文本 @@ -221,7 +230,15 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive([ key: 'supplierCode', value: 'supplierCode', isMainValue: true - }] + }], + verificationParams: [{ + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -943,7 +960,8 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - tableForm:{ + tableForm: { + enterSearch: true, // labelMessage: '信息提示说明!!!', isInpuFocusShow: true, // 开启查询弹窗 searchListPlaceholder: '请选择从库位代码', @@ -961,7 +979,15 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive value: 'out', message: '', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 }, // form: { // componentProps:{ @@ -971,6 +997,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive form:{ // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, isSearchList: true, searchListPlaceholder: '请选择从库位代码', searchField: 'code', @@ -987,7 +1014,15 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive value: 'out', message: '', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } }, hiddenInMain: true, @@ -1008,7 +1043,8 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive // } // }, form: { - componentProps:{ + componentProps: { + enterSearch: true, isSearchList: true, searchListPlaceholder: '请选择包装号', searchField: 'packingNumber', @@ -1036,10 +1072,19 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive isTableRowValue: true, //查询当前searchTable表中行数据的值 required:true, isMainValue:true - }] + }], + verificationParams: [{ + key: 'packingNumber', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } }, - tableForm:{ + tableForm: { + enterSearch: true, multiple: true, // labelMessage: '信息提示说明!!!', isInpuFocusShow: true, // 开启查询弹窗 @@ -1069,7 +1114,15 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive isTableRowValue: true, //查询当前searchTable表中行数据的值 required:true, isMainValue:false - }] + }], + verificationParams: [{ + key: 'packingNumber', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 }, }, { diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts index 767c6f791..c3e136109 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts @@ -84,7 +84,15 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive( action: '==', // 查询拼接条件 isSearch: true, // 使用自定义拼接条件 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 - }] + }], + verificationParams: [{ + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } }, isForm: true, @@ -967,6 +975,7 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive