From f7306cbe8260719a4b7de57a0dc0b19b002c20e8 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, 15 Oct 2024 15:09:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=AF=B9=E8=B4=A6=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infoclient/FeeCustTemplate/columns.tsx | 527 +++++++++++++----- src/views/fee/FeeCustTemplate/columns.tsx | 476 ++++++++++++---- 2 files changed, 747 insertions(+), 256 deletions(-) diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx b/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx index f94cd20d..9bfce6f2 100644 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx +++ b/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx @@ -19,6 +19,26 @@ let businessType: any = [ { value: 1, label: '海运出口' }, { value: 2, label: '海运进口' }, ] +const laneIdList = ref([]) +GetClientLanesSelectList().then((res) => { + laneIdList.value = res.data +}) +const sourceIdList = ref([]) +GetClientSourceSelectList().then((res) => { + sourceIdList.value = res.data +}) +const carrierIdList = ref([]) +GetCarrierSelectList().then((res) => { + carrierIdList.value = res.data +}) +const forwarderIdList = ref([]) +GetAgentCnClientList().then((res) => { + forwarderIdList.value = res.data +}) +const mblFrtCodeList = ref([]) +GetClientFrtSelectList().then((res) => { + mblFrtCodeList.value = res.data +}) export const columns: BasicColumn[] = [ { title: '模板名称', @@ -30,11 +50,11 @@ export const columns: BasicColumn[] = [ dataIndex: 'businessTypeText', width: 120, }, - { - title: '客户名称', - dataIndex: 'customerName', - width: 200, - }, + // { + // title: '客户名称', + // dataIndex: 'customerName', + // width: 200, + // }, { title: '费用类型', dataIndex: 'feeType', @@ -53,6 +73,96 @@ export const columns: BasicColumn[] = [ dataIndex: 'feeCategoryName', width: 200, }, + { + title: '起运港', + dataIndex: 'polCode', + width: 200, + }, + { + title: '卸货港', + dataIndex: 'podCode', + width: 200, + }, + { + dataIndex: 'laneId', + title: '航线', + sorter: true, + width: 200, + customRender: ({ record }) => { + let name = '' + laneIdList.value.some((item: any) => { + if (record.laneId == item.id) { + name = item.laneName + return true + } + }) + return name + }, + }, + { + dataIndex: 'sourceId', + title: '业务来源', + sorter: true, + width: 200, + customRender: ({ record }) => { + let name = '' + sourceIdList.value.some((item: any) => { + if (record.sourceId == item.id) { + name = item.sourceName + return true + } + }) + return name + }, + }, + { + dataIndex: 'carrierId', + title: '船公司', + sorter: true, + width: 200, + customRender: ({ record }) => { + let name = '' + carrierIdList.value.some((item: any) => { + if (record.carrierId == item.id) { + name = item.cnName + return true + } + }) + return name + }, + }, + { + dataIndex: 'forwarderId', + title: '订舱口', + sorter: true, + width: 200, + customRender: ({ record }) => { + let name = '' + forwarderIdList.value.some((item: any) => { + if (record.forwarderId == item.id) { + name = item.shortName + return true + } + }) + return name + }, + }, + { + dataIndex: 'mblFrtCode', + title: '付费方式', + sorter: true, + width: 200, + customRender: ({ record }) => { + let name = '' + mblFrtCodeList.value.some((item: any) => { + if (record.mblFrtCode == item.ediCode) { + name = item.frtName + return true + } + }) + return name + }, + }, { title: '是否停用', dataIndex: 'isDisabled', @@ -105,6 +215,45 @@ export const searchFormSchema: FormSchema[] = [ component: 'Input', colProps: { span: 4 }, }, + { + field: 'businessType', + label: '业务类型', + component: 'Select', + colProps: { span: 4 }, + componentProps: () => { + return { + options: businessType, + } + }, + }, + // { + // field: 'customerId', + // label: '客户名称', + // component: 'ApiSelect', + // required: false, + // dynamicDisabled: false, + // colProps: { span: 4 }, + // componentProps: ({ formModel }) => { + // return { + // api: GetClientListByCode, + // labelField: 'pinYinCode', + // valueField: 'id', + // showName: 'shortName', + // resultField: 'data', + // immediate: false, + // onChange: (e, obj) => { + // if (e && obj) { + // formModel.customerName = obj.label + // formModel.customerId = obj.value + // } + // if (!e && !obj) { + // formModel.customerName = '' + // formModel.customerId = '' + // } + // }, + // } + // }, + // }, { field: 'feeType', label: '费用类型', @@ -117,27 +266,207 @@ export const searchFormSchema: FormSchema[] = [ ], }, }, - { - field: 'startTime', - label: '开始时间', - component: 'DatePicker', - colProps: { span: 4 }, + field: 'feeCategoryId', + label: '费用类别', defaultValue: '', - componentProps: { - showTime: false, + component: 'ApiSelect', + colProps: { span: 4 }, + 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 = '' + } + }, + } }, }, { - field: 'endTime', - label: '结束时间', - component: 'DatePicker', + label: '起运港', + field: 'polCode', + component: 'ApiSelect', + dynamicDisabled: false, colProps: { span: 4 }, - defaultValue: '', + 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: 4 }, + 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: 4 }, + 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: 4 }, + componentProps: ({ formModel }) => { + return { + api: GetClientSourceSelectList, + labelField: 'sourceName', + valueField: 'id', + resultField: 'data', + } + }, + }, + { + label: '船公司', + field: 'carrierId', + labelSlot: 'carrierId', + component: 'ApiSelect', + colProps: { span: 4 }, + componentProps: ({ formModel }) => { + return { + api: GetCarrierSelectList, + labelField: 'pinYinCode', + showName: 'cnName', + valueField: 'id', + resultField: 'data', + } + }, + }, + { + label: '订舱口', + field: 'forwarderId', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + 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, + colProps: { span: 4 }, + 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: '是否停用', + component: 'Switch', componentProps: { - showTime: false, + checkedChildren: '启用', + checkedValue: false, + unCheckedChildren: '禁用', + unCheckedValue: true, + }, + colProps: { + span: 4, }, }, + // { + // field: 'startTime', + // label: '开始时间', + // component: 'DatePicker', + // colProps: { span: 4 }, + // defaultValue: '', + // componentProps: { + // showTime: false, + // }, + // }, + // { + // field: 'endTime', + // label: '结束时间', + // component: 'DatePicker', + // colProps: { span: 4 }, + // defaultValue: '', + // componentProps: { + // showTime: false, + // }, + // }, { field: 'isDisabled', label: '是否停用', @@ -156,6 +485,18 @@ export const searchFormSchema: FormSchema[] = [ component: 'InputNumber', colProps: { span: 4 }, }, + { + field: 'description', + label: '模板说明', + component: 'Input', + colProps: { span: 4 }, + }, + { + field: 'note', + label: '备注', + component: 'Input', + colProps: { span: 4 }, + }, ] export const formSchema: FormSchema[] = [ { @@ -185,102 +526,20 @@ export const formSchema: FormSchema[] = [ }, }, // { - // field: 'customerType', - // label: '客户类别', - // defaultValue: '', - // component: 'ApiSelect', - // colProps: { span: 5 }, - // componentProps: ({ formModel }) => { - // return { - // api: () => { - // return new Promise((resolve) => { - // getDictOption('djy_cust_prop').then((res) => { - // console.log(res, 111111111111111) - - // resolve(res) - // }) - // }) - // }, - // labelField: 'label', - // valueField: 'value', - // resultField: 'data', - // filterOption: (input: string, option: any) => { - // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - // }, - // onChange: (v: string, obj) => { - // GetClientListByCode({ code: v }).then((res) => { - // const { data } = res - // data.forEach((item) => { - // item['label'] = item.shortName - // item['value'] = item.codeName - // }) - // companyDict.value = data - // }) - // }, - // } - // }, - // }, - { - field: 'customerId', - label: '客户名称', - defaultValue: '', - component: 'Input', - show: false, - colProps: { span: 6 }, - }, - { - field: 'customerName', - label: '客户名称', - component: 'Input', - defaultValue: '', - dynamicDisabled: true, - colProps: { span: 6 }, - }, - // { - // field: 'customerType', - // label: '客户名称类别', - // defaultValue: '', - // component: 'ApiSelect', - // colProps: { span: 6 }, - // componentProps: ({ formModel }) => { - // return { - // api: () => { - // return new Promise((resolve) => { - // getDictOption('djy_cust_prop').then((res) => { - // resolve(res) - // }) - // }) - // }, - // labelField: 'label', - // valueField: 'value', - // resultField: 'data', - // filterOption: (input: string, option: any) => { - // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - // }, - // } - // }, - // dynamicRules: ({ values }) => { - // return [ - // { - // required: values.customerId ? false : true, - // message: '未选择客户名称时,此项必填!', - // }, - // ] - // }, - // }, - // { - // label: '', // field: 'customerId', - // component: 'Input', + // label: '客户名称', // defaultValue: '', + // component: 'Input', // show: false, + // colProps: { span: 6 }, // }, // { - // label: '', - // field: 'customerType', + // field: 'customerName', + // label: '客户名称', // component: 'Input', // defaultValue: '', - // show: false, + // dynamicDisabled: true, + // colProps: { span: 6 }, // }, { field: 'feeType', @@ -512,34 +771,34 @@ export const formSchema: FormSchema[] = [ component: 'InputNumber', colProps: { span: 6 }, }, - { - field: 'saleOrgId', - label: '分公司', - component: 'ApiSelect', - colProps: { span: 6 }, - componentProps: ({ formModel }) => { - return { - api: getOrgList, - labelField: 'label', - valueField: 'id', - resultField: 'data', - allowClear: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - onChange: (e, obj) => { - if (e && obj) { - formModel.saleOrgName = obj.label - formModel.saleOrgId = obj.id - } - if (!e && !obj) { - formModel.saleOrgName = '' - formModel.saleOrgId = '' - } - }, - } - }, - }, + // { + // field: 'orgId', + // label: '分公司', + // component: 'ApiSelect', + // colProps: { span: 6 }, + // componentProps: ({ formModel }) => { + // return { + // api: getOrgList, + // labelField: 'label', + // valueField: 'id', + // resultField: 'data', + // allowClear: true, + // filterOption: (input: string, option: any) => { + // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + // }, + // onChange: (e, obj) => { + // if (e && obj) { + // formModel.orgName = obj.label + // formModel.orgId = obj.id + // } + // if (!e && !obj) { + // formModel.orgName = '' + // formModel.orgId = '' + // } + // }, + // } + // }, + // }, { field: 'description', label: '模板说明', diff --git a/src/views/fee/FeeCustTemplate/columns.tsx b/src/views/fee/FeeCustTemplate/columns.tsx index 9c027bd2..2feedc1c 100644 --- a/src/views/fee/FeeCustTemplate/columns.tsx +++ b/src/views/fee/FeeCustTemplate/columns.tsx @@ -24,6 +24,27 @@ let businessType: any = [ { value: 1, label: '海运出口' }, { value: 2, label: '海运进口' }, ] +const laneIdList = ref([]) +GetClientLanesSelectList().then((res) => { + laneIdList.value = res.data +}) +const sourceIdList = ref([]) +GetClientSourceSelectList().then((res) => { + sourceIdList.value = res.data +}) +const carrierIdList = ref([]) +GetCarrierSelectList().then((res) => { + carrierIdList.value = res.data +}) +const forwarderIdList = ref([]) +GetAgentCnClientList().then((res) => { + forwarderIdList.value = res.data +}) +const mblFrtCodeList = ref([]) +GetClientFrtSelectList().then((res) => { + mblFrtCodeList.value = res.data +}) + export const columns: BasicColumn[] = [ { title: '模板名称', @@ -58,6 +79,96 @@ export const columns: BasicColumn[] = [ dataIndex: 'feeCategoryName', width: 200, }, + { + title: '起运港', + dataIndex: 'polCode', + width: 200, + }, + { + title: '卸货港', + dataIndex: 'podCode', + width: 200, + }, + { + dataIndex: 'laneId', + title: '航线', + sorter: true, + width: 200, + customRender: ({ record }) => { + let name = '' + laneIdList.value.some((item: any) => { + if (record.laneId == item.id) { + name = item.laneName + return true + } + }) + return name + }, + }, + { + dataIndex: 'sourceId', + title: '业务来源', + sorter: true, + width: 200, + customRender: ({ record }) => { + let name = '' + sourceIdList.value.some((item: any) => { + if (record.sourceId == item.id) { + name = item.sourceName + return true + } + }) + return name + }, + }, + { + dataIndex: 'carrierId', + title: '船公司', + sorter: true, + width: 200, + customRender: ({ record }) => { + let name = '' + carrierIdList.value.some((item: any) => { + if (record.carrierId == item.id) { + name = item.cnName + return true + } + }) + return name + }, + }, + { + dataIndex: 'forwarderId', + title: '订舱口', + sorter: true, + width: 200, + customRender: ({ record }) => { + let name = '' + forwarderIdList.value.some((item: any) => { + if (record.forwarderId == item.id) { + name = item.shortName + return true + } + }) + return name + }, + }, + { + dataIndex: 'mblFrtCode', + title: '付费方式', + sorter: true, + width: 200, + customRender: ({ record }) => { + let name = '' + mblFrtCodeList.value.some((item: any) => { + if (record.mblFrtCode == item.ediCode) { + name = item.frtName + return true + } + }) + return name + }, + }, { title: '是否停用', dataIndex: 'isDisabled', @@ -110,6 +221,45 @@ export const searchFormSchema: FormSchema[] = [ component: 'Input', colProps: { span: 4 }, }, + { + field: 'businessType', + label: '业务类型', + component: 'Select', + colProps: { span: 4 }, + componentProps: () => { + return { + options: businessType, + } + }, + }, + { + field: 'customerId', + label: '客户名称', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: ({ formModel }) => { + return { + api: GetClientListByCode, + labelField: 'pinYinCode', + valueField: 'id', + showName: 'shortName', + resultField: 'data', + immediate: false, + onChange: (e, obj) => { + if (e && obj) { + formModel.customerName = obj.label + formModel.customerId = obj.value + } + if (!e && !obj) { + formModel.customerName = '' + formModel.customerId = '' + } + }, + } + }, + }, { field: 'feeType', label: '费用类型', @@ -122,27 +272,207 @@ export const searchFormSchema: FormSchema[] = [ ], }, }, - { - field: 'startTime', - label: '开始时间', - component: 'DatePicker', - colProps: { span: 4 }, + field: 'feeCategoryId', + label: '费用类别', defaultValue: '', - componentProps: { - showTime: false, + component: 'ApiSelect', + colProps: { span: 4 }, + 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 = '' + } + }, + } }, }, { - field: 'endTime', - label: '结束时间', - component: 'DatePicker', + label: '起运港', + field: 'polCode', + component: 'ApiSelect', + dynamicDisabled: false, colProps: { span: 4 }, - defaultValue: '', + 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: 4 }, + 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: 4 }, + 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: 4 }, + componentProps: ({ formModel }) => { + return { + api: GetClientSourceSelectList, + labelField: 'sourceName', + valueField: 'id', + resultField: 'data', + } + }, + }, + { + label: '船公司', + field: 'carrierId', + labelSlot: 'carrierId', + component: 'ApiSelect', + colProps: { span: 4 }, + componentProps: ({ formModel }) => { + return { + api: GetCarrierSelectList, + labelField: 'pinYinCode', + showName: 'cnName', + valueField: 'id', + resultField: 'data', + } + }, + }, + { + label: '订舱口', + field: 'forwarderId', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + 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, + colProps: { span: 4 }, + 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: '是否停用', + component: 'Switch', componentProps: { - showTime: false, + checkedChildren: '启用', + checkedValue: false, + unCheckedChildren: '禁用', + unCheckedValue: true, + }, + colProps: { + span: 4, }, }, + // { + // field: 'startTime', + // label: '开始时间', + // component: 'DatePicker', + // colProps: { span: 4 }, + // defaultValue: '', + // componentProps: { + // showTime: false, + // }, + // }, + // { + // field: 'endTime', + // label: '结束时间', + // component: 'DatePicker', + // colProps: { span: 4 }, + // defaultValue: '', + // componentProps: { + // showTime: false, + // }, + // }, { field: 'isDisabled', label: '是否停用', @@ -161,6 +491,18 @@ export const searchFormSchema: FormSchema[] = [ component: 'InputNumber', colProps: { span: 4 }, }, + { + field: 'description', + label: '模板说明', + component: 'Input', + colProps: { span: 4 }, + }, + { + field: 'note', + label: '备注', + component: 'Input', + colProps: { span: 4 }, + }, ] export const formSchema: FormSchema[] = [ { @@ -204,42 +546,6 @@ export const formSchema: FormSchema[] = [ } }, }, - // { - // field: 'customerType', - // label: '客户类别', - // defaultValue: '', - // component: 'ApiSelect', - // colProps: { span: 5 }, - // componentProps: ({ formModel }) => { - // return { - // api: () => { - // return new Promise((resolve) => { - // getDictOption('djy_cust_prop').then((res) => { - // console.log(res, 111111111111111) - - // resolve(res) - // }) - // }) - // }, - // labelField: 'label', - // valueField: 'value', - // resultField: 'data', - // filterOption: (input: string, option: any) => { - // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - // }, - // onChange: (v: string, obj) => { - // GetClientListByCode({ code: v }).then((res) => { - // const { data } = res - // data.forEach((item) => { - // item['label'] = item.shortName - // item['value'] = item.codeName - // }) - // companyDict.value = data - // }) - // }, - // } - // }, - // }, { field: 'customerName', label: '客户名称', @@ -276,52 +582,6 @@ export const formSchema: FormSchema[] = [ } }, }, - // { - // field: 'customerType', - // label: '客户名称类别', - // defaultValue: '', - // component: 'ApiSelect', - // colProps: { span: 6 }, - // componentProps: ({ formModel }) => { - // return { - // api: () => { - // return new Promise((resolve) => { - // getDictOption('djy_cust_prop').then((res) => { - // resolve(res) - // }) - // }) - // }, - // labelField: 'label', - // valueField: 'value', - // resultField: 'data', - // filterOption: (input: string, option: any) => { - // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - // }, - // } - // }, - // dynamicRules: ({ values }) => { - // return [ - // { - // required: values.customerId ? false : true, - // message: '未选择客户名称时,此项必填!', - // }, - // ] - // }, - // }, - // { - // label: '', - // field: 'customerId', - // component: 'Input', - // defaultValue: '', - // show: false, - // }, - // { - // label: '', - // field: 'customerType', - // component: 'Input', - // defaultValue: '', - // show: false, - // }, { field: 'feeType', label: '费用类型', @@ -552,34 +812,6 @@ export const formSchema: FormSchema[] = [ component: 'InputNumber', colProps: { span: 6 }, }, - { - field: 'saleOrgId', - label: '分公司', - component: 'ApiSelect', - colProps: { span: 6 }, - componentProps: ({ formModel }) => { - return { - api: getOrgList, - labelField: 'label', - valueField: 'id', - resultField: 'data', - allowClear: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, - onChange: (e, obj) => { - if (e && obj) { - formModel.saleOrgName = obj.label - formModel.saleOrgId = obj.id - } - if (!e && !obj) { - formModel.saleOrgName = '' - formModel.saleOrgId = '' - } - }, - } - }, - }, { field: 'description', label: '模板说明',