crm.jsx 83 KB

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