From 0492c8fc797c7bf91f259f4d3e2b414b47893f15 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: Fri, 16 Aug 2024 16:25:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=88=B9=E5=85=AC=E5=8F=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/baseinfo/ReleaseType/columns.tsx | 32 +++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/views/baseinfo/ReleaseType/columns.tsx b/src/views/baseinfo/ReleaseType/columns.tsx index 2399bb3a..4372af4e 100644 --- a/src/views/baseinfo/ReleaseType/columns.tsx +++ b/src/views/baseinfo/ReleaseType/columns.tsx @@ -30,24 +30,30 @@ export const columns: BasicColumn[] = [ export const searchFormSchema: FormSchema[] = [ { - field: 'carrier', label: '承运商', + field: 'carrier', + labelSlot: 'carrierId', component: 'ApiSelect', - - colProps: { span: 4 }, - componentProps: () => { + required: false, + dynamicDisabled: false, + colProps: { span: 20 }, + componentProps: ({ formModel }) => { return { - allowClear: true, - showSearch: true, - api: GetClientListByCode, - params: { code: 'carrier' }, + api: GetCarrierSelectList, labelField: 'pinYinCode', - showName: 'pinYinCode', - valueField: 'codeName', + showName: 'cnName', + valueField: 'code', resultField: 'data', - immediate: true, - filterOption: (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + immediate: false, + onChange: (e, obj) => { + console.log(obj) + + if (e && obj) { + formModel.carrierId = obj.id + } + if (!e && !obj) { + formModel.carrierId = '' + } }, } },