tools.js 38 KB

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