tools.js 44 KB

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