|
@@ -11,7 +11,7 @@ import {
|
|
import { useLocation } from '@@/exports';
|
|
import { useLocation } from '@@/exports';
|
|
import { connect, useRequest } from '@umijs/max';
|
|
import { connect, useRequest } from '@umijs/max';
|
|
import { Col, Row } from 'antd';
|
|
import { Col, Row } from 'antd';
|
|
-import moment from 'moment';
|
|
|
|
|
|
+import dayjs from 'dayjs';
|
|
import { DefaultOptionType } from 'rc-select/es/Select';
|
|
import { DefaultOptionType } from 'rc-select/es/Select';
|
|
import React, { useEffect, useState } from 'react';
|
|
import React, { useEffect, useState } from 'react';
|
|
import styles from './taskOrder.less';
|
|
import styles from './taskOrder.less';
|
|
@@ -54,9 +54,9 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
formatResult: (result) => {
|
|
formatResult: (result) => {
|
|
const temp = result.data.list[0];
|
|
const temp = result.data.list[0];
|
|
const tempDetail = {
|
|
const tempDetail = {
|
|
- 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') || '-',
|
|
|
|
|
|
+ CreateTime: dayjs(temp.CreateTime).format('YYYY-MM-DD HH:mm'),
|
|
|
|
+ PlanTime: dayjs(temp.PlanTime).format('YYYY-MM-DD HH:mm'),
|
|
|
|
+ RepairTime: dayjs(temp.RepairTime).format('YYYY-MM-DD HH:mm') || '-',
|
|
Reason: temp.Note,
|
|
Reason: temp.Note,
|
|
Lubrication: temp.Lubrication,
|
|
Lubrication: temp.Lubrication,
|
|
Fasten: temp.Fasten,
|
|
Fasten: temp.Fasten,
|
|
@@ -86,11 +86,11 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
const tempDetail: IOrderInfo = {
|
|
const tempDetail: IOrderInfo = {
|
|
- CreateTime: moment(temp.CreateTime).format('YYYY-MM-DD HH:mm'),
|
|
|
|
- PlanTime: moment(temp.PlanTime).format('YYYY-MM-DD HH:mm'),
|
|
|
|
|
|
+ CreateTime: dayjs(temp.CreateTime).format('YYYY-MM-DD HH:mm'),
|
|
|
|
+ PlanTime: dayjs(temp.PlanTime).format('YYYY-MM-DD HH:mm'),
|
|
RepairTime:
|
|
RepairTime:
|
|
(temp.RepairTime &&
|
|
(temp.RepairTime &&
|
|
- moment(temp.RepairTime).format('YYYY-MM-DD HH:mm')) ||
|
|
|
|
|
|
+ dayjs(temp.RepairTime).format('YYYY-MM-DD HH:mm')) ||
|
|
'-',
|
|
'-',
|
|
Reason: temp.Reason,
|
|
Reason: temp.Reason,
|
|
Repairman: userList.find((item) => item.ID === temp.Repairman) || '-',
|
|
Repairman: userList.find((item) => item.ID === temp.Repairman) || '-',
|
|
@@ -112,11 +112,11 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
formatResult: (result) => {
|
|
formatResult: (result) => {
|
|
const temp = result.data.list[0];
|
|
const temp = result.data.list[0];
|
|
const tempDetail = {
|
|
const tempDetail = {
|
|
- CreateTime: moment(temp.start_time).format('YYYY-MM-DD HH:mm'),
|
|
|
|
- PlanTime: moment(temp.plan_end_time).format('YYYY-MM-DD HH:mm'),
|
|
|
|
|
|
+ CreateTime: dayjs(temp.start_time).format('YYYY-MM-DD HH:mm'),
|
|
|
|
+ PlanTime: dayjs(temp.plan_end_time).format('YYYY-MM-DD HH:mm'),
|
|
RepairTime:
|
|
RepairTime:
|
|
(temp.actual_end_time &&
|
|
(temp.actual_end_time &&
|
|
- moment(temp.actual_end_time).format('YYYY-MM-DD HH:mm')) ||
|
|
|
|
|
|
+ dayjs(temp.actual_end_time).format('YYYY-MM-DD HH:mm')) ||
|
|
'-',
|
|
'-',
|
|
Reason: temp.detail,
|
|
Reason: temp.detail,
|
|
Repairman: userList.find((item) => item.ID === temp.checker_id) || '-',
|
|
Repairman: userList.find((item) => item.ID === temp.checker_id) || '-',
|