tools.js 38 KB

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