tools.js 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114
  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. clockState,
  112. clockJournalState
  113. } from "./dataDic.js";
  114. import { provinceList } from './NewDicProvinceList.js';
  115. import ShowModal from './showModal.jsx';
  116. module.exports = {
  117. splitUrl: function (string, i, url) {
  118. let theList = [];
  119. let theArr = [];
  120. if (string && string.length) {
  121. theArr = string.split(i);
  122. theArr.map(function (item, i) {
  123. let name = item.substring(item.lastIndexOf("_") + 1);
  124. theList.push({
  125. uid: -i - 1,
  126. name: name,
  127. url: url + item,
  128. response: {
  129. data: item,
  130. },
  131. });
  132. });
  133. }
  134. return theList;
  135. },
  136. getBase64: function (img, callback) {
  137. const reader = new FileReader();
  138. reader.addEventListener("load", () => callback(reader.result));
  139. reader.readAsDataURL(img);
  140. },
  141. beforeUpload: function (file) {
  142. const isLt2M = file.size / 1024 / 1024 < 2;
  143. if (!isLt2M) {
  144. message.error("图片小大必须小于2MB!");
  145. }
  146. return isLt2M;
  147. },
  148. beforeUploadFile: function () {
  149. // debugger
  150. // const isJPG = file.type === 'image/jpeg/document';
  151. // if (!isJPG) {
  152. // message.error('You can only upload JPG file!');
  153. // }
  154. // const isLt2M = file.size / 1024 / 1024 < 2;
  155. // if (!isLt2M) {
  156. // message.error('Image must smaller than 2MB!');
  157. // }
  158. // return isJPG && isLt2M;
  159. },
  160. getTime: function (e, t) {
  161. if (e && !t) {
  162. var d = new Date(e);
  163. d =
  164. d.getFullYear() +
  165. "-" +
  166. (d.getMonth() + 1 < 10 ? "0" + (d.getMonth() + 1) : d.getMonth() + 1) +
  167. "-" +
  168. (d.getDate() < 10 ? "0" + d.getDate() : d.getDate()) +
  169. " ";
  170. // + (d.getHours() < 10 ? "0" + d.getHours() : d.getHours()) + ":" +
  171. // (d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes()) + ":" +
  172. // (d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds());
  173. return d;
  174. } else if (e && t) {
  175. var d1 = new Date(e);
  176. var d2 = new Date(e);
  177. d2 = d2.setMonth(d1.getMonth() + t);
  178. d2 = new Date(d2);
  179. d2 =
  180. d2.getFullYear() +
  181. "-" +
  182. (d2.getMonth() + 1 < 10
  183. ? "0" + (d2.getMonth() + 1)
  184. : d2.getMonth() + 1) +
  185. "-" +
  186. (d2.getDate() < 10 ? "0" + d2.getDate() : d2.getDate()) +
  187. " ";
  188. return d2;
  189. } else {
  190. return "";
  191. }
  192. },
  193. getPatentType: function (e) {
  194. let theType = "";
  195. patentTypeList.map(function (item) {
  196. if (item.value == e) {
  197. theType = item.key;
  198. }
  199. });
  200. return theType;
  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 (!isNaN(parseInt(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. debugger
  1351. console.log(e);
  1352. if (e) {
  1353. let theType = "";
  1354. contractProgress.map(function (item) {
  1355. if (item.value == e) {
  1356. theType = item.key;
  1357. }
  1358. });
  1359. return theType;
  1360. }
  1361. },
  1362. //项目进度
  1363. getProjectProgress: function (e) {
  1364. if (e) {
  1365. let theType = "";
  1366. projectProgress.map(function (item) {
  1367. if (item.value == e) {
  1368. theType = item.key;
  1369. }
  1370. });
  1371. return theType;
  1372. }
  1373. },
  1374. //订单类型
  1375. getOrderType: function (e) {
  1376. if (e || e == 0) {
  1377. let str = e.toString();
  1378. let theType = "";
  1379. orderType.map(function (item) {
  1380. if (item.value == str) {
  1381. theType = item.key;
  1382. }
  1383. });
  1384. return theType;
  1385. }
  1386. },
  1387. //订单阶段
  1388. getOrderStage: function (e) {
  1389. if (e || e == 0) {
  1390. let str = e.toString();
  1391. let theType = "";
  1392. orderStage.map(function (item) {
  1393. if (item.value == str) {
  1394. theType = item.key;
  1395. }
  1396. });
  1397. return theType;
  1398. }
  1399. },
  1400. //订单状态o
  1401. getOrderState: function (e) {
  1402. if (e || e == 0) {
  1403. let str = e.toString();
  1404. let theType = "";
  1405. orderState.map(function (item) {
  1406. if (item.value == str) {
  1407. theType = item.key;
  1408. }
  1409. });
  1410. return theType;
  1411. }
  1412. },
  1413. //付款状态
  1414. getPaymentState: function (e) {
  1415. if (e || e == 0) {
  1416. let str = e.toString();
  1417. let theType = "";
  1418. paymentState.map(function (item) {
  1419. if (item.value == str) {
  1420. theType = item.key;
  1421. }
  1422. });
  1423. return theType;
  1424. }
  1425. },
  1426. //订单渠道
  1427. getOrderChannel: function (e) {
  1428. if (e || e == 0) {
  1429. let str = e.toString();
  1430. let theType = "";
  1431. orderChannel.map(function (item) {
  1432. if (item.value == str) {
  1433. theType = item.key;
  1434. }
  1435. });
  1436. return theType;
  1437. }
  1438. },
  1439. //特批状态
  1440. getApprovedState: function (e) {
  1441. if (e || e == 0) {
  1442. let str = e.toString();
  1443. let theType = "";
  1444. approvedState.map(function (item) {
  1445. if (item.value == str) {
  1446. theType = item.key;
  1447. }
  1448. });
  1449. return theType;
  1450. }
  1451. },
  1452. //锁定或废除
  1453. getLock: function (e) {
  1454. if (e || e == 0) {
  1455. let str = e.toString();
  1456. let theType = "";
  1457. lock.map(function (item) {
  1458. if (item.value == str) {
  1459. theType = item.key;
  1460. }
  1461. });
  1462. return theType;
  1463. }
  1464. },
  1465. //支付方式
  1466. getPaymentMethod: function (e) {
  1467. if (e || e == 0) {
  1468. let str = e.toString();
  1469. let theType = "";
  1470. paymentMethod.map(function (item) {
  1471. if (item.value == str) {
  1472. theType = item.key;
  1473. }
  1474. });
  1475. return theType;
  1476. }
  1477. },
  1478. //交易渠道
  1479. getTransactionChannel: function (e) {
  1480. if (e || e == 0) {
  1481. let str = e.toString();
  1482. let theType = "";
  1483. transactionChannel.map(function (item) {
  1484. if (item.value == str) {
  1485. theType = item.key;
  1486. }
  1487. });
  1488. return theType;
  1489. }
  1490. },
  1491. //交易科目
  1492. getTransactionProject: function (e) {
  1493. if (e || e == 0) {
  1494. let str = e.toString();
  1495. let theType = "";
  1496. transactionProject.map(function (item) {
  1497. if (item.value == str) {
  1498. theType = item.key;
  1499. }
  1500. });
  1501. return theType;
  1502. }
  1503. },
  1504. //项目状态
  1505. getProjectState: function (e) {
  1506. if (e || e == 0) {
  1507. let str = e.toString();
  1508. let theType = "";
  1509. projectState.map(function (item) {
  1510. if (item.value == str) {
  1511. theType = item.key;
  1512. }
  1513. });
  1514. return theType;
  1515. }
  1516. },
  1517. //任务状态
  1518. getTaskStatus: function (e) {
  1519. if (e || e == 0) {
  1520. let str = e.toString();
  1521. let theType = "";
  1522. taskStatus.map(function (item) {
  1523. if (item.value == str) {
  1524. theType = item.key;
  1525. }
  1526. });
  1527. return theType;
  1528. }
  1529. },
  1530. //公示状态
  1531. getPublishStatus: function (e) {
  1532. if (e || e == 0) {
  1533. let str = e.toString();
  1534. let theType = "";
  1535. publishStatus.map(function (item) {
  1536. if (item.value == str) {
  1537. theType = item.key;
  1538. }
  1539. });
  1540. return theType;
  1541. }
  1542. },
  1543. //变更状态
  1544. getChangeState: function (e) {
  1545. if (e || e == 0) {
  1546. let str = e.toString();
  1547. let theType = "";
  1548. changeState.map(function (item) {
  1549. if (item.value == str) {
  1550. theType = item.key;
  1551. }
  1552. });
  1553. return theType;
  1554. }
  1555. },
  1556. //分派情况
  1557. getDistributeState: function (e) {
  1558. if (e || e == 0) {
  1559. let str = e.toString();
  1560. let theType = "";
  1561. distributeState.map(function (item) {
  1562. if (item.value == str) {
  1563. theType = item.key;
  1564. }
  1565. });
  1566. return theType;
  1567. }
  1568. },
  1569. //客户来源
  1570. getCustomerSource: function (e) {
  1571. if (e || e == 0) {
  1572. let str = e.toString();
  1573. let theType = "";
  1574. customerSource.map(function (item) {
  1575. if (item.value == str) {
  1576. theType = item.key;
  1577. }
  1578. });
  1579. return theType;
  1580. }
  1581. },
  1582. //客户来源
  1583. getSlcRedit: function (e) {
  1584. if (e || e == 0) {
  1585. let str = e.toString();
  1586. let theType = "";
  1587. slcRedit.map(function (item) {
  1588. if (item.value == str) {
  1589. theType = item.key;
  1590. }
  1591. });
  1592. return theType;
  1593. }
  1594. },
  1595. //客户来源
  1596. getDataGrade: function (e) {
  1597. if (e || e == 0) {
  1598. let str = e.toString();
  1599. let theType = "";
  1600. dataGrade.map(function (item) {
  1601. if (item.value == str) {
  1602. theType = item.key;
  1603. }
  1604. });
  1605. return theType;
  1606. }
  1607. },
  1608. //客户等级
  1609. getLevel: function (e) {
  1610. if (e || e == 0) {
  1611. let str = e.toString();
  1612. let theType = "";
  1613. level.map(function (item) {
  1614. if (item.value == str) {
  1615. theType = item.key;
  1616. }
  1617. });
  1618. return theType;
  1619. }
  1620. },
  1621. //项目状态
  1622. getXiangmoState: function (e) {
  1623. if (e || e == 0) {
  1624. let str = e.toString();
  1625. let theType = "";
  1626. xiangmoState.map(function (item) {
  1627. if (item.value == str) {
  1628. theType = item.key;
  1629. }
  1630. });
  1631. return theType;
  1632. }
  1633. },
  1634. //订单状态
  1635. getNewOrderStatus: function (e) {
  1636. if (e || e == 0) {
  1637. let str = e.toString();
  1638. let theType = "";
  1639. newOrderStatus.map(function (item) {
  1640. if (item.value == str) {
  1641. theType = item.key;
  1642. }
  1643. });
  1644. return theType;
  1645. }
  1646. },
  1647. //催款状态
  1648. getCuikuan: function (e) {
  1649. if (e || e == 0) {
  1650. let str = e.toString();
  1651. let theType = "";
  1652. cuikuan.map(function (item) {
  1653. if (item.value == str) {
  1654. theType = item.key;
  1655. }
  1656. });
  1657. return theType;
  1658. }
  1659. },
  1660. //分配状态
  1661. // getAllotStatus:function (e) {
  1662. // if (e||e==0) {
  1663. // let str=e.toString()
  1664. // let theType = '';
  1665. // processStatus.map(function (item) {
  1666. // if (item.value == str) {
  1667. // theType = item.key;
  1668. // };
  1669. // });
  1670. // return theType;
  1671. // }
  1672. // },
  1673. //退单状态
  1674. getRefundStatus: function (e) {
  1675. if (e || e == 0) {
  1676. let str = e.toString();
  1677. let theType = "";
  1678. refundStatus.map(function (item) {
  1679. if (item.value == str) {
  1680. theType = item.key;
  1681. }
  1682. });
  1683. return theType;
  1684. }
  1685. },
  1686. //退单状态
  1687. getTaskStatus: function (e) {
  1688. if (e || e == 0) {
  1689. let str = e.toString();
  1690. let theType = "";
  1691. taskStatus.map(function (item) {
  1692. if (item.value == str) {
  1693. theType = item.key;
  1694. }
  1695. });
  1696. return theType;
  1697. }
  1698. },
  1699. //特批状态
  1700. getApproval: function (e, flag) {
  1701. if (flag) {
  1702. if (e == 0) {
  1703. return "非特批";
  1704. } else if (e == 1) {
  1705. return "特批待审核";
  1706. } else if (e == 2) {
  1707. return "特批通过";
  1708. } else if (e == 3) {
  1709. return "特批驳回";
  1710. } else {
  1711. return "未知";
  1712. }
  1713. }
  1714. if (e || e == 0) {
  1715. let str = e.toString();
  1716. let theType = "";
  1717. approval.map(function (item) {
  1718. if (item.value == str) {
  1719. theType = item.key;
  1720. }
  1721. });
  1722. return theType;
  1723. }
  1724. },
  1725. //流程状态
  1726. getPeople: function (val) {
  1727. if (val == 0) {
  1728. return "已派营销员";
  1729. } else if (val == 1) {
  1730. return "已派营销管理员";
  1731. } else if (val == 2) {
  1732. return "已派咨询师";
  1733. } else if (val == 3) {
  1734. return "已派咨询师经理";
  1735. } else if (val == 4) {
  1736. return "已派咨询师管理员";
  1737. } else if (val == 5) {
  1738. return "已派财务专员";
  1739. } else if (val == 6) {
  1740. return "已派财务总监";
  1741. }
  1742. },
  1743. //第三方信息状态----是否有材料
  1744. getMaterialStatus: function (val) {
  1745. if (val == 0) {
  1746. return "无材料";
  1747. } else if (val == 1) {
  1748. return "有材料";
  1749. }
  1750. },
  1751. //第三方信息状态----加急
  1752. getUrgentStatus: function (val) {
  1753. if (val == 0) {
  1754. return "无加急";
  1755. } else if (val == 1) {
  1756. return "加急3-5个工作日";
  1757. } else if (val == 2) {
  1758. return "加急6-10个工作日";
  1759. } else if (val == 3) {
  1760. return "加急11-15个工作日";
  1761. } else if (val == 4) {
  1762. return "加急16-20个工作日";
  1763. } else if (val == 5) {
  1764. return "加急21-25个工作日";
  1765. } else if (val == 6) {
  1766. return "加急26-30个工作日";
  1767. }
  1768. },
  1769. //审核状态
  1770. getStatus: function (val) {
  1771. if (val == 0) {
  1772. return "未提交";
  1773. } else if (val == 1) {
  1774. return "处理中";
  1775. } else if (val == 2) {
  1776. return "通过";
  1777. } else if (val == 3) {
  1778. return "拒绝";
  1779. } else if (val == 4) {
  1780. return "撤销";
  1781. }
  1782. },
  1783. //项目状态
  1784. getProjectStatus: function (e) {
  1785. let arr = projectStatusList.filter(v=>{
  1786. return v.value === e
  1787. });
  1788. if(arr.length){
  1789. return arr[0].label
  1790. }
  1791. return '';
  1792. },
  1793. //流程状态
  1794. getProcessStatus: function (e) {
  1795. if (e || e == 0) {
  1796. let str = e.toString();
  1797. let theType = "";
  1798. processStatus.map(function (item) {
  1799. if (item.value == str) {
  1800. theType = item.key;
  1801. }
  1802. });
  1803. return theType;
  1804. }
  1805. },
  1806. //结算状态
  1807. getLiquidationStatus: function (e) {
  1808. if (e || e == 0) {
  1809. let str = e.toString();
  1810. let theType = "";
  1811. liquidationStatus.map(function (item) {
  1812. if (item.value == str) {
  1813. theType = item.key;
  1814. }
  1815. });
  1816. return theType;
  1817. }
  1818. }, //
  1819. //新项目类型
  1820. getNewOrderType: function (e) {
  1821. if (e || e == 0) {
  1822. let str = e.toString();
  1823. let theType = "";
  1824. newOrderType.map(function (item) {
  1825. if (item.value == str) {
  1826. theType = item.key;
  1827. }
  1828. });
  1829. return theType;
  1830. }
  1831. },
  1832. //技术员发款类型
  1833. getJsyPaymentType: function (e) {
  1834. if (e || e == 0) {
  1835. let str = e.toString();
  1836. let theType = "";
  1837. jsyPaymentType.map(function (item) {
  1838. if (item.value == str) {
  1839. theType = item.key;
  1840. }
  1841. });
  1842. return theType;
  1843. } //
  1844. },
  1845. //奖金发放状态
  1846. getBonusState: function (e) {
  1847. if (e || e == 0) {
  1848. let str = e.toString();
  1849. let theType = "";
  1850. bonusState.map(function (item) {
  1851. if (item.value == str) {
  1852. theType = item.key;
  1853. }
  1854. });
  1855. return theType;
  1856. }
  1857. },
  1858. //技术员发款类型
  1859. getCustomerType: function (e) {
  1860. if (e || e == 0) {
  1861. let str = e.toString();
  1862. let theType = "";
  1863. customerType.map(function (item) {
  1864. if (item.value == str) {
  1865. theType = item.key;
  1866. }
  1867. });
  1868. return theType;
  1869. }
  1870. },
  1871. //技术员发款类型
  1872. getOrderTypes: function (e) {
  1873. if (e || e == 0) {
  1874. let str = e.toString();
  1875. let theType = "";
  1876. orderTypes.map(function (item) {
  1877. if (item.value == str) {
  1878. theType = item.key;
  1879. }
  1880. });
  1881. return theType;
  1882. }
  1883. },
  1884. //技术员发款类型
  1885. getjiedian: function (e) {
  1886. if (e || e == 0) {
  1887. let str = e.toString();
  1888. let theType = "";
  1889. jiedian.map(function (item) {
  1890. if (item.value == str) {
  1891. theType = item.key;
  1892. }
  1893. });
  1894. return theType;
  1895. }
  1896. },
  1897. //省内外
  1898. getProvinceA: function (e) {
  1899. if (e || e == 0) {
  1900. let str = e.toString();
  1901. let theType = "";
  1902. province.map(function (item) {
  1903. if (item.value == str) {
  1904. theType = item.key;
  1905. }
  1906. });
  1907. return theType;
  1908. }
  1909. },
  1910. //开票状态
  1911. getInvoiceStatus: function (e, record) {
  1912. if (record && record.approval == 1) {
  1913. return "特批待审核";
  1914. } else {
  1915. if (e || e == 0) {
  1916. let str = e.toString();
  1917. let theType = "";
  1918. invoiceStatus.map(function (item) {
  1919. if (item.value == str) {
  1920. theType = item.key;
  1921. }
  1922. });
  1923. return theType;
  1924. }
  1925. }
  1926. },
  1927. getApprovalA: function (e) {
  1928. if (e || e == 0) {
  1929. let str = e.toString();
  1930. let theType = "";
  1931. approvalA.map(function (item) {
  1932. if (item.value == str) {
  1933. theType = item.key;
  1934. }
  1935. });
  1936. return theType;
  1937. }
  1938. },
  1939. getProcessStatusNew: function (pro, status) {
  1940. // if (e||e==0) {
  1941. // let str=e.toString()
  1942. // let theType = '';
  1943. // processStatusNew.map(function (item) {
  1944. // if (item.value == str) {
  1945. // theType = item.key;
  1946. // };
  1947. // });
  1948. // return theType;
  1949. // }
  1950. let str = "";
  1951. if (pro == 0) {
  1952. str = "营销员";
  1953. } else if (pro == 1) {
  1954. str = "营销管理员";
  1955. } else if (pro == 2) {
  1956. str = "咨询师";
  1957. } else if (pro == 3) {
  1958. str = "咨询师经理";
  1959. } else if (pro == 4) {
  1960. str = "咨询师总监";
  1961. } else if (pro == 5) {
  1962. str = "财务专员";
  1963. } else if (pro == 6) {
  1964. str = "财务总监";
  1965. } else if (pro == 7) {
  1966. str = "总裁";
  1967. } else if (pro == 8) {
  1968. str = "董事长";
  1969. }
  1970. let num = "";
  1971. if (status == 0) {
  1972. num = "发起";
  1973. } else if (status == 1) {
  1974. num = "审核中";
  1975. } else if (status == 2) {
  1976. num = "通过";
  1977. } else if (status == 3) {
  1978. num = "驳回";
  1979. return num + "到" + str;
  1980. } else if (status == 4) {
  1981. num = "完成";
  1982. } else if (status == 5) {
  1983. num = "取消变更";
  1984. }else if(status == 6) {
  1985. num = "待上传附件";
  1986. }
  1987. if (pro == 7 && status == 2) {
  1988. return "订单变更退票中 (财务处理中)";
  1989. } else if (pro == 8 && status == 2) {
  1990. return "订单变更退票中 (财务处理中)";
  1991. } else if (pro >= 7 && status == 4) {
  1992. return "订单变更已完成";
  1993. }else if(pro >= 7 && status == 6) {
  1994. return "待上传附件(营销员处理中)";
  1995. } else {
  1996. return str + num;
  1997. }
  1998. },
  1999. getContractChangeStatus: function (e) {
  2000. if (e || e == 0) {
  2001. let str = e.toString();
  2002. let theType = "";
  2003. contractChangeStatus.map(function (item) {
  2004. if (item.value == str) {
  2005. theType = item.key;
  2006. }
  2007. });
  2008. return theType;
  2009. }
  2010. },
  2011. // 咨询师以及咨询师经理审核内容显示
  2012. shenghePeo(arr, status) {
  2013. debugger
  2014. if (status == 2) {
  2015. arr = arr || [];
  2016. let str = "咨询师(";
  2017. for (let a = 0; a < arr.length; a++) {
  2018. if (arr[a].status == 0) {
  2019. str += arr[a].name + ",";
  2020. }
  2021. }
  2022. str = str.substr(0, str.length - 1);
  2023. return str + ")审核中";
  2024. }
  2025. if (status == 3) {
  2026. arr = arr || [];
  2027. let str = "咨询师经理(";
  2028. for (let a = 0; a < arr.length; a++) {
  2029. if (arr[a].status == 0) {
  2030. str += arr[a].name + ",";
  2031. }
  2032. }
  2033. str = str.substr(0, str.length - 1);
  2034. return str + ")审核中";
  2035. }
  2036. },
  2037. moneyVerify(e) {
  2038. if (!/^\d{1,3}(,?\d{3})*(\.\d{1,6})?$/.test(e)) {
  2039. message.warning("输入金额不符合规范");
  2040. return true;
  2041. }
  2042. },
  2043. // 消息提醒函数接口
  2044. ShowModal(fn) {
  2045. let flag = true;
  2046. $.ajax({
  2047. method: "get",
  2048. dataType: "json",
  2049. crossDomain: false,
  2050. url: globalConfig.context + "/api/admin/notice/unreadCount",
  2051. data: {},
  2052. success: function (data) {
  2053. if (data.data != 0) {
  2054. console.log(data);
  2055. fn.setState({
  2056. showModal: true,
  2057. });
  2058. }
  2059. },
  2060. });
  2061. // return flag
  2062. },
  2063. getType(e) {
  2064. if (e || e == 0) {
  2065. let str = e.toString();
  2066. let theType = "";
  2067. typeList.map(function (item) {
  2068. if (item.value == str) {
  2069. theType = item.key;
  2070. }
  2071. });
  2072. return theType;
  2073. }
  2074. },
  2075. changeColor(e) {
  2076. return (
  2077. <span style={{ color: "red", fontWeight: 900, fontSize: 16 }}>{e}</span>
  2078. );
  2079. },
  2080. getProjectName(e) {
  2081. let arr = projectStatusList.filter(v=>{
  2082. return v.value === e
  2083. });
  2084. if(arr.length){
  2085. return arr[0].label
  2086. }
  2087. return '';
  2088. },
  2089. download(fileName,deleteLv= true) {
  2090. window.open(globalConfig.context +`${'/open/download?fileName='+fileName+'&delete='+deleteLv}`);
  2091. },
  2092. getClockState(id,journal = false) {
  2093. let arr = journal ? clockJournalState.filter(v=>v.id === id) : clockState.filter(v=>v.id === id);
  2094. if(arr.length > 0){
  2095. return arr[0];
  2096. }else{
  2097. return {};
  2098. }
  2099. }
  2100. };