tools.js 43 KB

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