crm.jsx 99 KB

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