tools.js 43 KB

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