1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-077c9f5c"],{"84dc":function(t,e,a){"use strict";a("bfc2")},af1a:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"m-container"},[a("h2",[a("el-page-header",{attrs:{content:t.className},on:{back:t.onCancel}})],1),t._v(" "),a("div",{staticClass:"m-core"},[a("tab-router",{attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName="string"===typeof e?e.trim():e},expression:"activeName"}},[t.permissionList.vipBase?a("el-tab-pane",{attrs:{label:"基本信息",lazy:"",name:"1"}},[a("vipBase")],1):t._e(),t._v(" "),t.permissionList.teacherRecord?a("el-tab-pane",{attrs:{label:"教学记录",lazy:"",name:"2"}},[2==t.activeName?a("teacherRecord"):t._e()],1):t._e(),t._v(" "),t.permissionList.fnanceInfo?a("el-tab-pane",{attrs:{label:"VIP课程财务",lazy:"",name:"3"}},[3==t.activeName?a("fnanceInfo"):t._e()],1):t._e(),t._v(" "),t.permissionList.vipStudentList?a("el-tab-pane",{attrs:{label:"VIP学生列表",lazy:"",name:"4"}},[4==t.activeName?a("vipStudentList",{attrs:{vipDetail:t.vipDetail}}):t._e()],1):t._e(),t._v(" "),t.permissionList.vipReset?a("el-tab-pane",{attrs:{label:"VIP调整",lazy:"",name:"5"}},[5==t.activeName?a("vipReset",{attrs:{vipDetail:t.vipDetail}}):t._e()],1):t._e()],1)],1)])},i=[],n=(a("7f7f"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"vip-base"},[a("div",{staticClass:"left"},[a("el-form",{attrs:{"label-position":"right","label-width":"120px",model:t.topForm}},[a("el-form-item",{attrs:{label:"指导老师"}},[a("el-input",{attrs:{disabled:""},model:{value:t.topForm.teacherCount,callback:function(e){t.$set(t.topForm,"teacherCount","string"===typeof e?e.trim():e)},expression:"topForm.teacherCount"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"乐团主管"}},[a("el-input",{attrs:{disabled:""},model:{value:t.topForm.educationalTeacherName,callback:function(e){t.$set(t.topForm,"educationalTeacherName","string"===typeof e?e.trim():e)},expression:"topForm.educationalTeacherName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"科目名称"}},[a("el-input",{attrs:{disabled:""},model:{value:t.topForm.subject,callback:function(e){t.$set(t.topForm,"subject","string"===typeof e?e.trim():e)},expression:"topForm.subject"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"活动方案"}},[a("el-input",{attrs:{disabled:""},model:{value:t.topForm.active,callback:function(e){t.$set(t.topForm,"active","string"===typeof e?e.trim():e)},expression:"topForm.active"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"课程形式"}},[a("el-input",{attrs:{disabled:""},model:{value:t.topForm.status,callback:function(e){t.$set(t.topForm,"status","string"===typeof e?e.trim():e)},expression:"topForm.status"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"每班人数"}},[a("el-input",{attrs:{disabled:""},model:{value:t.topForm.classNum,callback:function(e){t.$set(t.topForm,"classNum","string"===typeof e?e.trim():e)},expression:"topForm.classNum"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"每课时长"}},[a("el-input",{attrs:{disabled:""},model:{value:t.topForm.classTime,callback:function(e){t.$set(t.topForm,"classTime","string"===typeof e?e.trim():e)},expression:"topForm.classTime"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"教学点名称"}},[a("el-input",{attrs:{disabled:""},model:{value:t.topForm.address,callback:function(e){t.$set(t.topForm,"address","string"===typeof e?e.trim():e)},expression:"topForm.address"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"线上课数"}},[a("el-input",{attrs:{disabled:""},model:{value:t.topForm.onlineClass,callback:function(e){t.$set(t.topForm,"onlineClass","string"===typeof e?e.trim():e)},expression:"topForm.onlineClass"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"线下课数"}},[a("el-input",{attrs:{disabled:""},model:{value:t.topForm.offlineClass,callback:function(e){t.$set(t.topForm,"offlineClass","string"===typeof e?e.trim():e)},expression:"topForm.offlineClass"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"报名开始时间"}},[a("div",{staticClass:"disBox"},[t._v(t._s(t._f("dateForMinFormat")(t.topForm.startTime)))])]),t._v(" "),a("el-form-item",{attrs:{label:"报名结束时间"}},[a("div",{staticClass:"disBox"},[t._v(t._s(t._f("dateForMinFormat")(t.topForm.endTime)))])])],1)],1),t._v(" "),a("div",{staticClass:"right"},[a("el-form",{attrs:{"label-position":"right","label-width":"120px",model:t.rightForm}},[a("el-form-item",{attrs:{label:"总课时数"}},[a("el-input",{attrs:{disabled:""},model:{value:t.rightForm.allClass,callback:function(e){t.$set(t.rightForm,"allClass","string"===typeof e?e.trim():e)},expression:"rightForm.allClass"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"课程单价(线上)"}},[a("el-input",{attrs:{type:"number",disabled:!t.isreset},nativeOn:{mousewheel:function(t){t.preventDefault()}},model:{value:t.rightForm.onlineClass,callback:function(e){t.$set(t.rightForm,"onlineClass","string"===typeof e?e.trim():e)},expression:"rightForm.onlineClass"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"课程单价(线下)"}},[a("el-input",{attrs:{type:"number",disabled:!t.isreset},nativeOn:{mousewheel:function(t){t.preventDefault()}},model:{value:t.rightForm.offlineClass,callback:function(e){t.$set(t.rightForm,"offlineClass","string"===typeof e?e.trim():e)},expression:"rightForm.offlineClass"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"课程总价"}},[a("el-input",{attrs:{disabled:""},model:{value:t.rightForm.allPrice,callback:function(e){t.$set(t.rightForm,"allPrice","string"===typeof e?e.trim():e)},expression:"rightForm.allPrice"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"当前课程进度"}},[a("el-input",{attrs:{disabled:""},model:{value:t.rightForm.progress,callback:function(e){t.$set(t.rightForm,"progress","string"===typeof e?e.trim():e)},expression:"rightForm.progress"}})],1)],1)],1)])}),r=[],l=a("7e78"),o={props:["vipDetail"],data:function(){return{topForm:{teacherCount:"",subject:"",active:"",status:"",classNum:"",classTime:"",address:"",onlineClass:"",offlineClass:"",startTime:"",endTime:""},rightForm:{allClass:"",onlineClass:"",offlineClass:"",allPrice:"",progress:""},tableList:[],isreset:!1}},mounted:function(){this.__init()},methods:{__init:function(){this.getStudents(),this.getVipGroupDetail()},getVipGroupDetail:function(){var t=this,e=this.$route.query.id;Object(l["I"])({vipGroupId:e}).then((function(e){200==e.code&&(t.topForm.teacherCount=e.data.userName,t.topForm.educationalTeacherName=e.data.educationalTeacherName,t.topForm.subject=e.data.subjectName,t.topForm.active=e.data.vipGroupActivityName,t.topForm.status=e.data.categoryName,t.topForm.classNum=e.data.studentNum,t.topForm.classTime=e.data.singleClassMinutes,t.topForm.address=e.data.teacherSchoolName,t.topForm.onlineClass=e.data.onlineClassesNum,t.topForm.offlineClass=e.data.offlineClassesNum,t.topForm.startTime=e.data.registrationStartTime,t.topForm.endTime=e.data.paymentExpireDate,t.rightForm.allClass=e.data.totalClassTimes,t.rightForm.onlineClass=e.data.onlineClassesUnitPrice,t.rightForm.offlineClass=e.data.offlineClassesUnitPrice,t.rightForm.allPrice=e.data.totalPrice,t.rightForm.progress=e.data.currentClassTimes+"/"+e.data.totalClassTimes)}))},getStudents:function(){var t=this;Object(l["t"])({vipGroupId:this.id,groupType:"VIP"}).then((function(e){200==e.code&&(t.tableList=e.data.rows)}))},leaveSchool:function(t){var e=this,a=t.row.id,s=this.id;Object(l["M"])({studentId:a,vipGroupId:s}).then((function(a){200==a.code&&(e.$message.success("退学成功"),t._self.$refs[t.$index].doClose(),e.getStudents())}))},resetPrice:function(){this.isreset=!0},submitBtn:function(){var t=this,e=this.rightForm.onlineClass,a=this.rightForm.offlineClass;Object(l["V"])({id:this.id,onlineClassesUnitPrice:e,offlineClassesUnitPrice:a}).then((function(e){200==e.code&&(t.$message.success("修改成功"),t.isreset=!1,t.$emit("getVipGroupDetail"))}))}},watch:{}},c=o,u=(a("db62"),a("2877")),d=Object(u["a"])(c,n,r,!1,null,"35d822a8",null),m=d.exports,p=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("statistic",[a("statistic-item",[a("span",[t._v("未上课时")]),t._v(" "),a("span",[t._v(t._s(t.totalClassTimes))])]),t._v(" "),a("statistic-item",[a("span",[t._v("已上课时")]),t._v(" "),a("span",[t._v(t._s(t.currentClassTimes))])]),t._v(" "),a("statistic-item",[a("span",[t._v("已结算")]),t._v(" "),a("span",[t._v(t._s(t.isSalaryNum))])]),t._v(" "),a("statistic-item",[a("span",[t._v("被投诉")]),t._v(" "),a("span",[t._v(t._s(t.complaintsNum))])])],1),t._v(" "),a("save-form",{staticClass:"searchForm",attrs:{"save-key":"vipDetail-record",inline:!0,"label-position":"right","label-width":"120px",model:t.searchForm},on:{submit:t.search}},[a("el-form-item",[a("el-select",{attrs:{clearable:"",placeholder:"课程类型"},model:{value:t.searchForm.type,callback:function(e){t.$set(t.searchForm,"type","string"===typeof e?e.trim():e)},expression:"searchForm.type"}},[a("el-option",{attrs:{label:"线上课",value:"ONLINE"}}),t._v(" "),a("el-option",{attrs:{label:"线下课",value:"OFFLINE"}})],1)],1),t._v(" "),a("el-form-item",[a("el-select",{attrs:{clearable:"",placeholder:"课程状态"},model:{value:t.searchForm.status,callback:function(e){t.$set(t.searchForm,"status","string"===typeof e?e.trim():e)},expression:"searchForm.status"}},[a("el-option",{attrs:{label:"未开始",value:"NOT_START"}}),t._v(" "),a("el-option",{attrs:{label:"进行中",value:"UNDERWAY"}}),t._v(" "),a("el-option",{attrs:{label:"已结束",value:"OVER"}})],1)],1),t._v(" "),a("el-form-item",[a("el-date-picker",{staticStyle:{width:"400px"},attrs:{type:"daterange","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"课程开始日期","end-placeholder":"课程结束日期","picker-options":{firstDayOfWeek:1}},model:{value:t.searchForm.time,callback:function(e){t.$set(t.searchForm,"time","string"===typeof e?e.trim():e)},expression:"searchForm.time"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"danger"}},[t._v("搜索")])],1)],1),t._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",label:"课程编号",prop:"id"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"上课时间",width:"250px",prop:"startClassTime"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("p",[t._v("\n "+t._s(t._f("dateForMinFormat")(e.row.startClassTime))+"-"+t._s(t._f("endTime")(e.row.endClassTime))+"\n ")])])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"课程类型",prop:"teachMode"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("p",[t._v(t._s(t._f("fitterTeachMode")(e.row.teachMode)))])])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"教学点",prop:"schoolName"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v("\n "+t._s(e.row.schoolName?e.row.schoolName:"网络教室")+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"上课学员数",prop:"attendanceNum"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"status",label:"签到状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("p",[t._v(t._s(t._f("attendanceType")(e.row.signInStatus)))])])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"status",label:"签退状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("p",[t._v(t._s(t._f("attendanceOutType")(e.row.signOutStatus)))])])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"status",label:"课程状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("p",[t._v(t._s(t._f("fitterStatus")(e.row.status)))])])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"isSalary",label:"结算状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("p",[t._v(t._s(t._f("fitterisSalary")(e.row.isSalary)))])])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[e.row.attendanceNum?a("el-button",{attrs:{type:"text",permission:"'vipGroupManage/findVipGroupAttendanceStudents'"},on:{click:function(a){return t.lookStudents(e.row)}}},[t._v("查看学员")]):t._e(),t._v(" "),"OVER"==e.row.status&&!e.row.isSalary&&t.permission("teacherAttendance/updateTeacherAttendance/3361")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.onMarkAttendance(e.row)}}},[t._v("补考勤")]):t._e(),t._v(" "),"OVER"==e.row.status&&t.permission("studentAttendance/updateStudentAttendances")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.onCallName(e.row)}}},[t._v("点名表")]):t._e()],1)]}}])})],1)],1),t._v(" "),a("pagination",{attrs:{"save-key":"vipDetail-record",sync:"",total:t.rules.total,page:t.rules.page,limit:t.rules.limit,"page-sizes":t.rules.page_size},on:{"update:total":function(e){return t.$set(t.rules,"total",e)},"update:page":function(e){return t.$set(t.rules,"page",e)},"update:limit":function(e){return t.$set(t.rules,"limit",e)},pagination:t.getList}}),t._v(" "),a("el-dialog",{attrs:{title:"上课学员",visible:t.studentVisible,width:"30%","before-close":t.handleClose},on:{"update:visible":function(e){t.studentVisible=e}}},[t._l(t.studentList,(function(e,s){return a("span",{key:s,staticStyle:{"margin-left":"10px"}},[t._v(t._s(e))])})),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.studentVisible=!1}}},[t._v("确 定")])],1)],2),t._v(" "),a("el-dialog",{attrs:{title:"补考勤",width:"400px",visible:t.markAttendance.status},on:{"update:visible":function(e){return t.$set(t.markAttendance,"status",e)}}},[a("el-form",[a("el-form-item",{attrs:{label:"签到状态"}},[t._v(t._s(t._f("attendanceType")(t.markAttendance.dataInfo.signInStatus))+"\n ")]),t._v(" "),a("el-form-item",{attrs:{label:"签到时间"}},[t._v(t._s(t.markAttendance.dataInfo.signInTime))]),t._v(" "),a("el-form-item",{attrs:{label:"签退状态"}},[t._v(t._s(t._f("attendanceOutType")(t.markAttendance.dataInfo.signOutStatus))+"\n ")]),t._v(" "),a("el-form-item",{attrs:{label:"签退时间"}},[t._v(t._s(t.markAttendance.dataInfo.signOutTime))])],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.markAttendance.status=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary",disabled:1==t.markAttendance.dataInfo.signOutStatus&&1==t.markAttendance.dataInfo.signInStatus},on:{click:t.batchAdjustmentTime}},[t._v("确定补卡")])],1)],1),t._v(" "),a("el-dialog",{attrs:{title:"点名表",width:"800px",visible:t.rollCall.status},on:{"update:visible":function(e){return t.$set(t.rollCall,"status",e)}}},[a("el-table",{attrs:{data:t.rollCall.gridData,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",property:"userName",label:"学员姓名"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",property:"phone",label:"手机号"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",property:"subjectName",label:"学员声部"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"到课状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("studentCallName")(e.row.status))+"\n ")]}}])}),t._v(" "),t.rollCall.selectItem.isSalary?t._e():a("el-table-column",{attrs:{align:"center",label:"操作",width:"240px"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"mini",type:"primary",round:""},on:{click:function(a){return t.onChangeRollCall("TRUANT",e.row)}}},[t._v("未到")]),t._v(" "),a("el-button",{attrs:{size:"mini",type:"warning",round:""},on:{click:function(a){return t.onChangeRollCall("LEAVE",e.row)}}},[t._v("请假")]),t._v(" "),a("el-button",{attrs:{size:"mini",type:"success",round:""},on:{click:function(a){return t.onChangeRollCall("NORMAL",e.row)}}},[t._v("到课")])]}}],null,!1,3627308221)})],1),t._v(" "),a("pagination",{attrs:{total:t.rollCall.total,page:t.rollCall.page,limit:t.rollCall.limit,"page-sizes":t.rollCall.page_size},on:{"update:page":function(e){return t.$set(t.rollCall,"page",e)},"update:limit":function(e){return t.$set(t.rollCall,"limit",e)},pagination:t.getCallName}})],1)],1)},f=[],v=(a("28a5"),a("333d")),h=a("99b4"),b=a("1cc7"),_=a("ec8a"),g={components:{pagination:v["a"]},name:"teacherRecord",data:function(){return{searchForm:{type:"",status:"",time:[]},searchLsit:[],tableList:[],id:"",complaintsNum:"",currentClassTimes:"",isSalaryNum:"",totalClassTimes:"",studentVisible:!1,courseVisible:!1,studentList:[],cooperationList:[],maskForm:{data:"",startTime:"",endTime:"",status:"",type:"",cooperation:""},markAttendance:{status:!1,dataInfo:{}},activeId:"",activeRow:null,maskrules:{date:[{required:!0,message:"请选择修改日期",trigger:"blur"}],startTime:[{required:!0,message:"请选择开始",trigger:"blur"}],endTime:[{required:!0,message:"请选择结束",trigger:"blur"}]},rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},rollCall:{status:!1,gridData:[],selectItem:{},limit:10,page:1,total:0,page_size:[10,20,40,50]}}},mounted:function(){this.__init()},activated:function(){this.__init()},methods:{__init:function(){var t=this,e=this.$route.query.id;this.id=e,this.rules.page=1,this.getList(),Object(h["t"])({organId:null}).then((function(e){200==e.code&&(t.cooperationList=e.data)}))},search:function(){this.rules.page=1,this.getList()},getList:function(){var t,e,a=this;this.searchForm.time?(t=this.searchForm.time[0],e=this.searchForm.time[1]):(t="",e="");var s={vipGroupId:this.id,page:this.rules.page,rows:this.rules.limit,status:this.searchForm.status||null,teachMode:this.searchForm.type||null,groupType:"VIP",startTime:t,endTime:e};Object(l["u"])(s).then((function(t){200==t.code&&(a.complaintsNum=t.data.baseInfo.complaintsNum,a.currentClassTimes=t.data.baseInfo.courseEndNum,a.isSalaryNum=t.data.baseInfo.isSalaryNum,a.totalClassTimes=t.data.baseInfo.courseNoStartNum,a.tableList=t.data.pageInfo.rows,a.rules.total=t.data.pageInfo.total)}))},batchAdjustmentTime:function(){var t=this,e=this.markAttendance.dataInfo,a={courseScheduleId:e.id,signInStatus:1,signOutStatus:1};Object(b["ad"])(a).then((function(e){200==e.code?(t.$message.success("补卡成功"),t.markAttendance.status=!1,t.getList()):t.$message.error(e.msg)}))},onMarkAttendance:function(t){this.markAttendance={status:!0,dataInfo:t}},onCallName:function(t){this.rollCall.page=1,this.rollCall.selectItem=t,this.getCallName()},getCallName:function(){var t=this.rollCall,e={page:t.page,rows:t.limit,courseScheduleId:t.selectItem.id};Object(b["H"])(e).then((function(e){var a=e.data;t.status=!0,200==e.code&&(t.gridData=a.rows,t.total=a.total)}))},onChangeRollCall:function(t,e){var a=this,s=this.rollCall,i={courseScheduleId:s.selectItem.id,studentAttendances:[{userId:e.studentId,status:t}]};Object(b["Wc"])(i).then((function(s){200==s.code?(a.$message.success("修改成功"),e.status=t,a.getList()):a.$message.error(s.msg)}))},lookStudents:function(t){var e=this,a=t.id;Object(l["F"])({courseScheduleId:a}).then((function(t){200==t.code&&(e.studentList=t.data,e.studentVisible=!0)}))},permission:function(t){return Object(_["a"])(t)},handleClose:function(){this.studentList=[],this.studentVisible=!1},resetClass:function(t){this.courseVisible=!0,this.activeId=t.id,this.activeRow=t},resetCourse:function(){var t=this;this.$refs["maskForm"].validate((function(e){e&&Object(l["T"])({id:t.activeId,classDate:t.maskForm.date,startClassTime:t.maskForm.date+" "+t.maskForm.startTime,endClassTime:t.maskForm.date+" "+t.maskForm.endTime,schoolId:t.maskForm.cooperation}).then((function(e){200==e.code?(t.$message.success("调整成功"),t.getList(),t.courseVisible=!1,t.$refs["maskForm"].resetFields()):t.$message.error(e.msg)}))}))}},filters:{fitterisSalary:function(t){var e=["未结算","已结算"];return e[t]},fitterTeachMode:function(t){return"ONLINE"==t?"线上课":"OFFLINE"==t?"线下课":void 0},fitterStatus:function(t){return"NOT_START"==t?"未开始":"UNDERWAY"==t?"进行中":"OVER"==t?"已结束":void 0},endTime:function(t){return t?t.split(" ")[1].substring(0,5):t},studentCallName:function(t){var e={NORMAL:"到课",TRUANT:"未到",LEAVE:"请假",DROP_OUT:"退学",LATE:"迟到","":"未到"};return e[t]}}},y=g,k=Object(u["a"])(y,p,f,!1,null,null,null),F=k.exports,C=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{},[a("statistic",{attrs:{col:3}},[a("statistic-item",[a("span",[t._v("课程总价")]),t._v(" "),a("span",[t._v(t._s(t._f("moneyFormat")(t.totalPrice)))])]),t._v(" "),a("statistic-item",[a("span",[t._v("实收笔数")]),t._v(" "),a("span",[t._v(t._s(t.feeDeductionNum))])]),t._v(" "),a("statistic-item",[a("span",[t._v("线上课课酬")]),t._v(" "),a("span",[t._v(t._s(t._f("moneyFormat")(t.onlineClassesUnitPrice)))])]),t._v(" "),a("statistic-item",[a("span",[t._v("课酬总额")]),t._v(" "),a("span",[t._v(t._s(t._f("moneyFormat")(t.totalSalary)))])]),t._v(" "),a("statistic-item",[a("span",[t._v("实收总额")]),t._v(" "),a("span",[t._v(t._s(t._f("moneyFormat")(t.totalFeeDeduction)))])]),t._v(" "),a("statistic-item",[a("span",[t._v("线下课课酬")]),t._v(" "),a("span",[t._v(t._s(t._f("moneyFormat")(t.offlineClassesUnitPrice)))])])],1),t._v(" "),a("save-form",{attrs:{inline:!0,"save-key":"vipDetail-fnanceInfo",model:t.searchForm},on:{submit:t.search}},[a("el-form-item",{attrs:{label:"时间范围"}},[a("el-date-picker",{staticStyle:{width:"400px"},attrs:{type:"daterange","range-separator":"至","start-placeholder":"课程开始日期","end-placeholder":"课程结束日期","value-format":"yyyy-MM-dd","picker-options":{firstDayOfWeek:1}},model:{value:t.searchForm.time,callback:function(e){t.$set(t.searchForm,"time","string"===typeof e?e.trim():e)},expression:"searchForm.time"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"danger"}},[t._v("搜索")])],1)],1),t._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:t.tableList}},[a("el-table-column",{attrs:{label:"课程编号",align:"center",prop:"courseScheduleId"}}),t._v(" "),a("el-table-column",{attrs:{label:"上课时间",align:"center",prop:"classDate"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("dateForMinFormat")(e.row.classDate)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"课时类型",align:"center",prop:"teachMode"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("fitterteachMode")(e.row.teachMode)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"实收总额",align:"center",prop:"deductionFee"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v("\n "+t._s(t._f("moneyFormat")(e.row.deductionFee))+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"老师课酬",align:"center",prop:"actualSalary"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v("\n "+t._s(t._f("moneyFormat")(e.row.actualSalary))+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"结算状态",align:"center",prop:"isSalary"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("fitterisSalary")(e.row.isSalary)))])]}}])})],1),t._v(" "),a("pagination",{attrs:{"save-key":"vipDetail-fnanceInfo",sync:"",total:t.rules.total,page:t.rules.page,limit:t.rules.limit,"page-sizes":t.rules.page_size},on:{"update:total":function(e){return t.$set(t.rules,"total",e)},"update:page":function(e){return t.$set(t.rules,"page",e)},"update:limit":function(e){return t.$set(t.rules,"limit",e)},pagination:t.getList}})],1)],1)},S=[],x={components:{pagination:v["a"]},data:function(){return{searchForm:{time:[]},tableList:[],id:"",onlineClassesUnitPrice:"",totalPrice:"",offlineClassesUnitPrice:"",totalFeeDeduction:"",feeDeductionNum:"",totalSalary:"",rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},mounted:function(){this.__init()},activated:function(){this.__init()},methods:{__init:function(){var t=this.$route.query.id;this.id=t,this.rules.page=1,this.getList()},search:function(){this.rules.page=1,this.getList()},getList:function(){var t=this;this.searchForm.time||(this.searchForm.time=[]),Object(l["K"])({vipGroupId:this.id,organId:null,page:this.rules.page,rows:this.rules.limit,startTime:this.searchForm.time[0]||null,endTime:this.searchForm.time[1]||null,groupType:"VIP"}).then((function(e){200==e.code&&(t.tableList=e.data.pageInfo.rows,t.totalPrice=e.data.baseInfo.totalCoursePrice,t.totalFeeDeduction=e.data.baseInfo.totalFeeDeduction,t.feeDeductionNum=e.data.baseInfo.feeDeductionNum,t.totalSalary=e.data.baseInfo.expectTotalSalary,t.onlineClassesUnitPrice=e.data.baseInfo.totalOnlineTeacherSalary,t.offlineClassesUnitPrice=e.data.baseInfo.totalOfflineTeacherSalary,t.rules.total=e.data.pageInfo.total)}))}},filters:{fitterisSalary:function(t){var e=["未结算","已结算"];return e[t]},fitterteachMode:function(t){return"ONLINE"==t?"线上课":"OFFLINE"==t?"线下课":void 0}}},w=x,T=Object(u["a"])(w,C,S,!1,null,null,null),L=T.exports,I=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"btnWrap"},[a("div",[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupManage/addVipGroupStudents",expression:"'vipGroupManage/addVipGroupStudents'"}],attrs:{type:"primary"},on:{click:t.addStudentList}},[t._v("\n 新增学员\n ")]),t._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupManage/update",expression:"'vipGroupManage/update'"}],staticStyle:{"margin-right":"15px"},attrs:{type:"primary"},on:{click:function(e){t.expireVisible=!0}}},[t._v("\n 有效期调整\n ")])],1),t._v(" "),a("el-popover",{attrs:{placement:"left",width:"500",trigger:"click"}},[a("div",{staticClass:"popoverWrap"},[a("p",[t._v("VIP退费规则:")]),t._v(" "),a("p",[t._v("(预计课程单价*课时数-课程标准单价*已完成课时数)*0.8")])]),t._v(" "),a("el-button",{staticStyle:{color:"red"},attrs:{slot:"reference",type:"text",icon:"el-icon-question"},slot:"reference"},[t._v("退费说明")])],1)],1),t._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{label:"学员姓名",prop:"userName",align:"center",width:"180"}}),t._v(" "),a("el-table-column",{attrs:{label:"手机号",align:"center",prop:"phone",width:"180"}}),t._v(" "),a("el-table-column",{attrs:{prop:"studentStatus",align:"center",label:"学员状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v("\n "+t._s(t._f("studentStatus")(e.row.studentStatus))+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"courseSalary",align:"center",label:"课程余额"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v("\n "+t._s(t._f("moneyFormat")(e.row.courseSalary))+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"applyDate",align:"center",label:"报名时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v("\n "+t._s(t._f("formatTimer")(e.row.applyDate))+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"refundDate",align:"center",label:"退课时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v("\n "+t._s(t._f("formatTimer")(e.row.refundDate))+"\n ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[0==e.row.studentStatus||3==e.row.studentStatus?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupManage/applyRefundForStudent",expression:"'vipGroupManage/applyRefundForStudent'"}],attrs:{type:"text"},on:{click:function(a){return t.lookFee(e)}}},[t._v("退学")]):t._e(),t._v(" "),0==e.row.studentStatus?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.stopCourse(e)}}},[t._v("休学")]):t._e(),t._v(" "),3==e.row.studentStatus?a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.recoveryCourse(e)}}},[t._v("恢复")]):t._e()],1)]}}])})],1)],1),t._v(" "),t.maskVisible?a("el-dialog",{attrs:{title:"学员列表",width:"70%",visible:t.maskVisible},on:{"update:visible":function(e){t.maskVisible=e}}},[a("el-form",{attrs:{model:t.maskForm,inline:!0},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",[a("el-input",{attrs:{placeholder:"请输入学生姓名或手机号"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.search(e)}},model:{value:t.maskForm.search,callback:function(e){t.$set(t.maskForm,"search","string"===typeof e?e.trim():e)},expression:"maskForm.search"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"danger"},on:{click:t.search}},[t._v("搜索")])],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.reset}},[t._v("重置")])],1)],1),t._v(" "),a("el-table",{ref:"maskStudentList",attrs:{data:t.maskStudentList,"header-cell-style":{background:"#EDEEF0",color:"#444"},"row-key":"id"},on:{"selection-change":t.handleSelectionChange,select:t.onTableSelect}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),a("el-table-column",{attrs:{prop:"userName",align:"center",label:"学生姓名",width:"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"phone",align:"center",label:"手机号",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"courseSalary",label:"课程余额",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v("\n "+t._s(t._f("moneyFormat")(e.row.courseSalary))+"\n ")])]}}],null,!1,3721500562)}),t._v(" "),a("el-table-column",{attrs:{prop:"balance",label:"账户余额"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v("\n "+t._s(t._f("moneyFormat")(e.row.balance))+"\n ")])]}}],null,!1,2320964093)}),t._v(" "),a("el-table-column",{attrs:{label:"剩余排课数",align:"center",prop:"totalClassTimes"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(e.row.totalClassTimes)+"节")])]}}],null,!1,3277076146)}),t._v(" "),a("el-table-column",{attrs:{prop:"studentId",label:"线上课单价"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"number-input",staticStyle:{width:"90% !important"},attrs:{disabled:!0,controls:!1,min:0,placeholder:"线上课单价"},model:{value:e.row.onlineClassesUnitPrice,callback:function(a){t.$set(e.row,"onlineClassesUnitPrice",a)},expression:"scope.row.onlineClassesUnitPrice"}})]}}],null,!1,1145086984)}),t._v(" "),a("el-table-column",{attrs:{prop:"studentId",label:"线下课单价"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"number-input",staticStyle:{width:"90% !important"},attrs:{disabled:!0,controls:!1,min:0,placeholder:"线下课单价"},model:{value:e.row.offlineClassesUnitPrice,callback:function(a){t.$set(e.row,"offlineClassesUnitPrice",a)},expression:"scope.row.offlineClassesUnitPrice"}})]}}],null,!1,2206977511)})],1),t._v(" "),a("pagination",{attrs:{total:t.rules.total,page:t.rules.page,limit:t.rules.limit,"page-sizes":t.rules.page_size},on:{"update:total":function(e){return t.$set(t.rules,"total",e)},"update:page":function(e){return t.$set(t.rules,"page",e)},pagination:t.getList}}),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.maskVisible=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.addStudent}},[t._v("确 定")])],1)],1):t._e(),t._v(" "),a("el-dialog",{attrs:{title:"学员复学",width:"800px",visible:t.adjustmentVisible},on:{"update:visible":function(e){t.adjustmentVisible=e}}},[a("el-form",{ref:"adjustmentForm",attrs:{model:t.adjustmentForm,"label-position":"right","label-width":"120px",rules:t.adjustmentRules,inline:!0}},[a("el-form-item",{attrs:{label:"剩余课时"}},[a("el-input",{staticStyle:{width:"200px !important"},attrs:{disabled:""},model:{value:t.adjustmentForm.count,callback:function(e){t.$set(t.adjustmentForm,"count","string"===typeof e?e.trim():e)},expression:"adjustmentForm.count"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"任课老师",prop:"teacher"}},[a("el-select",{staticStyle:{width:"200px !important"},attrs:{clearable:"",filterable:""},model:{value:t.adjustmentForm.teacher,callback:function(e){t.$set(t.adjustmentForm,"teacher","string"===typeof e?e.trim():e)},expression:"adjustmentForm.teacher"}},t._l(t.teacherList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.realName,value:t.id}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"排课起始时间",prop:"courseTime"}},[a("el-date-picker",{staticStyle:{width:"200px !important"},attrs:{"picker-options":t.pickerOptions,type:"date","value-format":"yyyy-MM-dd",placeholder:"选择日期"},model:{value:t.adjustmentForm.courseTime,callback:function(e){t.$set(t.adjustmentForm,"courseTime","string"===typeof e?e.trim():e)},expression:"adjustmentForm.courseTime"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"有效期截止",prop:"expireDate"}},[a("el-date-picker",{staticStyle:{width:"200px !important"},attrs:{disabled:!0,"picker-options":t.pickerOptions,type:"date","value-format":"yyyy-MM-dd",placeholder:"选择日期"},model:{value:t.adjustmentForm.expireDate,callback:function(e){t.$set(t.adjustmentForm,"expireDate","string"===typeof e?e.trim():e)},expression:"adjustmentForm.expireDate"}})],1),t._v(" "),a("el-form-item",[a("el-checkbox",{staticStyle:{"margin-left":"10px"},model:{value:t.adjustmentForm.checked,callback:function(e){t.$set(t.adjustmentForm,"checked","string"===typeof e?e.trim():e)},expression:"adjustmentForm.checked"}},[t._v("是否跳过节假日")])],1)],1),t._v(" "),a("div",{staticClass:"WeekWrap"},[a("h3",{staticStyle:{"margin-bottom":"20px"}},[t._v("\n 循环次数\n "),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"text"},on:{click:t.addWeek}},[t._v("添加")])],1),t._v(" "),a("div",{staticClass:"countWrap",staticStyle:{"margin-bottom":"10px"}},t._l(t.weekList,(function(e,s){return a("div",{key:s,staticClass:"countItem",staticStyle:{"margin-bottom":"20px"}},[a("span",{staticClass:"title"},[t._v("循环周期: ")]),t._v(" "),a("el-select",{staticStyle:{width:"200px !important"},attrs:{filterable:"",clearable:""},model:{value:e.dayOfWeek,callback:function(a){t.$set(e,"dayOfWeek","string"===typeof a?a.trim():a)},expression:"item.dayOfWeek"}},t._l(t.weekDateList,(function(t,e){return a("el-option",{key:e,attrs:{label:t.label,value:t.value}})})),1),t._v(" "),a("span",{staticStyle:{"margin-left":"10px"}},[t._v("开始时间")]),t._v(" "),a("el-time-select",{staticStyle:{"margin-left":"10px",width:"100px"},attrs:{placeholder:"","picker-options":{start:"04:30",step:"00:05",end:"23:55"}},model:{value:e.startClassTime,callback:function(a){t.$set(e,"startClassTime","string"===typeof a?a.trim():a)},expression:"item.startClassTime"}}),t._v(" "),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return t.removeWeek(e)}}})],1)})),0)]),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.adjustmentVisible=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.submieRecover}},[t._v("确 定")])],1)],1),t._v(" "),a("el-dialog",{attrs:{title:"有效期调整",width:"400px",visible:t.expireVisible},on:{"update:visible":function(e){t.expireVisible=e}}},[a("el-form",{ref:"expireForm",attrs:{model:t.expireForm,rules:t.expireRules,"label-position":"right","label-width":"80px;",inline:!0}},[a("el-form-item",{attrs:{label:"课程结束时间",prop:"coursesExpireDate"}},[a("el-date-picker",{staticStyle:{width:"200px !important"},attrs:{type:"date","picker-options":t.pickerOptions,"value-format":"yyyy-MM-dd",placeholder:"选择日期"},model:{value:t.expireForm.coursesExpireDate,callback:function(e){t.$set(t.expireForm,"coursesExpireDate","string"===typeof e?e.trim():e)},expression:"expireForm.coursesExpireDate"}})],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.expireVisible=!1}}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:t.submitExpireDate}},[t._v("确 定")])],1)],1)],1)},$=[],O=a("c80c"),D=(a("96cf"),a("3b8d")),j=(a("ac6a"),a("386d"),a("5a0c"),{components:{pagination:v["a"]},data:function(){return{expireVisible:!1,expireForm:{coursesExpireDate:""},expireRules:{coursesExpireDate:[{required:!0,message:"请选择课程结束时间",trigger:"blur"}]},adjustmentVisible:!1,tableList:[],id:"",maskStudentList:[],maskVisible:!1,rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},activeStudent:"",maskForm:{search:""},adjustmentForm:{count:"",courseTime:"",checked:!1,addCount:"",courseType:"",fee:"",teacher:"",expireDate:""},adjustmentRules:{courseTime:[{required:!0,message:"请选择开始时间"}],addCount:[{required:!0,message:"请输入加课次数"}],courseType:[{required:!0,message:"请选择课程类型"}],fee:[{required:!0,message:"请输入费用"}],teacher:[{required:!0,message:"请选择老师"}],expireDate:[{required:!0,message:"请输入有效期截止"}]},weekDateList:[{value:"1",label:"星期一"},{value:"2",label:"星期二"},{value:"3",label:"星期三"},{value:"4",label:"星期四"},{value:"5",label:"星期五"},{value:"6",label:"星期六"},{value:"7",label:"星期日"}],weekList:[{dayOfWeek:"",startTime:"",endTime:"",moid:(new Date).getTime()}],pickerOptions:{firstDayOfWeek:1,disabledDate:function(t){return t.getTime()+864e5<=(new Date).getTime()}},teacherList:[],vipDetail:{},deleteList:[],isDetele:!1}},mounted:function(){this.__init()},activated:function(){this.__init()},methods:{permission:function(t){return console.log(Object(_["a"])(t)),Object(_["a"])(t)},__init:function(){var t=this,e=this.$route.query.id;this.id=e,this.rules.page=1,this.getStudents(),Object(l["r"])({vipGroupId:this.id}).then((function(e){200==e.code&&(t.teacherList=e.data)})),Object(l["I"])({vipGroupId:e}).then((function(e){200==e.code&&(t.vipDetail=e.data)}))},search:function(){this.rules.page=1,this.getList()},reset:function(){this.rules.page=1,this.maskForm.search=null,this.activeStudent="",this.getList()},getStudents:function(){var t=this;Object(l["t"])({vipGroupId:this.id,groupType:"VIP"}).then((function(e){if(200==e.code)for(var a in t.tableList=e.data.rows,t.tableList)t.tableList[a].fee=0,t.tableList[a].visible=!1}))},removeWeek:function(t){for(var e in this.weekList)this.weekList[e].id==t.id&&this.weekList.splice(e,1)},leaveSchool:function(t){var e=this,a=t.row.id,s=this.id,i=t.row.fee;Object(l["M"])({studentId:a,vipGroupId:s,amount:i}).then((function(t){200==t.code&&(e.$message.success("退学成功"),e.getStudents()),206==t.code&&e.$confirm(t.msg,"提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then((function(){Object(l["M"])({studentId:a,vipGroupId:s,amount:i,confirmReturnActivityGive:!0}).then((function(t){200==t.code&&(e.$message.success("退学成功"),e.getStudents())}))}))}))},lookFee:function(t){var e=this;this.$confirm("确定是否退学?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a=t.row.id;3==t.row.studentStatus?e.leaveSchool(t):Object(l["D"])({studentId:a,vipGroupId:e.id}).then((function(a){if(200==a.code){t.row.fee=a.data.suplusCourseFee;var s=e.$createElement;e.$msgbox({title:"消息",closeOnClickModal:!1,message:s("p",null,[s("p",null,"请输入退课金额 "),s("input",{class:"el-input__inner",attrs:{value:a.data.suplusCourseFee},on:{input:function(e){t.row.fee=e.target.value,this.$emit("input",e.target.value)}.bind(e)}}),s("p",{style:"color: red;marginTop:20px"},"退费金额暂不进入账户余额")]),showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消"}).then((function(a){e.leaveSchool(t)}))}}))})).catch((function(){}))},addStudentList:function(){var t=this;this.tableList.length<=0?this.$confirm("添加学员后,该课程组将无法通过购买途径加入,是否确认该操作?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.getList()})).catch((function(){})):this.getList()},getList:function(){var t=this,e=this.maskForm.search||null;Object(l["x"])({vipGroupId:this.id,organId:null,page:this.rules.page,rows:this.rules.limit,search:e}).then((function(e){if(200==e.code){t.rules.total=e.data.total,t.maskStudentList=e.data.rows;var a=t.deleteList.map((function(t){return t.id}));t.isDetele=!0,t.$nextTick((function(){t.maskStudentList.forEach((function(e){-1!=a.indexOf(e.id)&&t.$refs.maskStudentList.toggleRowSelection(e,!0)})),t.isDetele=!1})),t.maskStudentList.forEach((function(e){var a,s;e.offlineClassesUnitPrice?e.offlineClassesUnitPrice:e.offlineClassesUnitPrice=null===(a=t.vipDetail)||void 0===a?void 0:a.offlineClassesUnitPrice,e.onlineClassesUnitPrice?e.onlineClassesUnitPrice:e.onlineClassesUnitPrice=null===(s=t.vipDetail)||void 0===s?void 0:s.onlineClassesUnitPrice})),t.maskVisible=!0}}))},handleSelectionChange:function(t){var e=this;if(t.length>0)this.deleteList=this.deleteList.concat(t),this.deleteList=this.$helpers.lodash.uniqBy(this.deleteList,"id");else{if(this.isDetele)return;var a=this.deleteList.map((function(t){return t.id}));this.$nextTick((function(){var t=[];e.maskStudentList.forEach((function(s){t.push(s.id),-1!=a.indexOf(s.id)&&e.$refs.maskStudentList.toggleRowSelection(s,!1)})),e.deleteList=e.$helpers.lodash.remove(e.deleteList,(function(e){return-1==t.indexOf(e.id)})),e.deleteList.length<=0&&e.clearCom()}))}},onTableSelect:function(t,e){var a=this.deleteList.map((function(t){return t.id}));-1!=a.indexOf(e.id)&&(this.deleteList.splice(a.indexOf(e.id),1),this.deleteList.length<=0&&this.clearCom())},clearCom:function(){this.$set(this,"deleteList",[]),this.$refs.maskStudentList&&this.$refs.maskStudentList.clearSelection()},getTemplateRow:function(t,e){this.activeStudent=e.id},addStudent:function(){var t=this;if(!this.deleteList<0)this.$message.error("请选择一名学生");else{var e="",a=this.deleteList.map((function(a){return e+=a.userName+",",{vipGroupId:t.id,studentId:a.id,offlineClassesUnitPrice:a.offlineClassesUnitPrice,onlineClassesUnitPrice:a.onlineClassesUnitPrice}}));e=e.slice(0,e.length-1),this.$confirm("是否将".concat(e,"加入课程组?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var e=Object(D["a"])(Object(O["a"])().mark((function e(s){return Object(O["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:Object(l["f"])(a).then((function(e){200==e.code&&(t.$message.success("添加成功"),t.getStudents(),t.clearCom())}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(t){console.log(t)}))}},stopCourse:function(t){var e=this;this.$confirm("是否休学?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(l["cb"])({vipGroupId:e.id,studentId:t.row.id}).then((function(t){200==t.code&&(e.$message.success("休学成功"),e.getStudents())}))})).catch((function(){}))},recoveryCourse:function(t){var e=this;Object(l["C"])({studentId:t.row.id,vipGroupId:this.id}).then((function(a){if(200==a.code)if(0==a.data.isPause){var s=e.$createElement;e.$msgbox({title:"提示",message:s("p",null,[s("p",null,"将按照当前剩余课时安排上课")]),confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0}).then((function(){Object(l["N"])({vipGroupId:e.id,userId:t.row.id}).then((function(t){200==t.code&&(e.adjustmentVisible=!1,e.getStudents())}))})).catch((function(){}))}else e.activeStudent=a.data.studentId,e.adjustmentVisible=!0,e.adjustmentForm.teacher=a.data.teacherId,e.adjustmentForm.count="".concat(a.data.totalCourseTimes,"+").concat(a.data.giveCourseTimes),e.adjustmentForm.expireDate=a.data.expireDate}))},addWeek:function(){this.weekList.push({dayOfWeek:"",startClassTime:"",endClassTime:"",id:new Date})},submieRecover:function(){var t=this;this.weekList.length<=0?this.$message.error("排课循环次数不能为空"):(this.$refs["adjustmentForm"].validate((function(e){if(e){var a={};a.courseCreateStartTime=t.adjustmentForm.courseTime,a.skipHoliday=t.adjustmentForm.checked,a.teacherId=t.adjustmentForm.teacher,a.userId=t.activeStudent,a.courseTimes=[],a.courseTimes=t.weekList,a.vipGroupId=t.id,a.expireDate=t.adjustmentForm.expireDate,Object(l["N"])(a).then((function(e){200==e.code&&(t.adjustmentVisible=!1,t.getStudents())}))}else t.$message.error("请填写必要参数")})),this.activeStudent)},submitExpireDate:function(){var t=this;this.$refs.expireForm.validate((function(e){e&&Object(l["bb"])({id:t.id,coursesExpireDate:t.expireForm.coursesExpireDate}).then((function(e){200==e.code?(t.$message.success("有效期修改成功"),t.expireVisible=!1,t.getStudents()):t.$message.error(e.msg)}))}))}},watch:{maskVisible:function(t){t||(this.clearCom(),this.rules={limit:10,page:1,total:0,page_size:[10,20,40,50]})}}}),N=j,E=(a("84dc"),Object(u["a"])(N,I,$,!1,null,"94200dc0",null)),V=E.exports,P=a("84f0"),R={components:{teacherRecord:F,vipBase:m,fnanceInfo:L,vipStudentList:V,vipReset:P["default"]},name:"vipDetail",data:function(){return{activeName:"1",className:"",rules:null,searchForm:null,vipDetail:null,permissionList:{vipBase:Object(_["a"])("/vipDetail/vipBase"),teacherRecord:Object(_["a"])("/vipDetail/teacherRecord"),fnanceInfo:Object(_["a"])("/vipDetail/fnanceInfo"),vipStudentList:Object(_["a"])("/vipDetail/vipStudentList"),vipReset:Object(_["a"])("/vipReset")}}},mounted:function(){this.__init()},methods:{__init:function(){var t=this.$route.query;t.rules&&(this.rules=t.rules),t.searchForm&&(this.searchForm=t.searchForm),this.className=t.name;this.$route.query.id},handleClick:function(t,e){this.activeName=t.name},onCancel:function(){this.$store.dispatch("delVisitedViews",this.$route),this.$router.push({path:"/vipManager/vipList"})}}},M=R,A=Object(u["a"])(M,s,i,!1,null,null,null);e["default"]=A.exports},bfc2:function(t,e,a){},db62:function(t,e,a){"use strict";a("fef4")},fef4:function(t,e,a){}}]);
|