payInfoDetail.vue 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626
  1. <template>
  2. <div class="m-container1">
  3. <el-page-header
  4. @back="goback"
  5. style="padding: 20px"
  6. :content="$route.query.payUserType == 'SCHOOL' ? '学校缴费' : '学员缴费'"
  7. >
  8. </el-page-header>
  9. <div class="payInfoWrap">
  10. <div class="left">
  11. <!-- <div class="Wall"></div> -->
  12. <div class="m-core1">
  13. <el-form :inline="true" :model="form" label-width="120px" ref="form">
  14. <div :class="isField ? 'baseWrapFixed' : 'baseWrap'">
  15. <div class="payTitle">
  16. <div class="squrt"></div>
  17. <p>基础项目配置</p>
  18. <div class="payContext">请选择您需要的课程配置</div>
  19. <el-form-item
  20. label="计价标准"
  21. class="vertical"
  22. prop="isShowMusicInsuranceForPay"
  23. v-if="$route.query.payUserType == 'SCHOOL'"
  24. >
  25. <el-select
  26. size="mini"
  27. v-model="form.calenderFeeType"
  28. placeholder="请选择计价标准"
  29. >
  30. <el-option label="按学生" value="STUDENT"> </el-option>
  31. <el-option
  32. label="按老师"
  33. value="TEACHER"
  34. :disabled="!teamCourse"
  35. >
  36. </el-option>
  37. </el-select>
  38. </el-form-item>
  39. </div>
  40. <div class="checkWrap">
  41. <div
  42. class="checkBtn"
  43. :class="[
  44. teamCourse ? 'active' : '',
  45. teamCourseDisabled ? 'disabled' : ''
  46. ]"
  47. :style="{ opacity: teamCourseDisabled ? '0.5' : '1' }"
  48. @click.prevent="
  49. () => {
  50. if (teamCourseDisabled) return;
  51. teamCourse = !teamCourse;
  52. if (teamCourse && form.eclass.length < 0) {
  53. form.eclass = [];
  54. form.eclass.push({});
  55. }
  56. if (!teamCourse) {
  57. form.calenderFeeType = 'STUDENT';
  58. }
  59. // 会员收费 创建续费 默认选中,不可取消选中
  60. if (
  61. courseViewType == 2 &&
  62. $route.query.team_status == 'PROGRESS'
  63. ) {
  64. member = false;
  65. memberDisabled = false;
  66. if (teamCourse) {
  67. member = true;
  68. memberDisabled = true;
  69. if (member && form.memberList.length < 0) {
  70. form.memberList = [];
  71. form.memberList.push({});
  72. }
  73. }
  74. }
  75. }
  76. "
  77. >
  78. <div class="checkLeft">
  79. <img src="../images/checkIcon1.png" alt="" />
  80. </div>
  81. <div class="checkRight">
  82. <p>乐团课</p>
  83. <p class="checkSubTitle">创建课程类型标准</p>
  84. </div>
  85. <div class="checTriangle" v-if="teamCourse">
  86. <img src="../images/checkGou.png" alt="" />
  87. </div>
  88. <!-- <el-checkbox
  89. v-model="teamCourse"
  90. :disabled="teamCourseDisabled"
  91. ></el-checkbox> -->
  92. </div>
  93. <div
  94. class="checkBtn"
  95. :class="[
  96. member ? 'active' : '',
  97. memberDisabled ? 'disabled' : ''
  98. ]"
  99. :style="{ opacity: memberDisabled ? '0.5' : '1' }"
  100. @click.prevent="
  101. () => {
  102. if (memberDisabled) return;
  103. member = !member;
  104. if (member && form.memberList.length < 0) {
  105. form.memberList = [];
  106. form.memberList.push({});
  107. }
  108. }
  109. "
  110. >
  111. <div class="checkLeft">
  112. <img src="../images/checkIcon2.png" alt="" />
  113. </div>
  114. <div class="checkRight">
  115. <p>云练习</p>
  116. <p class="checkSubTitle">乐团训练工具</p>
  117. </div>
  118. <div class="checTriangle" v-if="member">
  119. <img src="../images/checkGou.png" alt="" />
  120. </div>
  121. </div>
  122. <div
  123. v-if="
  124. isShowLeBao &&
  125. tenantId == 1 &&
  126. $route.query.team_status != 'PROGRESS'
  127. "
  128. class="checkBtn"
  129. :class="[
  130. leBao ? 'active' : '',
  131. leBaoDisabled ? 'disabled' : ''
  132. ]"
  133. :style="{ opacity: leBaoDisabled ? '0.5' : '1' }"
  134. @click.prevent="
  135. () => {
  136. if (leBaoDisabled) return;
  137. leBao = !leBao;
  138. if (leBao && form.leBaoList.length < 0) {
  139. form.leBaoList = [];
  140. form.leBaoList.push({});
  141. }
  142. }
  143. "
  144. >
  145. <div class="checkLeft">
  146. <img src="../images/checkIcon3.png" alt="" />
  147. </div>
  148. <div class="checkRight">
  149. <p>乐保</p>
  150. <p class="checkSubTitle">乐器维修保养</p>
  151. </div>
  152. <div class="checTriangle" v-if="leBao">
  153. <img src="../images/checkGou.png" alt="" />
  154. </div>
  155. </div>
  156. <div
  157. class="checkBtn"
  158. :class="[
  159. teamActive ? 'active' : '',
  160. teamActiveDisabled ? 'disabled' : ''
  161. ]"
  162. :style="{ opacity: teamActiveDisabled ? '0.5' : '1' }"
  163. @click.prevent="
  164. () => {
  165. if (teamActiveDisabled) return;
  166. teamActive = !teamActive;
  167. if (teamActive && form.activeList.length < 0) {
  168. form.activeList = [];
  169. form.activeList.push({});
  170. }
  171. }
  172. "
  173. >
  174. <div class="checkLeft">
  175. <img src="../images/checkIcon4.png" alt="" />
  176. </div>
  177. <div class="checkRight">
  178. <p>小课</p>
  179. <p class="checkSubTitle">创建活动课程方案</p>
  180. </div>
  181. <div class="checTriangle" v-if="teamActive">
  182. <img src="../images/checkGou.png" alt="" />
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. <div class="wall" style="height: 184px" v-if="isField"></div>
  188. <div class="coreList">
  189. <payTeamCourse
  190. :form="form"
  191. :charges="charges"
  192. :courseUnitPriceSettingsByType="
  193. organizationCourseUnitPriceSettingsByType
  194. "
  195. v-if="teamCourse"
  196. @create="addExtraClass"
  197. @remove="removeExtraClass"
  198. @moneyChange="syncAllMoney"
  199. @priceChange="priceChange"
  200. @priceChange2="priceChange2"
  201. />
  202. <payMember
  203. ref="payMember"
  204. :memberRankList="memberRankList"
  205. @moneyChange="syncAllMoney"
  206. @priceChange="priceChange"
  207. :rulesForm="rulesForm"
  208. :organId="organId"
  209. :showAutoActivationFlag="showAutoActivationFlag"
  210. :form="form"
  211. v-if="member"
  212. />
  213. <payLeBao :form="form" v-if="leBao" :leBaoInfo="leBaoInfo" />
  214. <payTeamActive
  215. :form="form"
  216. v-if="teamActive"
  217. :activeList="activeList"
  218. @create="addActive"
  219. @remove="removeActive"
  220. />
  221. <paySchoolInfo
  222. :form="form"
  223. :courseUnitPriceSettingsByType="
  224. organizationCourseUnitPriceSettingsByType
  225. "
  226. :teamCourse="teamCourse"
  227. :member="member"
  228. :teamActive="teamActive"
  229. :leBao="leBao"
  230. @setAllTotal="setAllTotal"
  231. v-if="$route.query.payUserType == 'SCHOOL'"
  232. @checkType="checkType"
  233. />
  234. <backMoney
  235. v-if="
  236. $route.query.payUserType == 'SCHOOL' &&
  237. form.currentTotalAmount > 0
  238. "
  239. :form="form"
  240. />
  241. </div>
  242. <div
  243. class="teamCourseList coreList"
  244. v-if="$route.query.payUserType == 'STUDENT'"
  245. >
  246. <div class="coreTitle">
  247. <p>基础信息设置</p>
  248. </div>
  249. <el-row :gutter="20">
  250. <el-col style="width: 430px">
  251. <el-form-item
  252. prop="paymentDate"
  253. :rules="[
  254. {
  255. required: true,
  256. message: '请选择缴费时间',
  257. trigger: 'blur'
  258. }
  259. ]"
  260. ref="paymentDate"
  261. >
  262. <template slot="label">
  263. <p style="position: relative">
  264. <span style="color: #f56c6c; margin-right: 4px">*</span>
  265. 缴费时间
  266. <el-tooltip placement="top" popper-class="mTooltip">
  267. <div slot="content">在该时间段内学员才可缴费</div>
  268. <i
  269. class="el-icon-question"
  270. style="
  271. font-size: 18px;
  272. color: #f56c6c;
  273. position: relative;
  274. top: 2px;
  275. "
  276. ></i>
  277. </el-tooltip>
  278. </p>
  279. </template>
  280. <el-date-picker
  281. v-model="form.paymentDate"
  282. type="daterange"
  283. style="width: 280px"
  284. :picker-options="{ firstDayOfWeek: 1 }"
  285. value-format="yyyy-MM-dd"
  286. range-separator="-"
  287. start-placeholder="开始日期"
  288. end-placeholder="结束日期"
  289. >
  290. </el-date-picker>
  291. </el-form-item>
  292. </el-col>
  293. <el-col style="width: 430px">
  294. <!-- :rules="[
  295. {
  296. required: true,
  297. message: '请选择缴费时间',
  298. trigger: 'blur',
  299. },
  300. ]" -->
  301. <el-form-item prop="isShowSalePrice" ref="isShowSalePrice">
  302. <template slot="label">
  303. <p style="position: relative">
  304. <!-- <span style="color: #f56c6c; margin-right: 4px">*</span> -->
  305. 是否展示售价
  306. <!-- <el-tooltip placement="top" popper-class="mTooltip">
  307. <div slot="content">在该时间段内学员才可缴费</div>
  308. <i
  309. class="el-icon-question"
  310. style="
  311. font-size: 18px;
  312. color: #f56c6c;
  313. position: relative;
  314. top: 2px;
  315. "
  316. ></i>
  317. </el-tooltip> -->
  318. </p>
  319. </template>
  320. <el-select v-model="form.isShowSalePrice">
  321. <el-option label="是" :value="true"> </el-option>
  322. <el-option label="否" :value="false"> </el-option>
  323. </el-select>
  324. </el-form-item>
  325. </el-col>
  326. </el-row>
  327. <el-row>
  328. <el-col class="memoWrap">
  329. <el-form-item
  330. class="memoWrapItem"
  331. prop="memo"
  332. :rules="[
  333. {
  334. required: true,
  335. message: '请输入备注',
  336. trigger: 'blur'
  337. }
  338. ]"
  339. ref="memo"
  340. >
  341. <template slot="label">
  342. <p style="position: relative">
  343. <span style="color: #f56c6c; margin-right: 4px">*</span>
  344. 备注
  345. <el-tooltip placement="top" popper-class="mTooltip">
  346. <div slot="content">本次缴费的内容描述</div>
  347. <i
  348. class="el-icon-question"
  349. style="
  350. font-size: 18px;
  351. color: #f56c6c;
  352. position: relative;
  353. top: 2px;
  354. "
  355. ></i>
  356. </el-tooltip>
  357. </p>
  358. </template>
  359. <el-input
  360. style="width: 100%"
  361. :rows="3"
  362. v-model="form.memo"
  363. type="textarea"
  364. maxlength="50"
  365. show-word-limit
  366. ></el-input>
  367. </el-form-item>
  368. </el-col>
  369. </el-row>
  370. </div>
  371. </el-form>
  372. <div
  373. v-if="
  374. !teamCourse &&
  375. !member &&
  376. !leBao &&
  377. !teamActive &&
  378. $route.query.team_status == 'PROGRESS'
  379. "
  380. >
  381. <empty desc="暂无缴费项目配置" />
  382. </div>
  383. <div v-else style="text-align: center">
  384. <el-button class="submitBtn" @click="submitForm">确认</el-button>
  385. </div>
  386. <!-- <div style="text-align: center">
  387. <el-button class="submitBtn" @click="submitForm">确认</el-button>
  388. </div> -->
  389. </div>
  390. </div>
  391. </div>
  392. <el-dialog
  393. title="报名声部预览"
  394. :visible.sync="dialogSubjectVisible"
  395. width="400px"
  396. class="subjectPreview"
  397. v-if="dialogSubjectVisible"
  398. >
  399. <el-tabs v-model="activeName" type="card">
  400. <el-tab-pane
  401. :label="subject.subName"
  402. lazy
  403. v-for="(subject, index) in dialogSubjectList"
  404. :key="index"
  405. :name="subject.subjectId.toString()"
  406. style="max-height: 500px; overflow-y: auto"
  407. >
  408. <subject-preview
  409. :subjectId="subject.subjectId"
  410. :preViewData="preViewData"
  411. ></subject-preview>
  412. </el-tab-pane>
  413. </el-tabs>
  414. <div>
  415. <el-button
  416. style="width: 100%; border-radius: 0; line-height: 30px"
  417. size="medium"
  418. type="primary"
  419. @click="onSubmit"
  420. >确认提交</el-button
  421. >
  422. </div>
  423. </el-dialog>
  424. </div>
  425. </template>
  426. <script>
  427. import payTeamCourse from "../modals/payTeamCourse";
  428. import payMember from "../modals/payMember";
  429. import payLeBao from "../modals/payLeBao";
  430. import payTeamActive from "../modals/payTeamActive";
  431. import paySchoolInfo from "../modals/paySchoolInfo";
  432. import backMoney from "../modals/backMoney";
  433. import numeral from "numeral";
  434. import dayjs from "dayjs";
  435. import subjectPreview from "@/views/resetTeaming/modals/subject-preview";
  436. import {
  437. chargeTypeList,
  438. musicGroupOrganizationCourseSettingsQueryPage
  439. } from "@/api/specialSetting";
  440. import { getSysTenantConfig } from "@/views/courseRulersManager/api";
  441. import { sysConfigList } from "@/api/generalSettings";
  442. import {
  443. queryByMusicGroupOrganizationCourseSettingsId,
  444. getAllmemberRank,
  445. musicGroupcreateCalender,
  446. musicGroupresetCalender,
  447. getAutoActivationFlag
  448. } from "../api";
  449. import {
  450. getMusicGroupPaymentCalenderDetail,
  451. findMusicGroupSubjectInfo,
  452. getAgreement
  453. } from "@/api/buildTeam";
  454. import { vipGroupActivity } from "@/api/vipSeting";
  455. export default {
  456. components: {
  457. payTeamCourse,
  458. payMember,
  459. payLeBao,
  460. payTeamActive,
  461. subjectPreview,
  462. paySchoolInfo,
  463. backMoney
  464. },
  465. data() {
  466. return {
  467. form: {
  468. paymentType: "",
  469. memo: "",
  470. eclass: [{}],
  471. memberList: [
  472. {
  473. period: "",
  474. num: "",
  475. name: "",
  476. actualAmount: "",
  477. memberRankSettingId: "",
  478. optionalFlag: null,
  479. autoActivationFlag: false
  480. }
  481. ],
  482. leBaoList: [{}],
  483. activeList: [{}],
  484. teacherFeeList: [],
  485. isShowMemberForPay: true,
  486. isShowMusicInsuranceForPay: true,
  487. isShowVipCourseForPay: true,
  488. isShowMusicCourseForPay: true,
  489. leixing: "1",
  490. isShowSalePrice: true,
  491. calenderFeeJson: {
  492. discountTotal: "",
  493. allTotal: "",
  494. sutdentNumber: ""
  495. },
  496. calenderFeeType: "STUDENT",
  497. musicGroupCalenderRefundPeriods: [{ refundDate: "", refundAmount: "" }],
  498. currentTotalAmount: 0,
  499. contractUrl: ""
  500. },
  501. teamCourse: false,
  502. member: false,
  503. teamActive: false,
  504. leBao: false,
  505. memberDisabled: false,
  506. teamCourseDisabled: false,
  507. teamActiveDisabled: false,
  508. leBaoDisabled: false,
  509. organizationCourseUnitPriceSettings: null,
  510. baseInfo: null,
  511. courseViewType: null,
  512. charges: null, // 乐团收费类型对应的收费方式
  513. memberRankList: [],
  514. organId: null,
  515. leBaoInfo: null,
  516. isShowLeBao: false,
  517. isSetCourseSettingsId: false,
  518. activeList: [{}],
  519. submitList: [],
  520. organizationCourseUnitPriceSettingsByType: null,
  521. rulesForm: {
  522. minMonthFee: null,
  523. maxMonthFee: null,
  524. minQuarterlyFee: null,
  525. maxQuarterlyFee: null,
  526. minHalfYearFee: null,
  527. maxHalfYearFee: null,
  528. minYearFee: null,
  529. maxYearFee: null
  530. },
  531. dialogSubjectVisible: false, // 预览
  532. dialogSubjectList: [],
  533. activeName: null,
  534. preViewData: {},
  535. tenantId: null,
  536. isField: false,
  537. showAutoActivationFlag: false,
  538. initDetail: false
  539. };
  540. },
  541. mounted() {
  542. let tenantConfig = sessionStorage.getItem("tenantConfig");
  543. tenantConfig = tenantConfig ? JSON.parse(tenantConfig) : {};
  544. if (tenantConfig.tenantId && tenantConfig.tenantId != "undefined") {
  545. this.tenantId = tenantConfig.tenantId;
  546. }
  547. this.organizationCourseUnitPriceSettings = JSON.parse(
  548. localStorage.getItem("organizationCourseUnitPriceSettings")
  549. );
  550. this.baseInfo = JSON.parse(localStorage.getItem("payMusicBase"));
  551. // 判断乐团状态 缴费类型
  552. window.addEventListener("scroll", this.getScroll);
  553. this.init();
  554. },
  555. beforeDestroy() {
  556. window.removeEventListener("scroll", this.getScroll);
  557. },
  558. methods: {
  559. async init() {
  560. this.organId = this.musicGroup?.organId;
  561. this.courseViewType = this.baseInfo?.musicGroup?.courseViewType;
  562. if (
  563. this.courseViewType != 2 &&
  564. this.$route.query.team_status == "DRAFT"
  565. ) {
  566. // 课程团的创建缴费
  567. this.teamCourse = true;
  568. // 现在课程团不在
  569. // this.teamCourseDisabled = true;
  570. this.form.paymentType = "MUSIC_APPLY";
  571. } else if (
  572. this.courseViewType == 2 &&
  573. this.$route.query.team_status == "DRAFT"
  574. ) {
  575. // 会员团的创建缴费
  576. this.member = true;
  577. this.memberDisabled = true;
  578. // 乐团创建缴费时,若乐团【收费模式】为【会员收费】,则缴费项目中【课程】【会员】两项都默认选中且必选,不可去掉
  579. this.teamCourse = true;
  580. this.teamCourseDisabled = true;
  581. } else if (this.$route.query.team_status == "PROGRESS") {
  582. this.leBao = false;
  583. this.leBaoDisabled = true;
  584. }
  585. if (this.$route.query.payUserType == "SCHOOL") {
  586. // this.member = false;
  587. // this.memberDisabled = true;
  588. this.leBao = false;
  589. this.leBaoDisabled = true;
  590. // this.teamActive = false;
  591. // this.teamActiveDisabled = true;
  592. } else {
  593. }
  594. await this.getCharges(); // 续费的选择缴费类型
  595. await this.formatCourse(); // 临时加课的类型选择以及价格
  596. await this.getMemberList(); // 获取会员(团练保信息)
  597. await this.getLeBao(); // 获取乐保
  598. await this.getActive(); // 获取活动
  599. await this.getMemberRules();
  600. await this.getAgreement(); // 获取是否有正在启用得协议
  601. if (this.$route.query.calenderId) {
  602. // 说明是修改 查缴项目详情
  603. this.initDetail = true;
  604. await getMusicGroupPaymentCalenderDetail({
  605. id: this.$route.query.calenderId
  606. }).then(res => {
  607. if (res.code == 200) {
  608. if (res.data?.calender?.musicGroupOrganizationCourseSettingId) {
  609. this.form.leixing = "1";
  610. this.form.musicGroupOrganizationCourseSettingId =
  611. res.data?.calender?.musicGroupOrganizationCourseSettingId;
  612. this.isSetCourseSettingsId = true;
  613. } else {
  614. this.form.leixing = "2";
  615. }
  616. if (
  617. res.data?.calender?.startPaymentDate &&
  618. res.data?.calender?.deadlinePaymentDate
  619. ) {
  620. this.$set(this.form, "paymentDate", [
  621. res.data?.calender?.startPaymentDate,
  622. res.data?.calender?.deadlinePaymentDate
  623. ]);
  624. }
  625. this.$set(
  626. this.form,
  627. "contractUrl",
  628. res.data?.calender?.contractUrl
  629. );
  630. this.$set(this.form, "memo", res.data?.calender?.memo);
  631. this.$set(
  632. this.form,
  633. "isShowMemberForPay",
  634. res.data?.calender?.paymentItemShowState?.isShowMemberForPay
  635. );
  636. this.$set(
  637. this.form,
  638. "isShowMusicInsuranceForPay",
  639. res.data?.calender?.paymentItemShowState
  640. ?.isShowMusicInsuranceForPay
  641. );
  642. this.$set(
  643. this.form,
  644. "isShowVipCourseForPay",
  645. res.data?.calender?.paymentItemShowState?.isShowVipCourseForPay
  646. );
  647. this.$set(
  648. this.form,
  649. "isShowSalePrice",
  650. res.data?.calender?.isShowSalePrice
  651. );
  652. this.$set(
  653. this.form,
  654. "isShowMusicCourseForPay",
  655. res.data?.calender?.paymentItemShowState?.isShowMusicCourseForPay
  656. );
  657. if (res.data.member) {
  658. // 团练保
  659. this.member = true;
  660. this.$set(this.form, "memberList", [{ ...res.data.member }]);
  661. }
  662. if (res.data.repair) {
  663. this.leBao = true;
  664. this.$set(this.form, "leBaoList", [{ ...res.data.repair }]);
  665. }
  666. if (res.data?.course?.length > 0) {
  667. this.$set(
  668. this.form,
  669. "calenderFeeType",
  670. res.data?.calender?.calenderFeeType
  671. );
  672. this.$nextTick(() => {
  673. this.teamCourse = true;
  674. this.$set(this.form, "eclass", res.data?.course);
  675. console.log(
  676. [...res.data?.course],
  677. "res.data?.course",
  678. this.form
  679. );
  680. this.initDetail = true;
  681. this.$set(
  682. this.form,
  683. "payUserType",
  684. res.data?.calender?.payUserType
  685. );
  686. this.$set(
  687. this.form,
  688. "musicGroupCalenderRefundPeriods",
  689. res.data?.calenderRefundPeriods
  690. );
  691. let calenderFeeJson = res.data?.calender?.calenderFeeJson;
  692. if (calenderFeeJson) {
  693. calenderFeeJson = JSON.parse(calenderFeeJson);
  694. this.$set(this.form, "calenderFeeJson", calenderFeeJson);
  695. if (this.form.calenderFeeType == "TEACHER") {
  696. this.$set(
  697. this.form,
  698. "teacherFeeList",
  699. calenderFeeJson.teacherFeeList
  700. );
  701. }
  702. }
  703. });
  704. } else {
  705. this.$set(
  706. this.form,
  707. "calenderFeeType",
  708. res.data?.calender?.calenderFeeType
  709. );
  710. this.$set(
  711. this.form,
  712. "musicGroupCalenderRefundPeriods",
  713. res.data?.calenderRefundPeriods
  714. );
  715. let calenderFeeJson = res.data?.calender?.calenderFeeJson;
  716. if (calenderFeeJson) {
  717. calenderFeeJson = JSON.parse(calenderFeeJson);
  718. this.$set(this.form, "calenderFeeJson", calenderFeeJson);
  719. }
  720. }
  721. if (res.data?.activity?.length > 0) {
  722. this.teamActive = true;
  723. this.$set(this.form, "activeList", res.data.activity);
  724. this.form.activeList.forEach(active => {
  725. active.vipGroupCategoryNames = active.categoryName;
  726. });
  727. }
  728. }
  729. });
  730. }
  731. if (this.submitList.length > 0) {
  732. this.$bus.$emit("showguide", this.submitList);
  733. }
  734. },
  735. getActive() {
  736. return vipGroupActivity({
  737. organId: this.organId,
  738. rows: 10,
  739. page: 1,
  740. status: "PROGRESS",
  741. activityChannel: 1,
  742. enable: true
  743. }).then(res => {
  744. if (res.code == 200) {
  745. this.activeList = res.data.rows;
  746. if (this.activeList.length <= 0) {
  747. this.submitList.push("teamActive");
  748. // this.$bus.$emit("showguide", ["teamCourseFee"]);
  749. }
  750. }
  751. });
  752. },
  753. async getAgreement() {
  754. try {
  755. const res = await getAgreement();
  756. if (!res.data) {
  757. this.submitList.push("agreement");
  758. }
  759. } catch (e) {}
  760. },
  761. async getMemberRules() {
  762. try {
  763. const res = await sysConfigList({ group: "DEFAULT" });
  764. const paramName = "cloud_price_range";
  765. res.data.forEach(item => {
  766. if (item.paramName == paramName) {
  767. const itemValue = item.paranValue
  768. ? JSON.parse(item.paranValue)
  769. : null;
  770. if (itemValue) {
  771. this.rulesForm = itemValue;
  772. }
  773. }
  774. });
  775. } catch (e) {
  776. console.log(e);
  777. }
  778. },
  779. async getLeBao() {
  780. try {
  781. const res = await getSysTenantConfig({ group: "MUSIC_REPAIR" });
  782. this.leBaoInfo = res.data;
  783. res.data.forEach(element => {
  784. if (element.id == 188) {
  785. this.isShowLeBao = !!element.paranValue;
  786. }
  787. });
  788. // this.$forceUpdate()
  789. } catch (e) {
  790. console.log(e);
  791. }
  792. },
  793. async getMemberList() {
  794. try {
  795. const res = await getAllmemberRank({ isDefault: 0 });
  796. this.memberRankList = res.data;
  797. // 获取是否展示会员是否自动生效
  798. const memberRes = await getAutoActivationFlag();
  799. this.showAutoActivationFlag = memberRes.data;
  800. } catch (e) {
  801. console.log(e);
  802. }
  803. },
  804. async getCharges() {
  805. const organId = this.musicGroup?.organId;
  806. const courseViewType = this.musicGroup?.courseViewType;
  807. try {
  808. const res = await musicGroupOrganizationCourseSettingsQueryPage({
  809. row: 9999,
  810. courseViewType,
  811. organId
  812. });
  813. const ids = res.data.rows.map(item => item.id);
  814. if (!ids.includes(this.form.musicGroupOrganizationCourseSettingId)) {
  815. this.$set(this.form, "musicGroupOrganizationCourseSettingId", null);
  816. }
  817. this.charges = res.data.rows;
  818. // this.charges =[];
  819. if (this.charges.length <= 0) {
  820. this.submitList.push("teamCourseType");
  821. } else {
  822. if (this.form.leixing == 1 && this.teamCourse) {
  823. this.$set(
  824. this.form,
  825. "musicGroupOrganizationCourseSettingId",
  826. this.charges[0].id
  827. );
  828. }
  829. }
  830. } catch (error) {}
  831. },
  832. goback() {
  833. let query = { ...this.$route.query };
  834. query.calenderId = null;
  835. if (query.type == "resetTeam") {
  836. this.$store.dispatch("delVisitedViews", this.$route);
  837. this.$router.push({
  838. path: "/business/resetTeaming",
  839. query
  840. });
  841. } else if (query.type == "look") {
  842. this.$store.dispatch("delVisitedViews", this.$route);
  843. this.$router.push({
  844. path: "/business/resetTeaming",
  845. query
  846. });
  847. } else if (
  848. query.type == "teamDraft" ||
  849. query.type == "feeAudit" ||
  850. query.type == "FEE_AUDIT_FAILED"
  851. ) {
  852. this.$store.dispatch("delVisitedViews", this.$route);
  853. this.$router.push({
  854. path: "/business/resetTeaming",
  855. query
  856. });
  857. }
  858. },
  859. formatCourse() {
  860. // 格式化课程类型
  861. const organId = this.musicGroup?.organId;
  862. const courseViewType = this.musicGroup?.courseViewType;
  863. console.log(
  864. this.musicGroup.courseViewType,
  865. "musicGroup.courseViewType",
  866. this.organizationCourseUnitPriceSettings
  867. );
  868. const _ = {};
  869. const list = (this.organizationCourseUnitPriceSettings || []).filter(
  870. item =>
  871. organId &&
  872. organId == item.organId &&
  873. courseViewType != null &&
  874. courseViewType == item.courseViewType
  875. );
  876. console.log(list, "list");
  877. for (const item of list) {
  878. _[item.courseType] = item;
  879. }
  880. this.organizationCourseUnitPriceSettingsByType = _;
  881. return _;
  882. },
  883. priceChange(item, index) {
  884. const _ = [...this.form.eclass];
  885. const active =
  886. this.organizationCourseUnitPriceSettingsByType[item.courseType] || {};
  887. const price = Math.round(
  888. numeral(active.unitPrice || 1)
  889. .multiply(item.courseTotalMinuties || 1)
  890. .value()
  891. );
  892. item.courseCurrentPrice = price;
  893. item.courseOriginalPrice = price;
  894. _[index] = item;
  895. this.$set(this.form, "eclass", [..._]);
  896. this.syncAllMoney();
  897. },
  898. priceChange2(item, index) {
  899. const _ = [...this.form.eclass];
  900. _[index] = item;
  901. this.$set(this.form, "eclass", [..._]);
  902. },
  903. syncAllMoney() {
  904. let money = 0;
  905. let first = 0;
  906. let other = 0;
  907. let classs = this.form.eclass;
  908. for (const item of classs) {
  909. money += item.courseCurrentPrice;
  910. if (this.cycles && this.cycles.length) {
  911. if (item.isStudentOptional) {
  912. first += item.courseCurrentPrice;
  913. } else {
  914. const floorMoney = Math.floor(
  915. item.courseCurrentPrice / this.cycles.length
  916. );
  917. const remainder = item.courseCurrentPrice % this.cycles.length;
  918. first += floorMoney + remainder;
  919. other += floorMoney;
  920. }
  921. }
  922. }
  923. // if (!money) {
  924. // this.$set(this.cycle, "paymentAmount", undefined);
  925. // } else {
  926. // this.$set(this.cycle, "paymentAmount", money);
  927. // }
  928. // money += parseFloat(this.memberForm.memberPaymentAmount || 0);
  929. // this.money = money;
  930. return money;
  931. },
  932. addExtraClass() {
  933. this.form.eclass.push({});
  934. },
  935. addActive() {
  936. this.form.activeList.push({});
  937. },
  938. removeActive(index) {
  939. this.form.activeList[index] = null;
  940. this.$set(
  941. this.form,
  942. "activeList",
  943. this.form.activeList.filter(item => !!item)
  944. );
  945. },
  946. removeExtraClass(index) {
  947. this.form.eclass[index] = null;
  948. this.$set(this.form, "eclass", this.form.eclass.filter(item => !!item));
  949. // this.form.eclass = this.form.eclass.filter((item) => !!item);
  950. },
  951. async onPreview() {
  952. // 开始预览
  953. const musicGroupId = this.$route.query.id;
  954. await findMusicGroupSubjectInfo({ musicGroupId: musicGroupId }).then(
  955. res => {
  956. if (res.code == 200) {
  957. this.dialogSubjectList = res.data.musicGroupSubjectPlans;
  958. // 默认预览第一个
  959. if (this.dialogSubjectList.length <= 0) {
  960. this.$message.error("请先设置声部信息");
  961. return;
  962. }
  963. this.activeName = this.dialogSubjectList[0].subjectId.toString();
  964. this.dialogSubjectVisible = true;
  965. } else {
  966. this.$message.warning("没有可预览的声部");
  967. }
  968. }
  969. );
  970. },
  971. checkType() {
  972. this.$refs.form.validate();
  973. },
  974. submitForm() {
  975. this.$refs.form.validate(async (isok, obj) => {
  976. if (isok) {
  977. // 学校缴费没有预览
  978. if (this.$route.query.payUserType == "SCHOOL") {
  979. this.$confirm(
  980. this.$route.query.calenderId ? "是否修改缴费" : "是否创建缴费?",
  981. "提示",
  982. {
  983. confirmButtonText: "确定",
  984. cancelButtonText: "取消",
  985. type: "warning"
  986. }
  987. )
  988. .then(() => {
  989. this.onSubmit();
  990. })
  991. .catch(() => {});
  992. } else {
  993. const preViewData = this.formatPreviewData();
  994. this.preViewData = preViewData;
  995. await this.onPreview();
  996. }
  997. } else {
  998. this.$nextTick(() => {
  999. this.scrollView(obj);
  1000. });
  1001. }
  1002. });
  1003. },
  1004. onSubmit() {
  1005. this.$refs.form.validate(async isok => {
  1006. if (isok) {
  1007. let obj = this.fommatDate();
  1008. if (obj.payUserType == "SCHOOL") {
  1009. let total = 0;
  1010. this.form.musicGroupCalenderRefundPeriods.forEach(item => {
  1011. total += item.refundAmount * 1;
  1012. });
  1013. if (total != this.form.currentTotalAmount) {
  1014. this.$message.error("付款金额与回款金额不一致,请重新设置");
  1015. return;
  1016. }
  1017. }
  1018. if (this.$route.query.calenderId) {
  1019. obj.calenderId = this.$route.query.calenderId;
  1020. try {
  1021. const res = await musicGroupresetCalender(obj);
  1022. if (res.code == 200) {
  1023. this.$message.success("修改缴费成功");
  1024. this.goback();
  1025. }
  1026. if (res.code == 207) {
  1027. await this.$confirm(
  1028. res.msg || `当前乐团存在未排课的缴费项目,请再次确认操作`,
  1029. "提示",
  1030. {
  1031. type: "warning"
  1032. }
  1033. );
  1034. obj.confirmCreate = true;
  1035. await musicGroupresetCalender(obj);
  1036. this.$message.success("修改缴费成功");
  1037. this.goback();
  1038. }
  1039. } catch (e) {
  1040. console.log(e);
  1041. }
  1042. } else {
  1043. try {
  1044. const res = await musicGroupcreateCalender(obj);
  1045. if (res.code == 200) {
  1046. this.$message.success("创建缴费成功");
  1047. this.goback();
  1048. }
  1049. if (res.code == 207) {
  1050. await this.$confirm(
  1051. res.msg || `当前乐团存在未排课的缴费项目,请再次确认操作`,
  1052. "提示",
  1053. {
  1054. type: "warning"
  1055. }
  1056. );
  1057. obj.confirmCreate = true;
  1058. await musicGroupcreateCalender(obj);
  1059. this.$message.success("创建缴费成功");
  1060. this.goback();
  1061. }
  1062. } catch (e) {
  1063. console.log(e);
  1064. }
  1065. }
  1066. }
  1067. });
  1068. },
  1069. scrollView(object) {
  1070. console.log(object);
  1071. for (const i in object) {
  1072. let dom = this.$refs[i];
  1073. // 这里是针对遍历的情况(多个输入框),取值为数组
  1074. if (Object.prototype.toString.call(dom) !== "[object Object]") {
  1075. if (dom) {
  1076. dom = dom[0];
  1077. }
  1078. }
  1079. // 第一种方法(包含动画效果)
  1080. dom.$el.scrollIntoView({
  1081. // 滚动到指定节点
  1082. // 值有start,center,end,nearest,当前显示在视图区域中间
  1083. block: "center",
  1084. // 值有auto、instant,smooth,缓动动画(当前是慢速的)
  1085. behavior: "smooth"
  1086. });
  1087. break; // 跳出循环了
  1088. }
  1089. },
  1090. formatPreviewData() {
  1091. // 格式化预览数据
  1092. const form = this.form;
  1093. // 重置小班课数据
  1094. let tmpActiveList = form.activeList?.length > 0 ? form.activeList : [];
  1095. let activeList = [];
  1096. if (tmpActiveList.length > 0) {
  1097. tmpActiveList.forEach(active => {
  1098. if (active.activityId) {
  1099. active.categoryName = active.vipGroupCategoryNames;
  1100. activeList.push(active);
  1101. }
  1102. });
  1103. }
  1104. let memberObj =
  1105. form.memberList?.length > 0 ? { ...form.memberList[0] } : null;
  1106. // 获取会员名称
  1107. if (memberObj) {
  1108. this.memberRankList.forEach(item => {
  1109. if (item.id == memberObj.memberRankSettingId) {
  1110. memberObj.name = item.name;
  1111. }
  1112. });
  1113. }
  1114. console.log(memberObj, "memberObj", activeList, form.eclass);
  1115. let tempCourseList = form.eclass?.length > 0 ? form.eclass : [];
  1116. let courseList = [];
  1117. if (tempCourseList.length > 0) {
  1118. tempCourseList.forEach(course => {
  1119. if (course.courseType) {
  1120. course.isStudentOptional = true;
  1121. courseList.push(course);
  1122. }
  1123. });
  1124. }
  1125. return {
  1126. payUserType: this.$route.query.payUserType,
  1127. musicGroup: this.musicGroup,
  1128. paymentCalender: {
  1129. calender: {
  1130. isShowSalePrice: form.isShowSalePrice
  1131. },
  1132. activity: [...activeList], // 小班课
  1133. course: courseList, // 课程
  1134. member: memberObj, // 云练习
  1135. memberPrivilegesItemList: [], // 会员基本内容
  1136. repair:
  1137. form.leBaoList?.length > 0 &&
  1138. this.isShowLeBao &&
  1139. this.$route.query.team_status != "PROGRESS"
  1140. ? { ...form.leBaoList[0], optionalFlag: false }
  1141. : null // 乐保
  1142. },
  1143. isShowMemberForPay: form.isShowMemberForPay,
  1144. isShowMusicInsuranceForPay: form.isShowMusicInsuranceForPay,
  1145. isShowVipCourseForPay: form.isShowVipCourseForPay,
  1146. isShowMusicCourseForPay: form.isShowMusicCourseForPay
  1147. };
  1148. },
  1149. fommatDate() {
  1150. if (this.$route.query.payUserType == "STUDENT") {
  1151. return {
  1152. payUserType: this.$route.query.payUserType,
  1153. musicGroupOrganizationCourseSettingId:
  1154. this.form.musicGroupOrganizationCourseSettingId || null,
  1155. memo: this.form.memo,
  1156. startPaymentDate: this.form.paymentDate[0],
  1157. deadlinePaymentDate: this.form.paymentDate[1],
  1158. calenderActivityList:
  1159. this.form.activeList?.length > 0 ? this.form.activeList : null,
  1160. musicRepair:
  1161. this.form.leBaoList?.length > 0
  1162. ? { ...this.form.leBaoList[0] }
  1163. : null,
  1164. calenderMember:
  1165. this.form.memberList?.length > 0 &&
  1166. this.form.memberList[0]?.memberRankSettingId
  1167. ? { ...this.form.memberList[0] }
  1168. : null,
  1169. musicGroupPaymentCalenderCourseSettingsList:
  1170. this.form.eclass?.length > 0 ? this.form.eclass : null,
  1171. musicGroupId: this.$route.query.id,
  1172. paymentItemShowState: JSON.stringify({
  1173. isShowMemberForPay: this.form.isShowMemberForPay,
  1174. isShowMusicInsuranceForPay: this.form.isShowMusicInsuranceForPay,
  1175. isShowVipCourseForPay: this.form.isShowVipCourseForPay,
  1176. isShowMusicCourseForPay: this.form.isShowMusicCourseForPay
  1177. }),
  1178. isShowSalePrice: this.form.isShowSalePrice
  1179. };
  1180. } else {
  1181. let calenderFeeJson = this.form.calenderFeeJson;
  1182. if (this.form.calenderFeeType == "TEACHER") {
  1183. calenderFeeJson.teacherFeeList = this.form.teacherFeeList;
  1184. }
  1185. return {
  1186. payUserType: this.$route.query.payUserType,
  1187. musicGroupOrganizationCourseSettingId:
  1188. this.form.musicGroupOrganizationCourseSettingId || null,
  1189. memo: this.form.memo,
  1190. startPaymentDate: this.form.paymentDate[0],
  1191. deadlinePaymentDate: this.form.paymentDate[1],
  1192. calenderActivityList:
  1193. this.form.activeList?.length > 0 ? this.form.activeList : null,
  1194. musicRepair:
  1195. this.form.leBaoList?.length > 0
  1196. ? { ...this.form.leBaoList[0] }
  1197. : null,
  1198. calenderMember:
  1199. this.form.memberList?.length > 0 &&
  1200. this.form.memberList[0]?.memberRankSettingId
  1201. ? { ...this.form.memberList[0] }
  1202. : null,
  1203. musicGroupPaymentCalenderCourseSettingsList:
  1204. this.form.eclass?.length > 0 ? this.form.eclass : null,
  1205. musicGroupId: this.$route.query.id,
  1206. paymentItemShowState: JSON.stringify({
  1207. isShowMemberForPay: this.form.isShowMemberForPay,
  1208. isShowMusicInsuranceForPay: this.form.isShowMusicInsuranceForPay,
  1209. isShowVipCourseForPay: this.form.isShowVipCourseForPay,
  1210. isShowMusicCourseForPay: this.form.isShowMusicCourseForPay
  1211. }),
  1212. calenderFeeType: this.form.calenderFeeType,
  1213. calenderFeeJson: JSON.stringify(calenderFeeJson),
  1214. musicGroupCalenderRefundPeriods: this.form
  1215. .musicGroupCalenderRefundPeriods,
  1216. currentTotalAmount: this.form.currentTotalAmount,
  1217. contractUrl: this.form.contractUrl
  1218. };
  1219. }
  1220. },
  1221. getScroll() {
  1222. this.scrollTop =
  1223. window.pageYOffset ||
  1224. document.documentElement.scrollTop ||
  1225. document.body.scrollTop;
  1226. if (!!this.scrollTop && this.scrollTop >= 70) {
  1227. this.isField = true;
  1228. } else {
  1229. this.isField = false;
  1230. }
  1231. },
  1232. setAllTotal(val) {
  1233. this.form.calenderFeeJson.allTotal = val;
  1234. if (this.form.calenderFeeJson.discountTotal) {
  1235. this.form.currentTotalAmount =
  1236. this.form.calenderFeeJson.allTotal -
  1237. this.form.calenderFeeJson.discountTotal;
  1238. } else {
  1239. this.form.currentTotalAmount = this.form.calenderFeeJson.allTotal;
  1240. }
  1241. this.$set(this.form, "currentTotalAmount", this.form.currentTotalAmount);
  1242. },
  1243. currentTotalAmount(val) {
  1244. this.$set(this.form, "currentTotalAmount", val);
  1245. }
  1246. },
  1247. watch: {
  1248. teamCourse(val) {
  1249. if (!val) {
  1250. this.$set(this.form, "eclass", [{}]);
  1251. this.$set(this.form, "leixing", "1");
  1252. this.$set(this.form, "musicGroupOrganizationCourseSettingId", null);
  1253. }
  1254. },
  1255. member(val) {
  1256. if (!val) {
  1257. this.$set(this.form, "memberList", [{}]);
  1258. }
  1259. },
  1260. teamActive(val) {
  1261. if (!val) {
  1262. this.$set(this.form, "activeList", [{}]);
  1263. }
  1264. },
  1265. leBao(val) {
  1266. if (!val) {
  1267. this.$set(this.form, "leBaoList", [{}]);
  1268. }
  1269. },
  1270. Eclass: {
  1271. handler(newValue, oldValue) {
  1272. let oldString = JSON.stringify({ ...oldValue });
  1273. let newString = JSON.stringify({ ...newValue });
  1274. // console.log(oldString, newString, this.initDetail, "Eclass");
  1275. if (this.initDetail || oldString == newString) {
  1276. this.initDetail = false;
  1277. return;
  1278. } else {
  1279. let arr = [];
  1280. newValue.forEach(item => {
  1281. arr.push({
  1282. courseType: item.courseType,
  1283. teacherNumber: 0,
  1284. courseNumber: 0,
  1285. courseCurrentPrice: 0
  1286. });
  1287. });
  1288. console.log("type", newValue, oldValue);
  1289. this.$set(this.form, "teacherFeeList", arr);
  1290. }
  1291. },
  1292. deep: true
  1293. },
  1294. // "form.calenderFeeType"(val, oldValue) {
  1295. // if (val == "TEACHER" && !oldValue) {
  1296. // let arr = [];
  1297. // this.form.eclass.forEach((item) => {
  1298. // arr.push({
  1299. // courseType: item.courseType,
  1300. // teacherNumber: 0,
  1301. // courseNumber: 0,
  1302. // courseCurrentPrice: 0,
  1303. // });
  1304. // });
  1305. // this.$set(this.form, "teacherFeeList", arr);
  1306. // }
  1307. // },
  1308. "form.currentTotalAmount"(val) {
  1309. // console.log(val,'form.currentTotalAmount');
  1310. // this.$forceUpdate()
  1311. },
  1312. "form.calenderFeeType"(val, oldValue) {
  1313. console.log(val, oldValue, this.initDetail);
  1314. if (val == "TEACHER" && !this.initDetail) {
  1315. let arr = [];
  1316. this.form.eclass.forEach(item => {
  1317. arr.push({
  1318. courseType: item.courseType,
  1319. teacherNumber: 0,
  1320. courseNumber: 0,
  1321. courseCurrentPrice: 0
  1322. });
  1323. });
  1324. console.log("calenderFeeType", val, oldValue);
  1325. this.$set(this.form, "teacherFeeList", arr);
  1326. }
  1327. },
  1328. async "form.musicGroupOrganizationCourseSettingId"(val) {
  1329. // && !this.rowDetail !this.$route.query.calenderId
  1330. if (val && !this.isSetCourseSettingsId) {
  1331. try {
  1332. const res = await queryByMusicGroupOrganizationCourseSettingsId({
  1333. id: val
  1334. });
  1335. let CourseSettingDetail = res.data.map(course => {
  1336. return {
  1337. ...course
  1338. };
  1339. });
  1340. this.$set(this.form, "eclass", res.data);
  1341. // this.syncAllMoney();
  1342. } catch (error) {}
  1343. }
  1344. this.isSetCourseSettingsId = false;
  1345. },
  1346. "form.leixing"(val) {
  1347. this.cycles = [{}];
  1348. this.collapse = [0];
  1349. this.cycle = {};
  1350. if (val != "1") {
  1351. this.$set(
  1352. this.form,
  1353. "musicGroupOrganizationCourseSettingId",
  1354. undefined
  1355. );
  1356. }
  1357. // this.$set(this.cycle, "paymentAmount", undefined);
  1358. // this.$set(this.other, "memo", null);
  1359. if (val === "1" && !this.isSetCourseSettingsId) {
  1360. this.$set(this.form, "eclass", []);
  1361. } else if (val === "2") {
  1362. this.$set(this.form, "eclass", [{}]);
  1363. }
  1364. this.isSetCourseSettingsId = false;
  1365. if (
  1366. this.courseViewType == 2 &&
  1367. this.$route.query.team_status == "PROGRESS"
  1368. ) {
  1369. this.memberDisabled = false;
  1370. if (val === "1") {
  1371. // 会员收费 创建续费 默认选中,不可取消选中
  1372. this.member = false;
  1373. if (this.teamCourse) {
  1374. this.member = true;
  1375. this.memberDisabled = true;
  1376. if (this.member && this.form.memberList.length < 0) {
  1377. this.form.memberList = [];
  1378. this.form.memberList.push({});
  1379. }
  1380. }
  1381. }
  1382. }
  1383. }
  1384. },
  1385. computed: {
  1386. musicGroup() {
  1387. return this.baseInfo?.musicGroup;
  1388. },
  1389. Eclass() {
  1390. return JSON.parse(JSON.stringify(this.form.eclass));
  1391. }
  1392. }
  1393. };
  1394. </script>
  1395. <style lang="scss" scoped>
  1396. @import "~@/views/resetTeaming/modals/pay.scss";
  1397. .memoWrap {
  1398. // width: calc(100% - 860px);
  1399. width: 860px;
  1400. .memoWrapItem {
  1401. display: block;
  1402. ::v-deep .el-form-item__content {
  1403. display: inline-block;
  1404. width: calc(100% - 140px);
  1405. }
  1406. }
  1407. }
  1408. .Wall {
  1409. height: 15px;
  1410. background-color: #f2f2f2;
  1411. }
  1412. ::v-deep .el-form-item__label:before {
  1413. content: "" !important;
  1414. position: absolute;
  1415. color: transparent;
  1416. margin-right: 4px;
  1417. }
  1418. .payInfoWrap {
  1419. .submitBtn {
  1420. // width: 121px;
  1421. // height: 41px;
  1422. background: var(--color-primary);
  1423. border-radius: 7px;
  1424. // margin: 20px auto;
  1425. // line-height: 40px;
  1426. color: #fff;
  1427. text-align: center;
  1428. cursor: pointer;
  1429. }
  1430. .baseWrap {
  1431. padding: 20px;
  1432. background-color: #fff;
  1433. }
  1434. .baseWrapFixed {
  1435. top: 105px;
  1436. left: 215px; // 205
  1437. position: fixed;
  1438. background-color: #fff;
  1439. width: calc(100% - 220px);
  1440. z-index: 100;
  1441. padding: 20px;
  1442. box-shadow: rgba(0, 0, 0, 0.05) 0px 2px 3px 3px;
  1443. }
  1444. .left {
  1445. ::v-deep .el-checkbox {
  1446. padding: 8px 10px 7px 10px;
  1447. border-radius: 4px;
  1448. }
  1449. ::v-deep .el-checkbox .el-checkbox__inner {
  1450. border-radius: 50%;
  1451. border: 1px solid var(--color-primary);
  1452. width: 16px;
  1453. height: 16px;
  1454. &:after {
  1455. height: 8px;
  1456. left: 5px;
  1457. }
  1458. }
  1459. ::v-deep .el-checkbox__inner:hover {
  1460. background-color: var(--color-primary);
  1461. }
  1462. ::v-deep .el-checkbox.is-checked {
  1463. border-color: #fff;
  1464. color: #fff;
  1465. }
  1466. .payTitle {
  1467. display: flex;
  1468. flex-direction: row;
  1469. align-items: center;
  1470. font-size: 18px;
  1471. font-weight: 600;
  1472. color: #1a1a1a;
  1473. height: 25px;
  1474. margin-bottom: 15px;
  1475. p {
  1476. line-height: 25px;
  1477. }
  1478. .squrt {
  1479. width: 3px;
  1480. height: 16px;
  1481. background: var(--color-primary);
  1482. margin-right: 8px;
  1483. position: relative;
  1484. top: -1px;
  1485. border-radius: 2px;
  1486. }
  1487. .payContext {
  1488. color: var(--color-primary);
  1489. border: 1px solid var(--color-primary);
  1490. font-size: 14px;
  1491. line-height: 22px;
  1492. border-radius: 3px;
  1493. padding: 0 5px;
  1494. margin-left: 12px;
  1495. }
  1496. }
  1497. .checkWrap {
  1498. display: flex;
  1499. flex-direction: row;
  1500. justify-content: flex-start;
  1501. align-items: center;
  1502. .checkBtn.active {
  1503. border: 1px solid var(--color-primary);
  1504. }
  1505. .checkBtn {
  1506. position: relative;
  1507. background-color: #fefefe;
  1508. margin-right: 12px;
  1509. padding: 0 22px;
  1510. display: flex;
  1511. flex-direction: row;
  1512. align-items: center;
  1513. border-radius: 6px;
  1514. border: 1px solid #dfe8ec;
  1515. cursor: pointer;
  1516. height: 84px;
  1517. width: 251px;
  1518. overflow: hidden;
  1519. &:hover {
  1520. border: 1px solid var(--color-primary);
  1521. }
  1522. p {
  1523. height: 41px;
  1524. line-height: 41px;
  1525. }
  1526. .checkLeft {
  1527. width: 60px;
  1528. height: 60px;
  1529. margin-right: 16px;
  1530. img {
  1531. width: 100%;
  1532. }
  1533. }
  1534. .checkRight {
  1535. p {
  1536. height: 26px;
  1537. font-size: 19px;
  1538. font-weight: 600;
  1539. color: #1a1a1a;
  1540. line-height: 26px;
  1541. }
  1542. .checkSubTitle {
  1543. font-size: 14px;
  1544. font-weight: 400;
  1545. color: var(--color-primary);
  1546. line-height: 20px;
  1547. }
  1548. }
  1549. .checTriangle {
  1550. border-bottom: 44px solid var(--color-primary);
  1551. border-left: 44px solid transparent;
  1552. position: absolute;
  1553. right: 0;
  1554. bottom: 0;
  1555. width: 0;
  1556. height: 0;
  1557. img {
  1558. width: 19px;
  1559. height: 16px;
  1560. position: absolute;
  1561. top: 22px;
  1562. right: 5px;
  1563. }
  1564. }
  1565. }
  1566. // .checkBtn.disabled {
  1567. // cursor: not-allowed;
  1568. // color: #d9d9d9;
  1569. // background-color: #f2f2f2 !important;
  1570. // ::v-deep .el-checkbox__inner {
  1571. // background-color: #fff !important;
  1572. // border-color: #d9d9d9;
  1573. // color: #fff;
  1574. // &::after {
  1575. // border-color: #d9d9d9;
  1576. // }
  1577. // }
  1578. // &:hover {
  1579. // background-color: #f2f2f2 !important;
  1580. // color: #d9d9d9;
  1581. // ::v-deep .el-checkbox__inner {
  1582. // background-color: #fff !important;
  1583. // }
  1584. // }
  1585. // }
  1586. }
  1587. }
  1588. }
  1589. .coreList {
  1590. // margin: 14px;
  1591. }
  1592. </style>
  1593. <style lang="less" scoped>
  1594. ::v-deep .el-dialog__body {
  1595. padding: 15px 0 0;
  1596. }
  1597. .empty {
  1598. background-color: #fff;
  1599. padding-bottom: 20px;
  1600. }
  1601. </style>