fix:优化
This commit is contained in:
parent
3d3e5c260c
commit
9022d9dc90
@ -6,10 +6,14 @@ export function MyModal(props?: any) {
|
|||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<MyButtons.View
|
{props?.trigger ? (
|
||||||
title={props.title || '详情'}
|
<div onClick={() => setOpen(true)}>{props?.trigger}</div>
|
||||||
onClick={() => setOpen(true)}
|
) : (
|
||||||
/>
|
<MyButtons.View
|
||||||
|
title={props.title || '详情'}
|
||||||
|
onClick={() => setOpen(true)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<Modal
|
<Modal
|
||||||
title={props?.modal?.title || '标题'}
|
title={props?.modal?.title || '标题'}
|
||||||
open={open}
|
open={open}
|
||||||
|
|||||||
@ -146,42 +146,6 @@ export const Selects = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// 楼栋树形
|
|
||||||
GetBuildingTree(props?: PropsType): ReturnType {
|
|
||||||
const {
|
|
||||||
title = '网格标识',
|
|
||||||
key = 'grid_mark',
|
|
||||||
required = false,
|
|
||||||
hideInTable = true,
|
|
||||||
...rest
|
|
||||||
} = props ?? {};
|
|
||||||
|
|
||||||
return {
|
|
||||||
title: title,
|
|
||||||
key: key,
|
|
||||||
valueType: 'treeSelect',
|
|
||||||
hideInTable: hideInTable,
|
|
||||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
|
||||||
request: async (params) =>
|
|
||||||
(
|
|
||||||
await Apis.Asset.AssetBuildings.GetBuildingTree({
|
|
||||||
keywords: params?.KeyWords,
|
|
||||||
asset_projects_id: params?.asset_projects_id,
|
|
||||||
...params,
|
|
||||||
})
|
|
||||||
).data,
|
|
||||||
...rest,
|
|
||||||
fieldProps: {
|
|
||||||
showSearch: true,
|
|
||||||
fieldNames: {
|
|
||||||
label: 'name',
|
|
||||||
value: 'id',
|
|
||||||
children: 'children',
|
|
||||||
},
|
|
||||||
...rest?.fieldProps,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
//组织
|
//组织
|
||||||
Organizations(props?: PropsType): ReturnType {
|
Organizations(props?: PropsType): ReturnType {
|
||||||
const {
|
const {
|
||||||
@ -202,6 +166,7 @@ export const Selects = {
|
|||||||
(
|
(
|
||||||
await Apis.Company.Organizations.Select({
|
await Apis.Company.Organizations.Select({
|
||||||
keywords: params?.KeyWords,
|
keywords: params?.KeyWords,
|
||||||
|
companies_id: params?.companies_id,
|
||||||
...params,
|
...params,
|
||||||
})
|
})
|
||||||
).data,
|
).data,
|
||||||
@ -216,11 +181,47 @@ export const Selects = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
//组织树
|
||||||
|
OrganizationsTree(props?: PropsType): ReturnType {
|
||||||
|
const {
|
||||||
|
title = '组织',
|
||||||
|
key = 'organizations_id',
|
||||||
|
required = false,
|
||||||
|
hideInTable = true,
|
||||||
|
...rest
|
||||||
|
} = props ?? {};
|
||||||
|
|
||||||
|
return {
|
||||||
|
title: title,
|
||||||
|
key: key,
|
||||||
|
valueType: 'treeSelect',
|
||||||
|
hideInTable: hideInTable,
|
||||||
|
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
||||||
|
request: async (params) =>
|
||||||
|
(
|
||||||
|
await Apis.Company.Organizations.SelectTree({
|
||||||
|
keywords: params?.KeyWords,
|
||||||
|
companies_id: params?.companies_id,
|
||||||
|
...params,
|
||||||
|
})
|
||||||
|
).data,
|
||||||
|
...rest,
|
||||||
|
fieldProps: {
|
||||||
|
showSearch: true,
|
||||||
|
fieldNames: {
|
||||||
|
label: 'name',
|
||||||
|
value: 'id',
|
||||||
|
children: 'children',
|
||||||
|
},
|
||||||
|
...rest?.fieldProps,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
//员工
|
//员工
|
||||||
Employees(props?: PropsType): ReturnType {
|
Employees(props?: PropsType): ReturnType {
|
||||||
const {
|
const {
|
||||||
title = '员工',
|
title = '员工',
|
||||||
key = 'managers_id',
|
key = 'company_employees_id',
|
||||||
required = false,
|
required = false,
|
||||||
hideInTable = true,
|
hideInTable = true,
|
||||||
...rest
|
...rest
|
||||||
|
|||||||
30
src/gen/ApiTypes.d.ts
vendored
30
src/gen/ApiTypes.d.ts
vendored
@ -265,24 +265,28 @@ declare namespace ApiTypes {
|
|||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"asset_houses_id": number; // 资产房屋id,[ref:asset_houses]
|
"asset_houses_id": number; // 资产房屋id,[ref:asset_houses]
|
||||||
|
"company_receipt_accounts_id": number; // 公司收款账户id,[ref:company_receipt_accounts]
|
||||||
"type": string; // 账单类型,[enum:HouseBillsTypeEnum]
|
"type": string; // 账单类型,[enum:HouseBillsTypeEnum]
|
||||||
"amount": number; // 金额
|
"amount": number; // 金额
|
||||||
"discount_amount"?: number; // 优惠金额
|
"discount_amount"?: number; // 优惠金额
|
||||||
"late_fee"?: number; // 滞纳金
|
"late_fee"?: number; // 滞纳金
|
||||||
"start_date": Date; // 计费开始日期
|
"start_date": Date; // 计费开始日期
|
||||||
"end_date": Date; // 计费结束日期
|
"end_date": Date; // 计费结束日期
|
||||||
|
"month": string; // 月份
|
||||||
"late_start_date"?: Date; // 滞纳金起算日期
|
"late_start_date"?: Date; // 滞纳金起算日期
|
||||||
"collected_late_fee_days"?: number; // 已收滞纳金天数
|
"collected_late_fee_days"?: number; // 已收滞纳金天数
|
||||||
"remark"?: string; // 备注
|
"remark"?: string; // 备注
|
||||||
};
|
};
|
||||||
type Update = {
|
type Update = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
|
"company_receipt_accounts_id": number; // 公司收款账户id,[ref:company_receipt_accounts]
|
||||||
"type": string; // 账单类型,[enum:HouseBillsTypeEnum]
|
"type": string; // 账单类型,[enum:HouseBillsTypeEnum]
|
||||||
"amount": number; // 金额
|
"amount": number; // 金额
|
||||||
"discount_amount"?: number; // 优惠金额
|
"discount_amount"?: number; // 优惠金额
|
||||||
"late_fee"?: number; // 滞纳金
|
"late_fee"?: number; // 滞纳金
|
||||||
"start_date": Date; // 计费开始日期
|
"start_date": Date; // 计费开始日期
|
||||||
"end_date": Date; // 计费结束日期
|
"end_date": Date; // 计费结束日期
|
||||||
|
"month": string; // 月份
|
||||||
"late_start_date"?: Date; // 滞纳金起算日期
|
"late_start_date"?: Date; // 滞纳金起算日期
|
||||||
"collected_late_fee_days"?: number; // 已收滞纳金天数
|
"collected_late_fee_days"?: number; // 已收滞纳金天数
|
||||||
"remark"?: string; // 备注
|
"remark"?: string; // 备注
|
||||||
@ -487,9 +491,33 @@ declare namespace ApiTypes {
|
|||||||
"keywords"?: string; // 关键词
|
"keywords"?: string; // 关键词
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
namespace CompanyProjectReceiptAccounts {
|
||||||
|
type List = {
|
||||||
|
"companies_id": number; // 所属机构id,[ref:companies]
|
||||||
|
"projects_id": number; // 所属项目id,[ref:asset_projects]
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"companies_id": number; // 所属机构id,[ref:companies]
|
||||||
|
"projects_id": number; // 所属项目id,[ref:asset_projects]
|
||||||
|
"receipt_accounts_id": number; // 机构收款账号id,[ref:company_receipt_accounts]
|
||||||
|
};
|
||||||
|
type Update = {
|
||||||
|
"id": number; // id
|
||||||
|
"companies_id": number; // 所属机构id,[ref:companies]
|
||||||
|
"projects_id": number; // 所属项目id,[ref:asset_projects]
|
||||||
|
"receipt_accounts_id": number; // 机构收款账号id,[ref:company_receipt_accounts]
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Delete = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
}
|
||||||
namespace CompanyReceiptAccounts {
|
namespace CompanyReceiptAccounts {
|
||||||
type List = {
|
type List = {
|
||||||
"name"?: string; // 模糊搜索:名称
|
"name"?: string; // 模糊搜索:名称
|
||||||
|
"companies_id"?: number; // 所属机构id,[ref:companies]
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"companies_id": number; // 所属机构id,[ref:companies]
|
"companies_id": number; // 所属机构id,[ref:companies]
|
||||||
@ -527,6 +555,7 @@ declare namespace ApiTypes {
|
|||||||
type List = {
|
type List = {
|
||||||
"name"?: string; // 模糊搜索:名称
|
"name"?: string; // 模糊搜索:名称
|
||||||
"companies_id"?: number; // 机构ID[ref:companies]
|
"companies_id"?: number; // 机构ID[ref:companies]
|
||||||
|
"parent_id"?: number; // 父级ID
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"companies_id": number; // 所属机构id,[ref:companies]
|
"companies_id": number; // 所属机构id,[ref:companies]
|
||||||
@ -586,6 +615,7 @@ declare namespace ApiTypes {
|
|||||||
namespace Grids {
|
namespace Grids {
|
||||||
type List = {
|
type List = {
|
||||||
"name"?: string; // 模糊搜索:名称
|
"name"?: string; // 模糊搜索:名称
|
||||||
|
"asset_projects_id"?: number; // 所属项目id,[ref:asset_projects]
|
||||||
};
|
};
|
||||||
type Store = {
|
type Store = {
|
||||||
"asset_projects_id": number; // 所属项目id,[ref:asset_projects]
|
"asset_projects_id": number; // 所属项目id,[ref:asset_projects]
|
||||||
|
|||||||
@ -269,6 +269,23 @@ export const Apis = {
|
|||||||
return request('admin/company/company_positions/select', { data });
|
return request('admin/company/company_positions/select', { data });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
CompanyProjectReceiptAccounts: {
|
||||||
|
List(data: ApiTypes.Company.CompanyProjectReceiptAccounts.List): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_project_receipt_accounts/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Company.CompanyProjectReceiptAccounts.Store): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_project_receipt_accounts/store', { data });
|
||||||
|
},
|
||||||
|
Update(data: ApiTypes.Company.CompanyProjectReceiptAccounts.Update): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_project_receipt_accounts/update', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Company.CompanyProjectReceiptAccounts.Show): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_project_receipt_accounts/show', { data });
|
||||||
|
},
|
||||||
|
Delete(data: ApiTypes.Company.CompanyProjectReceiptAccounts.Delete): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_project_receipt_accounts/delete', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
CompanyReceiptAccounts: {
|
CompanyReceiptAccounts: {
|
||||||
List(data?: ApiTypes.Company.CompanyReceiptAccounts.List): Promise<MyResponseType> {
|
List(data?: ApiTypes.Company.CompanyReceiptAccounts.List): Promise<MyResponseType> {
|
||||||
return request('admin/company/company_receipt_accounts/list', { data });
|
return request('admin/company/company_receipt_accounts/list', { data });
|
||||||
|
|||||||
458
src/gen/Enums.ts
458
src/gen/Enums.ts
@ -1,371 +1,283 @@
|
|||||||
// AssetHousesOrientationEnum
|
// AssetHousesOrientationEnum
|
||||||
export const AssetHousesOrientationEnum = {
|
export const AssetHousesOrientationEnum= {
|
||||||
East: { text: '东', color: '#007bff', value: 'East' },
|
'East': {"text":"东","color":"#007bff","value":"East"},
|
||||||
South: { text: '南', color: '#28a745', value: 'South' },
|
'South': {"text":"南","color":"#28a745","value":"South"},
|
||||||
West: { text: '西', color: '#ffc107', value: 'West' },
|
'West': {"text":"西","color":"#ffc107","value":"West"},
|
||||||
North: { text: '北', color: '#dc3545', value: 'North' },
|
'North': {"text":"北","color":"#dc3545","value":"North"},
|
||||||
Southeast: { text: '东南', color: '#20c997', value: 'Southeast' },
|
'Southeast': {"text":"东南","color":"#20c997","value":"Southeast"},
|
||||||
Northeast: { text: '东北', color: '#6f42c1', value: 'Northeast' },
|
'Northeast': {"text":"东北","color":"#6f42c1","value":"Northeast"},
|
||||||
Southwest: { text: '西南', color: '#fd7e14', value: 'Southwest' },
|
'Southwest': {"text":"西南","color":"#fd7e14","value":"Southwest"},
|
||||||
Northwest: { text: '西北', color: '#17a2b8', value: 'Northwest' },
|
'Northwest': {"text":"西北","color":"#17a2b8","value":"Northwest"},
|
||||||
EastWest: { text: '东西', color: '#6610f2', value: 'EastWest' },
|
'EastWest': {"text":"东西","color":"#6610f2","value":"EastWest"},
|
||||||
SouthNorth: { text: '南北', color: '#e83e8c', value: 'SouthNorth' },
|
'SouthNorth': {"text":"南北","color":"#e83e8c","value":"SouthNorth"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetHousesOwnershipTypeEnum
|
// AssetHousesOwnershipTypeEnum
|
||||||
export const AssetHousesOwnershipTypeEnum = {
|
export const AssetHousesOwnershipTypeEnum= {
|
||||||
CommodityHousing: {
|
'CommodityHousing': {"text":"商品房","color":"#007bff","value":"CommodityHousing"},
|
||||||
text: '商品房',
|
'FundedHousing': {"text":"集资房","color":"#28a745","value":"FundedHousing"},
|
||||||
color: '#007bff',
|
'MilitaryHousing': {"text":"军产房","color":"#17a2b8","value":"MilitaryHousing"},
|
||||||
value: 'CommodityHousing',
|
'AffordableHousing': {"text":"保障房","color":"#ffc107","value":"AffordableHousing"},
|
||||||
},
|
'RuralHousing': {"text":"农民房","color":"#6f42c1","value":"RuralHousing"},
|
||||||
FundedHousing: { text: '集资房', color: '#28a745', value: 'FundedHousing' },
|
'CommercialOffice': {"text":"商业写字楼","color":"#fd7e14","value":"CommercialOffice"},
|
||||||
MilitaryHousing: {
|
'CommercialComplex': {"text":"商业综合体","color":"#dc3545","value":"CommercialComplex"},
|
||||||
text: '军产房',
|
'ResettlementHousing': {"text":"回迁房","color":"#20c997","value":"ResettlementHousing"},
|
||||||
color: '#17a2b8',
|
|
||||||
value: 'MilitaryHousing',
|
|
||||||
},
|
|
||||||
AffordableHousing: {
|
|
||||||
text: '保障房',
|
|
||||||
color: '#ffc107',
|
|
||||||
value: 'AffordableHousing',
|
|
||||||
},
|
|
||||||
RuralHousing: { text: '农民房', color: '#6f42c1', value: 'RuralHousing' },
|
|
||||||
CommercialOffice: {
|
|
||||||
text: '商业写字楼',
|
|
||||||
color: '#fd7e14',
|
|
||||||
value: 'CommercialOffice',
|
|
||||||
},
|
|
||||||
CommercialComplex: {
|
|
||||||
text: '商业综合体',
|
|
||||||
color: '#dc3545',
|
|
||||||
value: 'CommercialComplex',
|
|
||||||
},
|
|
||||||
ResettlementHousing: {
|
|
||||||
text: '回迁房',
|
|
||||||
color: '#20c997',
|
|
||||||
value: 'ResettlementHousing',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetHousesStatusEnum
|
// AssetHousesStatusEnum
|
||||||
export const AssetHousesStatusEnum = {
|
export const AssetHousesStatusEnum= {
|
||||||
Unsold: { text: '未售', color: '#6c757d', value: 'Unsold' },
|
'Unsold': {"text":"未售","color":"#6c757d","value":"Unsold"},
|
||||||
SoldNotDelivered: {
|
'SoldNotDelivered': {"text":"已售未交房","color":"#ffc107","value":"SoldNotDelivered"},
|
||||||
text: '已售未交房',
|
'SelfOccupied': {"text":"自住","color":"#28a745","value":"SelfOccupied"},
|
||||||
color: '#ffc107',
|
'Rented': {"text":"出租","color":"#007bff","value":"Rented"},
|
||||||
value: 'SoldNotDelivered',
|
'Vacant': {"text":"空置","color":"#dc3545","value":"Vacant"},
|
||||||
},
|
|
||||||
SelfOccupied: { text: '自住', color: '#28a745', value: 'SelfOccupied' },
|
|
||||||
Rented: { text: '出租', color: '#007bff', value: 'Rented' },
|
|
||||||
Vacant: { text: '空置', color: '#dc3545', value: 'Vacant' },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetHousesUsageEnum
|
// AssetHousesUsageEnum
|
||||||
export const AssetHousesUsageEnum = {
|
export const AssetHousesUsageEnum= {
|
||||||
Residence: { text: '住宅', color: '#007bff', value: 'Residence' },
|
'Residence': {"text":"住宅","color":"#007bff","value":"Residence"},
|
||||||
Apartment: { text: '公寓', color: '#28a745', value: 'Apartment' },
|
'Apartment': {"text":"公寓","color":"#28a745","value":"Apartment"},
|
||||||
Villa: { text: '别墅', color: '#17a2b8', value: 'Villa' },
|
'Villa': {"text":"别墅","color":"#17a2b8","value":"Villa"},
|
||||||
Shop: { text: '商铺', color: '#ffc107', value: 'Shop' },
|
'Shop': {"text":"商铺","color":"#ffc107","value":"Shop"},
|
||||||
ParkingSpace: { text: '车位', color: '#6c757d', value: 'ParkingSpace' },
|
'ParkingSpace': {"text":"车位","color":"#6c757d","value":"ParkingSpace"},
|
||||||
Office: { text: '写字楼', color: '#6610f2', value: 'Office' },
|
'Office': {"text":"写字楼","color":"#6610f2","value":"Office"},
|
||||||
Clubhouse: { text: '会所', color: '#fd7e14', value: 'Clubhouse' },
|
'Clubhouse': {"text":"会所","color":"#fd7e14","value":"Clubhouse"},
|
||||||
PropertyRoom: { text: '物业用房', color: '#dc3545', value: 'PropertyRoom' },
|
'PropertyRoom': {"text":"物业用房","color":"#dc3545","value":"PropertyRoom"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetProjectsChargeEnum
|
// AssetProjectsChargeEnum
|
||||||
export const AssetProjectsChargeEnum = {
|
export const AssetProjectsChargeEnum= {
|
||||||
Contract: { text: '包干制', color: '#007bff', value: 'Contract' },
|
'Contract': {"text":"包干制","color":"#007bff","value":"Contract"},
|
||||||
Commission: { text: '酬金制', color: '#28a745', value: 'Commission' },
|
'Commission': {"text":"酬金制","color":"#28a745","value":"Commission"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetProjectsEntrustTypeEnum
|
// AssetProjectsEntrustTypeEnum
|
||||||
export const AssetProjectsEntrustTypeEnum = {
|
export const AssetProjectsEntrustTypeEnum= {
|
||||||
DeveloperJointEntrust: {
|
'DeveloperJointEntrust': {"text":"开发商全委","color":"#007bff","value":"DeveloperJointEntrust"},
|
||||||
text: '开发商全委',
|
'OwnersFullEntrust': {"text":"业委会全委","color":"#28a745","value":"OwnersFullEntrust"},
|
||||||
color: '#007bff',
|
'GovernmentFullEntrust': {"text":"政府类全委","color":"#ffc107","value":"GovernmentFullEntrust"},
|
||||||
value: 'DeveloperJointEntrust',
|
|
||||||
},
|
|
||||||
OwnersFullEntrust: {
|
|
||||||
text: '业委会全委',
|
|
||||||
color: '#28a745',
|
|
||||||
value: 'OwnersFullEntrust',
|
|
||||||
},
|
|
||||||
GovernmentFullEntrust: {
|
|
||||||
text: '政府类全委',
|
|
||||||
color: '#ffc107',
|
|
||||||
value: 'GovernmentFullEntrust',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetProjectsPropertyTypeEnum
|
// AssetProjectsPropertyTypeEnum
|
||||||
export const AssetProjectsPropertyTypeEnum = {
|
export const AssetProjectsPropertyTypeEnum= {
|
||||||
Residence: { text: '住宅', color: '#ff0000', value: 'Residence' },
|
'Residence': {"text":"住宅","color":"#ff0000","value":"Residence"},
|
||||||
Commercial: { text: '商业', color: '#ff6600', value: 'Commercial' },
|
'Commercial': {"text":"商业","color":"#ff6600","value":"Commercial"},
|
||||||
Office: { text: '办公', color: '#ffcc00', value: 'Office' },
|
'Office': {"text":"办公","color":"#ffcc00","value":"Office"},
|
||||||
IndustrialPark: { text: '产业园', color: '#00cc66', value: 'IndustrialPark' },
|
'IndustrialPark': {"text":"产业园","color":"#00cc66","value":"IndustrialPark"},
|
||||||
Complex: { text: '综合体', color: '#0099ff', value: 'Complex' },
|
'Complex': {"text":"综合体","color":"#0099ff","value":"Complex"},
|
||||||
Municipal: { text: '市政设施', color: '#6633cc', value: 'Municipal' },
|
'Municipal': {"text":"市政设施","color":"#6633cc","value":"Municipal"},
|
||||||
Venue: { text: '场馆', color: '#9966ff', value: 'Venue' },
|
'Venue': {"text":"场馆","color":"#9966ff","value":"Venue"},
|
||||||
Education: { text: '教育', color: '#339999', value: 'Education' },
|
'Education': {"text":"教育","color":"#339999","value":"Education"},
|
||||||
Medical: { text: '医疗', color: '#cc3366', value: 'Medical' },
|
'Medical': {"text":"医疗","color":"#cc3366","value":"Medical"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetProjectsStatusEnum
|
// AssetProjectsStatusEnum
|
||||||
export const AssetProjectsStatusEnum = {
|
export const AssetProjectsStatusEnum= {
|
||||||
SignedNotDelivered: {
|
'SignedNotDelivered': {"text":"签约未交付","color":"#6c757d","value":"SignedNotDelivered"},
|
||||||
text: '签约未交付',
|
'RollingDevelopment': {"text":"滚动开发","color":"#007bff","value":"RollingDevelopment"},
|
||||||
color: '#6c757d',
|
'ManagedAndClosed': {"text":"在管封园","color":"#ffc107","value":"ManagedAndClosed"},
|
||||||
value: 'SignedNotDelivered',
|
'Exited': {"text":"退出","color":"#dc3545","value":"Exited"},
|
||||||
},
|
|
||||||
RollingDevelopment: {
|
|
||||||
text: '滚动开发',
|
|
||||||
color: '#007bff',
|
|
||||||
value: 'RollingDevelopment',
|
|
||||||
},
|
|
||||||
ManagedAndClosed: {
|
|
||||||
text: '在管封园',
|
|
||||||
color: '#ffc107',
|
|
||||||
value: 'ManagedAndClosed',
|
|
||||||
},
|
|
||||||
Exited: { text: '退出', color: '#dc3545', value: 'Exited' },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetUnitsBuildingStructureEnum
|
// AssetUnitsBuildingStructureEnum
|
||||||
export const AssetUnitsBuildingStructureEnum = {
|
export const AssetUnitsBuildingStructureEnum= {
|
||||||
SteelConcrete: { text: '钢混', color: '#007bff', value: 'SteelConcrete' },
|
'SteelConcrete': {"text":"钢混","color":"#007bff","value":"SteelConcrete"},
|
||||||
SteelStructure: { text: '钢结构', color: '#28a745', value: 'SteelStructure' },
|
'SteelStructure': {"text":"钢结构","color":"#28a745","value":"SteelStructure"},
|
||||||
BrickConcrete: { text: '砖混', color: '#ffc107', value: 'BrickConcrete' },
|
'BrickConcrete': {"text":"砖混","color":"#ffc107","value":"BrickConcrete"},
|
||||||
BrickWood: { text: '砖木', color: '#dc3545', value: 'BrickWood' },
|
'BrickWood': {"text":"砖木","color":"#dc3545","value":"BrickWood"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// AssetUnitsBuildingTypeEnum
|
// AssetUnitsBuildingTypeEnum
|
||||||
export const AssetUnitsBuildingTypeEnum = {
|
export const AssetUnitsBuildingTypeEnum= {
|
||||||
SlabAndTower: { text: '板塔结合', color: '#007bff', value: 'SlabAndTower' },
|
'SlabAndTower': {"text":"板塔结合","color":"#007bff","value":"SlabAndTower"},
|
||||||
Slab: { text: '板楼', color: '#28a745', value: 'Slab' },
|
'Slab': {"text":"板楼","color":"#28a745","value":"Slab"},
|
||||||
Tower: { text: '塔楼', color: '#ffc107', value: 'Tower' },
|
'Tower': {"text":"塔楼","color":"#ffc107","value":"Tower"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// 缓存类型
|
// 缓存类型
|
||||||
export const CacheTypeEnum = {
|
export const CacheTypeEnum= {
|
||||||
MobilePhoneVerificationCode: {
|
'MobilePhoneVerificationCode': {"text":"手机验证码","color":"#50ae15","value":"MobilePhoneVerificationCode"},
|
||||||
text: '手机验证码',
|
|
||||||
color: '#3be235',
|
|
||||||
value: 'MobilePhoneVerificationCode',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// CompaniesMerchantTypeEnum
|
// CompaniesMerchantTypeEnum
|
||||||
export const CompaniesMerchantTypeEnum = {
|
export const CompaniesMerchantTypeEnum= {
|
||||||
PropertyManagement: {
|
'PropertyManagement': {"text":"物业公司","color":"#007bff","value":"PropertyManagement"},
|
||||||
text: '物业公司',
|
'ServiceProvider': {"text":"服务商","color":"#28a745","value":"ServiceProvider"},
|
||||||
color: '#007bff',
|
|
||||||
value: 'PropertyManagement',
|
|
||||||
},
|
|
||||||
ServiceProvider: {
|
|
||||||
text: '服务商',
|
|
||||||
color: '#28a745',
|
|
||||||
value: 'ServiceProvider',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// CompanyAppsAppTypeEnum
|
// CompanyAppsAppTypeEnum
|
||||||
export const CompanyAppsAppTypeEnum = {
|
export const CompanyAppsAppTypeEnum= {
|
||||||
MiniProgram: { text: '微信小程序', color: '#3b82f6', value: 'MiniProgram' },
|
'MiniProgram': {"text":"微信小程序","color":"#3b82f6","value":"MiniProgram"},
|
||||||
MpOfficial: { text: '微信公众号', color: '#22c55e', value: 'MpOfficial' },
|
'MpOfficial': {"text":"微信公众号","color":"#22c55e","value":"MpOfficial"},
|
||||||
WorkWechat: { text: '企业微信', color: '#6366f1', value: 'WorkWechat' },
|
'WorkWechat': {"text":"企业微信","color":"#6366f1","value":"WorkWechat"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// CompanyAppsModuleEnum
|
// CompanyAppsModuleEnum
|
||||||
export const CompanyAppsModuleEnum = {
|
export const CompanyAppsModuleEnum= {
|
||||||
Employee: { text: '员工端', color: '#3b82f6', value: 'Employee' },
|
'Employee': {"text":"员工端","color":"#3b82f6","value":"Employee"},
|
||||||
Customer: { text: '客户端', color: '#10b981', value: 'Customer' },
|
'Customer': {"text":"客户端","color":"#10b981","value":"Customer"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// CompanyReceiptAccountsPayChannelEnum
|
// CompanyReceiptAccountsPayChannelEnum
|
||||||
export const CompanyReceiptAccountsPayChannelEnum = {
|
export const CompanyReceiptAccountsPayChannelEnum= {
|
||||||
WeChat: { text: '微信', color: '#07c160', value: 'WeChat' },
|
'WeChat': {"text":"微信","color":"#07c160","value":"WeChat"},
|
||||||
Alipay: { text: '支付宝', color: '#1677ff', value: 'Alipay' },
|
'Alipay': {"text":"支付宝","color":"#1677ff","value":"Alipay"},
|
||||||
BankTransfer: { text: '银行转账', color: '#6c757d', value: 'BankTransfer' },
|
'BankTransfer': {"text":"银行转账","color":"#6c757d","value":"BankTransfer"},
|
||||||
TongLian: { text: '通联支付', color: '#ff9f0a', value: 'TongLian' },
|
'TongLian': {"text":"通联支付","color":"#ff9f0a","value":"TongLian"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// CustomerBacklogsStatusEnum
|
||||||
|
export const CustomerBacklogsStatusEnum= {
|
||||||
|
'Pending': {"text":"待办","color":"#faad14","value":"Pending"},
|
||||||
|
'Done': {"text":"已办","color":"#52c41a","value":"Done"},
|
||||||
|
};
|
||||||
|
|
||||||
|
// CustomerBacklogsTypeEnum
|
||||||
|
export const CustomerBacklogsTypeEnum= {
|
||||||
|
'RegisterApply': {"text":"登记申请","color":"#2db7f5","value":"RegisterApply"},
|
||||||
|
'PaymentPending': {"text":"费用待缴","color":"#faad14","value":"PaymentPending"},
|
||||||
|
'ContractTodo': {"text":"合同待办","color":"#722ed1","value":"ContractTodo"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// 账单状态枚举
|
// 账单状态枚举
|
||||||
export const HouseBillsBillStatusEnum = {
|
export const HouseBillsBillStatusEnum= {
|
||||||
PendingPayment: { text: '待支付', color: '#facc15', value: 'PendingPayment' },
|
'PendingPayment': {"text":"待支付","color":"#facc15","value":"PendingPayment"},
|
||||||
PartiallyPaid: { text: '部分支付', color: '#60a5fa', value: 'PartiallyPaid' },
|
'PartiallyPaid': {"text":"部分支付","color":"#60a5fa","value":"PartiallyPaid"},
|
||||||
Paid: { text: '已支付', color: '#10b981', value: 'Paid' },
|
'Paid': {"text":"已支付","color":"#10b981","value":"Paid"},
|
||||||
Overdue: { text: '已逾期', color: '#ef4444', value: 'Overdue' },
|
'Overdue': {"text":"已逾期","color":"#ef4444","value":"Overdue"},
|
||||||
Cancelled: { text: '已取消', color: '#9ca3af', value: 'Cancelled' },
|
'Cancelled': {"text":"已取消","color":"#9ca3af","value":"Cancelled"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// 房屋账单类型枚举
|
// 房屋账单类型枚举
|
||||||
export const HouseBillsTypeEnum = {
|
export const HouseBillsTypeEnum= {
|
||||||
PropertyFee: { text: '物业费', color: '#3b82f6', value: 'PropertyFee' },
|
'PropertyFee': {"text":"物业费","color":"#3b82f6","value":"PropertyFee"},
|
||||||
MaintenanceFund: {
|
'MaintenanceFund': {"text":"维修基金","color":"#10b981","value":"MaintenanceFund"},
|
||||||
text: '维修基金',
|
'WaterFee': {"text":"水费","color":"#06b6d4","value":"WaterFee"},
|
||||||
color: '#10b981',
|
'ElectricityFee': {"text":"电费","color":"#f59e0b","value":"ElectricityFee"},
|
||||||
value: 'MaintenanceFund',
|
'SharedWaterFee': {"text":"公摊水费","color":"#8b5cf6","value":"SharedWaterFee"},
|
||||||
},
|
'SharedElectricityFee': {"text":"公摊电费","color":"#ec4899","value":"SharedElectricityFee"},
|
||||||
WaterFee: { text: '水费', color: '#06b6d4', value: 'WaterFee' },
|
|
||||||
ElectricityFee: { text: '电费', color: '#f59e0b', value: 'ElectricityFee' },
|
|
||||||
SharedWaterFee: {
|
|
||||||
text: '公摊水费',
|
|
||||||
color: '#8b5cf6',
|
|
||||||
value: 'SharedWaterFee',
|
|
||||||
},
|
|
||||||
SharedElectricityFee: {
|
|
||||||
text: '公摊电费',
|
|
||||||
color: '#ec4899',
|
|
||||||
value: 'SharedElectricityFee',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseOccupantsCardTypeEnum
|
// HouseOccupantsCardTypeEnum
|
||||||
export const HouseOccupantsCardTypeEnum = {
|
export const HouseOccupantsCardTypeEnum= {
|
||||||
MainlandID: {
|
'MainlandID': {"text":"中国大陆居民身份证","color":"#2db7f5","value":"MainlandID"},
|
||||||
text: '中国大陆居民身份证',
|
'HKPermit': {"text":"香港来往大陆通行证(回乡证)","color":"#fa8c16","value":"HKPermit"},
|
||||||
color: '#2db7f5',
|
'MOPermit': {"text":"澳门来往大陆通行证(回乡证)","color":"#faad14","value":"MOPermit"},
|
||||||
value: 'MainlandID',
|
'TWPermit': {"text":"台湾来往大陆通行证(台胞证)","color":"#87d068","value":"TWPermit"},
|
||||||
},
|
'Passport': {"text":"护照","color":"#108ee9","value":"Passport"},
|
||||||
HKPermit: {
|
'BusinessLicense': {"text":"营业执照","color":"#f5222d","value":"BusinessLicense"},
|
||||||
text: '香港来往大陆通行证(回乡证)',
|
|
||||||
color: '#fa8c16',
|
|
||||||
value: 'HKPermit',
|
|
||||||
},
|
|
||||||
MOPermit: {
|
|
||||||
text: '澳门来往大陆通行证(回乡证)',
|
|
||||||
color: '#faad14',
|
|
||||||
value: 'MOPermit',
|
|
||||||
},
|
|
||||||
TWPermit: {
|
|
||||||
text: '台湾来往大陆通行证(台胞证)',
|
|
||||||
color: '#87d068',
|
|
||||||
value: 'TWPermit',
|
|
||||||
},
|
|
||||||
Passport: { text: '护照', color: '#108ee9', value: 'Passport' },
|
|
||||||
BusinessLicense: {
|
|
||||||
text: '营业执照',
|
|
||||||
color: '#f5222d',
|
|
||||||
value: 'BusinessLicense',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseOccupantsHouseRelationEnum
|
// HouseOccupantsHouseRelationEnum
|
||||||
export const HouseOccupantsHouseRelationEnum = {
|
export const HouseOccupantsHouseRelationEnum= {
|
||||||
Owner: { text: '产权人', color: '#2db7f5', value: 'Owner' },
|
'Owner': {"text":"产权人","color":"#2db7f5","value":"Owner"},
|
||||||
Resident: { text: '住户', color: '#87d068', value: 'Resident' },
|
'Resident': {"text":"住户","color":"#87d068","value":"Resident"},
|
||||||
Tenant: { text: '租客', color: '#fa8c16', value: 'Tenant' },
|
'Tenant': {"text":"租客","color":"#fa8c16","value":"Tenant"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseOccupantsRelationWithOwnerEnum
|
// HouseOccupantsRelationWithOwnerEnum
|
||||||
export const HouseOccupantsRelationWithOwnerEnum = {
|
export const HouseOccupantsRelationWithOwnerEnum= {
|
||||||
Self: { text: '本人', color: '#52c41a', value: 'Self' },
|
'Self': {"text":"本人","color":"#52c41a","value":"Self"},
|
||||||
Spouse: { text: '夫妻', color: '#2db7f5', value: 'Spouse' },
|
'Spouse': {"text":"夫妻","color":"#2db7f5","value":"Spouse"},
|
||||||
FatherSon: { text: '父子', color: '#faad14', value: 'FatherSon' },
|
'FatherSon': {"text":"父子","color":"#faad14","value":"FatherSon"},
|
||||||
MotherSon: { text: '母子', color: '#fa8c16', value: 'MotherSon' },
|
'MotherSon': {"text":"母子","color":"#fa8c16","value":"MotherSon"},
|
||||||
Children: { text: '子女', color: '#87d068', value: 'Children' },
|
'Children': {"text":"子女","color":"#87d068","value":"Children"},
|
||||||
ContactPerson: {
|
'ContactPerson': {"text":"指定联系人","color":"#f5222d","value":"ContactPerson"},
|
||||||
text: '指定联系人',
|
|
||||||
color: '#f5222d',
|
|
||||||
value: 'ContactPerson',
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseOccupantsStatusEnum
|
// HouseOccupantsStatusEnum
|
||||||
export const HouseOccupantsStatusEnum = {
|
export const HouseOccupantsStatusEnum= {
|
||||||
Normal: { text: '正常', color: '#52c41a', value: 'Normal' },
|
'Normal': {"text":"正常","color":"#52c41a","value":"Normal"},
|
||||||
Unbound: { text: '已解除', color: '#f5222d', value: 'Unbound' },
|
'Unbound': {"text":"已解除","color":"#f5222d","value":"Unbound"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// 订单状态枚举
|
// 订单状态枚举
|
||||||
export const HouseOrdersOrderStatusEnum = {
|
export const HouseOrdersOrderStatusEnum= {
|
||||||
Pending: { text: '待支付', color: '#facc15', value: 'Pending' },
|
'Pending': {"text":"待支付","color":"#facc15","value":"Pending"},
|
||||||
Paid: { text: '已支付', color: '#10b981', value: 'Paid' },
|
'Paid': {"text":"已支付","color":"#10b981","value":"Paid"},
|
||||||
Refunded: { text: '已退款', color: '#60a5fa', value: 'Refunded' },
|
'Refunded': {"text":"已退款","color":"#60a5fa","value":"Refunded"},
|
||||||
Cancelled: { text: '已取消', color: '#9ca3af', value: 'Cancelled' },
|
'Cancelled': {"text":"已取消","color":"#9ca3af","value":"Cancelled"},
|
||||||
|
'Failed': {"text":"支付失败","color":"#ef4444","value":"Failed"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseOrdersPaymentMethodEnum
|
// HouseOrdersPaymentMethodEnum
|
||||||
export const HouseOrdersPaymentMethodEnum = {
|
export const HouseOrdersPaymentMethodEnum= {
|
||||||
WeChat: { text: '微信', color: '#07c160', value: 'WeChat' },
|
'WeChat': {"text":"微信","color":"#07c160","value":"WeChat"},
|
||||||
Alipay: { text: '支付宝', color: '#1677ff', value: 'Alipay' },
|
'Alipay': {"text":"支付宝","color":"#1677ff","value":"Alipay"},
|
||||||
BankTransfer: { text: '银行转账', color: '#6c757d', value: 'BankTransfer' },
|
'BankTransfer': {"text":"银行转账","color":"#6c757d","value":"BankTransfer"},
|
||||||
TongLian: { text: '通联支付', color: '#ff9f0a', value: 'TongLian' },
|
'TongLian': {"text":"通联支付","color":"#ff9f0a","value":"TongLian"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseRegistersCustomerTypeEnum
|
// HouseRegistersCustomerTypeEnum
|
||||||
export const HouseRegistersCustomerTypeEnum = {
|
export const HouseRegistersCustomerTypeEnum= {
|
||||||
Individual: { text: '个人客户', color: '#2db7f5', value: 'Individual' },
|
'Individual': {"text":"个人客户","color":"#2db7f5","value":"Individual"},
|
||||||
Enterprise: { text: '普通企业', color: '#87d068', value: 'Enterprise' },
|
'Enterprise': {"text":"普通企业","color":"#87d068","value":"Enterprise"},
|
||||||
Developer: { text: '开发企业', color: '#fa8c16', value: 'Developer' },
|
'Developer': {"text":"开发企业","color":"#fa8c16","value":"Developer"},
|
||||||
Government: { text: '政府组织', color: '#f5222d', value: 'Government' },
|
'Government': {"text":"政府组织","color":"#f5222d","value":"Government"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseRegistersHouseStatusEnum
|
// HouseRegistersHouseStatusEnum
|
||||||
export const HouseRegistersHouseStatusEnum = {
|
export const HouseRegistersHouseStatusEnum= {
|
||||||
SelfOccupied: { text: '自住', color: '#28a745', value: 'SelfOccupied' },
|
'SelfOccupied': {"text":"自住","color":"#28a745","value":"SelfOccupied"},
|
||||||
Rented: { text: '出租', color: '#007bff', value: 'Rented' },
|
'Rented': {"text":"出租","color":"#007bff","value":"Rented"},
|
||||||
Vacant: { text: '空置', color: '#dc3545', value: 'Vacant' },
|
'Vacant': {"text":"空置","color":"#dc3545","value":"Vacant"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseRegistersStatusEnum
|
// HouseRegistersStatusEnum
|
||||||
export const HouseRegistersStatusEnum = {
|
export const HouseRegistersStatusEnum= {
|
||||||
Pending: { text: '待审', color: '#faad14', value: 'Pending' },
|
'Pending': {"text":"待审","color":"#faad14","value":"Pending"},
|
||||||
Approved: { text: '已审', color: '#52c41a', value: 'Approved' },
|
'Approved': {"text":"已审","color":"#52c41a","value":"Approved"},
|
||||||
Rejected: { text: '驳回', color: '#f5222d', value: 'Rejected' },
|
'Rejected': {"text":"驳回","color":"#f5222d","value":"Rejected"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseRegistersTypeEnum
|
// HouseRegistersTypeEnum
|
||||||
export const HouseRegistersTypeEnum = {
|
export const HouseRegistersTypeEnum= {
|
||||||
Delivery: { text: '交付登记', color: '#2db7f5', value: 'Delivery' },
|
'Delivery': {"text":"交付登记","color":"#2db7f5","value":"Delivery"},
|
||||||
Transfer: { text: '过户登记', color: '#87d068', value: 'Transfer' },
|
'Transfer': {"text":"过户登记","color":"#87d068","value":"Transfer"},
|
||||||
AddOccupant: { text: '添加住户', color: '#108ee9', value: 'AddOccupant' },
|
'AddOccupant': {"text":"添加住户","color":"#108ee9","value":"AddOccupant"},
|
||||||
MoveOut: { text: '搬离登记', color: '#f50', value: 'MoveOut' },
|
'MoveOut': {"text":"搬离登记","color":"#f50","value":"MoveOut"},
|
||||||
|
'RemoveOwner': {"text":"减少产权人","color":"#d9363e","value":"RemoveOwner"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// HouseRegistersUsagePlanEnum
|
// HouseRegistersUsagePlanEnum
|
||||||
export const HouseRegistersUsagePlanEnum = {
|
export const HouseRegistersUsagePlanEnum= {
|
||||||
Permanent: { text: '常住', color: '#52c41a', value: 'Permanent' },
|
'Permanent': {"text":"常住","color":"#52c41a","value":"Permanent"},
|
||||||
Vacation: { text: '度假', color: '#faad14', value: 'Vacation' },
|
'Vacation': {"text":"度假","color":"#faad14","value":"Vacation"},
|
||||||
Rental: { text: '出租', color: '#2db7f5', value: 'Rental' },
|
'Rental': {"text":"出租","color":"#2db7f5","value":"Rental"},
|
||||||
Commercial: { text: '商用', color: '#f5222d', value: 'Commercial' },
|
'Commercial': {"text":"商用","color":"#f5222d","value":"Commercial"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// OrganizationsTypeEnum
|
// OrganizationsTypeEnum
|
||||||
export const OrganizationsTypeEnum = {
|
export const OrganizationsTypeEnum= {
|
||||||
Group: { text: '集团', color: '#007bff', value: 'Group' },
|
'Group': {"text":"集团","color":"#007bff","value":"Group"},
|
||||||
Company: { text: '公司', color: '#28a745', value: 'Company' },
|
'Company': {"text":"公司","color":"#28a745","value":"Company"},
|
||||||
ManagementOffice: {
|
'ManagementOffice': {"text":"管理处","color":"#ffc107","value":"ManagementOffice"},
|
||||||
text: '管理处',
|
'Department': {"text":"部门","color":"#dc3545","value":"Department"},
|
||||||
color: '#ffc107',
|
|
||||||
value: 'ManagementOffice',
|
|
||||||
},
|
|
||||||
Department: { text: '部门', color: '#dc3545', value: 'Department' },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 性别
|
// 性别
|
||||||
export const SexEnum = {
|
export const SexEnum= {
|
||||||
Male: { text: '男', color: '#0000ff', value: 'Male' },
|
'Male': {"text":"男","color":"#0000ff","value":"Male"},
|
||||||
FeMale: { text: '女', color: '#ff0000', value: 'FeMale' },
|
'FeMale': {"text":"女","color":"#ff0000","value":"FeMale"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// SysModuleEnum
|
// SysModuleEnum
|
||||||
export const SysModuleEnum = {
|
export const SysModuleEnum= {
|
||||||
Admin: { text: '管理员', color: '#cf1322', value: 'Admin' },
|
'Admin': {"text":"管理员","color":"#cf1322","value":"Admin"},
|
||||||
Customer: { text: '客户', color: '#d4b106', value: 'Customer' },
|
'Customer': {"text":"客户","color":"#d4b106","value":"Customer"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// SysPermissionsTypeEnum
|
// SysPermissionsTypeEnum
|
||||||
export const SysPermissionsTypeEnum = {
|
export const SysPermissionsTypeEnum= {
|
||||||
Directory: { text: '目录', color: '#6d7e14', value: 'Directory' },
|
'Directory': {"text":"目录","color":"#6d7e14","value":"Directory"},
|
||||||
Page: { text: '页面', color: '#4d9a13', value: 'Page' },
|
'Page': {"text":"页面","color":"#4d9a13","value":"Page"},
|
||||||
Button: { text: '按钮', color: '#97224f', value: 'Button' },
|
'Button': {"text":"按钮","color":"#97224f","value":"Button"},
|
||||||
};
|
};
|
||||||
|
|
||||||
// WechatAuthsPlatformEnum
|
// WechatAuthsPlatformEnum
|
||||||
export const WechatAuthsPlatformEnum = {
|
export const WechatAuthsPlatformEnum= {
|
||||||
MiniProgram: { text: '微信小程序', color: '#3b82f6', value: 'MiniProgram' },
|
'MiniProgram': {"text":"微信小程序","color":"#3b82f6","value":"MiniProgram"},
|
||||||
MpOfficial: { text: '微信公众号', color: '#22c55e', value: 'MpOfficial' },
|
'MpOfficial': {"text":"微信公众号","color":"#22c55e","value":"MpOfficial"},
|
||||||
WorkWechat: { text: '企业微信', color: '#6366f1', value: 'WorkWechat' },
|
'WorkWechat': {"text":"企业微信","color":"#6366f1","value":"WorkWechat"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -22,13 +22,18 @@ export default function Show({ title = '房屋详情' }) {
|
|||||||
|
|
||||||
let items = [
|
let items = [
|
||||||
{
|
{
|
||||||
label: '当前信息',
|
label: '当前档案',
|
||||||
key: '1',
|
key: '1',
|
||||||
closable: false,
|
closable: false,
|
||||||
children: <OccupantsNow item={data} reload={() => loadShow()} />,
|
children: (
|
||||||
|
<OccupantsNow
|
||||||
|
item={{ asset_houses_id: id }}
|
||||||
|
reload={() => loadShow()}
|
||||||
|
/>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '历史信息',
|
label: '历史档案',
|
||||||
key: '2',
|
key: '2',
|
||||||
closable: false,
|
closable: false,
|
||||||
// children: <MyAssetBuildings item={data} />,
|
// children: <MyAssetBuildings item={data} />,
|
||||||
|
|||||||
@ -91,24 +91,21 @@ 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}>
|
||||||
{/* <HousesOccupantsShow item={item} reload={action?.reload} />
|
{item?.house_occupants?.length !== 0 && (
|
||||||
*/}
|
<MyButtons.View
|
||||||
<MyButtons.View
|
title="详情"
|
||||||
title="详情"
|
onClick={() => {
|
||||||
onClick={() => {
|
navigate(`/archive/asset_house/${item.id}`);
|
||||||
navigate(`/archive/asset_house/${item.id}`);
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
)}
|
||||||
{!item?.house_occupants?.length && (
|
{!item?.house_occupants?.length && (
|
||||||
<Delivery item={item} reload={action?.reload} title="登记" />
|
<Delivery
|
||||||
|
item={item}
|
||||||
|
reload={action?.reload}
|
||||||
|
title="入户登记"
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.Asset.AssetBuildings.Delete({ id: item.id }).then(() =>
|
|
||||||
action?.reload(),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
|||||||
157
src/pages/archive/asset_house/modals/Add.tsx
Normal file
157
src/pages/archive/asset_house/modals/Add.tsx
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyFormItems,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
HouseOccupantsCardTypeEnum,
|
||||||
|
HouseRegistersCustomerTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
|
||||||
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
|
export default function Create(props: MyBetaModalFormProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.Archive.HouseRegisters.Store>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`添加${props.title}`}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="900px"
|
||||||
|
form={form}
|
||||||
|
trigger={
|
||||||
|
<MyButtons.Default title={props.title} size="middle" type="primary" />
|
||||||
|
}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open) {
|
||||||
|
form.resetFields(); // 清空表单数据
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.Archive.HouseRegisters.Store({
|
||||||
|
...values,
|
||||||
|
asset_houses_id: props?.item?.asset_houses_id,
|
||||||
|
type: 'Delivery',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success(props.title + '成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'customer_type',
|
||||||
|
title: '客户类型',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
valueEnum: HouseRegistersCustomerTypeEnum,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
valueType: 'formList',
|
||||||
|
dataIndex: 'customer_info',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
fieldProps: {
|
||||||
|
copyIconProps: false,
|
||||||
|
creatorButtonProps: {
|
||||||
|
creatorButtonText: '增加产权人',
|
||||||
|
style: { color: 'red' },
|
||||||
|
danger: true,
|
||||||
|
},
|
||||||
|
itemRender: (
|
||||||
|
{ listDom, action }: any,
|
||||||
|
{ index }: { index: number },
|
||||||
|
) => {
|
||||||
|
return (
|
||||||
|
<ProCard
|
||||||
|
bordered
|
||||||
|
style={{ marginBlockEnd: 8 }}
|
||||||
|
title={`产权人${index + 1}`}
|
||||||
|
extra={action}
|
||||||
|
bodyStyle={{ paddingBlockEnd: 0 }}
|
||||||
|
>
|
||||||
|
{listDom}
|
||||||
|
</ProCard>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
valueType: 'group',
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '姓名',
|
||||||
|
dataIndex: 'name',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '手机号',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 11,
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备用手机号',
|
||||||
|
dataIndex: 'reserve_phone',
|
||||||
|
colProps: { span: 6 },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 11,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MyFormItems.EnumSelect({
|
||||||
|
key: 'card_type',
|
||||||
|
title: '证件类型',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
valueEnum: HouseOccupantsCardTypeEnum,
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '证件号码',
|
||||||
|
dataIndex: 'id_card',
|
||||||
|
colProps: { span: 12 },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 18,
|
||||||
|
},
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
|
||||||
|
// {
|
||||||
|
// title: '是否在居住中',
|
||||||
|
// dataIndex: 'is_live_in',
|
||||||
|
// colProps: { span: 8 },
|
||||||
|
// valueType: 'switch',
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
valueType: 'group',
|
||||||
|
columns: [
|
||||||
|
MyFormItems.UploadImages({
|
||||||
|
key: 'card_front_image',
|
||||||
|
title: '证件正面',
|
||||||
|
max: 1,
|
||||||
|
colProps: { span: 4 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
MyFormItems.UploadImages({
|
||||||
|
key: 'card_back_image',
|
||||||
|
title: '证件反面',
|
||||||
|
max: 1,
|
||||||
|
colProps: { span: 4 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
53
src/pages/archive/asset_house/modals/MoveIn.tsx
Normal file
53
src/pages/archive/asset_house/modals/MoveIn.tsx
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { MyBetaModalFormProps, MyButtons, MyModalFormProps } from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
|
export default function Create(props: MyBetaModalFormProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.Archive.HouseRegisters.Update>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`添加${props.title}`}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="500px"
|
||||||
|
form={form}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open && props.item) {
|
||||||
|
form.setFieldsValue(props.item);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
trigger={
|
||||||
|
<MyButtons.Default title={props.title} size="small" type="link" />
|
||||||
|
}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.Archive.HouseRegisters.Update({
|
||||||
|
...values,
|
||||||
|
id: props?.item?.id ?? 0,
|
||||||
|
is_live_in: 1,
|
||||||
|
customer_info: props?.item?.id,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success(props.title + '成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
title: '入住日期',
|
||||||
|
valueType: 'date',
|
||||||
|
dataIndex: 'move_in_date',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 11,
|
||||||
|
style: {
|
||||||
|
width: '100%',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -8,7 +8,9 @@ import {
|
|||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
import { useEffect, useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
|
import Add from '../modals/Add';
|
||||||
import AddOccupant from '../modals/AddOccupant';
|
import AddOccupant from '../modals/AddOccupant';
|
||||||
|
import MoveIn from '../modals/MoveIn';
|
||||||
import MoveOut from '../modals/MoveOut';
|
import MoveOut from '../modals/MoveOut';
|
||||||
import Transfer from '../modals/Transfer';
|
import Transfer from '../modals/Transfer';
|
||||||
|
|
||||||
@ -27,7 +29,7 @@ export default function Index({ ...rest }) {
|
|||||||
MyProTableProps.request(
|
MyProTableProps.request(
|
||||||
{
|
{
|
||||||
...params,
|
...params,
|
||||||
asset_houses_id: rest.item?.id,
|
asset_houses_id: rest.item?.asset_houses_id,
|
||||||
status: 'Normal',
|
status: 'Normal',
|
||||||
},
|
},
|
||||||
sort,
|
sort,
|
||||||
@ -35,6 +37,12 @@ export default function Index({ ...rest }) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
toolBarRender={(action) => [
|
toolBarRender={(action) => [
|
||||||
|
<Add
|
||||||
|
key="add"
|
||||||
|
item={rest.item}
|
||||||
|
reload={action?.reload}
|
||||||
|
title="添加产权人"
|
||||||
|
/>,
|
||||||
<Transfer
|
<Transfer
|
||||||
key="Transfer"
|
key="Transfer"
|
||||||
item={rest.item}
|
item={rest.item}
|
||||||
@ -97,8 +105,14 @@ export default function Index({ ...rest }) {
|
|||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
{/* <GridCreateUpdate item={item} reload={action?.reload} /> */}
|
{/* <GridCreateUpdate item={item} reload={action?.reload} /> */}
|
||||||
{item?.is_live_in && (
|
{item?.is_live_in && (
|
||||||
|
<MoveIn item={item} reload={action?.reload} title="入住" />
|
||||||
|
)}
|
||||||
|
{item?.move_in_date && (
|
||||||
<MoveOut item={item} reload={action?.reload} title="搬离" />
|
<MoveOut item={item} reload={action?.reload} title="搬离" />
|
||||||
)}
|
)}
|
||||||
|
{/* {item?.HouseOccupantsHouseRelationEnum === 'Owner' && (
|
||||||
|
<MoveOut item={item} reload={action?.reload} title="移除" />
|
||||||
|
)} */}
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { ProCard } from '@ant-design/pro-components';
|
|||||||
import { useParams } from '@umijs/max';
|
import { useParams } from '@umijs/max';
|
||||||
import { Tabs } from 'antd';
|
import { Tabs } from 'antd';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
import AssetAccounts from './components/AssetAccounts';
|
||||||
import MyAssetBuildings from './components/AssetBuildings';
|
import MyAssetBuildings from './components/AssetBuildings';
|
||||||
import AssetGrid from './components/AssetGrid';
|
import AssetGrid from './components/AssetGrid';
|
||||||
import AssetInfo from './components/AssetInfo';
|
import AssetInfo from './components/AssetInfo';
|
||||||
@ -41,6 +42,12 @@ export default function Show({ title = '项目详情' }) {
|
|||||||
closable: false,
|
closable: false,
|
||||||
children: <AssetGrid item={data} />,
|
children: <AssetGrid item={data} />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '收款账号',
|
||||||
|
key: 'asset_accounts',
|
||||||
|
closable: false,
|
||||||
|
children: <AssetAccounts item={data} />,
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// label: '车位管理',
|
// label: '车位管理',
|
||||||
// key: 'carport',
|
// key: 'carport',
|
||||||
|
|||||||
85
src/pages/asset/asset_projects/components/AssetAccounts.tsx
Normal file
85
src/pages/asset/asset_projects/components/AssetAccounts.tsx
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyColumns,
|
||||||
|
MyProTableProps,
|
||||||
|
} from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
import AssetAccountsSelect from '../modals/AssetAccountsSelect';
|
||||||
|
|
||||||
|
export default function ReceiptAccounts(props: MyBetaModalFormProps) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
search={false}
|
||||||
|
request={async (params, sort) =>
|
||||||
|
MyProTableProps.request(
|
||||||
|
{
|
||||||
|
...params,
|
||||||
|
companies_id: props?.item?.companies_id,
|
||||||
|
projects_id: props?.item?.id,
|
||||||
|
},
|
||||||
|
sort,
|
||||||
|
Apis.Company.CompanyProjectReceiptAccounts.List,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
toolBarRender={(action) => [
|
||||||
|
<AssetAccountsSelect
|
||||||
|
key="Select"
|
||||||
|
reload={action?.reload}
|
||||||
|
item={props?.item}
|
||||||
|
title="添加收款账号"
|
||||||
|
/>,
|
||||||
|
]}
|
||||||
|
// options={false}
|
||||||
|
columns={[
|
||||||
|
MyColumns.ID(),
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '收款账号名称',
|
||||||
|
dataIndex: ['receipt_account', 'company_name'],
|
||||||
|
// width: 360,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '开户行',
|
||||||
|
dataIndex: ['receipt_account', 'company_bank'],
|
||||||
|
search: false,
|
||||||
|
// width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '收款账号',
|
||||||
|
dataIndex: ['receipt_account', 'company_account'],
|
||||||
|
search: false,
|
||||||
|
// width: 200,
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// title: '是否默认',
|
||||||
|
// dataIndex: 'is_default',
|
||||||
|
// search: false,
|
||||||
|
// render(_, record) {
|
||||||
|
// return `${record?.is_default ? '是' : '否'} `;
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// MyColumns.UpdatedAt(),
|
||||||
|
// MyColumns.CreatedAt(),
|
||||||
|
MyColumns.Option({
|
||||||
|
render: (_, item: any, index, action) => (
|
||||||
|
<Space key={index}>
|
||||||
|
<MyButtons.Delete
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.Company.CompanyProjectReceiptAccounts.Delete({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -1,14 +1,13 @@
|
|||||||
import { MyButtons, MyColumns, MyProTableProps } from '@/common';
|
import { MyButtons, MyColumns, MyProTableProps } from '@/common';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
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 { useEffect, useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
import GridCreate from '../modals/GridCreate';
|
import GridCreate from '../modals/GridCreate';
|
||||||
|
import GridMannger from '../modals/GridMannger';
|
||||||
import GridCreateUpdate from '../modals/GridUpdate';
|
import GridCreateUpdate from '../modals/GridUpdate';
|
||||||
|
|
||||||
export default function Index({ ...rest }) {
|
export default function Index({ ...rest }) {
|
||||||
const navigate = useNavigate();
|
|
||||||
const actionLooks = useRef<any>();
|
const actionLooks = useRef<any>();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
actionLooks?.current.reloadAndRest();
|
actionLooks?.current.reloadAndRest();
|
||||||
@ -21,7 +20,7 @@ export default function Index({ ...rest }) {
|
|||||||
actionRef={actionLooks}
|
actionRef={actionLooks}
|
||||||
request={async (params, sort) =>
|
request={async (params, sort) =>
|
||||||
MyProTableProps.request(
|
MyProTableProps.request(
|
||||||
{ ...params, asset_projects_id: rest.item?.asset_projects_id },
|
{ ...params, asset_projects_id: rest.item?.id },
|
||||||
sort,
|
sort,
|
||||||
Apis.Grid.Grids.List,
|
Apis.Grid.Grids.List,
|
||||||
)
|
)
|
||||||
@ -43,12 +42,21 @@ export default function Index({ ...rest }) {
|
|||||||
title: '网格标识',
|
title: '网格标识',
|
||||||
dataIndex: 'grid_mark',
|
dataIndex: 'grid_mark',
|
||||||
},
|
},
|
||||||
MyColumns.CreatedAt(),
|
{
|
||||||
|
title: '网格员',
|
||||||
|
dataIndex: ['company_employee', 'name'],
|
||||||
|
render: (_, item: any) =>
|
||||||
|
`${item?.company_employee?.name || ''}-${
|
||||||
|
item?.company_employee?.phone || ''
|
||||||
|
}`,
|
||||||
|
},
|
||||||
|
// MyColumns.CreatedAt(),
|
||||||
MyColumns.UpdatedAt(),
|
MyColumns.UpdatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
<GridCreateUpdate item={item} reload={action?.reload} />
|
<GridCreateUpdate item={item} reload={action?.reload} />
|
||||||
|
<GridMannger item={item} reload={action?.reload} />
|
||||||
<MyButtons.Delete
|
<MyButtons.Delete
|
||||||
onConfirm={() =>
|
onConfirm={() =>
|
||||||
Apis.Asset.AssetBuildings.Delete({ id: item.id }).then(() =>
|
Apis.Asset.AssetBuildings.Delete({ id: item.id }).then(() =>
|
||||||
|
|||||||
@ -0,0 +1,91 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyColumns,
|
||||||
|
MyProTableProps,
|
||||||
|
} from '@/common';
|
||||||
|
import { MyModal } from '@/components/MyModal';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { message } from 'antd';
|
||||||
|
import { useState } from 'react';
|
||||||
|
|
||||||
|
export default function Index(props: MyBetaModalFormProps) {
|
||||||
|
const [selectedProjectsIds, setSelectedProjectsIds] = useState<any>([]);
|
||||||
|
const onShowContactPhone = () => {
|
||||||
|
Apis.Company.CompanyProjectReceiptAccounts.Store({
|
||||||
|
companies_id: props?.item?.id ?? 0,
|
||||||
|
projects_id: props?.item?.id,
|
||||||
|
receipt_accounts_id: selectedProjectsIds[0],
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success('添加成功!');
|
||||||
|
})
|
||||||
|
.catch(() => false);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<MyModal
|
||||||
|
title={props.title || '查看'}
|
||||||
|
width="800px"
|
||||||
|
trigger={
|
||||||
|
<MyButtons.Default
|
||||||
|
type="primary"
|
||||||
|
size="middle"
|
||||||
|
title={`${props.title}`}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
node={
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
request={async (params, sort) =>
|
||||||
|
MyProTableProps.request(
|
||||||
|
{
|
||||||
|
...params,
|
||||||
|
companies_id: props?.item?.companies_id,
|
||||||
|
},
|
||||||
|
sort,
|
||||||
|
Apis.Company.CompanyReceiptAccounts.List,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
rowSelection={{
|
||||||
|
type: 'radio',
|
||||||
|
onChange: (selectedRowKeys) => {
|
||||||
|
setSelectedProjectsIds(selectedRowKeys);
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
tableAlertOptionRender={() => {
|
||||||
|
return (
|
||||||
|
<MyButtons.Create
|
||||||
|
title="确定添加"
|
||||||
|
type="primary"
|
||||||
|
key="create2"
|
||||||
|
onClick={() => onShowContactPhone()}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
search={false}
|
||||||
|
options={false}
|
||||||
|
columns={[
|
||||||
|
MyColumns.ID(),
|
||||||
|
{
|
||||||
|
title: '收款户名',
|
||||||
|
dataIndex: 'company_name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '开户行',
|
||||||
|
dataIndex: 'company_bank',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '收款账号',
|
||||||
|
dataIndex: 'company_account',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
64
src/pages/asset/asset_projects/modals/GridMannger.tsx
Normal file
64
src/pages/asset/asset_projects/modals/GridMannger.tsx
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Selects } from '@/components/Select';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
|
import { ButtonProps, Form, message } from 'antd';
|
||||||
|
|
||||||
|
export default function Create(
|
||||||
|
props: { buttonProps?: ButtonProps } & MyBetaModalFormProps,
|
||||||
|
) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.Grid.Grids.AddManager>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`设置网格员`}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="500px"
|
||||||
|
form={form}
|
||||||
|
trigger={<MyButtons.Default title="网格员" type="link" />}
|
||||||
|
request={() => Promise.resolve(props.item)}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open && props.item) {
|
||||||
|
// 获取详情数据
|
||||||
|
Apis.Grid.Grids.Show({
|
||||||
|
id: props?.item?.companies_id,
|
||||||
|
}).then((res) => {
|
||||||
|
form.setFieldsValue({
|
||||||
|
...res.data,
|
||||||
|
company_employees_id: res.data.company_has_managements?.map(
|
||||||
|
(item: any) => item.company_employees_id,
|
||||||
|
),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onFinish={async (values: any) =>
|
||||||
|
Apis.Grid.Grids.AddManager({
|
||||||
|
...values,
|
||||||
|
id: props?.item?.id,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success('成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
Selects?.Employees({
|
||||||
|
title: '设置网格员',
|
||||||
|
dataIndex: 'company_employees_id',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -61,7 +61,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
fieldProps: {
|
fieldProps: {
|
||||||
copyIconProps: false,
|
copyIconProps: false,
|
||||||
creatorButtonProps: {
|
creatorButtonProps: {
|
||||||
creatorButtonText: '添加楼栋-单元',
|
creatorButtonText: '添加楼栋单元',
|
||||||
},
|
},
|
||||||
itemRender: (
|
itemRender: (
|
||||||
{ listDom, action }: any,
|
{ listDom, action }: any,
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import Employees from './components/Employees';
|
|||||||
import Organizations from './components/Organizations';
|
import Organizations from './components/Organizations';
|
||||||
import Positions from './components/Positions';
|
import Positions from './components/Positions';
|
||||||
import Projects from './components/Projects';
|
import Projects from './components/Projects';
|
||||||
|
import ReceiptAccounts from './components/ReceiptAccounts';
|
||||||
export default function Show({ title = '机构详情' }) {
|
export default function Show({ title = '机构详情' }) {
|
||||||
const { id } = useParams<{ id: string }>();
|
const { id } = useParams<{ id: string }>();
|
||||||
const [data, setShow] = useState<any>({});
|
const [data, setShow] = useState<any>({});
|
||||||
@ -54,6 +55,12 @@ export default function Show({ title = '机构详情' }) {
|
|||||||
closable: false,
|
closable: false,
|
||||||
children: <Positions item={data} />,
|
children: <Positions item={data} />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '收款账号',
|
||||||
|
key: '6',
|
||||||
|
closable: false,
|
||||||
|
children: <ReceiptAccounts item={data} />,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<MyPageContainer title={title}>
|
<MyPageContainer title={title}>
|
||||||
|
|||||||
@ -34,6 +34,16 @@ export default function Organizations(props: MyBetaModalFormProps) {
|
|||||||
]}
|
]}
|
||||||
options={false}
|
options={false}
|
||||||
columns={[
|
columns={[
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '组织类型',
|
||||||
|
dataIndex: 'type',
|
||||||
|
valueEnum: OrganizationsTypeEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '组织名称',
|
||||||
|
dataIndex: 'name',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '组织ID',
|
title: '组织ID',
|
||||||
dataIndex: 'id',
|
dataIndex: 'id',
|
||||||
@ -45,15 +55,11 @@ export default function Organizations(props: MyBetaModalFormProps) {
|
|||||||
search: false,
|
search: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '组织名称',
|
title: '上级组织ID',
|
||||||
dataIndex: 'name',
|
dataIndex: ['organization_parent', 'id'],
|
||||||
},
|
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '组织类型',
|
|
||||||
dataIndex: 'type',
|
|
||||||
valueEnum: OrganizationsTypeEnum,
|
|
||||||
search: false,
|
search: false,
|
||||||
}),
|
},
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// title: '负责人',
|
// title: '负责人',
|
||||||
// dataIndex: ['manager', 'name'],
|
// dataIndex: ['manager', 'name'],
|
||||||
|
|||||||
@ -38,11 +38,13 @@ export default function Organizations(props: MyBetaModalFormProps) {
|
|||||||
{
|
{
|
||||||
title: '岗位名称',
|
title: '岗位名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '岗位编号',
|
title: '岗位编号',
|
||||||
dataIndex: 'code',
|
dataIndex: 'code',
|
||||||
search: false,
|
search: false,
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: '岗位排序',
|
// title: '岗位排序',
|
||||||
@ -53,6 +55,7 @@ export default function Organizations(props: MyBetaModalFormProps) {
|
|||||||
title: '岗位备注',
|
title: '岗位备注',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
search: false,
|
search: false,
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
MyColumns.UpdatedAt(),
|
MyColumns.UpdatedAt(),
|
||||||
// MyColumns.CreatedAt(),
|
// MyColumns.CreatedAt(),
|
||||||
|
|||||||
87
src/pages/company/companies/components/ReceiptAccounts.tsx
Normal file
87
src/pages/company/companies/components/ReceiptAccounts.tsx
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyColumns,
|
||||||
|
MyProTableProps,
|
||||||
|
} from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
import ReceiptAccountsCreate from '../modals/ReceiptAccountsCreate';
|
||||||
|
import ReceiptAccountsUpdate from '../modals/ReceiptAccountsUpdate';
|
||||||
|
|
||||||
|
export default function ReceiptAccounts(props: MyBetaModalFormProps) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ProTable
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
search={false}
|
||||||
|
request={async (params, sort) =>
|
||||||
|
MyProTableProps.request(
|
||||||
|
{ ...params, companies_id: props?.item?.id },
|
||||||
|
sort,
|
||||||
|
Apis.Company.CompanyReceiptAccounts.List,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
toolBarRender={(action) => [
|
||||||
|
<ReceiptAccountsCreate
|
||||||
|
key="Create"
|
||||||
|
reload={action?.reload}
|
||||||
|
item={props?.item}
|
||||||
|
title="收款账号"
|
||||||
|
/>,
|
||||||
|
]}
|
||||||
|
// options={false}
|
||||||
|
columns={[
|
||||||
|
MyColumns.ID(),
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '收款账号名称',
|
||||||
|
dataIndex: 'company_name',
|
||||||
|
// width: 360,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '开户行',
|
||||||
|
dataIndex: 'company_bank',
|
||||||
|
search: false,
|
||||||
|
// width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '收款账号',
|
||||||
|
dataIndex: 'company_account',
|
||||||
|
search: false,
|
||||||
|
// width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '是否默认',
|
||||||
|
dataIndex: 'is_default',
|
||||||
|
search: false,
|
||||||
|
render(_, record) {
|
||||||
|
return `${record?.is_default ? '是' : '否'} `;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// MyColumns.UpdatedAt(),
|
||||||
|
// MyColumns.CreatedAt(),
|
||||||
|
MyColumns.Option({
|
||||||
|
render: (_, item: any, index, action) => (
|
||||||
|
<Space key={index}>
|
||||||
|
<ReceiptAccountsUpdate
|
||||||
|
item={item}
|
||||||
|
reload={action?.reload}
|
||||||
|
title="收款账号"
|
||||||
|
/>
|
||||||
|
<MyButtons.Delete
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.Company.CompanyReceiptAccounts.Delete({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -9,16 +9,24 @@ import { Selects } from '@/components/Select';
|
|||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { OrganizationsTypeEnum } from '@/gen/Enums';
|
import { OrganizationsTypeEnum } from '@/gen/Enums';
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { message } from 'antd';
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
export default function Create(props: MyBetaModalFormProps) {
|
export default function Create(props: MyBetaModalFormProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BetaSchemaForm<ApiTypes.Company.Organizations.Store>
|
<BetaSchemaForm<ApiTypes.Company.Organizations.Store>
|
||||||
{...MyModalFormProps.props}
|
{...MyModalFormProps.props}
|
||||||
title={`添加${props.title}`}
|
title={`添加${props.title}`}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="800px"
|
width="500px"
|
||||||
trigger={<MyButtons.Create title={`添加${props.title}`} />}
|
trigger={<MyButtons.Create title={`添加${props.title}`} />}
|
||||||
|
form={form}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open) {
|
||||||
|
form.resetFields(); // 清空表单数据
|
||||||
|
}
|
||||||
|
}}
|
||||||
onFinish={async (values) =>
|
onFinish={async (values) =>
|
||||||
Apis.Company.Organizations.Store({
|
Apis.Company.Organizations.Store({
|
||||||
...values,
|
...values,
|
||||||
@ -32,7 +40,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
Selects?.Organizations({
|
Selects?.OrganizationsTree({
|
||||||
title: '上级组织',
|
title: '上级组织',
|
||||||
key: 'parent_id',
|
key: 'parent_id',
|
||||||
params: { companies_id: props?.item?.id },
|
params: { companies_id: props?.item?.id },
|
||||||
@ -46,29 +54,29 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
},
|
},
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'type',
|
key: 'type',
|
||||||
title: '类型',
|
title: '组织类型',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
valueEnum: OrganizationsTypeEnum,
|
valueEnum: OrganizationsTypeEnum,
|
||||||
required: true,
|
required: true,
|
||||||
}),
|
}),
|
||||||
Selects?.Employees({
|
// Selects?.Employees({
|
||||||
title: '负责人',
|
// title: '负责人',
|
||||||
colProps: { span: 8 },
|
// colProps: { span: 8 },
|
||||||
}),
|
// }),
|
||||||
{
|
// {
|
||||||
key: 'manager_phone',
|
// key: 'manager_phone',
|
||||||
title: '负责人手机',
|
// title: '负责人手机',
|
||||||
colProps: { span: 8 },
|
// colProps: { span: 8 },
|
||||||
valueType: 'number',
|
// valueType: 'number',
|
||||||
fieldProps: {
|
// fieldProps: {
|
||||||
maxLength: 11,
|
// maxLength: 11,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
key: 'manager_email',
|
// key: 'manager_email',
|
||||||
title: '负责人邮箱',
|
// title: '负责人邮箱',
|
||||||
colProps: { span: 8 },
|
// colProps: { span: 8 },
|
||||||
},
|
// },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -20,7 +20,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
form={form}
|
form={form}
|
||||||
trigger={<MyButtons.Edit />}
|
trigger={<MyButtons.Edit />}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="800px"
|
width="500px"
|
||||||
onOpenChange={(open: any) => {
|
onOpenChange={(open: any) => {
|
||||||
if (open && props.item) {
|
if (open && props.item) {
|
||||||
form.setFieldsValue(props.item);
|
form.setFieldsValue(props.item);
|
||||||
@ -30,6 +30,7 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
Apis.Company.Organizations.Update({
|
Apis.Company.Organizations.Update({
|
||||||
...values,
|
...values,
|
||||||
id: props.item?.id ?? 0,
|
id: props.item?.id ?? 0,
|
||||||
|
parent_id: values?.parent_id ?? 0,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
props.reload?.();
|
props.reload?.();
|
||||||
@ -39,12 +40,6 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
}
|
}
|
||||||
columns={[
|
columns={[
|
||||||
Selects?.Organizations({
|
|
||||||
title: '上级组织',
|
|
||||||
key: 'parent_id',
|
|
||||||
params: { companies_id: props?.item?.companies_id },
|
|
||||||
colProps: { span: 24 },
|
|
||||||
}),
|
|
||||||
{
|
{
|
||||||
key: 'name',
|
key: 'name',
|
||||||
title: '组织名称',
|
title: '组织名称',
|
||||||
@ -58,24 +53,12 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
valueEnum: OrganizationsTypeEnum,
|
valueEnum: OrganizationsTypeEnum,
|
||||||
required: true,
|
required: true,
|
||||||
}),
|
}),
|
||||||
Selects?.Employees({
|
Selects?.OrganizationsTree({
|
||||||
title: '负责人',
|
title: '上级组织',
|
||||||
colProps: { span: 8 },
|
key: 'parent_id',
|
||||||
|
params: { companies_id: props?.item?.companies_id },
|
||||||
|
colProps: { span: 24 },
|
||||||
}),
|
}),
|
||||||
{
|
|
||||||
key: 'manager_phone',
|
|
||||||
title: '负责人手机',
|
|
||||||
colProps: { span: 8 },
|
|
||||||
valueType: 'number',
|
|
||||||
fieldProps: {
|
|
||||||
maxLength: 11,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'manager_email',
|
|
||||||
title: '负责人邮箱',
|
|
||||||
colProps: { span: 8 },
|
|
||||||
},
|
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
77
src/pages/company/companies/modals/ReceiptAccountsCreate.tsx
Normal file
77
src/pages/company/companies/modals/ReceiptAccountsCreate.tsx
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyFormItems,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { CompanyReceiptAccountsPayChannelEnum } from '@/gen/Enums';
|
||||||
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
|
export default function Create(props: MyBetaModalFormProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.Company.CompanyReceiptAccounts.Store>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`添加收款账号`}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="500px"
|
||||||
|
trigger={<MyButtons.Create title={`添加账号`} />}
|
||||||
|
form={form}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open) {
|
||||||
|
form.resetFields(); // 清空表单数据
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.Company.CompanyReceiptAccounts.Store({
|
||||||
|
...values,
|
||||||
|
companies_id: props?.item?.id,
|
||||||
|
is_default: values.is_default ? 1 : 0,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success(props.title + '成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
key: 'company_name',
|
||||||
|
title: '收款账户名称',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'company_bank',
|
||||||
|
title: '开户行',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'company_account',
|
||||||
|
title: '收款账户',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'pay_channel',
|
||||||
|
title: '收款渠道',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
valueEnum: CompanyReceiptAccountsPayChannelEnum,
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
key: 'is_default',
|
||||||
|
title: '是否设为默认账号',
|
||||||
|
valueType: 'switch',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
76
src/pages/company/companies/modals/ReceiptAccountsUpdate.tsx
Normal file
76
src/pages/company/companies/modals/ReceiptAccountsUpdate.tsx
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyFormItems,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { CompanyReceiptAccountsPayChannelEnum } from '@/gen/Enums';
|
||||||
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
|
import { Form, message } from 'antd';
|
||||||
|
export default function Update(props: MyBetaModalFormProps) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.Company.CompanyReceiptAccounts.Update>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`编辑${props.title}`}
|
||||||
|
trigger={<MyButtons.Edit />}
|
||||||
|
wrapperCol={{ span: 24 }}
|
||||||
|
width="500px"
|
||||||
|
form={form}
|
||||||
|
onOpenChange={(open: any) => {
|
||||||
|
if (open && props.item) {
|
||||||
|
form.setFieldsValue(props.item);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onFinish={async (values) =>
|
||||||
|
Apis.Company.CompanyReceiptAccounts.Update({
|
||||||
|
...values,
|
||||||
|
companies_id: props?.item?.companies_id,
|
||||||
|
id: props.item?.id ?? 0,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success(props.title + '成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false)
|
||||||
|
}
|
||||||
|
columns={[
|
||||||
|
{
|
||||||
|
key: 'company_name',
|
||||||
|
title: '收款账户名称',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'company_bank',
|
||||||
|
title: '开户行',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'company_account',
|
||||||
|
title: '收款账户',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
},
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'pay_channel',
|
||||||
|
title: '收款渠道',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
valueEnum: CompanyReceiptAccountsPayChannelEnum,
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
key: 'is_default',
|
||||||
|
title: '是否设为默认账号',
|
||||||
|
valueType: 'switch',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -91,6 +91,9 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
params: { companies_id: companies_id },
|
params: { companies_id: companies_id },
|
||||||
key: 'positions_id',
|
key: 'positions_id',
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
fieldProps: {
|
||||||
|
showSearch: true,
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -44,7 +44,7 @@ export default function Index({ title = '账单' }) {
|
|||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '金额',
|
title: '账单金额',
|
||||||
dataIndex: 'amount',
|
dataIndex: 'amount',
|
||||||
search: false,
|
search: false,
|
||||||
width: 100,
|
width: 100,
|
||||||
@ -62,18 +62,18 @@ export default function Index({ title = '账单' }) {
|
|||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
// {
|
||||||
title: '计费开始日期',
|
// title: '计费开始日期',
|
||||||
dataIndex: 'start_date',
|
// dataIndex: 'start_date',
|
||||||
search: false,
|
// search: false,
|
||||||
width: 120,
|
// width: 120,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: '计费结束日期',
|
// title: '计费结束日期',
|
||||||
dataIndex: 'end_date',
|
// dataIndex: 'end_date',
|
||||||
search: false,
|
// search: false,
|
||||||
width: 120,
|
// width: 120,
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// title: '滞纳金起算日期',
|
// title: '滞纳金起算日期',
|
||||||
// dataIndex: 'late_start_date',
|
// dataIndex: 'late_start_date',
|
||||||
|
|||||||
@ -29,7 +29,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
Apis.Bill.HouseBills.Store(values)
|
Apis.Bill.HouseBills.Store(values)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
props.reload?.();
|
props.reload?.();
|
||||||
message.success(props.title + '成功');
|
message.success(props.title + '账单添加成功');
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
.catch(() => false)
|
.catch(() => false)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user