tools.js 39 KB

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