From a74103f6f6fa9a12402a3a8f7e915ca12bf1f295 Mon Sep 17 00:00:00 2001 From: uiuJun <> Date: Sat, 13 Dec 2025 13:23:48 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .umirc.ts | 2 +- src/pages/asset/accounts/index.tsx | 2 +- .../dictionary/modals/BuildingsCreate.tsx | 2 +- .../asset/dictionary/modals/HousesCreate.tsx | 26 ++++--- .../asset/dictionary/modals/HousesUpdate.tsx | 22 ++++-- .../asset/dictionary/modals/UnitsCreate.tsx | 4 +- .../asset/dictionary/modals/UnitsUpdate.tsx | 2 +- src/pages/asset/grids/modals/GridMannger.tsx | 5 +- src/pages/asset/list/modals/AssetCreate.tsx | 28 +++++-- src/pages/asset/list/show/$id.tsx | 42 +++++----- src/pages/asset/list/table/AssetAccounts.tsx | 10 ++- src/pages/asset/list/table/AssetBuildings.tsx | 76 ++++++++++++++----- src/pages/asset/list/table/AssetGrid.tsx | 4 +- src/pages/common/positions/index.tsx | 12 ++- src/pages/common/positions/modals/Create.tsx | 12 +++ src/pages/common/positions/modals/Update.tsx | 12 +++ src/pages/company/accounts/index.tsx | 7 ++ .../accounts/modals/ReceiptAccountCreate.tsx | 36 ++++----- .../accounts/modals/ReceiptAccountUpdate.tsx | 59 ++++++++++---- src/pages/company/apps/index.tsx | 2 +- src/pages/company/apps/modals/AppCreate.tsx | 1 + .../company/brand/modals/BrandUpdate.tsx | 7 +- .../company/brand/modals/BrandsCreate.tsx | 3 +- .../company/list/modals/CompanyCreate.tsx | 25 +++++- .../company/list/modals/CompanyUpdate.tsx | 3 +- src/pages/company/list/show/$id.tsx | 23 +++--- src/pages/company/list/table/Apps.tsx | 7 -- src/pages/company/list/table/Assets.tsx | 9 ++- src/pages/company/list/table/Brands.tsx | 1 + src/pages/company/list/table/Employees.tsx | 12 ++- .../company/list/table/Organizations.tsx | 4 +- src/pages/company/list/table/Positions.tsx | 8 +- .../company/list/table/ReceiptAccounts.tsx | 30 +++++--- src/pages/company/organizations/index.tsx | 2 +- .../modals/NextOrganizationChange.tsx | 4 +- .../modals/OrganizationCreate.tsx | 5 +- src/pages/company/positions/index.tsx | 2 +- .../positions/modals/PositionCreate.tsx | 8 +- .../positions/modals/PositionUpdate.tsx | 8 +- 39 files changed, 344 insertions(+), 183 deletions(-) diff --git a/.umirc.ts b/.umirc.ts index 6fdf83b..dea4b51 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -18,7 +18,7 @@ export default defineConfig({ // target: 'http://10.39.13.78:8001/', target: 'https://test-admin.linyikj.com.cn/', // target: 'https://admin.linyikj.com.cn/', - // target: 'http://c789629c.natappfree.cc', + // target: 'http://k369a3d6.natappfree.cc/', changeOrigin: true, pathRewrite: { '^': '' }, diff --git a/src/pages/asset/accounts/index.tsx b/src/pages/asset/accounts/index.tsx index d47ac23..ef8e933 100644 --- a/src/pages/asset/accounts/index.tsx +++ b/src/pages/asset/accounts/index.tsx @@ -51,7 +51,7 @@ export default function Index({ title = '项目账户' }) { dataIndex: ['project', 'name'], }, { - title: '收款名称', + title: '收款户名', dataIndex: ['receipt_account', 'company_name'], }, { diff --git a/src/pages/asset/dictionary/modals/BuildingsCreate.tsx b/src/pages/asset/dictionary/modals/BuildingsCreate.tsx index a45dc6e..1cac73f 100644 --- a/src/pages/asset/dictionary/modals/BuildingsCreate.tsx +++ b/src/pages/asset/dictionary/modals/BuildingsCreate.tsx @@ -21,7 +21,7 @@ export default function Create(props: MyBetaModalFormProps) { trigger={ } onOpenChange={(open: any) => { diff --git a/src/pages/asset/dictionary/modals/HousesCreate.tsx b/src/pages/asset/dictionary/modals/HousesCreate.tsx index 9e0f3fe..8f39de5 100644 --- a/src/pages/asset/dictionary/modals/HousesCreate.tsx +++ b/src/pages/asset/dictionary/modals/HousesCreate.tsx @@ -26,7 +26,7 @@ export default function Create(props: MyBetaModalFormProps) { trigger={ } form={form} @@ -57,20 +57,19 @@ export default function Create(props: MyBetaModalFormProps) { colProps: { span: 6 }, formItemProps: { ...rulesHelper.text }, }, - MyFormItems.EnumRadio({ - key: 'ownership_type', - title: '房屋属性', - colProps: { span: 24 }, - valueEnum: AssetHousesOwnershipTypeEnum, - // required: true, - }), MyFormItems.EnumRadio({ key: 'usage', title: '用途', - colProps: { span: 24 }, - valueEnum: AssetHousesUsageEnum, + colProps: { span: 18 }, + // valueEnum: AssetHousesUsageEnum, + valueEnum: () => { + let obj: any = JSON.parse(JSON.stringify(AssetHousesUsageEnum)); + delete obj.ParkingSpace; + return obj; + }, required: true, }), + { key: 'floor', title: '楼层', @@ -115,6 +114,13 @@ export default function Create(props: MyBetaModalFormProps) { colProps: { span: 6 }, formItemProps: { ...rulesHelper.number }, }, + MyFormItems.EnumRadio({ + key: 'ownership_type', + title: '房屋属性', + colProps: { span: 24 }, + valueEnum: AssetHousesOwnershipTypeEnum, + // required: true, + }), { valueType: 'group', columns: [ diff --git a/src/pages/asset/dictionary/modals/HousesUpdate.tsx b/src/pages/asset/dictionary/modals/HousesUpdate.tsx index 950e9c8..b5fa358 100644 --- a/src/pages/asset/dictionary/modals/HousesUpdate.tsx +++ b/src/pages/asset/dictionary/modals/HousesUpdate.tsx @@ -97,20 +97,19 @@ export default function Update(props: MyBetaModalFormProps) { ]; }, }, - MyFormItems.EnumRadio({ - key: 'ownership_type', - title: '房屋属性', - colProps: { span: 24 }, - valueEnum: AssetHousesOwnershipTypeEnum, - // required: true, - }), MyFormItems.EnumRadio({ key: 'usage', title: '用途', colProps: { span: 24 }, - valueEnum: AssetHousesUsageEnum, + // valueEnum: AssetHousesUsageEnum, + valueEnum: () => { + let obj: any = JSON.parse(JSON.stringify(AssetHousesUsageEnum)); + delete obj.ParkingSpace; + return obj; + }, required: true, }), + { key: 'floor', title: '楼层', @@ -155,6 +154,13 @@ export default function Update(props: MyBetaModalFormProps) { colProps: { span: 6 }, formItemProps: { ...rulesHelper.number }, }, + MyFormItems.EnumRadio({ + key: 'ownership_type', + title: '房屋属性', + colProps: { span: 24 }, + valueEnum: AssetHousesOwnershipTypeEnum, + // required: true, + }), { valueType: 'group', columns: [ diff --git a/src/pages/asset/dictionary/modals/UnitsCreate.tsx b/src/pages/asset/dictionary/modals/UnitsCreate.tsx index 9cf4fb5..6932e2f 100644 --- a/src/pages/asset/dictionary/modals/UnitsCreate.tsx +++ b/src/pages/asset/dictionary/modals/UnitsCreate.tsx @@ -24,7 +24,7 @@ export default function Create(props: MyBetaModalFormProps) { trigger={ } form={form} @@ -80,7 +80,7 @@ export default function Create(props: MyBetaModalFormProps) { }, { key: 'units_per_building', - title: '单元户数', + title: '单元总户数', colProps: { span: 6 }, }, { diff --git a/src/pages/asset/dictionary/modals/UnitsUpdate.tsx b/src/pages/asset/dictionary/modals/UnitsUpdate.tsx index e37206f..9fe081e 100644 --- a/src/pages/asset/dictionary/modals/UnitsUpdate.tsx +++ b/src/pages/asset/dictionary/modals/UnitsUpdate.tsx @@ -85,7 +85,7 @@ export default function Update(props: MyBetaModalFormProps) { }, { key: 'units_per_building', - title: '单元户数', + title: '单元总户数', colProps: { span: 6 }, }, { diff --git a/src/pages/asset/grids/modals/GridMannger.tsx b/src/pages/asset/grids/modals/GridMannger.tsx index b498148..0d75faf 100644 --- a/src/pages/asset/grids/modals/GridMannger.tsx +++ b/src/pages/asset/grids/modals/GridMannger.tsx @@ -21,7 +21,7 @@ export default function Create( width="500px" form={form} key={new Date().getTime()} - trigger={} + trigger={} request={() => Promise.resolve(props.item)} onOpenChange={(open: any) => { if (open && props.item) { @@ -52,6 +52,9 @@ export default function Create( title: '设置楼栋管家', dataIndex: 'company_employees_id', colProps: { span: 24 }, + params: { + companies_id: props?.item?.companies_id || 0, + }, formItemProps: { ...rulesHelper.text }, required: true, }), diff --git a/src/pages/asset/list/modals/AssetCreate.tsx b/src/pages/asset/list/modals/AssetCreate.tsx index 9da77dc..b213f4e 100644 --- a/src/pages/asset/list/modals/AssetCreate.tsx +++ b/src/pages/asset/list/modals/AssetCreate.tsx @@ -62,12 +62,28 @@ export default function Create(props: MyBetaModalFormProps) { title: '项目别名', colProps: { span: 12 }, }, - Selects?.Companies({ - key: 'companies_id', - title: '所属机构', - colProps: { span: 12 }, - formItemProps: { ...rulesHelper.number }, - }), + + ...(props?.item?.id + ? [ + Selects?.Companies({ + key: 'companies_id', + title: '所属机构', + colProps: { span: 12 }, + formItemProps: { ...rulesHelper.number }, + fieldProps: { + disabled: true, + }, + }), + ] + : [ + Selects?.Companies({ + key: 'companies_id', + title: '所属机构', + colProps: { span: 12 }, + formItemProps: { ...rulesHelper.number }, + }), + ]), + { valueType: 'dependency', name: ['companies_id'], diff --git a/src/pages/asset/list/show/$id.tsx b/src/pages/asset/list/show/$id.tsx index 34de39f..9322dda 100644 --- a/src/pages/asset/list/show/$id.tsx +++ b/src/pages/asset/list/show/$id.tsx @@ -51,47 +51,47 @@ export default function Show({ title }: { title?: string } = {}) { // children: loadShow()} />, // }, { - label: '楼栋管理', + label: '1-楼栋房屋配置', key: 'asset_buildings', closable: false, children: , }, { - label: '楼栋划分', + label: '2-楼栋单元划分', key: 'grid', closable: false, children: , }, { - label: '收费标准', - key: 'charge_standard', - closable: false, - children: , - }, - { - label: '收款账号', + label: '3-收款账号配置', key: 'asset_accounts', closable: false, children: , }, { - label: '项目公告', + label: '4-收费标准配置', + key: 'charge_standard', + closable: false, + children: , + }, + { + label: '5-便民服务', + key: 'convenience_services', + closable: false, + children: , + }, + { + label: '5-项目公告', key: 'announcement', closable: false, children: , }, { - label: '项目活动', + label: '5-项目活动', key: 'activities', closable: false, children: , }, - { - label: '便民服务', - key: 'convenience_services', - closable: false, - children: , - }, ]; return ( @@ -111,7 +111,13 @@ export default function Show({ title }: { title?: string } = {}) { } > -
* 您可在以下页签中对应管理:楼栋管理、楼栋划分、收款账号;
+
请按以下顺序配置:
+
+ + 楼栋房屋配置 ➡️ 楼栋单元划分 ➡️ 收款账号配置 ➡️ 收费标准配置 ➡️ + 便民服务 ➡️ 项目公告 ➡️ 项目活动; + +
diff --git a/src/pages/asset/list/table/AssetAccounts.tsx b/src/pages/asset/list/table/AssetAccounts.tsx index 8e3acf4..26ad261 100644 --- a/src/pages/asset/list/table/AssetAccounts.tsx +++ b/src/pages/asset/list/table/AssetAccounts.tsx @@ -31,7 +31,7 @@ export default function ReceiptAccounts(props: MyBetaModalFormProps) { key="Select" reload={action?.reload} item={props?.item} - title="添加收款账号" + title="配置" />, ]} // options={false} @@ -42,7 +42,7 @@ export default function ReceiptAccounts(props: MyBetaModalFormProps) { // width: 360, }, { - title: '收款账号名称', + title: '收款账户', dataIndex: ['receipt_account', 'company_name'], // width: 360, }, @@ -58,6 +58,12 @@ export default function ReceiptAccounts(props: MyBetaModalFormProps) { search: false, // width: 200, }, + { + title: '通联商户号', + dataIndex: ['receipt_account', 'companymerchant_id_account'], + search: false, + // width: 200, + }, // { // title: '是否默认', // dataIndex: 'is_default', diff --git a/src/pages/asset/list/table/AssetBuildings.tsx b/src/pages/asset/list/table/AssetBuildings.tsx index b0e31c2..2bd3198 100644 --- a/src/pages/asset/list/table/AssetBuildings.tsx +++ b/src/pages/asset/list/table/AssetBuildings.tsx @@ -73,7 +73,7 @@ export default function AssetBuildings(props: MyBetaModalFormProps) { 楼栋信息 - - actionBuildingsRef?.current?.reload()} - title="楼栋" - /> + + + actionBuildingsRef?.current?.reload()} + title="楼栋" + /> + ( + @@ -158,6 +166,16 @@ export default function AssetBuildings(props: MyBetaModalFormProps) { ) } /> + actionUnitsRef?.current?.reload()} + title="单元" + // title={`添加${selectedBuilding.name}单元`} + /> ), }), @@ -173,7 +191,7 @@ export default function AssetBuildings(props: MyBetaModalFormProps) { style={{ display: 'flex', justifyContent: 'space-between' }} > {selectedBuilding.name} - {selectedBuilding && ( + {/* {selectedBuilding && ( - )} + )} */} ( @@ -245,6 +268,17 @@ export default function AssetBuildings(props: MyBetaModalFormProps) { ) } /> + actionHousesRef?.current?.reload()} + title="房屋" + // title={`${selectedUnit.name}房屋`} + /> ), }), @@ -261,7 +295,7 @@ export default function AssetBuildings(props: MyBetaModalFormProps) { style={{ display: 'flex', justifyContent: 'space-between' }} > {selectedUnit.name} - {selectedUnit && ( + {/* {selectedUnit && ( - )} + )} */} , ]} search={false} @@ -48,7 +48,7 @@ export default function Index({ ...rest }) { dataIndex: 'grid_mark', }, { - title: '管理员', + title: '楼栋管家', dataIndex: ['company_employee', 'name'], render: (_, item: any) => `${item?.company_employee?.name || ''}-${ diff --git a/src/pages/common/positions/index.tsx b/src/pages/common/positions/index.tsx index 5ea94a6..0f875bd 100644 --- a/src/pages/common/positions/index.tsx +++ b/src/pages/common/positions/index.tsx @@ -41,7 +41,17 @@ export default function Index({ title = '岗位库' }) { { title: '岗位名称', dataIndex: 'name', - width: 300, + width: 200, + }, + { + title: '岗位编号', + dataIndex: 'code', + width: 200, + }, + { + title: '岗位说明', + dataIndex: 'remark', + search: false, }, { title: '是否启用', diff --git a/src/pages/common/positions/modals/Create.tsx b/src/pages/common/positions/modals/Create.tsx index 76047e7..e752766 100644 --- a/src/pages/common/positions/modals/Create.tsx +++ b/src/pages/common/positions/modals/Create.tsx @@ -45,6 +45,18 @@ export default function Create(props: MyBetaModalFormProps) { colProps: { span: 24 }, formItemProps: { ...rulesHelper.text }, }, + { + key: 'code', + title: '岗位编号', + colProps: { span: 24 }, + formItemProps: { ...rulesHelper.text }, + }, + { + key: 'remark', + title: '岗位说明', + colProps: { span: 24 }, + valueType: 'textarea', + }, ]} /> ); diff --git a/src/pages/common/positions/modals/Update.tsx b/src/pages/common/positions/modals/Update.tsx index afa4974..0477744 100644 --- a/src/pages/common/positions/modals/Update.tsx +++ b/src/pages/common/positions/modals/Update.tsx @@ -46,6 +46,18 @@ export default function Update(props: MyBetaModalFormProps) { colProps: { span: 24 }, formItemProps: { ...rulesHelper.text }, }, + { + key: 'code', + title: '岗位编号', + colProps: { span: 24 }, + formItemProps: { ...rulesHelper.text }, + }, + { + key: 'remark', + title: '岗位说明', + colProps: { span: 24 }, + valueType: 'textarea', + }, { key: 'is_use', title: '是否启用', diff --git a/src/pages/company/accounts/index.tsx b/src/pages/company/accounts/index.tsx index a4318af..17698a1 100644 --- a/src/pages/company/accounts/index.tsx +++ b/src/pages/company/accounts/index.tsx @@ -37,6 +37,7 @@ export default function Index({ title = '账号管理' }) { Apis.Company.CompanyReceiptAccounts.List, ) } + // headerTitle="项目可用收款账号,从本页面已添加的收款账号中选择" toolBarRender={(action) => [ ( diff --git a/src/pages/company/accounts/modals/ReceiptAccountCreate.tsx b/src/pages/company/accounts/modals/ReceiptAccountCreate.tsx index ff27ef2..c9f8072 100644 --- a/src/pages/company/accounts/modals/ReceiptAccountCreate.tsx +++ b/src/pages/company/accounts/modals/ReceiptAccountCreate.tsx @@ -1,13 +1,11 @@ import { MyBetaModalFormProps, MyButtons, - MyFormItems, MyModalFormProps, rulesHelper, } from '@/common'; import { Selects } from '@/components/Select'; import { Apis } from '@/gen/Apis'; -import { CompanyReceiptAccountsPayChannelEnum } from '@/gen/Enums'; import { BetaSchemaForm } from '@ant-design/pro-components'; import { Form, message } from 'antd'; @@ -22,6 +20,7 @@ export default function Create(props: MyBetaModalFormProps) { width="500px" trigger={} form={form} + key={new Date().getTime()} onOpenChange={(open: any) => { if (open) { form.resetFields(); // 清空表单数据 @@ -31,7 +30,7 @@ export default function Create(props: MyBetaModalFormProps) { Apis.Company.CompanyReceiptAccounts.Store({ ...values, companies_id: values?.companies_id || props?.item?.id, - + pay_channel: values?.merchant_id ? 'TongLian' : 'BankTransfer', is_default: 0, }) .then(() => { @@ -70,36 +69,31 @@ export default function Create(props: MyBetaModalFormProps) { colProps: { span: 24 }, formItemProps: { ...rulesHelper.text }, }, - MyFormItems.EnumRadio({ - key: 'pay_channel', - title: '收款渠道', - colProps: { span: 24 }, - valueEnum: CompanyReceiptAccountsPayChannelEnum, - required: true, - }), { - name: ['pay_channel'], + key: 'boolean', + title: '是否开通【通联支付】', + valueType: 'switch', + colProps: { span: 24 }, + }, + { + name: ['boolean'], valueType: 'dependency', - columns: ({ pay_channel }: any) => { - return pay_channel === - CompanyReceiptAccountsPayChannelEnum.TongLian.value + columns: ({ boolean }: any) => { + return boolean ? [ { key: 'merchant_id', - title: '商户ID', + title: '通联商户号', colProps: { span: 24 }, + fieldProps: { + placeholder: '如已开通,必须输入通联商户号', + }, formItemProps: { ...rulesHelper.text }, }, ] : []; }, }, - // { - // key: 'is_default', - // title: '是否设为默认账号', - // valueType: 'switch', - // colProps: { span: 24 }, - // }, ]} /> ); diff --git a/src/pages/company/accounts/modals/ReceiptAccountUpdate.tsx b/src/pages/company/accounts/modals/ReceiptAccountUpdate.tsx index 8ea1609..1235f0b 100644 --- a/src/pages/company/accounts/modals/ReceiptAccountUpdate.tsx +++ b/src/pages/company/accounts/modals/ReceiptAccountUpdate.tsx @@ -1,12 +1,10 @@ import { MyBetaModalFormProps, MyButtons, - MyFormItems, MyModalFormProps, rulesHelper, } from '@/common'; import { Apis } from '@/gen/Apis'; -import { CompanyReceiptAccountsPayChannelEnum } from '@/gen/Enums'; import { BetaSchemaForm } from '@ant-design/pro-components'; import { Form, message } from 'antd'; export default function Update(props: MyBetaModalFormProps) { @@ -23,14 +21,17 @@ export default function Update(props: MyBetaModalFormProps) { onOpenChange={(open: any) => { if (open && props.item) { form.setFieldsValue(props.item); + form.setFieldValue('boolean', props.item?.pay_channel === 'TongLian'); } }} - onFinish={async (values) => + onFinish={async (values: any) => Apis.Company.CompanyReceiptAccounts.Update({ ...values, companies_id: props?.item?.companies_id, id: props.item?.id ?? 0, is_default: 0, + pay_channel: values?.merchant_id ? 'TongLian' : 'BankTransfer', + merchant_id: values?.boolean ? values?.merchant_id : '', }) .then(() => { props.reload?.(); @@ -58,30 +59,58 @@ export default function Update(props: MyBetaModalFormProps) { colProps: { span: 24 }, formItemProps: { ...rulesHelper.text }, }, - MyFormItems.EnumRadio({ - key: 'pay_channel', - title: '收款渠道', - colProps: { span: 24 }, - valueEnum: CompanyReceiptAccountsPayChannelEnum, - required: true, - }), { - name: ['pay_channel'], + key: 'boolean', + title: '是否开通【通联支付】', + valueType: 'switch', + colProps: { span: 24 }, + onChange: () => { + form.setFieldValue('merchant_id', undefined); + }, + }, + { + name: ['boolean'], valueType: 'dependency', - columns: ({ pay_channel }: any) => { - return pay_channel === - CompanyReceiptAccountsPayChannelEnum.TongLian.value + columns: ({ boolean }: any) => { + return boolean ? [ { key: 'merchant_id', - title: '商户ID', + title: '通联商户号', colProps: { span: 24 }, + fieldProps: { + placeholder: '如已开通,必须输入通联商户号', + }, formItemProps: { ...rulesHelper.text }, }, ] : []; }, }, + // MyFormItems.EnumRadio({ + // key: 'pay_channel', + // title: '收款渠道', + // colProps: { span: 24 }, + // valueEnum: CompanyReceiptAccountsPayChannelEnum, + // required: true, + // }), + // { + // name: ['pay_channel'], + // valueType: 'dependency', + // columns: ({ pay_channel }: any) => { + // return pay_channel === + // CompanyReceiptAccountsPayChannelEnum.TongLian.value + // ? [ + // { + // key: 'merchant_id', + // title: '商户ID', + // colProps: { span: 24 }, + // formItemProps: { ...rulesHelper.text }, + // }, + // ] + // : []; + // }, + // }, // { // key: 'is_default', // title: '是否设为默认账号', diff --git a/src/pages/company/apps/index.tsx b/src/pages/company/apps/index.tsx index e6d4814..d68d05a 100644 --- a/src/pages/company/apps/index.tsx +++ b/src/pages/company/apps/index.tsx @@ -65,7 +65,7 @@ export default function Index({ title = '应用管理' }) { // dataIndex: 'app_secret', // search: false, // ellipsis: true, - // render: (text) => '***' + String(text).slice(-4), + // // render: (text) => '****' + String(text).slice(-4), // }, MyColumns.UpdatedAt(), diff --git a/src/pages/company/apps/modals/AppCreate.tsx b/src/pages/company/apps/modals/AppCreate.tsx index c6206e7..fb5cf2f 100644 --- a/src/pages/company/apps/modals/AppCreate.tsx +++ b/src/pages/company/apps/modals/AppCreate.tsx @@ -20,6 +20,7 @@ export default function Create(props: MyBetaModalFormProps) { title={`添加应用配置`} wrapperCol={{ span: 24 }} width="500px" + key={new Date().getTime()} trigger={} form={form} onOpenChange={(open: any) => { diff --git a/src/pages/company/brand/modals/BrandUpdate.tsx b/src/pages/company/brand/modals/BrandUpdate.tsx index 8d77ecf..b09d4a1 100644 --- a/src/pages/company/brand/modals/BrandUpdate.tsx +++ b/src/pages/company/brand/modals/BrandUpdate.tsx @@ -47,14 +47,11 @@ export default function Update(props: MyBetaModalFormProps) { }, MyFormItems.UploadImages({ key: 'logo', - title: '品牌logo【尺寸:1024*1024】', + title: '品牌logo【 尺寸比例 1:1 】', tooltip: '只能上传1张图片', max: 1, colProps: { span: 24 }, - formItemProps: { required: false }, - fieldProps: { - placeholder: '', - }, + formItemProps: { required: true }, }), ]} /> diff --git a/src/pages/company/brand/modals/BrandsCreate.tsx b/src/pages/company/brand/modals/BrandsCreate.tsx index cd15fe3..7fd04c9 100644 --- a/src/pages/company/brand/modals/BrandsCreate.tsx +++ b/src/pages/company/brand/modals/BrandsCreate.tsx @@ -21,6 +21,7 @@ export default function Create(props: MyBetaModalFormProps) { width="360px" trigger={} form={form} + key={new Date().getTime()} onOpenChange={(open: any) => { if (open) { form.resetFields(); // 清空表单数据 @@ -61,7 +62,7 @@ export default function Create(props: MyBetaModalFormProps) { tooltip: '只能上传1张图片', max: 1, colProps: { span: 24 }, - formItemProps: { required: false }, + formItemProps: { required: true }, }), ]} /> diff --git a/src/pages/company/list/modals/CompanyCreate.tsx b/src/pages/company/list/modals/CompanyCreate.tsx index 79e0aec..6622c54 100644 --- a/src/pages/company/list/modals/CompanyCreate.tsx +++ b/src/pages/company/list/modals/CompanyCreate.tsx @@ -8,10 +8,12 @@ import { import { Address } from '@/components/Address'; import { Apis } from '@/gen/Apis'; import { BetaSchemaForm } from '@ant-design/pro-components'; -import { Form, message } from 'antd'; +import { Form, message, Modal } from 'antd'; +import { useNavigate } from 'umi'; export default function Create(props: MyBetaModalFormProps) { const [form] = Form.useForm(); + const navigate = useNavigate(); return ( @@ -20,6 +22,7 @@ export default function Create(props: MyBetaModalFormProps) { wrapperCol={{ span: 24 }} width="600px" trigger={} + key={new Date().getTime()} form={form} onOpenChange={(open: any) => { if (open) { @@ -31,9 +34,23 @@ export default function Create(props: MyBetaModalFormProps) { ...values, merchant_type: 'PropertyManagement', }) - .then(() => { + .then((response) => { + const companyId = response?.data?.id; props.reload?.(); message.success(props.title + '成功'); + + // 询问用户是否立即配置 + Modal.confirm({ + title: '配置提示', + content: '是否立即配置该机构?', + okText: '是', + cancelText: '否', + onOk: () => { + // 跳转到配置页面 + navigate(`/company/list/show/${companyId}`); + }, + }); + return true; }) .catch(() => false) @@ -55,7 +72,7 @@ export default function Create(props: MyBetaModalFormProps) { key: 'business_license_number', title: '营业执照号', colProps: { span: 24 }, - tooltip: '限制20位', + tooltip: '限制18位', formItemProps: { ...rulesHelper.text }, fieldProps: { maxLength: 18, @@ -98,7 +115,7 @@ export default function Create(props: MyBetaModalFormProps) { }, Address.Cascader({ key: 'casacader', - title: '联系地址', + title: '所在地区', colProps: { span: 14 }, keys: ['province', 'city', 'area', 'street'], required: true, diff --git a/src/pages/company/list/modals/CompanyUpdate.tsx b/src/pages/company/list/modals/CompanyUpdate.tsx index 9c65a6d..a757ad9 100644 --- a/src/pages/company/list/modals/CompanyUpdate.tsx +++ b/src/pages/company/list/modals/CompanyUpdate.tsx @@ -59,6 +59,7 @@ export default function Update(props: MyBetaModalFormProps) { { key: 'business_license_number', title: '营业执照号', + tooltip: '限制18位', colProps: { span: 24 }, formItemProps: { ...rulesHelper.text }, fieldProps: { @@ -101,7 +102,7 @@ export default function Update(props: MyBetaModalFormProps) { }, Address.Cascader({ key: 'casacader', - title: '联系地址', + title: '所在地区', colProps: { span: 14 }, keys: ['province', 'city', 'area', 'street'], required: true, diff --git a/src/pages/company/list/show/$id.tsx b/src/pages/company/list/show/$id.tsx index 281dd8b..46b0128 100644 --- a/src/pages/company/list/show/$id.tsx +++ b/src/pages/company/list/show/$id.tsx @@ -44,10 +44,10 @@ export default function Show({ title }: { title?: string } = {}) { let items = [ { - label: '1-项目配置', + label: '1-应用配置', key: '1', closable: false, - children: , + children: , }, { @@ -63,28 +63,29 @@ export default function Show({ title }: { title?: string } = {}) { children: , }, { - label: '4-员工配置', + label: '4-员工管理', key: '4', closable: false, children: , }, { - label: '5-账号配置', + label: '5-收款账号添加', key: '5', closable: false, children: , }, + { - label: '6-应用配置', + label: '6-品牌配置', key: '6', closable: false, - children: , + children: , }, { - label: '7-品牌配置', + label: '7-项目配置', key: '7', closable: false, - children: , + children: , }, ]; return ( @@ -103,8 +104,12 @@ export default function Show({ title }: { title?: string } = {}) { } > +
请按以下顺序配置:
- * 您可在以下页签中对应配置:项目、组织、岗位、员工、账号、应用、品牌; + + 应用配置 ➡️ 组织配置 ➡️ 岗位配置 ➡️ 员工配置 ➡️ 账号配置 ➡️ 品牌配置 + ➡️ 项目配置; +
diff --git a/src/pages/company/list/table/Apps.tsx b/src/pages/company/list/table/Apps.tsx index e4b474a..9271056 100644 --- a/src/pages/company/list/table/Apps.tsx +++ b/src/pages/company/list/table/Apps.tsx @@ -56,13 +56,6 @@ export default function CompanyApps(props: MyBetaModalFormProps) { search: false, ellipsis: true, }, - { - title: '应用密钥', - dataIndex: 'app_secret', - search: false, - ellipsis: true, - render: (text) => '***' + String(text).slice(-4), - }, MyColumns.UpdatedAt(), // MyColumns.CreatedAt(), diff --git a/src/pages/company/list/table/Assets.tsx b/src/pages/company/list/table/Assets.tsx index 8123f56..cfaf8ee 100644 --- a/src/pages/company/list/table/Assets.tsx +++ b/src/pages/company/list/table/Assets.tsx @@ -56,6 +56,13 @@ export default function Index(props: MyBetaModalFormProps) { valueEnum: AssetProjectsStatusEnum, search: false, }), + { + title: '所在城市', + render: (_, i: any) => { + return `${i?.province || ''}${i?.city || ''}`; + }, + search: false, + }, { title: '地址', render: (_, i: any) => { @@ -75,7 +82,7 @@ export default function Index(props: MyBetaModalFormProps) { render: (_, item: any, index, action) => ( { navigate(`/asset/list/show/${item.id}`); }} diff --git a/src/pages/company/list/table/Brands.tsx b/src/pages/company/list/table/Brands.tsx index 08a4431..42aa477 100644 --- a/src/pages/company/list/table/Brands.tsx +++ b/src/pages/company/list/table/Brands.tsx @@ -54,6 +54,7 @@ export default function PropertyBrands(props: MyBetaModalFormProps) { ); }, }, + MyColumns.UpdatedAt(), MyColumns.Option({ render: (_, item: any, index, action) => ( diff --git a/src/pages/company/list/table/Employees.tsx b/src/pages/company/list/table/Employees.tsx index 071552e..72f0de0 100644 --- a/src/pages/company/list/table/Employees.tsx +++ b/src/pages/company/list/table/Employees.tsx @@ -2,6 +2,7 @@ import { MyBetaModalFormProps, MyButtons, MyColumns, + MyImportModal, MyProTableProps, } from '@/common'; import { Apis } from '@/gen/Apis'; @@ -23,6 +24,15 @@ export default function Index(props: MyBetaModalFormProps) { ) } toolBarRender={(action) => [ + , , ]} - // search={false} + search={false} // options={false} columns={[ { @@ -46,7 +46,7 @@ export default function Organizations(props: MyBetaModalFormProps) { search: false, }, MyColumns.EnumTag({ - title: '组织类型', + title: '类型', dataIndex: 'type', valueEnum: OrganizationsTypeEnum, search: false, diff --git a/src/pages/company/list/table/Positions.tsx b/src/pages/company/list/table/Positions.tsx index c7b629b..85cb900 100644 --- a/src/pages/company/list/table/Positions.tsx +++ b/src/pages/company/list/table/Positions.tsx @@ -53,16 +53,10 @@ export default function Organizations(props: MyBetaModalFormProps) { search: false, width: 200, }, - // { - // title: '岗位排序', - // dataIndex: 'sort', - // search: false, - // }, { - title: '岗位备注', + title: '岗位说明', dataIndex: 'remark', search: false, - width: 200, }, MyColumns.UpdatedAt(), // MyColumns.CreatedAt(), diff --git a/src/pages/company/list/table/ReceiptAccounts.tsx b/src/pages/company/list/table/ReceiptAccounts.tsx index b49a436..ddbe2be 100644 --- a/src/pages/company/list/table/ReceiptAccounts.tsx +++ b/src/pages/company/list/table/ReceiptAccounts.tsx @@ -5,14 +5,23 @@ import { MyProTableProps, } from '@/common'; import { Apis } from '@/gen/Apis'; -import { ProTable } from '@ant-design/pro-components'; -import { Space } from 'antd'; +import { ProCard, ProTable } from '@ant-design/pro-components'; +import { Alert, Space } from 'antd'; import ReceiptAccountCreate from '../../accounts/modals/ReceiptAccountCreate'; import ReceiptAccountUpdate from '../../accounts/modals/ReceiptAccountUpdate'; export default function ReceiptAccounts(props: MyBetaModalFormProps) { return ( - <> + + } + > - + ); } diff --git a/src/pages/company/organizations/index.tsx b/src/pages/company/organizations/index.tsx index 06acbf8..8de3ed4 100644 --- a/src/pages/company/organizations/index.tsx +++ b/src/pages/company/organizations/index.tsx @@ -63,7 +63,7 @@ export default function Index({ title = '组织列表' }) { dataIndex: 'name', }, MyColumns.EnumTag({ - title: '组织类型', + title: '类型', dataIndex: 'type', valueEnum: OrganizationsTypeEnum, search: false, diff --git a/src/pages/company/organizations/modals/NextOrganizationChange.tsx b/src/pages/company/organizations/modals/NextOrganizationChange.tsx index 41ce715..dadfd55 100644 --- a/src/pages/company/organizations/modals/NextOrganizationChange.tsx +++ b/src/pages/company/organizations/modals/NextOrganizationChange.tsx @@ -20,7 +20,7 @@ export default function Create(props: MyBetaModalFormProps) { title={`添加${props.title}`} wrapperCol={{ span: 24 }} width="500px" - trigger={} + trigger={} key={new Date().getTime()} form={form} onOpenChange={(open: any) => { @@ -54,7 +54,7 @@ export default function Create(props: MyBetaModalFormProps) { ]), MyFormItems.EnumRadio({ key: 'type', - title: '组织类型', + title: '类型', colProps: { span: 24 }, valueEnum: OrganizationsTypeEnum, required: true, diff --git a/src/pages/company/organizations/modals/OrganizationCreate.tsx b/src/pages/company/organizations/modals/OrganizationCreate.tsx index aba85ff..2bd45c5 100644 --- a/src/pages/company/organizations/modals/OrganizationCreate.tsx +++ b/src/pages/company/organizations/modals/OrganizationCreate.tsx @@ -54,7 +54,7 @@ export default function Create(props: MyBetaModalFormProps) { ]), MyFormItems.EnumRadio({ key: 'type', - title: '组织类型', + title: '类型', colProps: { span: 24 }, valueEnum: OrganizationsTypeEnum, required: true, @@ -72,14 +72,13 @@ export default function Create(props: MyBetaModalFormProps) { return type !== OrganizationsTypeEnum.Group.value ? [ Selects?.OrganizationsTree({ - title: '请设置上级组织', + title: '设置上级组织(可选)', key: 'parent_id', params: { companies_id: props?.item?.id }, colProps: { span: 24 }, fieldProps: { placeholder: '可搜索或手动选择上级组织', }, - formItemProps: { ...rulesHelper.text }, }), ] : []; diff --git a/src/pages/company/positions/index.tsx b/src/pages/company/positions/index.tsx index 6eb1809..9e28ad6 100644 --- a/src/pages/company/positions/index.tsx +++ b/src/pages/company/positions/index.tsx @@ -64,7 +64,7 @@ export default function Index({ title = '岗位管理' }) { // search: false, // }, { - title: '岗位备注', + title: '岗位说明', dataIndex: 'remark', search: false, width: 200, diff --git a/src/pages/company/positions/modals/PositionCreate.tsx b/src/pages/company/positions/modals/PositionCreate.tsx index 7e500e2..f53c9d0 100644 --- a/src/pages/company/positions/modals/PositionCreate.tsx +++ b/src/pages/company/positions/modals/PositionCreate.tsx @@ -59,15 +59,9 @@ export default function Create(props: MyBetaModalFormProps) { colProps: { span: 24 }, // formItemProps: { ...rulesHelper.text }, }, - // { - // key: 'sort', - // title: '岗位排序', - // colProps: { span: 24 }, - // valueType: 'number', - // }, { key: 'remark', - title: '备注', + title: '岗位说明', colProps: { span: 24 }, valueType: 'textarea', }, diff --git a/src/pages/company/positions/modals/PositionUpdate.tsx b/src/pages/company/positions/modals/PositionUpdate.tsx index 85d5ab5..5745d65 100644 --- a/src/pages/company/positions/modals/PositionUpdate.tsx +++ b/src/pages/company/positions/modals/PositionUpdate.tsx @@ -50,15 +50,9 @@ export default function Update(props: MyBetaModalFormProps) { colProps: { span: 24 }, // formItemProps: { ...rulesHelper.text }, }, - // { - // key: 'sort', - // title: '岗位排序', - // colProps: { span: 24 }, - // valueType: 'number', - // }, { key: 'remark', - title: '备注', + title: '岗位说明', colProps: { span: 24 }, valueType: 'textarea', },