|
@@ -6,6 +6,7 @@ import { OrderStatus, OrderType } from '@/pages/TaskManage/constent';
|
|
|
import {
|
|
|
getCraftRecordList,
|
|
|
getMaintainRecordList,
|
|
|
+ getReagentOrderDetail,
|
|
|
getRepairRecordList,
|
|
|
getWorkOrderFlow,
|
|
|
queryReagentDetail,
|
|
@@ -128,9 +129,7 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
Reason: temp.Reason,
|
|
|
Repairman: userList.find((item) => item.ID === temp.Repairman) || '-',
|
|
|
DispatchMan:
|
|
|
- userList.find((item) => {
|
|
|
- item.ID === temp.operator_id;
|
|
|
- }) || '-',
|
|
|
+ userList.find((item) => item.ID === temp.operator_id) || '-',
|
|
|
OrderStatus:
|
|
|
OrderStatus.find((item) => item.value === temp.AcceptanceStatus) ||
|
|
|
'-',
|
|
@@ -186,19 +185,40 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
})
|
|
|
: [],
|
|
|
};
|
|
|
- if (order_type === 5) {
|
|
|
- queryReagentDetail({ id: temp.id })
|
|
|
- .then((res) => {
|
|
|
- if (res) {
|
|
|
- setAdditionalInfo(res);
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((err) => console.log(err));
|
|
|
- }
|
|
|
+
|
|
|
setOrderInfo(tempDetail);
|
|
|
},
|
|
|
});
|
|
|
|
|
|
+ const { run: getDosingOrder } = useRequest(getReagentOrderDetail, {
|
|
|
+ manual: true,
|
|
|
+ formatResult: (result) => {
|
|
|
+ const temp = {
|
|
|
+ ...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')) ||
|
|
|
+ '-',
|
|
|
+ Reason: result.note,
|
|
|
+ Repairman: '-',
|
|
|
+ DispatchMan:
|
|
|
+ userList.find((user) => user.ID === result.operator_id) || '-',
|
|
|
+ OrderStatus:
|
|
|
+ OrderStatus.find((status) => status.value === result.status) || '-',
|
|
|
+ };
|
|
|
+ setOrderInfo(temp);
|
|
|
+ queryReagentDetail({ id: temp.id })
|
|
|
+ .then((res) => {
|
|
|
+ if (res) {
|
|
|
+ setAdditionalInfo(res);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => console.log(err));
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
// 获取工单流程信息
|
|
|
const { run: getOrderFlow } = useRequest(getWorkOrderFlow, {
|
|
|
// manual: true,
|
|
@@ -220,7 +240,7 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
switch (order_type) {
|
|
|
// 工艺
|
|
|
case 1:
|
|
|
- case 5:
|
|
|
+
|
|
|
case 6:
|
|
|
getCraftDetail({ project_id, work_id: order_id });
|
|
|
break;
|
|
@@ -232,6 +252,9 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
case 3:
|
|
|
getMaintainDetail({ project_id, id: order_id });
|
|
|
break;
|
|
|
+ case 5:
|
|
|
+ getDosingOrder(order_id);
|
|
|
+ break;
|
|
|
}
|
|
|
}, []);
|
|
|
|
|
@@ -239,8 +262,8 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
return (
|
|
|
<PhotoProvider>
|
|
|
<Col className={styles.fontS28} span={18}>
|
|
|
- {orderInfo?.MandateImages?.map((photo) => (
|
|
|
- <PhotoView src={photo.src}>
|
|
|
+ {orderInfo?.MandateImages?.map((photo, index) => (
|
|
|
+ <PhotoView key={index} src={photo.src}>
|
|
|
<img
|
|
|
style={{
|
|
|
maxWidth: `${Math.floor(
|
|
@@ -312,14 +335,7 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
{orderInfo?.Reason}
|
|
|
</Col>
|
|
|
</Row>
|
|
|
- {order_type === 5 && (
|
|
|
- <Row className={styles.rowMarginTop}>
|
|
|
- <Col className={styles.fontS28}>加药详情:</Col>
|
|
|
- <Col className={styles.fontS28} span={18}>
|
|
|
- {`药剂名称:${additionalInfo?.name} 加药量:${additionalInfo?.dosage}升 浓度:${additionalInfo?.concentration}`}
|
|
|
- </Col>
|
|
|
- </Row>
|
|
|
- )}
|
|
|
+
|
|
|
{/* @ts-ignore */}
|
|
|
{orderInfo?.MandateImages?.length > 0 && (
|
|
|
<Row className={styles.rowMarginTop}>
|
|
@@ -358,6 +374,20 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
</div>
|
|
|
</div>
|
|
|
)}
|
|
|
+
|
|
|
+ {order_type === 5 && (
|
|
|
+ <div>
|
|
|
+ <SubTitle title="加药详情" />
|
|
|
+ <div style={{ padding: '15px' }}>
|
|
|
+ <Row>
|
|
|
+ <Col className={styles.fontS28}>加药详情:</Col>
|
|
|
+ <Col className={styles.fontS28} span={18}>
|
|
|
+ {`药剂名称:${additionalInfo?.name} 加药量:${additionalInfo?.dosage}升 浓度:${additionalInfo?.concentration}`}
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
{/* @ts-ignore */}
|
|
|
{stepInfo?.length > 0 && (
|
|
|
<div>
|