crm.jsx 107 KB

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