tools.js 36 KB

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