crm.jsx 83 KB

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