tools.js 43 KB

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