diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 909333405..3f709f814 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -445,16 +445,22 @@ routeName.value = route.name const formHeight = ref({}) if (!wsCache.get('ShowPackingNumber')) { if (formSchema.value) { - formSchema.value = formSchema.value.filter(item => item.field != 'packingNumber') + formSchema.value = formSchema.value.filter(item => item.field != 'packingNumber' && item.field != 'fromPackingNumber') } if (rules.value && rules.value.packingNumber) { delete rules.value.packingNumber } + if (rules.value && rules.value.fromPackingNumber) { + delete rules.value.fromPackingNumber + } if (props.tableAllSchemas) { - tableAllSchemas.value.tableFormColumns = props.tableAllSchemas.tableFormColumns.filter(item => item.field != 'packingNumber') + tableAllSchemas.value.tableFormColumns = props.tableAllSchemas.tableFormColumns.filter(item => item.field != 'packingNumber' && item.field != 'fromPackingNumber') if (tableFormRules.value && tableFormRules.value.packingNumber) { delete tableFormRules.value.packingNumber } + if (tableFormRules.value && tableFormRules.value.fromPackingNumber) { + delete tableFormRules.value.fromPackingNumber + } } } @@ -840,6 +846,7 @@ const submitForm = async () => { const data = unref(formRef)?.formModel if (!wsCache.get('ShowPackingNumber') ) { data.packingNumber='' + data.fromPackingNumber='' } emit('submitForm', formType.value, data) } finally { @@ -851,6 +858,7 @@ const submitForm = async () => { const data = unref(formRef)?.formModel if (!wsCache.get('ShowPackingNumber') ) { data.packingNumber='' + data.fromPackingNumber='' } console.log(data); @@ -867,6 +875,7 @@ const submitForm = async () => { // 清空包装号 if (!wsCache.get('ShowPackingNumber') ) { data.packingNumber='' + data.fromPackingNumber='' } emit('success', formType.value, data) } finally {