From c1ad95de06f185856ea4b83439685ebe42720629 Mon Sep 17 00:00:00 2001 From: sunzehua Date: Fri, 23 Aug 2024 13:52:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=88=B1=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bookingcabin/CabinManagement/columns.tsx | 44 +++++++++++++------ .../seaexport/detail/modules/baseInfo.tsx | 14 +++++- .../seaexport/detail/modules/cargoInfo.vue | 2 + .../seaexport/detail/modules/preOrder.vue | 20 +++++---- 4 files changed, 56 insertions(+), 24 deletions(-) diff --git a/src/views/bookingcabin/CabinManagement/columns.tsx b/src/views/bookingcabin/CabinManagement/columns.tsx index 4548f368..2cceb7b6 100644 --- a/src/views/bookingcabin/CabinManagement/columns.tsx +++ b/src/views/bookingcabin/CabinManagement/columns.tsx @@ -1010,14 +1010,20 @@ export const detialForm: FormSchema[] = [ }, }, { - label: '装货港名称', - field: 'portload', + label: '', + field: 'portLoadCode', component: 'Input', show: false, }, { + label: '', field: 'portLoadId', + component: 'Input', + show: false, + }, + { label: '装货港', + field: 'portLoad', component: 'ApiSelect', required: false, dynamicDisabled: false, @@ -1027,28 +1033,36 @@ export const detialForm: FormSchema[] = [ api: GetClientPortSelectList, resultField: 'data', labelField: 'pinYinCode', - valueField: 'ediCode', - showName: 'ediCode', + valueField: 'portName', + showName: 'portName', immediate: false, onChange: (e, obj) => { if (e && obj) { - formModel.portload = obj.portName + formModel.portLoadId = obj.id + formModel.portLoadCode = obj.ediCode } - if (!obj && !e) { - formModel.portload = '' + if (!e && !obj) { + formModel.portLoadId = null + formModel.portLoadCode = null } - }, + } } - }, + } }, { label: '', - field: 'portDischarge', + field: 'portDischargeCode', component: 'Input', show: false, }, { + label: '', field: 'portDischargeId', + component: 'Input', + show: false, + }, + { + field: 'portDischarge', label: '卸货港', component: 'ApiSelect', colProps: { span: 4 }, @@ -1057,15 +1071,17 @@ export const detialForm: FormSchema[] = [ api: GetClientPortSelectList, resultField: 'data', labelField: 'pinYinCode', - valueField: 'ediCode', - showName: 'ediCode', + showName: 'portName', + valueField: 'portName', immediate: false, onChange: (e, obj) => { if (e && obj) { - formModel.portdischarge = obj.portName + formModel.portDischargeId = obj.id + formModel.portDischargeCode = obj.ediCode } if (!obj && !e) { - formModel.portdischarge = '' + formModel.portDischargeId = '' + formModel.portDischargeCode = '' } }, } diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx index 226771f1..6a365797 100644 --- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx +++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx @@ -1711,13 +1711,22 @@ export const cargoInfoFormSchema2: FormSchema[] = [ component: 'Input', show: false }, + { + label: '', + field: 'isPreOrder', + component: 'Input', + defaultValue: false, + show: false + }, { field: 'goodsName', label: '品名', component: 'ApiSelect', required: false, dynamicDisabled: false, - // defaultValue: '', + show: ({ values }) => { + return !values.isPreOrder + }, colProps: { span: 12 }, componentProps: ({ formModel }) => { return { @@ -1746,6 +1755,9 @@ export const cargoInfoFormSchema2: FormSchema[] = [ label: 'HS编码', field: 'hsCode', component: 'Input', + show: ({ values }) => { + return !values.isPreOrder + }, required: false, colProps: { span: 12 }, }, diff --git a/src/views/operation/seaexport/detail/modules/cargoInfo.vue b/src/views/operation/seaexport/detail/modules/cargoInfo.vue index d52459ee..7bd81f16 100644 --- a/src/views/operation/seaexport/detail/modules/cargoInfo.vue +++ b/src/views/operation/seaexport/detail/modules/cargoInfo.vue @@ -380,6 +380,7 @@ () => props.details, async (nval) => { if (Object.keys(nval).length) { + nval.isPreOrder = false setFieldsValue1({ marks: nval.marks, description: nval.description }) setFieldsValue2(nval) setFieldsValue3(nval) @@ -615,6 +616,7 @@ } function preOrderInit(val:any) { setFieldsValue1({ marks: val.marks, description: val.description }) + val.isPreOrder = true setFieldsValue2(val) setFieldsValue3(val) if (val.cargoId) cargoId.value = val.cargoId diff --git a/src/views/operation/seaexport/detail/modules/preOrder.vue b/src/views/operation/seaexport/detail/modules/preOrder.vue index 568463d1..d7a134eb 100644 --- a/src/views/operation/seaexport/detail/modules/preOrder.vue +++ b/src/views/operation/seaexport/detail/modules/preOrder.vue @@ -375,7 +375,6 @@ function FngetPageESeaeEdi() { } }) orderList.value = res.data - console.log(orderList.value); } else { //处理接口没数据的情况 const propsDetail = JSON.parse(JSON.stringify(props.details)) @@ -428,7 +427,6 @@ function FngetPageESeaeEdi() { delete item.id }) hotpreOrder.value.hotInstance.loadData(ctnList.value) - console.log(propsDetail,111111); const data = JSON.parse(JSON.stringify(propsDetail)) data.mblno = propsDetail.mblno data.isPart = false @@ -601,7 +599,6 @@ const sendLoading = ref(false) // 发送 function sendOrderFun() { const SelectArr = [] as any - console.log(orderList.value) for (let i = 0; i < orderList.value.length; i++) { if (orderList.value[i].checked && orderList.value[i].id == 0) { createMessage.error('请先保存') @@ -747,7 +744,7 @@ const columns = [ }, { title: '箱型', - width: 180, + width: 120, data: 'ctn', type: 'dropdown', source: async (query, process) => { @@ -761,17 +758,17 @@ const columns = [ }, { title: '箱号', - width: 180, + width: 150, data: 'cntrNo', }, { title: '封号', - width: 180, + width: 150, data: 'sealNo', }, { title: '件数', - width: 180, + width: 100, data: 'pkgs', }, { @@ -791,14 +788,19 @@ const columns = [ }, { title: '重量', - width: 180, + width: 100, data: 'kgs', }, { title: '尺码', - width: 180, + width: 100, data: 'cbm', }, + { + title: 'hs编码', + width: 120, + data: 'hsCode', + }, ] // 表格配置项 const settings = {