|
@@ -20,7 +20,8 @@ export default class centerO extends React.Component {
|
|
|
desireAuth: '',
|
|
|
offlist : select_data.offlist,
|
|
|
validation_list : [],
|
|
|
- signedType : 'BY_SPLIT_BILL' // 默认被分帐方
|
|
|
+ signedType : 'BY_SPLIT_BILL', // 默认被分帐方
|
|
|
+ merchantInfo : JSON.parse(localStorage.getItem('merchantInfo')) == undefined ? '' : JSON.parse(localStorage.getItem('merchantInfo'))
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -31,6 +32,9 @@ export default class centerO extends React.Component {
|
|
|
desireAuth : this.state.Params.desireAuth == undefined ? 'DESIRE_VIDEO' : this.state.Params.desireAuth, // 开户意愿核实类型
|
|
|
})
|
|
|
this.initData();
|
|
|
+ if(this.state.merchantInfo !== ''){
|
|
|
+ this.initPcc();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
listTypes(e){
|
|
@@ -45,7 +49,7 @@ export default class centerO extends React.Component {
|
|
|
}
|
|
|
|
|
|
initData() {
|
|
|
- if (this.props.arr) { //初始化判断数据回填
|
|
|
+ if (this.props.arr && this.state.merchantInfo == '') { //初始化判断数据回填
|
|
|
if (this.state.Params.businessAddressProvince !== undefined) {
|
|
|
let Province = this.state.Params.businessAddressProvince;
|
|
|
let city = this.state.Params.businessAddressCity;
|
|
@@ -61,16 +65,17 @@ export default class centerO extends React.Component {
|
|
|
})
|
|
|
}
|
|
|
let signedType = this.state.Params.signedType;
|
|
|
+ let merchantInfo = this.state.merchantInfo;
|
|
|
if(signedType == 'GENERAL_SUB_MERCHANT'){
|
|
|
this.setState({
|
|
|
offlist:select_data.GENERAL_SUB_MERCHANT
|
|
|
})
|
|
|
}else{
|
|
|
- if(this.state.Params.registerRole == 'INDIVIDUAL_BUSINESS'){ //个体工商户
|
|
|
+ if(this.state.Params.registerRole == 'INDIVIDUAL_BUSINESS' || merchantInfo.baseInfo.registerRole == 'INDIVIDUAL_BUSINESS'){ //个体工商户
|
|
|
this.setState({
|
|
|
offlist:select_data.INDIVIDUAL_BUSINESS
|
|
|
})
|
|
|
- }else if(this.state.Params.registerRole == 'NATURAL_PERSON'){ //自然人
|
|
|
+ }else if(this.state.Params.registerRole == 'NATURAL_PERSON' || merchantInfo.baseInfo.registerRole == 'NATURAL_PERSON'){ //自然人
|
|
|
this.setState({
|
|
|
offlist:select_data.NATURAL_PERSON
|
|
|
})
|
|
@@ -146,6 +151,30 @@ export default class centerO extends React.Component {
|
|
|
this.state.Params.cerType = cerType;
|
|
|
}
|
|
|
|
|
|
+ initPcc(){
|
|
|
+ let registerRole = this.state.merchantInfo.baseInfo.registerRole;
|
|
|
+ this.handleChangeQy(registerRole)
|
|
|
+ let Province = this.state.merchantInfo.baseInfo.businessAddressProvince;
|
|
|
+ let city = this.state.merchantInfo.baseInfo.businessAddressCity;
|
|
|
+ let region = this.state.merchantInfo.baseInfo.businessAddressArea;
|
|
|
+ this.state.Params.businessAddressProvince = Province;
|
|
|
+ this.state.Params.businessAddressCity = city;
|
|
|
+ this.state.Params.businessAddressArea = region;
|
|
|
+ let data = this.state.selectData.Area;
|
|
|
+ let cityList = data.find((item, index) => { return Province == item.provinceCode });
|
|
|
+ let regionlist = cityList.mallCityList.find((item, index) => { return city == item.cityCode });
|
|
|
+ let that_ = this;
|
|
|
+ setTimeout(function(){
|
|
|
+ that_.setState({
|
|
|
+ cityOs: false,
|
|
|
+ citylist: cityList.mallCityList,
|
|
|
+ regionOs: false,
|
|
|
+ regionlist: regionlist.mallAreaList
|
|
|
+ })
|
|
|
+ },500)
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
province_select(e) { //选择省
|
|
|
this.state.Params.businessAddressProvince = e;
|
|
|
let citylist = this.state.selectData.Area.find((item, index) => { return e == item.provinceCode });
|
|
@@ -229,20 +258,34 @@ export default class centerO extends React.Component {
|
|
|
|
|
|
|
|
|
render() {
|
|
|
- const { selectData, cityOs, regionOs, citylist, regionlist, cityTxt, regionTxt, desireAuth, Params , validation_list, signedType } = this.state;
|
|
|
+ const { selectData, cityOs, regionOs, citylist, regionlist, cityTxt, regionTxt, desireAuth, Params , validation_list, signedType , merchantInfo } = this.state;
|
|
|
const { Option } = Select;
|
|
|
const { TextArea } = Input;
|
|
|
+ const { baseInfo } = merchantInfo;
|
|
|
const layout = {
|
|
|
labelCol: { span: 4 },
|
|
|
- // wrapperCol: { span: },
|
|
|
};
|
|
|
return (
|
|
|
<div className='center_up'>
|
|
|
<Form
|
|
|
{...layout}
|
|
|
- initialValues={{ //数据回填
|
|
|
- signedType : Params.signedType == undefined ? 'BY_SPLIT_BILL' : Params.signedType, //入网类型默认被分帐方
|
|
|
-
|
|
|
+ initialValues={{
|
|
|
+ //数据回填,先检测用户状态是否为,入网被拒用户,符合则先以接口数据进行回填,否则按照自己输入的数据进行回填
|
|
|
+ signedType : merchantInfo == '' ? Params.signedType == undefined ? 'BY_SPLIT_BILL' : Params.signedType : baseInfo.signedType,
|
|
|
+ signedName : merchantInfo == '' ? Params.signedName : baseInfo.signedName,
|
|
|
+ registerRole : merchantInfo == '' ? Params.registerRole : baseInfo.registerRole,
|
|
|
+ cerType : merchantInfo == '' ? Params.cerType : baseInfo.cerType == '' ? null : baseInfo.cerType,
|
|
|
+ signedShorthand : merchantInfo == '' ? Params.signedShorthand : baseInfo.signedShorthand == '' ? null : baseInfo.signedShorthand,
|
|
|
+ contactName : merchantInfo == '' ? Params.contactName : baseInfo.contactName == '' ? null : baseInfo.contactName,
|
|
|
+ contactEmail : merchantInfo == '' ? Params.contactEmail : baseInfo.contactEmail == '' ? null : baseInfo.contactEmail,
|
|
|
+ contactPhone : merchantInfo == '' ? Params.contactPhone : baseInfo.contactPhone == '' ? null : baseInfo.contactPhone,
|
|
|
+ businessAddress : merchantInfo == '' ? Params.businessAddress : baseInfo.businessAddress == '' ? null : baseInfo.businessAddress,
|
|
|
+ businessClassification : merchantInfo == '' ? Params.businessClassification : baseInfo.businessClassification == '' ? null : baseInfo.businessClassification,
|
|
|
+ desireAuth : merchantInfo == '' ? Params.desireAuth == '' ? 'DESIRE_VIDEO' : Params.desireAuth : baseInfo.desireAuth == '' ? 'DESIRE_VIDEO' : baseInfo.desireAuth,
|
|
|
+ businessAddressProvince : merchantInfo == '' ? Params.businessAddressProvince : baseInfo.businessAddressProvince == '' ? null : baseInfo.businessAddressProvince,
|
|
|
+ businessAddressCity : merchantInfo == '' ? Params.businessAddressCity : baseInfo.businessAddressCity == '' ? null : baseInfo.businessAddressCity,
|
|
|
+ businessAddressArea : merchantInfo == '' ? Params.businessAddressArea : baseInfo.businessAddressArea == '' ? null : baseInfo.businessAddressArea,
|
|
|
+
|
|
|
}}
|
|
|
>
|
|
|
<div className='center_left'>
|
|
@@ -270,7 +313,7 @@ export default class centerO extends React.Component {
|
|
|
validateStatus = {validation_list.find((item,index) => { return item == 'signedName'}) !== undefined ? 'error' : null}
|
|
|
help = {validation_list.find((item,index) => { return item == 'signedName'}) !== undefined ? '此项为必填项!' : null}
|
|
|
>
|
|
|
- <Input id='qymc' style={{ width: 200 }} placeholder='请输入签约名称' defaultValue={Params.signedName} />
|
|
|
+ <Input id='qymc' style={{ width: 200 }} placeholder='请输入签约名称' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -287,13 +330,11 @@ export default class centerO extends React.Component {
|
|
|
size='default'
|
|
|
id='qyxz'
|
|
|
placeholder="请选择商户签约性质"
|
|
|
- defaultValue={Params.registerRole}
|
|
|
onChange={this.handleChangeQy.bind(this)}
|
|
|
style={{ width: 200 }}
|
|
|
>
|
|
|
{selectData.contract.map((item, index) => (
|
|
|
signedType == 'GENERAL_SUB_MERCHANT' ?
|
|
|
-
|
|
|
item.value !== 'ENTERPRISE_LEGAL_PERSON' ?
|
|
|
<Option key={index} value={item.value} disabled>{item.txt}</Option>
|
|
|
:<Option key={index} value={item.value}>{item.txt}</Option>
|
|
@@ -317,7 +358,6 @@ export default class centerO extends React.Component {
|
|
|
size='default'
|
|
|
id='zslx'
|
|
|
placeholder="请选择证书类型"
|
|
|
- defaultValue={Params.cerType}
|
|
|
onChange={this.handleChangeZs.bind(this)}
|
|
|
style={{ width: 200 }}
|
|
|
>
|
|
@@ -336,7 +376,7 @@ export default class centerO extends React.Component {
|
|
|
validateStatus = {validation_list.find((item,index) => { return item == 'signedShorthand'}) !== undefined ? 'error' : null}
|
|
|
help = {validation_list.find((item,index) => { return item == 'signedShorthand'}) !== undefined ? '此项为必填项!' : null}
|
|
|
>
|
|
|
- <Input id='names' style={{ width: 200 }} placeholder='请输入商户简称' defaultValue={Params.signedShorthand} />
|
|
|
+ <Input id='names' style={{ width: 200 }} placeholder='请输入商户简称' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='c-l'>
|
|
@@ -348,7 +388,7 @@ export default class centerO extends React.Component {
|
|
|
validateStatus = {validation_list.find((item,index) => { return item == 'contactName'}) !== undefined ? 'error' : null}
|
|
|
help = {validation_list.find((item,index) => { return item == 'contactName'}) !== undefined ? '此项为必填项!' : null}
|
|
|
>
|
|
|
- <Input id='myname' style={{ width: 200 }} placeholder='请输入联系人姓名' defaultValue={Params.contactName} />
|
|
|
+ <Input id='myname' style={{ width: 200 }} placeholder='请输入联系人姓名' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='c-l'>
|
|
@@ -360,7 +400,7 @@ export default class centerO extends React.Component {
|
|
|
validateStatus = {validation_list.find((item,index) => { return item == 'contactEmail'}) !== undefined ? 'error' : null}
|
|
|
help = {validation_list.find((item,index) => { return item == 'contactEmail'}) !== undefined ? '此项为必填项!' : null}
|
|
|
>
|
|
|
- <Input id='mymail' style={{ width: 200 }} placeholder='请输入联系人邮箱' defaultValue={Params.contactEmail} />
|
|
|
+ <Input id='mymail' style={{ width: 200 }} placeholder='请输入联系人邮箱' />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='c-l'>
|
|
@@ -372,7 +412,7 @@ export default class centerO extends React.Component {
|
|
|
validateStatus = {validation_list.find((item,index) => { return item == 'contactPhone'}) !== undefined ? 'error' : null}
|
|
|
help = {validation_list.find((item,index) => { return item == 'contactPhone'}) !== undefined ? '此项为必填项!' : null}
|
|
|
>
|
|
|
- <Input id='mynums' style={{ width: 200 }} placeholder="请输入联系人电话" onChange={this.inputDatas.bind(this)} defaultValue={Params.contactPhone} />
|
|
|
+ <Input id='mynums' style={{ width: 200 }} placeholder="请输入联系人电话" onChange={this.inputDatas.bind(this)} />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -386,7 +426,7 @@ export default class centerO extends React.Component {
|
|
|
validateStatus = {validation_list.find((item,index) => { return item == 'businessAddressProvince'}) !== undefined ? 'error' : null}
|
|
|
help = {validation_list.find((item,index) => { return item == 'businessAddressProvince'}) !== undefined ? '此项为必填项!' : null}
|
|
|
>
|
|
|
- <Select size='default' placeholder="请选择省份" defaultValue={Params.businessAddressProvince} onChange={this.province_select.bind(this)} style={{ width: 200 }}>
|
|
|
+ <Select size='default' placeholder="请选择省份" onChange={this.province_select.bind(this)} style={{ width: 200 }}>
|
|
|
{selectData.Area.map((item, index) => (
|
|
|
<Option key={index} value={item.provinceCode}>{item.provinceName}</Option>
|
|
|
))}
|
|
@@ -403,7 +443,7 @@ export default class centerO extends React.Component {
|
|
|
validateStatus = {validation_list.find((item,index) => { return item == 'businessAddressCity'}) !== undefined ? 'error' : null}
|
|
|
help = {validation_list.find((item,index) => { return item == 'businessAddressCity'}) !== undefined ? '此项为必填项!' : null}
|
|
|
>
|
|
|
- <Select size='default' placeholder="请选择市" defaultValue={Params.businessAddressCity} key={cityTxt} onChange={this.city_select.bind(this)} style={{ width: 200 }} disabled={cityOs}>
|
|
|
+ <Select size='default' placeholder="请选择市" key={cityTxt} onChange={this.city_select.bind(this)} style={{ width: 200 }} disabled={cityOs}>
|
|
|
{citylist.map((item, index) => (
|
|
|
<Option key={index} value={item.cityCode}>{item.cityName}</Option>
|
|
|
))}
|
|
@@ -419,7 +459,7 @@ export default class centerO extends React.Component {
|
|
|
validateStatus = {validation_list.find((item,index) => { return item == 'businessAddressArea'}) !== undefined ? 'error' : null}
|
|
|
help = {validation_list.find((item,index) => { return item == 'businessAddressArea'}) !== undefined ? '此项为必填项!' : null}
|
|
|
>
|
|
|
- <Select size='default' placeholder="请选择区" defaultValue={Params.businessAddressArea} key={regionTxt} onChange={this.region_select.bind(this)} style={{ width: 200 }} disabled={regionOs}>
|
|
|
+ <Select size='default' placeholder="请选择区" key={regionTxt} onChange={this.region_select.bind(this)} style={{ width: 200 }} disabled={regionOs}>
|
|
|
{regionlist.map((item, index) => (
|
|
|
<Option key={index} value={item.areaCode}>{item.areaName}</Option>
|
|
|
))}
|
|
@@ -435,9 +475,9 @@ export default class centerO extends React.Component {
|
|
|
validateStatus = {validation_list.find((item,index) => { return item == 'businessAddress'}) !== undefined ? 'error' : null}
|
|
|
help = {validation_list.find((item,index) => { return item == 'businessAddress'}) !== undefined ? '此项为必填项!' : null}
|
|
|
>
|
|
|
- <div className='TextAreas' >
|
|
|
- <TextArea id='mywb' style={{ resize: 'none' }} defaultValue={Params.businessAddress} rows={6} />
|
|
|
- </div>
|
|
|
+ {/* <div className='TextAreas' > */}
|
|
|
+ <Input.TextArea id='mywb' style={{ resize: 'none',width : 400 }} rows={6} />
|
|
|
+ {/* </div> */}
|
|
|
</Form.Item>
|
|
|
|
|
|
</div>
|
|
@@ -454,7 +494,6 @@ export default class centerO extends React.Component {
|
|
|
showSearch
|
|
|
size='default'
|
|
|
placeholder="请选择业务类型"
|
|
|
- defaultValue={Params.businessClassification}
|
|
|
onChange={this.handleChange.bind(this)}
|
|
|
style={{ width: 400 }}
|
|
|
filterOption={(input, option) =>
|
|
@@ -477,7 +516,7 @@ export default class centerO extends React.Component {
|
|
|
// validateStatus="error"
|
|
|
// help="此项为必填项!"
|
|
|
>
|
|
|
- <Radio.Group name="radiogroup" defaultValue={Params.desireAuth == undefined ? 'DESIRE_VIDEO' : Params.desireAuth} onChange={this.onChangeRadio.bind(this)}>
|
|
|
+ <Radio.Group name="radiogroup" onChange={this.onChangeRadio.bind(this)}>
|
|
|
<Radio value='DESIRE_VIDEO'>视频验证</Radio>
|
|
|
<Radio value='DESIRE_MOBILEINFO'>手机短信验证</Radio>
|
|
|
<Radio value='DESIRE_NONEED'>其他验证方式</Radio>
|