tools.js 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415
  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. }
  479. });
  480. },
  481. //获取企业规模
  482. getScaleState(e) {
  483. if (e) {
  484. let theType = '';
  485. scaleList.map(function (item) {
  486. if (item.value == e) {
  487. theType = item.key;
  488. };
  489. });
  490. return theType;
  491. }
  492. },
  493. //获取企业类型
  494. getCompanyType(type1, type2) {
  495. let companyTypeList = [];
  496. for (let i = 0; i < companyType.length; i++) {
  497. companyTypeList.push({
  498. value: companyType[i].value,
  499. label: companyType[i].label
  500. });
  501. if (companyType[i].children) {
  502. for (let j = 0; j < companyType[i].children.length; j++) {
  503. companyTypeList.push({
  504. value: companyType[i].children[j].value,
  505. label: companyType[i].children[j].label
  506. });
  507. };
  508. }
  509. };
  510. companyTypeList.sort(function (a, b) {
  511. return a.value - b.value
  512. });
  513. let typeKey = "";
  514. companyTypeList.map(function (item) {
  515. if (type1 == item.value) {
  516. typeKey = item.label;
  517. };
  518. if (type2 == item.value) {
  519. typeKey = typeKey + "/" + item.label;
  520. };
  521. });
  522. return typeKey;
  523. },
  524. //获取企业行业
  525. getIndustryType(e) {
  526. if (e) {
  527. let theType = '';
  528. industryList.map(function (item) {
  529. if (item.value == e) {
  530. theType = item.key;
  531. };
  532. });
  533. return theType;
  534. }
  535. },
  536. //获取合同状态
  537. getContractType: function (e) {
  538. if (e) {
  539. let theType = '';
  540. contractTypeList.map(function (item) {
  541. if (item.value == e) {
  542. theType = item.key;
  543. };
  544. });
  545. return theType;
  546. }
  547. },
  548. //获取合同类型
  549. getContractState: function (e) {
  550. if (e) {
  551. let theType = '';
  552. contractStateList.map(function (item) {
  553. if (item.value == e) {
  554. theType = item.key;
  555. };
  556. });
  557. return theType;
  558. }
  559. },
  560. //获取需求类型
  561. getDemandType: function (e) {
  562. if (e) {
  563. let theType = '';
  564. demandTypeList.map(function (item) {
  565. if (item.value == e) {
  566. theType = item.key;
  567. };
  568. });
  569. return theType;
  570. }
  571. },
  572. //获取成果类型
  573. getAchievementCategory: function (e) {
  574. if (e) {
  575. let theType = '';
  576. achievementCategoryList.map(function (item) {
  577. if (item.value == e) {
  578. theType = item.key;
  579. };
  580. });
  581. return theType;
  582. }
  583. },
  584. //获取需求和成果审核状态
  585. getTechAuditStatus: function (e) {
  586. if (e) {
  587. let theType = '';
  588. techAuditStatusList.map(function (item) {
  589. if (item.value == e) {
  590. theType = item.key;
  591. };
  592. });
  593. return theType;
  594. }
  595. },
  596. //获取政策审核状态
  597. getauditStatus: function (e) {
  598. if (e||e>=0) {
  599. let tt=e.toString()
  600. let theType = '';
  601. auditStatusLists.map(function (item) {
  602. if (item.value == tt) {
  603. theType = item.key;
  604. };
  605. });
  606. return theType;
  607. }
  608. },
  609. //获取需求和成果审核状态
  610. getMaturity: function (e) {
  611. if (e) {
  612. let theType = '';
  613. maturityList.map(function (item) {
  614. if (item.value == e) {
  615. theType = item.key;
  616. };
  617. });
  618. return theType;
  619. }
  620. },
  621. //获取需求和成果审核状态
  622. getTransferMode: function (e) {
  623. if (e) {
  624. let theType = '';
  625. transferModeList.map(function (item) {
  626. if (item.value == e) {
  627. theType = item.key;
  628. };
  629. });
  630. return theType;
  631. }
  632. },
  633. //获取创新度状态
  634. getInnovation: function (e) {
  635. if (e) {
  636. let theType = '';
  637. innovationList.map(function (item) {
  638. if (item.value == e) {
  639. theType = item.key;
  640. };
  641. });
  642. return theType;
  643. }
  644. },
  645. //获取创新度状态
  646. getOrderStatus: function (e) {
  647. if (e) {
  648. let theType = '';
  649. orderStatusList.map(function (item) {
  650. if (item.value == e) {
  651. theType = item.key;
  652. };
  653. });
  654. return theType;
  655. }
  656. },
  657. //科技管理
  658. //活动圈后台管理
  659. getActivityType: function (e) {
  660. if (e) {
  661. let theType = '';
  662. activityType.map(function (item) {
  663. if (item.value == e) {
  664. theType = item.key;
  665. };
  666. });
  667. return theType;
  668. }
  669. },
  670. getActivityForm: function (e) {
  671. if (e) {
  672. let theType = '';
  673. activityForm.map(function (item) {
  674. if (item.value == e) {
  675. theType = item.key;
  676. };
  677. });
  678. return theType;
  679. }
  680. },
  681. //是否展示在首页
  682. gethot: function (e) {
  683. if (e) {
  684. let theType = '';
  685. hot.map(function (item) {
  686. if (item.value == e) {
  687. theType = item.key;
  688. };
  689. });
  690. return theType;
  691. }
  692. },
  693. //是否精品
  694. getboutique: function (e) {
  695. if (e) {
  696. let theType = '';
  697. boutique.map(function (item) {
  698. if (item.value == e) {
  699. theType = item.key;
  700. };
  701. });
  702. return theType;
  703. }
  704. },
  705. //客户类型
  706. getcustomerTyp: function (e) {
  707. if (e) {
  708. let theType = '';
  709. customerTyp.map(function (item) {
  710. if (item.value == e) {
  711. theType = item.key;
  712. };
  713. });
  714. return theType;
  715. }
  716. },
  717. //省份
  718. getcityArr: function (e) {
  719. if (e) {
  720. let theType = '';
  721. cityArr.map(function (item) {
  722. if (item.value == e) {
  723. theType = item.key;
  724. }
  725. });
  726. return theType;
  727. }
  728. },
  729. //客户状态
  730. getcustomerStatue: function (e) {
  731. if (e||e==0) {
  732. let theType = '';
  733. customerStatus.map(function (item) {
  734. if (item.value == e) {
  735. theType = item.key;
  736. };
  737. });
  738. return theType;
  739. }
  740. },
  741. //账户状态
  742. getStatuslist: function (e) {
  743. if (e) {
  744. let theType = '';
  745. statuslist.map(function (item) {
  746. if (item.value == e) {
  747. theType = item.key;
  748. };
  749. });
  750. return theType;
  751. }
  752. },
  753. //意向服务
  754. getCompanyIntention: function (e) {
  755. if (e) {
  756. let theType = '';
  757. intentionalService.map(function (item) {
  758. if (item.value == e) {
  759. theType = item.key;
  760. };
  761. });
  762. return theType;
  763. }
  764. },
  765. //客户标签
  766. getTag: function (e) {
  767. if (e) {
  768. let theType = '';
  769. tag.map(function (item) {
  770. if (item.value == e) {
  771. theType = item.key;
  772. };
  773. });
  774. return theType;
  775. }
  776. },
  777. //最新跟进
  778. getfllowSituation: function (e) {
  779. if (e||e==0) {
  780. let theType = '';
  781. newFollow.map(function (item) {
  782. if (item.value == e) {
  783. theType = item.key;
  784. };
  785. });
  786. return theType;
  787. }
  788. },
  789. //性别
  790. getsex: function (e) {
  791. if (e) {
  792. let theType = '';
  793. sex.map(function (item) {
  794. if (item.value == e) {
  795. theType = item.key;
  796. };
  797. });
  798. return theType;
  799. }
  800. },
  801. //联系方式
  802. getcontact: function (e) {
  803. if (e) {
  804. let theType = '';
  805. contact.map(function (item) {
  806. if (item.value == e) {
  807. theType = item.key;
  808. };
  809. });
  810. return theType;
  811. }
  812. },
  813. //是否文字与数字转换
  814. getWhether: function (e) {
  815. if (e) {
  816. let theType = '';
  817. Whether.map(function (item) {
  818. if (item.value == e) {
  819. theType = item.key;
  820. };
  821. });
  822. return theType;
  823. }
  824. },
  825. //是否实名认证
  826. getCertification: function (e) {
  827. if (e) {
  828. let theType = '';
  829. Certification.map(function (item) {
  830. if (item.value == e) {
  831. theType = item.key;
  832. };
  833. });
  834. return theType;
  835. }
  836. },
  837. //会员状态
  838. getCurrentMember: function (e) {
  839. if (e) {
  840. let theType = '';
  841. currentMember.map(function (item) {
  842. if (item.value == e) {
  843. theType = item.key;
  844. };
  845. });
  846. return theType;
  847. }
  848. },
  849. //会员等级
  850. getLvl: function (e) {
  851. if (e) {
  852. let theType = '';
  853. lvl.map(function (item) {
  854. if (item.value == e) {
  855. theType = item.key;
  856. };
  857. });
  858. return theType;
  859. }
  860. },
  861. //省份转换
  862. getprovince:function(e){
  863. let nub=parseInt(e);
  864. let theType = '';
  865. if (nub<=34) {
  866. provinceList.map(function (item) {
  867. if (item.id == nub) {
  868. theType = item.name;
  869. };
  870. });
  871. }
  872. if(nub>34&&nub<380){
  873. provinceList.map(function (item) {
  874. item.cityList.map(function (city) {
  875. if (city.id == nub) {
  876. theType = city.name;
  877. };
  878. });
  879. });
  880. }
  881. if(nub>=380){
  882. provinceList.map(function (item) {
  883. item.cityList.map(function (city) {
  884. city.areaList.map(function (areas) {
  885. if (areas.id == nub) {
  886. theType = areas.name;
  887. };
  888. });
  889. });
  890. })
  891. }
  892. return theType;
  893. },
  894. //我的业务跟进状态
  895. getStatusFollow:function(e){
  896. let theType = '';
  897. if(e){
  898. theType ='跟进中' ;
  899. }else{
  900. theType ='停止跟进';
  901. }
  902. return theType;
  903. },
  904. //我的业务跟进状态
  905. getContactType:function(e){
  906. if (e) {
  907. let theType = '';
  908. contactType.map(function (item) {
  909. if (item.value == e) {
  910. theType = item.key;
  911. };
  912. });
  913. return theType;
  914. }
  915. },
  916. //社会属性
  917. getSocialAttribute:function(e){
  918. if (e) {
  919. let theType = '';
  920. socialAttribute.map(function (item) {
  921. if (item.value == e) {
  922. theType = item.key;
  923. };
  924. });
  925. return theType;
  926. }
  927. },
  928. //行业
  929. getIndustry:function(e){
  930. if (e) {
  931. let theType = '';
  932. industry.map(function (item) {
  933. if (item.value == e) {
  934. theType = item.key;
  935. };
  936. });
  937. return theType;
  938. }
  939. },
  940. //岗位
  941. getStation:function(e){
  942. if (e) {
  943. let theType = '';
  944. station.map(function (item) {
  945. if (item.value == e) {
  946. theType = item.key;
  947. };
  948. });
  949. return theType;
  950. }
  951. },
  952. //职务
  953. getPost:function(e){
  954. if (e) {
  955. let theType = '';
  956. post.map(function (item) {
  957. if (item.value == e) {
  958. theType = item.key;
  959. };
  960. });
  961. return theType;
  962. }
  963. },
  964. //组织类型
  965. getPattern:function(e){
  966. if (e) {
  967. let theType = '';
  968. patternOrganization.map(function (item) {
  969. if (item.value == e) {
  970. theType = item.key;
  971. };
  972. });
  973. return theType;
  974. }
  975. },
  976. //组织状态
  977. getCondition:function(e){
  978. if (e) {
  979. let theType = '';
  980. conditionOrganization.map(function (item) {
  981. if (item.value == e) {
  982. theType = item.key;
  983. };
  984. });
  985. return theType;
  986. }
  987. },
  988. //品类状态
  989. getCategoryState:function(e){
  990. if (e) {
  991. let theType = '';
  992. categoryState.map(function (item) {
  993. if (item.value == e) {
  994. theType = item.key;
  995. };
  996. });
  997. return theType;
  998. }
  999. },
  1000. //实名认证
  1001. getAuditStatus:function(index){
  1002. let e=index?index.toString():'';
  1003. if (e) {
  1004. let theType = '';
  1005. auditStatusL.map(function (item) {
  1006. if (item.value == e) {
  1007. theType = item.key;
  1008. };
  1009. });
  1010. return theType;
  1011. }
  1012. },
  1013. //品类状态
  1014. getGameState:function(index){
  1015. let e=index?index.toString():'';
  1016. if (e) {
  1017. let theType = '';
  1018. gameState.map(function (item) {
  1019. if (item.value == e) {
  1020. theType = item.key;
  1021. };
  1022. });
  1023. return theType;
  1024. }
  1025. },
  1026. //消息类型
  1027. getMessageType:function(index){
  1028. let e=index?index.toString():'';
  1029. if (e) {
  1030. let theType = '';
  1031. messageType.map(function (item) {
  1032. if (item.value == e) {
  1033. theType = item.key;
  1034. };
  1035. });
  1036. return theType;
  1037. }
  1038. },
  1039. //发送目标
  1040. getDesignated:function(index){
  1041. let e=index?index.toString():'';
  1042. if (e) {
  1043. let theType = '';
  1044. designated.map(function (item) {
  1045. if (item.value == e) {
  1046. theType = item.key;
  1047. };
  1048. });
  1049. return theType;
  1050. }
  1051. },
  1052. //客户端
  1053. getClient:function(index){
  1054. let e=index?index.toString():'';
  1055. if (e) {
  1056. let theType = '';
  1057. client.map(function (item) {
  1058. if (item.value == e) {
  1059. theType = item.key;
  1060. };
  1061. });
  1062. return theType;
  1063. }
  1064. },
  1065. //是否置顶
  1066. getStick:function(index){
  1067. let e=index?index.toString():'';
  1068. if (e) {
  1069. let theType = '';
  1070. stick.map(function (item) {
  1071. if (item.value == e) {
  1072. theType = item.key;
  1073. };
  1074. });
  1075. return theType;
  1076. }
  1077. },
  1078. getFeatured:function(index){
  1079. let e=index?index.toString():'';
  1080. if (e) {
  1081. let theType = '';
  1082. featured.map(function (item) {
  1083. if (item.value == e) {
  1084. theType = item.key;
  1085. };
  1086. });
  1087. return theType;
  1088. }
  1089. },
  1090. getActives:function(e){
  1091. if (e) {
  1092. let theType = '';
  1093. actives.map(function (item) {
  1094. if (item.value == e) {
  1095. theType = item.key;
  1096. };
  1097. });
  1098. return theType;
  1099. }
  1100. },
  1101. //意向进度
  1102. getIntentProgress:function(e){
  1103. if (e) {
  1104. let theType = '';
  1105. intentProgress.map(function (item) {
  1106. if (item.value == e) {
  1107. theType = item.key;
  1108. };
  1109. });
  1110. return theType;
  1111. }
  1112. },
  1113. //交易进度
  1114. getTransactionProgress:function(e){
  1115. if (e) {
  1116. let theType = '';
  1117. transactionProgress.map(function (item) {
  1118. if (item.value == e) {
  1119. theType = item.key;
  1120. };
  1121. });
  1122. return theType;
  1123. }
  1124. },
  1125. //合同进度
  1126. getContractProgress:function(e){
  1127. if (e) {
  1128. let theType = '';
  1129. contractProgress.map(function (item) {
  1130. if (item.value == e) {
  1131. theType = item.key;
  1132. };
  1133. });
  1134. return theType;
  1135. }
  1136. },
  1137. //项目进度
  1138. getProjectProgress:function(e){
  1139. if (e) {
  1140. let theType = '';
  1141. projectProgress.map(function (item) {
  1142. if (item.value == e) {
  1143. theType = item.key;
  1144. };
  1145. });
  1146. return theType;
  1147. }
  1148. },
  1149. //订单类型
  1150. getOrderType:function(e){
  1151. if (e||e==0) {
  1152. let str=e.toString()
  1153. let theType = '';
  1154. orderType.map(function (item) {
  1155. if (item.value == str) {
  1156. theType = item.key;
  1157. };
  1158. });
  1159. return theType;
  1160. }
  1161. },
  1162. //订单阶段
  1163. getOrderStage:function(e){
  1164. if (e||e==0) {
  1165. let str=e.toString()
  1166. let theType = '';
  1167. orderStage.map(function (item) {
  1168. if (item.value == str) {
  1169. theType = item.key;
  1170. };
  1171. });
  1172. return theType;
  1173. }
  1174. },
  1175. //订单状态o
  1176. getOrderState:function(e){
  1177. if (e||e==0) {
  1178. let str=e.toString()
  1179. let theType = '';
  1180. orderState.map(function (item) {
  1181. if (item.value == str) {
  1182. theType = item.key;
  1183. };
  1184. });
  1185. return theType;
  1186. }
  1187. },
  1188. //付款状态
  1189. getPaymentState:function(e){
  1190. if (e||e==0) {
  1191. let str=e.toString()
  1192. let theType = '';
  1193. paymentState.map(function (item) {
  1194. if (item.value == str) {
  1195. theType = item.key;
  1196. };
  1197. });
  1198. return theType;
  1199. }
  1200. },
  1201. //订单渠道
  1202. getOrderChannel:function(e){
  1203. if (e||e==0) {
  1204. let str=e.toString()
  1205. let theType = '';
  1206. orderChannel.map(function (item) {
  1207. if (item.value == str) {
  1208. theType = item.key;
  1209. };
  1210. });
  1211. return theType;
  1212. }
  1213. },
  1214. //特批状态
  1215. getApprovedState:function(e){
  1216. if (e||e==0) {
  1217. let str=e.toString()
  1218. let theType = '';
  1219. approvedState.map(function (item) {
  1220. if (item.value == str) {
  1221. theType = item.key;
  1222. };
  1223. });
  1224. return theType;
  1225. }
  1226. },
  1227. //锁定或废除
  1228. getLock:function(e){
  1229. if (e||e==0) {
  1230. let str=e.toString()
  1231. let theType = '';
  1232. lock.map(function (item) {
  1233. if (item.value == str) {
  1234. theType = item.key;
  1235. };
  1236. });
  1237. return theType;
  1238. }
  1239. },
  1240. //支付方式
  1241. getPaymentMethod:function(e){
  1242. if (e||e==0) {
  1243. let str=e.toString()
  1244. let theType = '';
  1245. paymentMethod.map(function (item) {
  1246. if (item.value == str) {
  1247. theType = item.key;
  1248. };
  1249. });
  1250. return theType;
  1251. }
  1252. },
  1253. //交易渠道 transactionProject
  1254. getTransactionChannel:function(e){
  1255. if (e||e==0) {
  1256. let str=e.toString()
  1257. let theType = '';
  1258. transactionChannel.map(function (item) {
  1259. if (item.value == str) {
  1260. theType = item.key;
  1261. };
  1262. });
  1263. return theType;
  1264. }
  1265. },
  1266. //交易科目
  1267. getTransactionProject:function(e){
  1268. if (e||e==0) {
  1269. let str=e.toString()
  1270. let theType = '';
  1271. transactionProject.map(function (item) {
  1272. if (item.value == str) {
  1273. theType = item.key;
  1274. };
  1275. });
  1276. return theType;
  1277. }
  1278. },
  1279. //项目状态
  1280. getProjectState:function(e){
  1281. if (e||e==0) {
  1282. let str=e.toString()
  1283. let theType = '';
  1284. projectState.map(function (item) {
  1285. if (item.value == str) {
  1286. theType = item.key;
  1287. };
  1288. });
  1289. return theType;
  1290. }
  1291. },
  1292. //任务状态
  1293. getTaskStatus:function(e){
  1294. if (e||e==0) {
  1295. let str=e.toString()
  1296. let theType = '';
  1297. taskStatus.map(function (item) {
  1298. if (item.value == str) {
  1299. theType = item.key;
  1300. };
  1301. });
  1302. return theType;
  1303. }
  1304. },
  1305. //公示状态
  1306. getPublishStatus:function(e){
  1307. if (e||e==0) {
  1308. let str=e.toString()
  1309. let theType = '';
  1310. publishStatus.map(function (item) {
  1311. if (item.value == str) {
  1312. theType = item.key;
  1313. };
  1314. });
  1315. return theType;
  1316. }
  1317. },
  1318. //变更状态
  1319. getChangeState:function(e){
  1320. if (e||e==0) {
  1321. let str=e.toString()
  1322. let theType = '';
  1323. changeState.map(function (item) {
  1324. if (item.value == str) {
  1325. theType = item.key;
  1326. };
  1327. });
  1328. return theType;
  1329. }
  1330. },
  1331. //分派情况
  1332. getDistributeState:function(e){
  1333. if (e||e==0) {
  1334. let str=e.toString()
  1335. let theType = '';
  1336. distributeState.map(function (item) {
  1337. if (item.value == str) {
  1338. theType = item.key;
  1339. };
  1340. });
  1341. return theType;
  1342. }
  1343. },
  1344. //客户来源
  1345. getCustomerSource:function(e){
  1346. if (e||e==0) {
  1347. let str=e.toString()
  1348. let theType = '';
  1349. customerSource.map(function (item) {
  1350. if (item.value == str) {
  1351. theType = item.key;
  1352. };
  1353. });
  1354. return theType;
  1355. }
  1356. },
  1357. //客户来源
  1358. getSlcRedit:function(e){
  1359. if (e||e==0) {
  1360. let str=e.toString()
  1361. let theType = '';
  1362. slcRedit.map(function (item) {
  1363. if (item.value == str) {
  1364. theType = item.key;
  1365. };
  1366. });
  1367. return theType;
  1368. }
  1369. },
  1370. //客户来源
  1371. getDataGrade:function(e){
  1372. if (e||e==0) {
  1373. let str=e.toString()
  1374. let theType = '';
  1375. dataGrade.map(function (item) {
  1376. if (item.value == str) {
  1377. theType = item.key;
  1378. };
  1379. });
  1380. return theType;
  1381. }
  1382. },
  1383. //客户等级
  1384. getLevel:function(e){
  1385. if (e||e==0) {
  1386. let str=e.toString()
  1387. let theType = '';
  1388. level.map(function (item) {
  1389. if (item.value == str) {
  1390. theType = item.key;
  1391. };
  1392. });
  1393. return theType;
  1394. }
  1395. }
  1396. }