tools.js 35 KB

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