crm.jsx 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905
  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. } else {
  426. message.warning(data.error[0].message);
  427. }
  428. }.bind(this));
  429. },
  430. //整行点击
  431. tableRowClick(record, index) {
  432. this.state.visitModul=true;
  433. this.details(record.id);
  434. },
  435. //指定转交人自动补全
  436. supervisor(e){
  437. $.ajax({
  438. method: "get",
  439. dataType: "json",
  440. crossDomain: false,
  441. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  442. data:{
  443. adminName:e
  444. },
  445. success: function (data) {
  446. let thedata=data.data;
  447. if (!thedata) {
  448. if (data.error && data.error.length) {
  449. message.warning(data.error[0].message);
  450. };
  451. thedata = {};
  452. };
  453. this.setState({
  454. customerArr:thedata,
  455. });
  456. }.bind(this),
  457. }).always(function () {
  458. this.setState({
  459. loading: false
  460. });
  461. }.bind(this));
  462. },
  463. //输入转交人输入框失去焦点是判断客户是否存在
  464. selectAuto(value,options){
  465. this.setState({
  466. auto:value
  467. })
  468. },
  469. blurChange(e){
  470. let theType='';
  471. let contactLists=this.state.customerArr||[];
  472. if (e) {
  473. contactLists.map(function (item) {
  474. if (item.name == e.toString()) {
  475. theType = item.id;
  476. }
  477. });
  478. }
  479. this.setState({
  480. theTypes:theType
  481. })
  482. },
  483. //值改变时请求客户名称
  484. httpChange(e){
  485. if(e.length>=1){
  486. this.supervisor(e);
  487. }
  488. this.setState({
  489. auto:e
  490. })
  491. },
  492. //转交
  493. changeAssigner() {
  494. if(this.state.theTypes){
  495. this.setState({
  496. selectedRowKeys: [],
  497. });
  498. let id;
  499. for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
  500. let rowItem = this.state.selectedRows[idx];
  501. if(rowItem.id) {
  502. id=rowItem.id;
  503. };
  504. };
  505. $.ajax({
  506. method: "post",
  507. dataType: "json",
  508. crossDomain: false,
  509. url: globalConfig.context + "/api/admin/customer/updateInformationMaintainerr",
  510. data: {
  511. id: id, //客户ID
  512. aid: this.state.theTypes, //指定转交人的ID
  513. }
  514. }).done(function(data) {
  515. if(!data.error.length) {
  516. message.success('转交成功!');
  517. this.setState({
  518. auto:'',
  519. loading: false,
  520. });
  521. } else {
  522. message.warning(data.error[0].message);
  523. };
  524. this.loadData(this.state.ispage);
  525. }.bind(this));
  526. }else{
  527. message.warning('请输入转交人姓名')
  528. }
  529. },
  530. //详情打开
  531. visitOk(e) {
  532. this.setState({
  533. visitModul: false
  534. });
  535. },
  536. //详情关闭
  537. visitCancel(e) {
  538. this.setState({
  539. visitModul: false
  540. });
  541. //this.props.closeDesc(false,false)
  542. },
  543. getOrgCodeUrl(e) {
  544. this.setState({ orgCodeUrl: e });
  545. },
  546. getCompanyLogoUrl(e) {
  547. this.setState({ companyLogoUrl: e });
  548. },
  549. componentWillReceiveProps(nextProps) {
  550. if(nextProps.ApiUrl!=this.props.ApiUrl) {
  551. this.state.nameSearch = '';
  552. this.state.addressSearch = [];
  553. this.state.provinceSearch = undefined;
  554. this.state.citySearch = undefined;
  555. this.state.releaseDate[0] = undefined;
  556. this.state.releaseDate[1] = undefined;
  557. this.loadData(null,nextProps.ApiUrl);
  558. };
  559. },
  560. render() {
  561. const {
  562. RangePicker,
  563. MonthPicker
  564. } = DatePicker;
  565. const formItemLayout = {
  566. labelCol: { span: 8 },
  567. wrapperCol: { span: 14 },
  568. };
  569. const FormItem = Form.Item;
  570. const rowSelection = {
  571. selectedRowKeys: this.state.selectedRowKeys,
  572. onChange: (selectedRowKeys, selectedRows) => {
  573. this.setState({
  574. modalVisible:false,
  575. selectedRows: selectedRows.slice(-1),
  576. selectedRowKeys: selectedRowKeys.slice(-1)
  577. });
  578. },
  579. onSelect: (recordt, selected, selectedRows) => {
  580. this.setState({
  581. modalVisible:false,
  582. recordt: recordt.id
  583. })
  584. },
  585. };
  586. const hasSelected = this.state.selectedRowKeys.length > 0;
  587. const dataSources=this.state.customerArr || [];
  588. const options = dataSources.map((group) =>
  589. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  590. )
  591. const intentionState = this.props.intentionState ||'';
  592. return(
  593. <div className="user-content" >
  594. <div className="content-title">
  595. <span>{!intentionState?'我的单位意向客户':'我的个人意向客户'}</span>
  596. </div>
  597. <div className="user-search">
  598. <Input placeholder="客户名称"
  599. value={this.state.nameSearch}
  600. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  601. <Select placeholder="省"
  602. style={{ width: 80 }}
  603. value={this.state.provinceSearch}
  604. onChange={(e) => {this.setState({ provinceSearch: e});}}>
  605. {this.state.Provinces}
  606. </Select>
  607. <span style={{marginRight:'10px'}}>
  608. <Cascader options={citySelect()} value={this.state.addressSearch} placeholder="选择城市"
  609. onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
  610. </span>
  611. <RangePicker style={{marginRight:'10px'}}
  612. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  613. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  614. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  615. <Button type="primary" onClick={this.search}>搜索</Button>
  616. <Button onClick={this.reset}>重置</Button>
  617. <AutoComplete
  618. className="certain-category-search"
  619. dropdownClassName="certain-category-search-dropdown"
  620. dropdownMatchSelectWidth={false}
  621. dropdownStyle={{ width: 120 }}
  622. style={{ width: '120px'}}
  623. dataSource={options}
  624. placeholder="输入转交人姓名"
  625. value={this.state.auto}
  626. onChange={this.httpChange}
  627. filterOption={true}
  628. onBlur={this.blurChange}
  629. onSelect={this.selectAuto}
  630. disabled={!hasSelected}
  631. >
  632. <Input />
  633. </AutoComplete>
  634. <Button type="primary" onClick={this.changeAssigner} disabled={!hasSelected} >转交</Button>
  635. </div>
  636. <div className="patent-table">
  637. <Spin spinning={this.state.loading}>
  638. <Table columns={this.state.columns}
  639. dataSource={this.state.dataSource}
  640. rowSelection={rowSelection}
  641. pagination={this.state.pagination}
  642. onRowClick={this.tableRowClick}
  643. />
  644. </Spin>
  645. </div>
  646. <Modal
  647. className="customeDetails"
  648. footer=''
  649. title="客户跟进详情"
  650. width='1000px'
  651. visible={this.state.visitModul}
  652. onOk={this.visitOk}
  653. onCancel={this.visitCancel}
  654. >
  655. <Form layout="horizontal" onSubmit={this.newSubmit} id="demand-form">
  656. <Spin spinning={this.state.loading}>
  657. <div className="clearfix" >
  658. <FormItem className="half-item"
  659. {...formItemLayout}
  660. label="客户姓名"
  661. >
  662. <span>{this.state.identifyName}</span>
  663. </FormItem>
  664. </div>
  665. <div className="clearfix" >
  666. <FormItem className="half-item"
  667. {...formItemLayout}
  668. label="行业">
  669. <Select placeholder="选择行业" value={this.state.industry} style={{width:'95%'}}
  670. onChange={(e)=>{this.setState({industry:e})}}>
  671. {
  672. industry.map(function (item) {
  673. return <Select.Option key={item.value} >{item.key}</Select.Option>
  674. })
  675. }
  676. </Select>
  677. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  678. </FormItem>
  679. <FormItem className="half-item"
  680. {...formItemLayout}
  681. label="社会属性"
  682. >
  683. <Select placeholder="客户社会属性" value={this.state.societyTag} style={{width:'95%'}}
  684. onChange={(e)=>{this.setState({societyTag:e})}}>
  685. {
  686. socialAttribute.map(function (item) {
  687. return <Select.Option key={item.value} >{item.key}</Select.Option>
  688. })
  689. }
  690. </Select>
  691. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  692. </FormItem>
  693. <FormItem className="half-item"
  694. {...formItemLayout}
  695. label="省-市-区"
  696. >
  697. <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'95%'}}
  698. onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
  699. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  700. </FormItem>
  701. <FormItem className="half-item"
  702. {...formItemLayout}
  703. label="通信地址"
  704. >
  705. <Input placeholder="客户通信地址" value={this.state.postalAddress}
  706. onChange={(e,pre) => { this.setState({ postalAddress: e.target.value }) }}/>
  707. </FormItem>
  708. <FormItem className="half-item"
  709. {...formItemLayout}
  710. label="固定电话"
  711. >
  712. <Input placeholder="客户固定电话" value={this.state.contactsFixedTel}
  713. onChange={(e) => { this.setState({ contactsFixedTel: e.target.value }) }}/>
  714. </FormItem>
  715. <FormItem className="half-item"
  716. {...formItemLayout}
  717. label="客户传真"
  718. >
  719. <Input placeholder="客户传真" value={this.state.contactsFax}
  720. onChange={(e) => { this.setState({ contactsFax: e.target.value })}}/>
  721. </FormItem>
  722. <FormItem className="half-item"
  723. {...formItemLayout}
  724. label="注册资本"
  725. >
  726. <Input placeholder="注册资本" value={this.state.registeredCapital} onChange={(e) => {
  727. this.setState({ registeredCapital: e.target.value })}}/>
  728. </FormItem>
  729. <FormItem className="half-item"
  730. {...formItemLayout}
  731. label="企业规模"
  732. >
  733. <Input placeholder="单位规模" value={this.state.enterpriseScale} onChange={(e) => {
  734. this.setState({ enterpriseScale: e.target.value })}}/>
  735. </FormItem>
  736. <FormItem className="half-item"
  737. {...formItemLayout}
  738. label="法人名称"
  739. >
  740. <Input placeholder="法人名称" value={this.state.legalPerson} onChange={(e) => {
  741. this.setState({ legalPerson: e.target.value })}}/>
  742. </FormItem>
  743. <FormItem className="half-item"
  744. {...formItemLayout}
  745. label="法人身份证"
  746. >
  747. <Input placeholder="法人身份证" value={this.state.legalPersonIdCard} onChange={(e) => {
  748. this.setState({ legalPersonIdCard: e.target.value })}}/>
  749. </FormItem>
  750. <FormItem className="half-item"
  751. {...formItemLayout}
  752. label="主要联系人"
  753. >
  754. <Input placeholder="主要联系人" value={this.state.contacts} onChange={(e) => {
  755. this.setState({ contacts: e.target.value })}}/>
  756. </FormItem>
  757. <FormItem className="half-item"
  758. {...formItemLayout}
  759. label="主要联系人号码"
  760. >
  761. <Input placeholder="主要联系人号码" value={this.state.contactMobile} onChange={(e) => {
  762. this.setState({ contactMobile: e.target.value })}}/>
  763. </FormItem>
  764. <FormItem className="half-item"
  765. {...formItemLayout}
  766. label="法人电话"
  767. >
  768. <Input placeholder="法人电话" value={this.state.legalPersonTel} onChange={(e) => {
  769. this.setState({ legalPersonTel: e.target.value })}}/>
  770. </FormItem>
  771. <FormItem className="half-item"
  772. {...formItemLayout}
  773. label="法人电子邮箱"
  774. >
  775. <Input placeholder="法人电子邮箱" value={this.state.legalPersonEmail}
  776. onChange={(e) => {this.setState({legalPersonEmail: e.target.value })}}/>
  777. </FormItem>
  778. <FormItem className="half-item"
  779. {...formItemLayout}
  780. label="机构代码"
  781. >
  782. <Input placeholder="机构代码" value={this.state.orgCode} onChange={(e) => {
  783. this.setState({ orgCode: e.target.value })}}/>
  784. </FormItem>
  785. <FormItem className="half-item"
  786. {...formItemLayout}
  787. label="上年度销售额"
  788. >
  789. <Input ref='consul' placeholder="请输入上年度销售额" value={this.state.yearSalesAmount}
  790. onChange={(e) => {this.setState({yearSalesAmount: e.target.value })}}/>
  791. </FormItem>
  792. <FormItem className="half-item"
  793. {...formItemLayout}
  794. label="上年度研发费用"
  795. >
  796. <Input ref='consul' placeholder="请输入上年度研发费用" value={this.state.lastYearResearchAmount}
  797. onChange={(e) => {this.setState({lastYearResearchAmount: e.target.value })}}/>
  798. </FormItem>
  799. <FormItem className="half-item"
  800. {...formItemLayout}
  801. label="上年度总资产情况"
  802. >
  803. <Input ref='consul' placeholder="上年度总资产情况" value={this.state.assets}
  804. onChange={(e) => {this.setState({assets: e.target.value })}}/>
  805. </FormItem>
  806. <div className='clearfix'>
  807. <FormItem
  808. labelCol={{ span:4 }}
  809. wrapperCol={{ span: 18 }}
  810. label="业务范围" >
  811. <Input type="textarea" rows={4} value={this.state.businessScope}
  812. onChange={(e,pre) => { this.setState({ businessScope: e.target.value })}}/>
  813. </FormItem>
  814. </div>
  815. <div className='clearfix'>
  816. <FormItem
  817. labelCol={{ span:4 }}
  818. wrapperCol={{ span: 18 }}
  819. label="客户简介" >
  820. <Input type="textarea" rows={4} value={this.state.introduction}
  821. onChange={(e,pre) => { this.setState({ introduction: e.target.value })}}/>
  822. </FormItem>
  823. </div>
  824. <div className='clearfix'>
  825. <FormItem
  826. labelCol={{ span:4 }}
  827. wrapperCol={{ span: 18 }}
  828. label="已有知识产权情况" >
  829. <Input type="textarea" rows={4} value={this.state.intellectualProperty}
  830. onChange={(e,pre) => { this.setState({ intellectualProperty: e.target.value })}}/>
  831. </FormItem>
  832. </div>
  833. <div className='clearfix'>
  834. <FormItem
  835. labelCol={{ span:4 }}
  836. wrapperCol={{ span: 18 }}
  837. label="核心技术" >
  838. <Input type="textarea" rows={4} value={this.state.coreTechnology}
  839. onChange={(e,pre) => { this.setState({ coreTechnology: e.target.value })}}/>
  840. </FormItem>
  841. </div>
  842. <div className='clearfix'>
  843. <FormItem
  844. labelCol={{ span:4 }}
  845. wrapperCol={{ span: 18 }}
  846. label="企业资质情况" >
  847. <Input type="textarea" rows={4} value={this.state.qualification}
  848. onChange={(e,pre) => { this.setState({ qualification: e.target.value })}}/>
  849. </FormItem>
  850. </div>
  851. <div className='clearfix'>
  852. <FormItem
  853. labelCol={{ span:4 }}
  854. wrapperCol={{ span: 18 }}
  855. label="客户已做项目" >
  856. <Input type="textarea" rows={4} value={this.state.accomplishSituation}
  857. onChange={(e,pre) => { this.setState({ accomplishSituation: e.target.value })}}/>
  858. </FormItem>
  859. </div>
  860. <div className='clearfix'>
  861. <FormItem
  862. labelCol={{ span:4 }}
  863. wrapperCol={{ span: 18 }}
  864. label="企业高企合作情况" >
  865. <Input type="textarea" rows={4} value={this.state.cooperationSituation}
  866. onChange={(e,pre) => { this.setState({ cooperationSituation: e.target.value })}}/>
  867. </FormItem>
  868. </div>
  869. <div className="clearfix pictures">
  870. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginLeft:'95px'}}
  871. labelCol={{ span: 8 }}
  872. wrapperCol={{ span: 10 }}
  873. label="机构证(PIC)" >
  874. <PicturesWall
  875. fileList={this.getOrgCodeUrl}
  876. pictureUrl={this.state.orgCodeUrl} />
  877. <p>建议:图片要清晰。</p>
  878. </FormItem>
  879. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginTop:'20px'}}
  880. labelCol={{ span: 8 }}
  881. wrapperCol={{ span: 10 }}
  882. label="单位LOGO" >
  883. <PicturesWall
  884. fileList={this.getCompanyLogoUrl}
  885. pictureUrl={this.state.companyLogoUrl} />
  886. <p>建议:图片要清晰。</p>
  887. </FormItem>
  888. </div>
  889. <Button className="setSubmit" type="primary" htmlType="submit">保存</Button>
  890. <Button type="ghost" onClick={this.detailsModal}>取消</Button>
  891. </div>
  892. </Spin>
  893. </Form>
  894. </Modal>
  895. </div >
  896. );
  897. }
  898. }));
  899. export default IntentionCustomer;