|
@@ -11,6 +11,7 @@ import {
|
|
|
import { useLocation } from '@@/exports';
|
|
|
import { connect, useRequest } from '@umijs/max';
|
|
|
import { Col, Row } from 'antd';
|
|
|
+import moment from 'moment';
|
|
|
import { DefaultOptionType } from 'rc-select/es/Select';
|
|
|
import React, { useEffect, useState } from 'react';
|
|
|
import styles from './taskOrder.less';
|
|
@@ -26,6 +27,7 @@ interface IOrderInfo {
|
|
|
RepairTime: string;
|
|
|
Reason: string;
|
|
|
Repairman: string | IUserType;
|
|
|
+ DispatchMan: string | IUserType;
|
|
|
OrderStatus: string | DefaultOptionType;
|
|
|
Lubrication?: number;
|
|
|
Fasten?: number;
|
|
@@ -52,9 +54,9 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
formatResult: (result) => {
|
|
|
const temp = result.data.list[0];
|
|
|
const tempDetail = {
|
|
|
- CreateTime: temp.CreateTime,
|
|
|
- PlanTime: temp.PlanTime,
|
|
|
- RepairTime: '-',
|
|
|
+ CreateTime: moment(temp.CreateTime).format('YYYY-MM-DD HH:mm'),
|
|
|
+ PlanTime: moment(temp.PlanTime).format('YYYY-MM-DD HH:mm'),
|
|
|
+ RepairTime: moment(temp.RepairTime).format('YYYY-MM-DD HH:mm') || '-',
|
|
|
Reason: temp.Note,
|
|
|
Lubrication: temp.Lubrication,
|
|
|
Fasten: temp.Fasten,
|
|
@@ -64,6 +66,9 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
Check: temp.Check,
|
|
|
Repairman:
|
|
|
userList.find((item) => item.ID === temp.MaintenancePerson) || '-',
|
|
|
+ DispatchMan:
|
|
|
+ userList.find((item) => (item.ID = temp.Operators[0]?.Operator?.ID)) ||
|
|
|
+ '-',
|
|
|
OrderStatus:
|
|
|
OrderStatus.find((item) => item.value === temp.Status) || '-',
|
|
|
};
|
|
@@ -77,11 +82,15 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
formatResult: (result: any) => {
|
|
|
const temp = result.data.list[0];
|
|
|
const tempDetail: IOrderInfo = {
|
|
|
- CreateTime: temp.CreateTime,
|
|
|
- PlanTime: temp.PlanTime,
|
|
|
- RepairTime: temp.RepairTime,
|
|
|
+ CreateTime: moment(temp.CreateTime).format('YYYY-MM-DD HH:mm'),
|
|
|
+ PlanTime: moment(temp.PlanTime).format('YYYY-MM-DD HH:mm'),
|
|
|
+ RepairTime: temp.RepairTime && moment(temp.RepairTime).format('YYYY-MM-DD HH:mm') || '-',
|
|
|
Reason: temp.Reason,
|
|
|
Repairman: userList.find((item) => item.ID === temp.Repairman) || '-',
|
|
|
+ DispatchMan:
|
|
|
+ userList.find((item) => {
|
|
|
+ item.ID === temp.operator_id;
|
|
|
+ }) || '-',
|
|
|
OrderStatus:
|
|
|
OrderStatus.find((item) => item.value === temp.AcceptanceStatus) ||
|
|
|
'-',
|
|
@@ -96,11 +105,16 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
formatResult: (result) => {
|
|
|
const temp = result.data.list[0];
|
|
|
const tempDetail = {
|
|
|
- CreateTime: temp.start_time,
|
|
|
- PlanTime: temp.plan_end_time,
|
|
|
- RepairTime: temp.actual_end_time || '-',
|
|
|
+ CreateTime: moment(temp.start_time).format('YYYY-MM-DD HH:mm'),
|
|
|
+ PlanTime: moment(temp.plan_end_time).format('YYYY-MM-DD HH:mm'),
|
|
|
+ RepairTime:
|
|
|
+ (temp.actual_end_time &&
|
|
|
+ moment(temp.actual_end_time).format('YYYY-MM-DD HH:mm')) ||
|
|
|
+ '-',
|
|
|
Reason: temp.detail,
|
|
|
- Repairman: userList.find((item) => item.ID === temp.operator_id) || '-',
|
|
|
+ Repairman: userList.find((item) => item.ID === temp.checker_id) || '-',
|
|
|
+ DispatchMan:
|
|
|
+ userList.find((item) => item.ID === temp.operator_id) || '-',
|
|
|
OrderStatus:
|
|
|
OrderStatus.find((item) => item.value === temp.status) || '-',
|
|
|
};
|
|
@@ -142,46 +156,46 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
showStatus={orderInfo?.OrderStatus.value === 2}
|
|
|
radius
|
|
|
/>
|
|
|
- <div style={{ padding: '15px' }}>
|
|
|
+ <div style={{ padding: '15px', letterSpacing: '1.5px' }}>
|
|
|
<Row className={styles.rowMargin}>
|
|
|
- <Col className={styles.fontS24} span={16}>
|
|
|
- 时间:{'-'}
|
|
|
+ <Col className={styles.fontS28} span={16}>
|
|
|
+ {/*// @ts-ignore*/}
|
|
|
+ 工单类型:
|
|
|
+ {order_type === 1 ? '工艺' : order_type === 2 ? '维修' : '保养'}
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24} span={8}>
|
|
|
+ <Col className={styles.fontS28} span={8}>
|
|
|
{/*// @ts-ignore*/}
|
|
|
工单负责人:{orderInfo?.Repairman?.CName || '-'}
|
|
|
</Col>
|
|
|
</Row>
|
|
|
- <Row className={styles.rowMargin} >
|
|
|
- <Col className={styles.fontS24} span={8}>
|
|
|
+ <Row className={styles.rowMargin}>
|
|
|
+ <Col className={styles.fontS28} span={16}>
|
|
|
{/*// @ts-ignore*/}
|
|
|
工单状态:{orderInfo?.OrderStatus?.label}
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24} span={8}>
|
|
|
+ <Col className={styles.fontS28} span={8}>
|
|
|
{/*// @ts-ignore*/}
|
|
|
- 工单类型:
|
|
|
- {order_type === 1 ? '工艺' : order_type === 2 ? '维修' : '保养'}
|
|
|
+ 派单人员:{orderInfo?.DispatchMan?.CName}
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24} span={8}>派单人员:{'-'}</Col>
|
|
|
</Row>
|
|
|
<Row className={styles.rowMargin}>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Col className={styles.fontS28}>
|
|
|
派单时间:{orderInfo?.CreateTime || '-'}
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row className={styles.rowMargin}>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Col className={styles.fontS28}>
|
|
|
计划完成时间:{orderInfo?.PlanTime || '-'}
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row className={styles.rowMargin}>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Col className={styles.fontS28}>
|
|
|
实际完成时间:{orderInfo?.RepairTime || '-'}
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row>
|
|
|
- <Col className={styles.fontS24}>工单详情:</Col>
|
|
|
- <Col className={styles.fontS24} span={20}>
|
|
|
+ <Col className={styles.fontS28}>工单详情:</Col>
|
|
|
+ <Col className={styles.fontS28} span={18}>
|
|
|
{orderInfo?.Reason}
|
|
|
{/*<Table />*/}
|
|
|
</Col>
|
|
@@ -192,25 +206,25 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
<div>
|
|
|
<SubTitle title="维修内容" />
|
|
|
<div style={{ padding: '15px' }}>
|
|
|
- <Row className={styles.rowMargin} justify={'space-between'}>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Row className={styles.rowMargin} justify={'space-around'}>
|
|
|
+ <Col className={styles.fontS28} span={8}>
|
|
|
是否润滑/加油:{orderInfo?.Lubrication === 1 ? '是' : '否'}
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Col className={styles.fontS28} span={8}>
|
|
|
是否拆检:{orderInfo?.Check === 1 ? '是' : '否'}
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Col className={styles.fontS28} span={8}>
|
|
|
是否清洁:{orderInfo?.Clean === 1 ? '是' : '否'}
|
|
|
</Col>
|
|
|
</Row>
|
|
|
- <Row>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Row justify={'space-around'}>
|
|
|
+ <Col className={styles.fontS28} span={8}>
|
|
|
是否紧固:{orderInfo?.Fasten === 1 ? '是' : '否'}
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Col className={styles.fontS28} span={8}>
|
|
|
是否除锈:{orderInfo?.AntiCorrosive === 1 ? '是' : '否'}
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Col className={styles.fontS28} span={8}>
|
|
|
是否防腐:{orderInfo?.RustRemoval === 1 ? '是' : '否'}
|
|
|
</Col>
|
|
|
</Row>
|