Merge pull request 'develop' (#14) from develop into main
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m48s
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m48s
Reviewed-on: https://code.juyouwu.cn/pay/pay-admin/pulls/14
This commit is contained in:
commit
9c7fa8d498
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"url": "http://c789629c.natappfree.cc/api/docs/openapi",
|
"url": "http://10.39.13.78:8001/api/docs/openapi",
|
||||||
"module": "Admin"
|
"module": "Admin"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,8 @@ type ReturnType = ProColumns<Record<string, any>, 'text'>;
|
|||||||
|
|
||||||
export const MyColumns = {
|
export const MyColumns = {
|
||||||
ID(props?: ReturnType): ReturnType {
|
ID(props?: ReturnType): ReturnType {
|
||||||
return { title: 'ID', dataIndex: 'id', hideInSearch: true, ...props };
|
// return { title: 'ID', dataIndex: 'id', hideInSearch: true, ...props };
|
||||||
|
return { title: 'ID', dataIndex: 'id', ...props };
|
||||||
},
|
},
|
||||||
DayStatus: (start: string, end: string) => {
|
DayStatus: (start: string, end: string) => {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
|
|||||||
@ -9,10 +9,10 @@ export function MyModal(props?: any) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (open && props?.onOpen) {
|
if (open) {
|
||||||
props.onOpen();
|
props?.onOpen?.(true);
|
||||||
}
|
}
|
||||||
}, [open, props?.onOpen]);
|
}, [open]);
|
||||||
|
|
||||||
useImperativeHandle(props.myRef, () => ({
|
useImperativeHandle(props.myRef, () => ({
|
||||||
close,
|
close,
|
||||||
|
|||||||
@ -373,24 +373,20 @@ export const Selects = {
|
|||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
hideInTable: hideInTable,
|
hideInTable: hideInTable,
|
||||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
||||||
request: async (params) => {
|
request: async (params) =>
|
||||||
let res = await Apis.Company.CompanyReceiptAccounts.Select({
|
(
|
||||||
keywords: params?.KeyWords,
|
await Apis.Company.CompanyReceiptAccounts.Select({
|
||||||
companies_id: params?.companies_id,
|
keywords: params?.KeyWords,
|
||||||
...params,
|
companies_id: params?.companies_id,
|
||||||
});
|
...params,
|
||||||
res?.data?.map((l: any) => {
|
})
|
||||||
l.label =
|
).data,
|
||||||
l.company_name + '_' + l.company_bank + '_' + l.company_account;
|
|
||||||
});
|
|
||||||
return res?.data;
|
|
||||||
},
|
|
||||||
...rest,
|
...rest,
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
fieldNames: {
|
fieldNames: {
|
||||||
label: 'label',
|
label: 'label',
|
||||||
value: 'id',
|
value: 'value',
|
||||||
},
|
},
|
||||||
...rest?.fieldProps,
|
...rest?.fieldProps,
|
||||||
},
|
},
|
||||||
@ -416,6 +412,7 @@ export const Selects = {
|
|||||||
(
|
(
|
||||||
await Apis.Company.CompanyProjectReceiptAccounts.Select({
|
await Apis.Company.CompanyProjectReceiptAccounts.Select({
|
||||||
keywords: params?.KeyWords,
|
keywords: params?.KeyWords,
|
||||||
|
projects_id: params?.asset_projects_id,
|
||||||
...params,
|
...params,
|
||||||
})
|
})
|
||||||
).data,
|
).data,
|
||||||
@ -570,7 +567,7 @@ export const Selects = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
//获取项目仪表
|
//获取仪表
|
||||||
AssetMeters(props?: PropsType): ReturnType {
|
AssetMeters(props?: PropsType): ReturnType {
|
||||||
const {
|
const {
|
||||||
title = '选择仪表',
|
title = '选择仪表',
|
||||||
@ -586,14 +583,20 @@ export const Selects = {
|
|||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
hideInTable: hideInTable,
|
hideInTable: hideInTable,
|
||||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
||||||
request: async (params) =>
|
|
||||||
(
|
request: async (params) => {
|
||||||
await Apis.Meter.HouseMeters.List({
|
let res = await Apis.Meter.HouseMeters.List({
|
||||||
keywords: params?.KeyWords,
|
keywords: params?.KeyWords,
|
||||||
...params,
|
asset_projects_id: params?.asset_projects_id,
|
||||||
asset_projects_id: params?.asset_projects_id,
|
charge_standards_id: params?.house_charge_standards_id,
|
||||||
})
|
...params,
|
||||||
).data,
|
});
|
||||||
|
res?.data?.map((l: any) => {
|
||||||
|
l.label = l.id + ':' + l.name;
|
||||||
|
l.value = l.id;
|
||||||
|
});
|
||||||
|
return res?.data;
|
||||||
|
},
|
||||||
...rest,
|
...rest,
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
|||||||
7
src/gen/ApiTypes.d.ts
vendored
7
src/gen/ApiTypes.d.ts
vendored
@ -5,6 +5,7 @@ declare namespace ApiTypes {
|
|||||||
"title"?: string; // 模糊搜索:名称
|
"title"?: string; // 模糊搜索:名称
|
||||||
"status"?: string; // 状态,[enum:ActivitiesStatusEnum]
|
"status"?: string; // 状态,[enum:ActivitiesStatusEnum]
|
||||||
"publish_status"?: string; // 发布状态,[enum:ActivitiesPublishStatusEnum]
|
"publish_status"?: string; // 发布状态,[enum:ActivitiesPublishStatusEnum]
|
||||||
|
"asset_projects_id"?: number; // 项目ID,[ref:asset_projects]
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"title": string; // 活动标题
|
"title": string; // 活动标题
|
||||||
@ -1307,7 +1308,7 @@ declare namespace ApiTypes {
|
|||||||
namespace HouseOrder {
|
namespace HouseOrder {
|
||||||
namespace HouseOrderPayments {
|
namespace HouseOrderPayments {
|
||||||
type List = {
|
type List = {
|
||||||
"house_orders_id": number; // 订单ID
|
"house_orders_id"?: number; // 订单ID
|
||||||
"payment_no"?: string; // 模糊搜索:支付单号
|
"payment_no"?: string; // 模糊搜索:支付单号
|
||||||
"transaction_id"?: string; // 模糊搜索:交易号(微信、支付宝的单号
|
"transaction_id"?: string; // 模糊搜索:交易号(微信、支付宝的单号
|
||||||
"third_trade_no"?: string; // 第三方交易号(如通联、乐刷)
|
"third_trade_no"?: string; // 第三方交易号(如通联、乐刷)
|
||||||
@ -1358,6 +1359,9 @@ declare namespace ApiTypes {
|
|||||||
type Delete = {
|
type Delete = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
};
|
};
|
||||||
|
type Import = {
|
||||||
|
"upload_file"?: mimes:xlsx,xls; // 上传的时候必填文件
|
||||||
|
};
|
||||||
}
|
}
|
||||||
namespace HouseMeterReadings {
|
namespace HouseMeterReadings {
|
||||||
type List = {
|
type List = {
|
||||||
@ -1441,6 +1445,7 @@ declare namespace ApiTypes {
|
|||||||
"asset_projects_id"?: number; // 项目id,[ref:asset_projects]
|
"asset_projects_id"?: number; // 项目id,[ref:asset_projects]
|
||||||
"project_name"?: string; // 模糊搜索:项目名称
|
"project_name"?: string; // 模糊搜索:项目名称
|
||||||
"charge_standards_id"?: number; // 房屋收费标准id,[ref:house_charge_standards]
|
"charge_standards_id"?: number; // 房屋收费标准id,[ref:house_charge_standards]
|
||||||
|
"meter_type"?: string; // 仪表类型,[enum:HouseMetersMeterTypeEnum]
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"asset_projects_id": number; // 项目id,[ref:asset_projects]
|
"asset_projects_id": number; // 项目id,[ref:asset_projects]
|
||||||
|
|||||||
@ -773,7 +773,7 @@ export const Apis = {
|
|||||||
},
|
},
|
||||||
HouseOrder: {
|
HouseOrder: {
|
||||||
HouseOrderPayments: {
|
HouseOrderPayments: {
|
||||||
List(data: ApiTypes.HouseOrder.HouseOrderPayments.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.HouseOrder.HouseOrderPayments.List): Promise<MyResponseType> {
|
||||||
return request('admin/house_order/house_order_payments/list', { data });
|
return request('admin/house_order/house_order_payments/list', { data });
|
||||||
},
|
},
|
||||||
Show(data: ApiTypes.HouseOrder.HouseOrderPayments.Show): Promise<MyResponseType> {
|
Show(data: ApiTypes.HouseOrder.HouseOrderPayments.Show): Promise<MyResponseType> {
|
||||||
@ -815,6 +815,12 @@ export const Apis = {
|
|||||||
Delete(data: ApiTypes.Meter.HouseMeterHasHouses.Delete): Promise<MyResponseType> {
|
Delete(data: ApiTypes.Meter.HouseMeterHasHouses.Delete): Promise<MyResponseType> {
|
||||||
return request('admin/meter/house_meter_has_houses/delete', { data });
|
return request('admin/meter/house_meter_has_houses/delete', { data });
|
||||||
},
|
},
|
||||||
|
Import(data?: ApiTypes.Meter.HouseMeterHasHouses.Import): Promise<MyResponseType> {
|
||||||
|
return request('admin/meter/house_meter_has_houses/import', { data });
|
||||||
|
},
|
||||||
|
DownloadTemplate(): Promise<MyResponseType> {
|
||||||
|
return request('admin/meter/house_meter_has_houses/download_template', {responseType: 'blob',});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
HouseMeterReadings: {
|
HouseMeterReadings: {
|
||||||
List(data: ApiTypes.Meter.HouseMeterReadings.List): Promise<MyResponseType> {
|
List(data: ApiTypes.Meter.HouseMeterReadings.List): Promise<MyResponseType> {
|
||||||
|
|||||||
@ -154,7 +154,7 @@ export const BannersTypeEnum= {
|
|||||||
|
|
||||||
// 缓存类型
|
// 缓存类型
|
||||||
export const CacheTypeEnum= {
|
export const CacheTypeEnum= {
|
||||||
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#dc15e2","value":"MobilePhoneVerificationCode"},
|
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#7db989","value":"MobilePhoneVerificationCode"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// CompaniesMerchantTypeEnum
|
// CompaniesMerchantTypeEnum
|
||||||
|
|||||||
@ -1,49 +1,56 @@
|
|||||||
import { MyBetaModalFormProps, MyProTableProps } from '@/common';
|
import { MyBetaModalFormProps, MyButtons } from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { ProCard, ProTable } from '@ant-design/pro-components';
|
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
|
export default function Info(props: MyBetaModalFormProps) {
|
||||||
|
const [getShow, setDataShow] = useState<any>({});
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
Apis.Bill.HouseBills.SummaryShow({
|
||||||
|
asset_houses_id: props?.item?.id,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
setDataShow(JSON.parse(JSON.stringify(res?.data)));
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
.catch(() => false);
|
||||||
|
}, [props?.item?.id]);
|
||||||
|
|
||||||
export default function info(props: MyBetaModalFormProps) {
|
|
||||||
const { item } = props;
|
|
||||||
return (
|
return (
|
||||||
<ProCard>
|
<ProCard extra={props.extra}>
|
||||||
<ProTable
|
<ProDescriptions bordered column={3}>
|
||||||
{...MyProTableProps.props}
|
<ProDescriptions.Item label="账单金额">
|
||||||
request={async (params, sort) =>
|
{getShow?.payable_amount_sum || '-'}
|
||||||
MyProTableProps.request(
|
</ProDescriptions.Item>
|
||||||
{
|
<ProDescriptions.Item label="滞纳金">
|
||||||
...params,
|
{getShow?.late_fee_sum || '-'}
|
||||||
asset_houses_id: item?.asset_houses_id,
|
</ProDescriptions.Item>
|
||||||
},
|
<ProDescriptions.Item label="优惠金额">
|
||||||
sort,
|
{getShow?.discount_amount_sum || '-'}
|
||||||
Apis.Bill.HouseBills.SummaryBillList,
|
</ProDescriptions.Item>
|
||||||
)
|
<ProDescriptions.Item label="应付金额">
|
||||||
}
|
<Space>
|
||||||
search={false}
|
{getShow?.total_payable_sum || ''}
|
||||||
options={false}
|
{getShow?.payable_amount_sum ? (
|
||||||
pagination={false}
|
<MyButtons.View
|
||||||
columns={[
|
title="查看账单明细"
|
||||||
{
|
size="small"
|
||||||
title: '账单金额合计',
|
type="link"
|
||||||
dataIndex: 'payable_amount_sum',
|
onClick={() => {
|
||||||
search: false,
|
navigate(`/bills/summary/show/${props?.item?.id || 0}`);
|
||||||
},
|
}}
|
||||||
{
|
/>
|
||||||
title: '滞纳金合计',
|
) : (
|
||||||
dataIndex: 'late_fee_sum',
|
'无账单'
|
||||||
search: false,
|
)}
|
||||||
},
|
</Space>
|
||||||
{
|
</ProDescriptions.Item>
|
||||||
title: '优惠金额合计',
|
</ProDescriptions>
|
||||||
dataIndex: 'discount_amount_sum',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '应付合计',
|
|
||||||
dataIndex: 'total_payable_sum',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</ProCard>
|
</ProCard>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,6 @@ import SummaryInfo from '../components/SummaryInfo';
|
|||||||
import OccupantsHistory from '../table/OccupantsHistory';
|
import OccupantsHistory from '../table/OccupantsHistory';
|
||||||
import OccupantsNow from '../table/OccupantsNow';
|
import OccupantsNow from '../table/OccupantsNow';
|
||||||
import RegistersList from '../table/RegistersList';
|
import RegistersList from '../table/RegistersList';
|
||||||
import UnpaidBill from '../table/UnpaidBill';
|
|
||||||
|
|
||||||
export default function Show({ title = '房屋档案' }) {
|
export default function Show({ title = '房屋档案' }) {
|
||||||
const { id } = useParams<{ id: string }>();
|
const { id } = useParams<{ id: string }>();
|
||||||
@ -90,18 +89,18 @@ export default function Show({ title = '房屋档案' }) {
|
|||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '欠费账单',
|
// label: '欠费账单',
|
||||||
key: '4',
|
// key: '4',
|
||||||
closable: false,
|
// closable: false,
|
||||||
children: <UnpaidBill item={{ ...data, asset_houses_id: id }} />,
|
// children: <UnpaidBill item={{ ...data, asset_houses_id: id }} />,
|
||||||
},
|
// },
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MyPageContainer title={title}>
|
<MyPageContainer title={title}>
|
||||||
<HouseInfo item={data} reload={loadShow} />
|
<HouseInfo item={data} reload={loadShow} />
|
||||||
<SummaryInfo item={{ ...data, asset_houses_id: id }} reload={loadShow} />
|
{id && <SummaryInfo item={{ ...data, id: id }} reload={loadShow} />}
|
||||||
<ProCard style={{ marginTop: 16 }}>
|
<ProCard style={{ marginTop: 16 }}>
|
||||||
<Tabs type="card" items={items} defaultActiveKey="1" size="small" />
|
<Tabs type="card" items={items} defaultActiveKey="1" size="small" />
|
||||||
</ProCard>
|
</ProCard>
|
||||||
|
|||||||
@ -40,10 +40,15 @@ export default function Index({ title = '项目账户' }) {
|
|||||||
<AccountsGet key="Select" reload={action?.reload} title={title} />,
|
<AccountsGet key="Select" reload={action?.reload} title={title} />,
|
||||||
]}
|
]}
|
||||||
columns={[
|
columns={[
|
||||||
|
MyColumns.ID(),
|
||||||
|
|
||||||
{
|
{
|
||||||
title: 'ID',
|
title: '机构名称',
|
||||||
dataIndex: 'id',
|
dataIndex: ['company', 'name'],
|
||||||
// width: 360,
|
},
|
||||||
|
{
|
||||||
|
title: '项目名称',
|
||||||
|
dataIndex: ['project', 'name'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '收款名称',
|
title: '收款名称',
|
||||||
|
|||||||
@ -28,10 +28,14 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
if (open) {
|
if (open) {
|
||||||
form.resetFields(); // 清空表单数据
|
form.resetFields(); // 清空表单数据
|
||||||
|
form.setFieldsValue({
|
||||||
|
companies_id: props?.item?.companies_id || undefined,
|
||||||
|
projects_id: props?.item?.id || undefined,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
key={new Date().getTime()}
|
key={new Date().getTime()}
|
||||||
onFinish={async (values) =>
|
onFinish={async (values: any) =>
|
||||||
Apis.Company.CompanyProjectReceiptAccounts.Store({
|
Apis.Company.CompanyProjectReceiptAccounts.Store({
|
||||||
...values,
|
...values,
|
||||||
companies_id: props?.item?.companies_id || values?.companies_id,
|
companies_id: props?.item?.companies_id || values?.companies_id,
|
||||||
@ -89,7 +93,8 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
key: 'receipt_accounts_id',
|
key: 'receipt_accounts_id',
|
||||||
title: '选择收款账户',
|
title: '选择收款账户',
|
||||||
params: {
|
params: {
|
||||||
companies_id: companies_id || props?.item?.companies_id || 0,
|
companies_id:
|
||||||
|
companies_id || props?.item?.companies_id || undefined,
|
||||||
},
|
},
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
formItemProps: { ...rulesHelper.number },
|
formItemProps: { ...rulesHelper.number },
|
||||||
|
|||||||
@ -100,14 +100,14 @@ export default function Index({ title = '项目活动' }) {
|
|||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<ActivityShow item={item} />
|
<ActivityShow item={item} />
|
||||||
{(!item.end_time || new Date(item.end_time) > new Date()) && (
|
{/* {(!item.end_time || new Date(item.end_time) > new Date()) && (
|
||||||
<ActivityUpdate
|
)} */}
|
||||||
item={item}
|
<ActivityUpdate
|
||||||
reload={action?.reload}
|
item={item}
|
||||||
// title={title}
|
reload={action?.reload}
|
||||||
/>
|
// title={title}
|
||||||
)}
|
/>
|
||||||
{(!item.end_time || new Date(item.end_time) > new Date()) && (
|
{/* {(!item.end_time || new Date(item.end_time) > new Date()) && (
|
||||||
<MyButtons.Default
|
<MyButtons.Default
|
||||||
title={
|
title={
|
||||||
item.publish_status ===
|
item.publish_status ===
|
||||||
@ -150,8 +150,49 @@ export default function Index({ title = '项目活动' }) {
|
|||||||
}).then(() => action?.reload());
|
}).then(() => action?.reload());
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)} */}
|
||||||
|
<MyButtons.Default
|
||||||
|
title={
|
||||||
|
item.publish_status ===
|
||||||
|
ActivitiesPublishStatusEnum.Unpublished.value
|
||||||
|
? '发布'
|
||||||
|
: item.publish_status ===
|
||||||
|
ActivitiesPublishStatusEnum.Published.value
|
||||||
|
? '下架'
|
||||||
|
: '重新发布'
|
||||||
|
}
|
||||||
|
type="primary"
|
||||||
|
isConfirm
|
||||||
|
description={
|
||||||
|
item.publish_status ===
|
||||||
|
ActivitiesPublishStatusEnum.Unpublished.value
|
||||||
|
? '确认发布此活动吗?'
|
||||||
|
: item.publish_status ===
|
||||||
|
ActivitiesPublishStatusEnum.Published.value
|
||||||
|
? '确认下架此活动吗?'
|
||||||
|
: '确认重新发布此活动吗?'
|
||||||
|
}
|
||||||
|
onConfirm={() => {
|
||||||
|
let newStatus;
|
||||||
|
if (
|
||||||
|
item.publish_status ===
|
||||||
|
ActivitiesPublishStatusEnum.Unpublished.value
|
||||||
|
) {
|
||||||
|
newStatus = ActivitiesPublishStatusEnum.Published.value;
|
||||||
|
} else if (
|
||||||
|
item.publish_status ===
|
||||||
|
ActivitiesPublishStatusEnum.Published.value
|
||||||
|
) {
|
||||||
|
newStatus = ActivitiesPublishStatusEnum.Unlisted.value;
|
||||||
|
} else {
|
||||||
|
newStatus = ActivitiesPublishStatusEnum.Published.value;
|
||||||
|
}
|
||||||
|
Apis.Activity.Activities.ChangePublishStatus({
|
||||||
|
id: item.id,
|
||||||
|
publish_status: newStatus,
|
||||||
|
}).then(() => action?.reload());
|
||||||
|
}}
|
||||||
|
/>
|
||||||
{item.is_enroll === 1 && (
|
{item.is_enroll === 1 && (
|
||||||
<EnrollsList
|
<EnrollsList
|
||||||
item={item}
|
item={item}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ export default function Show(props: MyBetaModalFormProps) {
|
|||||||
<MyModal
|
<MyModal
|
||||||
title={props.title || '查看'}
|
title={props.title || '查看'}
|
||||||
width={800}
|
width={800}
|
||||||
onOpen={getShow}
|
onOpen={() => getShow()}
|
||||||
node={
|
node={
|
||||||
<ProCard>
|
<ProCard>
|
||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { MyBetaModalFormProps, renderTextHelper } from '@/common';
|
import { MyBetaModalFormProps, renderTextHelper } from '@/common';
|
||||||
import { MyModal } from '@/components/MyModal';
|
import { MyModal } from '@/components/MyModal';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
import {
|
import {
|
||||||
AssetHousesOrientationEnum,
|
AssetHousesOrientationEnum,
|
||||||
AssetHousesOwnershipTypeEnum,
|
AssetHousesOwnershipTypeEnum,
|
||||||
@ -7,63 +8,96 @@ import {
|
|||||||
AssetHousesUsageEnum,
|
AssetHousesUsageEnum,
|
||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
export default function info(props: MyBetaModalFormProps) {
|
export default function info(props: MyBetaModalFormProps) {
|
||||||
|
const [show, setShow] = useState<any>({});
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
||||||
|
const getShow = useCallback(() => {
|
||||||
|
if (loading || !props?.item?.id) return;
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
Apis.Asset.AssetHouses.Show({
|
||||||
|
id: props?.item?.id,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
setShow(res?.data);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
setLoading(false);
|
||||||
|
});
|
||||||
|
}, [props?.item?.id, loading]);
|
||||||
|
|
||||||
|
// 只在弹窗打开时获取数据
|
||||||
|
const handleOpen = useCallback(() => {
|
||||||
|
if (!loading) {
|
||||||
|
getShow();
|
||||||
|
}
|
||||||
|
}, [getShow, loading]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MyModal
|
<MyModal
|
||||||
title={props.title || '查看'}
|
title={props.title || '查看'}
|
||||||
width="1000px"
|
width="800px"
|
||||||
|
onOpen={handleOpen}
|
||||||
node={
|
node={
|
||||||
<ProCard extra={props.extra}>
|
<ProCard extra={props.extra}>
|
||||||
<ProDescriptions bordered>
|
<ProDescriptions bordered>
|
||||||
<ProDescriptions.Item label="房屋全名" span={2}>
|
<ProDescriptions.Item label="房屋全名" span={2}>
|
||||||
{props?.item?.full_name}
|
<Space>
|
||||||
|
<span>【{show?.id}】</span>
|
||||||
|
{show?.full_name}
|
||||||
|
</Space>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="房号">
|
<ProDescriptions.Item label="房号">
|
||||||
{props?.item?.name}
|
{show?.name}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="楼层">
|
<ProDescriptions.Item label="楼层">
|
||||||
{props?.item?.floor}
|
{show?.floor}
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="房屋用途">
|
<ProDescriptions.Item label="房屋用途">
|
||||||
<renderTextHelper.Tag
|
<renderTextHelper.Tag
|
||||||
Enums={AssetHousesUsageEnum}
|
Enums={AssetHousesUsageEnum}
|
||||||
value={props?.item?.usage}
|
value={show?.usage}
|
||||||
key="usage"
|
key="usage"
|
||||||
/>
|
/>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="产权性质">
|
<ProDescriptions.Item label="产权性质">
|
||||||
<renderTextHelper.Tag
|
<renderTextHelper.Tag
|
||||||
Enums={AssetHousesOwnershipTypeEnum}
|
Enums={AssetHousesOwnershipTypeEnum}
|
||||||
value={props?.item?.ownership_type}
|
value={show?.ownership_type}
|
||||||
key="ownership_type"
|
key="ownership_type"
|
||||||
/>
|
/>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="建筑面积">
|
<ProDescriptions.Item label="建筑面积">
|
||||||
{props?.item?.built_area}m²
|
{show?.built_area}m²
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="套内面积">
|
<ProDescriptions.Item label="套内面积">
|
||||||
{props?.item?.inside_area}m²
|
{show?.inside_area}m²
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="计费面积">
|
<ProDescriptions.Item label="计费面积">
|
||||||
{props?.item?.chargeable_area}m²
|
{show?.chargeable_area}m²
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="房屋状态">
|
<ProDescriptions.Item label="房屋状态">
|
||||||
<renderTextHelper.Tag
|
<renderTextHelper.Tag
|
||||||
Enums={AssetHousesStatusEnum}
|
Enums={AssetHousesStatusEnum}
|
||||||
value={props?.item?.status}
|
value={show?.status}
|
||||||
key="status"
|
key="status"
|
||||||
/>
|
/>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="户型">
|
<ProDescriptions.Item label="户型">
|
||||||
{props?.item?.room || ''}房{props?.item?.hall || ''}厅
|
{show?.room || ''}房{show?.hall || ''}厅{show?.bathroom || ''}卫
|
||||||
{props?.item?.bathroom || ''}卫{props?.item?.kitchen || ''}厨
|
{show?.kitchen || ''}厨{show?.balcony || ''}阳台
|
||||||
{props?.item?.balcony || ''}阳台
|
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="朝向">
|
<ProDescriptions.Item label="朝向">
|
||||||
<renderTextHelper.Tag
|
<renderTextHelper.Tag
|
||||||
Enums={AssetHousesOrientationEnum}
|
Enums={AssetHousesOrientationEnum}
|
||||||
value={props?.item?.orientation}
|
value={show?.orientation}
|
||||||
key="orientation"
|
key="orientation"
|
||||||
/>
|
/>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import { useNavigate } from '@umijs/max';
|
|||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import GridCreate from './modals/GridCreate';
|
import GridCreate from './modals/GridCreate';
|
||||||
import GridMannger from './modals/GridMannger';
|
import GridMannger from './modals/GridMannger';
|
||||||
|
import GridShow from './modals/GridShow';
|
||||||
import GridUpdate from './modals/GridUpdate';
|
import GridUpdate from './modals/GridUpdate';
|
||||||
|
|
||||||
export default function Index({ title = '楼栋范围' }) {
|
export default function Index({ title = '楼栋范围' }) {
|
||||||
@ -72,6 +73,7 @@ export default function Index({ title = '楼栋范围' }) {
|
|||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
|
<GridShow item={item} reload={action?.reload} />
|
||||||
<GridUpdate item={item} reload={action?.reload} />
|
<GridUpdate item={item} reload={action?.reload} />
|
||||||
<GridMannger item={item} reload={action?.reload} />
|
<GridMannger item={item} reload={action?.reload} />
|
||||||
<MyButtons.Delete
|
<MyButtons.Delete
|
||||||
|
|||||||
@ -16,12 +16,12 @@ export default function Create(
|
|||||||
return (
|
return (
|
||||||
<BetaSchemaForm<ApiTypes.Grid.Grids.AddManager>
|
<BetaSchemaForm<ApiTypes.Grid.Grids.AddManager>
|
||||||
{...MyModalFormProps.props}
|
{...MyModalFormProps.props}
|
||||||
title={`设置管理员`}
|
title={`设置楼栋管家`}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="500px"
|
width="500px"
|
||||||
form={form}
|
form={form}
|
||||||
key={new Date().getTime()}
|
key={new Date().getTime()}
|
||||||
trigger={<MyButtons.Default title="管理员" type="link" />}
|
trigger={<MyButtons.Default title="楼栋管家" type="link" />}
|
||||||
request={() => Promise.resolve(props.item)}
|
request={() => Promise.resolve(props.item)}
|
||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
if (open && props.item) {
|
if (open && props.item) {
|
||||||
@ -49,7 +49,7 @@ export default function Create(
|
|||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
Selects?.Employees({
|
Selects?.Employees({
|
||||||
title: '设置网格员',
|
title: '设置楼栋管家',
|
||||||
dataIndex: 'company_employees_id',
|
dataIndex: 'company_employees_id',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
|||||||
58
src/pages/asset/grids/modals/GridShow.tsx
Normal file
58
src/pages/asset/grids/modals/GridShow.tsx
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
import { MyBetaModalFormProps } from '@/common';
|
||||||
|
import { MyModal } from '@/components/MyModal';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
import { useState } from 'react';
|
||||||
|
|
||||||
|
export default function Info(props: MyBetaModalFormProps) {
|
||||||
|
const [getShow, setDataShow] = useState<any>({});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<MyModal
|
||||||
|
title={props.title || '查看'}
|
||||||
|
width="600px"
|
||||||
|
onOpen={(e: boolean) => {
|
||||||
|
if (e) {
|
||||||
|
return Apis.Grid.Grids.Show({
|
||||||
|
id: props?.item?.id,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
setDataShow(JSON.parse(JSON.stringify(res?.data)));
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
.catch(() => false);
|
||||||
|
}
|
||||||
|
console.log(e);
|
||||||
|
}}
|
||||||
|
node={
|
||||||
|
<>
|
||||||
|
<ProCard extra={props.extra}>
|
||||||
|
<ProDescriptions bordered column={1}>
|
||||||
|
<ProDescriptions.Item label="板块名称">
|
||||||
|
<Space>{getShow?.name}</Space>
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
|
||||||
|
<ProDescriptions.Item label="楼栋单元">
|
||||||
|
{getShow?.grid_ranges
|
||||||
|
?.map(
|
||||||
|
(item: any) =>
|
||||||
|
item?.asset_building?.name + item?.asset_unit?.name,
|
||||||
|
)
|
||||||
|
.join(';')}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
|
||||||
|
<ProDescriptions.Item label="创建时间">
|
||||||
|
{getShow?.created_at}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
<ProDescriptions.Item label="最近修改">
|
||||||
|
{getShow?.updated_at}
|
||||||
|
</ProDescriptions.Item>
|
||||||
|
</ProDescriptions>
|
||||||
|
</ProCard>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -39,12 +39,30 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
}}
|
}}
|
||||||
onFinish={async (values: any) => {
|
onFinish={async (values: any) => {
|
||||||
console.log(values);
|
console.log(values);
|
||||||
// values?.grid_ranges?.map((res: { asset_projects_id: string }) => {
|
// 确保grid_ranges是正确的对象数组格式
|
||||||
// res.asset_projects_id = props?.item?.id;
|
if (
|
||||||
// });
|
values.grid_ranges &&
|
||||||
|
Array.isArray(values.grid_ranges) &&
|
||||||
|
typeof values.grid_ranges[0] === 'number'
|
||||||
|
) {
|
||||||
|
// 如果是ID数组,需要转换为对象数组
|
||||||
|
const dataSource = form.getFieldValue('_dataSource') || [];
|
||||||
|
const grid_ranges = values.grid_ranges.map((id: any) => {
|
||||||
|
const unit = dataSource.find(
|
||||||
|
(item: any) => item.asset_units_id === id.toString(),
|
||||||
|
);
|
||||||
|
return {
|
||||||
|
asset_projects_id: props?.item?.asset_projects_id,
|
||||||
|
asset_buildings_id: unit?.asset_buildings_id,
|
||||||
|
asset_units_id: id.toString(),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
values.grid_ranges = grid_ranges;
|
||||||
|
}
|
||||||
|
|
||||||
return Apis.Grid.Grids.Update({
|
return Apis.Grid.Grids.Update({
|
||||||
...values,
|
...values,
|
||||||
asset_projects_id: props?.item?.id || values?.asset_projects_id,
|
asset_projects_id: props?.item?.asset_projects_id,
|
||||||
id: props?.item?.id,
|
id: props?.item?.id,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@ -1,20 +1,25 @@
|
|||||||
import { MyBetaModalFormProps } from '@/common';
|
import { MyBetaModalFormProps } from '@/common';
|
||||||
|
import HousesShow from '@/pages/asset/dictionary/modals/HousesShow';
|
||||||
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
import { ProCard, ProDescriptions } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
|
|
||||||
export default function info(props: MyBetaModalFormProps) {
|
export default function info(props: MyBetaModalFormProps) {
|
||||||
const { item } = props;
|
const { item } = props;
|
||||||
|
|
||||||
// 添加调试日志
|
|
||||||
console.log('BillInfo props:', props);
|
|
||||||
console.log('BillInfo 11111111:', item);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Space direction="vertical" style={{ width: '100%' }}>
|
<Space direction="vertical" style={{ width: '100%' }}>
|
||||||
<ProCard title="基本信息">
|
<ProCard title="基本信息">
|
||||||
<ProDescriptions bordered>
|
<ProDescriptions bordered>
|
||||||
<ProDescriptions.Item label="房屋名称" span={2}>
|
<ProDescriptions.Item label="房屋名称" span={2}>
|
||||||
{item?.asset_house?.full_name || '-'}
|
<Space>
|
||||||
|
{item?.asset_house?.full_name || '-'}
|
||||||
|
{item?.asset_houses_id && (
|
||||||
|
<HousesShow
|
||||||
|
item={{ id: item?.asset_houses_id }}
|
||||||
|
reload={props?.reload}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
</ProDescriptions.Item>
|
</ProDescriptions.Item>
|
||||||
<ProDescriptions.Item label="应付金额">
|
<ProDescriptions.Item label="应付金额">
|
||||||
{item?.total_payable_sum || '-'}
|
{item?.total_payable_sum || '-'}
|
||||||
|
|||||||
@ -44,7 +44,9 @@ export default function Show({ title = '账单详情' }) {
|
|||||||
key: '1',
|
key: '1',
|
||||||
closable: false,
|
closable: false,
|
||||||
children: (
|
children: (
|
||||||
<UnpaidBill item={{ ...data, asset_houses_id: data.asset_houses_id }} />
|
<UnpaidBill
|
||||||
|
item={{ ...data, asset_houses_id: data?.asset_houses_id }}
|
||||||
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -52,7 +54,7 @@ export default function Show({ title = '账单详情' }) {
|
|||||||
key: '2',
|
key: '2',
|
||||||
closable: false,
|
closable: false,
|
||||||
children: (
|
children: (
|
||||||
<PaidBill item={{ ...data, asset_houses_id: data.asset_houses_id }} />
|
<PaidBill item={{ ...data, asset_houses_id: data?.asset_houses_id }} />
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -61,7 +63,7 @@ export default function Show({ title = '账单详情' }) {
|
|||||||
closable: false,
|
closable: false,
|
||||||
children: (
|
children: (
|
||||||
<CancelledBill
|
<CancelledBill
|
||||||
item={{ ...data, asset_houses_id: data.asset_houses_id }}
|
item={{ ...data, asset_houses_id: data?.asset_houses_id }}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|||||||
@ -11,11 +11,13 @@ import {
|
|||||||
HouseChargeTasksTypeEnum,
|
HouseChargeTasksTypeEnum,
|
||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import TaskCreate from './modals/TaskCreate';
|
import TaskCreate from './modals/TaskCreate';
|
||||||
import TaskShow from './modals/TaskShow';
|
import TaskShow from './modals/TaskShow';
|
||||||
|
|
||||||
export default function Index({ title = '账单任务' }) {
|
export default function Index({ title = '账单任务' }) {
|
||||||
|
const navigate = useNavigate();
|
||||||
// 注册当前页面为标签页
|
// 注册当前页面为标签页
|
||||||
usePageTabs({
|
usePageTabs({
|
||||||
tabKey: 'house_charge_tasks',
|
tabKey: 'house_charge_tasks',
|
||||||
@ -42,11 +44,17 @@ export default function Index({ title = '账单任务' }) {
|
|||||||
<TaskCreate key="Create" reload={action?.reload} title="账单任务" />,
|
<TaskCreate key="Create" reload={action?.reload} title="账单任务" />,
|
||||||
]}
|
]}
|
||||||
columns={[
|
columns={[
|
||||||
|
MyColumns.ID(),
|
||||||
{
|
{
|
||||||
title: '机构',
|
title: '机构',
|
||||||
dataIndex: ['company', 'name'],
|
dataIndex: ['company', 'name'],
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '项目',
|
||||||
|
dataIndex: ['asset_project', 'name'],
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '任务ID',
|
title: '任务ID',
|
||||||
dataIndex: 'id',
|
dataIndex: 'id',
|
||||||
@ -66,6 +74,17 @@ export default function Index({ title = '账单任务' }) {
|
|||||||
title: '收费标准',
|
title: '收费标准',
|
||||||
dataIndex: ['house_charge_standard', 'name'],
|
dataIndex: ['house_charge_standard', 'name'],
|
||||||
search: false,
|
search: false,
|
||||||
|
render: (_, record) => (
|
||||||
|
<MyButtons.View
|
||||||
|
title={record?.house_charge_standard?.name || '-'}
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
navigate(
|
||||||
|
`/charge/standard/show/${record.house_charge_standards_id}`,
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '账单月份',
|
title: '账单月份',
|
||||||
@ -99,7 +118,11 @@ export default function Index({ title = '账单任务' }) {
|
|||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<TaskShow item={item} title="查看" reload={action?.reload} />
|
<TaskShow item={item} title="查看" reload={action?.reload} />
|
||||||
<MyButtons.Default
|
<MyButtons.Default
|
||||||
title="重新执行"
|
title={
|
||||||
|
item.status === HouseChargeTasksStatusEnum.Completed.value
|
||||||
|
? '重新执行'
|
||||||
|
: '执行'
|
||||||
|
}
|
||||||
type="link"
|
type="link"
|
||||||
color="primary"
|
color="primary"
|
||||||
isConfirm
|
isConfirm
|
||||||
|
|||||||
@ -8,9 +8,11 @@ import { MyModal } from '@/components/MyModal';
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { HouseChargeTaskDetailsStatusEnum } from '@/gen/Enums';
|
import { HouseChargeTaskDetailsStatusEnum } from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
|
|
||||||
export default function AssetInfo(props: MyBetaModalFormProps) {
|
export default function TaskShow(props: MyBetaModalFormProps) {
|
||||||
|
const navigate = useNavigate();
|
||||||
return (
|
return (
|
||||||
<MyModal
|
<MyModal
|
||||||
title={props.title || '查看'}
|
title={props.title || '查看'}
|
||||||
@ -26,12 +28,22 @@ export default function AssetInfo(props: MyBetaModalFormProps) {
|
|||||||
Apis.HouseCharage.HouseChargeTaskDetails.List,
|
Apis.HouseCharage.HouseChargeTaskDetails.List,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
options={false}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
{
|
{
|
||||||
title: '对象',
|
title: '关联房屋',
|
||||||
dataIndex: 'full_name',
|
dataIndex: 'full_name',
|
||||||
search: false,
|
search: false,
|
||||||
|
render: (_, record) => (
|
||||||
|
<MyButtons.View
|
||||||
|
title={record.full_name}
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
navigate(`/bills/summary/show/${record.asset_houses_id}`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '状态',
|
title: '状态',
|
||||||
@ -52,6 +64,7 @@ export default function AssetInfo(props: MyBetaModalFormProps) {
|
|||||||
'0',
|
'0',
|
||||||
)}`;
|
)}`;
|
||||||
},
|
},
|
||||||
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '计费周期',
|
title: '计费周期',
|
||||||
|
|||||||
82
src/pages/complaint/components/WorkLogsCreate.tsx
Normal file
82
src/pages/complaint/components/WorkLogsCreate.tsx
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
import {
|
||||||
|
MyButtons,
|
||||||
|
MyFormItems,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { HouseWorkOrdersStatusEnum } from '@/gen/Enums';
|
||||||
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
|
interface WorkLogsCreateProps {
|
||||||
|
workOrderId: number;
|
||||||
|
reload?: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function WorkLogsCreate({
|
||||||
|
workOrderId,
|
||||||
|
reload,
|
||||||
|
}: WorkLogsCreateProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.WorkOrder.HouseWorkLogs.Store>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`添加处理记录`}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="600px"
|
||||||
|
trigger={<MyButtons.Create title={`添加处理记录`} />}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open) {
|
||||||
|
form.resetFields(); // 清空表单数据
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
key={new Date().getTime()}
|
||||||
|
form={form}
|
||||||
|
onFinish={async (values) => {
|
||||||
|
try {
|
||||||
|
await Apis.WorkOrder.HouseWorkLogs.Store({
|
||||||
|
...values,
|
||||||
|
house_work_orders_id: workOrderId,
|
||||||
|
});
|
||||||
|
reload?.();
|
||||||
|
message.success('添加处理记录成功');
|
||||||
|
return true;
|
||||||
|
} catch (error) {
|
||||||
|
message.error('添加处理记录失败');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
columns={[
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'status',
|
||||||
|
title: '工单状态',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
valueEnum: HouseWorkOrdersStatusEnum,
|
||||||
|
required: true,
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
key: 'description',
|
||||||
|
title: '进度描述',
|
||||||
|
valueType: 'textarea',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
fieldProps: {
|
||||||
|
rows: 4,
|
||||||
|
placeholder: '请输入处理进度描述',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MyFormItems.UploadImages({
|
||||||
|
key: 'attachments',
|
||||||
|
title: '相关图片',
|
||||||
|
uploadType: 'file',
|
||||||
|
max: 5,
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { required: false },
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
143
src/pages/complaint/components/WorkLogsLIst.tsx
Normal file
143
src/pages/complaint/components/WorkLogsLIst.tsx
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
import { MyButtons, MyColumns, MyProTableProps } from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { HouseWorkOrdersStatusEnum } from '@/gen/Enums';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { Image, Space } from 'antd';
|
||||||
|
import { useEffect, useRef } from 'react';
|
||||||
|
import WorkLogsCreate from './WorkLogsCreate';
|
||||||
|
|
||||||
|
interface WorkLogsListProps {
|
||||||
|
workOrderId: number;
|
||||||
|
reload?: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function WorkLogsList({
|
||||||
|
workOrderId,
|
||||||
|
reload,
|
||||||
|
}: WorkLogsListProps) {
|
||||||
|
const actionRef = useRef<any>();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
actionRef?.current?.reload();
|
||||||
|
}, [workOrderId]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ProTable<Record<any, any>>
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
actionRef={actionRef}
|
||||||
|
request={async (params, sort) =>
|
||||||
|
MyProTableProps.request(
|
||||||
|
{
|
||||||
|
...params,
|
||||||
|
house_work_orders_id: workOrderId,
|
||||||
|
},
|
||||||
|
sort,
|
||||||
|
Apis.WorkOrder.HouseWorkLogs.List,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
toolBarRender={(action) => [
|
||||||
|
<WorkLogsCreate
|
||||||
|
key="CreateWorkLog"
|
||||||
|
workOrderId={workOrderId}
|
||||||
|
reload={() => {
|
||||||
|
action?.reload();
|
||||||
|
reload?.();
|
||||||
|
}}
|
||||||
|
/>,
|
||||||
|
]}
|
||||||
|
search={false}
|
||||||
|
pagination={{
|
||||||
|
pageSize: 10,
|
||||||
|
showSizeChanger: false,
|
||||||
|
}}
|
||||||
|
columns={[
|
||||||
|
MyColumns.ID(),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '工单状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
valueEnum: HouseWorkOrdersStatusEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '进度描述',
|
||||||
|
dataIndex: 'description',
|
||||||
|
search: false,
|
||||||
|
ellipsis: true,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '附件',
|
||||||
|
dataIndex: 'attachments',
|
||||||
|
search: false,
|
||||||
|
render: (_, record) => {
|
||||||
|
if (
|
||||||
|
!Array.isArray(record.attachments) ||
|
||||||
|
record.attachments.length === 0
|
||||||
|
) {
|
||||||
|
return '无附件';
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
||||||
|
{record.attachments.map((item: any, index: number) => {
|
||||||
|
if (item.type && item.type.includes('image')) {
|
||||||
|
return (
|
||||||
|
<Image
|
||||||
|
key={index}
|
||||||
|
width={40}
|
||||||
|
height={30}
|
||||||
|
style={{
|
||||||
|
marginRight: 8,
|
||||||
|
marginBottom: 8,
|
||||||
|
objectFit: 'cover',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
} else if (item.type && item.type.includes('video')) {
|
||||||
|
return (
|
||||||
|
<video
|
||||||
|
key={index}
|
||||||
|
width={40}
|
||||||
|
height={30}
|
||||||
|
controls
|
||||||
|
style={{
|
||||||
|
marginRight: 8,
|
||||||
|
marginBottom: 8,
|
||||||
|
objectFit: 'cover',
|
||||||
|
}}
|
||||||
|
src={item.url}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
dataIndex: 'created_at',
|
||||||
|
valueType: 'dateTime',
|
||||||
|
search: false,
|
||||||
|
width: 160,
|
||||||
|
},
|
||||||
|
MyColumns.UpdatedAt(),
|
||||||
|
MyColumns.Option({
|
||||||
|
render: (_, item: any, index, action) => (
|
||||||
|
<Space key={index}>
|
||||||
|
<MyButtons.Delete
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.WorkOrder.HouseWorkLogs.Delete({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
184
src/pages/complaint/index.tsx
Normal file
184
src/pages/complaint/index.tsx
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
import {
|
||||||
|
MyButtons,
|
||||||
|
MyColumns,
|
||||||
|
MyPageContainer,
|
||||||
|
MyProTableProps,
|
||||||
|
usePageTabs,
|
||||||
|
} from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
HouseWorkOrdersAssignStatusEnum,
|
||||||
|
HouseWorkOrdersLevelEnum,
|
||||||
|
HouseWorkOrdersStatusEnum,
|
||||||
|
HouseWorkOrdersTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
|
import { Image, Space } from 'antd';
|
||||||
|
import ComplaintAssign from './modals/ComplaintAssign';
|
||||||
|
|
||||||
|
import ComplaintShow from './modals/ComplaintShow';
|
||||||
|
|
||||||
|
export default function Index({ title = '投诉列表' }) {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
// 注册当前页面为标签页
|
||||||
|
usePageTabs({
|
||||||
|
tabKey: 'complaint',
|
||||||
|
tabLabel: title,
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<MyPageContainer
|
||||||
|
title={title}
|
||||||
|
enableTabs={true}
|
||||||
|
tabKey="complaint"
|
||||||
|
tabLabel={title}
|
||||||
|
>
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
request={async (params, sort) =>
|
||||||
|
MyProTableProps.request(
|
||||||
|
{ ...params, type: HouseWorkOrdersTypeEnum.Complaint.value },
|
||||||
|
sort,
|
||||||
|
Apis.WorkOrder.HouseWorkOrders.List,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// toolBarRender={(action) => [
|
||||||
|
// <WorkOrderCreate
|
||||||
|
// key="Create"
|
||||||
|
// reload={action?.reload}
|
||||||
|
// title={title}
|
||||||
|
// />,
|
||||||
|
// ]}
|
||||||
|
columns={[
|
||||||
|
MyColumns.ID(),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
valueEnum: HouseWorkOrdersStatusEnum,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '描述',
|
||||||
|
dataIndex: 'content',
|
||||||
|
width: 120, // 关键:固定列宽(若父容器过窄,可设 minWidth: 200 优先保证列宽)
|
||||||
|
search: false,
|
||||||
|
render: (text) => (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: '100%', // 继承列宽
|
||||||
|
// height: '60px', // 设置固定高度,约显示3行文本
|
||||||
|
overflow: 'hidden', // 超出隐藏
|
||||||
|
textOverflow: 'ellipsis', // 省略号
|
||||||
|
display: '-webkit-box',
|
||||||
|
WebkitBoxOrient: 'vertical',
|
||||||
|
WebkitLineClamp: 1, // 显示3行
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{text}
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '附件',
|
||||||
|
dataIndex: 'attachments',
|
||||||
|
search: false,
|
||||||
|
render: (_, record) => {
|
||||||
|
if (
|
||||||
|
!Array.isArray(record.attachments) ||
|
||||||
|
record.attachments.length === 0
|
||||||
|
) {
|
||||||
|
return '无附件';
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
||||||
|
{record.attachments.map((item: any, index: number) => {
|
||||||
|
if (item.type && item.type.includes('image')) {
|
||||||
|
return (
|
||||||
|
<Image
|
||||||
|
key={index}
|
||||||
|
width={40}
|
||||||
|
height={30}
|
||||||
|
src={item.url}
|
||||||
|
style={{
|
||||||
|
marginRight: 8,
|
||||||
|
marginBottom: 8,
|
||||||
|
objectFit: 'cover',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
} else if (item.type && item.type.includes('video')) {
|
||||||
|
return (
|
||||||
|
<video
|
||||||
|
key={index}
|
||||||
|
width={40}
|
||||||
|
height={30}
|
||||||
|
controls
|
||||||
|
style={{
|
||||||
|
marginRight: 8,
|
||||||
|
marginBottom: 8,
|
||||||
|
objectFit: 'cover',
|
||||||
|
}}
|
||||||
|
src={item.url}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '分配状态',
|
||||||
|
dataIndex: 'assign_status',
|
||||||
|
valueEnum: HouseWorkOrdersAssignStatusEnum,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '优先级',
|
||||||
|
dataIndex: 'level',
|
||||||
|
valueEnum: HouseWorkOrdersLevelEnum,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '处理人',
|
||||||
|
dataIndex: ['assign_employee', 'name'],
|
||||||
|
search: false,
|
||||||
|
render: (_, record) => {
|
||||||
|
return `${record?.assign_employee?.name || ''}-${
|
||||||
|
record?.assign_employee?.phone || ''
|
||||||
|
}`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MyColumns.CreatedAt(),
|
||||||
|
MyColumns.Option({
|
||||||
|
render: (_, item: any, index, action) => (
|
||||||
|
<Space key={index}>
|
||||||
|
<ComplaintShow
|
||||||
|
item={item}
|
||||||
|
title="详情"
|
||||||
|
reload={action?.reload}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{item.assign_status === 'Unassigned' && (
|
||||||
|
<ComplaintAssign
|
||||||
|
item={item}
|
||||||
|
reload={action?.reload}
|
||||||
|
title="分配"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<MyButtons.Delete
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.WorkOrder.HouseWorkOrders.SoftDelete({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</MyPageContainer>
|
||||||
|
);
|
||||||
|
}
|
||||||
88
src/pages/complaint/modals/ComplaintAssign.tsx
Normal file
88
src/pages/complaint/modals/ComplaintAssign.tsx
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyFormItems,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Selects } from '@/components/Select';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { HouseWorkOrdersLevelEnum } from '@/gen/Enums';
|
||||||
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
|
export default function WorkOrderAssign(
|
||||||
|
props: MyBetaModalFormProps & { item: any },
|
||||||
|
) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.WorkOrder.HouseWorkOrders.Assign>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`派发工单`}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="500px"
|
||||||
|
trigger={<MyButtons.Edit title={`派发`} />}
|
||||||
|
key={new Date().getTime()}
|
||||||
|
form={form}
|
||||||
|
request={async () => {
|
||||||
|
const res = await Apis.WorkOrder.HouseWorkOrders.Show({
|
||||||
|
id: props.item.id,
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
title: res.data.title,
|
||||||
|
assign_employee_id: res.data.assign_employee_id,
|
||||||
|
};
|
||||||
|
}}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.WorkOrder.HouseWorkOrders.Assign({
|
||||||
|
...values,
|
||||||
|
id: props.item.id,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success('指派工单成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
key: 'content',
|
||||||
|
title: '工单描述',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
readonly: true,
|
||||||
|
fieldProps: {
|
||||||
|
disabled: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'level',
|
||||||
|
title: '优先级',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
valueEnum: HouseWorkOrdersLevelEnum,
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
Selects?.Employees({
|
||||||
|
title: '选择处理人',
|
||||||
|
key: 'assign_employees_id',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
params: {
|
||||||
|
companies_id: props.item.companies_id,
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
key: 'assign_remark',
|
||||||
|
title: '指派备注',
|
||||||
|
valueType: 'textarea',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
fieldProps: {
|
||||||
|
rows: 3,
|
||||||
|
placeholder: '请输入指派备注(可选)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
251
src/pages/complaint/modals/ComplaintShow.tsx
Normal file
251
src/pages/complaint/modals/ComplaintShow.tsx
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
import { MyButtons } from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
HouseWorkOrdersAssignStatusEnum,
|
||||||
|
HouseWorkOrdersLevelEnum,
|
||||||
|
HouseWorkOrdersStatusEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import { ProDescriptions } from '@ant-design/pro-components';
|
||||||
|
import { Image, Modal, Space, Tag } from 'antd';
|
||||||
|
import { useState } from 'react';
|
||||||
|
import WorkLogsList from '../components/WorkLogsLIst';
|
||||||
|
import WorkOrderAssign from './ComplaintAssign';
|
||||||
|
|
||||||
|
interface WorkOrderShowProps {
|
||||||
|
item: any;
|
||||||
|
title?: string;
|
||||||
|
reload?: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function ComplaintShow({
|
||||||
|
item,
|
||||||
|
title = '投诉详情',
|
||||||
|
reload,
|
||||||
|
}: WorkOrderShowProps) {
|
||||||
|
const [open, setOpen] = useState(false);
|
||||||
|
const [data, setData] = useState<any>(null);
|
||||||
|
|
||||||
|
const handleOpen = async () => {
|
||||||
|
try {
|
||||||
|
const res = await Apis.WorkOrder.HouseWorkOrders.Show({ id: item.id });
|
||||||
|
setData(res.data);
|
||||||
|
setOpen(true);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取投诉详情失败:', error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<MyButtons.Default onClick={handleOpen} title={title} />
|
||||||
|
<Modal
|
||||||
|
title={title}
|
||||||
|
open={open}
|
||||||
|
onCancel={() => setOpen(false)}
|
||||||
|
footer={null}
|
||||||
|
width={800}
|
||||||
|
>
|
||||||
|
{data && (
|
||||||
|
<>
|
||||||
|
<ProDescriptions
|
||||||
|
column={2}
|
||||||
|
dataSource={data}
|
||||||
|
columns={[
|
||||||
|
// {
|
||||||
|
// title: '工单类型',
|
||||||
|
// dataIndex: 'type',
|
||||||
|
// span: 1,
|
||||||
|
// render: (_, record) => (
|
||||||
|
// <Tag color="blue">
|
||||||
|
// {HouseWorkOrdersTypeEnum[
|
||||||
|
// record.type as keyof typeof HouseWorkOrdersTypeEnum
|
||||||
|
// ]?.text || record.type}
|
||||||
|
// </Tag>
|
||||||
|
// ),
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '报修位置',
|
||||||
|
// dataIndex: 'location',
|
||||||
|
// span: 1,
|
||||||
|
// render: (_, record) => {
|
||||||
|
// const locationConfig =
|
||||||
|
// HouseWorkOrdersLocationEnum[
|
||||||
|
// record.location as keyof typeof HouseWorkOrdersLocationEnum
|
||||||
|
// ];
|
||||||
|
|
||||||
|
// return <Tag>{locationConfig?.text || record.location}</Tag>;
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
|
||||||
|
{
|
||||||
|
title: 'ID',
|
||||||
|
dataIndex: 'id',
|
||||||
|
span: 1,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '投诉描述',
|
||||||
|
dataIndex: 'content',
|
||||||
|
span: 2,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '投诉状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
span: 1,
|
||||||
|
render: (_, record) => {
|
||||||
|
const statusConfig =
|
||||||
|
HouseWorkOrdersStatusEnum[
|
||||||
|
record.status as keyof typeof HouseWorkOrdersStatusEnum
|
||||||
|
];
|
||||||
|
const color =
|
||||||
|
record.status === 'Completed'
|
||||||
|
? 'green'
|
||||||
|
: record.status === 'InProgress'
|
||||||
|
? 'blue'
|
||||||
|
: 'default';
|
||||||
|
return (
|
||||||
|
<Tag color={color}>
|
||||||
|
{statusConfig?.text || record.status}
|
||||||
|
</Tag>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '分配状态',
|
||||||
|
dataIndex: 'assign_status',
|
||||||
|
span: 1,
|
||||||
|
render: (_, record) => {
|
||||||
|
const assignConfig =
|
||||||
|
HouseWorkOrdersAssignStatusEnum[
|
||||||
|
record.assign_status as keyof typeof HouseWorkOrdersAssignStatusEnum
|
||||||
|
];
|
||||||
|
const color =
|
||||||
|
record.assign_status === 'Assigned' ? 'green' : 'orange';
|
||||||
|
return (
|
||||||
|
<Tag color={color}>
|
||||||
|
{assignConfig?.text || record.assign_status}
|
||||||
|
</Tag>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '优先级',
|
||||||
|
dataIndex: 'level',
|
||||||
|
span: 1,
|
||||||
|
render: (_, record) => {
|
||||||
|
const levelConfig =
|
||||||
|
HouseWorkOrdersLevelEnum[
|
||||||
|
record.level as keyof typeof HouseWorkOrdersLevelEnum
|
||||||
|
];
|
||||||
|
return <Tag>{levelConfig?.text || record.level}</Tag>;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '处理人',
|
||||||
|
dataIndex: 'assign_employee_name',
|
||||||
|
span: 1,
|
||||||
|
render: (_, record) => {
|
||||||
|
const assigneeInfo = record?.assign_employee
|
||||||
|
? `${record.assign_employee.name || ''}-${
|
||||||
|
record.assign_employee.phone || ''
|
||||||
|
}`
|
||||||
|
: '未分配';
|
||||||
|
return (
|
||||||
|
<Space>
|
||||||
|
<span>{assigneeInfo}</span>
|
||||||
|
<WorkOrderAssign
|
||||||
|
item={item}
|
||||||
|
reload={handleOpen}
|
||||||
|
title="重新分配"
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
dataIndex: 'created_at',
|
||||||
|
span: 1,
|
||||||
|
valueType: 'dateTime',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '更新时间',
|
||||||
|
dataIndex: 'updated_at',
|
||||||
|
span: 1,
|
||||||
|
valueType: 'dateTime',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '相关附件',
|
||||||
|
dataIndex: 'attachments',
|
||||||
|
span: 2,
|
||||||
|
render: (_, record) => {
|
||||||
|
// 检查attachments是否为数组且有数据
|
||||||
|
if (
|
||||||
|
!Array.isArray(record.attachments) ||
|
||||||
|
record.attachments.length === 0
|
||||||
|
) {
|
||||||
|
return '无附件';
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: 'flex',
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
marginRight: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{record.attachments.map((item: any, index: number) => {
|
||||||
|
if (item.type && item.type.includes('image')) {
|
||||||
|
return (
|
||||||
|
<Image
|
||||||
|
key={index}
|
||||||
|
width={120}
|
||||||
|
height={90}
|
||||||
|
src={item.url}
|
||||||
|
style={{
|
||||||
|
marginRight: 8,
|
||||||
|
marginBottom: 8,
|
||||||
|
objectFit: 'cover',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
} else if (item.type && item.type.includes('video')) {
|
||||||
|
return (
|
||||||
|
<video
|
||||||
|
key={index}
|
||||||
|
width={120}
|
||||||
|
height={90}
|
||||||
|
controls
|
||||||
|
style={{
|
||||||
|
marginRight: 8,
|
||||||
|
marginBottom: 8,
|
||||||
|
objectFit: 'cover',
|
||||||
|
}}
|
||||||
|
src={item.url}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
{/* <Divider orientation="left">处理记录</Divider> */}
|
||||||
|
<WorkLogsList
|
||||||
|
workOrderId={data.id}
|
||||||
|
reload={() => {
|
||||||
|
handleOpen();
|
||||||
|
reload?.();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Modal>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -1,6 +1,10 @@
|
|||||||
import { MyBetaModalFormProps, MyColumns, MyProTableProps } from '@/common';
|
import { MyBetaModalFormProps, MyColumns, MyProTableProps } from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { HouseMeterReadingsOperationTypeEnum } from '@/gen/Enums';
|
import {
|
||||||
|
HouseOccupantsHouseRelationEnum,
|
||||||
|
HouseOccupantsRelationWithOwnerEnum,
|
||||||
|
HouseOccupantsStatusEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
|
||||||
export default function Index(props: MyBetaModalFormProps) {
|
export default function Index(props: MyBetaModalFormProps) {
|
||||||
@ -19,42 +23,45 @@ export default function Index(props: MyBetaModalFormProps) {
|
|||||||
// search={false}
|
// search={false}
|
||||||
// options={false}
|
// options={false}
|
||||||
columns={[
|
columns={[
|
||||||
|
{
|
||||||
|
title: '项目名称',
|
||||||
|
dataIndex: ['asset_house', 'full_name'],
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '操作类型',
|
title: '状态',
|
||||||
dataIndex: 'operation_type',
|
dataIndex: 'status',
|
||||||
valueEnum: HouseMeterReadingsOperationTypeEnum,
|
valueEnum: HouseOccupantsStatusEnum,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '房客关系',
|
||||||
|
dataIndex: 'house_relation',
|
||||||
|
valueEnum: HouseOccupantsHouseRelationEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '与产权人关系',
|
||||||
|
dataIndex: 'relation_with_owner',
|
||||||
|
valueEnum: HouseOccupantsRelationWithOwnerEnum,
|
||||||
|
search: false,
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
title: '抄表读数',
|
title: '入住日期',
|
||||||
dataIndex: 'current_reading',
|
dataIndex: 'is_live_in',
|
||||||
|
render(_, record) {
|
||||||
|
return `${record?.move_in_date || '未入住'}`;
|
||||||
|
},
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '抄表用量',
|
title: '退房日期',
|
||||||
dataIndex: 'usage_amount',
|
dataIndex: 'move_out_date',
|
||||||
search: false,
|
render(_, record) {
|
||||||
},
|
return `${record?.move_out_date || '-'}`;
|
||||||
{
|
},
|
||||||
title: '抄表时间',
|
|
||||||
dataIndex: 'reading_time',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '抄表人',
|
|
||||||
dataIndex: ['company_employee', 'name'],
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '备注',
|
|
||||||
dataIndex: 'remark',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '账单状态',
|
|
||||||
dataIndex: 'bill_status',
|
|
||||||
render: (value) => (value ? '已生成' : '未生成'),
|
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
// MyColumns.Option({
|
// MyColumns.Option({
|
||||||
// render: (_, item: any, index, action) => (
|
// render: (_, item: any, index, action) => (
|
||||||
// <Space key={index}>
|
// <Space key={index}>
|
||||||
|
|||||||
@ -14,7 +14,7 @@ export default function Show({ title = '客户档案' }) {
|
|||||||
// 注册标签页
|
// 注册标签页
|
||||||
const { addTab } = usePageTabs({
|
const { addTab } = usePageTabs({
|
||||||
tabKey: `customer-detail-${id}`,
|
tabKey: `customer-detail-${id}`,
|
||||||
tabLabel: `${data?.name}档案` || title,
|
tabLabel: `客户:${data?.name}` || title,
|
||||||
});
|
});
|
||||||
|
|
||||||
const loadShow = () => {
|
const loadShow = () => {
|
||||||
@ -56,7 +56,12 @@ export default function Show({ title = '客户档案' }) {
|
|||||||
<MyPageContainer title={title}>
|
<MyPageContainer title={title}>
|
||||||
<CustomerInfo item={data} reload={loadShow} />
|
<CustomerInfo item={data} reload={loadShow} />
|
||||||
<ProCard style={{ marginTop: 16 }}>
|
<ProCard style={{ marginTop: 16 }}>
|
||||||
<Tabs type="card" items={items} defaultActiveKey="1" size="small" />
|
<Tabs
|
||||||
|
type="card"
|
||||||
|
items={data?.id ? items : []}
|
||||||
|
defaultActiveKey="1"
|
||||||
|
size="small"
|
||||||
|
/>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
</MyPageContainer>
|
</MyPageContainer>
|
||||||
);
|
);
|
||||||
|
|||||||
111
src/pages/meter/bills/index.tsx
Normal file
111
src/pages/meter/bills/index.tsx
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
import {
|
||||||
|
MyButtons,
|
||||||
|
MyColumns,
|
||||||
|
MyPageContainer,
|
||||||
|
MyProTableProps,
|
||||||
|
usePageTabs,
|
||||||
|
} from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { HouseChargeTaskDetailsStatusEnum } from '@/gen/Enums';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
|
||||||
|
export default function Index({ title = '仪表账单' }) {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
// 注册当前页面为标签页
|
||||||
|
usePageTabs({
|
||||||
|
tabKey: 'house_meter_bills',
|
||||||
|
tabLabel: title,
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<MyPageContainer
|
||||||
|
title={title}
|
||||||
|
enableTabs={true}
|
||||||
|
tabKey="house_meter_bills"
|
||||||
|
tabLabel={title}
|
||||||
|
>
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
request={async (params, sort) =>
|
||||||
|
MyProTableProps.request(
|
||||||
|
params,
|
||||||
|
sort,
|
||||||
|
Apis.Meter.HouseMeterTaskDetails.List,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// toolBarRender={(action) => [
|
||||||
|
// <TaskCreate key="Create" reload={action?.reload} title="账单任务" />,
|
||||||
|
// ]}
|
||||||
|
columns={[
|
||||||
|
MyColumns.ID(),
|
||||||
|
{
|
||||||
|
title: '仪表名称',
|
||||||
|
dataIndex: ['meter_data', 'name'],
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '关联房屋',
|
||||||
|
dataIndex: 'full_name',
|
||||||
|
search: false,
|
||||||
|
render: (_, record) => (
|
||||||
|
<MyButtons.View
|
||||||
|
title={record.full_name}
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
navigate(`/bills/summary/show/${record.asset_houses_id}`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
valueEnum: HouseChargeTaskDetailsStatusEnum,
|
||||||
|
}),
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '收费标准',
|
||||||
|
dataIndex: ['charge_standard', 'name'],
|
||||||
|
render: (_, record) => {
|
||||||
|
return `【${record.charge_standard.id}】${record.charge_standard.name}`;
|
||||||
|
},
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '账单月份',
|
||||||
|
render: (_, record) => {
|
||||||
|
return `${record.year}-${String(record.month).padStart(2, '0')}`;
|
||||||
|
},
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '完成时间',
|
||||||
|
dataIndex: 'processed_time',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
MyColumns.Option({
|
||||||
|
render: (_, item: any, index, action) => (
|
||||||
|
<Space key={index}>
|
||||||
|
<MyButtons.Default
|
||||||
|
title="重新执行"
|
||||||
|
type="link"
|
||||||
|
color="primary"
|
||||||
|
isConfirm
|
||||||
|
description="确认执行此任务吗?"
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.HouseCharage.HouseChargeTaskDetails.CreateHouseBill({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</MyPageContainer>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -44,13 +44,22 @@ export default function Index({ title = '仪表管理' }) {
|
|||||||
toolBarRender={(action) => [
|
toolBarRender={(action) => [
|
||||||
<MyImportModal
|
<MyImportModal
|
||||||
key="ImportHouse"
|
key="ImportHouse"
|
||||||
title="批量导入"
|
title="导入仪表"
|
||||||
type="danger"
|
type="danger"
|
||||||
size="middle"
|
size="middle"
|
||||||
templateApi={Apis.Meter.HouseMeters.DownloadTemplate}
|
templateApi={Apis.Meter.HouseMeters.DownloadTemplate}
|
||||||
importApi={Apis.Meter.HouseMeters.Import}
|
importApi={Apis.Meter.HouseMeters.Import}
|
||||||
reload={action?.reload}
|
reload={action?.reload}
|
||||||
/>,
|
/>,
|
||||||
|
<MyImportModal
|
||||||
|
key="ImportHouse"
|
||||||
|
title="导入关联房屋"
|
||||||
|
type="danger"
|
||||||
|
size="middle"
|
||||||
|
templateApi={Apis.Meter.HouseMeterHasHouses.DownloadTemplate}
|
||||||
|
importApi={Apis.Meter.HouseMeterHasHouses.Import}
|
||||||
|
reload={action?.reload}
|
||||||
|
/>,
|
||||||
<CompanyCreate key="Create" reload={action?.reload} title={title} />,
|
<CompanyCreate key="Create" reload={action?.reload} title={title} />,
|
||||||
]}
|
]}
|
||||||
columns={[
|
columns={[
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import { useEffect, useState } from 'react';
|
|||||||
import MeteInfo from '../components/MeteInfo';
|
import MeteInfo from '../components/MeteInfo';
|
||||||
import HasHouse from '../table/HasHouse';
|
import HasHouse from '../table/HasHouse';
|
||||||
import ReadingLIst from '../table/ReadingLIst';
|
import ReadingLIst from '../table/ReadingLIst';
|
||||||
|
import Tasks from '../table/Tasks';
|
||||||
|
|
||||||
export default function Show({ title = '仪表详情' }) {
|
export default function Show({ title = '仪表详情' }) {
|
||||||
const { id } = useParams<{ id: string }>();
|
const { id } = useParams<{ id: string }>();
|
||||||
@ -58,6 +59,12 @@ export default function Show({ title = '仪表详情' }) {
|
|||||||
closable: false,
|
closable: false,
|
||||||
children: <HasHouse item={{ ...data, id: id }} />,
|
children: <HasHouse item={{ ...data, id: id }} />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '仪表任务',
|
||||||
|
key: '3',
|
||||||
|
closable: false,
|
||||||
|
children: <Tasks item={{ ...data, id: id }} />,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import { ProTable } from '@ant-design/pro-components';
|
|||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import MeterHasHouse from '../../list/modals/MeterHasHouse';
|
import MeterHasHouse from '../../list/modals/MeterHasHouse';
|
||||||
import MeterHasOne from '../../list/modals/MeterHasOne';
|
import MeterHasOne from '../../list/modals/MeterHasOne';
|
||||||
import NormalReading from '../modals/NormalReading';
|
|
||||||
|
|
||||||
export default function Index(props: MyBetaModalFormProps) {
|
export default function Index(props: MyBetaModalFormProps) {
|
||||||
return (
|
return (
|
||||||
@ -25,12 +24,6 @@ export default function Index(props: MyBetaModalFormProps) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
toolBarRender={(action) => [
|
toolBarRender={(action) => [
|
||||||
<NormalReading
|
|
||||||
key="Create"
|
|
||||||
reload={action?.reload}
|
|
||||||
item={props?.item}
|
|
||||||
title="抄表"
|
|
||||||
/>,
|
|
||||||
...(props?.item?.meter_type ===
|
...(props?.item?.meter_type ===
|
||||||
HouseMetersMeterTypeEnum.HouseMeter.value
|
HouseMetersMeterTypeEnum.HouseMeter.value
|
||||||
? [
|
? [
|
||||||
|
|||||||
111
src/pages/meter/readings/table/Tasks.tsx
Normal file
111
src/pages/meter/readings/table/Tasks.tsx
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyColumns,
|
||||||
|
MyProTableProps,
|
||||||
|
} from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { HouseChargeTaskDetailsStatusEnum } from '@/gen/Enums';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
|
||||||
|
export default function Index(props: MyBetaModalFormProps) {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
request={async (params, sort) =>
|
||||||
|
MyProTableProps.request(
|
||||||
|
{ ...params, id: props?.item?.id },
|
||||||
|
sort,
|
||||||
|
Apis.Meter.HouseMeterTaskDetails.List,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// toolBarRender={(action) => [
|
||||||
|
// <NormalReading
|
||||||
|
// key="Create"
|
||||||
|
// reload={action?.reload}
|
||||||
|
// item={props?.item}
|
||||||
|
// title="抄表"
|
||||||
|
// />,
|
||||||
|
// <ResetReading
|
||||||
|
// key="Reset"
|
||||||
|
// reload={action?.reload}
|
||||||
|
// item={props?.item}
|
||||||
|
// title="重置"
|
||||||
|
// />,
|
||||||
|
// ]}
|
||||||
|
// search={false}
|
||||||
|
// options={false}
|
||||||
|
columns={[
|
||||||
|
MyColumns.ID(),
|
||||||
|
{
|
||||||
|
title: '仪表名称',
|
||||||
|
dataIndex: ['meter_data', 'name'],
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '关联房屋',
|
||||||
|
dataIndex: 'full_name',
|
||||||
|
search: false,
|
||||||
|
render: (_, record) => (
|
||||||
|
<MyButtons.View
|
||||||
|
title={record.full_name}
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
navigate(`/bills/summary/show/${record.asset_houses_id}`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
valueEnum: HouseChargeTaskDetailsStatusEnum,
|
||||||
|
}),
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '收费标准',
|
||||||
|
dataIndex: ['charge_standard', 'name'],
|
||||||
|
render: (_, record) => {
|
||||||
|
return `【${record.charge_standard.id}】${record.charge_standard.name}`;
|
||||||
|
},
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '账单月份',
|
||||||
|
render: (_, record) => {
|
||||||
|
return `${record.year}-${String(record.month).padStart(2, '0')}`;
|
||||||
|
},
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '完成时间',
|
||||||
|
dataIndex: 'processed_time',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
MyColumns.Option({
|
||||||
|
render: (_, item: any, index, action) => (
|
||||||
|
<Space key={index}>
|
||||||
|
<MyButtons.Default
|
||||||
|
title="重新执行"
|
||||||
|
type="link"
|
||||||
|
color="primary"
|
||||||
|
isConfirm
|
||||||
|
description="确认执行此任务吗?"
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.HouseCharage.HouseChargeTaskDetails.CreateHouseBill({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -8,14 +8,14 @@ import {
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import {
|
import {
|
||||||
HouseChargeTasksStatusEnum,
|
HouseChargeTasksStatusEnum,
|
||||||
HouseChargeTasksTypeEnum,
|
HouseMeterTasksGenerationMethodEnum,
|
||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import TaskCreate from './modals/TaskCreate';
|
import TaskCreate from './modals/TaskCreate';
|
||||||
import TaskShow from './modals/TaskShow';
|
import TaskShow from './modals/TaskShow';
|
||||||
|
|
||||||
export default function Index({ title = '仪表账单' }) {
|
export default function Index({ title = '仪表任务' }) {
|
||||||
// 注册当前页面为标签页
|
// 注册当前页面为标签页
|
||||||
usePageTabs({
|
usePageTabs({
|
||||||
tabKey: 'house_meter_tasks',
|
tabKey: 'house_meter_tasks',
|
||||||
@ -38,31 +38,32 @@ export default function Index({ title = '仪表账单' }) {
|
|||||||
<TaskCreate key="Create" reload={action?.reload} title="账单任务" />,
|
<TaskCreate key="Create" reload={action?.reload} title="账单任务" />,
|
||||||
]}
|
]}
|
||||||
columns={[
|
columns={[
|
||||||
|
MyColumns.ID(),
|
||||||
{
|
{
|
||||||
title: '机构',
|
title: '机构',
|
||||||
dataIndex: ['company', 'name'],
|
dataIndex: ['company', 'name'],
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '任务ID',
|
title: '项目',
|
||||||
dataIndex: 'id',
|
dataIndex: ['asset_project', 'name'],
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '创建类型',
|
|
||||||
dataIndex: 'type',
|
|
||||||
valueEnum: HouseChargeTasksTypeEnum,
|
|
||||||
}),
|
|
||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '任务状态',
|
title: '任务状态',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
valueEnum: HouseChargeTasksStatusEnum,
|
valueEnum: HouseChargeTasksStatusEnum,
|
||||||
}),
|
}),
|
||||||
{
|
MyColumns.EnumTag({
|
||||||
title: '收费标准',
|
title: '生成方式',
|
||||||
dataIndex: ['house_charge_standard', 'name'],
|
dataIndex: 'generation_method',
|
||||||
search: false,
|
valueEnum: HouseMeterTasksGenerationMethodEnum,
|
||||||
},
|
}),
|
||||||
|
// {
|
||||||
|
// title: '收费标准',
|
||||||
|
// dataIndex: ['house_charge_standard', 'name'],
|
||||||
|
// search: false,
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
title: '账单月份',
|
title: '账单月份',
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
@ -88,19 +89,37 @@ export default function Index({ title = '仪表账单' }) {
|
|||||||
dataIndex: 'task_count',
|
dataIndex: 'task_count',
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
// MyColumns.UpdatedAt(),
|
MyColumns.UpdatedAt(),
|
||||||
MyColumns.CreatedAt(),
|
// MyColumns.CreatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<TaskShow item={item} title="查看" reload={action?.reload} />
|
<TaskShow item={item} title="查看" reload={action?.reload} />
|
||||||
<MyButtons.Delete
|
<MyButtons.Default
|
||||||
|
title={
|
||||||
|
item.status ===
|
||||||
|
HouseChargeTasksStatusEnum.Completed.value ||
|
||||||
|
item.status === HouseChargeTasksStatusEnum.Failed.value
|
||||||
|
? '重新执行'
|
||||||
|
: '执行'
|
||||||
|
}
|
||||||
|
type="link"
|
||||||
|
color="primary"
|
||||||
|
isConfirm
|
||||||
|
description="是否重新执行此任务?"
|
||||||
onConfirm={() =>
|
onConfirm={() =>
|
||||||
Apis.HouseCharage.HouseChargeTasks.Delete({
|
Apis.Meter.HouseMeterTasks.ExecuteMeterTasks({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
}).then(() => action?.reload())
|
}).then(() => action?.reload())
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
{/* <MyButtons.Delete
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.Meter.HouseMeterTasks.Delete({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -1,10 +1,18 @@
|
|||||||
import { MyBetaModalFormProps, MyColumns, MyProTableProps } from '@/common';
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyColumns,
|
||||||
|
MyProTableProps,
|
||||||
|
} from '@/common';
|
||||||
import { MyModal } from '@/components/MyModal';
|
import { MyModal } from '@/components/MyModal';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { HouseChargeTaskDetailsStatusEnum } from '@/gen/Enums';
|
import { HouseChargeTaskDetailsStatusEnum } from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
|
||||||
export default function AssetInfo(props: MyBetaModalFormProps) {
|
export default function TaskShow(props: MyBetaModalFormProps) {
|
||||||
|
const navigate = useNavigate();
|
||||||
return (
|
return (
|
||||||
<MyModal
|
<MyModal
|
||||||
title={props.title || '查看'}
|
title={props.title || '查看'}
|
||||||
@ -15,17 +23,32 @@ export default function AssetInfo(props: MyBetaModalFormProps) {
|
|||||||
{...MyProTableProps.props}
|
{...MyProTableProps.props}
|
||||||
request={async (params, sort) =>
|
request={async (params, sort) =>
|
||||||
MyProTableProps.request(
|
MyProTableProps.request(
|
||||||
{ ...params, house_charge_tasks_id: props?.item?.id },
|
{ ...params, house_meter_task_id: props?.item?.id },
|
||||||
sort,
|
sort,
|
||||||
Apis.Meter.HouseMeterTasks.List,
|
Apis.Meter.HouseMeterTaskDetails.List,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
options={false}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
{
|
{
|
||||||
title: '对象',
|
title: '仪表名称',
|
||||||
|
dataIndex: ['meter_data', 'name'],
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '关联房屋',
|
||||||
dataIndex: 'full_name',
|
dataIndex: 'full_name',
|
||||||
search: false,
|
search: false,
|
||||||
|
render: (_, record) => (
|
||||||
|
<MyButtons.View
|
||||||
|
title={record.full_name}
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
navigate(`/bills/summary/show/${record.asset_houses_id}`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
MyColumns.EnumTag({
|
MyColumns.EnumTag({
|
||||||
title: '状态',
|
title: '状态',
|
||||||
@ -35,7 +58,10 @@ export default function AssetInfo(props: MyBetaModalFormProps) {
|
|||||||
|
|
||||||
{
|
{
|
||||||
title: '收费标准',
|
title: '收费标准',
|
||||||
dataIndex: ['house_charge_task', 'house_charge_standard', 'name'],
|
dataIndex: ['charge_standard', 'name'],
|
||||||
|
render: (_, record) => {
|
||||||
|
return `【${record.charge_standard.id}】${record.charge_standard.name}`;
|
||||||
|
},
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -46,14 +72,6 @@ export default function AssetInfo(props: MyBetaModalFormProps) {
|
|||||||
'0',
|
'0',
|
||||||
)}`;
|
)}`;
|
||||||
},
|
},
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '计费周期',
|
|
||||||
render: (_, record) => {
|
|
||||||
return `${record.house_charge_task.start_date} 至 ${String(
|
|
||||||
record.house_charge_task.end_date,
|
|
||||||
).padStart(2, '0')}`;
|
|
||||||
},
|
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -61,6 +79,24 @@ export default function AssetInfo(props: MyBetaModalFormProps) {
|
|||||||
dataIndex: 'processed_time',
|
dataIndex: 'processed_time',
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
|
MyColumns.Option({
|
||||||
|
render: (_, item: any, index, action) => (
|
||||||
|
<Space key={index}>
|
||||||
|
<MyButtons.Default
|
||||||
|
title="重新执行"
|
||||||
|
type="link"
|
||||||
|
color="primary"
|
||||||
|
isConfirm
|
||||||
|
description="确认执行此任务吗?"
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.HouseCharage.HouseChargeTaskDetails.CreateHouseBill({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
MyButtons,
|
||||||
MyColumns,
|
MyColumns,
|
||||||
MyPageContainer,
|
MyPageContainer,
|
||||||
MyProTableProps,
|
MyProTableProps,
|
||||||
@ -10,8 +11,10 @@ import {
|
|||||||
HouseOrdersPaymentMethodEnum,
|
HouseOrdersPaymentMethodEnum,
|
||||||
} from '@/gen/Enums';
|
} from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
import Payments from './modals/Payments';
|
||||||
|
|
||||||
export default function Index({ title = '支付明细' }) {
|
export default function Index({ title = '支付订单' }) {
|
||||||
// 注册当前页面为标签页
|
// 注册当前页面为标签页
|
||||||
usePageTabs({
|
usePageTabs({
|
||||||
tabKey: 'house_order',
|
tabKey: 'house_order',
|
||||||
@ -44,10 +47,10 @@ export default function Index({ title = '支付明细' }) {
|
|||||||
// importApi={Apis.Bill.HouseBills.Import}
|
// importApi={Apis.Bill.HouseBills.Import}
|
||||||
// reload={action?.reload}
|
// reload={action?.reload}
|
||||||
// />,
|
// />,
|
||||||
// <BillCreate key="Create" reload={action?.reload} title={title} />,
|
|
||||||
// ]}
|
// ]}
|
||||||
columns={[
|
columns={[
|
||||||
// MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '订单号',
|
title: '订单号',
|
||||||
dataIndex: 'order_code',
|
dataIndex: 'order_code',
|
||||||
@ -63,32 +66,22 @@ export default function Index({ title = '支付明细' }) {
|
|||||||
dataIndex: 'order_status',
|
dataIndex: 'order_status',
|
||||||
valueEnum: HouseOrdersOrderStatusEnum,
|
valueEnum: HouseOrdersOrderStatusEnum,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// {
|
|
||||||
// title: '支付单号',
|
|
||||||
// dataIndex: 'payment_no',
|
|
||||||
// search: false,
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
title: '应收金额',
|
title: '应收金额',
|
||||||
|
dataIndex: 'amount',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '实收金额',
|
||||||
dataIndex: 'actual_paid_amount',
|
dataIndex: 'actual_paid_amount',
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '滞纳金',
|
title: '退款金额',
|
||||||
dataIndex: 'late_fee',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '退款总金额',
|
|
||||||
dataIndex: 'refund_amount',
|
dataIndex: 'refund_amount',
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '实缴金额',
|
|
||||||
dataIndex: 'actual_paid_amount',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '收款账号',
|
title: '收款账号',
|
||||||
dataIndex: ['house_order_items', 'receipt_account'],
|
dataIndex: ['house_order_items', 'receipt_account'],
|
||||||
@ -114,20 +107,20 @@ export default function Index({ title = '支付明细' }) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// MyColumns.CreatedAt(),
|
// MyColumns.CreatedAt(),
|
||||||
// MyColumns.Option({
|
MyColumns.Option({
|
||||||
// render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
// <Space key={index}>
|
<Space key={index}>
|
||||||
// <BillUpdate item={item} reload={action?.reload} title={title} />
|
<Payments item={item} title="查看" reload={action?.reload} />
|
||||||
// <MyButtons.Delete
|
<MyButtons.Delete
|
||||||
// onConfirm={() =>
|
onConfirm={() =>
|
||||||
// Apis.Common.Admins.Delete({ id: item.id }).then(() =>
|
Apis.Common.Admins.Delete({ id: item.id }).then(() =>
|
||||||
// action?.reload(),
|
action?.reload(),
|
||||||
// )
|
)
|
||||||
// }
|
}
|
||||||
// />
|
/>
|
||||||
// </Space>
|
</Space>
|
||||||
// ),
|
),
|
||||||
// }),
|
}),
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</MyPageContainer>
|
</MyPageContainer>
|
||||||
79
src/pages/order/list/modals/Payments.tsx
Normal file
79
src/pages/order/list/modals/Payments.tsx
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
import { MyBetaModalFormProps, MyColumns, MyProTableProps } from '@/common';
|
||||||
|
import { MyModal } from '@/components/MyModal';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
HouseOrdersOrderStatusEnum,
|
||||||
|
HouseOrdersPaymentMethodEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { useNavigate } from '@umijs/max';
|
||||||
|
|
||||||
|
export default function TaskShow(props: MyBetaModalFormProps) {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
return (
|
||||||
|
<MyModal
|
||||||
|
title={props.title || '查看'}
|
||||||
|
type={props.item?.type || 'primary'}
|
||||||
|
width="1000px"
|
||||||
|
node={
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
request={async (params, sort) =>
|
||||||
|
MyProTableProps.request(
|
||||||
|
{ ...params, house_orders_id: props?.item?.id },
|
||||||
|
sort,
|
||||||
|
Apis.HouseOrder.HouseOrderPayments.List,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// options={false}
|
||||||
|
columns={[
|
||||||
|
MyColumns.ID(),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '支付状态',
|
||||||
|
dataIndex: 'payment_status',
|
||||||
|
valueEnum: HouseOrdersOrderStatusEnum,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '支付方式',
|
||||||
|
dataIndex: 'payment_method',
|
||||||
|
valueEnum: HouseOrdersPaymentMethodEnum,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '账单金额',
|
||||||
|
dataIndex: 'amount',
|
||||||
|
render: (value: any) => `${value / 100}元`,
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '实际金额',
|
||||||
|
dataIndex: 'actual_amount',
|
||||||
|
render: (value: any) => `${value / 100}元`,
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '支付人',
|
||||||
|
render: (record: any) =>
|
||||||
|
`${record?.customer?.name || ''}${
|
||||||
|
record?.customer?.phone || ''
|
||||||
|
}`,
|
||||||
|
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备注',
|
||||||
|
dataIndex: 'remark',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '支付单号',
|
||||||
|
dataIndex: 'payment_no',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
MyColumns.UpdatedAt(),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -5,6 +5,10 @@ import {
|
|||||||
usePageTabs,
|
usePageTabs,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
HouseOrdersOrderStatusEnum,
|
||||||
|
HouseOrdersPaymentMethodEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
|
||||||
export default function Index({ title = '支付明细' }) {
|
export default function Index({ title = '支付明细' }) {
|
||||||
@ -18,7 +22,7 @@ export default function Index({ title = '支付明细' }) {
|
|||||||
<MyPageContainer
|
<MyPageContainer
|
||||||
title={title}
|
title={title}
|
||||||
enableTabs={true}
|
enableTabs={true}
|
||||||
tabKey="house_order_payments"
|
tabKey="house_order"
|
||||||
tabLabel={title}
|
tabLabel={title}
|
||||||
>
|
>
|
||||||
<ProTable
|
<ProTable
|
||||||
@ -40,49 +44,55 @@ export default function Index({ title = '支付明细' }) {
|
|||||||
// importApi={Apis.Bill.HouseBills.Import}
|
// importApi={Apis.Bill.HouseBills.Import}
|
||||||
// reload={action?.reload}
|
// reload={action?.reload}
|
||||||
// />,
|
// />,
|
||||||
// <BillCreate key="Create" reload={action?.reload} title={title} />,
|
|
||||||
// ]}
|
// ]}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
{
|
{
|
||||||
title: '房屋',
|
title: '支付订单',
|
||||||
dataIndex: ['asset_house', 'full_name'],
|
dataIndex: 'house_orders_id',
|
||||||
search: {
|
search: false,
|
||||||
transform: (value) => {
|
},
|
||||||
return { full_name: value };
|
MyColumns.EnumTag({
|
||||||
},
|
title: '支付状态',
|
||||||
},
|
dataIndex: 'payment_status',
|
||||||
|
valueEnum: HouseOrdersOrderStatusEnum,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '支付方式',
|
||||||
|
dataIndex: 'payment_method',
|
||||||
|
valueEnum: HouseOrdersPaymentMethodEnum,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '账单金额',
|
||||||
|
dataIndex: 'amount',
|
||||||
|
render: (value: any) => `${value / 100}元`,
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '实际金额',
|
||||||
|
dataIndex: 'actual_amount',
|
||||||
|
render: (value: any) => `${value / 100}元`,
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '支付人',
|
||||||
|
render: (record: any) =>
|
||||||
|
`${record?.customer?.name || ''}${record?.customer?.phone || ''}`,
|
||||||
|
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备注',
|
||||||
|
dataIndex: 'remark',
|
||||||
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '支付单号',
|
title: '支付单号',
|
||||||
dataIndex: 'payment_no',
|
dataIndex: 'payment_no',
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
MyColumns.UpdatedAt(),
|
||||||
title: '交易单号',
|
|
||||||
dataIndex: 'transaction_id',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '第三方交易号',
|
|
||||||
dataIndex: 'hird_trade_no',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
MyColumns.CreatedAt(),
|
|
||||||
// MyColumns.Option({
|
|
||||||
// render: (_, item: any, index, action) => (
|
|
||||||
// <Space key={index}>
|
|
||||||
// <BillUpdate item={item} reload={action?.reload} title={title} />
|
|
||||||
// <MyButtons.Delete
|
|
||||||
// onConfirm={() =>
|
|
||||||
// Apis.Common.Admins.Delete({ id: item.id }).then(() =>
|
|
||||||
// action?.reload(),
|
|
||||||
// )
|
|
||||||
// }
|
|
||||||
// />
|
|
||||||
// </Space>
|
|
||||||
// ),
|
|
||||||
// }),
|
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</MyPageContainer>
|
</MyPageContainer>
|
||||||
Loading…
x
Reference in New Issue
Block a user