no message
This commit is contained in:
parent
a5e51a0305
commit
de0fc32617
@ -14,8 +14,8 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api/': {
|
'/api/': {
|
||||||
target: 'http://yt:8003',
|
// target: 'http://yt:8003',
|
||||||
// target: 'http://10.39.13.80:8003',
|
target: 'http://10.39.13.80:8003',
|
||||||
// target: 'http://we6f9c65.natappfree.cc',
|
// target: 'http://we6f9c65.natappfree.cc',
|
||||||
// target: 'https://loanos-test.nchl.net/',
|
// target: 'https://loanos-test.nchl.net/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
|||||||
88
src/gen/ApiTypes.d.ts
vendored
88
src/gen/ApiTypes.d.ts
vendored
@ -303,6 +303,80 @@ declare namespace ApiTypes {
|
|||||||
"keywords"?: string; // 关键词
|
"keywords"?: string; // 关键词
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
namespace CompanyEmployees {
|
||||||
|
type List = {
|
||||||
|
"name"?: string; // 模糊搜索:名称
|
||||||
|
"phone"?: string; // 模糊搜索:手机号
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"name": string; // 名称
|
||||||
|
"phone": string; // 手机号
|
||||||
|
"password"?: string; // 密码[hidden]
|
||||||
|
"organizations_id": number; // 所属组织id,[ref:organizations]
|
||||||
|
"positions_id"?: number; // 岗位id,[ref:company_positions]
|
||||||
|
"sex"?: string; // 性别,[enum:SexEnum]
|
||||||
|
"remark"?: string; // 备注
|
||||||
|
};
|
||||||
|
type Update = {
|
||||||
|
"id": number; // id
|
||||||
|
"name": string; // 名称
|
||||||
|
"phone": string; // 手机号
|
||||||
|
"password"?: string; // 密码[hidden]
|
||||||
|
"organizations_id": number; // 所属组织id,[ref:organizations]
|
||||||
|
"positions_id"?: number; // 岗位id,[ref:company_positions]
|
||||||
|
"sex"?: string; // 性别,[enum:SexEnum]
|
||||||
|
"remark"?: string; // 备注
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type SoftDelete = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Restore = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Delete = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Select = {
|
||||||
|
"companies_id"?: number; // 所属机构id,[ref:companies]
|
||||||
|
"organizations_id"?: number; // 所属组织id,[ref:organizations]
|
||||||
|
"keywords"?: string; // 关键词
|
||||||
|
};
|
||||||
|
}
|
||||||
|
namespace CompanyPositions {
|
||||||
|
type List = {
|
||||||
|
"name"?: string; // 模糊搜索:名称
|
||||||
|
};
|
||||||
|
type Store = {
|
||||||
|
"companies_id": number; // 所属机构id,[ref:companies]
|
||||||
|
"name": string; // 岗位名称
|
||||||
|
"code": string; // 岗位编号
|
||||||
|
"sort"?: number; // 排序
|
||||||
|
"status"?: number; // 状态
|
||||||
|
"remark"?: string; // 备注
|
||||||
|
};
|
||||||
|
type Update = {
|
||||||
|
"id": number; // id
|
||||||
|
"companies_id": number; // 所属机构id,[ref:companies]
|
||||||
|
"name": string; // 岗位名称
|
||||||
|
"code": string; // 岗位编号
|
||||||
|
"sort"?: number; // 排序
|
||||||
|
"status"?: number; // 状态
|
||||||
|
"remark"?: string; // 备注
|
||||||
|
};
|
||||||
|
type Show = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Delete = {
|
||||||
|
"id": number; // id
|
||||||
|
};
|
||||||
|
type Select = {
|
||||||
|
"companies_id"?: number; // 所属机构id,[ref:companies]
|
||||||
|
"keywords"?: string; // 关键词
|
||||||
|
};
|
||||||
|
}
|
||||||
namespace CompanyReceiptAccounts {
|
namespace CompanyReceiptAccounts {
|
||||||
type List = {
|
type List = {
|
||||||
"name"?: string; // 模糊搜索:名称
|
"name"?: string; // 模糊搜索:名称
|
||||||
@ -348,7 +422,7 @@ declare namespace ApiTypes {
|
|||||||
"companies_id": number; // 所属机构id,[ref:companies]
|
"companies_id": number; // 所属机构id,[ref:companies]
|
||||||
"type": string; // 类型,[enum:OrganizationsTypeEnum]
|
"type": string; // 类型,[enum:OrganizationsTypeEnum]
|
||||||
"name": string; // 名称
|
"name": string; // 名称
|
||||||
"managers_id": number; // 负责人IDid,[ref:company_employees]
|
"managers_id"?: number; // 负责人IDid,[ref:company_employees]
|
||||||
"manager_phone"?: string; // 负责人电话
|
"manager_phone"?: string; // 负责人电话
|
||||||
"manager_email"?: string; // 负责人邮箱
|
"manager_email"?: string; // 负责人邮箱
|
||||||
"status"?: number; // 状态
|
"status"?: number; // 状态
|
||||||
@ -362,7 +436,7 @@ declare namespace ApiTypes {
|
|||||||
"companies_id": number; // 所属机构id,[ref:companies]
|
"companies_id": number; // 所属机构id,[ref:companies]
|
||||||
"type": string; // 类型,[enum:OrganizationsTypeEnum]
|
"type": string; // 类型,[enum:OrganizationsTypeEnum]
|
||||||
"name": string; // 名称
|
"name": string; // 名称
|
||||||
"managers_id": number; // 负责人IDid,[ref:company_employees]
|
"managers_id"?: number; // 负责人IDid,[ref:company_employees]
|
||||||
"manager_phone"?: string; // 负责人电话
|
"manager_phone"?: string; // 负责人电话
|
||||||
"manager_email"?: string; // 负责人邮箱
|
"manager_email"?: string; // 负责人邮箱
|
||||||
"status"?: number; // 状态
|
"status"?: number; // 状态
|
||||||
@ -387,6 +461,16 @@ declare namespace ApiTypes {
|
|||||||
type Delete = {
|
type Delete = {
|
||||||
"id": number; // id
|
"id": number; // id
|
||||||
};
|
};
|
||||||
|
type Select = {
|
||||||
|
"companies_id"?: number; // 所属机构id,[ref:companies]
|
||||||
|
"keywords"?: string; // 关键词
|
||||||
|
};
|
||||||
|
type SelectTree = {
|
||||||
|
"companies_id"?: number; // 所属机构id,[ref:companies]
|
||||||
|
"keywords"?: string; // -
|
||||||
|
"type"?: string; // -
|
||||||
|
"parent_id"?: number; // -
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
namespace Permission {
|
namespace Permission {
|
||||||
|
|||||||
@ -156,6 +156,52 @@ export const Apis = {
|
|||||||
return request('admin/company/companies/select', { data });
|
return request('admin/company/companies/select', { data });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
CompanyEmployees: {
|
||||||
|
List(data?: ApiTypes.Company.CompanyEmployees.List): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_employees/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Company.CompanyEmployees.Store): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_employees/store', { data });
|
||||||
|
},
|
||||||
|
Update(data: ApiTypes.Company.CompanyEmployees.Update): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_employees/update', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Company.CompanyEmployees.Show): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_employees/show', { data });
|
||||||
|
},
|
||||||
|
SoftDelete(data: ApiTypes.Company.CompanyEmployees.SoftDelete): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_employees/soft_delete', { data });
|
||||||
|
},
|
||||||
|
Restore(data: ApiTypes.Company.CompanyEmployees.Restore): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_employees/restore', { data });
|
||||||
|
},
|
||||||
|
Delete(data: ApiTypes.Company.CompanyEmployees.Delete): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_employees/delete', { data });
|
||||||
|
},
|
||||||
|
Select(data?: ApiTypes.Company.CompanyEmployees.Select): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_employees/select', { data });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
CompanyPositions: {
|
||||||
|
List(data?: ApiTypes.Company.CompanyPositions.List): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_positions/list', { data });
|
||||||
|
},
|
||||||
|
Store(data: ApiTypes.Company.CompanyPositions.Store): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_positions/store', { data });
|
||||||
|
},
|
||||||
|
Update(data: ApiTypes.Company.CompanyPositions.Update): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_positions/update', { data });
|
||||||
|
},
|
||||||
|
Show(data: ApiTypes.Company.CompanyPositions.Show): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_positions/show', { data });
|
||||||
|
},
|
||||||
|
Delete(data: ApiTypes.Company.CompanyPositions.Delete): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_positions/delete', { data });
|
||||||
|
},
|
||||||
|
Select(data?: ApiTypes.Company.CompanyPositions.Select): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/company_positions/select', { 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 });
|
||||||
@ -204,6 +250,12 @@ export const Apis = {
|
|||||||
Delete(data: ApiTypes.Company.Organizations.Delete): Promise<MyResponseType> {
|
Delete(data: ApiTypes.Company.Organizations.Delete): Promise<MyResponseType> {
|
||||||
return request('admin/company/organizations/delete', { data });
|
return request('admin/company/organizations/delete', { data });
|
||||||
},
|
},
|
||||||
|
Select(data?: ApiTypes.Company.Organizations.Select): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/organizations/select', { data });
|
||||||
|
},
|
||||||
|
SelectTree(data?: ApiTypes.Company.Organizations.SelectTree): Promise<MyResponseType> {
|
||||||
|
return request('admin/company/organizations/select_tree', { data });
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Permission: {
|
Permission: {
|
||||||
|
|||||||
@ -116,6 +116,12 @@ export const OrganizationsTypeEnum= {
|
|||||||
'Department': {"text":"部门","color":"#dc3545","value":"Department"},
|
'Department': {"text":"部门","color":"#dc3545","value":"Department"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 性别
|
||||||
|
export const SexEnum= {
|
||||||
|
'Male': {"text":"男","color":"#0000ff","value":"Male"},
|
||||||
|
'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"},
|
||||||
|
|||||||
@ -26,6 +26,11 @@ export default function Index({ title = '机构管理' }) {
|
|||||||
]}
|
]}
|
||||||
columns={[
|
columns={[
|
||||||
MyColumns.ID(),
|
MyColumns.ID(),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '类型',
|
||||||
|
dataIndex: 'merchant_type',
|
||||||
|
valueEnum: CompaniesMerchantTypeEnum,
|
||||||
|
}),
|
||||||
{
|
{
|
||||||
title: '组织名称',
|
title: '组织名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
@ -34,29 +39,25 @@ export default function Index({ title = '机构管理' }) {
|
|||||||
title: '组织简称',
|
title: '组织简称',
|
||||||
dataIndex: 'short_name',
|
dataIndex: 'short_name',
|
||||||
},
|
},
|
||||||
MyColumns.EnumTag({
|
|
||||||
title: '类型',
|
|
||||||
dataIndex: 'merchant_type',
|
|
||||||
valueEnum: CompaniesMerchantTypeEnum,
|
|
||||||
}),
|
|
||||||
{
|
{
|
||||||
title: '营业执照号',
|
title: '营业执照号',
|
||||||
dataIndex: 'business_license_number',
|
dataIndex: 'business_license_number',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '联系人',
|
// title: '联系人',
|
||||||
dataIndex: 'contact_name',
|
// dataIndex: 'contact_name',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: '手机号',
|
// title: '手机号',
|
||||||
dataIndex: 'contact_phone',
|
// dataIndex: 'contact_phone',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: '联系人邮箱',
|
// title: '联系人邮箱',
|
||||||
dataIndex: 'contact_email',
|
// dataIndex: 'contact_email',
|
||||||
},
|
// },
|
||||||
MyColumns.UpdatedAt(),
|
MyColumns.UpdatedAt(),
|
||||||
MyColumns.CreatedAt(),
|
// MyColumns.CreatedAt(),
|
||||||
MyColumns.Option({
|
MyColumns.Option({
|
||||||
render: (_, item: any, index, action) => (
|
render: (_, item: any, index, action) => (
|
||||||
<Space key={index}>
|
<Space key={index}>
|
||||||
|
|||||||
@ -1,13 +1,11 @@
|
|||||||
import {
|
import {
|
||||||
MyBetaModalFormProps,
|
MyBetaModalFormProps,
|
||||||
MyButtons,
|
MyButtons,
|
||||||
MyFormItems,
|
|
||||||
MyModalFormProps,
|
MyModalFormProps,
|
||||||
rulesHelper,
|
rulesHelper,
|
||||||
} from '@/common';
|
} from '@/common';
|
||||||
import { Address } from '@/components/Address';
|
import { Address } from '@/components/Address';
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { CompaniesMerchantTypeEnum } from '@/gen/Enums';
|
|
||||||
import { BetaSchemaForm } from '@ant-design/pro-components';
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
import { message } from 'antd';
|
import { message } from 'antd';
|
||||||
|
|
||||||
@ -15,12 +13,15 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
return (
|
return (
|
||||||
<BetaSchemaForm<ApiTypes.Company.Companies.Store>
|
<BetaSchemaForm<ApiTypes.Company.Companies.Store>
|
||||||
{...MyModalFormProps.props}
|
{...MyModalFormProps.props}
|
||||||
title={`添加${props.title}`}
|
title={`添加机构`}
|
||||||
wrapperCol={{ span: 24 }}
|
wrapperCol={{ span: 24 }}
|
||||||
width="800px"
|
width="800px"
|
||||||
trigger={<MyButtons.Create title={`添加${props.title}`} />}
|
trigger={<MyButtons.Create title={`添加机构`} />}
|
||||||
onFinish={async (values) =>
|
onFinish={async (values) =>
|
||||||
Apis.Company.Companies.Store(values)
|
Apis.Company.Companies.Store({
|
||||||
|
...values,
|
||||||
|
merchant_type: 'PropertyManagement',
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
props.reload?.();
|
props.reload?.();
|
||||||
message.success(props.title + '成功');
|
message.success(props.title + '成功');
|
||||||
@ -45,8 +46,17 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
title: '营业执照号',
|
title: '营业执照号',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
fieldProps: {
|
||||||
|
maxLength: 18,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
// MyFormItems.EnumRadio({
|
||||||
|
// key: 'merchant_type',
|
||||||
|
// title: '商户类型',
|
||||||
|
// colProps: { span: 8 },
|
||||||
|
// valueEnum: CompaniesMerchantTypeEnum,
|
||||||
|
// required: true,
|
||||||
|
// }),
|
||||||
{
|
{
|
||||||
key: 'contact_name',
|
key: 'contact_name',
|
||||||
title: '联系人姓名',
|
title: '联系人姓名',
|
||||||
@ -68,30 +78,30 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
title: '联系人邮箱',
|
title: '联系人邮箱',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
key: 'contact_address',
|
// key: 'contact_address',
|
||||||
title: '联系人地址',
|
// title: '联系人地址',
|
||||||
colProps: { span: 24 },
|
// colProps: { span: 24 },
|
||||||
},
|
// },
|
||||||
MyFormItems.EnumRadio({
|
|
||||||
key: 'merchant_type',
|
|
||||||
title: '商户类型',
|
|
||||||
colProps: { span: 24 },
|
|
||||||
valueEnum: CompaniesMerchantTypeEnum,
|
|
||||||
required: true,
|
|
||||||
}),
|
|
||||||
Address.Cascader({
|
Address.Cascader({
|
||||||
key: 'casacader',
|
key: 'casacader',
|
||||||
title: '选择地址',
|
title: '联系地址',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 16 },
|
||||||
keys: ['province', 'city', 'area', 'street'],
|
keys: ['province', 'city', 'area', 'street'],
|
||||||
required: true,
|
required: true,
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
key: 'address',
|
key: 'address',
|
||||||
title: '详细地址',
|
title: '详细地址',
|
||||||
colProps: { span: 24 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
|
// MyFormItems.UploadImages({
|
||||||
|
// key: 'business_license_image',
|
||||||
|
// title: '营业执照',
|
||||||
|
// max: 1,
|
||||||
|
// colProps: { span: 6 },
|
||||||
|
// }),
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user