tools.js 39 KB

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