tools.js 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099
  1. import { message, Select } from 'antd';
  2. import { Tag } from 'antd';
  3. import React from 'react';
  4. import $ from 'jquery/src/ajax';
  5. import {
  6. projectStatusList,
  7. patentTypeList,
  8. patentStateList,
  9. patentFieldList,
  10. technicalSourceList,
  11. catagoryList,
  12. intellectualGetList,
  13. conversionFormList,
  14. annualReportStateList,
  15. cognizanceStateList,
  16. technologyStateList,
  17. copyrightStateList,
  18. auditStatusList,
  19. scaleList,
  20. companyType,
  21. industryList,
  22. contractTypeList,
  23. contractStateList,
  24. demandTypeList,
  25. achievementCategoryList,
  26. techAuditStatusList,
  27. auditStatusLists,
  28. maturityList,
  29. transferModeList,
  30. innovationList,
  31. orderStatusList,
  32. activityForm,
  33. activityType,
  34. boutique,
  35. hot,
  36. statuslist,
  37. customerTyp,
  38. cityArr,
  39. customerStatus,
  40. intentionalService,
  41. newFollow,
  42. sex,
  43. tag,
  44. contactType,
  45. contact,
  46. Whether,
  47. Certification,
  48. currentMember,
  49. lvl,
  50. industry,
  51. socialAttribute,
  52. station,
  53. post,
  54. patternOrganization,
  55. conditionOrganization,
  56. categoryState,
  57. auditStatusL,
  58. gameState,
  59. messageType,
  60. designated,
  61. featured,
  62. actives,
  63. intentProgress,
  64. transactionProgress,
  65. contractProgress,
  66. projectProgress,
  67. orderType,
  68. orderStage,
  69. orderState,
  70. paymentState,
  71. orderChannel,
  72. approvedState,
  73. lock,
  74. paymentMethod,
  75. transactionChannel,
  76. projectState,
  77. transactionProject,
  78. client,
  79. stick,
  80. taskStatus,
  81. publishStatus,
  82. changeState,
  83. distributeState,
  84. customerSource,
  85. slcRedit,
  86. dataGrade,
  87. level,
  88. xiangmoState,
  89. newOrderStatus,
  90. refundStatus,
  91. approval,
  92. projectStatus,
  93. processStatus,
  94. liquidationStatus,
  95. newOrderType,
  96. jsyPaymentType,
  97. customerType,
  98. orderTypes,
  99. bonusState,
  100. jiedian,
  101. cuikuan,
  102. province,
  103. invoiceStatus,
  104. approvalA,
  105. processStatusNew,
  106. contractChangeStatus,
  107. typeList,
  108. channelAllocationStatus,
  109. transferType,
  110. messageReminderStart
  111. } from "./dataDic.js";
  112. import { provinceList } from './NewDicProvinceList.js';
  113. import ShowModal from './showModal.jsx';
  114. module.exports = {
  115. splitUrl: function (string, i, url) {
  116. let theList = [];
  117. let theArr = [];
  118. if (string && string.length) {
  119. theArr = string.split(i);
  120. theArr.map(function (item, i) {
  121. let name = item.substring(item.lastIndexOf("_") + 1);
  122. theList.push({
  123. uid: -i - 1,
  124. name: name,
  125. url: url + item,
  126. response: {
  127. data: item,
  128. },
  129. });
  130. });
  131. }
  132. return theList;
  133. },
  134. getBase64: function (img, callback) {
  135. const reader = new FileReader();
  136. reader.addEventListener("load", () => callback(reader.result));
  137. reader.readAsDataURL(img);
  138. },
  139. beforeUpload: function (file) {
  140. const isLt2M = file.size / 1024 / 1024 < 2;
  141. if (!isLt2M) {
  142. message.error("图片小大必须小于2MB!");
  143. }
  144. return isLt2M;
  145. },
  146. beforeUploadFile: function () {
  147. // debugger
  148. // const isJPG = file.type === 'image/jpeg/document';
  149. // if (!isJPG) {
  150. // message.error('You can only upload JPG file!');
  151. // }
  152. // const isLt2M = file.size / 1024 / 1024 < 2;
  153. // if (!isLt2M) {
  154. // message.error('Image must smaller than 2MB!');
  155. // }
  156. // return isJPG && isLt2M;
  157. },
  158. getTime: function (e, t) {
  159. if (e && !t) {
  160. var d = new Date(e);
  161. d =
  162. d.getFullYear() +
  163. "-" +
  164. (d.getMonth() + 1 < 10 ? "0" + (d.getMonth() + 1) : d.getMonth() + 1) +
  165. "-" +
  166. (d.getDate() < 10 ? "0" + d.getDate() : d.getDate()) +
  167. " ";
  168. // + (d.getHours() < 10 ? "0" + d.getHours() : d.getHours()) + ":" +
  169. // (d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes()) + ":" +
  170. // (d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds());
  171. return d;
  172. } else if (e && t) {
  173. var d1 = new Date(e);
  174. var d2 = new Date(e);
  175. d2 = d2.setMonth(d1.getMonth() + t);
  176. d2 = new Date(d2);
  177. d2 =
  178. d2.getFullYear() +
  179. "-" +
  180. (d2.getMonth() + 1 < 10
  181. ? "0" + (d2.getMonth() + 1)
  182. : d2.getMonth() + 1) +
  183. "-" +
  184. (d2.getDate() < 10 ? "0" + d2.getDate() : d2.getDate()) +
  185. " ";
  186. return d2;
  187. } else {
  188. return "";
  189. }
  190. },
  191. getPatentType: function (e) {
  192. if (e) {
  193. let theType = "";
  194. patentTypeList.map(function (item) {
  195. if (item.value == e) {
  196. theType = item.key;
  197. }
  198. });
  199. return theType;
  200. }
  201. },
  202. getPatentTypeva: function (e) {
  203. if (e) {
  204. let theType = "";
  205. patentTypeList.map(function (item) {
  206. if (item.key == e) {
  207. theType = item.value;
  208. }
  209. });
  210. return theType;
  211. }
  212. },
  213. getPatentState: function (e) {
  214. if (e) {
  215. let theState = "";
  216. patentStateList.map(function (item) {
  217. if (item.value == e) {
  218. theState = item.key;
  219. }
  220. });
  221. return theState;
  222. }
  223. },
  224. getPatentField: function (e) {
  225. if (e) {
  226. let theState = "";
  227. patentFieldList.map(function (item) {
  228. if (item.value == e) {
  229. theState = item.key;
  230. }
  231. });
  232. return theState;
  233. }
  234. },
  235. getTechnicalSource: function (e) {
  236. if (e) {
  237. let theSource = "";
  238. technicalSourceList.map(function (item) {
  239. if (item.value == e) {
  240. theSource = item.key;
  241. }
  242. });
  243. return theSource;
  244. }
  245. },
  246. getCatagory: function (e) {
  247. if (e) {
  248. let theType = "";
  249. catagoryList.map(function (item) {
  250. if (item.value == e) {
  251. theType = item.key;
  252. }
  253. });
  254. return theType;
  255. }
  256. },
  257. getIntellectualObtainWay: function (e) {
  258. if (e) {
  259. let theType = "";
  260. intellectualGetList.map(function (item) {
  261. if (item.value == e) {
  262. theType = item.key;
  263. }
  264. });
  265. return theType;
  266. }
  267. },
  268. getConversionForm: function (e) {
  269. if (e) {
  270. let theType = "";
  271. conversionFormList.map(function (item) {
  272. if (item.value == e) {
  273. theType = item.key;
  274. }
  275. });
  276. return theType;
  277. }
  278. },
  279. getAnnualReportState: function (e) {
  280. if (e) {
  281. let theType = "";
  282. annualReportStateList.map(function (item) {
  283. if (item.value == e) {
  284. theType = item.key;
  285. }
  286. });
  287. return theType;
  288. }
  289. },
  290. getCognizanceState: function (e) {
  291. if (e) {
  292. let theType = "";
  293. cognizanceStateList.map(function (item) {
  294. if (item.value == e) {
  295. theType = item.key;
  296. }
  297. });
  298. return theType;
  299. }
  300. },
  301. getTechnologyState: function (e) {
  302. if (e) {
  303. let theType = "";
  304. technologyStateList.map(function (item) {
  305. if (item.value == e) {
  306. theType = item.key;
  307. }
  308. });
  309. return theType;
  310. }
  311. },
  312. //显示用户认证状态
  313. getAuditState: function (e) {
  314. if (e) {
  315. let theType = "";
  316. auditStatusList.map(function (item) {
  317. if (item.value == e) {
  318. theType = item.key;
  319. }
  320. });
  321. return theType;
  322. }
  323. },
  324. getCopyrightState: function (e) {
  325. if (e) {
  326. let theType = "";
  327. copyrightStateList.map(function (item) {
  328. if (item.value == e) {
  329. theType = item.key;
  330. }
  331. });
  332. return theType;
  333. }
  334. },
  335. downloadFile: function (path, fileName) {
  336. window.open(
  337. globalConfig.context +
  338. "/open/downloadFile?path=" +
  339. path +
  340. "&fileName=" +
  341. fileName
  342. );
  343. },
  344. techDownloadFile: function (url, id) {
  345. window.open(globalConfig.context + url + "?id=" + id);
  346. },
  347. copyrightDownloadFile: function (id, sign, url) {
  348. window.open(globalConfig.context + url + "?id=" + id + "&sign=" + sign);
  349. },
  350. newDownloadFile: function (id, sign, url, type) {
  351. if (!type) {
  352. window.open(globalConfig.context + url + "?id=" + id + "&sign=" + sign);
  353. }
  354. if (type) {
  355. window.open(
  356. globalConfig.context +
  357. url +
  358. "?id=" +
  359. id +
  360. "&sign=" +
  361. sign +
  362. "&type=" +
  363. type
  364. );
  365. }
  366. },
  367. companySearch(input, option) {
  368. return option.props.children.indexOf(input) >= 0;
  369. },
  370. getVacations(ccccc) {
  371. let now = new Date();
  372. let theYear = now.getFullYear();
  373. $.ajax({
  374. type: "get",
  375. dataType: "json",
  376. crossDomain: false,
  377. url: globalConfig.context + "/open/html/json/vacations" + theYear,
  378. success: (data) => {
  379. if (data) {
  380. ccccc(data);
  381. }
  382. },
  383. });
  384. },
  385. getInUrgentTime(date, inUrgent, vocations) {
  386. if (vocations && vocations.length) {
  387. let now = new Date(date);
  388. for (var i = 1; i <= inUrgent; ) {
  389. now.setDate(now.getDate() + 1);
  390. let thebool = true;
  391. vocations.map((item) => {
  392. if (item == getKey(now)) {
  393. thebool = false;
  394. }
  395. });
  396. if (thebool) {
  397. i++;
  398. }
  399. }
  400. return now;
  401. }
  402. function getKey(date) {
  403. var year = date.getFullYear(),
  404. month = date.getMonth() + 1,
  405. day = date.getDate();
  406. year = "" + year;
  407. month = (month > 9 ? "" : "0") + month;
  408. day = (day > 9 ? "" : "0") + day;
  409. return year + month + day;
  410. }
  411. },
  412. //各种通过接口获取下拉列表
  413. setPatentStateOption(permission) {
  414. let theArr = [];
  415. patentStateList.map(function (item) {
  416. for (let i = 0; i < permission.length; i++) {
  417. if (item.value == permission[i]) {
  418. theArr.push(item);
  419. }
  420. }
  421. });
  422. return theArr;
  423. },
  424. setUserContactsList() {
  425. let theOption = [];
  426. $.ajax({
  427. method: "get",
  428. dataType: "json",
  429. crossDomain: false,
  430. url: globalConfig.context + "/api/user/getContacts",
  431. success: function (data) {
  432. if (!data.data) {
  433. if (data.error && data.error.length) {
  434. message.warning(data.error[0].message);
  435. }
  436. return;
  437. }
  438. for (let item in data.data) {
  439. let theData = data.data[item];
  440. theOption.push(
  441. <Select.Option value={item} key={theData}>
  442. {theData}
  443. </Select.Option>
  444. );
  445. }
  446. },
  447. });
  448. return theOption;
  449. },
  450. setAdminContactsList(uid) {
  451. let theOption = [];
  452. $.ajax({
  453. method: "get",
  454. dataType: "json",
  455. crossDomain: false,
  456. url: globalConfig.context + "/api/admin/getContacts",
  457. data: { uid: uid },
  458. success: function (data) {
  459. if (!data.data) {
  460. if (data.error && data.error.length) {
  461. message.warning(data.error[0].message);
  462. }
  463. return;
  464. }
  465. for (let item in data.data) {
  466. let theData = data.data[item];
  467. theOption.push(
  468. <Select.Option value={item} key={theData}>
  469. {theData}
  470. </Select.Option>
  471. );
  472. }
  473. },
  474. });
  475. return theOption;
  476. },
  477. //高企培育资料完成情况(比重)
  478. getProportion(uid, callback) {
  479. $.ajax({
  480. method: "get",
  481. dataType: "json",
  482. crossDomain: false,
  483. url: globalConfig.context + "/api/admin/proportion",
  484. data: { uid: uid },
  485. success: function (data) {
  486. if (!data.data) {
  487. if (data.error && data.error.length) {
  488. message.warning(data.error[0].message);
  489. }
  490. data.data = {};
  491. callback(data.data);
  492. }
  493. callback(data.data);
  494. },
  495. });
  496. },
  497. //保存高企培育资料完成情况
  498. saveProportion(id, uid, sign, status) {
  499. $.ajax({
  500. method: "post",
  501. dataType: "json",
  502. crossDomain: false,
  503. url: globalConfig.context + "/api/admin/confirmProportion",
  504. data: {
  505. id: id,
  506. uid: uid,
  507. sign: sign,
  508. status: status,
  509. },
  510. success: function (data) {
  511. if (!data.data) {
  512. if (data.error && data.error.length) {
  513. message.warning(data.error[0].message);
  514. }
  515. return;
  516. }
  517. },
  518. });
  519. },
  520. //获取window.location.search传的值
  521. getSearchUrl(e) {
  522. let searchURL = e;
  523. let theObj = {};
  524. searchURL = searchURL.substring(1, searchURL.length);
  525. theObj[searchURL.split("&")[0].split("=")[0]] = searchURL
  526. .split("&")[0]
  527. .split("=")[1];
  528. if (searchURL.split("&")[1]) {
  529. theObj[searchURL.split("&")[1].split("=")[0]] = searchURL
  530. .split("&")[1]
  531. .split("=")[1];
  532. if (searchURL.split("&")[2]) {
  533. theObj[searchURL.split("&")[2].split("=")[0]] = searchURL
  534. .split("&")[2]
  535. .split("=")[1];
  536. }
  537. }
  538. return theObj;
  539. },
  540. //预览接口
  541. getPreview(id, url, sign, callback) {
  542. $.ajax({
  543. method: "get",
  544. dataType: "json",
  545. crossDomain: false,
  546. url: globalConfig.context + "/api/admin/preview/" + url,
  547. data: {
  548. id: id,
  549. sign: sign,
  550. },
  551. success: function (data) {
  552. if (!data.data) {
  553. if (data.error && data.error.length) {
  554. message.warning(data.error[0].message);
  555. }
  556. }
  557. callback(
  558. "https://view.officeapps.live.com/op/view.aspx?src=" +
  559. encodeURIComponent(
  560. location.origin +
  561. globalConfig.context +
  562. "/open/preview?" +
  563. data.data
  564. )
  565. );
  566. console.log(
  567. "https://view.officeapps.live.com/op/view.aspx?src=" +
  568. (location.origin +
  569. globalConfig.context +
  570. "/open/preview?" +
  571. data.data)
  572. );
  573. console.log(
  574. "https://view.officeapps.live.com/op/view.aspx?src=" +
  575. encodeURIComponent(
  576. location.origin +
  577. globalConfig.context +
  578. "/open/preview?" +
  579. data.data
  580. )
  581. );
  582. },
  583. });
  584. },
  585. //预览接口
  586. getPreviews(id, url, sign, callback) {
  587. $.ajax({
  588. method: "get",
  589. dataType: "json",
  590. crossDomain: false,
  591. url: globalConfig.context + "/api/admin/customer/" + url,
  592. data: {
  593. id: id,
  594. sign: sign,
  595. },
  596. success: function (data) {
  597. if (!data.data) {
  598. if (data.error && data.error.length) {
  599. message.warning(data.error[0].message);
  600. }
  601. }
  602. callback(
  603. "https://view.officeapps.live.com/op/view.aspx?src=" +
  604. encodeURIComponent(
  605. location.origin +
  606. globalConfig.context +
  607. "/open/preview?" +
  608. data.data
  609. )
  610. );
  611. console.log(
  612. "https://view.officeapps.live.com/op/view.aspx?src=" +
  613. (location.origin +
  614. globalConfig.context +
  615. "/open/preview?" +
  616. data.data)
  617. );
  618. console.log(
  619. "https://view.officeapps.live.com/op/view.aspx?src=" +
  620. encodeURIComponent(
  621. location.origin +
  622. globalConfig.context +
  623. "/open/preview?" +
  624. data.data
  625. )
  626. );
  627. },
  628. });
  629. },
  630. //获取企业规模
  631. getScaleState(e) {
  632. if (e) {
  633. let theType = "";
  634. scaleList.map(function (item) {
  635. if (item.value == e) {
  636. theType = item.key;
  637. }
  638. });
  639. return theType;
  640. }
  641. },
  642. //获取企业类型
  643. getCompanyType(type1, type2) {
  644. let companyTypeList = [];
  645. for (let i = 0; i < companyType.length; i++) {
  646. companyTypeList.push({
  647. value: companyType[i].value,
  648. label: companyType[i].label,
  649. });
  650. if (companyType[i].children) {
  651. for (let j = 0; j < companyType[i].children.length; j++) {
  652. companyTypeList.push({
  653. value: companyType[i].children[j].value,
  654. label: companyType[i].children[j].label,
  655. });
  656. }
  657. }
  658. }
  659. companyTypeList.sort(function (a, b) {
  660. return a.value - b.value;
  661. });
  662. let typeKey = "";
  663. companyTypeList.map(function (item) {
  664. if (type1 == item.value) {
  665. typeKey = item.label;
  666. }
  667. if (type2 == item.value) {
  668. typeKey = typeKey + "/" + item.label;
  669. }
  670. });
  671. return typeKey;
  672. },
  673. //获取企业行业
  674. getIndustryType(e) {
  675. if (e) {
  676. let theType = "";
  677. industryList.map(function (item) {
  678. if (item.value == e) {
  679. theType = item.key;
  680. }
  681. });
  682. return theType;
  683. }
  684. },
  685. //获取合同状态
  686. getContractType: function (e) {
  687. if (e) {
  688. let theType = "";
  689. contractTypeList.map(function (item) {
  690. if (item.value == e) {
  691. theType = item.key;
  692. }
  693. });
  694. return theType;
  695. }
  696. },
  697. //获取合同类型
  698. getContractState: function (e) {
  699. if (e) {
  700. let theType = "";
  701. contractStateList.map(function (item) {
  702. if (item.value == e) {
  703. theType = item.key;
  704. }
  705. });
  706. return theType;
  707. }
  708. },
  709. //获取需求类型
  710. getDemandType: function (e) {
  711. if (e) {
  712. let theType = "";
  713. demandTypeList.map(function (item) {
  714. if (item.value == e) {
  715. theType = item.key;
  716. }
  717. });
  718. return theType;
  719. }
  720. },
  721. //获取成果类型
  722. getAchievementCategory: function (e) {
  723. if (e) {
  724. let theType = "";
  725. achievementCategoryList.map(function (item) {
  726. if (item.value == e) {
  727. theType = item.key;
  728. }
  729. });
  730. return theType;
  731. }
  732. },
  733. //获取需求和成果审核状态
  734. getTechAuditStatus: function (e) {
  735. if (e) {
  736. let theType = "";
  737. techAuditStatusList.map(function (item) {
  738. if (item.value == e) {
  739. theType = item.key;
  740. }
  741. });
  742. return theType;
  743. }
  744. },
  745. //获取政策审核状态
  746. getauditStatus: function (e) {
  747. if (e || e >= 0) {
  748. let tt = e.toString();
  749. let theType = "";
  750. auditStatusLists.map(function (item) {
  751. if (item.value == tt) {
  752. theType = item.key;
  753. }
  754. });
  755. return theType;
  756. }
  757. },
  758. //获取需求和成果审核状态
  759. getMaturity: function (e) {
  760. if (e) {
  761. let theType = "";
  762. maturityList.map(function (item) {
  763. if (item.value == e) {
  764. theType = item.key;
  765. }
  766. });
  767. return theType;
  768. }
  769. },
  770. //获取需求和成果审核状态
  771. getTransferMode: function (e) {
  772. if (e) {
  773. let theType = "";
  774. transferModeList.map(function (item) {
  775. if (item.value == e) {
  776. theType = item.key;
  777. }
  778. });
  779. return theType;
  780. }
  781. },
  782. //获取创新度状态
  783. getInnovation: function (e) {
  784. if (e) {
  785. let theType = "";
  786. innovationList.map(function (item) {
  787. if (item.value == e) {
  788. theType = item.key;
  789. }
  790. });
  791. return theType;
  792. }
  793. },
  794. //获取创新度状态
  795. getOrderStatus: function (e) {
  796. if (e) {
  797. let theType = "";
  798. orderStatusList.map(function (item) {
  799. if (item.value == e) {
  800. theType = item.key;
  801. }
  802. });
  803. return theType;
  804. }
  805. },
  806. //科技管理
  807. //活动圈后台管理
  808. getActivityType: function (e) {
  809. if (e) {
  810. let theType = "";
  811. activityType.map(function (item) {
  812. if (item.value == e) {
  813. theType = item.key;
  814. }
  815. });
  816. return theType;
  817. }
  818. },
  819. getActivityForm: function (e) {
  820. if (e) {
  821. let theType = "";
  822. activityForm.map(function (item) {
  823. if (item.value == e) {
  824. theType = item.key;
  825. }
  826. });
  827. return theType;
  828. }
  829. },
  830. //是否展示在首页
  831. gethot: function (e) {
  832. if (e) {
  833. let theType = "";
  834. hot.map(function (item) {
  835. if (item.value == e) {
  836. theType = item.key;
  837. }
  838. });
  839. return theType;
  840. }
  841. },
  842. //是否精品
  843. getboutique: function (e) {
  844. if (e) {
  845. let theType = "";
  846. boutique.map(function (item) {
  847. if (item.value == e) {
  848. theType = item.key;
  849. }
  850. });
  851. return theType;
  852. }
  853. },
  854. //客户类型
  855. getcustomerTyp: function (e) {
  856. if (e) {
  857. let theType = "";
  858. customerTyp.map(function (item) {
  859. if (item.value == e) {
  860. theType = item.key;
  861. }
  862. });
  863. return theType;
  864. }
  865. },
  866. //省份
  867. getcityArr: function (e) {
  868. if (e) {
  869. let theType = "";
  870. cityArr.map(function (item) {
  871. if (item.value == e) {
  872. theType = item.key;
  873. }
  874. });
  875. return theType;
  876. }
  877. },
  878. //与后端一致省份
  879. getNewDiccityArr: function (e) {
  880. if (e) {
  881. let theType = "";
  882. provinceList.map(function (item) {
  883. if (item.id === e) {
  884. theType = item.name;
  885. }
  886. });
  887. return theType;
  888. }
  889. },
  890. //客户状态
  891. getcustomerStatue: function (e) {
  892. if (e || e == 0) {
  893. let theType = "";
  894. customerStatus.map(function (item) {
  895. if (item.value == e) {
  896. theType = item.key;
  897. }
  898. });
  899. return theType;
  900. }
  901. },
  902. //账户状态
  903. getStatuslist: function (e) {
  904. if (e) {
  905. let theType = "";
  906. statuslist.map(function (item) {
  907. if (item.value == e) {
  908. theType = item.key;
  909. }
  910. });
  911. return theType;
  912. }
  913. },
  914. //意向服务
  915. getCompanyIntention: function (e) {
  916. if (e) {
  917. let theType = "";
  918. intentionalService.map(function (item) {
  919. if (item.value == e) {
  920. theType = item.key;
  921. }
  922. });
  923. return theType;
  924. }
  925. },
  926. //客户标签
  927. getTag: function (e) {
  928. if (e) {
  929. let theType = "";
  930. tag.map(function (item) {
  931. if (item.value == e) {
  932. theType = item.key;
  933. }
  934. });
  935. return theType;
  936. }
  937. },
  938. //最新跟进
  939. getfllowSituation: function (e) {
  940. if (e || e == 0) {
  941. let theType = "";
  942. newFollow.map(function (item) {
  943. if (item.value == e) {
  944. theType = item.key;
  945. }
  946. });
  947. return theType;
  948. }
  949. },
  950. //性别
  951. getsex: function (e) {
  952. if (e) {
  953. let theType = "";
  954. sex.map(function (item) {
  955. if (item.value == e) {
  956. theType = item.key;
  957. }
  958. });
  959. return theType;
  960. }
  961. },
  962. //联系方式
  963. getcontact: function (e) {
  964. if (e) {
  965. let theType = "";
  966. contact.map(function (item) {
  967. if (item.value == e) {
  968. theType = item.key;
  969. }
  970. });
  971. return theType;
  972. }
  973. },
  974. //是否文字与数字转换
  975. getWhether: function (e) {
  976. if (e) {
  977. let theType = "";
  978. Whether.map(function (item) {
  979. if (item.value == e) {
  980. theType = item.key;
  981. }
  982. });
  983. return theType;
  984. }
  985. },
  986. //是否实名认证
  987. getCertification: function (e) {
  988. if (e) {
  989. let theType = "";
  990. Certification.map(function (item) {
  991. if (item.value == e) {
  992. theType = item.key;
  993. }
  994. });
  995. return theType;
  996. }
  997. },
  998. //会员状态
  999. getCurrentMember: function (e) {
  1000. if (e) {
  1001. let theType = "";
  1002. currentMember.map(function (item) {
  1003. if (item.value == e) {
  1004. theType = item.key;
  1005. }
  1006. });
  1007. return theType;
  1008. }
  1009. },
  1010. //会员等级
  1011. getLvl: function (e) {
  1012. if (e) {
  1013. let theType = "";
  1014. lvl.map(function (item) {
  1015. if (item.value == e) {
  1016. theType = item.key;
  1017. }
  1018. });
  1019. return theType;
  1020. }
  1021. },
  1022. //省份转换
  1023. getprovince: function (e) {
  1024. let nub = parseInt(e);
  1025. let theType = "";
  1026. if (nub <= 34) {
  1027. provinceList.map(function (item) {
  1028. if (item.id == nub) {
  1029. theType = item.name;
  1030. }
  1031. });
  1032. }
  1033. if (nub > 34 && nub < 380) {
  1034. provinceList.map(function (item) {
  1035. item.cityList.map(function (city) {
  1036. if (city.id == nub) {
  1037. theType = city.name;
  1038. }
  1039. });
  1040. });
  1041. }
  1042. if (nub >= 380) {
  1043. provinceList.map(function (item) {
  1044. item.cityList.map(function (city) {
  1045. city.areaList.map(function (areas) {
  1046. if (areas.id == nub) {
  1047. theType = areas.name;
  1048. }
  1049. });
  1050. });
  1051. });
  1052. }
  1053. return theType;
  1054. },
  1055. //我的业务跟进状态
  1056. getStatusFollow: function (e) {
  1057. let theType = "";
  1058. if (e) {
  1059. theType = "跟进中";
  1060. } else {
  1061. theType = "停止跟进";
  1062. }
  1063. return theType;
  1064. },
  1065. //我的业务跟进状态
  1066. getContactType: function (e) {
  1067. if (e) {
  1068. let theType = "";
  1069. contactType.map(function (item) {
  1070. if (item.value == e) {
  1071. theType = item.key;
  1072. }
  1073. });
  1074. return theType;
  1075. }
  1076. },
  1077. //社会属性
  1078. getSocialAttribute: function (e) {
  1079. if (!isNaN(parseInt(e))) {
  1080. let theType = "";
  1081. socialAttribute.map(function (item) {
  1082. if (item.value == e) {
  1083. theType = item.key;
  1084. }
  1085. });
  1086. return theType;
  1087. }else{
  1088. return '未知';
  1089. }
  1090. },
  1091. //获取渠道分配状态名
  1092. getChannelAllocationStatus: function (e,isTag) {
  1093. if (!isNaN(parseInt(e))) {
  1094. let theType = "";
  1095. let color = "";
  1096. channelAllocationStatus.map(function (item) {
  1097. if (item.value == e) {
  1098. theType = item.key;
  1099. color = item.color;
  1100. }
  1101. });
  1102. if(isTag){
  1103. return <Tag color={color}>{theType}</Tag>
  1104. }else{
  1105. return theType;
  1106. }
  1107. }else{
  1108. if(isTag){
  1109. return <Tag color='#000'>未知</Tag>
  1110. }else{
  1111. return '未知';
  1112. }
  1113. }
  1114. },
  1115. //获取消息提醒状态
  1116. getMessageReminderStart: function (e,isTag) {
  1117. if (!isNaN(parseInt(e))) {
  1118. let theType = "";
  1119. let color = "";
  1120. messageReminderStart.map(function (item) {
  1121. if (item.value == e) {
  1122. theType = item.key;
  1123. color = item.color;
  1124. }
  1125. });
  1126. if(isTag){
  1127. return <Tag color={color}>{theType}</Tag>
  1128. }else{
  1129. return theType;
  1130. }
  1131. }else{
  1132. if(isTag){
  1133. return <Tag color='#000'>未知</Tag>
  1134. }else{
  1135. return '未知';
  1136. }
  1137. }
  1138. },
  1139. //获取分配状态名称
  1140. getTransferType:function (id){
  1141. if (!isNaN(parseInt(id))) {
  1142. let typeName = '';
  1143. transferType.map(function (item) {
  1144. if (item.value == id) {
  1145. typeName = item.label
  1146. }
  1147. });
  1148. return typeName;
  1149. }
  1150. },
  1151. //行业
  1152. getIndustry: function (e) {
  1153. if (e) {
  1154. let theType = "";
  1155. industry.map(function (item) {
  1156. if (item.value == e) {
  1157. theType = item.key;
  1158. }
  1159. });
  1160. return theType;
  1161. }
  1162. },
  1163. //岗位
  1164. getStation: function (e) {
  1165. if (e) {
  1166. let theType = "";
  1167. station.map(function (item) {
  1168. if (item.value == e) {
  1169. theType = item.key;
  1170. }
  1171. });
  1172. return theType;
  1173. }
  1174. },
  1175. //职务
  1176. getPost: function (e) {
  1177. if (e) {
  1178. let theType = "";
  1179. post.map(function (item) {
  1180. if (item.value == e) {
  1181. theType = item.key;
  1182. }
  1183. });
  1184. return theType;
  1185. }
  1186. },
  1187. //组织类型
  1188. getPattern: function (e) {
  1189. if (e) {
  1190. let theType = "";
  1191. patternOrganization.map(function (item) {
  1192. if (item.value == e) {
  1193. theType = item.key;
  1194. }
  1195. });
  1196. return theType;
  1197. }
  1198. },
  1199. //组织状态
  1200. getCondition: function (e) {
  1201. if (e) {
  1202. let theType = "";
  1203. conditionOrganization.map(function (item) {
  1204. if (item.value == e) {
  1205. theType = item.key;
  1206. }
  1207. });
  1208. return theType;
  1209. }
  1210. },
  1211. //品类状态
  1212. getCategoryState: function (e) {
  1213. if (e) {
  1214. let theType = "";
  1215. categoryState.map(function (item) {
  1216. if (item.value == e) {
  1217. theType = item.key;
  1218. }
  1219. });
  1220. return theType;
  1221. }
  1222. },
  1223. //实名认证
  1224. getAuditStatus: function (index) {
  1225. let e = index ? index.toString() : "";
  1226. if (e) {
  1227. let theType = "";
  1228. auditStatusL.map(function (item) {
  1229. if (item.value == e) {
  1230. theType = item.key;
  1231. }
  1232. });
  1233. return theType;
  1234. }
  1235. },
  1236. //品类状态
  1237. getGameState: function (index) {
  1238. let e = index ? index.toString() : "";
  1239. if (e) {
  1240. let theType = "";
  1241. gameState.map(function (item) {
  1242. if (item.value == e) {
  1243. theType = item.key;
  1244. }
  1245. });
  1246. return theType;
  1247. }
  1248. },
  1249. //消息类型
  1250. getMessageType: function (index) {
  1251. let e = index ? index.toString() : "";
  1252. if (e) {
  1253. let theType = "";
  1254. messageType.map(function (item) {
  1255. if (item.value == e) {
  1256. theType = item.key;
  1257. }
  1258. });
  1259. return theType;
  1260. }
  1261. },
  1262. //发送目标
  1263. getDesignated: function (index) {
  1264. let e = index ? index.toString() : "";
  1265. if (e) {
  1266. let theType = "";
  1267. designated.map(function (item) {
  1268. if (item.value == e) {
  1269. theType = item.key;
  1270. }
  1271. });
  1272. return theType;
  1273. }
  1274. },
  1275. //客户端
  1276. getClient: function (index) {
  1277. let e = index ? index.toString() : "";
  1278. if (e) {
  1279. let theType = "";
  1280. client.map(function (item) {
  1281. if (item.value == e) {
  1282. theType = item.key;
  1283. }
  1284. });
  1285. return theType;
  1286. }
  1287. },
  1288. //是否置顶
  1289. getStick: function (index) {
  1290. let e = index ? index.toString() : "";
  1291. if (e) {
  1292. let theType = "";
  1293. stick.map(function (item) {
  1294. if (item.value == e) {
  1295. theType = item.key;
  1296. }
  1297. });
  1298. return theType;
  1299. }
  1300. },
  1301. getFeatured: function (index) {
  1302. let e = index ? index.toString() : "";
  1303. if (e) {
  1304. let theType = "";
  1305. featured.map(function (item) {
  1306. if (item.value == e) {
  1307. theType = item.key;
  1308. }
  1309. });
  1310. return theType;
  1311. }
  1312. },
  1313. getActives: function (e) {
  1314. if (e) {
  1315. let theType = "";
  1316. actives.map(function (item) {
  1317. if (item.value == e) {
  1318. theType = item.key;
  1319. }
  1320. });
  1321. return theType;
  1322. }
  1323. },
  1324. //意向进度
  1325. getIntentProgress: function (e) {
  1326. if (e) {
  1327. let theType = "";
  1328. intentProgress.map(function (item) {
  1329. if (item.value == e) {
  1330. theType = item.key;
  1331. }
  1332. });
  1333. return theType;
  1334. }
  1335. },
  1336. //交易进度
  1337. getTransactionProgress: function (e) {
  1338. if (e) {
  1339. let theType = "";
  1340. transactionProgress.map(function (item) {
  1341. if (item.value == e) {
  1342. theType = item.key;
  1343. }
  1344. });
  1345. return theType;
  1346. }
  1347. },
  1348. //合同进度
  1349. getContractProgress: function (e) {
  1350. if (e) {
  1351. let theType = "";
  1352. contractProgress.map(function (item) {
  1353. if (item.value == e) {
  1354. theType = item.key;
  1355. }
  1356. });
  1357. return theType;
  1358. }
  1359. },
  1360. //项目进度
  1361. getProjectProgress: function (e) {
  1362. if (e) {
  1363. let theType = "";
  1364. projectProgress.map(function (item) {
  1365. if (item.value == e) {
  1366. theType = item.key;
  1367. }
  1368. });
  1369. return theType;
  1370. }
  1371. },
  1372. //订单类型
  1373. getOrderType: function (e) {
  1374. if (e || e == 0) {
  1375. let str = e.toString();
  1376. let theType = "";
  1377. orderType.map(function (item) {
  1378. if (item.value == str) {
  1379. theType = item.key;
  1380. }
  1381. });
  1382. return theType;
  1383. }
  1384. },
  1385. //订单阶段
  1386. getOrderStage: function (e) {
  1387. if (e || e == 0) {
  1388. let str = e.toString();
  1389. let theType = "";
  1390. orderStage.map(function (item) {
  1391. if (item.value == str) {
  1392. theType = item.key;
  1393. }
  1394. });
  1395. return theType;
  1396. }
  1397. },
  1398. //订单状态o
  1399. getOrderState: function (e) {
  1400. if (e || e == 0) {
  1401. let str = e.toString();
  1402. let theType = "";
  1403. orderState.map(function (item) {
  1404. if (item.value == str) {
  1405. theType = item.key;
  1406. }
  1407. });
  1408. return theType;
  1409. }
  1410. },
  1411. //付款状态
  1412. getPaymentState: function (e) {
  1413. if (e || e == 0) {
  1414. let str = e.toString();
  1415. let theType = "";
  1416. paymentState.map(function (item) {
  1417. if (item.value == str) {
  1418. theType = item.key;
  1419. }
  1420. });
  1421. return theType;
  1422. }
  1423. },
  1424. //订单渠道
  1425. getOrderChannel: function (e) {
  1426. if (e || e == 0) {
  1427. let str = e.toString();
  1428. let theType = "";
  1429. orderChannel.map(function (item) {
  1430. if (item.value == str) {
  1431. theType = item.key;
  1432. }
  1433. });
  1434. return theType;
  1435. }
  1436. },
  1437. //特批状态
  1438. getApprovedState: function (e) {
  1439. if (e || e == 0) {
  1440. let str = e.toString();
  1441. let theType = "";
  1442. approvedState.map(function (item) {
  1443. if (item.value == str) {
  1444. theType = item.key;
  1445. }
  1446. });
  1447. return theType;
  1448. }
  1449. },
  1450. //锁定或废除
  1451. getLock: function (e) {
  1452. if (e || e == 0) {
  1453. let str = e.toString();
  1454. let theType = "";
  1455. lock.map(function (item) {
  1456. if (item.value == str) {
  1457. theType = item.key;
  1458. }
  1459. });
  1460. return theType;
  1461. }
  1462. },
  1463. //支付方式
  1464. getPaymentMethod: function (e) {
  1465. if (e || e == 0) {
  1466. let str = e.toString();
  1467. let theType = "";
  1468. paymentMethod.map(function (item) {
  1469. if (item.value == str) {
  1470. theType = item.key;
  1471. }
  1472. });
  1473. return theType;
  1474. }
  1475. },
  1476. //交易渠道
  1477. getTransactionChannel: function (e) {
  1478. if (e || e == 0) {
  1479. let str = e.toString();
  1480. let theType = "";
  1481. transactionChannel.map(function (item) {
  1482. if (item.value == str) {
  1483. theType = item.key;
  1484. }
  1485. });
  1486. return theType;
  1487. }
  1488. },
  1489. //交易科目
  1490. getTransactionProject: function (e) {
  1491. if (e || e == 0) {
  1492. let str = e.toString();
  1493. let theType = "";
  1494. transactionProject.map(function (item) {
  1495. if (item.value == str) {
  1496. theType = item.key;
  1497. }
  1498. });
  1499. return theType;
  1500. }
  1501. },
  1502. //项目状态
  1503. getProjectState: function (e) {
  1504. if (e || e == 0) {
  1505. let str = e.toString();
  1506. let theType = "";
  1507. projectState.map(function (item) {
  1508. if (item.value == str) {
  1509. theType = item.key;
  1510. }
  1511. });
  1512. return theType;
  1513. }
  1514. },
  1515. //任务状态
  1516. getTaskStatus: function (e) {
  1517. if (e || e == 0) {
  1518. let str = e.toString();
  1519. let theType = "";
  1520. taskStatus.map(function (item) {
  1521. if (item.value == str) {
  1522. theType = item.key;
  1523. }
  1524. });
  1525. return theType;
  1526. }
  1527. },
  1528. //公示状态
  1529. getPublishStatus: function (e) {
  1530. if (e || e == 0) {
  1531. let str = e.toString();
  1532. let theType = "";
  1533. publishStatus.map(function (item) {
  1534. if (item.value == str) {
  1535. theType = item.key;
  1536. }
  1537. });
  1538. return theType;
  1539. }
  1540. },
  1541. //变更状态
  1542. getChangeState: function (e) {
  1543. if (e || e == 0) {
  1544. let str = e.toString();
  1545. let theType = "";
  1546. changeState.map(function (item) {
  1547. if (item.value == str) {
  1548. theType = item.key;
  1549. }
  1550. });
  1551. return theType;
  1552. }
  1553. },
  1554. //分派情况
  1555. getDistributeState: function (e) {
  1556. if (e || e == 0) {
  1557. let str = e.toString();
  1558. let theType = "";
  1559. distributeState.map(function (item) {
  1560. if (item.value == str) {
  1561. theType = item.key;
  1562. }
  1563. });
  1564. return theType;
  1565. }
  1566. },
  1567. //客户来源
  1568. getCustomerSource: function (e) {
  1569. if (e || e == 0) {
  1570. let str = e.toString();
  1571. let theType = "";
  1572. customerSource.map(function (item) {
  1573. if (item.value == str) {
  1574. theType = item.key;
  1575. }
  1576. });
  1577. return theType;
  1578. }
  1579. },
  1580. //客户来源
  1581. getSlcRedit: function (e) {
  1582. if (e || e == 0) {
  1583. let str = e.toString();
  1584. let theType = "";
  1585. slcRedit.map(function (item) {
  1586. if (item.value == str) {
  1587. theType = item.key;
  1588. }
  1589. });
  1590. return theType;
  1591. }
  1592. },
  1593. //客户来源
  1594. getDataGrade: function (e) {
  1595. if (e || e == 0) {
  1596. let str = e.toString();
  1597. let theType = "";
  1598. dataGrade.map(function (item) {
  1599. if (item.value == str) {
  1600. theType = item.key;
  1601. }
  1602. });
  1603. return theType;
  1604. }
  1605. },
  1606. //客户等级
  1607. getLevel: function (e) {
  1608. if (e || e == 0) {
  1609. let str = e.toString();
  1610. let theType = "";
  1611. level.map(function (item) {
  1612. if (item.value == str) {
  1613. theType = item.key;
  1614. }
  1615. });
  1616. return theType;
  1617. }
  1618. },
  1619. //项目状态
  1620. getXiangmoState: function (e) {
  1621. if (e || e == 0) {
  1622. let str = e.toString();
  1623. let theType = "";
  1624. xiangmoState.map(function (item) {
  1625. if (item.value == str) {
  1626. theType = item.key;
  1627. }
  1628. });
  1629. return theType;
  1630. }
  1631. },
  1632. //订单状态
  1633. getNewOrderStatus: function (e) {
  1634. if (e || e == 0) {
  1635. let str = e.toString();
  1636. let theType = "";
  1637. newOrderStatus.map(function (item) {
  1638. if (item.value == str) {
  1639. theType = item.key;
  1640. }
  1641. });
  1642. return theType;
  1643. }
  1644. },
  1645. //催款状态
  1646. getCuikuan: function (e) {
  1647. if (e || e == 0) {
  1648. let str = e.toString();
  1649. let theType = "";
  1650. cuikuan.map(function (item) {
  1651. if (item.value == str) {
  1652. theType = item.key;
  1653. }
  1654. });
  1655. return theType;
  1656. }
  1657. },
  1658. //分配状态
  1659. // getAllotStatus:function (e) {
  1660. // if (e||e==0) {
  1661. // let str=e.toString()
  1662. // let theType = '';
  1663. // processStatus.map(function (item) {
  1664. // if (item.value == str) {
  1665. // theType = item.key;
  1666. // };
  1667. // });
  1668. // return theType;
  1669. // }
  1670. // },
  1671. //退单状态
  1672. getRefundStatus: function (e) {
  1673. if (e || e == 0) {
  1674. let str = e.toString();
  1675. let theType = "";
  1676. refundStatus.map(function (item) {
  1677. if (item.value == str) {
  1678. theType = item.key;
  1679. }
  1680. });
  1681. return theType;
  1682. }
  1683. },
  1684. //退单状态
  1685. getTaskStatus: function (e) {
  1686. if (e || e == 0) {
  1687. let str = e.toString();
  1688. let theType = "";
  1689. taskStatus.map(function (item) {
  1690. if (item.value == str) {
  1691. theType = item.key;
  1692. }
  1693. });
  1694. return theType;
  1695. }
  1696. },
  1697. //特批状态
  1698. getApproval: function (e, flag) {
  1699. if (flag) {
  1700. if (e == 0) {
  1701. return "非特批";
  1702. } else if (e == 1) {
  1703. return "特批待审核";
  1704. } else if (e == 2) {
  1705. return "特批通过";
  1706. } else if (e == 3) {
  1707. return "特批驳回";
  1708. } else {
  1709. return "未知";
  1710. }
  1711. }
  1712. if (e || e == 0) {
  1713. let str = e.toString();
  1714. let theType = "";
  1715. approval.map(function (item) {
  1716. if (item.value == str) {
  1717. theType = item.key;
  1718. }
  1719. });
  1720. return theType;
  1721. }
  1722. },
  1723. //流程状态
  1724. getPeople: function (val) {
  1725. if (val == 0) {
  1726. return "已派营销员";
  1727. } else if (val == 1) {
  1728. return "已派营销管理员";
  1729. } else if (val == 2) {
  1730. return "已派咨询师";
  1731. } else if (val == 3) {
  1732. return "已派咨询师经理";
  1733. } else if (val == 4) {
  1734. return "已派咨询师管理员";
  1735. } else if (val == 5) {
  1736. return "已派财务专员";
  1737. } else if (val == 6) {
  1738. return "已派财务总监";
  1739. }
  1740. },
  1741. //第三方信息状态----是否有材料
  1742. getMaterialStatus: function (val) {
  1743. if (val == 0) {
  1744. return "无材料";
  1745. } else if (val == 1) {
  1746. return "有材料";
  1747. }
  1748. },
  1749. //第三方信息状态----加急
  1750. getUrgentStatus: function (val) {
  1751. if (val == 0) {
  1752. return "无加急";
  1753. } else if (val == 1) {
  1754. return "加急3-5个工作日";
  1755. } else if (val == 2) {
  1756. return "加急6-10个工作日";
  1757. } else if (val == 3) {
  1758. return "加急11-15个工作日";
  1759. } else if (val == 4) {
  1760. return "加急16-20个工作日";
  1761. } else if (val == 5) {
  1762. return "加急21-25个工作日";
  1763. } else if (val == 6) {
  1764. return "加急26-30个工作日";
  1765. }
  1766. },
  1767. //审核状态
  1768. getStatus: function (val) {
  1769. if (val == 0) {
  1770. return "未提交";
  1771. } else if (val == 1) {
  1772. return "处理中";
  1773. } else if (val == 2) {
  1774. return "通过";
  1775. } else if (val == 3) {
  1776. return "拒绝";
  1777. } else if (val == 4) {
  1778. return "撤销";
  1779. }
  1780. },
  1781. //项目状态
  1782. getProjectStatus: function (e) {
  1783. let arr = projectStatusList.filter(v=>{
  1784. return v.value === e
  1785. });
  1786. if(arr.length){
  1787. return arr[0].label
  1788. }
  1789. return '';
  1790. },
  1791. //流程状态
  1792. getProcessStatus: function (e) {
  1793. if (e || e == 0) {
  1794. let str = e.toString();
  1795. let theType = "";
  1796. processStatus.map(function (item) {
  1797. if (item.value == str) {
  1798. theType = item.key;
  1799. }
  1800. });
  1801. return theType;
  1802. }
  1803. },
  1804. //结算状态
  1805. getLiquidationStatus: function (e) {
  1806. if (e || e == 0) {
  1807. let str = e.toString();
  1808. let theType = "";
  1809. liquidationStatus.map(function (item) {
  1810. if (item.value == str) {
  1811. theType = item.key;
  1812. }
  1813. });
  1814. return theType;
  1815. }
  1816. }, //
  1817. //新项目类型
  1818. getNewOrderType: function (e) {
  1819. if (e || e == 0) {
  1820. let str = e.toString();
  1821. let theType = "";
  1822. newOrderType.map(function (item) {
  1823. if (item.value == str) {
  1824. theType = item.key;
  1825. }
  1826. });
  1827. return theType;
  1828. }
  1829. },
  1830. //技术员发款类型
  1831. getJsyPaymentType: function (e) {
  1832. if (e || e == 0) {
  1833. let str = e.toString();
  1834. let theType = "";
  1835. jsyPaymentType.map(function (item) {
  1836. if (item.value == str) {
  1837. theType = item.key;
  1838. }
  1839. });
  1840. return theType;
  1841. } //
  1842. },
  1843. //奖金发放状态
  1844. getBonusState: function (e) {
  1845. if (e || e == 0) {
  1846. let str = e.toString();
  1847. let theType = "";
  1848. bonusState.map(function (item) {
  1849. if (item.value == str) {
  1850. theType = item.key;
  1851. }
  1852. });
  1853. return theType;
  1854. }
  1855. },
  1856. //技术员发款类型
  1857. getCustomerType: function (e) {
  1858. if (e || e == 0) {
  1859. let str = e.toString();
  1860. let theType = "";
  1861. customerType.map(function (item) {
  1862. if (item.value == str) {
  1863. theType = item.key;
  1864. }
  1865. });
  1866. return theType;
  1867. }
  1868. },
  1869. //技术员发款类型
  1870. getOrderTypes: function (e) {
  1871. if (e || e == 0) {
  1872. let str = e.toString();
  1873. let theType = "";
  1874. orderTypes.map(function (item) {
  1875. if (item.value == str) {
  1876. theType = item.key;
  1877. }
  1878. });
  1879. return theType;
  1880. }
  1881. },
  1882. //技术员发款类型
  1883. getjiedian: function (e) {
  1884. if (e || e == 0) {
  1885. let str = e.toString();
  1886. let theType = "";
  1887. jiedian.map(function (item) {
  1888. if (item.value == str) {
  1889. theType = item.key;
  1890. }
  1891. });
  1892. return theType;
  1893. }
  1894. },
  1895. //省内外
  1896. getProvinceA: function (e) {
  1897. if (e || e == 0) {
  1898. let str = e.toString();
  1899. let theType = "";
  1900. province.map(function (item) {
  1901. if (item.value == str) {
  1902. theType = item.key;
  1903. }
  1904. });
  1905. return theType;
  1906. }
  1907. },
  1908. //开票状态
  1909. getInvoiceStatus: function (e, record) {
  1910. if (record && record.approval == 1) {
  1911. return "特批待审核";
  1912. } else {
  1913. if (e || e == 0) {
  1914. let str = e.toString();
  1915. let theType = "";
  1916. invoiceStatus.map(function (item) {
  1917. if (item.value == str) {
  1918. theType = item.key;
  1919. }
  1920. });
  1921. return theType;
  1922. }
  1923. }
  1924. },
  1925. getApprovalA: function (e) {
  1926. if (e || e == 0) {
  1927. let str = e.toString();
  1928. let theType = "";
  1929. approvalA.map(function (item) {
  1930. if (item.value == str) {
  1931. theType = item.key;
  1932. }
  1933. });
  1934. return theType;
  1935. }
  1936. },
  1937. getProcessStatusNew: function (pro, status) {
  1938. // if (e||e==0) {
  1939. // let str=e.toString()
  1940. // let theType = '';
  1941. // processStatusNew.map(function (item) {
  1942. // if (item.value == str) {
  1943. // theType = item.key;
  1944. // };
  1945. // });
  1946. // return theType;
  1947. // }
  1948. let str = "";
  1949. if (pro == 0) {
  1950. str = "营销员";
  1951. } else if (pro == 1) {
  1952. str = "营销管理员";
  1953. } else if (pro == 2) {
  1954. str = "咨询师";
  1955. } else if (pro == 3) {
  1956. str = "咨询师经理";
  1957. } else if (pro == 4) {
  1958. str = "咨询师总监";
  1959. } else if (pro == 5) {
  1960. str = "财务专员";
  1961. } else if (pro == 6) {
  1962. str = "财务总监";
  1963. } else if (pro == 7) {
  1964. str = "总裁";
  1965. } else if (pro == 8) {
  1966. str = "董事长";
  1967. }
  1968. let num = "";
  1969. if (status == 0) {
  1970. num = "发起";
  1971. } else if (status == 1) {
  1972. num = "审核中";
  1973. } else if (status == 2) {
  1974. num = "通过";
  1975. } else if (status == 3) {
  1976. num = "驳回";
  1977. return num + "到" + str;
  1978. } else if (status == 4) {
  1979. num = "完成";
  1980. } else if (status == 5) {
  1981. num = "取消变更";
  1982. }
  1983. if (pro == 7 && status == 2) {
  1984. return "订单变更退票中 (财务处理中)";
  1985. } else if (pro == 8 && status == 2) {
  1986. return "订单变更退票中 (财务处理中)";
  1987. } else if (pro >= 7 && status == 4) {
  1988. return "订单变更已完成";
  1989. } else {
  1990. return str + num;
  1991. }
  1992. },
  1993. getContractChangeStatus: function (e) {
  1994. if (e || e == 0) {
  1995. let str = e.toString();
  1996. let theType = "";
  1997. contractChangeStatus.map(function (item) {
  1998. if (item.value == str) {
  1999. theType = item.key;
  2000. }
  2001. });
  2002. return theType;
  2003. }
  2004. },
  2005. // 咨询师以及咨询师经理审核内容显示
  2006. shenghePeo(arr, status) {
  2007. if (status == 2) {
  2008. arr = arr || [];
  2009. let str = "咨询师(";
  2010. for (let a = 0; a < arr.length; a++) {
  2011. if (arr[a].status == 0) {
  2012. str += arr[a].name + ",";
  2013. }
  2014. }
  2015. str = str.substr(0, str.length - 1);
  2016. return str + ")审核中";
  2017. }
  2018. if (status == 3) {
  2019. arr = arr || [];
  2020. let str = "咨询师经理(";
  2021. for (let a = 0; a < arr.length; a++) {
  2022. if (arr[a].status == 0) {
  2023. str += arr[a].name + ",";
  2024. }
  2025. }
  2026. str = str.substr(0, str.length - 1);
  2027. return str + ")审核中";
  2028. }
  2029. },
  2030. moneyVerify(e) {
  2031. if (!/^\d{1,3}(,?\d{3})*(\.\d{1,6})?$/.test(e)) {
  2032. message.warning("输入金额不符合规范");
  2033. return true;
  2034. }
  2035. },
  2036. // 消息提醒函数接口
  2037. ShowModal(fn) {
  2038. let flag = true;
  2039. $.ajax({
  2040. method: "get",
  2041. dataType: "json",
  2042. crossDomain: false,
  2043. url: globalConfig.context + "/api/admin/notice/unreadCount",
  2044. data: {},
  2045. success: function (data) {
  2046. if (data.data != 0) {
  2047. console.log(data);
  2048. fn.setState({
  2049. showModal: true,
  2050. });
  2051. }
  2052. },
  2053. });
  2054. // return flag
  2055. },
  2056. getType(e) {
  2057. if (e || e == 0) {
  2058. let str = e.toString();
  2059. let theType = "";
  2060. typeList.map(function (item) {
  2061. if (item.value == str) {
  2062. theType = item.key;
  2063. }
  2064. });
  2065. return theType;
  2066. }
  2067. },
  2068. changeColor(e) {
  2069. return (
  2070. <span style={{ color: "red", fontWeight: 900, fontSize: 16 }}>{e}</span>
  2071. );
  2072. },
  2073. getProjectName(e) {
  2074. let arr = projectStatusList.filter(v=>{
  2075. return v.value === e
  2076. });
  2077. if(arr.length){
  2078. return arr[0].label
  2079. }
  2080. return '';
  2081. },
  2082. download(fileName,deleteLv= true) {
  2083. window.open(globalConfig.context +`${'/open/download?fileName='+fileName+'&delete='+deleteLv}`);
  2084. }
  2085. };