tools.js 44 KB

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