Commit 5c49c238cd570d32c9c7f41c1f71578d8bf0764f

Authored by boyang
1 parent 8534395e

feat: 开发客户列表编辑多个工单

src/pages/Client/Client/Components/ClientInformationModal.tsx
1 import { RESPONSE_CODE } from '@/constants/enum'; 1 import { RESPONSE_CODE } from '@/constants/enum';
2 -import UploadC from '@/pages/Invoice/waitProcessRecord/components/UploadSingleImg';  
3 import { 2 import {
4 postAdminClientAddOrModifyClientComunicationInfo, 3 postAdminClientAddOrModifyClientComunicationInfo,
5 postAdminClientQueryClientPage, 4 postAdminClientQueryClientPage,
@@ -10,19 +9,51 @@ import { @@ -10,19 +9,51 @@ import {
10 } from '@/services'; 9 } from '@/services';
11 import { enumToSelect } from '@/utils'; 10 import { enumToSelect } from '@/utils';
12 import { 11 import {
  12 + FormListActionType,
13 ModalForm, 13 ModalForm,
  14 + ProCard,
14 ProFormDateTimePicker, 15 ProFormDateTimePicker,
  16 + ProFormList,
15 ProFormSelect, 17 ProFormSelect,
16 ProFormText, 18 ProFormText,
17 ProFormTextArea, 19 ProFormTextArea,
18 ProFormUploadDragger, 20 ProFormUploadDragger,
19 } from '@ant-design/pro-components'; 21 } from '@ant-design/pro-components';
20 -import { Button, Col, Form, Row, message } from 'antd'; 22 +import { Button, Form, message } from 'antd';
21 import { RcFile } from 'antd/es/upload'; 23 import { RcFile } from 'antd/es/upload';
  24 +import { useRef } from 'react';
22 import './style.css'; 25 import './style.css';
23 export default ({ data, type, reloadTable }) => { 26 export default ({ data, type, reloadTable }) => {
24 const [form] = Form.useForm(); 27 const [form] = Form.useForm();
  28 + const actionRef = useRef<
  29 + FormListActionType<{
  30 + name: string;
  31 + }>
  32 + >();
  33 + const fileList: any = [];
25 const onfinish = async (values) => { 34 const onfinish = async (values) => {
  35 + console.log(values, '5656values');
  36 +
  37 + let list = values.ticketsList;
  38 + console.log(list, '5656list');
  39 + list = list.map((item, index) => {
  40 + // 尝试从 item.filePaths 中获取 annexUrl
  41 + const itemAnnexUrl = item?.filePaths?.[0]?.response?.data?.[0] || null;
  42 +
  43 + // 如果 itemAnnexUrl 为 null,则使用 data.ticketsList 对应的 annexUrl
  44 + if (
  45 + itemAnnexUrl === null &&
  46 + data.ticketsList[index]?.annexUrl &&
  47 + index < data.ticketsList.length
  48 + ) {
  49 + item.annexUrl = data.ticketsList[index].annexUrl; // 确保对比中的 annesUrl 也是 null
  50 + } else {
  51 + item.annexUrl = itemAnnexUrl; // 否则,使用从 item.filePaths 中获取的值
  52 + }
  53 + return item;
  54 + });
  55 +
  56 + values.list = list;
26 const resSearchId = await postAdminClientQueryClientPage({ 57 const resSearchId = await postAdminClientQueryClientPage({
27 data: { 58 data: {
28 groupFilter: 'all', 59 groupFilter: 'all',
@@ -54,25 +85,32 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -54,25 +85,32 @@ export default ({ data, type, reloadTable }) =&gt; {
54 const editOnfinish = async (values) => { 85 const editOnfinish = async (values) => {
55 // setEditClientId(data.clientId); 86 // setEditClientId(data.clientId);
56 values.clientId = data.clientId; 87 values.clientId = data.clientId;
57 - console.log(values, '5656editClientId');  
58 -  
59 - // const resSearchId = await postAdminClientQueryClientPage({  
60 - // data: {  
61 - // groupFilter: 'all',  
62 - // },  
63 - // });  
64 - // const matchingItem = resSearchId.data.data.find(  
65 - // (item) => item.id === values.name,  
66 - // ); 88 + let list = values.ticketsList;
  89 + list = list.map((item, index) => {
  90 + // 尝试从 item.filePaths 中获取 annexUrl
  91 + const itemAnnexUrl = item?.filePaths?.[0]?.response?.data?.[0] || null;
67 92
  93 + // 如果 itemAnnexUrl 为 null,则使用 data.ticketsList 对应的 annexUrl
  94 + if (
  95 + itemAnnexUrl === null &&
  96 + data.ticketsList[index]?.annexUrl &&
  97 + index < data.ticketsList.length
  98 + ) {
  99 + item.annexUrl = data.ticketsList[index].annexUrl; // 确保对比中的 annesUrl 也是 null
  100 + } else {
  101 + item.annexUrl = itemAnnexUrl; // 否则,使用从 item.filePaths 中获取的值
  102 + }
  103 + return item;
  104 + });
  105 + values.list = list;
68 const res = await postAdminClientAddOrModifyClientComunicationInfo({ 106 const res = await postAdminClientAddOrModifyClientComunicationInfo({
69 data: { 107 data: {
70 ...values, 108 ...values,
71 // ticketsAttachments: form.getFieldValue("ticketsAttachments"), 109 // ticketsAttachments: form.getFieldValue("ticketsAttachments"),
72 - ticketsAttachments:  
73 - form.getFieldValue('ticketsAttachments') !== undefined  
74 - ? form.getFieldValue('ticketsAttachments')  
75 - : data?.ticketsAttachments, 110 + // ticketsAttachments:
  111 + // form.getFieldValue('ticketsAttachments') !== undefined
  112 + // ? form.getFieldValue('ticketsAttachments')
  113 + // : data?.ticketsAttachments,
76 // ticketsAttachments: data?.annexUrl, 114 // ticketsAttachments: data?.annexUrl,
77 }, 115 },
78 }); 116 });
@@ -150,7 +188,6 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -150,7 +188,6 @@ export default ({ data, type, reloadTable }) =&gt; {
150 groupFilter: 'all', 188 groupFilter: 'all',
151 }, 189 },
152 }); 190 });
153 - console.log(data, '5656data?.nameedit');  
154 // const namesArray = res.data.data.map((item) => item.name); 191 // const namesArray = res.data.data.map((item) => item.name);
155 // const formattedObject = res.data.data.reduce((acc, name) => { 192 // const formattedObject = res.data.data.reduce((acc, name) => {
156 // acc[name] = name; // 将名称作为键和值 193 // acc[name] = name; // 将名称作为键和值
@@ -180,7 +217,7 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -180,7 +217,7 @@ export default ({ data, type, reloadTable }) =&gt; {
180 label="联系人" 217 label="联系人"
181 width="sm" 218 width="sm"
182 placeholder="请输入联系人" 219 placeholder="请输入联系人"
183 - initialValue={data?.content} 220 + initialValue={data?.contact}
184 readonly={optType[type].readOnly} 221 readonly={optType[type].readOnly}
185 rules={[ 222 rules={[
186 { 223 {
@@ -194,7 +231,7 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -194,7 +231,7 @@ export default ({ data, type, reloadTable }) =&gt; {
194 label="联系电话" 231 label="联系电话"
195 width="sm" 232 width="sm"
196 placeholder="请输入联系电话" 233 placeholder="请输入联系电话"
197 - initialValue={data?.content} 234 + initialValue={data?.contactPhone}
198 readonly={optType[type].readOnly} 235 readonly={optType[type].readOnly}
199 rules={[ 236 rules={[
200 { 237 {
@@ -314,7 +351,168 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -314,7 +351,168 @@ export default ({ data, type, reloadTable }) =&gt; {
314 hidden 351 hidden
315 ></ProFormText> 352 ></ProFormText>
316 <ProFormText initialValue={data?.id} name="id" hidden></ProFormText> 353 <ProFormText initialValue={data?.id} name="id" hidden></ProFormText>
317 - <div className="styled-text"> 354 + <h2>工单指派</h2>
  355 + <ProFormList
  356 + // creatorButtonProps={{ disabled: optType('after-sales-check') }}
  357 + // deleteIconProps={!optType('after-sales-check')}
  358 + deleteIconProps={true}
  359 + name="ticketsList"
  360 + label=""
  361 + copyIconProps={false} //复制按钮不显示
  362 + // initialValue={[
  363 + // {
  364 + // ticketsType: '',
  365 + // ticketsDetail: '',
  366 + // assignPeople: '',
  367 + // ticketsAttachment: '',
  368 + // ticketsAttachments: '',
  369 + // },
  370 + // ]}
  371 + initialValue={
  372 + optType[type].title === '修改跟进记录'
  373 + ? data.ticketsList || []
  374 + : [
  375 + {
  376 + type: '',
  377 + detailText: '',
  378 + assignPeople: '',
  379 + annexUrl: '',
  380 + },
  381 + ]
  382 + }
  383 + actionGuard={{
  384 + beforeRemoveRow: async () => {
  385 + return new Promise((resolve) => {
  386 + let list = form.getFieldValue('ticketsList');
  387 + if (list && list.length === 1) {
  388 + message.error('至少需要保留一个工单');
  389 + resolve(false);
  390 + return;
  391 + }
  392 + resolve(true);
  393 + });
  394 + },
  395 + }}
  396 + itemRender={(doms, listMeta) => {
  397 + if (optType[type].title === '修改跟进记录') {
  398 + // let i = 0;
  399 + // // let defaultFileList = data.ticketsList?.annexUrl?.map((annex) => {
  400 + // // return {
  401 + // // uid: i++,
  402 + // // name: annex,
  403 + // // status: 'uploaded',
  404 + // // url: annex,
  405 + // // response: { data: [annex] },
  406 + // // };
  407 + // // });
  408 + let defaultFileList = [
  409 + {
  410 + uid: listMeta.index,
  411 + name: data.ticketsList[listMeta.index]?.annexUrl,
  412 + status: 'uploaded',
  413 + url: data.ticketsList[listMeta.index]?.annexUrl,
  414 + response: {
  415 + data: [data.ticketsList[listMeta.index]?.annexUrl],
  416 + },
  417 + },
  418 + ];
  419 + fileList[listMeta.index] = defaultFileList;
  420 + }
  421 + let itemFileList = fileList[listMeta.index];
  422 + return (
  423 + <ProCard
  424 + bordered
  425 + extra={doms.action}
  426 + title={'工单指派' + (listMeta.index + 1)}
  427 + style={{
  428 + marginBlockEnd: 8,
  429 + }}
  430 + >
  431 + {[
  432 + <ProFormSelect
  433 + key={'type' + listMeta.index}
  434 + name="type"
  435 + label="工单类型"
  436 + width="sm"
  437 + placeholder="请输入工单类型"
  438 + readonly={optType[type].readOnly}
  439 + fieldProps={{
  440 + labelInValue: false,
  441 + }}
  442 + // initialValue={data?.ticketsList?.type ? data?.ticketsList?.type + '' : null}
  443 + initialValue={
  444 + data?.ticketsList ? data?.ticketsList?.type + '' : null
  445 + }
  446 + request={async () => {
  447 + return [
  448 + { label: '问题', value: 'QUESTION' },
  449 + { label: '需求', value: 'DEMAND' },
  450 + { label: '建议', value: 'ADVICE' },
  451 + ];
  452 + }}
  453 + />,
  454 + <ProFormTextArea
  455 + key={'detailText' + listMeta.index}
  456 + name="detailText"
  457 + label="工单详情"
  458 + placeholder="请输入工单详情"
  459 + initialValue={data?.detailText ? data?.detailText + '' : null}
  460 + readonly={optType[type].readOnly}
  461 + ></ProFormTextArea>,
  462 + <ProFormSelect
  463 + key={'assignPeople' + listMeta.index}
  464 + name="assignPeople"
  465 + width="sm"
  466 + readonly={optType[type].readOnly}
  467 + fieldProps={{
  468 + labelInValue: false,
  469 + }}
  470 + initialValue={
  471 + data?.assignPeople ? data?.assignPeople + '' : null
  472 + }
  473 + label="指派人员"
  474 + request={async () => {
  475 + const res = await postOrderErpUsersListByPage({
  476 + data: {
  477 + pageSize: 10000,
  478 + },
  479 + });
  480 +
  481 + const userOptions = res.data.records
  482 + ? res.data.records.map((user) => ({
  483 + label: user.userName, // 或者使用其他需要的属性
  484 + value: user.userName, // 作为value的字段
  485 + }))
  486 + : [];
  487 + return userOptions;
  488 + }}
  489 + ></ProFormSelect>,
  490 + <>
  491 + <ProFormUploadDragger
  492 + key={'filePaths' + listMeta.index}
  493 + label="附件"
  494 + name="filePaths"
  495 + action="/api/service/order/fileProcess"
  496 + fieldProps={{
  497 + headers: {
  498 + Authorization: localStorage.getItem('token'),
  499 + },
  500 + // headers: {
  501 + // 'Content-Type':
  502 + // 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq',
  503 + // },
  504 + itemFileList,
  505 + }}
  506 + max={1}
  507 + />
  508 + </>,
  509 + ]}
  510 + </ProCard>
  511 + );
  512 + }}
  513 + actionRef={actionRef}
  514 + ></ProFormList>
  515 + {/* <div className="styled-text">
318 <div className="vertical-line"></div> 516 <div className="vertical-line"></div>
319 <span className="text">工单指派</span> 517 <span className="text">工单指派</span>
320 </div> 518 </div>
@@ -342,7 +540,7 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -342,7 +540,7 @@ export default ({ data, type, reloadTable }) =&gt; {
342 placeholder="请输入工单详情" 540 placeholder="请输入工单详情"
343 initialValue={data?.ticketsDetail ? data?.ticketsDetail + '' : null} 541 initialValue={data?.ticketsDetail ? data?.ticketsDetail + '' : null}
344 readonly={optType[type].readOnly} 542 readonly={optType[type].readOnly}
345 - ></ProFormTextArea> 543 + ></ProFormTextArea> */}
346 {/* <ProFormUploadDragger 544 {/* <ProFormUploadDragger
347 label="工单附件" 545 label="工单附件"
348 name="ticketsAttachment" 546 name="ticketsAttachment"
@@ -371,7 +569,7 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -371,7 +569,7 @@ export default ({ data, type, reloadTable }) =&gt; {
371 }} 569 }}
372 max={1} 570 max={1}
373 /> */} 571 /> */}
374 - <Row> 572 + {/* <Row>
375 <Col span={4}>附件:</Col> 573 <Col span={4}>附件:</Col>
376 <Col span={20}> 574 <Col span={20}>
377 <UploadC 575 <UploadC
@@ -426,13 +624,13 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -426,13 +624,13 @@ export default ({ data, type, reloadTable }) =&gt; {
426 624
427 const userOptions = res.data.records 625 const userOptions = res.data.records
428 ? res.data.records.map((user) => ({ 626 ? res.data.records.map((user) => ({
429 - label: user.userName, // 或者使用其他需要的属性  
430 - value: user.userName, // 作为value的字段  
431 - })) 627 + label: user.userName, // 或者使用其他需要的属性
  628 + value: user.userName, // 作为value的字段
  629 + }))
432 : []; 630 : [];
433 return userOptions; 631 return userOptions;
434 }} 632 }}
435 - ></ProFormSelect> 633 + ></ProFormSelect> */}
436 </ModalForm> 634 </ModalForm>
437 ); 635 );
438 }; 636 };
src/pages/Client/Client/Components/ClientModal.tsx
1 import { RESPONSE_CODE } from '@/constants/enum'; 1 import { RESPONSE_CODE } from '@/constants/enum';
2 -import UploadC from '@/pages/Invoice/waitProcessRecord/components/UploadSingleImg';  
3 import { 2 import {
4 postAdminClientAddOrModifyClientComunicationInfo, 3 postAdminClientAddOrModifyClientComunicationInfo,
5 postAdminClientQueryClientPage, 4 postAdminClientQueryClientPage,
@@ -10,74 +9,47 @@ import { @@ -10,74 +9,47 @@ import {
10 } from '@/services'; 9 } from '@/services';
11 import { enumToSelect } from '@/utils'; 10 import { enumToSelect } from '@/utils';
12 import { 11 import {
  12 + FormListActionType,
13 ModalForm, 13 ModalForm,
  14 + ProCard,
14 ProFormDateTimePicker, 15 ProFormDateTimePicker,
  16 + ProFormList,
15 ProFormSelect, 17 ProFormSelect,
16 ProFormText, 18 ProFormText,
17 ProFormTextArea, 19 ProFormTextArea,
18 ProFormUploadDragger, 20 ProFormUploadDragger,
19 } from '@ant-design/pro-components'; 21 } from '@ant-design/pro-components';
20 -import { Button, Col, Form, Row, message } from 'antd'; 22 +import { Button, Form, message } from 'antd';
21 import { RcFile } from 'antd/es/upload'; 23 import { RcFile } from 'antd/es/upload';
  24 +import { useRef } from 'react';
22 import './style.css'; 25 import './style.css';
23 -// import { useRef, useState } from 'react';  
24 export default ({ data, type, reloadTable }) => { 26 export default ({ data, type, reloadTable }) => {
25 - // const initialItems = [  
26 - // { label: 'Tab 1', children: 'Content of Tab 1', key: '1' },  
27 - // ];  
28 - // const [activeKey, setActiveKey] = useState(initialItems[0].key);  
29 - // const [items, setItems] = useState(initialItems);  
30 - // const newTabIndex = useRef(1);  
31 -  
32 - // const onChange = (newActiveKey: string) => {  
33 - // setActiveKey(newActiveKey);  
34 - // };  
35 -  
36 - // const add = () => {  
37 - // // 生成新的标签名,格式为 'Tab {num}'  
38 - // const newTabLabel = `Tab ${newTabIndex.current + 1}`;  
39 - // // 增加索引,保证下次生成新的Tab名称时,num会递增  
40 - // newTabIndex.current++;  
41 - // // 创建新的panes,追加新Tab  
42 - // const newActiveKey = `newTab${newTabIndex.current}`;  
43 - // const newPanes = [...items];  
44 - // newPanes.push({ label: newTabLabel, children: 'Content of new Tab', key: newActiveKey });  
45 - // setItems(newPanes);  
46 - // setActiveKey(newActiveKey);  
47 - // };  
48 -  
49 - // const remove = (targetKey: TargetKey) => {  
50 - // let newActiveKey = activeKey;  
51 - // let lastIndex = -1;  
52 - // items.forEach((item, i) => {  
53 - // if (item.key === targetKey) {  
54 - // lastIndex = i - 1;  
55 - // }  
56 - // });  
57 - // const newPanes = items.filter((item) => item.key !== targetKey);  
58 - // if (newPanes.length && newActiveKey === targetKey) {  
59 - // if (lastIndex >= 0) {  
60 - // newActiveKey = newPanes[lastIndex].key;  
61 - // } else {  
62 - // newActiveKey = newPanes[0].key;  
63 - // }  
64 - // }  
65 - // setItems(newPanes);  
66 - // setActiveKey(newActiveKey);  
67 - // };  
68 -  
69 - // const onEdit = (  
70 - // targetKey: React.MouseEvent | React.KeyboardEvent | string,  
71 - // action: 'add' | 'remove',  
72 - // ) => {  
73 - // if (action === 'add') {  
74 - // add();  
75 - // } else {  
76 - // remove(targetKey);  
77 - // }  
78 - // };  
79 const [form] = Form.useForm(); 27 const [form] = Form.useForm();
  28 + const actionRef = useRef<
  29 + FormListActionType<{
  30 + name: string;
  31 + }>
  32 + >();
  33 + const fileList: any = [];
80 const onfinish = async (values) => { 34 const onfinish = async (values) => {
  35 + let list = values.list;
  36 + list = list.map((item, index) => {
  37 + // 尝试从 item.filePaths 中获取 annexUrl
  38 + const itemAnnexUrl = item?.filePaths?.[0]?.response?.data?.[0] || null;
  39 +
  40 + // 如果 itemAnnexUrl 为 null,则使用 data.ticketsList 对应的 annexUrl
  41 + if (
  42 + itemAnnexUrl === null &&
  43 + data.ticketsList[index]?.annexUrl &&
  44 + index < data.ticketsList.length
  45 + ) {
  46 + item.annexUrl = data.ticketsList[index].annexUrl; // 确保对比中的 annesUrl 也是 null
  47 + } else {
  48 + item.annexUrl = itemAnnexUrl; // 否则,使用从 item.filePaths 中获取的值
  49 + }
  50 + return item;
  51 + });
  52 + values.list = list;
81 const res = await postAdminClientAddOrModifyClientComunicationInfo({ 53 const res = await postAdminClientAddOrModifyClientComunicationInfo({
82 data: { 54 data: {
83 ...values, 55 ...values,
@@ -184,7 +156,7 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -184,7 +156,7 @@ export default ({ data, type, reloadTable }) =&gt; {
184 label="联系人" 156 label="联系人"
185 width="sm" 157 width="sm"
186 placeholder="请输入联系人" 158 placeholder="请输入联系人"
187 - initialValue={data?.content} 159 + initialValue={data?.contact}
188 readonly={optType[type].readOnly} 160 readonly={optType[type].readOnly}
189 rules={[ 161 rules={[
190 { 162 {
@@ -198,7 +170,7 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -198,7 +170,7 @@ export default ({ data, type, reloadTable }) =&gt; {
198 label="联系电话" 170 label="联系电话"
199 width="sm" 171 width="sm"
200 placeholder="请输入联系电话" 172 placeholder="请输入联系电话"
201 - initialValue={data?.content} 173 + initialValue={data?.contactPhone}
202 readonly={optType[type].readOnly} 174 readonly={optType[type].readOnly}
203 rules={[ 175 rules={[
204 { 176 {
@@ -318,132 +290,140 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -318,132 +290,140 @@ export default ({ data, type, reloadTable }) =&gt; {
318 hidden 290 hidden
319 ></ProFormText> 291 ></ProFormText>
320 <ProFormText initialValue={data?.id} name="id" hidden></ProFormText> 292 <ProFormText initialValue={data?.id} name="id" hidden></ProFormText>
321 - {/* <Tabs  
322 - type="editable-card"  
323 - onChange={onChange}  
324 - activeKey={activeKey}  
325 - onEdit={onEdit}  
326 - items={items}  
327 - /> */}  
328 - <div className="styled-text">  
329 - <div className="vertical-line"></div>  
330 - <span className="text">工单指派</span>  
331 - </div>  
332 - <ProFormSelect  
333 - name="ticketsType"  
334 - label="工单类型"  
335 - width="sm"  
336 - placeholder="请输入工单类型"  
337 - readonly={optType[type].readOnly}  
338 - fieldProps={{  
339 - labelInValue: false,  
340 - }}  
341 - initialValue={data?.type ? data?.type + '' : null}  
342 - request={async () => {  
343 - return [  
344 - { label: '问题', value: 'QUESTION' },  
345 - { label: '需求', value: 'DEMAND' },  
346 - { label: '建议', value: 'ADVICE' },  
347 - ];  
348 - }}  
349 - />  
350 - <ProFormTextArea  
351 - name="ticketsDetail"  
352 - label="工单详情"  
353 - placeholder="请输入工单详情"  
354 - initialValue={data?.detailText ? data?.detailText + '' : null}  
355 - readonly={optType[type].readOnly}  
356 - ></ProFormTextArea>  
357 - <Row>  
358 - <Col span={4}>附件:</Col>  
359 - <Col span={20}>  
360 - <UploadC  
361 - onFilesChange={async (newFileList) => {  
362 - if (newFileList.length > 0) {  
363 - const urls = []; // 创建一个数组来存储所有的 URL  
364 -  
365 - for (const file of newFileList) {  
366 - const formData = new FormData();  
367 - formData.append('file', file.originFileObj as RcFile);  
368 -  
369 - const res = await postOrderErpOrderStagesUpload({  
370 - data: formData,  
371 - headers: {  
372 - 'Content-Type':  
373 - 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq',  
374 - },  
375 - });  
376 -  
377 - const url = res.data; // 获取响应中的 URL  
378 - urls.push(url); // 将每个 URL 追加到数组中  
379 - }  
380 -  
381 - // 将所有 URL 使用 ',' 进行拼接  
382 - const combinedUrl = urls.join(',');  
383 - form.setFieldValue('ticketsAttachments', combinedUrl); // 设置表单字段值为拼接后的 URL  
384 - } else {  
385 - form.setFieldValue('ticketsAttachments', null); // 如果没有文件,则清空 URL 293 + <h2>工单指派</h2>
  294 + <ProFormList
  295 + // creatorButtonProps={{ disabled: optType('after-sales-check') }}
  296 + // deleteIconProps={!optType('after-sales-check')}
  297 + deleteIconProps={true}
  298 + name="list"
  299 + label=""
  300 + copyIconProps={false} //复制按钮不显示
  301 + initialValue={[
  302 + {
  303 + type: '',
  304 + detailText: '',
  305 + assignPeople: '',
  306 + annexUrl: '',
  307 + },
  308 + ]}
  309 + actionGuard={{
  310 + beforeRemoveRow: async () => {
  311 + return new Promise((resolve) => {
  312 + let list = form.getFieldValue('list');
  313 + if (list && list.length === 1) {
  314 + message.error('至少需要保留一个工单');
  315 + resolve(false);
  316 + return;
386 } 317 }
387 - }}  
388 - ></UploadC>  
389 - </Col>  
390 - </Row>  
391 - {/* <ProFormUploadDragger  
392 - label="工单附件"  
393 - name="ticketsAttachment"  
394 - action="upload.do"  
395 - hidden={optType[type].readOnly}  
396 - onChange={(info) => {  
397 - const uploadFile = async ({ fileList: newFileList }) => {  
398 - if (newFileList.length > 0) {  
399 - const formData = new FormData();  
400 - formData.append('file', newFileList[0].originFileObj as RcFile);  
401 - const res = await postOrderErpOrderStagesUpload({  
402 - data: formData,  
403 - headers: {  
404 - 'Content-Type':  
405 - 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq',  
406 - },  
407 - });  
408 - const url = res.data;  
409 - console.log('ticketsAttachments' + JSON.stringify(url));  
410 - form.setFieldValue('ticketsAttachments', url);  
411 - } else {  
412 - form.setFieldValue('ticketsAttachments', null);  
413 - }  
414 - };  
415 - uploadFile(info);  
416 - }}  
417 - max={1}  
418 - /> */}  
419 - <a hidden={!optType[type].readOnly} href={data?.orderAttachment} download>  
420 - 下载附件  
421 - </a>  
422 - <ProFormSelect  
423 - name="assignPeople"  
424 - width="sm"  
425 - readonly={optType[type].readOnly}  
426 - fieldProps={{  
427 - labelInValue: false, 318 + resolve(true);
  319 + });
  320 + },
428 }} 321 }}
429 - initialValue={data?.assignPeople ? data?.assignPeople + '' : null}  
430 - label="指派人员"  
431 - request={async () => {  
432 - const res = await postOrderErpUsersListByPage({  
433 - data: {  
434 - pageSize: 10000,  
435 - },  
436 - }); 322 + itemRender={(doms, listMeta) => {
  323 + if (optType[type].modify || optType[type].add || optType[type].add2) {
  324 + let i = 0;
  325 + let defaultFileList = listMeta.record?.listAnnex?.map((annex) => {
  326 + return {
  327 + uid: i++,
  328 + name: annex,
  329 + status: 'uploaded',
  330 + url: annex,
  331 + response: { data: [annex] },
  332 + };
  333 + });
  334 + fileList[listMeta.index] = defaultFileList;
  335 + }
  336 + let itemFileList = fileList[listMeta.index];
  337 + return (
  338 + <ProCard
  339 + bordered
  340 + extra={doms.action}
  341 + title={'工单指派' + (listMeta.index + 1)}
  342 + style={{
  343 + marginBlockEnd: 8,
  344 + }}
  345 + >
  346 + {[
  347 + <ProFormSelect
  348 + key={'type' + listMeta.index}
  349 + name="type"
  350 + label="工单类型"
  351 + width="sm"
  352 + placeholder="请输入工单类型"
  353 + readonly={optType[type].readOnly}
  354 + fieldProps={{
  355 + labelInValue: false,
  356 + }}
  357 + initialValue={data?.type ? data?.type + '' : null}
  358 + request={async () => {
  359 + return [
  360 + { label: '问题', value: 'QUESTION' },
  361 + { label: '需求', value: 'DEMAND' },
  362 + { label: '建议', value: 'ADVICE' },
  363 + ];
  364 + }}
  365 + />,
  366 + <ProFormTextArea
  367 + key={'detailText' + listMeta.index}
  368 + name="detailText"
  369 + label="工单详情"
  370 + placeholder="请输入工单详情"
  371 + initialValue={data?.detailText ? data?.detailText + '' : null}
  372 + readonly={optType[type].readOnly}
  373 + ></ProFormTextArea>,
  374 + <ProFormSelect
  375 + key={'assignPeople' + listMeta.index}
  376 + name="assignPeople"
  377 + width="sm"
  378 + readonly={optType[type].readOnly}
  379 + fieldProps={{
  380 + labelInValue: false,
  381 + }}
  382 + initialValue={
  383 + data?.assignPeople ? data?.assignPeople + '' : null
  384 + }
  385 + label="指派人员"
  386 + request={async () => {
  387 + const res = await postOrderErpUsersListByPage({
  388 + data: {
  389 + pageSize: 10000,
  390 + },
  391 + });
437 392
438 - const userOptions = res.data.records  
439 - ? res.data.records.map((user) => ({  
440 - label: user.userName, // 或者使用其他需要的属性  
441 - value: user.userName, // 作为value的字段  
442 - }))  
443 - : [];  
444 - return userOptions; 393 + const userOptions = res.data.records
  394 + ? res.data.records.map((user) => ({
  395 + label: user.userName, // 或者使用其他需要的属性
  396 + value: user.userName, // 作为value的字段
  397 + }))
  398 + : [];
  399 + return userOptions;
  400 + }}
  401 + ></ProFormSelect>,
  402 + <>
  403 + <ProFormUploadDragger
  404 + key={'filePaths' + listMeta.index}
  405 + label="附件"
  406 + name="filePaths"
  407 + action="/api/service/order/fileProcess"
  408 + fieldProps={{
  409 + headers: {
  410 + Authorization: localStorage.getItem('token'),
  411 + },
  412 + // headers: {
  413 + // 'Content-Type':
  414 + // 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq',
  415 + // },
  416 + itemFileList,
  417 + }}
  418 + max={1}
  419 + />
  420 + </>,
  421 + ]}
  422 + </ProCard>
  423 + );
445 }} 424 }}
446 - ></ProFormSelect> 425 + actionRef={actionRef}
  426 + ></ProFormList>
447 </ModalForm> 427 </ModalForm>
448 ); 428 );
449 }; 429 };
src/pages/Client/Client/Components/InformationHistoryModal.tsx
@@ -27,10 +27,6 @@ export default ({ data, reloadTable }) =&gt; { @@ -27,10 +27,6 @@ export default ({ data, reloadTable }) =&gt; {
27 const [createTime, setCreateTime] = useState(null); // 创建时间 27 const [createTime, setCreateTime] = useState(null); // 创建时间
28 const [attachments, setAttachments] = useState(); //附件 28 const [attachments, setAttachments] = useState(); //附件
29 const [attachmentsName, setAttachmentsName] = useState(''); // 附件名称 29 const [attachmentsName, setAttachmentsName] = useState(''); // 附件名称
30 - const [ticketsType, setTicketsType] = useState(''); // 附件名称  
31 - const [ticketsDetail, setTicketsDetail] = useState(''); // 附件名称  
32 - const [ticketsAttachment, setTicketsAttachment] = useState(''); // 附件名称  
33 - const [assignPeople, setAssignPeople] = useState(''); // 附件名称  
34 const [comment, setComment] = useState(''); // 客户评价 30 const [comment, setComment] = useState(''); // 客户评价
35 31
36 useEffect(() => { 32 useEffect(() => {
@@ -56,10 +52,6 @@ export default ({ data, reloadTable }) =&gt; { @@ -56,10 +52,6 @@ export default ({ data, reloadTable }) =&gt; {
56 } 52 }
57 } 53 }
58 setComment(dataSearch.comment); 54 setComment(dataSearch.comment);
59 - setTicketsType(dataSearch.ticketsTypeText);  
60 - setTicketsDetail(dataSearch.ticketsDetail);  
61 - setTicketsAttachment(dataSearch.ticketsAttachments);  
62 - setAssignPeople(dataSearch.assignPeople);  
63 setDatetime(dataSearch.datetime); // 设置跟进日期 55 setDatetime(dataSearch.datetime); // 设置跟进日期
64 // setDateRange(data.dateRange || []); // 设置跟进时间范围 56 // setDateRange(data.dateRange || []); // 设置跟进时间范围
65 setCreateByName(dataSearch.createByName); // 设置跟进人员 57 setCreateByName(dataSearch.createByName); // 设置跟进人员
@@ -115,26 +107,6 @@ export default ({ data, reloadTable }) =&gt; { @@ -115,26 +107,6 @@ export default ({ data, reloadTable }) =&gt; {
115 }, 107 },
116 { 108 {
117 key: '8', 109 key: '8',
118 - label: '工单类型',  
119 - children: ticketsType, // 跟进状态  
120 - },  
121 - {  
122 - key: '9',  
123 - label: '工单详情',  
124 - children: ticketsDetail, // 跟进状态  
125 - },  
126 - // {  
127 - // key: '10',  
128 - // label: '工单附件',  
129 - // children: ticketsAttachment, // 跟进状态  
130 - // },  
131 - {  
132 - key: '10',  
133 - label: '指派人员',  
134 - children: assignPeople, // 跟进状态  
135 - },  
136 - {  
137 - key: '11',  
138 label: '客户评价', 110 label: '客户评价',
139 children: comment, // 跟进状态 111 children: comment, // 跟进状态
140 }, 112 },
@@ -151,6 +123,40 @@ export default ({ data, reloadTable }) =&gt; { @@ -151,6 +123,40 @@ export default ({ data, reloadTable }) =&gt; {
151 actionRef?.current?.reload(); // 重新加载表格数据 123 actionRef?.current?.reload(); // 重新加载表格数据
152 } 124 }
153 }; 125 };
  126 + const TicketDescriptions = ({ data }) => {
  127 + return (
  128 + <div>
  129 + {data.ticketsList && data.ticketsList.length > 0 ? (
  130 + data.ticketsList.map((ticket, index) => (
  131 + <div key={index} style={{ marginBottom: '20px' }}>
  132 + <Descriptions title={`工单 ${index + 1}`} column={1}>
  133 + <Descriptions.Item label="工单类型">
  134 + {ticket.typeText}
  135 + </Descriptions.Item>
  136 + <Descriptions.Item label="工单详情">
  137 + {ticket.detailText}
  138 + </Descriptions.Item>
  139 + <Descriptions.Item label="指派人员">
  140 + {ticket.assignPeople}
  141 + </Descriptions.Item>
  142 + </Descriptions>
  143 + {ticket.annexUrl && (
  144 + <a
  145 + href={ticket.annexUrl}
  146 + target="_blank"
  147 + rel="noopener noreferrer"
  148 + >
  149 + 下载工单附件
  150 + </a>
  151 + )}
  152 + </div>
  153 + ))
  154 + ) : (
  155 + <p></p>
  156 + )}
  157 + </div>
  158 + );
  159 + };
154 return ( 160 return (
155 <Space> 161 <Space>
156 <ModalForm 162 <ModalForm
@@ -215,11 +221,6 @@ export default ({ data, reloadTable }) =&gt; { @@ -215,11 +221,6 @@ export default ({ data, reloadTable }) =&gt; {
215 }} 221 }}
216 > 222 >
217 <Descriptions items={items} column={1} /> 223 <Descriptions items={items} column={1} />
218 - {/* {attachmentsName && (  
219 - <a href={attachments} download>  
220 - 附件:{attachmentsName}  
221 - </a>  
222 - )} */}  
223 {attachmentsName && ( 224 {attachmentsName && (
224 <div> 225 <div>
225 {attachmentsName.endsWith('.png') || 226 {attachmentsName.endsWith('.png') ||
@@ -242,6 +243,12 @@ export default ({ data, reloadTable }) =&gt; { @@ -242,6 +243,12 @@ export default ({ data, reloadTable }) =&gt; {
242 )} 243 )}
243 </div> 244 </div>
244 )} 245 )}
  246 + <TicketDescriptions data={data} />
  247 + {/* {attachmentsName && (
  248 + <a href={attachments} download>
  249 + 附件:{attachmentsName}
  250 + </a>
  251 + )} */}
245 252
246 <div></div> 253 <div></div>
247 {/* {ticketsAttachment && ( 254 {/* {ticketsAttachment && (
@@ -271,12 +278,12 @@ export default ({ data, reloadTable }) =&gt; { @@ -271,12 +278,12 @@ export default ({ data, reloadTable }) =&gt; {
271 )} 278 )}
272 </div> 279 </div>
273 )} */} 280 )} */}
274 - {ticketsAttachment && ( 281 + {/* {ticketsAttachment && (
275 <div> 282 <div>
276 {ticketsAttachment.split(',').map((ticketsAttachment, index) => ( 283 {ticketsAttachment.split(',').map((ticketsAttachment, index) => (
277 <div key={index}> 284 <div key={index}>
278 {ticketsAttachment.includes('jpg') || 285 {ticketsAttachment.includes('jpg') ||
279 - ticketsAttachment.includes('png') ? ( 286 + ticketsAttachment.includes('png') ? (
280 <> 287 <>
281 <img 288 <img
282 src={ticketsAttachment} 289 src={ticketsAttachment}
@@ -292,7 +299,7 @@ export default ({ data, reloadTable }) =&gt; { @@ -292,7 +299,7 @@ export default ({ data, reloadTable }) =&gt; {
292 </div> 299 </div>
293 ))} 300 ))}
294 </div> 301 </div>
295 - )} 302 + )} */}
296 </ModalForm> 303 </ModalForm>
297 </Space> 304 </Space>
298 ); 305 );
src/pages/Client/FollowRecord/Components/ClientModal.tsx
1 import { RESPONSE_CODE } from '@/constants/enum'; 1 import { RESPONSE_CODE } from '@/constants/enum';
2 -import UploadC from '@/pages/Invoice/waitProcessRecord/components/UploadSingleImg';  
3 import { 2 import {
4 postAdminClientAddOrModifyClientComunicationInfo, 3 postAdminClientAddOrModifyClientComunicationInfo,
5 postAdminClientQueryClientPage, 4 postAdminClientQueryClientPage,
@@ -10,21 +9,48 @@ import { @@ -10,21 +9,48 @@ import {
10 } from '@/services'; 9 } from '@/services';
11 import { enumToSelect } from '@/utils'; 10 import { enumToSelect } from '@/utils';
12 import { 11 import {
  12 + FormListActionType,
13 ModalForm, 13 ModalForm,
  14 + ProCard,
14 ProFormDateTimePicker, 15 ProFormDateTimePicker,
  16 + ProFormList,
15 ProFormSelect, 17 ProFormSelect,
16 ProFormText, 18 ProFormText,
17 ProFormTextArea, 19 ProFormTextArea,
18 ProFormUploadDragger, 20 ProFormUploadDragger,
19 } from '@ant-design/pro-components'; 21 } from '@ant-design/pro-components';
20 -import { Button, Col, Form, Row, message } from 'antd'; 22 +import { Button, Form, message } from 'antd';
21 import { RcFile } from 'antd/es/upload'; 23 import { RcFile } from 'antd/es/upload';
22 -import { useEffect } from 'react'; 24 +import { useEffect, useRef } from 'react';
23 import './style.css'; 25 import './style.css';
24 export default ({ data, type, reloadTable }) => { 26 export default ({ data, type, reloadTable }) => {
25 useEffect(() => {}); 27 useEffect(() => {});
26 const [form] = Form.useForm(); 28 const [form] = Form.useForm();
  29 + const actionRef = useRef<
  30 + FormListActionType<{
  31 + name: string;
  32 + }>
  33 + >();
  34 + const fileList: any = [];
27 const onfinish = async (values) => { 35 const onfinish = async (values) => {
  36 + let list = values.ticketsList;
  37 + list = list.map((item, index) => {
  38 + // 尝试从 item.filePaths 中获取 annexUrl
  39 + const itemAnnexUrl = item?.filePaths?.[0]?.response?.data?.[0] || null;
  40 +
  41 + // 如果 itemAnnexUrl 为 null,则使用 data.ticketsList 对应的 annexUrl
  42 + if (
  43 + itemAnnexUrl === null &&
  44 + data.ticketsList[index]?.annexUrl &&
  45 + index < data.ticketsList.length
  46 + ) {
  47 + item.annexUrl = data.ticketsList[index].annexUrl; // 确保对比中的 annesUrl 也是 null
  48 + } else {
  49 + item.annexUrl = itemAnnexUrl; // 否则,使用从 item.filePaths 中获取的值
  50 + }
  51 + return item;
  52 + });
  53 + values.list = list;
28 const resSearchId = await postAdminClientQueryClientPage({ 54 const resSearchId = await postAdminClientQueryClientPage({
29 data: { 55 data: {
30 groupFilter: 'all', 56 groupFilter: 'all',
@@ -43,7 +69,7 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -43,7 +69,7 @@ export default ({ data, type, reloadTable }) =&gt; {
43 const res = await postAdminClientAddOrModifyClientComunicationInfo({ 69 const res = await postAdminClientAddOrModifyClientComunicationInfo({
44 data: { 70 data: {
45 ...values, 71 ...values,
46 - ticketsAttachments: form.getFieldValue('ticketsAttachments'), 72 + // ticketsAttachments: form.getFieldValue('ticketsAttachments'),
47 clientId: matchedId, 73 clientId: matchedId,
48 }, 74 },
49 }); 75 });
@@ -58,24 +84,35 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -58,24 +84,35 @@ export default ({ data, type, reloadTable }) =&gt; {
58 const editOnfinish = async (values) => { 84 const editOnfinish = async (values) => {
59 // setEditClientId(data.clientId); 85 // setEditClientId(data.clientId);
60 values.clientId = data.clientId; 86 values.clientId = data.clientId;
61 -  
62 - // const resSearchId = await postAdminClientQueryClientPage({  
63 - // data: {  
64 - // groupFilter: 'all',  
65 - // }, 87 + let list = values.ticketsList;
  88 + // list = list.map((item) => {
  89 + // // item.annexUrl = item.filePaths?.map((file) => {
  90 + // // return { url: file.response.data[0] };
  91 + // // });
  92 + // // item.annexUrl = item?.filePaths[0].response?.data[0];
  93 + // item.annexUrl = item?.filePaths?.[0]?.response?.data?.[0] || null; // 使用 null 或默认值
  94 + // return item;
66 // }); 95 // });
67 - // const matchingItem = resSearchId.data.data.find(  
68 - // (item) => item.id === values.name,  
69 - // ); 96 + list = list.map((item, index) => {
  97 + // 尝试从 item.filePaths 中获取 annexUrl
  98 + const itemAnnexUrl = item?.filePaths?.[0]?.response?.data?.[0] || null;
  99 +
  100 + // 如果 itemAnnexUrl 为 null,则使用 data.ticketsList 对应的 annexUrl
  101 + if (
  102 + itemAnnexUrl === null &&
  103 + data.ticketsList[index]?.annexUrl &&
  104 + index < data.ticketsList.length
  105 + ) {
  106 + item.annexUrl = data.ticketsList[index].annexUrl; // 确保对比中的 annesUrl 也是 null
  107 + } else {
  108 + item.annexUrl = itemAnnexUrl; // 否则,使用从 item.filePaths 中获取的值
  109 + }
  110 + return item;
  111 + });
  112 + values.list = list;
70 const res = await postAdminClientAddOrModifyClientComunicationInfo({ 113 const res = await postAdminClientAddOrModifyClientComunicationInfo({
71 data: { 114 data: {
72 ...values, 115 ...values,
73 - // ticketsAttachments: form.getFieldValue("ticketsAttachments"),  
74 - ticketsAttachments:  
75 - form.getFieldValue('ticketsAttachments') !== undefined  
76 - ? form.getFieldValue('ticketsAttachments')  
77 - : data?.ticketsAttachments,  
78 - // ticketsAttachments: data?.annexUrl,  
79 }, 116 },
80 }); 117 });
81 if (res.result === RESPONSE_CODE.SUCCESS) { 118 if (res.result === RESPONSE_CODE.SUCCESS) {
@@ -315,7 +352,168 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -315,7 +352,168 @@ export default ({ data, type, reloadTable }) =&gt; {
315 hidden 352 hidden
316 ></ProFormText> 353 ></ProFormText>
317 <ProFormText initialValue={data?.id} name="id" hidden></ProFormText> 354 <ProFormText initialValue={data?.id} name="id" hidden></ProFormText>
318 - <div className="styled-text"> 355 + <h2>工单指派</h2>
  356 + <ProFormList
  357 + // creatorButtonProps={{ disabled: optType('after-sales-check') }}
  358 + // deleteIconProps={!optType('after-sales-check')}
  359 + deleteIconProps={true}
  360 + name="ticketsList"
  361 + label=""
  362 + copyIconProps={false} //复制按钮不显示
  363 + // initialValue={[
  364 + // {
  365 + // ticketsType: '',
  366 + // ticketsDetail: '',
  367 + // assignPeople: '',
  368 + // ticketsAttachment: '',
  369 + // ticketsAttachments: '',
  370 + // },
  371 + // ]}
  372 + initialValue={
  373 + optType[type].title === '修改跟进记录'
  374 + ? data.ticketsList || []
  375 + : [
  376 + {
  377 + type: '',
  378 + detailText: '',
  379 + assignPeople: '',
  380 + annexUrl: '',
  381 + },
  382 + ]
  383 + }
  384 + actionGuard={{
  385 + beforeRemoveRow: async () => {
  386 + return new Promise((resolve) => {
  387 + let list = form.getFieldValue('ticketsList');
  388 + if (list && list.length === 1) {
  389 + message.error('至少需要保留一个工单');
  390 + resolve(false);
  391 + return;
  392 + }
  393 + resolve(true);
  394 + });
  395 + },
  396 + }}
  397 + itemRender={(doms, listMeta) => {
  398 + if (optType[type].title === '修改跟进记录') {
  399 + // let i = 0;
  400 + // // let defaultFileList = data.ticketsList?.annexUrl?.map((annex) => {
  401 + // // return {
  402 + // // uid: i++,
  403 + // // name: annex,
  404 + // // status: 'uploaded',
  405 + // // url: annex,
  406 + // // response: { data: [annex] },
  407 + // // };
  408 + // // });
  409 + let defaultFileList = [
  410 + {
  411 + uid: listMeta.index,
  412 + name: data.ticketsList[listMeta.index]?.annexUrl,
  413 + status: 'uploaded',
  414 + url: data.ticketsList[listMeta.index]?.annexUrl,
  415 + response: {
  416 + data: [data.ticketsList[listMeta.index]?.annexUrl],
  417 + },
  418 + },
  419 + ];
  420 + fileList[listMeta.index] = defaultFileList;
  421 + }
  422 + let itemFileList = fileList[listMeta.index];
  423 + return (
  424 + <ProCard
  425 + bordered
  426 + extra={doms.action}
  427 + title={'工单指派' + (listMeta.index + 1)}
  428 + style={{
  429 + marginBlockEnd: 8,
  430 + }}
  431 + >
  432 + {[
  433 + <ProFormSelect
  434 + key={'type' + listMeta.index}
  435 + name="type"
  436 + label="工单类型"
  437 + width="sm"
  438 + placeholder="请输入工单类型"
  439 + readonly={optType[type].readOnly}
  440 + fieldProps={{
  441 + labelInValue: false,
  442 + }}
  443 + // initialValue={data?.ticketsList?.type ? data?.ticketsList?.type + '' : null}
  444 + initialValue={
  445 + data?.ticketsList ? data?.ticketsList?.type + '' : null
  446 + }
  447 + request={async () => {
  448 + return [
  449 + { label: '问题', value: 'QUESTION' },
  450 + { label: '需求', value: 'DEMAND' },
  451 + { label: '建议', value: 'ADVICE' },
  452 + ];
  453 + }}
  454 + />,
  455 + <ProFormTextArea
  456 + key={'detailText' + listMeta.index}
  457 + name="detailText"
  458 + label="工单详情"
  459 + placeholder="请输入工单详情"
  460 + initialValue={data?.detailText ? data?.detailText + '' : null}
  461 + readonly={optType[type].readOnly}
  462 + ></ProFormTextArea>,
  463 + <ProFormSelect
  464 + key={'assignPeople' + listMeta.index}
  465 + name="assignPeople"
  466 + width="sm"
  467 + readonly={optType[type].readOnly}
  468 + fieldProps={{
  469 + labelInValue: false,
  470 + }}
  471 + initialValue={
  472 + data?.assignPeople ? data?.assignPeople + '' : null
  473 + }
  474 + label="指派人员"
  475 + request={async () => {
  476 + const res = await postOrderErpUsersListByPage({
  477 + data: {
  478 + pageSize: 10000,
  479 + },
  480 + });
  481 +
  482 + const userOptions = res.data.records
  483 + ? res.data.records.map((user) => ({
  484 + label: user.userName, // 或者使用其他需要的属性
  485 + value: user.userName, // 作为value的字段
  486 + }))
  487 + : [];
  488 + return userOptions;
  489 + }}
  490 + ></ProFormSelect>,
  491 + <>
  492 + <ProFormUploadDragger
  493 + key={'filePaths' + listMeta.index}
  494 + label="附件"
  495 + name="filePaths"
  496 + action="/api/service/order/fileProcess"
  497 + fieldProps={{
  498 + headers: {
  499 + Authorization: localStorage.getItem('token'),
  500 + },
  501 + // headers: {
  502 + // 'Content-Type':
  503 + // 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq',
  504 + // },
  505 + itemFileList,
  506 + }}
  507 + max={1}
  508 + />
  509 + </>,
  510 + ]}
  511 + </ProCard>
  512 + );
  513 + }}
  514 + actionRef={actionRef}
  515 + ></ProFormList>
  516 + {/* <div className="styled-text">
319 <div className="vertical-line"></div> 517 <div className="vertical-line"></div>
320 <span className="text">工单指派</span> 518 <span className="text">工单指派</span>
321 </div> 519 </div>
@@ -348,7 +546,7 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -348,7 +546,7 @@ export default ({ data, type, reloadTable }) =&gt; {
348 }} 546 }}
349 initialValue={data?.ticketsDetail ? data?.ticketsDetail + '' : null} 547 initialValue={data?.ticketsDetail ? data?.ticketsDetail + '' : null}
350 readonly={optType[type].readOnly} 548 readonly={optType[type].readOnly}
351 - ></ProFormTextArea> 549 + ></ProFormTextArea> */}
352 {/* <ProFormUploadDragger 550 {/* <ProFormUploadDragger
353 label="工单附件" 551 label="工单附件"
354 name="ticketsAttachment" 552 name="ticketsAttachment"
@@ -377,7 +575,7 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -377,7 +575,7 @@ export default ({ data, type, reloadTable }) =&gt; {
377 }} 575 }}
378 max={1} 576 max={1}
379 /> */} 577 /> */}
380 - <Row> 578 + {/* <Row>
381 <Col span={4}>附件:</Col> 579 <Col span={4}>附件:</Col>
382 <Col span={20}> 580 <Col span={20}>
383 <UploadC 581 <UploadC
@@ -416,7 +614,6 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -416,7 +614,6 @@ export default ({ data, type, reloadTable }) =&gt; {
416 </Col> 614 </Col>
417 </Row> 615 </Row>
418 <a hidden={!optType[type].readOnly} href={data?.orderAttachment} download> 616 <a hidden={!optType[type].readOnly} href={data?.orderAttachment} download>
419 - {/* <a href={data?.annexUrl} download> */}  
420 下载附件 617 下载附件
421 </a> 618 </a>
422 <ProFormSelect 619 <ProFormSelect
@@ -443,7 +640,7 @@ export default ({ data, type, reloadTable }) =&gt; { @@ -443,7 +640,7 @@ export default ({ data, type, reloadTable }) =&gt; {
443 : []; 640 : [];
444 return userOptions; 641 return userOptions;
445 }} 642 }}
446 - ></ProFormSelect> 643 + ></ProFormSelect> */}
447 </ModalForm> 644 </ModalForm>
448 ); 645 );
449 }; 646 };
src/pages/Client/FollowRecord/Components/CommunicationHistoryModal.tsx
@@ -15,26 +15,15 @@ export default ({ data, reloadTable }) =&gt; { @@ -15,26 +15,15 @@ export default ({ data, reloadTable }) =&gt; {
15 const [datetime, setDatetime] = useState(); // 跟进日期 15 const [datetime, setDatetime] = useState(); // 跟进日期
16 const [createByName, setCreateByName] = useState(''); // 跟进人员 16 const [createByName, setCreateByName] = useState(''); // 跟进人员
17 const [clientName, setClientName] = useState(''); // 客户名称 17 const [clientName, setClientName] = useState(''); // 客户名称
18 - // const [clientAddress, setClientAddress] = useState(''); // 客户地址  
19 const [way, setWay] = useState(); // 跟进方式 18 const [way, setWay] = useState(); // 跟进方式
20 const [tradeStatusText, setTradeStatusText] = useState(); // 状态 19 const [tradeStatusText, setTradeStatusText] = useState(); // 状态
21 - // const [clientNameLike, setClientNameLike] = useState(''); // 客户名称模糊查询  
22 - // const [clientAddressLike, setClientAddressLike] = useState(''); // 客户地址模糊查询  
23 - // const [tradeStatus, setTradeStatus] = useState(''); // 客户状态  
24 - // const [tradeStatusLike, setTradeStatusLike] = useState(''); // 客户状态模糊查询  
25 const [content, setContent] = useState(''); // 跟进详情 20 const [content, setContent] = useState(''); // 跟进详情
26 const [createTime, setCreateTime] = useState(null); // 创建时间 21 const [createTime, setCreateTime] = useState(null); // 创建时间
27 const [attachments, setAttachments] = useState(); //附件 22 const [attachments, setAttachments] = useState(); //附件
28 const [attachmentsName, setAttachmentsName] = useState(''); // 附件名称 23 const [attachmentsName, setAttachmentsName] = useState(''); // 附件名称
29 - const [ticketsType, setTicketsType] = useState(''); // 附件名称  
30 - const [ticketsDetail, setTicketsDetail] = useState(''); // 附件名称  
31 - const [ticketsAttachment, setTicketsAttachment] = useState(); // 附件名称  
32 - // const [ticketsAttachmentName, setTicketsAttachmentName] = useState(''); // 附件名称  
33 const [comment, setComment] = useState(''); // 客户评价 24 const [comment, setComment] = useState(''); // 客户评价
34 - const [assignPeople, setAssignPeople] = useState(''); // 附件名称  
35 useEffect(() => { 25 useEffect(() => {
36 const request = async () => { 26 const request = async () => {
37 - console.log(data, '5656datatatatata');  
38 const res = await postAdminClientQueryClientComunicationInfo({ 27 const res = await postAdminClientQueryClientComunicationInfo({
39 data: { 28 data: {
40 id: data.id, 29 id: data.id,
@@ -82,10 +71,6 @@ export default ({ data, reloadTable }) =&gt; { @@ -82,10 +71,6 @@ export default ({ data, reloadTable }) =&gt; {
82 // } 71 // }
83 // } 72 // }
84 setComment(dataSearch.comment); 73 setComment(dataSearch.comment);
85 - setTicketsType(dataSearch.ticketsTypeText);  
86 - setTicketsDetail(dataSearch.ticketsDetail);  
87 - setTicketsAttachment(dataSearch.ticketsAttachments);  
88 - setAssignPeople(dataSearch.assignPeople);  
89 setComment(dataSearch.comment); 74 setComment(dataSearch.comment);
90 setDatetime(dataSearch.datetime); // 设置跟进日期 75 setDatetime(dataSearch.datetime); // 设置跟进日期
91 // setDateRange(data.dateRange || []); // 设置跟进时间范围 76 // setDateRange(data.dateRange || []); // 设置跟进时间范围
@@ -142,29 +127,24 @@ export default ({ data, reloadTable }) =&gt; { @@ -142,29 +127,24 @@ export default ({ data, reloadTable }) =&gt; {
142 }, 127 },
143 { 128 {
144 key: '8', 129 key: '8',
145 - label: '工单类型',  
146 - children: ticketsType, // 跟进状态  
147 - },  
148 - {  
149 - key: '9',  
150 - label: '工单详情',  
151 - children: ticketsDetail, // 跟进状态  
152 - },  
153 - // {  
154 - // key: '12',  
155 - // label: '工单附件',  
156 - // children: ticketsAttachment, // 跟进状态  
157 - // },  
158 - {  
159 - key: '10',  
160 - label: '指派人员',  
161 - children: assignPeople, // 跟进状态  
162 - },  
163 - {  
164 - key: '11',  
165 label: '客户评价', 130 label: '客户评价',
166 children: comment, // 跟进状态 131 children: comment, // 跟进状态
167 }, 132 },
  133 + // {
  134 + // key: '9',
  135 + // label: '工单类型',
  136 + // children: ticketsType, // 跟进状态
  137 + // },
  138 + // {
  139 + // key: '10',
  140 + // label: '工单详情',
  141 + // children: ticketsDetail, // 跟进状态
  142 + // },
  143 + // {
  144 + // key: '11',
  145 + // label: '指派人员',
  146 + // children: assignPeople, // 跟进状态
  147 + // },
168 ]; 148 ];
169 const handleDelete = async () => { 149 const handleDelete = async () => {
170 // 调用删除接口 150 // 调用删除接口
@@ -178,6 +158,40 @@ export default ({ data, reloadTable }) =&gt; { @@ -178,6 +158,40 @@ export default ({ data, reloadTable }) =&gt; {
178 actionRef?.current?.reload(); // 重新加载表格数据 158 actionRef?.current?.reload(); // 重新加载表格数据
179 } 159 }
180 }; 160 };
  161 + const TicketDescriptions = ({ data }) => {
  162 + return (
  163 + <div>
  164 + {data.ticketsList && data.ticketsList.length > 0 ? (
  165 + data.ticketsList.map((ticket, index) => (
  166 + <div key={index} style={{ marginBottom: '20px' }}>
  167 + <Descriptions title={`工单 ${index + 1}`} column={1}>
  168 + <Descriptions.Item label="工单类型">
  169 + {ticket.typeText}
  170 + </Descriptions.Item>
  171 + <Descriptions.Item label="工单详情">
  172 + {ticket.detailText}
  173 + </Descriptions.Item>
  174 + <Descriptions.Item label="指派人员">
  175 + {ticket.assignPeople}
  176 + </Descriptions.Item>
  177 + </Descriptions>
  178 + {ticket.annexUrl && (
  179 + <a
  180 + href={ticket.annexUrl}
  181 + target="_blank"
  182 + rel="noopener noreferrer"
  183 + >
  184 + 下载工单附件
  185 + </a>
  186 + )}
  187 + </div>
  188 + ))
  189 + ) : (
  190 + <p></p>
  191 + )}
  192 + </div>
  193 + );
  194 + };
181 return ( 195 return (
182 <Space> 196 <Space>
183 <ModalForm 197 <ModalForm
@@ -242,17 +256,6 @@ export default ({ data, reloadTable }) =&gt; { @@ -242,17 +256,6 @@ export default ({ data, reloadTable }) =&gt; {
242 }} 256 }}
243 > 257 >
244 <Descriptions items={items} column={1} /> 258 <Descriptions items={items} column={1} />
245 - {/* {attachmentsName && (  
246 - <a href={attachments} download>  
247 - 附件:{attachmentsName}  
248 - </a>  
249 - )}  
250 - <div></div>  
251 - {ticketsAttachment && (  
252 - <a href={ticketsAttachment} download>  
253 - 工单附件:{ticketsAttachment}  
254 - </a>  
255 - )} */}  
256 {attachmentsName && ( 259 {attachmentsName && (
257 <div> 260 <div>
258 {attachmentsName.endsWith('.png') || 261 {attachmentsName.endsWith('.png') ||
@@ -275,6 +278,18 @@ export default ({ data, reloadTable }) =&gt; { @@ -275,6 +278,18 @@ export default ({ data, reloadTable }) =&gt; {
275 )} 278 )}
276 </div> 279 </div>
277 )} 280 )}
  281 + <TicketDescriptions data={data} />
  282 + {/* {attachmentsName && (
  283 + <a href={attachments} download>
  284 + 附件:{attachmentsName}
  285 + </a>
  286 + )}
  287 + <div></div>
  288 + {ticketsAttachment && (
  289 + <a href={ticketsAttachment} download>
  290 + 工单附件:{ticketsAttachment}
  291 + </a>
  292 + )} */}
278 293
279 <div></div> 294 <div></div>
280 {/* {ticketsAttachment && ( 295 {/* {ticketsAttachment && (
@@ -304,28 +319,6 @@ export default ({ data, reloadTable }) =&gt; { @@ -304,28 +319,6 @@ export default ({ data, reloadTable }) =&gt; {
304 )} 319 )}
305 </div> 320 </div>
306 )} */} 321 )} */}
307 - {ticketsAttachment && (  
308 - <div>  
309 - {ticketsAttachment.split(',').map((ticketsAttachment, index) => (  
310 - <div key={index}>  
311 - {ticketsAttachment.includes('jpg') ||  
312 - ticketsAttachment.includes('png') ? (  
313 - <>  
314 - <img  
315 - src={ticketsAttachment}  
316 - alt={`附件 ${index + 1}`}  
317 - style={{ maxWidth: '300px', height: 'auto' }}  
318 - />  
319 - <div></div>  
320 - </>  
321 - ) : null}  
322 - <a href={ticketsAttachment} download>  
323 - 工单附件:{ticketsAttachment}  
324 - </a>  
325 - </div>  
326 - ))}  
327 - </div>  
328 - )}  
329 </ModalForm> 322 </ModalForm>
330 </Space> 323 </Space>
331 ); 324 );
src/pages/Order/Order/components/FeedbackRegistrationModal.tsx
@@ -7,9 +7,9 @@ export default ({ setVisible, subOrders, mainOrder, onClose }) =&gt; { @@ -7,9 +7,9 @@ export default ({ setVisible, subOrders, mainOrder, onClose }) =&gt; {
7 const [isModalOpen] = useState(true); 7 const [isModalOpen] = useState(true);
8 const { TextArea } = Input; 8 const { TextArea } = Input;
9 const [textValue, setTextValue] = useState(''); 9 const [textValue, setTextValue] = useState('');
  10 + console.log(mainOrder);
10 11
11 const handleOk = async () => { 12 const handleOk = async () => {
12 - console.log(subOrders, '5656subOrders', mainOrder);  
13 await postServiceOrderFeedbackRegistration({ 13 await postServiceOrderFeedbackRegistration({
14 data: { 14 data: {
15 id: subOrders[0].id, 15 id: subOrders[0].id,
src/pages/Order/Order/index.tsx
@@ -56,12 +56,9 @@ const OrderPage = () =&gt; { @@ -56,12 +56,9 @@ const OrderPage = () =&gt; {
56 res.data.waitInvoicing !== 0) && 56 res.data.waitInvoicing !== 0) &&
57 openCount !== 'true' 57 openCount !== 'true'
58 ) { 58 ) {
59 - console.log(open, '5656re222s', res);  
60 -  
61 setOpenCount('true'); 59 setOpenCount('true');
62 setOpen(true); 60 setOpen(true);
63 } 61 }
64 - console.log(open, '5656res', res);  
65 setInvoiceWarningNum(res.data.waitConfirmInvoice); 62 setInvoiceWarningNum(res.data.waitConfirmInvoice);
66 setInvoiceRefundWarningNum(res.data.waitConfirmReceipt); 63 setInvoiceRefundWarningNum(res.data.waitConfirmReceipt);
67 setWaitConfirmPayment(res.data.waitConfirmPayment); 64 setWaitConfirmPayment(res.data.waitConfirmPayment);
src/pages/Order/OrderList/FeedbackRegistrationModal.tsx
@@ -7,9 +7,9 @@ export default ({ setVisible, subOrders, mainOrder, onClose }) =&gt; { @@ -7,9 +7,9 @@ export default ({ setVisible, subOrders, mainOrder, onClose }) =&gt; {
7 const [isModalOpen] = useState(true); 7 const [isModalOpen] = useState(true);
8 const { TextArea } = Input; 8 const { TextArea } = Input;
9 const [textValue, setTextValue] = useState(''); 9 const [textValue, setTextValue] = useState('');
  10 + console.log(mainOrder);
10 11
11 const handleOk = async () => { 12 const handleOk = async () => {
12 - console.log(subOrders, '5656subOrders', mainOrder);  
13 await postServiceOrderFeedbackRegistration({ 13 await postServiceOrderFeedbackRegistration({
14 data: { 14 data: {
15 id: subOrders[0].id, 15 id: subOrders[0].id,
src/pages/Order/OrderList/OrderList.tsx
@@ -215,7 +215,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) =&gt; { @@ -215,7 +215,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) =&gt; {
215 const [recordOptNode, setRecordOptNode] = useState(null); 215 const [recordOptNode, setRecordOptNode] = useState(null);
216 const roleCode = userInfo?.roleSmallVO?.code; 216 const roleCode = userInfo?.roleSmallVO?.code;
217 const roles = userInfo?.roles; 217 const roles = userInfo?.roles;
218 - const [newParams, setNewParams] = useState<any>(); 218 + const [setNewParams] = useState<any>();
219 const canMergeInvoicing = useMemo(() => { 219 const canMergeInvoicing = useMemo(() => {
220 if (subOrderSelectedMap.size === 0) { 220 if (subOrderSelectedMap.size === 0) {
221 return false; 221 return false;
@@ -4589,7 +4589,6 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) =&gt; { @@ -4589,7 +4589,6 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) =&gt; {
4589 setNewParams(paramsNew); 4589 setNewParams(paramsNew);
4590 } 4590 }
4591 refreshTable(); 4591 refreshTable();
4592 - console.log(paramsNew, '5656paramsNewc', newParams);  
4593 }, [paramsNew]); 4592 }, [paramsNew]);
4594 return ( 4593 return (
4595 <div className="order-page-container"> 4594 <div className="order-page-container">
@@ -4684,7 +4683,6 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) =&gt; { @@ -4684,7 +4683,6 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) =&gt; {
4684 } 4683 }
4685 //保存这个搜索条件 4684 //保存这个搜索条件
4686 setSearchParam(params); 4685 setSearchParam(params);
4687 - console.log(paramsNew, '5656paramsNew');  
4688 const { data } = await postServiceOrderQueryServiceOrder({ 4686 const { data } = await postServiceOrderQueryServiceOrder({
4689 // ...params, 4687 // ...params,
4690 // FIXME: remove @ts-ignore 4688 // FIXME: remove @ts-ignore
src/pages/Order/OrderWarning/components/FeedbackRegistrationModal.tsx
@@ -7,9 +7,9 @@ export default ({ setVisible, subOrders, mainOrder, onClose }) =&gt; { @@ -7,9 +7,9 @@ export default ({ setVisible, subOrders, mainOrder, onClose }) =&gt; {
7 const [isModalOpen] = useState(true); 7 const [isModalOpen] = useState(true);
8 const { TextArea } = Input; 8 const { TextArea } = Input;
9 const [textValue, setTextValue] = useState(''); 9 const [textValue, setTextValue] = useState('');
  10 + console.log(mainOrder);
10 11
11 const handleOk = async () => { 12 const handleOk = async () => {
12 - console.log(subOrders, '5656subOrders', mainOrder);  
13 await postServiceOrderFeedbackRegistration({ 13 await postServiceOrderFeedbackRegistration({
14 data: { 14 data: {
15 id: subOrders[0].id, 15 id: subOrders[0].id,
src/pages/Order/OrderWarning/index.tsx
@@ -147,7 +147,6 @@ const OrderPage = () =&gt; { @@ -147,7 +147,6 @@ const OrderPage = () =&gt; {
147 waitConfirmPaymentStatusDateTimeLe: setOriginTime(options5[0].value), 147 waitConfirmPaymentStatusDateTimeLe: setOriginTime(options5[0].value),
148 }, 148 },
149 }); 149 });
150 - console.log(res, '5656565656');  
151 setInvoiceWarningNum(res.data.waitConfirmInvoice); 150 setInvoiceWarningNum(res.data.waitConfirmInvoice);
152 setInvoiceCreateWarningNum(res.data.waitInvoicing); 151 setInvoiceCreateWarningNum(res.data.waitInvoicing);
153 setInvoiceRefundWarningNum(res.data.waitConfirmReceipt); 152 setInvoiceRefundWarningNum(res.data.waitConfirmReceipt);
@@ -502,7 +501,6 @@ const OrderPage = () =&gt; { @@ -502,7 +501,6 @@ const OrderPage = () =&gt; {
502 applyTimeLe: calDate, 501 applyTimeLe: calDate,
503 }; 502 };
504 } 503 }
505 - console.log(initialParams, '5656initialParams');  
506 // 返回完整的参数对象 504 // 返回完整的参数对象
507 return initialParams; 505 return initialParams;
508 })()} 506 })()}
src/pages/Order/WarningWhitelist/index.tsx
@@ -87,7 +87,6 @@ const WarningWhitelist = () =&gt; { @@ -87,7 +87,6 @@ const WarningWhitelist = () =&gt; {
87 title={'确认删除此项吗?'} 87 title={'确认删除此项吗?'}
88 text="删除" 88 text="删除"
89 onConfirm={async () => { 89 onConfirm={async () => {
90 - console.log(record, '5656record');  
91 await postServiceOrderDeleteWarningUserWhiteList({ 90 await postServiceOrderDeleteWarningUserWhiteList({
92 query: { 91 query: {
93 orderId: record.orderId, 92 orderId: record.orderId,
@@ -113,7 +112,6 @@ const WarningWhitelist = () =&gt; { @@ -113,7 +112,6 @@ const WarningWhitelist = () =&gt; {
113 search: { 112 search: {
114 transform: (value) => { 113 transform: (value) => {
115 if (value) { 114 if (value) {
116 - console.log(value, '5656valueid');  
117 return { 115 return {
118 orderId: Number(value), 116 orderId: Number(value),
119 }; 117 };
@@ -165,7 +163,6 @@ const WarningWhitelist = () =&gt; { @@ -165,7 +163,6 @@ const WarningWhitelist = () =&gt; {
165 title={'确认删除此项吗?'} 163 title={'确认删除此项吗?'}
166 text="删除" 164 text="删除"
167 onConfirm={async () => { 165 onConfirm={async () => {
168 - console.log(record.orderId, '5656idoreder');  
169 await postServiceOrderDeleteWarningOrderWhiteList({ 166 await postServiceOrderDeleteWarningOrderWhiteList({
170 query: { 167 query: {
171 orderId: record.orderId, 168 orderId: record.orderId,
@@ -192,7 +189,6 @@ const WarningWhitelist = () =&gt; { @@ -192,7 +189,6 @@ const WarningWhitelist = () =&gt; {
192 const res = await postServiceOrderWarningUserWhiteLists({ 189 const res = await postServiceOrderWarningUserWhiteLists({
193 data: { ...params }, 190 data: { ...params },
194 }); 191 });
195 - console.log(res.data, '5656res.data');  
196 return res.data; 192 return res.data;
197 }} 193 }}
198 rowKey="id" 194 rowKey="id"
@@ -228,7 +224,6 @@ const WarningWhitelist = () =&gt; { @@ -228,7 +224,6 @@ const WarningWhitelist = () =&gt; {
228 }} 224 }}
229 submitTimeout={2000} 225 submitTimeout={2000}
230 onFinish={async (values) => { 226 onFinish={async (values) => {
231 - console.log(values, '5656values');  
232 const res = await postServiceOrderAddWarningUserWhiteList({ 227 const res = await postServiceOrderAddWarningUserWhiteList({
233 data: { 228 data: {
234 userName: values.orderIdsText, 229 userName: values.orderIdsText,
@@ -239,7 +234,6 @@ const WarningWhitelist = () =&gt; { @@ -239,7 +234,6 @@ const WarningWhitelist = () =&gt; {
239 setTimeout(() => { 234 setTimeout(() => {
240 actionRef.current?.reload(); 235 actionRef.current?.reload();
241 }, 50); 236 }, 50);
242 - console.log('res5656 :>> ', res);  
243 message.success('添加成功'); 237 message.success('添加成功');
244 return true; 238 return true;
245 } 239 }
@@ -310,7 +304,6 @@ const WarningWhitelist = () =&gt; { @@ -310,7 +304,6 @@ const WarningWhitelist = () =&gt; {
310 }} 304 }}
311 submitTimeout={2000} 305 submitTimeout={2000}
312 onFinish={async (values) => { 306 onFinish={async (values) => {
313 - console.log(values, '5656values');  
314 const res = await postServiceOrderAddWarningOrderWhiteList({ 307 const res = await postServiceOrderAddWarningOrderWhiteList({
315 data: { 308 data: {
316 orderId: values.orderIdsText, 309 orderId: values.orderIdsText,
@@ -345,13 +338,7 @@ const WarningWhitelist = () =&gt; { @@ -345,13 +338,7 @@ const WarningWhitelist = () =&gt; {
345 ]; 338 ];
346 return ( 339 return (
347 <div> 340 <div>
348 - <Tabs  
349 - defaultActiveKey="1"  
350 - items={tabsItems}  
351 - onChange={(value) => {  
352 - console.log(value, '5656tabsvalue');  
353 - }}  
354 - /> 341 + <Tabs defaultActiveKey="1" items={tabsItems} onChange={() => {}} />
355 </div> 342 </div>
356 ); 343 );
357 }; 344 };