tools.js 43 KB

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