From ba49f5fe4513aeca546ba8a9c6c22c06f489ad70 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Tue, 8 Oct 2024 18:05:24 +0800 Subject: [PATCH] =?UTF-8?q?10.8=E7=A6=85=E9=81=93=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/operation/seaexport/detail/index.vue | 9 ++++++++- .../operation/seaexport/detail/modules/baseInfo.tsx | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue index 1101391d..8ec0edcc 100644 --- a/src/views/operation/seaexport/detail/index.vue +++ b/src/views/operation/seaexport/detail/index.vue @@ -305,6 +305,8 @@ const data = RefmailingInfo.value.getFieldsValueR() RefNoteInfo.value.setAddress(data, v) } + // 存储箱型价格列 + const ctnPriceData = ref([]) // 获取表单设置数据 const getFormSet = (v) => { const postData = { permissionId: permissionsInfo('/BookingDetail').permissionId, formNo: 10, taskStatus: route.query.status || 'NORMAL' } @@ -347,6 +349,10 @@ RefNoteInfo.value.updateSchema(content) } }, 1500) + // 存储箱型价格判断隐藏不校验必填 + ctnPriceData.value = content.filter(item => { + return item.field == "ctnPriceInfo" + }) } }) } @@ -455,8 +461,9 @@ createMessage.warning(err?.errorFields[0]?.errors[0]) throw Error() }) + console.log(ctnPriceData.value[0].show) // 校验箱型价格 - if (goodsForm.ctnPriceInfo && goodsForm.ctnPriceInfo.length) { + if (goodsForm.ctnPriceInfo && goodsForm.ctnPriceInfo.length && ctnPriceData.value.length && ctnPriceData.value[0].show !== false) { for (let i = 0; i < goodsForm.ctnPriceInfo.length; i++) { if (!goodsForm.ctnPriceInfo[i].ctn) { return createMessage.warning('请填写箱型价格!') diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx index 412ecfe4..4fb7b38e 100644 --- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx +++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx @@ -681,7 +681,8 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ label: '开船日期', labelSlot: 'etd', component: 'DatePicker', - rules: [{ required: true, message: '请选择开船日期' }], + required: true, + rules: [{ message: '请选择开船日期' }], dynamicDisabled: false, defaultValue: undefined, colProps: { className: 'edt-picker ant-col ant-col-5' },