tools.js 41 KB

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