tools.js 42 KB

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