|
@@ -1,7 +1,18 @@
|
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
import styles from './index.module.scss'
|
|
import styles from './index.module.scss'
|
|
import { A1addType } from '@/pages/A1Camera/data'
|
|
import { A1addType } from '@/pages/A1Camera/data'
|
|
-import { Button, DatePicker, Form, FormInstance, Input, Select, Table, Tag, Tooltip } from 'antd'
|
|
|
|
|
|
+import {
|
|
|
|
+ Button,
|
|
|
|
+ DatePicker,
|
|
|
|
+ Form,
|
|
|
|
+ FormInstance,
|
|
|
|
+ Input,
|
|
|
|
+ InputNumber,
|
|
|
|
+ Select,
|
|
|
|
+ Table,
|
|
|
|
+ Tag,
|
|
|
|
+ Tooltip
|
|
|
|
+} from 'antd'
|
|
import { A2A_APIadd, A2A_APIgetInfo } from '@/store/action/A2Abusiness'
|
|
import { A2A_APIadd, A2A_APIgetInfo } from '@/store/action/A2Abusiness'
|
|
import { MessageFu } from '@/utils/message'
|
|
import { MessageFu } from '@/utils/message'
|
|
import ZRichTexts from '@/components/ZRichTexts'
|
|
import ZRichTexts from '@/components/ZRichTexts'
|
|
@@ -93,9 +104,12 @@ function AddBusiness({ topType, openInfo, closeFu, upTableFu, addTableFu }: Prop
|
|
// 回显 合同附件
|
|
// 回显 合同附件
|
|
listFilesRef.current.sonFilesShowFu(data.files)
|
|
listFilesRef.current.sonFilesShowFu(data.files)
|
|
|
|
|
|
- // 设置富文本
|
|
|
|
|
|
+ // 设置富文本-备注
|
|
ZRichTextsRef1.current?.ritxtShowFu(JSON.parse(data.rtf))
|
|
ZRichTextsRef1.current?.ritxtShowFu(JSON.parse(data.rtf))
|
|
|
|
|
|
|
|
+ // 设置富文本-问题描述
|
|
|
|
+ ZRichTextsRef2.current?.ritxtShowFu(JSON.parse(data.rtfDesc))
|
|
|
|
+
|
|
// 回显表格
|
|
// 回显表格
|
|
setTableList(
|
|
setTableList(
|
|
data.cameras.map((v: any) => ({
|
|
data.cameras.map((v: any) => ({
|
|
@@ -143,14 +157,17 @@ function AddBusiness({ topType, openInfo, closeFu, upTableFu, addTableFu }: Prop
|
|
const zlProvince = value.city.split('-')[0]
|
|
const zlProvince = value.city.split('-')[0]
|
|
const zlCity = value.city.split('-')[1]
|
|
const zlCity = value.city.split('-')[1]
|
|
|
|
|
|
- // 富文本
|
|
|
|
|
|
+ // 富文本-备注
|
|
const rtf = ZRichTextsRef1.current?.fatherBtnOkFu() || { flag: true }
|
|
const rtf = ZRichTextsRef1.current?.fatherBtnOkFu() || { flag: true }
|
|
|
|
+ // 富文本-问题描述
|
|
|
|
+ const rtfDesc = ZRichTextsRef2.current?.fatherBtnOkFu() || { flag: true }
|
|
|
|
|
|
const obj = {
|
|
const obj = {
|
|
...value,
|
|
...value,
|
|
id: openInfo.txt === '新增' ? null : openInfo.id,
|
|
id: openInfo.txt === '新增' ? null : openInfo.id,
|
|
fileIds: listFilesRes.join(','),
|
|
fileIds: listFilesRes.join(','),
|
|
rtf: JSON.stringify(rtf.val || ''),
|
|
rtf: JSON.stringify(rtf.val || ''),
|
|
|
|
+ rtfDesc: JSON.stringify(rtfDesc.val || ''),
|
|
cameras: tableList,
|
|
cameras: tableList,
|
|
dateStart,
|
|
dateStart,
|
|
dateEnd,
|
|
dateEnd,
|
|
@@ -182,6 +199,7 @@ function AddBusiness({ topType, openInfo, closeFu, upTableFu, addTableFu }: Prop
|
|
|
|
|
|
// 富文本的ref
|
|
// 富文本的ref
|
|
const ZRichTextsRef1 = useRef<any>(null)
|
|
const ZRichTextsRef1 = useRef<any>(null)
|
|
|
|
+ const ZRichTextsRef2 = useRef<any>(null)
|
|
|
|
|
|
// 合同附件的ref
|
|
// 合同附件的ref
|
|
const listFilesRef = useRef<any>(null)
|
|
const listFilesRef = useRef<any>(null)
|
|
@@ -247,6 +265,42 @@ function AddBusiness({ topType, openInfo, closeFu, upTableFu, addTableFu }: Prop
|
|
</Form.Item>
|
|
</Form.Item>
|
|
) : null}
|
|
) : null}
|
|
|
|
|
|
|
|
+ {['BX', 'DS'].includes(topType) ? (
|
|
|
|
+ <div className='formBox'>
|
|
|
|
+ <div className='formBoxLL'>{topType === 'BX' ? '问题描述' : '定损结果'}:</div>
|
|
|
|
+ <div className='formBoxRR'>
|
|
|
|
+ <ZRichTexts
|
|
|
|
+ check={false}
|
|
|
|
+ dirCode='A2business'
|
|
|
|
+ isLook={false}
|
|
|
|
+ ref={ZRichTextsRef2}
|
|
|
|
+ myUrl='cms/order/upload'
|
|
|
|
+ topType={topType}
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ ) : null}
|
|
|
|
+
|
|
|
|
+ {['DS'].includes(topType) ? (
|
|
|
|
+ <>
|
|
|
|
+ <Form.Item
|
|
|
|
+ label='定损报价'
|
|
|
|
+ name='price'
|
|
|
|
+ rules={[{ required: true, message: '请输入内容!' }]}
|
|
|
|
+ >
|
|
|
|
+ <InputNumber
|
|
|
|
+ style={{ width: 300 }}
|
|
|
|
+ placeholder='请输入数字,支持小数点后两位'
|
|
|
|
+ precision={2}
|
|
|
|
+ />
|
|
|
|
+ </Form.Item>
|
|
|
|
+
|
|
|
|
+ <Form.Item label='报损单发送对象' name='user'>
|
|
|
|
+ <Input maxLength={30} showCount placeholder='请输入内容' />
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </>
|
|
|
|
+ ) : null}
|
|
|
|
+
|
|
<div className='formBox'>
|
|
<div className='formBox'>
|
|
<div className='formBoxLL'>备注:</div>
|
|
<div className='formBoxLL'>备注:</div>
|
|
<div className='formBoxRR'>
|
|
<div className='formBoxRR'>
|