crm.jsx 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914
  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. informationMaintainerName:thisDetail.informationMaintainerName,//资料维护人
  305. coreTechnology:thisDetail.coreTechnology,//核心技术
  306. accomplishSituation:thisDetail.accomplishSituation,//客户已完成项目情况
  307. });
  308. }}.bind(this),
  309. }).always(function() {
  310. this.setState({
  311. loading: false
  312. });
  313. }.bind(this));
  314. },
  315. //基本信息提交
  316. newSubmit(e) {
  317. e.preventDefault();
  318. console.log(this.state.ProvinceCity);
  319. if(!this.state.industry) {
  320. message.warning('请选择行业');
  321. return false;
  322. };
  323. if(!this.state.societyTag) {
  324. message.warning('请选择社会性质');
  325. return false;
  326. };
  327. if(!this.state.ProvinceCity[1]) {
  328. message.warning('请选择地区');
  329. return false;
  330. };
  331. var reg = /^[1-9]\d*$|^0$/;
  332. if(this.state.consultationPrice) {
  333. if(this.state.consultationPrice.length > 6) {
  334. message.warning('咨询费用不超过6位数');
  335. this.refs.consul.focus();
  336. return false;
  337. };
  338. if(!reg.test(this.state.consultationPrice)) {
  339. message.warning('咨询费用只能输入数字');
  340. this.refs.consul.focus();
  341. return false;
  342. }
  343. }
  344. this.state.data = [];
  345. this.setState({
  346. selectedRowKeys: [],
  347. });
  348. let theorgCodeUrl = [];
  349. if(this.state.orgCodeUrl.length) {
  350. let picArr = [];
  351. this.state.orgCodeUrl.map(function(item) {
  352. if(item.response && item.response.data && item.response.data.length) {
  353. picArr.push(item.response.data);
  354. }
  355. });
  356. theorgCodeUrl = picArr.join(",");
  357. };
  358. let thecompanyLogoUrl = [];
  359. if(this.state.companyLogoUrl.length) {
  360. let picArr = [];
  361. this.state.companyLogoUrl.map(function(item) {
  362. if(item.response && item.response.data && item.response.data.length) {
  363. picArr.push(item.response.data);
  364. }
  365. });
  366. thecompanyLogoUrl = picArr.join(",");
  367. };
  368. let years = [];
  369. let yearMonth = this.state.yearMonth != undefined ? new Date(this.state.yearMonth).toLocaleDateString() : '';
  370. years = yearMonth.split('/');
  371. this.setState({
  372. loading: true
  373. });
  374. $.ajax({
  375. method: "post",
  376. dataType: "json",
  377. url: globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
  378. data: {
  379. id:this.state.detailId,//详情ID
  380. identifyName:this.state.identifyName,//客户名称
  381. uid:this.state.uid,//客户ID
  382. societyTag:this.state.societyTag,//社会标签
  383. companyLogoUrl:thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '',//公司LOGO
  384. introduction:this.state.introduction,//介绍
  385. industry:this.state.industry,//行业
  386. locationProvince:(this.state.ProvinceCity)[0],//省
  387. locationCity:(this.state.ProvinceCity)[1],//市
  388. locationArea:(this.state.ProvinceCity)[2],//区
  389. postalAddress:this.state.postalAddress,//通讯地址
  390. contactsFixedTel:this.state.contactsFixedTel,//固定电话
  391. contactsFax:this.state.contactsFax,//传真地址
  392. registeredCapital:this.state.registeredCapital,//注册资金
  393. enterpriseScale:this.state.enterpriseScale,//企业规模
  394. legalPerson:this.state.legalPerson,//法人
  395. legalPersonIdCard:this.state.legalPersonIdCard,//法人身份证
  396. legalPersonTel:this.state.legalPersonTel,//法人联系电话
  397. legalPersonEmail:this.state.legalPersonEmail,//法人联系邮箱
  398. highTechZone:this.state.highTechZone,//是否高新
  399. listed:this.state.listed,//是否高新
  400. international:this.state.international,//是否国际化
  401. orgCode:this.state.orgCode,//社会统一机构
  402. orgCodeUrl: theorgCodeUrl.length != 0 ? theorgCodeUrl : '',//社会统一机构地址
  403. businessScope:this.state.businessScope,//业务范围
  404. contacts:this.state.contacts,//主要联系人姓名
  405. contactMobile:this.state.contactMobile,//主要联系人电话
  406. investment:this.state.investment,//投资机构
  407. businessAudit:this.state.businessAudit,//业务认证
  408. auditStatus:this.state.auditStatus,//实名认证
  409. intellectualProperty:this.state.intellectualProperty,//已有知识产权情况
  410. yearSalesAmount:this.state.yearSalesAmount,//年度销售额
  411. lastYearResearchAmount:this.state.lastYearResearchAmount,//上年度研发费用
  412. assets:this.state.assets,//总资产
  413. qualification:this.state.qualification,//企业资质情况
  414. cooperationSituation:this.state.cooperationSituation,//企业与高校院所
  415. informationMaintainer:this.state.informationMaintainer,//资料维护人
  416. informationMaintainerName:thisDetail.informationMaintainerName,//资料维护人
  417. coreTechnology:this.state.coreTechnology,//核心技术
  418. accomplishSituation:this.state.accomplishSituation,//客户已完成项目情况
  419. }
  420. }).done(function(data) {
  421. this.setState({
  422. loading: false
  423. });
  424. if(!data.error.length) {
  425. message.success('保存成功!');
  426. this.visitCancel();
  427. this.loadData();
  428. } else {
  429. message.warning(data.error[0].message);
  430. }
  431. }.bind(this));
  432. },
  433. //整行点击
  434. tableRowClick(record, index) {
  435. this.state.visitModul=true;
  436. this.details(record.id);
  437. },
  438. //指定转交人自动补全
  439. supervisor(e){
  440. $.ajax({
  441. method: "get",
  442. dataType: "json",
  443. crossDomain: false,
  444. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  445. data:{
  446. adminName:e
  447. },
  448. success: function (data) {
  449. let thedata=data.data;
  450. if (!thedata) {
  451. if (data.error && data.error.length) {
  452. message.warning(data.error[0].message);
  453. };
  454. thedata = {};
  455. };
  456. this.setState({
  457. customerArr:thedata,
  458. });
  459. }.bind(this),
  460. }).always(function () {
  461. this.setState({
  462. loading: false
  463. });
  464. }.bind(this));
  465. },
  466. //输入转交人输入框失去焦点是判断客户是否存在
  467. selectAuto(value,options){
  468. this.setState({
  469. auto:value
  470. })
  471. },
  472. blurChange(e){
  473. let theType='';
  474. let contactLists=this.state.customerArr||[];
  475. if (e) {
  476. contactLists.map(function (item) {
  477. if (item.name == e.toString()) {
  478. theType = item.id;
  479. }
  480. });
  481. }
  482. this.setState({
  483. theTypes:theType
  484. })
  485. },
  486. //值改变时请求客户名称
  487. httpChange(e){
  488. if(e.length>=1){
  489. this.supervisor(e);
  490. }
  491. this.setState({
  492. auto:e
  493. })
  494. },
  495. //转交
  496. changeAssigner() {
  497. if(this.state.theTypes){
  498. this.setState({
  499. selectedRowKeys: [],
  500. });
  501. let id;
  502. for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
  503. let rowItem = this.state.selectedRows[idx];
  504. if(rowItem.id) {
  505. id=rowItem.id;
  506. };
  507. };
  508. $.ajax({
  509. method: "post",
  510. dataType: "json",
  511. crossDomain: false,
  512. url: globalConfig.context + "/api/admin/customer/updateInformationMaintainerr",
  513. data: {
  514. id: id, //客户ID
  515. aid: this.state.theTypes, //指定转交人的ID
  516. }
  517. }).done(function(data) {
  518. if(!data.error.length) {
  519. message.success('转交成功!');
  520. this.setState({
  521. auto:'',
  522. loading: false,
  523. });
  524. } else {
  525. message.warning(data.error[0].message);
  526. };
  527. this.loadData(this.state.ispage);
  528. }.bind(this));
  529. }else{
  530. message.warning('请输入转交人姓名')
  531. }
  532. },
  533. //详情打开
  534. visitOk(e) {
  535. this.setState({
  536. visitModul: false
  537. });
  538. },
  539. //详情关闭
  540. visitCancel(e) {
  541. this.setState({
  542. visitModul: false
  543. });
  544. //this.props.closeDesc(false,false)
  545. },
  546. getOrgCodeUrl(e) {
  547. this.setState({ orgCodeUrl: e });
  548. },
  549. getCompanyLogoUrl(e) {
  550. this.setState({ companyLogoUrl: e });
  551. },
  552. componentWillReceiveProps(nextProps) {
  553. if(nextProps.ApiUrl!=this.props.ApiUrl) {
  554. this.state.nameSearch = '';
  555. this.state.addressSearch = [];
  556. this.state.provinceSearch = undefined;
  557. this.state.citySearch = undefined;
  558. this.state.releaseDate[0] = undefined;
  559. this.state.releaseDate[1] = undefined;
  560. this.loadData(null,nextProps.ApiUrl);
  561. };
  562. },
  563. render() {
  564. const {
  565. RangePicker,
  566. MonthPicker
  567. } = DatePicker;
  568. const formItemLayout = {
  569. labelCol: { span: 8 },
  570. wrapperCol: { span: 14 },
  571. };
  572. const FormItem = Form.Item;
  573. const rowSelection = {
  574. selectedRowKeys: this.state.selectedRowKeys,
  575. onChange: (selectedRowKeys, selectedRows) => {
  576. this.setState({
  577. modalVisible:false,
  578. selectedRows: selectedRows.slice(-1),
  579. selectedRowKeys: selectedRowKeys.slice(-1)
  580. });
  581. },
  582. onSelect: (recordt, selected, selectedRows) => {
  583. this.setState({
  584. modalVisible:false,
  585. recordt: recordt.id
  586. })
  587. },
  588. };
  589. const hasSelected = this.state.selectedRowKeys.length > 0;
  590. const dataSources=this.state.customerArr || [];
  591. const options = dataSources.map((group) =>
  592. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  593. )
  594. const intentionState = this.props.intentionState ||'';
  595. return(
  596. <div className="user-content" >
  597. <div className="content-title">
  598. <span>客户资料维护</span>
  599. </div>
  600. <div className="user-search">
  601. <Input placeholder="客户名称"
  602. value={this.state.nameSearch}
  603. onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
  604. <Select placeholder="省"
  605. style={{ width: 80 }}
  606. value={this.state.provinceSearch}
  607. onChange={(e) => {this.setState({ provinceSearch: e});}}>
  608. {this.state.Provinces}
  609. </Select>
  610. <span style={{marginRight:'10px'}}>
  611. <Cascader options={citySelect()} value={this.state.addressSearch} placeholder="选择城市"
  612. onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />
  613. </span>
  614. <RangePicker style={{marginRight:'10px'}}
  615. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  616. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  617. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  618. <Button type="primary" onClick={this.search}>搜索</Button>
  619. <Button onClick={this.reset}>重置</Button>
  620. <AutoComplete
  621. className="certain-category-search"
  622. dropdownClassName="certain-category-search-dropdown"
  623. dropdownMatchSelectWidth={false}
  624. dropdownStyle={{ width: 120 }}
  625. style={{ width: '120px'}}
  626. dataSource={options}
  627. placeholder="输入转交人姓名"
  628. value={this.state.auto}
  629. onChange={this.httpChange}
  630. filterOption={true}
  631. onBlur={this.blurChange}
  632. onSelect={this.selectAuto}
  633. disabled={!hasSelected}
  634. >
  635. <Input />
  636. </AutoComplete>
  637. <Button type="primary" onClick={this.changeAssigner} disabled={!hasSelected} >转交</Button>
  638. </div>
  639. <div className="patent-table">
  640. <Spin spinning={this.state.loading}>
  641. <Table columns={this.state.columns}
  642. dataSource={this.state.dataSource}
  643. rowSelection={rowSelection}
  644. pagination={this.state.pagination}
  645. onRowClick={this.tableRowClick}
  646. />
  647. </Spin>
  648. </div>
  649. <Modal
  650. className="customeDetails"
  651. footer=''
  652. title="客户资料(绝密)"
  653. width='1000px'
  654. visible={this.state.visitModul}
  655. onOk={this.visitOk}
  656. onCancel={this.visitCancel}
  657. >
  658. <Form layout="horizontal" onSubmit={this.newSubmit} id="demand-form">
  659. <Spin spinning={this.state.loading}>
  660. <div className="clearfix" >
  661. <FormItem className="half-item"
  662. {...formItemLayout}
  663. label="客户姓名"
  664. >
  665. <span>{this.state.identifyName}</span>
  666. </FormItem>
  667. <FormItem className="half-item"
  668. {...formItemLayout}
  669. label="资料所属人"
  670. >
  671. <span>{this.state.informationMaintainerName}</span>
  672. </FormItem>
  673. </div>
  674. <div className="clearfix" >
  675. <FormItem className="half-item"
  676. {...formItemLayout}
  677. label="行业">
  678. <Select placeholder="选择行业" value={this.state.industry} style={{width:'95%'}}
  679. onChange={(e)=>{this.setState({industry:e})}}>
  680. {
  681. industry.map(function (item) {
  682. return <Select.Option key={item.value} >{item.key}</Select.Option>
  683. })
  684. }
  685. </Select>
  686. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  687. </FormItem>
  688. <FormItem className="half-item"
  689. {...formItemLayout}
  690. label="社会属性"
  691. >
  692. <Select placeholder="客户社会属性" value={this.state.societyTag} style={{width:'95%'}}
  693. onChange={(e)=>{this.setState({societyTag:e})}}>
  694. {
  695. socialAttribute.map(function (item) {
  696. return <Select.Option key={item.value} >{item.key}</Select.Option>
  697. })
  698. }
  699. </Select>
  700. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  701. </FormItem>
  702. <FormItem className="half-item"
  703. {...formItemLayout}
  704. label="省-市-区"
  705. >
  706. <Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'95%'}}
  707. onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
  708. <span style={{color:'red',marginLeft:'5px'}}>*</span>
  709. </FormItem>
  710. <FormItem className="half-item"
  711. {...formItemLayout}
  712. label="通信地址"
  713. >
  714. <Input placeholder="客户通信地址" value={this.state.postalAddress}
  715. onChange={(e,pre) => { this.setState({ postalAddress: e.target.value }) }}/>
  716. </FormItem>
  717. <FormItem className="half-item"
  718. {...formItemLayout}
  719. label="固定电话"
  720. >
  721. <Input placeholder="客户固定电话" value={this.state.contactsFixedTel}
  722. onChange={(e) => { this.setState({ contactsFixedTel: e.target.value }) }}/>
  723. </FormItem>
  724. <FormItem className="half-item"
  725. {...formItemLayout}
  726. label="客户传真"
  727. >
  728. <Input placeholder="客户传真" value={this.state.contactsFax}
  729. onChange={(e) => { this.setState({ contactsFax: e.target.value })}}/>
  730. </FormItem>
  731. <FormItem className="half-item"
  732. {...formItemLayout}
  733. label="注册资本"
  734. >
  735. <Input placeholder="注册资本" value={this.state.registeredCapital} onChange={(e) => {
  736. this.setState({ registeredCapital: e.target.value })}}/>
  737. </FormItem>
  738. <FormItem className="half-item"
  739. {...formItemLayout}
  740. label="企业规模"
  741. >
  742. <Input placeholder="单位规模" value={this.state.enterpriseScale} onChange={(e) => {
  743. this.setState({ enterpriseScale: e.target.value })}}/>
  744. </FormItem>
  745. <FormItem className="half-item"
  746. {...formItemLayout}
  747. label="法人名称"
  748. >
  749. <Input placeholder="法人名称" value={this.state.legalPerson} onChange={(e) => {
  750. this.setState({ legalPerson: e.target.value })}}/>
  751. </FormItem>
  752. <FormItem className="half-item"
  753. {...formItemLayout}
  754. label="法人身份证"
  755. >
  756. <Input placeholder="法人身份证" value={this.state.legalPersonIdCard} onChange={(e) => {
  757. this.setState({ legalPersonIdCard: e.target.value })}}/>
  758. </FormItem>
  759. <FormItem className="half-item"
  760. {...formItemLayout}
  761. label="主要联系人"
  762. >
  763. <Input placeholder="主要联系人" value={this.state.contacts} onChange={(e) => {
  764. this.setState({ contacts: e.target.value })}}/>
  765. </FormItem>
  766. <FormItem className="half-item"
  767. {...formItemLayout}
  768. label="主要联系人号码"
  769. >
  770. <Input placeholder="主要联系人号码" value={this.state.contactMobile} onChange={(e) => {
  771. this.setState({ contactMobile: e.target.value })}}/>
  772. </FormItem>
  773. <FormItem className="half-item"
  774. {...formItemLayout}
  775. label="法人电话"
  776. >
  777. <Input placeholder="法人电话" value={this.state.legalPersonTel} onChange={(e) => {
  778. this.setState({ legalPersonTel: e.target.value })}}/>
  779. </FormItem>
  780. <FormItem className="half-item"
  781. {...formItemLayout}
  782. label="法人电子邮箱"
  783. >
  784. <Input placeholder="法人电子邮箱" value={this.state.legalPersonEmail}
  785. onChange={(e) => {this.setState({legalPersonEmail: e.target.value })}}/>
  786. </FormItem>
  787. <FormItem className="half-item"
  788. {...formItemLayout}
  789. label="机构代码"
  790. >
  791. <Input placeholder="机构代码" value={this.state.orgCode} onChange={(e) => {
  792. this.setState({ orgCode: e.target.value })}}/>
  793. </FormItem>
  794. <FormItem className="half-item"
  795. {...formItemLayout}
  796. label="上年度销售额"
  797. >
  798. <Input ref='consul' placeholder="请输入上年度销售额" value={this.state.yearSalesAmount}
  799. onChange={(e) => {this.setState({yearSalesAmount: e.target.value })}}/>
  800. </FormItem>
  801. <FormItem className="half-item"
  802. {...formItemLayout}
  803. label="上年度研发费用"
  804. >
  805. <Input ref='consul' placeholder="请输入上年度研发费用" value={this.state.lastYearResearchAmount}
  806. onChange={(e) => {this.setState({lastYearResearchAmount: e.target.value })}}/>
  807. </FormItem>
  808. <FormItem className="half-item"
  809. {...formItemLayout}
  810. label="上年度总资产情况"
  811. >
  812. <Input ref='consul' placeholder="上年度总资产情况" value={this.state.assets}
  813. onChange={(e) => {this.setState({assets: e.target.value })}}/>
  814. </FormItem>
  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.businessScope}
  821. onChange={(e,pre) => { this.setState({ businessScope: 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.introduction}
  830. onChange={(e,pre) => { this.setState({ introduction: 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.intellectualProperty}
  839. onChange={(e,pre) => { this.setState({ intellectualProperty: 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.coreTechnology}
  848. onChange={(e,pre) => { this.setState({ coreTechnology: 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.qualification}
  857. onChange={(e,pre) => { this.setState({ qualification: 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.accomplishSituation}
  866. onChange={(e,pre) => { this.setState({ accomplishSituation: e.target.value })}}/>
  867. </FormItem>
  868. </div>
  869. <div className='clearfix'>
  870. <FormItem
  871. labelCol={{ span:4 }}
  872. wrapperCol={{ span: 18 }}
  873. label="企业高企合作情况" >
  874. <Input type="textarea" rows={4} value={this.state.cooperationSituation}
  875. onChange={(e,pre) => { this.setState({ cooperationSituation: e.target.value })}}/>
  876. </FormItem>
  877. </div>
  878. <div className="clearfix pictures">
  879. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginLeft:'95px'}}
  880. labelCol={{ span: 8 }}
  881. wrapperCol={{ span: 10 }}
  882. label="机构证(PIC)" >
  883. <PicturesWall
  884. fileList={this.getOrgCodeUrl}
  885. pictureUrl={this.state.orgCodeUrl} />
  886. <p>建议:图片要清晰。</p>
  887. </FormItem>
  888. <FormItem style={{display:'inline-block',width:'350px',marginTop:'20px',marginTop:'20px'}}
  889. labelCol={{ span: 8 }}
  890. wrapperCol={{ span: 10 }}
  891. label="单位LOGO" >
  892. <PicturesWall
  893. fileList={this.getCompanyLogoUrl}
  894. pictureUrl={this.state.companyLogoUrl} />
  895. <p>建议:图片要清晰。</p>
  896. </FormItem>
  897. </div>
  898. <Button className="setSubmit" type="primary" htmlType="submit">保存</Button>
  899. <Button type="ghost" onClick={this.visitCancel}>取消</Button>
  900. </div>
  901. </Spin>
  902. </Form>
  903. </Modal>
  904. </div >
  905. );
  906. }
  907. }));
  908. export default IntentionCustomer;