Commit 563b6190 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: e账户企业认证已签约但没有提交刷新页面显示对应的签约合同号

parent 3cc799a9
......@@ -5,7 +5,7 @@ import MellowCard from '@/components/MellowCard';
import { BIND_PHONE, EDetailContext, formItemLayout, formItemLayoutCompany, prefixSelector, prefixSelectorEle, tailFormItemLayout, tailFormItemLayoutCompany } from '../../constant';
import { EditOutlined } from '@ant-design/icons';
import UploadImage from '@/components/UploadImage';
import { getPayAllInPayGetBankList, postPayAllInPayBindCompanyAccount, postPayAllInPayBindPhone, postPayAllInPayIdCardCollect, postPayAllInPaySendVerificationCode, postPayAllInPaySetCompanyInfo, postPayAllInPaySignContract } from '@/services/PayV2Api';
import { getPayAllInPayGetBankList, postPayAllInPayBindCompanyAccount, postPayAllInPayBindPhone, postPayAllInPayIdCardCollect, postPayAllInPaySendVerificationCode, postPayAllInPaySetCompanyInfo, postPayAllInPaySignContract, postPayAllInPaySignContractQuery } from '@/services/PayV2Api';
import useCountDown from '@/utils/hooks';
/** 图片key对应的picType值 */
......@@ -117,9 +117,17 @@ const Company: React.FC<{}> = () => {
}
}
const contractPreview = async () => {
const {code, data} = await postPayAllInPaySignContractQuery({jumpPageType:1}, { ctlType: 'none' })
if(code === 1000) {
var signLink = document.getElementById('signPrewview')
signLink.setAttribute('href', data)
signLink.click()
}
}
const handleSendSMS = () => {
formPhone.validateFields(['phone']).then(result => {
console.log(result)
// 发送验证码
postPayAllInPaySendVerificationCode({ ...result, verificationCodeType: BIND_PHONE }).then(res => {
res.code === 1000 && start()
......@@ -447,7 +455,13 @@ const Company: React.FC<{}> = () => {
label={intl.formatMessage({ id: 'payandSettle.eAccountApprove.components.company.mellowCard.2.electric' })}
name="electric"
>
<Button onClick={clickSign} icon={<EditOutlined />} style={{ width: '100%' }}>{intl.formatMessage({ id: 'payandSettle.eAccountApprove.components.company.mellowCard.2.electric.button' })}</Button>
{
data?.contractNo
?
<Button type="link" onClick={contractPreview}>{data.contractNo}</Button>
:
<Button onClick={clickSign} icon={<EditOutlined />} style={{ width: '100%' }}>{intl.formatMessage({ id: 'payandSettle.eAccountApprove.components.company.mellowCard.2.electric.button' })}</Button>
}
</Form.Item>
<Form.Item {...tailFormItemLayout}>
......@@ -536,7 +550,9 @@ const Company: React.FC<{}> = () => {
</Form>
</MellowCard>
}
<a href="" target="_bank" id="signLink" style={{display: 'none', visibility: "hidden"}}></a>
<a href="" target="_blank" id="signPrewview" style={{display: 'none', visibility: "hidden"}}></a>
</>)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment