|
@@ -52,7 +52,6 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
const { run: getMaintainDetail } = useRequest(getMaintainRecordList, {
|
|
|
manual: true,
|
|
|
formatResult: (result) => {
|
|
|
- console.log(moment('2022-12-12 00:00:00').format('YYYY-MM-DD HH:mm'));
|
|
|
const temp = result.data.list[0];
|
|
|
const tempDetail = {
|
|
|
CreateTime: moment(temp.CreateTime).format('YYYY-MM-DD HH:mm'),
|
|
@@ -68,7 +67,7 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
Repairman:
|
|
|
userList.find((item) => item.ID === temp.MaintenancePerson) || '-',
|
|
|
DispatchMan:
|
|
|
- userList.find((item) => (item.ID = temp.Operators[0].Operator.ID)) ||
|
|
|
+ userList.find((item) => (item.ID = temp.Operators[0]?.Operator?.ID)) ||
|
|
|
'-',
|
|
|
OrderStatus:
|
|
|
OrderStatus.find((item) => item.value === temp.Status) || '-',
|
|
@@ -85,7 +84,7 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
const tempDetail: IOrderInfo = {
|
|
|
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'),
|
|
|
+ RepairTime: temp.RepairTime && moment(temp.RepairTime).format('YYYY-MM-DD HH:mm') || '-',
|
|
|
Reason: temp.Reason,
|
|
|
Repairman: userList.find((item) => item.ID === temp.Repairman) || '-',
|
|
|
DispatchMan:
|
|
@@ -130,7 +129,6 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
payload: { project_id },
|
|
|
});
|
|
|
}
|
|
|
- console.log(order_type);
|
|
|
switch (order_type) {
|
|
|
// 工艺
|
|
|
case 1:
|
|
@@ -179,6 +177,7 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
{order_type === 1 ? '工艺' : order_type === 2 ? '维修' : '保养'}
|
|
|
</Col>
|
|
|
<Col className={styles.fontS26} span={8}>
|
|
|
+ {/*// @ts-ignore*/}
|
|
|
派单人员:{orderInfo?.DispatchMan?.CName}
|
|
|
</Col>
|
|
|
</Row>
|