Merge branch 'develop' of ssh://code.linyikj.com.cn:2222/pay/pay-company into develop
All checks were successful
Build and Push Docker Image / build (push) Successful in 5m6s
All checks were successful
Build and Push Docker Image / build (push) Successful in 5m6s
This commit is contained in:
commit
d3da37744b
@ -17,6 +17,7 @@ export const stateActions = {
|
|||||||
state.session.campus = res.data.campus;
|
state.session.campus = res.data.campus;
|
||||||
state.session.company_configs = res.data.company_configs;
|
state.session.company_configs = res.data.company_configs;
|
||||||
state.session.permissions = res.data.permissions;
|
state.session.permissions = res.data.permissions;
|
||||||
|
state.session.company = res.data.company;
|
||||||
state.session.current_project = res.data.current_project;
|
state.session.current_project = res.data.current_project;
|
||||||
if (res.data?.token?.access_token)
|
if (res.data?.token?.access_token)
|
||||||
state.storage.access_token = res.data?.token?.access_token;
|
state.storage.access_token = res.data?.token?.access_token;
|
||||||
|
|||||||
@ -35,6 +35,10 @@ type SessionType = {
|
|||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
};
|
};
|
||||||
|
company?: {
|
||||||
|
id?: number;
|
||||||
|
name?: string;
|
||||||
|
};
|
||||||
company_configs?: {
|
company_configs?: {
|
||||||
config_value?: {
|
config_value?: {
|
||||||
logo?: {
|
logo?: {
|
||||||
|
|||||||
@ -40,6 +40,24 @@ export default function Index({ title = '员工管理' }) {
|
|||||||
<MyToolBarActions
|
<MyToolBarActions
|
||||||
key="toolbar"
|
key="toolbar"
|
||||||
actions={{
|
actions={{
|
||||||
|
sync: (
|
||||||
|
<MyButtons.Default
|
||||||
|
key="sync_wechat_employees"
|
||||||
|
type="primary"
|
||||||
|
size="middle"
|
||||||
|
title="同步企微"
|
||||||
|
isConfirm={true}
|
||||||
|
description="确定要执行企微员工同步操作吗?"
|
||||||
|
onConfirm={async () => {
|
||||||
|
try {
|
||||||
|
await Apis.Company.CompanyEmployees.SyncWechatEmployees();
|
||||||
|
action?.reload?.();
|
||||||
|
} catch (error) {
|
||||||
|
console.error('同步企微信息失败:', error);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
add: (
|
add: (
|
||||||
<EmployeeCreate
|
<EmployeeCreate
|
||||||
key="Create"
|
key="Create"
|
||||||
|
|||||||
@ -71,6 +71,17 @@ export default function Create(props: MyBetaModalFormProps) {
|
|||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
formItemProps: { ...rulesHelper.phone },
|
formItemProps: { ...rulesHelper.phone },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '初始登录密码',
|
||||||
|
key: 'password',
|
||||||
|
// formItemProps: { ...rulesHelper.text },
|
||||||
|
tooltip: '初始登录密码:#LY0123',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
fieldProps: {
|
||||||
|
disabled: true,
|
||||||
|
defaultValue: '#LY0123',
|
||||||
|
},
|
||||||
|
},
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'sex',
|
key: 'sex',
|
||||||
title: '性别',
|
title: '性别',
|
||||||
|
|||||||
@ -43,7 +43,6 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
...values,
|
...values,
|
||||||
id: props.item?.id ?? 0,
|
id: props.item?.id ?? 0,
|
||||||
type: props.item?.type,
|
type: props.item?.type,
|
||||||
password: null,
|
|
||||||
organizations_id: props.item?.organizations_id ?? '',
|
organizations_id: props.item?.organizations_id ?? '',
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -70,6 +69,17 @@ export default function Update(props: MyBetaModalFormProps) {
|
|||||||
colProps: { span: 24 },
|
colProps: { span: 24 },
|
||||||
formItemProps: { ...rulesHelper.phone },
|
formItemProps: { ...rulesHelper.phone },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '初始登录密码',
|
||||||
|
key: 'password',
|
||||||
|
type: 'password',
|
||||||
|
// formItemProps: { ...rulesHelper.text },
|
||||||
|
tooltip: '必须超6位数,包含数字、大小字母、#-_@&*特殊字符',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
fieldProps: {
|
||||||
|
placeholder: '必须超6位数,包含数字、大小字母、#-_@&*特殊字符',
|
||||||
|
},
|
||||||
|
},
|
||||||
MyFormItems.EnumRadio({
|
MyFormItems.EnumRadio({
|
||||||
key: 'sex',
|
key: 'sex',
|
||||||
title: '性别',
|
title: '性别',
|
||||||
|
|||||||
@ -89,7 +89,7 @@ export default function Index(props: MyBetaModalFormProps) {
|
|||||||
formItemProps: { ...rulesHelper.array },
|
formItemProps: { ...rulesHelper.array },
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
title: '证件有效期-开始',
|
title: '开始通行时间',
|
||||||
colProps: { span: 12 },
|
colProps: { span: 12 },
|
||||||
valueType: 'date',
|
valueType: 'date',
|
||||||
key: 'valid_from',
|
key: 'valid_from',
|
||||||
@ -97,7 +97,7 @@ export default function Index(props: MyBetaModalFormProps) {
|
|||||||
formItemProps: { ...rulesHelper.text },
|
formItemProps: { ...rulesHelper.text },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '证件有效期-结束',
|
title: '结束通行时间',
|
||||||
colProps: { span: 12 },
|
colProps: { span: 12 },
|
||||||
valueType: 'date',
|
valueType: 'date',
|
||||||
key: 'valid_to',
|
key: 'valid_to',
|
||||||
|
|||||||
157
src/pages/quality/routing_inspection/index.tsx
Normal file
157
src/pages/quality/routing_inspection/index.tsx
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
import { MyColumns, MyPageContainer, MyProTableProps } from '@/common';
|
||||||
|
import { Selects } from '@/components/Select';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import {
|
||||||
|
HouseWorkOrdersAssignStatusEnum,
|
||||||
|
HouseWorkOrdersLevelEnum,
|
||||||
|
HouseWorkOrdersTypeEnum,
|
||||||
|
} from '@/gen/Enums';
|
||||||
|
import WorkOrderShow from '@/pages/work_order/list/modals/WorkOrderShow';
|
||||||
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
|
import { Space } from 'antd';
|
||||||
|
import RenovationAssign from './modals/RenovationAssign';
|
||||||
|
|
||||||
|
export const RenovationWorkOrdersStatusEnum = {
|
||||||
|
Pending: { text: '待处理', color: '#FFA500', value: 'Pending' },
|
||||||
|
Processing: { text: '处理中', color: '#1E90FF', value: 'Processing' },
|
||||||
|
Completed: { text: '已完成', color: '#28A745', value: 'Completed' },
|
||||||
|
Closed: { text: '已关闭', color: '#6C757D', value: 'Closed' },
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function Index({ title = '装修验收' }) {
|
||||||
|
return (
|
||||||
|
<MyPageContainer
|
||||||
|
title={title}
|
||||||
|
enableTabs={true}
|
||||||
|
tabKey="renovation_inspection_list"
|
||||||
|
tabLabel={title}
|
||||||
|
>
|
||||||
|
<ProTable<Record<any, any>>
|
||||||
|
{...MyProTableProps.props}
|
||||||
|
headerTitle={title}
|
||||||
|
request={async (params, sort) => {
|
||||||
|
return MyProTableProps.request(
|
||||||
|
{
|
||||||
|
...params,
|
||||||
|
type: [
|
||||||
|
HouseWorkOrdersTypeEnum.RenovationInspection.value,
|
||||||
|
HouseWorkOrdersTypeEnum.RenovationAcceptance.value,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
sort,
|
||||||
|
Apis.WorkOrder.HouseWorkOrders.List,
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
// toolBarRender={(action) => [toolBarRender(action)]}
|
||||||
|
columns={[
|
||||||
|
MyColumns.ID({ search: false }),
|
||||||
|
Selects?.AssetProjects({
|
||||||
|
title: '选择项目',
|
||||||
|
key: 'asset_projects_id',
|
||||||
|
hidden: true,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '处理状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
valueEnum: RenovationWorkOrdersStatusEnum,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
title: '项目名称',
|
||||||
|
dataIndex: 'project_name',
|
||||||
|
hidden: true,
|
||||||
|
},
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '分配状态',
|
||||||
|
dataIndex: 'assign_status',
|
||||||
|
valueEnum: HouseWorkOrdersAssignStatusEnum,
|
||||||
|
}),
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '工单类型',
|
||||||
|
dataIndex: 'type',
|
||||||
|
valueEnum: HouseWorkOrdersTypeEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
// MyColumns.EnumTag({
|
||||||
|
// title: '报修位置',
|
||||||
|
// dataIndex: 'location',
|
||||||
|
// valueEnum: HouseWorkOrdersLocationEnum,
|
||||||
|
// search: false,
|
||||||
|
// }),
|
||||||
|
{
|
||||||
|
title: '位置信息',
|
||||||
|
dataIndex: ['asset_house', 'full_name'],
|
||||||
|
render: (_, record) => {
|
||||||
|
return (
|
||||||
|
<Space>
|
||||||
|
{record?.asset_house?.full_name
|
||||||
|
? record?.asset_house?.full_name
|
||||||
|
: record?.asset_project?.name}
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
transform: (value) => {
|
||||||
|
return { house_name: value };
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// title: '工单描述',
|
||||||
|
// dataIndex: 'content',
|
||||||
|
// search: false,
|
||||||
|
// width: 200, // 关键:固定列宽(若父容器过窄,可设 minWidth: 200 优先保证列宽)
|
||||||
|
// render: (text) => (
|
||||||
|
// <div
|
||||||
|
// style={{
|
||||||
|
// width: '100%', // 继承列宽
|
||||||
|
// // height: '60px', // 设置固定高度,约显示3行文本
|
||||||
|
// overflow: 'hidden', // 超出隐藏
|
||||||
|
// textOverflow: 'ellipsis', // 省略号
|
||||||
|
// display: '-webkit-box',
|
||||||
|
// WebkitBoxOrient: 'vertical',
|
||||||
|
// WebkitLineClamp: 3, // 显示3行
|
||||||
|
// }}
|
||||||
|
// >
|
||||||
|
// {text}
|
||||||
|
// </div>
|
||||||
|
// ),
|
||||||
|
// },
|
||||||
|
MyColumns.EnumTag({
|
||||||
|
title: '优先级',
|
||||||
|
dataIndex: 'level',
|
||||||
|
valueEnum: HouseWorkOrdersLevelEnum,
|
||||||
|
search: false,
|
||||||
|
}),
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '处理人',
|
||||||
|
dataIndex: ['assign_employee', 'name'],
|
||||||
|
search: false,
|
||||||
|
render: (_, record) => {
|
||||||
|
return `${record?.assign_employee?.name || ''}-${
|
||||||
|
record?.assign_employee?.phone || ''
|
||||||
|
}`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MyColumns.CreatedAt(),
|
||||||
|
MyColumns.Option({
|
||||||
|
render: (_, item: any, index, action) => (
|
||||||
|
<Space key={index}>
|
||||||
|
<WorkOrderShow
|
||||||
|
item={item}
|
||||||
|
title="详情"
|
||||||
|
reload={action?.reload}
|
||||||
|
/>
|
||||||
|
<RenovationAssign
|
||||||
|
item={item}
|
||||||
|
reload={action?.reload}
|
||||||
|
title="指派"
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</MyPageContainer>
|
||||||
|
);
|
||||||
|
}
|
||||||
137
src/pages/quality/routing_inspection/modals/RenovationAssign.tsx
Normal file
137
src/pages/quality/routing_inspection/modals/RenovationAssign.tsx
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
import {
|
||||||
|
MyBetaModalFormProps,
|
||||||
|
MyButtons,
|
||||||
|
MyFormItems,
|
||||||
|
MyModalFormProps,
|
||||||
|
rulesHelper,
|
||||||
|
} from '@/common';
|
||||||
|
import { Selects } from '@/components/Select';
|
||||||
|
import { Apis } from '@/gen/Apis';
|
||||||
|
import { HouseWorkOrdersTypeEnum } from '@/gen/Enums';
|
||||||
|
import { BetaSchemaForm } from '@ant-design/pro-components';
|
||||||
|
import { Form, message } from 'antd';
|
||||||
|
|
||||||
|
export default function WorkOrderAssign(
|
||||||
|
props: MyBetaModalFormProps & { item: any },
|
||||||
|
) {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
return (
|
||||||
|
<BetaSchemaForm<ApiTypes.WorkOrder.HouseWorkOrders.Assign>
|
||||||
|
{...MyModalFormProps.props}
|
||||||
|
title={`指派工单`}
|
||||||
|
wrapperCol={{ span: 19 }}
|
||||||
|
width="600px"
|
||||||
|
layout="horizontal"
|
||||||
|
labelCol={{ span: 5 }}
|
||||||
|
labelAlign="left"
|
||||||
|
trigger={
|
||||||
|
<MyButtons.Default
|
||||||
|
title={props.title || '指派'}
|
||||||
|
disabled={
|
||||||
|
props?.item.assign_status !== 'Unassigned' &&
|
||||||
|
props?.item.type === 'RenovationAcceptance'
|
||||||
|
}
|
||||||
|
type="primary"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
key={new Date().getTime()}
|
||||||
|
form={form}
|
||||||
|
request={async () => {
|
||||||
|
const res = await Apis.WorkOrder.HouseWorkOrders.Show({
|
||||||
|
id: props.item.id,
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
title: res.data.title,
|
||||||
|
assign_employee_id: res.data.assign_employee_id,
|
||||||
|
content: res.data.content,
|
||||||
|
attachments: res.data.attachments,
|
||||||
|
complaint_type: res.data.complaint_type,
|
||||||
|
locationInfo: res.data.asset_house.full_name,
|
||||||
|
type: res.data.type,
|
||||||
|
};
|
||||||
|
}}
|
||||||
|
onFinish={async (values: any) => {
|
||||||
|
Apis.WorkOrder.HouseWorkOrders.Assign({
|
||||||
|
...values,
|
||||||
|
id: props.item.id,
|
||||||
|
predict_complete_at: values.predict_complete_at,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
props.reload?.();
|
||||||
|
message.success('指派工单成功');
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.catch(() => false);
|
||||||
|
}}
|
||||||
|
columns={[
|
||||||
|
MyFormItems.EnumRadio({
|
||||||
|
key: 'type',
|
||||||
|
title: '工单类型',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
valueEnum: HouseWorkOrdersTypeEnum,
|
||||||
|
readonly: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
key: 'locationInfo',
|
||||||
|
title: '房屋信息',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
readonly: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'content',
|
||||||
|
title: '工单描述',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
readonly: true,
|
||||||
|
fieldProps: {
|
||||||
|
disabled: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ valueType: 'divider' },
|
||||||
|
|
||||||
|
// MyFormItems.EnumRadio({
|
||||||
|
// key: 'level',
|
||||||
|
// title: '优先级',
|
||||||
|
// colProps: { span: 24 },
|
||||||
|
// valueEnum: HouseWorkOrdersLevelEnum,
|
||||||
|
// required: true,
|
||||||
|
// }),
|
||||||
|
// {
|
||||||
|
// key: 'predict_complete_at',
|
||||||
|
// title: '完成时间要求',
|
||||||
|
// valueType: 'date',
|
||||||
|
// colProps: { span: 24 },
|
||||||
|
// formItemProps: { ...rulesHelper.text },
|
||||||
|
// fieldProps: {
|
||||||
|
// disabledDate: (current: any) => {
|
||||||
|
// // 只能选今天及以后的日期
|
||||||
|
// const today = new Date();
|
||||||
|
// today.setHours(0, 0, 0, 0); // 设置为今天的00:00:00
|
||||||
|
// return current && current < today;
|
||||||
|
// },
|
||||||
|
// addonAfter: '前',
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
Selects?.Employees({
|
||||||
|
title: '选择处理人',
|
||||||
|
key: 'assign_employees_id',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
formItemProps: { ...rulesHelper.text },
|
||||||
|
params: {
|
||||||
|
companies_id: props.item.companies_id,
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
key: 'assign_remark',
|
||||||
|
title: '备注',
|
||||||
|
valueType: 'textarea',
|
||||||
|
colProps: { span: 24 },
|
||||||
|
fieldProps: {
|
||||||
|
rows: 3,
|
||||||
|
// placeholder: '请输入指派备注(可选)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user