|
@@ -24,7 +24,7 @@ import { PhotoProvider, PhotoView } from 'react-photo-view';
|
|
|
|
|
|
interface IPropsType {
|
|
interface IPropsType {
|
|
userList: IUserType[];
|
|
userList: IUserType[];
|
|
- dispatch: (args: { type: string; payload: object }) => {};
|
|
|
|
|
|
+ dispatch: (args: { type: string; payload: object }) => void;
|
|
}
|
|
}
|
|
|
|
|
|
interface IOrderInfo {
|
|
interface IOrderInfo {
|
|
@@ -120,12 +120,15 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
const tempDetail: IOrderInfo = {
|
|
const tempDetail: IOrderInfo = {
|
|
- CreateTime: dayjs(temp.CreateTime).format('YYYY-MM-DD HH:mm'),
|
|
|
|
- PlanTime: dayjs(temp.PlanTime).format('YYYY-MM-DD HH:mm'),
|
|
|
|
- RepairTime:
|
|
|
|
- (temp.RepairTime &&
|
|
|
|
- dayjs(temp.RepairTime).format('YYYY-MM-DD HH:mm')) ||
|
|
|
|
- '-',
|
|
|
|
|
|
+ CreateTime: temp.CreateTime
|
|
|
|
+ ? dayjs(temp.CreateTime).format('YYYY-MM-DD HH:mm')
|
|
|
|
+ : '-',
|
|
|
|
+ PlanTime: temp.PlanTime
|
|
|
|
+ ? dayjs(temp.PlanTime).format('YYYY-MM-DD HH:mm')
|
|
|
|
+ : '-',
|
|
|
|
+ RepairTime: temp.RepairTime
|
|
|
|
+ ? 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) || '-',
|
|
DispatchMan:
|
|
DispatchMan:
|
|
@@ -195,12 +198,15 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
formatResult: (result) => {
|
|
formatResult: (result) => {
|
|
const temp = {
|
|
const temp = {
|
|
...result,
|
|
...result,
|
|
- CreateTime: dayjs(result?.start_time?.Time).format('YYYY-MM-DD HH:mm'),
|
|
|
|
- PlanTime: dayjs(result.plan_end_time.Time).format('YYYY-MM-DD HH:mm'),
|
|
|
|
- RepairTime:
|
|
|
|
- (result?.actual_end_time?.Valid &&
|
|
|
|
- dayjs(result.actual_end_time.Time).format('YYYY-MM-DD HH:mm')) ||
|
|
|
|
- '-',
|
|
|
|
|
|
+ CreateTime: result?.start_time?.Valid
|
|
|
|
+ ? dayjs(result?.start_time?.Time).format('YYYY-MM-DD HH:mm')
|
|
|
|
+ : '-',
|
|
|
|
+ PlanTime: result?.plan_end_time?.Valid
|
|
|
|
+ ? dayjs(result.plan_end_time.Time).format('YYYY-MM-DD HH:mm')
|
|
|
|
+ : '-',
|
|
|
|
+ RepairTime: result?.actual_end_time?.Valid
|
|
|
|
+ ? dayjs(result.actual_end_time.Time).format('YYYY-MM-DD HH:mm')
|
|
|
|
+ : '-',
|
|
Reason: result.note,
|
|
Reason: result.note,
|
|
Repairman: '-',
|
|
Repairman: '-',
|
|
DispatchMan:
|
|
DispatchMan:
|
|
@@ -220,7 +226,7 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
});
|
|
});
|
|
|
|
|
|
// 获取工单流程信息
|
|
// 获取工单流程信息
|
|
- const { run: getOrderFlow } = useRequest(getWorkOrderFlow, {
|
|
|
|
|
|
+ useRequest(getWorkOrderFlow, {
|
|
// manual: true,
|
|
// manual: true,
|
|
defaultParams: [{ work_type: order_type, work_id: order_id }],
|
|
defaultParams: [{ work_type: order_type, work_id: order_id }],
|
|
formatResult(res: IStepInfo[]) {
|
|
formatResult(res: IStepInfo[]) {
|
|
@@ -382,7 +388,9 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
<Row>
|
|
<Row>
|
|
<Col className={styles.fontS28}>加药详情:</Col>
|
|
<Col className={styles.fontS28}>加药详情:</Col>
|
|
<Col className={styles.fontS28} span={18}>
|
|
<Col className={styles.fontS28} span={18}>
|
|
- {`药剂名称:${additionalInfo?.name} 加药量:${additionalInfo?.dosage}升 浓度:${additionalInfo?.concentration}`}
|
|
|
|
|
|
+ {`药剂名称:${additionalInfo?.name || '-'} 加药量:${
|
|
|
|
+ additionalInfo?.dosage || '-'
|
|
|
|
+ }升 浓度:${additionalInfo?.concentration || '-'}`}
|
|
</Col>
|
|
</Col>
|
|
</Row>
|
|
</Row>
|
|
</div>
|
|
</div>
|