|
@@ -1,9 +1,10 @@
|
|
|
import React from 'react';
|
|
|
-import { Radio, Select, Input, Form } from 'antd';
|
|
|
-// import { $Axios } from '../../common/publish';
|
|
|
+import { Radio, Select, Input, Form, DatePicker , TimePicker } from 'antd';
|
|
|
+import 'moment/locale/zh-cn';
|
|
|
+import locale from 'antd/es/date-picker/locale/zh_CN';
|
|
|
import select_data from '../../common/ssq';
|
|
|
import '../center-s/centerS.scss'
|
|
|
-
|
|
|
+const { Option } = Select;
|
|
|
export default class centerS extends React.Component {
|
|
|
constructor(props) {
|
|
|
super(props)
|
|
@@ -18,7 +19,10 @@ export default class centerS extends React.Component {
|
|
|
offlist: select_data.offlist,
|
|
|
validation_list: [],
|
|
|
form_width: 200,
|
|
|
- contactName : JSON.parse(localStorage.getItem('oData')).contactName
|
|
|
+ signedType: null,
|
|
|
+ starTime : '',
|
|
|
+ endTime : '',
|
|
|
+ idType : null
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -56,11 +60,40 @@ export default class centerS extends React.Component {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+ let registerRole = JSON.parse(localStorage.getItem('oData')).registerRole;
|
|
|
+ let signedType = JSON.parse(localStorage.getItem('oData')).signedType;
|
|
|
+ this.setState({
|
|
|
+ signedType: signedType
|
|
|
+ })
|
|
|
+
|
|
|
+ if (signedType == 'GENERAL_SUB_MERCHANT') {
|
|
|
+ this.setState({
|
|
|
+ offlist: select_data.GENERAL_SUB_MERCHANT,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ if (registerRole == 'INDIVIDUAL_BUSINESS') { //个体工商户
|
|
|
+ this.setState({
|
|
|
+ offlist: select_data.INDIVIDUAL_BUSINESS
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (registerRole == 'NATURAL_PERSON') { //自然人
|
|
|
+ this.setState({
|
|
|
+ offlist: select_data.NATURAL_PERSON
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (registerRole == 'offlist') { //默认
|
|
|
+ this.setState({
|
|
|
+ offlist: select_data.offlist
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
InputSdata(e) {
|
|
|
let Params = {
|
|
|
- bankCode: this.state.Params.bankCode,//开户行
|
|
|
+ bankCode: this.state.Params.bankCode == undefined ? '' : this.state.Params.bankCode,//开户行
|
|
|
bankBranchName: document.getElementById("bankBranchName").value,//支行名称
|
|
|
accountName: document.getElementById("accountName").value,//开户名称
|
|
|
bankCardNo: document.getElementById("bankCardNo").value,//开户账号
|
|
@@ -72,6 +105,19 @@ export default class centerS extends React.Component {
|
|
|
withdrawRateType: '',//提现费率类型
|
|
|
// withdrawRate: document.getElementById("withdrawRate").value,//提现费率
|
|
|
withdrawRate: '',//提现费率
|
|
|
+
|
|
|
+ // 收单子户独立参数
|
|
|
+ name : document.getElementById("name").value, //最终受益人姓名
|
|
|
+ idType : this.state.Params.idType == undefined ? '' : this.state.Params.idType,//最终受益人证件类型
|
|
|
+ idNo : document.getElementById("idNo").value, //最终受益人证件号码
|
|
|
+ effectiveDateStart : this.state.Params.effectiveDateStart == undefined ? '' : this.state.Params.effectiveDateStart,//证件有效期开始时间
|
|
|
+ effectiveDateEnd : this.state.Params.effectiveDateEnd == undefined ? '' : this.state.Params.effectiveDateEnd,//证件有效期结束时间
|
|
|
+ address : document.getElementById("address").value, //最终受益人住址
|
|
|
+ equityRatio : document.getElementById("equityRatio").value, //股权占比
|
|
|
+ receiverName : document.getElementById("receiverName").value, //收件人姓名
|
|
|
+ receiverPhone : document.getElementById("receiverPhone").value, //收件人电话
|
|
|
+ receiverAddress : document.getElementById("receiverAddress").value, //收件人地址
|
|
|
+
|
|
|
}
|
|
|
localStorage.setItem('sData', JSON.stringify(Params))
|
|
|
return Params
|
|
@@ -108,7 +154,7 @@ export default class centerS extends React.Component {
|
|
|
this.state.Params.accountType = accountType;
|
|
|
this.setState({
|
|
|
regisClick: accountType
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
onChangeRadio_s(e) {
|
|
@@ -127,14 +173,35 @@ export default class centerS extends React.Component {
|
|
|
return type
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
verification(e) { //暴露给父组件的方法,验证当前页面必填项
|
|
|
this.setState({
|
|
|
validation_list: e,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ starTime = (value, dateString) => {
|
|
|
+ this.state.Params.effectiveDateStart = dateString
|
|
|
+ this.setState({
|
|
|
+ starTime: dateString
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ endTime = (value, dateString) => {
|
|
|
+ this.state.Params.effectiveDateEnd = dateString
|
|
|
+ this.setState({
|
|
|
+ endTime: dateString
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ idTypeChange(e){
|
|
|
+ this.state.Params.idType = e;
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
- const { selectData, cityOs, citylist, Params, contactName, registerRole, regisClick, validation_list, form_width } = this.state;
|
|
|
+ const { selectData, cityOs, citylist, Params, contactName, registerRole, regisClick, validation_list, form_width, signedType } = this.state;
|
|
|
const { Option } = Select;
|
|
|
const { TextArea } = Input;
|
|
|
const layout = {
|
|
@@ -150,7 +217,7 @@ export default class centerS extends React.Component {
|
|
|
{...layout}
|
|
|
onFinish={onFinish}
|
|
|
initialValues={{ //数据回填
|
|
|
- accountName : Params.bankBranchName
|
|
|
+ accountName: Params.accountName
|
|
|
}}
|
|
|
>
|
|
|
<div className='c-l'>
|
|
@@ -162,7 +229,18 @@ export default class centerS extends React.Component {
|
|
|
validateStatus={validation_list.find((item, index) => { return item == 'bankCode' }) !== undefined ? 'error' : null}
|
|
|
help={validation_list.find((item, index) => { return item == 'bankCode' }) !== undefined ? '此项为必填项!' : null}
|
|
|
>
|
|
|
- <Select size='default' placeholder="请选择开户行" defaultValue={Params.bankCode} onChange={this.selectChange_1.bind(this)} style={{ width: 200 }}>
|
|
|
+ <Select
|
|
|
+ showSearch
|
|
|
+ size='default'
|
|
|
+ placeholder="请选择开户行"
|
|
|
+ defaultValue={Params.bankCode}
|
|
|
+ onChange={this.selectChange_1.bind(this)}
|
|
|
+ style={{ width: 200 }}
|
|
|
+ optionFilterProp="children"
|
|
|
+ filterOption={(input, option) =>
|
|
|
+ option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ }
|
|
|
+ >
|
|
|
{selectData.contractS.map((item, index) => (
|
|
|
<Option key={index} value={item.value}>{item.txt}</Option>
|
|
|
))}
|
|
@@ -191,7 +269,7 @@ export default class centerS extends React.Component {
|
|
|
validateStatus={validation_list.find((item, index) => { return item == 'accountName' }) !== undefined ? 'error' : null}
|
|
|
help={validation_list.find((item, index) => { return item == 'accountName' }) !== undefined ? '此项为必填项!' : null}
|
|
|
>
|
|
|
- <Input id='accountName' style={{ width: form_width }} placeholder="请输入开户名称" />
|
|
|
+ <Input id='accountName' style={{ width: form_width }} placeholder="请输入开户名称" />
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='c-l'>
|
|
@@ -248,10 +326,21 @@ export default class centerS extends React.Component {
|
|
|
validateStatus={validation_list.find((item, index) => { return item == 'accountType' }) !== undefined ? 'error' : null}
|
|
|
help={validation_list.find((item, index) => { return item == 'accountType' }) !== undefined ? '此项为必填项!' : null}
|
|
|
>
|
|
|
- <Radio.Group name="radiogroup" defaultValue={Params.accountType == undefined ? registerRole == 2 ? 'PUBLIC' : 'PRIVATE' : Params.accountType} onChange={this.onChangeRadio.bind(this)}>
|
|
|
- <Radio value='PUBLIC'>对公</Radio>
|
|
|
- <Radio value='PRIVATE'>对私</Radio>
|
|
|
- </Radio.Group>
|
|
|
+ {
|
|
|
+ signedType == 'GENERAL_SUB_MERCHANT' &&
|
|
|
+ <Radio.Group name="radiogroup" defaultValue='PUBLIC' onChange={this.onChangeRadio.bind(this)}>
|
|
|
+ <Radio value='PUBLIC'>对公</Radio>
|
|
|
+ <Radio value='PRIVATE' disabled={signedType == 'GENERAL_SUB_MERCHANT' ? true : false}>对私</Radio>
|
|
|
+ </Radio.Group>
|
|
|
+ }
|
|
|
+ {
|
|
|
+ signedType !== 'GENERAL_SUB_MERCHANT' &&
|
|
|
+ <Radio.Group name="radiogroup" defaultValue='PUBLIC' onChange={this.onChangeRadio.bind(this)}>
|
|
|
+ <Radio value='PUBLIC'>对公</Radio>
|
|
|
+ <Radio value='PRIVATE'>对私</Radio>
|
|
|
+ </Radio.Group>
|
|
|
+ }
|
|
|
+
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
<div className='c-l'>
|
|
@@ -266,7 +355,7 @@ export default class centerS extends React.Component {
|
|
|
<Radio.Group name="radiogroup" defaultValue='WITHDRAW'>
|
|
|
<Radio value='WITHDRAW'>提现</Radio>
|
|
|
</Radio.Group>
|
|
|
- </Form.Item>
|
|
|
+ </Form.Item>
|
|
|
</div>
|
|
|
{/* <div className='c-l'>
|
|
|
<Form.Item
|
|
@@ -297,7 +386,138 @@ export default class centerS extends React.Component {
|
|
|
</div> */}
|
|
|
</Form>
|
|
|
</div>
|
|
|
- <div className='center_right'> </div>
|
|
|
+ <div className='center_right'>
|
|
|
+ { signedType == 'GENERAL_SUB_MERCHANT' &&
|
|
|
+ <Form>
|
|
|
+ <div className='c-l'>
|
|
|
+ <Form.Item
|
|
|
+ label="最终受益人姓名"
|
|
|
+ name="name"
|
|
|
+ labelCol={{ style: { width: 150 } }}
|
|
|
+ rules={[{ required: this.listTypes('name') == true ? true : false, message: '' }]}
|
|
|
+ validateStatus={validation_list.find((item, index) => { return item == 'name' }) !== undefined ? 'error' : null}
|
|
|
+ help={validation_list.find((item, index) => { return item == 'name' }) !== undefined ? '此项为必填项!' : null}
|
|
|
+ >
|
|
|
+ <Input id='name' style={{ width: form_width }} defaultValue={Params.name} placeholder="请输入最终受益人姓名" />
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ <div className='c-l'>
|
|
|
+ <Form.Item
|
|
|
+ label="最终受益人证件类型"
|
|
|
+ name="idType"
|
|
|
+ labelCol={{ style: { width: 150 } }}
|
|
|
+ rules={[{ required: this.listTypes('idType') == true ? true : false, message: '' }]}
|
|
|
+ validateStatus={validation_list.find((item, index) => { return item == 'idType' }) !== undefined ? 'error' : null}
|
|
|
+ help={validation_list.find((item, index) => { return item == 'idType' }) !== undefined ? '此项为必填项!' : null}
|
|
|
+ >
|
|
|
+ <Select size='default' placeholder="请选择最终受益人证件类型" defaultValue={Params.idType} style={{ width: 200 }} onChange={this.idTypeChange.bind(this)}>
|
|
|
+ {selectData.beneficiaryArr.map((item, index) => (
|
|
|
+ <Option key={index} value={item.value}>{item.txt}</Option>
|
|
|
+ ))}
|
|
|
+ </Select>
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ <div className='c-l'>
|
|
|
+ <Form.Item
|
|
|
+ label="最终受益人证件号码"
|
|
|
+ name="idNo"
|
|
|
+ labelCol={{ style: { width: 150 } }}
|
|
|
+ rules={[{ required: this.listTypes('idNo') == true ? true : false, message: '' }]}
|
|
|
+ validateStatus={validation_list.find((item, index) => { return item == 'idNo' }) !== undefined ? 'error' : null}
|
|
|
+ help={validation_list.find((item, index) => { return item == 'idNo' }) !== undefined ? '此项为必填项!' : null}
|
|
|
+ >
|
|
|
+ <Input id='idNo' style={{ width: form_width }} defaultValue={Params.idNo} placeholder="请输入最终受益人证件号码" />
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ <div className='c-l'>
|
|
|
+ <Form.Item
|
|
|
+ label="证件有效期开始日期"
|
|
|
+ name="effectiveDateStart"
|
|
|
+ labelCol={{ style: { width: 150 } }}
|
|
|
+ rules={[{ required: this.listTypes('effectiveDateStart') == true ? true : false, message: '' }]}
|
|
|
+ validateStatus={validation_list.find((item, index) => { return item == 'effectiveDateStart' }) !== undefined ? 'error' : null}
|
|
|
+ help={validation_list.find((item, index) => { return item == 'effectiveDateStart' }) !== undefined ? '此项为必填项!' : null}
|
|
|
+ >
|
|
|
+ <DatePicker key='starTime' style={{ width: form_width }} onChange={this.starTime} locale={locale} placeholder='请选择开始时间' />
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ <div className='c-l'>
|
|
|
+ <Form.Item
|
|
|
+ label="证件有效期结束日期"
|
|
|
+ name="effectiveDateEnd"
|
|
|
+ labelCol={{ style: { width: 150 } }}
|
|
|
+ rules={[{ required: this.listTypes('effectiveDateEnd') == true ? true : false, message: '' }]}
|
|
|
+ validateStatus={ validation_list.find((item, index) => { return item == 'effectiveDateEnd' }) !== undefined ? 'error' : null}
|
|
|
+ help={ validation_list.find((item, index) => { return item == 'effectiveDateEnd' }) !== undefined ? '此项为必填项!' : null}
|
|
|
+ >
|
|
|
+ <DatePicker key='starTime' style={{ width: form_width }} onChange={this.endTime} locale={locale} placeholder='请选择结束时间' />
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ <div className='c-x' style={{marginBottom : '30px'}}>
|
|
|
+ <Form.Item
|
|
|
+ label=" 最终受益人住址"
|
|
|
+ name="address"
|
|
|
+ labelCol={{ style: { width: 150 ,height : 300} }}
|
|
|
+ rules={[{ required: this.listTypes('address') == true ? true : false, message: '' }]}
|
|
|
+ validateStatus={ validation_list.find((item, index) => { return item == 'address' }) !== undefined ? 'error' : null}
|
|
|
+ help={ validation_list.find((item, index) => { return item == 'address' }) !== undefined ? '此项为必填项!' : null}
|
|
|
+ >
|
|
|
+ <div className='TextAreas' >
|
|
|
+ <TextArea id='address' style={{ resize: 'none' }} defaultValue={Params.address} rows={6} />
|
|
|
+ </div>
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ <div className='c-l'>
|
|
|
+ <Form.Item
|
|
|
+ label="股权占比"
|
|
|
+ name="equityRatio"
|
|
|
+ labelCol={{ style: { width: 150 } }}
|
|
|
+ rules={[{ required: this.listTypes('equityRatio') == true ? true : false, message: '' }]}
|
|
|
+ validateStatus={validation_list.find((item, index) => { return item == 'equityRatio' }) !== undefined ? 'error' : null}
|
|
|
+ help={validation_list.find((item, index) => { return item == 'equityRatio' }) !== undefined ? '此项为必填项!' : null}
|
|
|
+ >
|
|
|
+ <Input id='equityRatio' style={{ width: form_width }} defaultValue={Params.equityRatio} placeholder="请输入股权占比" />
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ <div className='c-l'>
|
|
|
+ <Form.Item
|
|
|
+ label="收件人姓名"
|
|
|
+ name="receiverName"
|
|
|
+ labelCol={{ style: { width: 150 } }}
|
|
|
+ rules={[{ required: this.listTypes('receiverName') == true ? true : false, message: '' }]}
|
|
|
+ validateStatus={validation_list.find((item, index) => { return item == 'receiverName' }) !== undefined ? 'error' : null}
|
|
|
+ help={validation_list.find((item, index) => { return item == 'receiverName' }) !== undefined ? '此项为必填项!' : null}
|
|
|
+ >
|
|
|
+ <Input id='receiverName' style={{ width: form_width }} defaultValue={Params.receiverName} placeholder="请输入收件人姓名" />
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ <div className='c-l'>
|
|
|
+ <Form.Item
|
|
|
+ label="收件人电话"
|
|
|
+ name="receiverPhone"
|
|
|
+ labelCol={{ style: { width: 150 } }}
|
|
|
+ rules={[{ required: this.listTypes('receiverPhone') == true ? true : false, message: '' }]}
|
|
|
+ validateStatus={validation_list.find((item, index) => { return item == 'receiverPhone' }) !== undefined ? 'error' : null}
|
|
|
+ help={validation_list.find((item, index) => { return item == 'receiverPhone' }) !== undefined ? '此项为必填项!' : null}
|
|
|
+ >
|
|
|
+ <Input id='receiverPhone' style={{ width: form_width }} defaultValue={Params.receiverPhone} placeholder="请输入收件人电话" />
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ <div className='c-l'>
|
|
|
+ <Form.Item
|
|
|
+ label="收件人地址"
|
|
|
+ name="receiverAddress"
|
|
|
+ labelCol={{ style: { width: 150 } }}
|
|
|
+ rules={[{ required: this.listTypes('receiverAddress') == true ? true : false, message: '' }]}
|
|
|
+ validateStatus={validation_list.find((item, index) => { return item == 'receiverAddress' }) !== undefined ? 'error' : null}
|
|
|
+ help={validation_list.find((item, index) => { return item == 'receiverAddress' }) !== undefined ? '此项为必填项!' : null}
|
|
|
+ >
|
|
|
+ <Input id='receiverAddress' style={{ width: form_width }} defaultValue={Params.receiverAddress} placeholder="请输入收件人地址" />
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ </Form>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
</div>
|
|
|
)
|
|
|
}
|