tools.js 43 KB

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