Commit bf221616a4dc97a7abef8ae55d092f2e2d970203

Authored by boyang
1 parent a065692b

fix: 修改客户管理/跟进记录

src/pages/Client/Client/Components/ClientDrawer.tsx
... ... @@ -22,12 +22,6 @@ import { useState } from 'react';
22 22  
23 23 export default ({ optType, record, onFinish }) => {
24 24 const [form] = Form.useForm();
25   - const requirementsEnum = {
26   - EXPERIMENTAL_EQUIPMENT: '实验设备',
27   - EXPERIMENTAL_MATERIALS: '实验材料',
28   - OTHER: '其他',
29   - PILOT_TEST_VALIDATION_SERVICES: '中式验证服务',
30   - };
31 25 //省市区
32 26 const [province, setProvince] = useState('');
33 27 const [city, setCity] = useState('');
... ... @@ -403,7 +397,7 @@ export default ({ optType, record, onFinish }) => {
403 397 placeholder="请输入推荐人"
404 398 />
405 399 )}
406   - <ProFormSelect
  400 + {/* <ProFormSelect
407 401 name="requirements"
408 402 label="客户需求"
409 403 placeholder="请输入客户需求"
... ... @@ -423,7 +417,7 @@ export default ({ optType, record, onFinish }) =&gt; {
423 417 // console.log(res.data, '5656require');
424 418 // return enumToSelect(res.data);
425 419 // }}
426   - />
  420 + /> */}
