From b8407eeba748b3a09e430dc092257e9d90d33931 Mon Sep 17 00:00:00 2001 From: uiuJun <> Date: Thu, 9 Oct 2025 23:24:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=EF=BC=9A=E9=83=A8=E5=88=86=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .umirc.ts | 4 ++-- src/pages/archive/components/SummaryInfo.tsx | 10 +++++----- src/pages/archive/index.tsx | 1 - src/pages/asset/grids/index.tsx | 11 ++--------- src/pages/asset/list/index.tsx | 2 +- src/pages/bills/list/index.tsx | 2 +- src/pages/common/positions/index.tsx | 2 +- src/pages/company/brand/index.tsx | 4 ++++ src/pages/company/employees/index.tsx | 4 ++-- src/pages/complaint/index.tsx | 1 - src/pages/customer/components/CustomerHouse.tsx | 7 ++++--- src/pages/moments/classification/index.tsx | 2 +- src/pages/moments/list/index.tsx | 2 +- src/pages/order/list/index.tsx | 4 ++-- 14 files changed, 26 insertions(+), 30 deletions(-) diff --git a/.umirc.ts b/.umirc.ts index 6fdf83b..318fa17 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -16,8 +16,8 @@ export default defineConfig({ '/api/': { // target: 'http://yt:8003', // target: 'http://10.39.13.78:8001/', - target: 'https://test-admin.linyikj.com.cn/', - // target: 'https://admin.linyikj.com.cn/', + // target: 'https://test-admin.linyikj.com.cn/', + target: 'https://admin.linyikj.com.cn/', // target: 'http://c789629c.natappfree.cc', changeOrigin: true, diff --git a/src/pages/archive/components/SummaryInfo.tsx b/src/pages/archive/components/SummaryInfo.tsx index e7b1dd4..24b5028 100644 --- a/src/pages/archive/components/SummaryInfo.tsx +++ b/src/pages/archive/components/SummaryInfo.tsx @@ -22,9 +22,9 @@ export default function Info(props: MyBetaModalFormProps) { }, [props?.item?.id]); return ( - - - + + + {/* {getShow?.payable_amount_sum || '-'} @@ -32,8 +32,8 @@ export default function Info(props: MyBetaModalFormProps) { {getShow?.discount_amount_sum || '-'} - - + */} + {getShow?.total_payable_sum || ''} {getShow?.payable_amount_sum ? ( diff --git a/src/pages/archive/index.tsx b/src/pages/archive/index.tsx index 2d06536..7079765 100644 --- a/src/pages/archive/index.tsx +++ b/src/pages/archive/index.tsx @@ -126,7 +126,6 @@ export default function Index({ title = '房客关系' }) { }, search: false, }, - MyColumns.Option({ render: (_, item: any, index, action) => ( diff --git a/src/pages/asset/grids/index.tsx b/src/pages/asset/grids/index.tsx index c1adcb7..f2a69cd 100644 --- a/src/pages/asset/grids/index.tsx +++ b/src/pages/asset/grids/index.tsx @@ -39,6 +39,7 @@ export default function Index({ title = '楼栋范围' }) { , ]} columns={[ + MyColumns.ID(), { title: '关联项目', dataIndex: ['asset_project', 'name'], @@ -48,23 +49,15 @@ export default function Index({ title = '楼栋范围' }) { }, }, }, - { - title: 'ID', - dataIndex: 'id', - }, { title: '板块名称', dataIndex: 'name', }, - { - title: '标识', - dataIndex: 'grid_mark', - }, { title: '楼栋管家', dataIndex: ['company_employee', 'name'], render: (_, item: any) => - `${item?.company_employee?.name || ''}-${ + `${item?.company_employee?.name || ''}:${ item?.company_employee?.phone || '' }`, }, diff --git a/src/pages/asset/list/index.tsx b/src/pages/asset/list/index.tsx index 189762b..4653d17 100644 --- a/src/pages/asset/list/index.tsx +++ b/src/pages/asset/list/index.tsx @@ -131,7 +131,7 @@ export default function Index({ title = '项目列表' }) { /> - Apis.Common.Admins.Delete({ id: item.id }).then(() => + Apis.Asset.AssetProjects.Delete({ id: item.id }).then(() => action?.reload(), ) } diff --git a/src/pages/bills/list/index.tsx b/src/pages/bills/list/index.tsx index 7ee7b6c..c417148 100644 --- a/src/pages/bills/list/index.tsx +++ b/src/pages/bills/list/index.tsx @@ -113,7 +113,7 @@ export default function Index({ title = '账单明细' }) { - Apis.Common.Admins.Delete({ id: item.id }).then(() => + Apis.Bill.HouseBills.Delete({ id: item.id }).then(() => action?.reload(), ) } diff --git a/src/pages/common/positions/index.tsx b/src/pages/common/positions/index.tsx index d600319..5ea94a6 100644 --- a/src/pages/common/positions/index.tsx +++ b/src/pages/common/positions/index.tsx @@ -12,7 +12,7 @@ import { Space } from 'antd'; import Create from './modals/Create'; import Update from './modals/Update'; -export default function Index({ title = '岗位管理' }) { +export default function Index({ title = '岗位库' }) { const navigate = useNavigate(); // 注册当前页面为标签页 diff --git a/src/pages/company/brand/index.tsx b/src/pages/company/brand/index.tsx index 2379d1f..2352d79 100644 --- a/src/pages/company/brand/index.tsx +++ b/src/pages/company/brand/index.tsx @@ -45,10 +45,12 @@ export default function Index({ title = '品牌管理' }) { { title: '机构', dataIndex: ['company', 'name'], + width: 300, }, { title: '品牌名称', dataIndex: 'name', + width: 200, }, { title: 'logo', @@ -66,7 +68,9 @@ export default function Index({ title = '品牌管理' }) { ); }, + width: 100, }, + MyColumns.UpdatedAt(), MyColumns.Option({ render: (_, item: any, index, action) => ( diff --git a/src/pages/company/employees/index.tsx b/src/pages/company/employees/index.tsx index 84c63d2..e36788d 100644 --- a/src/pages/company/employees/index.tsx +++ b/src/pages/company/employees/index.tsx @@ -92,8 +92,8 @@ export default function Index({ title = '员工管理' }) { - Apis.Common.Admins.Delete({ id: item.id }).then(() => - action?.reload(), + Apis.Company.CompanyEmployees.Delete({ id: item.id }).then( + () => action?.reload(), ) } /> diff --git a/src/pages/complaint/index.tsx b/src/pages/complaint/index.tsx index 77fb8ec..b923f54 100644 --- a/src/pages/complaint/index.tsx +++ b/src/pages/complaint/index.tsx @@ -166,7 +166,6 @@ export default function Index({ title = '投诉列表' }) { title="分配" /> )} - Apis.WorkOrder.HouseWorkOrders.SoftDelete({ diff --git a/src/pages/customer/components/CustomerHouse.tsx b/src/pages/customer/components/CustomerHouse.tsx index 34361b0..d04175b 100644 --- a/src/pages/customer/components/CustomerHouse.tsx +++ b/src/pages/customer/components/CustomerHouse.tsx @@ -20,12 +20,13 @@ export default function Index(props: MyBetaModalFormProps) { Apis.Archive.HouseOccupants.CustomerHouseByPhone, ) } - // search={false} - // options={false} + search={false} + options={false} columns={[ { - title: '项目名称', + title: '关联房屋', dataIndex: ['asset_house', 'full_name'], + search: false, }, MyColumns.EnumTag({ diff --git a/src/pages/moments/classification/index.tsx b/src/pages/moments/classification/index.tsx index 3f3b7b6..8e6234d 100644 --- a/src/pages/moments/classification/index.tsx +++ b/src/pages/moments/classification/index.tsx @@ -11,7 +11,7 @@ import { Space } from 'antd'; import Create from './modals/Create'; import Update from './modals/Update'; -export default function Index({ title = '朋友圈分类' }) { +export default function Index({ title = '内容分类' }) { // 注册当前页面为标签页 usePageTabs({ tabKey: 'moments-classification', diff --git a/src/pages/moments/list/index.tsx b/src/pages/moments/list/index.tsx index 50741b9..8d69eb2 100644 --- a/src/pages/moments/list/index.tsx +++ b/src/pages/moments/list/index.tsx @@ -16,7 +16,7 @@ import { ProTable } from '@ant-design/pro-components'; import { Card, Space } from 'antd'; import Create from './modals/Create'; -export default function Index({ title = '推送任务' }) { +export default function Index({ title = '创建内容' }) { // 注册当前页面为标签页 usePageTabs({ tabKey: 'moments-list', diff --git a/src/pages/order/list/index.tsx b/src/pages/order/list/index.tsx index c47e1db..66d76d2 100644 --- a/src/pages/order/list/index.tsx +++ b/src/pages/order/list/index.tsx @@ -113,8 +113,8 @@ export default function Index({ title = '支付订单' }) { - Apis.Common.Admins.Delete({ id: item.id }).then(() => - action?.reload(), + Apis.HouseOrder.HouseOrders.Delete({ id: item.id }).then( + () => action?.reload(), ) } /> From a145e8dabc5ad544f3f8824565e7a790e669a0cf Mon Sep 17 00:00:00 2001 From: uiuJun <> Date: Fri, 10 Oct 2025 00:28:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat=EF=BC=9A=E6=B6=88=E6=81=AF=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .umirc.ts | 4 +- .../moments/list/components/infoPreview.tsx | 12 +- src/pages/moments/list/components/style.scss | 2 +- src/pages/moments/list/index.tsx | 34 +++- src/pages/moments/list/modals/Create.tsx | 174 ++++++++++++------ 5 files changed, 153 insertions(+), 73 deletions(-) diff --git a/.umirc.ts b/.umirc.ts index 318fa17..6fdf83b 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -16,8 +16,8 @@ export default defineConfig({ '/api/': { // target: 'http://yt:8003', // target: 'http://10.39.13.78:8001/', - // target: 'https://test-admin.linyikj.com.cn/', - target: 'https://admin.linyikj.com.cn/', + target: 'https://test-admin.linyikj.com.cn/', + // target: 'https://admin.linyikj.com.cn/', // target: 'http://c789629c.natappfree.cc', changeOrigin: true, diff --git a/src/pages/moments/list/components/infoPreview.tsx b/src/pages/moments/list/components/infoPreview.tsx index 77332bc..0277462 100644 --- a/src/pages/moments/list/components/infoPreview.tsx +++ b/src/pages/moments/list/components/infoPreview.tsx @@ -12,8 +12,8 @@ export default function infoPreview(props: MyBetaModalFormProps) {
员工头像
-
员工的名字
-
此处显示“发送文案”输入的文案
+
员工名字
+
此处显示“发送文案”
@@ -31,8 +31,8 @@ export default function infoPreview(props: MyBetaModalFormProps) {
员工头像
-
员工的名字
-
此处显示“发送文案”输入的文案
+
员工名字
+
此处显示“发送文案”
@@ -55,9 +55,9 @@ export default function infoPreview(props: MyBetaModalFormProps) {
-
封面图
+
封面
- 此处显示“链接标题”输入的文案,文案字数多时可以换行显示 + 此处显示“链接标题”,字数较多时自动换行显示
diff --git a/src/pages/moments/list/components/style.scss b/src/pages/moments/list/components/style.scss index 437de62..04764c3 100644 --- a/src/pages/moments/list/components/style.scss +++ b/src/pages/moments/list/components/style.scss @@ -2,7 +2,7 @@ background-color: #f8f8f8; width: 400px; padding: 15px; - margin-left: 10px; + margin-left: 60px; border-radius: 10px; .title { border-left: 3px solid #1890ff; diff --git a/src/pages/moments/list/index.tsx b/src/pages/moments/list/index.tsx index 8d69eb2..2c42651 100644 --- a/src/pages/moments/list/index.tsx +++ b/src/pages/moments/list/index.tsx @@ -9,6 +9,7 @@ import { Apis } from '@/gen/Apis'; import { CustomerMomentsChannelEnum, CustomerMomentsContentTypeEnum, + CustomerMomentsPushStatusEnum, CustomerMomentsPushTypeEnum, CustomerMomentsTaskEndTypeEnum, } from '@/gen/Enums'; @@ -47,15 +48,29 @@ export default function Index({ title = '创建内容' }) { ]} columns={[ MyColumns.ID(), + MyColumns.EnumTag({ + title: '任务推送', + dataIndex: 'push_status', + valueEnum: CustomerMomentsPushStatusEnum, + search: false, + }), { - title: '名称', + title: '标题', dataIndex: 'title', render: (_, i: any) => { return ( -
{i?.title}
+ 0 + ? i?.cover_image[0]?.url + : i?.attachments[0]?.url + } + width={45} + height={45} + />
); @@ -77,7 +92,7 @@ export default function Index({ title = '创建内容' }) { valueEnum: CustomerMomentsPushTypeEnum, }), { - title: '定时发送时间', + title: '推送时间', dataIndex: 'scheduled_time', search: false, }, @@ -89,15 +104,16 @@ export default function Index({ title = '创建内容' }) { search: false, }), { - title: '任务结束天数', + title: '任务结束时间', dataIndex: 'task_days', search: false, + render: (_, record: any) => { + return record?.task_end_type === 'AfterNDays' + ? `任务发送后:${record?.task_days}天` + : '${record?.task_end_time}'; + }, }, - { - title: '定时结束', - dataIndex: 'task_end_time', - search: false, - }, + MyColumns.UpdatedAt(), MyColumns.CreatedAt(), MyColumns.Option({ diff --git a/src/pages/moments/list/modals/Create.tsx b/src/pages/moments/list/modals/Create.tsx index dfe9a85..00fb1b2 100644 --- a/src/pages/moments/list/modals/Create.tsx +++ b/src/pages/moments/list/modals/Create.tsx @@ -40,7 +40,7 @@ export default function Create(props: MyBetaModalFormProps) { }), Selects?.Companies({ key: 'companies_id', - title: '公司', + title: '选择机构', colProps: { span: 24 }, required: true, }), @@ -54,10 +54,11 @@ export default function Create(props: MyBetaModalFormProps) { columns: [ MyFormItems.EnumRadio({ key: 'push_type', - title: '推送类型', + title: '任务推送方式', + tooltip: '内容穿创建后,推送任务给员工的方式', valueEnum: CustomerMomentsPushTypeEnum, required: true, - colProps: { span: 9 }, + colProps: { span: 12 }, }), { name: ['push_type'], @@ -67,9 +68,9 @@ export default function Create(props: MyBetaModalFormProps) { ? [ { key: 'scheduled_time', - title: '定时发送时间', + title: '定时推送时间', valueType: 'dateTime', - colProps: { span: 10 }, + colProps: { span: 12 }, }, ] : []; @@ -86,7 +87,7 @@ export default function Create(props: MyBetaModalFormProps) { title: '任务结束类型', valueEnum: CustomerMomentsTaskEndTypeEnum, required: true, - colProps: { span: 9 }, + colProps: { span: 12 }, }), { name: ['task_end_type'], @@ -96,7 +97,7 @@ export default function Create(props: MyBetaModalFormProps) { ? [ { key: 'task_days', - title: '任务结束天数', + title: ' ', colProps: { span: 10 }, valueType: 'digit', formItemProps: { ...rulesHelper.number }, @@ -123,7 +124,7 @@ export default function Create(props: MyBetaModalFormProps) { }, MyFormItems.EnumSelect({ key: 'range_type', - title: '范围类型', + title: '推送范围', valueEnum: CustomerMomentsRangeTypeEnum, required: true, }), @@ -150,6 +151,12 @@ export default function Create(props: MyBetaModalFormProps) { { title: '创建内容', columns: [ + { + key: 'title', + title: '标题', + formItemProps: { ...rulesHelper.text }, + colProps: { span: 24 }, + }, MyFormItems.EnumRadio({ key: 'content_type', title: '内容类型', @@ -157,29 +164,111 @@ export default function Create(props: MyBetaModalFormProps) { required: true, colProps: { span: 24 }, }), - - { - key: 'skip_url', - title: '链接', - formItemProps: { ...rulesHelper.text }, - colProps: { span: 12 }, - }, - { - key: 'title', - title: '标题', - formItemProps: { ...rulesHelper.text }, - colProps: { span: 12 }, - }, { name: ['content_type'], valueType: 'dependency', columns: ({ content_type }: any) => { - setContentType(content_type); - return content_type === 'MiniProgram' + return content_type === CustomerMomentsContentTypeEnum.Image.value ? [ { - key: 'mini_program_app_id', - title: '小程序APPID', + key: 'content', + title: '发送文案', + valueType: 'textarea', + colProps: { span: 24 }, + formItemProps: { ...rulesHelper.text }, + }, + MyFormItems.UploadImages({ + key: 'attachments', + title: '上传图片', + // uploadType: 'file', + required: true, + tooltip: '限9张图片', + max: 9, + colProps: { span: 24 }, + }), + ] + : content_type === CustomerMomentsContentTypeEnum.Video.value + ? [ + { + key: 'content', + title: '发送文案', + valueType: 'textarea', + colProps: { span: 24 }, + formItemProps: { ...rulesHelper.text }, + }, + MyFormItems.UploadImages({ + key: 'attachments', + title: '上传视频', + required: true, + tooltip: '限1个视频', + // uploadType: 'file', + max: 1, + colProps: { span: 24 }, + }), + ] + : content_type === CustomerMomentsContentTypeEnum.Link.value || + content_type === + CustomerMomentsContentTypeEnum.MiniProgram.value + ? [ + { + key: 'content', + title: '发送文案', + valueType: 'textarea', + colProps: { span: 24 }, + formItemProps: { ...rulesHelper.text }, + }, + { + name: ['content_type'], + valueType: 'dependency', + columns: ({ content_type }: any) => { + setContentType(content_type); + return content_type === 'MiniProgram' + ? [ + { + key: 'mini_program_app_id', + title: '小程序APPID', + formItemProps: { ...rulesHelper.text }, + colProps: { span: 12 }, + }, + { + key: 'skip_url', + title: '链接地址', + formItemProps: { ...rulesHelper.text }, + colProps: { span: 12 }, + }, + ] + : [ + { + key: 'skip_url', + title: '链接地址', + formItemProps: { ...rulesHelper.text }, + colProps: { span: 24 }, + }, + ]; + }, + }, + + { + key: 'desc', + title: '链接标题', + colProps: { span: 24 }, + formItemProps: { ...rulesHelper.text }, + }, + MyFormItems.UploadImages({ + key: 'cover_image', + tooltip: '限1张图片', + title: '设置封面', + required: true, + max: 1, + }), + ] + : content_type === CustomerMomentsContentTypeEnum.Link.value || + content_type === + CustomerMomentsContentTypeEnum.MiniProgram.value + ? [ + { + key: 'skip_url', + title: '链接', formItemProps: { ...rulesHelper.text }, colProps: { span: 24 }, }, @@ -187,31 +276,6 @@ export default function Create(props: MyBetaModalFormProps) { : []; }, }, - { - key: 'content', - title: '内容', - valueType: 'textarea', - colProps: { span: 24 }, - formItemProps: { ...rulesHelper.text }, - }, - { - key: 'desc', - title: '描述', - valueType: 'textarea', - colProps: { span: 24 }, - }, - MyFormItems.UploadImages({ - key: 'cover_image', - title: '封面', - max: 1, - }), - MyFormItems.UploadImages({ - key: 'attachments', - title: '附件', - uploadType: 'file', - max: 100, - colProps: { span: 12 }, - }), ], }, ]; @@ -236,23 +300,23 @@ export default function Create(props: MyBetaModalFormProps) { type="primary" size={'middle'} myRef={modalRef} - width="1200px" + width="580px" node={ -
+
-
+
{...MyModalFormProps.props} title={`添加${props.title}`} wrapperCol={{ span: 24 }} - width="800px" + // width="1200px" form={form} layoutType="Form" trigger={}