searchArray.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950
  1. // 搜索用的下拉数据列表
  2. import {
  3. payOrderType,
  4. auditType,
  5. auditPaymentType,
  6. orderServerType,
  7. orderAuditType,
  8. rewardModeType,
  9. classTime,
  10. musicClassType,
  11. ProbationPeriodStatus,
  12. downListType,
  13. musicGroupType,
  14. conclusion,
  15. // vipResetType,
  16. // courseViewType,
  17. clientType,
  18. couponType,
  19. backType,
  20. memberEnum,
  21. coupontypeDetail,
  22. issue,
  23. feedbackType,
  24. feedbackTypeDesc,
  25. campState,
  26. catgGoupType,
  27. catRole,
  28. catType,
  29. quiteReason,
  30. payUserType,
  31. levelStatus,
  32. evaluateStatus,
  33. problemType,
  34. schoolUserType
  35. } from "../constant";
  36. // 课程类型
  37. let tenantConfig = sessionStorage.getItem("tenantConfig");
  38. tenantConfig = tenantConfig ? JSON.parse(tenantConfig) : {};
  39. let tenantId = tenantConfig.tenantId;
  40. let courseType = null;
  41. let musicCourseType = null;
  42. if (tenantId == 1) {
  43. musicCourseType = [
  44. {
  45. label: "声部课",
  46. value: "SINGLE"
  47. },
  48. {
  49. label: "合奏课",
  50. value: "MIX"
  51. },
  52. {
  53. label: "基础技能课",
  54. value: "HIGH"
  55. },
  56. {
  57. label: "线上基础技能课",
  58. value: "HIGH_ONLINE"
  59. },
  60. {
  61. label: "乐团网管课",
  62. value: "MUSIC_NETWORK"
  63. },
  64. {
  65. label: "集训声部课",
  66. value: "TRAINING_SINGLE"
  67. },
  68. {
  69. label: "集训合奏课",
  70. value: "TRAINING_MIX"
  71. },
  72. {
  73. label: "课堂课",
  74. value: "CLASSROOM"
  75. },
  76. {
  77. label: "综合课",
  78. value: "COMPREHENSIVE"
  79. }
  80. ];
  81. courseType = [
  82. {
  83. label: "声部课",
  84. value: "SINGLE"
  85. },
  86. {
  87. label: "合奏课",
  88. value: "MIX"
  89. },
  90. {
  91. label: "基础技能课",
  92. value: "HIGH"
  93. },
  94. {
  95. label: "线上基础技能课",
  96. value: "HIGH_ONLINE"
  97. },
  98. {
  99. label: "vip课",
  100. value: "VIP"
  101. },
  102. {
  103. label: "试听课",
  104. value: "DEMO"
  105. },
  106. {
  107. label: "综合课",
  108. value: "COMPREHENSIVE"
  109. },
  110. {
  111. label: "网管课",
  112. value: "PRACTICE"
  113. },
  114. {
  115. label: "乐团网管课",
  116. value: "MUSIC_NETWORK"
  117. },
  118. {
  119. label: "启蒙课",
  120. value: "ENLIGHTENMENT"
  121. },
  122. {
  123. label: "集训声部课",
  124. value: "TRAINING_SINGLE"
  125. },
  126. {
  127. label: "集训合奏课",
  128. value: "TRAINING_MIX"
  129. },
  130. {
  131. label: "课堂课",
  132. value: "CLASSROOM"
  133. },
  134. {
  135. label: "对外课",
  136. value: "COMM"
  137. },
  138. {
  139. label: "直播课",
  140. value: "LIVE"
  141. }
  142. ];
  143. } else {
  144. musicCourseType = [
  145. {
  146. label: "声部课",
  147. value: "SINGLE"
  148. },
  149. {
  150. label: "合奏课",
  151. value: "MIX"
  152. },
  153. {
  154. label: "基础技能课",
  155. value: "HIGH"
  156. },
  157. {
  158. label: "集训声部课",
  159. value: "TRAINING_SINGLE"
  160. },
  161. {
  162. label: "集训合奏课",
  163. value: "TRAINING_MIX"
  164. },
  165. {
  166. label: "课堂课",
  167. value: "CLASSROOM"
  168. },
  169. {
  170. label: "综合课",
  171. value: "COMPREHENSIVE"
  172. }
  173. ];
  174. courseType = [
  175. {
  176. label: "声部课",
  177. value: "SINGLE"
  178. },
  179. {
  180. label: "合奏课",
  181. value: "MIX"
  182. },
  183. {
  184. label: "vip课",
  185. value: "VIP"
  186. },
  187. {
  188. label: "试听课",
  189. value: "DEMO"
  190. },
  191. {
  192. label: "综合课",
  193. value: "COMPREHENSIVE"
  194. },
  195. {
  196. label: "网管课",
  197. value: "PRACTICE"
  198. },
  199. {
  200. label: "启蒙课",
  201. value: "ENLIGHTENMENT"
  202. },
  203. {
  204. label: "集训声部课",
  205. value: "TRAINING_SINGLE"
  206. },
  207. {
  208. label: "集训合奏课",
  209. value: "TRAINING_MIX"
  210. },
  211. {
  212. label: "课堂课",
  213. value: "CLASSROOM"
  214. },
  215. {
  216. label: "对外课",
  217. value: "COMM"
  218. },
  219. {
  220. label: "直播课",
  221. value: "LIVE"
  222. }
  223. ];
  224. }
  225. export { courseType, musicCourseType };
  226. export const courseListType = [
  227. {
  228. label: "乐团课",
  229. value: "MUSIC"
  230. },
  231. {
  232. label: "VIP课",
  233. value: "VIP"
  234. },
  235. {
  236. label: "网管课",
  237. value: "PRACTICE"
  238. },
  239. {
  240. label: "直播课",
  241. value: "LIVE"
  242. }
  243. ];
  244. // 考勤状态
  245. export const attendance = [
  246. {
  247. label: "正常签到",
  248. value: 1
  249. },
  250. {
  251. label: "异常签到",
  252. value: 0
  253. }
  254. ];
  255. // 工作类型
  256. export const jobNature = [
  257. {
  258. label: "兼职",
  259. value: "PART_TIME"
  260. },
  261. {
  262. label: "全职",
  263. value: "FULL_TIME"
  264. },
  265. {
  266. label: "劳务",
  267. value: "LABOUR"
  268. }
  269. // { label: '临时工', value: 'TEMPORARY' }
  270. ];
  271. // 老师状态
  272. export const teacherStatus = [
  273. {
  274. label: "正常",
  275. value: "0"
  276. },
  277. {
  278. label: "冻结",
  279. value: "1"
  280. },
  281. {
  282. label: "锁定",
  283. value: "9"
  284. }
  285. ];
  286. export const stuAttendance = [
  287. {
  288. value: "NORMAL",
  289. label: "正常"
  290. },
  291. {
  292. value: "TRUANT",
  293. label: "旷课"
  294. },
  295. {
  296. value: "LEAVE",
  297. label: "请假"
  298. }
  299. ];
  300. // 考勤状态
  301. export const attendanceStatus = [
  302. ...stuAttendance,
  303. {
  304. value: "QUIT_SCHOOL",
  305. label: "休学"
  306. },
  307. {
  308. value: "DROP_OUT",
  309. label: "退学"
  310. },
  311. {
  312. value: "LATE",
  313. label: "迟到"
  314. }
  315. // { value: "DROP_OUT", label: "休学" }
  316. ];
  317. // 交易状态
  318. export const orderStatus = [
  319. {
  320. value: "APPLY",
  321. label: "报名"
  322. },
  323. {
  324. value: "RENEW",
  325. label: "续费"
  326. },
  327. {
  328. value: "MEMBER",
  329. label: "会员购买"
  330. },
  331. {
  332. value: "SMALL_CLASS_TO_BUY",
  333. label: "VIP购买"
  334. },
  335. {
  336. value: "SPORADIC",
  337. label: "零星收费"
  338. },
  339. {
  340. value: "LUCK",
  341. label: "福袋活动"
  342. },
  343. {
  344. value: "DEGREE_REGISTRATION",
  345. label: "考级报名"
  346. },
  347. {
  348. value: "DOUBLE_ELEVEN2020",
  349. label: "2020双十一活动"
  350. },
  351. {
  352. value: "DOUBLE_ELEVEN2021",
  353. label: "2021双十一活动"
  354. },
  355. {
  356. value: "DEGREE",
  357. label: "儿童节活动"
  358. },
  359. {
  360. value: "PRACTICE_GROUP_BUY",
  361. label: "网管课"
  362. },
  363. {
  364. value: "PRACTICE_GROUP_RENEW",
  365. label: "网管课续费"
  366. },
  367. {
  368. value: "REPAIR",
  369. label: "乐器维修"
  370. },
  371. {
  372. value: "OUTORDER",
  373. label: "外部收入"
  374. },
  375. {
  376. value: "GOODS_SELL",
  377. label: "商品销售"
  378. },
  379. {
  380. value: "MALL_BUY",
  381. label: "商城销售"
  382. },
  383. {
  384. value: "SUBJECT_CHANGE",
  385. label: "声部更换"
  386. },
  387. {
  388. value: "MAINTENANCE",
  389. label: "乐器保养"
  390. },
  391. {
  392. value: "ADD_STUDENT",
  393. label: "乐团报名"
  394. },
  395. {
  396. value: "REPLACEMENT",
  397. label: "乐器置换"
  398. },
  399. {
  400. value: "SCHOOL",
  401. label: "学校订单"
  402. },
  403. {
  404. value: "PERSONAL",
  405. label: "个人订单"
  406. },
  407. {
  408. value: "OTHER",
  409. label: "其他"
  410. },
  411. {
  412. value: "ACTIVITY",
  413. label: "活动购买"
  414. },
  415. {
  416. value: "LIVE_BUY",
  417. label: "直播购物"
  418. },
  419. {
  420. value: "LIVE_GROUP_BUY",
  421. label: "直播课购买"
  422. }
  423. ];
  424. // 交易状态
  425. export const dealStatus = [
  426. {
  427. value: "ING",
  428. label: "交易中"
  429. },
  430. {
  431. value: "SUCCESS",
  432. label: "成功交易"
  433. },
  434. {
  435. value: "FAILED",
  436. label: "交易失败"
  437. },
  438. {
  439. value: "CLOSE",
  440. label: "交易关闭"
  441. }
  442. ];
  443. export const vipGroupStatus = [
  444. {
  445. value: "0",
  446. text: "未开始"
  447. },
  448. {
  449. value: "1",
  450. text: "报名中"
  451. },
  452. {
  453. value: "5",
  454. text: "报名结束"
  455. },
  456. {
  457. value: "2",
  458. text: "进行中"
  459. },
  460. {
  461. value: "4",
  462. text: "已结束"
  463. },
  464. {
  465. value: "3",
  466. text: "取消"
  467. },
  468. {
  469. value: "6",
  470. text: "暂停"
  471. }
  472. ];
  473. // 课程状态
  474. export const courseStatus = [
  475. {
  476. value: "NOT_START",
  477. label: "未开始"
  478. },
  479. {
  480. value: "UNDERWAY",
  481. label: "进行中"
  482. },
  483. {
  484. value: "OVER",
  485. label: "已结束"
  486. }
  487. ];
  488. export const courseGroupStatus = [
  489. {
  490. value: "NORMAL",
  491. label: "正常"
  492. },
  493. {
  494. value: "LOCK",
  495. label: "锁定"
  496. },
  497. {
  498. value: "FINISH",
  499. label: "结束"
  500. },
  501. {
  502. value: "CANCEL",
  503. label: "取消"
  504. }
  505. ];
  506. export const commGroupStatus = [
  507. {
  508. value: "NORMAL",
  509. label: "进行中"
  510. },
  511. {
  512. value: "FINISH",
  513. label: "结束"
  514. },
  515. {
  516. value: "CANCEL",
  517. label: "关闭"
  518. },
  519. {
  520. value: "LOCK",
  521. label: "锁定"
  522. }
  523. ];
  524. // 老师时间充值状态
  525. export const teacherTimeStatus = [
  526. {
  527. value: "RECHARGE",
  528. label: "充值"
  529. },
  530. {
  531. value: "CONSUME",
  532. label: "建课"
  533. },
  534. {
  535. value: "RETURN",
  536. label: "退课"
  537. },
  538. {
  539. value: "MANUAL_ADD",
  540. label: "系统充值"
  541. },
  542. {
  543. value: "MANUAL_SUB",
  544. label: "系统扣除"
  545. }
  546. ];
  547. export const practiceGroupType = [
  548. {
  549. value: "FREE",
  550. label: "免费"
  551. },
  552. {
  553. value: "CHARGE",
  554. label: "收费"
  555. },
  556. {
  557. value: "TRIAL",
  558. label: "试听课"
  559. },
  560. {
  561. value: "CARE_PACKAGE",
  562. label: "关心包"
  563. },
  564. {
  565. value: "COME_ON_PACKAGE",
  566. label: "加油包"
  567. }
  568. ];
  569. export const visitChiose = [
  570. {
  571. value: "课程推荐",
  572. label: "课程推荐",
  573. children: [
  574. {
  575. value: "新课推荐",
  576. label: "新课推荐"
  577. },
  578. {
  579. value: "续费提醒",
  580. label: "续费提醒"
  581. }
  582. ]
  583. },
  584. {
  585. value: "常规回访",
  586. label: "常规回访",
  587. children: [
  588. {
  589. value: "课后及训练回访",
  590. label: "课后及训练回访"
  591. },
  592. {
  593. value: "练习及乐团表现",
  594. label: "练习及乐团表现"
  595. }
  596. ]
  597. },
  598. {
  599. value: "其它",
  600. label: "其它",
  601. children: [
  602. {
  603. value: "其它",
  604. label: "其它"
  605. }
  606. ]
  607. }
  608. ];
  609. export const visitChiose1 = [
  610. {
  611. value: "课程推荐",
  612. label: "课程推荐",
  613. children: [
  614. {
  615. value: "新课推荐",
  616. label: "新课推荐"
  617. },
  618. {
  619. value: "续费提醒",
  620. label: "续费提醒"
  621. }
  622. ]
  623. },
  624. {
  625. value: "常规回访",
  626. label: "常规回访",
  627. children: [
  628. {
  629. value: "课后及训练回访",
  630. label: "课后及训练回访"
  631. },
  632. {
  633. value: "练习及乐团表现",
  634. label: "练习及乐团表现"
  635. },
  636. {
  637. label: "考勤申诉",
  638. value: "考勤申诉"
  639. },
  640. {
  641. value: "异常请假回访",
  642. label: "异常请假回访"
  643. }
  644. ]
  645. },
  646. {
  647. value: "小课回访",
  648. label: "小课回访",
  649. children: [
  650. {
  651. value: "续费类回访",
  652. label: "续费类回访"
  653. },
  654. {
  655. value: "服务回访",
  656. label: "服务回访"
  657. },
  658. {
  659. value: "其他",
  660. label: "其他"
  661. }
  662. ]
  663. },
  664. {
  665. value: "云教练",
  666. label: "云教练",
  667. children: [
  668. {
  669. value: "体验回访",
  670. label: "体验回访"
  671. }
  672. ]
  673. },
  674. {
  675. value: "其它",
  676. label: "其它",
  677. children: [
  678. {
  679. value: "其它",
  680. label: "其它"
  681. },
  682. {
  683. value: "会员续费",
  684. label: "会员续费"
  685. }
  686. ]
  687. }
  688. ];
  689. // 交易状态
  690. export const paymentChannelStatus = [
  691. {
  692. value: "YQPAY",
  693. label: "双乾"
  694. },
  695. {
  696. value: "BALANCE",
  697. label: "余额"
  698. },
  699. {
  700. value: "ADAPAY",
  701. label: "汇付"
  702. }
  703. ];
  704. // 销售类型
  705. export const saleStatus = [
  706. {
  707. value: "INSTRUMENT",
  708. label: "乐器销售"
  709. },
  710. {
  711. value: "ACCESSORIES",
  712. label: "配件销售"
  713. },
  714. {
  715. value: "SCHOOL_BUY",
  716. label: "学校采购"
  717. },
  718. {
  719. value: "OTHER",
  720. label: "其它"
  721. }
  722. ];
  723. // 商品类型
  724. export const goodsType = [
  725. {
  726. value: "INSTRUMENT",
  727. label: "乐器"
  728. },
  729. {
  730. value: "ACCESSORIES",
  731. label: "辅件"
  732. },
  733. {
  734. value: "TEACHING",
  735. label: "教材"
  736. },
  737. {
  738. value: "STAFF",
  739. label: "教谱"
  740. },
  741. {
  742. value: "OTHER",
  743. label: "其它"
  744. }
  745. ];
  746. export const classStatus = [
  747. {
  748. value: "1",
  749. label: "一年级"
  750. },
  751. {
  752. value: "2",
  753. label: "二年级"
  754. },
  755. {
  756. value: "3",
  757. label: "三年级"
  758. },
  759. {
  760. value: "4",
  761. label: "四年级"
  762. },
  763. {
  764. value: "5",
  765. label: "五年级"
  766. },
  767. {
  768. value: "6",
  769. label: "六年级"
  770. },
  771. {
  772. value: "7",
  773. label: "初一"
  774. },
  775. {
  776. value: "8",
  777. label: "初二"
  778. },
  779. {
  780. value: "9",
  781. label: "初三"
  782. },
  783. {
  784. value: "10",
  785. label: "高一"
  786. },
  787. {
  788. value: "11",
  789. label: "高二"
  790. },
  791. {
  792. value: "12",
  793. label: "高三"
  794. }
  795. ];
  796. // 库存类型
  797. export const stockType = [
  798. {
  799. value: "INTERNAL",
  800. label: "内部"
  801. },
  802. {
  803. value: "EXTERNAL",
  804. label: "外部"
  805. },
  806. {
  807. value: "ALL",
  808. label: "全部"
  809. }
  810. ];
  811. // export const musicGroupStatus = [
  812. // { value: 'DRAFT', text: '编辑中' },
  813. // { value: 'AUDIT', text: '审核中' },
  814. // { value: 'PRE_APPLY', text: '预报名中' },
  815. // { value: 'DRAFT', text: '创建缴费中' },
  816. // { value: 'APPLY', text: '报名中' },
  817. // { value: 'PAY', text: '缴费中' },
  818. // { value: 'PREPARE', text: '筹备中' },
  819. // { value: 'PROGRESS', text: '进行中' },
  820. // { value: 'FEE_AUDIT', text: '费用审核中' },
  821. // { value: 'AUDIT_FAILED', text: '审核失败' },
  822. // { value: 'PAUSE', text: '暂停' },
  823. // { value: 'CANCELED', text: '取消' },
  824. // { value: 'CLOSE', text: '已关闭' },
  825. // ]
  826. export const vipResetTypeList = [
  827. {
  828. label: "不限制",
  829. value: "1"
  830. },
  831. {
  832. label: "线上不可调为线下",
  833. value: "0"
  834. },
  835. {
  836. label: "线下不可调为线上",
  837. value: "2"
  838. },
  839. {
  840. label: "线上线下不可互调",
  841. value: "3"
  842. }
  843. ];
  844. export const musicGroupStatus = getValueForKey(musicGroupType);
  845. export const classTimeList = getValueForKey(classTime);
  846. export const courseViewTypeList = [
  847. {
  848. label: "课程收费",
  849. value: 0
  850. },
  851. {
  852. label: "会员收费",
  853. value: 2
  854. },
  855. {
  856. label: "免费",
  857. value: 3
  858. }
  859. ];
  860. export const payOrderTypeList = getValueForKey(payOrderType);
  861. export const auditTypeList = getValueForKey(auditType);
  862. export const auditPaymentTypeList = getValueForKey(auditPaymentType);
  863. export const orderServerList = getValueForKey(orderServerType);
  864. export const orderAuditTypeList = getValueForKey(orderAuditType);
  865. export const rewardModeTypeList = getValueForKey(rewardModeType);
  866. export const musicClassTypeList = getValueForKey(musicClassType);
  867. export const ProbationPeriodList = getValueForKey(ProbationPeriodStatus);
  868. export const downTypeList = getValueForKey(downListType);
  869. export const conclusionList = getValueForKey(conclusion);
  870. export const clientList = getValueForKey(clientType);
  871. export const couponTypeList = getValueForKey(couponType);
  872. export const backTypeList = getValueForKey(backType);
  873. export const memberEnumList = getValueForKey(memberEnum);
  874. export const coupontypeDetailList = getValueForKey(coupontypeDetail);
  875. export const issueList = getValueForKey(issue);
  876. export const feedbackTypeList = getValueForKey(feedbackType);
  877. export const feedbackTypeDescList = getValueForKey(feedbackTypeDesc);
  878. export const campStateList = getValueForKey(campState);
  879. export const catgGoupTypeList = getValueForKey(catgGoupType);
  880. export const catRoleList = getValueForKey(catRole);
  881. export const catTypeList = getValueForKey(catType);
  882. export const quiteReasonList = getValueForKey(quiteReason);
  883. export const payUserTypeList = getValueForKey(payUserType);
  884. export const levelStatusList = getValueForKey(levelStatus);
  885. export const evaluateStatusList = getValueForKey(evaluateStatus);
  886. export const problemTypeList = getValueForKey(problemType);
  887. export const schoolUserTypeList = getValueForKey(schoolUserType);
  888. //downListType
  889. function getValueForKey(obj) {
  890. let arr = [];
  891. for (let k in obj) {
  892. arr.push({
  893. label: obj[k],
  894. value: k
  895. });
  896. }
  897. return arr;
  898. }
  899. export const array2object = (array, [lk, vk] = ["value", "label"]) => {
  900. const object = {};
  901. if (array && array.length) {
  902. for (const item of array) {
  903. object[item[lk]] = item[vk];
  904. }
  905. }
  906. return object;
  907. };
  908. // export {
  909. // courseType,
  910. // attendance,
  911. // jobNature,
  912. // teacherStatus,
  913. // attendanceStatus,
  914. // orderStatus,
  915. // dealStatus,
  916. // musicGroupStatus,
  917. // vipGroupStatus,
  918. // courseStatus,
  919. // teacherTimeStatus,
  920. // courseGroupStatus,
  921. // commGroupStatus,
  922. // courseListType,
  923. // practiceGroupType,
  924. // visitChiose,
  925. // paymentChannelStatus,
  926. // saleStatus,
  927. // goodsType,
  928. // classStatus,
  929. // stockType,
  930. // classTimeList
  931. // }