|
@@ -29,12 +29,26 @@ export default class centerW extends React.Component {
|
|
|
{ txt : '营业执照',value : 7 },
|
|
|
{ txt : '其他',value : 8 },
|
|
|
],
|
|
|
- fileList : [],
|
|
|
+ fileList : [[],[],[],[],[],[],[],[],[],[],[],[]],
|
|
|
headerProps : {
|
|
|
action: '',
|
|
|
multiple: false,
|
|
|
},
|
|
|
- imgType : null
|
|
|
+ imgType : null,
|
|
|
+ rightArray : [
|
|
|
+ { txt : '营业执照照片路径',value : 0 , type:'.jpg, .jpeg, .png, .pdf'},
|
|
|
+ { txt : '开户许可证招聘路径',value : 1 , type:'.jpg, .jpeg, .png, .pdf'},
|
|
|
+ { txt : '法人证件人面像路径',value : 2 , type:'.jpg, .jpeg, .png, .pdf'},
|
|
|
+ { txt : '法人证件国徽面路径',value : 3 , type:'.jpg, .jpeg, .png, .pdf'},
|
|
|
+ { txt : '确认入网意愿视频路径',value : 4 , type:'.AVI, .mov, .rmvb, .rm, .FLV, .mp4, .3gp'},
|
|
|
+ { txt : '法人手持证件影印件路径',value : 5 , type:'.jpg, .jpeg, .png, .pdf'},
|
|
|
+ { txt : '商户网址截图影印件路径',value : 6 , type:'.jpg, .jpeg, .png, .pdf'},
|
|
|
+ { txt : '公众号/小程序/生活号影印件路径',value : 7 , type:'.jpg, .jpeg, .png, .pdf'},
|
|
|
+ { txt : 'APP首页截图影印件路径',value : 8 , type:'.jpg, .jpeg, .png, .pdf'},
|
|
|
+ { txt : '法人银行卡图影印件路径',value : 9 , type:'.jpg, .jpeg, .png, .pdf'},
|
|
|
+ { txt : '确认入网意愿其他方式验证路径',value : 10 , type:'.jpg, .jpeg, .png, .pdf'},
|
|
|
+ { txt : '其他资质文件路径',value : 11 , type:'.jpg, .jpeg, .png, .pdf'},
|
|
|
+ ]
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -47,13 +61,13 @@ export default class centerW extends React.Component {
|
|
|
console.log(`Selected: ${value}`);
|
|
|
}
|
|
|
handleChange = info => {
|
|
|
- console.log(info)
|
|
|
let fileList = [...info.fileList];
|
|
|
- if(fileList.length && fileList.length > 0){
|
|
|
- fileList[0].status = 'done' //上传成功之后的状态 自动修改
|
|
|
- fileList[0].response = fileList[0].name //图片上传成功之后展示的TIP
|
|
|
- }
|
|
|
- this.setState({ fileList });
|
|
|
+ let imgType = this.state.imgType;
|
|
|
+ fileList[0].status = 'done' //上传成功之后的状态 自动修改
|
|
|
+ fileList[0].response = fileList[0].name //图片上传成功之后展示的TIP
|
|
|
+ let arr = this.state.fileList;
|
|
|
+ arr[imgType] = fileList
|
|
|
+ this.setState({ arr });
|
|
|
};
|
|
|
btnClick(e){ //区分上传图片类型
|
|
|
this.setState({
|
|
@@ -63,7 +77,7 @@ export default class centerW extends React.Component {
|
|
|
|
|
|
|
|
|
render() {
|
|
|
- const { contract, certificate, headerProps, fileList } = this.state;
|
|
|
+ const { contract, certificate, headerProps, fileList , rightArray } = this.state;
|
|
|
const { Option } = Select;
|
|
|
|
|
|
return(
|
|
@@ -143,22 +157,24 @@ export default class centerW extends React.Component {
|
|
|
</div>
|
|
|
</div>
|
|
|
<div className='center_right'>
|
|
|
- <div className='c-l'>
|
|
|
- <div className='titles'> 营业执照照片路径 : </div>
|
|
|
- <div className='Upload_wrap'>
|
|
|
- <Upload
|
|
|
- className='Upload'
|
|
|
- {...headerProps}
|
|
|
- fileList={this.state.fileList}
|
|
|
- accept=".jpg, .jpeg, .png, .pdf"
|
|
|
- maxCount={1}
|
|
|
- onChange = {this.handleChange}
|
|
|
- >
|
|
|
- <Button icon={<UploadOutlined />} onClick={() =>this.btnClick(1)}>上传营业执照</Button>
|
|
|
- </Upload>
|
|
|
- {fileList.length === 0 && <div className='title_tips'>格式限制为 jpg,jpeg,png,pdf,最大不超过50M</div>}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ {rightArray.map((item,index) => (
|
|
|
+ <div className='c-l' key = {index}>
|
|
|
+ <div className='titles'> {item.txt} : </div>
|
|
|
+ <div className='Upload_wrap'>
|
|
|
+ <Upload
|
|
|
+ className='Upload'
|
|
|
+ {...headerProps}
|
|
|
+ fileList={this.state.fileList[item.value]}
|
|
|
+ accept={item.type}
|
|
|
+ maxCount={1}
|
|
|
+ onChange = {this.handleChange}
|
|
|
+ >
|
|
|
+ <Button icon={<UploadOutlined />} onClick={() =>this.btnClick(index)}>选择文件</Button>
|
|
|
+ </Upload>
|
|
|
+ {fileList[index].length === 0 && <div className='title_tips'>格式限制为{item.type},最大不超过50M</div>}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ ))}
|
|
|
</div>
|
|
|
</div>
|
|
|
)
|