1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-74b1c4c5"],{5137:function(e,t,r){"use strict";r.d(t,"o",(function(){return o})),r.d(t,"n",(function(){return l})),r.d(t,"e",(function(){return u})),r.d(t,"d",(function(){return c})),r.d(t,"f",(function(){return m})),r.d(t,"u",(function(){return d})),r.d(t,"p",(function(){return h})),r.d(t,"t",(function(){return f})),r.d(t,"m",(function(){return p})),r.d(t,"s",(function(){return g})),r.d(t,"j",(function(){return v})),r.d(t,"l",(function(){return y})),r.d(t,"a",(function(){return F})),r.d(t,"g",(function(){return b})),r.d(t,"b",(function(){return T})),r.d(t,"r",(function(){return C})),r.d(t,"i",(function(){return L})),r.d(t,"w",(function(){return k})),r.d(t,"v",(function(){return S})),r.d(t,"k",(function(){return O})),r.d(t,"q",(function(){return I})),r.d(t,"x",(function(){return _})),r.d(t,"c",(function(){return w})),r.d(t,"y",(function(){return P})),r.d(t,"z",(function(){return N})),r.d(t,"h",(function(){return j}));var i=r("b775"),s=r("4328"),n=r.n(s),a="/api-web";function o(e){return Object(i["a"])({url:a+"/studentManage/queryStudentList",method:"get",params:e})}function l(e){return Object(i["a"])({url:a+"/studentManage/queryOrganStudentList",method:"get",params:e})}function u(e){return Object(i["a"])({url:a+"/studentManage/findStudentVipGroupClass",method:"get",params:e})}function c(e){return Object(i["a"])({url:a+"/studentManage/findStudentMusicGroups",method:"get",params:e})}function m(e){return Object(i["a"])({url:a+"/studentManage/findStudentVipGroups",method:"get",params:e})}function d(e){return Object(i["a"])({url:a+"/studentWithdraw/queryPage",method:"get",params:e})}function h(e){return Object(i["a"])({url:a+"/studentManage/queryStudentPayment",method:"get",params:e})}function f(e){return Object(i["a"])({url:a+"/order/queryPage",method:"get",params:e})}function p(e){return Object(i["a"])({url:a+"/studentManage/getUserCashAccountBaseInfo",method:"get",params:e})}function g(e){return Object(i["a"])({url:a+"/studentRegistration/batchUpdateSubject",method:"post",data:n.a.stringify(e)})}function v(e){return Object(i["a"])({url:a+"/studentRegistration/queryFeeDetail",method:"get",params:e})}function y(e){return Object(i["a"])({url:a+"/studentManage/queryMusicGroupStudentsSign",method:"get",params:e})}function F(e){return Object(i["a"])({url:a+"/studentRegistration/insertStudent",method:"POST",data:e})}function b(e){return Object(i["a"])({url:a+"/classGroupStudent/findAllStudent",method:"POST",data:n.a.stringify(e)})}function T(e){return Object(i["a"])({url:a+"/classGroupStudent/addStudents",method:"POST",data:n.a.stringify(e)})}function C(e){return Object(i["a"])({url:a+"/classGroupStudent/del",method:"POST",data:n.a.stringify(e)})}function L(e){return Object(i["a"])({url:a+"/studentManage/queryStudentClassGroup",method:"get",params:e})}function k(e){return Object(i["a"])({url:a+"/userCashAccount/updateCourseBalance",method:"post",data:n.a.stringify(e)})}function S(e){return Object(i["a"])({url:a+"/userCashAccount/updateBalance",method:"post",data:n.a.stringify(e)})}function O(e){return Object(i["a"])({url:a+"/studentManage/queryUserByPhone",method:"get",params:e})}function I(e){return Object(i["a"])({url:a+"/studentManage/register",method:"post",data:n.a.stringify(e)})}function _(e){return Object(i["a"])({url:a+"/studentManage/studentUpdate",method:"post",data:n.a.stringify(e)})}function w(e){return Object(i["a"])({url:a+"/coursesGroupController/findStudentCourseGroupsWithWeb",method:"get",params:e})}function P(e){return Object(i["a"])({url:a+"/userCashAccountDetail/queryPage",method:"get",params:e})}function N(e){return Object(i["a"])({url:a+"/userCoursesAccount/queryPage",method:"get",params:e})}function j(e){return Object(i["a"])({url:a+"/sysUserContracts/getLatest",method:"get",params:e})}},"67ff":function(e,t,r){"use strict";r.r(t);var i=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"m-container"},[r("h2",[r("el-page-header",{attrs:{content:e.title},on:{back:e.onCancel}})],1),e._v(" "),r("div",{staticClass:"m-core"},[r("div",{staticClass:"vipLeft"},[r("el-alert",{staticClass:"vipMsg",attrs:{title:"课程信息",type:"info",closable:!1}}),e._v(" "),r("el-form",{ref:"leftForm",attrs:{inline:!0,rules:e.leftFormRules,"label-position":e.labelPosition,"label-width":"110px",model:e.leftForm}},[r("el-form-item",{attrs:{label:"课程分部",prop:"classOrganId"}},[r("el-select",{attrs:{filterable:"",clearable:""},on:{change:e.onClassChange},model:{value:e.leftForm.classOrganId,callback:function(t){e.$set(e.leftForm,"classOrganId","string"===typeof t?t.trim():t)},expression:"leftForm.classOrganId"}},e._l(e.selects.branchs,(function(e,t){return r("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"科目名称",prop:"subject"}},[r("el-select",{attrs:{filterable:"",clearable:"",disabled:!e.leftForm.classOrganId},on:{change:e.changeSubject},model:{value:e.leftForm.subject,callback:function(t){e.$set(e.leftForm,"subject","string"===typeof t?t.trim():t)},expression:"leftForm.subject"}},e._l(e.subjectList,(function(e,t){return r("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"指导老师",prop:"teacher"}},[r("el-select",{attrs:{filterable:"",clearable:"",disabled:!e.leftForm.subject},on:{change:function(t){return e.setSection(t)}},model:{value:e.leftForm.teacher,callback:function(t){e.$set(e.leftForm,"teacher","string"===typeof t?t.trim():t)},expression:"leftForm.teacher"}},e._l(e.teacherList,(function(e,t){return r("el-option",{key:t,attrs:{label:e.realName,value:e.id}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"乐团主管",prop:"educationalTeacherId"}},[r("el-select",{attrs:{filterable:"",clearable:"",disabled:!e.leftForm.subject},model:{value:e.leftForm.educationalTeacherId,callback:function(t){e.$set(e.leftForm,"educationalTeacherId","string"===typeof t?t.trim():t)},expression:"leftForm.educationalTeacherId"}},e._l(e.educationList,(function(e,t){return r("el-option",{key:t,attrs:{label:e.userName,value:e.userId}})})),1)],1),e._v(" "),e.courseType?e._e():r("el-form-item",{attrs:{label:"课程形式",prop:"courseType"}},[r("el-select",{attrs:{clearable:"",filterable:"",disabled:!e.leftForm.classOrganId||!e.leftForm.teacher},on:{change:e.changeType},model:{value:e.leftForm.courseType,callback:function(t){e.$set(e.leftForm,"courseType","string"===typeof t?t.trim():t)},expression:"leftForm.courseType"}},e._l(e.courseTypeList,(function(e,t){return r("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),e.courseType?e._e():r("el-form-item",{attrs:{label:"教学点"}},[r("el-select",{attrs:{filterable:"",clearable:"",disabled:!e.leftForm.teacher},model:{value:e.leftForm.section,callback:function(t){e.$set(e.leftForm,"section","string"===typeof t?t.trim():t)},expression:"leftForm.section"}},e._l(e.scetionList,(function(e,t){return r("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1),e._v(" "),e.courseType?r("el-form-item",{attrs:{label:"上课学员",prop:"students"}},[r("el-select",{attrs:{"collapse-tags":"",clearable:"",placeholder:"请输入上课学员",remote:"",filterable:"","multiple-limit":e.studentLimit,disabled:!e.leftForm.classOrganId,"remote-method":e.remoteMethod,loading:e.remoteLoading},on:{change:e.changeStudentP},model:{value:e.leftForm.students,callback:function(t){e.$set(e.leftForm,"students","string"===typeof t?t.trim():t)},expression:"leftForm.students"}},e._l(e.studentList,(function(t){return r("el-option",{key:t.userId,attrs:{label:t.username,value:t.userId}},[r("span",{staticStyle:{float:"left"}},[e._v(e._s(t.username))]),e._v(" "),r("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v(e._s(t.parentsPhone))])])})),1)],1):r("el-form-item",{attrs:{label:"上课学员",prop:"students"}},[r("el-select",{attrs:{"collapse-tags":"",multiple:"",clearable:"",placeholder:"请输入上课学员",remote:"",filterable:"","multiple-limit":e.studentLimit,disabled:!e.leftForm.classOrganId||!e.leftForm.courseType,"remote-method":e.remoteMethod,loading:e.remoteLoading},on:{change:e.changeStudent},model:{value:e.leftForm.students,callback:function(t){e.$set(e.leftForm,"students","string"===typeof t?t.trim():t)},expression:"leftForm.students"}},e._l(e.studentList,(function(t){return r("el-option",{key:t.userId,attrs:{label:t.username,value:t.userId}},[r("span",{staticStyle:{float:"left"}},[e._v(e._s(t.username))]),e._v(" "),r("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v(e._s(t.parentsPhone))])])})),1)],1),e._v(" "),e.courseType?r("el-form-item",{attrs:{label:"活动方案",prop:"activeType"}},[r("el-select",{attrs:{filterable:"",clearable:"",disabled:!e.leftForm.students||e.leftForm.students&&e.leftForm.students.length<=0},on:{change:e.chioseActive},model:{value:e.leftForm.activeType,callback:function(t){e.$set(e.leftForm,"activeType","string"===typeof t?t.trim():t)},expression:"leftForm.activeType"}},e._l(e.activeList,(function(e,t){return r("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1):r("el-form-item",{attrs:{label:"活动方案",prop:"activeType"}},[r("el-select",{attrs:{filterable:"",clearable:"",disabled:!e.leftForm.courseType||!e.leftForm.students||e.leftForm.students&&e.leftForm.students.length<=0},on:{change:e.chioseActive},model:{value:e.leftForm.activeType,callback:function(t){e.$set(e.leftForm,"activeType","string"===typeof t?t.trim():t)},expression:"leftForm.activeType"}},e._l(e.activeList,(function(e,t){return r("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"每课时长"}},[r("el-select",{attrs:{disabled:e.timeTable.length>0},model:{value:e.leftForm.classTime,callback:function(t){e.$set(e.leftForm,"classTime","string"===typeof t?t.trim():t)},expression:"leftForm.classTime"}},e._l(this.classTimeList,(function(e,t){return r("el-option",{key:t,attrs:{value:e,label:e}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"报名开始时间",prop:"signUpStart"}},[r("el-date-picker",{attrs:{type:"date","picker-options":e.pickerOptions,"value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"请选择时间"},model:{value:e.leftForm.signUpStart,callback:function(t){e.$set(e.leftForm,"signUpStart","string"===typeof t?t.trim():t)},expression:"leftForm.signUpStart"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"报名结束时间",prop:"signUpEnd"}},[r("el-date-picker",{attrs:{type:"date","picker-options":e.pickerOptions1,"value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"请选择时间"},model:{value:e.leftForm.signUpEnd,callback:function(t){e.$set(e.leftForm,"signUpEnd","string"===typeof t?t.trim():t)},expression:"leftForm.signUpEnd"}})],1)],1)],1),e._v(" "),r("div",{staticClass:"center"},[r("el-alert",{staticClass:"vipMsg",attrs:{title:"排课设置",type:"info",closable:!1}}),e._v(" "),e.minCourseNum>0&&e.maxCourseNum>0?r("p",{staticClass:"submitP"},[e._v("\n 该活动最小课时数:"),r("span",{staticStyle:{color:"red"}},[e._v(e._s(e.minCourseNum))]),e._v("节 最大课时数:"),r("span",{staticStyle:{color:"red"}},[e._v(e._s(e.maxCourseNum))]),e._v("节\n ")]):e._e(),e._v(" "),r("el-form",{attrs:{inline:!0,model:e.centerForm,"label-width":"100px","label-position":e.labelPosition}},[e.leftForm.courseStart?r("el-form-item",{attrs:{label:"最早排课时间"}},[r("el-date-picker",{attrs:{disabled:"",type:"date","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"请选择时间"},model:{value:e.leftForm.courseStart,callback:function(t){e.$set(e.leftForm,"courseStart","string"===typeof t?t.trim():t)},expression:"leftForm.courseStart"}})],1):e._e(),e._v(" "),e.leftForm.courseEnd?r("el-form-item",{attrs:{label:"最晚排课时间"}},[r("el-date-picker",{attrs:{disabled:"",type:"date","value-format":"yyyy-MM-dd HH:mm:ss",placeholder:"请选择时间"},model:{value:e.leftForm.courseEnd,callback:function(t){e.$set(e.leftForm,"courseEnd","string"===typeof t?t.trim():t)},expression:"leftForm.courseEnd"}})],1):e._e(),e._v(" "),e.hasOnline?r("el-form-item",{attrs:{label:"线上课数"}},[r("el-input",{attrs:{type:"number"},on:{input:function(t){return e.onCourseNumChange("online")}},nativeOn:{mousewheel:function(e){e.preventDefault()}},model:{value:e.centerForm.onlineCourseNum,callback:function(t){e.$set(e.centerForm,"onlineCourseNum","string"===typeof t?t.trim():t)},expression:"centerForm.onlineCourseNum"}},[r("template",{slot:"append"},[e._v("节")])],2)],1):e._e(),e._v(" "),e.hasOffline?r("el-form-item",{attrs:{label:"线下课数"}},[r("el-input",{attrs:{type:"number"},on:{input:function(t){return e.onCourseNumChange("offline")}},nativeOn:{mousewheel:function(e){e.preventDefault()}},model:{value:e.centerForm.offlineCourseNum,callback:function(t){e.$set(e.centerForm,"offlineCourseNum","string"===typeof t?t.trim():t)},expression:"centerForm.offlineCourseNum"}},[r("template",{slot:"append"},[e._v("节")])],2)],1):e._e(),e._v(" "),r("el-form-item",{attrs:{label:"待排课数"}},[r("el-input",{attrs:{disabled:""},model:{value:e.allCourseCount,callback:function(t){e.allCourseCount="string"===typeof t?t.trim():t},expression:"allCourseCount"}},[r("template",{slot:"append"},[e._v("节")])],2)],1),e._v(" "),r("el-form-item",{attrs:{label:""}},[r("el-button",{attrs:{type:"danger"},on:{click:e.setCourse}},[e._v("点击排课")])],1)],1),e._v(" "),r("div",{},[r("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.timeTable}},[r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"课程时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v(e._s(e._f("formatTimer")(t.row.classDate)))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"课程开始时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v(e._s(t.row.startClassTimeStr))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"课程结束时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v(e._s(t.row.endClassTimeStr))])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"课程类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v(e._s(e._f("teachMode")(t.row.teachMode)))])]}}])})],1)],1)],1),e._v(" "),r("div",{staticClass:"right"},[r("el-alert",{staticClass:"vipMsg",attrs:{title:"课酬&缴费设置",type:"info",closable:!1}}),e._v(" "),r("el-form",{attrs:{model:e.rightForm,"label-width":"100px","label-position":e.labelPosition,inline:!0}},[r("el-form-item",{attrs:{label:"折扣"}},[r("el-input",{attrs:{disabled:""},model:{value:e.rightForm.discount,callback:function(t){e.$set(e.rightForm,"discount","string"===typeof t?t.trim():t)},expression:"rightForm.discount"}},[r("template",{slot:"append"},[e._v("%")])],2)],1),e._v(" "),e.hasOnline?r("el-form-item",{attrs:{label:"线上课课酬"}},[r("el-input",{attrs:{disabled:!0},model:{value:e.rightForm.onlineCourse,callback:function(t){e.$set(e.rightForm,"onlineCourse","string"===typeof t?t.trim():t)},expression:"rightForm.onlineCourse"}},[e.isMusicTheory?r("template",{slot:"append"},[e._v("元/人")]):r("template",{slot:"append"},[e._v("元/节")])],2)],1):e._e(),e._v(" "),e.hasOffline?r("el-form-item",{attrs:{label:"线下课课酬"}},[r("el-input",{attrs:{disabled:!0},model:{value:e.rightForm.offlineCourse,callback:function(t){e.$set(e.rightForm,"offlineCourse","string"===typeof t?t.trim():t)},expression:"rightForm.offlineCourse"}},[e.isMusicTheory?r("template",{slot:"append"},[e._v("元/人")]):r("template",{slot:"append"},[e._v("元/节")])],2)],1):e._e()],1),e._v(" "),r("div",{staticStyle:{width:"700px",clear:"both"}},[r("el-table",{attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.activeStudentList}},[r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"学员编号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"userName",label:"学员名称"}}),e._v(" "),e.hasOnline?r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"线上课单价"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input-number",{staticClass:"number-input",staticStyle:{width:"90% !important"},attrs:{disabled:!0,size:"mini",controls:!1,min:0,placeholder:"线上课单价"},on:{change:e.changeStudentMoney},model:{value:t.row.onlineClassesUnitPrice,callback:function(r){e.$set(t.row,"onlineClassesUnitPrice",r)},expression:"scope.row.onlineClassesUnitPrice"}})]}}],null,!1,3166311658)}):e._e(),e._v(" "),e.hasOffline?r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"线下课单价"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input-number",{staticClass:"number-input",staticStyle:{width:"90% !important"},attrs:{size:"mini",disabled:!0,controls:!1,min:0,placeholder:"线下课单价"},on:{change:e.changeStudentMoney},model:{value:t.row.offlineClassesUnitPrice,callback:function(r){e.$set(t.row,"offlineClassesUnitPrice",r)},expression:"scope.row.offlineClassesUnitPrice"}})]}}],null,!1,1540998149)}):e._e(),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"缴费总额"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input-number",{staticClass:"number-input",staticStyle:{width:"90% !important"},attrs:{size:"mini",controls:!1,min:0,disabled:!0,placeholder:"缴费总额"},model:{value:t.row.paymentPrice,callback:function(r){e.$set(t.row,"paymentPrice",r)},expression:"scope.row.paymentPrice"}})]}}])})],1),e._v(" "),r("div",{staticStyle:{overflow:"hidden"}},[r("el-button",{staticClass:"computeMoney",attrs:{type:"primary"},on:{click:e.computational}},[e._v("计算")])],1)],1)],1)]),e._v(" "),r("el-dialog",{ref:"maskForm",attrs:{title:"排课",width:"500px","destroy-on-close":"",visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{attrs:{model:e.maskForm,"label-position":"right","label-width":"150px"}},[r("el-form-item",{attrs:{label:"开课时间"}},[r("el-date-picker",{attrs:{type:"date","picker-options":e.courseOption,placeholder:"请选择开课时间"},model:{value:e.maskForm.courseStartOnline,callback:function(t){e.$set(e.maskForm,"courseStartOnline","string"===typeof t?t.trim():t)},expression:"maskForm.courseStartOnline"}})],1),e._v(" "),r("div",{staticClass:"line",staticStyle:{height:"1px",background:"#ccc",margin:"0 25px"}}),e._v(" "),r("el-form-item",{attrs:{label:"课程类型",prop:"type"}},[e.hasOnline?r("el-radio",{attrs:{label:"ONLINE"},model:{value:e.maskForm.type,callback:function(t){e.$set(e.maskForm,"type","string"===typeof t?t.trim():t)},expression:"maskForm.type"}},[e._v("线上课")]):e._e(),e._v(" "),e.hasOffline?r("el-radio",{attrs:{label:"OFFLINE"},model:{value:e.maskForm.type,callback:function(t){e.$set(e.maskForm,"type","string"===typeof t?t.trim():t)},expression:"maskForm.type"}},[e._v("线下课")]):e._e()],1),e._v(" "),r("el-form-item",{attrs:{label:"循环周次",prop:"week"}},[r("el-select",{staticStyle:{width:"220px !important"},model:{value:e.maskForm.week,callback:function(t){e.$set(e.maskForm,"week","string"===typeof t?t.trim():t)},expression:"maskForm.week"}},[r("el-option",{attrs:{label:"星期日",value:"0"}}),e._v(" "),r("el-option",{attrs:{label:"星期一",value:"1"}}),e._v(" "),r("el-option",{attrs:{label:"星期二",value:"2"}}),e._v(" "),r("el-option",{attrs:{label:"星期三",value:"3"}}),e._v(" "),r("el-option",{attrs:{label:"星期四",value:"4"}}),e._v(" "),r("el-option",{attrs:{label:"星期五",value:"5"}}),e._v(" "),r("el-option",{attrs:{label:"星期六",value:"6"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{label:"上课时间",prop:"startTime"}},[r("el-time-picker",{attrs:{format:"HH:mm","value-format":"HH:mm",placeholder:"选择时间"},on:{change:e.getStartTime},model:{value:e.maskForm.startTime,callback:function(t){e.$set(e.maskForm,"startTime","string"===typeof t?t.trim():t)},expression:"maskForm.startTime"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"下课时间",prop:"endTime"}},[r("el-time-picker",{attrs:{disabled:"",format:"HH:mm","value-format":"HH:mm","picker-options":{start:"04:30",step:"00:05",end:"23:30"},placeholder:"选择时间"},model:{value:e.maskForm.endTime,callback:function(t){e.$set(e.maskForm,"endTime","string"===typeof t?t.trim():t)},expression:"maskForm.endTime"}})],1)],1),e._v(" "),r("div",{staticClass:"btnWrap"},[r("div",{staticClass:"okBtn",on:{click:e.addWeek}},[e._v("确认")])]),e._v(" "),r("div",{staticClass:"planList"},[r("div",{staticClass:"planTop"},[r("p",[e._v("已排课程")])]),e._v(" "),this.lookList.length>0?r("div",{staticClass:"planCore"},e._l(this.lookList,(function(t,i){return r("div",{key:i,staticClass:"row"},[r("div",{staticClass:"name"},[e._v(e._s(t.type))]),e._v(" "),r("div",{staticClass:"week"},[e._v(e._s(t.week))]),e._v(" "),r("div",{staticClass:"time"},[e._v(e._s(t.time))]),e._v(" "),r("div",{staticClass:"operation"},[r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.removeWeekCourse(t.id)}}},[e._v("删除")])],1)])})),0):r("div",{staticClass:"nomore"},[e._v("暂无数据")]),e._v(" "),r("div",{staticClass:"dialog-footer",staticStyle:{"margin-top":"20px"},attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.setTimeTable}},[e._v("确 定")])],1)])],1),e._v(" "),r("div",{staticClass:"btnWrap"},[r("div",{staticClass:"okBtn",on:{click:e.submitInfo}},[e._v(e._s(e.id?"修改":"确定"))]),e._v(" "),r("div",{staticClass:"okBtn",staticStyle:{"background-color":"#14928a"},on:{click:e.resetFrom}},[e._v("\n 重置\n ")])])],1)},s=[],n=(r("55dd"),r("ac6a"),r("28a5"),r("a481"),r("96cf"),r("1da1")),a=r("ade3"),o=r("1cc7"),l=r("7e78"),u=r("8018"),c=r("bc3a"),m=r.n(c),d=r("5f87"),h=r("c466"),f=r("5137"),p=(r("7676"),r("5a0c")),g=r.n(p),v={name:"buildVip",data:function(){return Object(a["a"])({title:"VIP/乐理课申请",dialogFormVisible:!1,labelPosition:"right",courseType:"",leftForm:{teacher:"",subject:"",courseType:"",activeType:"",classNum:"",classTime:"",signUpStart:"",signUpEnd:"",courseStartOnline:"",courseStartOffline:"",section:"",courseStart:"",courseEnd:"",educationalTeacherId:"",students:[],classOrganId:""},activeStudentList:[],studentLimit:0,classTimeList:[],centerForm:{allCourseNum:"",onlineCourseNum:0,offlineCourseNum:0,radio:""},maskForm:{type:"",week:"",startTime:"",endTime:""},rightForm:{onlineCourse:"",offlineCourse:"",onlinePrice:"",offlinePrice:"",allPrice:"",discount:100},remoteLoading:!1,computationalBtn:!1,subjectList:[],teacherList:[],educationList:[],courseTypeList:[],activeList:[],hasOnline:!0,hasOffline:!0,onlineSalary:"",offlineSalary:"",hotType:"",attribute1:"",attribute2:"",attribute3:"",maxCourseNum:0,minCourseNum:0,salaryReadonlyFlag:"",paymentReadonlyFlag:"",lookList:[],onlinelookList:[],offlineLookList:[],timeTable:[],giveNum:"",chioseStudent:[],weekDay:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],scetionList:[],isGiveClass:!1,activeStartTime:null,courseOption:null,pickerOptions:null,pickerOptions1:null,leftFormRules:{name:[{required:!0,message:"请输入名称",trigger:"blur"}],teacher:[{required:!0,message:"请选择老师",trigger:"change"}],educationalTeacherId:[{required:!0,message:"请选择教务",trigger:"change"}],classOrganId:[{required:!0,message:"请选择课程分部",trigger:"change"}],subject:[{required:!0,message:"请选择科目",trigger:"change"}],courseType:[{required:!0,message:"请选择课程形式",trigger:"change"}],students:[{required:!0,message:"请选择上课学生",trigger:"change"}],signUpStart:[{required:!0,message:"请选择报名开始时间",trigger:"change"}],signUpEnd:[{required:!0,message:"请选择报名结束时间",trigger:"change"}]},id:"",studentList:[],courseTimeList:[],isMusicTheory:!1},"chioseStudent",[])},computed:{allCourseCount:function(){var e,t;return e=this.centerForm.onlineCourseNum?this.centerForm.onlineCourseNum:0,t=this.centerForm.offlineCourseNum?this.centerForm.offlineCourseNum:0,parseInt(t)+parseInt(e)||""}},created:function(){},mounted:function(){var e=this;if(this.courseType=this.$route.query.courseType,"PRACTICE"==this.courseType){var t;this.title="网管课申请",this.$route.meta.title="网管课申请",this.hasOffline=!1;var r=JSON.parse(localStorage.getItem("newPractice"));null!==r&&void 0!==r&&null!==(t=r.leftForm)&&void 0!==t&&t.classOrganId&&this.$confirm("检测到您有未提交的数据, 是否恢复?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",closeOnClickModal:!1,type:"warning"}).then(Object(n["a"])(regeneratorRuntime.mark((function t(){var i,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.activeStudentList=r.activeStudentList,e.centerForm=r.centerForm,e.leftForm=r.leftForm,e.rightForm=r.rightForm,e.timeTable=r.timeTable,e.educationList=r.educationList,e.courseTypeList=r.courseTypeList,t.next=9,Object(l["R"])({organId:null===r||void 0===r||null===(i=r.leftForm)||void 0===i?void 0:i.classOrganId}).then((function(t){200==t.code&&(e.courseTypeList=t.data)}));case 9:e.scetionList=r.scetionList,e.studentList=r.studentList,e.activeList=r.activeList,e.studentLimit=r.studentLimit,e.teacherList=r.teacherList,e.isMusicTheory=r.isMusicTheory,e.chioseStudent=r.chioseStudent,null!==(s=e.leftForm)&&void 0!==s&&s.courseType&&e.changePrice(e.leftForm.courseType);case 17:case"end":return t.stop()}}),t)}))))}else{var i;this.title="VIP/乐理课申请",this.$route.meta.title="VIP/乐理课申请";var s=JSON.parse(localStorage.getItem("newVip"));null!==s&&void 0!==s&&null!==(i=s.leftForm)&&void 0!==i&&i.classOrganId&&this.$confirm("检测到您有未提交的数据, 是否恢复?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",closeOnClickModal:!1,type:"warning"}).then(Object(n["a"])(regeneratorRuntime.mark((function t(){var r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.activeStudentList=s.activeStudentList,e.centerForm=s.centerForm,e.leftForm=s.leftForm,e.rightForm=s.rightForm,e.timeTable=s.timeTable,e.educationList=s.educationList,e.courseTypeList=s.courseTypeList,t.next=9,Object(l["R"])({organId:null===s||void 0===s||null===(r=s.leftForm)||void 0===r?void 0:r.classOrganId}).then((function(t){200==t.code&&(e.courseTypeList=t.data)}));case 9:e.scetionList=s.scetionList,e.studentList=s.studentList,e.activeList=s.activeList,e.studentLimit=s.studentLimit,e.teacherList=s.teacherList,e.isMusicTheory=s.isMusicTheory,e.chioseStudent=s.chioseStudent,null!==(i=e.leftForm)&&void 0!==i&&i.courseType&&e.changePrice(e.leftForm.courseType);case 17:case"end":return t.stop()}}),t)}))))}this.init()},activated:function(){},beforeDestroy:function(){var e={leftForm:this.leftForm,centerForm:this.centerForm,rightForm:this.rightForm,timeTable:this.timeTable,activeStudentList:this.activeStudentList,teacherList:this.teacherList,educationList:this.educationList,courseTypeList:this.courseTypeList,scetionList:this.scetionList,studentList:this.studentList,activeList:this.activeList,studentLimit:this.studentLimit,isMusicTheory:this.isMusicTheory,chioseStudent:this.chioseStudent};"PRACTICE"==this.courseType?localStorage.setItem("newPractice",JSON.stringify(e)):localStorage.setItem("newVip",JSON.stringify(e))},methods:{resetFrom:function(){this.leftForm={teacher:"",subject:"",courseType:"",activeType:"",classNum:"",classTime:"",signUpStart:"",signUpEnd:"",courseStartOnline:"",courseStartOffline:"",section:"",courseStart:"",courseEnd:"",educationalTeacherId:"",students:[],classOrganId:""},this.activeStudentList=[],this.studentLimit=0,this.classTimeList=[],this.centerForm={allCourseNum:"",onlineCourseNum:0,offlineCourseNum:0,radio:""},this.maskForm={type:"",week:"",startTime:"",endTime:""},this.rightForm={onlineCourse:"",offlineCourse:"",onlinePrice:"",offlinePrice:"",allPrice:"",discount:100},this.hasOnline=!0,this.hasOffline=!0,this.onlineSalary="",this.offlineSalary="",this.hotType="",this.attribute1="",this.attribute2="",this.attribute3="",this.maxCourseNum=0,this.minCourseNum=0,this.salaryReadonlyFlag="",this.paymentReadonlyFlag="",this.onlinelookList=[],this.offlineLookList=[],this.timeTable=[],this.giveNum="",this.chioseStudent=[],this.$refs["leftForm"].resetFields(),localStorage.removeItem("newVip")},init:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.$route.query.rules&&(this.rules=this.$route.query.rules),this.$route.query.searchForm&&(this.searchForm=this.$route.query.searchForm),e.next=4,this.$store.dispatch("setBranchs");case 4:Object(o["Jb"])({tenantId:1}).then((function(e){200==e.code&&(t.subjectList=e.data)})),this.pickerOptions=this.beginDate(),this.pickerOptions1=this.processDate(),this.courseOption=this.coursesDate();case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),onCourseNumChange:function(e){var t=this.centerForm;if(this.maxCourseNum>0&&this.minCourseNum>0){var r=t.onlineCourseNum||0,i=t.offlineCourseNum||0,s=parseInt(r)+parseInt(i);if(s>this.maxCourseNum||s<this.minCourseNum)return void this.$message.error("待排课数不可超过该活动限制")}},coursesDate:function(){var e=this;return{firstDayOfWeek:1,disabledDate:function(t){if(e.leftForm.courseStart){var r=new Date(e.leftForm.courseStart.replace(/-/,"/")),i=new Date,s=r.getTime()-i.getTime()>0?r:i;return t.getTime()<s.getTime()}}}},beginDate:function(){return{firstDayOfWeek:1,disabledDate:function(e){return e.getTime()+864e5<=(new Date).getTime()}}},processDate:function(){var e=this;return{firstDayOfWeek:1,disabledDate:function(t){return e.leftForm.signUpStart?new Date(e.leftForm.signUpStart).getTime()>t.getTime():t.getTime()>Date.now()}}},changeSubject:function(e){var t=this;this.leftForm.teacher="",this.leftForm.section="",Object(o["Q"])({subjectIds:e,organId:this.leftForm.classOrganId}).then((function(e){200==e.code&&(t.teacherList=e.data)}))},changeType:function(e){this.rightForm.offlineCourse="",this.rightForm.onlineCourse="",this.leftForm.activeType="",this.leftForm.students=[],this.changePrice(e)},changePrice:function(e){var t=this;for(var r in this.courseTypeList)this.courseTypeList[r].id==e&&(this.leftForm.classNum=this.courseTypeList[r].studentNum,this.studentLimit=this.courseTypeList[r].studentNum,this.classTimeList=this.courseTypeList[r].singleClassMinutes.split(","),this.leftForm.classTime=this.classTimeList[0],this.rightForm.onlinePrice=this.courseTypeList[r].onlineClassesUnitPrice,this.rightForm.offlinePrice=this.courseTypeList[r].offlineClassesUnitPrice,this.isMusicTheory=this.courseTypeList[r].musicTheory);this.activeStudentList=[],this.studentList.forEach((function(e){if(-1!=t.chioseStudent.indexOf(e.userId)){var r=t.rightForm.discount?t.rightForm.discount:100;t.activeStudentList.push({studentId:e.userId,userName:e.username,onlineClassesUnitPrice:(t.rightForm.onlinePrice*r/100).toFixed(2),offlineClassesUnitPrice:(t.rightForm.offlinePrice*r/100).toFixed(2),paymentPrice:""})}}))},chioseActive:function(e){var t=this;if(this.rightForm.offlineCourse="",this.rightForm.onlineCourse="",this.lookList=[],this.timeTable=[],this.attribute1="",this.attribute2="",this.attribute3="",this.rightForm.discount=100,this.giveNum=0,this.isGiveClass=!1,this.leftForm.courseStart="",this.leftForm.courseEnd="",this.hasOnline=!0,this.hasOffline=!0,e){for(var r in this.courseTypeList)this.courseTypeList[r].id==this.leftForm.courseType&&(this.leftForm.classNum=this.courseTypeList[r].studentNum,this.classTimeList=this.courseTypeList[r].singleClassMinutes.split(","),this.leftForm.classTime=this.classTimeList[0],this.rightForm.onlinePrice=this.courseTypeList[r].onlineClassesUnitPrice,this.rightForm.offlinePrice=this.courseTypeList[r].offlineClassesUnitPrice,this.rightForm.discount=this.courseTypeList[r].discount);for(var i in this.activeList)if(this.activeList[i].id==e){if(this.maxCourseNum=this.activeList[i].maxCourseNum||0,this.minCourseNum=this.activeList[i].minCourseNum||0,this.leftForm.courseStart=this.activeList[i].coursesStartTime,this.leftForm.courseEnd=this.activeList[i].coursesEndTime,this.rightForm.discount=this.activeList[i].discount,this.hotType=this.activeList[i].type,this.attribute1=this.activeList[i].attribute1,this.attribute2=this.activeList[i].attribute2,this.attribute3=this.activeList[i].attribute3,this.salaryReadonlyFlag=this.activeList[i].salaryReadonlyFlag,this.paymentReadonlyFlag=this.activeList[i].paymentReadonlyFlag,this.activeList[i].salarySettlementJson){var s=JSON.parse(this.activeList[i].salarySettlementJson);s&&s.onlineSalarySettlement?(this.hasOnline=!0,this.onlineSalary=s.onlineSalarySettlement.salarySettlementType):this.hasOnline=!1,s&&s.offlineSalarySettlement?(this.hasOffline=!0,this.offlineSalary=s.offlineSalarySettlement.salarySettlementType):this.hasOffline=!1}this.activeStudentList=[],this.studentList.forEach((function(e){if(-1!=t.chioseStudent.indexOf(e.userId)){var r=t.rightForm.discount?t.rightForm.discount:100;t.activeStudentList.push({studentId:e.userId,userName:e.username,onlineClassesUnitPrice:(t.rightForm.onlinePrice*r/100).toFixed(0),offlineClassesUnitPrice:(t.rightForm.offlinePrice*r/100).toFixed(0),paymentPrice:""})}}))}}},addWeek:function(){var e=this.maskForm.type,t=this.maskForm.startTime;if(e&&this.maskForm.week&&t){var r,i=this.MinutesTest(t,this.leftForm.classTime);switch(e){case"ONLINE":r="线上课";break;case"OFFLINE":r="线下课";break}var s=!1;for(var n in this.lookList)this.lookList[n].weekDay==this.maskForm.week&&(s=!0);if(s){var a=[];for(var o in this.lookList)if(this.lookList[o].weekDay==this.maskForm.week){var l=this.timeIsrange(t,i,this.lookList[o].startTime),u=this.timeIsrange(t,i,this.lookList[o].endTime);a.push(!u&&!l)}for(var c=!0,m=0;m<a.length;m++)c=c&&a[m];if(!c)return void this.$message.error("该时间段已排课请重选时间");this.lookList.push({type:r,week:this.weekDay[this.maskForm.week],weekDay:this.maskForm.week,startTime:t,endTime:i,time:t+"-"+i,id:Date.now()})}else this.lookList.push({type:r,week:this.weekDay[this.maskForm.week],weekDay:this.maskForm.week,startTime:t,endTime:i,time:t+"-"+i,id:Date.now()});this.maskForm.type="",this.maskForm.week="",this.maskForm.startTime="",this.maskForm.endTime=""}else this.$message.error("请填写完成信息")},MinutesTest:function(e,t){var r=e.split(":")[0],i=e.split(":")[1],s=new Date(1900,1,1,r,i);s.setMinutes(s.getMinutes()+parseInt(t));var n=s.getHours(),a=s.getMinutes();return n<10&&(n="0"+n),a<10&&(a="0"+a),n+":"+a},timeIsrange:function(e,t,r){var i=e.split(":");if(2!=i.length)return!1;var s=t.split(":");if(2!=s.length)return!1;var n=r.split(":");if(2!=s.length)return!1;var a=new Date,o=new Date,l=new Date;return a.setHours(i[0]),a.setMinutes(i[1]),o.setHours(s[0]),o.setMinutes(s[1]),l.setHours(n[0]),l.setMinutes(n[1]),l.getTime()-a.getTime()>=0&&l.getTime()-o.getTime()<=0},removeWeekCourse:function(e){for(var t in this.lookList)this.lookList[t].id==e&&this.lookList.splice(t,1)},setTimeTable:function(){this.timeTable=[];var e=parseInt(this.centerForm.onlineCourseNum)||0,t=parseInt(this.centerForm.offlineCourseNum)||0,r=this.giveNum,i=this.centerForm.radio;if("ONLINE"==i?e+=r:"OFFLINE"==i&&(t+=r),this.maskForm.courseStartOnline){var s,n;s=new Date(this.maskForm.courseStartOnline.getTime()),n=new Date(this.maskForm.courseStartOnline.getTime());var a=[],o=[];if(this.lookList.length<=0)this.$message.error("请先排课后再点击确认按钮");else{for(var l in this.lookList)"线上课"==this.lookList[l].type&&a.push({week:this.lookList[l].weekDay,date:this.lookList[l]}),"线下课"==this.lookList[l].type&&o.push({week:this.lookList[l].weekDay,date:this.lookList[l]});if(e>0&&a.length<=0)return this.$message.error("选择了线上课但未排线上课"),void(this.timeTable=[]);if(t>0&&o.length<=0)return this.$message.error("选择了线下课但未排线下课"),void(this.timeTable=[]);while(e&&e>0){for(var u in a){var c=void 0;c=a[u].week-s.getDay()>=0?a[u].week-s.getDay():a[u].week-s.getDay()+7;var m=this.getThinkDate(s,c);if(this.timeTable.push({classDate:m+" 00:00:00",actualTeacherId:this.leftForm.teacher,startClassTimeStr:a[u].date.startTime,endClassTimeStr:a[u].date.endTime,teachMode:"ONLINE"}),e--,0==e)break}(1==a.length||this.isAllEqual(a))&&s.setDate(s.getDate()+7)}while(t&&t>0){for(var d in o){var h=void 0;h=o[d].week-n.getDay()>=0?o[d].week-n.getDay():o[d].week-n.getDay()+7;var f=this.getThinkDate(n,h);if(this.timeTable.push({classDate:f+" 00:00:00",actualTeacherId:this.leftForm.teacher,startClassTimeStr:o[d].date.startTime,endClassTimeStr:o[d].date.endTime,teachMode:"OFFLINE"}),t--,0==t)break}(1==o.length||this.isAllEqual(o))&&n.setDate(n.getDate()+7)}this.timeTable.sort((function(e,t){var r=g()(g()(e.classDate).format("YYYY-MM-DD")+" "+e.startClassTimeStr+":00").valueOf(),i=g()(g()(t.classDate).format("YYYY-MM-DD")+" "+t.startClassTimeStr+":00").valueOf();return r-i})),this.dialogFormVisible=!1}}else this.$message.error("请选择课程开始时间")},getThinkDate:function(e,t){var r=e;r.setDate(e.getDate()+t);var i=r.getFullYear(),s=r.getMonth()+1,n="";n=s<10?"0"+s:s+"";var a=r.getDate(),o="";return o=a<10?"0"+a:a+"",i+"-"+n+"-"+o},computational:function(){var e=this;this.computationalBtn=!0;var t=this.leftForm.teacher||null,r=this.centerForm.radio||null,i=this.leftForm.courseType||null,s=this.leftForm.activeType||null,n=this.rightForm.onlinePrice||null,a=this.rightForm.offlinePrice||null,o=this.centerForm.onlineCourseNum||0,u=this.centerForm.offlineCourseNum||0,c=this.leftForm.classTime;"GIVE_CLASS"==this.hotType&&("ONLINE"==this.centerForm.radio?o=parseInt(o)+parseInt(this.giveNum):"OFFLINE"==this.centerForm.radio&&(u=parseInt(u)+parseInt(this.giveNum)));var m,d=this.rightForm.onlineCourse||null,h=this.rightForm.offlineCourse||null;"PRACTICE"==this.courseType?Object(l["t"])({vipGroupActivityId:s,onlineClassesUnitPrice:n,onlineTeacherSalary:d,offlineTeacherSalary:h,vipGroupCategoryId:i,offlineClassesUnitPrice:a,allCourseNum:o,offlineClassesNum:u,userId:t,giveTeachMode:r,singleClassMinutes:c,vipGroupStudentCoursePrices:this.activeStudentList,organId:null===(m=this.leftForm)||void 0===m?void 0:m.classOrganId}).then((function(t){200==t.code&&(e.rightForm.onlineCourse=t.data.onlineTeacherSalary,e.rightForm.offlineCourse=t.data.offlineTeacherSalary,e.rightForm.allPrice=t.data.totalPrice,e.activeStudentList.forEach((function(e){e.paymentPrice=t.data.totalPrice})))})):Object(l["z"])({vipGroupActivityId:s,onlineClassesUnitPrice:n,onlineTeacherSalary:d,offlineTeacherSalary:h,vipGroupCategoryId:i,offlineClassesUnitPrice:a,onlineClassesNum:o,offlineClassesNum:u,userId:t,giveTeachMode:r,singleClassMinutes:c,vipGroupStudentCoursePrices:this.activeStudentList}).then((function(t){200==t.code&&(e.rightForm.onlineCourse=t.data.onlineTeacherSalary,e.rightForm.offlineCourse=t.data.offlineTeacherSalary,e.rightForm.allPrice=t.data.totalPrice,e.activeStudentList.forEach((function(e){t.data.hasOwnProperty(e.studentId)&&(e.paymentPrice=t.data[e.studentId])})))}))},isAllEqual:function(e){return!(e.length>0)||!e.some((function(t,r){return t.week!=e[0].week}))},submitInfo:function(){var e=this;if(this.computationalBtn){var t=!1;if(this.isMusicTheory?(this.leftForm.students.length>this.studentLimit||this.leftForm.students.length<3)&&(this.$message.error("请选择上课学生为3-".concat(this.studentLimit,"人")),t=!0):this.leftForm.students.length!==this.studentLimit&&"PRACTICE"!=this.courseType&&(this.$message.error("请选择上课学生为".concat(this.studentLimit,"人")),t=!0),!t){var r=parseInt(this.centerForm.onlineCourseNum),i=parseInt(this.centerForm.offlineCourseNum),s=this.giveNum,n=this.centerForm.radio;"ONLINE"==n?r+=s:"OFFLINE"==n&&(i+=s);var a={};a.courseSchedules=this.timeTable;var o=0;"PRACTICE"==this.courseType?(o=this.leftForm.students,a.practiceGroupApplyBaseInfoDto={studentId:o,vipGroupStudentCoursePrices:this.activeStudentList,coursesExpireDate:this.leftForm.courseEnd,teacherSchoolId:this.leftForm.section,offlineClassesNum:i||0,onlineClassesNum:r||0,offlineClassesUnitPrice:this.rightForm.offlinePrice||0,onlineClassesUnitPrice:this.rightForm.onlinePrice||0,paymentExpireDate:this.leftForm.signUpEnd,registrationStartTime:this.leftForm.signUpStart,singleClassMinutes:this.leftForm.classTime,studentNum:this.leftForm.classNum,userId:this.leftForm.teacher,vipGroupActivityId:this.leftForm.activeType,vipGroupCategoryId:this.leftForm.courseType,onlineTeacherSalary:this.rightForm.onlineCourse||0,offlineTeacherSalary:this.rightForm.offlineCourse||0,giveTeachMode:this.centerForm.radio,subjectIdList:this.leftForm.subject,educationalTeacherId:this.leftForm.educationalTeacherId,organId:this.leftForm.classOrganId,firstStudentId:this.leftForm.students[0]||null,allCourseNum:r}):(o=this.leftForm.students.join(",")||null,a.vipGroupApplyBaseInfo={studentId:o,vipGroupStudentCoursePrices:this.activeStudentList,coursesExpireDate:this.leftForm.courseEnd,teacherSchoolId:this.leftForm.section,offlineClassesNum:i||0,onlineClassesNum:r||0,offlineClassesUnitPrice:this.rightForm.offlinePrice||0,onlineClassesUnitPrice:this.rightForm.onlinePrice||0,paymentExpireDate:this.leftForm.signUpEnd,registrationStartTime:this.leftForm.signUpStart,singleClassMinutes:this.leftForm.classTime,studentNum:this.leftForm.classNum,userId:this.leftForm.teacher,vipGroupActivityId:this.leftForm.activeType,vipGroupCategoryId:this.leftForm.courseType,onlineTeacherSalary:this.rightForm.onlineCourse||0,offlineTeacherSalary:this.rightForm.offlineCourse||0,giveTeachMode:this.centerForm.radio,subjectIdList:this.leftForm.subject,educationalTeacherId:this.leftForm.educationalTeacherId,organId:this.leftForm.classOrganId,firstStudentId:this.leftForm.students[0]||null}),"PRACTICE"==this.courseType?Object(l["i"])(a).then((function(t){200==t.code&&(e.resetFrom(),"ING"==t.data?e.$confirm("课程提交成功,已提交运营主管审批,审批通过后,课程创建成功!","提示",{confirmButtonText:"确定",type:"warning"}).then((function(){e.$message.success("提交成功"),e.$store.dispatch("delVisitedViews",e.$route),e.$router.push({path:"/vipManager/vipList",query:{rules:e.rules,searchForm:e.searchForm}})})):(e.$message.success("恭喜您创建成功"),e.onCancel())),206==t.code&&e.$confirm(t.msg,"提示",{confirmButtonText:"确定",type:"warning"}).then((function(){a.allowOverstepActivityStudentNum=1,Object(l["i"])(a).then((function(t){200==t.code&&(e.resetFrom(),e.$message.success("提交成功"),e.onCancel())}))}))})):(l["i"],Object(l["j"])(a).then((function(t){200==t.code&&(e.resetFrom(),"ING"==t.data?e.$confirm("课程提交成功,已提交运营主管审批,审批通过后,课程创建成功!","提示",{confirmButtonText:"确定",type:"warning"}).then((function(){e.$message.success("提交成功"),e.$store.dispatch("delVisitedViews",e.$route),e.$router.push({path:"/vipManager/vipList",query:{rules:e.rules,searchForm:e.searchForm}})})):(e.$message.success("恭喜您创建成功"),e.$store.dispatch("delVisitedViews",e.$route),e.$router.push({path:"/vipManager/vipList",query:{rules:e.rules,searchForm:e.searchForm}}))),206==t.code&&e.$confirm(t.msg,"提示",{confirmButtonText:"确定",type:"warning"}).then((function(){a.allowOverstepActivityStudentNum=1,Object(l["j"])(a).then((function(t){200==t.code&&(e.resetFrom(),e.$message.success("提交成功"),e.$store.dispatch("delVisitedViews",e.$route),e.$router.push({path:"/vipManager/vipList",query:{rules:e.rules,searchForm:e.searchForm}}))}))}))})))}}else this.$message.error("请点击计算按钮计算课酬")},setSection:function(e){var t=this;this.leftForm.section="",this.rightForm.offlineCourse="",this.rightForm.onlineCourse="",e&&Object(u["g"])({userId:e}).then((function(e){200==e.code&&(t.scetionList=e.data)}))},onClassChange:function(e){var t=this;this.studentList=[],this.activeStudentList=[],this.$set(this.leftForm,"students",[]),this.$set(this.leftForm,"teacher",""),this.$set(this.leftForm,"educationalTeacherId",""),this.$set(this.leftForm,"section",""),this.$set(this.leftForm,"activeType",""),this.$set(this.leftForm,"classTime",""),this.$set(this.leftForm,"subject",""),this.courseTypeList=[],this.leftForm.courseType&&this.$set(this.leftForm,"courseType",null),e&&(this.getOrganStudentList(e),Object(l["R"])({organId:e}).then((function(e){200==e.code&&(t.courseTypeList=e.data)})),Object(o["I"])({organId:e}).then((function(e){200==e.code&&(t.educationList=e.data)})),"PRACTICE"==this.courseType&&Object(l["u"])({organId:e}).then((function(e){200==e.code&&(console.log(e),t.rightForm.onlinePrice=e.data.singleClassMinutesPrice)})))},onCancel:function(){this.courseType?(this.$store.dispatch("delVisitedViews",this.$route),this.$router.push({path:"/accompanyManager/accompany"})):(this.$store.dispatch("delVisitedViews",this.$route),this.$router.push({path:"/vipManager/vipList"}))},setCourse:function(){var e=this;this.$refs["leftForm"].validate((function(t){if(t){var r=e.centerForm;if(e.maxCourseNum>0&&e.minCourseNum>0){var i=r.onlineCourseNum||0,s=r.offlineCourseNum||0,n=parseInt(i)+parseInt(s);if(n>e.maxCourseNum||n<e.minCourseNum)return void e.$message.error("待排课数不可超过该活动限制")}e.dialogFormVisible=!0}}))},getOrganStudentList:function(e){var t=this;e&&Object(f["n"])({rows:50,organId:e}).then((function(e){200==e.code&&(t.studentList=e.data.rows)}))},remoteMethod:function(e){var t=this;if(""!==e){this.remoteLoading=!0;var r="/api-web/studentManage/queryOrganStudentList",i={method:"get",headers:{Authorization:Object(d["a"])()},params:{rows:9999,search:e,organId:this.leftForm.classOrganId},url:r};this.remoteLoading=!0,m()(i).then((function(e){t.remoteLoading=!1;var r=e.data;200==r.code&&r.data.rows&&r.data.rows.length>0&&(r.data.rows.forEach((function(e){t.studentList.unshift(e)})),t.studentList=t.deweight(t.studentList,"userId"))}))}},changeStudent:function(e){var t=this;this.leftForm.activeType="",this.activeStudentList=[],this.chioseStudent=e;var r=this.rightForm.discount?this.rightForm.discount:100;if(this.studentList.forEach((function(i){-1!=e.indexOf(i.userId)&&t.activeStudentList.push({studentId:i.userId,userName:i.username,onlineClassesUnitPrice:(t.rightForm.onlinePrice*r/100).toFixed(2),offlineClassesUnitPrice:(t.rightForm.offlinePrice*r/100).toFixed(2),paymentPrice:""})})),this.leftForm.courseType&&this.leftForm.teacher&&this.leftForm.students&&this.leftForm.students.length>=1){var i=this.leftForm.students.join(",");Object(l["Q"])({categoryId:this.leftForm.courseType,teacherId:this.leftForm.teacher,studentIds:i}).then((function(e){200==e.code&&(t.activeList=e.data)}))}},changeStudentP:function(e){var t=this;this.leftForm.activeType="",this.activeStudentList=[],this.chioseStudent=e;var r=this.rightForm.discount?this.rightForm.discount:100;if(this.studentList.forEach((function(i){e==i.userId&&t.activeStudentList.push({studentId:i.userId,userName:i.username,onlineClassesUnitPrice:(t.rightForm.onlinePrice*r/100).toFixed(2),offlineClassesUnitPrice:(t.rightForm.offlinePrice*r/100).toFixed(2),paymentPrice:""})})),this.leftForm.teacher&&this.leftForm.students){var i=this.leftForm.students;Object(l["Q"])({categoryId:this.leftForm.courseType,teacherId:this.leftForm.teacher,studentIds:i,courseType:this.courseType}).then((function(e){200==e.code&&(t.activeList=e.data,t.classTimeList=[25],t.hasOffline=!1)}))}},deweight:function(e,t){var r=[];return e.forEach((function(e){var i=[];r.forEach((function(e){i.push(e[t])})),-1===i.indexOf(e[t])&&r.push(e)})),r},getStartTime:function(e){if(e){var t=g()(new Date).format("YYYY-MM-DD");this.maskForm.endTime=Object(h["a"])(t,e,this.leftForm.classTime)}else this.maskForm.endTime="";this.maskForm.endTime||(this.maskForm.startTime="")},changeStudentMoney:function(e){e&&(this.computationalBtn=!1)}}},y=v,F=(r("6eb7"),r("2877")),b=Object(F["a"])(y,i,s,!1,null,"6579d4ec",null);t["default"]=b.exports},"6eb7":function(e,t,r){"use strict";r("9f90")},8018:function(e,t,r){"use strict";r.d(t,"w",(function(){return o})),r.d(t,"t",(function(){return l})),r.d(t,"h",(function(){return u})),r.d(t,"e",(function(){return c})),r.d(t,"v",(function(){return m})),r.d(t,"u",(function(){return d})),r.d(t,"n",(function(){return h})),r.d(t,"C",(function(){return f})),r.d(t,"D",(function(){return p})),r.d(t,"y",(function(){return g})),r.d(t,"x",(function(){return v})),r.d(t,"B",(function(){return y})),r.d(t,"g",(function(){return F})),r.d(t,"q",(function(){return b})),r.d(t,"z",(function(){return T})),r.d(t,"A",(function(){return C})),r.d(t,"s",(function(){return L})),r.d(t,"i",(function(){return k})),r.d(t,"m",(function(){return S})),r.d(t,"r",(function(){return O})),r.d(t,"a",(function(){return I})),r.d(t,"l",(function(){return _})),r.d(t,"o",(function(){return w})),r.d(t,"p",(function(){return P})),r.d(t,"k",(function(){return N})),r.d(t,"d",(function(){return j})),r.d(t,"c",(function(){return D})),r.d(t,"j",(function(){return M})),r.d(t,"b",(function(){return $})),r.d(t,"f",(function(){return x}));var i=r("b775"),s=r("4328"),n=r.n(s),a="/api-web";function o(e){return Object(i["a"])({url:a+"/teacher/queryPage",method:"get",params:e})}function l(e){return Object(i["a"])({url:a+"/teacher/get",method:"get",params:e})}function u(e){return Object(i["a"])({url:a+"/teacher/getTeacherMusicClass",method:"get",params:e})}function c(e){return Object(i["a"])({url:a+"/demoGroup/findTeacherDemoGroups",method:"get",params:e})}function m(e){return Object(i["a"])({url:a+"/teacher/queryCloses",method:"get",params:e})}function d(e){return Object(i["a"])({url:a+"/teacherLeaveRecord/queryPage",method:"get",params:e})}function h(e){return Object(i["a"])({url:a+"/teacher/sumTeacherNoPay",method:"get",params:e})}function f(e){return Object(i["a"])({url:a+"/teacherDefaultVipGroupSalary/queryPageByTeacherId",method:"get",params:e})}function p(e){return Object(i["a"])({url:a+"/teacherDefaultVipGroupSalary/upSet",method:"post",data:e})}function g(e){return Object(i["a"])({url:a+"/teacherDefaultMusicGroupSalary/queryPage",method:"get",params:e})}function v(e){return Object(i["a"])({url:a+"/teacherDefaultMusicGroupSalary/batchUpset",method:"post",data:e})}function y(e){return Object(i["a"])({url:a+"/courseSchedule/updateTeacherCoursesSalary",method:"post",data:n.a.stringify(e)})}function F(e){return Object(i["a"])({url:a+"/school/findVipSchoolByTeacher",method:"get",params:e})}function b(e){return Object(i["a"])({url:a+"/teacher/add",method:"post",data:n.a.stringify(e)})}function T(e){return Object(i["a"])({url:a+"/teacher/update",method:"post",data:n.a.stringify(e)})}function C(e){return Object(i["a"])({url:a+"/teacher/update1",method:"post",data:n.a.stringify(e)})}function L(e){return Object(i["a"])({url:a+"/teacherFreeTime/query",method:"get",params:e})}function k(e){return Object(i["a"])({url:a+"/teacherAttendance/getTeacherPersonalAttendanceDetail",method:"get",params:e})}function S(e){return Object(i["a"])({url:a+"/teacherFreeTime/updateSet",method:"post",data:n.a.stringify(e)})}function O(e){return Object(i["a"])({url:a+"/teacherDefaultPracticeGroupSalary/queryPageByTeacherId",method:"get",params:e})}function I(e){return Object(i["a"])({url:a+"/teacherDefaultPracticeGroupSalary/update",method:"post",data:e})}function _(e){return Object(i["a"])({url:a+"/sysTenantAccount/queryTenantAccountDetail",method:"get",params:e})}function w(e){return Object(i["a"])({url:a+"/sysTenantAccount/addMinutes",method:"post",data:n.a.stringify(e)})}function P(e){return Object(i["a"])({url:a+"/sysTenantAccount/subtractMinutes",method:"post",data:n.a.stringify(e)})}function N(e){return Object(i["a"])({url:a+"/sysTenantAccount/get",method:"get",params:e})}function j(e){return Object(i["a"])({url:a+"/coursesGroupController/findTeacherCourseGroupsWithWeb",method:"get",params:e})}function D(e){return Object(i["a"])({url:a+"/courseSchedule/classGroupTeacherAdjust",method:"post",data:n.a.stringify(e)})}function M(e){return Object(i["a"])({url:a+"/teacher/queryStudent",method:"get",params:e})}function $(e){return Object(i["a"])({url:a+"/studentManage/batchUpdateAdviser",method:"post",data:n.a.stringify(e)})}function x(e){return Object(i["a"])({url:a+"/courseScheduleTeacherSalary/getCourseTeachers",method:"get",params:e})}},"9f90":function(e,t,r){},c466:function(e,t,r){"use strict";r.d(t,"h",(function(){return a})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return l})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return c})),r.d(t,"g",(function(){return m})),r.d(t,"b",(function(){return d})),r.d(t,"a",(function(){return h}));r("a481");var i=r("5a0c"),s=r.n(i),n=r("56d7");function a(e){var t=e.getFullYear(),r=e.getMonth()+1,i=e.getDate();return r=r<10?"0"+r:r,i=i<10?"0"+i:i,t+"-"+r+"-"+i}function o(e){return e.setDate(1),e}function l(e){var t=e.getMonth(),r=++t,i=new Date(e.getFullYear(),r,1),s=864e5;return new Date(i-s)}function u(e){var t=new Date(e.replace(/-/g,"/")).getTime(),r=new Date(e);0==r.getDay()&&(t-=6048e5);var i=t-24*(r.getDay()-1)*60*60*1e3,s=new Date(i),n=s.getFullYear(),a=s.getMonth()+1<10?"0"+(s.getMonth()+1):s.getMonth()+1,o=s.getDate()<10?"0"+s.getDate():s.getDate(),l=n+"-"+a+"-"+o;return l}function c(e){var t=new Date(e.replace(/-/g,"/")).getTime(),r=new Date(e),i=7-r.getDay();7==i&&(i=0);var s=t+24*i*60*60*1e3,n=new Date(s),a=n.getFullYear(),o=n.getMonth()+1<10?"0"+(n.getMonth()+1):n.getMonth()+1,l=n.getDate()<10?"0"+n.getDate():n.getDate(),u=a+"-"+o+"-"+l;return u}function m(e){var t=new Date(e.replace(/-/g,"/")).getDay();return 0===t&&(t=7),t}function d(e,t,r){return Math.abs(s()(e+" "+t).diff(e+" "+r,"Minute"))}function h(e,t,r){var i=s()(e+" "+t).add(r,"minute");return s()(e+" 23:59").isBefore(i)?(n["$message"].error("课程时间无法跨天请重新设置开始时间"),""):i.format("HH:mm")}}}]);
|