tools.js 42 KB

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