diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index dd189cf7d..3a5aa7429 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -245,6 +245,12 @@ const props = defineProps({ type: Boolean, required: false, default: true + }, + // 明细数据长度校验 + tableFormDataLength: { + type: Boolean, + required: false, + default: true } }) @@ -432,7 +438,7 @@ const submitForm = async () => { formLoading.value = true if (formType.value == 'create') { const validateForm = await tableFormRef.value.validateForm() - if (!validateForm) { + if (!validateForm && props.tableFormDataLength) { if (props.tableData.length == 0) { message.warning('请填写明细信息!') formLoading.value = false diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue index db7184c0c..c55ae9007 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue @@ -57,6 +57,7 @@ @submitForm="submitForm" :isShowButton = isShowButton :basicFormWidth="75" + :tableFormDataLength="false" /> @@ -130,6 +131,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => setV['inPackUnit'] = val[0]['code'] }else if(formField == 'outPackUnit') { setV['outPackUnit'] = val[0]['code'] + }else if(formField == 'itemCode') { + setV['itemCode'] = val[0]['code'] }else{ setV[formField] = setV[0][searchField] } @@ -285,7 +288,7 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await ItemareaApi.exportItemarea(tableObject.params) - download.excel(data, '发货申请主.xlsx') + download.excel(data, '物料库区配置管理主.xlsx') } catch { } finally { exportLoading.value = false