forked from gzzfw/frontEnd/gzDyh

dminyi
2024-09-08 ee9bd5cee3fe552b5f788e2af2dcd2daee6087f0
Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh into master
9 files modified
152 ■■■■ changed files
gz-customerSystem/src/api/appUrl.js 4 ●●●● patch | view | raw | blame | history
gz-customerSystem/src/components/ArcoUpload/index.jsx 27 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/components/personCard/DetailDialog.jsx 28 ●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/eventFlow/component/BackModel.jsx 2 ●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/matterDetail/index.jsx 28 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/component/agentDialog.jsx 8 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/component/applyDialog.jsx 13 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx 32 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/visit/index.jsx 10 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/api/appUrl.js
@@ -10,11 +10,11 @@
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 后面接附件编号
gz-customerSystem/src/components/ArcoUpload/index.jsx
@@ -23,6 +23,7 @@
 * label *, // form的label名
 * editData *, // 编辑回显数据
 * handleDelFile *,//删除文件接口
 * ownerType,//用于回显文件
 */
export default function ArcoUpload(props) {
@@ -36,8 +37,22 @@
  useEffect(() => {
    if (props.editData) {
      console.log(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])
@@ -60,7 +75,8 @@
          }}
          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
            //上传失败
@@ -79,7 +95,14 @@
            }
            //删除文件
            if (isDel && props.handleDelFile) {
              if(response) {
                //删除的是新提交的
              props.handleDelFile(response.data[0].id)
              } else {
                //删除的是回显的文件
                props.handleDelFile(uid)
              }
            }
            handleFileListChange(fileList);
            setMyFileList(fileList)
gz-customerSystem/src/components/personCard/DetailDialog.jsx
@@ -124,17 +124,13 @@
    [
      {
        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',
      },
@@ -189,17 +185,13 @@
    [
      {
        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',
      },
@@ -290,17 +282,13 @@
    [
      {
        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',
      },
@@ -394,9 +382,9 @@
        }
      </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>
  )
}
gz-customerSystem/src/views/register/eventFlow/component/BackModel.jsx
@@ -134,7 +134,7 @@
            <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='附件材料'
gz-customerSystem/src/views/register/matterDetail/index.jsx
@@ -128,12 +128,38 @@
    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
        }
      }))
    }
  }
gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
@@ -131,16 +131,18 @@
                    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}>
@@ -318,9 +320,9 @@
        </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
gz-customerSystem/src/views/register/visit/component/applyDialog.jsx
@@ -41,6 +41,7 @@
  useEffect(() => {
    if (props.editData) {
      console.log(props.editData);
      //编辑
      formRef.current.setFieldsValue({
        ...props.editData
@@ -108,6 +109,7 @@
              label='身份证明材料'
              editData={props.editData}
              handleDelFile={handleDelFile}
              ownerType='22_00018-202'
            />
          </Col>
          <Col span={12}>
@@ -238,23 +240,25 @@
          <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}>
@@ -328,7 +332,6 @@
      formRef.current.validate(undefined, (errors, values) => {
        if (!errors) {
          const fieldValue = formRef.current.getFields()
          console.log(fieldValue);
          if (props.editData) {
            props.handleAddParty({
              ...fieldValue
@@ -393,9 +396,9 @@
        </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
gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
@@ -48,6 +48,36 @@
    }
  }, [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();
@@ -85,7 +115,7 @@
  //添加当事人
  const handleAddParty = (value, isEdit) => {
    console.log(value, isEdit);
    console.log(value);
    if (isEdit) {
      //编辑
      const newList = fakeData.map(item => {
gz-customerSystem/src/views/register/visit/index.jsx
@@ -34,7 +34,7 @@
}
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' });
}
@@ -45,6 +45,7 @@
    const [isReview, setIsReview] = useState(false);//预览页面控制
    const [current, setCurrent] = useState(1);
    const [id, setId] = useState();
    const [partyList, setPartyList] = useState([]);//当事人信息,用于子组件回显
    useEffect(() => {
        if (routeData.id) {
@@ -60,14 +61,15 @@
    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)
        }
    }
@@ -189,7 +191,7 @@
                        </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>