tools.js 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459
  1. import { message,Timeline,Select } from 'antd';
  2. import React from 'react';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import {
  6. patentTypeList,
  7. patentStateList,
  8. patentFieldList,
  9. technicalSourceList,
  10. catagoryList,
  11. intellectualGetList,
  12. conversionFormList,
  13. annualReportStateList,
  14. cognizanceStateList,
  15. technologyStateList,
  16. copyrightStateList,
  17. auditStatusList,
  18. scaleList,
  19. companyType,
  20. industryList,
  21. contractTypeList,
  22. contractStateList,
  23. demandTypeList,
  24. achievementCategoryList,
  25. techAuditStatusList,
  26. auditStatusLists,
  27. maturityList,
  28. transferModeList,
  29. innovationList,
  30. orderStatusList,
  31. activityForm,
  32. activityType,
  33. boutique,
  34. hot,
  35. statuslist,
  36. customerTyp,
  37. cityArr,
  38. customerStatus,
  39. intentionalService,
  40. newFollow,
  41. sex,
  42. tag,
  43. contactType,
  44. contact,
  45. intentionalServiceOn,
  46. newFollowOn,
  47. customerStatusOn,
  48. Whether,
  49. Certification,
  50. currentMember,
  51. lvl,
  52. industry,
  53. socialAttribute,
  54. station,
  55. post,
  56. patternOrganization,
  57. conditionOrganization,
  58. categoryState,
  59. auditStatusL,
  60. gameState,
  61. messageType,
  62. designated,
  63. featured,
  64. actives,
  65. intentProgress,
  66. transactionProgress,
  67. contractProgress,
  68. projectProgress,
  69. orderType, orderStage, orderState,paymentState, orderChannel, approvedState, lock,paymentMethod,transactionChannel,projectState,transactionProject,
  70. client,
  71. stick,
  72. taskStatus,
  73. publishStatus,
  74. changeState,
  75. distributeState,
  76. customerSource,
  77. releaseStateList,
  78. releasePosition,
  79. achievementPosition,
  80. achievementType,
  81. transaction,
  82. newsPosition
  83. } from './dataDic.js';
  84. import { provinceList} from './NewDicProvinceList.js';
  85. module.exports = {
  86. splitUrl: function (string, i, url) {
  87. let theList = [];
  88. let theArr = [];
  89. if (string && string.length) {
  90. theArr = string.split(i);
  91. theArr.map(function (item, i) {
  92. theList.push({
  93. uid: -i-1,
  94. url: url + item,
  95. response: {
  96. data: item
  97. }
  98. });
  99. });
  100. }
  101. return theList;
  102. },
  103. getBase64: function (img, callback) {
  104. const reader = new FileReader();
  105. reader.addEventListener('load', () => callback(reader.result));
  106. reader.readAsDataURL(img);
  107. },
  108. beforeUpload: function (file) {
  109. const isLt2M = file.size / 1024 / 1024 < 2;
  110. if (!isLt2M) {
  111. message.error('图片小大必须小于2MB!');
  112. }
  113. return isLt2M;
  114. },
  115. beforeUploadFile: function (file) {
  116. // debugger
  117. // const isJPG = file.type === 'image/jpeg/document';
  118. // if (!isJPG) {
  119. // message.error('You can only upload JPG file!');
  120. // }
  121. // const isLt2M = file.size / 1024 / 1024 < 2;
  122. // if (!isLt2M) {
  123. // message.error('Image must smaller than 2MB!');
  124. // }
  125. // return isJPG && isLt2M;
  126. },
  127. getTime: function (e, t) {
  128. if (e && !t) {
  129. var d = new Date(e);
  130. d = d.getFullYear() + "-" +
  131. ((d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)) + "-" +
  132. (d.getDate() < 10 ? '0' + d.getDate() : d.getDate()) + " ";
  133. // + (d.getHours() < 10 ? "0" + d.getHours() : d.getHours()) + ":" +
  134. // (d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes()) + ":" +
  135. // (d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds());
  136. return d;
  137. } else if (e && t) {
  138. var d1 = new Date(e);
  139. var d2 = new Date(e);
  140. d2 = d2.setMonth(d1.getMonth() + t);
  141. d2 = new Date(d2)
  142. d2 = d2.getFullYear() + "-" +
  143. ((d2.getMonth() + 1) < 10 ? '0' + (d2.getMonth() + 1) : (d2.getMonth() + 1)) + "-" +
  144. (d2.getDate() < 10 ? '0' + d2.getDate() : d2.getDate()) + " ";
  145. return d2;
  146. } else {
  147. return '';
  148. }
  149. },
  150. getPatentType: function (e) {
  151. if (e) {
  152. let theType = '';
  153. patentTypeList.map(function (item) {
  154. if (item.value == e) {
  155. theType = item.key;
  156. };
  157. });
  158. return theType;
  159. }
  160. },
  161. getPatentState: function (e) {
  162. if (e) {
  163. let theState = '';
  164. patentStateList.map(function (item) {
  165. if (item.value == e) {
  166. theState = item.key;
  167. };
  168. });
  169. return theState;
  170. }
  171. },
  172. getPatentField: function (e) {
  173. if (e) {
  174. let theState = '';
  175. patentFieldList.map(function (item) {
  176. if (item.value == e) {
  177. theState = item.key;
  178. };
  179. });
  180. return theState;
  181. }
  182. },
  183. getTechnicalSource: function (e) {
  184. if (e) {
  185. let theSource = '';
  186. technicalSourceList.map(function (item) {
  187. if (item.value == e) {
  188. theSource = item.key;
  189. };
  190. });
  191. return theSource;
  192. }
  193. },
  194. getCatagory: function (e) {
  195. if (e) {
  196. let theType = '';
  197. catagoryList.map(function (item) {
  198. if (item.value == e) {
  199. theType = item.key;
  200. };
  201. });
  202. return theType;
  203. }
  204. },
  205. getIntellectualObtainWay: function (e) {
  206. if (e) {
  207. let theType = '';
  208. intellectualGetList.map(function (item) {
  209. if (item.value == e) {
  210. theType = item.key;
  211. };
  212. });
  213. return theType;
  214. }
  215. },
  216. getConversionForm: function (e) {
  217. if (e) {
  218. let theType = '';
  219. conversionFormList.map(function (item) {
  220. if (item.value == e) {
  221. theType = item.key;
  222. };
  223. });
  224. return theType;
  225. }
  226. },
  227. getAnnualReportState: function (e) {
  228. if (e) {
  229. let theType = '';
  230. annualReportStateList.map(function (item) {
  231. if (item.value == e) {
  232. theType = item.key;
  233. };
  234. });
  235. return theType;
  236. }
  237. },
  238. getCognizanceState: function (e) {
  239. if (e) {
  240. let theType = '';
  241. cognizanceStateList.map(function (item) {
  242. if (item.value == e) {
  243. theType = item.key;
  244. };
  245. });
  246. return theType;
  247. }
  248. },
  249. getTechnologyState: function (e) {
  250. if (e) {
  251. let theType = '';
  252. technologyStateList.map(function (item) {
  253. if (item.value == e) {
  254. theType = item.key;
  255. };
  256. });
  257. return theType;
  258. }
  259. },
  260. //显示用户认证状态
  261. getAuditState: function (e) {
  262. if (e) {
  263. let theType = '';
  264. auditStatusList.map(function (item) {
  265. if (item.value == e) {
  266. theType = item.key;
  267. };
  268. });
  269. return theType;
  270. }
  271. },
  272. getCopyrightState: function (e) {
  273. if (e) {
  274. let theType = '';
  275. copyrightStateList.map(function (item) {
  276. if (item.value == e) {
  277. theType = item.key;
  278. };
  279. });
  280. return theType;
  281. }
  282. },
  283. downloadFile: function (path, fileName) {
  284. window.open(globalConfig.context + '/open/downloadFile?path=' + path + '&fileName=' + fileName)
  285. },
  286. techDownloadFile: function (url, id) {
  287. window.open(globalConfig.context + url + '?id=' + id)
  288. },
  289. copyrightDownloadFile: function (id, sign, url) {
  290. window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign)
  291. },
  292. newDownloadFile: function (id, sign, url,type) {
  293. if (!type ) {
  294. window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign);
  295. };
  296. if ( type ) {
  297. window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign + '&type=' + type);
  298. };
  299. },
  300. companySearch(input, option) {
  301. return option.props.children.indexOf(input) >= 0
  302. },
  303. getVacations(ccccc){
  304. let now = new Date();
  305. let theYear = now.getFullYear();
  306. $.ajax({
  307. type: "get",
  308. dataType: "json",
  309. crossDomain: false,
  310. url: globalConfig.context + '/open/html/json/vacations' + theYear,
  311. success: (data)=>{
  312. if (data) {
  313. ccccc(data);
  314. };
  315. }
  316. });
  317. },
  318. getInUrgentTime(date, inUrgent,vocations) {
  319. if ( vocations && vocations.length ){
  320. let now = new Date(date),addNum = 0;
  321. for (var i = 1; i <= inUrgent;) {
  322. now.setDate(now.getDate() + 1);
  323. let thebool = true;
  324. vocations.map((item)=>{
  325. if ( item == getKey(now)) {
  326. thebool= false;
  327. }
  328. });
  329. if ( thebool ) {
  330. i++
  331. };
  332. };
  333. return now;
  334. };
  335. function getKey(date) {
  336. var year = date.getFullYear(),
  337. month = date.getMonth() + 1,
  338. day = date.getDate();
  339. year = "" + year;
  340. month = (month > 9 ? "" : "0") + month;
  341. day = (day > 9 ? "" : "0") + day;
  342. return year + month + day;
  343. }
  344. },
  345. //各种通过接口获取下拉列表
  346. setPatentStateOption(permission) {
  347. let theArr = [];
  348. patentStateList.map(function (item) {
  349. for (let i = 0; i < permission.length; i++) {
  350. if (item.value == permission[i]) {
  351. theArr.push(item);
  352. };
  353. };
  354. });
  355. return theArr;
  356. },
  357. setUserContactsList(){
  358. let theOption = [];
  359. $.ajax({
  360. method: "get",
  361. dataType: "json",
  362. crossDomain: false,
  363. url: globalConfig.context + '/api/user/getContacts',
  364. success: function (data) {
  365. if (!data.data) {
  366. if ( data.error && data.error.length ) {
  367. message.warning(data.error[0].message);
  368. };
  369. return;
  370. };
  371. for (let item in data.data) {
  372. let theData = data.data[item];
  373. theOption.push(
  374. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  375. );
  376. };
  377. }
  378. });
  379. return theOption;
  380. },
  381. setAdminContactsList(uid){
  382. let theOption = [];
  383. $.ajax({
  384. method: "get",
  385. dataType: "json",
  386. crossDomain: false,
  387. url: globalConfig.context + '/api/admin/getContacts',
  388. data:{ "uid": uid },
  389. success: function (data) {
  390. if (!data.data) {
  391. if ( data.error && data.error.length ) {
  392. message.warning(data.error[0].message);
  393. };
  394. return;
  395. };
  396. for (let item in data.data) {
  397. let theData = data.data[item];
  398. theOption.push(
  399. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  400. );
  401. };
  402. }
  403. });
  404. return theOption;
  405. },
  406. //高企培育资料完成情况(比重)
  407. getProportion(uid,callback){
  408. $.ajax({
  409. method: "get",
  410. dataType: "json",
  411. crossDomain: false,
  412. url: globalConfig.context + '/api/admin/proportion',
  413. data:{ "uid": uid },
  414. success: function (data) {
  415. if (!data.data) {
  416. if ( data.error && data.error.length ) {
  417. message.warning(data.error[0].message);
  418. };
  419. data.data = {}
  420. callback(data.data);
  421. };
  422. callback(data.data);
  423. }
  424. });
  425. },
  426. //保存高企培育资料完成情况
  427. saveProportion(id,uid,sign,status){
  428. $.ajax({
  429. method: "post",
  430. dataType: "json",
  431. crossDomain: false,
  432. url: globalConfig.context + '/api/admin/confirmProportion',
  433. data:{
  434. "id": id,
  435. "uid":uid,
  436. "sign":sign,
  437. "status":status
  438. },
  439. success: function (data) {
  440. if (!data.data) {
  441. if ( data.error && data.error.length ) {
  442. message.warning(data.error[0].message);
  443. };
  444. return;
  445. };
  446. }
  447. });
  448. },
  449. //获取window.location.search传的值
  450. getSearchUrl(e){
  451. let searchURL = e;
  452. let theObj = {};
  453. searchURL = searchURL.substring(1, searchURL.length);
  454. theObj[searchURL.split("&")[0].split("=")[0]] = searchURL.split("&")[0].split("=")[1];
  455. if ( searchURL.split("&")[1] ) {
  456. theObj[searchURL.split("&")[1].split("=")[0]] = searchURL.split("&")[1].split("=")[1];
  457. if ( searchURL.split("&")[2] ) {
  458. theObj[searchURL.split("&")[2].split("=")[0]] = searchURL.split("&")[2].split("=")[1];
  459. };
  460. };
  461. return theObj;
  462. },
  463. //预览接口
  464. getPreview(id,url,sign,callback){
  465. $.ajax({
  466. method: "get",
  467. dataType: "json",
  468. crossDomain: false,
  469. url: globalConfig.context + "/api/admin/preview/" + url,
  470. data:{
  471. "id": id,
  472. "sign": sign
  473. },
  474. success: function (data) {
  475. if (!data.data) {
  476. if ( data.error && data.error.length ) {
  477. message.warning(data.error[0].message);
  478. };
  479. };
  480. callback('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data.data));
  481. }
  482. });
  483. },
  484. //获取企业规模
  485. getScaleState(e) {
  486. if (e) {
  487. let theType = '';
  488. scaleList.map(function (item) {
  489. if (item.value == e) {
  490. theType = item.key;
  491. };
  492. });
  493. return theType;
  494. }
  495. },
  496. //获取企业类型
  497. getCompanyType(type1, type2) {
  498. let companyTypeList = [];
  499. for (let i = 0; i < companyType.length; i++) {
  500. companyTypeList.push({
  501. value: companyType[i].value,
  502. label: companyType[i].label
  503. });
  504. if (companyType[i].children) {
  505. for (let j = 0; j < companyType[i].children.length; j++) {
  506. companyTypeList.push({
  507. value: companyType[i].children[j].value,
  508. label: companyType[i].children[j].label
  509. });
  510. };
  511. }
  512. };
  513. companyTypeList.sort(function (a, b) {
  514. return a.value - b.value
  515. });
  516. let typeKey = "";
  517. companyTypeList.map(function (item) {
  518. if (type1 == item.value) {
  519. typeKey = item.label;
  520. };
  521. if (type2 == item.value) {
  522. typeKey = typeKey + "/" + item.label;
  523. };
  524. });
  525. return typeKey;
  526. },
  527. //获取企业行业
  528. getIndustryType(e) {
  529. if (e) {
  530. let theType = '';
  531. industryList.map(function (item) {
  532. if (item.value == e) {
  533. theType = item.key;
  534. };
  535. });
  536. return theType;
  537. }
  538. },
  539. //获取合同状态
  540. getContractType: function (e) {
  541. if (e) {
  542. let theType = '';
  543. contractTypeList.map(function (item) {
  544. if (item.value == e) {
  545. theType = item.key;
  546. };
  547. });
  548. return theType;
  549. }
  550. },
  551. //获取合同类型
  552. getContractState: function (e) {
  553. if (e) {
  554. let theType = '';
  555. contractStateList.map(function (item) {
  556. if (item.value == e) {
  557. theType = item.key;
  558. };
  559. });
  560. return theType;
  561. }
  562. },
  563. //获取需求类型
  564. getDemandType: function (e) {
  565. if (e||e==0) {
  566. let str=e.toString()
  567. let theType = '';
  568. demandTypeList.map(function (item) {
  569. if (item.value == str) {
  570. theType = item.key;
  571. };
  572. });
  573. return theType;
  574. }
  575. },
  576. //获取成果类型
  577. getAchievementCategory: function (e) {
  578. if (e||e=='0') {
  579. let theType = '';
  580. achievementCategoryList.map(function (item) {
  581. if (item.value == e) {
  582. theType = item.key;
  583. };
  584. });
  585. return theType;
  586. }
  587. },
  588. //获取需求和成果审核状态
  589. getTechAuditStatus: function (e) {
  590. if (e) {
  591. let theType = '';
  592. techAuditStatusList.map(function (item) {
  593. if (item.value == e) {
  594. theType = item.key;
  595. };
  596. });
  597. return theType;
  598. }
  599. },
  600. //获取政策审核状态
  601. getauditStatus: function (e) {
  602. if (e||e>=0) {
  603. let tt=e.toString()
  604. let theType = '';
  605. auditStatusLists.map(function (item) {
  606. if (item.value == tt) {
  607. theType = item.key;
  608. };
  609. });
  610. return theType;
  611. }
  612. },
  613. //获取需求和成果审核状态
  614. getMaturity: function (e) {
  615. if (e) {
  616. let theType = '';
  617. maturityList.map(function (item) {
  618. if (item.value == e) {
  619. theType = item.key;
  620. };
  621. });
  622. return theType;
  623. }
  624. },
  625. //获取需求和成果审核状态
  626. getTransferMode: function (e) {
  627. if (e) {
  628. let theType = '';
  629. transferModeList.map(function (item) {
  630. if (item.value == e) {
  631. theType = item.key;
  632. };
  633. });
  634. return theType;
  635. }
  636. },
  637. //获取创新度状态
  638. getInnovation: function (e) {
  639. if (e||e=='0') {
  640. let theType = '';
  641. innovationList.map(function (item) {
  642. if (item.value == e) {
  643. theType = item.key;
  644. };
  645. });
  646. return theType;
  647. }
  648. },
  649. //获取创新度状态
  650. getOrderStatus: function (e) {
  651. if (e) {
  652. let theType = '';
  653. orderStatusList.map(function (item) {
  654. if (item.value == e) {
  655. theType = item.key;
  656. };
  657. });
  658. return theType;
  659. }
  660. },
  661. //科技管理
  662. //活动圈后台管理
  663. getActivityType: function (e) {
  664. if (e) {
  665. let theType = '';
  666. activityType.map(function (item) {
  667. if (item.value == e) {
  668. theType = item.key;
  669. };
  670. });
  671. return theType;
  672. }
  673. },
  674. getActivityForm: function (e) {
  675. if (e) {
  676. let theType = '';
  677. activityForm.map(function (item) {
  678. if (item.value == e) {
  679. theType = item.key;
  680. };
  681. });
  682. return theType;
  683. }
  684. },
  685. //是否展示在首页
  686. gethot: function (e) {
  687. if (e) {
  688. let theType = '';
  689. hot.map(function (item) {
  690. if (item.value == e) {
  691. theType = item.key;
  692. };
  693. });
  694. return theType;
  695. }
  696. },
  697. //是否精品
  698. getboutique: function (e) {
  699. if (e) {
  700. let theType = '';
  701. boutique.map(function (item) {
  702. if (item.value == e) {
  703. theType = item.key;
  704. };
  705. });
  706. return theType;
  707. }
  708. },
  709. //客户类型
  710. getcustomerTyp: function (e) {
  711. if (e) {
  712. let theType = '';
  713. customerTyp.map(function (item) {
  714. if (item.value == e) {
  715. theType = item.key;
  716. };
  717. });
  718. return theType;
  719. }
  720. },
  721. //省份
  722. getcityArr: function (e) {
  723. if (e) {
  724. let theType = '';
  725. cityArr.map(function (item) {
  726. if (item.value == e) {
  727. theType = item.key;
  728. }
  729. });
  730. return theType;
  731. }
  732. },
  733. //客户状态
  734. getcustomerStatue: function (e) {
  735. if (e||e==0) {
  736. let theType = '';
  737. customerStatus.map(function (item) {
  738. if (item.value == e) {
  739. theType = item.key;
  740. };
  741. });
  742. return theType;
  743. }
  744. },
  745. //账户状态
  746. getStatuslist: function (e) {
  747. if (e) {
  748. let theType = '';
  749. statuslist.map(function (item) {
  750. if (item.value == e) {
  751. theType = item.key;
  752. };
  753. });
  754. return theType;
  755. }
  756. },
  757. //意向服务
  758. getCompanyIntention: function (e) {
  759. if (e) {
  760. let theType = '';
  761. intentionalService.map(function (item) {
  762. if (item.value == e) {
  763. theType = item.key;
  764. };
  765. });
  766. return theType;
  767. }
  768. },
  769. //客户标签
  770. getTag: function (e) {
  771. if (e) {
  772. let theType = '';
  773. tag.map(function (item) {
  774. if (item.value == e) {
  775. theType = item.key;
  776. };
  777. });
  778. return theType;
  779. }
  780. },
  781. //最新跟进
  782. getfllowSituation: function (e) {
  783. if (e||e==0) {
  784. let theType = '';
  785. newFollow.map(function (item) {
  786. if (item.value == e) {
  787. theType = item.key;
  788. };
  789. });
  790. return theType;
  791. }
  792. },
  793. //性别
  794. getsex: function (e) {
  795. if (e) {
  796. let theType = '';
  797. sex.map(function (item) {
  798. if (item.value == e) {
  799. theType = item.key;
  800. };
  801. });
  802. return theType;
  803. }
  804. },
  805. //联系方式
  806. getcontact: function (e) {
  807. if (e) {
  808. let theType = '';
  809. contact.map(function (item) {
  810. if (item.value == e) {
  811. theType = item.key;
  812. };
  813. });
  814. return theType;
  815. }
  816. },
  817. //是否文字与数字转换
  818. getWhether: function (e) {
  819. if (e) {
  820. let theType = '';
  821. Whether.map(function (item) {
  822. if (item.value == e) {
  823. theType = item.key;
  824. };
  825. });
  826. return theType;
  827. }
  828. },
  829. //是否实名认证
  830. getCertification: function (e) {
  831. if (e) {
  832. let theType = '';
  833. Certification.map(function (item) {
  834. if (item.value == e) {
  835. theType = item.key;
  836. };
  837. });
  838. return theType;
  839. }
  840. },
  841. //会员状态
  842. getCurrentMember: function (e) {
  843. if (e) {
  844. let theType = '';
  845. currentMember.map(function (item) {
  846. if (item.value == e) {
  847. theType = item.key;
  848. };
  849. });
  850. return theType;
  851. }
  852. },
  853. //会员等级
  854. getLvl: function (e) {
  855. if (e) {
  856. let theType = '';
  857. lvl.map(function (item) {
  858. if (item.value == e) {
  859. theType = item.key;
  860. };
  861. });
  862. return theType;
  863. }
  864. },
  865. //省份转换
  866. getprovince:function(e){
  867. let nub=parseInt(e);
  868. let theType = '';
  869. if (nub<=34) {
  870. provinceList.map(function (item) {
  871. if (item.id == nub) {
  872. theType = item.name;
  873. };
  874. });
  875. }
  876. if(nub>34&&nub<380){
  877. provinceList.map(function (item) {
  878. item.cityList.map(function (city) {
  879. if (city.id == nub) {
  880. theType = city.name;
  881. };
  882. });
  883. });
  884. }
  885. if(nub>=380){
  886. provinceList.map(function (item) {
  887. item.cityList.map(function (city) {
  888. city.areaList.map(function (areas) {
  889. if (areas.id == nub) {
  890. theType = areas.name;
  891. };
  892. });
  893. });
  894. })
  895. }
  896. return theType;
  897. },
  898. //我的业务跟进状态
  899. getStatusFollow:function(e){
  900. let theType = '';
  901. if(e){
  902. theType ='跟进中' ;
  903. }else{
  904. theType ='停止跟进';
  905. }
  906. return theType;
  907. },
  908. //我的业务跟进状态
  909. getContactType:function(e){
  910. if (e) {
  911. let theType = '';
  912. contactType.map(function (item) {
  913. if (item.value == e) {
  914. theType = item.key;
  915. };
  916. });
  917. return theType;
  918. }
  919. },
  920. //社会属性
  921. getSocialAttribute:function(e){
  922. if (e) {
  923. let theType = '';
  924. socialAttribute.map(function (item) {
  925. if (item.value == e) {
  926. theType = item.key;
  927. };
  928. });
  929. return theType;
  930. }
  931. },
  932. //行业
  933. getIndustry:function(e){
  934. if (e) {
  935. let theType = '';
  936. industry.map(function (item) {
  937. if (item.value == e) {
  938. theType = item.key;
  939. };
  940. });
  941. return theType;
  942. }
  943. },
  944. //岗位
  945. getStation:function(e){
  946. if (e) {
  947. let theType = '';
  948. station.map(function (item) {
  949. if (item.value == e) {
  950. theType = item.key;
  951. };
  952. });
  953. return theType;
  954. }
  955. },
  956. //职务
  957. getPost:function(e){
  958. if (e) {
  959. let theType = '';
  960. post.map(function (item) {
  961. if (item.value == e) {
  962. theType = item.key;
  963. };
  964. });
  965. return theType;
  966. }
  967. },
  968. //组织类型
  969. getPattern:function(e){
  970. if (e) {
  971. let theType = '';
  972. patternOrganization.map(function (item) {
  973. if (item.value == e) {
  974. theType = item.key;
  975. };
  976. });
  977. return theType;
  978. }
  979. },
  980. //组织状态
  981. getCondition:function(e){
  982. if (e) {
  983. let theType = '';
  984. conditionOrganization.map(function (item) {
  985. if (item.value == e) {
  986. theType = item.key;
  987. };
  988. });
  989. return theType;
  990. }
  991. },
  992. //品类状态
  993. getCategoryState:function(e){
  994. if (e) {
  995. let theType = '';
  996. categoryState.map(function (item) {
  997. if (item.value == e) {
  998. theType = item.key;
  999. };
  1000. });
  1001. return theType;
  1002. }
  1003. },
  1004. //实名认证
  1005. getAuditStatus:function(index){
  1006. let e=index?index.toString():'';
  1007. if (e) {
  1008. let theType = '';
  1009. auditStatusL.map(function (item) {
  1010. if (item.value == e) {
  1011. theType = item.key;
  1012. };
  1013. });
  1014. return theType;
  1015. }
  1016. },
  1017. //品类状态
  1018. getGameState:function(index){
  1019. if (index||index==0) {
  1020. let theType = '';
  1021. gameState.map(function (item) {
  1022. if (item.value == index) {
  1023. theType = item.key;
  1024. };
  1025. });
  1026. return theType;
  1027. }
  1028. },
  1029. //消息类型
  1030. getMessageType:function(index){
  1031. if (index||index==0) {
  1032. let theType = '';
  1033. gameState.map(function (item) {
  1034. if (item.value == index) {
  1035. theType = item.key;
  1036. };
  1037. });
  1038. return theType;
  1039. }
  1040. },
  1041. //发送目标
  1042. getDesignated:function(index){
  1043. let e=index?index.toString():'';
  1044. if (e) {
  1045. let theType = '';
  1046. designated.map(function (item) {
  1047. if (item.value == e) {
  1048. theType = item.key;
  1049. };
  1050. });
  1051. return theType;
  1052. }
  1053. },
  1054. //客户端
  1055. getClient:function(index){
  1056. let e=index?index.toString():'';
  1057. if (e) {
  1058. let theType = '';
  1059. client.map(function (item) {
  1060. if (item.value == e) {
  1061. theType = item.key;
  1062. };
  1063. });
  1064. return theType;
  1065. }
  1066. },
  1067. //是否置顶
  1068. getStick:function(index){
  1069. let e=index?index.toString():'';
  1070. if (e) {
  1071. let theType = '';
  1072. stick.map(function (item) {
  1073. if (item.value == e) {
  1074. theType = item.key;
  1075. };
  1076. });
  1077. return theType;
  1078. }
  1079. },
  1080. getFeatured:function(index){
  1081. let e=index?index.toString():'';
  1082. if (e) {
  1083. let theType = '';
  1084. featured.map(function (item) {
  1085. if (item.value == e) {
  1086. theType = item.key;
  1087. };
  1088. });
  1089. return theType;
  1090. }
  1091. },
  1092. getActives:function(e){
  1093. if (e) {
  1094. let theType = '';
  1095. actives.map(function (item) {
  1096. if (item.value == e) {
  1097. theType = item.key;
  1098. };
  1099. });
  1100. return theType;
  1101. }
  1102. },
  1103. //意向进度
  1104. getIntentProgress:function(e){
  1105. if (e) {
  1106. let theType = '';
  1107. intentProgress.map(function (item) {
  1108. if (item.value == e) {
  1109. theType = item.key;
  1110. };
  1111. });
  1112. return theType;
  1113. }
  1114. },
  1115. //交易进度
  1116. getTransactionProgress:function(e){
  1117. if (e) {
  1118. let theType = '';
  1119. transactionProgress.map(function (item) {
  1120. if (item.value == e) {
  1121. theType = item.key;
  1122. };
  1123. });
  1124. return theType;
  1125. }
  1126. },
  1127. //合同进度
  1128. getContractProgress:function(e){
  1129. if (e) {
  1130. let theType = '';
  1131. contractProgress.map(function (item) {
  1132. if (item.value == e) {
  1133. theType = item.key;
  1134. };
  1135. });
  1136. return theType;
  1137. }
  1138. },
  1139. //项目进度
  1140. getProjectProgress:function(e){
  1141. if (e) {
  1142. let theType = '';
  1143. projectProgress.map(function (item) {
  1144. if (item.value == e) {
  1145. theType = item.key;
  1146. };
  1147. });
  1148. return theType;
  1149. }
  1150. },
  1151. //订单类型
  1152. getOrderType:function(e){
  1153. if (e||e==0) {
  1154. let str=e.toString()
  1155. let theType = '';
  1156. orderType.map(function (item) {
  1157. if (item.value == str) {
  1158. theType = item.key;
  1159. };
  1160. });
  1161. return theType;
  1162. }
  1163. },
  1164. //订单阶段
  1165. getOrderStage:function(e){
  1166. if (e||e==0) {
  1167. let str=e.toString()
  1168. let theType = '';
  1169. orderStage.map(function (item) {
  1170. if (item.value == str) {
  1171. theType = item.key;
  1172. };
  1173. });
  1174. return theType;
  1175. }
  1176. },
  1177. //订单状态o
  1178. getOrderState:function(e){
  1179. if (e||e==0) {
  1180. let str=e.toString()
  1181. let theType = '';
  1182. orderState.map(function (item) {
  1183. if (item.value == str) {
  1184. theType = item.key;
  1185. };
  1186. });
  1187. return theType;
  1188. }
  1189. },
  1190. //付款状态
  1191. getPaymentState:function(e){
  1192. if (e||e==0) {
  1193. let str=e.toString()
  1194. let theType = '';
  1195. paymentState.map(function (item) {
  1196. if (item.value == str) {
  1197. theType = item.key;
  1198. };
  1199. });
  1200. return theType;
  1201. }
  1202. },
  1203. //订单渠道
  1204. getOrderChannel:function(e){
  1205. if (e||e==0) {
  1206. let str=e.toString()
  1207. let theType = '';
  1208. orderChannel.map(function (item) {
  1209. if (item.value == str) {
  1210. theType = item.key;
  1211. };
  1212. });
  1213. return theType;
  1214. }
  1215. },
  1216. //特批状态
  1217. getApprovedState:function(e){
  1218. if (e||e==0) {
  1219. let str=e.toString()
  1220. let theType = '';
  1221. approvedState.map(function (item) {
  1222. if (item.value == str) {
  1223. theType = item.key;
  1224. };
  1225. });
  1226. return theType;
  1227. }
  1228. },
  1229. //锁定或废除
  1230. getLock:function(e){
  1231. if (e||e==0) {
  1232. let str=e.toString()
  1233. let theType = '';
  1234. lock.map(function (item) {
  1235. if (item.value == str) {
  1236. theType = item.key;
  1237. };
  1238. });
  1239. return theType;
  1240. }
  1241. },
  1242. //支付方式
  1243. getPaymentMethod:function(e){
  1244. if (e||e==0) {
  1245. let str=e.toString()
  1246. let theType = '';
  1247. paymentMethod.map(function (item) {
  1248. if (item.value == str) {
  1249. theType = item.key;
  1250. };
  1251. });
  1252. return theType;
  1253. }
  1254. },
  1255. //交易渠道 transactionProject
  1256. getTransactionChannel:function(e){
  1257. if (e||e==0) {
  1258. let str=e.toString()
  1259. let theType = '';
  1260. transactionChannel.map(function (item) {
  1261. if (item.value == str) {
  1262. theType = item.key;
  1263. };
  1264. });
  1265. return theType;
  1266. }
  1267. },
  1268. //交易科目
  1269. getTransactionProject:function(e){
  1270. if (e||e==0) {
  1271. let str=e.toString()
  1272. let theType = '';
  1273. transactionProject.map(function (item) {
  1274. if (item.value == str) {
  1275. theType = item.key;
  1276. };
  1277. });
  1278. return theType;
  1279. }
  1280. },
  1281. //项目状态
  1282. getProjectState:function(e){
  1283. if (e||e==0) {
  1284. let str=e.toString()
  1285. let theType = '';
  1286. projectState.map(function (item) {
  1287. if (item.value == str) {
  1288. theType = item.key;
  1289. };
  1290. });
  1291. return theType;
  1292. }
  1293. },
  1294. //任务状态
  1295. getTaskStatus:function(e){
  1296. if (e||e==0) {
  1297. let str=e.toString()
  1298. let theType = '';
  1299. taskStatus.map(function (item) {
  1300. if (item.value == str) {
  1301. theType = item.key;
  1302. };
  1303. });
  1304. return theType;
  1305. }
  1306. },
  1307. //公示状态
  1308. getPublishStatus:function(e){
  1309. if (e||e==0) {
  1310. let str=e.toString()
  1311. let theType = '';
  1312. publishStatus.map(function (item) {
  1313. if (item.value == str) {
  1314. theType = item.key;
  1315. };
  1316. });
  1317. return theType;
  1318. }
  1319. },
  1320. //变更状态
  1321. getChangeState:function(e){
  1322. if (e||e==0) {
  1323. let str=e.toString()
  1324. let theType = '';
  1325. changeState.map(function (item) {
  1326. if (item.value == str) {
  1327. theType = item.key;
  1328. };
  1329. });
  1330. return theType;
  1331. }
  1332. },
  1333. //分派情况
  1334. getDistributeState:function(e){
  1335. if (e||e==0) {
  1336. let str=e.toString()
  1337. let theType = '';
  1338. distributeState.map(function (item) {
  1339. if (item.value == str) {
  1340. theType = item.key;
  1341. };
  1342. });
  1343. return theType;
  1344. }
  1345. },
  1346. //客户来源
  1347. getCustomerSource:function(e){
  1348. if (e||e==0) {
  1349. let str=e.toString()
  1350. let theType = '';
  1351. customerSource.map(function (item) {
  1352. if (item.value == str) {
  1353. theType = item.key;
  1354. };
  1355. });
  1356. return theType;
  1357. }
  1358. },
  1359. /* g个人中心开发 */
  1360. //发布状态
  1361. getReleaseStateList:function(e){
  1362. if (e||e==0) {
  1363. let str=e.toString()
  1364. let theType = '';
  1365. releaseStateList.map(function (item) {
  1366. if (item.value == str) {
  1367. theType = item.key;
  1368. };
  1369. });
  1370. return theType;
  1371. }
  1372. },
  1373. //需求发布位置;
  1374. getReleasePositionList:function(e=[]){
  1375. if (e) {
  1376. let theType = [];
  1377. e.map((item)=>{
  1378. releasePosition.map(function (atem) {
  1379. if (atem.value == item) {
  1380. theType.push(atem.key);
  1381. };
  1382. });
  1383. })
  1384. return theType.join(' - ');
  1385. }
  1386. },
  1387. //成果发布位置;
  1388. getAchievementPosition:function(e=[]){
  1389. if (e) {
  1390. let theType = [];
  1391. e.map((item)=>{
  1392. achievementPosition.map(function (atem) {
  1393. if (atem.value == item) {
  1394. theType.push(atem.key);
  1395. };
  1396. });
  1397. })
  1398. return theType.join(' - ');
  1399. }
  1400. },
  1401. getNewPosition:function(e=[]){
  1402. if (e) {
  1403. let theType = [];
  1404. e.map((item)=>{
  1405. newsPosition.map(function (atem) {
  1406. if (atem.value == item) {
  1407. theType.push(atem.key);
  1408. };
  1409. });
  1410. })
  1411. return theType.join(' - ');
  1412. }
  1413. },
  1414. //成果类型;
  1415. getAchievementType:function(e){
  1416. if (e||e==0) {
  1417. let str=e.toString();
  1418. let theType = '';
  1419. achievementType.map(function (item) {
  1420. if (item.value == str) {
  1421. theType = item.key;
  1422. };
  1423. });
  1424. return theType;
  1425. }
  1426. },
  1427. //成果交易形式;
  1428. getTransaction:function(e){
  1429. if (e||e==0) {
  1430. let str=e.toString();
  1431. let theType = '';
  1432. transaction.map(function (item) {
  1433. if (item.value == str) {
  1434. theType = item.key;
  1435. };
  1436. });
  1437. return theType;
  1438. }
  1439. }
  1440. }