Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh into master
| | |
| | | export const debug = { |
| | | // web服务 |
| | | // baseUrl: 'http://gz.hugeinfo.com.cn', |
| | | baseUrl: "http://fydddb.natappfree.cc", |
| | | baseUrl: "http://sbv8tf.natappfree.cc", |
| | | // baseUrl: 'http://mdqgnh.natappfree.cc', |
| | | |
| | | // 附件服务 |
| | | fileUrl: "http://fydddb.natappfree.cc", |
| | | fileUrl: "http://sbv8tf.natappfree.cc", |
| | | // fileUrl: 'http://gz.hugeinfo.com.cn', |
| | | |
| | | // 文件查看url 后面接附件编号 |
| | |
| | | * label *, // form的label名 |
| | | * editData *, // 编辑回显数据 |
| | | * handleDelFile *,//删除文件接口 |
| | | * ownerType,//用于回显文件 |
| | | */ |
| | | |
| | | export default function ArcoUpload(props) { |
| | |
| | | |
| | | useEffect(() => { |
| | | if (props.editData) { |
| | | console.log(props.editData[props.field]); |
| | | setMyFileList(props.editData[props.field]) |
| | | if(props.editData[props.field]) { |
| | | //新增的时候有file数据,可以这样子回显 |
| | | setMyFileList(props.editData[props.field]) |
| | | } else { |
| | | //编辑的时候,文件统一放在filInfoList了,需要设置ownerType获取到该材料文件回显 |
| | | const fileInfoList = props.editData.fileInfoList |
| | | if(fileInfoList && fileInfoList.length != 0) { |
| | | let file = []; |
| | | fileInfoList.forEach(item => { |
| | | if(item.ownerType == props.ownerType) { |
| | | file.push(item.fileList[0]) |
| | | } |
| | | }) |
| | | setMyFileList(file) |
| | | } |
| | | } |
| | | } |
| | | }, [props.editData]) |
| | | |
| | |
| | | }} |
| | | headers={{ Authorization: $$.getSessionStorage('customerSystemToken') }} |
| | | onChange={(fileList, file) => { |
| | | const { status, response } = file |
| | | const { status, response, uid } = file |
| | | console.log(fileList, file); |
| | | //因为字节upLoad组件有bug,不能区分添加文件还是删除文件,所以用这种办法来判断是不是删除 |
| | | const isDel = myFileList && myFileList.length > fileList.length |
| | | //上传失败 |
| | |
| | | } |
| | | //删除文件 |
| | | if (isDel && props.handleDelFile) { |
| | | props.handleDelFile(response.data[0].id) |
| | | if(response) { |
| | | //删除的是新提交的 |
| | | props.handleDelFile(response.data[0].id) |
| | | } else { |
| | | //删除的是回显的文件 |
| | | props.handleDelFile(uid) |
| | | } |
| | | |
| | | } |
| | | handleFileListChange(fileList); |
| | | setMyFileList(fileList) |
| | |
| | | [ |
| | | { |
| | | label: '登记企业材料', |
| | | value: <a href="your-link-here.html" target="_blank"> |
| | | <img src={link} alt="" className="title-file" />广东好又多餐饮有限公司营业执照.pdf |
| | | </a>, |
| | | value: '', |
| | | isFile: true, |
| | | field: 'file', |
| | | }, |
| | | { |
| | | label: '法定代表人身份证明材料', |
| | | value: <a href="your-link-here.html" target="_blank"> |
| | | <img src={link} alt="" className="title-file" />江照月个人身份.pdf |
| | | </a>, |
| | | value: '', |
| | | isFile: true, |
| | | field: 'file1', |
| | | }, |
| | |
| | | [ |
| | | { |
| | | label: '机构登记材料', |
| | | value: <a href="your-link-here.html" target="_blank"> |
| | | <img src={link} alt="" className="title-file" />广东好又多餐饮有限公司营业执照.pdf |
| | | </a>, |
| | | value: '', |
| | | isFile: true, |
| | | field: 'file', |
| | | }, |
| | | { |
| | | label: '机构代表人身份证明材料', |
| | | value: <a href="your-link-here.html" target="_blank"> |
| | | <img src={link} alt="" className="title-file" />江照月个人身份.pdf |
| | | </a>, |
| | | value: '', |
| | | isFile: true, |
| | | field: 'file1', |
| | | }, |
| | |
| | | [ |
| | | { |
| | | label: '身份证明材料', |
| | | value: <a href="your-link-here.html" target="_blank"> |
| | | <img src={link} alt="" className="title-file" />广东好又多餐饮有限公司营业执照.pdf |
| | | </a>, |
| | | value: '', |
| | | isFile: true, |
| | | field: 'file', |
| | | }, |
| | | { |
| | | label: '代理人授权委托书', |
| | | value: <a href="your-link-here.html" target="_blank"> |
| | | <img src={link} alt="" className="title-file" />江照月个人身份.pdf |
| | | </a>, |
| | | value: '', |
| | | isFile: true, |
| | | field: 'file1', |
| | | }, |
| | |
| | | } |
| | | </table> |
| | | {/* 重复来访重点人员 */} |
| | | <div style={{ width: 'calc(100% - 9px)', background: '#f2f3f5', marginBottom: '20px', padding: '12px' }}> |
| | | {/* <div style={{ width: 'calc(100% - 9px)', background: '#f2f3f5', marginBottom: '20px', padding: '12px' }}> |
| | | <KeyVisits /> |
| | | </div> |
| | | </div> */} |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | <Col span={24} className="doubleFile"> |
| | | <ArcoUpload |
| | | params={{ |
| | | action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.caseId}&ownerId=${id}&ownerType=22_00018-520`, |
| | | action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.caseId}&ownerId=${id}&ownerType=22_00018-510`, |
| | | }} |
| | | field='file' |
| | | label='附件材料' |
| | |
| | | |
| | | if (res.type) { |
| | | let data = res.data |
| | | const partyList = data.personList.concat(data.agentList) |
| | | setInfoData({ |
| | | ...data, |
| | | questionName: data.queProvName === null ? '-' : data.queProvName + '/' + data.queCityName + '/' + data.queAreaName + '/' + data.queRoadName + '/' + data.queVillageName, |
| | | caseType: data.caseTypeFirstName === null ? '-' : data.caseTypeFirstName + '/' + data.caseTypeName |
| | | }) |
| | | setFakeData(data.personList.concat(data.agentList)) |
| | | setFakeData(partyList.map(item => { |
| | | const fileInfoList = item.fileInfoList |
| | | let file = [];//身份证明材料、企业登记材料 |
| | | let file1 = [];//法人、机构身份证明材料、代理人授权委托书 |
| | | if (fileInfoList && fileInfoList.length != 0) { |
| | | fileInfoList.forEach(item => { |
| | | if (item.ownerType == '22_00018-202' || item.ownerType == '22_00018-203') { |
| | | file.push({ |
| | | name: item.fileList[0].trueName, |
| | | uid: item.fileList[0].id, |
| | | }) |
| | | } |
| | | if (item.ownerType == '22_00018-204' || item.ownerType == '22_00018-207') { |
| | | file1.push({ |
| | | name: item.fileList[0].trueName, |
| | | uid: item.fileList[0].id, |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | return { |
| | | ...item, |
| | | file, |
| | | file1 |
| | | } |
| | | })) |
| | | } |
| | | |
| | | } |
| | |
| | | label='身份证明材料' |
| | | editData={props.editData} |
| | | handleDelFile={handleDelFile} |
| | | ownerType='22_00018-202' |
| | | /> |
| | | </Col> |
| | | <Col span={24} className="doubleFile"> |
| | | <ArcoUpload |
| | | params={{ |
| | | action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&ownerId=${id}&ownerType=22_00018-202`, |
| | | action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&ownerId=${id}&ownerType=22_00018-207`, |
| | | }} |
| | | field='file1' |
| | | label='代理人委托书' |
| | | editData={props.editData} |
| | | ownerType='22_00018-207' |
| | | /> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | </Row> |
| | | |
| | | {/* 重复来访重点人员 */} |
| | | <div style={{ width: 'calc(100% - 9px)', background: '#f2f3f5', marginBottom: '20px', padding: '12px' }}> |
| | | {/* <div style={{ width: 'calc(100% - 9px)', background: '#f2f3f5', marginBottom: '20px', padding: '12px' }}> |
| | | <KeyVisits /> |
| | | </div> |
| | | </div> */} |
| | | </Scrollbars> |
| | | <div className='dialogFooter'> |
| | | <Button |
| | |
| | | |
| | | useEffect(() => { |
| | | if (props.editData) { |
| | | console.log(props.editData); |
| | | //编辑 |
| | | formRef.current.setFieldsValue({ |
| | | ...props.editData |
| | |
| | | label='身份证明材料' |
| | | editData={props.editData} |
| | | handleDelFile={handleDelFile} |
| | | ownerType='22_00018-202' |
| | | /> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | <Col span={24} className="doubleFile"> |
| | | <ArcoUpload |
| | | params={{ |
| | | action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&ownerId=${id}&ownerType=22_00018-202`, |
| | | action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&ownerId=${id}&ownerType=22_00018-203`, |
| | | }} |
| | | field='file' |
| | | label={isLegal ? '企业登记材料' : '机构登记材料'} |
| | | editData={props.editData} |
| | | handleDelFile={handleDelFile} |
| | | ownerType='22_00018-203' |
| | | /> |
| | | </Col> |
| | | <Col span={24} className="doubleFile"> |
| | | <ArcoUpload |
| | | params={{ |
| | | action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&ownerId=${id}&ownerType=22_00018-202`, |
| | | action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&ownerId=${id}&ownerType=22_00018-204`, |
| | | }} |
| | | field='file1' |
| | | label={isLegal ? '法定代表人身份证明材料' : '机构代表人身份证明材料'} |
| | | editData={props.editData} |
| | | handleDelFile={handleDelFile} |
| | | ownerType='22_00018-204' |
| | | /> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | formRef.current.validate(undefined, (errors, values) => { |
| | | if (!errors) { |
| | | const fieldValue = formRef.current.getFields() |
| | | console.log(fieldValue); |
| | | if (props.editData) { |
| | | props.handleAddParty({ |
| | | ...fieldValue |
| | |
| | | </Row> |
| | | |
| | | {/* 重复来访重点人员 */} |
| | | <div style={{ width: 'calc(100% - 9px)', background: '#f2f3f5', marginBottom: '20px', padding: '12px' }}> |
| | | {/* <div style={{ width: 'calc(100% - 9px)', background: '#f2f3f5', marginBottom: '20px', padding: '12px' }}> |
| | | <KeyVisits /> |
| | | </div> |
| | | </div> */} |
| | | </Scrollbars> |
| | | <div className='dialogFooter'> |
| | | <Button |
| | |
| | | } |
| | | }, [fakeData]) |
| | | |
| | | useEffect(() => { |
| | | console.log(props.partyList); |
| | | setFakeData(props.partyList.map(item => { |
| | | const fileInfoList = item.fileInfoList |
| | | let file = [];//身份证明材料、企业登记材料 |
| | | let file1 = [];//法人、机构身份证明材料、代理人授权委托书 |
| | | if (fileInfoList && fileInfoList.length != 0) { |
| | | fileInfoList.forEach(item => { |
| | | if (item.ownerType == '22_00018-202' || item.ownerType == '22_00018-203') { |
| | | file.push({ |
| | | name: item.fileList[0].trueName, |
| | | uid: item.fileList[0].id, |
| | | }) |
| | | } |
| | | if (item.ownerType == '22_00018-204' || item.ownerType == '22_00018-207') { |
| | | file1.push({ |
| | | name: item.fileList[0].trueName, |
| | | uid: item.fileList[0].id, |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | return { |
| | | ...item, |
| | | file, |
| | | file1 |
| | | } |
| | | })) |
| | | }, [props.partyList]) |
| | | |
| | | //获取当前时间 |
| | | const getFormattedDateTime = () => { |
| | | let now = new Date(); |
| | |
| | | |
| | | //添加当事人 |
| | | const handleAddParty = (value, isEdit) => { |
| | | console.log(value, isEdit); |
| | | console.log(value); |
| | | if (isEdit) { |
| | | //编辑 |
| | | const newList = fakeData.map(item => { |
| | |
| | | <div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h4>事件材料</h4> |
| | | </Space> |
| | | </Col> |
| | | <FileTable mainId={props.mainId}/> |
| | | <FileTable mainId={props.mainId} /> |
| | | |
| | | <DocumentScanner |
| | | visible={scanFile} |
| | |
| | | } |
| | | |
| | | function getDetailData(id) { |
| | | return $$.ax.request({ url: `/casedraftInfo/getCasedraftInfo?id=${id}`, type: 'get', service: 'mediate' }); |
| | | return $$.ax.request({ url: `casedraftInfo/getCasedraftInfo?id=${id}`, type: 'get', service: 'mediate' }); |
| | | } |
| | | |
| | | |
| | |
| | | const [isReview, setIsReview] = useState(false);//预览页面控制 |
| | | const [current, setCurrent] = useState(1); |
| | | const [id, setId] = useState(); |
| | | const [partyList, setPartyList] = useState([]);//当事人信息,用于子组件回显 |
| | | |
| | | useEffect(() => { |
| | | if (routeData.id) { |
| | |
| | | const getDeatil = async (id) => { |
| | | const res = await getDetailData(id) |
| | | if (res.type) { |
| | | console.log(res); |
| | | const { agentList, personList, ...rest } = res.data |
| | | const parList = agentList.concat(personList) |
| | | formRef.current.setFieldsValue({ |
| | | ...rest, |
| | | fakeData: agentList.concat(personList), |
| | | fakeData: parList, |
| | | myCaseType: [rest.caseTypeFirst, rest.caseType], |
| | | myQuesAddress: rest.queRoad ? [rest.queProv, rest.queCity, rest.queArea, rest.queRoad] : undefined |
| | | }) |
| | | setPartyList(parList) |
| | | } |
| | | } |
| | | |
| | |
| | | </Steps> |
| | | </div> |
| | | <Preview style={{ display: isReview ? '' : 'none' }} data={formRef?.current?.getFields()} /> |
| | | <VisitorRegister formRef={formRef} style={{ display: isReview ? 'none' : '' }} mainId={id} /> |
| | | <VisitorRegister formRef={formRef} style={{ display: isReview ? 'none' : '' }} mainId={id} partyList={partyList} /> |
| | | <div className="dataSync-excel"> |
| | | <Space size="large" style={{ margin: '4px 14px' }}> |
| | | <Button type="primary" style={{ backgroundColor: '#1A6FB8' }} onClick={handleSave} >保存</Button> |