|
@@ -1,5 +1,5 @@
|
|
|
import React from 'react';
|
|
|
-import { Button, message, Spin , Alert } from 'antd';
|
|
|
+import { Button, message, Spin , Alert , Modal } from 'antd';
|
|
|
import { $Axios } from '../../common/publish';
|
|
|
import '../Layout/Layout.scss'
|
|
|
import styleData from '../moduleCss/style.module.scss';
|
|
@@ -19,7 +19,9 @@ export default class Layout extends React.Component {
|
|
|
signedType: '',
|
|
|
lodings : true,
|
|
|
btnType : '',
|
|
|
- registerRole :''
|
|
|
+ registerRole :'',
|
|
|
+ isModalVisible: false,
|
|
|
+ modalTxt : ''
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -30,7 +32,7 @@ export default class Layout extends React.Component {
|
|
|
}
|
|
|
|
|
|
handleChange(value) {
|
|
|
- console.log(`Selected: ${value}`);
|
|
|
+
|
|
|
}
|
|
|
bindRef_o = ref => { this.CenterO = ref }
|
|
|
bindRef_w = ref => { this.CenterW = ref }
|
|
@@ -90,6 +92,11 @@ export default class Layout extends React.Component {
|
|
|
flag = false
|
|
|
return flag
|
|
|
};
|
|
|
+ if (data.businessAddress == '') {
|
|
|
+ this.messageTK('请输入经营地址')
|
|
|
+ flag = false
|
|
|
+ return flag
|
|
|
+ };
|
|
|
if(data.desireAuth == 'DESIRE_MOBILEINFO'){
|
|
|
if (data.legalPersonName == '') {
|
|
|
this.messageTK('请输入法人姓名')
|
|
@@ -168,11 +175,30 @@ export default class Layout extends React.Component {
|
|
|
flag = false
|
|
|
return flag
|
|
|
};
|
|
|
+ if (data.businessLicensePath == '') {
|
|
|
+ this.messageTK('请上传营业执照照片')
|
|
|
+ flag = false
|
|
|
+ return flag
|
|
|
+ };
|
|
|
+ if (data.openAccountPath == '') {
|
|
|
+ this.messageTK('请上传开户许可证照片')
|
|
|
+ flag = false
|
|
|
+ return flag
|
|
|
+ };
|
|
|
+ if (data.holdingIdCardPath == '') {
|
|
|
+ this.messageTK('请上传法人手持证件照片')
|
|
|
+ flag = false
|
|
|
+ return flag
|
|
|
+ };
|
|
|
+ if (data.legalPersonBankCardPath == '') {
|
|
|
+ this.messageTK('请上传法人银行卡照片')
|
|
|
+ flag = false
|
|
|
+ return flag
|
|
|
+ };
|
|
|
return flag
|
|
|
|
|
|
} else if (e == 3) {
|
|
|
data = JSON.parse(localStorage.getItem('sData'));
|
|
|
- console.log(data)
|
|
|
if (data.accountName == '') {
|
|
|
this.messageTK('请输入开户名称')
|
|
|
flag = false
|
|
@@ -236,7 +262,6 @@ export default class Layout extends React.Component {
|
|
|
let that_ = this;
|
|
|
that_.setState({lodings : true});
|
|
|
that_.CenterO.childMethod() //第一页跳第二页保存第一页数据
|
|
|
- // let flag = true
|
|
|
let flag = that_.Validation_data(1);//验证第一页数据 所有必填项是否获得数据
|
|
|
if(flag == false){
|
|
|
that_.setState({lodings : false})
|
|
@@ -354,12 +379,15 @@ export default class Layout extends React.Component {
|
|
|
let merchantType = JSON.parse(localStorage.getItem('userData')).merchantType;
|
|
|
let merchantNo = JSON.parse(localStorage.getItem('userData')).merchantNo;
|
|
|
let mallId = JSON.parse(localStorage.getItem('userData')).mallId; //上游提供
|
|
|
+ let odata = localStorage.getItem('oData');
|
|
|
+ let wdata = localStorage.getItem('wData');
|
|
|
+ let sdata = localStorage.getItem('sData');
|
|
|
let that_ = this;
|
|
|
let url = '/payment/merchant.declaration.groovy'
|
|
|
let params = {
|
|
|
operationType: 'CREATE', // :1:CREATE创建即入网,2:MODIFY更新即修改(审核通过前)
|
|
|
name: JSON.parse(localStorage.getItem('userData')).userName,
|
|
|
- appName: merchantNo,
|
|
|
+ appName: merchantType == 2 ? merchantNo : '',
|
|
|
parentAppName: merchantType == 2 ? mallId : '',
|
|
|
mallId: merchantType == 3 ? mallId : '',
|
|
|
merchantNo: merchantNo,//上游提供
|
|
@@ -368,17 +396,17 @@ export default class Layout extends React.Component {
|
|
|
requestId: '', //订单号为商户自行拟定,提交的订单号必须在自身平台交易中唯一。商户平台不能以相同的订单号再次提交。
|
|
|
operationType: 'CREATE', // :1:CREATE创建即入网,2:MODIFY更新即修改(审核通过前)
|
|
|
notifyUrl: '',//服务器通知:当订单状态发生变更后会向该地址发送五次通知,该地址可以带参数,如:“https://www.5upay.com/callback.action?test=test”.注意:如不填notifyUrl的参数值成功后您的服务器将得不到通知。
|
|
|
- extendedParameters: {//autoReview 是否跳过流程 TRUE 是, FALSE 否 sendActiveEmail 是否发送激活邮件 TRUE 是, FALSE 否 (这两项参数传递用”,”隔开,示例:autoReview:FALSE,sendActiveEmail:TRUE)
|
|
|
- autoReview: false, sendActiveEmail: true
|
|
|
- },
|
|
|
- baseInfo: this.state.Params_o,
|
|
|
- bankCardInfo : this.state.Params_S,
|
|
|
+ extendedParameters: //autoReview 是否跳过流程 TRUE 是, FALSE 否 sendActiveEmail 是否发送激活邮件 TRUE 是, FALSE 否 (这两项参数传递用”,”隔开,示例:autoReview:FALSE,sendActiveEmail:TRUE)
|
|
|
+ 'autoReview: FALSE,sendActiveEmail: TRUE'
|
|
|
+ ,
|
|
|
+ baseInfo: JSON.parse(odata),
|
|
|
+ bankCardInfo : JSON.parse(sdata),
|
|
|
desireAuthInfo :{
|
|
|
- legalPersonName : this.state.Params_o.legalPersonName,
|
|
|
- legalPersonIdNo : this.state.Params_o.legalPersonIdNo,
|
|
|
- legalPersonPhoneNo : this.state.Params_o.legalPersonPhoneNo
|
|
|
+ legalPersonName : odata.legalPersonName,
|
|
|
+ legalPersonIdNo : odata.legalPersonIdNo,
|
|
|
+ legalPersonPhoneNo : odata.legalPersonPhoneNo
|
|
|
},
|
|
|
- certificateInfo : this.state.Params_w,
|
|
|
+ certificateInfo : JSON.parse(wdata),
|
|
|
certificateContacts : '',
|
|
|
contractInfo : '',
|
|
|
paymentProfiles : '',
|
|
@@ -387,17 +415,61 @@ export default class Layout extends React.Component {
|
|
|
// Object.assign(, this.state.Params_w, this.state.Params_S),
|
|
|
}
|
|
|
}
|
|
|
- $Axios('get', url, params, (res) => {
|
|
|
- console.log(res)
|
|
|
- that_.setState({lodings : false});
|
|
|
+ let contactName = JSON.parse(odata).contactName;
|
|
|
+ let legalPersonName = JSON.parse(odata).legalPersonName;
|
|
|
+ let legalPersonName_2 = JSON.parse(wdata).legalPersonName;
|
|
|
+ let accountName = JSON.parse(sdata).accountName;
|
|
|
+ if(contactName == legalPersonName){
|
|
|
+ if(contactName == legalPersonName_2){
|
|
|
+ if(contactName == accountName){
|
|
|
+ $Axios('get', url, params, (res) => {
|
|
|
+ let data = res.data.body.msg;
|
|
|
+ if(data == '请求成功'){
|
|
|
+ that_.setState({
|
|
|
+ isModalVisibleImg : true,
|
|
|
+ modalTxt : '申请已提交,请等待审核。'
|
|
|
+ })
|
|
|
+ that_.countDown('申请已提交,请等待审核。')
|
|
|
+ }else{
|
|
|
+ that_.setState({
|
|
|
+ isModalVisibleImg : true,
|
|
|
+ modalTxt : data
|
|
|
+ })
|
|
|
+ that_.countDown(data)
|
|
|
+ }
|
|
|
+ that_.setState({lodings : false});
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ that_.messageTK('联系人姓名需与结算信息内开户名称一致')
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ that_.messageTK('联系人姓名需与资质信息内法人姓名一致')
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ that_.messageTK('联系人姓名需与基本信息内法人姓名一致')
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
+ handleOk_c(){ //关闭弹框
|
|
|
+ this.setState({
|
|
|
+ isModalVisibleImg : false,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ countDown (e) {
|
|
|
+ let secondsToGo = 5;
|
|
|
+ const modal = Modal.success({
|
|
|
+ title: e,
|
|
|
+ });
|
|
|
+ setTimeout(() => {
|
|
|
+ modal.destroy();
|
|
|
+ }, secondsToGo * 1000);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
render() {
|
|
|
- const { headTxt, htmls , lodings , btnType } = this.state;
|
|
|
+ const { headTxt, htmls , lodings , btnType ,isModalVisibleImg , modalTxt } = this.state;
|
|
|
return (
|
|
|
<div className={styleData.rootDom}>
|
|
|
<div className={styleData.header_center}>
|
|
@@ -427,6 +499,24 @@ export default class Layout extends React.Component {
|
|
|
{htmls === 3 && lodings == false && <Button className={styleData.btn, styleData.btn_next} type="primary" onClick={() => this.btnClick('ok')} loading={btnType}>提交</Button>}
|
|
|
</div>
|
|
|
</div>
|
|
|
+ {/* <Modal title="入网结果"
|
|
|
+ footer={[]}
|
|
|
+ visible={isModalVisibleImg}
|
|
|
+ closable={true}
|
|
|
+ onCancel={this.handleOk_c.bind(this)}
|
|
|
+ >
|
|
|
+ <div style={{
|
|
|
+ width: '95%',
|
|
|
+ height: '200px',
|
|
|
+ textAlign : 'center',
|
|
|
+ fontSize : '20px',
|
|
|
+ color : '#ccc',
|
|
|
+ lineHeight : '200px',
|
|
|
+ overflow:'auto'
|
|
|
+ }}>
|
|
|
+ {modalTxt}
|
|
|
+ </div>
|
|
|
+ </Modal> */}
|
|
|
</div>
|
|
|
)
|
|
|
}
|