|
@@ -15,24 +15,33 @@ import {
|
|
MandateType,
|
|
MandateType,
|
|
OrderStatus,
|
|
OrderStatus,
|
|
OrderType,
|
|
OrderType,
|
|
|
|
+ ignoreReason,
|
|
} from '@/pages/TaskManage/constent';
|
|
} from '@/pages/TaskManage/constent';
|
|
import {
|
|
import {
|
|
|
|
+ dispatchOrder,
|
|
getDiagnosticDetail,
|
|
getDiagnosticDetail,
|
|
getMandateDetail,
|
|
getMandateDetail,
|
|
|
|
+ ignoreTaskRequest,
|
|
|
|
+ setTaskAutomation,
|
|
withdrawOrderRequest,
|
|
withdrawOrderRequest,
|
|
} from '@/services/TaskManage';
|
|
} from '@/services/TaskManage';
|
|
import { useLocation } from '@@/exports';
|
|
import { useLocation } from '@@/exports';
|
|
import { CaretDownFilled } from '@ant-design/icons';
|
|
import { CaretDownFilled } from '@ant-design/icons';
|
|
import { connect, useRequest } from '@umijs/max';
|
|
import { connect, useRequest } from '@umijs/max';
|
|
import {
|
|
import {
|
|
|
|
+ Button,
|
|
|
|
+ Checkbox,
|
|
Col,
|
|
Col,
|
|
Collapse,
|
|
Collapse,
|
|
CollapseProps,
|
|
CollapseProps,
|
|
|
|
+ ConfigProvider,
|
|
|
|
+ DatePicker,
|
|
Divider,
|
|
Divider,
|
|
Form,
|
|
Form,
|
|
Input,
|
|
Input,
|
|
Modal,
|
|
Modal,
|
|
Row,
|
|
Row,
|
|
|
|
+ Select,
|
|
Table,
|
|
Table,
|
|
message,
|
|
message,
|
|
} from 'antd';
|
|
} from 'antd';
|
|
@@ -42,8 +51,271 @@ import { useEffect, useState } from 'react';
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
import ReactZmage from 'react-zmage';
|
|
import ReactZmage from 'react-zmage';
|
|
import { useNavigate } from 'umi';
|
|
import { useNavigate } from 'umi';
|
|
|
|
+
|
|
|
|
+import zhCN from 'antd/es/locale/zh_CN';
|
|
|
|
+
|
|
|
|
+import { UnityAction } from '@/utils/utils';
|
|
import styles from './taskDetail.less';
|
|
import styles from './taskDetail.less';
|
|
|
|
|
|
|
|
+const IgnoreTaskModal = (params: any) => {
|
|
|
|
+ const { open, onCancel, onOk } = params;
|
|
|
|
+
|
|
|
|
+ const [ignoreReasonText, setIgnoreReasonText] = useState('');
|
|
|
|
+ const [selectedReason, setSelectedReason] = useState<any>({});
|
|
|
|
+ const [showInput, setShowInput] = useState(false);
|
|
|
|
+
|
|
|
|
+ const onReasonChange = (reason: any, option: any) => {
|
|
|
|
+ if (reason !== 4) {
|
|
|
|
+ setSelectedReason(option);
|
|
|
|
+ setShowInput(false);
|
|
|
|
+ } else {
|
|
|
|
+ setShowInput(true);
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ const onReasonTextChange = (e: any) => {
|
|
|
|
+ setIgnoreReasonText(e.target.value);
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ const handleCancle = () => {
|
|
|
|
+ setSelectedReason({});
|
|
|
|
+ setIgnoreReasonText('');
|
|
|
|
+ setShowInput(false);
|
|
|
|
+ onCancel();
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ const confirmIgnore = () => {
|
|
|
|
+ if (showInput) {
|
|
|
|
+ if (!ignoreReasonText.length) {
|
|
|
|
+ message.warning('请输入忽略理由');
|
|
|
|
+ } else {
|
|
|
|
+ onOk(ignoreReasonText);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (selectedReason?.label) {
|
|
|
|
+ onOk(selectedReason.label);
|
|
|
|
+ } else {
|
|
|
|
+ message.warning('请选择忽略理由');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ return (
|
|
|
|
+ <Modal
|
|
|
|
+ className={styles.handleModal}
|
|
|
|
+ title="忽略"
|
|
|
|
+ maskStyle={{ borderRadius: 0 }}
|
|
|
|
+ open={open}
|
|
|
|
+ onCancel={handleCancle}
|
|
|
|
+ onOk={confirmIgnore}
|
|
|
|
+ width="60%"
|
|
|
|
+ destroyOnClose
|
|
|
|
+ >
|
|
|
|
+ <div style={{ padding: '0.15rem' }}>
|
|
|
|
+ <Form>
|
|
|
|
+ <Form.Item label="忽略理由:">
|
|
|
|
+ <Select
|
|
|
|
+ className={styles.fontS28}
|
|
|
|
+ options={ignoreReason}
|
|
|
|
+ onChange={onReasonChange}
|
|
|
|
+ allowClear
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ {showInput && (
|
|
|
|
+ <Form.Item label="输入理由:">
|
|
|
|
+ <Input placeholder="请输入理由" onChange={onReasonTextChange} />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ )}
|
|
|
|
+ </Form>
|
|
|
|
+ </div>
|
|
|
|
+ </Modal>
|
|
|
|
+ );
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const AutoHandleModal = (props: any) => {
|
|
|
|
+ const { open, onCancel, onOk } = props;
|
|
|
|
+
|
|
|
|
+ const [automation, setAutomation] = useState<string>();
|
|
|
|
+
|
|
|
|
+ const confirmAutoHandle = () => {
|
|
|
|
+ if (automation && automation.length) {
|
|
|
|
+ onOk(automation);
|
|
|
|
+ } else {
|
|
|
|
+ message.warning('请输入口令');
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ return (
|
|
|
|
+ <Modal
|
|
|
|
+ className={styles.handleModal}
|
|
|
|
+ title="自动处理"
|
|
|
|
+ maskStyle={{ borderRadius: 0 }}
|
|
|
|
+ open={open}
|
|
|
|
+ onCancel={onCancel}
|
|
|
|
+ onOk={confirmAutoHandle}
|
|
|
|
+ width="60%"
|
|
|
|
+ destroyOnClose
|
|
|
|
+ >
|
|
|
|
+ <div style={{ padding: '0.15rem' }}>
|
|
|
|
+ <Form>
|
|
|
|
+ <Form.Item label="用户口令:">
|
|
|
|
+ {
|
|
|
|
+ <Input
|
|
|
|
+ autoFocus
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ placeholder="请输入口令"
|
|
|
|
+ onChange={(e) => {
|
|
|
|
+ setAutomation(e.target.value);
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ }
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Form>
|
|
|
|
+ </div>
|
|
|
|
+ </Modal>
|
|
|
|
+ );
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const MandateSelectModal = (props: any) => {
|
|
|
|
+ const { open, onCancel, list, onOk, selectedTask, setSelectedTask } = props;
|
|
|
|
+
|
|
|
|
+ const [checkOptions, setCheckOptions] = useState([]);
|
|
|
|
+
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ setCheckOptions(
|
|
|
|
+ list.map((mandate: any, index: number) => {
|
|
|
|
+ return {
|
|
|
|
+ label: (
|
|
|
|
+ <Row className={styles.taskCheckItem}>
|
|
|
|
+ <span
|
|
|
|
+ style={{
|
|
|
|
+ textDecoration: `${
|
|
|
|
+ mandate.Status === 0 ? '' : 'line-through'
|
|
|
|
+ }`,
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ {`${index + 1}. ${mandate.Title}为${mandate.Content}`}
|
|
|
|
+ </span>
|
|
|
|
+ </Row>
|
|
|
|
+ ),
|
|
|
|
+ value: mandate.Id,
|
|
|
|
+ disabled: mandate.Status !== 0,
|
|
|
|
+ };
|
|
|
|
+ }),
|
|
|
|
+ );
|
|
|
|
+ }, [list]);
|
|
|
|
+
|
|
|
|
+ const onDispatchClick = () => {
|
|
|
|
+ onOk(selectedTask);
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ const handleCheckChange = (checkedValue: any) => {
|
|
|
|
+ setSelectedTask(checkedValue);
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ return (
|
|
|
|
+ <Modal
|
|
|
|
+ className={styles.handleModal}
|
|
|
|
+ title="选择任务"
|
|
|
|
+ open={open}
|
|
|
|
+ onCancel={onCancel}
|
|
|
|
+ width={'80%'}
|
|
|
|
+ destroyOnClose
|
|
|
|
+ footer={[
|
|
|
|
+ <Button key="back" onClick={onCancel}>
|
|
|
|
+ 取消
|
|
|
|
+ </Button>,
|
|
|
|
+ <Button key="dispatch" type="primary" onClick={onDispatchClick}>
|
|
|
|
+ 派单
|
|
|
|
+ </Button>,
|
|
|
|
+ ]}
|
|
|
|
+ >
|
|
|
|
+ <Checkbox.Group
|
|
|
|
+ className={styles.taskCheckBox}
|
|
|
|
+ options={checkOptions}
|
|
|
|
+ onChange={handleCheckChange}
|
|
|
|
+ />
|
|
|
|
+ </Modal>
|
|
|
|
+ );
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const DispatchTaskModal = (props: any) => {
|
|
|
|
+ const { open, onCancel, onOK, userList } = props;
|
|
|
|
+
|
|
|
|
+ const [form] = Form.useForm();
|
|
|
|
+
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ if (!open) {
|
|
|
|
+ form.resetFields();
|
|
|
|
+ }
|
|
|
|
+ }, [open]);
|
|
|
|
+
|
|
|
|
+ const handleDispatchConfirm = async () => {
|
|
|
|
+ const value = await form.validateFields().catch((err) =>
|
|
|
|
+ err.errorFields.forEach((item) => {
|
|
|
|
+ message.error(item.errors);
|
|
|
|
+ }),
|
|
|
|
+ );
|
|
|
|
+ if (!value) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ onOK(value);
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ return (
|
|
|
|
+ <Modal
|
|
|
|
+ className={styles.handleModal}
|
|
|
|
+ title="派遣任务"
|
|
|
|
+ onCancel={onCancel}
|
|
|
|
+ open={open}
|
|
|
|
+ destroyOnClose
|
|
|
|
+ width="65%"
|
|
|
|
+ onOk={handleDispatchConfirm}
|
|
|
|
+ >
|
|
|
|
+ <Form
|
|
|
|
+ form={form}
|
|
|
|
+ layout="horizontal"
|
|
|
|
+ labelCol={{ span: 6 }}
|
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
|
+ >
|
|
|
|
+ <Form.Item
|
|
|
|
+ label="工单类型"
|
|
|
|
+ name="type"
|
|
|
|
+ rules={[{ required: true, message: '请选择工单类型' }]}
|
|
|
|
+ >
|
|
|
|
+ <Select options={OrderType} placeholder="请选择工单类型" />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ label="操作人"
|
|
|
|
+ name="operator_id"
|
|
|
|
+ rules={[{ required: true, message: '请选择操作人' }]}
|
|
|
|
+ >
|
|
|
|
+ <Select
|
|
|
|
+ options={userList.map((item) => {
|
|
|
|
+ return {
|
|
|
|
+ label: item.CName,
|
|
|
|
+ value: item.ID,
|
|
|
|
+ };
|
|
|
|
+ })}
|
|
|
|
+ placeholder="请选择操作人"
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ label="计划完成时间"
|
|
|
|
+ name="plan_end_time"
|
|
|
|
+ rules={[{ required: true, message: '请选择完成时间' }]}
|
|
|
|
+ >
|
|
|
|
+ <DatePicker
|
|
|
|
+ inputReadOnly
|
|
|
|
+ style={{ width: '100%' }}
|
|
|
|
+ placeholder="请选择完成时间"
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </Form>
|
|
|
|
+ </Modal>
|
|
|
|
+ );
|
|
|
|
+};
|
|
|
|
+
|
|
interface IPropsType {
|
|
interface IPropsType {
|
|
userList: IUserType[];
|
|
userList: IUserType[];
|
|
dispatch: (args: { type: string; payload: object }) => void;
|
|
dispatch: (args: { type: string; payload: object }) => void;
|
|
@@ -67,7 +339,13 @@ function TaskDetail(props: IPropsType) {
|
|
const [mandateTable, setMandateTable] = useState<IColumn[]>([]);
|
|
const [mandateTable, setMandateTable] = useState<IColumn[]>([]);
|
|
const [withdrawReason, setWithdrawReason] = useState('');
|
|
const [withdrawReason, setWithdrawReason] = useState('');
|
|
const [withdrawOrderOpen, setWithdrawOrderOpen] = useState(false);
|
|
const [withdrawOrderOpen, setWithdrawOrderOpen] = useState(false);
|
|
- const [clickedOrder, setClickedOrder] = useState({});
|
|
|
|
|
|
+ const [clickedOrder, setClickedOrder] = useState<any>({});
|
|
|
|
+
|
|
|
|
+ const [ignoreModalOpen, setIgnoreModalOpen] = useState(false);
|
|
|
|
+ const [autoHandleModalOpen, setAutoHandleModalOpen] = useState(false);
|
|
|
|
+ const [mandateSelectModalOpen, setMandateSelectModalOpen] = useState(false);
|
|
|
|
+ const [selectedTask, setSelectedTask] = useState([]);
|
|
|
|
+ const [dispatchModalOpen, setDispatchModalOpen] = useState(false);
|
|
|
|
|
|
const columnDef: ColumnsType<IColumn> = [
|
|
const columnDef: ColumnsType<IColumn> = [
|
|
{
|
|
{
|
|
@@ -86,19 +364,6 @@ function TaskDetail(props: IPropsType) {
|
|
},
|
|
},
|
|
];
|
|
];
|
|
|
|
|
|
- const base64ToImageUrl = (base64String: string) => {
|
|
|
|
- const byteCharacters = atob(base64String);
|
|
|
|
- const byteArrays = [];
|
|
|
|
-
|
|
|
|
- for (let i = 0; i < byteCharacters.length; i++) {
|
|
|
|
- byteArrays.push(byteCharacters.charCodeAt(i));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- const byteArray = new Uint8Array(byteArrays);
|
|
|
|
- const blob = new Blob([byteArray], { type: 'image/png' });
|
|
|
|
- return URL.createObjectURL(blob);
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
const { refresh: refreshDetail } = useRequest(getMandateDetail, {
|
|
const { refresh: refreshDetail } = useRequest(getMandateDetail, {
|
|
defaultParams: [
|
|
defaultParams: [
|
|
{
|
|
{
|
|
@@ -230,6 +495,121 @@ function TaskDetail(props: IPropsType) {
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ const { run: runIgnore } = useRequest(ignoreTaskRequest, {
|
|
|
|
+ manual: true,
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ const { run: runDispatch } = useRequest(dispatchOrder, {
|
|
|
|
+ manual: true,
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ const { run: runAutomate } = useRequest(setTaskAutomation, {
|
|
|
|
+ manual: true,
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // 忽略
|
|
|
|
+ const onIgnoreTaskConfirm = async (id: any, reason: string) => {
|
|
|
|
+ const params = {
|
|
|
|
+ Id: id,
|
|
|
|
+ Status: 4,
|
|
|
|
+ note: reason,
|
|
|
|
+ };
|
|
|
|
+ const result = await runIgnore(params);
|
|
|
|
+ if (result) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ // 派单
|
|
|
|
+ const onDispatchTaskConfirm = async (params: any) => {
|
|
|
|
+ const result = await runDispatch(params);
|
|
|
|
+ if (result) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ // 自动处理
|
|
|
|
+ const onAutoHandleTaskConfirm = async (pw: any, mandate: any) => {
|
|
|
|
+ const params = {
|
|
|
|
+ mandate_id: mandate.Id,
|
|
|
|
+ pw,
|
|
|
|
+ };
|
|
|
|
+ const result = runAutomate(params, mandate);
|
|
|
|
+ if (result) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ // 打开指定弹窗
|
|
|
|
+ const openSpecifiedModal = (type: any) => {
|
|
|
|
+ switch (type) {
|
|
|
|
+ case 'ignore':
|
|
|
|
+ setIgnoreModalOpen(true);
|
|
|
|
+ break;
|
|
|
|
+ case 'manual':
|
|
|
|
+ UnityAction.sendMsg('menuItem', '工艺监控');
|
|
|
|
+ break;
|
|
|
|
+ case 'auto':
|
|
|
|
+ setAutoHandleModalOpen(true);
|
|
|
|
+ break;
|
|
|
|
+ case 'dispatch':
|
|
|
|
+ setMandateSelectModalOpen(true);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ // 忽略
|
|
|
|
+ const onIgnoreModalOk = async (reason: any) => {
|
|
|
|
+ const result = await onIgnoreTaskConfirm(mandate_id, reason);
|
|
|
|
+ if (result) {
|
|
|
|
+ setIgnoreModalOpen(false);
|
|
|
|
+ refreshDetail();
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ const onAutoHandleModalOk = async (pw: any) => {
|
|
|
|
+ const result = await onAutoHandleTaskConfirm(pw, mandateDetail);
|
|
|
|
+ if (result) {
|
|
|
|
+ setAutoHandleModalOpen(false);
|
|
|
|
+ refreshDetail();
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ const onMandateSelected = (records: any) => {
|
|
|
|
+ // 打开派单Form弹窗将选中的任务进行派遣
|
|
|
|
+ if (records?.length === 0) {
|
|
|
|
+ message.warning('请先选择要派遣的任务');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ setSelectedTask(records);
|
|
|
|
+ setDispatchModalOpen(true);
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ const onDispatchModalOk = async (value: any) => {
|
|
|
|
+ const params = {
|
|
|
|
+ ...value,
|
|
|
|
+ m_id: Number(mandate_id),
|
|
|
|
+ mc_id: selectedTask.join(),
|
|
|
|
+ plan_end_time: dayjs(value.plan_end_time).format('YYYY-MM-DD HH:mm:ss'),
|
|
|
|
+ };
|
|
|
|
+ if (params.type === 5) {
|
|
|
|
+ if (params.mc_id.split(',').length > 1) {
|
|
|
|
+ message.warning('加药工单不可批量派遣');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ params.note = `${
|
|
|
|
+ mandateChild
|
|
|
|
+ .find((mandate) => mandate.Id === Number(params.mc_id))
|
|
|
|
+ ?.Title?.split(':')[1] + ',请及时加药'
|
|
|
|
+ }`;
|
|
|
|
+ } else {
|
|
|
|
+ params.note = mandateDetail?.Summary;
|
|
|
|
+ }
|
|
|
|
+ const result = await onDispatchTaskConfirm(params);
|
|
|
|
+ if (result) {
|
|
|
|
+ setDispatchModalOpen(false);
|
|
|
|
+ refreshDetail();
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
if (userList.length === 0) {
|
|
if (userList.length === 0) {
|
|
dispatch({
|
|
dispatch({
|
|
@@ -292,9 +672,9 @@ function TaskDetail(props: IPropsType) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
const res = await withdrawOrderRequest({
|
|
const res = await withdrawOrderRequest({
|
|
- record_id: clickedOrder.Id,
|
|
|
|
|
|
+ record_id: clickedOrder?.Id,
|
|
note: withdrawReason,
|
|
note: withdrawReason,
|
|
- type: clickedOrder.RecordType.value,
|
|
|
|
|
|
+ type: clickedOrder?.RecordType?.value,
|
|
});
|
|
});
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
message.success('关闭工单成功');
|
|
message.success('关闭工单成功');
|
|
@@ -380,46 +760,47 @@ function TaskDetail(props: IPropsType) {
|
|
</Row>
|
|
</Row>
|
|
)}
|
|
)}
|
|
|
|
|
|
- {mandateDetail?.Files.length > 0 && (
|
|
|
|
- <Row className={styles.infoRow}>
|
|
|
|
- <Col
|
|
|
|
- className={styles.fontS30}
|
|
|
|
- span={4}
|
|
|
|
- style={{ fontWeight: 600 }}
|
|
|
|
- >
|
|
|
|
- 截图
|
|
|
|
- </Col>
|
|
|
|
- <Col className={styles.fontS30}>
|
|
|
|
- <ReactZmage
|
|
|
|
- controller={{
|
|
|
|
- // 关闭按钮
|
|
|
|
- close: true,
|
|
|
|
- // 缩放按钮
|
|
|
|
- zoom: false,
|
|
|
|
- // 下载按钮
|
|
|
|
- download: false,
|
|
|
|
- // 翻页按钮
|
|
|
|
- flip: true,
|
|
|
|
- // 多页指示
|
|
|
|
- pagination: true,
|
|
|
|
- }}
|
|
|
|
- backdrop="rgba(255,255,255,0.5)"
|
|
|
|
- style={{ width: '3.5rem' }}
|
|
|
|
- src={mandateDetail?.Files[0].url}
|
|
|
|
- set={mandateDetail?.Files.map((item) => {
|
|
|
|
- if (item) {
|
|
|
|
- return {
|
|
|
|
- src: item.url,
|
|
|
|
- };
|
|
|
|
- }
|
|
|
|
- return {};
|
|
|
|
- })}
|
|
|
|
- />
|
|
|
|
- </Col>
|
|
|
|
- </Row>
|
|
|
|
- )}
|
|
|
|
|
|
+ {mandateDetail?.Files !== undefined &&
|
|
|
|
+ mandateDetail?.Files?.length > 0 && (
|
|
|
|
+ <Row className={styles.infoRow}>
|
|
|
|
+ <Col
|
|
|
|
+ className={styles.fontS30}
|
|
|
|
+ span={4}
|
|
|
|
+ style={{ fontWeight: 600 }}
|
|
|
|
+ >
|
|
|
|
+ 截图
|
|
|
|
+ </Col>
|
|
|
|
+ <Col className={styles.fontS30}>
|
|
|
|
+ <ReactZmage
|
|
|
|
+ controller={{
|
|
|
|
+ // 关闭按钮
|
|
|
|
+ close: true,
|
|
|
|
+ // 缩放按钮
|
|
|
|
+ zoom: false,
|
|
|
|
+ // 下载按钮
|
|
|
|
+ download: false,
|
|
|
|
+ // 翻页按钮
|
|
|
|
+ flip: true,
|
|
|
|
+ // 多页指示
|
|
|
|
+ pagination: true,
|
|
|
|
+ }}
|
|
|
|
+ backdrop="rgba(255,255,255,0.5)"
|
|
|
|
+ style={{ width: '3.5rem' }}
|
|
|
|
+ src={mandateDetail?.Files[0].url}
|
|
|
|
+ set={mandateDetail?.Files.map((item) => {
|
|
|
|
+ if (item) {
|
|
|
|
+ return {
|
|
|
|
+ src: item.url,
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ return {};
|
|
|
|
+ })}
|
|
|
|
+ />
|
|
|
|
+ </Col>
|
|
|
|
+ </Row>
|
|
|
|
+ )}
|
|
|
|
|
|
- <Row>
|
|
|
|
|
|
+ <Row className={styles.infoRow}>
|
|
<Col
|
|
<Col
|
|
className={styles.fontS30}
|
|
className={styles.fontS30}
|
|
span={4}
|
|
span={4}
|
|
@@ -438,6 +819,52 @@ function TaskDetail(props: IPropsType) {
|
|
/>
|
|
/>
|
|
</Col>
|
|
</Col>
|
|
</Row>
|
|
</Row>
|
|
|
|
+ <Row justify="end" gutter={10}>
|
|
|
|
+ <Col>
|
|
|
|
+ <Button
|
|
|
|
+ className={styles.footerBtn}
|
|
|
|
+ shape="round"
|
|
|
|
+ onClick={() => {
|
|
|
|
+ openSpecifiedModal('ignore');
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ 忽略
|
|
|
|
+ </Button>
|
|
|
|
+ </Col>
|
|
|
|
+ <Col>
|
|
|
|
+ <Button
|
|
|
|
+ className={styles.footerBtn}
|
|
|
|
+ shape="round"
|
|
|
|
+ onClick={() => {
|
|
|
|
+ openSpecifiedModal('manual');
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ 手动处理
|
|
|
|
+ </Button>
|
|
|
|
+ </Col>
|
|
|
|
+ <Col>
|
|
|
|
+ <Button
|
|
|
|
+ className={styles.footerBtn}
|
|
|
|
+ shape="round"
|
|
|
|
+ onClick={() => {
|
|
|
|
+ openSpecifiedModal('auto');
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ 自动处理
|
|
|
|
+ </Button>
|
|
|
|
+ </Col>
|
|
|
|
+ <Col>
|
|
|
|
+ <Button
|
|
|
|
+ className={styles.footerBtn}
|
|
|
|
+ shape="round"
|
|
|
|
+ onClick={() => {
|
|
|
|
+ openSpecifiedModal('dispatch');
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ 派单
|
|
|
|
+ </Button>
|
|
|
|
+ </Col>
|
|
|
|
+ </Row>
|
|
</div>
|
|
</div>
|
|
<div className={styles.relatedOrder}>
|
|
<div className={styles.relatedOrder}>
|
|
<Collapse
|
|
<Collapse
|
|
@@ -473,6 +900,34 @@ function TaskDetail(props: IPropsType) {
|
|
</Form.Item>
|
|
</Form.Item>
|
|
</Form>
|
|
</Form>
|
|
</Modal>
|
|
</Modal>
|
|
|
|
+ <ConfigProvider locale={zhCN}>
|
|
|
|
+ <IgnoreTaskModal
|
|
|
|
+ open={ignoreModalOpen}
|
|
|
|
+ onCancel={() => setIgnoreModalOpen(false)}
|
|
|
|
+ onOk={onIgnoreModalOk}
|
|
|
|
+ />
|
|
|
|
+ <AutoHandleModal
|
|
|
|
+ open={autoHandleModalOpen}
|
|
|
|
+ onCancel={() => setAutoHandleModalOpen(false)}
|
|
|
|
+ onOk={onAutoHandleModalOk}
|
|
|
|
+ />
|
|
|
|
+ <MandateSelectModal
|
|
|
|
+ open={mandateSelectModalOpen}
|
|
|
|
+ onCancel={() => setMandateSelectModalOpen(false)}
|
|
|
|
+ selectedTask={selectedTask}
|
|
|
|
+ setSelectedTask={setSelectedTask}
|
|
|
|
+ onOk={onMandateSelected}
|
|
|
|
+ list={mandateChild}
|
|
|
|
+ />
|
|
|
|
+ <DispatchTaskModal
|
|
|
|
+ open={dispatchModalOpen}
|
|
|
|
+ userList={userList}
|
|
|
|
+ onCancel={() => {
|
|
|
|
+ setDispatchModalOpen(false);
|
|
|
|
+ }}
|
|
|
|
+ onOK={onDispatchModalOk}
|
|
|
|
+ />
|
|
|
|
+ </ConfigProvider>
|
|
</PageContent>
|
|
</PageContent>
|
|
);
|
|
);
|
|
}
|
|
}
|