tools.js 43 KB

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