Commit 400a5a6e53c30d43c92e1f527a582a679645ffcc

Authored by zhangzzzz
1 parent 9254e87f

处理建议反馈列表功能;

src/components/Common/WorkOrderSystem/WorkOrderSystemAdd.js
@@ -21,6 +21,7 @@ import commonConfig from "@/utils/config"; @@ -21,6 +21,7 @@ import commonConfig from "@/utils/config";
21 import * as commonUtils from "@/utils/utils"; 21 import * as commonUtils from "@/utils/utils";
22 import moment from "moment"; 22 import moment from "moment";
23 import WorkOrderSystemService from "./WorkOrderSystemService"; 23 import WorkOrderSystemService from "./WorkOrderSystemService";
  24 +import WorkOrderSystemConfig from "./WorkOrderSystemConfig";
24 25
25 let _dispatch, _props; 26 let _dispatch, _props;
26 const reducer = (state, action) => { 27 const reducer = (state, action) => {
@@ -43,7 +44,7 @@ const reducer = (state, action) => { @@ -43,7 +44,7 @@ const reducer = (state, action) => {
43 const WorkOrderSystemAdd = props => { 44 const WorkOrderSystemAdd = props => {
44 const [state, dispatch] = useReducer(reducer, { 45 const [state, dispatch] = useReducer(reducer, {
45 sType: 4, 46 sType: 4,
46 - bBug: false, 47 + sBug: '0',
47 bVsersion: false 48 bVsersion: false
48 }); 49 });
49 const { customerData, moduleData, userData, loading = false } = state; 50 const { customerData, moduleData, userData, loading = false } = state;
@@ -53,24 +54,7 @@ const WorkOrderSystemAdd = props => { @@ -53,24 +54,7 @@ const WorkOrderSystemAdd = props => {
53 const [customerOption, setCustomerOption] = useState([]); // 【所属客户】下拉选项 54 const [customerOption, setCustomerOption] = useState([]); // 【所属客户】下拉选项
54 const [moduleOption, setModuleOption] = useState([]); // 【所属模块】下拉选项 55 const [moduleOption, setModuleOption] = useState([]); // 【所属模块】下拉选项
55 const [userOption, setUserOption] = useState([]); // 【处理人、抄送人】下拉选项 56 const [userOption, setUserOption] = useState([]); // 【处理人、抄送人】下拉选项
56 - const priorityOption = [  
57 - {  
58 - label: "严重",  
59 - value: 1  
60 - },  
61 - {  
62 - label: "紧急",  
63 - value: 2  
64 - },  
65 - {  
66 - label: "一般",  
67 - value: 3  
68 - },  
69 - {  
70 - label: "优化",  
71 - value: 4  
72 - }  
73 - ]; 57 + const { priorityOption, sBugOption } = WorkOrderSystemConfig; // 各种固定下拉选项
74 58
75 // 初始化加载数据 59 // 初始化加载数据
76 useEffect(() => { 60 useEffect(() => {
@@ -291,10 +275,13 @@ const WorkOrderSystemAdd = props => { @@ -291,10 +275,13 @@ const WorkOrderSystemAdd = props => {
291 </Form.Item> 275 </Form.Item>
292 <Form.Item 276 <Form.Item
293 className={styles.formItemBug} 277 className={styles.formItemBug}
294 - name="bBug"  
295 - valuePropName="checked" 278 + name="sBug"
  279 + label="是否bug"
296 > 280 >
297 - <Switch checkedChildren="bug" unCheckedChildren="需求" /> 281 + <Select
  282 + options={sBugOption}
  283 + optionFilterProp="label"
  284 + />
298 </Form.Item> 285 </Form.Item>
299 <Form.Item name="sType" label="优先级"> 286 <Form.Item name="sType" label="优先级">
300 <Select 287 <Select
src/components/Common/WorkOrderSystem/WorkOrderSystemConfig/index.js
@@ -20,6 +20,23 @@ const priorityOption = [ @@ -20,6 +20,23 @@ const priorityOption = [
20 } 20 }
21 ]; 21 ];
22 22
  23 +// 是否bug下拉数据
  24 +const sBugOption = [
  25 + // {
  26 + // label: "",
  27 + // value: ""
  28 + // },
  29 + {
  30 + label: "需求",
  31 + value: "0"
  32 + },
  33 + {
  34 + label: "BUG",
  35 + value: "1"
  36 + }
  37 +];
  38 +
23 export default { 39 export default {
24 - priorityOption 40 + priorityOption,
  41 + sBugOption
25 }; 42 };
src/components/Common/WorkOrderSystem/WorkOrderSystemDetail.js
1 /* eslint-disable */ 1 /* eslint-disable */
2 -import React, { useEffect, useState, useRef } from "react";  
3 -import {  
4 - Button,  
5 - Form,  
6 - Space,  
7 - Upload,  
8 - Select,  
9 - Switch,  
10 - message,  
11 - DatePicker,  
12 - Modal,  
13 - Spin,  
14 - Input,  
15 - Image  
16 -} from "antd-v4";  
17 -import {  
18 - CheckOutlined,  
19 - CloseCircleOutlined,  
20 - EditOutlined,  
21 - SendOutlined,  
22 - SaveOutlined,  
23 - MinusOutlined  
24 -} from "@ant-design/icons"; 2 +import { useEffect, useState, useRef } from "react";
  3 +import { Button, Form, Space, Upload, Select, Switch, message, DatePicker, Modal, Spin, Input, Image, InputNumber } from "antd-v4";
  4 +import { CheckOutlined, CloseCircleOutlined, EditOutlined, SendOutlined, SaveOutlined, MinusOutlined, ThunderboltOutlined } from "@ant-design/icons";
25 import BackIcon from "@/assets/back.svg"; 5 import BackIcon from "@/assets/back.svg";
26 import CopyAllIcon from "@/assets/copyallWhite.svg"; 6 import CopyAllIcon from "@/assets/copyallWhite.svg";
27 import moment from "moment"; 7 import moment from "moment";
@@ -39,12 +19,7 @@ import WorkOrderSystemConfig from &quot;./WorkOrderSystemConfig&quot;; @@ -39,12 +19,7 @@ import WorkOrderSystemConfig from &quot;./WorkOrderSystemConfig&quot;;
39 const WorkOrderSystemDetail = props => { 19 const WorkOrderSystemDetail = props => {
40 const [loading, setLoading] = useState(false); 20 const [loading, setLoading] = useState(false);
41 // 详情弹窗id 21 // 详情弹窗id
42 - const { current: detailModalId } = useRef(  
43 - "detailModalId_" +  
44 - Math.random()  
45 - .toString(36)  
46 - .substring(2)  
47 - ); 22 + const { current: detailModalId } = useRef("detailModalId_" + Math.random().toString(36).substring(2));
48 23
49 // 最小化状态 24 // 最小化状态
50 const [bMin, setBMin] = useState(false); 25 const [bMin, setBMin] = useState(false);
@@ -77,21 +52,22 @@ const WorkOrderSystemDetail = props =&gt; { @@ -77,21 +52,22 @@ const WorkOrderSystemDetail = props =&gt; {
77 sHanldeId, 52 sHanldeId,
78 sCopyHanldeId, 53 sCopyHanldeId,
79 bVsersion, 54 bVsersion,
80 - bBug, 55 + sBug,
81 sType, 56 sType,
82 tDevHandleDate, 57 tDevHandleDate,
83 tHandleDate, 58 tHandleDate,
84 - sStatus 59 + sStatus,
85 } = detailData; 60 } = detailData;
86 61
87 const [customerOption, setCustomerOption] = useState([]); // 【所属客户】下拉选项 62 const [customerOption, setCustomerOption] = useState([]); // 【所属客户】下拉选项
88 const [moduleOption, setModuleOption] = useState([]); // 【所属模块】下拉选项 63 const [moduleOption, setModuleOption] = useState([]); // 【所属模块】下拉选项
89 const [userOption, setUserOption] = useState([]); // 【处理人、抄送人】下拉选项 64 const [userOption, setUserOption] = useState([]); // 【处理人、抄送人】下拉选项
90 - const { priorityOption } = WorkOrderSystemConfig; // 【优先级】下拉选项 65 + const { priorityOption, sBugOption } = WorkOrderSystemConfig; // 各种固定下拉选项
91 const [replyModalVisible, setReplyModalVisible] = useState(false); // 回复弹窗状态 66 const [replyModalVisible, setReplyModalVisible] = useState(false); // 回复弹窗状态
92 const [assignmentModalVisible, setAssignmentModalVisible] = useState(false); // 指派弹窗状态 67 const [assignmentModalVisible, setAssignmentModalVisible] = useState(false); // 指派弹窗状态
93 const [resolutionModalVisible, setResolutionModalVisible] = useState(false); // 解决弹窗状态 68 const [resolutionModalVisible, setResolutionModalVisible] = useState(false); // 解决弹窗状态
94 const enabled = !["已关闭"].includes(sStatus); // 是否可操作 69 const enabled = !["已关闭"].includes(sStatus); // 是否可操作
  70 + const [bSoluted, setSolutedState] = useState(false); // 是否已解决状态
95 71
96 // 富文本看点击图片事件 72 // 富文本看点击图片事件
97 const [imageVisible, setImageVisible] = useState(false); 73 const [imageVisible, setImageVisible] = useState(false);
@@ -113,228 +89,235 @@ const WorkOrderSystemDetail = props =&gt; { @@ -113,228 +89,235 @@ const WorkOrderSystemDetail = props =&gt; {
113 }; 89 };
114 }, []); 90 }, []);
115 91
  92 + // 判断是否已解决
  93 + useEffect(() => {
  94 + let result = ["已解决"].includes(sStatus);
  95 + if (!result) {
  96 + // 如果状态不是已解决,查看历史记录中最后一个非已指派的是否是已解决
  97 + replyData.forEach(item => {
  98 + const { sResult } = item;
  99 + if (sResult === "已解决") {
  100 + result = true;
  101 + } else if (sResult === "已激活") {
  102 + result = false;
  103 + }
  104 + });
  105 + }
  106 + setSolutedState(result);
  107 + }, [detailData]);
  108 +
116 // 显示的按钮 109 // 显示的按钮
117 const [btnShowData, setBtnShowData] = useState([]); 110 const [btnShowData, setBtnShowData] = useState([]);
118 // 过滤掉没有权限的按钮 111 // 过滤掉没有权限的按钮
119 - useEffect(  
120 - () => {  
121 - if (!enabled) {  
122 - setBtnShowData([]);  
123 - return;  
124 - }  
125 - const defaultBtnData = [  
126 - "BtnReplyd",  
127 - "BtnEdit",  
128 - "BtnAssign",  
129 - "BtnSolve",  
130 - "BtnClose"  
131 - ];  
132 - if (gdsjurisdiction) {  
133 - gdsjurisdiction.forEach(child => {  
134 - const index = defaultBtnData.findIndex(  
135 - item => item === child.sAction  
136 - );  
137 - if (index > -1) {  
138 - defaultBtnData.splice(index, 1);  
139 - }  
140 - });  
141 - }  
142 - setBtnShowData(defaultBtnData);  
143 - },  
144 - [gdsjurisdiction, enabled]  
145 - ); 112 + useEffect(() => {
  113 + let defaultBtnData = ["BtnReplyd", "BtnEdit", "BtnAssign", "BtnSolve", "BtnClose"];
  114 + if (!enabled) {
  115 + setBtnShowData([]);
  116 + return;
  117 + } else if (bSoluted) {
  118 + defaultBtnData = ["BtnAssign", "BtnActive", "BtnClose"];
  119 + }
  120 + // if (gdsjurisdiction) {
  121 + // gdsjurisdiction.forEach(child => {
  122 + // const index = defaultBtnData.findIndex(item => item === child.sAction);
  123 + // if (index > -1) {
  124 + // defaultBtnData.splice(index, 1);
  125 + // }
  126 + // });
  127 + // }
  128 + setBtnShowData(defaultBtnData);
  129 + }, [gdsjurisdiction, enabled, bSoluted]);
146 130
147 // 指派/解决 131 // 指派/解决
148 const addReplyHanle = async values => { 132 const addReplyHanle = async values => {
  133 + if (values.sContentMemo === "<p></p>") {
  134 + delete values.sContentMemo;
  135 + }
149 const response = await WorkOrderSystemService.addReplyHanle({ 136 const response = await WorkOrderSystemService.addReplyHanle({
150 ...values, 137 ...values,
151 sId, 138 sId,
152 - sMakePerson 139 + sMakePerson,
153 }); 140 });
154 setLoading(false); 141 setLoading(false);
155 if (commonUtils.isNotEmptyObject(response)) { 142 if (commonUtils.isNotEmptyObject(response)) {
156 refreshSlaveTable(); 143 refreshSlaveTable();
157 - props.onSaveState({  
158 - workOrderSystemDetailModalVisible: false  
159 - }); 144 + if (["已激活"].includes(values.sResult)) {
  145 + refresh();
  146 + } else {
  147 + props.onSaveState({
  148 + workOrderSystemDetailModalVisible: false,
  149 + });
  150 + }
160 } 151 }
161 }; 152 };
162 153
163 // 初始化加载数据 154 // 初始化加载数据
164 - useEffect(  
165 - async () => { 155 + useEffect(() => {
  156 + const handleDetailData = async () => {
166 setDetailData(await WorkOrderSystemService.getDetailData({ sId })); 157 setDetailData(await WorkOrderSystemService.getDetailData({ sId }));
167 setCustomerOption( 158 setCustomerOption(
168 (await WorkOrderSystemService.getsCustomerData()).map(item => ({ 159 (await WorkOrderSystemService.getsCustomerData()).map(item => ({
169 label: item.sCustomerName, 160 label: item.sCustomerName,
170 value: item.sCustomerId || item.sId, 161 value: item.sCustomerId || item.sId,
171 - item 162 + item,
172 })) 163 }))
173 ); 164 );
174 setModuleOption( 165 setModuleOption(
175 (await WorkOrderSystemService.getsModuleData()).map(item => ({ 166 (await WorkOrderSystemService.getsModuleData()).map(item => ({
176 label: item.sModuleName, 167 label: item.sModuleName,
177 value: item.sModuleId, 168 value: item.sModuleId,
178 - item 169 + item,
179 })) 170 }))
180 ); 171 );
181 setUserOption( 172 setUserOption(
182 (await WorkOrderSystemService.getUserData()).map(item => ({ 173 (await WorkOrderSystemService.getUserData()).map(item => ({
183 label: item.sHanldeName, 174 label: item.sHanldeName,
184 value: item.sHanldeId, 175 value: item.sHanldeId,
185 - item 176 + item,
186 })) 177 }))
187 ); 178 );
188 - },  
189 - [refresher]  
190 - ); 179 + };
191 180
192 - // detailData变化时,给表单赋值  
193 - useEffect(  
194 - () => {  
195 - if (  
196 - commonUtils.isNotEmptyArr(detailData) &&  
197 - commonUtils.isNotEmptyArr(customerOption) &&  
198 - commonUtils.isNotEmptyArr(moduleOption)  
199 - ) {  
200 - const temp = {};  
201 - replyData.forEach((item, index) => {  
202 - const {  
203 - tCreateDate,  
204 - sMakePerson: sMakePersonTemp,  
205 - sResult,  
206 - sContentMemo: sContentMemoTemp,  
207 - sAssignedBy  
208 - } = item;  
209 - temp[`reply${index}`] = (  
210 - <span>  
211 - {index + 1}.{tCreateDate} <span>由</span>{" "}  
212 - <strong>{sMakePersonTemp}</strong> {sResult.replace("已", "")}  
213 - {sAssignedBy ? (  
214 - <>  
215 - <span>给 </span>  
216 - <strong>{sAssignedBy}</strong>  
217 - </>  
218 - ) : (  
219 - ""  
220 - )}  
221 - </span>  
222 - );  
223 - if (sContentMemoTemp) {  
224 - temp[`replyContentMemo${index}`] = BraftEditor.createEditorState(  
225 - sContentMemoTemp  
226 - );  
227 - }  
228 - }); 181 + handleDetailData();
  182 + }, [refresher]);
229 183
230 - const addState = {};  
231 - if (sCustomerId) {  
232 - if (customerOption.find(item => item.value === sCustomerId)) {  
233 - addState.sCustomerId = sCustomerId;  
234 - } else {  
235 - setCustomerOption(prevState => [  
236 - ...prevState,  
237 - {  
238 - value: sCustomerId,  
239 - label: sCustomerName,  
240 - item: {  
241 - sCustomerId,  
242 - sCustomerName  
243 - } 184 + // detailData变化时,给表单赋值
  185 + useEffect(() => {
  186 + if (commonUtils.isNotEmptyArr(detailData) && commonUtils.isNotEmptyArr(customerOption) && commonUtils.isNotEmptyArr(moduleOption)) {
  187 + const temp = {};
  188 + replyData.forEach((item, index) => {
  189 + const { tCreateDate, sMakePerson: sMakePersonTemp, sResult, sContentMemo: sContentMemoTemp, sAssignedBy } = item;
  190 + temp[`reply${index}`] = (
  191 + <span>
  192 + {index + 1}.{tCreateDate} <span>由</span> <strong>{sMakePersonTemp}</strong> {sResult.replace("已", "")}
  193 + {[""].map(() => {
  194 + if (!sAssignedBy) {
  195 + return "";
  196 + } else if (sAssignedBy && sResult.includes("解决") && sMakePersonTemp === sAssignedBy) {
  197 + return "";
  198 + } else if (sAssignedBy && sResult.includes("解决")) {
  199 + return (
  200 + <>
  201 + <span>并指派给 </span>
  202 + <strong>{sAssignedBy}</strong>
  203 + </>
  204 + );
  205 + } else {
  206 + return (
  207 + <>
  208 + <span>给 </span>
  209 + <strong>{sAssignedBy}</strong>
  210 + </>
  211 + );
244 } 212 }
245 - ]);  
246 - } 213 + })}
  214 + </span>
  215 + );
  216 + if (sContentMemoTemp) {
  217 + temp[`replyContentMemo${index}`] = BraftEditor.createEditorState(sContentMemoTemp);
247 } 218 }
  219 + });
248 220
249 - if (sModuleId) {  
250 - if (moduleOption.find(item => item.value === sModuleId)) {  
251 - addState.sModuleId = sModuleId;  
252 - } else {  
253 - setModuleOption(prevState => [  
254 - ...prevState,  
255 - {  
256 - value: sModuleId,  
257 - label: sModuleName,  
258 - item: {  
259 - sModuleId,  
260 - sModuleName  
261 - }  
262 - }  
263 - ]);  
264 - } 221 + const addState = {};
  222 + if (sCustomerId) {
  223 + if (customerOption.find(item => item.value === sCustomerId)) {
  224 + addState.sCustomerId = sCustomerId;
  225 + } else {
  226 + setCustomerOption(prevState => [
  227 + ...prevState,
  228 + {
  229 + value: sCustomerId,
  230 + label: sCustomerName,
  231 + item: {
  232 + sCustomerId,
  233 + sCustomerName,
  234 + },
  235 + },
  236 + ]);
265 } 237 }
  238 + }
266 239
267 - form.setFieldsValue({  
268 - sTitle,  
269 - sContentMemo: BraftEditor.createEditorState(sContentMemo),  
270 - ...addState,  
271 - sHanldeId,  
272 - sCopyHanldeId: sCopyHanldeId ? sCopyHanldeId.split(",") : [],  
273 - bVsersion,  
274 - bBug,  
275 - sType: sType !== undefined ? parseInt(sType) : "",  
276 - tDevHandleDate: tDevHandleDate ? moment(tDevHandleDate) : "",  
277 - tHandleDate: tHandleDate ? moment(tHandleDate) : "",  
278 - ...temp  
279 - });  
280 - forceUpdate(); 240 + if (sModuleId) {
  241 + if (moduleOption.find(item => item.value === sModuleId)) {
  242 + addState.sModuleId = sModuleId;
  243 + } else {
  244 + setModuleOption(prevState => [
  245 + ...prevState,
  246 + {
  247 + value: sModuleId,
  248 + label: sModuleName,
  249 + item: {
  250 + sModuleId,
  251 + sModuleName,
  252 + },
  253 + },
  254 + ]);
  255 + }
281 } 256 }
282 - },  
283 - [detailData, customerOption, moduleOption]  
284 - ); 257 +
  258 + form.setFieldsValue({
  259 + sTitle,
  260 + sContentMemo: BraftEditor.createEditorState(sContentMemo),
  261 + ...addState,
  262 + sHanldeId,
  263 + sCopyHanldeId: sCopyHanldeId ? sCopyHanldeId.split(",") : [],
  264 + bVsersion,
  265 + sBug,
  266 + sType: sType !== undefined ? parseInt(sType) : "",
  267 + tDevHandleDate: tDevHandleDate ? moment(tDevHandleDate) : "",
  268 + tHandleDate: tHandleDate ? moment(tHandleDate) : "",
  269 + ...temp,
  270 + });
  271 + forceUpdate();
  272 + }
  273 + }, [detailData, customerOption, moduleOption]);
285 274
286 const [fileList, setFileList] = useState([]); // 附件列表 275 const [fileList, setFileList] = useState([]); // 附件列表
287 const [fileAdd, setFileAdd] = useState([]); // 新增附件 276 const [fileAdd, setFileAdd] = useState([]); // 新增附件
288 277
289 // fileData变化时,给附件列表赋值 278 // fileData变化时,给附件列表赋值
290 - useEffect(  
291 - () => {  
292 - setFileList(  
293 - [...fileData].map(item => { 279 + useEffect(() => {
  280 + setFileList(
  281 + [...fileData].map(item => {
  282 + const { sId: uid, sPictureName: name, sPicturePath } = item;
  283 + return {
  284 + uid,
  285 + name,
  286 + url: `${commonConfig.feedback_host}file/download?savePathStr=${sPicturePath}&sModelsId=100`,
  287 + status: "done",
  288 + item,
  289 + };
  290 + })
  291 + );
  292 + }, [fileData]);
  293 +
  294 + // fileAdd变化时,调用新增附件接口
  295 + useEffect(() => {
  296 + if (!fileAdd.length) return;
  297 +
  298 + const handleFileAdd = async () => {
  299 + setFileAdd([]);
  300 + const _fileData = await WorkOrderSystemService.uploadAdd(fileAdd, {
  301 + sId,
  302 + sMakePerson,
  303 + });
  304 + setFileList([
  305 + ...fileList,
  306 + ..._fileData.map(item => {
294 const { sId: uid, sPictureName: name, sPicturePath } = item; 307 const { sId: uid, sPictureName: name, sPicturePath } = item;
295 return { 308 return {
296 uid, 309 uid,
297 name, 310 name,
298 - url: `${  
299 - commonConfig.feedback_host  
300 - }file/download?savePathStr=${sPicturePath}&sModelsId=100`, 311 + url: `${commonConfig.feedback_host}file/download?savePathStr=${sPicturePath}&sModelsId=100`,
301 status: "done", 312 status: "done",
302 - item 313 + item,
303 }; 314 };
304 - })  
305 - );  
306 - },  
307 - [fileData]  
308 - ); 315 + }),
  316 + ]);
  317 + };
309 318
310 - // fileAdd变化时,调用新增附件接口  
311 - useEffect(  
312 - async () => {  
313 - if (fileAdd.length) {  
314 - setFileAdd([]);  
315 - const _fileData = await WorkOrderSystemService.uploadAdd(fileAdd, {  
316 - sId,  
317 - sMakePerson  
318 - });  
319 - setFileList([  
320 - ...fileList,  
321 - ..._fileData.map(item => {  
322 - const { sId: uid, sPictureName: name, sPicturePath } = item;  
323 - return {  
324 - uid,  
325 - name,  
326 - url: `${  
327 - commonConfig.feedback_host  
328 - }file/download?savePathStr=${sPicturePath}&sModelsId=100`,  
329 - status: "done",  
330 - item  
331 - };  
332 - })  
333 - ]);  
334 - }  
335 - },  
336 - [fileAdd]  
337 - ); 319 + handleFileAdd();
  320 + }, [fileAdd]);
338 321
339 // 附件props 322 // 附件props
340 const uploadProps = { 323 const uploadProps = {
@@ -354,9 +337,9 @@ const WorkOrderSystemDetail = props =&gt; { @@ -354,9 +337,9 @@ const WorkOrderSystemDetail = props =&gt; {
354 setFileList(fileList.filter(item => item.uid !== file.uid)); 337 setFileList(fileList.filter(item => item.uid !== file.uid));
355 message.success("附件删除成功"); 338 message.success("附件删除成功");
356 }); 339 });
357 - } 340 + },
358 }); 341 });
359 - } 342 + },
360 }; 343 };
361 344
362 // 回复props 345 // 回复props
@@ -368,7 +351,7 @@ const WorkOrderSystemDetail = props =&gt; { @@ -368,7 +351,7 @@ const WorkOrderSystemDetail = props =&gt; {
368 setReplyModalVisible, 351 setReplyModalVisible,
369 refresh, 352 refresh,
370 bMin, 353 bMin,
371 - setBMin 354 + setBMin,
372 }; 355 };
373 356
374 // 指派props 357 // 指派props
@@ -383,14 +366,10 @@ const WorkOrderSystemDetail = props =&gt; { @@ -383,14 +366,10 @@ const WorkOrderSystemDetail = props =&gt; {
383 onFinish: values => { 366 onFinish: values => {
384 setLoading(true); 367 setLoading(true);
385 setAssignmentModalVisible(false); 368 setAssignmentModalVisible(false);
386 - const { value, label } = userOption.find(  
387 - item => item.value === values.sHanldeId  
388 - ); 369 + const { value, label } = userOption.find(item => item.value === values.sHanldeId);
389 370
390 const copyDataAdd = {}; 371 const copyDataAdd = {};
391 - const copyData = userOption.filter(item =>  
392 - values.sCopyHanldeId.includes(item.value)  
393 - ); 372 + const copyData = userOption.filter(item => values.sCopyHanldeId.includes(item.value));
394 373
395 if (commonUtils.isNotEmptyArr(copyData)) { 374 if (commonUtils.isNotEmptyArr(copyData)) {
396 copyDataAdd.sCopyFor = copyData.map(item => item.label).toString(); 375 copyDataAdd.sCopyFor = copyData.map(item => item.label).toString();
@@ -401,12 +380,10 @@ const WorkOrderSystemDetail = props =&gt; { @@ -401,12 +380,10 @@ const WorkOrderSystemDetail = props =&gt; {
401 sAssignedBy: label, 380 sAssignedBy: label,
402 sAssignedById: value, 381 sAssignedById: value,
403 ...copyDataAdd, 382 ...copyDataAdd,
404 - sContentMemo: values.sContentMemo  
405 - ? values.sContentMemo.toHTML()  
406 - : "<p></p>",  
407 - sResult: "已指派" 383 + sContentMemo: values.sContentMemo ? values.sContentMemo.toHTML() : "<p></p>",
  384 + sResult: "已指派",
408 }); 385 });
409 - } 386 + },
410 }; 387 };
411 388
412 // 解决props 389 // 解决props
@@ -420,38 +397,41 @@ const WorkOrderSystemDetail = props =&gt; { @@ -420,38 +397,41 @@ const WorkOrderSystemDetail = props =&gt; {
420 bMin, 397 bMin,
421 setBMin, 398 setBMin,
422 onFinish: values => { 399 onFinish: values => {
  400 + setLoading(true);
423 setResolutionModalVisible(false); 401 setResolutionModalVisible(false);
  402 + const { value, label } = userOption.find(item => item.value === values.sHanldeId);
  403 +
  404 + const copyDataAdd = {};
  405 + const copyData = userOption.filter(item => values.sCopyHanldeId.includes(item.value));
  406 +
  407 + if (commonUtils.isNotEmptyArr(copyData)) {
  408 + copyDataAdd.sCopyFor = copyData.map(item => item.label).toString();
  409 + copyDataAdd.sCopyForId = copyData.map(item => item.value).toString();
  410 + }
  411 +
424 addReplyHanle({ 412 addReplyHanle({
425 - sContentMemo: values.sContentMemo  
426 - ? values.sContentMemo.toHTML()  
427 - : "<p></p>",  
428 - sResult: "已解决" 413 + sAssignedBy: label,
  414 + sAssignedById: value,
  415 + dSolveHourSj: values.dSolveHourSj,
  416 + ...copyDataAdd,
  417 + sContentMemo: values.sContentMemo ? values.sContentMemo.toHTML() : "<p></p>",
  418 + sResult: "已解决",
429 }); 419 });
430 - } 420 + },
431 }; 421 };
432 422
433 // 图片弹窗props 423 // 图片弹窗props
434 const imageModalProps = { 424 const imageModalProps = {
435 imageSrc, 425 imageSrc,
436 imageVisible, 426 imageVisible,
437 - setImageVisible 427 + setImageVisible,
438 }; 428 };
439 429
440 // 修改后保存 430 // 修改后保存
441 const onFinish = async values => { 431 const onFinish = async values => {
442 setLoading(true); 432 setLoading(true);
443 - const {  
444 - sContentMemo,  
445 - sCustomerId,  
446 - sModuleId,  
447 - sHanldeId,  
448 - sCopyHanldeId,  
449 - bVsersion,  
450 - bBug,  
451 - sType,  
452 - tDevHandleDate,  
453 - tHandleDate  
454 - } = values; 433 + const { sContentMemo, sCustomerId, sModuleId, sHanldeId, sCopyHanldeId, bVsersion, sBug, sType, tDevHandleDate, tHandleDate, dSolveHour } =
  434 + values;
455 435
456 const response = await WorkOrderSystemService.detailUpdate({ 436 const response = await WorkOrderSystemService.detailUpdate({
457 sId, 437 sId,
@@ -467,18 +447,21 @@ const WorkOrderSystemDetail = props =&gt; { @@ -467,18 +447,21 @@ const WorkOrderSystemDetail = props =&gt; {
467 .map(item => item.label) 447 .map(item => item.label)
468 .toString(), 448 .toString(),
469 bVsersion, 449 bVsersion,
470 - bBug, 450 + sBug,
471 sType, 451 sType,
472 - tDevHandleDate: tDevHandleDate  
473 - ? moment(tDevHandleDate).format("YYYY-MM-DD")  
474 - : undefined,  
475 - tHandleDate: tDevHandleDate  
476 - ? moment(tHandleDate).format("YYYY-MM-DD")  
477 - : undefined,  
478 - sStatus: "已修改" 452 + tDevHandleDate: tDevHandleDate ? moment(tDevHandleDate).format("YYYY-MM-DD") : undefined,
  453 + tHandleDate: tDevHandleDate ? moment(tHandleDate).format("YYYY-MM-DD") : undefined,
  454 + dSolveHour,
  455 + sStatus: "已修改",
479 }); 456 });
480 457
481 setLoading(false); 458 setLoading(false);
  459 +
  460 + if (values.callback) {
  461 + values.callback();
  462 + return;
  463 + }
  464 +
482 if (commonUtils.isNotEmptyObject(response)) { 465 if (commonUtils.isNotEmptyObject(response)) {
483 setFormEnabled(false); 466 setFormEnabled(false);
484 refresh(); 467 refresh();
@@ -492,20 +475,20 @@ const WorkOrderSystemDetail = props =&gt; { @@ -492,20 +475,20 @@ const WorkOrderSystemDetail = props =&gt; {
492 form={form} 475 form={form}
493 onFinish={onFinish} 476 onFinish={onFinish}
494 labelCol={{ 477 labelCol={{
495 - span: 3 478 + span: 3,
496 }} 479 }}
497 wrapperCol={{ 480 wrapperCol={{
498 - span: 21 481 + span: 21,
499 }} 482 }}
500 className={`${styles.workOrderSystemDetail} ${detailModalId}`} 483 className={`${styles.workOrderSystemDetail} ${detailModalId}`}
501 > 484 >
502 <Form.Item 485 <Form.Item
503 name="sTitle" 486 name="sTitle"
504 labelCol={{ 487 labelCol={{
505 - span: 0 488 + span: 0,
506 }} 489 }}
507 wrapperCol={{ 490 wrapperCol={{
508 - span: 24 491 + span: 24,
509 }} 492 }}
510 > 493 >
511 <Input.TextArea 494 <Input.TextArea
@@ -516,32 +499,23 @@ const WorkOrderSystemDetail = props =&gt; { @@ -516,32 +499,23 @@ const WorkOrderSystemDetail = props =&gt; {
516 fontSize: 16, 499 fontSize: 16,
517 fontWeight: "bold", 500 fontWeight: "bold",
518 resize: "none", 501 resize: "none",
519 - color: "#000" 502 + color: "#000",
520 }} 503 }}
521 /> 504 />
522 </Form.Item> 505 </Form.Item>
523 <Form.Item 506 <Form.Item
524 name="sContentMemo" 507 name="sContentMemo"
525 labelCol={{ 508 labelCol={{
526 - span: 0 509 + span: 0,
527 }} 510 }}
528 wrapperCol={{ 511 wrapperCol={{
529 - span: 24 512 + span: 24,
530 }} 513 }}
531 > 514 >
532 - <BraftEditor  
533 - className={styles.braftEditorReadOnly}  
534 - readOnly={true}  
535 - controls={[]}  
536 - /> 515 + <BraftEditor className={styles.braftEditorReadOnly} readOnly={true} controls={[]} />
537 </Form.Item> 516 </Form.Item>
538 517
539 - <Form.Item  
540 - className={styles.formItemHalf}  
541 - name="sCustomerId"  
542 - label="所属客户"  
543 - rules={[{ required: formEnabled }]}  
544 - > 518 + <Form.Item className={styles.formItemHalf} name="sCustomerId" label="所属客户" rules={[{ required: formEnabled }]}>
545 <Select 519 <Select
546 allowClear 520 allowClear
547 showSearch={true} 521 showSearch={true}
@@ -551,12 +525,7 @@ const WorkOrderSystemDetail = props =&gt; { @@ -551,12 +525,7 @@ const WorkOrderSystemDetail = props =&gt; {
551 disabled={!formEnabled} 525 disabled={!formEnabled}
552 /> 526 />
553 </Form.Item> 527 </Form.Item>
554 - <Form.Item  
555 - className={styles.formItemHalf}  
556 - name="sModuleId"  
557 - label="所属模块"  
558 - rules={[{ required: formEnabled }]}  
559 - > 528 + <Form.Item className={styles.formItemHalf} name="sModuleId" label="所属模块" rules={[{ required: formEnabled }]}>
560 <Select 529 <Select
561 mode={formEnabled ? "tags" : ""} 530 mode={formEnabled ? "tags" : ""}
562 showSearch={true} 531 showSearch={true}
@@ -571,26 +540,10 @@ const WorkOrderSystemDetail = props =&gt; { @@ -571,26 +540,10 @@ const WorkOrderSystemDetail = props =&gt; {
571 }} 540 }}
572 /> 541 />
573 </Form.Item> 542 </Form.Item>
574 - <Form.Item  
575 - className={styles.formItemHalf}  
576 - name="sHanldeId"  
577 - label="处理人"  
578 - rules={[{ required: formEnabled }]}  
579 - >  
580 - <Select  
581 - allowClear  
582 - showSearch={true}  
583 - options={userOption}  
584 - optionFilterProp="label"  
585 - placeholder="请选择处理人"  
586 - disabled={!formEnabled}  
587 - /> 543 + <Form.Item className={styles.formItemHalf} name="sHanldeId" label="处理人" rules={[{ required: formEnabled }]}>
  544 + <Select allowClear showSearch={true} options={userOption} optionFilterProp="label" placeholder="请选择处理人" disabled={!formEnabled} />
588 </Form.Item> 545 </Form.Item>
589 - <Form.Item  
590 - className={styles.formItemHalf}  
591 - name="sCopyHanldeId"  
592 - label="抄送人"  
593 - > 546 + <Form.Item className={styles.formItemHalf} name="sCopyHanldeId" label="抄送人">
594 <Select 547 <Select
595 allowClear 548 allowClear
596 showSearch={true} 549 showSearch={true}
@@ -601,34 +554,13 @@ const WorkOrderSystemDetail = props =&gt; { @@ -601,34 +554,13 @@ const WorkOrderSystemDetail = props =&gt; {
601 disabled={!formEnabled} 554 disabled={!formEnabled}
602 /> 555 />
603 </Form.Item> 556 </Form.Item>
604 - <Form.Item  
605 - className={styles.formItemAQuarter}  
606 - name="bVsersion"  
607 - label="标版同样问题"  
608 - valuePropName="checked"  
609 - >  
610 - <Switch  
611 - checkedChildren="是"  
612 - unCheckedChildren="否"  
613 - disabled={!formEnabled}  
614 - /> 557 + <Form.Item className={styles.formItemAQuarter} name="bVsersion" label="标版同样问题" valuePropName="checked">
  558 + <Switch checkedChildren="是" unCheckedChildren="否" disabled={!formEnabled} />
615 </Form.Item> 559 </Form.Item>
616 - <Form.Item  
617 - className={styles.formItemBug}  
618 - name="bBug"  
619 - valuePropName="checked"  
620 - >  
621 - <Switch  
622 - checkedChildren="bug"  
623 - unCheckedChildren="需求"  
624 - disabled={!formEnabled}  
625 - /> 560 + <Form.Item className={styles.formItemBug} name="sBug" label="是否bug">
  561 + <Select options={sBugOption} optionFilterProp="label" disabled={!formEnabled} />
626 </Form.Item> 562 </Form.Item>
627 - <Form.Item  
628 - className={styles.formItemAQuarter}  
629 - name="sType"  
630 - label="优先级"  
631 - > 563 + <Form.Item className={styles.formItemAQuarter} name="sType" label="优先级">
632 <Select 564 <Select
633 className={styles.sTypeSelect} 565 className={styles.sTypeSelect}
634 popupClassName={styles.sTypedDropdown} 566 popupClassName={styles.sTypedDropdown}
@@ -645,25 +577,16 @@ const WorkOrderSystemDetail = props =&gt; { @@ -645,25 +577,16 @@ const WorkOrderSystemDetail = props =&gt; {
645 { 577 {
646 validator: (_, chooseDate) => { 578 validator: (_, chooseDate) => {
647 const tHandleDate = form.getFieldValue().tHandleDate; 579 const tHandleDate = form.getFieldValue().tHandleDate;
648 - if (  
649 - chooseDate &&  
650 - tHandleDate &&  
651 - chooseDate.isAfter(tHandleDate)  
652 - ) {  
653 - return Promise.reject(  
654 - new Error("【开发截止日期】不能晚于【截止日期】")  
655 - ); 580 + if (chooseDate && tHandleDate && chooseDate.isAfter(tHandleDate)) {
  581 + return Promise.reject(new Error("【开发截止日期】不能晚于【截止日期】"));
656 } else { 582 } else {
657 return Promise.resolve(); 583 return Promise.resolve();
658 } 584 }
659 - }  
660 - } 585 + },
  586 + },
661 ]} 587 ]}
662 > 588 >
663 - <DatePicker  
664 - placeholder={formEnabled ? "请选择开发截止日期" : ""}  
665 - disabled={!formEnabled}  
666 - /> 589 + <DatePicker placeholder={formEnabled ? "请选择开发截止日期" : ""} disabled={!formEnabled} />
667 </Form.Item> 590 </Form.Item>
668 <Form.Item 591 <Form.Item
669 className={styles.formItemAQuarter1} 592 className={styles.formItemAQuarter1}
@@ -673,25 +596,16 @@ const WorkOrderSystemDetail = props =&gt; { @@ -673,25 +596,16 @@ const WorkOrderSystemDetail = props =&gt; {
673 { 596 {
674 validator: (_, chooseDate) => { 597 validator: (_, chooseDate) => {
675 const tDevHandleDate = form.getFieldValue().tDevHandleDate; 598 const tDevHandleDate = form.getFieldValue().tDevHandleDate;
676 - if (  
677 - chooseDate &&  
678 - tDevHandleDate &&  
679 - chooseDate.isBefore(tDevHandleDate)  
680 - ) {  
681 - return Promise.reject(  
682 - new Error("【截止日期】不能早于【开发截止日期】")  
683 - ); 599 + if (chooseDate && tDevHandleDate && chooseDate.isBefore(tDevHandleDate)) {
  600 + return Promise.reject(new Error("【截止日期】不能早于【开发截止日期】"));
684 } else { 601 } else {
685 return Promise.resolve(); 602 return Promise.resolve();
686 } 603 }
687 - }  
688 - } 604 + },
  605 + },
689 ]} 606 ]}
690 > 607 >
691 - <DatePicker  
692 - placeholder={formEnabled ? "请选择截止日期" : ""}  
693 - disabled={!formEnabled}  
694 - /> 608 + <DatePicker placeholder={formEnabled ? "请选择截止日期" : ""} disabled={!formEnabled} />
695 </Form.Item> 609 </Form.Item>
696 <div className={styles.replyDiv}> 610 <div className={styles.replyDiv}>
697 <div className={styles.replyTitle}>历史记录</div> 611 <div className={styles.replyTitle}>历史记录</div>
@@ -708,11 +622,7 @@ const WorkOrderSystemDetail = props =&gt; { @@ -708,11 +622,7 @@ const WorkOrderSystemDetail = props =&gt; {
708 </Form.Item> 622 </Form.Item>
709 {sContentMemoTemp ? ( 623 {sContentMemoTemp ? (
710 <Form.Item name={itemName1}> 624 <Form.Item name={itemName1}>
711 - <BraftEditor  
712 - className={styles.detailBraftEditorReply}  
713 - readOnly={true}  
714 - controls={[]}  
715 - /> 625 + <BraftEditor className={styles.detailBraftEditorReply} readOnly={true} controls={[]} />
716 </Form.Item> 626 </Form.Item>
717 ) : ( 627 ) : (
718 "" 628 ""
@@ -723,9 +633,7 @@ const WorkOrderSystemDetail = props =&gt; { @@ -723,9 +633,7 @@ const WorkOrderSystemDetail = props =&gt; {
723 })} 633 })}
724 </div> 634 </div>
725 <Form.Item name="fileData" label="附件" className={styles.annex}> 635 <Form.Item name="fileData" label="附件" className={styles.annex}>
726 - <Upload {...uploadProps}>  
727 - {btnShowData.includes("BtnEdit") && <a>添加附件</a>}  
728 - </Upload> 636 + <Upload {...uploadProps}>{btnShowData.includes("BtnEdit") && <a>添加附件</a>}</Upload>
729 </Form.Item> 637 </Form.Item>
730 <Form.Item /> 638 <Form.Item />
731 639
@@ -739,41 +647,39 @@ const WorkOrderSystemDetail = props =&gt; { @@ -739,41 +647,39 @@ const WorkOrderSystemDetail = props =&gt; {
739 style={{ background: "#838A9D", borderColor: "#838A9D" }} 647 style={{ background: "#838A9D", borderColor: "#838A9D" }}
740 onClick={() => { 648 onClick={() => {
741 props.onSaveState({ 649 props.onSaveState({
742 - workOrderSystemDetailModalVisible: false 650 + workOrderSystemDetailModalVisible: false,
743 }); 651 });
744 }} 652 }}
745 > 653 >
746 返回 654 返回
747 </Button> 655 </Button>
748 )} 656 )}
749 - {!formEnabled &&  
750 - btnShowData.includes("BtnReplyd") && (  
751 - <Button  
752 - type="primary"  
753 - icon={<img src={CopyAllIcon} />}  
754 - className={styles.iconBtn}  
755 - style={{ background: "#ff822d", borderColor: "#ff822d" }}  
756 - onClick={() => {  
757 - setReplyModalVisible(true);  
758 - }}  
759 - >  
760 - 回复  
761 - </Button>  
762 - )}  
763 - {!formEnabled &&  
764 - btnShowData.includes("BtnEdit") && (  
765 - <Button  
766 - type="primary"  
767 - icon={<EditOutlined />}  
768 - className={styles.iconBtn}  
769 - onClick={() => {  
770 - setFormEnabled(true);  
771 - document.querySelector(`.${detailModalId}`).scrollTop = 0;  
772 - }}  
773 - >  
774 - 修改  
775 - </Button>  
776 - )} 657 + {!formEnabled && btnShowData.includes("BtnReplyd") && (
  658 + <Button
  659 + type="primary"
  660 + icon={<img src={CopyAllIcon} />}
  661 + className={styles.iconBtn}
  662 + style={{ background: "#ff822d", borderColor: "#ff822d" }}
  663 + onClick={() => {
  664 + setReplyModalVisible(true);
  665 + }}
  666 + >
  667 + 回复
  668 + </Button>
  669 + )}
  670 + {!formEnabled && btnShowData.includes("BtnEdit") && (
  671 + <Button
  672 + type="primary"
  673 + icon={<EditOutlined />}
  674 + className={styles.iconBtn}
  675 + onClick={() => {
  676 + setFormEnabled(true);
  677 + document.querySelector(`.${detailModalId}`).scrollTop = 0;
  678 + }}
  679 + >
  680 + 修改
  681 + </Button>
  682 + )}
777 {formEnabled && ( 683 {formEnabled && (
778 <Button 684 <Button
779 type="primary" 685 type="primary"
@@ -798,64 +704,75 @@ const WorkOrderSystemDetail = props =&gt; { @@ -798,64 +704,75 @@ const WorkOrderSystemDetail = props =&gt; {
798 取消 704 取消
799 </Button> 705 </Button>
800 )} 706 )}
801 - {!formEnabled &&  
802 - btnShowData.includes("BtnAssign") && (  
803 - <Button  
804 - type="primary"  
805 - icon={<SendOutlined />}  
806 - className={styles.iconBtn}  
807 - onClick={() => {  
808 - setAssignmentModalVisible(true);  
809 - }}  
810 - >  
811 - 指派  
812 - </Button>  
813 - )}  
814 - {!formEnabled &&  
815 - btnShowData.includes("BtnSolve") && (  
816 - <Button  
817 - type="primary"  
818 - icon={<CheckOutlined />}  
819 - className={styles.iconBtn}  
820 - onClick={() => {  
821 - setResolutionModalVisible(true);  
822 - }}  
823 - >  
824 - 解决  
825 - </Button>  
826 - )}  
827 - {!formEnabled &&  
828 - btnShowData.includes("BtnClose") && (  
829 - <Button  
830 - type="primary"  
831 - icon={<CloseCircleOutlined />}  
832 - className={styles.iconBtn}  
833 - onClick={() => {  
834 - Modal.confirm({  
835 - title: "确认关闭工单",  
836 - onOk() {  
837 - const evaluate = async () => {  
838 - const result = await WorkOrderSystemService.evaluate({  
839 - dEvaluate: 5,  
840 - sId,  
841 - sMakePerson 707 + {!formEnabled && btnShowData.includes("BtnAssign") && (
  708 + <Button
  709 + type="primary"
  710 + icon={<SendOutlined />}
  711 + className={styles.iconBtn}
  712 + onClick={() => {
  713 + setAssignmentModalVisible(true);
  714 + }}
  715 + >
  716 + 指派
  717 + </Button>
  718 + )}
  719 + {!formEnabled && btnShowData.includes("BtnSolve") && (
  720 + <Button
  721 + type="primary"
  722 + icon={<CheckOutlined />}
  723 + className={styles.iconBtn}
  724 + onClick={() => {
  725 + setResolutionModalVisible(true);
  726 + }}
  727 + >
  728 + 解决
  729 + </Button>
  730 + )}
  731 + {!formEnabled && btnShowData.includes("BtnActive") && (
  732 + <Button
  733 + type="primary"
  734 + icon={<ThunderboltOutlined />}
  735 + className={styles.iconBtn}
  736 + onClick={() => {
  737 + addReplyHanle({
  738 + sResult: "已激活",
  739 + });
  740 + }}
  741 + >
  742 + 激活
  743 + </Button>
  744 + )}
  745 + {!formEnabled && btnShowData.includes("BtnClose") && (
  746 + <Button
  747 + type="primary"
  748 + icon={<CloseCircleOutlined />}
  749 + className={styles.iconBtn}
  750 + onClick={() => {
  751 + Modal.confirm({
  752 + title: "确认关闭工单",
  753 + onOk() {
  754 + const evaluate = async () => {
  755 + const result = await WorkOrderSystemService.evaluate({
  756 + dEvaluate: 5,
  757 + sId,
  758 + sMakePerson,
  759 + });
  760 +
  761 + if (result) {
  762 + refreshSlaveTable();
  763 + props.onSaveState({
  764 + workOrderSystemDetailModalVisible: false,
842 }); 765 });
843 -  
844 - if (result) {  
845 - refreshSlaveTable();  
846 - props.onSaveState({  
847 - workOrderSystemDetailModalVisible: false  
848 - });  
849 - }  
850 - };  
851 - evaluate();  
852 - }  
853 - });  
854 - }}  
855 - >  
856 - 关闭工单  
857 - </Button>  
858 - )} 766 + }
  767 + };
  768 + evaluate();
  769 + },
  770 + });
  771 + }}
  772 + >
  773 + 关闭工单
  774 + </Button>
  775 + )}
859 </Space> 776 </Space>
860 </Form.Item> 777 </Form.Item>
861 </Form> 778 </Form>
@@ -869,15 +786,7 @@ const WorkOrderSystemDetail = props =&gt; { @@ -869,15 +786,7 @@ const WorkOrderSystemDetail = props =&gt; {
869 786
870 // 回复弹窗 787 // 回复弹窗
871 const ReplyModal = props => { 788 const ReplyModal = props => {
872 - const {  
873 - replyModalVisible,  
874 - detailData,  
875 - detailModalId,  
876 - setReplyModalVisible,  
877 - refresh,  
878 - bMin,  
879 - setBMin  
880 - } = props; 789 + const { replyModalVisible, detailData, detailModalId, setReplyModalVisible, refresh, bMin, setBMin } = props;
881 const { sId, sTitle } = detailData; 790 const { sId, sTitle } = detailData;
882 const [loading, setLoading] = useState(false); 791 const [loading, setLoading] = useState(false);
883 792
@@ -896,7 +805,7 @@ const ReplyModal = props =&gt; { @@ -896,7 +805,7 @@ const ReplyModal = props =&gt; {
896 sMakePerson, 805 sMakePerson,
897 sLoginId, 806 sLoginId,
898 sId, 807 sId,
899 - status: "回复" 808 + status: "回复",
900 }); 809 });
901 setLoading(false); 810 setLoading(false);
902 if (commonUtils.isNotEmptyArr(returnData)) { 811 if (commonUtils.isNotEmptyArr(returnData)) {
@@ -924,7 +833,7 @@ const ReplyModal = props =&gt; { @@ -924,7 +833,7 @@ const ReplyModal = props =&gt; {
924 position: "absolute", 833 position: "absolute",
925 right: 30, 834 right: 30,
926 top: 6, 835 top: 6,
927 - color: "#4a495f" 836 + color: "#4a495f",
928 }} 837 }}
929 onClick={() => { 838 onClick={() => {
930 props.onSaveState({ bMin: true }, () => { 839 props.onSaveState({ bMin: true }, () => {
@@ -957,15 +866,15 @@ const ReplyModal = props =&gt; { @@ -957,15 +866,15 @@ const ReplyModal = props =&gt; {
957 } else { 866 } else {
958 return Promise.resolve(); 867 return Promise.resolve();
959 } 868 }
960 - }  
961 - } 869 + },
  870 + },
962 ]} 871 ]}
963 > 872 >
964 <BraftEditor 873 <BraftEditor
965 className={styles.replyBraftEditor} 874 className={styles.replyBraftEditor}
966 readOnly={false} 875 readOnly={false}
967 media={{ 876 media={{
968 - uploadFn: WorkOrderSystemService.uploadFn 877 + uploadFn: WorkOrderSystemService.uploadFn,
969 }} 878 }}
970 /> 879 />
971 </Form.Item> 880 </Form.Item>
@@ -986,19 +895,10 @@ const ReplyModal = props =&gt; { @@ -986,19 +895,10 @@ const ReplyModal = props =&gt; {
986 895
987 // 指派弹窗 896 // 指派弹窗
988 const AssignmentModal = props => { 897 const AssignmentModal = props => {
989 - const {  
990 - visible,  
991 - userOption,  
992 - detailData,  
993 - onFinish,  
994 - setVisible,  
995 - bResolution,  
996 - setBMin,  
997 - bMin  
998 - } = props; 898 + const { visible, userOption, detailData, onFinish, setVisible, bResolution, setBMin, bMin } = props;
999 const { sTitle, sCopyHanldeId } = detailData; 899 const { sTitle, sCopyHanldeId } = detailData;
1000 const initialValues = { 900 const initialValues = {
1001 - sCopyHanldeId: sCopyHanldeId ? sCopyHanldeId.split(",") : [] 901 + sCopyHanldeId: sCopyHanldeId ? sCopyHanldeId.split(",") : [],
1002 }; 902 };
1003 903
1004 const closeModal = () => { 904 const closeModal = () => {
@@ -1017,7 +917,7 @@ const AssignmentModal = props =&gt; { @@ -1017,7 +917,7 @@ const AssignmentModal = props =&gt; {
1017 position: "absolute", 917 position: "absolute",
1018 right: 30, 918 right: 30,
1019 top: 6, 919 top: 6,
1020 - color: "#4a495f" 920 + color: "#4a495f",
1021 }} 921 }}
1022 onClick={() => { 922 onClick={() => {
1023 props.onSaveState({ bMin: true }, () => { 923 props.onSaveState({ bMin: true }, () => {
@@ -1040,45 +940,31 @@ const AssignmentModal = props =&gt; { @@ -1040,45 +940,31 @@ const AssignmentModal = props =&gt; {
1040 initialValues={initialValues} 940 initialValues={initialValues}
1041 onFinish={onFinish} 941 onFinish={onFinish}
1042 labelCol={{ 942 labelCol={{
1043 - span: 2 943 + span: 2,
1044 }} 944 }}
1045 wrapperCol={{ 945 wrapperCol={{
1046 - span: 22 946 + span: 22,
1047 }} 947 }}
1048 > 948 >
1049 - {!bResolution && (  
1050 - <>  
1051 - <Form.Item  
1052 - name="sHanldeId"  
1053 - label="指派人"  
1054 - rules={[{ required: true }]}  
1055 - >  
1056 - <Select  
1057 - allowClear  
1058 - showSearch={true}  
1059 - options={userOption}  
1060 - optionFilterProp="label"  
1061 - placeholder="请选择指派人"  
1062 - />  
1063 - </Form.Item>  
1064 - <Form.Item name="sCopyHanldeId" label="抄送人">  
1065 - <Select  
1066 - allowClear  
1067 - mode="multiple"  
1068 - showSearch={true}  
1069 - options={userOption}  
1070 - optionFilterProp="label"  
1071 - placeholder="请选择抄送人"  
1072 - />  
1073 - </Form.Item>  
1074 - </> 949 + <Form.Item name="sHanldeId" label="指派人" rules={[{ required: true }]}>
  950 + <Select allowClear showSearch={true} options={userOption} optionFilterProp="label" placeholder="请选择指派人" />
  951 + </Form.Item>
  952 + <Form.Item name="sCopyHanldeId" label="抄送人">
  953 + <Select allowClear mode="multiple" showSearch={true} options={userOption} optionFilterProp="label" placeholder="请选择抄送人" />
  954 + </Form.Item>
  955 + {bResolution ? (
  956 + <Form.Item name="dSolveHour" label="研发时间" rules={[{ required: true }]}>
  957 + <InputNumber addonAfter="小时" style={{ width: 200 }} />
  958 + </Form.Item>
  959 + ) : (
  960 + ""
1075 )} 961 )}
1076 <Form.Item name="sContentMemo" label="备注"> 962 <Form.Item name="sContentMemo" label="备注">
1077 <BraftEditor 963 <BraftEditor
1078 className={styles.replyBraftEditor} 964 className={styles.replyBraftEditor}
1079 readOnly={false} 965 readOnly={false}
1080 media={{ 966 media={{
1081 - uploadFn: WorkOrderSystemService.uploadFn 967 + uploadFn: WorkOrderSystemService.uploadFn,
1082 }} 968 }}
1083 /> 969 />
1084 </Form.Item> 970 </Form.Item>
@@ -1108,7 +994,7 @@ const ImageModal = ({ imageSrc, imageVisible, setImageVisible }) =&gt; { @@ -1108,7 +994,7 @@ const ImageModal = ({ imageSrc, imageVisible, setImageVisible }) =&gt; {
1108 src: imageSrc, 994 src: imageSrc,
1109 onVisibleChange: () => { 995 onVisibleChange: () => {
1110 setImageVisible(false); 996 setImageVisible(false);
1111 - } 997 + },
1112 }} 998 }}
1113 /> 999 />
1114 ); 1000 );
src/components/Common/WorkOrderSystem/index.less
@@ -206,18 +206,18 @@ @@ -206,18 +206,18 @@
206 } 206 }
207 207
208 .formItemAQuarter { 208 .formItemAQuarter {
209 - width: 20%; 209 + width: 18%;
210 210
211 :global { 211 :global {
212 .ant-form-item-label { 212 .ant-form-item-label {
213 align-items: center; 213 align-items: center;
214 - flex: 0 0 50%;  
215 - max-width: 50%; 214 + flex: 0 0 60%;
  215 + max-width: 60%;
216 } 216 }
217 217
218 .ant-form-item-control { 218 .ant-form-item-control {
219 - flex: 0 0 50%;  
220 - max-width: 50%; 219 + flex: 0 0 40%;
  220 + max-width: 40%;
221 } 221 }
222 } 222 }
223 } 223 }
@@ -240,27 +240,27 @@ @@ -240,27 +240,27 @@
240 } 240 }
241 241
242 .formItemBug { 242 .formItemBug {
243 - width: 10%; 243 + width: 14%;
244 244
245 :global { 245 :global {
246 .ant-form-item-label { 246 .ant-form-item-label {
247 align-items: center; 247 align-items: center;
248 - flex: 0 0 0;  
249 - max-width: 0; 248 + flex: 0 0 55%;
  249 + max-width: 55%;
250 } 250 }
251 251
252 .ant-form-item-control { 252 .ant-form-item-control {
253 - flex: 0 0 100%;  
254 - max-width: 100%; 253 + flex: 0 0 45%;
  254 + max-width: 45%;
255 } 255 }
256 256
257 - .ant-switch {  
258 - background: @level-color-3;  
259 - } 257 + // .ant-switch {
  258 + // background: @level-color-3;
  259 + // }
260 260
261 - .ant-switch-checked {  
262 - background: @level-color-1;  
263 - } 261 + // .ant-switch-checked {
  262 + // background: @level-color-1;
  263 + // }
264 } 264 }
265 } 265 }
266 } 266 }
@@ -350,17 +350,17 @@ @@ -350,17 +350,17 @@
350 350
351 .ant-form-item:nth-child(6), 351 .ant-form-item:nth-child(6),
352 .ant-form-item:nth-child(8) { 352 .ant-form-item:nth-child(8) {
353 - width: 20%; 353 + width: 18%;
354 354
355 .ant-form-item-label { 355 .ant-form-item-label {
356 align-items: center; 356 align-items: center;
357 - flex: 0 0 50%;  
358 - max-width: 50%; 357 + flex: 0 0 60%;
  358 + max-width: 60%;
359 } 359 }
360 360
361 .ant-form-item-control { 361 .ant-form-item-control {
362 - flex: 0 0 50%;  
363 - max-width: 50%; 362 + flex: 0 0 40%;
  363 + max-width: 40%;
364 } 364 }
365 365
366 } 366 }
@@ -443,8 +443,8 @@ @@ -443,8 +443,8 @@
443 } 443 }
444 444
445 // 回复弹窗, 指派人弹窗 445 // 回复弹窗, 指派人弹窗
446 -.replyModal,  
447 -.assignmentModal { 446 +.replyModal:not(.antdV5),
  447 +.assignmentModal:not(.antdV5) {
448 :global { 448 :global {
449 .ant-modal-body { 449 .ant-modal-body {
450 padding: 20px !important; 450 padding: 20px !important;
@@ -453,13 +453,13 @@ @@ -453,13 +453,13 @@
453 } 453 }
454 454
455 .replyBraftEditor { 455 .replyBraftEditor {
456 - height: calc(70vh - 110px); 456 + height: calc(70vh - 160px);
457 background-color: #f6f6f6; 457 background-color: #f6f6f6;
458 border: 1px solid #d9d9d9; 458 border: 1px solid #d9d9d9;
459 459
460 :global { 460 :global {
461 .bf-content { 461 .bf-content {
462 - height: calc(70vh - 204px); 462 + height: calc(70vh - 254px);
463 background-color: #fff; 463 background-color: #fff;
464 } 464 }
465 } 465 }
src/index.less
@@ -4017,35 +4017,37 @@ table tr td .ant-select-auto-complete.ant-select .ant-input { @@ -4017,35 +4017,37 @@ table tr td .ant-select-auto-complete.ant-select .ant-input {
4017 4017
4018 4018
4019 // 工单系统弹窗样式 4019 // 工单系统弹窗样式
4020 -.workOrderSystemModal {  
4021 - .ant-modal-close {  
4022 - color: #4a495f !important;  
4023 - }  
4024 -  
4025 - .ant-modal-close-x {  
4026 - width: 30px;  
4027 - }  
4028 -  
4029 - .ant-modal-header {  
4030 - background-color: #e1edfe !important;  
4031 - border: 0;  
4032 -  
4033 - .ant-modal-title {  
4034 - font-size: 14px; 4020 +.workOrderSystemModal:not(.antdV5) {
  4021 + :global {
  4022 + .ant-modal-close {
4035 color: #4a495f !important; 4023 color: #4a495f !important;
4036 -  
4037 - span:nth-child(1) {  
4038 - overflow: hidden;  
4039 - text-overflow: ellipsis;  
4040 - white-space: nowrap;  
4041 - display: inline-block;  
4042 - max-width: 30vw; 4024 + }
  4025 +
  4026 + .ant-modal-close-x {
  4027 + width: 30px;
  4028 + }
  4029 +
  4030 + .ant-modal-header {
  4031 + background-color: #e1edfe !important;
  4032 + border: 0;
  4033 +
  4034 + .ant-modal-title {
  4035 + font-size: 14px;
  4036 + color: #4a495f !important;
  4037 +
  4038 + span:nth-child(1) {
  4039 + overflow: hidden;
  4040 + text-overflow: ellipsis;
  4041 + white-space: nowrap;
  4042 + display: inline-block;
  4043 + max-width: 30vw;
  4044 + }
4043 } 4045 }
4044 } 4046 }
4045 - }  
4046 -  
4047 - .ant-modal-body {  
4048 - padding: 0 !important; 4047 +
  4048 + .ant-modal-body {
  4049 + padding: 0 !important;
  4050 + }
4049 } 4051 }
4050 } 4052 }
4051 4053