1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108 |
- import React from 'react';
- import { Icon, Modal, message, Spin, Button, Tabs, Input, InputNumber, Select, Form, DatePicker, Cascader, Upload } from 'antd';
- import './userList.less';
- import ajax from 'jquery/src/ajax/xhr.js';
- import $ from 'jquery/src/ajax';
- import moment from 'moment';
- import { eduLevelList, auditStatusList, certifyStepList } from '../../dataDic.js'
- import { beforeUploadFile, getAuditState, newDownloadFile } from '../../tools.js';
- import { areaSelect, getProvince } from '../../NewDicProvinceList';
- import { getTechField, techFieldList } from '../../DicTechFieldList';
- const OrgShow = Form.create()(React.createClass({
- getInitialState() {
- return {
- loading: false,
- tabKey: "1",
- eduLvlOption: [],
- eduLvlObj: {},
- field: []
- };
- },
- loadData(uid) {
- this.state.data = [];
- this.props.spinState(true);
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/userCertify/orgDetail",
- data: {
- uid: uid
- },
- success: function (data) {
- let thisData = data.data;
- if (!thisData) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- thisData = {};
- };
- this.setState({
- id: thisData.id,
- licenceProvince: thisData.licenceProvince,
- licenceCity: thisData.licenceCity,
- licenceArea: thisData.licenceArea,
- locationProvince: thisData.locationProvince,
- locationCity: thisData.locationCity,
- locationArea: thisData.locationArea,
- contacts: thisData.contacts,
- contactMobile: thisData.contactMobile,
- fixedTel: thisData.fixedTel,
- qq: thisData.qq,
- postalAddress: thisData.postalAddress,
- postcode: thisData.postcode,
- aftUsername: thisData.aftUsername,
- unitName: thisData.unitName,
- identityType: thisData.identityType, //组织性质
- registeredCapital: thisData.registeredCapital, //注册资金
- firstContacts: thisData.firstContacts,
- firstMobile: thisData.firstMobile,
- secondContacts: thisData.secondContacts,
- secondMobile: thisData.secondMobile,
- thirdContacts: thisData.thirdContacts,
- thirdMobile: thisData.thirdMobile,
- field: thisData.field ? thisData.field.split(',') : [],
- legalPerson: thisData.legalPerson,
- legalPersonIdCard: thisData.legalPersonIdCard,
- licenceNumber: thisData.licenceNumber,
- licenceScanningUrl: thisData.licenceScanningUrl,
- orgCode: thisData.orgCode,
- orgCodeUrl: thisData.orgCodeUrl,
- bankAccount: thisData.bankAccount,
- banks: thisData.banks,
- bankBranch: thisData.bankBranch,
- bankCardNumber: thisData.bankCardNumber,
- validationAmount: thisData.validationAmount, //打款金额
- paymentDate: thisData.paymentDate,
- paymentDateFormattedDate: thisData.paymentDateFormattedDate,
- lastYearTaxReportUrl: thisData.lastYearTaxReportUrl,
- auditStatus: thisData.auditStatus,
- level: thisData.lvl,
- aid: thisData.aid, //业务员ID
- mid: thisData.mid //客户经理ID
- });
- this.props.form.resetFields();
- }.bind(this),
- }).always(function () {
- this.props.spinState(false);
- }.bind(this));
- },
- getAccountManagerList() {
- this.props.spinState(true);
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/userCertify/accountManager",
- success: function (data) {
- let theArr = [];
- if (!data.data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- return;
- };
- for (var item in data.data) {
- theArr.push(
- <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
- )
- };
- this.setState({
- accountManagerOption: theArr,
- accountManagerList: data.data
- });
- }.bind(this),
- }).always(function () {
- this.props.spinState(false);
- }.bind(this));
- },
- getTechnicianList() {
- this.props.spinState(true);
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/userCertify/technician",
- success: function (data) {
- let theArr = [];
- if (!data.data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- return;
- };
- for (var item in data.data) {
- theArr.push(
- <Select.Option value={item} key={item}>{data.data[item]}</Select.Option>
- )
- };
- this.setState({
- technicianOption: theArr,
- technicianList: data.data
- });
- }.bind(this),
- }).always(function () {
- this.props.spinState(false);
- }.bind(this));
- },
- handleSubmit(e) {
- e.preventDefault();
- this.props.form.validateFields((err, values) => {
- if (!err) {
- this.props.spinState(true);
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/userCertify/updateOrgDetail",
- data: {
- uid: this.props.uid,
- id: this.state.id,
- auditStatus: values.auditStatus,
- //level: this.state.level,
- aid: values.aid, //指派业务员ID
- mid: values.mid, //指派客户经理ID
- }
- }).done(function (data) {
- if (!data.error.length) {
- message.success('保存成功!');
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)).always(function () {
- this.props.spinState(false);
- this.props.handleOk();
- }.bind(this));
- }
- });
- },
- handleCancel() {
- this.props.closeDesc(false);
- },
- componentWillMount() {
- let _me = this;
- eduLevelList.map(function (item, i) {
- _me.state.eduLvlObj[item.value] = item.key
- });
- this.loadData(this.props.uid);
- this.getAccountManagerList();
- this.getTechnicianList();
- },
- componentWillReceiveProps(nextProps) {
- if (!this.props.visible && nextProps.visible) {
- this.loadData(nextProps.uid);
- this.state.tabKey = "1";
- };
- },
- render() {
- const { getFieldDecorator } = this.props.form;
- const FormItem = Form.Item
- const formItemLayout = {
- labelCol: { span: 6 },
- wrapperCol: { span: 12 },
- };
- return (
- <Form horizontal onSubmit={this.handleSubmit} className="person-form">
- <Tabs defaultActiveKey="1" activeKey={this.state.tabKey} onChange={(e) => { this.setState({ tabKey: e }); }}>
- <Tabs.TabPane tab="基本资料" key="1">
- <FormItem
- {...formItemLayout}
- label="公司名称" >
- {getFieldDecorator('unitName')(
- <span>{this.state.unitName}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="认证名称" >
- {getFieldDecorator('aftUsername', {
- initialValue: this.state.aftUsername
- })(
- <span>{this.state.aftUsername}</span>
- )}
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="领域" >
- {getFieldDecorator('field')(
- <span>{getTechField(this.state.field[0], this.state.field[1], this.state.field[2])}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="身份类型" >
- {getFieldDecorator('identityType')(
- <span>{this.state.eduLvlObj[this.state.identityType]}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="第一联系人" >
- {getFieldDecorator('firstContacts')(
- <span>{this.state.firstContacts}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="第一联系人电话" >
- {getFieldDecorator('firstMobile')(
- <span>{this.state.firstMobile}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="第二联系人" >
- {getFieldDecorator('secondContacts')(
- <span>{this.state.secondContacts}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="第二联系人电话" >
- {getFieldDecorator('secondMobile')(
- <span>{this.state.secondMobile}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="第三联系人" >
- {getFieldDecorator('thirdContacts')(
- <span>{this.state.thirdContacts}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="第三联系人电话"
- >
- {getFieldDecorator('thirdMobile')(
- <span>{this.state.thirdMobile}</span>
- )}
- </FormItem>
- </Tabs.TabPane>
- <Tabs.TabPane tab="认证信息" key="2">
- <FormItem
- {...formItemLayout}
- label="法人" >
- {getFieldDecorator('legalPerson')(
- <span>{this.state.legalPerson}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="法人身份证号" >
- {getFieldDecorator('legalPersonIdCard')(
- <span>{this.state.legalPersonIdCard}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="注册资金" >
- {getFieldDecorator('registeredCapital')(
- <span>{this.state.registeredCapital || 0} 万元</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="营业执照编号" >
- {getFieldDecorator('licenceNumber')(
- <span>{this.state.licenceNumber}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="营业执照所在地" >
- {getFieldDecorator('licenceAddress', {
- initialValue: this.state.licenceAddress
- })(
- <span>{getProvince(this.state.licenceProvince, this.state.licenceCity, this.state.licenceArea)}</span>
- )}
- </FormItem>
- <FormItem
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 18 }}
- label="营业执照图片" >
- <div className="idcard-img clearfix">
- {this.state.licenceScanningUrl ? <div>
- <div className="idcard-imgbox">
- <img src={globalConfig.context + '/open/writeImage?path=' + this.state.licenceScanningUrl} alt="点击查看大图"
- onClick={(e) => { window.open(e.target.src) }} />
- </div>
- </div> : <div>
- <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</p>
- </div>}
- </div>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="组织机构代码" >
- {getFieldDecorator('orgCode')(
- <span>{this.state.orgCode}</span>
- )}
- </FormItem>
- <FormItem
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 18 }}
- label="组织机构代码证图片" >
- <div className="idcard-img clearfix">
- {this.state.orgCodeUrl ? <div>
- <div className="idcard-imgbox">
- <img src={globalConfig.context + '/open/writeImage?path=' + this.state.orgCodeUrl} alt="点击查看大图"
- onClick={(e) => { window.open(e.target.src) }} />
- </div>
- </div> : <div>
- <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</p>
- </div>}
- </div>
- </FormItem>
- <FormItem
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 18 }}
- label="上年度纳税报表" >
- <div className="idcard-img clearfix">
- {this.state.lastYearTaxReportUrl ? <div>
- <a onClick={newDownloadFile.bind(null, this.state.lastYearTaxReportId, "last_year_ratepay", "/api/admin/patent/downloadRatepay")}>上年度纳税报表</a>
- </div> : <div>
- <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</p>
- </div>}
- </div>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="开户银行" >
- {getFieldDecorator('banks')(
- <span>{this.state.banks}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="开户银行支行" >
- {getFieldDecorator('bankBranch')(
- <span>{this.state.bankBranch}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="银行卡号" >
- {getFieldDecorator('bankCardNumber')(
- <span>{this.state.bankCardNumber}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="开户行所在地" >
- {getFieldDecorator('locationAddress', {
- initialValue: this.state.locationAddress
- })(
- <span>{getProvince(this.state.locationProvince, this.state.locationCity, this.state.locationArea)}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="用户等级" >
- {getFieldDecorator('level')(
- <span>{"Lv." + (this.state.level || 0)}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="认证状态" >
- {getFieldDecorator('auditStatus', {
- initialValue: this.state.auditStatus
- })(
- <Select placeholder="选择要修改的认证状态" style={{ width: 200 }}
- onChange={(e) => { this.state.auditStatus = e }}>
- {
- auditStatusList.map(function (item, i) {
- return <Select.Option key={i} value={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="业务员" >
- {getFieldDecorator('aid', {
- initialValue: this.state.aid
- })(
- <Select placeholder="选择一个业务员" style={{ width: 200 }}>
- {this.state.technicianOption}
- </Select>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="客户经理" >
- {getFieldDecorator('mid', {
- initialValue: this.state.mid
- })(
- <Select placeholder="选择一个客户经理" style={{ width: 200 }}>
- {this.state.accountManagerOption}
- </Select>
- )}
- </FormItem>
- </Tabs.TabPane>
- </Tabs>
- <FormItem wrapperCol={{ span: 12, offset: 4 }}>
- <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
- <Button className="set-submit" type="ghost" onClick={this.handleCancel} >取消</Button>
- </FormItem>
- </Form >
- );
- }
- }));
- const OrgCertify = Form.create()(React.createClass({
- getInitialState() {
- return {
- loading: false,
- tabKey: "1",
- saveSign: "save",
- eduLvlOption: [],
- auditStatusOption: []
- };
- },
- loadData(uid) {
- this.state.data = [];
- this.setState({
- loading: true
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/orgDetail",
- data: {
- uid: uid
- },
- success: function (data) {
- let thisData = data.data;
- if (!thisData) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- thisData = {};
- };
- this.setState({
- id: thisData.id,
- licenceAddress: [thisData.licenceProvince, thisData.licenceCity, thisData.licenceArea],
- locationAddress: [thisData.locationProvince, thisData.locationCity, thisData.locationArea],
- contacts: thisData.contacts,
- contactMobile: thisData.contactMobile,
- fixedTel: thisData.fixedTel,
- qq: thisData.qq,
- postalAddress: thisData.postalAddress,
- postcode: thisData.postcode,
- aftUsername: thisData.aftUsername,
- unitName: thisData.unitName,
- identityType: thisData.identityType, //组织性质
- field: thisData.field ? thisData.field.split(',') : [],
- registeredCapital: thisData.registeredCapital, //注册资金
- firstContacts: thisData.firstContacts,
- firstMobile: thisData.firstMobile,
- secondContacts: thisData.secondContacts,
- secondMobile: thisData.secondMobile,
- thirdContacts: thisData.thirdContacts,
- thirdMobile: thisData.thirdMobile,
- legalPerson: thisData.legalPerson,
- legalPersonIdCard: thisData.legalPersonIdCard,
- licenceNumber: thisData.licenceNumber,
- licenceScanningUrl: thisData.licenceScanningUrl,
- orgCode: thisData.orgCode,
- orgCodeUrl: thisData.orgCodeUrl,
- bankAccount: thisData.bankAccount,
- banks: thisData.banks,
- bankBranch: thisData.bankBranch,
- bankCardNumber: thisData.bankCardNumber,
- validationAmount: thisData.validationAmount, //打款金额
- paymentDate: thisData.paymentDate,
- paymentDateFormattedDate: thisData.paymentDateFormattedDate,
- lastYearTaxReportUrl: thisData.lastYearTaxReportUrl,
- auditStatus: thisData.auditStatus,
- level: thisData.level,
- aid: thisData.aid, //业务员ID
- mid: thisData.mid //客户经理ID
- });
- this.props.form.resetFields();
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- handleSubmit(e) {
- if (e) {
- e.preventDefault();
- };
- this.props.form.validateFields((err, values) => {
- if (!err) {
- this.props.spinState(true);
- // //金额判断
- // if (values.amountMoney && values.amountMoney < 0 && values.amountMoney > 100 && /^\d+(\.\d{2})?$/.test(values.amountMoney)) {
- // message.warning('请输入0-100以内的金额');
- // return;
- // };
- if ((this.state.auditStatus == "5" && values.level == "0") || (this.state.auditStatus != "5" && values.level != "0")) {
- message.warning('认证状态和用户等级不匹配!');
- return;
- };
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/updateOrgDetail",
- data: {
- uid: this.props.uid,
- id: this.state.id,
- contacts: values.contacts,
- contactMobile: values.contactMobile,
- postalAddress: values.postalAddress,
- postcode: values.postcode,
- aftUsername: values.aftUsername,
- unitName: values.unitName,
- identityType: values.identityType, //组织性质
- registeredCapital: values.registeredCapital, //注册资金
- legalPerson: values.legalPerson,
- legalPersonIdCard: values.legalPersonIdCard,
- licenceNumber: values.licenceNumber,
- orgCode: values.orgCode,
- field: values.field ? values.field.join(',') : undefined,
- firstContacts: values.firstContacts,
- firstMobile: values.firstMobile,
- secondContacts: values.secondContacts,
- secondMobile: values.secondMobile,
- thirdContacts: values.thirdContacts,
- thirdMobile: values.thirdMobile,
- bankAccount: values.bankAccount,
- banks: values.banks,
- bankBranch: values.bankBranch,
- bankCardNumber: values.bankCardNumber,
- validationAmount: values.validationAmount, //打款金额
- paymentDateFormattedDate: values.paymentDateFormattedDate ? values.paymentDateFormattedDate.format("YYYY-MM-DD") : undefined,
- licenceScanningUrl: this.state.licenceScanningUrl,
- orgCodeUrl: this.state.orgCodeUrl,
- lastYearTaxReportUrl: this.state.lastYearTaxReportUrl,
- //process: this.state.process,
- licenceArea: values.licenceAddress[2],
- licenceCity: values.licenceAddress[1],
- licenceProvince: values.licenceAddress[0],
- locationArea: values.locationAddress[2],
- locationCity: values.locationAddress[1],
- locationProvince: values.locationAddress[0],
- //auditStatus: this.state.auditStatus,
- level: values.level,
- aid: values.aid, //指派业务员ID
- mid: values.mid, //指派客户经理ID
- saveSign: this.state.saveSign
- }
- }).done(function (data) {
- if (!data.error.length) {
- message.success('保存成功!');
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)).always(function () {
- this.setState({
- saveSign: "save"
- });
- this.props.spinState(false);
- this.props.handleOk();
- }.bind(this));
- }
- });
- },
- handleCancel() {
- this.props.closeDesc(false);
- },
- componentWillMount() {
- let _me = this;
- eduLevelList.map(function (item, i) {
- _me.state.eduLvlOption.push(
- <Select.Option key={item.key} value={item.value} >{item.key}</Select.Option>
- );
- });
- this.loadData(this.props.uid);
- },
- componentWillReceiveProps(nextProps) {
- if (!this.props.visible && nextProps.visible) {
- this.loadData(nextProps.uid);
- this.state.tabKey = "1";
- };
- },
- render() {
- const { getFieldDecorator } = this.props.form;
- const FormItem = Form.Item
- const formItemLayout = {
- labelCol: { span: 6 },
- wrapperCol: { span: 12 },
- };
- return (
- <Form horizontal onSubmit={this.handleSubmit} className="person-form">
- <Tabs defaultActiveKey="1" activeKey={this.state.tabKey} onChange={(e) => { this.setState({ tabKey: e }); }}>
- <Tabs.TabPane tab="基本资料" key="1">
- <FormItem
- {...formItemLayout}
- label="公司名称" >
- {getFieldDecorator('unitName', {
- initialValue: this.state.unitName
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="认证名称" >
- {getFieldDecorator('aftUsername', {
- initialValue: this.state.aftUsername
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="身份类型" >
- {getFieldDecorator('identityType', {
- initialValue: this.state.identityType
- })(
- <Select placeholder="身份类型" style={{ width: 200 }}
- onChange={(e) => { this.state.identityType = e }}>
- {this.state.eduLvlOption}
- </Select>
- )}
- </FormItem>
- <FormItem className="half-item"
- {...formItemLayout}
- label="领域" >
- {getFieldDecorator('field', {
- initialValue: this.state.field
- })(
- <Cascader placeholder="请选择一个领域" options={techFieldList} />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="第一联系人" >
- {getFieldDecorator('firstContacts', {
- initialValue: this.state.firstContacts
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="第一联系人电话" >
- {getFieldDecorator('firstMobile', {
- initialValue: this.state.firstMobile
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="第二联系人" >
- {getFieldDecorator('secondContacts', {
- initialValue: this.state.secondContacts
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="第二联系人电话" >
- {getFieldDecorator('secondMobile', {
- initialValue: this.state.secondMobile
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="第三联系人" >
- {getFieldDecorator('thirdContacts', {
- initialValue: this.state.thirdContacts
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="第三联系人电话" >
- {getFieldDecorator('thirdMobile', {
- initialValue: this.state.thirdMobile
- })(
- <Input />
- )}
- </FormItem>
- </Tabs.TabPane>
- <Tabs.TabPane tab="认证信息" key="2">
- <FormItem
- {...formItemLayout}
- label="法人" >
- {getFieldDecorator('legalPerson', {
- initialValue: this.state.legalPerson
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="法人身份证号" >
- {getFieldDecorator('legalPersonIdCard', {
- initialValue: this.state.legalPersonIdCard
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="注册资金" >
- {getFieldDecorator('registeredCapital', {
- initialValue: this.state.registeredCapital
- })(
- <InputNumber min={0} max={999999} step={1} />
- )}
- <span> 万元</span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="营业执照编号" >
- {getFieldDecorator('licenceNumber', {
- initialValue: this.state.licenceNumber
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="营业执照所在地" >
- {getFieldDecorator('licenceAddress', {
- initialValue: this.state.licenceAddress
- })(
- <Cascader options={areaSelect()} placeholder="请选择地址" />
- )}
- </FormItem>
- <FormItem
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 18 }}
- label="营业执照图片" >
- <div className="idcard-img clearfix">
- {this.state.licenceScanningUrl ? <div>
- <div className="idcard-imgbox">
- <img src={globalConfig.context + '/open/writeImage?path=' + this.state.licenceScanningUrl} alt="点击查看大图"
- onClick={(e) => { window.open(e.target.src) }} />
- </div>
- </div> : <div>
- <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</p>
- </div>}
- <Upload
- name="licence"
- action={globalConfig.context + "/api/admin/userCertify/upload"}
- data={{
- 'uid': this.props.uid,
- 'sign': 'licence'
- }}
- beforeUpload={beforeUploadFile}
- showUploadList={false}
- onChange={(info) => {
- if (info.file.status !== 'uploading') {
- console.log(info.file, info.fileList);
- }
- if (info.file.status === 'done') {
- if (!info.file.response.error.length) {
- message.success(`${info.file.name} 文件上传成功!`);
- } else {
- message.warning(info.file.response.error[0].message);
- return;
- };
- this.state.licenceScanningUrl = info.file.response.data;
- } else if (info.file.status === 'error') {
- message.error(`${info.file.name} 文件上传失败。`);
- }
- }} >
- <Button><Icon type="upload" /> 上传营业执照 </Button>
- </Upload>
- </div>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="组织机构代码" >
- {getFieldDecorator('orgCode', {
- initialValue: this.state.orgCode
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 18 }}
- label="组织机构代码证图片" >
- <div className="idcard-img clearfix">
- {this.state.orgCodeUrl ? <div>
- <div className="idcard-imgbox">
- <img src={globalConfig.context + '/open/writeImage?path=' + this.state.orgCodeUrl} alt="点击查看大图"
- onClick={(e) => { window.open(e.target.src) }} />
- </div>
- </div> : <div>
- <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</p>
- </div>}
- <Upload
- name="orgCode"
- action={globalConfig.context + "/api/admin/userCertify/upload"}
- data={{ 'uid': this.props.uid, 'sign': 'orgcode' }}
- beforeUpload={beforeUploadFile}
- showUploadList={false}
- onChange={(info) => {
- if (info.file.status !== 'uploading') {
- console.log(info.file, info.fileList);
- }
- if (info.file.status === 'done') {
- if (!info.file.response.error.length) {
- message.success(`${info.file.name} 文件上传成功!`);
- } else {
- message.warning(info.file.response.error[0].message);
- return;
- };
- this.state.orgCodeUrl = info.file.response.data;
- } else if (info.file.status === 'error') {
- message.error(`${info.file.name} 文件上传失败。`);
- }
- }} >
- <Button><Icon type="upload" /> 上传组织机构代码证 </Button>
- </Upload>
- </div>
- </FormItem>
- <FormItem
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 18 }}
- label="上年度纳税报表" >
- <div className="idcard-img clearfix">
- {this.state.lastYearTaxReportUrl ? <div>
- <a onClick={newDownloadFile.bind(null, this.state.lastYearTaxReportId, "last_year_ratepay", "/api/admin/patent/downloadRatepay")}>上年度纳税报表</a>
- </div> : <div>
- <p><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传</p>
- </div>}
- <Upload
- name="ratepay"
- action={globalConfig.context + "/api/admin/userCertify/upload"}
- data={{ 'uid': this.props.uid, 'sign': 'ratepay' }}
- beforeUpload={beforeUploadFile}
- showUploadList={false}
- onChange={(info) => {
- if (info.file.status !== 'uploading') {
- console.log(info.file, info.fileList);
- }
- if (info.file.status === 'done') {
- if (!info.file.response.error.length) {
- message.success(`${info.file.name} 文件上传成功!`);
- } else {
- message.warning(info.file.response.error[0].message);
- return;
- };
- this.state.lastYearTaxReportUrl = info.file.response.data;
- } else if (info.file.status === 'error') {
- message.error(`${info.file.name} 文件上传失败。`);
- }
- }} >
- <Button><Icon type="upload" /> 上传上年度纳税表 </Button>
- </Upload>
- </div>
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="开户银行" >
- {getFieldDecorator('banks', {
- initialValue: this.state.banks
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="开户银行支行" >
- {getFieldDecorator('bankBranch', {
- initialValue: this.state.bankBranch
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="银行卡号" >
- {getFieldDecorator('bankCardNumber', {
- initialValue: this.state.bankCardNumber
- })(
- <Input />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="开户行所在地" >
- {getFieldDecorator('locationAddress', {
- initialValue: this.state.locationAddress
- })(
- <Cascader options={areaSelect()} placeholder="请选择地址" />
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="用户等级" >
- {getFieldDecorator('level', {
- initialValue: this.state.level
- })(
- <Select placeholder="选择要修改的用户等级" style={{ width: 200 }} >
- <Select.Option value="0" >Lv.0</Select.Option>
- <Select.Option value="1" >Lv.1</Select.Option>
- <Select.Option value="2" >Lv.2</Select.Option>
- <Select.Option value="3" >Lv.3</Select.Option>
- <Select.Option value="4" >Lv.4</Select.Option>
- <Select.Option value="5" >Lv.5</Select.Option>
- </Select>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="认证状态" >
- {getFieldDecorator('auditStatus')(
- <span>{getAuditState(this.state.auditStatus)}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="业务员" >
- {getFieldDecorator('aid')(
- <span>{this.props.data.adminName}</span>
- )}
- </FormItem>
- <FormItem
- {...formItemLayout}
- label="客户经理" >
- {getFieldDecorator('mid')(
- <span>{this.props.data.managerName}</span>
- )}
- </FormItem>
- </Tabs.TabPane>
- </Tabs>
- <FormItem wrapperCol={{ span: 12, offset: 4 }}>
- <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
- <Button className="set-submit" type="ghost"
- onClick={() => {
- this.state.saveSign = "submit";
- this.handleSubmit();
- }}>提交审核</Button>
- </FormItem>
- </Form >
- );
- }
- }));
- const OrgDesc = React.createClass({
- getInitialState() {
- return {
- visible: false,
- loading: false
- };
- },
- showModal() {
- this.setState({
- visible: true,
- });
- },
- handleCancel(e) {
- this.setState({
- visible: false,
- });
- this.props.closeDesc(false);
- },
- handleOk(e) {
- this.setState({
- visible: false,
- });
- this.props.closeDesc(false, true);
- },
- componentWillReceiveProps(nextProps) {
- this.state.visible = nextProps.showDesc;
- },
- spinChange(e) {
- this.setState({
- loading: e
- });
- },
- render() {
- if (this.props.data) {
- return (
- <div className="patent-desc">
- <Modal maskClosable={false} title="用户详情" visible={this.state.visible}
- onCancel={this.handleCancel}
- width='600px'
- footer=''
- className="admin-desc-content">
- <Spin spinning={this.state.loading} className='spin-box'>
- {window.showAuditStatus ? <OrgShow
- uid={this.props.data.id}
- data={this.props.data}
- closeDesc={this.handleCancel}
- spinState={this.spinChange}
- visible={this.state.visible}
- handleOk={this.handleOk} />
- : <OrgCertify
- uid={this.props.data.id}
- data={this.props.data}
- closeDesc={this.handleCancel}
- spinState={this.spinChange}
- visible={this.state.visible}
- handleOk={this.handleOk} />}
- </Spin>
- </Modal>
- </div>
- );
- } else {
- return <div></div>
- }
- },
- });
- export default OrgDesc;
- // <FormItem
- // {...formItemLayout}
- // label="打款金额"
- // >
- // {getFieldDecorator('validationAmount', {
- // initialValue: this.state.validationAmount
- // })(
- // <Input />
- // )}
- // </FormItem>
- // <FormItem
- // {...formItemLayout}
- // label="打款日期"
- // >
- // {getFieldDecorator('paymentDateFormattedDate', {
- // initialValue: this.state.paymentDate ? moment(this.state.paymentDate) : null
- // })(
- // <DatePicker />
- // )}
- // </FormItem>
|