tools.js 39 KB

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