chunk-d8f1b334.ff2654a1.js 57 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d8f1b334"],{"0169":function(e,t,r){},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 h})),r.d(t,"p",(function(){return d})),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 b})),r.d(t,"a",(function(){return y})),r.d(t,"g",(function(){return F})),r.d(t,"b",(function(){return T})),r.d(t,"r",(function(){return C})),r.d(t,"i",(function(){return k})),r.d(t,"w",(function(){return O})),r.d(t,"v",(function(){return L})),r.d(t,"k",(function(){return S})),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 j})),r.d(t,"z",(function(){return P})),r.d(t,"h",(function(){return N}));var s=r("b775"),i=r("4328"),n=r.n(i),a="/api-web";function o(e){return Object(s["a"])({url:a+"/studentManage/queryStudentList",method:"post",data:e})}function l(e){return Object(s["a"])({url:a+"/studentManage/queryOrganStudentList",method:"get",params:e})}function u(e){return Object(s["a"])({url:a+"/studentManage/findStudentVipGroupClass",method:"get",params:e})}function c(e){return Object(s["a"])({url:a+"/studentManage/findStudentMusicGroups",method:"get",params:e})}function m(e){return Object(s["a"])({url:a+"/studentManage/findStudentVipGroups",method:"get",params:e})}function h(e){return Object(s["a"])({url:a+"/studentWithdraw/queryPage",method:"get",params:e})}function d(e){return Object(s["a"])({url:a+"/studentManage/queryStudentPayment",method:"get",params:e})}function f(e){return Object(s["a"])({url:a+"/order/queryPage",method:"get",params:e})}function p(e){return Object(s["a"])({url:a+"/studentManage/getUserCashAccountBaseInfo",method:"get",params:e})}function g(e){return Object(s["a"])({url:a+"/studentRegistration/batchUpdateSubject",method:"post",data:n.a.stringify(e)})}function v(e){return Object(s["a"])({url:a+"/studentRegistration/queryFeeDetail",method:"get",params:e})}function b(e){return Object(s["a"])({url:a+"/studentManage/queryMusicGroupStudentsSign",method:"get",params:e})}function y(e){return Object(s["a"])({url:a+"/studentRegistration/insertStudent",method:"POST",data:e})}function F(e){return Object(s["a"])({url:a+"/classGroupStudent/findAllStudent",method:"POST",data:n.a.stringify(e)})}function T(e){return Object(s["a"])({url:a+"/classGroupStudent/addStudents",method:"POST",data:n.a.stringify(e)})}function C(e){return Object(s["a"])({url:a+"/classGroupStudent/del",method:"POST",data:n.a.stringify(e)})}function k(e){return Object(s["a"])({url:a+"/studentManage/queryStudentClassGroup",method:"get",params:e})}function O(e){return Object(s["a"])({url:a+"/userCashAccount/updateCourseBalance",method:"post",data:n.a.stringify(e)})}function L(e){return Object(s["a"])({url:a+"/userCashAccount/updateBalance",method:"post",data:n.a.stringify(e)})}function S(e){return Object(s["a"])({url:a+"/studentManage/queryUserByPhone",method:"get",params:e})}function I(e){return Object(s["a"])({url:a+"/studentManage/register",method:"post",data:n.a.stringify(e)})}function _(e){return Object(s["a"])({url:a+"/studentManage/studentUpdate",method:"post",data:n.a.stringify(e)})}function w(e){return Object(s["a"])({url:a+"/coursesGroupController/findStudentCourseGroupsWithWeb",method:"get",params:e})}function j(e){return Object(s["a"])({url:a+"/userCashAccountDetail/queryPage",method:"get",params:e})}function P(e){return Object(s["a"])({url:a+"/userCoursesAccount/queryPage",method:"get",params:e})}function N(e){return Object(s["a"])({url:a+"/sysUserContracts/getLatest",method:"get",params:e})}},"67ff":function(e,t,r){"use strict";r.r(t);var s=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:"每课时长",prop:"classTime"}},[r("el-select",{attrs:{disabled:e.timeTable.length>0||e.classTimeDis},on:{change:function(){e.computationalBtn=!1}},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:{disabled:e.studentLimit>e.studentRuleNum,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(" "),"PRACTICE"==e.courseType?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):r("el-form-item",{attrs:{label:"VIP课课酬"}},[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)],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&&!e.fixedCourseNumFlag?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,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,1280716826)}):e._e(),e._v(" "),e.hasOffline&&!e.fixedCourseNumFlag?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,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,351232757)}):e._e(),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"studentId",label:""},scopedSlots:e._u([{key:"header",fn:function(t){return[r("div",{staticClass:"titleCell"},[r("span",[e._v("缴费总额")]),e._v(" "),r("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v("\n (线上课单价*课时数+线下课单价*课时数)*折扣后向上取整\n ")]),e._v(" "),r("i",{staticClass:"el-icon-question micon el-tooltip",staticStyle:{"font-size":"18px",color:"#f56c6c",top:"2px",position:"relative"}})])],1)]}},{key:"default",fn:function(t){return[r("el-input-number",{staticClass:"number-input",staticStyle:{width:"90% !important"},attrs:{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("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":"var(--color-primary)"},on:{click:e.resetFrom}},[e._v("\n 重置\n ")])])]),e._v(" "),e.dialogFormVisible?r("el-dialog",{ref:"maskForm",attrs:{title:"排课",width:"500px",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,s){return r("div",{key:s,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._e()],1)},i=[],n=(r("55dd"),r("ac6a"),r("28a5"),r("a481"),r("c80c")),a=(r("96cf"),r("3b8d")),o=r("bd86"),l=r("1cc7"),u=r("7e78"),c=r("8018"),m=r("bc3a"),h=r.n(m),d=r("5f87"),f=r("c466"),p=r("5137"),g=r("a7ba"),v=(r("7676"),r("5a0c")),b=r.n(v),y={name:"buildVip",data:function(){var e;return e={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:"",fixedCourseNumFlag:null,marketPrice:"",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"}],classTime:[{required:!0,message:"请选择报每课时长",trigger:"change"}]},id:"",studentList:[],courseTimeList:[],isMusicTheory:!1},Object(o["a"])(e,"chioseStudent",[]),Object(o["a"])(e,"classTimeDis",!1),Object(o["a"])(e,"studentRuleNum",0),Object(o["a"])(e,"isFirst",!1),Object(o["a"])(e,"submitList",[]),e},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(){this.courseType=this.$route.query.courseType,"PRACTICE"==this.courseType?(this.title="网管课申请",this.$route.meta.title="网管课申请",this.hasOffline=!1):(this.title="VIP申请",this.$route.meta.title="VIP申请"),this.init()},activated:function(){},beforeDestroy:function(){},beforeRouteLeave:function(e,t,r){var s,i;null!==(s=this.leftForm)&&void 0!==s&&s.classOrganId&&"/business/buildVip"==t.path?(console.log(null===(i=this.leftForm)||void 0===i?void 0:i.classOrganId),this.$confirm("检测到您有未提交的数据, 离开将丢失该数据!","提示",{confirmButtonText:"确定",cancelButtonText:"取消",closeOnClickModal:!1,type:"warning"}).then((function(){r()})).catch((function(e){}))):r()},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.fixedCourseNumFlag=null,this.marketPrice="",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"),localStorage.removeItem("newPractice")},getAgreement:function(){var e=Object(a["a"])(Object(n["a"])().mark((function e(){var t;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(l["R"])();case 3:t=e.sent,t.data||this.submitList.push("agreement"),e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](0);case 9:case"end":return e.stop()}}),e,this,[[0,7]])})));function t(){return e.apply(this,arguments)}return t}(),init:function(){var e=Object(a["a"])(Object(n["a"])().mark((function e(){var t,r,s=this;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(u["y"])();case 3:t=e.sent,r=JSON.parse(t.data.config),this.studentRuleNum=r.cloud_room_rule.cloud_room_up_limit-1,e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),console.log(e.t0);case 11:return this.$route.query.rules&&(this.rules=this.$route.query.rules),this.$route.query.searchForm&&(this.searchForm=this.$route.query.searchForm),this.submitList=[],e.next=16,this.$store.dispatch("setBranchs");case 16:return e.next=18,this.getAgreement();case 18:this.selects.branchs.length<=0&&submitList.push("organ"),this.submitList.length>0&&this.$bus.$emit("showguide",this.submitList),"PRACTICE"==this.courseType?Object(l["yb"])().then((function(e){200==e.code&&(s.subjectList=e.data)})):Object(l["Kb"])({tenantId:1}).then((function(e){200==e.code&&(s.subjectList=e.data)})),this.pickerOptions=this.beginDate(),this.pickerOptions1=this.processDate(),this.courseOption=this.coursesDate(),this.getInstitutionRules();case 25:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),getInstitutionRules:function(){var e=Object(a["a"])(Object(n["a"])().mark((function e(){var t;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(g["a"])({group:"OFFLINE"});case 3:t=e.sent,this.isFirst=Boolean(t.data[0].createOn),this.isFirst||this.$bus.$emit("showguide",["offline"]),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),console.log(e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),onCourseNumChange:function(e){this.computationalBtn=!1;var t=this.centerForm;if(this.maxCourseNum>0&&this.minCourseNum>0){var r=t.onlineCourseNum||0,s=t.offlineCourseNum||0,i=parseInt(r)+parseInt(s);if(i>this.maxCourseNum||i<this.minCourseNum)return void this.$message.error("待排课数不可超过该活动限制")}},coursesDate:function(){var e=this;return{firstDayOfWeek:1,disabledDate:function(t){if(e.leftForm.courseStart&&e.leftForm.courseEnd){var r=new Date(e.leftForm.courseStart.replace(/-/,"/")),s=new Date(e.leftForm.courseEnd.replace(/-/,"/")),i=new Date,n=r.getTime()-i.getTime()>0?r:i,a=s.getTime()-i.getTime()>0?s:i;return t.getTime()<n.getTime()||t.getTime()>a.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.computationalBtn=!1,this.leftForm.teacher="",this.leftForm.section="",Object(l["Q"])({subjectIds:e,organId:this.leftForm.classOrganId}).then((function(e){200==e.code&&(t.teacherList=e.data,t.teacherList.length<=0)&&t.$bus.$emit("showguide",["teacher"])}))},changeType:function(e){this.rightForm.offlineCourse="",this.rightForm.onlineCourse="",this.leftForm.activeType="",this.computationalBtn=!1,this.leftForm.students=[],this.centerForm.onlineCourseNum=0,this.changePrice(e)},changePrice:function(e){var t=this;for(var r in this.courseTypeList)if(this.courseTypeList[r].id==e){if(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.rightForm.onlinePrice<=0||this.rightForm.offlinePrice<=0)return void this.$bus.$emit("showguide",["vipPrice"]);this.isMusicTheory=this.courseTypeList[r].musicTheory}this.activeStudentList=[],this.studentList.forEach((function(e){if(Array.isArray(t.chioseStudent)?-1!=t.chioseStudent.indexOf(e.userId):e.userId==t.chioseStudent){t.rightForm.discount&&t.rightForm.discount;t.activeStudentList.push({studentId:e.userId,userName:e.username,onlineClassesUnitPrice:t.rightForm.onlinePrice,offlineClassesUnitPrice:t.rightForm.offlinePrice,paymentPrice:""})}}))},chioseActive:function(e){var t=this;if(this.computationalBtn=!1,this.rightForm.offlineCourse="",this.rightForm.onlineCourse="",this.centerForm.onlineCourseNum=0,this.centerForm.offlineCourseNum=0,this.lookList=[],this.timeTable=[],this.attribute1="",this.attribute2="",this.attribute3="",this.fixedCourseNumFlag=null,this.marketPrice="",this.rightForm.discount=100,this.giveNum=0,this.isGiveClass=!1,this.leftForm.courseStart="",this.leftForm.courseEnd="",this.hasOnline=!0,this.hasOffline=!0,this.maxCourseNum=0,this.minCourseNum=0,e){for(var r in this.classTimeDis=!0,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 s in this.activeList)this.activeList[s].id==e&&(this.maxCourseNum=this.activeList[s].maxCourseNum||0,this.minCourseNum=this.activeList[s].minCourseNum||0,this.leftForm.courseStart=this.activeList[s].coursesStartTime,this.leftForm.courseEnd=this.activeList[s].coursesEndTime,this.rightForm.discount=this.activeList[s].discount,this.leftForm.classTime=this.activeList[s].singleCourseTime,this.hotType=this.activeList[s].type,this.attribute1=this.activeList[s].attribute1,this.attribute2=this.activeList[s].attribute2,this.attribute3=this.activeList[s].attribute3,this.fixedCourseNumFlag=this.activeList[s].fixedCourseNumFlag,this.marketPrice=this.activeList[s].marketPrice,this.salaryReadonlyFlag=this.activeList[s].salaryReadonlyFlag,this.paymentReadonlyFlag=this.activeList[s].paymentReadonlyFlag,"PRACTICE"==this.courseType?(this.hasOffline=!1,this.hasOnline=!0):(0==this.activeList[s].teachMode&&(this.hasOffline=!1),1==this.activeList[s].teachMode&&(this.hasOnline=!1)),this.activeStudentList=[],this.studentList.forEach((function(e){if(Array.isArray(t.chioseStudent)?-1!=t.chioseStudent.indexOf(e.userId):e.userId==t.chioseStudent){t.rightForm.discount&&t.rightForm.discount;t.activeStudentList.push({studentId:e.userId,userName:e.username,onlineClassesUnitPrice:t.rightForm.onlinePrice,offlineClassesUnitPrice:t.rightForm.offlinePrice,paymentPrice:t.fixedCourseNumFlag?t.marketPrice:""})}})))}else{for(var i in this.classTimeDis=!1,this.courseTypeList)this.courseTypeList[i].id==this.leftForm.courseType&&(this.leftForm.classNum=this.courseTypeList[i].studentNum,this.classTimeList=this.courseTypeList[i].singleClassMinutes.split(","),this.leftForm.classTime=this.classTimeList[0],this.rightForm.onlinePrice=this.courseTypeList[i].onlineClassesUnitPrice,this.rightForm.offlinePrice=this.courseTypeList[i].offlineClassesUnitPrice,this.rightForm.discount=this.courseTypeList[i].discount);this.leftForm.classTime=null,"PRACTICE"==this.courseType&&(this.hasOffline=!1,this.hasOnline=!0,this.classTimeList=[25])}},addWeek:function(){var e=this.maskForm.type,t=this.maskForm.startTime;if(e&&this.maskForm.week&&t){var r,s=this.MinutesTest(t,this.leftForm.classTime);switch(e){case"ONLINE":r="线上课";break;case"OFFLINE":r="线下课";break}var i=!1;for(var n in this.lookList)this.lookList[n].weekDay==this.maskForm.week&&(i=!0);if(i){var a=[];for(var o in this.lookList)if(this.lookList[o].weekDay==this.maskForm.week){var l=this.timeIsrange(t,s,this.lookList[o].startTime),u=this.timeIsrange(t,s,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:s,time:t+"-"+s,id:Date.now()})}else this.lookList.push({type:r,week:this.weekDay[this.maskForm.week],weekDay:this.maskForm.week,startTime:t,endTime:s,time:t+"-"+s,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],s=e.split(":")[1],i=new Date(1900,1,1,r,s);i.setMinutes(i.getMinutes()+parseInt(t));var n=i.getHours(),a=i.getMinutes();return n<10&&(n="0"+n),a<10&&(a="0"+a),n+":"+a},timeIsrange:function(e,t,r){var s=e.split(":");if(2!=s.length)return!1;var i=t.split(":");if(2!=i.length)return!1;var n=r.split(":");if(2!=i.length)return!1;var a=new Date,o=new Date,l=new Date;return a.setHours(s[0]),a.setMinutes(s[1]),o.setHours(i[0]),o.setMinutes(i[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,s=this.centerForm.radio;if("ONLINE"==s?e+=r:"OFFLINE"==s&&(t+=r),this.maskForm.courseStartOnline){var i,n;i=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-i.getDay()>=0?a[u].week-i.getDay():a[u].week-i.getDay()+7;var m=this.getThinkDate(i,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))&&i.setDate(i.getDate()+7)}while(t&&t>0){for(var h in o){var d=void 0;d=o[h].week-n.getDay()>=0?o[h].week-n.getDay():o[h].week-n.getDay()+7;var f=this.getThinkDate(n,d);if(this.timeTable.push({classDate:f+" 00:00:00",actualTeacherId:this.leftForm.teacher,startClassTimeStr:o[h].date.startTime,endClassTimeStr:o[h].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=b()(b()(e.classDate).format("YYYY-MM-DD")+" "+e.startClassTimeStr+":00").valueOf(),s=b()(b()(t.classDate).format("YYYY-MM-DD")+" "+t.startClassTimeStr+":00").valueOf();return r-s})),this.dialogFormVisible=!1}}else this.$message.error("请选择课程开始时间")},getThinkDate:function(e,t){var r=e;r.setDate(e.getDate()+t);var s=r.getFullYear(),i=r.getMonth()+1,n="";n=i<10?"0"+i:i+"";var a=r.getDate(),o="";return o=a<10?"0"+a:a+"",s+"-"+n+"-"+o},computational:function(){var e=this;if(this.timeTable.length<=0)this.$message.error("请先排课再计算课酬");else{this.computationalBtn=!0;var t=this.leftForm.teacher||null,r=this.centerForm.radio||null,s=this.leftForm.courseType||null,i=this.leftForm.activeType||null,n=this.rightForm.onlinePrice||null,a=this.rightForm.offlinePrice||null,l=this.centerForm.onlineCourseNum||0,c=this.centerForm.offlineCourseNum||0,m=this.leftForm.classTime;"GIVE_CLASS"==this.hotType&&("ONLINE"==this.centerForm.radio?l=parseInt(l):"OFFLINE"==this.centerForm.radio&&(c=parseInt(c)));var h,d=this.rightForm.onlineCourse||null,f=this.rightForm.offlineCourse||null,p=this.activeStudentList.map((function(e){return e.studentId})).join(",");if("PRACTICE"==this.courseType)Object(u["z"])({vipGroupActivityId:i,onlineClassesUnitPrice:n,onlineTeacherSalary:d,offlineTeacherSalary:f,vipGroupCategoryId:s,offlineClassesUnitPrice:a,allCourseNum:l,offlineClassesNum:c,userId:t,giveTeachMode:r,singleClassMinutes:m,organId:null===(h=this.leftForm)||void 0===h?void 0:h.classOrganId,studentId:p}).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})))}));else Object(u["H"])(Object(o["a"])({vipGroupActivityId:i,onlineClassesUnitPrice:n,onlineTeacherSalary:d,offlineTeacherSalary:f,vipGroupCategoryId:s,offlineClassesUnitPrice:a,onlineClassesNum:l,offlineClassesNum:c,userId:t,studentIdList:t,giveTeachMode:r,singleClassMinutes:m},"studentIdList",p)).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})))}))}},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<1)&&(this.$message.error("请选择上课学生为1-".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),s=parseInt(this.centerForm.offlineCourseNum),i=this.giveNum,n=this.centerForm.radio;"ONLINE"==n?r+=i:"OFFLINE"==n&&(s+=i);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:s||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,subjectId: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,studentIdList:o,vipGroupStudentCoursePrices:this.activeStudentList,coursesExpireDate:this.leftForm.courseEnd,teacherSchoolId:this.leftForm.section,offlineClassesNum:s||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(u["k"])(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(u["k"])(a).then((function(t){200==t.code&&(e.resetFrom(),e.$message.success("提交成功"),e.onCancel())}))}))})):Object(u["l"])(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(u["l"])(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="",this.computationalBtn=!1,e&&Object(c["g"])({userId:e}).then((function(e){200==e.code&&(t.scetionList=e.data)}))},onClassChange:function(){var e=Object(a["a"])(Object(n["a"])().mark((function e(t){var r,s,i=this;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.computationalBtn=!1,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),!t){e.next=29;break}return this.getOrganStudentList(t),Object(u["ab"])({organId:t}).then((function(e){200==e.code&&(i.courseTypeList=e.data)})),e.prev=15,e.next=18,Object(l["xb"])({id:t});case 18:if(s=e.sent,this.educationList=null===s||void 0===s||null===(r=s.data)||void 0===r?void 0:r.EDUCATION,this.educationList&&!(this.educationList.length<=0)){e.next=23;break}return this.$bus.$emit("showguide",["teamManager"]),e.abrupt("return");case 23:e.next=28;break;case 25:e.prev=25,e.t0=e["catch"](15),console.log(e.t0);case 28:"PRACTICE"==this.courseType&&Object(u["A"])({organId:t}).then((function(e){200==e.code&&(i.rightForm.onlinePrice=e.data.singleClassMinutesPrice)}));case 29:case"end":return e.stop()}}),e,this,[[15,25]])})));function t(t){return e.apply(this,arguments)}return t}(),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 s=r.onlineCourseNum||0,i=r.offlineCourseNum||0,n=parseInt(s)+parseInt(i);if(n>e.maxCourseNum||n<e.minCourseNum)return void e.$message.error("待排课数不可超过该活动限制")}e.dialogFormVisible=!0}}))},getOrganStudentList:function(e){var t=this;e&&Object(p["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",s={method:"get",headers:{Authorization:Object(d["b"])(),tenantId:Object(d["a"])()},params:{rows:9999,search:e,organId:this.leftForm.classOrganId},url:r};this.remoteLoading=!0,h()(s).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.computationalBtn=!1,this.chioseActive(),this.leftForm.activeType="",this.activeStudentList=[],this.chioseStudent=e;this.rightForm.discount&&this.rightForm.discount;if(this.studentList.forEach((function(r){-1!=e.indexOf(r.userId)&&t.activeStudentList.push({studentId:r.userId,userName:r.username,onlineClassesUnitPrice:t.rightForm.onlinePrice,offlineClassesUnitPrice:t.rightForm.offlinePrice,paymentPrice:t.fixedCourseNumFlag?t.marketPrice:""})})),this.leftForm.courseType&&this.leftForm.teacher&&this.leftForm.students&&this.leftForm.students.length>=1){var r=this.leftForm.students.join(",");Object(u["Z"])({categoryId:this.leftForm.courseType,teacherId:this.leftForm.teacher,studentIds:r,activityChannel:2}).then((function(e){200==e.code&&(t.activeList=e.data)}))}},changeStudentP:function(e){var t=this;this.chioseActive(),this.leftForm.activeType="",this.activeStudentList=[],this.chioseStudent=e;this.rightForm.discount&&this.rightForm.discount;if(this.studentList.forEach((function(r){e==r.userId&&t.activeStudentList.push({studentId:r.userId,userName:r.username,onlineClassesUnitPrice:t.rightForm.onlinePrice,offlineClassesUnitPrice:t.rightForm.offlinePrice,paymentPrice:""})})),this.leftForm.teacher&&this.leftForm.students){var r=this.leftForm.students;Object(u["Z"])({categoryId:this.leftForm.courseType,teacherId:this.leftForm.teacher,studentIds:r,courseType:this.courseType,activityChannel:2}).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 s=[];r.forEach((function(e){s.push(e[t])})),-1===s.indexOf(e[t])&&r.push(e)})),r},getStartTime:function(e){if(e){var t=b()(new Date).format("YYYY-MM-DD");this.maskForm.endTime=Object(f["d"])(t,e,this.leftForm.classTime)}else this.maskForm.endTime="";this.maskForm.endTime||(this.maskForm.startTime="")},changeStudentMoney:function(e){e&&(this.computationalBtn=!1)}}},F=y,T=(r("c73b"),r("2877")),C=Object(T["a"])(F,s,i,!1,null,"047d19d6",null);t["default"]=C.exports},8018:function(e,t,r){"use strict";r.d(t,"w",(function(){return l})),r.d(t,"t",(function(){return u})),r.d(t,"h",(function(){return c})),r.d(t,"e",(function(){return m})),r.d(t,"v",(function(){return h})),r.d(t,"u",(function(){return d})),r.d(t,"n",(function(){return f})),r.d(t,"C",(function(){return p})),r.d(t,"D",(function(){return g})),r.d(t,"y",(function(){return v})),r.d(t,"x",(function(){return b})),r.d(t,"B",(function(){return y})),r.d(t,"g",(function(){return F})),r.d(t,"q",(function(){return T})),r.d(t,"z",(function(){return C})),r.d(t,"A",(function(){return k})),r.d(t,"s",(function(){return O})),r.d(t,"i",(function(){return L})),r.d(t,"m",(function(){return S})),r.d(t,"r",(function(){return I})),r.d(t,"a",(function(){return _})),r.d(t,"l",(function(){return w})),r.d(t,"o",(function(){return j})),r.d(t,"p",(function(){return P})),r.d(t,"k",(function(){return N})),r.d(t,"d",(function(){return D})),r.d(t,"c",(function(){return $})),r.d(t,"j",(function(){return x})),r.d(t,"b",(function(){return M})),r.d(t,"f",(function(){return E}));var s=r("b775"),i=r("4328"),n=r.n(i),a=r("829b"),o="/api-web";function l(e){return Object(s["a"])({url:o+"/teacher/queryPage",method:"get",params:e})}function u(e){return Object(s["a"])({url:o+"/teacher/get",method:"get",params:e})}function c(e){return Object(s["a"])({url:o+"/teacher/getTeacherMusicClass",method:"get",params:e})}function m(e){return Object(s["a"])({url:o+"/demoGroup/findTeacherDemoGroups",method:"get",params:e})}function h(e){return Object(s["a"])({url:o+"/teacher/queryCloses",method:"get",params:e})}function d(e){return Object(s["a"])({url:o+"/teacherLeaveRecord/queryPage",method:"get",params:e})}function f(e){return Object(s["a"])({url:o+"/teacher/sumTeacherNoPay",method:"get",params:e})}function p(e){return Object(s["a"])({url:o+"/teacherDefaultVipGroupSalary/queryPageByTeacherId",method:"get",params:e})}function g(e){return Object(a["a"])({url:o+"/teacherDefaultVipGroupSalary/upSet",method:"post",data:e})}function v(e){return Object(s["a"])({url:o+"/teacherDefaultMusicGroupSalary/queryPage",method:"get",params:e})}function b(e){return Object(s["a"])({url:o+"/teacherDefaultMusicGroupSalary/batchUpset",method:"post",data:e})}function y(e){return Object(s["a"])({url:o+"/courseSchedule/updateTeacherCoursesSalary",method:"post",data:n.a.stringify(e)})}function F(e){return Object(s["a"])({url:o+"/school/findVipSchoolByTeacher",method:"get",params:e})}function T(e){return Object(s["a"])({url:o+"/teacher/add",method:"post",data:n.a.stringify(e)})}function C(e){return Object(s["a"])({url:o+"/teacher/update",method:"post",data:n.a.stringify(e)})}function k(e){return Object(s["a"])({url:o+"/teacher/update1",method:"post",data:n.a.stringify(e)})}function O(e){return Object(s["a"])({url:o+"/teacherFreeTime/query",method:"get",params:e})}function L(e){return Object(s["a"])({url:o+"/teacherAttendance/getTeacherPersonalAttendanceDetail",method:"get",params:e})}function S(e){return Object(s["a"])({url:o+"/teacherFreeTime/updateSet",method:"post",data:n.a.stringify(e)})}function I(e){return Object(s["a"])({url:o+"/teacherDefaultPracticeGroupSalary/queryPageByTeacherId",method:"get",params:e})}function _(e){return Object(a["a"])({url:o+"/teacherDefaultPracticeGroupSalary/update",method:"post",data:e})}function w(e){return Object(s["a"])({url:o+"/sysTenantAccount/queryTenantAccountDetail",method:"get",params:e})}function j(e){return Object(s["a"])({url:o+"/sysTenantAccount/addMinutes",method:"post",data:n.a.stringify(e)})}function P(e){return Object(s["a"])({url:o+"/sysTenantAccount/subtractMinutes",method:"post",data:n.a.stringify(e)})}function N(e){return Object(s["a"])({url:o+"/sysTenantAccount/get",method:"get",params:e})}function D(e){return Object(s["a"])({url:o+"/coursesGroupController/findTeacherCourseGroupsWithWeb",method:"get",params:e})}function $(e){return Object(s["a"])({url:o+"/courseSchedule/classGroupTeacherAdjust",method:"post",data:n.a.stringify(e)})}function x(e){return Object(s["a"])({url:o+"/teacher/queryStudent",method:"get",params:e})}function M(e){return Object(s["a"])({url:o+"/studentManage/batchUpdateAdviser",method:"post",data:n.a.stringify(e)})}function E(e){return Object(s["a"])({url:o+"/courseScheduleTeacherSalary/getCourseTeachers",method:"get",params:e})}},a7ba:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return a}));var s=r("829b"),i=function(e){return Object(s["a"])({url:"/api-web/sysTenantConfig/queryAll",params:e,method:"get"})},n=function(e){return Object(s["a"])({url:"/api-web/questionnaireTopic/queryPage",params:e,method:"get"})},a=function(e){return Object(s["a"])({url:"/api-web/sysTenantConfig/batchUpSet",data:e,method:"post",requestType:"json"})}},c466:function(e,t,r){"use strict";r.d(t,"n",(function(){return a})),r.d(t,"f",(function(){return o})),r.d(t,"g",(function(){return l})),r.d(t,"h",(function(){return u})),r.d(t,"i",(function(){return c})),r.d(t,"j",(function(){return m})),r.d(t,"e",(function(){return h})),r.d(t,"d",(function(){return d})),r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return g})),r.d(t,"k",(function(){return v})),r.d(t,"l",(function(){return b})),r.d(t,"m",(function(){return y}));r("a481");var s=r("5a0c"),i=r.n(s),n=r("56d7");function a(e){var t=e.getFullYear(),r=e.getMonth()+1,s=e.getDate();return r=r<10?"0"+r:r,s=s<10?"0"+s:s,t+"-"+r+"-"+s}function o(e){return e.setDate(1),e}function l(e){var t=e.getMonth(),r=++t,s=new Date(e.getFullYear(),r,1),i=864e5;return new Date(s-i)}function u(e){var t=new Date(e.replace(/-/g,"/")).getTime(),r=new Date(e);0==r.getDay()&&(t-=6048e5);var s=t-24*(r.getDay()-1)*60*60*1e3,i=new Date(s),n=i.getFullYear(),a=i.getMonth()+1<10?"0"+(i.getMonth()+1):i.getMonth()+1,o=i.getDate()<10?"0"+i.getDate():i.getDate(),l=n+"-"+a+"-"+o;return l}function c(e){var t=new Date(e.replace(/-/g,"/")).getTime(),r=new Date(e),s=7-r.getDay();7==s&&(s=0);var i=t+24*s*60*60*1e3,n=new Date(i),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 h(e,t,r){return Math.abs(i()(e+" "+t).diff(e+" "+r,"Minute"))}function d(e,t,r){var s=i()(e+" "+t).add(r,"minute");return i()(e+" 21:00").isBefore(s)?(n["$message"].error("课程结束时间不可超过21:00点,请重新设置开始时间"),""):s.format("HH:mm")}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=i()("2021-12-17 "+e).add(t,"minute");return r.format("HH:mm:ss")}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=i()("2021-12-17 "+e).add(t,"minute").add(1,"second");return r.format("HH:mm:ss")}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=i()("2021-12-17 "+e).add(t,"minute").subtract(1,"second");return r.format("HH:mm:ss")}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=i()("2021-12-17 "+e).subtract(t,"minute");return r.format("HH:mm:ss")}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=i()("2021-12-17 "+e).subtract(t,"minute").add(1,"second");return r.format("HH:mm:ss")}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=i()("2021-12-17 "+e).subtract(t,"minute").subtract(1,"second");return r.format("HH:mm:ss")}},c73b:function(e,t,r){"use strict";r("0169")}}]);