tools.js 42 KB

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