payInfoDetail.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874
  1. <template>
  2. <div class="m-container">
  3. <div class="payInfoWrap">
  4. <div class="left">
  5. <el-page-header
  6. @back="goback"
  7. style="padding-bottom: 30px"
  8. :content="
  9. $route.query.payUserType == 'SCHOOL' ? '学校缴费' : '学员缴费'
  10. "
  11. >
  12. </el-page-header>
  13. <div class="m-core">
  14. <el-form :inline="true" :model="form" label-width="120px" ref="form">
  15. <div class="payTitle">
  16. <div class="squrt"></div>
  17. <p>基础信息设置</p>
  18. </div>
  19. <el-form-item
  20. prop="paymentDate"
  21. :rules="[
  22. { required: true, message: '请选择缴费时间', trigger: 'blur' },
  23. ]"
  24. >
  25. <template slot="label">
  26. <p style="position: relative">
  27. <span style="color: #f56c6c; margin-right: 4px">*</span>
  28. 缴费时间
  29. <el-tooltip placement="top" popper-class="mTooltip">
  30. <div slot="content">在改时间段内学员才可缴费</div>
  31. <i
  32. class="el-icon-question"
  33. style="
  34. font-size: 18px;
  35. color: #f56c6c;
  36. position: relative;
  37. top: 2px;
  38. "
  39. ></i>
  40. </el-tooltip>
  41. </p>
  42. </template>
  43. <el-date-picker
  44. v-model="form.paymentDate"
  45. type="daterange"
  46. style="width: 280px"
  47. :picker-options="{ firstDayOfWeek: 1 }"
  48. value-format="yyyy-MM-dd"
  49. range-separator="-"
  50. start-placeholder="开始日期"
  51. end-placeholder="结束日期"
  52. >
  53. </el-date-picker>
  54. </el-form-item>
  55. <el-row>
  56. <el-form-item
  57. prop="memo"
  58. :rules="[
  59. { required: true, message: '请输入备注', trigger: 'blur' },
  60. ]"
  61. >
  62. <template slot="label">
  63. <p style="position: relative">
  64. <span style="color: #f56c6c; margin-right: 4px">*</span>
  65. 备注
  66. <el-tooltip placement="top" popper-class="mTooltip">
  67. <div slot="content">本次缴费的内容描述</div>
  68. <i
  69. class="el-icon-question"
  70. style="
  71. font-size: 18px;
  72. color: #f56c6c;
  73. position: relative;
  74. top: 2px;
  75. "
  76. ></i>
  77. </el-tooltip>
  78. </p>
  79. </template>
  80. <el-input
  81. type="textarea"
  82. style="width: 280px"
  83. :rows="2"
  84. v-model="form.memo"
  85. maxlength="50"
  86. show-word-limit
  87. ></el-input>
  88. </el-form-item>
  89. </el-row>
  90. <div class="payTitle">
  91. <div class="squrt"></div>
  92. <p>基础项目配置</p>
  93. </div>
  94. <div class="checkWrap">
  95. <div
  96. class="checkBtn"
  97. :class="[
  98. teamCourse ? 'active' : '',
  99. teamCourseDisabled ? 'disabled' : '',
  100. ]"
  101. @click.prevent="
  102. () => {
  103. if (teamCourseDisabled) return;
  104. teamCourse = !teamCourse;
  105. if (teamCourse && form.eclass.length < 0) {
  106. form.eclass = [];
  107. form.eclass.push({});
  108. }
  109. }
  110. "
  111. >
  112. <p>乐团课</p>
  113. <el-checkbox
  114. v-model="teamCourse"
  115. :disabled="teamCourseDisabled"
  116. ></el-checkbox>
  117. </div>
  118. <div
  119. class="checkBtn"
  120. :class="[
  121. member ? 'active' : '',
  122. memberDisabled ? 'disabled' : '',
  123. ]"
  124. @click.prevent="
  125. () => {
  126. if (memberDisabled) return;
  127. member = !member;
  128. if (member && form.memberList.length < 0) {
  129. form.memberList = [];
  130. form.memberList.push({});
  131. }
  132. }
  133. "
  134. >
  135. <p>团练宝</p>
  136. <el-checkbox
  137. v-model="member"
  138. :disabled="memberDisabled"
  139. ></el-checkbox>
  140. </div>
  141. <div
  142. v-if="isShowLeBao"
  143. class="checkBtn"
  144. :class="[
  145. leBao ? 'active' : '',
  146. leBaoDisabled ? 'disabled' : '',
  147. ]"
  148. @click.prevent="
  149. () => {
  150. if (leBaoDisabled) return;
  151. leBao = !leBao;
  152. if (leBao && form.leBaoList.length < 0) {
  153. form.leBaoList = [];
  154. form.leBaoList.push({});
  155. }
  156. }
  157. "
  158. >
  159. <p>乐保</p>
  160. <el-checkbox
  161. v-model="leBao"
  162. :disabled="leBaoDisabled"
  163. ></el-checkbox>
  164. </div>
  165. <div
  166. class="checkBtn"
  167. :class="[
  168. teamActive ? 'active' : '',
  169. teamActiveDisabled ? 'disabled' : '',
  170. ]"
  171. @click.prevent="
  172. () => {
  173. if (teamActiveDisabled) return;
  174. teamActive = !teamActive;
  175. if (teamActive && form.activeList.length < 0) {
  176. form.activeList = [];
  177. form.activeList.push({});
  178. }
  179. }
  180. "
  181. >
  182. <p>乐团活动</p>
  183. <el-checkbox
  184. v-model="teamActive"
  185. :disabled="teamActiveDisabled"
  186. ></el-checkbox>
  187. </div>
  188. </div>
  189. <div class="coreList">
  190. <payTeamCourse
  191. :form="form"
  192. :charges="charges"
  193. :courseUnitPriceSettingsByType="
  194. organizationCourseUnitPriceSettingsByType
  195. "
  196. v-if="teamCourse"
  197. @create="addExtraClass"
  198. @remove="removeExtraClass"
  199. @moneyChange="syncAllMoney"
  200. @priceChange="priceChange"
  201. />
  202. <payMember
  203. :memberRankList="memberRankList"
  204. @moneyChange="syncAllMoney"
  205. @priceChange="priceChange"
  206. :rulesForm="rulesForm"
  207. :organId="organId"
  208. :form="form"
  209. v-if="member"
  210. />
  211. <payLeBao :form="form" v-if="leBao" :leBaoInfo="leBaoInfo" />
  212. <payTeamActive
  213. :form="form"
  214. v-if="teamActive"
  215. :activeList="activeList"
  216. @create="addActive"
  217. @remove="removeActive"
  218. />
  219. </div>
  220. </el-form>
  221. <div v-if="!teamCourse && !member && !leBao && !teamActive">
  222. <empty desc="暂无缴费项目配置" />
  223. </div>
  224. <div v-else class="submitBtn" @click="submitForm">确认提交</div>
  225. </div>
  226. </div>
  227. </div>
  228. <el-dialog
  229. title="报名声部预览"
  230. :visible.sync="dialogSubjectVisible"
  231. width="400px"
  232. class="subjectPreview"
  233. >
  234. <subject-preview
  235. :preViewData="preViewData"
  236. ></subject-preview>
  237. </el-dialog>
  238. </div>
  239. </template>
  240. <script>
  241. import payTeamCourse from "../modals/payTeamCourse";
  242. import payMember from "../modals/payMember";
  243. import payLeBao from "../modals/payLeBao";
  244. import payTeamActive from "../modals/payTeamActive";
  245. import numeral from "numeral";
  246. import dayjs from "dayjs";
  247. import subjectPreview from "@/views/resetTeaming/modals/subject-preview";
  248. import {
  249. chargeTypeList,
  250. musicGroupOrganizationCourseSettingsQueryPage,
  251. } from "@/api/specialSetting";
  252. import { getSysTenantConfig } from "@/views/courseRulersManager/api";
  253. import { sysConfigList } from "@/api/generalSettings";
  254. import {
  255. queryByMusicGroupOrganizationCourseSettingsId,
  256. getAllmemberRank,
  257. musicGroupcreateCalender,
  258. musicGroupresetCalender,
  259. } from "../api";
  260. import { getMusicGroupPaymentCalenderDetail } from "@/api/buildTeam";
  261. import { vipGroupActivity } from "@/api/vipSeting";
  262. export default {
  263. components: {
  264. payTeamCourse,
  265. payMember,
  266. payLeBao,
  267. payTeamActive,
  268. },
  269. data() {
  270. return {
  271. form: {
  272. paymentType: "",
  273. memo: "",
  274. eclass: [{}],
  275. memberList: [
  276. {
  277. period: "",
  278. num: "",
  279. actualAmount: "",
  280. memberRankSettingId: "",
  281. optionalFlag: null,
  282. },
  283. ],
  284. leBaoList: [{}],
  285. activeList: [{}],
  286. leixing: "2",
  287. },
  288. teamCourse: false,
  289. teamCourseDisabled: false,
  290. member: false,
  291. memberDisabled: false,
  292. teamActive: false,
  293. teamActiveDisabled: false,
  294. leBao: false,
  295. leBaoDisabled: false,
  296. organizationCourseUnitPriceSettings: null,
  297. baseInfo: null,
  298. courseViewType: null,
  299. charges: null, // 乐团类型对应的收费方式
  300. memberRankList: [],
  301. organId: null,
  302. leBaoInfo: null,
  303. isShowLeBao: false,
  304. isSetCourseSettingsId: false,
  305. activeList: [{}],
  306. submitList: [],
  307. organizationCourseUnitPriceSettingsByType: null,
  308. rulesForm: {
  309. minMonthFee: null,
  310. maxMonthFee: null,
  311. minQuarterlyFee: null,
  312. maxQuarterlyFee: null,
  313. minHalfYearFee: null,
  314. maxHalfYearFee: null,
  315. minYearFee: null,
  316. maxYearFee: null,
  317. },
  318. dialogSubjectVisible: false, // 预览
  319. preViewData: {}
  320. };
  321. },
  322. mounted() {
  323. this.organizationCourseUnitPriceSettings = JSON.parse(
  324. localStorage.getItem("organizationCourseUnitPriceSettings")
  325. );
  326. this.baseInfo = JSON.parse(localStorage.getItem("payMusicBase"));
  327. // 判断乐团状态 缴费类型
  328. this.init();
  329. },
  330. methods: {
  331. async init() {
  332. this.organId = this.musicGroup?.organId;
  333. this.courseViewType = this.baseInfo?.musicGroup?.courseViewType;
  334. if (
  335. this.courseViewType != 2 &&
  336. this.$route.query.team_status == "PRE_BUILD_FEE"
  337. ) {
  338. // 课程团的创建缴费
  339. this.teamCourse = true;
  340. this.teamCourseDisabled = true;
  341. this.form.paymentType = "MUSIC_APPLY";
  342. } else if (
  343. this.courseViewType == 2 &&
  344. this.$route.query.team_status == "PRE_BUILD_FEE"
  345. ) {
  346. // 会员团的创建缴费
  347. this.member = true;
  348. this.memberDisabled = true;
  349. }
  350. if (this.$route.query.payUserType == "SCHOOL") {
  351. this.member = false;
  352. this.memberDisabled = true;
  353. this.leBao = false;
  354. this.teamActive = false;
  355. this.leBaoDisabled = true;
  356. this.teamActiveDisabled = true;
  357. }
  358. await this.getCharges(); // 续费的选择缴费类型
  359. await this.formatCourse(); // 临时加课的类型选择以及价格
  360. await this.getMemberList(); // 获取会员(团练保信息)
  361. await this.getLeBao(); // 获取乐保
  362. await this.getActive(); // 获取活动
  363. await this.getMemberRules()
  364. if (this.$route.query.calenderId) {
  365. // 说明是修改 查缴项目详情
  366. getMusicGroupPaymentCalenderDetail({
  367. id: this.$route.query.calenderId,
  368. }).then((res) => {
  369. if (res.code == 200) {
  370. if (res.data?.calender?.musicGroupOrganizationCourseSettingId) {
  371. this.form.leixing = "1";
  372. this.form.musicGroupOrganizationCourseSettingId =
  373. res.data?.calender?.musicGroupOrganizationCourseSettingId;
  374. } else {
  375. this.form.leixing = "2";
  376. }
  377. this.$set(this.form, "paymentDate", [
  378. res.data?.calender?.startPaymentDate,
  379. res.data?.calender?.deadlinePaymentDate,
  380. ]);
  381. this.$set(this.form, "memo", res.data?.calender?.memo);
  382. this.$set(
  383. this.form,
  384. "payUserType",
  385. res.data?.calender?.payUserType
  386. );
  387. if (res.data.member) {
  388. // 团练保
  389. this.member = true;
  390. this.$set(this.form, "memberList", [{ ...res.data.member }]);
  391. }
  392. if (res.data.repair) {
  393. this.leBao = true;
  394. this.$set(this.form, "leBaoList", [{ ...res.data.repair }]);
  395. }
  396. if (res.data?.course?.length > 0) {
  397. this.$nextTick(() => {
  398. this.teamCourse = true;
  399. this.isSetCourseSettingsId = true;
  400. this.$set(this.form, "eclass", res.data?.course);
  401. });
  402. }
  403. if (res.data?.activity?.length > 0) {
  404. this.teamActive = true;
  405. this.$set(this.form, "activeList", res.data.activity);
  406. this.form.activeList.forEach((active) => {
  407. active.vipGroupCategoryNames = active.categoryName;
  408. });
  409. }
  410. }
  411. });
  412. }
  413. if (this.submitList.length > 0) {
  414. this.$bus.$emit("showguide", this.submitList);
  415. return;
  416. }
  417. },
  418. getActive() {
  419. return vipGroupActivity({
  420. organId: this.organId,
  421. rows: 10,
  422. page: 1,
  423. status: "PROGRESS",
  424. activityChannel: 1,
  425. enable: true,
  426. }).then((res) => {
  427. if (res.code == 200) {
  428. this.activeList = res.data.rows;
  429. if (this.activeList.length <= 0) {
  430. this.submitList.push("teamActive");
  431. // this.$bus.$emit("showguide", ["teamCourseFee"]);
  432. }
  433. }
  434. });
  435. },
  436. async getMemberRules() {
  437. try {
  438. const res = await sysConfigList({ group: "DEFAULT" });
  439. const paramName = "cloud_price_range";
  440. res.data.forEach((item) => {
  441. if (item.paramName == paramName) {
  442. const itemValue = item.paranValue
  443. ? JSON.parse(item.paranValue)
  444. : null;
  445. if (itemValue) {
  446. this.rulesForm = itemValue;
  447. }
  448. }
  449. });
  450. } catch (e) {
  451. console.log(e);
  452. }
  453. },
  454. async getLeBao() {
  455. try {
  456. const res = await getSysTenantConfig({ group: "MUSIC_REPAIR" });
  457. this.leBaoInfo = res.data;
  458. res.data.forEach((element) => {
  459. if (element.id == 188) {
  460. this.isShowLeBao = !!element.paranValue;
  461. }
  462. });
  463. // this.$forceUpdate()
  464. } catch (e) {
  465. console.log(e);
  466. }
  467. },
  468. async getMemberList() {
  469. try {
  470. const res = await getAllmemberRank({ isDefault: 0 });
  471. this.memberRankList = res.data;
  472. } catch (e) {
  473. console.log(e);
  474. }
  475. },
  476. async getCharges() {
  477. const organId = this.musicGroup?.organId;
  478. const chargeTypeId = this.musicGroup?.chargeTypeId;
  479. this.chargeTypeName = this.musicGroup?.chargeTypeName;
  480. try {
  481. const res = await musicGroupOrganizationCourseSettingsQueryPage({
  482. row: 9999,
  483. chargeTypeId,
  484. organId,
  485. });
  486. const ids = res.data.rows.map((item) => item.id);
  487. if (!ids.includes(this.form.musicGroupOrganizationCourseSettingId)) {
  488. this.$set(this.form, "musicGroupOrganizationCourseSettingId", null);
  489. }
  490. this.charges = res.data.rows;
  491. // this.charges =[];
  492. if (this.charges.length <= 0) {
  493. this.submitList.push("teamCourseType");
  494. }
  495. } catch (error) {}
  496. },
  497. goback() {
  498. let query = { ...this.$route.query };
  499. query.calenderId = null;
  500. if (query.type == "resetTeam") {
  501. this.$store.dispatch("delVisitedViews", this.$route);
  502. this.$router.push({
  503. path: "/business/resetTeaming",
  504. query,
  505. });
  506. } else if (query.type == "look") {
  507. this.$store.dispatch("delVisitedViews", this.$route);
  508. this.$router.push({
  509. path: "/business/resetTeaming",
  510. query,
  511. });
  512. } else if (query.type == "PRE_BUILD_FEE" || query.type == "feeAudit") {
  513. this.$store.dispatch("delVisitedViews", this.$route);
  514. this.$router.push({
  515. path: "/business/resetTeaming",
  516. query,
  517. });
  518. }
  519. },
  520. formatCourse() {
  521. // 格式化课程类型
  522. const organId = this.musicGroup?.organId;
  523. const chargeTypeId = this.musicGroup?.chargeTypeId;
  524. const _ = {};
  525. const list = (this.organizationCourseUnitPriceSettings || []).filter(
  526. (item) =>
  527. organId &&
  528. organId == item.organId &&
  529. chargeTypeId &&
  530. chargeTypeId == item.chargeTypeId
  531. );
  532. for (const item of list) {
  533. _[item.courseType] = item;
  534. }
  535. this.organizationCourseUnitPriceSettingsByType = _;
  536. return _;
  537. },
  538. priceChange(item, index) {
  539. const _ = [...this.form.eclass];
  540. const active =
  541. this.organizationCourseUnitPriceSettingsByType[item.courseType] || {};
  542. const price = Math.round(
  543. numeral(active.unitPrice || 1)
  544. .multiply(item.courseTotalMinuties || 1)
  545. .value()
  546. );
  547. item.courseCurrentPrice = price;
  548. item.courseOriginalPrice = price;
  549. _[index] = item;
  550. this.$set(this.form, "eclass", [..._]);
  551. this.syncAllMoney();
  552. },
  553. syncAllMoney() {
  554. let money = 0;
  555. let first = 0;
  556. let other = 0;
  557. let classs = this.form.eclass;
  558. for (const item of classs) {
  559. money += item.courseCurrentPrice;
  560. if (this.cycles && this.cycles.length) {
  561. if (item.isStudentOptional) {
  562. first += item.courseCurrentPrice;
  563. } else {
  564. const floorMoney = Math.floor(
  565. item.courseCurrentPrice / this.cycles.length
  566. );
  567. const remainder = item.courseCurrentPrice % this.cycles.length;
  568. first += floorMoney + remainder;
  569. other += floorMoney;
  570. }
  571. }
  572. }
  573. // if (!money) {
  574. // this.$set(this.cycle, "paymentAmount", undefined);
  575. // } else {
  576. // this.$set(this.cycle, "paymentAmount", money);
  577. // }
  578. // money += parseFloat(this.memberForm.memberPaymentAmount || 0);
  579. // this.money = money;
  580. return money;
  581. },
  582. addExtraClass() {
  583. this.form.eclass.push({});
  584. },
  585. addActive() {
  586. this.form.activeList.push({});
  587. },
  588. removeActive(index) {
  589. this.form.activeList[index] = null;
  590. this.$set(
  591. this.form,
  592. "activeList",
  593. this.form.activeList.filter((item) => !!item)
  594. );
  595. },
  596. removeExtraClass(index) {
  597. this.form.eclass[index] = null;
  598. this.$set(
  599. this.form,
  600. "eclass",
  601. this.form.eclass.filter((item) => !!item)
  602. );
  603. // this.form.eclass = this.form.eclass.filter((item) => !!item);
  604. },
  605. submitForm() {
  606. this.$refs.form.validate(async (isok) => {
  607. if (isok) {
  608. // const preViewData = this.formatPreviewData()
  609. // this.preViewData = preViewData
  610. // this.dialogSubjectVisible = true
  611. let obj = this.fommatDate();
  612. if (this.$route.query.calenderId) {
  613. obj.calenderId = this.$route.query.calenderId;
  614. try {
  615. const res = await musicGroupresetCalender(obj);
  616. this.$message.success("修改缴费成功");
  617. this.goback();
  618. } catch (e) {
  619. console.log(e);
  620. }
  621. } else {
  622. try {
  623. const res = await musicGroupcreateCalender(obj);
  624. this.$message.success("创建缴费成功");
  625. this.goback();
  626. } catch (e) {
  627. console.log(e);
  628. }
  629. }
  630. }
  631. });
  632. },
  633. formatPreviewData() {
  634. // 格式化预览数据
  635. const form = this.form
  636. // 重置小班课数据
  637. let activeList = form.activeList?.length > 0 ? form.activeList : []
  638. if(activeList.length > 0) {
  639. activeList.forEach(active => {
  640. active.categoryName = active.vipGroupCategoryNames
  641. })
  642. }
  643. return {
  644. musicGroup: this.musicGroup,
  645. activity: [...activeList], // 小班课
  646. course: form.eclass?.length > 0 ? form.eclass : [], // 课程
  647. member: form.memberList?.length > 0 ? { ...form.memberList[0] } : null, // 团练宝
  648. memberPrivilegesItemList: [], // 会员基本内容
  649. repair: form.leBaoList?.length > 0 ? { ...form.leBaoList[0] } : null, // 乐保
  650. }
  651. },
  652. fommatDate() {
  653. return {
  654. payUserType: this.$route.query.payUserType,
  655. musicGroupOrganizationCourseSettingId:
  656. this.form.musicGroupOrganizationCourseSettingId || null,
  657. memo: this.form.memo,
  658. startPaymentDate: this.form.paymentDate[0],
  659. deadlinePaymentDate: this.form.paymentDate[1],
  660. calenderActivityList:
  661. this.form.activeList?.length > 0 ? this.form.activeList : null,
  662. musicRepair:
  663. this.form.leBaoList?.length > 0
  664. ? { ...this.form.leBaoList[0] }
  665. : null,
  666. calenderMember:
  667. this.form.memberList?.length > 0
  668. ? { ...this.form.memberList[0] }
  669. : null,
  670. musicGroupPaymentCalenderCourseSettingsList:
  671. this.form.eclass?.length > 0 ? this.form.eclass : null,
  672. musicGroupId: this.$route.query.id,
  673. };
  674. },
  675. },
  676. watch: {
  677. teamCourse(val) {
  678. if (!val) {
  679. this.$set(this.form, "eclass", [{}]);
  680. this.$set(this.form, "leixing", "2");
  681. }
  682. },
  683. member(val) {
  684. if (!val) {
  685. this.$set(this.form, "memberList", [{}]);
  686. }
  687. },
  688. teamActive(val) {
  689. if (!val) {
  690. this.$set(this.form, "activeList", [{}]);
  691. }
  692. },
  693. leBao(val) {
  694. if (!val) {
  695. this.$set(this.form, "leBaoList", [{}]);
  696. }
  697. },
  698. async "form.musicGroupOrganizationCourseSettingId"(val) {
  699. // && !this.rowDetail
  700. if (val && !this.isSetCourseSettingsId && !this.$route.query.calenderId) {
  701. try {
  702. const res = await queryByMusicGroupOrganizationCourseSettingsId({
  703. id: val,
  704. });
  705. this.$set(this.form, "eclass", res.data);
  706. // this.syncAllMoney();
  707. } catch (error) {}
  708. }
  709. this.isSetCourseSettingsId = false;
  710. },
  711. "form.leixing"(val) {
  712. this.cycles = [{}];
  713. this.collapse = [0];
  714. this.cycle = {};
  715. if (val != "1") {
  716. this.$set(
  717. this.form,
  718. "musicGroupOrganizationCourseSettingId",
  719. undefined
  720. );
  721. }
  722. // this.$set(this.cycle, "paymentAmount", undefined);
  723. // this.$set(this.other, "memo", null);
  724. if (val === "1" && !this.isSetCourseSettingsId) {
  725. this.$set(this.form, "eclass", []);
  726. } else if (val === "2") {
  727. this.$set(this.form, "eclass", [{}]);
  728. }
  729. this.isSetCourseSettingsId = false;
  730. },
  731. },
  732. computed: {
  733. musicGroup() {
  734. return this.baseInfo?.musicGroup;
  735. },
  736. },
  737. };
  738. </script>
  739. <style lang="scss" scoped>
  740. /deep/.el-form-item__label:before {
  741. content: "" !important;
  742. position: absolute;
  743. color: transparent;
  744. margin-right: 4px;
  745. }
  746. .payInfoWrap {
  747. .submitBtn {
  748. width: 121px;
  749. height: 41px;
  750. background: var(--color-primary);
  751. border-radius: 7px;
  752. margin: 20px auto;
  753. line-height: 40px;
  754. color: #fff;
  755. text-align: center;
  756. cursor: pointer;
  757. }
  758. .left {
  759. /deep/.el-checkbox {
  760. padding: 8px 10px 7px 10px;
  761. border-radius: 4px;
  762. }
  763. /deep/.el-checkbox .el-checkbox__inner {
  764. border-radius: 50%;
  765. border: 1px solid var(--color-primary);
  766. width: 16px;
  767. height: 16px;
  768. &:after {
  769. height: 8px;
  770. left: 5px;
  771. }
  772. }
  773. /deep/.el-checkbox__inner:hover {
  774. background-color: var(--color-primary);
  775. }
  776. /deep/.el-checkbox.is-checked {
  777. border-color: #fff;
  778. color: #fff;
  779. }
  780. .payTitle {
  781. display: flex;
  782. flex-direction: row;
  783. align-items: center;
  784. font-size: 18px;
  785. font-weight: 600;
  786. color: #1a1a1a;
  787. height: 25px;
  788. margin-bottom: 15px;
  789. p {
  790. line-height: 25px;
  791. }
  792. .squrt {
  793. width: 4px;
  794. height: 16px;
  795. background: var(--color-primary);
  796. margin-right: 5px;
  797. position: relative;
  798. top: -1px;
  799. }
  800. }
  801. .checkWrap {
  802. display: flex;
  803. flex-direction: row;
  804. justify-content: flex-start;
  805. .checkBtn.active {
  806. background-color: var(--color-primary);
  807. color: #fff;
  808. /deep/.el-checkbox .el-checkbox__inner {
  809. border: 1px solid #fff;
  810. }
  811. }
  812. .checkBtn {
  813. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  814. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  815. transition-property: border-color, background-color;
  816. transition-duration: 0.25s, 0.25s;
  817. transition-timing-function: cubic-bezier(0.71, -0.46, 0.29, 1.46),
  818. cubic-bezier(0.71, -0.46, 0.29, 1.46);
  819. transition-delay: 0s, 0s;
  820. margin-right: 12px;
  821. padding-left: 14px;
  822. display: flex;
  823. flex-direction: row;
  824. align-items: center;
  825. cursor: pointer;
  826. background: rgba(20, 146, 138, 0.12);
  827. border-radius: 6px;
  828. height: 41px;
  829. &:hover {
  830. background-color: var(--color-primary);
  831. color: #fff;
  832. /deep/.el-checkbox__inner {
  833. background-color: var(--color-primary);
  834. border: 1px solid #fff;
  835. }
  836. }
  837. p {
  838. height: 41px;
  839. line-height: 41px;
  840. }
  841. }
  842. .checkBtn.disabled {
  843. cursor: not-allowed;
  844. color: #d9d9d9;
  845. background-color: #f2f2f2 !important;
  846. /deep/.el-checkbox__inner {
  847. background-color: #fff !important;
  848. border-color: #d9d9d9;
  849. color: #fff;
  850. &::after {
  851. border-color: #d9d9d9;
  852. }
  853. }
  854. &:hover {
  855. background-color: #f2f2f2 !important;
  856. color: #d9d9d9;
  857. /deep/.el-checkbox__inner {
  858. background-color: #fff !important;
  859. }
  860. }
  861. }
  862. }
  863. }
  864. }
  865. </style>