crm.jsx 83 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516
  1. import React from 'react';
  2. import {Tag, Tooltip, Radio, Icon, Button, AutoComplete,Cascader,Input, Select, Spin, Popconfirm, Table, Switch, message,Calendar , DatePicker, Upload, Form ,Modal,Tabs,Card } from 'antd';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import Jquery from 'jquery/dist/jquery.js';
  6. import moment from 'moment';
  7. import {Document,Page}from 'react-pdf';
  8. import PDF from 'react-pdf';
  9. import 'viewer/dist/crocodoc.viewer.css';
  10. import TechAchievementDesc from '@/manageCenter/achievement/crmAchievement.jsx';
  11. import { citySelect, provinceList ,areaSelect} from '@/NewDicProvinceList';
  12. import { socialAttribute, industry, auditStatusL, lvl, currentMember ,slcRedit,dataGrade,year,xiangmoState} from '@/dataDic.js';
  13. import {
  14. getSocialAttribute,
  15. beforeUploadFile,
  16. splitUrl,
  17. getSlcRedit,
  18. getDataGrade,
  19. getAchievementCategory,
  20. getTechAuditStatus,
  21. getboutique,
  22. getPreviews,
  23. getPreview,
  24. getXiangmoState,
  25. ShowModal
  26. } from "@/tools.js";
  27. import './customer.less';
  28. const TabPane = Tabs.TabPane;
  29. import ShowModalDiv from "@/showModal.jsx";
  30. import ImgList from "../../../../common/imgList";
  31. import {ChooseList} from "../../../order/orderNew/chooseList";
  32. import EnterpriseNameChange from "../../../../common/enterpriseNameChange";
  33. const Dragger = Upload.Dragger;
  34. //图片组件
  35. const PicturesWall = React.createClass({
  36. getInitialState() {
  37. return {
  38. previewVisible: false,
  39. previewImage: '',
  40. fileList: [],
  41. }
  42. },
  43. handleCancel() {
  44. this.setState({
  45. previewVisible: false
  46. })
  47. },
  48. handlePreview(file) {
  49. this.setState({
  50. previewImage: file.url || file.thumbUrl,
  51. previewVisible: true,
  52. });
  53. },
  54. handleChange(info) {
  55. let fileList = info.fileList;
  56. this.setState({
  57. fileList
  58. });
  59. this.props.fileList(fileList);
  60. },
  61. componentWillReceiveProps(nextProps) {
  62. this.state.fileList = nextProps.pictureUrl;
  63. this.state.pojectApplicationUrl = undefined;
  64. },
  65. render() {
  66. const {
  67. previewVisible,
  68. previewImage,
  69. fileList
  70. } = this.state;
  71. const uploadButton = (
  72. <div>
  73. <Icon type="plus" />
  74. <div className="ant-upload-text">点击上传</div>
  75. </div>
  76. );
  77. return(
  78. <div style={{display:"inline-block"}}>
  79. <ImgList
  80. domId={this.props.domId}
  81. uploadConfig={{
  82. action:globalConfig.context + "/api/admin/customer/uploadCustomerImg",
  83. data:{ 'sign': '' },
  84. multiple:true,
  85. listType:"picture-card",
  86. }}
  87. onChange={(infor)=>{
  88. this.handleChange(infor)
  89. }}
  90. fileList={fileList}
  91. />
  92. </div>
  93. );
  94. }
  95. });
  96. const IntentionCustomer = Form.create()(React.createClass({
  97. loadData(pageNo, apiUrl) {
  98. this.setState({
  99. visitModul:false,
  100. loading: true,
  101. ispage:pageNo,
  102. modalVisible:false
  103. });
  104. $.ajax({
  105. method: "post",
  106. dataType: "json",
  107. crossDomain: false,
  108. url: globalConfig.context +"/api/admin/customer/listCustomerInformation",
  109. data: {
  110. pageNo: pageNo || 1,
  111. pageSize: this.state.pagination.pageSize,
  112. name: this.state.nameSearch,
  113. dataGrade: this.state.dataGrade,
  114. follow: this.state.follow,
  115. province: !(this.state.addressSearch).length ? this.state.provinceSearch : this.state.addressSearch[0],
  116. city: !(this.state.addressSearch).length ? '' : this.state.addressSearch[1],
  117. startDate: this.state.releaseDate[0],
  118. endDate: this.state.releaseDate[1],
  119. },
  120. success: function(data) {
  121. ShowModal(this);
  122. let theArr = [];
  123. if(data.error.length || data.data.list == "") {
  124. if(data.error && data.error.length) {
  125. message.warning(data.error[0].message);
  126. };
  127. } else {
  128. for(let i = 0; i < data.data.list.length; i++) {
  129. let thisdata = data.data.list[i];
  130. let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
  131. theArr.push({
  132. key: i,
  133. id: thisdata.id,//用户ID
  134. type:thisdata.type,//类型
  135. name: thisdata.name,//用户名称
  136. diqu: diqu,//省市区
  137. industry: thisdata.industry,//行业
  138. dataGrade:thisdata.dataGrade?(thisdata.dataGrade*100).toFixed(2)+"%":"",//是否完善render:(text)=>{return ((text*100).toFixed(2)+"%") }
  139. contacts: thisdata.contacts,//联系人
  140. contactMobile: thisdata.contactMobile,//联系人电话
  141. createTime: thisdata.createTime,//行业
  142. });
  143. };
  144. this.state.pagination.current = data.data.pageNo;
  145. this.state.pagination.total = data.data.totalCount;
  146. };
  147. if(data.data&&data.data.list&&!data.data.list.length){
  148. this.state.pagination.current=0
  149. this.state.pagination.total=0
  150. }
  151. this.setState({
  152. dataSource: theArr,
  153. pageNo: pageNo,
  154. pagination: this.state.pagination,
  155. selectedRowKeys:[]
  156. });
  157. }.bind(this),
  158. }).always(function() {
  159. this.setState({
  160. loading: false
  161. });
  162. }.bind(this));
  163. },
  164. loadDatas(pageNos) {
  165. this.setState({
  166. loading: true,
  167. });
  168. $.ajax({
  169. method: "get",
  170. dataType: "json",
  171. crossDomain: false,
  172. url: globalConfig.context + "/api/admin/achievement/listUserAchievement",
  173. data: {
  174. pageNo: pageNos || 1,
  175. pageSize: this.state.paginationDate.pageSize,
  176. uid:this.state.uid,
  177. },
  178. success: function (data) {
  179. let theArr = [];
  180. if (!data.data || !data.data.list) {
  181. if (data.error && data.error.length) {
  182. message.warning(data.error[0].message);
  183. };
  184. } else {
  185. for (let i = 0; i < data.data.list.length; i++) {
  186. let thisdata = data.data.list[i];
  187. theArr.push({
  188. key: i,
  189. id: thisdata.id,
  190. serialNumber: thisdata.serialNumber,
  191. dataCategory: thisdata.dataCategory,
  192. name: thisdata.name,
  193. keyword: thisdata.keyword,
  194. theName: thisdata.username || thisdata.ownerName,
  195. category: thisdata.category,
  196. ownerName: thisdata.username ? thisdata.username : thisdata.ownerName,
  197. ownerType: thisdata.ownerType,
  198. ownerMobile: thisdata.ownerMobile,
  199. status: thisdata.status,
  200. releaseDate: thisdata.releaseDate,
  201. releaseDateFormattedDate: thisdata.releaseDateFormattedDate,
  202. auditStatus: thisdata.auditStatus,
  203. boutique: thisdata.boutique,
  204. hot: thisdata.hot,
  205. techBrokerId:thisdata.techBrokerId,
  206. createTimeFormattedDate: thisdata.createTimeFormattedDate,
  207. remark:thisdata.remark
  208. });
  209. };
  210. this.state.paginationDate.current = data.data.pageNo;
  211. this.state.paginationDate.total = data.data.totalCount;
  212. };
  213. this.setState({
  214. dataSourceDate: theArr,
  215. pageNos: pageNos,
  216. paginationDate: this.state.paginationDate
  217. });
  218. }.bind(this),
  219. }).always(function () {
  220. this.setState({
  221. loading: false
  222. });
  223. }.bind(this));
  224. },
  225. loadDatac(pageNo, apiUrl) {
  226. this.setState({
  227. loading: true,
  228. });
  229. $.ajax({
  230. method: "get",
  231. dataType: "json",
  232. crossDomain: false,
  233. url: globalConfig.context +"/api/admin/customers/selectListOrgAnnual",
  234. data: {
  235. // pageNo: pageNo || 1,
  236. // pageSize: this.state.pagination.pageSize,
  237. uid:this.state.uid,
  238. },
  239. success: function(data) {
  240. let theArr = [];
  241. if(data.error.length || data.data.list == "") {
  242. if(data.error && data.error.length) {
  243. message.warning(data.error[0].message);
  244. };
  245. } else {
  246. for(let i = 0; i < data.data.list.length; i++) {
  247. let thisdata = data.data.list[i];
  248. let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
  249. theArr.push({
  250. key: i,
  251. id: thisdata.id,//年报ID
  252. uid: thisdata.uid,//客户ID
  253. year:thisdata.year,//年份
  254. salesAmount: thisdata.salesAmount,//营销额
  255. researchAmount: thisdata.researchAmount,//研发费用
  256. assets: thisdata.assets,//总资产
  257. fixedAssets:thisdata.fixedAssets,//固定资产
  258. aid: thisdata.aid,//录入人
  259. });
  260. };
  261. // this.state.pagination.current = data.data.pageNo;
  262. // this.state.pagination.total = data.data.totalCount;
  263. };
  264. if(data.data&&data.data.list&&!data.data.list.length){
  265. this.state.pagination.current=0
  266. this.state.pagination.total=0
  267. }
  268. this.setState({
  269. dataSourcec: theArr,
  270. // pageNo: pageNo,
  271. // pagination: this.state.pagination,
  272. // selectedRowKeys:[]
  273. });
  274. }.bind(this),
  275. }).always(function() {
  276. this.setState({
  277. loading: false
  278. });
  279. }.bind(this));
  280. },
  281. loadDatax(pageNo, apiUrl) {
  282. this.setState({
  283. loading: true,
  284. });
  285. $.ajax({
  286. method: "get",
  287. dataType: "json",
  288. crossDomain: false,
  289. url: globalConfig.context +"/api/admin/customers/selectListOrgYearProject",
  290. data: {
  291. uid:this.state.uid,
  292. },
  293. success: function(data) {
  294. let theArr = [];
  295. if(data.error.length || data.data.list == "") {
  296. if(data.error && data.error.length) {
  297. message.warning(data.error[0].message);
  298. };
  299. } else {
  300. for(let i = 0; i < data.data.list.length; i++) {
  301. let thisdata = data.data.list[i];
  302. let diqu=(thisdata.province==null?"":thisdata.province)+(thisdata.city==null?"":"-"+thisdata.city)+(thisdata.area==null?"":"-"+thisdata.area);
  303. theArr.push({
  304. key: i,
  305. id: thisdata.id,//用户ID
  306. uid: thisdata.uid,//客户ID
  307. projectName:thisdata.projectName,//项目名称
  308. year: thisdata.year,//年份
  309. status: thisdata.status?thisdata.status.toString():"",//项目状态
  310. remark: thisdata.remark,//备注
  311. aid: thisdata.aid,//录入人
  312. });
  313. };
  314. // this.state.pagination.current = data.data.pageNo;
  315. // this.state.pagination.total = data.data.totalCount;
  316. };
  317. if(data.data&&data.data.list&&!data.data.list.length){
  318. this.state.pagination.current=0
  319. this.state.pagination.total=0
  320. }
  321. this.setState({
  322. dataSourcex: theArr,
  323. });
  324. }.bind(this),
  325. }).always(function() {
  326. this.setState({
  327. loading: false
  328. });
  329. }.bind(this));
  330. },
  331. getInitialState() {
  332. return {
  333. businessScope: [],
  334. inputVisible: false,
  335. inputValue: '',
  336. salesTarget: [],
  337. inputVisible1: false,
  338. inputValue1: '',
  339. pages:1,
  340. pdfUrl:'',
  341. addressSearch: [],
  342. orgCodeUrl: [],
  343. companyLogoUrl: [],
  344. visible: false,
  345. releaseDate: [],
  346. visitModul:false,
  347. detailApi:'',
  348. followData:{},
  349. selectedRowKeys: [],
  350. selectedRows: [],
  351. loading: false,
  352. callnub:"0",
  353. pojectApplicationUrl:"",
  354. isXian:0,
  355. modalVisible:false,
  356. numPages: null,
  357. pageNumber: 1,
  358. pagec:0,
  359. pages:18,
  360. isXin:1,
  361. pagination: {
  362. defaultCurrent: 1,
  363. defaultPageSize: 10,
  364. showQuickJumper: true,
  365. pageSize: 10,
  366. onChange: function(page) {
  367. this.loadData(page);
  368. }.bind(this),
  369. showTotal: function(total) {
  370. return '共' + total + '条数据';
  371. }
  372. },
  373. paginationDate: {
  374. defaultCurrent: 1,
  375. defaultPageSize: 10,
  376. showQuickJumper: true,
  377. pageSize: 10,
  378. onChange: function(page) {
  379. this.loadDatas(page);
  380. }.bind(this),
  381. showTotal: function(total) {
  382. return '共' + total + '条数据';
  383. }
  384. },
  385. columns: [{
  386. title: '客户名称',
  387. dataIndex: 'name',
  388. key: 'name',
  389. width:100,
  390. render: text => {
  391. return (
  392. <Tooltip title={text}>
  393. <div style={{
  394. maxWidth:'100px',
  395. overflow:'hidden',
  396. textOverflow: "ellipsis",
  397. whiteSpace:'nowrap',
  398. }}>{text}</div>
  399. </Tooltip>
  400. )
  401. }
  402. }, {
  403. title: '地区',
  404. dataIndex: 'diqu',
  405. key: 'diqu',
  406. }, {
  407. title: '联系人',
  408. dataIndex: 'contacts',
  409. key: 'contacts',
  410. },{
  411. title: '联系电话',
  412. dataIndex: 'contactMobile',
  413. key: 'contactMobile',
  414. },
  415. {
  416. title: '资料完整度',
  417. dataIndex: 'dataGrade',
  418. key: 'dataGrade',
  419. },
  420. {
  421. title: '行业',
  422. dataIndex: 'industry',
  423. key: 'industry'
  424. },
  425. {
  426. title: '创建时间',
  427. dataIndex: 'createTime',
  428. key: 'createTime',
  429. }
  430. ],
  431. data: [],
  432. dataSource: [],
  433. columnsDate: [
  434. {
  435. title: '编号',
  436. dataIndex: 'serialNumber',
  437. key: 'serialNumber',
  438. }, {
  439. title: '名称',
  440. dataIndex: 'name',
  441. key: 'name',
  442. }, {
  443. title: '关键字',
  444. dataIndex: 'keyword',
  445. key: 'keyword',
  446. }, {
  447. title: '类型',
  448. dataIndex: 'category',
  449. key: 'category',
  450. render: text => { return getAchievementCategory(text); }
  451. },{
  452. title: '审核状态',
  453. dataIndex: 'auditStatus',
  454. key: 'auditStatus',
  455. render: text => { return getTechAuditStatus(text) }
  456. },
  457. {
  458. title: '是否精品',
  459. dataIndex: 'boutique',
  460. key: 'boutique',
  461. render: text => { return getboutique(text) }
  462. },
  463. {
  464. title: '发布时间',
  465. dataIndex: 'releaseDateFormattedDate',
  466. key: 'releaseDateFormattedDate',
  467. },{
  468. title: '录入时间',
  469. dataIndex: 'createTimeFormattedDate',
  470. key: 'createTimeFormattedDate',
  471. },
  472. ],
  473. dataSourceDate: [],
  474. columnsc: [{
  475. title: '年份',
  476. dataIndex: 'year',
  477. key: 'year',
  478. }, {
  479. title: '营销收入(万)',
  480. dataIndex: 'salesAmount',
  481. key: 'salesAmount',
  482. },
  483. {
  484. title: '总资产(万)',
  485. dataIndex: 'assets',
  486. key: 'assets'
  487. },
  488. {
  489. title: '固定资产(万)',
  490. dataIndex: 'fixedAssets',
  491. key: 'fixedAssets'
  492. }, {
  493. title: '研发费用(万)',
  494. dataIndex: 'researchAmount',
  495. key: 'researchAmount',
  496. },{
  497. title: '操作',
  498. dataIndex: 'rrtk',
  499. key: 'rrtk',
  500. render:(text,record,index)=>{
  501. return (
  502. <div>
  503. <Popconfirm title={'您将删除该条财务信息,请确认!'} onConfirm={(e)=>{this.deltalc(record)}} okText="确认" cancelText="取消">
  504. <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="danger">删除</Button>
  505. </Popconfirm>
  506. </div>
  507. )
  508. }
  509. }
  510. ],
  511. dataSourcec: [],
  512. columnsx: [{
  513. title: '项目名称',
  514. dataIndex: 'projectName',
  515. key: 'projectName',
  516. },{
  517. title: '年份',
  518. dataIndex: 'year',
  519. key: 'year',
  520. },
  521. {
  522. title: '项目状态',
  523. dataIndex: 'status',
  524. key: 'status',
  525. render: text => { return getXiangmoState(text); }
  526. }, {
  527. title: '备注',
  528. dataIndex: 'remark',
  529. key: 'remark',
  530. },{
  531. title: '操作',
  532. dataIndex: 'rrtk',
  533. key: 'rrtk',
  534. render:(text,record,index)=>{
  535. return (
  536. <div>
  537. <Popconfirm title={'您将删除该项目,请确认!'} onConfirm={(e)=>{this.deltalx(record)}} okText="确认" cancelText="取消">
  538. <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="danger">删除</Button>
  539. </Popconfirm>
  540. </div>
  541. )
  542. }
  543. }
  544. ],
  545. dataSourcex: [],
  546. };
  547. },
  548. handleClose(removedTag){
  549. const businessScope = this.state.businessScope.filter(tag => tag !== removedTag);
  550. this.setState({ businessScope });
  551. },
  552. showInput(){
  553. this.setState({ inputVisible: true }, () => this.input.focus());
  554. },
  555. handleInputChange(e){
  556. this.setState({ inputValue: e.target.value });
  557. },
  558. handleInputConfirm(){
  559. const state = this.state;
  560. const inputValue = state.inputValue;
  561. let businessScope = state.businessScope;
  562. if(inputValue.length > 16){
  563. message.warning('标签字数不能超过16个字符')
  564. return;
  565. }
  566. let arr = inputValue.split(',');
  567. for(let i of arr){
  568. if (i && businessScope.indexOf(i) === -1) {
  569. businessScope = [...businessScope, i];
  570. }
  571. this.setState({
  572. businessScope,
  573. inputVisible: false,
  574. inputValue: '',
  575. });
  576. }
  577. },
  578. handleClose1(removedTag){
  579. const salesTarget = this.state.salesTarget.filter(tag => tag !== removedTag);
  580. this.setState({ salesTarget });
  581. },
  582. showInput1(){
  583. this.setState({ inputVisible1: true }, () => this.input1.focus());
  584. },
  585. handleInputChange1(e){
  586. this.setState({ inputValue1: e.target.value });
  587. },
  588. handleInputConfirm1(){
  589. const state = this.state;
  590. const inputValue = state.inputValue1;
  591. let salesTarget = state.salesTarget;
  592. if(inputValue.length > 16){
  593. message.warning('标签字数不能超过16个字符')
  594. return;
  595. }
  596. let arr = inputValue.split(',');
  597. for(let i of arr){
  598. if (i && salesTarget.indexOf(i) === -1) {
  599. salesTarget = [...salesTarget, i];
  600. }
  601. this.setState({
  602. salesTarget,
  603. inputVisible1: false,
  604. inputValue1: '',
  605. });
  606. }
  607. },
  608. componentWillMount() {
  609. //城市
  610. let Province = [];
  611. provinceList.map(function(item) {
  612. var id = String(item.id)
  613. Province.push(
  614. <Select.Option value={id} key={item.name}>{item.name}</Select.Option>
  615. )
  616. });
  617. //行业
  618. let intentionalArr = [];
  619. industry.map(function(item) {
  620. intentionalArr.push(
  621. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  622. )
  623. });
  624. //会员等级
  625. let lvlArr = [];
  626. lvl.map(function(item) {
  627. lvlArr.push(
  628. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  629. )
  630. });
  631. //会员状态customerStatus
  632. let currentMemberArr = [];
  633. currentMember.map(function(item) {
  634. currentMemberArr.push(
  635. <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
  636. )
  637. });
  638. this.state.Provinces = Province;
  639. this.state.intentionalOption = intentionalArr;
  640. this.state.lvlArrOption = lvlArr;
  641. this.state.currentMemberArrOption = currentMemberArr;
  642. this.loadData();
  643. },
  644. search() {
  645. this.loadData();
  646. },
  647. reset() {
  648. this.state.nameSearch = '';
  649. this.state.addressSearch = [];
  650. this.state.dataGrade=undefined;
  651. this.state.follow=undefined;
  652. this.state.provinceSearch = undefined;
  653. this.state.citySearch = undefined;
  654. this.state.releaseDate[0] = undefined;
  655. this.state.releaseDate[1] = undefined;
  656. this.loadData();
  657. },
  658. resetc() {
  659. this.state.id=undefined;//年报ID
  660. this.state.assets=undefined;//总资产
  661. this.state.fixedAssets=undefined;//固定资产
  662. this.state.researchAmount=undefined;//研发费用
  663. this.state.salesAmount = undefined;//销售额
  664. this.state.year = undefined;//年份清零
  665. },
  666. resetx() {
  667. this.state.id=undefined;//年报ID
  668. this.state.projectName=undefined;//项目名称
  669. this.state.status=undefined;//项目状态
  670. this.state.remark = undefined;//备注
  671. this.state.year = undefined;//年份清零
  672. },
  673. //列表详情
  674. details(id) {
  675. $.ajax({
  676. method: "get",
  677. dataType: "json",
  678. crossDomain: false,
  679. url: globalConfig.context +"/api/admin/customer/findOrganizationCustomerDetail",
  680. data: {
  681. uid:id
  682. },
  683. success: function(data) {
  684. let thisDetail= data.data;
  685. if(data.error.length || data.data.list == "") {
  686. if(data.error && data.error.length) {
  687. message.warning(data.error[0].message);
  688. };
  689. } else {
  690. let ProvinceCityArr = [];
  691. let ProvinceS = thisDetail.locationProvince; //省
  692. let citys = thisDetail.locationCity;//市
  693. let Areas = thisDetail.locationArea;//区
  694. ProvinceCityArr.push(ProvinceS, citys, Areas);
  695. this.setState({
  696. detailId:thisDetail.id,//详情ID
  697. identifyName:thisDetail.identifyName,//客户名称
  698. uid:thisDetail.uid,//客户ID
  699. societyTag:thisDetail.societyTag,//社会标签
  700. companyLogoUrl:thisDetail.companyLogoUrl? splitUrl(thisDetail.companyLogoUrl, ',', globalConfig.avatarHost + '/upload') : [],//公司LOGO
  701. introduction:thisDetail.introduction,//介绍
  702. industry:thisDetail.industry?thisDetail.industry.toString():"",//行业
  703. locationProvince:thisDetail.locationProvince,//省
  704. locationCity:thisDetail.locationCity,//市
  705. locationArea:thisDetail.locationArea,//区
  706. ProvinceCity: ProvinceCityArr[0]!=null?ProvinceCityArr:undefined,//省市区
  707. postalAddress:thisDetail.postalAddress,//通讯地址
  708. contactsFixedTel:thisDetail.contactsFixedTel,//固定电话
  709. contactsFax:thisDetail.contactsFax,//传真地址
  710. registeredCapital:thisDetail.registeredCapital,//注册资金
  711. enterpriseScale:thisDetail.enterpriseScale,//企业规模
  712. legalPerson:thisDetail.legalPerson,//法人
  713. legalPersonIdCard:thisDetail.legalPersonIdCard,//法人身份证
  714. legalPersonTel:thisDetail.legalPersonTel,//法人联系电话
  715. legalPersonEmail:thisDetail.legalPersonEmail,//法人联系邮箱
  716. highTechZone:thisDetail.highTechZone,//是否高新
  717. listed:thisDetail.listed,//是否高新
  718. international:thisDetail.international,//是否国际化
  719. orgCode:thisDetail.orgCode,//社会统一机构
  720. orgCodeUrl:thisDetail.orgCodeUrl? splitUrl(thisDetail.orgCodeUrl, ',', globalConfig.avatarHost + '/upload') : [],//社会统一机构地址
  721. businessScope:thisDetail.businessScope ? thisDetail.businessScope.split(',').filter((v)=> v) : [],//业务范围
  722. salesTarget:thisDetail.salesTarget ? thisDetail.salesTarget.split(',').filter((v)=> v) : [],//销售目标企业
  723. contacts:thisDetail.contacts,//主要联系人姓名
  724. contactMobile:thisDetail.contactMobile,//主要联系人电话
  725. investment:thisDetail.investment,//投资机构
  726. businessAudit:thisDetail.businessAudit,//业务认证
  727. auditStatus:thisDetail.auditStatus,//实名认证
  728. intellectualProperty:thisDetail.intellectualProperty,//已有知识产权情况
  729. yearSalesAmount:thisDetail.yearSalesAmount,//年度销售额
  730. lastYearResearchAmount:thisDetail.lastYearResearchAmount,//上年度研发费用
  731. assets:thisDetail.assets,//总资产
  732. qualification:thisDetail.qualification,//企业资质情况
  733. cooperationSituation:thisDetail.cooperationSituation,//企业与高校院所
  734. informationMaintainer:thisDetail.informationMaintainer,//资料维护人
  735. informationMaintainerName:thisDetail.informationMaintainerName,//资料维护人
  736. coreTechnology:thisDetail.coreTechnology,//核心技术
  737. accomplishSituation:thisDetail.accomplishSituation,//客户已完成项目情况
  738. creditRating:thisDetail.creditRating?thisDetail.creditRating.toString():"",//信用等级
  739. pojectApplicationUrl:thisDetail.pojectApplicationUrl,//文件地址
  740. });
  741. }}.bind(this),
  742. }).always(function() {
  743. this.setState({
  744. loading: false
  745. });
  746. }.bind(this));
  747. },
  748. //基本信息提交
  749. newSubmit(e) {
  750. e.preventDefault();
  751. if(!this.state.industry) {
  752. message.warning('请选择行业');
  753. return false;
  754. };
  755. if(!this.state.societyTag) {
  756. message.warning('请选择社会属性');
  757. return false;
  758. };
  759. if(!this.state.ProvinceCity[1]) {
  760. message.warning('请选择地区');
  761. return false;
  762. };
  763. if(!this.state.registeredCapital) {
  764. message.warning('请填写注册资本');
  765. return false;
  766. };
  767. if(this.state.businessScope.length <=0) {
  768. message.warning('请填写公司主营产品');
  769. return false;
  770. };
  771. if(this.state.salesTarget.length <=0) {
  772. message.warning('请填写销售目标企业');
  773. return false;
  774. };
  775. var reg = /^[1-9]\d*$|^0$/;
  776. if(this.state.consultationPrice) {
  777. if(this.state.consultationPrice.length > 6) {
  778. message.warning('咨询费用不超过6位数');
  779. this.refs.consul.focus();
  780. return false;
  781. };
  782. if(!reg.test(this.state.consultationPrice)) {
  783. message.warning('咨询费用只能输入数字');
  784. this.refs.consul.focus();
  785. return false;
  786. }
  787. }
  788. this.state.data = [];
  789. this.setState({
  790. selectedRowKeys: [],
  791. });
  792. let theorgCodeUrl = [];
  793. if(this.state.orgCodeUrl.length) {
  794. let picArr = [];
  795. this.state.orgCodeUrl.map(function(item) {
  796. if(item.response && item.response.data && item.response.data.length) {
  797. picArr.push(item.response.data);
  798. }
  799. });
  800. theorgCodeUrl = picArr.join(",");
  801. };
  802. let thecompanyLogoUrl = [];
  803. if(this.state.companyLogoUrl.length) {
  804. let picArr = [];
  805. this.state.companyLogoUrl.map(function(item) {
  806. if(item.response && item.response.data && item.response.data.length) {
  807. picArr.push(item.response.data);
  808. }
  809. });
  810. thecompanyLogoUrl = picArr.join(",");
  811. };
  812. let years = [];
  813. let yearMonth = this.state.yearMonth != undefined ? new Date(this.state.yearMonth).toLocaleDateString() : '';
  814. years = yearMonth.split('/');
  815. this.setState({
  816. loading: true
  817. });
  818. $.ajax({
  819. method: "post",
  820. dataType: "json",
  821. url: globalConfig.context + '/api/admin/customer/updateOrganizationCustomer',
  822. data: {
  823. id:this.state.detailId,//详情ID
  824. identifyName:this.state.identifyName,//客户名称
  825. uid:this.state.uid,//客户ID
  826. societyTag:this.state.societyTag,//社会标签
  827. companyLogoUrl:thecompanyLogoUrl.length != 0 ? thecompanyLogoUrl : '',//公司LOGO
  828. introduction:this.state.introduction,//介绍
  829. industry:this.state.industry,//行业
  830. locationProvince:(this.state.ProvinceCity)[0],//省
  831. locationCity:(this.state.ProvinceCity)[1],//市
  832. locationArea:(this.state.ProvinceCity)[2],//区
  833. postalAddress:this.state.postalAddress,//通讯地址
  834. contactsFixedTel:this.state.contactsFixedTel,//固定电话
  835. contactsFax:this.state.contactsFax,//传真地址
  836. registeredCapital:this.state.registeredCapital,//注册资金
  837. enterpriseScale:this.state.enterpriseScale,//企业规模
  838. legalPerson:this.state.legalPerson,//法人
  839. legalPersonIdCard:this.state.legalPersonIdCard,//法人身份证
  840. legalPersonTel:this.state.legalPersonTel,//法人联系电话
  841. legalPersonEmail:this.state.legalPersonEmail,//法人联系邮箱
  842. highTechZone:this.state.highTechZone,//是否高新
  843. listed:this.state.listed,//是否高新
  844. international:this.state.international,//是否国际化
  845. orgCode:this.state.orgCode,//社会统一机构
  846. orgCodeUrl: theorgCodeUrl.length != 0 ? theorgCodeUrl : '',//社会统一机构地址
  847. businessScope:this.state.businessScope.join(','),//业务范围
  848. salesTarget:this.state.salesTarget.join(','),//销售目标企业
  849. contacts:this.state.contacts,//主要联系人姓名
  850. contactMobile:this.state.contactMobile,//主要联系人电话
  851. investment:this.state.investment,//投资机构
  852. businessAudit:this.state.businessAudit,//业务认证
  853. auditStatus:this.state.auditStatus,//实名认证
  854. intellectualProperty:this.state.intellectualProperty,//已有知识产权情况
  855. qualification:this.state.qualification,//企业资质情况
  856. cooperationSituation:this.state.cooperationSituation,//企业与高校院所
  857. informationMaintainer:this.state.informationMaintainer,//资料维护人
  858. informationMaintainerName:this.state.informationMaintainerName,//资料维护人
  859. coreTechnology:this.state.coreTechnology,//核心技术
  860. creditRating:this.state.creditRating,//信用等级
  861. pojectApplicationUrl:this.state.pojectApplicationUrl,//文件地址
  862. }
  863. }).done(function(data) {
  864. this.setState({
  865. loading: false
  866. });
  867. if(!data.error.length) {
  868. message.success('保存成功!');
  869. this.visitCancel();
  870. this.loadData(this.state.pageNo);
  871. } else {
  872. message.warning(data.error[0].message);
  873. }
  874. }.bind(this));
  875. },
  876. //财务信息提交
  877. newSubmitc(e) {
  878. e.preventDefault();
  879. if(!this.state.year) {
  880. message.warning('请选择年份');
  881. return false;
  882. };
  883. this.setState({
  884. loading: true
  885. });
  886. $.ajax({
  887. method: "post",
  888. dataType: "json",
  889. url: globalConfig.context + this.state.isXin==1?'/api/admin/customers/addOrgAnnual':'/api/admin/customers/updateOrgAnnual',
  890. data: {
  891. id:this.state.id?this.state.id:undefined,//年报ID
  892. uid:this.state.uid,//客户ID
  893. year:this.state.year,//年份
  894. researchAmount:this.state.researchAmount,//研发费用
  895. assets:this.state.assets,//总资产
  896. fixedAssets:this.state.fixedAssets,//固定资产
  897. salesAmount:this.state.salesAmount,//销售额
  898. }
  899. }).done(function(data) {
  900. this.setState({
  901. loading: false
  902. });
  903. if(!data.error.length) {
  904. message.success('保存成功!');
  905. this.visitCancelc();
  906. this.loadDatac();
  907. this.loadData();
  908. } else {
  909. message.warning(data.error[0].message);
  910. }
  911. }.bind(this));
  912. },
  913. //财务信息提交
  914. newSubmitx(e) {
  915. e.preventDefault();
  916. if(!this.state.year) {
  917. message.warning('请选择年份');
  918. return false;
  919. };
  920. this.setState({
  921. loading: true
  922. });
  923. $.ajax({
  924. method: "post",
  925. dataType: "json",
  926. url: globalConfig.context + this.state.isXinx==1?'/api/admin/customers/addOrgYearProject':'/api/admin/customers/updateOrgYearProject',
  927. data: {
  928. id:this.state.id?this.state.id:undefined,//年报ID
  929. uid:this.state.uid,//客户ID
  930. year:this.state.year,//年份
  931. projectName:this.state.projectName,//研发费用
  932. status:this.state.status,//总资产
  933. remark:this.state.remark,//销售额
  934. }
  935. }).done(function(data) {
  936. this.setState({
  937. loading: false
  938. });
  939. if(!data.error.length) {
  940. message.success('保存成功!');
  941. this.visitCancelc();
  942. this.loadDatax();
  943. this.loadData();
  944. } else {
  945. message.warning(data.error[0].message);
  946. }
  947. }.bind(this));
  948. },
  949. //获取ID
  950. getStateData(id) {
  951. this.setState({
  952. loading: true
  953. });
  954. $.ajax({
  955. method: "post",
  956. dataType: "json",
  957. crossDomain: false,
  958. url: globalConfig.context + "/api/admin/techproject/techProjectLog",
  959. data: {
  960. pid: id || this.props.data.id
  961. },
  962. success: function (data) {
  963. if (!data.data) {
  964. if (data.error && data.error.length) {
  965. message.warning(data.error[0].message);
  966. };
  967. return;
  968. };
  969. var myDate = new Date();
  970. this.state.stateTable = [];
  971. for (let i = 0; i < data.data.length; i++) {
  972. this.state.stateTable.push({
  973. key: i,
  974. state: data.data[i].state,
  975. recordTime: data.data[i].recordTime,
  976. recordTimeFormattedDate: data.data[i].recordTimeFormattedDate,
  977. principal: data.data[i].principal,
  978. operator: data.data[i].operator,
  979. comment: data.data[i].comment
  980. });
  981. };
  982. }.bind(this),
  983. }).always(function () {
  984. this.setState({
  985. loading: false
  986. });
  987. }.bind(this));
  988. },
  989. //整行点击
  990. tableRowClick(record, index) {
  991. this.state.visitModul=true;
  992. this.state.pojectApplicationUrl = undefined;
  993. this.state.isXian=0;
  994. this.details(record.id);
  995. },
  996. //指定转交人自动补全
  997. supervisor(e){
  998. $.ajax({
  999. method: "get",
  1000. dataType: "json",
  1001. crossDomain: false,
  1002. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  1003. data:{
  1004. adminName:e
  1005. },
  1006. success: function (data) {
  1007. let thedata=data.data;
  1008. if (!thedata) {
  1009. if (data.error && data.error.length) {
  1010. message.warning(data.error[0].message);
  1011. };
  1012. thedata = {};
  1013. };
  1014. this.setState({
  1015. customerArr:thedata,
  1016. });
  1017. }.bind(this),
  1018. }).always(function () {
  1019. this.setState({
  1020. loading: false
  1021. });
  1022. }.bind(this));
  1023. },
  1024. //输入转交人输入框失去焦点是判断客户是否存在
  1025. selectAuto(value,options){
  1026. this.setState({
  1027. auto:value
  1028. })
  1029. },
  1030. blurChange(e){
  1031. let theType='';
  1032. let contactLists=this.state.customerArr||[];
  1033. if (e) {
  1034. contactLists.map(function (item) {
  1035. if (item.name == e.toString()) {
  1036. theType = item.id;
  1037. }
  1038. });
  1039. }
  1040. this.setState({
  1041. theTypes:theType
  1042. })
  1043. },
  1044. //值改变时请求客户名称
  1045. httpChange(e){
  1046. if(e.length>=1){
  1047. this.supervisor(e);
  1048. }
  1049. this.setState({
  1050. auto:e
  1051. })
  1052. },
  1053. //转交
  1054. changeAssigner() {
  1055. if(this.state.theTypes){
  1056. this.setState({
  1057. selectedRowKeys: [],
  1058. });
  1059. let id;
  1060. for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
  1061. let rowItem = this.state.selectedRows[idx];
  1062. if(rowItem.id) {
  1063. id=rowItem.id;
  1064. };
  1065. };
  1066. $.ajax({
  1067. method: "post",
  1068. dataType: "json",
  1069. crossDomain: false,
  1070. url: globalConfig.context + "/api/admin/customer/updateInformationMaintainerr",
  1071. data: {
  1072. id: id, //客户ID
  1073. aid: this.state.theTypes, //指定转交人的ID
  1074. }
  1075. }).done(function(data) {
  1076. if(!data.error.length) {
  1077. message.success('转交成功!');
  1078. this.setState({
  1079. auto:'',
  1080. loading: false,
  1081. });
  1082. } else {
  1083. message.warning(data.error[0].message);
  1084. };
  1085. this.loadData(Math.min(this.state.pageNo==undefined?1:this.state.pageNo,Math.ceil((this.state.pagination.total-1)/10)));
  1086. }.bind(this));
  1087. }else{
  1088. message.warning('请输入转交人姓名')
  1089. }
  1090. },
  1091. //详情打开
  1092. visitOk(e) {
  1093. this.setState({
  1094. visitModul: false
  1095. });
  1096. },
  1097. //详情关闭
  1098. visitCancel(e) {
  1099. this.state.fileList = [];
  1100. this.setState({
  1101. visitModul: false,
  1102. callnub:"0"
  1103. });
  1104. },
  1105. //新增年报打开
  1106. visitOkc(e) {
  1107. this.setState({
  1108. visitModulc: true,
  1109. visitModulx: true
  1110. });
  1111. },
  1112. //新增年报关闭
  1113. visitCancelc(e) {
  1114. this.resetc();
  1115. this.resetx();
  1116. this.setState({
  1117. visitModulc: false,
  1118. visitModulx: false,
  1119. });
  1120. },
  1121. //PDF打开
  1122. visitOk1(e) {
  1123. this.getPrevie(this.state.uid, 'techProject', 'organization_application');
  1124. this.setState({
  1125. visitModul1: true
  1126. });
  1127. },
  1128. //PDF关闭
  1129. visitCancel1(e) {
  1130. this.setState({
  1131. visitModul1: false,
  1132. loading:false,
  1133. });
  1134. },
  1135. //获取PDF地址
  1136. getPrevie(id,url,sign){
  1137. $.ajax({
  1138. method: "get",
  1139. dataType: "json",
  1140. crossDomain: false,
  1141. url: globalConfig.context + "/api/admin/customer/" + url,
  1142. data:{
  1143. "id": id,
  1144. "sign": sign
  1145. },
  1146. success: function (data) {
  1147. if (!data.data) {
  1148. if ( data.error && data.error.length ) {
  1149. message.warning(data.error[0].message);
  1150. };
  1151. };
  1152. this.setState({
  1153. pdfUrl: location.origin + globalConfig.context + "/open/preview?" + data.data,
  1154. });
  1155. }.bind(this)
  1156. });
  1157. },
  1158. //PDF分页
  1159. //一开始就加载这个函数
  1160. onDocumentComplete (pages) {
  1161. this.setState({
  1162. loading: true,
  1163. });
  1164. this.setState({ pagec:0, pages:pages.total });
  1165. },
  1166. //随后
  1167. onPageComplete (pagec) {
  1168. this.setState({ pagec });
  1169. },
  1170. handlePrevious (){
  1171. this.setState({ pagec: this.state.pagec - 1 });
  1172. },
  1173. handleNext (){
  1174. this.setState({ pagec: this.state.pagec + 1 });
  1175. },
  1176. renderPagination (pagec,pages) {
  1177. let previousButton = <li className="previous" onClick={this.handlePrevious}><a href="#"><span className="fa fa-arrow-left">上一页</span> </a></li>;
  1178. if (pagec==0) {
  1179. previousButton = <li className="previous disabled"><a href="#"><span className="fa fa-arrow-left">上一页</span> </a></li>;
  1180. }
  1181. let nextButton = <li className="next" onClick={this.handleNext}><a href="#"> <span className="fa fa-arrow-right">下一页</span></a></li>;
  1182. if (pagec==pages) {
  1183. nextButton = <li className="next disabled"><a href="#"> <span className="fa fa-arrow-right">下一页</span></a></li>;
  1184. }
  1185. return (
  1186. <nav>
  1187. <ul className="pager">
  1188. {previousButton}
  1189. {nextButton}
  1190. </ul>
  1191. </nav>
  1192. );
  1193. },
  1194. //上面是做PDF分页的
  1195. getOrgCodeUrl(e) {
  1196. this.setState({ orgCodeUrl: e });
  1197. },
  1198. getCompanyLogoUrl(e) {
  1199. this.setState({ companyLogoUrl: e });
  1200. },
  1201. componentWillReceiveProps(nextProps) {
  1202. if(nextProps.ApiUrl!=this.props.ApiUrl) {
  1203. this.state.nameSearch = '';
  1204. this.state.addressSearch = [];
  1205. this.state.provinceSearch = undefined;
  1206. this.state.citySearch = undefined;
  1207. this.state.releaseDate[0] = undefined;
  1208. this.state.releaseDate[1] = undefined;
  1209. this.loadData(null,nextProps.ApiUrl);
  1210. };
  1211. },
  1212. callback(e) {
  1213. if(e == '0') {
  1214. this.setState({
  1215. callnub: e,
  1216. })
  1217. }
  1218. if(e == '1') {
  1219. this.setState({
  1220. callnub: e,
  1221. })
  1222. this.loadDatas();
  1223. }
  1224. if(e == '2') {
  1225. this.setState({
  1226. callnub: e,
  1227. })
  1228. this.loadDatac();
  1229. }
  1230. if(e == '3') {
  1231. this.setState({
  1232. callnub: e,
  1233. })
  1234. this.loadDatax();
  1235. }
  1236. },
  1237. //发布成果
  1238. addClick() {
  1239. this.state.RowData = {};
  1240. this.setState({
  1241. showDesc: true,
  1242. });
  1243. },
  1244. //新增财务信息
  1245. addClickc() {
  1246. this.state.RowData = {};
  1247. this.resetc();
  1248. this.setState({
  1249. visitModulc: true,
  1250. isXin:1,
  1251. });
  1252. },
  1253. //新增项目信息
  1254. addClickx() {
  1255. this.state.RowData = {};
  1256. this.resetx();
  1257. this.setState({
  1258. visitModulx: true,
  1259. isXinx:1,
  1260. });
  1261. },
  1262. //关闭发布成果
  1263. closeDesc(e, s) {
  1264. this.state.showDesc = e;
  1265. if (s) {
  1266. this.loadDatas();
  1267. };
  1268. },
  1269. //客户资料每行点击
  1270. tableRowClickDate(record, index) {
  1271. this.state.RowData = record;
  1272. if(index!=undefined){
  1273. this.setState({
  1274. showDesc: true
  1275. });
  1276. }
  1277. },
  1278. //年度每行点击
  1279. tableRowClickDatec(record, index) {
  1280. this.state.RowData = record;
  1281. if(index!=undefined){
  1282. this.setState({
  1283. isXin:2,
  1284. visitModulc: true,
  1285. year:record.year.toString(),//年份
  1286. id:record.id,//年报详情ID
  1287. assets:record.assets,//总资产
  1288. fixedAssets:record.fixedAssets,//固定资产
  1289. researchAmount:record.researchAmount,//研发费用
  1290. salesAmount:record.salesAmount,//销售额
  1291. });
  1292. }
  1293. },
  1294. //项目每行点击
  1295. tableRowClickDatex(record, index) {
  1296. this.state.RowData = record;
  1297. if(index!=undefined){
  1298. this.setState({
  1299. isXinx:2,
  1300. visitModulx: true,
  1301. year:record.year.toString(),//年份
  1302. id:record.id,//年报详情ID
  1303. projectName:record.projectName,//项目名称
  1304. status:record.status.toString(),//项目状态
  1305. remark:record.remark,//销售额
  1306. });
  1307. }
  1308. },
  1309. //删除财务信息
  1310. deltalc(record){
  1311. this.setState({
  1312. loading: true
  1313. });
  1314. $.ajax({
  1315. method: "post",
  1316. dataType: "json",
  1317. crossDomain: false,
  1318. url: globalConfig.context + '/api/admin/customers/delectOrgAnnual',
  1319. data: {
  1320. id:record.id,
  1321. uid:record.uid
  1322. }
  1323. }).done(function (data) {
  1324. if (!data.error.length) {
  1325. message.success('操作成功');
  1326. this.setState({
  1327. loading: false,
  1328. });
  1329. this.loadDatac();
  1330. this.loadData();
  1331. } else {
  1332. message.warning(data.error[0].message);
  1333. };
  1334. }.bind(this));
  1335. },
  1336. //删除财务信息
  1337. deltalx(record){
  1338. this.setState({
  1339. loading: true
  1340. });
  1341. $.ajax({
  1342. method: "post",
  1343. dataType: "json",
  1344. crossDomain: false,
  1345. url: globalConfig.context + '/api/admin/customers/delectOrgYearProject',
  1346. data: {
  1347. id:record.id,
  1348. uid:record.uid
  1349. }
  1350. }).done(function (data) {
  1351. if (!data.error.length) {
  1352. message.success('操作成功');
  1353. this.setState({
  1354. loading: false,
  1355. });
  1356. this.loadDatax();
  1357. this.loadData();
  1358. } else {
  1359. message.warning(data.error[0].message);
  1360. };
  1361. }.bind(this));
  1362. },
  1363. changeList(arr) {
  1364. const newArr = [];
  1365. this.state.columns.forEach(item => {
  1366. arr.forEach(val => {
  1367. if (val === item.title) {
  1368. newArr.push(item);
  1369. }
  1370. });
  1371. });
  1372. this.setState({
  1373. changeList: newArr
  1374. });
  1375. },
  1376. render() {
  1377. let paginationss = null;
  1378. if (this.state.pagec>=0) {
  1379. paginationss = this.renderPagination(this.state.pagec, this.state.pages);
  1380. }
  1381. const {
  1382. RangePicker,
  1383. MonthPicker
  1384. } = DatePicker;
  1385. const formItemLayout = {
  1386. labelCol: { span: 8 },
  1387. wrapperCol: { span: 14 },
  1388. };
  1389. const formItemLayoutc = {
  1390. labelCol: { span: 6 },
  1391. wrapperCol: { span: 14 },
  1392. };
  1393. const FormItem = Form.Item;
  1394. const rowSelection = {
  1395. selectedRowKeys: this.state.selectedRowKeys,
  1396. onChange: (selectedRowKeys, selectedRows) => {
  1397. this.setState({
  1398. modalVisible:false,
  1399. selectedRows: selectedRows.slice(-1),
  1400. selectedRowKeys: selectedRowKeys.slice(-1)
  1401. });
  1402. },
  1403. onSelect: (recordt, selected, selectedRows) => {
  1404. this.setState({
  1405. modalVisible:false,
  1406. recordt: recordt.id
  1407. })
  1408. },
  1409. };
  1410. const hasSelected = this.state.selectedRowKeys.length > 0;
  1411. const dataSources=this.state.customerArr || [];
  1412. const options = dataSources.map((group) =>
  1413. <Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
  1414. )
  1415. const { businessScope, inputVisible, inputValue,salesTarget, inputVisible1, inputValue1 } = this.state;
  1416. const intentionState = this.props.intentionState ||'';
  1417. const props = {
  1418. name: 'file',
  1419. multiple: true,
  1420. action: '/api/admin/techproject/upload',
  1421. onChange(info) {
  1422. const status = info.file.status;
  1423. if (status !== 'uploading') {
  1424. }
  1425. if (status === 'done') {
  1426. message.success(`${info.file.name} file uploaded successfully.`);
  1427. } else if (status === 'error') {
  1428. message.error(`${info.file.name} file upload failed.`);
  1429. }
  1430. },
  1431. };
  1432. let pdfUrl =this.state.pdfUrl||'';
  1433. this.saveInputRef = input => this.input = input
  1434. this.saveInputRef1 = input => this.input1 = input
  1435. return (
  1436. <div className="user-content">
  1437. <ShowModalDiv ShowModal={this.state.showModal} />
  1438. <div className="content-title">
  1439. <span>客户资料维护</span>
  1440. </div>
  1441. <div className="user-search">
  1442. <Tabs
  1443. defaultActiveKey="1"
  1444. className="test">
  1445. <TabPane tab="搜索" key="1">
  1446. <Input
  1447. placeholder="客户名称"
  1448. value={this.state.nameSearch}
  1449. style={{width: 150,marginRight:10}}
  1450. onChange={e => {
  1451. this.setState({ nameSearch: e.target.value });
  1452. }}
  1453. />
  1454. <Select
  1455. placeholder="省"
  1456. style={{ width: 80 }}
  1457. value={this.state.provinceSearch}
  1458. onChange={e => {
  1459. this.setState({ provinceSearch: e });
  1460. }}
  1461. >
  1462. {this.state.Provinces}
  1463. </Select>
  1464. <span style={{ marginRight: "10px" }}>
  1465. <Cascader
  1466. options={citySelect()}
  1467. value={this.state.addressSearch}
  1468. placeholder="选择城市"
  1469. onChange={(e, pre) => {
  1470. this.setState({ addressSearch: e });
  1471. }}
  1472. />
  1473. </span>
  1474. <Select
  1475. placeholder="资料是否完善"
  1476. style={{ width: 120 }}
  1477. value={this.state.dataGrade}
  1478. onChange={e => {
  1479. this.setState({ dataGrade: e });
  1480. }}
  1481. >
  1482. <Select.Option value="0">未完善</Select.Option>
  1483. <Select.Option value="1">已完善</Select.Option>
  1484. </Select>
  1485. <Select
  1486. placeholder="是否面谈客户"
  1487. style={{ width: 120 }}
  1488. value={this.state.follow}
  1489. onChange={e => {
  1490. this.setState({ follow: e });
  1491. }}
  1492. >
  1493. <Select.Option value="0">否</Select.Option>
  1494. <Select.Option value="1">是</Select.Option>
  1495. </Select>
  1496. <RangePicker
  1497. style={{ marginRight: "10px" }}
  1498. value={[
  1499. this.state.releaseDate[0]
  1500. ? moment(this.state.releaseDate[0])
  1501. : null,
  1502. this.state.releaseDate[1]
  1503. ? moment(this.state.releaseDate[1])
  1504. : null
  1505. ]}
  1506. onChange={(data, dataString) => {
  1507. this.setState({ releaseDate: dataString });
  1508. }}
  1509. />
  1510. <Button type="primary" onClick={this.search} style={{marginRight: 10}}>
  1511. 搜索
  1512. </Button>
  1513. <Button onClick={this.reset}>重置</Button>
  1514. </TabPane>
  1515. <TabPane key="2" tab="转交" >
  1516. <AutoComplete
  1517. className="certain-category-search"
  1518. dropdownClassName="certain-category-search-dropdown"
  1519. dropdownMatchSelectWidth={false}
  1520. dropdownStyle={{ width: 120 }}
  1521. style={{ width: "120px" }}
  1522. dataSource={options}
  1523. placeholder="输入转交人姓名"
  1524. value={this.state.auto}
  1525. onChange={this.httpChange}
  1526. filterOption={true}
  1527. onBlur={this.blurChange}
  1528. onSelect={this.selectAuto}
  1529. disabled={!hasSelected}
  1530. >
  1531. <Input />
  1532. </AutoComplete>
  1533. <Button
  1534. type="primary"
  1535. onClick={this.changeAssigner}
  1536. disabled={!hasSelected}
  1537. >
  1538. 转交
  1539. </Button>
  1540. </TabPane>
  1541. <TabPane tab="更改表格显示数据" key="3">
  1542. <div style={{ marginLeft: 10 }}>
  1543. <ChooseList
  1544. columns={this.state.columns}
  1545. changeFn={this.changeList}
  1546. changeList={this.state.changeList}
  1547. top={55}
  1548. margin={11}
  1549. />
  1550. </div>
  1551. </TabPane>
  1552. </Tabs>
  1553. </div>
  1554. <div className="patent-table">
  1555. <Spin spinning={this.state.loading}>
  1556. <Table
  1557. columns={
  1558. this.state.changeList
  1559. ? this.state.changeList
  1560. : this.state.columns
  1561. }
  1562. dataSource={this.state.dataSource}
  1563. rowSelection={rowSelection}
  1564. pagination={this.state.pagination}
  1565. onRowClick={this.tableRowClick}
  1566. bordered
  1567. size="middle"
  1568. />
  1569. </Spin>
  1570. </div>
  1571. <Modal
  1572. maskClosable={false}
  1573. className="customeDetails"
  1574. footer=""
  1575. title="客户资料"
  1576. width="1000px"
  1577. visible={this.state.visitModul}
  1578. onOk={this.visitOk}
  1579. onCancel={this.visitCancel}
  1580. >
  1581. <Tabs onChange={this.callback} activeKey={this.state.callnub}>
  1582. <TabPane tab="基本信息" key="0">
  1583. <div>
  1584. <Form
  1585. layout="horizontal"
  1586. onSubmit={this.newSubmit}
  1587. id="demand-form"
  1588. >
  1589. <Spin spinning={this.state.loading}>
  1590. <div
  1591. style={{
  1592. fontSize: "18px",
  1593. marginLeft: "50px",
  1594. marginTop: "15px",
  1595. marginBottom: "10px",
  1596. color: "red",
  1597. fontWeight: "bold"
  1598. }}
  1599. >
  1600. 基本信息
  1601. </div>
  1602. <div className="clearfix">
  1603. <FormItem
  1604. className="half-item"
  1605. {...formItemLayout}
  1606. label="客户姓名"
  1607. >
  1608. <span>{this.state.identifyName}</span>
  1609. <EnterpriseNameChange
  1610. type='journal'
  1611. style={{ marginLeft: 10 }}
  1612. enterpriseId={this.state.uid}/>
  1613. </FormItem>
  1614. <FormItem
  1615. className="half-item"
  1616. {...formItemLayout}
  1617. label="资料所属人"
  1618. >
  1619. <span>{this.state.informationMaintainerName}</span>
  1620. </FormItem>
  1621. </div>
  1622. <div className="clearfix">
  1623. <FormItem
  1624. className="half-item"
  1625. {...formItemLayout}
  1626. label="企业行业"
  1627. >
  1628. <Select
  1629. placeholder="选择行业"
  1630. value={this.state.industry}
  1631. style={{ width: "95%" }}
  1632. onChange={e => {
  1633. this.setState({ industry: e });
  1634. }}
  1635. >
  1636. {industry.map(function(item) {
  1637. return (
  1638. <Select.Option key={item.value}>
  1639. {item.key}
  1640. </Select.Option>
  1641. );
  1642. })}
  1643. </Select>
  1644. <span style={{ color: "red", marginLeft: "5px" }}>
  1645. *
  1646. </span>
  1647. </FormItem>
  1648. <FormItem
  1649. className="half-item"
  1650. {...formItemLayout}
  1651. label="社会属性"
  1652. >
  1653. <Select
  1654. placeholder="客户社会属性"
  1655. value={this.state.societyTag}
  1656. style={{ width: "95%" }}
  1657. onChange={e => {
  1658. this.setState({ societyTag: e });
  1659. }}
  1660. >
  1661. {socialAttribute.map(function(item) {
  1662. return (
  1663. <Select.Option key={item.value}>
  1664. {item.key}
  1665. </Select.Option>
  1666. );
  1667. })}
  1668. </Select>
  1669. <span style={{ color: "red", marginLeft: "5px" }}>
  1670. *
  1671. </span>
  1672. </FormItem>
  1673. <FormItem
  1674. className="half-item"
  1675. {...formItemLayout}
  1676. label="省-市-区"
  1677. >
  1678. <Cascader
  1679. options={areaSelect()}
  1680. value={this.state.ProvinceCity}
  1681. placeholder="选择城市"
  1682. style={{ width: "95%" }}
  1683. onChange={(e, pre) => {
  1684. this.setState({ ProvinceCity: e });
  1685. }}
  1686. />
  1687. <span style={{ color: "red", marginLeft: "5px" }}>
  1688. *
  1689. </span>
  1690. </FormItem>
  1691. <FormItem
  1692. className="half-item"
  1693. {...formItemLayout}
  1694. label="注册资本"
  1695. >
  1696. <Input
  1697. placeholder="注册资本"
  1698. style={{ width: "90%" }}
  1699. value={this.state.registeredCapital}
  1700. onChange={e => {
  1701. this.setState({
  1702. registeredCapital: e.target.value
  1703. });
  1704. }}
  1705. />
  1706. <span style={{ color: "red", marginLeft: "5px" }}>
  1707. *
  1708. </span>
  1709. </FormItem>
  1710. <div className="clearfix">
  1711. <FormItem
  1712. labelCol={{ span: 4 }}
  1713. wrapperCol={{ span: 20 }}
  1714. label="主营产品"
  1715. >
  1716. <div>
  1717. {businessScope.map((tag, index) => {
  1718. const isLongTag = tag.length > 20;
  1719. const tagElem = (
  1720. <Tag closable key={tag} afterClose={() => this.handleClose(tag)}>
  1721. {isLongTag ? `${tag.slice(0, 20)}...` : tag}
  1722. </Tag>
  1723. );
  1724. return isLongTag ? <Tooltip title={tag} key={tag}>{tagElem}</Tooltip> : tagElem;
  1725. })}
  1726. {inputVisible && (
  1727. <Input
  1728. ref={this.saveInputRef}
  1729. type="text"
  1730. size="small"
  1731. style={{ width: 78 }}
  1732. value={inputValue}
  1733. onChange={this.handleInputChange}
  1734. onBlur={this.handleInputConfirm}
  1735. onPressEnter={this.handleInputConfirm}
  1736. />
  1737. )}
  1738. {!inputVisible && <Button size="small" type="primary" onClick={this.showInput}>+ 新增主营产品</Button>}
  1739. <span style={{ color: "red", marginLeft: "5px" }}>
  1740. *
  1741. </span>
  1742. </div>
  1743. </FormItem>
  1744. </div>
  1745. <div className="clearfix">
  1746. <FormItem
  1747. labelCol={{ span: 4 }}
  1748. wrapperCol={{ span: 20 }}
  1749. label="销售目标企业"
  1750. >
  1751. <div>
  1752. {salesTarget.map((tag, index) => {
  1753. const isLongTag = tag.length > 20;
  1754. const tagElem = (
  1755. <Tag closable key={tag} afterClose={() => this.handleClose1(tag)}>
  1756. {isLongTag ? `${tag.slice(0, 20)}...` : tag}
  1757. </Tag>
  1758. );
  1759. return isLongTag ? <Tooltip title={tag} key={tag}>{tagElem}</Tooltip> : tagElem;
  1760. })}
  1761. {inputVisible1 && (
  1762. <Input
  1763. ref={this.saveInputRef1}
  1764. type="text"
  1765. size="small"
  1766. style={{ width: 78 }}
  1767. value={inputValue1}
  1768. onChange={this.handleInputChange1}
  1769. onBlur={this.handleInputConfirm1}
  1770. onPressEnter={this.handleInputConfirm1}
  1771. />
  1772. )}
  1773. {!inputVisible1 && <Button size="small" type="primary" onClick={this.showInput1}>+ 新增销售目标企业</Button>}
  1774. <span style={{ color: "red", marginLeft: "5px" }}>
  1775. *
  1776. </span>
  1777. </div>
  1778. </FormItem>
  1779. </div>
  1780. <div
  1781. style={{
  1782. fontSize: "18px",
  1783. marginLeft: "50px",
  1784. marginTop: "15px",
  1785. marginBottom: "10px",
  1786. color: "red",
  1787. fontWeight: "bold"
  1788. }}
  1789. >
  1790. 企业资料
  1791. </div>
  1792. <FormItem
  1793. className="half-item"
  1794. {...formItemLayout}
  1795. label="通信地址"
  1796. >
  1797. <Input
  1798. placeholder="客户通信地址"
  1799. value={this.state.postalAddress}
  1800. onChange={(e, pre) => {
  1801. this.setState({ postalAddress: e.target.value });
  1802. }}
  1803. />
  1804. </FormItem>
  1805. <FormItem
  1806. className="half-item"
  1807. {...formItemLayout}
  1808. label="固定电话"
  1809. >
  1810. <Input
  1811. placeholder="客户固定电话"
  1812. value={this.state.contactsFixedTel}
  1813. onChange={e => {
  1814. this.setState({ contactsFixedTel: e.target.value });
  1815. }}
  1816. />
  1817. </FormItem>
  1818. <FormItem
  1819. className="half-item"
  1820. {...formItemLayout}
  1821. label="客户传真"
  1822. >
  1823. <Input
  1824. placeholder="客户传真"
  1825. value={this.state.contactsFax}
  1826. onChange={e => {
  1827. this.setState({ contactsFax: e.target.value });
  1828. }}
  1829. />
  1830. </FormItem>
  1831. <FormItem
  1832. className="half-item"
  1833. {...formItemLayout}
  1834. label="企业人数"
  1835. >
  1836. <Input
  1837. placeholder="单位规模"
  1838. value={this.state.enterpriseScale}
  1839. onChange={e => {
  1840. this.setState({ enterpriseScale: e.target.value });
  1841. }}
  1842. />
  1843. </FormItem>
  1844. <FormItem
  1845. className="half-item"
  1846. {...formItemLayout}
  1847. label="法人名称"
  1848. >
  1849. <Input
  1850. placeholder="法人名称"
  1851. value={this.state.legalPerson}
  1852. onChange={e => {
  1853. this.setState({ legalPerson: e.target.value });
  1854. }}
  1855. />
  1856. </FormItem>
  1857. <FormItem
  1858. className="half-item"
  1859. {...formItemLayout}
  1860. label="法人身份证"
  1861. >
  1862. <Input
  1863. placeholder="法人身份证"
  1864. value={this.state.legalPersonIdCard}
  1865. onChange={e => {
  1866. this.setState({
  1867. legalPersonIdCard: e.target.value
  1868. });
  1869. }}
  1870. />
  1871. </FormItem>
  1872. <FormItem
  1873. className="half-item"
  1874. {...formItemLayout}
  1875. label="联系人"
  1876. >
  1877. <Input
  1878. placeholder="联系人名称"
  1879. value={this.state.contacts}
  1880. onChange={e => {
  1881. this.setState({ contacts: e.target.value });
  1882. }}
  1883. />
  1884. </FormItem>
  1885. <FormItem
  1886. className="half-item"
  1887. {...formItemLayout}
  1888. label="联系人号码"
  1889. >
  1890. <Input
  1891. placeholder="联系人号码"
  1892. value={this.state.contactMobile}
  1893. onChange={e => {
  1894. this.setState({ contactMobile: e.target.value });
  1895. }}
  1896. />
  1897. </FormItem>
  1898. <FormItem
  1899. className="half-item"
  1900. {...formItemLayout}
  1901. label="法人电话"
  1902. >
  1903. <Input
  1904. placeholder="法人电话"
  1905. value={this.state.legalPersonTel}
  1906. onChange={e => {
  1907. this.setState({ legalPersonTel: e.target.value });
  1908. }}
  1909. />
  1910. </FormItem>
  1911. <FormItem
  1912. className="half-item"
  1913. {...formItemLayout}
  1914. label="法人邮箱"
  1915. >
  1916. <Input
  1917. placeholder="法人电子邮箱"
  1918. value={this.state.legalPersonEmail}
  1919. onChange={e => {
  1920. this.setState({ legalPersonEmail: e.target.value });
  1921. }}
  1922. />
  1923. </FormItem>
  1924. <FormItem
  1925. className="half-item"
  1926. {...formItemLayout}
  1927. label="社会统一信用机构代码"
  1928. >
  1929. <Input
  1930. placeholder="社会统一信用机构代码"
  1931. value={this.state.orgCode}
  1932. onChange={e => {
  1933. this.setState({ orgCode: e.target.value });
  1934. }}
  1935. />
  1936. </FormItem>
  1937. <div className="clearfix">
  1938. <FormItem
  1939. labelCol={{ span: 4 }}
  1940. wrapperCol={{ span: 18 }}
  1941. label="客户简介"
  1942. >
  1943. <Input
  1944. type="textarea"
  1945. rows={3}
  1946. value={this.state.introduction}
  1947. onChange={(e, pre) => {
  1948. this.setState({ introduction: e.target.value });
  1949. }}
  1950. />
  1951. </FormItem>
  1952. </div>
  1953. <div className="clearfix pictures">
  1954. <FormItem
  1955. style={{
  1956. display: "inline-block",
  1957. width: "350px",
  1958. marginTop: "20px",
  1959. marginLeft: "95px"
  1960. }}
  1961. labelCol={{ span: 8 }}
  1962. wrapperCol={{ span: 10 }}
  1963. label="机构证书(PIC)"
  1964. >
  1965. <PicturesWall
  1966. domId={'crm1'}
  1967. fileList={this.getOrgCodeUrl}
  1968. pictureUrl={this.state.orgCodeUrl}
  1969. />
  1970. <p>建议:图片要清晰。</p>
  1971. </FormItem>
  1972. <FormItem
  1973. style={{
  1974. display: "inline-block",
  1975. width: "350px",
  1976. marginTop: "20px",
  1977. marginTop: "20px"
  1978. }}
  1979. labelCol={{ span: 8 }}
  1980. wrapperCol={{ span: 10 }}
  1981. label="单位LOGO"
  1982. >
  1983. <PicturesWall
  1984. domId={'crm2'}
  1985. fileList={this.getCompanyLogoUrl}
  1986. pictureUrl={this.state.companyLogoUrl}
  1987. />
  1988. <p>建议:图片要清晰。</p>
  1989. </FormItem>
  1990. </div>
  1991. <div
  1992. style={{
  1993. fontSize: "18px",
  1994. marginLeft: "50px",
  1995. marginTop: "15px",
  1996. marginBottom: "10px",
  1997. color: "red",
  1998. fontWeight: "bold"
  1999. }}
  2000. >
  2001. 重要资料
  2002. </div>
  2003. <div className="clearfix">
  2004. <FormItem
  2005. className="half-item"
  2006. {...formItemLayout}
  2007. label="客户信用等级"
  2008. >
  2009. <Select
  2010. placeholder="客户信用等级"
  2011. value={this.state.creditRating}
  2012. style={{ width: "90%" }}
  2013. onChange={e => {
  2014. this.setState({ creditRating: e });
  2015. }}
  2016. >
  2017. {slcRedit.map(function(item) {
  2018. return (
  2019. <Select.Option key={item.value}>
  2020. {item.key}
  2021. </Select.Option>
  2022. );
  2023. })}
  2024. </Select>
  2025. </FormItem>
  2026. <div className="clearfix">
  2027. <FormItem
  2028. labelCol={{ span: 4 }}
  2029. wrapperCol={{ span: 19 }}
  2030. label="企业核心技术"
  2031. >
  2032. <Input
  2033. type="textarea"
  2034. rows={3}
  2035. value={this.state.coreTechnology}
  2036. style={{ width: "96%" }}
  2037. onChange={(e, pre) => {
  2038. this.setState({
  2039. coreTechnology: e.target.value
  2040. });
  2041. }}
  2042. />
  2043. </FormItem>
  2044. </div>
  2045. <div className="clearfix">
  2046. <FormItem
  2047. labelCol={{ span: 4 }}
  2048. wrapperCol={{ span: 19 }}
  2049. label="企业资质情况"
  2050. >
  2051. <Input
  2052. type="textarea"
  2053. rows={3}
  2054. value={this.state.qualification}
  2055. placeholder="请按如下格式填写:资质名称+获得时间+拥有人+发证机构"
  2056. onChange={(e, pre) => {
  2057. this.setState({
  2058. qualification: e.target.value
  2059. });
  2060. }}
  2061. style={{ width: "96%" }}
  2062. />
  2063. </FormItem>
  2064. </div>
  2065. <div className="clearfix">
  2066. <FormItem
  2067. labelCol={{ span: 4 }}
  2068. wrapperCol={{ span: 19 }}
  2069. label="高企合作情况"
  2070. >
  2071. <Input
  2072. type="textarea"
  2073. rows={3}
  2074. value={this.state.cooperationSituation}
  2075. onChange={(e, pre) => {
  2076. this.setState({
  2077. cooperationSituation: e.target.value
  2078. });
  2079. }}
  2080. style={{ width: "96%" }}
  2081. />
  2082. </FormItem>
  2083. </div>
  2084. <div className="clearfix">
  2085. <FormItem
  2086. labelCol={{ span: 4 }}
  2087. wrapperCol={{ span: 19 }}
  2088. label="项目申请书"
  2089. >
  2090. <Upload
  2091. style={{ display: "inlineBlock" }}
  2092. name="avatar"
  2093. action={
  2094. globalConfig.context +
  2095. "/api/admin/customer/upload"
  2096. }
  2097. data={{
  2098. uid: this.state.detailId,
  2099. sign: "organization_application"
  2100. }}
  2101. beforeUpload={beforeUploadFile}
  2102. fileList={this.state.fileList}
  2103. onChange={info => {
  2104. if (info.file.status !== "uploading") {
  2105. }
  2106. if (info.file.status === "done") {
  2107. if (!info.file.response.error.length) {
  2108. let isPDF = this.state.fileList[0].originFileObj.name.split(
  2109. "."
  2110. );
  2111. let isIndex = isPDF.length - 1;
  2112. if (isPDF[isIndex] == "pdf") {
  2113. message.success(
  2114. `${info.file.name} 文件上传成功!`
  2115. );
  2116. } else {
  2117. message.error("请上传pdf文件!");
  2118. }
  2119. } else {
  2120. message.warning(
  2121. info.file.response.error[0].message
  2122. );
  2123. return;
  2124. }
  2125. this.setState({
  2126. pojectApplicationUrl:
  2127. info.file.response.data,
  2128. isXian: 1
  2129. });
  2130. } else if (info.file.status === "error") {
  2131. message.error(
  2132. `${info.file.name} 文件上传失败。`
  2133. );
  2134. }
  2135. this.setState({
  2136. fileList: info.fileList.slice(-1)
  2137. });
  2138. }}
  2139. >
  2140. {/*<a onClick={
  2141. () => {var newTab = window.open('about:blank'); getPreviews(this.state.uid, 'techProject', 'organization_application', function (data) { newTab.location.href = data; });
  2142. }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>*/}
  2143. <Button>
  2144. <Icon type="upload" /> 项目材料上传{" "}
  2145. </Button>
  2146. </Upload>
  2147. <span
  2148. style={{ marginTop: "10px", marginLeft: "20px" }}
  2149. >
  2150. {this.state.pojectApplicationUrl ? (
  2151. <span className="download-file">
  2152. <a onClick={this.visitOk1}>
  2153. <Icon
  2154. style={{ fontSize: "16px" }}
  2155. type="eye-o"
  2156. />{" "}
  2157. </a>
  2158. </span>
  2159. ) : (
  2160. <span>
  2161. <Icon
  2162. type="exclamation-circle"
  2163. style={{
  2164. color: "#ffbf00",
  2165. marginRight: "6px"
  2166. }}
  2167. />
  2168. 未上传!
  2169. </span>
  2170. )}
  2171. </span>
  2172. </FormItem>
  2173. </div>
  2174. </div>
  2175. <Button
  2176. className="setSubmit"
  2177. type="primary"
  2178. htmlType="submit"
  2179. >
  2180. 保存
  2181. </Button>
  2182. <Button type="ghost" onClick={this.visitCancel}>
  2183. 取消
  2184. </Button>
  2185. </div>
  2186. </Spin>
  2187. </Form>
  2188. </div>
  2189. </TabPane>
  2190. <TabPane tab="知识产权列表" key="1">
  2191. <Button
  2192. type="primary"
  2193. className="addButton"
  2194. onClick={this.addClick}
  2195. >
  2196. 发布知识产权
  2197. <Icon type="plus" />
  2198. </Button>
  2199. <Spin spinning={this.state.loading}>
  2200. <Table
  2201. size="middle"
  2202. columns={this.state.columnsDate}
  2203. dataSource={this.state.dataSourceDate}
  2204. rowSelection={rowSelection}
  2205. pagination={this.state.paginationDate}
  2206. onRowClick={this.tableRowClickDate}
  2207. />
  2208. </Spin>
  2209. </TabPane>
  2210. <TabPane tab="财务信息" key="2">
  2211. <Button
  2212. type="primary"
  2213. className="addButton"
  2214. onClick={this.addClickc}
  2215. >
  2216. 添加年度财务信息
  2217. <Icon type="plus" />
  2218. </Button>
  2219. <Spin spinning={this.state.loading}>
  2220. <Table
  2221. size="middle"
  2222. columns={this.state.columnsc}
  2223. dataSource={this.state.dataSourcec}
  2224. rowSelection={rowSelection}
  2225. onRowClick={this.tableRowClickDatec}
  2226. />
  2227. </Spin>
  2228. </TabPane>
  2229. <TabPane tab="项目信息" key="3">
  2230. <Button
  2231. type="primary"
  2232. className="addButton"
  2233. onClick={this.addClickx}
  2234. >
  2235. 添加项目信息
  2236. <Icon type="plus" />
  2237. </Button>
  2238. <Spin spinning={this.state.loading}>
  2239. <Table
  2240. size="middle"
  2241. columns={this.state.columnsx}
  2242. dataSource={this.state.dataSourcex}
  2243. rowSelection={rowSelection}
  2244. onRowClick={this.tableRowClickDatex}
  2245. />
  2246. </Spin>
  2247. </TabPane>
  2248. </Tabs>
  2249. </Modal>
  2250. <Modal
  2251. maskClosable={false}
  2252. className="customeDetails"
  2253. footer=""
  2254. title="项目申请书"
  2255. width="800px"
  2256. visible={this.state.visitModul1}
  2257. onOk={this.visitOk1}
  2258. onCancel={this.visitCancel1}
  2259. >
  2260. <div>
  2261. {/*<Button type="primary" onClick={this.pdfShows(pdfUrl)}>点击查看</Button>
  2262. <div id="pdfContent" style={{height:"500px",width:"500px",marginLeft:"300px"}} >
  2263. </div>
  2264. onDocumentLoad={this.onDocumentComplete}
  2265. onLoadSuccess={this.onDocumentComplete}
  2266. onDocumentComplete={this.onDocumentComplete}
  2267. onPageRender={this.onPageComplete}
  2268. // "http://s.jishutao.com/upload/achievement/achievement/34576808907162737_achievement_maturity_text_file.pdf"//{pdfUrl}
  2269. */}
  2270. <PDF
  2271. file={pdfUrl}
  2272. onDocumentLoad={this.onDocumentComplete}
  2273. pageIndex={parseInt(this.state.pagec)}
  2274. scale={1.2}
  2275. />
  2276. {paginationss}
  2277. </div>
  2278. </Modal>
  2279. <Modal
  2280. maskClosable={false}
  2281. className="customeDetails"
  2282. footer=""
  2283. title="财务资料"
  2284. width="500px"
  2285. visible={this.state.visitModulc}
  2286. onOk={this.visitOkc}
  2287. onCancel={this.visitCancelc}
  2288. >
  2289. {" "}
  2290. <Form layout="horizontal" onSubmit={this.newSubmitc} id="demand-form">
  2291. <Spin spinning={this.state.loading}>
  2292. <div className="clearfix">
  2293. <FormItem {...formItemLayoutc} label="年份">
  2294. <Select
  2295. placeholder="年份"
  2296. value={this.state.year}
  2297. style={{ width: "90%" }}
  2298. onChange={e => {
  2299. this.setState({ year: e });
  2300. }}
  2301. >
  2302. {year.map(function(item) {
  2303. return (
  2304. <Select.Option key={item.value}>
  2305. {item.key}
  2306. </Select.Option>
  2307. );
  2308. })}
  2309. </Select>
  2310. </FormItem>
  2311. </div>
  2312. <div className="clearfix">
  2313. <FormItem {...formItemLayoutc} label="营销收入">
  2314. <Input
  2315. placeholder="营销收入"
  2316. style={{ width: "90%" }}
  2317. value={this.state.salesAmount}
  2318. onChange={e => {
  2319. this.setState({ salesAmount: e.target.value });
  2320. }}
  2321. />
  2322. </FormItem>
  2323. </div>
  2324. <div className="clearfix">
  2325. <FormItem {...formItemLayoutc} label="总资产">
  2326. <Input
  2327. placeholder="总资产"
  2328. style={{ width: "90%" }}
  2329. value={this.state.assets}
  2330. onChange={e => {
  2331. this.setState({ assets: e.target.value });
  2332. }}
  2333. />
  2334. </FormItem>
  2335. </div>
  2336. <div className="clearfix">
  2337. <FormItem {...formItemLayoutc} label="固定资产">
  2338. <Input
  2339. placeholder="总资产"
  2340. style={{ width: "90%" }}
  2341. value={this.state.fixedAssets}
  2342. onChange={e => {
  2343. this.setState({ fixedAssets: e.target.value });
  2344. }}
  2345. />
  2346. </FormItem>
  2347. </div>
  2348. <div className="clearfix">
  2349. <FormItem {...formItemLayoutc} label="研发费用">
  2350. <Input
  2351. placeholder="研发费用"
  2352. style={{ width: "90%" }}
  2353. value={this.state.researchAmount}
  2354. onChange={e => {
  2355. this.setState({ researchAmount: e.target.value });
  2356. }}
  2357. />
  2358. </FormItem>
  2359. </div>
  2360. <Button
  2361. className="setSubmit"
  2362. type="primary"
  2363. htmlType="submit"
  2364. style={{ marginLeft: "100px" }}
  2365. >
  2366. 保存
  2367. </Button>
  2368. <Button type="ghost" onClick={this.visitCancelc}>
  2369. 取消
  2370. </Button>
  2371. </Spin>
  2372. </Form>
  2373. </Modal>
  2374. <Modal
  2375. maskClosable={false}
  2376. className="customeDetails"
  2377. footer=""
  2378. title="项目资料"
  2379. width="500px"
  2380. visible={this.state.visitModulx}
  2381. onOk={this.visitOkc}
  2382. onCancel={this.visitCancelc}
  2383. >
  2384. {" "}
  2385. <Form layout="horizontal" onSubmit={this.newSubmitx} id="demand-form">
  2386. <div className="clearfix">
  2387. <FormItem {...formItemLayoutc} label="年份">
  2388. <Select
  2389. placeholder="年份"
  2390. value={this.state.year}
  2391. style={{ width: "90%" }}
  2392. onChange={e => {
  2393. this.setState({ year: e });
  2394. }}
  2395. >
  2396. {year.map(function(item) {
  2397. return (
  2398. <Select.Option key={item.value}>
  2399. {item.key}
  2400. </Select.Option>
  2401. );
  2402. })}
  2403. </Select>
  2404. </FormItem>
  2405. </div>
  2406. <div className="clearfix">
  2407. <FormItem {...formItemLayoutc} label="项目名称">
  2408. <Input
  2409. placeholder="项目名称"
  2410. style={{ width: "90%" }}
  2411. value={this.state.projectName}
  2412. onChange={e => {
  2413. this.setState({ projectName: e.target.value });
  2414. }}
  2415. />
  2416. </FormItem>
  2417. </div>
  2418. <div className="clearfix">
  2419. <FormItem {...formItemLayoutc} label="项目状态">
  2420. <Select
  2421. placeholder="项目状态"
  2422. value={this.state.status}
  2423. style={{ width: "90%" }}
  2424. onChange={e => {
  2425. this.setState({ status: e });
  2426. }}
  2427. >
  2428. {xiangmoState.map(function(item) {
  2429. return (
  2430. <Select.Option key={item.value}>
  2431. {item.key}
  2432. </Select.Option>
  2433. );
  2434. })}
  2435. </Select>
  2436. </FormItem>
  2437. </div>
  2438. <div className="clearfix">
  2439. <FormItem {...formItemLayoutc} label="备注">
  2440. <Input
  2441. type="textarea"
  2442. rows={3}
  2443. placeholder="备注"
  2444. style={{ width: "90%" }}
  2445. value={this.state.remark}
  2446. onChange={e => {
  2447. this.setState({ remark: e.target.value });
  2448. }}
  2449. />
  2450. </FormItem>
  2451. </div>
  2452. <Button
  2453. className="setSubmit"
  2454. type="primary"
  2455. htmlType="submit"
  2456. loading={this.state.loading}
  2457. style={{ marginLeft: "100px" }}
  2458. >
  2459. 保存
  2460. </Button>
  2461. <Button type="ghost" onClick={this.visitCancelc}>
  2462. 取消
  2463. </Button>
  2464. </Form>
  2465. </Modal>
  2466. <TechAchievementDesc
  2467. data={this.state.RowData}
  2468. detailApiUrl={this.props["data-detailApiUrl"]}
  2469. achievementCategoryOption={this.state.achievementCategoryOption}
  2470. showDesc={this.state.showDesc}
  2471. uid={this.state.uid}
  2472. closeDesc={this.closeDesc}
  2473. loadDatas={this.loadDatas}
  2474. />
  2475. </div>
  2476. );
  2477. }
  2478. }));
  2479. export default IntentionCustomer;