chunk-bec273ac.632fcdbe.js 33 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bec273ac"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),Math.easeInOutQuad=function(e,t,a,r){return e/=r/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function s(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function n(e,t,a){var n=i(),o=e-n,u=20,l=0;t="undefined"===typeof t?500:t;var c=function e(){l+=u;var i=Math.easeInOutQuad(l,n,o,t);s(i),l<t?r(e):a&&"function"===typeof a&&a()};c()}},8018:function(e,t,a){"use strict";a.d(t,"w",(function(){return u})),a.d(t,"t",(function(){return l})),a.d(t,"h",(function(){return c})),a.d(t,"e",(function(){return d})),a.d(t,"v",(function(){return m})),a.d(t,"u",(function(){return f})),a.d(t,"n",(function(){return p})),a.d(t,"C",(function(){return h})),a.d(t,"D",(function(){return b})),a.d(t,"y",(function(){return v})),a.d(t,"x",(function(){return g})),a.d(t,"B",(function(){return T})),a.d(t,"g",(function(){return y})),a.d(t,"q",(function(){return k})),a.d(t,"z",(function(){return _})),a.d(t,"A",(function(){return F})),a.d(t,"s",(function(){return j})),a.d(t,"i",(function(){return w})),a.d(t,"m",(function(){return C})),a.d(t,"r",(function(){return x})),a.d(t,"a",(function(){return D})),a.d(t,"l",(function(){return S})),a.d(t,"o",(function(){return O})),a.d(t,"p",(function(){return $})),a.d(t,"k",(function(){return I})),a.d(t,"d",(function(){return M})),a.d(t,"c",(function(){return L})),a.d(t,"j",(function(){return V})),a.d(t,"b",(function(){return H})),a.d(t,"f",(function(){return E}));var r=a("b775"),s=a("4328"),i=a.n(s),n=a("829b"),o="/api-web";function u(e){return Object(r["a"])({url:o+"/teacher/queryPage",method:"get",params:e})}function l(e){return Object(r["a"])({url:o+"/teacher/get",method:"get",params:e})}function c(e){return Object(r["a"])({url:o+"/teacher/getTeacherMusicClass",method:"get",params:e})}function d(e){return Object(r["a"])({url:o+"/demoGroup/findTeacherDemoGroups",method:"get",params:e})}function m(e){return Object(r["a"])({url:o+"/teacher/queryCloses",method:"get",params:e})}function f(e){return Object(r["a"])({url:o+"/teacherLeaveRecord/queryPage",method:"get",params:e})}function p(e){return Object(r["a"])({url:o+"/teacher/sumTeacherNoPay",method:"get",params:e})}function h(e){return Object(r["a"])({url:o+"/teacherDefaultVipGroupSalary/queryPageByTeacherId",method:"get",params:e})}function b(e){return Object(n["a"])({url:o+"/teacherDefaultVipGroupSalary/upSet",method:"post",data:e})}function v(e){return Object(r["a"])({url:o+"/teacherDefaultMusicGroupSalary/queryPage",method:"get",params:e})}function g(e){return Object(r["a"])({url:o+"/teacherDefaultMusicGroupSalary/batchUpset",method:"post",data:e})}function T(e){return Object(r["a"])({url:o+"/courseSchedule/updateTeacherCoursesSalary",method:"post",data:i.a.stringify(e)})}function y(e){return Object(r["a"])({url:o+"/school/findVipSchoolByTeacher",method:"get",params:e})}function k(e){return Object(r["a"])({url:o+"/teacher/add",method:"post",data:i.a.stringify(e)})}function _(e){return Object(r["a"])({url:o+"/teacher/update",method:"post",data:i.a.stringify(e)})}function F(e){return Object(r["a"])({url:o+"/teacher/update1",method:"post",data:i.a.stringify(e)})}function j(e){return Object(r["a"])({url:o+"/teacherFreeTime/query",method:"get",params:e})}function w(e){return Object(r["a"])({url:o+"/teacherAttendance/getTeacherPersonalAttendanceDetail",method:"get",params:e})}function C(e){return Object(r["a"])({url:o+"/teacherFreeTime/updateSet",method:"post",data:i.a.stringify(e)})}function x(e){return Object(r["a"])({url:o+"/teacherDefaultPracticeGroupSalary/queryPageByTeacherId",method:"get",params:e})}function D(e){return Object(n["a"])({url:o+"/teacherDefaultPracticeGroupSalary/update",method:"post",data:e})}function S(e){return Object(r["a"])({url:o+"/sysTenantAccount/queryTenantAccountDetail",method:"get",params:e})}function O(e){return Object(r["a"])({url:o+"/sysTenantAccount/addMinutes",method:"post",data:i.a.stringify(e)})}function $(e){return Object(r["a"])({url:o+"/sysTenantAccount/subtractMinutes",method:"post",data:i.a.stringify(e)})}function I(e){return Object(r["a"])({url:o+"/sysTenantAccount/get",method:"get",params:e})}function M(e){return Object(r["a"])({url:o+"/coursesGroupController/findTeacherCourseGroupsWithWeb",method:"get",params:e})}function L(e){return Object(r["a"])({url:o+"/courseSchedule/classGroupTeacherAdjust",method:"post",data:i.a.stringify(e)})}function V(e){return Object(r["a"])({url:o+"/teacher/queryStudent",method:"get",params:e})}function H(e){return Object(r["a"])({url:o+"/studentManage/batchUpdateAdviser",method:"post",data:i.a.stringify(e)})}function E(e){return Object(r["a"])({url:o+"/courseScheduleTeacherSalary/getCourseTeachers",method:"get",params:e})}},"84f0":function(e,t,a){"use strict";a.r(t);var r,s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"titlewrap"}),e._v(" "),a("div",{staticClass:"vipwrap"},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"courseSchedule/vipCourseAdjust",expression:"'courseSchedule/vipCourseAdjust'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.adjustment}},[e._v("\n 批量调整\n ")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupManage/updateVipBaseInfo",expression:"'vipGroupManage/updateVipBaseInfo'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(t){e.addrVisible=!0}}},[e._v("\n 修改教学点\n ")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupManage/updateVipBaseInfo/courseClass",expression:"'vipGroupManage/updateVipBaseInfo/courseClass'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:function(t){e.educationalVisible=!0}}},[e._v("\n 课程组信息修改\n ")])],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{ref:"tableList",attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",selectable:e.isDisabled,width:"55"}}),e._v(" "),a("el-table-column",{attrs:{label:"课程名称",align:"center",prop:"name"}}),e._v(" "),a("el-table-column",{attrs:{label:"课程编号",align:"center",prop:"id"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(t.row.id?t.row.id:"--")+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"上课日期",align:"center",prop:"classDate"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("formatTimer")(t.row.classDate)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"课程状态",align:"center",prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("coursesStatus")(t.row.status)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"是否点名",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(t.row.isCallNames?"已点名":"未点名"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"结算状态",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(t.row.isSettlement?"已结算":"未结算"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"开始时间",align:"center",prop:"startClassTimeStr"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("timerForMinFormat")(t.row.startClassTimeStr)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"结束时间",align:"center",prop:"endClassTimeStr"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("timerForMinFormat")(t.row.endClassTimeStr)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"课程类型",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("teachMode")(t.row.teachMode)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"教学点",align:"center",prop:"schoolName"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(t.row.schoolName?t.row.schoolName:"网络教室")+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",width:"180",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[t.row.id&&!t.row.isSettlement&&e.$helpers.permission("courseSchedule/classStartDateAdjust/vipReset")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.resetClass(t.row)}}},[e._v("调整")]):e._e(),e._v(" "),t.row.id&&!t.row.isSettlement&&"OVER"!=t.row.status&&e.$helpers.permission("courseSchedule/batchDelete")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.removeClass(t.row)}}},[e._v("删除")]):e._e(),e._v(" "),t.row.id&&!t.row.isSettlement&&e.$helpers.permission("vip/cleanAttendance")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.clearAttend(t.row)}}},[e._v("清除考勤")]):e._e()],1)]}}])})],1),e._v(" "),a("pagination",{attrs:{sync:"",total:e.rules.total,page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:total":function(t){return e.$set(e.rules,"total",t)},"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}})],1),e._v(" "),a("el-dialog",{attrs:{title:"课程调整",width:"400px","before-close":e.handleClose,visible:e.courseVisible},on:{"update:visible":function(t){e.courseVisible=t}}},[a("el-form",{ref:"maskForm",staticClass:"maskForm",attrs:{model:e.maskForm,rules:e.maskRules,"label-position":"right","label-width":"80px",inline:!0}},[a("el-form-item",{attrs:{label:"上课日期",prop:"date"}},[a("el-date-picker",{attrs:{type:"date","picker-options":e.coursesDate(),"value-format":"yyyy-MM-dd",placeholder:"选择日期"},model:{value:e.maskForm.date,callback:function(t){e.$set(e.maskForm,"date","string"===typeof t?t.trim():t)},expression:"maskForm.date"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"开始时间",prop:"startTime"}},[a("el-time-picker",{attrs:{placeholder:"起始时间",format:"HH:mm","value-format":"HH:mm","picker-options":{selectableRange:e.nowTime+" - 23:30:00"}},on:{change:e.changeStartTime},model:{value:e.startTime,callback:function(t){e.startTime="string"===typeof t?t.trim():t},expression:"startTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"结束时间",prop:"endTime"}},[a("el-time-picker",{attrs:{placeholder:"结束时间",format:"HH:mm","value-format":"HH:mm",disabled:""},model:{value:e.maskForm.endTime,callback:function(t){e.$set(e.maskForm,"endTime",t)},expression:"maskForm.endTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"课程类型",prop:"courseType"}},[a("el-select",{attrs:{clearable:""},model:{value:e.maskForm.teachMode,callback:function(t){e.$set(e.maskForm,"teachMode","string"===typeof t?t.trim():t)},expression:"maskForm.teachMode"}},[a("el-option",{attrs:{label:"线上课",value:"ONLINE"}}),e._v(" "),a("el-option",{attrs:{label:"线下课",value:"OFFLINE"}})],1)],1),e._v(" "),"OFFLINE"==e.maskForm.teachMode?a("el-form-item",{attrs:{label:"教学地点"}},[a("el-select",{attrs:{filterable:"",clearable:""},model:{value:e.maskForm.address,callback:function(t){e.$set(e.maskForm,"address","string"===typeof t?t.trim():t)},expression:"maskForm.address"}},e._l(e.schoolList,(function(e,t){return a("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1):e._e()],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.courseVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.submitResetClass}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:e.adjustmentName,width:"800px",visible:e.adjustmentVisible},on:{"update:visible":function(t){e.adjustmentVisible=t}}},[a("el-form",{ref:"adjustmentForm",attrs:{model:e.adjustmentForm,"label-position":"right","label-width":"120px",rules:e.adjustmentRules,inline:!0}},[e.isaddCourse?e._e():a("el-form-item",{attrs:{label:"已选择课时数"}},[a("el-input",{attrs:{disabled:""},model:{value:e.adjustmentForm.count,callback:function(t){e.$set(e.adjustmentForm,"count","string"===typeof t?t.trim():t)},expression:"adjustmentForm.count"}})],1),e._v(" "),e.isaddCourse?a("el-form-item",{attrs:{label:"添加课时数",prop:"addCount"}},[a("el-input",{attrs:{type:"number"},nativeOn:{mousewheel:function(e){e.preventDefault()}},model:{value:e.adjustmentForm.addCount,callback:function(t){e.$set(e.adjustmentForm,"addCount","string"===typeof t?t.trim():t)},expression:"adjustmentForm.addCount"}})],1):e._e(),e._v(" "),a("br"),e._v(" "),e.isaddCourse?a("el-form-item",{attrs:{label:"单课费用",prop:"fee"}},[a("el-input",{model:{value:e.adjustmentForm.fee,callback:function(t){e.$set(e.adjustmentForm,"fee","string"===typeof t?t.trim():t)},expression:"adjustmentForm.fee"}})],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"课程类型",prop:"courseType"}},[a("el-select",{attrs:{clearable:""},model:{value:e.adjustmentForm.courseType,callback:function(t){e.$set(e.adjustmentForm,"courseType","string"===typeof t?t.trim():t)},expression:"adjustmentForm.courseType"}},[a("el-option",{attrs:{label:"线上课",value:"ONLINE"}}),e._v(" "),a("el-option",{attrs:{label:"线下课",value:"OFFLINE"}})],1)],1),e._v(" "),"OFFLINE"==e.adjustmentForm.courseType?a("el-form-item",{attrs:{label:"教学地点"}},[a("el-select",{attrs:{filterable:"",clearable:""},model:{value:e.adjustmentForm.address,callback:function(t){e.$set(e.adjustmentForm,"address","string"===typeof t?t.trim():t)},expression:"adjustmentForm.address"}},e._l(e.schoolList,(function(e,t){return a("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1):e._e(),e._v(" "),a("br"),e._v(" "),a("el-form-item",{attrs:{label:"排课起始时间",prop:"courseTime"}},[a("el-date-picker",{staticStyle:{width:"200px!important"},attrs:{"picker-options":e.pickerOptions(),type:"date","value-format":"yyyy-MM-dd",placeholder:"选择日期"},model:{value:e.adjustmentForm.courseTime,callback:function(t){e.$set(e.adjustmentForm,"courseTime","string"===typeof t?t.trim():t)},expression:"adjustmentForm.courseTime"}}),e._v(" "),a("el-checkbox",{staticStyle:{"margin-left":"10px"},model:{value:e.adjustmentForm.checked,callback:function(t){e.$set(e.adjustmentForm,"checked","string"===typeof t?t.trim():t)},expression:"adjustmentForm.checked"}},[e._v("是否跳过节假日")])],1)],1),e._v(" "),a("div",{staticClass:"WeekWrap"},[a("h3",{staticStyle:{"margin-bottom":"20px"}},[e._v("\n 循环次数\n "),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"text"},on:{click:e.addWeek}},[e._v("添加")])],1),e._v(" "),a("div",{staticClass:"countWrap",staticStyle:{"margin-bottom":"10px"}},e._l(e.weekList,(function(t,r){return a("div",{key:r,staticClass:"countItem",staticStyle:{"margin-bottom":"20px"}},[a("span",[e._v("循环周期:")]),e._v(" "),a("el-select",{attrs:{filterable:"",clearable:""},model:{value:t.dayOfWeek,callback:function(a){e.$set(t,"dayOfWeek","string"===typeof a?a.trim():a)},expression:"item.dayOfWeek"}},e._l(e.weekDateList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1),e._v(" "),a("span",{staticStyle:{"margin-left":"10px"}},[e._v("开始时间")]),e._v(" "),a("el-time-picker",{staticStyle:{"margin-left":"10px"},attrs:{placeholder:"",format:"HH:mm","value-format":"HH:mm","picker-options":{selectableRange:"06:00:00 - 21:00:00"}},on:{change:function(a){e.changeStartTimes(a,t)}},model:{value:t.startClassTime,callback:function(a){e.$set(t,"startClassTime","string"===typeof a?a.trim():a)},expression:"item.startClassTime"}}),e._v(" "),a("span",{staticStyle:{"margin-left":"10px"}},[e._v("结束时间")]),e._v(" "),a("el-time-picker",{staticStyle:{"margin-left":"10px"},attrs:{placeholder:"",format:"HH:mm","value-format":"HH:mm",disabled:"","picker-options":{selectableRange:"06:00:00 - 21:00:00"}},model:{value:t.endClassTime,callback:function(a){e.$set(t,"endClassTime","string"===typeof a?a.trim():a)},expression:"item.endClassTime"}}),e._v(" "),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return e.removeWeek(t)}}})],1)})),0)]),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.adjustmentVisible=!1}}},[e._v("取 消")]),e._v(" "),e.isaddCourse?e._e():a("el-button",{attrs:{type:"primary"},on:{click:e.submitAdjustment}},[e._v("确 定")]),e._v(" "),e.isaddCourse?a("el-button",{attrs:{type:"primary"},on:{click:e.addCourseSubmit}},[e._v("确 定")]):e._e()],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"教学点",width:"400px",visible:e.addrVisible},on:{"update:visible":function(t){e.addrVisible=t}}},[a("el-form",{attrs:{model:e.addrForm}},[a("el-form-item",{attrs:{label:"教学点"}},[a("el-select",{attrs:{clearable:"",filterable:""},model:{value:e.addrForm.address,callback:function(t){e.$set(e.addrForm,"address","string"===typeof t?t.trim():t)},expression:"addrForm.address"}},e._l(e.schoolList,(function(e,t){return a("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.addrVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.resetAddrSubmit}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"课程信息",width:"400px",visible:e.educationalVisible},on:{"update:visible":function(t){e.educationalVisible=t}}},[a("el-form",{attrs:{model:e.addrForm,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"课程分部",prop:"organId"}},[a("el-select",{attrs:{filterable:"",clearable:""},on:{change:function(t){return e.onEduTeacher("on")}},model:{value:e.addrForm.organId,callback:function(t){e.$set(e.addrForm,"organId","string"===typeof t?t.trim():t)},expression:"addrForm.organId"}},e._l(e.organList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"乐团主管",prop:"educationalTeacherId"}},[a("el-select",{attrs:{filterable:"",disabled:!e.addrForm.organId,clearable:""},model:{value:e.addrForm.educationalTeacherId,callback:function(t){e.$set(e.addrForm,"educationalTeacherId","string"===typeof t?t.trim():t)},expression:"addrForm.educationalTeacherId"}},e._l(e.educationList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.realName,value:e.id}})})),1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.educationalVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.resetEducationalVisible}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"有效期调整",width:"400px",visible:e.expireVisible},on:{"update:visible":function(t){e.expireVisible=t}}},[a("el-form",{ref:"expireForm",attrs:{model:e.expireForm,rules:e.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":e.bigin,"value-format":"yyyy-MM-dd",placeholder:"选择日期"},model:{value:e.expireForm.coursesExpireDate,callback:function(t){e.$set(e.expireForm,"coursesExpireDate","string"===typeof t?t.trim():t)},expression:"expireForm.coursesExpireDate"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.expireVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.submitExpireDate}},[e._v("确 定")])],1)],1)],1)},i=[],n=a("db72"),o=(a("28a5"),a("c5f6"),a("7f7f"),a("1cc7")),u=a("99b4"),l=a("333d"),c=a("7e78"),d=a("8018"),m=a("c466"),f=a("5a0c"),p=a.n(f),h={props:["vipDetail"],components:{pagination:l["a"]},data:function(){return{expireVisible:!1,addrVisible:!1,adjustmentVisible:!1,addCourseVisible:!1,courseVisible:!1,educationalVisible:!1,tableList:[],addTable:[],educationList:[],courseTime:"",vipid:"",addrForm:{address:"",educationalTeacherId:"",organId:""},maskForm:{date:"",startTime:"",endTime:"",id:"",address:"",teachMode:""},rules:{limit:50,page:1,total:0,page_size:[50,100]},maskRules:{date:[{required:!0,message:"请选择上课时间",trigger:"blur"}]},schoolList:[],Frules:null,FsearchForm:null,adjustmentForm:{count:"",courseTime:"",checked:!1,addCount:"",courseType:"",fee:"",address:""},adjustmentRules:{courseTime:[{required:!0,message:"请选择开始时间"}],addCount:[{required:!0,message:"请输入加课次数"}],courseType:[{required:!0,message:"请选择课程类型"}],fee:[{required:!0,message:"请输入费用"}],address:[{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()}],activeList:[],isaddCourse:!1,adjustmentName:"",startTime:"",chioseVipList:[],organList:[],name:"",endTime:"",startClassTime:"",expireForm:{coursesExpireDate:null,tempCoursesExpireDate:null},bigin:this.beginDate(),expireRules:{coursesExpireDate:[{required:!0,message:"请选择课程结束时间",trigger:"blur"}]}}},created:function(){r=this},mounted:function(){this.__init(),this.getList()},activated:function(){this.__init(),this.getList()},methods:{__init:function(){var e=this;console.log(this.vipDetail),this.vipid=this.$route.query.id;var t=this.$route.query,a=this.addrForm;this.name=this.$route.query.name,this.endTime=this.$route.query.endTimeStr,this.expireForm.coursesExpireDate=this.endTime,this.startClassTime=this.$route.query.startTimeStr,t.educationalTeacherId?a.educationalTeacherId=Number(t.educationalTeacherId):a.educationalTeacherId=null,t.organId?(a.organId=Number(t.organId),this.onEduTeacher()):a.organId=null,t.rules&&(this.Frules=t.rules),t.searchForm&&(this.FsearchForm=t.searchForm),Object(o["gb"])().then((function(t){200==t.code&&(e.organList=t.data)})),Object(d["g"])({userId:t.userId}).then((function(t){200==t.code&&(e.schoolList=t.data)}))},getList:function(){var e=this;Object(c["s"])({vipGroupId:this.vipid,rows:this.rules.limit,page:this.rules.page,gorupType:"VIP"}).then((function(t){200==t.code&&(e.tableList=t.data.pageInfo.rows,e.rules.total=t.data.pageInfo.total,e.courseTime=t.data.singleClassMinutes)}))},goBack:function(){this.$store.dispatch("delVisitedViews",this.$route),this.$router.push({path:"/vipManager/vipList"})},resetClass:function(e){this.maskForm.date=e.classDate.split(" ")[0],this.startTime=e.startClassTimeStr.substring(0,5),this.maskForm.endTime=e.endClassTimeStr.substring(0,5),this.maskForm.id=e.id,this.maskForm.address=e.schoolId||null,this.maskForm.teachMode=e.teachMode,this.courseVisible=!0},handleClose:function(){this.courseVisible=!1,this.startTime="",this.maskForm={date:"",startTime:"",endTime:"",id:"",address:"",teachMode:""},this.$refs["maskForm"].resetFields()},submitResetClass:function(){var e=this;if(this.startTime){var t=this.maskForm.date?new Date(this.maskForm.date):new Date,a=t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate();this.startTime;this.startTime.length<=5&&":00";var r={startClassTime:a+" "+this.startTime,id:this.maskForm.id,classDate:this.maskForm.date,schoolId:this.maskForm.address||null,teachMode:this.maskForm.teachMode||null,groupType:"VIP"};Object(o["uc"])(r).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.courseVisible=!1,e.getList())}))}else this.$message.error("请填写修改时间")},removeClass:function(e){var t=this;this.$confirm("是否删除该vip课程?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(c["i"])({courseScheduleIds:e.id}).then((function(e){200==e.code&&(t.$message.success("删除成功"),t.getList())}))}))},addCourse:function(){this.adjustmentName="vip加课",this.isaddCourse=!0,this.adjustmentVisible=!0},addOneChiose:function(){this.addTable.push({classDate:"",startClassTimeStr:"",endClassTimeStr:"",teachMode:"",moid:(new Date).getTime()})},removeMarkCourse:function(e){for(var t in this.addTable)this.addTable[t].moid==e.moid&&this.addTable.splice(t,1)},submitAdd:function(){var e=this,t=(this.MinutesTest(this.addTable[0].startClassTimeStr,90),{vipGroupApplyBaseInfo:{id:this.vipid},courseSchedules:[]});for(var a in this.addTable){var r={classDate:this.addTable[a].classDate,startClassTimeStr:this.addTable[a].startClassTimeStr,endClassTimeStr:this.MinutesTest(this.addTable[a].startClassTimeStr,this.courseTime),teachMode:this.addTable[a].teachMode};t.courseSchedules.push(r)}Object(c["g"])(t).then((function(t){200==t.code&&(e.addCourseVisible=!1,e.rules.page=1,e.getList())}))},isDisabled:function(e,t){return!(e.isSettlement||!e.id)},MinutesTest:function(e,t){var a=e.split(":")[0],r=e.split(":")[1],s=new Date(1900,1,1,a,r);s.setMinutes(s.getMinutes()+parseInt(t));var i=s.getHours(),n=s.getMinutes();return i<10&&(i="0"+i),n<10&&(n="0"+n),i+":"+n},handleSelectionChange:function(e){this.chioseVipList=e,this.adjustmentForm.count=e.length,this.activeList=e},addWeek:function(){this.weekList.push({dayOfWeek:"",startClassTime:"",endClassTime:"",id:new Date})},removeWeek:function(e){for(var t in this.weekList)this.weekList[t].id==e.id&&this.weekList.splice(t,1)},adjustment:function(){this.adjustmentName="批量调整",this.isaddCourse=!1,this.adjustmentForm.count<=0?this.$message.error("请至少勾选一节课"):this.adjustmentVisible=!0},submitAdjustment:function(){var e=this;this.$refs["adjustmentForm"].validate((function(t){if(t){var a=e.weekList;if(!a[0]||!a[0].startClassTime||!a[0].dayOfWeek)return void e.$message.error("至少排一节课");var r={};r.courseCreateStartTime=e.adjustmentForm.courseTime;var s=e.activeList.map((function(e){return e.id})),i=s.join(",");r.courseScheduleIds=i,r.courseTimes=e.weekList,r.holiday=e.adjustmentForm.checked,r.teachMode=e.adjustmentForm.courseType||null,r.groupType="VIP",r.vipGroupId=e.vipid,r.schoolId=e.adjustmentForm.address||null,Object(c["X"])(r).then((function(t){200==t.code&&(e.$message.success("恭喜您修改成功"),e.adjustmentVisible=!1,e.getList())}))}}))},addCourseSubmit:function(){var e=this;this.$refs["adjustmentForm"].validate((function(t){if(t){var a=e.weekList;if(!a[0]||!a[0].startClassTime||!a[0].dayOfWeek)return void e.$message.error("至少排一节课");var r={};r.courseCreateStartTime=e.adjustmentForm.courseTime;var s=e.activeList.map((function(e){return e.id})),i=s.join(",");r.courseScheduleIds=i,r.courseTimes=e.weekList,r.holiday=e.adjustmentForm.checked,r.vipGroupId=e.vipid,r.courseCount=e.adjustmentForm.addCount,r.teachMode=e.adjustmentForm.courseType,r.singleClassPrice=e.adjustmentForm.fee,r.groupType="VIP",Object(c["h"])(r).then((function(t){200==t.code&&(e.$message.success("恭喜您添加成功"),e.adjustmentVisible=!1,e.getList())}))}}))},resetAddrSubmit:function(){var e=this;this.addrForm.address?Object(c["V"])({id:this.vipid,teacherSchoolId:this.addrForm.address,educationalTeacherId:this.addrForm.educationalTeacherId}).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.addrVisible=!1,e.getList())})):this.$message.error("请选择一个教学点")},onEduTeacher:function(e){var t=this;this.educationList=[];var a=this.addrForm;e&&(a.educationalTeacherId=null),Object(u["F"])({organId:a.organId,rows:1e4}).then((function(e){200==e.code&&(t.educationList=e.data.rows)}))},resetEducationalVisible:function(){var e=this,t=this.addrForm;t.organId?t.educationalTeacherId?Object(c["V"])({id:this.vipid,organId:t.organId,educationalTeacherId:t.educationalTeacherId}).then((function(t){200==t.code&&(e.$message.success("修改成功"),e.educationalVisible=!1,e.getList())})):this.$message.error("请选择乐团主管"):this.$message.error("请选择课程分部")},clearAttend:function(e){var t=this;this.$confirm("是否清除考勤记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(o["u"])({courseScheduleIds:e.id}).then((function(e){200==e.code?(t.$message.success("清除成功"),t.getList()):t.$message.error(e.msg)}))})).catch((function(){}))},changeStartTime:function(e){var t=this;this.$nextTick((function(a){e?t.$set(t.maskForm,"endTime",Object(m["d"])(t.maskForm.date,e,t.courseTime)):t.$set(t.maskForm,"endTime",""),t.maskForm.endTime||t.$set(t,"startTime","")}))},changeStartTimes:function(e,t){var a=this;this.$nextTick((function(r){if(e){var s=p()(new Date).format("YYYY-MM-DD");a.$set(t,"endClassTime",Object(m["d"])(s,e,a.courseTime))}else a.$set(t,"endClassTime","");t.endClassTime||(console.log(t.startClassTime),a.$set(t,"startClassTime",""))}))},coursesDate:function(e){return{firstDayOfWeek:1,disabledDate:function(e){return e.getTime()+864e5<=(new Date).getTime()}}},pickerOptions:function(e){return{firstDayOfWeek:1,disabledDate:function(e){return e.getTime()+864e5<=(new Date).getTime()}}},submitExpireDate:function(){var e=this;this.$refs.expireForm.validate((function(t){t&&Object(c["bb"])({id:e.vipid,coursesExpireDate:e.expireForm.coursesExpireDate}).then((function(t){if(200==t.code){e.$message.success("有效期修改成功"),e.expireVisible=!1;var a=e.expireForm.coursesExpireDate+" 00:00:00";e.$router.push({query:Object(n["a"])(Object(n["a"])({},e.$route.query),{},{endTimeStr:a})}),e.endTime=a,console.log(a),e.getList()}else e.$message.error(t.msg)}))}))},beginDate:function(){return{firstDayOfWeek:1,disabledDate:function(e){return e.getTime()<=Date.now()}}}},watch:{adjustmentVisible:function(e){e||(this.adjustmentForm={count:"",courseTime:"",checked:!1,addCount:"",courseType:"",fee:"",address:""},this.weekList=[],this.$refs["tableList"].clearSelection(),this.$refs.adjustmentForm.resetFields(),this.addWeek())},addrVisible:function(e){e||(this.addrForm.address="")}},computed:{nowTime:function(){var e="06:00:00";return r.maskForm.date==p()(new Date).format("YYYY-MM-DD")&&(e=p()(new Date).format("HH:mm:ss")),e}}},b=h,v=(a("ac72"),a("2877")),g=Object(v["a"])(b,s,i,!1,null,"0afcd3f1",null);t["default"]=g.exports},ac72:function(e,t,a){"use strict";a("ad5b")},ad5b:function(e,t,a){},c466:function(e,t,a){"use strict";a.d(t,"n",(function(){return n})),a.d(t,"f",(function(){return o})),a.d(t,"g",(function(){return u})),a.d(t,"h",(function(){return l})),a.d(t,"i",(function(){return c})),a.d(t,"j",(function(){return d})),a.d(t,"e",(function(){return m})),a.d(t,"d",(function(){return f})),a.d(t,"a",(function(){return p})),a.d(t,"b",(function(){return h})),a.d(t,"c",(function(){return b})),a.d(t,"k",(function(){return v})),a.d(t,"l",(function(){return g})),a.d(t,"m",(function(){return T}));a("a481");var r=a("5a0c"),s=a.n(r),i=a("56d7");function n(e){var t=e.getFullYear(),a=e.getMonth()+1,r=e.getDate();return a=a<10?"0"+a:a,r=r<10?"0"+r:r,t+"-"+a+"-"+r}function o(e){return e.setDate(1),e}function u(e){var t=e.getMonth(),a=++t,r=new Date(e.getFullYear(),a,1),s=864e5;return new Date(r-s)}function l(e){var t=new Date(e.replace(/-/g,"/")).getTime(),a=new Date(e);0==a.getDay()&&(t-=6048e5);var r=t-24*(a.getDay()-1)*60*60*1e3,s=new Date(r),i=s.getFullYear(),n=s.getMonth()+1<10?"0"+(s.getMonth()+1):s.getMonth()+1,o=s.getDate()<10?"0"+s.getDate():s.getDate(),u=i+"-"+n+"-"+o;return u}function c(e){var t=new Date(e.replace(/-/g,"/")).getTime(),a=new Date(e),r=7-a.getDay();7==r&&(r=0);var s=t+24*r*60*60*1e3,i=new Date(s),n=i.getFullYear(),o=i.getMonth()+1<10?"0"+(i.getMonth()+1):i.getMonth()+1,u=i.getDate()<10?"0"+i.getDate():i.getDate(),l=n+"-"+o+"-"+u;return l}function d(e){var t=new Date(e.replace(/-/g,"/")).getDay();return 0===t&&(t=7),t}function m(e,t,a){return Math.abs(s()(e+" "+t).diff(e+" "+a,"Minute"))}function f(e,t,a){var r=s()(e+" "+t).add(a,"minute");return s()(e+" 21:00").isBefore(r)?(i["$message"].error("课程结束时间不可超过21:00点,请重新设置开始时间"),""):r.format("HH:mm")}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=s()("2021-12-17 "+e).add(t,"minute");return a.format("HH:mm:ss")}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=s()("2021-12-17 "+e).add(t,"minute").add(1,"second");return a.format("HH:mm:ss")}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=s()("2021-12-17 "+e).add(t,"minute").subtract(1,"second");return a.format("HH:mm:ss")}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=s()("2021-12-17 "+e).subtract(t,"minute");return a.format("HH:mm:ss")}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=s()("2021-12-17 "+e).subtract(t,"minute").add(1,"second");return a.format("HH:mm:ss")}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=s()("2021-12-17 "+e).subtract(t,"minute").subtract(1,"second");return a.format("HH:mm:ss")}}}]);