accompanys.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <el-page-header @back="goBack" :content="name"></el-page-header>
  5. </h2>
  6. <!-- v-permission="'vipGroupManage/updateVipBaseInfo'" -->
  7. <div class="wrap">
  8. <div
  9. class="newBand"
  10. @click="resetTeachers"
  11. v-permission="'courseSchedule/practiceGroupTeacherAdjust'"
  12. >修改老师</div>
  13. <!-- // accompanys/addCourse -->
  14. <!-- <div v-permission="'accompanys/addCourse'" class="newBand" @click="addCourse">网管课加课</div> -->
  15. <!-- <div class="newBand" v-permission="'accompanys/vipCourseAdjust'" @click="adjustment">批量调整</div> -->
  16. </div>
  17. <div class="tableWrap">
  18. <el-table
  19. :data="tableList"
  20. :header-cell-style="{background:'#EDEEF0',color:'#444'}"
  21. @selection-change="handleSelectionChange"
  22. >
  23. <el-table-column type="selection" :selectable="isDisabled" width="55"></el-table-column>
  24. <el-table-column label="课程编号" align="center" prop="id"></el-table-column>
  25. <el-table-column label="课程名称" align="center" prop="name"></el-table-column>
  26. <el-table-column label="主教老师" align="center" prop="teacherName"></el-table-column>
  27. <!-- <el-table-column label="主教老师" align="center" >
  28. <template slot-scope="scope">
  29. <div v-if="scope.row.teacher">
  30. {{scope.row.teacher.realName}}
  31. </div>
  32. </template>
  33. </el-table-column>-->
  34. <!-- <el-table-column label="班级id"
  35. align="center"
  36. prop="classGroupId">
  37. </el-table-column>-->
  38. <el-table-column label="上课日期" align="center" prop="classDate">
  39. <template slot-scope="scope">
  40. <div>{{ scope.row.classDate | formatTimer}}</div>
  41. </template>
  42. </el-table-column>
  43. <!-- <el-table-column label="是否点名" align="center" prop="status">
  44. <template slot-scope="scope">{{ scope.row.isCallNames ? '是' : '否' }}</template>
  45. </el-table-column> -->
  46. <el-table-column label="课程状态" align="center" prop="status">
  47. <template slot-scope="scope">
  48. <div>{{ scope.row.status | coursesStatus }}</div>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="结算状态" align="center">
  52. <template slot-scope="scope">
  53. <div>{{scope.row.isSettlement?'已结算':'未结算'}}</div>
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="开始时间" align="center" prop="startClassTimeStr"></el-table-column>
  57. <el-table-column label="结束时间" align="center" prop="endClassTimeStr"></el-table-column>
  58. <!-- <el-table-column label="教学点" align="center" prop="schoolName">
  59. <template slot-scope="scope">
  60. <div>{{scope.row.schoolName?scope.row.schoolName:'网络教室'}}</div>
  61. </template>
  62. </el-table-column>-->
  63. <el-table-column label="操作" width="250px" align="center" fixed="right">
  64. <template slot-scope="scope">
  65. <div>
  66. <el-button
  67. type="text"
  68. v-permission="'courseSchedule/classStartDateAdjust'"
  69. v-if="scope.row.status == 'NOT_START'"
  70. @click="resetClass(scope.row)"
  71. >调整</el-button>
  72. <!-- <el-button
  73. type="text"
  74. v-permission="'accompanys/remove'"
  75. v-if="!scope.row.isSettlement"
  76. @click="removeClass(scope.row)"
  77. >删除</el-button> -->
  78. <el-button
  79. v-permission="'courseSchedule/practiceCourseTeacherAdjust'"
  80. type="text"
  81. v-if="scope.row.status == 'NOT_START'"
  82. @click="resetTeacher(scope.row)"
  83. >更换老师</el-button>
  84. <!-- <el-button
  85. type="text"
  86. v-permission="'accompanys/cleanAttendance'"
  87. v-if="!scope.row.isSettlement"
  88. @click="clearAttend(scope.row)"
  89. >清除考勤</el-button> -->
  90. </div>
  91. </template>
  92. </el-table-column>
  93. </el-table>
  94. <pagination
  95. :total="rules.total"
  96. :page.sync="rules.page"
  97. :limit.sync="rules.limit"
  98. :page-sizes="rules.page_size"
  99. @pagination="getList"
  100. />
  101. </div>
  102. <el-dialog title="课程调整" width="400px" :before-close="handleClose" :visible.sync="courseVisible">
  103. <el-form
  104. :model="maskForm"
  105. ref="maskForm"
  106. :rules="maskRules"
  107. label-position="right"
  108. label-width="80px;"
  109. :inline="true"
  110. >
  111. <el-form-item label="上课日期" prop="date">
  112. <el-date-picker
  113. v-model.trim="maskForm.date"
  114. style="width:200px!important;"
  115. type="date"
  116. :picker-options="courseOption"
  117. value-format="yyyy-MM-dd"
  118. placeholder="选择日期"
  119. ></el-date-picker>
  120. </el-form-item>
  121. <el-form-item label="开始时间" prop="startTime">
  122. <el-time-select
  123. placeholder="起始时间"
  124. style="width:200px!important;"
  125. v-model.trim="startTime"
  126. :picker-options="{
  127. start: '08:30',
  128. step: '00:30',
  129. end: '23:00'
  130. }"
  131. ></el-time-select>
  132. </el-form-item>
  133. <!-- <el-form-item label="结束时间"
  134. prop="endTime">
  135. <el-time-select placeholder="结束时间"
  136. v-model.trim="maskForm.endTime"
  137. :picker-options="{
  138. start: '04:30',
  139. step: '00:05',
  140. end: '23:30',
  141. minTime: maskForm.startTime
  142. }">
  143. </el-time-select>
  144. </el-form-item> v-if="maskForm.teachMode=='OFFLINE'"-->
  145. <!-- <el-form-item label="课程类型" prop="courseType">
  146. <el-select clearable v-model.trim="maskForm.teachMode">
  147. <el-option label="线上课" value="ONLINE"></el-option>
  148. <el-option label="线下课" value="OFFLINE"></el-option>
  149. </el-select>
  150. </el-form-item>-->
  151. <!-- <el-form-item label="教学地点" v-if="maskForm.teachMode == 'OFFLINE'">
  152. <el-select v-model.trim="maskForm.address" filterable clearable>
  153. <el-option
  154. v-for="(item,index) in schoolList"
  155. :key="index"
  156. :value="item.id"
  157. :label="item.name"
  158. ></el-option>
  159. </el-select>
  160. </el-form-item>-->
  161. </el-form>
  162. <div slot="footer" class="dialog-footer">
  163. <el-button @click="courseVisible = false">取 消</el-button>
  164. <el-button type="primary" @click="submitResetClass">确 定</el-button>
  165. </div>
  166. </el-dialog>
  167. <el-dialog
  168. title="老师调整"
  169. width="400px"
  170. :before-close="teacherClose"
  171. :visible.sync="teacherVisible"
  172. >
  173. <el-form
  174. :model="teacherForm"
  175. ref="teacherForm"
  176. :rules="teacherRules"
  177. label-position="right"
  178. label-width="80px;"
  179. :inline="true"
  180. >
  181. <el-form-item label="老师姓名">
  182. <el-select v-model.trim="teacherForm.teacher" filterable clearable>
  183. <el-option
  184. v-for="(item,index) in teacherList"
  185. :key="index"
  186. :value="item.id"
  187. :label="item.realName"
  188. ></el-option>
  189. </el-select>
  190. </el-form-item>
  191. </el-form>
  192. <div slot="footer" class="dialog-footer">
  193. <el-button @click="teacherVisible = false">取 消</el-button>
  194. <el-button type="primary" @click="subresetTeacher">确 定</el-button>
  195. </div>
  196. </el-dialog>
  197. <el-dialog :title="adjustmentName" width="800px" :visible.sync="adjustmentVisible">
  198. <el-form
  199. :model="adjustmentForm"
  200. label-position="right"
  201. label-width="120px"
  202. ref="adjustmentForm"
  203. :rules="adjustmentRules"
  204. :inline="true"
  205. >
  206. <el-form-item label="已选择课时数" v-if="!isaddCourse">
  207. <el-input disabled v-model.trim="adjustmentForm.count"></el-input>
  208. </el-form-item>
  209. <el-form-item label="添加课时数" prop="addCount" v-if="isaddCourse">
  210. <el-input type="number" @mousewheel.native.prevent v-model.trim="adjustmentForm.addCount"></el-input>
  211. </el-form-item>
  212. <br />
  213. <el-form-item label="单课费用" prop="fee" v-if="isaddCourse">
  214. <el-input v-model.trim="adjustmentForm.fee"></el-input>
  215. </el-form-item>
  216. <el-form-item label="排课起始时间" prop="courseTime">
  217. <el-date-picker
  218. v-model.trim="adjustmentForm.courseTime"
  219. :picker-options="pickerOptions"
  220. style="width:200px!important;"
  221. type="date"
  222. value-format="yyyy-MM-dd"
  223. placeholder="选择日期"
  224. ></el-date-picker>
  225. <el-checkbox style="margin-left:10px;" v-model.trim="adjustmentForm.checked">是否跳过节假日</el-checkbox>
  226. </el-form-item>
  227. </el-form>
  228. <div class="WeekWrap">
  229. <h3 style="margin-bottom:20px;">
  230. 循环次数
  231. <el-button type="text" style="margin-left:10px;" @click="addWeek">添加</el-button>
  232. </h3>
  233. <div class="countWrap" style="margin-bottom:10px;">
  234. <div
  235. class="countItem"
  236. style="margin-bottom:20px;"
  237. v-for="(item,index) in weekList"
  238. :key="index"
  239. >
  240. <span>循环周期:</span>
  241. <el-select v-model.trim="item.dayOfWeek" filterable clearable>
  242. <el-option
  243. v-for="(item,index) in weekDateList"
  244. :key="index"
  245. :label="item.label"
  246. :value="item.value"
  247. ></el-option>
  248. </el-select>
  249. <span style="margin-left:10px;">开始时间</span>
  250. <el-time-select
  251. style="margin-left:10px;"
  252. placeholder
  253. v-model.trim="item.startClassTime"
  254. :picker-options="{
  255. start: '04:30',
  256. step: '00:05',
  257. end: '23:55'
  258. }"
  259. ></el-time-select>
  260. <el-button
  261. style="margin-left:10px;"
  262. type="danger"
  263. @click="removeWeek(item)"
  264. icon="el-icon-delete"
  265. circle
  266. ></el-button>
  267. </div>
  268. </div>
  269. </div>
  270. <div slot="footer" class="dialog-footer">
  271. <el-button @click="adjustmentVisible = false">取 消</el-button>
  272. <el-button type="primary" v-if="!isaddCourse" @click="submitAdjustment">确 定</el-button>
  273. <el-button type="primary" v-if="isaddCourse" @click="addCourseSubmit">确 定</el-button>
  274. </div>
  275. </el-dialog>
  276. </div>
  277. </template>
  278. <script>
  279. import pagination from "@/components/Pagination/index";
  280. import {
  281. findPracticeGroupCourseSchedules,
  282. practiceCourseAdjus,
  283. getTeacher,
  284. practiceGroupManage,
  285. practiceGroupTeacherAdjust,
  286. practiceCourseTeacherAdjust,
  287. cleanAttendance
  288. } from "@/api/buildTeam";
  289. import {
  290. vipCourseAdjust,
  291. batchAppendVipGroupCourses,
  292. bathDelete
  293. } from "@/api/vipSeting";
  294. export default {
  295. components: {
  296. pagination
  297. },
  298. data() {
  299. return {
  300. adjustmentName: "",
  301. isaddCourse: false,
  302. adjustmentVisible: false,
  303. isMultiple: true,
  304. name: "网管课程组",
  305. courseVisible: false,
  306. teacherVisible: false,
  307. Frules: null,
  308. FsearchForm: null,
  309. userId: null,
  310. activeRow: null,
  311. rules: {
  312. // 分页规则
  313. limit: 20, // 限制显示条数
  314. page: 1, // 当前页
  315. total: 0, // 总条数
  316. page_size: [10, 20, 50, 100] // 选择限制显示条数
  317. },
  318. tableList: [],
  319. teacherList: [],
  320. courseData: [],
  321. practiceId: null,
  322. maskForm: {
  323. date: "",
  324. startTime: "",
  325. id: ""
  326. },
  327. adjustmentForm: {
  328. count: "",
  329. courseTime: "",
  330. checked: false,
  331. addCount: "",
  332. courseType: "",
  333. fee: ""
  334. },
  335. startTime: null,
  336. maskRules: {
  337. date: [{ required: true, message: "请选择上课时间", trigger: "blur" }],
  338. // startTime: [{ required: true, message: '请选择上课开始时间', trigger: 'blur' },],
  339. endTime: [
  340. { required: true, message: "请选择上课结束时间", trigger: "blur" }
  341. ]
  342. },
  343. teacherRules: {
  344. teacher: [{ required: true, message: "请选择老师", trigger: "blur" }]
  345. },
  346. teacherForm: {
  347. teacher: null
  348. },
  349. courseOption: null,
  350. coursesExpireDate: null,
  351. adjustmentRules: {
  352. courseTime: [{ required: true, message: "请选择开始时间" }],
  353. addCount: [{ required: true, message: "请输入加课次数" }],
  354. courseType: [{ required: true, message: "请选择课程类型" }],
  355. fee: [{ required: true, message: "请输入费用" }]
  356. },
  357. pickerOptions: {
  358. disabledDate(time) {
  359. return time.getTime() + 86400000 <= new Date().getTime();
  360. }
  361. },
  362. weekList: [
  363. {
  364. dayOfWeek: "",
  365. startTime: "",
  366. endTime: "",
  367. moid: new Date().getTime()
  368. }
  369. ],
  370. weekDateList: [
  371. { value: "1", label: "星期一" },
  372. { value: "2", label: "星期二" },
  373. { value: "3", label: "星期三" },
  374. { value: "4", label: "星期四" },
  375. { value: "5", label: "星期五" },
  376. { value: "6", label: "星期六" },
  377. { value: "7", label: "星期日" }
  378. ],
  379. activeList: []
  380. };
  381. },
  382. created() {
  383. this.init();
  384. },
  385. activated() {
  386. this.init();
  387. },
  388. methods: {
  389. init() {
  390. this.practiceId = this.$route.query.id;
  391. this.userId = this.$route.query.userId;
  392. if (this.$route.query.rules) {
  393. this.Frules = this.$route.query.rules;
  394. }
  395. if (this.$route.query.searchForm) {
  396. this.FsearchForm = this.$route.query.searchForm;
  397. }
  398. // console.log(this.practiceId)
  399. // <!-- 状态 指导老师 活动方案-->
  400. getTeacher({ organId: this.organId }).then(res => {
  401. if (res.code == 200) {
  402. this.teacherList = res.data;
  403. }
  404. });
  405. // 获取课程组信息
  406. this.courseOption = this.coursesDate();
  407. this.getCourseGroup();
  408. this.getList();
  409. },
  410. getCourseGroup() {
  411. practiceGroupManage({ search: this.practiceId }).then(res => {
  412. if (res.code == 200) {
  413. this.courseData = res.data.rows;
  414. if (this.courseData.length > 0) {
  415. this.name = this.courseData[0].name;
  416. }
  417. }
  418. });
  419. },
  420. getList() {
  421. findPracticeGroupCourseSchedules({ practiceId: this.practiceId }).then(
  422. res => {
  423. if (res.code == 200) {
  424. this.tableList = res.data.pageInfo.rows;
  425. this.rules.total = res.data.pageInfo.total;
  426. }
  427. }
  428. );
  429. },
  430. goBack() {
  431. this.$router.push({
  432. path: "/business/accompanyList",
  433. query: { rules: this.Frules, searchForm: this.FsearchForm }
  434. });
  435. },
  436. teacherClose() {
  437. this.isMultiple = true;
  438. this.teacherForm.teacher = null;
  439. this.teacherVisible = false;
  440. },
  441. handleClose() {
  442. this.courseVisible = false;
  443. this.startTime = "";
  444. this.maskForm = {
  445. date: "",
  446. startTime: "",
  447. id: ""
  448. };
  449. this.$refs["maskForm"].resetFields();
  450. },
  451. submitResetClass() {
  452. // endClassTimeStr: this.maskForm.endTime,
  453. if (!this.startTime) {
  454. this.$message.error("请填写修改时间");
  455. return;
  456. }
  457. let obj = {
  458. startClassTimeStr: this.startTime,
  459. id: this.maskForm.id,
  460. classDate: this.maskForm.date
  461. };
  462. practiceCourseAdjus(obj).then(res => {
  463. if (res.code == 200) {
  464. this.$message.success("修改成功");
  465. this.courseVisible = false;
  466. this.getList();
  467. } //else {
  468. // this.$message.error(res.msg)
  469. // }
  470. });
  471. },
  472. resetClass(row) {
  473. /**
  474. * maskForm.startTime
  475. *
  476. */
  477. this.maskForm.date = row.classDate;
  478. this.startTime = row.startClassTimeStr;
  479. // this.maskForm.endTime = row.endClassTimeStr;
  480. this.maskForm.id = row.id;
  481. this.coursesExpireDate = row.coursesExpireDate;
  482. // 修改课时
  483. this.courseVisible = true;
  484. },
  485. resetTeacher(row) {
  486. // 单节课
  487. this.isMultiple = false;
  488. this.activeRow = row;
  489. this.teacherForm.teacher = row.actualTeacherId;
  490. this.teacherVisible = true;
  491. },
  492. resetTeachers() {
  493. // 课程组
  494. this.isMultiple = true;
  495. this.teacherForm.teacher = this.courseData[0].userId;
  496. this.teacherVisible = true;
  497. },
  498. subresetTeacher() {
  499. this.$refs.teacherForm.validate(some => {
  500. if (some) {
  501. if (this.isMultiple) {
  502. // 修改课程组老师
  503. this.$confirm("此操作将修改所有未上课程的老师, 是否继续?", "提示", {
  504. confirmButtonText: "确定",
  505. cancelButtonText: "取消",
  506. type: "warning"
  507. })
  508. .then(() => {
  509. practiceGroupTeacherAdjust({
  510. practiceGroupId: this.practiceId,
  511. teacherId: this.teacherForm.teacher
  512. }).then(res => {
  513. if (res.code == 200) {
  514. this.$message.success("修改成功");
  515. this.getCourseGroup();
  516. this.getList();
  517. this.teacherVisible = false;
  518. }
  519. });
  520. })
  521. .catch(() => {
  522. return;
  523. });
  524. } else {
  525. // 修改单节课老师
  526. practiceCourseTeacherAdjust({
  527. courseScheduleId: this.activeRow.id,
  528. teacherId: this.teacherForm.teacher
  529. }).then(res => {
  530. if (res.code == 200) {
  531. this.$message.success("修改成功");
  532. this.getList();
  533. this.teacherVisible = false;
  534. }
  535. });
  536. }
  537. } else {
  538. return;
  539. }
  540. });
  541. },
  542. coursesDate() {
  543. let self = this;
  544. return {
  545. disabledDate: time => {
  546. // if (self.leftForm.courseStart) {
  547. // let date = new Date(self.leftForm.courseStart.replace(/-/, "/"));
  548. // coursesExpireDate
  549. let date = new Date(this.coursesExpireDate.replace(/-/, "/"));
  550. return time.getTime() > date.getTime();
  551. // }
  552. // return;
  553. }
  554. };
  555. },
  556. // 是否允许批量调整
  557. isDisabled(row, index) {
  558. // || !row.isCallNames
  559. if (row.isSettlement) {
  560. return false;
  561. } else {
  562. return true;
  563. }
  564. },
  565. adjustment() {
  566. this.adjustmentName = "批量调整";
  567. this.isaddCourse = false;
  568. if (this.adjustmentForm.count <= 0) {
  569. this.$message.error("请至少勾选一节课");
  570. } else {
  571. this.adjustmentVisible = true;
  572. }
  573. },
  574. addWeek() {
  575. // 添加循环周期
  576. this.weekList.push({
  577. dayOfWeek: "",
  578. startClassTime: "",
  579. endClassTime: "",
  580. id: new Date()
  581. });
  582. },
  583. // 删除循环周
  584. removeWeek(item) {
  585. for (let i in this.weekList) {
  586. if (this.weekList[i].id == item.id) {
  587. this.weekList.splice(i, 1);
  588. }
  589. }
  590. },
  591. submitAdjustment() {
  592. this.$refs["adjustmentForm"].validate(item => {
  593. if (item) {
  594. let week = this.weekList;
  595. if (!week[0] || !week[0].startClassTime || !week[0].dayOfWeek) {
  596. this.$message.error("至少排一节课");
  597. return;
  598. }
  599. // 开始
  600. let obj = {};
  601. obj.courseCreateStartTime = this.adjustmentForm.courseTime;
  602. let idArr = this.activeList.map(item => {
  603. return item.id;
  604. });
  605. let courseScheduleIds = idArr.join(",");
  606. obj.courseScheduleIds = courseScheduleIds;
  607. obj.courseTimes = this.weekList;
  608. obj.holiday = this.adjustmentForm.checked;
  609. obj.teachMode = this.adjustmentForm.courseType || null;
  610. obj.groupType = "PRACTICE";
  611. obj.vipGroupId = this.practiceId;
  612. vipCourseAdjust(obj).then(res => {
  613. if (res.code == 200) {
  614. this.$message.success("恭喜您修改成功");
  615. this.adjustmentVisible = false;
  616. this.getList();
  617. }
  618. });
  619. }
  620. });
  621. },
  622. handleSelectionChange(val) {
  623. this.adjustmentForm.count = val.length;
  624. this.activeList = val;
  625. },
  626. clearAttend(row) {
  627. this.$confirm("是否清除考勤记录?", "提示", {
  628. confirmButtonText: "确定",
  629. cancelButtonText: "取消",
  630. type: "warning"
  631. })
  632. .then(() => {
  633. cleanAttendance({ courseScheduleIds: row.id }).then(res => {
  634. if (res.code == 200) {
  635. this.$message.success("清除成功");
  636. this.getList();
  637. } else {
  638. this.$message.error(res.msg);
  639. }
  640. });
  641. })
  642. .catch(() => {});
  643. },
  644. // 网管课加课弹窗
  645. addCourse() {
  646. this.adjustmentName = "网管课加课";
  647. this.isaddCourse = true;
  648. this.adjustmentVisible = true;
  649. },
  650. // 网管课加课提交
  651. addCourseSubmit() {
  652. this.$refs["adjustmentForm"].validate(item => {
  653. if (item) {
  654. let week = this.weekList;
  655. if (!week[0] || !week[0].startClassTime || !week[0].dayOfWeek) {
  656. this.$message.error("至少排一节课");
  657. return;
  658. }
  659. // 开始
  660. let obj = {};
  661. obj.courseCreateStartTime = this.adjustmentForm.courseTime;
  662. let idArr = this.activeList.map(item => {
  663. return item.id;
  664. });
  665. let courseScheduleIds = idArr.join(",");
  666. obj.courseScheduleIds = courseScheduleIds;
  667. obj.courseTimes = this.weekList;
  668. obj.holiday = this.adjustmentForm.checked;
  669. obj.vipGroupId = this.practiceId;
  670. obj.courseCount = this.adjustmentForm.addCount;
  671. obj.teachMode = this.adjustmentForm.courseType;
  672. obj.singleClassPrice = this.adjustmentForm.fee;
  673. obj.groupType = "PRACTICE";
  674. batchAppendVipGroupCourses(obj).then(res => {
  675. if (res.code == 200) {
  676. this.$message.success("恭喜您添加成功");
  677. this.adjustmentVisible = false;
  678. this.getList();
  679. }
  680. });
  681. }
  682. });
  683. },
  684. // 删除
  685. removeClass(row) {
  686. this.$confirm("是否删除该课程?", "提示", {
  687. confirmButtonText: "确定",
  688. cancelButtonText: "取消",
  689. type: "warning"
  690. }).then(() => {
  691. bathDelete({ courseScheduleIds: row.id }).then(res => {
  692. if (res.code == 200) {
  693. this.$message.success("删除成功");
  694. this.getList();
  695. }
  696. });
  697. });
  698. }
  699. }
  700. };
  701. </script>
  702. <style lang="scss" scoped>
  703. .wrap {
  704. display: flex;
  705. flex-direction: row;
  706. justify-content: flex-start;
  707. div {
  708. margin-right: 20px;
  709. }
  710. }
  711. </style>