searchArray.js 15 KB

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