crm.jsx 99 KB

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