|
@@ -0,0 +1,905 @@
|
|
|
+import React from 'react';
|
|
|
+import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message, DatePicker, Upload, Form ,Modal} from 'antd';
|
|
|
+import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
+import $ from 'jquery/src/ajax';
|
|
|
+import moment from 'moment';
|
|
|
+import { citySelect, provinceList ,areaSelect} from '@/NewDicProvinceList';
|
|
|
+import { socialAttribute, industry, auditStatusL, lvl, currentMember ,} from '@/dataDic.js';
|
|
|
+import { getSocialAttribute, beforeUploadFile,splitUrl } from '@/tools.js';
|
|
|
+
|
|
|
+import './customer.less';
|
|
|
+//图片组件
|
|
|
+const PicturesWall = React.createClass({
|
|
|
+ getInitialState() {
|
|
|
+ return {
|
|
|
+ previewVisible: false,
|
|
|
+ previewImage: '',
|
|
|
+ fileList: [],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleCancel() {
|
|
|
+ this.setState({
|
|
|
+ previewVisible: false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handlePreview(file) {
|
|
|
+ this.setState({
|
|
|
+ previewImage: file.url || file.thumbUrl,
|
|
|
+ previewVisible: true,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleChange(info) {
|
|
|
+ let fileList = info.fileList;
|
|
|
+ this.setState({
|
|
|
+ fileList
|
|
|
+ });
|
|
|
+ this.props.fileList(fileList);
|
|
|
+ },
|
|
|
+ componentWillReceiveProps(nextProps) {
|
|
|
+ this.state.fileList = nextProps.pictureUrl;
|
|
|
+ },
|
|
|
+ render() {
|
|
|
+ const {
|
|
|
+ previewVisible,
|
|
|
+ previewImage,
|
|
|
+ fileList
|
|
|
+ } = this.state;
|
|
|
+ const uploadButton = (
|
|
|
+ <div>
|
|
|
+ <Icon type="plus" />
|
|
|
+ <div className="ant-upload-text">点击上传</div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ return(
|
|
|
+ <div style={{display:"inline-block"}}>
|
|
|
+ <Upload
|
|
|
+ action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
|
|
|
+ data={{ 'sign': '' }}
|
|
|
+ listType="picture-card"
|
|
|
+ fileList={fileList}
|
|
|
+ onPreview={this.handlePreview}
|
|
|
+ onChange={this.handleChange} >
|
|
|
+ {fileList.length >= 1 ? null : uploadButton}
|
|
|
+ </Upload>
|
|
|
+ <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
|
|
|
+ <img alt="example" style={{ width: '100%' }} src={previewImage} />
|
|
|
+ </Modal>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ }
|
|
|
+});
|
|
|
+const IntentionCustomer = Form.create()(React.createClass({
|
|
|
+ loadData(pageNo, apiUrl) {
|
|
|
+ this.setState({
|
|
|
+ visitModul:false,
|
|
|
+ loading: true,
|
|
|
+ ispage:pageNo,
|
|
|
+ modalVisible:false
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context +"/api/admin/customer/listCustomerInformation",
|
|
|
+ data: {
|
|
|
+ pageNo: pageNo || 1,
|
|
|
+ pageSize: this.state.pagination.pageSize,
|
|
|
+ name: this.state.nameSearch,
|
|
|
+ province: !(this.state.addressSearch).length ? this.state.provinceSearch : this.state.addressSearch[0],
|
|
|
+ city: !(this.state.addressSearch).length ? '' : this.state.addressSearch[1],
|
|
|
+ startDate: this.state.releaseDate[0],
|
|
|
+ endDate: this.state.releaseDate[1],
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ let theArr = [];
|
|
|
+ if(data.error.length || data.data.list == "") {
|
|
|
+ if(data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ for(let i = 0; i < data.data.list.length; i++) {
|
|
|
+ let thisdata = data.data.list[i];
|
|
|
+ let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
|
|
|
+ theArr.push({
|
|
|
+ key: i,
|
|
|
+ id: thisdata.id,//用户ID
|
|
|
+ type:thisdata.type,//类型
|
|
|
+ name: thisdata.name,//用户名称
|
|
|
+ diqu: diqu,//省市区
|
|
|
+ industry: thisdata.industry,//行业
|
|
|
+ contacts: thisdata.contacts,//联系人
|
|
|
+ contactMobile: thisdata.contactMobile,//联系人电话
|
|
|
+ createTime: thisdata.createTime,//行业
|
|
|
+ });
|
|
|
+ };
|
|
|
+ this.state.pagination.current = data.data.pageNo;
|
|
|
+ this.state.pagination.total = data.data.totalCount;
|
|
|
+ };
|
|
|
+ if(data.data&&data.data.list&&!data.data.list.length){
|
|
|
+ this.state.pagination.current=0
|
|
|
+ this.state.pagination.total=0
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ dataSource: theArr,
|
|
|
+ pagination: this.state.pagination,
|
|
|
+ selectedRowKeys:[]
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function() {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ getInitialState() {
|
|
|
+ return {
|
|
|
+ addressSearch: [],
|
|
|
+ orgCodeUrl: [],
|
|
|
+ companyLogoUrl: [],
|
|
|
+ visible: false,
|
|
|
+ releaseDate: [],
|
|
|
+ visitModul:false,
|
|
|
+ detailApi:'',
|
|
|
+ followData:{},
|
|
|
+ selectedRowKeys: [],
|
|
|
+ selectedRows: [],
|
|
|
+ loading: false,
|
|
|
+ modalVisible:false,
|
|
|
+ pagination: {
|
|
|
+ defaultCurrent: 1,
|
|
|
+ defaultPageSize: 10,
|
|
|
+ showQuickJumper: true,
|
|
|
+ pageSize: 10,
|
|
|
+ onChange: function(page) {
|
|
|
+ this.loadData(page);
|
|
|
+ }.bind(this),
|
|
|
+ showTotal: function(total) {
|
|
|
+ return '共' + total + '条数据';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ columns: [{
|
|
|
+ title: '客户名称',
|
|
|
+ dataIndex: 'name',
|
|
|
+ key: 'name',
|
|
|
+ }, {
|
|
|
+ title: '地区',
|
|
|
+ dataIndex: 'diqu',
|
|
|
+ key: 'diqu',
|
|
|
+ }, {
|
|
|
+ title: '联系人',
|
|
|
+ dataIndex: 'contacts',
|
|
|
+ key: 'contacts',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '联系电话',
|
|
|
+ dataIndex: 'contactMobile',
|
|
|
+ key: 'contactMobile',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '创建时间',
|
|
|
+ dataIndex: 'createTime',
|
|
|
+ key: 'createTime',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '行业',
|
|
|
+ dataIndex: 'industry',
|
|
|
+ key: 'industry'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ data: [],
|
|
|
+ dataman: [],
|
|
|
+ dataSource: [],
|
|
|
+ visitArrList: [],
|
|
|
+ searchTime: [, ]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ componentWillMount() {
|
|
|
+ //城市
|
|
|
+ let Province = [];
|
|
|
+ provinceList.map(function(item) {
|
|
|
+ var id = String(item.id)
|
|
|
+ Province.push(
|
|
|
+ <Select.Option value={id} key={item.name}>{item.name}</Select.Option>
|
|
|
+ )
|
|
|
+ });
|
|
|
+ //行业
|
|
|
+ let intentionalArr = [];
|
|
|
+ industry.map(function(item) {
|
|
|
+ intentionalArr.push(
|
|
|
+ <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
|
|
|
+ )
|
|
|
+ });
|
|
|
+ //会员等级
|
|
|
+ let lvlArr = [];
|
|
|
+ lvl.map(function(item) {
|
|
|
+ lvlArr.push(
|
|
|
+ <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
|
|
|
+ )
|
|
|
+ });
|
|
|
+ //会员状态customerStatus
|
|
|
+ let currentMemberArr = [];
|
|
|
+ currentMember.map(function(item) {
|
|
|
+ currentMemberArr.push(
|
|
|
+ <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
|
|
|
+ )
|
|
|
+ });
|
|
|
+ this.state.Provinces = Province;
|
|
|
+ this.state.intentionalOption = intentionalArr;
|
|
|
+ this.state.lvlArrOption = lvlArr;
|
|
|
+ this.state.currentMemberArrOption = currentMemberArr;
|
|
|
+ this.loadData();
|
|
|
+ },
|
|
|
+ search() {
|
|
|
+ this.loadData();
|
|
|
+ },
|
|
|
+ reset() {
|
|
|
+ this.state.nameSearch = '';
|
|
|
+ this.state.addressSearch = [];
|
|
|
+ this.state.provinceSearch = undefined;
|
|
|
+ this.state.citySearch = undefined;
|
|
|
+ this.state.releaseDate[0] = undefined;
|
|
|
+ this.state.releaseDate[1] = undefined;
|
|
|
+ this.loadData();
|
|
|
+ },
|
|
|
+ //列表详情
|
|
|
+ details(id) {
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context +"/api/admin/customer/findOrganizationCustomerDetail",
|
|
|
+ data: {
|
|
|
+ uid:id
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+
|
|
|
+ let thisDetail= data.data;
|
|
|
+ if(data.error.length || data.data.list == "") {
|
|
|
+ if(data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ let ProvinceCityArr = [];
|
|
|
+ let ProvinceS = thisDetail.locationProvince; //省
|
|
|
+ let citys = thisDetail.locationCity;//市
|
|
|
+ let Areas = thisDetail.locationArea;//区
|
|
|
+ ProvinceCityArr.push(ProvinceS, citys, Areas);
|
|
|
+ this.setState({
|
|
|
+ detailId:thisDetail.id,//详情ID
|
|
|
+ identifyName:thisDetail.identifyName,//客户名称
|
|
|
+ uid:thisDetail.uid,//客户ID
|
|
|
+ societyTag:thisDetail.societyTag,//社会标签
|
|
|
+ companyLogoUrl:thisDetail.companyLogoUrl? splitUrl(thisDetail.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],//公司LOGO
|
|
|
+ introduction:thisDetail.introduction,//介绍
|
|
|
+ industry:thisDetail.industry.toString(),//行业
|
|
|
+ locationProvince:thisDetail.locationProvince,//省
|
|
|
+ locationCity:thisDetail.locationCity,//市
|
|
|
+ locationArea:thisDetail.locationArea,//区
|
|
|
+ ProvinceCity: ProvinceCityArr[0]!=null?ProvinceCityArr:undefined,//省市区
|
|
|
+ postalAddress:thisDetail.postalAddress,//通讯地址
|
|
|
+ contactsFixedTel:thisDetail.contactsFixedTel,//固定电话
|
|
|
+ contactsFax:thisDetail.contactsFax,//传真地址
|
|
|
+ registeredCapital:thisDetail.registeredCapital,//注册资金
|
|
|
+ enterpriseScale:thisDetail.enterpriseScale,//企业规模
|
|
|
+ legalPerson:thisDetail.legalPerson,//法人
|
|
|
+ legalPersonIdCard:thisDetail.legalPersonIdCard,//法人身份证
|
|
|
+ legalPersonTel:thisDetail.legalPersonTel,//法人联系电话
|
|
|
+ legalPersonEmail:thisDetail.legalPersonEmail,//法人联系邮箱
|
|
|
+ highTechZone:thisDetail.highTechZone,//是否高新
|
|
|
+ listed:thisDetail.listed,//是否高新
|
|
|
+ international:thisDetail.international,//是否国际化
|
|
|
+ orgCode:thisDetail.orgCode,//社会统一机构
|
|
|
+ orgCodeUrl:thisDetail.orgCodeUrl? splitUrl(thisDetail.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],//社会统一机构地址
|
|
|
+ businessScope:thisDetail.businessScope,//业务范围
|
|
|
+ contacts:thisDetail.contacts,//主要联系人姓名
|
|
|
+ contactMobile:thisDetail.contactMobile,//主要联系人电话
|
|
|
+ investment:thisDetail.investment,//投资机构
|
|
|
+ businessAudit:thisDetail.businessAudit,//业务认证
|
|
|
+ auditStatus:thisDetail.auditStatus,//实名认证
|
|
|
+ intellectualProperty:thisDetail.intellectualProperty,//已有知识产权情况
|
|
|
+ yearSalesAmount:thisDetail.yearSalesAmount,//年度销售额
|
|
|
+ lastYearResearchAmount:thisDetail.lastYearResearchAmount,//上年度研发费用
|
|
|
+ assets:thisDetail.assets,//总资产
|
|
|
+ qualification:thisDetail.qualification,//企业资质情况
|
|
|
+ cooperationSituation:thisDetail.cooperationSituation,//企业与高校院所
|
|
|
+ informationMaintainer:thisDetail.informationMaintainer,//资料维护人
|
|
|
+ coreTechnology:thisDetail.coreTechnology,//核心技术
|
|
|
+ accomplishSituation:thisDetail.accomplishSituation,//客户已完成项目情况
|
|
|
+ });
|
|
|
+ }}.bind(this),
|
|
|
+ }).always(function() {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ //基本信息提交
|
|
|
+ newSubmit(e) {
|
|
|
+ e.preventDefault();
|
|
|
+ console.log(this.state.ProvinceCity);
|
|
|
+ if(!this.state.industry) {
|
|
|
+ message.warning('请选择行业');
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ if(!this.state.societyTag) {
|
|
|
+ message.warning('请选择社会性质');
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ if(!this.state.ProvinceCity[1]) {
|
|
|
+ message.warning('请选择地区');
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ var reg = /^[1-9]\d*$|^0$/;
|
|
|
+ if(this.state.consultationPrice) {
|
|
|
+ if(this.state.consultationPrice.length > 6) {
|
|
|
+ message.warning('咨询费用不超过6位数');
|
|
|
+ this.refs.consul.focus();
|
|
|
+ return false;
|
|
|
+ };
|
|
|
+ if(!reg.test(this.state.consultationPrice)) {
|
|
|
+ message.warning('咨询费用只能输入数字');
|
|
|
+ this.refs.consul.focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.state.data = [];
|
|
|
+ this.setState({
|
|
|
+ selectedRowKeys: [],
|
|
|
+ });
|
|
|
+
|
|
|
+ let theorgCodeUrl = [];
|
|
|
+ if(this.state.orgCodeUrl.length) {
|
|
|
+ let picArr = [];
|
|
|
+ this.state.orgCodeUrl.map(function(item) {
|
|
|
+ if(item.response && item.response.data && item.response.data.length) {
|
|
|
+ picArr.push(item.response.data);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ theorgCodeUrl = picArr.join(",");
|
|
|
+ };
|
|
|
+ let thecompanyLogoUrl = [];
|
|
|
+ if(this.state.companyLogoUrl.length) {
|
|
|
+ let picArr = [];
|
|
|
+ this.state.companyLogoUrl.map(function(item) {
|
|
|
+ if(item.response && item.response.data && item.response.data.length) {
|
|
|
+ picArr.push(item.response.data);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ thecompanyLogoUrl = picArr.join(",");
|
|
|
+ };
|
|
|
+ let years = [];
|
|
|
+ let yearMonth = this.state.yearMonth != undefined ? new Date(this.state.yearMonth).toLocaleDateString() : '';
|
|
|
+ years = yearMonth.split('/');
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ url: globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
|
|
|
+ data: {
|
|
|
+ id:this.state.detailId,//详情ID
|
|
|
+ identifyName:this.state.identifyName,//客户名称
|
|
|
+ uid:this.state.uid,//客户ID
|
|
|
+ societyTag:this.state.societyTag,//社会标签
|
|
|
+ companyLogoUrl:thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '',//公司LOGO
|
|
|
+ introduction:this.state.introduction,//介绍
|
|
|
+ industry:this.state.industry,//行业
|
|
|
+ locationProvince:(this.state.ProvinceCity)[0],//省
|
|
|
+ locationCity:(this.state.ProvinceCity)[1],//市
|
|
|
+ locationArea:(this.state.ProvinceCity)[2],//区
|
|
|
+ postalAddress:this.state.postalAddress,//通讯地址
|
|
|
+ contactsFixedTel:this.state.contactsFixedTel,//固定电话
|
|
|
+ contactsFax:this.state.contactsFax,//传真地址
|
|
|
+ registeredCapital:this.state.registeredCapital,//注册资金
|
|
|
+ enterpriseScale:this.state.enterpriseScale,//企业规模
|
|
|
+ legalPerson:this.state.legalPerson,//法人
|
|
|
+ legalPersonIdCard:this.state.legalPersonIdCard,//法人身份证
|
|
|
+ legalPersonTel:this.state.legalPersonTel,//法人联系电话
|
|
|
+ legalPersonEmail:this.state.legalPersonEmail,//法人联系邮箱
|
|
|
+ highTechZone:this.state.highTechZone,//是否高新
|
|
|
+ listed:this.state.listed,//是否高新
|
|
|
+ international:this.state.international,//是否国际化
|
|
|
+ orgCode:this.state.orgCode,//社会统一机构
|
|
|
+ orgCodeUrl: theorgCodeUrl.length != 0 ? theorgCodeUrl : '',//社会统一机构地址
|
|
|
+ businessScope:this.state.businessScope,//业务范围
|
|
|
+ contacts:this.state.contacts,//主要联系人姓名
|
|
|
+ contactMobile:this.state.contactMobile,//主要联系人电话
|
|
|
+ investment:this.state.investment,//投资机构
|
|
|
+ businessAudit:this.state.businessAudit,//业务认证
|
|
|
+ auditStatus:this.state.auditStatus,//实名认证
|
|
|
+ intellectualProperty:this.state.intellectualProperty,//已有知识产权情况
|
|
|
+ yearSalesAmount:this.state.yearSalesAmount,//年度销售额
|
|
|
+ lastYearResearchAmount:this.state.lastYearResearchAmount,//上年度研发费用
|
|
|
+ assets:this.state.assets,//总资产
|
|
|
+ qualification:this.state.qualification,//企业资质情况
|
|
|
+ cooperationSituation:this.state.cooperationSituation,//企业与高校院所
|
|
|
+ informationMaintainer:this.state.informationMaintainer,//资料维护人
|
|
|
+ coreTechnology:this.state.coreTechnology,//核心技术
|
|
|
+ accomplishSituation:this.state.accomplishSituation,//客户已完成项目情况
|
|
|
+ }
|
|
|
+ }).done(function(data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ if(!data.error.length) {
|
|
|
+ message.success('保存成功!');
|
|
|
+ this.visitCancel();
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this));
|
|
|
+
|
|
|
+ },
|
|
|
+ //整行点击
|
|
|
+ tableRowClick(record, index) {
|
|
|
+ this.state.visitModul=true;
|
|
|
+ this.details(record.id);
|
|
|
+ },
|
|
|
+ //指定转交人自动补全
|
|
|
+ supervisor(e){
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/customer/listAdminByName",
|
|
|
+ data:{
|
|
|
+ adminName:e
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let thedata=data.data;
|
|
|
+ if (!thedata) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ thedata = {};
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ customerArr:thedata,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ //输入转交人输入框失去焦点是判断客户是否存在
|
|
|
+ selectAuto(value,options){
|
|
|
+ this.setState({
|
|
|
+ auto:value
|
|
|
+ })
|
|
|
+ },
|
|
|
+ blurChange(e){
|
|
|
+ let theType='';
|
|
|
+ let contactLists=this.state.customerArr||[];
|
|
|
+ if (e) {
|
|
|
+ contactLists.map(function (item) {
|
|
|
+ if (item.name == e.toString()) {
|
|
|
+ theType = item.id;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ theTypes:theType
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //值改变时请求客户名称
|
|
|
+ httpChange(e){
|
|
|
+ if(e.length>=1){
|
|
|
+ this.supervisor(e);
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ auto:e
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //转交
|
|
|
+ changeAssigner() {
|
|
|
+ if(this.state.theTypes){
|
|
|
+ this.setState({
|
|
|
+ selectedRowKeys: [],
|
|
|
+ });
|
|
|
+ let id;
|
|
|
+ for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
|
|
|
+ let rowItem = this.state.selectedRows[idx];
|
|
|
+ if(rowItem.id) {
|
|
|
+ id=rowItem.id;
|
|
|
+ };
|
|
|
+ };
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/customer/updateInformationMaintainerr",
|
|
|
+ data: {
|
|
|
+ id: id, //客户ID
|
|
|
+ aid: this.state.theTypes, //指定转交人的ID
|
|
|
+
|
|
|
+ }
|
|
|
+ }).done(function(data) {
|
|
|
+ if(!data.error.length) {
|
|
|
+ message.success('转交成功!');
|
|
|
+ this.setState({
|
|
|
+ auto:'',
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ this.loadData(this.state.ispage);
|
|
|
+ }.bind(this));
|
|
|
+ }else{
|
|
|
+ message.warning('请输入转交人姓名')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //详情打开
|
|
|
+ visitOk(e) {
|
|
|
+ this.setState({
|
|
|
+ visitModul: false
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //详情关闭
|
|
|
+ visitCancel(e) {
|
|
|
+ this.setState({
|
|
|
+ visitModul: false
|
|
|
+ });
|
|
|
+ //this.props.closeDesc(false,false)
|
|
|
+ },
|
|
|
+ getOrgCodeUrl(e) {
|
|
|
+ this.setState({ orgCodeUrl: e });
|
|
|
+ },
|
|
|
+ getCompanyLogoUrl(e) {
|
|
|
+ this.setState({ companyLogoUrl: e });
|
|
|
+ },
|
|
|
+ componentWillReceiveProps(nextProps) {
|
|
|
+ if(nextProps.ApiUrl!=this.props.ApiUrl) {
|
|
|
+ this.state.nameSearch = '';
|
|
|
+ this.state.addressSearch = [];
|
|
|
+ this.state.provinceSearch = undefined;
|
|
|
+ this.state.citySearch = undefined;
|
|
|
+ this.state.releaseDate[0] = undefined;
|
|
|
+ this.state.releaseDate[1] = undefined;
|
|
|
+ this.loadData(null,nextProps.ApiUrl);
|
|
|
+ };
|
|
|
+ },
|
|
|
+ render() {
|
|
|
+ const {
|
|
|
+ RangePicker,
|
|
|
+ MonthPicker
|
|
|
+ } = DatePicker;
|
|
|
+ const formItemLayout = {
|
|
|
+ labelCol: { span: 8 },
|
|
|
+ wrapperCol: { span: 14 },
|
|
|
+ };
|
|
|
+ const FormItem = Form.Item;
|
|
|
+ const rowSelection = {
|
|
|
+ selectedRowKeys: this.state.selectedRowKeys,
|
|
|
+ onChange: (selectedRowKeys, selectedRows) => {
|
|
|
+ this.setState({
|
|
|
+ modalVisible:false,
|
|
|
+ selectedRows: selectedRows.slice(-1),
|
|
|
+ selectedRowKeys: selectedRowKeys.slice(-1)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onSelect: (recordt, selected, selectedRows) => {
|
|
|
+ this.setState({
|
|
|
+ modalVisible:false,
|
|
|
+ recordt: recordt.id
|
|
|
+ })
|
|
|
+ },
|
|
|
+ };
|
|
|
+ const hasSelected = this.state.selectedRowKeys.length > 0;
|
|
|
+ const dataSources=this.state.customerArr || [];
|
|
|
+ const options = dataSources.map((group) =>
|
|
|
+ <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
|
|
|
+ )
|
|
|
+ const intentionState = this.props.intentionState ||'';
|
|
|
+ return(
|
|
|
+ <div className="user-content" >
|
|
|
+ <div className="content-title">
|
|
|
+ <span>{!intentionState?'我的单位意向客户':'我的个人意向客户'}</span>
|
|
|
+ </div>
|
|
|
+ <div className="user-search">
|
|
|
+ <Input placeholder="客户名称"
|
|
|
+ value={this.state.nameSearch}
|
|
|
+ onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
|
|
|
+ <Select placeholder="省"
|
|
|
+ style={{ width: 80 }}
|
|
|
+ value={this.state.provinceSearch}
|
|
|
+ onChange={(e) => {this.setState({ provinceSearch: e});}}>
|
|
|
+ {this.state.Provinces}
|
|
|
+ </Select>
|
|
|
+ <span style={{marginRight:'10px'}}>
|
|
|
+ <Cascader options={citySelect()} value={this.state.addressSearch} placeholder="选择城市"
|
|
|
+ onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
|
|
|
+ </span>
|
|
|
+ <RangePicker style={{marginRight:'10px'}}
|
|
|
+ value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
|
|
|
+ this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
|
|
|
+ onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
|
|
|
+ <Button type="primary" onClick={this.search}>搜索</Button>
|
|
|
+ <Button onClick={this.reset}>重置</Button>
|
|
|
+ <AutoComplete
|
|
|
+ className="certain-category-search"
|
|
|
+ dropdownClassName="certain-category-search-dropdown"
|
|
|
+ dropdownMatchSelectWidth={false}
|
|
|
+ dropdownStyle={{ width: 120 }}
|
|
|
+ style={{ width: '120px'}}
|
|
|
+ dataSource={options}
|
|
|
+ placeholder="输入转交人姓名"
|
|
|
+ value={this.state.auto}
|
|
|
+ onChange={this.httpChange}
|
|
|
+ filterOption={true}
|
|
|
+ onBlur={this.blurChange}
|
|
|
+ onSelect={this.selectAuto}
|
|
|
+ disabled={!hasSelected}
|
|
|
+ >
|
|
|
+ <Input />
|
|
|
+ </AutoComplete>
|
|
|
+ <Button type="primary" onClick={this.changeAssigner} disabled={!hasSelected} >转交</Button>
|
|
|
+ </div>
|
|
|
+ <div className="patent-table">
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <Table columns={this.state.columns}
|
|
|
+ dataSource={this.state.dataSource}
|
|
|
+ rowSelection={rowSelection}
|
|
|
+ pagination={this.state.pagination}
|
|
|
+ onRowClick={this.tableRowClick}
|
|
|
+ />
|
|
|
+ </Spin>
|
|
|
+ </div>
|
|
|
+ <Modal
|
|
|
+ className="customeDetails"
|
|
|
+ footer=''
|
|
|
+ title="客户跟进详情"
|
|
|
+ width='1000px'
|
|
|
+ visible={this.state.visitModul}
|
|
|
+ onOk={this.visitOk}
|
|
|
+ onCancel={this.visitCancel}
|
|
|
+ >
|
|
|
+ <Form layout="horizontal" onSubmit={this.newSubmit} id="demand-form">
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <div className="clearfix" >
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="客户姓名"
|
|
|
+ >
|
|
|
+ <span>{this.state.identifyName}</span>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix" >
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="行业">
|
|
|
+ <Select placeholder="选择行业" value={this.state.industry} style={{width:'95%'}}
|
|
|
+ onChange={(e)=>{this.setState({industry:e})}}>
|
|
|
+ {
|
|
|
+ industry.map(function (item) {
|
|
|
+ return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </Select>
|
|
|
+ <span style={{color:'red',marginLeft:'5px'}}>*</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="社会属性"
|
|
|
+ >
|
|
|
+ <Select placeholder="客户社会属性" value={this.state.societyTag} style={{width:'95%'}}
|
|
|
+ onChange={(e)=>{this.setState({societyTag:e})}}>
|
|
|
+ {
|
|
|
+ socialAttribute.map(function (item) {
|
|
|
+ return <Select.Option key={item.value} >{item.key}</Select.Option>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </Select>
|
|
|
+ <span style={{color:'red',marginLeft:'5px'}}>*</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="省-市-区"
|
|
|
+ >
|
|
|
+ <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'95%'}}
|
|
|
+ onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
|
|
|
+ <span style={{color:'red',marginLeft:'5px'}}>*</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="通信地址"
|
|
|
+ >
|
|
|
+ <Input placeholder="客户通信地址" value={this.state.postalAddress}
|
|
|
+ onChange={(e,pre) => { this.setState({ postalAddress: e.target.value }) }}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="固定电话"
|
|
|
+ >
|
|
|
+ <Input placeholder="客户固定电话" value={this.state.contactsFixedTel}
|
|
|
+ onChange={(e) => { this.setState({ contactsFixedTel: e.target.value }) }}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="客户传真"
|
|
|
+ >
|
|
|
+ <Input placeholder="客户传真" value={this.state.contactsFax}
|
|
|
+ onChange={(e) => { this.setState({ contactsFax: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="注册资本"
|
|
|
+ >
|
|
|
+ <Input placeholder="注册资本" value={this.state.registeredCapital} onChange={(e) => {
|
|
|
+ this.setState({ registeredCapital: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="企业规模"
|
|
|
+ >
|
|
|
+ <Input placeholder="单位规模" value={this.state.enterpriseScale} onChange={(e) => {
|
|
|
+ this.setState({ enterpriseScale: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="法人名称"
|
|
|
+ >
|
|
|
+ <Input placeholder="法人名称" value={this.state.legalPerson} onChange={(e) => {
|
|
|
+ this.setState({ legalPerson: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="法人身份证"
|
|
|
+ >
|
|
|
+ <Input placeholder="法人身份证" value={this.state.legalPersonIdCard} onChange={(e) => {
|
|
|
+ this.setState({ legalPersonIdCard: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="主要联系人"
|
|
|
+ >
|
|
|
+ <Input placeholder="主要联系人" value={this.state.contacts} onChange={(e) => {
|
|
|
+ this.setState({ contacts: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="主要联系人号码"
|
|
|
+ >
|
|
|
+ <Input placeholder="主要联系人号码" value={this.state.contactMobile} onChange={(e) => {
|
|
|
+ this.setState({ contactMobile: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="法人电话"
|
|
|
+ >
|
|
|
+ <Input placeholder="法人电话" value={this.state.legalPersonTel} onChange={(e) => {
|
|
|
+ this.setState({ legalPersonTel: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="法人电子邮箱"
|
|
|
+ >
|
|
|
+ <Input placeholder="法人电子邮箱" value={this.state.legalPersonEmail}
|
|
|
+ onChange={(e) => {this.setState({legalPersonEmail: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="机构代码"
|
|
|
+ >
|
|
|
+ <Input placeholder="机构代码" value={this.state.orgCode} onChange={(e) => {
|
|
|
+ this.setState({ orgCode: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="上年度销售额"
|
|
|
+ >
|
|
|
+ <Input ref='consul' placeholder="请输入上年度销售额" value={this.state.yearSalesAmount}
|
|
|
+ onChange={(e) => {this.setState({yearSalesAmount: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="上年度研发费用"
|
|
|
+ >
|
|
|
+ <Input ref='consul' placeholder="请输入上年度研发费用" value={this.state.lastYearResearchAmount}
|
|
|
+ onChange={(e) => {this.setState({lastYearResearchAmount: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="上年度总资产情况"
|
|
|
+ >
|
|
|
+ <Input ref='consul' placeholder="上年度总资产情况" value={this.state.assets}
|
|
|
+ onChange={(e) => {this.setState({assets: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span:4 }}
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
+ label="业务范围" >
|
|
|
+ <Input type="textarea" rows={4} value={this.state.businessScope}
|
|
|
+ onChange={(e,pre) => { this.setState({ businessScope: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span:4 }}
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
+ label="客户简介" >
|
|
|
+ <Input type="textarea" rows={4} value={this.state.introduction}
|
|
|
+ onChange={(e,pre) => { this.setState({ introduction: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span:4 }}
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
+ label="已有知识产权情况" >
|
|
|
+ <Input type="textarea" rows={4} value={this.state.intellectualProperty}
|
|
|
+ onChange={(e,pre) => { this.setState({ intellectualProperty: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span:4 }}
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
+ label="核心技术" >
|
|
|
+ <Input type="textarea" rows={4} value={this.state.coreTechnology}
|
|
|
+ onChange={(e,pre) => { this.setState({ coreTechnology: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span:4 }}
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
+ label="企业资质情况" >
|
|
|
+ <Input type="textarea" rows={4} value={this.state.qualification}
|
|
|
+ onChange={(e,pre) => { this.setState({ qualification: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span:4 }}
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
+ label="客户已做项目" >
|
|
|
+ <Input type="textarea" rows={4} value={this.state.accomplishSituation}
|
|
|
+ onChange={(e,pre) => { this.setState({ accomplishSituation: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span:4 }}
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
+ label="企业高企合作情况" >
|
|
|
+ <Input type="textarea" rows={4} value={this.state.cooperationSituation}
|
|
|
+ onChange={(e,pre) => { this.setState({ cooperationSituation: e.target.value })}}/>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className="clearfix pictures">
|
|
|
+ <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginLeft:'95px'}}
|
|
|
+ labelCol={{ span: 8 }}
|
|
|
+ wrapperCol={{ span: 10 }}
|
|
|
+ label="机构证(PIC)" >
|
|
|
+ <PicturesWall
|
|
|
+ fileList={this.getOrgCodeUrl}
|
|
|
+ pictureUrl={this.state.orgCodeUrl} />
|
|
|
+ <p>建议:图片要清晰。</p>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginTop:'20px'}}
|
|
|
+ labelCol={{ span: 8 }}
|
|
|
+ wrapperCol={{ span: 10 }}
|
|
|
+ label="单位LOGO" >
|
|
|
+ <PicturesWall
|
|
|
+ fileList={this.getCompanyLogoUrl}
|
|
|
+ pictureUrl={this.state.companyLogoUrl} />
|
|
|
+ <p>建议:图片要清晰。</p>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <Button className="setSubmit" type="primary" htmlType="submit">保存</Button>
|
|
|
+ <Button type="ghost" onClick={this.detailsModal}>取消</Button>
|
|
|
+ </div>
|
|
|
+ </Spin>
|
|
|
+ </Form>
|
|
|
+ </Modal>
|
|
|
+ </div >
|
|
|
+ );
|
|
|
+ }
|
|
|
+}));
|
|
|
+export default IntentionCustomer;
|