crm.jsx 109 KB

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