427 421 <ProFormSelect
428 422 name="level"
429 423 label="客户等级"
... ...
src/pages/Client/Client/Components/CommunicationHistoryModal.tsx
... ... @@ -130,8 +130,6 @@ export default ({ record }) =&gt; {
130 130 const [department, setDepartment] = useState(''); // 联系电话
131 131 const [gradePosition, setGradePosition] = useState(''); // 联系电话
132 132 const [referrers, setReferrers] = useState(''); // 推荐人
133   - const [requirementsText, setRequirementsText] = useState(''); // 需求文本
134   - const [setTradeStatusText] = useState(''); // 跟进状态文本
135 133 const [levelText, setLevelText] = useState(''); // 客户等级文本
136 134 const [createTime, setCreateTime] = useState(null); // 最新沟通时间
137 135 const [address, setAddress] = useState(''); // 客户地址
... ... @@ -171,8 +169,6 @@ export default ({ record }) =&gt; {
171 169 setDepartment(record.department);
172 170 setGradePosition(record.gradePosition);
173 171 setReferrers(record.referrers);
174   - setRequirementsText(record.requirementsText);
175   - setTradeStatusText(record.tradeStatusText);
176 172 setLevelText(record.levelText);
177 173 setCreateTime(record.createTime);
178 174 setAddress(record.address);
... ... @@ -223,11 +219,6 @@ export default ({ record }) =&gt; {
223 219 children: referrers, // 推荐人
224 220 },
225 221 {
226   - key: '9',
227   - label: '需求',
228   - children: requirementsText, // 需求文本
229   - },
230   - {
231 222 key: '10',
232 223 label: '客户等级',
233 224 children: levelText, // 客户等级文本
... ...
src/pages/Client/Client/Components/InformationHistoryModal.tsx
... ... @@ -30,7 +30,6 @@ export default ({ data, reloadTable }) =&gt; {
30 30 const [ticketsType, setTicketsType] = useState(''); // 附件名称
31 31 const [ticketsDetail, setTicketsDetail] = useState(''); // 附件名称
32 32 const [ticketsAttachment, setTicketsAttachment] = useState(''); // 附件名称
33   - const [setTicketsAttachmentName] = useState(''); // 附件名称
34 33 const [assignPeople, setAssignPeople] = useState(''); // 附件名称
35 34  
36 35 useEffect(() => {
... ... @@ -65,18 +64,6 @@ export default ({ data, reloadTable }) =&gt; {
65 64 }
66 65 }
67 66  
68   - if (dataSearch.ticketsAttachments) {
69   - const url = dataSearch.ticketsAttachments;
70   - const match = url.match(/aliyuncs\.com\/(.*?)\?/);
71   - let decodedStr = '';
72   -
73   - if (match) {
74   - // 获取匹配的字符串并进行解码
75   - const encodedStr = match[1];
76   - decodedStr = decodeURIComponent(encodedStr);
77   - setTicketsAttachmentName(decodedStr);
78   - }
79   - }
80 67 setTicketsType(resTicket.data.type);
81 68 setTicketsDetail(resTicket.data.detailText);
82 69 setTicketsAttachment(resTicket.data.annexUrl);
... ... @@ -242,7 +229,7 @@ export default ({ data, reloadTable }) =&gt; {
242 229 <img
243 230 src={attachments}
244 231 alt={attachmentsName}
245   - style={{ maxWidth: '100%', height: 'auto' }}
  232 + style={{ maxWidth: '1000px', height: 'auto' }}
246 233 />
247 234 <div></div>
248 235 <a href={attachments} download>
... ... @@ -271,7 +258,7 @@ export default ({ data, reloadTable }) =&gt; {
271 258 <img
272 259 src={ticketsAttachment}
273 260 alt={ticketsAttachment}
274   - style={{ maxWidth: '100%', height: 'auto' }}
  261 + style={{ maxWidth: '1000px', height: 'auto' }}
275 262 />
276 263 <div></div>
277 264 <a href={ticketsAttachment} download>
... ...
src/pages/Client/FollowRecord/Components/CommunicationHistoryModal.tsx
... ... @@ -237,7 +237,7 @@ export default ({ data, reloadTable }) =&gt; {
237 237 }}
238 238 >
239 239 <Descriptions items={items} column={1} />
240   - {attachmentsName && (
  240 + {/* {attachmentsName && (
241 241 <a href={attachments} download>
242 242 附件:{attachmentsName}
243 243 </a>
... ... @@ -247,6 +247,57 @@ export default ({ data, reloadTable }) =&gt; {
247 247 <a href={ticketsAttachment} download>
248 248 工单附件:{ticketsAttachment}
249 249 </a>
  250 + )} */}
  251 + {attachmentsName && (
  252 + <div>
  253 + {attachmentsName.endsWith('.png') ||
  254 + attachmentsName.endsWith('.jpg') ? (
  255 + <>
  256 + <img
  257 + src={attachments}
  258 + alt={attachmentsName}
  259 + style={{ maxWidth: '1000px', height: 'auto' }}
  260 + />
  261 + <div></div>
  262 + <a href={attachments} download>
  263 + 附件:{attachmentsName}
  264 + </a>
  265 + </>
  266 + ) : (
  267 + <a href={attachments} download>
  268 + 附件:{attachmentsName}
  269 + </a>
  270 + )}
  271 + </div>
  272 + )}
  273 +
  274 + <div></div>
  275 + {/* {ticketsAttachment && (
  276 + <a href={ticketsAttachment} download>
  277 + 工单附件:{ticketsAttachment}
  278 + </a>
  279 + )} */}
  280 + {ticketsAttachment && (
  281 + <div>
  282 + {ticketsAttachment.includes('jpg') ||
  283 + ticketsAttachment.includes('png') ? (
  284 + <>
  285 + <img
  286 + src={ticketsAttachment}
  287 + alt={ticketsAttachment}
  288 + style={{ maxWidth: '1000px', height: 'auto' }}
  289 + />
  290 + <div></div>
  291 + <a href={ticketsAttachment} download>
  292 + 工单附件:{ticketsAttachment}
  293 + </a>
  294 + </>
  295 + ) : (
  296 + <a href={ticketsAttachment} download>
  297 + 工单附件:{ticketsAttachment}
  298 + </a>
  299 + )}
  300 + </div>
250 301 )}
251 302 </ModalForm>
252 303 </Space>
... ...