crm.jsx 87 KB

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