fix:修改机构相关的文件结构
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m4s
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m4s
This commit is contained in:
parent
786a48fe99
commit
7545067d68
@ -16,6 +16,7 @@ export default defineConfig({
|
||||
'/api/': {
|
||||
// target: 'http://yt:8003',
|
||||
target: 'http://10.39.13.80:8001',
|
||||
// target: 'http://10.39.67.86:8001/',
|
||||
// target: 'https://test-admin.linyikj.com.cn/',
|
||||
// target: 'http://we6f9c65.natappfree.cc',
|
||||
// target: 'https://loanos-test.nchl.net/',
|
||||
|
||||
@ -5,15 +5,15 @@ import { useParams } from '@umijs/max';
|
||||
import { Space, Tabs } from 'antd';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
import Assets from './components/Assets';
|
||||
import CompanyApps from './components/CompanyApps';
|
||||
import ComponentsInfo from './components/ComponentsInfo';
|
||||
import Employees from './components/Employees';
|
||||
import Organizations from './components/Organizations';
|
||||
import Positions from './components/Positions';
|
||||
import PropertyBrands from './components/PropertyBrands';
|
||||
import ReceiptAccounts from './components/ReceiptAccounts';
|
||||
import CompanyUpdate from './modals/CompanyUpdate';
|
||||
import CompanyApps from './table/Apps';
|
||||
import Assets from './table/Assets';
|
||||
import Brands from './table/Brands';
|
||||
import ComponentsInfo from './table/ComponentsInfo';
|
||||
import Employees from './table/Employees';
|
||||
import Organizations from './table/Organizations';
|
||||
import Positions from './table/Positions';
|
||||
import ReceiptAccounts from './table/ReceiptAccounts';
|
||||
|
||||
export default function Show({ title }: { title?: string } = {}) {
|
||||
const { id } = useParams<{ id: string }>();
|
||||
@ -43,12 +43,6 @@ export default function Show({ title }: { title?: string } = {}) {
|
||||
}, [id]);
|
||||
|
||||
let items = [
|
||||
{
|
||||
label: '0-品牌配置',
|
||||
key: '0',
|
||||
closable: false,
|
||||
children: <PropertyBrands item={data} />,
|
||||
},
|
||||
{
|
||||
label: '1-项目配置',
|
||||
key: '1',
|
||||
@ -86,6 +80,12 @@ export default function Show({ title }: { title?: string } = {}) {
|
||||
closable: false,
|
||||
children: <CompanyApps item={data} />,
|
||||
},
|
||||
{
|
||||
label: '7-品牌配置',
|
||||
key: '7',
|
||||
closable: false,
|
||||
children: <Brands item={data} />,
|
||||
},
|
||||
];
|
||||
return (
|
||||
<MyPageContainer title={title}>
|
||||
@ -104,7 +104,7 @@ export default function Show({ title }: { title?: string } = {}) {
|
||||
}
|
||||
>
|
||||
<div>
|
||||
* 您可在以下页签中对应配置:项目、组织、岗位、员工、账号、应用;
|
||||
* 您可在以下页签中对应配置:项目、组织、岗位、员工、账号、应用、品牌;
|
||||
</div>
|
||||
</ProCard>
|
||||
<ProCard>
|
||||
@ -9,9 +9,9 @@ import { Apis } from '@/gen/Apis';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { useNavigate } from '@umijs/max';
|
||||
import { Space } from 'antd';
|
||||
import ComponentsInfo from './components/ComponentsInfo';
|
||||
import CompanyCreate from './modals/CompanyCreate';
|
||||
import CompanyUpdate from './modals/CompanyUpdate';
|
||||
import ComponentsInfo from './table/ComponentsInfo';
|
||||
|
||||
export default function Index({ title = '机构列表' }) {
|
||||
const navigate = useNavigate();
|
||||
@ -77,7 +77,7 @@ export default function Index({ title = '机构列表' }) {
|
||||
title="配置"
|
||||
data-tooltip-position="top"
|
||||
onClick={() => {
|
||||
navigate(`/company/${item.id}`);
|
||||
navigate(`/company/auto/${item.id}`);
|
||||
}}
|
||||
/>
|
||||
<MyButtons.Delete
|
||||
@ -8,8 +8,8 @@ import { Apis } from '@/gen/Apis';
|
||||
import { CompanyAppsAppTypeEnum, CompanyAppsModuleEnum } from '@/gen/Enums';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { Space } from 'antd';
|
||||
import CompanyAppCreate from './modals/CompanyAppCreate';
|
||||
import CompanyAppUpdate from './modals/CompanyAppUpdate';
|
||||
import AppCreate from '../../company_apps/modals/AppCreate';
|
||||
import AppUpdate from '../../company_apps/modals/AppUpdate';
|
||||
|
||||
export default function CompanyApps(props: MyBetaModalFormProps) {
|
||||
return (
|
||||
@ -24,7 +24,7 @@ export default function CompanyApps(props: MyBetaModalFormProps) {
|
||||
)
|
||||
}
|
||||
toolBarRender={(action) => [
|
||||
<CompanyAppCreate
|
||||
<AppCreate
|
||||
key="Create"
|
||||
reload={action?.reload}
|
||||
item={props?.item}
|
||||
@ -66,7 +66,7 @@ export default function CompanyApps(props: MyBetaModalFormProps) {
|
||||
MyColumns.Option({
|
||||
render: (_, item: any, index, action) => (
|
||||
<Space key={index}>
|
||||
<CompanyAppUpdate
|
||||
<AppUpdate
|
||||
item={item}
|
||||
reload={action?.reload}
|
||||
title="应用配置"
|
||||
@ -7,8 +7,8 @@ import {
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { Image, Space } from 'antd';
|
||||
import PropertyBrandsCreate from './modals/PropertyBrandsCreate';
|
||||
import PropertyBrandUpdate from './modals/PropertyBrandUpdate';
|
||||
import PropertyBrandsCreate from '../../brand/modals/BrandsCreate';
|
||||
import PropertyBrandUpdate from '../../brand/modals/BrandUpdate';
|
||||
|
||||
export default function PropertyBrands(props: MyBetaModalFormProps) {
|
||||
return (
|
||||
@ -7,8 +7,8 @@ import {
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { Space } from 'antd';
|
||||
import EmployeeCreate from './modals/EmployeeCreate';
|
||||
import EmployeeUpdate from './modals/EmployeeUpdate';
|
||||
import EmployeeCreate from '../../employees/modals/EmployeeCreate';
|
||||
import EmployeeUpdate from '../../employees/modals/EmployeeUpdate';
|
||||
|
||||
export default function Index(props: MyBetaModalFormProps) {
|
||||
return (
|
||||
@ -8,9 +8,9 @@ import { Apis } from '@/gen/Apis';
|
||||
import { OrganizationsTypeEnum } from '@/gen/Enums';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { Space } from 'antd';
|
||||
import OrganizationChange from './modals/OrganizationChange';
|
||||
import OrganizationCreate from './modals/OrganizationCreate';
|
||||
import OrganizationUpdate from './modals/OrganizationUpdate';
|
||||
import OrganizationChange from '../../organizations/modals/OrganizationChange';
|
||||
import OrganizationCreate from '../../organizations/modals/OrganizationCreate';
|
||||
import OrganizationUpdate from '../../organizations/modals/OrganizationUpdate';
|
||||
|
||||
export default function Organizations(props: MyBetaModalFormProps) {
|
||||
return (
|
||||
@ -7,8 +7,8 @@ import {
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { Space } from 'antd';
|
||||
import PositionCreate from './modals/PositionCreate';
|
||||
import PositionUpdate from './modals/PositionUpdate';
|
||||
import PositionCreate from '../../positions/modals/PositionCreate';
|
||||
import PositionUpdate from '../../positions/modals/PositionUpdate';
|
||||
|
||||
export default function Organizations(props: MyBetaModalFormProps) {
|
||||
return (
|
||||
@ -7,8 +7,8 @@ import {
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { Space } from 'antd';
|
||||
import ReceiptAccountCreate from './modals/ReceiptAccountCreate';
|
||||
import ReceiptAccountUpdate from './modals/ReceiptAccountUpdate';
|
||||
import ReceiptAccountCreate from '../../receipt_accounts/modals/ReceiptAccountCreate';
|
||||
import ReceiptAccountUpdate from '../../receipt_accounts/modals/ReceiptAccountUpdate';
|
||||
|
||||
export default function ReceiptAccounts(props: MyBetaModalFormProps) {
|
||||
return (
|
||||
92
src/pages/company/brand/index.tsx
Normal file
92
src/pages/company/brand/index.tsx
Normal file
@ -0,0 +1,92 @@
|
||||
import {
|
||||
MyButtons,
|
||||
MyColumns,
|
||||
MyPageContainer,
|
||||
MyProTableProps,
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { useNavigate } from '@umijs/max';
|
||||
import { Image, Space } from 'antd';
|
||||
import BrandsCreate from './modals/BrandsCreate';
|
||||
import BrandUpdate from './modals/BrandUpdate';
|
||||
|
||||
export default function Index({ title = '品牌管理' }) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'company-brands',
|
||||
tabLabel: title,
|
||||
});
|
||||
|
||||
return (
|
||||
<MyPageContainer
|
||||
title={title}
|
||||
enableTabs={true}
|
||||
tabKey="company-brands"
|
||||
tabLabel={title}
|
||||
>
|
||||
<ProTable
|
||||
{...MyProTableProps.props}
|
||||
request={async (params, sort) =>
|
||||
MyProTableProps.request(
|
||||
params,
|
||||
sort,
|
||||
Apis.Company.CompanyPropertyBrands.List,
|
||||
)
|
||||
}
|
||||
toolBarRender={(action) => [
|
||||
<BrandsCreate key="Create" reload={action?.reload} title={title} />,
|
||||
]}
|
||||
columns={[
|
||||
MyColumns.ID(),
|
||||
{
|
||||
title: '机构',
|
||||
dataIndex: ['company', 'name'],
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '物业名称',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: 'logo',
|
||||
render: (_, item) => {
|
||||
return (
|
||||
<Space>
|
||||
{item?.logo?.[0] && (
|
||||
<Image
|
||||
height={30}
|
||||
src={item?.logo[0]?.url}
|
||||
placeholder="正面"
|
||||
/>
|
||||
)}
|
||||
</Space>
|
||||
);
|
||||
},
|
||||
},
|
||||
MyColumns.Option({
|
||||
render: (_, item: any, index, action) => (
|
||||
<Space key={index}>
|
||||
<BrandUpdate
|
||||
item={{ ...item, companies_id: item?.id }}
|
||||
reload={action?.reload}
|
||||
title="品牌"
|
||||
/>
|
||||
<MyButtons.Delete
|
||||
onConfirm={() =>
|
||||
Apis.Company.CompanyPropertyBrands.Delete({
|
||||
id: item.id,
|
||||
}).then(() => action?.reload())
|
||||
}
|
||||
/>
|
||||
</Space>
|
||||
),
|
||||
}),
|
||||
]}
|
||||
/>
|
||||
</MyPageContainer>
|
||||
);
|
||||
}
|
||||
@ -5,6 +5,7 @@ import {
|
||||
MyModalFormProps,
|
||||
rulesHelper,
|
||||
} from '@/common';
|
||||
import { Selects } from '@/components/Select';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||
import { Form, message } from 'antd';
|
||||
@ -28,7 +29,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
onFinish={async (values) =>
|
||||
Apis.Company.CompanyPropertyBrands.Store({
|
||||
...values,
|
||||
companies_id: props?.item?.id,
|
||||
companies_id: values?.companies_id || props?.item?.id,
|
||||
})
|
||||
.then(() => {
|
||||
props.reload?.();
|
||||
@ -38,6 +39,16 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
.catch(() => false)
|
||||
}
|
||||
columns={[
|
||||
...(props?.item?.id
|
||||
? []
|
||||
: [
|
||||
Selects?.Companies({
|
||||
key: 'companies_id',
|
||||
title: '公司',
|
||||
colProps: { span: 24 },
|
||||
required: true,
|
||||
}),
|
||||
]),
|
||||
{
|
||||
key: 'name',
|
||||
title: '品牌名称',
|
||||
92
src/pages/company/company_apps/index.tsx
Normal file
92
src/pages/company/company_apps/index.tsx
Normal file
@ -0,0 +1,92 @@
|
||||
import {
|
||||
MyButtons,
|
||||
MyColumns,
|
||||
MyPageContainer,
|
||||
MyProTableProps,
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { useNavigate } from '@umijs/max';
|
||||
import { Image, Space } from 'antd';
|
||||
import AppCreate from './modals/AppCreate';
|
||||
import AppUpdate from './modals/AppUpdate';
|
||||
|
||||
export default function Index({ title = '品牌管理' }) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'company-brands',
|
||||
tabLabel: title,
|
||||
});
|
||||
|
||||
return (
|
||||
<MyPageContainer
|
||||
title={title}
|
||||
enableTabs={true}
|
||||
tabKey="company-brands"
|
||||
tabLabel={title}
|
||||
>
|
||||
<ProTable
|
||||
{...MyProTableProps.props}
|
||||
request={async (params, sort) =>
|
||||
MyProTableProps.request(
|
||||
params,
|
||||
sort,
|
||||
Apis.Company.CompanyPropertyBrands.List,
|
||||
)
|
||||
}
|
||||
toolBarRender={(action) => [
|
||||
<AppCreate key="Create" reload={action?.reload} title={title} />,
|
||||
]}
|
||||
columns={[
|
||||
MyColumns.ID(),
|
||||
{
|
||||
title: '机构',
|
||||
dataIndex: ['company', 'name'],
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '物业名称',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: 'logo',
|
||||
render: (_, item) => {
|
||||
return (
|
||||
<Space>
|
||||
{item?.logo?.[0] && (
|
||||
<Image
|
||||
height={30}
|
||||
src={item?.logo[0]?.url}
|
||||
placeholder="正面"
|
||||
/>
|
||||
)}
|
||||
</Space>
|
||||
);
|
||||
},
|
||||
},
|
||||
MyColumns.Option({
|
||||
render: (_, item: any, index, action) => (
|
||||
<Space key={index}>
|
||||
<AppUpdate
|
||||
item={{ ...item, companies_id: item?.id }}
|
||||
reload={action?.reload}
|
||||
title="品牌"
|
||||
/>
|
||||
<MyButtons.Delete
|
||||
onConfirm={() =>
|
||||
Apis.Company.CompanyPropertyBrands.Delete({
|
||||
id: item.id,
|
||||
}).then(() => action?.reload())
|
||||
}
|
||||
/>
|
||||
</Space>
|
||||
),
|
||||
}),
|
||||
]}
|
||||
/>
|
||||
</MyPageContainer>
|
||||
);
|
||||
}
|
||||
@ -5,6 +5,7 @@ import {
|
||||
MyModalFormProps,
|
||||
rulesHelper,
|
||||
} from '@/common';
|
||||
import { Selects } from '@/components/Select';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { CompanyAppsAppTypeEnum, CompanyAppsModuleEnum } from '@/gen/Enums';
|
||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||
@ -29,7 +30,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
onFinish={async (values) =>
|
||||
Apis.Company.CompanyApps.Store({
|
||||
...values,
|
||||
companies_id: props?.item?.id,
|
||||
companies_id: values?.companies_id || props?.item?.id,
|
||||
})
|
||||
.then(() => {
|
||||
props.reload?.();
|
||||
@ -39,6 +40,16 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
.catch(() => false)
|
||||
}
|
||||
columns={[
|
||||
...(props?.item?.id
|
||||
? []
|
||||
: [
|
||||
Selects?.Companies({
|
||||
key: 'companies_id',
|
||||
title: '公司',
|
||||
colProps: { span: 24 },
|
||||
required: true,
|
||||
}),
|
||||
]),
|
||||
MyFormItems.EnumRadio({
|
||||
key: 'app_type',
|
||||
title: '应用类型',
|
||||
@ -8,8 +8,8 @@ import {
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { Space } from 'antd';
|
||||
import EmployeeCreate from '../company/components/modals/EmployeeCreate';
|
||||
import EmployeeUpdate from '../company/components/modals/EmployeeUpdate';
|
||||
import EmployeeCreate from './modals/EmployeeCreate';
|
||||
import EmployeeUpdate from './modals/EmployeeUpdate';
|
||||
|
||||
export default function Index({ title = '员工管理' }) {
|
||||
// 使用多标签页功能
|
||||
@ -24,14 +24,12 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
onOpenChange={(open: any) => {
|
||||
if (open) {
|
||||
form.resetFields(); // 清空表单数据
|
||||
form.setFieldsValue({
|
||||
companies_id: props?.item?.id,
|
||||
});
|
||||
}
|
||||
}}
|
||||
onFinish={async (values: any) =>
|
||||
Apis.Company.CompanyEmployees.Store({
|
||||
...values,
|
||||
companies_id: values?.companies_id || props?.item?.id,
|
||||
organizations_id:
|
||||
values?.organizations_id?.[values.organizations_id.length - 1],
|
||||
})
|
||||
@ -43,12 +41,16 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
.catch(() => false)
|
||||
}
|
||||
columns={[
|
||||
...(props?.item?.id
|
||||
? []
|
||||
: [
|
||||
Selects?.Companies({
|
||||
key: 'companies_id',
|
||||
title: '所属机构',
|
||||
title: '公司',
|
||||
colProps: { span: 24 },
|
||||
formItemProps: { ...rulesHelper.number },
|
||||
required: true,
|
||||
}),
|
||||
]),
|
||||
Selects?.OrganizationsTree({
|
||||
title: '选择组织',
|
||||
key: 'organizations_id',
|
||||
103
src/pages/company/organizations/index.tsx
Normal file
103
src/pages/company/organizations/index.tsx
Normal file
@ -0,0 +1,103 @@
|
||||
import {
|
||||
MyButtons,
|
||||
MyColumns,
|
||||
MyPageContainer,
|
||||
MyProTableProps,
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { OrganizationsTypeEnum } from '@/gen/Enums';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { useNavigate } from '@umijs/max';
|
||||
import { Space } from 'antd';
|
||||
import OrganizationChange from './modals/OrganizationChange';
|
||||
import OrganizationCreate from './modals/OrganizationCreate';
|
||||
import OrganizationUpdate from './modals/OrganizationUpdate';
|
||||
|
||||
export default function Index({ title = '组织列表' }) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'company-organizations',
|
||||
tabLabel: title,
|
||||
});
|
||||
|
||||
return (
|
||||
<MyPageContainer
|
||||
title={title}
|
||||
enableTabs={true}
|
||||
tabKey="company-organizations"
|
||||
tabLabel={title}
|
||||
>
|
||||
<ProTable
|
||||
{...MyProTableProps.props}
|
||||
request={async (params, sort) =>
|
||||
MyProTableProps.request(
|
||||
params,
|
||||
sort,
|
||||
Apis.Company.Organizations.TreeList,
|
||||
)
|
||||
}
|
||||
toolBarRender={(action) => [
|
||||
<OrganizationCreate
|
||||
key="Create"
|
||||
reload={action?.reload}
|
||||
title={title}
|
||||
/>,
|
||||
]}
|
||||
columns={[
|
||||
{
|
||||
title: '机构',
|
||||
dataIndex: ['company', 'name'],
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '组织ID',
|
||||
dataIndex: 'id',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '组织名称',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
MyColumns.EnumTag({
|
||||
title: '组织类型',
|
||||
dataIndex: 'type',
|
||||
valueEnum: OrganizationsTypeEnum,
|
||||
search: false,
|
||||
}),
|
||||
|
||||
{
|
||||
title: '上级组织',
|
||||
dataIndex: ['organization_parent', 'name'],
|
||||
search: false,
|
||||
},
|
||||
MyColumns.Option({
|
||||
render: (_, item: any, index, action) => (
|
||||
<Space key={index}>
|
||||
<OrganizationUpdate
|
||||
item={{ ...item, companies_id: item?.id }}
|
||||
reload={action?.reload}
|
||||
title="组织"
|
||||
/>
|
||||
<OrganizationChange
|
||||
item={{ ...item, companies_id: item?.id }}
|
||||
reload={action?.reload}
|
||||
title="组织"
|
||||
/>
|
||||
<MyButtons.Delete
|
||||
onConfirm={() =>
|
||||
Apis.Company.Organizations.Delete({ id: item.id }).then(
|
||||
() => action?.reload(),
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Space>
|
||||
),
|
||||
}),
|
||||
]}
|
||||
/>
|
||||
</MyPageContainer>
|
||||
);
|
||||
}
|
||||
@ -21,6 +21,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
wrapperCol={{ span: 24 }}
|
||||
width="500px"
|
||||
trigger={<MyButtons.Create title={`添加${props.title}`} />}
|
||||
key={new Date().getTime()}
|
||||
form={form}
|
||||
onOpenChange={(open: any) => {
|
||||
if (open) {
|
||||
@ -30,7 +31,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
onFinish={async (values: any) =>
|
||||
Apis.Company.Organizations.Store({
|
||||
...values,
|
||||
companies_id: props?.item?.id,
|
||||
companies_id: values?.companies_id || props?.item?.id,
|
||||
parent_id: values?.parent_id?.[values.parent_id.length - 1],
|
||||
})
|
||||
.then(() => {
|
||||
@ -41,6 +42,16 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
.catch(() => false)
|
||||
}
|
||||
columns={[
|
||||
...(props?.item?.id
|
||||
? []
|
||||
: [
|
||||
Selects?.Companies({
|
||||
key: 'companies_id',
|
||||
title: '公司',
|
||||
colProps: { span: 24 },
|
||||
required: true,
|
||||
}),
|
||||
]),
|
||||
MyFormItems.EnumRadio({
|
||||
key: 'type',
|
||||
title: '组织类型',
|
||||
96
src/pages/company/positions/index.tsx
Normal file
96
src/pages/company/positions/index.tsx
Normal file
@ -0,0 +1,96 @@
|
||||
import {
|
||||
MyButtons,
|
||||
MyColumns,
|
||||
MyPageContainer,
|
||||
MyProTableProps,
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { useNavigate } from '@umijs/max';
|
||||
import { Space } from 'antd';
|
||||
import PositionCreate from './modals/PositionCreate';
|
||||
import PositionUpdate from './modals/PositionUpdate';
|
||||
|
||||
export default function Index({ title = '岗位管理' }) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'company-positions',
|
||||
tabLabel: title,
|
||||
});
|
||||
|
||||
return (
|
||||
<MyPageContainer
|
||||
title={title}
|
||||
enableTabs={true}
|
||||
tabKey="company-positions"
|
||||
tabLabel={title}
|
||||
>
|
||||
<ProTable
|
||||
{...MyProTableProps.props}
|
||||
request={async (params, sort) =>
|
||||
MyProTableProps.request(
|
||||
params,
|
||||
sort,
|
||||
Apis.Company.CompanyPositions.List,
|
||||
)
|
||||
}
|
||||
toolBarRender={(action) => [
|
||||
<PositionCreate key="Create" reload={action?.reload} title={title} />,
|
||||
]}
|
||||
columns={[
|
||||
MyColumns.ID(),
|
||||
{
|
||||
title: '机构',
|
||||
dataIndex: ['company', 'name'],
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '岗位名称',
|
||||
dataIndex: 'name',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '岗位编号',
|
||||
dataIndex: 'code',
|
||||
search: false,
|
||||
width: 200,
|
||||
},
|
||||
// {
|
||||
// title: '岗位排序',
|
||||
// dataIndex: 'sort',
|
||||
// search: false,
|
||||
// },
|
||||
{
|
||||
title: '岗位备注',
|
||||
dataIndex: 'remark',
|
||||
search: false,
|
||||
width: 200,
|
||||
},
|
||||
MyColumns.UpdatedAt(),
|
||||
// MyColumns.CreatedAt(),
|
||||
MyColumns.Option({
|
||||
render: (_, item: any, index, action) => (
|
||||
<Space key={index}>
|
||||
<PositionUpdate
|
||||
item={item}
|
||||
reload={action?.reload}
|
||||
title="岗位"
|
||||
/>
|
||||
<MyButtons.Delete
|
||||
onConfirm={() =>
|
||||
Apis.Company.CompanyPositions.Delete({ id: item.id }).then(
|
||||
() => action?.reload(),
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Space>
|
||||
),
|
||||
}),
|
||||
]}
|
||||
/>
|
||||
</MyPageContainer>
|
||||
);
|
||||
}
|
||||
@ -4,6 +4,7 @@ import {
|
||||
MyModalFormProps,
|
||||
rulesHelper,
|
||||
} from '@/common';
|
||||
import { Selects } from '@/components/Select';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||
import { Form, message } from 'antd';
|
||||
@ -26,7 +27,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
onFinish={async (values) =>
|
||||
Apis.Company.CompanyPositions.Store({
|
||||
...values,
|
||||
companies_id: props?.item?.id,
|
||||
companies_id: values?.companies_id || props?.item?.id,
|
||||
})
|
||||
.then(() => {
|
||||
props.reload?.();
|
||||
@ -36,11 +37,16 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
.catch(() => false)
|
||||
}
|
||||
columns={[
|
||||
// Selects?.Companies({
|
||||
// title: '机构',
|
||||
// key: 'companies_id',
|
||||
// formItemProps: { ...rulesHelper.text },
|
||||
// }),
|
||||
...(props?.item?.id
|
||||
? []
|
||||
: [
|
||||
Selects?.Companies({
|
||||
key: 'companies_id',
|
||||
title: '公司',
|
||||
colProps: { span: 24 },
|
||||
required: true,
|
||||
}),
|
||||
]),
|
||||
{
|
||||
key: 'name',
|
||||
title: '岗位名称',
|
||||
91
src/pages/company/receipt_accounts/index.tsx
Normal file
91
src/pages/company/receipt_accounts/index.tsx
Normal file
@ -0,0 +1,91 @@
|
||||
import {
|
||||
MyButtons,
|
||||
MyColumns,
|
||||
MyPageContainer,
|
||||
MyProTableProps,
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { useNavigate } from '@umijs/max';
|
||||
import { Space } from 'antd';
|
||||
import ReceiptAccountCreate from './modals/ReceiptAccountCreate';
|
||||
import ReceiptAccountUpdate from './modals/ReceiptAccountUpdate';
|
||||
|
||||
export default function Index({ title = '账号管理' }) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'company-receipt_accounts',
|
||||
tabLabel: title,
|
||||
});
|
||||
|
||||
return (
|
||||
<MyPageContainer
|
||||
title={title}
|
||||
enableTabs={true}
|
||||
tabKey="company-receipt_accounts"
|
||||
tabLabel={title}
|
||||
>
|
||||
<ProTable
|
||||
{...MyProTableProps.props}
|
||||
request={async (params, sort) =>
|
||||
MyProTableProps.request(
|
||||
params,
|
||||
sort,
|
||||
Apis.Company.CompanyReceiptAccounts.List,
|
||||
)
|
||||
}
|
||||
toolBarRender={(action) => [
|
||||
<ReceiptAccountCreate
|
||||
key="Create"
|
||||
reload={action?.reload}
|
||||
title={title}
|
||||
/>,
|
||||
]}
|
||||
columns={[
|
||||
MyColumns.ID(),
|
||||
{
|
||||
title: '机构',
|
||||
dataIndex: ['company', 'name'],
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '收款账号名称',
|
||||
dataIndex: 'company_name',
|
||||
},
|
||||
{
|
||||
title: '开户行',
|
||||
dataIndex: 'company_bank',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '收款账号',
|
||||
dataIndex: 'company_account',
|
||||
search: false,
|
||||
},
|
||||
MyColumns.UpdatedAt(),
|
||||
MyColumns.Option({
|
||||
render: (_, item: any, index, action) => (
|
||||
<Space key={index}>
|
||||
<ReceiptAccountUpdate
|
||||
item={item}
|
||||
reload={action?.reload}
|
||||
title="收款账号"
|
||||
/>
|
||||
<MyButtons.Delete
|
||||
onConfirm={() =>
|
||||
Apis.Company.CompanyReceiptAccounts.Delete({
|
||||
id: item.id,
|
||||
}).then(() => action?.reload())
|
||||
}
|
||||
/>
|
||||
</Space>
|
||||
),
|
||||
}),
|
||||
]}
|
||||
/>
|
||||
</MyPageContainer>
|
||||
);
|
||||
}
|
||||
@ -5,6 +5,7 @@ import {
|
||||
MyModalFormProps,
|
||||
rulesHelper,
|
||||
} from '@/common';
|
||||
import { Selects } from '@/components/Select';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import { CompanyReceiptAccountsPayChannelEnum } from '@/gen/Enums';
|
||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||
@ -29,7 +30,8 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
onFinish={async (values) =>
|
||||
Apis.Company.CompanyReceiptAccounts.Store({
|
||||
...values,
|
||||
companies_id: props?.item?.id,
|
||||
companies_id: values?.companies_id || props?.item?.id,
|
||||
|
||||
is_default: 0,
|
||||
})
|
||||
.then(() => {
|
||||
@ -40,6 +42,16 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
.catch(() => false)
|
||||
}
|
||||
columns={[
|
||||
...(props?.item?.id
|
||||
? []
|
||||
: [
|
||||
Selects?.Companies({
|
||||
key: 'companies_id',
|
||||
title: '公司',
|
||||
colProps: { span: 24 },
|
||||
required: true,
|
||||
}),
|
||||
]),
|
||||
{
|
||||
key: 'company_name',
|
||||
title: '收款账户名称',
|
||||
115
src/pages/house_charge_task_details/index.tsx
Normal file
115
src/pages/house_charge_task_details/index.tsx
Normal file
@ -0,0 +1,115 @@
|
||||
import {
|
||||
MyButtons,
|
||||
MyColumns,
|
||||
MyPageContainer,
|
||||
MyProTableProps,
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import {
|
||||
HouseChargeTasksStatusEnum,
|
||||
HouseChargeTasksTypeEnum,
|
||||
} from '@/gen/Enums';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { Space } from 'antd';
|
||||
import ChargeTasksCreate from './modals/ChargeTasksCreate';
|
||||
|
||||
export default function Index({ title = '账单任务' }) {
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'charge_tasks',
|
||||
tabLabel: title,
|
||||
});
|
||||
|
||||
return (
|
||||
<MyPageContainer
|
||||
title={title}
|
||||
enableTabs={true}
|
||||
tabKey="bills"
|
||||
tabLabel={title}
|
||||
>
|
||||
<ProTable
|
||||
{...MyProTableProps.props}
|
||||
request={async (params, sort) =>
|
||||
MyProTableProps.request(
|
||||
params,
|
||||
sort,
|
||||
Apis.HouseCharage.HouseChargeTasks.List,
|
||||
)
|
||||
}
|
||||
toolBarRender={(action) => [
|
||||
<ChargeTasksCreate
|
||||
key="Create"
|
||||
reload={action?.reload}
|
||||
title={title}
|
||||
/>,
|
||||
]}
|
||||
columns={[
|
||||
MyColumns.ID(),
|
||||
MyColumns.EnumTag({
|
||||
title: '任务状态',
|
||||
dataIndex: 'status',
|
||||
valueEnum: HouseChargeTasksStatusEnum,
|
||||
}),
|
||||
MyColumns.EnumTag({
|
||||
title: '创建类型',
|
||||
dataIndex: 'type',
|
||||
valueEnum: HouseChargeTasksTypeEnum,
|
||||
}),
|
||||
{
|
||||
title: '收费标准名称',
|
||||
dataIndex: 'charge_standard_name',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '账单月份',
|
||||
render: (_, record) => {
|
||||
return `${record.year}-${String(record.month).padStart(2, '0')}`;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '计费开始日期',
|
||||
dataIndex: 'start_date',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '计费结束日期',
|
||||
dataIndex: 'end_date',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '项目名称',
|
||||
dataIndex: 'project_name',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '机构名称',
|
||||
dataIndex: 'company_name',
|
||||
search: false,
|
||||
},
|
||||
MyColumns.SoftDelete({
|
||||
title: '启/禁用',
|
||||
onRestore: Apis.HouseCharage.HouseChargeTasks.Restore,
|
||||
onSoftDelete: Apis.HouseCharage.HouseChargeTasks.SoftDelete,
|
||||
search: false,
|
||||
}),
|
||||
MyColumns.UpdatedAt(),
|
||||
MyColumns.CreatedAt(),
|
||||
MyColumns.Option({
|
||||
render: (_, item: any, index, action) => (
|
||||
<Space key={index}>
|
||||
<MyButtons.Delete
|
||||
onConfirm={() =>
|
||||
Apis.HouseCharage.HouseChargeTasks.Delete({
|
||||
id: item.id,
|
||||
}).then(() => action?.reload())
|
||||
}
|
||||
/>
|
||||
</Space>
|
||||
),
|
||||
}),
|
||||
]}
|
||||
/>
|
||||
</MyPageContainer>
|
||||
);
|
||||
}
|
||||
109
src/pages/house_charge_task_details/modals/ChargeTasksCreate.tsx
Normal file
109
src/pages/house_charge_task_details/modals/ChargeTasksCreate.tsx
Normal file
@ -0,0 +1,109 @@
|
||||
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 { Form, message } from 'antd';
|
||||
|
||||
export default function Create(props: MyBetaModalFormProps) {
|
||||
const [form] = Form.useForm();
|
||||
return (
|
||||
<BetaSchemaForm<ApiTypes.HouseCharage.HouseChargeTasks.Store>
|
||||
{...MyModalFormProps.props}
|
||||
title={`创建${props.title}`}
|
||||
width="480px"
|
||||
layout="horizontal"
|
||||
labelCol={{ span: 8 }}
|
||||
wrapperCol={{ span: 16 }}
|
||||
labelAlign="left"
|
||||
trigger={<MyButtons.Create title={`创建${props.title}`} />}
|
||||
key={new Date().getTime()}
|
||||
form={form}
|
||||
onOpenChange={(open: any) => {
|
||||
if (open) {
|
||||
form.resetFields(); // 清空表单数据
|
||||
}
|
||||
}}
|
||||
onFinish={async (values) =>
|
||||
Apis.HouseCharage.HouseChargeTasks.Store(values)
|
||||
.then(() => {
|
||||
props.reload?.();
|
||||
message.success(props.title + '账单任务创建成功');
|
||||
return true;
|
||||
})
|
||||
.catch(() => false)
|
||||
}
|
||||
columns={[
|
||||
Selects?.AssetProjects({
|
||||
title: '选择项目',
|
||||
key: 'asset_projects_id',
|
||||
colProps: { span: 24 },
|
||||
formItemProps: { ...rulesHelper.text },
|
||||
}),
|
||||
{
|
||||
valueType: 'dependency',
|
||||
name: ['asset_projects_id'],
|
||||
columns: ({ asset_projects_id }) => {
|
||||
return [
|
||||
Selects?.ChargeStandard({
|
||||
title: '选择收费标准',
|
||||
key: 'house_charge_standards_id',
|
||||
params: {
|
||||
asset_projects_id: asset_projects_id,
|
||||
},
|
||||
colProps: { span: 24 },
|
||||
formItemProps: { ...rulesHelper.text },
|
||||
fieldProps: {
|
||||
showSearch: true,
|
||||
},
|
||||
}),
|
||||
];
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'month',
|
||||
title: '选择生成月份',
|
||||
valueType: 'date',
|
||||
colProps: { span: 24 },
|
||||
fieldProps: {
|
||||
picker: 'month',
|
||||
format: 'YYYY-MM',
|
||||
valueFormat: 'YYYY-MM',
|
||||
style: {
|
||||
width: '100%',
|
||||
},
|
||||
},
|
||||
formItemProps: { ...rulesHelper.text },
|
||||
},
|
||||
{
|
||||
key: 'start_date',
|
||||
title: '计费开始日期',
|
||||
valueType: 'date',
|
||||
colProps: { span: 24 },
|
||||
fieldProps: {
|
||||
style: {
|
||||
width: '100%',
|
||||
},
|
||||
},
|
||||
formItemProps: { ...rulesHelper.text },
|
||||
},
|
||||
{
|
||||
key: 'end_date',
|
||||
title: '计费结束日期',
|
||||
valueType: 'date',
|
||||
colProps: { span: 24 },
|
||||
fieldProps: {
|
||||
style: {
|
||||
width: '100%',
|
||||
},
|
||||
},
|
||||
formItemProps: { ...rulesHelper.text },
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -6,18 +6,14 @@ import {
|
||||
usePageTabs,
|
||||
} from '@/common';
|
||||
import { Apis } from '@/gen/Apis';
|
||||
import {
|
||||
HouseChargeTasksStatusEnum,
|
||||
HouseChargeTasksTypeEnum,
|
||||
} from '@/gen/Enums';
|
||||
import { HouseChargeTaskDetailsStatusEnum } from '@/gen/Enums';
|
||||
import { ProTable } from '@ant-design/pro-components';
|
||||
import { Space } from 'antd';
|
||||
import ChargeTasksCreate from './modals/ChargeTasksCreate';
|
||||
|
||||
export default function Index({ title = '账单任务' }) {
|
||||
export default function Index({ title = '任务结果' }) {
|
||||
// 注册当前页面为标签页
|
||||
usePageTabs({
|
||||
tabKey: 'charge_tasks',
|
||||
tabKey: 'charge_task_details',
|
||||
tabLabel: title,
|
||||
});
|
||||
|
||||
@ -34,33 +30,28 @@ export default function Index({ title = '账单任务' }) {
|
||||
MyProTableProps.request(
|
||||
params,
|
||||
sort,
|
||||
Apis.HouseCharage.HouseChargeTasks.List,
|
||||
Apis.HouseCharage.HouseChargeTaskDetails.List,
|
||||
)
|
||||
}
|
||||
toolBarRender={(action) => [
|
||||
<ChargeTasksCreate
|
||||
key="Create"
|
||||
reload={action?.reload}
|
||||
title={title}
|
||||
/>,
|
||||
]}
|
||||
// toolBarRender={(action) => [
|
||||
// <ChargeTasksCreate
|
||||
// key="Create"
|
||||
// reload={action?.reload}
|
||||
// title={title}
|
||||
// />,
|
||||
// ]}
|
||||
columns={[
|
||||
{
|
||||
title: '任务ID',
|
||||
dataIndex: 'house_charge_tasks_id',
|
||||
search: false,
|
||||
},
|
||||
MyColumns.ID(),
|
||||
MyColumns.EnumTag({
|
||||
title: '任务状态',
|
||||
dataIndex: 'status',
|
||||
valueEnum: HouseChargeTasksStatusEnum,
|
||||
valueEnum: HouseChargeTaskDetailsStatusEnum,
|
||||
}),
|
||||
MyColumns.EnumTag({
|
||||
title: '创建类型',
|
||||
dataIndex: 'type',
|
||||
valueEnum: HouseChargeTasksTypeEnum,
|
||||
}),
|
||||
{
|
||||
title: '收费标准名称',
|
||||
dataIndex: 'charge_standard_name',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '账单月份',
|
||||
render: (_, record) => {
|
||||
@ -77,22 +68,6 @@ export default function Index({ title = '账单任务' }) {
|
||||
dataIndex: 'end_date',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '项目名称',
|
||||
dataIndex: 'project_name',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '机构名称',
|
||||
dataIndex: 'company_name',
|
||||
search: false,
|
||||
},
|
||||
MyColumns.SoftDelete({
|
||||
title: '启/禁用',
|
||||
onRestore: Apis.HouseCharage.HouseChargeTasks.Restore,
|
||||
onSoftDelete: Apis.HouseCharage.HouseChargeTasks.SoftDelete,
|
||||
search: false,
|
||||
}),
|
||||
MyColumns.UpdatedAt(),
|
||||
MyColumns.CreatedAt(),
|
||||
MyColumns.Option({
|
||||
@ -100,7 +75,7 @@ export default function Index({ title = '账单任务' }) {
|
||||
<Space key={index}>
|
||||
<MyButtons.Delete
|
||||
onConfirm={() =>
|
||||
Apis.HouseCharage.HouseChargeTasks.Delete({
|
||||
Apis.HouseCharage.HouseChargeTaskDetails.Delete({
|
||||
id: item.id,
|
||||
}).then(() => action?.reload())
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user