This commit is contained in:
parent
12379e1d1b
commit
16719bf5fd
18
src/gen/ApiTypes.d.ts
vendored
18
src/gen/ApiTypes.d.ts
vendored
@ -510,6 +510,11 @@ declare namespace ApiTypes {
|
|||||||
"company_employees_id": number; // 员工id,[ref:company_employees]
|
"company_employees_id": number; // 员工id,[ref:company_employees]
|
||||||
"type": string; // 类型,[enum:HouseWorkOrdersTypeEnum]
|
"type": string; // 类型,[enum:HouseWorkOrdersTypeEnum]
|
||||||
};
|
};
|
||||||
|
type BatchStore = {
|
||||||
|
"asset_projects_id": number; // 项目id,[ref:asset_projects]
|
||||||
|
"company_employees_id": number; // 员工id,[ref:company_employees]
|
||||||
|
"types": string[]; // 类型数组
|
||||||
|
};
|
||||||
type Show = {
|
type Show = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
};
|
};
|
||||||
@ -925,7 +930,8 @@ declare namespace ApiTypes {
|
|||||||
"has_overdue"?: boolean; // 是否欠费:true-欠费, false-清欠
|
"has_overdue"?: boolean; // 是否欠费:true-欠费, false-清欠
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"asset_houses_id": number; // 资产房屋id,[ref:asset_houses]
|
"asset_houses_id"?: number; // 资产房屋id,[ref:asset_houses](与asset_car_ports_id互斥)
|
||||||
|
"asset_car_ports_id"?: number; // 车位ID,[ref:asset_car_ports](与asset_houses_id互斥)
|
||||||
"company_receipt_accounts_id": number; // 公司收款账户id,[ref:company_receipt_accounts]
|
"company_receipt_accounts_id": number; // 公司收款账户id,[ref:company_receipt_accounts]
|
||||||
"type": string; // 账单类型,[enum:HouseBillsTypeEnum]
|
"type": string; // 账单类型,[enum:HouseBillsTypeEnum]
|
||||||
"amount": number; // 金额
|
"amount": number; // 金额
|
||||||
@ -940,6 +946,7 @@ declare namespace ApiTypes {
|
|||||||
};
|
};
|
||||||
type Update = {
|
type Update = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
|
"asset_car_ports_id"?: number; // 车位ID,[ref:asset_car_ports]
|
||||||
"company_receipt_accounts_id": number; // 公司收款账户id,[ref:company_receipt_accounts]
|
"company_receipt_accounts_id": number; // 公司收款账户id,[ref:company_receipt_accounts]
|
||||||
"type": string; // 账单类型,[enum:HouseBillsTypeEnum]
|
"type": string; // 账单类型,[enum:HouseBillsTypeEnum]
|
||||||
"amount": number; // 金额
|
"amount": number; // 金额
|
||||||
@ -3785,6 +3792,15 @@ declare namespace ApiTypes {
|
|||||||
namespace Statistics {
|
namespace Statistics {
|
||||||
namespace ContractsCount {
|
namespace ContractsCount {
|
||||||
}
|
}
|
||||||
|
namespace HouseBillsCount {
|
||||||
|
type PaidAmountTrend = {
|
||||||
|
"start_date"?: Date; // 开始日期(可选,默认6个月前)
|
||||||
|
"end_date"?: Date; // 结束日期(可选,默认今天)
|
||||||
|
};
|
||||||
|
type ClearCache = {
|
||||||
|
"type"?: string; // 缓存类型
|
||||||
|
};
|
||||||
|
}
|
||||||
namespace IndexCount {
|
namespace IndexCount {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -270,6 +270,9 @@ export const Apis = {
|
|||||||
Store(data: ApiTypes.Asset.AssetProjectAdmins.Store): Promise<MyResponseType> {
|
Store(data: ApiTypes.Asset.AssetProjectAdmins.Store): Promise<MyResponseType> {
|
||||||
return request('company/asset/asset_project_admins/store', { data });
|
return request('company/asset/asset_project_admins/store', { data });
|
||||||
},
|
},
|
||||||
|
BatchStore(data: ApiTypes.Asset.AssetProjectAdmins.BatchStore): Promise<MyResponseType> {
|
||||||
|
return request('company/asset/asset_project_admins/batch_store', { data });
|
||||||
|
},
|
||||||
Show(data: ApiTypes.Asset.AssetProjectAdmins.Show): Promise<MyResponseType> {
|
Show(data: ApiTypes.Asset.AssetProjectAdmins.Show): Promise<MyResponseType> {
|
||||||
return request('company/asset/asset_project_admins/show', { data });
|
return request('company/asset/asset_project_admins/show', { data });
|
||||||
},
|
},
|
||||||
@ -2085,6 +2088,23 @@ export const Apis = {
|
|||||||
return request('company/statistics/contracts_count/clear_cache', {});
|
return request('company/statistics/contracts_count/clear_cache', {});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
HouseBillsCount: {
|
||||||
|
OverviewStatistics(): Promise<MyResponseType> {
|
||||||
|
return request('company/statistics/house_bills_count/overview_statistics', {});
|
||||||
|
},
|
||||||
|
ProjectDataByMonth(): Promise<MyResponseType> {
|
||||||
|
return request('company/statistics/house_bills_count/project_data_by_month', {});
|
||||||
|
},
|
||||||
|
PaidAmountTrend(data?: ApiTypes.Statistics.HouseBillsCount.PaidAmountTrend): Promise<MyResponseType> {
|
||||||
|
return request('company/statistics/house_bills_count/paid_amount_trend', { data });
|
||||||
|
},
|
||||||
|
ProjectPaymentRanking(): Promise<MyResponseType> {
|
||||||
|
return request('company/statistics/house_bills_count/project_payment_ranking', {});
|
||||||
|
},
|
||||||
|
ClearCache(data?: ApiTypes.Statistics.HouseBillsCount.ClearCache): Promise<MyResponseType> {
|
||||||
|
return request('company/statistics/house_bills_count/clear_cache', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
IndexCount: {
|
IndexCount: {
|
||||||
FinancialAnalysis(): Promise<MyResponseType> {
|
FinancialAnalysis(): Promise<MyResponseType> {
|
||||||
return request('company/statistics/index_count/financial_analysis', {});
|
return request('company/statistics/index_count/financial_analysis', {});
|
||||||
|
|||||||
@ -333,7 +333,7 @@ export const BillsStatusEnum= {
|
|||||||
|
|
||||||
// 缓存类型
|
// 缓存类型
|
||||||
export const CacheTypeEnum= {
|
export const CacheTypeEnum= {
|
||||||
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#32265e","value":"MobilePhoneVerificationCode"},
|
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#f33535","value":"MobilePhoneVerificationCode"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// CompaniesMerchantTypeEnum
|
// CompaniesMerchantTypeEnum
|
||||||
|
|||||||
@ -71,7 +71,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
key: 'grid_mark',
|
key: 'grid_mark',
|
||||||
title: '范围标识',
|
title: '范围标识',
|
||||||
params: {
|
params: {
|
||||||
asset_projects_id: projectId,
|
asset_projects_id: projectId || '',
|
||||||
},
|
},
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import {
|
|||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Selects } from '@/components/Select';
|
import { Selects } from '@/components/Select';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { ApprovalTemplateNodesNodeTypeEnum } from '@/gen/Enums';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { Form, message } from 'antd';
|
import { Form, message } from 'antd';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
@ -22,7 +23,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
trigger={
|
trigger={
|
||||||
<MyButtons.Default
|
<MyButtons.Default
|
||||||
title="申请退款"
|
title="申请退款"
|
||||||
disabled={props?.item?.bill_status !== 'Paid'}
|
// disabled={props?.item?.bill_status !== 'Paid'}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
@ -161,7 +162,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
MyFormItems.EnumSelect({
|
MyFormItems.EnumSelect({
|
||||||
key: 'node_type',
|
key: 'node_type',
|
||||||
// title: `类型`,
|
// title: `类型`,
|
||||||
// valueEnum: ApprovalTemplateNodesNodeTypeEnum,
|
valueEnum: ApprovalTemplateNodesNodeTypeEnum,
|
||||||
colProps: { span: 5 },
|
colProps: { span: 5 },
|
||||||
formItemProps: {
|
formItemProps: {
|
||||||
...rulesHelper.text,
|
...rulesHelper.text,
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
MyButtons,
|
MyButtons,
|
||||||
MyColumns,
|
MyColumns,
|
||||||
|
MyPageContainer,
|
||||||
MyProTableProps,
|
MyProTableProps,
|
||||||
MyTableActions,
|
MyTableActions,
|
||||||
MyToolBarActions,
|
MyToolBarActions,
|
||||||
@ -15,148 +16,159 @@ import Show from './modals/Show';
|
|||||||
import Update from './modals/Update';
|
import Update from './modals/Update';
|
||||||
import Read from './read/modals/Read';
|
import Read from './read/modals/Read';
|
||||||
|
|
||||||
export default function Index({ title = '合同借用' }) {
|
export default function Index({ title = '合同档案借用' }) {
|
||||||
return (
|
return (
|
||||||
<ProTable
|
<MyPageContainer
|
||||||
{...MyProTableProps.props}
|
title={title}
|
||||||
request={async (params, sort) =>
|
enableTabs={true}
|
||||||
MyProTableProps.request(
|
tabKey="contract_borrows"
|
||||||
params,
|
tabLabel={title}
|
||||||
sort,
|
>
|
||||||
Apis.Contract.ContractArchiveBorrows.List,
|
<ProTable
|
||||||
)
|
{...MyProTableProps.props}
|
||||||
}
|
request={async (params, sort) =>
|
||||||
headerTitle="合同借用列表"
|
MyProTableProps.request(
|
||||||
toolBarRender={(action) => [
|
params,
|
||||||
<MyToolBarActions
|
sort,
|
||||||
key="toolbar"
|
Apis.Contract.ContractArchiveBorrows.List,
|
||||||
actions={{
|
)
|
||||||
add: <Create key="Create" reload={action?.reload} title={title} />,
|
}
|
||||||
read: <Read key="Read" reload={action?.reload} title="合同借阅" />,
|
headerTitle="合同借用列表"
|
||||||
}}
|
toolBarRender={(action) => [
|
||||||
/>,
|
<MyToolBarActions
|
||||||
]}
|
key="toolbar"
|
||||||
columns={[
|
actions={{
|
||||||
MyColumns.ID({
|
add: (
|
||||||
search: false,
|
<Create key="Create" reload={action?.reload} title={title} />
|
||||||
}),
|
),
|
||||||
MyColumns.EnumTag({
|
read: (
|
||||||
title: '借用状态',
|
<Read key="Read" reload={action?.reload} title="合同借阅" />
|
||||||
dataIndex: 'borrow_status',
|
),
|
||||||
valueEnum: ContractArchiveBorrowStatusEnum,
|
}}
|
||||||
}),
|
/>,
|
||||||
// MyColumns.EnumTag({
|
]}
|
||||||
// title: '归还状态',
|
columns={[
|
||||||
// dataIndex: 'return_status',
|
MyColumns.ID({
|
||||||
// valueEnum: ContractArchiveFileReturnStatusEnum,
|
search: false,
|
||||||
// }),
|
}),
|
||||||
{
|
MyColumns.EnumTag({
|
||||||
title: '档案编号',
|
title: '借用状态',
|
||||||
dataIndex: ['contract_archive', 'code'],
|
dataIndex: 'borrow_status',
|
||||||
render: (_, item: any) => (
|
valueEnum: ContractArchiveBorrowStatusEnum,
|
||||||
<CodeInfo
|
}),
|
||||||
item={{ ...item, type: 'link', id: item?.contract_archives_id }}
|
// MyColumns.EnumTag({
|
||||||
title={item?.contract_archive?.code}
|
// title: '归还状态',
|
||||||
/>
|
// dataIndex: 'return_status',
|
||||||
),
|
// valueEnum: ContractArchiveFileReturnStatusEnum,
|
||||||
},
|
// }),
|
||||||
{
|
{
|
||||||
title: '借用信息',
|
title: '档案编号',
|
||||||
search: false,
|
dataIndex: ['contract_archive', 'code'],
|
||||||
render: (_, item: any) => {
|
render: (_, item: any) => (
|
||||||
if (!item?.contract_archive_borrow_files) {
|
<CodeInfo
|
||||||
return '-';
|
item={{ ...item, type: 'link', id: item?.contract_archives_id }}
|
||||||
}
|
title={item?.contract_archive?.code}
|
||||||
return (
|
/>
|
||||||
<div>
|
),
|
||||||
{item.contract_archive_borrow_files.map(
|
},
|
||||||
(res: any, index: number) => (
|
{
|
||||||
<div key={index} style={{ marginBottom: 4 }}>
|
title: '借用信息',
|
||||||
文件: {res?.contract_archive_file?.name},借用:
|
search: false,
|
||||||
{res?.contract_archive_file?.borrow_number},遗失:
|
render: (_, item: any) => {
|
||||||
{res?.contract_archive_file?.lost_number},损坏:
|
if (!item?.contract_archive_borrow_files) {
|
||||||
{
|
return '-';
|
||||||
res?.contract_archive_file?.contract_archive_file
|
}
|
||||||
?.lost_number
|
return (
|
||||||
}
|
<div>
|
||||||
,损坏: {res?.contract_archive_file?.damaged_number}
|
{item.contract_archive_borrow_files.map(
|
||||||
</div>
|
(res: any, index: number) => (
|
||||||
),
|
<div key={index} style={{ marginBottom: 4 }}>
|
||||||
)}
|
文件: {res?.contract_archive_file?.name},借用:
|
||||||
</div>
|
{res?.contract_archive_file?.borrow_number},遗失:
|
||||||
);
|
{res?.contract_archive_file?.lost_number},损坏:
|
||||||
|
{
|
||||||
|
res?.contract_archive_file?.contract_archive_file
|
||||||
|
?.lost_number
|
||||||
|
}
|
||||||
|
,损坏: {res?.contract_archive_file?.damaged_number}
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '借用人',
|
||||||
|
dataIndex: 'borrower_name',
|
||||||
|
search: false,
|
||||||
|
render: (_, item: any) => (
|
||||||
|
<EmployeeShow
|
||||||
|
item={{ ...item, type: 'link', id: item?.borrower_id }}
|
||||||
|
title={item?.borrower_name}
|
||||||
|
/>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '借用人',
|
|
||||||
dataIndex: 'borrower_name',
|
|
||||||
search: false,
|
|
||||||
render: (_, item: any) => (
|
|
||||||
<EmployeeShow
|
|
||||||
item={{ ...item, type: 'link', id: item?.borrower_id }}
|
|
||||||
title={item?.borrower_name}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '借用日期',
|
title: '借用日期',
|
||||||
dataIndex: 'borrow_date',
|
dataIndex: 'borrow_date',
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '应归还日期',
|
title: '应归还日期',
|
||||||
dataIndex: 'expected_return_date',
|
dataIndex: 'expected_return_date',
|
||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
MyColumns.Boolean({
|
MyColumns.Boolean({
|
||||||
title: '需要归还',
|
title: '需要归还',
|
||||||
dataIndex: 'is_need_return',
|
dataIndex: 'is_need_return',
|
||||||
search: false,
|
search: false,
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
title: '登记人',
|
title: '登记人',
|
||||||
dataIndex: ['registrar', 'name'],
|
dataIndex: ['registrar', 'name'],
|
||||||
search: false,
|
search: false,
|
||||||
render: (_, item: any) => (
|
render: (_, item: any) => (
|
||||||
<EmployeeShow
|
<EmployeeShow
|
||||||
item={{ ...item, type: 'link', id: item?.operator_id }}
|
item={{ ...item, type: 'link', id: item?.operator_id }}
|
||||||
title={item?.operator_name}
|
title={item?.operator_name}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
// MyColumns.CreatedAt(),
|
// MyColumns.CreatedAt(),
|
||||||
MyColumns.UpdatedAt(),
|
MyColumns.UpdatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (_, item: any, _index, action) => (
|
render: (_, item: any, _index, action) => (
|
||||||
<MyTableActions
|
<MyTableActions
|
||||||
actions={{
|
actions={{
|
||||||
show: (
|
show: (
|
||||||
<Show item={item} reload={action?.reload} title={title} />
|
<Show item={item} reload={action?.reload} title={title} />
|
||||||
),
|
),
|
||||||
record: (
|
record: (
|
||||||
<MyButtons.Default
|
<MyButtons.Default
|
||||||
title="登记"
|
title="登记"
|
||||||
type="primary"
|
type="primary"
|
||||||
disabled={item?.borrow_status !== 'Approved'}
|
disabled={item?.borrow_status !== 'Approved'}
|
||||||
isConfirm={true}
|
isConfirm={true}
|
||||||
description={`是否确认借用人已领取?`}
|
description={`是否确认借用人已领取?`}
|
||||||
onConfirm={() =>
|
onConfirm={() =>
|
||||||
Apis.Contract.ContractArchiveBorrows.Borrow({
|
Apis.Contract.ContractArchiveBorrows.Borrow({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
}).then(() => action?.reload())
|
}).then(() => action?.reload())
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
update: (
|
update: (
|
||||||
<Update item={item} reload={action?.reload} title={title} />
|
<Update item={item} reload={action?.reload} title={title} />
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
</MyPageContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
MyButtons,
|
MyButtons,
|
||||||
MyColumns,
|
MyColumns,
|
||||||
|
MyPageContainer,
|
||||||
MyProTableProps,
|
MyProTableProps,
|
||||||
MyTableActions,
|
MyTableActions,
|
||||||
MyToolBarActions,
|
MyToolBarActions,
|
||||||
@ -22,157 +23,168 @@ export default function Index({ title = '突发事件' }) {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProTable
|
<MyPageContainer
|
||||||
{...MyProTableProps.props}
|
title={title}
|
||||||
request={async (params, sort) =>
|
enableTabs={true}
|
||||||
MyProTableProps.request(
|
tabKey="emergency_events"
|
||||||
params,
|
tabLabel={title}
|
||||||
sort,
|
>
|
||||||
Apis.Emergency.EmergencyEvents.List,
|
<ProTable
|
||||||
)
|
{...MyProTableProps.props}
|
||||||
}
|
request={async (params, sort) =>
|
||||||
headerTitle={`${title}列表`}
|
MyProTableProps.request(
|
||||||
toolBarRender={(action: any) => [
|
params,
|
||||||
<MyToolBarActions
|
sort,
|
||||||
key="toolbar"
|
Apis.Emergency.EmergencyEvents.List,
|
||||||
actions={{
|
)
|
||||||
create: (
|
}
|
||||||
<EventCreate key="Create" reload={action?.reload} title={title} />
|
headerTitle={`${title}列表`}
|
||||||
),
|
toolBarRender={(action: any) => [
|
||||||
teams: (
|
<MyToolBarActions
|
||||||
<MyButtons.Default
|
key="toolbar"
|
||||||
key="Teams"
|
actions={{
|
||||||
size="middle"
|
create: (
|
||||||
onClick={() => {
|
<EventCreate
|
||||||
navigate('/quality/emergency/teams');
|
key="Create"
|
||||||
}}
|
reload={action?.reload}
|
||||||
title="应急小组"
|
title={title}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
categories: (
|
teams: (
|
||||||
<MyButtons.Default
|
<MyButtons.Default
|
||||||
key="Categories"
|
key="Teams"
|
||||||
size="middle"
|
size="middle"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate('/quality/emergency/categories');
|
navigate('/quality/emergency/teams');
|
||||||
}}
|
}}
|
||||||
title="事件分类"
|
title="应急小组"
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
levels: (
|
categories: (
|
||||||
<MyButtons.Default
|
<MyButtons.Default
|
||||||
key="Levels"
|
key="Categories"
|
||||||
size="middle"
|
size="middle"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate('/quality/emergency/levels');
|
navigate('/quality/emergency/categories');
|
||||||
}}
|
}}
|
||||||
title="级别配置"
|
title="事件分类"
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
}}
|
levels: (
|
||||||
/>,
|
<MyButtons.Default
|
||||||
]}
|
key="Levels"
|
||||||
columns={[
|
size="middle"
|
||||||
MyColumns.ID({
|
onClick={() => {
|
||||||
search: false,
|
navigate('/quality/emergency/levels');
|
||||||
}),
|
}}
|
||||||
{
|
title="级别配置"
|
||||||
title: '名称',
|
/>
|
||||||
dataIndex: 'name',
|
),
|
||||||
},
|
}}
|
||||||
{
|
/>,
|
||||||
title: '所属项目',
|
]}
|
||||||
dataIndex: ['asset_project', 'name'],
|
columns={[
|
||||||
search: false,
|
MyColumns.ID({
|
||||||
},
|
search: false,
|
||||||
MyColumns.EnumTag({
|
}),
|
||||||
title: '状态',
|
{
|
||||||
dataIndex: 'status',
|
title: '名称',
|
||||||
valueEnum: EmergencyEventsStatusEnum,
|
dataIndex: 'name',
|
||||||
}),
|
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '赔偿方',
|
|
||||||
dataIndex: 'compensation_type',
|
|
||||||
valueEnum: EmergencyEventsCompensationTypeEnum,
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
title: '赔偿事项',
|
|
||||||
search: false,
|
|
||||||
render: (_, item: any) => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<div>赔偿比例:{item?.compensation_rate}%</div>
|
|
||||||
<div>赔偿金额:{item?.compensation_amount}元</div>
|
|
||||||
<div>已支付赔偿金额:{item?.compensation_paid_amount}元</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
{
|
title: '所属项目',
|
||||||
title: '分类',
|
dataIndex: ['asset_project', 'name'],
|
||||||
search: false,
|
search: false,
|
||||||
render: (_, item: any) => {
|
|
||||||
return `${item?.one_emergency_categories_name} / ${item?.two_emergency_categories_name}`;
|
|
||||||
},
|
},
|
||||||
},
|
MyColumns.EnumTag({
|
||||||
{
|
title: '状态',
|
||||||
title: '等级',
|
dataIndex: 'status',
|
||||||
dataIndex: 'emergency_event_levels_name',
|
valueEnum: EmergencyEventsStatusEnum,
|
||||||
search: false,
|
}),
|
||||||
},
|
MyColumns.EnumTag({
|
||||||
MyColumns.UpdatedAt(),
|
title: '赔偿方',
|
||||||
MyColumns.CreatedAt(),
|
dataIndex: 'compensation_type',
|
||||||
MyColumns.Option({
|
valueEnum: EmergencyEventsCompensationTypeEnum,
|
||||||
render: (_, item: any, index, action) => (
|
}),
|
||||||
<Space key={index}>
|
{
|
||||||
<MyTableActions
|
title: '赔偿事项',
|
||||||
actions={{
|
search: false,
|
||||||
show: (
|
render: (_, item: any) => {
|
||||||
<MyButtons.View
|
return (
|
||||||
key="show"
|
<div>
|
||||||
title="查看"
|
<div>赔偿比例:{item?.compensation_rate}%</div>
|
||||||
to={`/quality/emergency/show/${item.id}`}
|
<div>赔偿金额:{item?.compensation_amount}元</div>
|
||||||
/>
|
<div>已支付赔偿金额:{item?.compensation_paid_amount}元</div>
|
||||||
),
|
</div>
|
||||||
close: (
|
);
|
||||||
<EventApplyClose
|
},
|
||||||
key="close"
|
},
|
||||||
item={item}
|
{
|
||||||
reload={action?.reload}
|
title: '分类',
|
||||||
/>
|
search: false,
|
||||||
),
|
render: (_, item: any) => {
|
||||||
update: (
|
return `${item?.one_emergency_categories_name} / ${item?.two_emergency_categories_name}`;
|
||||||
<EventUpdate
|
},
|
||||||
key="update"
|
},
|
||||||
item={item}
|
{
|
||||||
reload={action?.reload}
|
title: '等级',
|
||||||
title={title}
|
dataIndex: 'emergency_event_levels_name',
|
||||||
/>
|
search: false,
|
||||||
),
|
},
|
||||||
audit: (
|
MyColumns.UpdatedAt(),
|
||||||
<EventReview
|
MyColumns.CreatedAt(),
|
||||||
key="audit"
|
MyColumns.Option({
|
||||||
item={item}
|
render: (_, item: any, index, action) => (
|
||||||
reload={action?.reload}
|
<Space key={index}>
|
||||||
/>
|
<MyTableActions
|
||||||
),
|
actions={{
|
||||||
delete: (
|
show: (
|
||||||
<MyButtons.Delete
|
<MyButtons.View
|
||||||
key="delete"
|
key="show"
|
||||||
onConfirm={() =>
|
title="查看"
|
||||||
Apis.Emergency.EmergencyEvents.Delete({
|
to={`/quality/emergency/show/${item.id}`}
|
||||||
id: item.id,
|
/>
|
||||||
}).then(() => action?.reload())
|
),
|
||||||
}
|
close: (
|
||||||
/>
|
<EventApplyClose
|
||||||
),
|
key="close"
|
||||||
}}
|
item={item}
|
||||||
maxVisible={3}
|
reload={action?.reload}
|
||||||
/>
|
/>
|
||||||
</Space>
|
),
|
||||||
),
|
update: (
|
||||||
}),
|
<EventUpdate
|
||||||
]}
|
key="update"
|
||||||
/>
|
item={item}
|
||||||
|
reload={action?.reload}
|
||||||
|
title={title}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
audit: (
|
||||||
|
<EventReview
|
||||||
|
key="audit"
|
||||||
|
item={item}
|
||||||
|
reload={action?.reload}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
delete: (
|
||||||
|
<MyButtons.Delete
|
||||||
|
key="delete"
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.Emergency.EmergencyEvents.Delete({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
maxVisible={3}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</MyPageContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
MyButtons,
|
MyButtons,
|
||||||
MyColumns,
|
MyColumns,
|
||||||
|
MyPageContainer,
|
||||||
MyProTableProps,
|
MyProTableProps,
|
||||||
MyTableActions,
|
MyTableActions,
|
||||||
MyToolBarActions,
|
MyToolBarActions,
|
||||||
@ -19,197 +20,204 @@ import DepositPay from './modals/DepositPay';
|
|||||||
import DepositRefund from './modals/DepositRefund';
|
import DepositRefund from './modals/DepositRefund';
|
||||||
import MyWorkerCreate from './modals/WorkerCreate';
|
import MyWorkerCreate from './modals/WorkerCreate';
|
||||||
|
|
||||||
export default function Index() {
|
export default function Index({ title = '装修管理' }) {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProTable
|
<MyPageContainer
|
||||||
{...MyProTableProps.props}
|
title={title}
|
||||||
request={async (params, sort) =>
|
enableTabs={true}
|
||||||
MyProTableProps.request(
|
tabKey="renovation_applies"
|
||||||
params,
|
tabLabel={title}
|
||||||
sort,
|
>
|
||||||
Apis.Renovation.RenovationApplies.List,
|
<ProTable
|
||||||
)
|
{...MyProTableProps.props}
|
||||||
}
|
request={async (params, sort) =>
|
||||||
headerTitle="装修申请列表"
|
MyProTableProps.request(
|
||||||
toolBarRender={(action) => [
|
params,
|
||||||
<MyToolBarActions
|
sort,
|
||||||
key="toolbar"
|
Apis.Renovation.RenovationApplies.List,
|
||||||
actions={{
|
)
|
||||||
add: (
|
}
|
||||||
<MyButtons.Default
|
headerTitle="装修申请列表"
|
||||||
key="Create"
|
toolBarRender={(action) => [
|
||||||
size="middle"
|
<MyToolBarActions
|
||||||
type="primary"
|
key="toolbar"
|
||||||
icon={<PlusOutlined />}
|
actions={{
|
||||||
onClick={() => {
|
add: (
|
||||||
navigate('/quality/renovation/pages/create');
|
<MyButtons.Default
|
||||||
}}
|
key="Create"
|
||||||
title="装修申请"
|
size="middle"
|
||||||
/>
|
type="primary"
|
||||||
),
|
icon={<PlusOutlined />}
|
||||||
rules: (
|
onClick={() => {
|
||||||
<MyButtons.Default
|
navigate('/quality/renovation/pages/create');
|
||||||
key="InspectionRules"
|
}}
|
||||||
size="middle"
|
title="装修申请"
|
||||||
onClick={() => {
|
/>
|
||||||
navigate('/quality/renovation/inspection_rules');
|
),
|
||||||
}}
|
rules: (
|
||||||
title="巡检配置"
|
<MyButtons.Default
|
||||||
/>
|
key="InspectionRules"
|
||||||
),
|
size="middle"
|
||||||
audit: (
|
onClick={() => {
|
||||||
<MyButtons.Default
|
navigate('/quality/renovation/inspection_rules');
|
||||||
key="Audit"
|
}}
|
||||||
size="middle"
|
title="巡检配置"
|
||||||
onClick={() => {
|
/>
|
||||||
navigate('/quality/renovation/audit');
|
),
|
||||||
}}
|
audit: (
|
||||||
title="资料审核"
|
<MyButtons.Default
|
||||||
/>
|
key="Audit"
|
||||||
),
|
size="middle"
|
||||||
}}
|
onClick={() => {
|
||||||
/>,
|
navigate('/quality/renovation/audit');
|
||||||
]}
|
}}
|
||||||
columns={[
|
title="资料审核"
|
||||||
MyColumns.ID({ search: false }),
|
/>
|
||||||
Selects?.AssetProjects({
|
),
|
||||||
title: '选择项目',
|
}}
|
||||||
key: 'id',
|
/>,
|
||||||
hidden: true,
|
]}
|
||||||
}),
|
columns={[
|
||||||
MyColumns.EnumTag({
|
MyColumns.ID({ search: false }),
|
||||||
title: '登记状态',
|
Selects?.AssetProjects({
|
||||||
dataIndex: 'status',
|
title: '选择项目',
|
||||||
valueEnum: RenovationAppliesStatusEnum,
|
key: 'id',
|
||||||
search: false,
|
hidden: true,
|
||||||
}),
|
}),
|
||||||
{
|
MyColumns.EnumTag({
|
||||||
title: '关联项目',
|
title: '登记状态',
|
||||||
dataIndex: ['asset_project', 'name'],
|
dataIndex: 'status',
|
||||||
search: false,
|
valueEnum: RenovationAppliesStatusEnum,
|
||||||
},
|
search: false,
|
||||||
{
|
}),
|
||||||
title: '房屋',
|
{
|
||||||
dataIndex: ['asset_house', 'full_name'],
|
title: '关联项目',
|
||||||
search: {
|
dataIndex: ['asset_project', 'name'],
|
||||||
transform: (value) => {
|
search: false,
|
||||||
return { full_name: value };
|
},
|
||||||
|
{
|
||||||
|
title: '房屋',
|
||||||
|
dataIndex: ['asset_house', 'full_name'],
|
||||||
|
search: {
|
||||||
|
transform: (value) => {
|
||||||
|
return { full_name: value };
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
{
|
title: '装修人',
|
||||||
title: '装修人',
|
dataIndex: 'owner_name',
|
||||||
dataIndex: 'owner_name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '装修公司',
|
|
||||||
dataIndex: 'company_name',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '施工负责人',
|
|
||||||
dataIndex: 'construction_principal_name',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '施工状态',
|
|
||||||
dataIndex: 'construction_status',
|
|
||||||
valueEnum: RenovationAppliesConstructionStatusEnum,
|
|
||||||
search: false,
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
title: '保证金',
|
|
||||||
dataIndex: 'deposit_amount',
|
|
||||||
search: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '施工时间',
|
|
||||||
search: false,
|
|
||||||
render: (_, item: any) => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{item?.construction_start_date || ''} 至
|
|
||||||
{item?.construction_end_date || ''}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
MyColumns.CreatedAt(),
|
title: '装修公司',
|
||||||
MyColumns.Option({
|
dataIndex: 'company_name',
|
||||||
render: (_, item: any, index, action) => (
|
search: false,
|
||||||
<Space key={index}>
|
},
|
||||||
<MyTableActions
|
{
|
||||||
actions={{
|
title: '施工负责人',
|
||||||
show: (
|
dataIndex: 'construction_principal_name',
|
||||||
<MyButtons.Default
|
search: false,
|
||||||
key="Show"
|
},
|
||||||
size="small"
|
MyColumns.EnumTag({
|
||||||
type="primary"
|
title: '施工状态',
|
||||||
onClick={() => {
|
dataIndex: 'construction_status',
|
||||||
navigate(
|
valueEnum: RenovationAppliesConstructionStatusEnum,
|
||||||
`/quality/renovation/pages/show?id=${item.id}`,
|
search: false,
|
||||||
);
|
}),
|
||||||
}}
|
{
|
||||||
title="查看"
|
title: '保证金',
|
||||||
/>
|
dataIndex: 'deposit_amount',
|
||||||
),
|
search: false,
|
||||||
worker: (
|
},
|
||||||
<MyWorkerCreate
|
{
|
||||||
item={{
|
title: '施工时间',
|
||||||
...item,
|
search: false,
|
||||||
size: 'small',
|
render: (_, item: any) => {
|
||||||
}}
|
return (
|
||||||
title="装修工人"
|
<div>
|
||||||
key="WorkerCreate"
|
{item?.construction_start_date || ''} 至
|
||||||
/>
|
{item?.construction_end_date || ''}
|
||||||
),
|
</div>
|
||||||
update: (
|
);
|
||||||
<MyButtons.Default
|
},
|
||||||
key="Update"
|
},
|
||||||
size="small"
|
MyColumns.CreatedAt(),
|
||||||
type="primary"
|
MyColumns.Option({
|
||||||
disabled={item.status !== 'Draft'}
|
render: (_, item: any, index, action) => (
|
||||||
onClick={() => {
|
<Space key={index}>
|
||||||
navigate(
|
<MyTableActions
|
||||||
`/quality/renovation/pages/update?id=${item.id}`,
|
actions={{
|
||||||
);
|
show: (
|
||||||
}}
|
<MyButtons.Default
|
||||||
title="编辑"
|
key="Show"
|
||||||
/>
|
size="small"
|
||||||
),
|
type="primary"
|
||||||
pay: (
|
onClick={() => {
|
||||||
<DepositPay
|
navigate(
|
||||||
key="DepositPay"
|
`/quality/renovation/pages/show?id=${item.id}`,
|
||||||
item={item}
|
);
|
||||||
reload={action?.reload}
|
}}
|
||||||
/>
|
title="查看"
|
||||||
),
|
/>
|
||||||
refund: (
|
),
|
||||||
<DepositRefund
|
worker: (
|
||||||
key="DepositRefund"
|
<MyWorkerCreate
|
||||||
item={item}
|
item={{
|
||||||
reload={action?.reload}
|
...item,
|
||||||
/>
|
size: 'small',
|
||||||
),
|
}}
|
||||||
delete: (
|
title="装修工人"
|
||||||
<MyButtons.Delete
|
key="WorkerCreate"
|
||||||
disabled={item.status !== 'Draft'}
|
/>
|
||||||
onConfirm={() =>
|
),
|
||||||
Apis.Renovation.RenovationApplies.Delete({
|
update: (
|
||||||
id: item.id,
|
<MyButtons.Default
|
||||||
}).then(() => action?.reload())
|
key="Update"
|
||||||
}
|
size="small"
|
||||||
/>
|
type="primary"
|
||||||
),
|
disabled={item.status !== 'Draft'}
|
||||||
}}
|
onClick={() => {
|
||||||
maxVisible={3}
|
navigate(
|
||||||
/>
|
`/quality/renovation/pages/update?id=${item.id}`,
|
||||||
</Space>
|
);
|
||||||
),
|
}}
|
||||||
}),
|
title="编辑"
|
||||||
]}
|
/>
|
||||||
/>
|
),
|
||||||
|
pay: (
|
||||||
|
<DepositPay
|
||||||
|
key="DepositPay"
|
||||||
|
item={item}
|
||||||
|
reload={action?.reload}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
refund: (
|
||||||
|
<DepositRefund
|
||||||
|
key="DepositRefund"
|
||||||
|
item={item}
|
||||||
|
reload={action?.reload}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
delete: (
|
||||||
|
<MyButtons.Delete
|
||||||
|
disabled={item.status !== 'Draft'}
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.Renovation.RenovationApplies.Delete({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
maxVisible={3}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</MyPageContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,23 +28,15 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
form.resetFields();
|
form.resetFields();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onFinish={async (values: any) => {
|
onFinish={async (values: any) =>
|
||||||
const { type, ...restValues } = values;
|
Apis.Asset.AssetProjectAdmins.BatchStore(values)
|
||||||
const promises = (type || []).map((t: any) =>
|
|
||||||
Apis.Asset.AssetProjectAdmins.Store({
|
|
||||||
...restValues,
|
|
||||||
type: t,
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
return Promise.all(promises)
|
|
||||||
.then(() => {
|
.then(() => {
|
||||||
props.reload?.();
|
props.reload?.();
|
||||||
message.success(props.title + '成功');
|
message.success('提交成功');
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
.catch(() => false);
|
.catch(() => false)
|
||||||
}}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
Selects?.AssetProjects({
|
Selects?.AssetProjects({
|
||||||
title: '选择项目',
|
title: '选择项目',
|
||||||
@ -67,7 +59,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
required: true,
|
required: true,
|
||||||
}),
|
}),
|
||||||
MyFormItems.EnumCheckbox({
|
MyFormItems.EnumCheckbox({
|
||||||
key: 'type',
|
key: 'types',
|
||||||
title: '工单类型',
|
title: '工单类型',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
valueEnum: HouseWorkOrdersTypeEnum,
|
valueEnum: HouseWorkOrdersTypeEnum,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user