From ae1a0c314a63c908fc55f727d9e0167381f854ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <14166000+zhangtonghai@user.noreply.gitee.com> Date: Tue, 8 Oct 2024 17:54:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=80=E6=9D=A5=E5=8D=95=E4=BD=8D=20?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=B4=B9=E7=94=A8=E6=A8=A1=E6=9D=BF=EF=BC=88?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infoclient/FeeCustTemplate/columns.tsx | 214 ++++++++++++++++-- 1 file changed, 201 insertions(+), 13 deletions(-) diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx b/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx index caf6eeed..1fa0dec3 100644 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx +++ b/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx @@ -4,9 +4,17 @@ import { Tag } from 'ant-design-vue' // 引入字典数据 import { getDictOption } from '/@/utils/dictUtil' -import { getOrgList } from '/@/api/common' +import { getOrgList, GetClientPortSelectList, GetCarrierSelectList } from '/@/api/common' +import { + GetClientLanesSelectList, + GetAgentCnClientList, + GetClientFrtSelectList, + GetClientSourceSelectList, +} from '/@/views/operation/seaexport/api/BookingLedger' // 往来单位下拉框数据 const companyDict = ref([]) +import { useOptionsStore } from '/@/store/modules/options' +const optionsStore = useOptionsStore() let businessType: any = [ { value: 1, label: '海运出口' }, { value: 2, label: '海运进口' }, @@ -28,18 +36,23 @@ export const columns: BasicColumn[] = [ width: 200, }, { - title: '费用类别', - dataIndex: 'feeCategory', + title: '费用类型', + dataIndex: 'feeType', width: 120, customRender: ({ text }) => { - if (text == '1') { + if (text == 1) { return '收' - } else if (text == '2') { + } else if (text == 2) { return '付' } return text }, }, + { + title: '费用类别', + dataIndex: 'feeCategoryName', + width: 200, + }, { title: '是否停用', dataIndex: 'isDisabled', @@ -93,14 +106,14 @@ export const searchFormSchema: FormSchema[] = [ colProps: { span: 4 }, }, { - field: 'feeCategory', - label: '费用类别', + field: 'feeType', + label: '费用类型', component: 'Select', colProps: { span: 4 }, componentProps: { options: [ - { label: '收', value: '1' }, - { label: '付', value: '2' }, + { label: '收', value: 1 }, + { label: '付', value: 2 }, ], }, }, @@ -239,17 +252,192 @@ export const formSchema: FormSchema[] = [ // show: false, // }, { - field: 'feeCategory', - label: '费用类别', + field: 'feeType', + label: '费用类型', component: 'Select', colProps: { span: 6 }, componentProps: { options: [ - { label: '收', value: '1' }, - { label: '付', value: '2' }, + { label: '收', value: 1 }, + { label: '付', value: 2 }, ], }, }, + { + label: '费用类别名称', + field: 'feeCategoryName', + component: 'Input', + defaultValue: '', + show: false, + }, + { + field: 'feeCategoryId', + label: '费用类别', + defaultValue: '', + component: 'ApiSelect', + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + api: () => { + return new Promise((resolve) => { + getDictOption('Fee_FeeCategoryId').then((res) => { + resolve(res) + }) + }) + }, + labelField: 'label', + valueField: 'value', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (e, obj) => { + console.log(e, obj) + if (e && obj) { + formModel.feeCategoryName = obj.label + formModel.feeCategoryId = obj.value + } + if (!e && !obj) { + formModel.feeCategoryName = '' + formModel.feeCategoryId = '' + } + }, + } + }, + }, + { + label: '起运港', + field: 'polCode', + component: 'ApiSelect', + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: () => { + return { + api: GetClientPortSelectList, + resultField: 'data', + allowClear: true, + showSearch: true, + labelField: 'pinYinCode', + showName: 'pinYinCode', + valueField: 'ediCode', + immediate: true, + getPopupContainer: () => document.body, + } + }, + }, + { + label: '卸货港', + field: 'podCode', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: () => { + return { + api: GetClientPortSelectList, + resultField: 'data', + allowClear: true, + showSearch: true, + labelField: 'pinYinCode', + showName: 'pinYinCode', + valueField: 'ediCode', + immediate: true, + getPopupContainer: () => document.body, + } + }, + }, + { + field: 'laneId', + label: '航线', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + api: GetClientLanesSelectList, + labelField: 'laneName', + valueField: 'id', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, + { + label: '业务来源', + field: 'sourceId', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + api: GetClientSourceSelectList, + labelField: 'sourceName', + valueField: 'id', + resultField: 'data', + } + }, + }, + { + label: '船公司', + field: 'carrierId', + labelSlot: 'carrierId', + component: 'ApiSelect', + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + api: GetCarrierSelectList, + labelField: 'pinYinCode', + showName: 'cnName', + valueField: 'id', + resultField: 'data', + } + }, + }, + { + label: '订舱口', + field: 'forwarderId', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + api: GetAgentCnClientList, + labelField: 'shortName', + valueField: 'id', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, + { + field: 'mblFrtCode', + label: '付费方式', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + defaultValue: null, + colProps: { span: 6 }, + componentProps: ({ formModel, formActionType }) => { + return { + api: GetClientFrtSelectList, + allowClear: true, + showSearch: true, + labelField: 'frtName', + valueField: 'ediCode', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, { field: 'isDisabled', label: '是否停用',