From d0f47d05ee9dbfadc5b3e3f15ee1f04cc69434b1 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 16 Jul 2024 17:32:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=AE=A1=E7=90=86=E9=A2=84?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E6=94=B6=E8=B4=A7=E5=A4=B1=E5=8E=BB=E7=84=A6?= =?UTF-8?q?=E7=82=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TableForm/src/TableForm.vue | 8 +- .../productreceiptRequestMain.data.ts | 114 ++++++++++++++++-- 2 files changed, 106 insertions(+), 16 deletions(-) diff --git a/src/components/TableForm/src/TableForm.vue b/src/components/TableForm/src/TableForm.vue index e977306f3..14671e7bb 100644 --- a/src/components/TableForm/src/TableForm.vue +++ b/src/components/TableForm/src/TableForm.vue @@ -402,7 +402,7 @@
- + {{ t('批量添加') }} @@ -503,9 +503,9 @@ const props = defineProps({ default: '' } }) -const isShowTableFormSearch = ref(false) +let isShowTableFormSearch = ref({}) console.log(33333,props.tableFields) -isShowTableFormSearch.value =props.tableFields.some(item=>item.isShowTableFormSearch) +isShowTableFormSearch.value =props.tableFields.find(item=>item.isShowTableFormSearch) // 传递给父类 const emit = defineEmits([ diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts index 02f793ed1..2f42cfe4c 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts @@ -108,6 +108,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, isSearchList: true, searchListPlaceholder: '请选择车间', searchField: 'code', @@ -118,7 +119,15 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -130,7 +139,8 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ width: 150 }, isTable: false, - tableForm:{ + tableForm: { + enterSearch: true, isInpuFocusShow: true, searchListPlaceholder: '请选择生产线代码', searchField: 'code', @@ -151,6 +161,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, isSearchList: true, searchListPlaceholder: '请选择生产线代码', searchField: 'code', @@ -166,7 +177,15 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ value: 'workshopCode', message: '请填写车间代码!', isMainValue: true - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -181,6 +200,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, isSearchList: true, searchListPlaceholder: '请选择班组', searchField: 'code', @@ -191,7 +211,15 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -206,6 +234,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, isSearchList: true, searchListPlaceholder: '请选择班次', searchField: 'code', @@ -216,7 +245,15 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -632,11 +669,22 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive value: 'productionLineCode', message: '请填写生产线代码!', isMainValue: true - }] + }], + verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法 + isShowTableFormSearch: true, + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 }, form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch:true, isSearchList: true, searchListPlaceholder: '请选择工位代码', searchField: 'code', @@ -652,7 +700,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive value: 'productionLineCode', message: '请填写生产线代码!', isMainValue: true - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -663,7 +719,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive table: { width: 150 }, - tableForm:{ + tableForm: { + enterSearch: true, isInpuFocusShow: true, searchListPlaceholder: '请选择工序代码', searchField: 'code', @@ -674,11 +731,20 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 }, form: { // labelMessage: '信息提示说明!!!', componentProps: { + enterSearch: true, isSearchList: true, searchListPlaceholder: '请选择工序代码', searchField: 'code', @@ -689,7 +755,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive key: 'available', value: 'TRUE', isMainValue: false - }] + }], + verificationParams: [{ + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } }, @@ -841,7 +915,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive value: 'productionLineCode', message: '请填写生产线代码!', isMainValue: true - }] + }], + verificationParams: [{ + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 }, form: { // labelMessage: '信息提示说明!!!', @@ -861,7 +943,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive value: 'productionLineCode', message: '请填写生产线代码!', isMainValue: true - }] + }], + verificationParams: [{ + key: 'itemCode', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 } } },