Commit d9e3d760 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

fix: 电子合同接口引入修改

parent 1fb662be
......@@ -3,11 +3,11 @@ import { history } from 'umi';
import { Form, Input, Upload, Card, Tooltip, Button, message, Badge, Popconfirm } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ReutrnEle from '@/components/ReturnEle';
import { PublicApi } from '@/services/api'
import { UploadFile, UploadChangeParam } from 'antd/lib/upload/interface';
import { UPLOAD_TYPE } from '@/constants'
import { QuestionCircleOutlined, StarOutlined, FileWordFilled, UploadOutlined, DeleteOutlined } from '@ant-design/icons';
import styles from './index.less'
import { getContractContractTemplateExample, getContractContractTemplateGet, getContractContractTemplatePreview, postContractContractTemplateAdd, postContractContractTemplateUpdate } from '@/services/ContractV2Api';
export interface parmas {
page_type?: string,
......@@ -54,7 +54,7 @@ const AddContract: React.FC<parmas> = (props) => {
/**合同模板样例查询 */
useEffect(() => {
PublicApi.getContractContractTemplateExample().then(res => {
getContractContractTemplateExample().then(res => {
setFileExampleUrl(res.data)
})
}, [])
......@@ -62,14 +62,14 @@ const AddContract: React.FC<parmas> = (props) => {
/**新增&修改 */
const sharedFn = async (parmas: any) => {
if (page_type === 'add') {
await PublicApi.postContractContractTemplateAdd(parmas).then(res => {
await postContractContractTemplateAdd(parmas).then(res => {
setTimeout(() => {
history.goBack()
}, 1000)
})
} else {
parmas.id = id;
await PublicApi.postContractContractTemplateUpdate(parmas).then(res => {
await postContractContractTemplateUpdate(parmas).then(res => {
setTimeout(() => {
history.goBack()
}, 1000)
......@@ -111,7 +111,7 @@ const AddContract: React.FC<parmas> = (props) => {
/**班级查看数据 */
useEffect(() => {
if (id) {
PublicApi.getContractContractTemplateGet({ id }).then(res => {
getContractContractTemplateGet({ id }).then(res => {
setData(res.data);
setUploadFile({
name: res.data.fileName,
......@@ -130,7 +130,7 @@ const AddContract: React.FC<parmas> = (props) => {
}
/**预览 */
const onView = async (file: any) => {
await PublicApi.getContractContractTemplatePreview({
await getContractContractTemplatePreview({
contractName: file.name,
contractUrl: file.file
}).then(res => {
......
......@@ -4,9 +4,8 @@ import { history } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { ExclamationCircleFilled, CheckCircleFilled, ClockCircleFilled, CloseCircleFilled } from '@ant-design/icons';
import { Descriptions, Button } from 'antd';
import div from './../../../editor/configs/componentConfigs/HTML/div';
import { PublicApi } from '@/services/api';
import Test from '../components/test'
import { getContractSignatureAuthGet, postContractSignatureAuthApply } from '@/services/ContractV2Api';
const Apply = () => {
const ref = useRef<any>({});
......@@ -40,7 +39,7 @@ const Apply = () => {
/**电子签章认证查询 */
useEffect(() => {
PublicApi.getContractSignatureAuthGet({}).then((res: any) => {
getContractSignatureAuthGet({}).then((res: any) => {
setData(res.data)
})
}, [])
......@@ -50,14 +49,14 @@ const Apply = () => {
if (ref && data.state === 1) {
const vaildDetail = await ref.current.validateFields();
if (vaildDetail) {
await PublicApi.postContractSignatureAuthApply({}).then(res => {
await postContractSignatureAuthApply({}).then(res => {
setSignatureAuthLogId(res.data.signatureAuthLogId);
sessionStorage.setItem('signatureAuthLogId', res.data.signatureAuthLogId.toString())
history.push(`/memberCenter/tranactionAbility/electronicContracts/apply/enterpriseCertified?authTypeEdit=${authType}`)
})
}
} else {
await PublicApi.postContractSignatureAuthApply({}).then(res => {
await postContractSignatureAuthApply({}).then(res => {
setSignatureAuthLogId(res.data.signatureAuthLogId);
sessionStorage.setItem('signatureAuthLogId', res.data.signatureAuthLogId.toString())
history.push(`/memberCenter/tranactionAbility/electronicContracts/apply/enterpriseCertified?authTypeEdit=${authType}`)
......
......@@ -4,7 +4,7 @@ import { Card, Row, Col, Input, Button } from 'antd';
import statuStyle from '../../common/colorTag'
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import { PublicApi } from '@/services/api'
import { getContractContractParamPage } from '@/services/ContractV2Api';
const ClassSearch = () => {
const ref = useRef<any>({});
......@@ -36,7 +36,7 @@ const ClassSearch = () => {
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
PublicApi.getContractContractParamPage({ ...filterParams, ...params }).then(res => {
getContractContractParamPage({ ...filterParams, ...params }).then(res => {
resolve(res.data)
})
})
......
......@@ -3,7 +3,8 @@ import { Button, Row, Col, Form, Input, Select } from 'antd'
import styles from '../index.less'
import cx from 'classnames'
import { QuestionCircleOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import { postContractSignatureAuthAgentAuth } from '@/services/ContractV2Api';
import { getManageCountryAreaGetTelCode } from '@/services/ManageV2Api';
interface queryProps {
authType: number,
......@@ -44,7 +45,7 @@ const Corporate: React.FC<queryProps> = (props) => {
delete value.code;
const parmas = Object.assign(query, value);
updateData(parmas)
PublicApi.postContractSignatureAuthAgentAuth(parmas).then(res => {
postContractSignatureAuthAgentAuth(parmas).then(res => {
if (res.code === 1000) {
authTypeFn(2, 2, 'company')
setPayWay(3)
......@@ -61,7 +62,7 @@ const Corporate: React.FC<queryProps> = (props) => {
useEffect(() => {
CheckPayWay(1);
PublicApi.getManageCountryAreaGetTelCode().then(res => {
getManageCountryAreaGetTelCode().then(res => {
setOptions(res.data)
})
}, [])
......
......@@ -3,8 +3,8 @@ import { history } from 'umi'
import { Result, Button, Form, Input, Row, Col, Alert, Spin } from 'antd'
import styles from '../index.less'
import { AlipaySquareFilled } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import QRCode, { QRCodeToDataURLOptions } from 'qrcode';
import { postContractSignatureAuthFaceVerify, postContractSignatureAuthLegalRepSignVerify, postContractSignatureAuthMobileVerify, postContractSignatureAuthMobileVerifyCode, postContractSignatureAuthPaymentVerify, postContractSignatureAuthPaymentVerifyAmount } from '@/services/ContractV2Api';
interface queryProps {
payWay: number,
......@@ -42,7 +42,7 @@ const PublicAccount: React.FC<queryProps> = (props) => {
quality: 0.9
}
}
PublicApi.postContractSignatureAuthFaceVerify({ signatureAuthLogId: Number(sessionStorage.getItem('signatureAuthLogId')) }).then(res => {
postContractSignatureAuthFaceVerify({ signatureAuthLogId: Number(sessionStorage.getItem('signatureAuthLogId')) }).then(res => {
QRCode.toDataURL(res.data.authUrl, options).then((url: any) => {
setQrCode(url)
console.log(res.data.authUrl)
......@@ -58,7 +58,7 @@ const PublicAccount: React.FC<queryProps> = (props) => {
/**发起对公打款验证 */
const paymentVerifyFn = () => {
delete query.orgName;
PublicApi.postContractSignatureAuthPaymentVerify(query).then(res => {
postContractSignatureAuthPaymentVerify(query).then(res => {
if(res.code === 1000) {
setPaymentVerify(1)
}
......@@ -73,7 +73,7 @@ const PublicAccount: React.FC<queryProps> = (props) => {
signatureAuthLogId: Number(sessionStorage.getItem('signatureAuthLogId')),
amount: value.amount
}
PublicApi.postContractSignatureAuthPaymentVerifyAmount(parmas).then(res => {
postContractSignatureAuthPaymentVerifyAmount(parmas).then(res => {
if(res.code === 1000) {
history.goBack()
}
......@@ -90,7 +90,7 @@ const PublicAccount: React.FC<queryProps> = (props) => {
agentName: data.transactorName,
agentIdNo: data.transactorIdNumber,
}
PublicApi.postContractSignatureAuthLegalRepSignVerify(parmas).then(res => {
postContractSignatureAuthLegalRepSignVerify(parmas).then(res => {
if(res.code === 1000) {
setVisible(true)
console.log('发送成功')
......@@ -120,7 +120,7 @@ const PublicAccount: React.FC<queryProps> = (props) => {
/** 发起手机认证*/
const handleVerifyCode = async () => {
await PublicApi.postContractSignatureAuthMobileVerify({
await postContractSignatureAuthMobileVerify({
signatureAuthLogId: Number(sessionStorage.getItem('signatureAuthLogId')),
mobileNo: data.transactorMobile
}).then(res => {
......@@ -136,7 +136,7 @@ const PublicAccount: React.FC<queryProps> = (props) => {
const onSubmit = async () => {
const value = await form.validateFields();
if(value) {
await PublicApi.postContractSignatureAuthMobileVerifyCode({
await postContractSignatureAuthMobileVerifyCode({
signatureAuthLogId: Number(sessionStorage.getItem('signatureAuthLogId')),
authcode: value.authcode
}).then(res => {
......
......@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'
import { Result, Button, Form, Input, Select, Row, Col } from 'antd'
import styles from '../index.less'
import { AlipaySquareFilled } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
import { getManageCountryAreaGetTelCode } from '@/services/ManageV2Api';
interface queryProps {
actionRef?: any,
......@@ -51,7 +51,7 @@ const Test: React.FC<queryProps> = (props) => {
actionRef.current = userAction;
}
}
PublicApi.getManageCountryAreaGetTelCode().then(res => {
getManageCountryAreaGetTelCode().then(res => {
setOptions(res.data)
})
}, [])
......
......@@ -6,7 +6,7 @@ import StepComponents from '../components/steps'
import EnterpriseInfoCheck from '../components/enterpriseInfoCheck'
import Corporate from '../components/corporate'
import PublicAccount from '../components/publicAccount'
import { PublicApi } from '@/services/api';
import { postContractSignatureAuthLegalRepAuth, postContractSignatureAuthPersonalAuth } from '@/services/ContractV2Api';
const EnterpriseCertified = () => {
const { authTypeEdit } = history.location.query; // 认证方式 1-法人认证 2-经办人认证 3-个人认证
......@@ -31,7 +31,7 @@ const EnterpriseCertified = () => {
authType,
...data
}
PublicApi.postContractSignatureAuthLegalRepAuth(parmas).then(res => {
postContractSignatureAuthLegalRepAuth(parmas).then(res => {
if(res.code === 1000) {
setStep(steps)
}
......@@ -44,7 +44,7 @@ const EnterpriseCertified = () => {
signatureAuthLogId: Number(sessionStorage.getItem('signatureAuthLogId')),
...data
}
PublicApi.postContractSignatureAuthPersonalAuth(parmas).then(res => {
postContractSignatureAuthPersonalAuth(parmas).then(res => {
if(res.code === 1000) {
setStep(steps)
}
......
......@@ -8,7 +8,7 @@ import NiceForm from '@/components/NiceForm';
import { createFormActions } from '@formily/antd';
import EyePreview from '@/components/EyePreview';
import { PlusOutlined, PlayCircleOutlined, PauseCircleOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api'
import { getContractContractTemplatePage, postContractContractTemplateDelete, postContractContractTemplateEnable } from '@/services/ContractV2Api';
const formActions = createFormActions();
const Template: React.FC<{}> = () => {
......@@ -97,7 +97,7 @@ const Template: React.FC<{}> = () => {
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
PublicApi.getContractContractTemplatePage({ ...params }).then(res => {
getContractContractTemplatePage({ ...params }).then(res => {
resolve(res.data)
})
})
......@@ -125,7 +125,7 @@ const Template: React.FC<{}> = () => {
/**合同模板停用/启用 */
const confirm = (recode: any) => {
PublicApi.postContractContractTemplateEnable({
postContractContractTemplateEnable({
id: recode.id,
state: recode.state === 1 ? 0 : 1,
}).then(res => {
......@@ -135,7 +135,7 @@ const Template: React.FC<{}> = () => {
/**删除 */
const confirmDel = (recode: any) => {
PublicApi.postContractContractTemplateDelete({ id: recode.id }).then(res => {
postContractContractTemplateDelete({ id: recode.id }).then(res => {
ref.current.reload()
})
}
......
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