tools.js 37 KB

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