From a21068472df814220a9f7d6799e12766fa78f983 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: Thu, 15 Aug 2024 10:53:58 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=BE=80=E6=9D=A5=E5=8D=95=E4=BD=8D=20?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=8F=82=E6=95=B0=E5=AD=97=E6=AE=B5=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../baseinfo/infoclient/customerParams/columns.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/views/baseinfo/infoclient/customerParams/columns.tsx b/src/views/baseinfo/infoclient/customerParams/columns.tsx index 9ab69259..96296397 100644 --- a/src/views/baseinfo/infoclient/customerParams/columns.tsx +++ b/src/views/baseinfo/infoclient/customerParams/columns.tsx @@ -20,13 +20,13 @@ export const columns: BasicColumn[] = [ // width: 150, // }, { - title: '客户参数类型', - dataIndex: 'paramType', + title: '客户参数类别', + dataIndex: 'paramName', width: 150, }, { title: '客户参数名称', - dataIndex: 'paramName', + dataIndex: 'itemName', width: 200, }, { @@ -38,7 +38,7 @@ export const columns: BasicColumn[] = [ export const searchFormSchema: FormSchema[] = [ { - field: 'paramName', + field: 'itemName', label: '客户参数名称', colProps: { span: 6 }, component: 'Input', @@ -70,11 +70,12 @@ export const formSchema: FormSchema[] = [ GetTenantParamDataSelectList({ code: e }).then((res) => { itemNameOption.value = res.data }) - if (obj) { + if (e && obj) { formModel.paramName = obj.label formModel.paramId = obj.id formModel.paramType = obj.type - } else { + } + if (!e && !obj) { formModel.paramName = '' formModel.paramId = '' formModel.paramType = '' From 191dd9e91f2fb60c885eee2e7074a396b0ebed2b 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: Thu, 15 Aug 2024 16:38:02 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=BE=80=E6=9D=A5=E5=8D=95=E4=BD=8D=20?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infoclient/TenantAuditStepModal.vue | 36 ++++++- src/views/baseinfo/infoclient/columns.tsx | 102 +++++++++++++++--- 2 files changed, 118 insertions(+), 20 deletions(-) diff --git a/src/views/baseinfo/infoclient/TenantAuditStepModal.vue b/src/views/baseinfo/infoclient/TenantAuditStepModal.vue index b0856e19..db8ab9e4 100644 --- a/src/views/baseinfo/infoclient/TenantAuditStepModal.vue +++ b/src/views/baseinfo/infoclient/TenantAuditStepModal.vue @@ -140,6 +140,7 @@ DeleteInvoiceHeader, cbDelete, } from './api' + import { GetClientSourceDetailSelectList } from '/@/views/operation/seaexport/api/BookingLedger' import ClientAccountDateModal from './ClientAccountDateModal.vue' import { useMessage } from '/@/hooks/web/useMessage' const { notification } = useMessage() @@ -179,11 +180,12 @@ console.log(nval, oval) } }) - const [registerForm1, { resetFields, getFieldsValue, setFieldsValue, validate }] = useForm({ - labelWidth: 100, - schemas: formSchema, - showActionButtonGroup: false, - }) + const [registerForm1, { resetFields, getFieldsValue, setFieldsValue, validate, updateSchema }] = + useForm({ + labelWidth: 100, + schemas: formSchema, + showActionButtonGroup: false, + }) const [ registerForm2, { @@ -333,6 +335,30 @@ await setFieldsValue({ ...res.data, }) + let Arr: any = [] + await GetClientSourceDetailSelectList({ id: res.data.sourceId }).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: 4 }, + componentProps: { + allowClear: true, + options: Arr, + showSearch: true, + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + }, + }) activeKey.value = '2' await setFieldsValue1({ ...res.data, diff --git a/src/views/baseinfo/infoclient/columns.tsx b/src/views/baseinfo/infoclient/columns.tsx index 1f2d6e70..d593d7b5 100644 --- a/src/views/baseinfo/infoclient/columns.tsx +++ b/src/views/baseinfo/infoclient/columns.tsx @@ -19,7 +19,10 @@ import { getDeptList, GetFeeCurrencySelectList, } from '/@/api/common' +import { GetClientSourceDetailSelectList } from '/@/views/operation/seaexport/api/BookingLedger' import { getOrgTree } from '/@/api/system/org' +import { useOptionsStore } from '/@/store/modules/options' +const optionsStore = useOptionsStore() let ClientFrtList = [] const res: API.DataResult = await getClientFrtSelectList() if (res.succeeded) { @@ -550,12 +553,12 @@ export const formSchema: FormSchema[] = [ { field: 'codeName', label: '助记码', - required: true, + // required: true, component: 'Input', defaultValue: '', - // dynamicDisabled: ({ values }) => { - // return values.id != '' - // }, + dynamicDisabled: ({ values }) => { + return true + }, colProps: { span: 4 }, }, { @@ -736,26 +739,95 @@ export const formSchema: FormSchema[] = [ }, }, { - field: 'divider-selects', + field: 'divider-selects2', component: 'Divider', label: '业务属性及干系人', colProps: { span: 24 }, }, + // { + // field: 'sourceId', + // label: '业务来源', + // component: 'Select', + // colProps: { span: 4 }, + // defaultValue: '', + // componentProps: { + // options: ClientSourceList, + // allowClear: true, + // showSearch: true, + // filterOption: (input: string, option: any) => { + // return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + // }, + // }, + // }, { - field: 'sourceId', label: '业务来源', - component: 'Select', + field: 'sourceId', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + // defaultValue: '', colProps: { span: 4 }, - defaultValue: '', - componentProps: { - options: ClientSourceList, - allowClear: true, - showSearch: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 - }, + componentProps: ({ formActionType, formModel }) => { + return { + allowClear: true, + showSearch: true, + option: optionsStore.getOptionsByCode('GetClientSourceSelectList'), + labelField: 'sourceName', + valueField: 'id', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: async (e, obj) => { + // if (e && obj) { + // formModel.sourceCode = obj.sourceCode + // } + // 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: 4 }, + 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', + required: false, + dynamicDisabled: ({ values }) => { + return !values.sourceId + }, + colProps: { span: 4 }, + }, { field: 'saleId', label: '揽货人', From e4659d3639e1de224244b74b6579fed384aa1e22 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: Thu, 15 Aug 2024 17:30:12 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E7=A7=9F=E7=AE=B1=E6=9C=88=E7=BB=93?= =?UTF-8?q?=E8=B4=A6=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustFeeDui/TenantAuditStepModal.vue | 83 ++++++++++++++----- .../CustFeeDui/columns.tsx | 78 ++++++++++------- 2 files changed, 109 insertions(+), 52 deletions(-) diff --git a/src/views/ContainerManagement/CustFeeDui/TenantAuditStepModal.vue b/src/views/ContainerManagement/CustFeeDui/TenantAuditStepModal.vue index 4875ff62..8ef4eb4d 100644 --- a/src/views/ContainerManagement/CustFeeDui/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/CustFeeDui/TenantAuditStepModal.vue @@ -43,7 +43,7 @@