tools.js 36 KB

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