tools.js 44 KB

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