From 03f91f0017114efadb0d59ff817ff7c59ae79e63 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Thu, 15 Aug 2024 19:50:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=B7=E8=BF=90=E5=87=BA=E5=8F=A3=E8=AF=A6?= =?UTF-8?q?=E6=83=85bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/tabs/components/TabContent.vue | 50 ++++++------- src/views/operation/seaexport/columns.tsx | 6 +- .../seaexport/detail/modules/baseInfo.tsx | 72 +++++++++---------- .../seaexport/detail/modules/basicInfo.vue | 2 +- src/views/operation/seaexport/index.vue | 2 +- .../operation/seaexport/modules/initData.js | 4 +- 6 files changed, 67 insertions(+), 69 deletions(-) diff --git a/src/layouts/default/tabs/components/TabContent.vue b/src/layouts/default/tabs/components/TabContent.vue index 2e9be4de..c79557f7 100644 --- a/src/layouts/default/tabs/components/TabContent.vue +++ b/src/layouts/default/tabs/components/TabContent.vue @@ -7,7 +7,7 @@ @menu-event="handleMenuEvent" >
- {{ getTitle }} + {{ RText(getTitle) }}
@@ -46,29 +46,29 @@ const { tabItem: { meta } = {} } = props return meta && t(meta.title as string) }) - // function RText(data) { - // let Rdata = '' - // if (data == '海运出口-详情') { - // if (props.tabItem.query.isCopy) { - // if (props.tabItem.query.copyId) { - // Rdata = `海运出口-复制${Number(props.tabItem.query.copyId) + 1}` - // } else { - // Rdata = '海运出口-复制' - // } - // } else if (props.tabItem.query.mblno) { - // Rdata = `${props.tabItem.query.mblno}-详情` - // } else if (props.tabItem.query.customerNo) { - // Rdata = `${props.tabItem.query.customerNo}-详情` - // } else if (props.tabItem.query.addNum) { - // Rdata = '海运出口-新增' - // } else { - // Rdata = '海运出口-详情' - // } - // } else { - // Rdata = data - // } - // return Rdata - // } + function RText(data) { + let Rdata = '' + if (data == '海运出口-详情') { + if (props.tabItem.query.isCopy) { + if (props.tabItem.query.copyId) { + Rdata = `海运出口-复制${Number(props.tabItem.query.copyId) + 1}` + } else { + Rdata = '海运出口-复制' + } + } else if (props.tabItem.query.mblno) { + Rdata = `${props.tabItem.query.mblno}-详情` + } else if (props.tabItem.query.customerNo) { + Rdata = `${props.tabItem.query.customerNo}-详情` + } else if (props.tabItem.query.addNum) { + Rdata = '海运出口-新增' + } else { + Rdata = '海运出口-详情' + } + } else { + Rdata = data + } + return Rdata + } const getIsTabs = computed(() => !props.isExtra) const getTrigger = computed((): ('contextmenu' | 'click' | 'hover')[] => @@ -94,7 +94,7 @@ getTrigger, getIsTabs, getTitle, - // RText, + RText, } }, }) diff --git a/src/views/operation/seaexport/columns.tsx b/src/views/operation/seaexport/columns.tsx index 479db69f..012396a7 100644 --- a/src/views/operation/seaexport/columns.tsx +++ b/src/views/operation/seaexport/columns.tsx @@ -528,7 +528,7 @@ export const columns: BasicColumn[] = [ width: 150, }, { - title: '订舱代理', + title: '订舱口', dataIndex: 'forwarder', sorter: true, width: 150, @@ -1412,13 +1412,13 @@ export const BatchModificationFormSchema: FormSchema[] = [ }, }, { - label: '订舱代理', + label: '', field: 'forwarder', component: 'Input', show: false, }, { - label: '订舱代理', + label: '订舱口', field: 'forwarderId', component: 'ApiSelect', required: false, diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx index 12e46cee..797e64ee 100644 --- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx +++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx @@ -768,6 +768,7 @@ export const mailingInfoFormSchemaR: FormSchema[] = [ colProps: { span: 5 }, componentProps: { allowClear: true, + showTime: true, valueFormat: 'YYYY-MM-DD HH:mm' }, }, @@ -1721,8 +1722,9 @@ export const cargoInfoFormSchema2: FormSchema[] = [ componentProps: ({ formModel }) => { return { api: GetClientGoodsList, - labelField: 'goodName', + labelField: 'pinYinCode', valueField: 'goodName', + showName: 'goodName', immediate: false, resultField: 'data', onChange: (v, obj) => { @@ -2292,12 +2294,9 @@ export const otherInfoFormSchema: FormSchema[] = [ component: 'ApiSelect', required: false, dynamicDisabled: false, - // defaultValue: '', colProps: { span: 12 }, - componentProps: ({ formActionType, formModel }) => { + componentProps: ({ formModel }) => { return { - allowClear: true, - showSearch: true, option: optionsStore.getOptionsByCode('GetClientSourceSelectList'), labelField: 'sourceName', valueField: 'id', @@ -2307,53 +2306,52 @@ export const otherInfoFormSchema: FormSchema[] = [ onChange: async (e, obj) => { if (e && obj) { formModel.sourceCode = obj.sourceCode + formModel.sourceDetailId = null + formModel.sourceDetailName = null } if (!e && !obj) { formModel.sourceCode = null } - if (e) { - if (formActionType) { - const { updateSchema } = formActionType - let Arr: any = [] - await GetClientSourceDetailSelectList({ id: e }).then((res) => { - res.data.forEach((item) => { - Arr.push({ label: item.detailName, value: item.id }) - }) - }) - updateSchema({ - label: '来源明细', - field: 'sourceDetailId', - component: 'Select', - required: false, - dynamicDisabled: ({ values }) => { - return !values.sourceId - }, - colProps: { span: 12 }, - componentProps: { - allowClear: true, - options: Arr, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - }, - }) - } - } - formModel.sourceDetailId = '' }, } }, }, { label: '来源明细', - field: 'sourceDetailId', - component: 'Select', + field: 'sourceDetailName', + component: 'ApiSelect', required: false, dynamicDisabled: ({ values }) => { return !values.sourceId }, colProps: { span: 12 }, + componentProps: ({ formModel }) => { + return { + api: GetClientSourceDetailSelectList, + params: { + id: formModel.sourceId + }, + immediate: false, + labelField: 'detailName', + valueField: 'detailName', + resultField: 'data', + onChange: (v, obj) => { + if (v && obj) { + console.log(obj) + formModel.sourceDetailId = obj.id + } + if (!v && !obj) { + formModel.sourceDetailId = null + } + } + } + } + }, + { + label: '', + field: 'sourceDetailId', + component: 'Input', + show: false, }, { label: '', diff --git a/src/views/operation/seaexport/detail/modules/basicInfo.vue b/src/views/operation/seaexport/detail/modules/basicInfo.vue index 21211813..0fe57868 100644 --- a/src/views/operation/seaexport/detail/modules/basicInfo.vue +++ b/src/views/operation/seaexport/detail/modules/basicInfo.vue @@ -18,7 +18,7 @@
- + diff --git a/src/views/operation/seaexport/index.vue b/src/views/operation/seaexport/index.vue index f7ee2352..e5ccd013 100644 --- a/src/views/operation/seaexport/index.vue +++ b/src/views/operation/seaexport/index.vue @@ -449,7 +449,7 @@ const [registerTable, { reload, getForm, setLoading, getSelectRows }] = useTable }) function editColumns(row) { if (row.mblno) { - go(`/BookingDetail?id=${row.id}&source=edit`) + go(`/BookingDetail?id=${row.id}&source=edit&mblno=${row.mblno}`) } else { go(`/BookingDetail?id=${row.id}&customerNo=${row.customerNo}&source=edit`) } diff --git a/src/views/operation/seaexport/modules/initData.js b/src/views/operation/seaexport/modules/initData.js index 2aeef484..dea42ffc 100644 --- a/src/views/operation/seaexport/modules/initData.js +++ b/src/views/operation/seaexport/modules/initData.js @@ -266,7 +266,7 @@ export default { { field: 'shipagency', label: 'SHIPAGENCY', width: 160, title: '船代', showHeaderOverflow: true, sortable: true }, { field: 'custno', label: 'CUSTNO', width: 160, title: '订舱编号', showHeaderOverflow: true, sortable: true, slots: { default: 'custno' } }, // { field: 'vgm', label: 'VGM', width: 120, title: 'VGM', showHeaderOverflow: true }, - { field: 'forwarder', label: 'FORWARDER', width: 120, title: '订舱代理', showHeaderOverflow: true, sortable: true }, + { field: 'forwarder', label: 'FORWARDER', width: 120, title: '订舱口', showHeaderOverflow: true, sortable: true }, // { field: 'bookingStatus', label: 'BOOKINGSTATUS', width: 120, title: '订舱状态', showHeaderOverflow: true }, { field: 'freightpayer', @@ -533,7 +533,7 @@ export default { showLabel: 'enName', showLabel2: 'cnName' }, - { title: '订舱代理', align: 'center', width: 120, label: 'FORWARDER', type: 'complete', showLabel: 'shortName' }, + { title: '订舱口', align: 'center', width: 120, label: 'FORWARDER', type: 'complete', showLabel: 'shortName' }, { title: '场站', align: 'center',