tools.js 45 KB

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