crm.jsx 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  1. import React from 'react';
  2. import { Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message, DatePicker, Upload, Form ,Modal} from 'antd';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import moment from 'moment';
  6. import { citySelect, provinceList ,areaSelect} from '@/NewDicProvinceList';
  7. import { socialAttribute, industry, auditStatusL, lvl, currentMember ,} from '@/dataDic.js';
  8. import { getSocialAttribute, beforeUploadFile,splitUrl } from '@/tools.js';
  9. import './customer.less';
  10. //图片组件
  11. const PicturesWall = React.createClass({
  12. getInitialState() {
  13. return {
  14. previewVisible: false,
  15. previewImage: '',
  16. fileList: [],
  17. }
  18. },
  19. handleCancel() {
  20. this.setState({
  21. previewVisible: false
  22. })
  23. },
  24. handlePreview(file) {
  25. this.setState({
  26. previewImage: file.url || file.thumbUrl,
  27. previewVisible: true,
  28. });
  29. },
  30. handleChange(info) {
  31. let fileList = info.fileList;
  32. this.setState({
  33. fileList
  34. });
  35. this.props.fileList(fileList);
  36. },
  37. componentWillReceiveProps(nextProps) {
  38. this.state.fileList = nextProps.pictureUrl;
  39. },
  40. render() {
  41. const {
  42. previewVisible,
  43. previewImage,
  44. fileList
  45. } = this.state;
  46. const uploadButton = (
  47. <div>
  48. <Icon type="plus" />
  49. <div className="ant-upload-text">点击上传</div>
  50. </div>
  51. );
  52. return(
  53. <div style={{display:"inline-block"}}>
  54. <Upload
  55. action={globalConfig.context + "/api/admin/customer/uploadCustomerImg"}
  56. data={{ 'sign': '' }}
  57. listType="picture-card"
  58. fileList={fileList}
  59. onPreview={this.handlePreview}
  60. onChange={this.handleChange} >
  61. {fileList.length >= 1 ? null : uploadButton}
  62. </Upload>
  63. <Modal maskClosable={false} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
  64. <img alt="example" style={{ width: '100%' }} src={previewImage} />
  65. </Modal>
  66. </div>
  67. );
  68. }
  69. });
  70. const IntentionCustomer = Form.create()(React.createClass({
  71. loadData(pageNo, apiUrl) {
  72. this.setState({
  73. visitModul:false,
  74. loading: true,
  75. ispage:pageNo,
  76. modalVisible:false
  77. });
  78. $.ajax({
  79. method: "post",
  80. dataType: "json",
  81. crossDomain: false,
  82. url: globalConfig.context +"/api/admin/customer/listCustomerInformation",
  83. data: {
  84. pageNo: pageNo || 1,
  85. pageSize: this.state.pagination.pageSize,
  86. name: this.state.nameSearch,
  87. province: !(this.state.addressSearch).length ? this.state.provinceSearch : this.state.addressSearch[0],
  88. city: !(this.state.addressSearch).length ? '' : this.state.addressSearch[1],
  89. startDate: this.state.releaseDate[0],
  90. endDate: this.state.releaseDate[1],
  91. },
  92. success: function(data) {
  93. let theArr = [];
  94. if(data.error.length || data.data.list == "") {
  95. if(data.error && data.error.length) {
  96. message.warning(data.error[0].message);
  97. };
  98. } else {
  99. for(let i = 0; i < data.data.list.length; i++) {
  100. let thisdata = data.data.list[i];
  101. let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
  102. theArr.push({
  103. key: i,
  104. id: thisdata.id,//用户ID
  105. type:thisdata.type,//类型
  106. name: thisdata.name,//用户名称
  107. diqu: diqu,//省市区
  108. industry: thisdata.industry,//行业
  109. contacts: thisdata.contacts,//联系人
  110. contactMobile: thisdata.contactMobile,//联系人电话
  111. createTime: thisdata.createTime,//行业
  112. });
  113. };
  114. this.state.pagination.current = data.data.pageNo;
  115. this.state.pagination.total = data.data.totalCount;
  116. };
  117. if(data.data&&data.data.list&&!data.data.list.length){
  118. this.state.pagination.current=0
  119. this.state.pagination.total=0
  120. }
  121. this.setState({
  122. dataSource: theArr,
  123. pagination: this.state.pagination,
  124. selectedRowKeys:[]
  125. });
  126. }.bind(this),
  127. }).always(function() {
  128. this.setState({
  129. loading: false
  130. });
  131. }.bind(this));
  132. },
  133. getInitialState() {
  134. return {
  135. addressSearch: [],
  136. orgCodeUrl: [],
  137. companyLogoUrl: [],
  138. visible: false,
  139. releaseDate: [],
  140. visitModul:false,
  141. detailApi:'',
  142. followData:{},
  143. selectedRowKeys: [],
  144. selectedRows: [],
  145. loading: false,
  146. modalVisible:false,
  147. pagination: {
  148. defaultCurrent: 1,
  149. defaultPageSize: 10,
  150. showQuickJumper: true,
  151. pageSize: 10,
  152. onChange: function(page) {
  153. this.loadData(page);
  154. }.bind(this),
  155. showTotal: function(total) {
  156. return '共' + total + '条数据';
  157. }
  158. },
  159. columns: [{
  160. title: '客户名称',
  161. dataIndex: 'name',
  162. key: 'name',
  163. }, {
  164. title: '地区',
  165. dataIndex: 'diqu',
  166. key: 'diqu',
  167. }, {
  168. title: '联系人',
  169. dataIndex: 'contacts',
  170. key: 'contacts',
  171. },
  172. {
  173. title: '联系电话',
  174. dataIndex: 'contactMobile',
  175. key: 'contactMobile',
  176. },
  177. {
  178. title: '创建时间',
  179. dataIndex: 'createTime',
  180. key: 'createTime',
  181. },
  182. {
  183. title: '行业',
  184. dataIndex: 'industry',
  185. key: 'industry'
  186. }
  187. ],
  188. data: [],
  189. dataman: [],
  190. dataSource: [],
  191. visitArrList: [],
  192. searchTime: [, ]
  193. };
  194. },
  195. componentWillMount() {
  196. //城市
  197. let Province = [];
  198. provinceList.map(function(item) {
  199. var id = String(item.id)
  200. Province.push(
  201. <Select.Option value={id} key={item.name}>{item.name}</Select.Option>
  202. )
  203. });
  204. //行业
  205. let intentionalArr = [];
  206. industry.map(function(item) {
  207. intentionalArr.push(
  208. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  209. )
  210. });
  211. //会员等级
  212. let lvlArr = [];
  213. lvl.map(function(item) {
  214. lvlArr.push(
  215. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  216. )
  217. });
  218. //会员状态customerStatus
  219. let currentMemberArr = [];
  220. currentMember.map(function(item) {
  221. currentMemberArr.push(
  222. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  223. )
  224. });
  225. this.state.Provinces = Province;
  226. this.state.intentionalOption = intentionalArr;
  227. this.state.lvlArrOption = lvlArr;
  228. this.state.currentMemberArrOption = currentMemberArr;
  229. this.loadData();
  230. },
  231. search() {
  232. this.loadData();
  233. },
  234. reset() {
  235. this.state.nameSearch = '';
  236. this.state.addressSearch = [];
  237. this.state.provinceSearch = undefined;
  238. this.state.citySearch = undefined;
  239. this.state.releaseDate[0] = undefined;
  240. this.state.releaseDate[1] = undefined;
  241. this.loadData();
  242. },
  243. //列表详情
  244. details(id) {
  245. $.ajax({
  246. method: "get",
  247. dataType: "json",
  248. crossDomain: false,
  249. url: globalConfig.context +"/api/admin/customer/findOrganizationCustomerDetail",
  250. data: {
  251. uid:id
  252. },
  253. success: function(data) {
  254. let thisDetail= data.data;
  255. if(data.error.length || data.data.list == "") {
  256. if(data.error && data.error.length) {
  257. message.warning(data.error[0].message);
  258. };
  259. } else {
  260. let ProvinceCityArr = [];
  261. let ProvinceS = thisDetail.locationProvince; //省
  262. let citys = thisDetail.locationCity;//市
  263. let Areas = thisDetail.locationArea;//区
  264. ProvinceCityArr.push(ProvinceS, citys, Areas);
  265. this.setState({
  266. detailId:thisDetail.id,//详情ID
  267. identifyName:thisDetail.identifyName,//客户名称
  268. uid:thisDetail.uid,//客户ID
  269. societyTag:thisDetail.societyTag,//社会标签
  270. companyLogoUrl:thisDetail.companyLogoUrl? splitUrl(thisDetail.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],//公司LOGO
  271. introduction:thisDetail.introduction,//介绍
  272. industry:thisDetail.industry?thisDetail.industry.toString():"",//行业
  273. locationProvince:thisDetail.locationProvince,//省
  274. locationCity:thisDetail.locationCity,//市
  275. locationArea:thisDetail.locationArea,//区
  276. ProvinceCity: ProvinceCityArr[0]!=null?ProvinceCityArr:undefined,//省市区
  277. postalAddress:thisDetail.postalAddress,//通讯地址
  278. contactsFixedTel:thisDetail.contactsFixedTel,//固定电话
  279. contactsFax:thisDetail.contactsFax,//传真地址
  280. registeredCapital:thisDetail.registeredCapital,//注册资金
  281. enterpriseScale:thisDetail.enterpriseScale,//企业规模
  282. legalPerson:thisDetail.legalPerson,//法人
  283. legalPersonIdCard:thisDetail.legalPersonIdCard,//法人身份证
  284. legalPersonTel:thisDetail.legalPersonTel,//法人联系电话
  285. legalPersonEmail:thisDetail.legalPersonEmail,//法人联系邮箱
  286. highTechZone:thisDetail.highTechZone,//是否高新
  287. listed:thisDetail.listed,//是否高新
  288. international:thisDetail.international,//是否国际化
  289. orgCode:thisDetail.orgCode,//社会统一机构
  290. orgCodeUrl:thisDetail.orgCodeUrl? splitUrl(thisDetail.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],//社会统一机构地址
  291. businessScope:thisDetail.businessScope,//业务范围
  292. contacts:thisDetail.contacts,//主要联系人姓名
  293. contactMobile:thisDetail.contactMobile,//主要联系人电话
  294. investment:thisDetail.investment,//投资机构
  295. businessAudit:thisDetail.businessAudit,//业务认证
  296. auditStatus:thisDetail.auditStatus,//实名认证
  297. intellectualProperty:thisDetail.intellectualProperty,//已有知识产权情况
  298. yearSalesAmount:thisDetail.yearSalesAmount,//年度销售额
  299. lastYearResearchAmount:thisDetail.lastYearResearchAmount,//上年度研发费用
  300. assets:thisDetail.assets,//总资产
  301. qualification:thisDetail.qualification,//企业资质情况
  302. cooperationSituation:thisDetail.cooperationSituation,//企业与高校院所
  303. informationMaintainer:thisDetail.informationMaintainer,//资料维护人
  304. coreTechnology:thisDetail.coreTechnology,//核心技术
  305. accomplishSituation:thisDetail.accomplishSituation,//客户已完成项目情况
  306. });
  307. }}.bind(this),
  308. }).always(function() {
  309. this.setState({
  310. loading: false
  311. });
  312. }.bind(this));
  313. },
  314. //基本信息提交
  315. newSubmit(e) {
  316. e.preventDefault();
  317. console.log(this.state.ProvinceCity);
  318. if(!this.state.industry) {
  319. message.warning('请选择行业');
  320. return false;
  321. };
  322. if(!this.state.societyTag) {
  323. message.warning('请选择社会性质');
  324. return false;
  325. };
  326. if(!this.state.ProvinceCity[1]) {
  327. message.warning('请选择地区');
  328. return false;
  329. };
  330. var reg = /^[1-9]\d*$|^0$/;
  331. if(this.state.consultationPrice) {
  332. if(this.state.consultationPrice.length > 6) {
  333. message.warning('咨询费用不超过6位数');
  334. this.refs.consul.focus();
  335. return false;
  336. };
  337. if(!reg.test(this.state.consultationPrice)) {
  338. message.warning('咨询费用只能输入数字');
  339. this.refs.consul.focus();
  340. return false;
  341. }
  342. }
  343. this.state.data = [];
  344. this.setState({
  345. selectedRowKeys: [],
  346. });
  347. let theorgCodeUrl = [];
  348. if(this.state.orgCodeUrl.length) {
  349. let picArr = [];
  350. this.state.orgCodeUrl.map(function(item) {
  351. if(item.response && item.response.data && item.response.data.length) {
  352. picArr.push(item.response.data);
  353. }
  354. });
  355. theorgCodeUrl = picArr.join(",");
  356. };
  357. let thecompanyLogoUrl = [];
  358. if(this.state.companyLogoUrl.length) {
  359. let picArr = [];
  360. this.state.companyLogoUrl.map(function(item) {
  361. if(item.response && item.response.data && item.response.data.length) {
  362. picArr.push(item.response.data);
  363. }
  364. });
  365. thecompanyLogoUrl = picArr.join(",");
  366. };
  367. let years = [];
  368. let yearMonth = this.state.yearMonth != undefined ? new Date(this.state.yearMonth).toLocaleDateString() : '';
  369. years = yearMonth.split('/');
  370. this.setState({
  371. loading: true
  372. });
  373. $.ajax({
  374. method: "post",
  375. dataType: "json",
  376. url: globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
  377. data: {
  378. id:this.state.detailId,//详情ID
  379. identifyName:this.state.identifyName,//客户名称
  380. uid:this.state.uid,//客户ID
  381. societyTag:this.state.societyTag,//社会标签
  382. companyLogoUrl:thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '',//公司LOGO
  383. introduction:this.state.introduction,//介绍
  384. industry:this.state.industry,//行业
  385. locationProvince:(this.state.ProvinceCity)[0],//省
  386. locationCity:(this.state.ProvinceCity)[1],//市
  387. locationArea:(this.state.ProvinceCity)[2],//区
  388. postalAddress:this.state.postalAddress,//通讯地址
  389. contactsFixedTel:this.state.contactsFixedTel,//固定电话
  390. contactsFax:this.state.contactsFax,//传真地址
  391. registeredCapital:this.state.registeredCapital,//注册资金
  392. enterpriseScale:this.state.enterpriseScale,//企业规模
  393. legalPerson:this.state.legalPerson,//法人
  394. legalPersonIdCard:this.state.legalPersonIdCard,//法人身份证
  395. legalPersonTel:this.state.legalPersonTel,//法人联系电话
  396. legalPersonEmail:this.state.legalPersonEmail,//法人联系邮箱
  397. highTechZone:this.state.highTechZone,//是否高新
  398. listed:this.state.listed,//是否高新
  399. international:this.state.international,//是否国际化
  400. orgCode:this.state.orgCode,//社会统一机构
  401. orgCodeUrl: theorgCodeUrl.length != 0 ? theorgCodeUrl : '',//社会统一机构地址
  402. businessScope:this.state.businessScope,//业务范围
  403. contacts:this.state.contacts,//主要联系人姓名
  404. contactMobile:this.state.contactMobile,//主要联系人电话
  405. investment:this.state.investment,//投资机构
  406. businessAudit:this.state.businessAudit,//业务认证
  407. auditStatus:this.state.auditStatus,//实名认证
  408. intellectualProperty:this.state.intellectualProperty,//已有知识产权情况
  409. yearSalesAmount:this.state.yearSalesAmount,//年度销售额
  410. lastYearResearchAmount:this.state.lastYearResearchAmount,//上年度研发费用
  411. assets:this.state.assets,//总资产
  412. qualification:this.state.qualification,//企业资质情况
  413. cooperationSituation:this.state.cooperationSituation,//企业与高校院所
  414. informationMaintainer:this.state.informationMaintainer,//资料维护人
  415. coreTechnology:this.state.coreTechnology,//核心技术
  416. accomplishSituation:this.state.accomplishSituation,//客户已完成项目情况
  417. }
  418. }).done(function(data) {
  419. this.setState({
  420. loading: false
  421. });
  422. if(!data.error.length) {
  423. message.success('保存成功!');
  424. this.visitCancel();
  425. this.loadData();
  426. } else {
  427. message.warning(data.error[0].message);
  428. }
  429. }.bind(this));
  430. },
  431. //整行点击
  432. tableRowClick(record, index) {
  433. this.state.visitModul=true;
  434. this.details(record.id);
  435. },
  436. //指定转交人自动补全
  437. supervisor(e){
  438. $.ajax({
  439. method: "get",
  440. dataType: "json",
  441. crossDomain: false,
  442. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  443. data:{
  444. adminName:e
  445. },
  446. success: function (data) {
  447. let thedata=data.data;
  448. if (!thedata) {
  449. if (data.error && data.error.length) {
  450. message.warning(data.error[0].message);
  451. };
  452. thedata = {};
  453. };
  454. this.setState({
  455. customerArr:thedata,
  456. });
  457. }.bind(this),
  458. }).always(function () {
  459. this.setState({
  460. loading: false
  461. });
  462. }.bind(this));
  463. },
  464. //输入转交人输入框失去焦点是判断客户是否存在
  465. selectAuto(value,options){
  466. this.setState({
  467. auto:value
  468. })
  469. },
  470. blurChange(e){
  471. let theType='';
  472. let contactLists=this.state.customerArr||[];
  473. if (e) {
  474. contactLists.map(function (item) {
  475. if (item.name == e.toString()) {
  476. theType = item.id;
  477. }
  478. });
  479. }
  480. this.setState({
  481. theTypes:theType
  482. })
  483. },
  484. //值改变时请求客户名称
  485. httpChange(e){
  486. if(e.length>=1){
  487. this.supervisor(e);
  488. }
  489. this.setState({
  490. auto:e
  491. })
  492. },
  493. //转交
  494. changeAssigner() {
  495. if(this.state.theTypes){
  496. this.setState({
  497. selectedRowKeys: [],
  498. });
  499. let id;
  500. for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
  501. let rowItem = this.state.selectedRows[idx];
  502. if(rowItem.id) {
  503. id=rowItem.id;
  504. };
  505. };
  506. $.ajax({
  507. method: "post",
  508. dataType: "json",
  509. crossDomain: false,
  510. url: globalConfig.context + "/api/admin/customer/updateInformationMaintainerr",
  511. data: {
  512. id: id, //客户ID
  513. aid: this.state.theTypes, //指定转交人的ID
  514. }
  515. }).done(function(data) {
  516. if(!data.error.length) {
  517. message.success('转交成功!');
  518. this.setState({
  519. auto:'',
  520. loading: false,
  521. });
  522. } else {
  523. message.warning(data.error[0].message);
  524. };
  525. this.loadData(this.state.ispage);
  526. }.bind(this));
  527. }else{
  528. message.warning('请输入转交人姓名')
  529. }
  530. },
  531. //详情打开
  532. visitOk(e) {
  533. this.setState({
  534. visitModul: false
  535. });
  536. },
  537. //详情关闭
  538. visitCancel(e) {
  539. this.setState({
  540. visitModul: false
  541. });
  542. //this.props.closeDesc(false,false)
  543. },
  544. getOrgCodeUrl(e) {
  545. this.setState({ orgCodeUrl: e });
  546. },
  547. getCompanyLogoUrl(e) {
  548. this.setState({ companyLogoUrl: e });
  549. },
  550. componentWillReceiveProps(nextProps) {
  551. if(nextProps.ApiUrl!=this.props.ApiUrl) {
  552. this.state.nameSearch = '';
  553. this.state.addressSearch = [];
  554. this.state.provinceSearch = undefined;
  555. this.state.citySearch = undefined;
  556. this.state.releaseDate[0] = undefined;
  557. this.state.releaseDate[1] = undefined;
  558. this.loadData(null,nextProps.ApiUrl);
  559. };
  560. },
  561. render() {
  562. const {
  563. RangePicker,
  564. MonthPicker
  565. } = DatePicker;
  566. const formItemLayout = {
  567. labelCol: { span: 8 },
  568. wrapperCol: { span: 14 },
  569. };
  570. const FormItem = Form.Item;
  571. const rowSelection = {
  572. selectedRowKeys: this.state.selectedRowKeys,
  573. onChange: (selectedRowKeys, selectedRows) => {
  574. this.setState({
  575. modalVisible:false,
  576. selectedRows: selectedRows.slice(-1),
  577. selectedRowKeys: selectedRowKeys.slice(-1)
  578. });
  579. },
  580. onSelect: (recordt, selected, selectedRows) => {
  581. this.setState({
  582. modalVisible:false,
  583. recordt: recordt.id
  584. })
  585. },
  586. };
  587. const hasSelected = this.state.selectedRowKeys.length > 0;
  588. const dataSources=this.state.customerArr || [];
  589. const options = dataSources.map((group) =>
  590. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  591. )
  592. const intentionState = this.props.intentionState ||'';
  593. return(
  594. <div className="user-content" >
  595. <div className="content-title">
  596. <span>{!intentionState?'我的单位意向客户':'我的个人意向客户'}</span>
  597. </div>
  598. <div className="user-search">
  599. <Input placeholder="客户名称"
  600. value={this.state.nameSearch}
  601. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  602. <Select placeholder="省"
  603. style={{ width: 80 }}
  604. value={this.state.provinceSearch}
  605. onChange={(e) => {this.setState({ provinceSearch: e});}}>
  606. {this.state.Provinces}
  607. </Select>
  608. <span style={{marginRight:'10px'}}>
  609. <Cascader options={citySelect()} value={this.state.addressSearch} placeholder="选择城市"
  610. onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
  611. </span>
  612. <RangePicker style={{marginRight:'10px'}}
  613. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  614. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  615. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  616. <Button type="primary" onClick={this.search}>搜索</Button>
  617. <Button onClick={this.reset}>重置</Button>
  618. <AutoComplete
  619. className="certain-category-search"
  620. dropdownClassName="certain-category-search-dropdown"
  621. dropdownMatchSelectWidth={false}
  622. dropdownStyle={{ width: 120 }}
  623. style={{ width: '120px'}}
  624. dataSource={options}
  625. placeholder="输入转交人姓名"
  626. value={this.state.auto}
  627. onChange={this.httpChange}
  628. filterOption={true}
  629. onBlur={this.blurChange}
  630. onSelect={this.selectAuto}
  631. disabled={!hasSelected}
  632. >
  633. <Input />
  634. </AutoComplete>
  635. <Button type="primary" onClick={this.changeAssigner} disabled={!hasSelected} >转交</Button>
  636. </div>
  637. <div className="patent-table">
  638. <Spin spinning={this.state.loading}>
  639. <Table columns={this.state.columns}
  640. dataSource={this.state.dataSource}
  641. rowSelection={rowSelection}
  642. pagination={this.state.pagination}
  643. onRowClick={this.tableRowClick}
  644. />
  645. </Spin>
  646. </div>
  647. <Modal
  648. className="customeDetails"
  649. footer=''
  650. title="客户跟进详情"
  651. width='1000px'
  652. visible={this.state.visitModul}
  653. onOk={this.visitOk}
  654. onCancel={this.visitCancel}
  655. >
  656. <Form layout="horizontal" onSubmit={this.newSubmit} id="demand-form">
  657. <Spin spinning={this.state.loading}>
  658. <div className="clearfix" >
  659. <FormItem className="half-item"
  660. {...formItemLayout}
  661. label="客户姓名"
  662. >
  663. <span>{this.state.identifyName}</span>
  664. </FormItem>
  665. </div>
  666. <div className="clearfix" >
  667. <FormItem className="half-item"
  668. {...formItemLayout}
  669. label="行业">
  670. <Select placeholder="选择行业" value={this.state.industry} style={{width:'95%'}}
  671. onChange={(e)=>{this.setState({industry:e})}}>
  672. {
  673. industry.map(function (item) {
  674. return <Select.Option key={item.value} >{item.key}</Select.Option>
  675. })
  676. }
  677. </Select>
  678. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  679. </FormItem>
  680. <FormItem className="half-item"
  681. {...formItemLayout}
  682. label="社会属性"
  683. >
  684. <Select placeholder="客户社会属性" value={this.state.societyTag} style={{width:'95%'}}
  685. onChange={(e)=>{this.setState({societyTag:e})}}>
  686. {
  687. socialAttribute.map(function (item) {
  688. return <Select.Option key={item.value} >{item.key}</Select.Option>
  689. })
  690. }
  691. </Select>
  692. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  693. </FormItem>
  694. <FormItem className="half-item"
  695. {...formItemLayout}
  696. label="省-市-区"
  697. >
  698. <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'95%'}}
  699. onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
  700. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  701. </FormItem>
  702. <FormItem className="half-item"
  703. {...formItemLayout}
  704. label="通信地址"
  705. >
  706. <Input placeholder="客户通信地址" value={this.state.postalAddress}
  707. onChange={(e,pre) => { this.setState({ postalAddress: e.target.value }) }}/>
  708. </FormItem>
  709. <FormItem className="half-item"
  710. {...formItemLayout}
  711. label="固定电话"
  712. >
  713. <Input placeholder="客户固定电话" value={this.state.contactsFixedTel}
  714. onChange={(e) => { this.setState({ contactsFixedTel: e.target.value }) }}/>
  715. </FormItem>
  716. <FormItem className="half-item"
  717. {...formItemLayout}
  718. label="客户传真"
  719. >
  720. <Input placeholder="客户传真" value={this.state.contactsFax}
  721. onChange={(e) => { this.setState({ contactsFax: e.target.value })}}/>
  722. </FormItem>
  723. <FormItem className="half-item"
  724. {...formItemLayout}
  725. label="注册资本"
  726. >
  727. <Input placeholder="注册资本" value={this.state.registeredCapital} onChange={(e) => {
  728. this.setState({ registeredCapital: e.target.value })}}/>
  729. </FormItem>
  730. <FormItem className="half-item"
  731. {...formItemLayout}
  732. label="企业规模"
  733. >
  734. <Input placeholder="单位规模" value={this.state.enterpriseScale} onChange={(e) => {
  735. this.setState({ enterpriseScale: e.target.value })}}/>
  736. </FormItem>
  737. <FormItem className="half-item"
  738. {...formItemLayout}
  739. label="法人名称"
  740. >
  741. <Input placeholder="法人名称" value={this.state.legalPerson} onChange={(e) => {
  742. this.setState({ legalPerson: e.target.value })}}/>
  743. </FormItem>
  744. <FormItem className="half-item"
  745. {...formItemLayout}
  746. label="法人身份证"
  747. >
  748. <Input placeholder="法人身份证" value={this.state.legalPersonIdCard} onChange={(e) => {
  749. this.setState({ legalPersonIdCard: e.target.value })}}/>
  750. </FormItem>
  751. <FormItem className="half-item"
  752. {...formItemLayout}
  753. label="主要联系人"
  754. >
  755. <Input placeholder="主要联系人" value={this.state.contacts} onChange={(e) => {
  756. this.setState({ contacts: e.target.value })}}/>
  757. </FormItem>
  758. <FormItem className="half-item"
  759. {...formItemLayout}
  760. label="主要联系人号码"
  761. >
  762. <Input placeholder="主要联系人号码" value={this.state.contactMobile} onChange={(e) => {
  763. this.setState({ contactMobile: e.target.value })}}/>
  764. </FormItem>
  765. <FormItem className="half-item"
  766. {...formItemLayout}
  767. label="法人电话"
  768. >
  769. <Input placeholder="法人电话" value={this.state.legalPersonTel} onChange={(e) => {
  770. this.setState({ legalPersonTel: e.target.value })}}/>
  771. </FormItem>
  772. <FormItem className="half-item"
  773. {...formItemLayout}
  774. label="法人电子邮箱"
  775. >
  776. <Input placeholder="法人电子邮箱" value={this.state.legalPersonEmail}
  777. onChange={(e) => {this.setState({legalPersonEmail: e.target.value })}}/>
  778. </FormItem>
  779. <FormItem className="half-item"
  780. {...formItemLayout}
  781. label="机构代码"
  782. >
  783. <Input placeholder="机构代码" value={this.state.orgCode} onChange={(e) => {
  784. this.setState({ orgCode: e.target.value })}}/>
  785. </FormItem>
  786. <FormItem className="half-item"
  787. {...formItemLayout}
  788. label="上年度销售额"
  789. >
  790. <Input ref='consul' placeholder="请输入上年度销售额" value={this.state.yearSalesAmount}
  791. onChange={(e) => {this.setState({yearSalesAmount: e.target.value })}}/>
  792. </FormItem>
  793. <FormItem className="half-item"
  794. {...formItemLayout}
  795. label="上年度研发费用"
  796. >
  797. <Input ref='consul' placeholder="请输入上年度研发费用" value={this.state.lastYearResearchAmount}
  798. onChange={(e) => {this.setState({lastYearResearchAmount: e.target.value })}}/>
  799. </FormItem>
  800. <FormItem className="half-item"
  801. {...formItemLayout}
  802. label="上年度总资产情况"
  803. >
  804. <Input ref='consul' placeholder="上年度总资产情况" value={this.state.assets}
  805. onChange={(e) => {this.setState({assets: e.target.value })}}/>
  806. </FormItem>
  807. <div className='clearfix'>
  808. <FormItem
  809. labelCol={{ span:4 }}
  810. wrapperCol={{ span: 18 }}
  811. label="业务范围" >
  812. <Input type="textarea" rows={4} value={this.state.businessScope}
  813. onChange={(e,pre) => { this.setState({ businessScope: e.target.value })}}/>
  814. </FormItem>
  815. </div>
  816. <div className='clearfix'>
  817. <FormItem
  818. labelCol={{ span:4 }}
  819. wrapperCol={{ span: 18 }}
  820. label="客户简介" >
  821. <Input type="textarea" rows={4} value={this.state.introduction}
  822. onChange={(e,pre) => { this.setState({ introduction: e.target.value })}}/>
  823. </FormItem>
  824. </div>
  825. <div className='clearfix'>
  826. <FormItem
  827. labelCol={{ span:4 }}
  828. wrapperCol={{ span: 18 }}
  829. label="已有知识产权情况" >
  830. <Input type="textarea" rows={4} value={this.state.intellectualProperty}
  831. onChange={(e,pre) => { this.setState({ intellectualProperty: e.target.value })}}/>
  832. </FormItem>
  833. </div>
  834. <div className='clearfix'>
  835. <FormItem
  836. labelCol={{ span:4 }}
  837. wrapperCol={{ span: 18 }}
  838. label="核心技术" >
  839. <Input type="textarea" rows={4} value={this.state.coreTechnology}
  840. onChange={(e,pre) => { this.setState({ coreTechnology: e.target.value })}}/>
  841. </FormItem>
  842. </div>
  843. <div className='clearfix'>
  844. <FormItem
  845. labelCol={{ span:4 }}
  846. wrapperCol={{ span: 18 }}
  847. label="企业资质情况" >
  848. <Input type="textarea" rows={4} value={this.state.qualification}
  849. onChange={(e,pre) => { this.setState({ qualification: e.target.value })}}/>
  850. </FormItem>
  851. </div>
  852. <div className='clearfix'>
  853. <FormItem
  854. labelCol={{ span:4 }}
  855. wrapperCol={{ span: 18 }}
  856. label="客户已做项目" >
  857. <Input type="textarea" rows={4} value={this.state.accomplishSituation}
  858. onChange={(e,pre) => { this.setState({ accomplishSituation: e.target.value })}}/>
  859. </FormItem>
  860. </div>
  861. <div className='clearfix'>
  862. <FormItem
  863. labelCol={{ span:4 }}
  864. wrapperCol={{ span: 18 }}
  865. label="企业高企合作情况" >
  866. <Input type="textarea" rows={4} value={this.state.cooperationSituation}
  867. onChange={(e,pre) => { this.setState({ cooperationSituation: e.target.value })}}/>
  868. </FormItem>
  869. </div>
  870. <div className="clearfix pictures">
  871. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginLeft:'95px'}}
  872. labelCol={{ span: 8 }}
  873. wrapperCol={{ span: 10 }}
  874. label="机构证(PIC)" >
  875. <PicturesWall
  876. fileList={this.getOrgCodeUrl}
  877. pictureUrl={this.state.orgCodeUrl} />
  878. <p>建议:图片要清晰。</p>
  879. </FormItem>
  880. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginTop:'20px'}}
  881. labelCol={{ span: 8 }}
  882. wrapperCol={{ span: 10 }}
  883. label="单位LOGO" >
  884. <PicturesWall
  885. fileList={this.getCompanyLogoUrl}
  886. pictureUrl={this.state.companyLogoUrl} />
  887. <p>建议:图片要清晰。</p>
  888. </FormItem>
  889. </div>
  890. <Button className="setSubmit" type="primary" htmlType="submit">保存</Button>
  891. <Button type="ghost" onClick={this.detailsModal}>取消</Button>
  892. </div>
  893. </Spin>
  894. </Form>
  895. </Modal>
  896. </div >
  897. );
  898. }
  899. }));
  900. export default IntentionCustomer;