VIPApply.4f8eeccc.js 87 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["VIPApply"],{"2dd9":function(t,e,a){"use strict";a("59af")},"38f5":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return 1==t.tenantId?a("div",[a("van-tabs",{staticClass:"vanTabs",attrs:{"swipe-threshold":"3",sticky:"",color:"#01C1B5"},on:{change:t.onChange},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[a("van-tab",{attrs:{title:"VIP申请",name:1}},[1===t.active?a("vip-00-apply"):t._e()],1),a("van-tab",{attrs:{title:"双十一排课",name:2}},[2===t.active?a("vip-11-apply"):t._e()],1),a("van-tab",{attrs:{title:"考级VIP排课",name:3}},[3===t.active?a("vip-course"):t._e()],1),a("van-tab",{attrs:{title:"考级乐理排课",name:4}},[4===t.active?a("theory-course"):t._e()],1)],1)],1):a("div",[a("vip-00-apply")],1)},i=[],n=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"vipapply"},[t.statusList.headerStatus?s("m-header"):t._e(),s("div",{staticClass:"vip-title"},[t._v("课程信息")]),s("van-cell-group",[s("van-field",{attrs:{label:"排课类型",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){t.statusList.courseTypeStatus=!0}},model:{value:t.courseTypeName,callback:function(e){t.courseTypeName=e},expression:"courseTypeName"}}),s("van-field",{attrs:{label:"科目名称",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onGetSheetList("subjectList")}},model:{value:t.formName.subjectListName,callback:function(e){t.$set(t.formName,"subjectListName",e)},expression:"formName.subjectListName"}}),s("van-field",{directives:[{name:"show",rawName:"v-show",value:t.courseTypeVip,expression:"courseTypeVip"}],attrs:{label:"课程形式",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onGetSheetList("vipGroupCategory")}},model:{value:t.formName.vipGroupCategoryName,callback:function(e){t.$set(t.formName,"vipGroupCategoryName",e)},expression:"formName.vipGroupCategoryName"}}),s("van-field",{attrs:{label:"乐团主管",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onGetSheetList("teacherList")}},model:{value:t.formName.educationalTeacherName,callback:function(e){t.$set(t.formName,"educationalTeacherName",e)},expression:"formName.educationalTeacherName"}}),s("van-cell",{staticClass:"courseStudent",attrs:{title:"上课学生",readonly:!0,"input-align":"right","is-link":!(t.checkboxSelectDataList.length>0),size:"large",value:t.checkboxSelectDataList.length>0?"重新选择":"请选择","value-class":[t.checkboxSelectDataList.length>0?"studentColor":null,"classStudent"]},on:{click:t.onCheckStudent}}),t.checkboxSelectDataList.length>0?s("div",{staticStyle:{"text-align":"center","line-height":"1.8",padding:"0.05rem 0",background:"#fafbff"}},t._l(t.checkboxSelectDataList,(function(e,a){return s("p",{key:a,staticStyle:{color:"#323233"}},[t._v(t._s(e.userName)+" - "+t._s(e.phone))])})),0):t._e(),s("van-field",{attrs:{label:"活动方案",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onGetSheetList("vipGroupActivity")}},model:{value:t.formName.vipGroupActivityName,callback:function(e){t.$set(t.formName,"vipGroupActivityName",e)},expression:"formName.vipGroupActivityName"}})],1),s("div",{staticClass:"vip-title"},[t._v("课时组成")]),s("van-cell-group",[s("van-field",{attrs:{label:"每班人数",readonly:!0,"input-align":"right",size:"large",placeholder:"每班预计招收人数"},model:{value:t.form.studentNum,callback:function(e){t.$set(t.form,"studentNum",e)},expression:"form.studentNum"}}),s("van-field",{attrs:{label:"每课时长",readonly:!0,"input-align":"right","is-link":!t.form.vipGroupActivityId,size:"large",placeholder:"请输入每课时长"},on:{click:t.onClickSingleClass},model:{value:t.form.singleClassMinutes,callback:function(e){t.$set(t.form,"singleClassMinutes",e)},expression:"form.singleClassMinutes"}}),t.loadData.vipGroupActivitySelect.maxCourseNum>0&&t.loadData.vipGroupActivitySelect.minCourseNum>0?s("div",{staticClass:"courseTips"},[t._v("\n 该活动最小课时数:"),s("span",[t._v(t._s(t.loadData.vipGroupActivitySelect.minCourseNum))]),t._v("节 最大课时数:"),s("span",[t._v(t._s(t.loadData.vipGroupActivitySelect.maxCourseNum))]),t._v("节\n ")]):t._e(),t.statusList.hasOnline&&t.studentMaxStatus?s("van-field",{attrs:{label:"线上课","input-align":"right",size:"large",placeholder:"请输入次数",type:"number"},on:{keyup:t.onClassKeyUp},model:{value:t.form.onlineClassesNums,callback:function(e){t.$set(t.form,"onlineClassesNums",e)},expression:"form.onlineClassesNums"}}):t._e(),t.statusList.hasOffline?s("van-field",{attrs:{label:"线下课","input-align":"right",size:"large",placeholder:"请输入次数",type:"number"},on:{keyup:function(e){return t.onClassKeyUp("offLine")}},model:{value:t.form.offlineClassesNums,callback:function(e){t.$set(t.form,"offlineClassesNums",e)},expression:"form.offlineClassesNums"}}):t._e(),t.form.offlineClassesNums>0?s("van-field",{attrs:{label:"线下课地址",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onGetSheetList("teacherSchool")}},model:{value:t.formName.teacherSchoolName,callback:function(e){t.$set(t.formName,"teacherSchoolName",e)},expression:"formName.teacherSchoolName"}}):t._e(),s("van-field",{attrs:{label:"课时总数",readonly:!t.courseTypePractice,type:"number","input-align":"right",size:"large",placeholder:"请输入次数"},on:{keyup:t.getCalcClass},model:{value:t.form.totalClassTime,callback:function(e){t.$set(t.form,"totalClassTime",e)},expression:"form.totalClassTime"}})],1),s("div",{staticClass:"vip-title"},[t._v("时间安排")]),s("van-cell-group",[t.loadData.vipGroupActivitySelect.coursesStartTime?s("van-cell",{attrs:{title:"最早排课时间",readonly:!0,"input-align":"right",size:"large"},scopedSlots:t._u([{key:"default",fn:function(){return[t._v("\n "+t._s(t.dayjs(t.loadData.vipGroupActivitySelect.coursesStartTime).format("YYYY-MM-DD"))+"\n ")]},proxy:!0}],null,!1,875942923)}):t._e(),t.loadData.vipGroupActivitySelect.coursesEndTime?s("van-cell",{attrs:{title:"最晚排课时间",readonly:!0,"input-align":"right",size:"large"},scopedSlots:t._u([{key:"default",fn:function(){return[t._v("\n "+t._s(t.dayjs(t.loadData.vipGroupActivitySelect.coursesEndTime).format("YYYY-MM-DD"))+"\n ")]},proxy:!0}],null,!1,1329614116)}):t._e(),s("van-field",{attrs:{label:"报名开始时间",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onEnListShow("start",t.form.registrationStartTime)}},model:{value:t.form.registrationStartTime,callback:function(e){t.$set(t.form,"registrationStartTime",e)},expression:"form.registrationStartTime"}}),s("van-field",{attrs:{label:"报名截止时间",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onEnListShow("end",t.form.coursesExpireDate)}},model:{value:t.form.coursesExpireDate,callback:function(e){t.$set(t.form,"coursesExpireDate",e)},expression:"form.coursesExpireDate"}})],1),s("div",{staticClass:"vip-title"},[t._v("课时安排")]),s("van-cell-group",[s("van-field",{attrs:{label:"排课开始时间",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){t.dataForm.status=!0}},model:{value:t.form.courseStart,callback:function(e){t.$set(t.form,"courseStart",e)},expression:"form.courseStart"}}),t._l(t.scheduleList,(function(e,a){return s("van-cell",{key:a,attrs:{"title-class":"title-time"}},[s("template",{slot:"title"},[s("span",{staticClass:"online"},[t._v(t._s(e.type))]),s("span",{staticClass:"week"},[t._v(t._s(e.weekStr))]),s("span",{staticClass:"timer"},[t._v(t._s(e.startTime+"-"+e.endTime))])]),s("template",{slot:"default"},[s("van-button",{attrs:{type:"warning",round:"",size:"small",plain:""},on:{click:function(a){return t.onScheduleRemove(e)}}},[t._v("删除")])],1)],2)})),s("div",{staticClass:"add-plan van-cell",on:{click:t.onCourseShedule}},[s("van-icon",{attrs:{name:"add-o"}}),t._v("课时安排")],1),t.scheduleList.length>0?s("van-field",{attrs:{label:"排课列表",readonly:!0,"input-align":"right","is-link":"",size:"large"},on:{click:t.onShowTimeTable}}):t._e()],2),s("div",{staticClass:"vip-title"},[t._v("课酬设置")]),s("van-cell-group",[t.loadData.vipGroupActivitySelect.fixedCourseNumFlag?t._e():[t.statusList.hasOnline&&t.studentMaxStatus?s("van-field",{attrs:{label:"线上课单价",type:"number","input-align":"right",size:"large",readonly:!0,placeholder:"金额(每课时)"},on:{keyup:t.getCalcClass},model:{value:t.form.onlineClassesUnitPrice,callback:function(e){t.$set(t.form,"onlineClassesUnitPrice",e)},expression:"form.onlineClassesUnitPrice"}}):t._e(),t.statusList.hasOffline?s("van-field",{attrs:{label:"线下课单价",type:"number","input-align":"right",size:"large",readonly:!0,placeholder:"金额(每课时)"},on:{keyup:t.getCalcClass},model:{value:t.form.offlineClassesUnitPrice,callback:function(e){t.$set(t.form,"offlineClassesUnitPrice",e)},expression:"form.offlineClassesUnitPrice"}}):t._e()],t.statusList.hasOffline||t.statusList.hasOnline?s("van-field",{attrs:{value:t.statusList.hasOffline?t.form.offlineTeacherSalary:t.form.onlineTeacherSalary,label:"VIP课酬","input-align":"right",size:"large",readonly:!0,placeholder:"金额(每课时)",type:"number"}}):t._e(),t.loadData.vipGroupActivitySelect.fixedCourseNumFlag?t._e():[t.courseTypePractice?s("van-field",{attrs:{label:"网管课单价","input-align":"right",size:"large",readonly:!0,placeholder:"金额(每课时)",type:"number"},model:{value:t.singleClassMinutesPrice,callback:function(e){t.singleClassMinutesPrice=e},expression:"singleClassMinutesPrice"}}):t._e()],t.courseTypePractice?s("van-field",{attrs:{label:"网管课课酬","input-align":"right",size:"large",readonly:!0,placeholder:"金额(每课时)",type:"number"},model:{value:t.form.onlineTeacherSalary,callback:function(e){t.$set(t.form,"onlineTeacherSalary",e)},expression:"form.onlineTeacherSalary"}}):t._e(),s("van-field",{attrs:{readonly:!0,label:"课程总价","input-align":"right",size:"large",placeholder:"金额(每课时)"},model:{value:t.form.totalCount,callback:function(e){t.$set(t.form,"totalCount",e)},expression:"form.totalCount"}})],2),s("div",{staticClass:"button-group"},[s("van-button",{attrs:{type:"primary",round:"",size:"large"},on:{click:t.onSubmit}},[t._v("确认")])],1),s("van-action-sheet",{attrs:{actions:t.loadData.classTimer,"cancel-text":"取消"},on:{cancel:function(e){t.statusList.classTimerStatus=!1},select:t.onClassTimerSelect},model:{value:t.statusList.classTimerStatus,callback:function(e){t.$set(t.statusList,"classTimerStatus",e)},expression:"statusList.classTimerStatus"}}),s("van-popup",{attrs:{position:"bottom"},model:{value:t.enlistForm.status,callback:function(e){t.$set(t.enlistForm,"status",e)},expression:"enlistForm.status"}},[s("van-datetime-picker",{attrs:{type:"date","min-date":t.enlistForm.minDate,"max-date":t.enlistForm.maxDate,formatter:t.formatter},on:{cancel:function(e){t.enlistForm.status=!1},confirm:t.onEnlistConfirm},model:{value:t.enlistForm.currentDate,callback:function(e){t.$set(t.enlistForm,"currentDate",e)},expression:"enlistForm.currentDate"}})],1),s("van-action-sheet",{attrs:{actions:[{name:"VIP课",value:"VIP"},{name:"网管课",value:"PRACTICE"}],"cancel-text":"取消"},on:{cancel:function(e){t.statusList.courseTypeStatus=!1},select:t.onCourseTypeSelect},model:{value:t.statusList.courseTypeStatus,callback:function(e){t.$set(t.statusList,"courseTypeStatus",e)},expression:"statusList.courseTypeStatus"}}),s("van-popup",{attrs:{position:"bottom"},model:{value:t.sheetForm.sheetStatus,callback:function(e){t.$set(t.sheetForm,"sheetStatus",e)},expression:"sheetForm.sheetStatus"}},[s("van-picker",{attrs:{loading:t.sheetForm.loading,"default-index":t.sheetForm.index,columns:t.sheetForm.columns,"show-toolbar":""},on:{cancel:function(e){t.sheetForm.sheetStatus=!1},confirm:t.onSheetConfirm}})],1),s("van-popup",{attrs:{position:"bottom"},model:{value:t.dataForm.status,callback:function(e){t.$set(t.dataForm,"status",e)},expression:"dataForm.status"}},[s("van-datetime-picker",{attrs:{type:"date","min-date":t.dataForm.minDate,"max-date":t.dataForm.maxDate,formatter:t.formatter},on:{cancel:function(e){t.dataForm.status=!1},confirm:t.onCurrentConfirm},model:{value:t.dataForm.currentDate,callback:function(e){t.$set(t.dataForm,"currentDate",e)},expression:"dataForm.currentDate"}})],1),s("van-popup",{attrs:{position:"bottom"},model:{value:t.courseForm.teachingStatus,callback:function(e){t.$set(t.courseForm,"teachingStatus",e)},expression:"courseForm.teachingStatus"}},[s("van-picker",{attrs:{columns:t.courseForm.columns,"show-toolbar":""},on:{cancel:function(e){t.courseForm.teachingStatus=!1},confirm:t.onTeachinConfirm}})],1),s("van-popup",{staticClass:"studentChiose",style:{height:"180%"},attrs:{"lock-scroll":!0,position:"bottom"},model:{value:t.statusList.studentStatus,callback:function(e){t.$set(t.statusList,"studentStatus",e)},expression:"statusList.studentStatus"}},[s("van-sticky",[s("van-search",{attrs:{"show-action":"",shape:"round",placeholder:"请输入学生名或手机号"},on:{search:t.onSearch},scopedSlots:t._u([{key:"action",fn:function(){return[s("div",{on:{click:t.onSearch}},[t._v("搜索")])]},proxy:!0}]),model:{value:t.params.search,callback:function(e){t.$set(t.params,"search",e)},expression:"params.search"}})],1),s("div",{staticClass:"paddingB80"},[t.dataShow?s("van-list",{key:"data",staticClass:"studentContainer",attrs:{finished:t.finished,"finished-text":""},on:{load:t.getStudent},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},[s("van-checkbox-group",{model:{value:t.checkboxSelect,callback:function(e){t.checkboxSelect=e},expression:"checkboxSelect"}},[s("van-cell-group",t._l(t.dataList,(function(e,i){return s("van-cell",{key:i,staticClass:"input-cell",attrs:{center:!0},on:{click:function(a){return t.onCheckboxSelect(e)}}},[s("template",{slot:"icon"},[e.avatar?s("img",{staticClass:"logo",attrs:{src:e.avatar,alt:""}}):s("img",{staticClass:"logo",attrs:{src:a("a7ed"),alt:""}})]),s("template",{slot:"title"},[t._v("\n "+t._s(e.userName)+"\n ")]),s("template",{slot:"label"},[s("span",[t._v(t._s(t.desensitPhone(e.phone)))])]),s("template",{slot:"default"},[s("van-checkbox",{attrs:{name:e.userId.toString()}})],1)],2)})),1)],1)],1):s("m-empty",{key:"data",staticClass:"empty",attrs:{msg:"暂无学生"}})],1),s("div",{staticClass:"button-group-popup"},[s("span",{staticClass:"btn",on:{click:t.onPopupCancel}},[t._v("取消")]),s("span",{staticClass:"btn primary",on:{click:t.onPopupSubmit}},[t._v("确定")])])],1),s("van-popup",{attrs:{position:"bottom"},model:{value:t.statusList.classTime,callback:function(e){t.$set(t.statusList,"classTime",e)},expression:"statusList.classTime"}},[s("van-row",[s("van-col",{attrs:{span:"12"}},[t._v("上课类型")]),s("van-col",{attrs:{span:"12"}},[t._v("上课时间")])],1),s("div",{staticClass:"tableContainer"},t._l(t.timeTable,(function(e,a){return s("van-row",{key:a},[s("van-col",{attrs:{span:"12"}},[t._v("\n "+t._s("ONLINE"==e.teachMode?"线上":"线下")+"\n ")]),s("van-col",{attrs:{span:"12"}},[t._v(" "+t._s(e.classDate)+" "+t._s(e.startClassTimeStr)+" ")])],1)})),1)],1)],1)},r=[],o=a("6e6e"),l=a("ff51"),c=a("d678"),u=a("9afb"),h=a("3908"),m=a("5a0c"),f=a.n(m);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function d(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */d=function(){return t};var t={},e=Object.prototype,a=e.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},i=s.iterator||"@@iterator",n=s.asyncIterator||"@@asyncIterator",r=s.toStringTag||"@@toStringTag";function o(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(w){o=function(t,e,a){return t[e]=a}}function l(t,e,a,s){var i=e&&e.prototype instanceof h?e:h,n=Object.create(i.prototype),r=new N(s||[]);return n._invoke=function(t,e,a){var s="suspendedStart";return function(i,n){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===i)throw n;return D()}for(a.method=i,a.arg=n;;){var r=a.delegate;if(r){var o=x(r,a);if(o){if(o===u)continue;return o}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";var l=c(t,e,a);if("normal"===l.type){if(s=a.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:a.done}}"throw"===l.type&&(s="completed",a.method="throw",a.arg=l.arg)}}}(t,a,r),n}function c(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(w){return{type:"throw",arg:w}}}t.wrap=l;var u={};function h(){}function m(){}function f(){}var v={};o(v,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(L([])));y&&y!==e&&a.call(y,i)&&(v=y);var b=f.prototype=h.prototype=Object.create(v);function S(t){["next","throw","return"].forEach((function(e){o(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function s(i,n,r,o){var l=c(t[i],t,n);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==p(h)&&a.call(h,"__await")?e.resolve(h.__await).then((function(t){s("next",t,r,o)}),(function(t){s("throw",t,r,o)})):e.resolve(h).then((function(t){u.value=t,r(u)}),(function(t){return s("throw",t,r,o)}))}o(l.arg)}var i;this._invoke=function(t,a){function n(){return new e((function(e,i){s(t,a,e,i)}))}return i=i?i.then(n,n):n()}}function x(t,e){var a=t.iterator[e.method];if(void 0===a){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var s=c(a,t.iterator,e.arg);if("throw"===s.type)return e.method="throw",e.arg=s.arg,e.delegate=null,u;var i=s.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var s=-1,n=function e(){for(;++s<t.length;)if(a.call(t,s))return e.value=t[s],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:D}}function D(){return{value:void 0,done:!0}}return m.prototype=f,o(b,"constructor",f),o(f,"constructor",m),m.displayName=o(f,r,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,o(t,r,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},S(C.prototype),o(C.prototype,n,(function(){return this})),t.AsyncIterator=C,t.async=function(e,a,s,i,n){void 0===n&&(n=Promise);var r=new C(l(e,a,s,i),n);return t.isGeneratorFunction(a)?r:r.next().then((function(t){return t.done?t.value:r.next()}))},S(b),o(b,r,"Generator"),o(b,i,(function(){return this})),o(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var a in t)e.push(a);return e.reverse(),function a(){for(;e.length;){var s=e.pop();if(s in t)return a.value=s,a.done=!1,a}return a.done=!0,a}},t.values=L,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function s(a,s){return r.type="throw",r.arg=t,e.next=a,s&&(e.method="next",e.arg=void 0),!!s}for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i],r=n.completion;if("root"===n.tryLoc)return s("end");if(n.tryLoc<=this.prev){var o=a.call(n,"catchLoc"),l=a.call(n,"finallyLoc");if(o&&l){if(this.prev<n.catchLoc)return s(n.catchLoc,!0);if(this.prev<n.finallyLoc)return s(n.finallyLoc)}else if(o){if(this.prev<n.catchLoc)return s(n.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return s(n.finallyLoc)}}}},abrupt:function(t,e){for(var s=this.tryEntries.length-1;s>=0;--s){var i=this.tryEntries[s];if(i.tryLoc<=this.prev&&a.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var n=i;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var r=n?n.completion:{};return r.type=t,r.arg=e,n?(this.method="next",this.next=n.finallyLoc,u):this.complete(r)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),k(a),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.tryLoc===t){var s=a.completion;if("throw"===s.type){var i=s.arg;k(a)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,a){return this.delegate={iterator:L(t),resultName:e,nextLoc:a},"next"===this.method&&(this.arg=void 0),u}},t}function v(t,e,a,s,i,n,r){try{var o=t[n](r),l=o.value}catch(c){return void a(c)}o.done?e(l):Promise.resolve(l).then(s,i)}function g(t){return function(){var e=this,a=arguments;return new Promise((function(s,i){var n=t.apply(e,a);function r(t){v(n,s,i,r,o,"next",t)}function o(t){v(n,s,i,r,o,"throw",t)}r(void 0)}))}}for(var y=[],b=0;b<60;b++){var S=b<10?"0"+b:b;y.push(S+"分")}var C={name:"vipapply",components:{MHeader:o["a"],MEmpty:c["a"]},watch:{"statusList.hasOffline":function(){},"form.singleClassMinutes":function(){this.scheduleList=[]}},data:function(){return{dataForm:{status:!1,minDate:new Date,maxDate:new Date(2025,10,1),currentDate:new Date},enlistForm:{updateStatus:"",status:!1,minDate:new Date,maxDate:new Date(2025,10,1),currentDate:new Date},statusList:{hasOnline:!0,hasOffline:!0,classTime:!1,headerStatus:!1,classTimerStatus:!1,studentStatus:!1,courseTypeStatus:!1},loadData:{subjectList:[],subjectListSelect:[],vipGroupCategory:[],vipGroupCategorySelect:[],vipGroupActivity:[],vipGroupActivitySelect:[],teacherSchool:[],teacherSchoolSelect:[],teacherList:[],teacherListSelect:[],teacherCategory:[],classTimer:[]},sheetForm:{currentType:null,sheetStatus:!1,loading:!0,index:0,columns:[]},courseForm:{teachingStatus:!1,columns:[{values:["线上","线下"],className:"type"},{values:["周一","周二","周三","周四","周五","周六","周日"],className:"week"},{values:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],className:"hours",defaultIndex:7},{values:y,className:"minutes"}]},courseType:"VIP",courseTypeName:"VIP课",form:{name:null,subjectIdList:null,vipGroupCategoryId:null,vipGroupActivityId:null,teacherSchoolId:null,educationalTeacherId:null,studentNum:null,singleClassMinutes:null,onlineClassesNums:null,offlineClassesNums:null,registrationStartTime:null,coursesExpireDate:null,totalClassTime:null,courseStart:null,onlineClassesUnitPrice:null,offlineClassesUnitPrice:null,onlineTeacherSalary:null,offlineTeacherSalary:null,totalCount:null},formName:{subjectListName:null,subjectListIndex:0,vipGroupCategoryName:null,vipGroupCategoryIndex:0,vipGroupActivityName:null,vipGroupActivityIndex:0,teacherSchoolName:null,teacherSchoolIndex:0,educationalTeacherName:null,educationalTeacherIndex:0},other:{onlineSalary:null,offlineSalary:null},scheduleList:[],timeTable:[],onSubmitStatus:!0,checkboxSelect:[],checkboxSelectIds:[],checkboxSelectList:[],checkboxSelectDataList:[],loading:!1,finished:!1,params:{search:null,page:1,rows:20},dataShow:!0,dataList:[],salaryStatus:!0,singleClassMinutesPrice:0,singleClassMinutesSalary:0,studentMaxLimit:0,studentMaxStatus:!0}},mounted:function(){var t=g(d().mark((function t(){var e,a,s,i;return d().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=this.$route.query,e.Authorization&&(localStorage.setItem("Authorization",decodeURI(e.Authorization)),localStorage.setItem("userInfo",decodeURI(e.Authorization))),document.title="VIP课程申请",Object(l["b"])().android&&(this.headerStatus=!0),t.prev=4,Object(h["a"])(!0),t.next=8,Object(u["W"])();case 8:a=t.sent,s=a.data,i=s.data.config?JSON.parse(s.data.config):{},this.studentMaxLimit=i.cloud_room_rule.cloud_room_up_limit-1,Object(h["a"])(!1),t.next=18;break;case 15:t.prev=15,t.t0=t["catch"](4),Object(h["a"])(!1);case 18:case"end":return t.stop()}}),t,this,[[4,15]])})));function e(){return t.apply(this,arguments)}return e}(),methods:{dayjs:f.a,onCheckStudent:function(){this.form.vipGroupCategoryId||!this.courseTypeVip?this.statusList.studentStatus=!0:this.$toast("请选择课程形式")},onGetSheetList:function(t){var e=this.sheetForm;if(e.columns=[],this.form.vipGroupCategoryId||"vipGroupActivity"!=t||!this.courseTypeVip)if(this.checkboxSelectDataList&&!(this.checkboxSelectDataList&&this.checkboxSelectDataList.length<=0)||"vipGroupActivity"!=t){e.sheetStatus=!0,e.loading=!0,e.currentType=t,e.index=0;var a=this.loadData[t];a.length>0?(e.columns=a,e.index=this.formName[t+"Index"],e.loading=!1):this.onLoadingData(t)}else this.$toast("请选择上课学生");else this.$toast("请选择课程形式")},onLoadingData:function(){var t=this,e=this.sheetForm;if("subjectList"==e.currentType)Object(u["k"])().then((function(a){var s=a.data;if(200==s.code&&s.data.length>0){var i=[];s.data.forEach((function(t){t.value=t.id,t.text=t.name,i.push(t)})),t.loadData.subjectList=i,e.columns=i,e.loading=!1}else t.$toast("暂无科目列表"),e.loading=!1}));else if("vipGroupCategory"==e.currentType)Object(u["bb"])().then((function(a){var s=a.data;if(200==s.code&&s.data.length>0){var i=[];s.data.forEach((function(t){t.value=t.id,t.text=t.name,i.push(t)})),t.loadData.vipGroupCategory=i,e.columns=i,e.loading=!1}else t.$toast("暂无课程形式"),e.loading=!1}));else if("vipGroupActivity"==e.currentType){var a=[];this.checkboxSelectDataList&&this.checkboxSelectDataList.length>0&&this.checkboxSelectDataList.forEach((function(t){a.push(t.userId)}));var s={studentIds:a.join(","),activityChannel:2};this.courseTypeVip?s.categoryId=this.form.vipGroupCategoryId:this.courseTypePractice&&(s.courseType="PRACTICE"),Object(u["i"])(s).then((function(a){var s=a.data;if(200==s.code&&s.data.length>0){var i=[];s.data.forEach((function(t){t.value=t.id,t.text=t.name,t.startTime=t.startTime?t.startTime.split(" ")[0]:null,t.endTime=t.endTime?t.endTime.split(" ")[0]:null,i.push(t)})),t.loadData.vipGroupActivity=i,e.columns=i,e.loading=!1}else t.$toast("暂无活动方案"),e.loading=!1}))}else"teacherSchool"==e.currentType?Object(u["n"])().then((function(a){var s=a.data;if(200==s.code&&s.data.length>0){var i=[];s.data.forEach((function(t){t.value=t.id,t.text=t.name,i.push(t)})),t.loadData.teacherSchool=i,e.columns=i,e.loading=!1}else t.$toast("暂无教学点"),e.loading=!1})):"teacherList"==e.currentType&&Object(u["j"])().then((function(a){var s=a.data,i=s.data.EDUCATION||[];if(200==s.code&&i.length>0){var n=[];i.forEach((function(t){t.value=t.userId,t.text=t.userName,n.push(t)})),t.loadData.teacherList=n,e.columns=n,e.loading=!1}else t.$toast("暂无乐团主管"),e.loading=!1}))},findTeacherCategory:function(t){var e=this;Object(u["h"])({categoryId:t}).then((function(t){var a=t.data;200==a.code&&(e.loadData.teacherCategory=a.data)}))},onSheetConfirm:function(t,e){var a=this,s=this.sheetForm,i=this.form,n=this.formName,r=this.loadData;if(console.log(s.currentType),"subjectList"==s.currentType)i.subjectIdList=t.value,n.subjectListName=t.text,n.subjectListIndex=e,r.subjectListSelect=t;else if("vipGroupCategory"==s.currentType){r.vipGroupCategorySelect.id!=t.id&&this.findTeacherCategory(t.id),i.vipGroupCategoryId=t.value,n.vipGroupCategoryName=t.text,n.vipGroupCategoryIndex=e,r.vipGroupCategorySelect=t,i.studentNum=t.studentNum,i.onlineClassesUnitPrice=t.onlineClassesUnitPrice,i.offlineClassesUnitPrice=t.offlineClassesUnitPrice,i.singleClassMinutes=null,r.classTimer=[];var o=t.singleClassMinutes.split(",");o.forEach((function(t){a.loadData.classTimer.push({name:t,value:t})})),t.studentNum>this.studentMaxLimit?this.studentMaxStatus=!1:this.studentMaxStatus=!0,this.checkboxSelect=[],this.checkboxSelectIds=[],this.checkboxSelectList=[],this.checkboxSelectDataList=[],i.vipGroupActivityId=null,n.vipGroupActivityName=null,n.vipGroupActivityIndex=0,r.vipGroupActivity=[],r.vipGroupActivitySelect=[]}else"vipGroupActivity"==s.currentType?(i.vipGroupActivityId!=t.value&&(i.offlineClassesNums=null,i.onlineClassesNums=null),i.vipGroupActivityId=t.value,n.vipGroupActivityName=t.text,n.vipGroupActivityIndex=e,r.vipGroupActivitySelect=t,i.onlineClassesUnitPrice=parseFloat(r.vipGroupCategorySelect.onlineClassesUnitPrice||0),i.offlineClassesUnitPrice=parseFloat(r.vipGroupCategorySelect.offlineClassesUnitPrice||0),i.singleClassMinutes=t.singleCourseTime,this.courseTypeVip&&this.onCalcClassTimes(t),this.getCalcClass(),this.setTimeTable()):"teacherSchool"==s.currentType?(i.teacherSchoolId=t.value,n.teacherSchoolName=t.text,n.teacherSchoolIndex=e):"teacherList"==s.currentType&&(i.educationalTeacherId=t.value,n.educationalTeacherName=t.text,n.educationalTeacherIndex=e);s.sheetStatus=!1},onClassKeyUp:function(t){"offLine"==t&&this.form.offlineClassesNums<=0&&(this.form.teacherSchoolId=null,this.formName.teacherSchoolName=null,this.formName.teacherSchoolIndex=0);var e=this.loadData.vipGroupActivitySelect;this.onCalcClassTimes(e),this.getCalcClass(),this.setTimeTable()},onCalcClassTimes:function(t){var e=this.form,a=this.statusList,s=Number(e.onlineClassesNums)+Number(e.offlineClassesNums);switch(e.totalClassTime=s,t.teachMode){case-1:a.hasOffline=!0,a.hasOnline=!0;break;case 0:a.hasOnline=!0,a.hasOffline=!1;break;case 1:a.hasOnline=!1,a.hasOffline=!0;break;default:break}},onCourseTypeSelect:function(){var t=g(d().mark((function t(e){var a,s,i,n=this;return d().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(this.statusList.courseTypeStatus=!1,e.value!=this.courseType){t.next=3;break}return t.abrupt("return");case 3:if(this.courseType=e.value,this.courseTypeName=e.name,a=this.form,s=this.formName,i=this.loadData,a.vipGroupCategoryId=null,s.vipGroupCategoryName=null,s.vipGroupCategoryIndex=0,this.checkboxSelect=[],this.checkboxSelectIds=[],this.checkboxSelectList=[],this.checkboxSelectDataList=[],a.vipGroupActivityId=null,s.vipGroupActivityName=null,s.vipGroupActivityIndex=0,i.vipGroupActivity=[],i.vipGroupActivitySelect=[],a.singleClassMinutes=null,a.totalClassTime=null,a.offlineClassesNums=null,a.onlineClassesNums=null,this.scheduleList=[],"VIP"!=e.value){t.next=33;break}this.courseForm.columns[0].values=["线上","线下"],a.studentNum=null,a.onlineClassesUnitPrice=0,a.onlineTeacherSalary=0,this.statusList.hasOnline=!0,this.statusList.hasOffline=!0,this.getCalcClass(),t.next=49;break;case 33:if("PRACTICE"!=e.value){t.next=49;break}if(this.courseForm.columns[0].values=["线上"],this.form.teacherSchoolId=null,this.formName.teacherSchoolName=null,this.formName.teacherSchoolIndex=0,a.studentNum=1,i.classTimer=[{name:25,value:25}],this.statusList.hasOnline=!1,this.statusList.hasOffline=!1,this.getCalcClass(),this.singleClassMinutesPrice){t.next=46;break}return t.next=46,Object(u["G"])().then((function(t){var e=t.data;200==e.code&&(n.singleClassMinutesPrice=e.data.singleClassMinutesPrice||0)}));case 46:if(this.singleClassMinutesSalary){t.next=49;break}return t.next=49,Object(u["u"])().then((function(t){var e=t.data;200==e.code&&(n.singleClassMinutesSalary=e.data.onlineTeacherSalary||0)}));case 49:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),onClickSingleClass:function(){this.formName.vipGroupCategoryName||!this.courseTypeVip?this.form.vipGroupActivityId||(this.statusList.classTimerStatus=!0):this.$toast("请选择课程形式")},onClassTimerSelect:function(t){this.form.singleClassMinutes=t.value,this.statusList.classTimerStatus=!1,this.getCalcClass()},onCurrentConfirm:function(t){var e=new Date(t),a=e.getMonth()+1>=10?e.getMonth()+1:"0"+(e.getMonth()+1),s=e.getDate()>=10?e.getDate():"0"+e.getDate();this.form.courseStart=e.getFullYear()+"-"+a+"-"+s,this.dataForm.status=!1},onEnlistConfirm:function(t){var e=new Date(t),a=e.getMonth()+1>=10?e.getMonth()+1:"0"+(e.getMonth()+1),s=e.getDate()>=10?e.getDate():"0"+e.getDate(),i=this.enlistForm,n=this.form;if("start"==i.updateStatus){if(n.registrationStartTime=e.getFullYear()+"-"+a+"-"+s,n.coursesExpireDate){var r=new Date(n.registrationStartTime.replace(/-/gi,"/")).getTime(),o=new Date(n.coursesExpireDate.replace(/-/gi,"/")).getTime();r>o&&(n.coursesExpireDate=null)}}else"end"==i.updateStatus&&(n.coursesExpireDate=e.getFullYear()+"-"+a+"-"+s);i.status=!1},onEnListShow:function(t,e){var a=this.enlistForm;"end"==t?this.form.registrationStartTime?a.minDate=new Date(this.form.registrationStartTime.replace(/-/gi,"/")):a.minDate=new Date:"start"==t&&(a.minDate=new Date),a.currentDate=e?new Date(e.replace(/-/gi,"/")):new Date,a.updateStatus=t,a.status=!0},onCourseShedule:function(){this.form.singleClassMinutes?this.form.courseStart?this.courseForm.teachingStatus=!0:this.$toast("请选择排课开始时间"):this.$toast("请选每课时长")},onScheduleRemove:function(t){var e=this;this.$dialog.confirm({title:"提示",message:"是否删除该课时安排?",confirmButtonText:"确定",confirmButtonColor:"#269a93",cancelButtonText:"取消"}).then((function(){var a=e.scheduleList.indexOf(t);-1!==a&&e.scheduleList.splice(a,1)}))},onTeachinConfirm:function(t){var e=this,a=this.scheduleList,s=(t[2]>=10?t[2]:"0"+t[2])+":"+t[3].split("分")[0],i=this.MinutesTest(t[2],t[3],this.form.singleClassMinutes),n=!0;a.forEach((function(a){var r=e.timeIsrange(s,i,a.startTime),o=e.timeIsrange(s,i,a.endTime);n&&(t[1]==a.weekStr?n=!r&&!o:t[1]!=a.weekStr&&(n=!0))}));var r=i?Number(i.split(":")[0]):0,o=i?Number(i.split(":")[1]):0;if(r>=21&&o>0)this.$toast("课程安排结束时间不可超过21:00");else{var l=s?Number(s.split(":")[0]):0;s&&Number(s.split(":")[1]);l<6?this.$toast("课程安排开始时间不可早于06:00"):n?(a.push({type:t[0],weekStr:t[1],weekIndex:this.getWeek(t[1]),startTime:s,endTime:i,id:Date.now()}),this.courseForm.teachingStatus=!1,this.setTimeTable()):this.$toast("该时间段已排课请重选时间")}},onShowTimeTable:function(){this.checkCourseList()&&(this.statusList.classTime=!0,this.setTimeTable())},setTimeTable:function(){if(this.checkCourseList(!1)){this.timeTable=[];var t=this.form,e=this.scheduleList,a=parseInt(t.onlineClassesNums||0),s=parseInt(t.offlineClassesNums||0);if(this.courseTypePractice&&(a=parseInt(t.totalClassTime||0)),!(e.length<=0)){var i=Number(a)+Number(s),n=t.courseStart.replace(/-/gi,"/"),r=new Date(n),o=0;while(i&&i>0){for(var l=0;l<e.length;l++){if(0==a&&0==s)break;var c=e[l].weekIndex-r.getDay();o>0&&0==c&&0==l&&(c+=7),c<0&&(c+=7);var u=this.getThinkDate(r,c),h=(new Date).getTime(),m=new Date(u.replace(/-/gi,"/")+" "+e[l].startTime+":00").getTime();if(h<m){var p={classDate:u,startClassTimeStr:e[l].startTime,endClassTimeStr:e[l].endTime};"线上"==e[l].type&&a>0?(p.teachMode="ONLINE",this.timeTable.push(p),a--,i--):"线下"==e[l].type&&s>0&&(p.teachMode="OFFLINE",this.timeTable.push(p),s--,i--)}}1==e.length?r.setDate(r.getDate()+7):e.every((function(t){return t.weekStr===e[0].weekStr}))&&o++}this.timeTable.sort((function(t,e){var a=f()(f()(t.classDate).format("YYYY-MM-DD")+" "+t.startClassTimeStr+":00").valueOf(),s=f()(f()(e.classDate).format("YYYY-MM-DD")+" "+e.startClassTimeStr+":00").valueOf();return a-s}))}}},getCalcClass:function(){var t=this.loadData,e=this.form,a=t.vipGroupActivitySelect,s=t.teacherCategory,i=e.onlineClassesNums?e.onlineClassesNums:0,n=e.offlineClassesNums?e.offlineClassesNums:0;this.courseTypePractice&&(i=parseInt(e.totalClassTime||0));var r=("number"!==typeof a.discount?100:a.discount)/100;if(this.courseTypePractice&&(e.onlineTeacherSalary=this.singleClassMinutesSalary,e.onlineClassesUnitPrice=this.singleClassMinutesPrice),console.log("重新计算课酬",this.courseTypeVip),a.salarySettlementJson){var o=JSON.parse(a.salarySettlementJson);if(this.courseTypeVip)if(o&&o.offlineSalarySettlement){var l=o.offlineSalarySettlement;"TEACHER_DEFAULT"==l.salarySettlementType?(e.onlineTeacherSalary=Number(s.offlineClassesSalary),e.offlineTeacherSalary=Number(s.offlineClassesSalary)):"FIXED_SALARY"==l.salarySettlementType&&(e.onlineTeacherSalary=Number(l.settlementValue),e.offlineTeacherSalary=Number(l.settlementValue))}else e.onlineTeacherSalary=Number(s.offlineClassesSalary),e.offlineTeacherSalary=Number(s.offlineClassesSalary);else if(this.courseTypePractice)if(o&&o.practiceSalarySettlement){var c=o.practiceSalarySettlement;"TEACHER_DEFAULT"==c.salarySettlementType?e.onlineTeacherSalary=Number(this.singleClassMinutesSalary):"FIXED_SALARY"==c.salarySettlementType&&(e.onlineTeacherSalary=Number(c.settlementValue))}else e.onlineTeacherSalary=Number(this.singleClassMinutesSalary)}else this.courseTypeVip&&(e.onlineTeacherSalary=Number(s.offlineClassesSalary),e.offlineTeacherSalary=Number(s.offlineClassesSalary));var u=0;u=this.courseTypeVip?this.loadData.vipGroupActivitySelect.fixedCourseNumFlag?this.loadData.vipGroupActivitySelect.marketPrice:Math.ceil(parseFloat((i*e.onlineClassesUnitPrice+n*e.offlineClassesUnitPrice)*r*1e4)/1e4):this.loadData.vipGroupActivitySelect.fixedCourseNumFlag?this.loadData.vipGroupActivitySelect.marketPrice:Math.ceil(parseFloat(i*e.onlineClassesUnitPrice*r*1e4)/1e4),e.totalCount=Number(u)},getThinkDate:function(t,e){var a=t;a.setDate(t.getDate()+e);var s=a.getFullYear(),i=a.getMonth()+1,n="";n=i<10?"0"+i:i+"";var r=a.getDate(),o="";return o=r<10?"0"+r:r+"",s+"-"+n+"-"+o},MinutesTest:function(t,e,a){var s=e.split("分")[0],i=new Date(1900,1,1,t,s);i.setMinutes(i.getMinutes()+parseInt(a));var n=i.getHours(),r=i.getMinutes();return n<10&&(n="0"+n),r<10&&(r="0"+r),n+":"+r},timeIsrange:function(t,e,a){var s=t.split(":");if(2!=s.length)return!1;var i=e.split(":");if(2!=i.length)return!1;var n=a.split(":");if(2!=i.length)return!1;var r=new Date,o=new Date,l=new Date;return r.setHours(s[0]),r.setMinutes(s[1]),o.setHours(i[0]),o.setMinutes(i[1]),l.setHours(n[0]),l.setMinutes(n[1]),l.getTime()-r.getTime()>=0&&l.getTime()-o.getTime()<=0},getWeek:function(t){var e={"周一":1,"周二":2,"周三":3,"周四":4,"周五":5,"周六":6,"周日":0};return e[t]},formatter:function(t,e){return"year"===t?"".concat(e,"年"):"month"===t?"".concat(e,"月"):"day"===t?"".concat(e,"日"):e},onSubmit:function(){var t=g(d().mark((function t(e){var a,s,i,n,r,o,l,c=this;return d().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a=this.form,s=this.statusList,a.subjectIdList){t.next=5;break}return this.$toast("请选择科目"),t.abrupt("return",!1);case 5:if(a.vipGroupCategoryId||!this.courseTypeVip){t.next=8;break}return this.$toast("请选择课程形式"),t.abrupt("return",!1);case 8:if(a.educationalTeacherId){t.next=11;break}return this.$toast("请选择乐团主管"),t.abrupt("return");case 11:if(!(this.checkboxSelectIds.length<=0)){t.next=14;break}return this.$toast("请选择上课学生"),t.abrupt("return");case 14:if(a.singleClassMinutes){t.next=17;break}return this.$toast("请选择每课时长"),t.abrupt("return",!1);case 17:if(i=!a.onlineClassesNums&&a.onlineClassesNums<=0,n=!a.offlineClassesNums&&a.offlineClassesNums<=0,!s.hasOnline||!this.studentMaxStatus){t.next=23;break}if(!i){t.next=23;break}return this.$toast("请输入线上课次数"),t.abrupt("return",!1);case 23:if(!s.hasOffline||s.hasOnline){t.next=30;break}if(!n){t.next=27;break}return this.$toast("请输入线下课次数"),t.abrupt("return",!1);case 27:if(!(a.offlineClassesNums>0)||a.teacherSchoolId){t.next=30;break}return this.$toast("请选择线下课地址"),t.abrupt("return",!1);case 30:if(!(s.hasOffline&&s.hasOnline&&this.studentMaxStatus&&parseFloat(a.onlineClassesNums||0)+parseFloat(a.offlineClassesNums||0)!=this.form.totalClassTime)){t.next=33;break}return this.$toast("线上课次数+线下课次数不等于总课次数"),t.abrupt("return");case 33:if(!(a.totalClassTime<=0)){t.next=36;break}return this.$toast("请输入线上/线下课次数"),t.abrupt("return",!1);case 36:if(a.registrationStartTime){t.next=39;break}return this.$toast("请选择报名开始时间"),t.abrupt("return",!1);case 39:if(a.coursesExpireDate){t.next=42;break}return this.$toast("请选择报名结束时间"),t.abrupt("return",!1);case 42:if(!(this.scheduleList.length<=0)){t.next=45;break}return this.$toast("课时安排不能为空"),t.abrupt("return",!1);case 45:if(r=this.loadData.vipGroupActivitySelect,!(r.minCourseNum>0&&r.maxCourseNum>0)){t.next=51;break}if(o=Number(a.totalClassTime)||parseInt(a.onlineClassesNums||0)+parseInt(a.offlineClassesNums||0),!(r.minCourseNum>o||o>r.maxCourseNum)){t.next=51;break}return this.$toast("课时总数为".concat(r.minCourseNum,"~").concat(r.maxCourseNum,"节")),t.abrupt("return");case 51:if(this.checkCourseList()){t.next=53;break}return t.abrupt("return");case 53:if(this.setTimeTable(),!(s.hasOnline&&this.studentMaxStatus&&s.hasOffline)){t.next=58;break}if(!(a.onlineClassesNums>0&&a.onlineTeacherSalary<=0&&a.offlineClassesNums>0&&a.offlineTeacherSalary<=0&&this.salaryStatus)){t.next=58;break}return this.$dialog.confirm({message:"当前课程课酬预计为0,是否继续?"}).then((function(){c.salaryStatus=!1,c.onSubmit()})),t.abrupt("return");case 58:if(!s.hasOnline||!this.studentMaxStatus){t.next=68;break}if(a.onlineClassesUnitPrice){t.next=62;break}return this.$toast("请输入线上课单价"),t.abrupt("return",!1);case 62:if(a.onlineTeacherSalary){t.next=65;break}return this.$toast("请输入线上课课酬"),t.abrupt("return",!1);case 65:if(!(a.onlineClassesNums>0&&a.onlineTeacherSalary<=0&&this.salaryStatus)){t.next=68;break}return this.$dialog.confirm({message:"当前课程线上课酬预计为0,是否继续?"}).then((function(){c.salaryStatus=!1,c.onSubmit()})),t.abrupt("return");case 68:if(!s.hasOffline){t.next=78;break}if(a.offlineClassesUnitPrice){t.next=72;break}return this.$toast("请输入线下课单价"),t.abrupt("return",!1);case 72:if(a.offlineTeacherSalary){t.next=75;break}return this.$toast("请输入线下课课酬"),t.abrupt("return",!1);case 75:if(!(a.offlineClassesNums>0&&a.offlineTeacherSalary<=0&&this.salaryStatus)){t.next=78;break}return this.$dialog.confirm({message:"当前课程线下课酬预计为0,是否继续?"}).then((function(){c.salaryStatus=!1,c.onSubmit()})),t.abrupt("return");case 78:if(a.onlineClassesNum=Number(a.onlineClassesNums),a.offlineClassesNum=Number(a.offlineClassesNums),this.courseTypePractice&&(a.onlineClassesNum=Number(a.totalClassTime)),a.totalClassTimes=Number(a.onlineClassesNums)+Number(a.offlineClassesNums),a.paymentExpireDate=a.coursesExpireDate,a.studentIdList=this.checkboxSelectIds.join(","),a.firstStudentId=this.checkboxSelectDataList.length>0?this.checkboxSelectDataList[0].userId:null,l={courseSchedules:this.timeTable},1==e&&(l.allowOverstepActivityStudentNum=1),this.onSubmitStatus){t.next=89;break}return t.abrupt("return");case 89:if(this.onSubmitStatus=!1,a.groupType=this.courseType,!this.courseTypeVip){t.next=97;break}return l.vipGroupApplyBaseInfo=a,t.next=95,this.getVipApply(l);case 95:t.next=103;break;case 97:return l.practiceGroupApplyBaseInfoDto=a,l.practiceGroupApplyBaseInfoDto.studentId=a.studentIdList,l.practiceGroupApplyBaseInfoDto.allCourseNum=a.totalClassTime,l.practiceGroupApplyBaseInfoDto.subjectId=a.subjectIdList,t.next=103,this.getPracticeApply(l);case 103:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),getVipApply:function(){var t=g(d().mark((function t(e){var a=this;return d().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return Object(h["a"])(!0),t.next=3,Object(u["Z"])(e).then((function(t){var e=t.data;if(Object(h["a"])(!1),200==e.code)a.$toast("申请成功"),setTimeout((function(){a.onSubmitStatus=!0,Object(l["b"])().iPhone?window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api:"back"})):Object(l["b"])().android?DAYA.postMessage(JSON.stringify({api:"back"})):a.$router.push("/business")}),500);else{if(206==e.code)return a.onSubmitStatus=!0,a.salaryStatus=!0,void a.$dialog.confirm({message:e.msg,showConfirmButton:!0,showCancelButton:!0,confirmButtonText:"继续创建",cancelButtonText:"取消"}).then((function(){a.salaryStatus=!1,a.onSubmit(1)}));a.onSubmitStatus=!0,a.salaryStatus=!0,a.$toast(e.msg)}})).catch((function(){a.onSubmitStatus=!0,a.salaryStatus=!0,Object(h["a"])(!1)}));case 3:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),getPracticeApply:function(){var t=g(d().mark((function t(e){var a=this;return d().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return Object(h["a"])(!0),t.next=3,Object(u["D"])(e).then((function(t){var e=t.data;if(Object(h["a"])(!1),200==e.code)a.$toast("申请成功"),setTimeout((function(){a.onSubmitStatus=!0,Object(l["b"])().iPhone?window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api:"back"})):Object(l["b"])().android?DAYA.postMessage(JSON.stringify({api:"back"})):a.$router.push("/business")}),500);else{if(206==e.code)return a.onSubmitStatus=!0,a.salaryStatus=!0,void a.$dialog.confirm({message:e.msg,showConfirmButton:!0,showCancelButton:!0,confirmButtonText:"继续创建",cancelButtonText:"取消"}).then((function(){a.salaryStatus=!1,a.onSubmit(1)}));a.onSubmitStatus=!0,a.salaryStatus=!0,a.$toast(e.msg)}})).catch((function(){a.onSubmitStatus=!0,a.salaryStatus=!0,Object(h["a"])(!1)}));case 3:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),checkCourseList:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.form,a=this.scheduleList||[],s=!1,i=!1;a.forEach((function(t){"线上"==t.type&&(s=!0),"线下"==t.type&&(i=!0)}));var n=this.statusList,r=!e.onlineClassesNums&&e.onlineClassesNums<=0,o=!e.offlineClassesNums&&e.offlineClassesNums<=0;if(n.hasOnline&&this.studentMaxStatus){if(r)return t&&this.$toast("请输入线上课次数"),!1;if(!r&&!s&&e.onlineClassesNums>0)return t&&this.$toast("课时安排缺少线上课类型"),!1}if(n.hasOffline){if(o)return t&&this.$toast("请输入线下课次数"),!1;if(!o&&!i&&e.offlineClassesNums>0)return t&&this.$toast("课时安排缺少线下课类型"),!1}return!0},onSearch:function(){this.params.page=1,this.dataList=[],this.dataShow=!0,this.loading=!0,this.finished=!1,this.getStudent()},getStudent:function(){var t=this,e=this.params;Object(u["K"])(e).then((function(a){var s=a.data;t.loading=!1,200==s.code?(e.page=s.data.pageNo,t.dataList=t.dataList.concat(s.data.rows),e.page>=s.data.totalPage&&(t.finished=!0),t.params.page++):t.finished=!0,t.dataList.length<=0&&(t.dataShow=!1)}))},onPopupCancel:function(){this.statusList.studentStatus=!1,this.checkboxSelect=[],this.checkboxSelectList=[]},onPopupSubmit:function(){var t=this.loadData.vipGroupCategorySelect,e=this.courseTypeVip?t.studentNum:1;console.log(e),this.checkboxSelect.length==e?(this.checkboxSelectDataList=JSON.parse(JSON.stringify(this.checkboxSelectList)),this.checkboxSelectIds=JSON.parse(JSON.stringify(this.checkboxSelect)),this.checkboxSelect=[],this.checkboxSelectList=[],this.loadData.vipGroupActivitySelect={},this.loadData.vipGroupActivity=[],this.formName.vipGroupActivityName=null,this.formName.vipGroupCategoryIndex=0,this.form.vipGroupActivityId=null,this.statusList.studentStatus=!1,"网管课"!=this.courseTypeName&&(this.statusList.hasOffline=!0),this.getCalcClass()):this.$toast("请选择学生".concat(e,"名,当前选择").concat(this.checkboxSelect.length,"名"))},onCheckboxSelect:function(t){var e=this;this.checkboxSelect.includes(t.userId.toString())?(this.checkboxSelect.forEach((function(a,s){a==t.userId.toString()&&e.checkboxSelect.splice(s,1)})),this.checkboxSelectList.forEach((function(a,s){a.userId==t.userId&&e.checkboxSelectList.splice(s,1)}))):(this.checkboxSelect.push(t.userId.toString()),this.checkboxSelectList.push(t))},desensitPhone:function(t){var e=t.substr(0,3),a=t.substr(-4);return e+"****"+a}},computed:{courseTypeVip:function(){return"VIP"==this.courseType},courseTypePractice:function(){return"PRACTICE"==this.courseType}}},x=C,T=(a("2dd9"),a("2877")),k=Object(T["a"])(x,n,r,!1,null,"b4087b0a",null),N=k.exports,L=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"vipapply"},[t.statusList.headerStatus?s("m-header"):t._e(),s("div",{staticClass:"vip-title"},[t._v("课程信息")]),s("van-cell-group",[s("van-field",{attrs:{label:"科目名称",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onGetSheetList("subjectList")}},model:{value:t.formName.subjectListName,callback:function(e){t.$set(t.formName,"subjectListName",e)},expression:"formName.subjectListName"}}),s("van-field",{attrs:{label:"课程形式",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onGetSheetList("vipGroupCategory")}},model:{value:t.formName.vipGroupCategoryName,callback:function(e){t.$set(t.formName,"vipGroupCategoryName",e)},expression:"formName.vipGroupCategoryName"}}),s("van-field",{attrs:{label:"乐团主管",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onGetSheetList("teacherList")}},model:{value:t.formName.educationalTeacherName,callback:function(e){t.$set(t.formName,"educationalTeacherName",e)},expression:"formName.educationalTeacherName"}}),s("van-cell",{staticClass:"courseStudent",attrs:{title:"上课学生",readonly:!0,"input-align":"right","is-link":!(t.checkboxSelectDataList.length>0),size:"large",value:t.checkboxSelectDataList.length>0?"重新选择":"请选择","value-class":t.checkboxSelectDataList.length>0?"studentColor":null},on:{click:t.onCheckStudent}}),t.checkboxSelectDataList.length>0?s("div",{staticStyle:{"text-align":"center","line-height":"1.8",padding:"0.05rem 0",background:"#fafbff"}},t._l(t.checkboxSelectDataList,(function(e,a){return s("p",{key:a,staticStyle:{color:"#323233"}},[t._v("\n "+t._s(e.userName)+" - "+t._s(e.phone)+"\n ")])})),0):t._e(),s("van-field",{attrs:{label:"活动方案",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onGetSheetList("vipGroupActivity")}},model:{value:t.formName.vipGroupActivityName,callback:function(e){t.$set(t.formName,"vipGroupActivityName",e)},expression:"formName.vipGroupActivityName"}})],1),s("div",{staticClass:"vip-title"},[t._v("课时组成")]),s("van-cell-group",[s("van-field",{attrs:{label:"每班人数",disabled:"","input-align":"right",size:"large",placeholder:"每班预计招收人数"},model:{value:t.form.studentNum,callback:function(e){t.$set(t.form,"studentNum",e)},expression:"form.studentNum"}}),s("van-field",{attrs:{label:"每课时长",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请输入每课时长"},on:{click:t.onClickSingleClass},model:{value:t.form.singleClassMinutes,callback:function(e){t.$set(t.form,"singleClassMinutes",e)},expression:"form.singleClassMinutes"}}),t.statusList.hasOnline?s("van-field",{attrs:{label:"线上课","input-align":"right",size:"large",placeholder:"请输入次数",type:"number"},on:{keyup:t.onClassKeyUp},model:{value:t.form.onlineClassesNums,callback:function(e){t.$set(t.form,"onlineClassesNums",e)},expression:"form.onlineClassesNums"}}):t._e(),t.statusList.hasOffline?s("van-field",{attrs:{label:"线下课","input-align":"right",size:"large",placeholder:"请输入次数",type:"number"},on:{keyup:function(e){return t.onClassKeyUp("offLine")}},model:{value:t.form.offlineClassesNums,callback:function(e){t.$set(t.form,"offlineClassesNums",e)},expression:"form.offlineClassesNums"}}):t._e(),t.form.offlineClassesNums>0?s("van-field",{attrs:{label:"线下课地址",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onGetSheetList("teacherSchool")}},model:{value:t.formName.teacherSchoolName,callback:function(e){t.$set(t.formName,"teacherSchoolName",e)},expression:"formName.teacherSchoolName"}}):t._e()],1),s("div",{staticClass:"vip-title"},[t._v("课时安排")]),s("van-cell-group",[s("van-field",{attrs:{label:"课时总数",disabled:"","input-align":"right",size:"large",placeholder:"请输入次数"},model:{value:t.form.totalClassTime,callback:function(e){t.$set(t.form,"totalClassTime",e)},expression:"form.totalClassTime"}}),t.statusList.teachOnOrOff?s("van-field",{attrs:{label:"赠课类型",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:t.onGiveMode},model:{value:t.formName.giveTeachModeName,callback:function(e){t.$set(t.formName,"giveTeachModeName",e)},expression:"formName.giveTeachModeName"}}):t._e(),s("van-field",{attrs:{label:"排课开始时间",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){t.dataForm.status=!0}},model:{value:t.form.courseStart,callback:function(e){t.$set(t.form,"courseStart",e)},expression:"form.courseStart"}}),t._l(t.scheduleList,(function(e,a){return s("van-cell",{key:a,attrs:{"title-class":"title-time"}},[s("template",{slot:"title"},[s("span",{staticClass:"online"},[t._v(t._s(e.type))]),s("span",{staticClass:"week"},[t._v(t._s(e.weekStr))]),s("span",{staticClass:"timer"},[t._v(t._s(e.startTime+"-"+e.endTime))])]),s("template",{slot:"default"},[s("van-button",{attrs:{type:"warning",round:"",size:"small",plain:""},on:{click:function(a){return t.onScheduleRemove(e)}}},[t._v("删除")])],1)],2)})),s("div",{staticClass:"add-plan van-cell",on:{click:t.onCourseShedule}},[s("van-icon",{attrs:{name:"add-o"}}),t._v("课时安排\n ")],1),t.scheduleList.length>0?s("van-field",{attrs:{label:"排课列表",disabled:"","input-align":"right","is-link":"",size:"large"},on:{click:t.onShowTimeTable}}):t._e()],2),s("div",{staticClass:"button-group"},[s("van-button",{attrs:{type:"primary",round:"",size:"large"},on:{click:t.onSubmit}},[t._v("确认")])],1),s("van-action-sheet",{attrs:{actions:t.loadData.classTimer,"cancel-text":"取消"},on:{cancel:function(e){t.statusList.classTimerStatus=!1},select:t.onClassTimerSelect},model:{value:t.statusList.classTimerStatus,callback:function(e){t.$set(t.statusList,"classTimerStatus",e)},expression:"statusList.classTimerStatus"}}),s("van-popup",{attrs:{position:"bottom"},model:{value:t.enlistForm.status,callback:function(e){t.$set(t.enlistForm,"status",e)},expression:"enlistForm.status"}},[s("van-datetime-picker",{attrs:{type:"date","min-date":t.enlistForm.minDate,"max-date":t.enlistForm.maxDate,formatter:t.formatter},on:{cancel:function(e){t.enlistForm.status=!1},confirm:t.onEnlistConfirm},model:{value:t.enlistForm.currentDate,callback:function(e){t.$set(t.enlistForm,"currentDate",e)},expression:"enlistForm.currentDate"}})],1),s("van-action-sheet",{attrs:{actions:t.loadData.giveTeachMode,"cancel-text":"取消"},on:{cancel:function(e){t.statusList.giveTeachModeStatus=!1},select:t.onModeSelect},model:{value:t.statusList.giveTeachModeStatus,callback:function(e){t.$set(t.statusList,"giveTeachModeStatus",e)},expression:"statusList.giveTeachModeStatus"}}),s("van-popup",{attrs:{position:"bottom"},model:{value:t.sheetForm.sheetStatus,callback:function(e){t.$set(t.sheetForm,"sheetStatus",e)},expression:"sheetForm.sheetStatus"}},[s("van-picker",{attrs:{loading:t.sheetForm.loading,"default-index":t.sheetForm.index,columns:t.sheetForm.columns,"show-toolbar":""},on:{cancel:function(e){t.sheetForm.sheetStatus=!1},confirm:t.onSheetConfirm}})],1),s("van-popup",{attrs:{position:"bottom"},model:{value:t.dataForm.status,callback:function(e){t.$set(t.dataForm,"status",e)},expression:"dataForm.status"}},[s("van-datetime-picker",{attrs:{type:"date","min-date":t.dataForm.minDate,"max-date":t.dataForm.maxDate,formatter:t.formatter},on:{cancel:function(e){t.dataForm.status=!1},confirm:t.onCurrentConfirm},model:{value:t.dataForm.currentDate,callback:function(e){t.$set(t.dataForm,"currentDate",e)},expression:"dataForm.currentDate"}})],1),s("van-popup",{attrs:{position:"bottom"},model:{value:t.courseForm.teachingStatus,callback:function(e){t.$set(t.courseForm,"teachingStatus",e)},expression:"courseForm.teachingStatus"}},[s("van-picker",{attrs:{columns:t.courseForm.columns,"show-toolbar":""},on:{cancel:function(e){t.courseForm.teachingStatus=!1},confirm:t.onTeachinConfirm}})],1),s("van-popup",{staticClass:"studentChiose",style:{height:"180%"},attrs:{"lock-scroll":!0,position:"bottom"},model:{value:t.statusList.studentStatus,callback:function(e){t.$set(t.statusList,"studentStatus",e)},expression:"statusList.studentStatus"}},[s("van-sticky",[s("van-search",{attrs:{"show-action":"",shape:"round",placeholder:"请输入学生名或手机号"},on:{search:t.onSearch},scopedSlots:t._u([{key:"action",fn:function(){return[s("div",{on:{click:t.onSearch}},[t._v("搜索")])]},proxy:!0}]),model:{value:t.params.search,callback:function(e){t.$set(t.params,"search",e)},expression:"params.search"}})],1),s("div",{staticClass:"paddingB80"},[t.dataShow?s("van-list",{key:"data",staticClass:"studentContainer",attrs:{finished:t.finished,"finished-text":""},on:{load:t.getStudent},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},[s("van-checkbox-group",{model:{value:t.checkboxSelect,callback:function(e){t.checkboxSelect=e},expression:"checkboxSelect"}},[s("van-cell-group",t._l(t.dataList,(function(e,i){return s("van-cell",{key:i,staticClass:"input-cell",attrs:{center:!0},on:{click:function(a){return t.onCheckboxSelect(e)}}},[s("template",{slot:"icon"},[e.avatar?s("img",{staticClass:"logo",attrs:{src:e.avatar,alt:""}}):s("img",{staticClass:"logo",attrs:{src:a("a7ed"),alt:""}})]),s("template",{slot:"title"},[s("span",{staticStyle:{width:"0.8rem",display:"inline-block"}},[t._v(t._s(e.userName))]),s("van-tag",{attrs:{type:"warning"}},[t._v("1V1: "+t._s(e.courseOneToOneTime)+"次")])],1),s("template",{slot:"label"},[s("span",{staticStyle:{width:"0.8rem",display:"inline-block"}},[t._v(t._s(t.desensitPhone(e.phone)))]),s("van-tag",{attrs:{type:"warning"}},[t._v("1V2: "+t._s(e.courseOneToTwoTime)+"次")])],1),s("template",{slot:"default"},[s("van-checkbox",{attrs:{disabled:!e.courseOneToOneTime&&!e.courseOneToTwoTime,name:e.userId.toString()}})],1)],2)})),1)],1)],1):s("m-empty",{key:"data",staticClass:"empty",attrs:{msg:"暂无学生"}})],1),s("div",{staticClass:"button-group-popup"},[s("span",{staticClass:"btn",on:{click:t.onPopupCancel}},[t._v("取消")]),s("span",{staticClass:"btn primary",on:{click:t.onPopupSubmit}},[t._v("确定")])])],1),s("van-popup",{attrs:{position:"bottom"},model:{value:t.statusList.classTime,callback:function(e){t.$set(t.statusList,"classTime",e)},expression:"statusList.classTime"}},[s("van-row",[s("van-col",{attrs:{span:"12"}},[t._v("上课类型")]),s("van-col",{attrs:{span:"12"}},[t._v("上课时间")])],1),s("div",{staticClass:"tableContainer"},t._l(t.timeTable,(function(e,a){return s("van-row",{key:a},[s("van-col",{attrs:{span:"12"}},[t._v("\n "+t._s("ONLINE"==e.teachMode?"线上":"线下")+"\n ")]),s("van-col",{attrs:{span:"12"}},[t._v("\n "+t._s(e.classDate)+" "+t._s(e.startClassTimeStr)+"\n ")])],1)})),1)],1)],1)},D=[];function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function I(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */I=function(){return t};var t={},e=Object.prototype,a=e.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},i=s.iterator||"@@iterator",n=s.asyncIterator||"@@asyncIterator",r=s.toStringTag||"@@toStringTag";function o(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(L){o=function(t,e,a){return t[e]=a}}function l(t,e,a,s){var i=e&&e.prototype instanceof h?e:h,n=Object.create(i.prototype),r=new T(s||[]);return n._invoke=function(t,e,a){var s="suspendedStart";return function(i,n){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===i)throw n;return N()}for(a.method=i,a.arg=n;;){var r=a.delegate;if(r){var o=S(r,a);if(o){if(o===u)continue;return o}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";var l=c(t,e,a);if("normal"===l.type){if(s=a.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:a.done}}"throw"===l.type&&(s="completed",a.method="throw",a.arg=l.arg)}}}(t,a,r),n}function c(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(L){return{type:"throw",arg:L}}}t.wrap=l;var u={};function h(){}function m(){}function f(){}var p={};o(p,i,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(k([])));v&&v!==e&&a.call(v,i)&&(p=v);var g=f.prototype=h.prototype=Object.create(p);function y(t){["next","throw","return"].forEach((function(e){o(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function s(i,n,r,o){var l=c(t[i],t,n);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==w(h)&&a.call(h,"__await")?e.resolve(h.__await).then((function(t){s("next",t,r,o)}),(function(t){s("throw",t,r,o)})):e.resolve(h).then((function(t){u.value=t,r(u)}),(function(t){return s("throw",t,r,o)}))}o(l.arg)}var i;this._invoke=function(t,a){function n(){return new e((function(e,i){s(t,a,e,i)}))}return i=i?i.then(n,n):n()}}function S(t,e){var a=t.iterator[e.method];if(void 0===a){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var s=c(a,t.iterator,e.arg);if("throw"===s.type)return e.method="throw",e.arg=s.arg,e.delegate=null,u;var i=s.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function k(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var s=-1,n=function e(){for(;++s<t.length;)if(a.call(t,s))return e.value=t[s],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:N}}function N(){return{value:void 0,done:!0}}return m.prototype=f,o(g,"constructor",f),o(f,"constructor",m),m.displayName=o(f,r,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,o(t,r,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},y(b.prototype),o(b.prototype,n,(function(){return this})),t.AsyncIterator=b,t.async=function(e,a,s,i,n){void 0===n&&(n=Promise);var r=new b(l(e,a,s,i),n);return t.isGeneratorFunction(a)?r:r.next().then((function(t){return t.done?t.value:r.next()}))},y(g),o(g,r,"Generator"),o(g,i,(function(){return this})),o(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var a in t)e.push(a);return e.reverse(),function a(){for(;e.length;){var s=e.pop();if(s in t)return a.value=s,a.done=!1,a}return a.done=!0,a}},t.values=k,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function s(a,s){return r.type="throw",r.arg=t,e.next=a,s&&(e.method="next",e.arg=void 0),!!s}for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i],r=n.completion;if("root"===n.tryLoc)return s("end");if(n.tryLoc<=this.prev){var o=a.call(n,"catchLoc"),l=a.call(n,"finallyLoc");if(o&&l){if(this.prev<n.catchLoc)return s(n.catchLoc,!0);if(this.prev<n.finallyLoc)return s(n.finallyLoc)}else if(o){if(this.prev<n.catchLoc)return s(n.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return s(n.finallyLoc)}}}},abrupt:function(t,e){for(var s=this.tryEntries.length-1;s>=0;--s){var i=this.tryEntries[s];if(i.tryLoc<=this.prev&&a.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var n=i;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var r=n?n.completion:{};return r.type=t,r.arg=e,n?(this.method="next",this.next=n.finallyLoc,u):this.complete(r)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),x(a),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.tryLoc===t){var s=a.completion;if("throw"===s.type){var i=s.arg;x(a)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,a){return this.delegate={iterator:k(t),resultName:e,nextLoc:a},"next"===this.method&&(this.arg=void 0),u}},t}function G(t,e,a,s,i,n,r){try{var o=t[n](r),l=o.value}catch(c){return void a(c)}o.done?e(l):Promise.resolve(l).then(s,i)}function O(t){return function(){var e=this,a=arguments;return new Promise((function(s,i){var n=t.apply(e,a);function r(t){G(n,s,i,r,o,"next",t)}function o(t){G(n,s,i,r,o,"throw",t)}r(void 0)}))}}for(var _=[],A=0;A<60;A++){var M=A<10?"0"+A:A;_.push(M+"分")}var $={name:"vipapply",components:{MHeader:o["a"],MEmpty:c["a"]},data:function(){return{dataForm:{status:!1,minDate:new Date,maxDate:new Date(2025,10,1),currentDate:new Date},enlistForm:{updateStatus:"",status:!1,minDate:new Date,maxDate:new Date(2025,10,1),currentDate:new Date},statusList:{giveTeachModeStatus:!1,teachOnOrOff:!1,hasOnline:!1,hasOffline:!1,classTime:!1,headerStatus:!1,classTimerStatus:!1,studentStatus:!1},loadData:{subjectList:[],subjectListSelect:[],vipGroupCategory:[],vipGroupCategorySelect:[],vipGroupActivity:[],vipGroupActivitySelect:[],teacherSchool:[],teacherSchoolSelect:[],teacherList:[],teacherListSelect:[],giveTeachMode:[{name:"线上课",value:"ONLINE"},{name:"线下课",value:"OFFLINE"}],giveTeachModeSelect:[],teacherCategory:[],classTimer:[]},sheetForm:{currentType:null,sheetStatus:!1,loading:!0,index:0,columns:[]},courseForm:{teachingStatus:!1,columns:[{values:["线上","线下"],className:"type"},{values:["周一","周二","周三","周四","周五","周六","周日"],className:"week"},{values:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],className:"hours",defaultIndex:7},{values:_,className:"minutes"}]},form:{name:null,subjectIdList:null,vipGroupCategoryId:null,vipGroupActivityId:null,teacherSchoolId:null,educationalTeacherId:null,studentNum:null,singleClassMinutes:null,onlineClassesNums:null,offlineClassesNums:null,registrationStartTime:null,coursesExpireDate:null,totalClassTime:null,courseStart:null,giveTeachMode:null,onlineClassesUnitPrice:null,offlineClassesUnitPrice:null,onlineTeacherSalary:null,offlineTeacherSalary:null,totalCount:null},formName:{subjectListName:null,subjectListIndex:0,vipGroupCategoryName:null,vipGroupCategoryIndex:0,vipGroupActivityName:null,vipGroupActivityIndex:0,teacherSchoolName:null,teacherSchoolIndex:0,giveTeachModeName:null,educationalTeacherName:null,educationalTeacherIndex:0},other:{onlineSalary:null,offlineSalary:null,giveNum:0},scheduleList:[],timeTable:[],onSubmitStatus:!0,checkboxSelect:[],checkboxSelectIds:[],checkboxSelectList:[],checkboxSelectDataList:[],loading:!1,finished:!1,params:{search:null,page:1,rows:20},dataShow:!0,dataList:[]}},mounted:function(){var t=this.$route.query;t.Authorization&&(localStorage.setItem("Authorization",decodeURI(t.Authorization)),localStorage.setItem("userInfo",decodeURI(t.Authorization))),document.title="双十一排课",Object(l["b"])().android&&(this.headerStatus=!0)},watch:{"form.singleClassMinutes":function(){this.scheduleList=[]}},methods:{onCheckStudent:function(){this.form.vipGroupCategoryId?this.statusList.studentStatus=!0:this.$toast("请选择课程形式")},onGetSheetList:function(t){var e=this.sheetForm;if(e.columns=[],this.form.vipGroupCategoryId||"vipGroupActivity"!=t)if(this.checkboxSelectDataList&&!(this.checkboxSelectDataList&&this.checkboxSelectDataList.length<=0)||"vipGroupActivity"!=t){e.sheetStatus=!0,e.loading=!0,e.currentType=t,e.index=0;var a=this.loadData[t];a.length>0?(e.columns=a,e.index=this.formName[t+"Index"],e.loading=!1):this.onLoadingData(t)}else this.$toast("请选择上课学生");else this.$toast("请选择课程形式")},onLoadingData:function(){var t=this,e=this.sheetForm;if("subjectList"==e.currentType)Object(u["k"])().then((function(a){var s=a.data;if(200==s.code&&s.data.length>0){var i=[];s.data.forEach((function(t){t.value=t.id,t.text=t.name,i.push(t)})),t.loadData.subjectList=i,e.columns=i,e.loading=!1}else t.$toast("暂无科目列表"),e.loading=!1}));else if("vipGroupCategory"==e.currentType)Object(u["bb"])().then((function(a){var s=a.data;if(200==s.code&&s.data.length>0){var i=[];s.data.forEach((function(t){t.studentNum<=2&&(t.value=t.id,t.text=t.name,i.push(t))})),t.loadData.vipGroupCategory=i,e.columns=i,e.loading=!1}else t.$toast("暂无课程形式"),e.loading=!1}));else if("vipGroupActivity"==e.currentType){var a=[];this.checkboxSelectDataList&&this.checkboxSelectDataList.length>0&&this.checkboxSelectDataList.forEach((function(t){a.push(t.userId)})),Object(u["i"])({categoryId:this.form.vipGroupCategoryId,onlySpecialActivity:!0,studentIds:a.join(",")}).then((function(a){var s=a.data;if(200==s.code&&s.data.length>0){var i=[];s.data.forEach((function(t){t.value=t.id,t.text=t.name,t.startTime=t.startTime?t.startTime.split(" ")[0]:null,t.endTime=t.endTime?t.endTime.split(" ")[0]:null,i.push(t)})),t.loadData.vipGroupActivity=i,e.columns=i,e.loading=!1}else t.$toast("暂无活动方案"),e.loading=!1}))}else"teacherSchool"==e.currentType?Object(u["n"])().then((function(a){var s=a.data;if(200==s.code&&s.data.length>0){var i=[];s.data.forEach((function(t){t.value=t.id,t.text=t.name,i.push(t)})),t.loadData.teacherSchool=i,e.columns=i,e.loading=!1}else t.$toast("暂无教学点"),e.loading=!1})):"teacherList"==e.currentType&&Object(u["j"])().then((function(a){var s=a.data,i=s.data.EDUCATION||[];if(200==s.code&&i.length>0){var n=[];i.forEach((function(t){t.value=t.userId,t.text=t.userName,n.push(t)})),t.loadData.teacherList=n,e.columns=n,e.loading=!1}else t.$toast("暂无乐团主管"),e.loading=!1}))},findTeacherCategory:function(t){var e=this;Object(u["h"])({categoryId:t}).then((function(t){var a=t.data;200==a.code&&(e.loadData.teacherCategory=a.data)}))},onSheetConfirm:function(t,e){var a=this,s=this.sheetForm,i=this.form,n=this.formName,r=this.loadData;if("subjectList"==s.currentType)i.subjectIdList=t.value,n.subjectListName=t.text,n.subjectListIndex=e,r.subjectListSelect=t;else if("vipGroupCategory"==s.currentType){r.vipGroupCategorySelect.id!=t.id&&this.findTeacherCategory(t.id),i.vipGroupCategoryId=t.value,n.vipGroupCategoryName=t.text,n.vipGroupCategoryIndex=e,r.vipGroupCategorySelect=t,i.studentNum=t.studentNum,i.onlineClassesUnitPrice=Math.ceil(t.onlineClassesUnitPrice),i.offlineClassesUnitPrice=Math.ceil(t.offlineClassesUnitPrice),i.singleClassMinutes=null,r.classTimer=[];var o=t.singleClassMinutes.split(",");o.forEach((function(t){a.loadData.classTimer.push({name:t,value:t})})),this.checkboxSelect=[],this.checkboxSelectIds=[],this.checkboxSelectList=[],this.checkboxSelectDataList=[],i.vipGroupActivityId=null,n.vipGroupActivityName=null,n.vipGroupActivityIndex=0,r.vipGroupActivity=[],r.vipGroupActivitySelect=[]}else"vipGroupActivity"==s.currentType?(i.vipGroupActivityId!=t.value&&(i.offlineClassesNums=null,i.onlineClassesNums=null),i.vipGroupActivityId=t.value,n.vipGroupActivityName=t.text,n.vipGroupActivityIndex=e,r.vipGroupActivitySelect=t,i.onlineClassesUnitPrice=Math.ceil(r.vipGroupCategorySelect.onlineClassesUnitPrice),i.offlineClassesUnitPrice=Math.ceil(r.vipGroupCategorySelect.offlineClassesUnitPrice),this.onCalcClassTimes(t),this.getCalcClass(),this.setTimeTable()):"teacherSchool"==s.currentType?(i.teacherSchoolId=t.value,n.teacherSchoolName=t.text,n.teacherSchoolIndex=e):"teacherList"==s.currentType&&(i.educationalTeacherId=t.value,n.educationalTeacherName=t.text,n.educationalTeacherIndex=e);s.sheetStatus=!1},onClassKeyUp:function(t){"offLine"==t&&this.form.offlineClassesNums<=0&&(this.form.teacherSchoolId=null,this.formName.teacherSchoolName=null,this.formName.teacherSchoolIndex=0);var e=this.loadData.vipGroupActivitySelect;this.onCalcClassTimes(e),this.getCalcClass(),this.setTimeTable()},onCalcClassTimes:function(t){var e=this.form,a=this.other,s=this.statusList,i=Number(e.onlineClassesNums)+Number(e.offlineClassesNums);if(t.salarySettlementJson){var n=JSON.parse(t.salarySettlementJson);n&&n.onlineSalarySettlement?s.hasOnline=!0:s.hasOnline=!1,n&&n.offlineSalarySettlement?s.hasOffline=!0:s.hasOffline=!1}"GIVE_CLASS"==t.type?(this.statusList.teachOnOrOff=!0,i>=Number(t.attribute1)?(e.totalClassTime=i+"+"+t.attribute2,a.giveNum=t.attribute2):(e.totalClassTime=i,a.giveNum=0)):(e.totalClassTime=i,a.giveNum=0,this.statusList.teachOnOrOff=!1)},onModeSelect:function(t){this.form.giveTeachMode=t.value,this.formName.giveTeachModeName=t.name,this.statusList.giveTeachModeStatus=!1,this.getCalcClass()},onClickSingleClass:function(){this.formName.vipGroupCategoryName?this.statusList.classTimerStatus=!0:this.$toast("请选择课程形式")},onClassTimerSelect:function(t){this.form.singleClassMinutes=t.value,this.statusList.classTimerStatus=!1,this.getCalcClass()},onCurrentConfirm:function(t){var e=new Date(t),a=e.getMonth()+1>=10?e.getMonth()+1:"0"+(e.getMonth()+1),s=e.getDate()>=10?e.getDate():"0"+e.getDate();this.form.courseStart=e.getFullYear()+"-"+a+"-"+s,this.dataForm.status=!1},onEnlistConfirm:function(t){var e=new Date(t),a=e.getMonth()+1>=10?e.getMonth()+1:"0"+(e.getMonth()+1),s=e.getDate()>=10?e.getDate():"0"+e.getDate(),i=this.enlistForm,n=this.form;if("start"==i.updateStatus){if(n.registrationStartTime=e.getFullYear()+"-"+a+"-"+s,n.coursesExpireDate){var r=new Date(n.registrationStartTime.replace(/-/gi,"/")).getTime(),o=new Date(n.coursesExpireDate.replace(/-/gi,"/")).getTime();r>o&&(n.coursesExpireDate=null)}}else"end"==i.updateStatus&&(n.coursesExpireDate=e.getFullYear()+"-"+a+"-"+s);i.status=!1},onEnListShow:function(t,e){var a=this.enlistForm;"end"==t?this.form.registrationStartTime?a.minDate=new Date(this.form.registrationStartTime.replace(/-/gi,"/")):a.minDate=new Date:"start"==t&&(a.minDate=new Date),a.currentDate=e?new Date(e.replace(/-/gi,"/")):new Date,a.updateStatus=t,a.status=!0},onCourseShedule:function(){this.form.singleClassMinutes?this.other.giveNum>0&&!this.form.giveTeachMode?this.$toast("请选择赠课类型"):this.form.courseStart?this.courseForm.teachingStatus=!0:this.$toast("请选择排课开始时间"):this.$toast("请选每课时长")},onScheduleRemove:function(t){var e=this.scheduleList.indexOf(t);-1!==e&&this.scheduleList.splice(e,1)},onTeachinConfirm:function(t){var e=this,a=this.scheduleList,s=(t[2]>=10?t[2]:"0"+t[2])+":"+t[3].split("分")[0],i=this.MinutesTest(t[2],t[3],this.form.singleClassMinutes),n=!0;a.forEach((function(a){var r=e.timeIsrange(s,i,a.startTime),o=e.timeIsrange(s,i,a.endTime);n&&(t[1]==a.weekStr?n=!r&&!o:t[1]!=a.weekStr&&(n=!0))}));var r=i?Number(i.split(":")[0]):0,o=i?Number(i.split(":")[1]):0;if(r>=21&&o>0)this.$toast("课程安排结束时间不可超过21:00");else{var l=s?Number(s.split(":")[0]):0;s&&Number(s.split(":")[1]);l<6?this.$toast("课程安排开始时间不可早于06:00"):n?(a.push({type:t[0],weekStr:t[1],weekIndex:this.getWeek(t[1]),startTime:s,endTime:i,id:Date.now()}),this.courseForm.teachingStatus=!1,this.setTimeTable()):this.$toast("该时间段已排课请重选时间")}},onShowTimeTable:function(){this.statusList.classTime=!0,this.setTimeTable()},setTimeTable:function(){this.timeTable=[];var t=this.form,e=this.scheduleList,a=parseInt(t.onlineClassesNums?t.onlineClassesNums:0),s=parseInt(t.offlineClassesNums?t.offlineClassesNums:0),i=parseInt(this.other.giveNum),n=t.giveTeachMode;if("ONLINE"==n?a+=i:"OFFLINE"==n&&(s+=i),!(e.length<=0)){var r=Number(a)+Number(s),o=t.courseStart.replace(/-/gi,"/"),l=new Date(o),c=0;while(r&&r>0){for(var u=0;u<e.length;u++){if(0==a&&0==s)break;var h=e[u].weekIndex-l.getDay();c>0&&0==h&&0==u&&(h+=7),h<0&&(h+=7);var m=this.getThinkDate(l,h),f=(new Date).getTime(),p=new Date(m.replace(/-/gi,"/")+" "+e[u].startTime+":00").getTime();if(f<p){var d={classDate:m,startClassTimeStr:e[u].startTime,endClassTimeStr:e[u].endTime};"线上"==e[u].type&&a>0?(d.teachMode="ONLINE",this.timeTable.push(d),a--):"线下"==e[u].type&&s>0?(d.teachMode="OFFLINE",this.timeTable.push(d),s--):a>0?(d.teachMode="ONLINE",this.timeTable.push(d),a--):s>0&&(d.teachMode="OFFLINE",this.timeTable.push(d),s--),r--}}1==e.length?l.setDate(l.getDate()+7):e.every((function(t){return t.weekStr===e[0].weekStr}))&&c++}}},onGiveMode:function(){this.statusList.giveTeachModeStatus=!0,this.getCalcClass()},getCalcClass:function(){var t=this.loadData,e=this.form,a=t.vipGroupActivitySelect,s=(t.vipGroupCategorySelect,t.teacherCategory),i=e.onlineClassesNums?e.onlineClassesNums:0,n=e.offlineClassesNums?e.offlineClassesNums:0,r=parseInt(this.other.giveNum),o=e.giveTeachMode;if(a.salarySettlementJson){var l=JSON.parse(a.salarySettlementJson),c=0;if(Number(i)+Number(n)>0){var u=i*e.onlineClassesUnitPrice+n*e.offlineClassesUnitPrice;r>0&&!o&&(u=0),c=u*e.studentNum/(Number(i)+Number(n)+Number(r)),"DISCOUNT"==a.type&&(c=c*(a.attribute1?Number(a.attribute1):100)/100)}if(l&&l.onlineSalarySettlement){var h=l.onlineSalarySettlement;"TEACHER_DEFAULT"==h.salarySettlementType?e.onlineTeacherSalary=Math.round(s.offlineClassesSalary):"RATIO_DISCOUNT"==h.salarySettlementType?e.onlineTeacherSalary=Math.round(c?c*(h.settlementValue?h.settlementValue:100)/100:0):"FIXED_SALARY"==h.salarySettlementType&&(e.onlineTeacherSalary=Math.round(h.settlementValue)),e.onlineTeacherSalary=Number(e.onlineTeacherSalary)}if(l&&l.offlineSalarySettlement){var m=l.offlineSalarySettlement;"TEACHER_DEFAULT"==m.salarySettlementType?e.offlineTeacherSalary=Math.round(s.offlineClassesSalary):"RATIO_DISCOUNT"==m.salarySettlementType?e.offlineTeacherSalary=Math.round(c?c*(m.settlementValue?m.settlementValue:100)/100:0):"FIXED_SALARY"==m.salarySettlementType&&(e.offlineTeacherSalary=Math.round(m.settlementValue)),e.offlineTeacherSalary=Number(e.offlineTeacherSalary)}}"GIVE_CLASS"==a.type||"BASE_ACTIVITY"==a.type?e.totalCount=Math.round(i*e.onlineClassesUnitPrice+n*e.offlineClassesUnitPrice):"DISCOUNT"==a.type&&(e.totalCount=Math.round((i*e.onlineClassesUnitPrice+n*e.offlineClassesUnitPrice)*Number(a.attribute1)/100)),e.totalCount=Number(e.totalCount)},getThinkDate:function(t,e){var a=t;a.setDate(t.getDate()+e);var s=a.getFullYear(),i=a.getMonth()+1,n="";n=i<10?"0"+i:i+"";var r=a.getDate(),o="";return o=r<10?"0"+r:r+"",s+"-"+n+"-"+o},MinutesTest:function(t,e,a){var s=e.split("分")[0],i=new Date(1900,1,1,t,s);i.setMinutes(i.getMinutes()+parseInt(a));var n=i.getHours(),r=i.getMinutes();return n<10&&(n="0"+n),r<10&&(r="0"+r),n+":"+r},timeIsrange:function(t,e,a){var s=t.split(":");if(2!=s.length)return!1;var i=e.split(":");if(2!=i.length)return!1;var n=a.split(":");if(2!=i.length)return!1;var r=new Date,o=new Date,l=new Date;return r.setHours(s[0]),r.setMinutes(s[1]),o.setHours(i[0]),o.setMinutes(i[1]),l.setHours(n[0]),l.setMinutes(n[1]),l.getTime()-r.getTime()>=0&&l.getTime()-o.getTime()<=0},getWeek:function(t){var e={"周一":1,"周二":2,"周三":3,"周四":4,"周五":5,"周六":6,"周日":0};return e[t]},formatter:function(t,e){return"year"===t?"".concat(e,"年"):"month"===t?"".concat(e,"月"):"day"===t?"".concat(e,"日"):e},onSubmit:function(){var t=O(I().mark((function t(){var e,a,s,i,n,r,o=this;return I().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=this.form,a=this.statusList,this.setTimeTable(),e.subjectIdList){t.next=6;break}return this.$toast("请选择科目"),t.abrupt("return",!1);case 6:if(e.vipGroupCategoryId){t.next=9;break}return this.$toast("请选择课程形式"),t.abrupt("return",!1);case 9:if(e.educationalTeacherId){t.next=12;break}return this.$toast("请选择乐团主管"),t.abrupt("return");case 12:if(!(this.checkboxSelectIds.length<=0)){t.next=15;break}return this.$toast("请选择上课学生"),t.abrupt("return");case 15:if(e.vipGroupActivityId){t.next=18;break}return this.$toast("请选择活动方案"),t.abrupt("return",!1);case 18:if(e.singleClassMinutes){t.next=21;break}return this.$toast("请选择每课时长"),t.abrupt("return",!1);case 21:if(s=!e.onlineClassesNums&&e.onlineClassesNums<=0,i=!e.offlineClassesNums&&e.offlineClassesNums<=0,!a.hasOnline){t.next=27;break}if(!s){t.next=27;break}return this.$toast("请输入线上课次数"),t.abrupt("return",!1);case 27:if(!a.hasOffline){t.next=34;break}if(!i){t.next=31;break}return this.$toast("请输入线下课次数"),t.abrupt("return",!1);case 31:if(!(e.offlineClassesNums>0)||e.teacherSchoolId){t.next=34;break}return this.$toast("请选择线下课地址"),t.abrupt("return",!1);case 34:if(n=this.loadData.vipGroupActivitySelect,"GIVE_CLASS"!=n.type||e.giveTeachMode){t.next=38;break}return this.$toast("请选择赠课类型"),t.abrupt("return",!1);case 38:if(!(this.scheduleList.length<=0)){t.next=41;break}return this.$toast("课时安排不能为空"),t.abrupt("return",!1);case 41:if(!a.hasOnline){t.next=48;break}if(e.onlineClassesUnitPrice){t.next=45;break}return this.$toast("请输入线上课单价"),t.abrupt("return",!1);case 45:if(e.onlineTeacherSalary){t.next=48;break}return this.$toast("请输入线上课课酬"),t.abrupt("return",!1);case 48:if(!a.hasOffline){t.next=55;break}if(e.offlineClassesUnitPrice){t.next=52;break}return this.$toast("请输入线下课单价"),t.abrupt("return",!1);case 52:if(e.offlineTeacherSalary){t.next=55;break}return this.$toast("请输入线下课课酬"),t.abrupt("return",!1);case 55:if("ONLINE"==e.giveTeachMode?(e.onlineClassesNum=Number(e.onlineClassesNums)+Number(this.other.giveNum),e.offlineClassesNum=Number(e.offlineClassesNums)):(e.onlineClassesNum=Number(e.onlineClassesNums),e.offlineClassesNum=Number(e.offlineClassesNums)+Number(this.other.giveNum)),e.totalClassTimes=Number(e.onlineClassesNums)+Number(e.offlineClassesNums)+Number(this.other.giveNum),e.paymentExpireDate=e.coursesExpireDate,e.studentIdList=this.checkboxSelectIds.join(","),e.firstStudentId=this.checkboxSelectDataList.length>0?this.checkboxSelectDataList[0].userId:null,r={courseSchedules:this.timeTable,vipGroupApplyBaseInfo:e},this.onSubmitStatus){t.next=63;break}return t.abrupt("return");case 63:return this.onSubmitStatus=!1,Object(h["a"])(!0),t.next=67,Object(u["ab"])(r).then((function(t){var e=t.data;Object(h["a"])(!1),200==e.code?(o.$toast("排课成功"),setTimeout((function(){o.onSubmitStatus=!0,Object(l["b"])().iPhone?window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api:"back"})):Object(l["b"])().android?DAYA.postMessage(JSON.stringify({api:"back"})):o.$router.push("/business")}),500)):(o.onSubmitStatus=!0,o.$toast(e.msg))})).catch((function(){Object(h["a"])(!1)}));case 67:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),onSearch:function(){this.params.page=1,this.dataList=[],this.dataShow=!0,this.loading=!0,this.finished=!1,this.getStudent()},getStudent:function(){var t=O(I().mark((function t(){var e,a=this;return I().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=this.params,t.next=3,Object(u["E"])(e).then((function(t){var s=t.data;a.loading=!1,200==s.code?(e.page=s.data.pageNo,a.dataList=a.dataList.concat(s.data.rows),e.page>=s.data.totalPage&&(a.finished=!0),a.params.page++):a.finished=!0,a.dataList.length<=0&&(a.dataShow=!1)}));case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),onPopupCancel:function(){this.statusList.studentStatus=!1,this.checkboxSelect=[],this.checkboxSelectList=[]},onPopupSubmit:function(){var t=this.loadData.vipGroupCategorySelect;this.checkboxSelect.length==t.studentNum?(this.checkboxSelectDataList=JSON.parse(JSON.stringify(this.checkboxSelectList)),this.checkboxSelectIds=JSON.parse(JSON.stringify(this.checkboxSelect)),this.checkboxSelect=[],this.checkboxSelectList=[],this.loadData.vipGroupActivity=[],this.formName.vipGroupActivityName=null,this.formName.vipGroupCategoryIndex=0,this.form.vipGroupActivityId=null,this.statusList.studentStatus=!1):this.$toast("请选择学生".concat(t.studentNum,"名,当前选择").concat(this.checkboxSelect.length,"名"))},onCheckboxSelect:function(t){var e=this;(t.courseOneToOneTime||t.courseOneToTwoTime)&&(this.checkboxSelect.includes(t.userId.toString())?(this.checkboxSelect.forEach((function(a,s){a==t.userId.toString()&&e.checkboxSelect.splice(s,1)})),this.checkboxSelectList.forEach((function(a,s){a.userId==t.userId&&e.checkboxSelectList.splice(s,1)}))):(this.checkboxSelect.push(t.userId.toString()),this.checkboxSelectList.push(t)))},desensitPhone:function(t){var e=t.substr(0,3),a=t.substr(-4);return e+"****"+a}}},E=$,F=(a("75d6"),Object(T["a"])(E,L,D,!1,null,"cbd3a038",null)),P=F.exports,j=a("fa8b"),U=a("26a8"),z={components:{vip00Apply:N,vip11Apply:P,VipCourse:j["a"],TheoryCourse:U["a"]},data:function(){return{active:1,tenantId:null}},created:function(){this.tenantId=sessionStorage.getItem("tenantId")||null},mounted:function(){var t=this.$route.query;t.Authorization&&(localStorage.setItem("Authorization",decodeURI(t.Authorization)),localStorage.setItem("userInfo",decodeURI(t.Authorization))),document.title="课程申请"},methods:{onChange:function(t){1==t?document.title="VIP课程申请":2==t?document.title="双十一排课":3==t?document.title="考级VIP排课":4==t&&(document.title="考级乐理排课")}}},V=z,Y=(a("67d5"),Object(T["a"])(V,s,i,!1,null,"62f19b26",null));e["default"]=Y.exports},"59af":function(t,e,a){},"67d5":function(t,e,a){"use strict";a("7e0f")},"75d6":function(t,e,a){"use strict";a("d014")},"7e0f":function(t,e,a){},d014:function(t,e,a){}}]);