12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["VIPApply"],{"057b":function(e,t,a){"use strict";var s=a("77c8"),i=a.n(s);i.a},"11e9":function(e,t,a){var s=a("52a7"),i=a("4630"),n=a("6821"),r=a("6a99"),l=a("69a8"),o=a("c69a"),c=Object.getOwnPropertyDescriptor;t.f=a("9e1e")?c:function(e,t){if(e=n(e),t=r(t,!0),o)try{return c(e,t)}catch(a){}if(l(e,t))return i(!s.f.call(e,t),e[t])}},"28a5":function(e,t,a){"use strict";var s=a("aae3"),i=a("cb7c"),n=a("ebd6"),r=a("0390"),l=a("9def"),o=a("5f1b"),c=a("520a"),u=a("79e5"),m=Math.min,f=[].push,h="split",p="length",d="lastIndex",v=4294967295,g=!u(function(){RegExp(v,"y")});a("214f")("split",2,function(e,t,a,u){var S;return S="c"=="abbc"[h](/(b)*/)[1]||4!="test"[h](/(?:)/,-1)[p]||2!="ab"[h](/(?:ab)*/)[p]||4!="."[h](/(.?)(.?)/)[p]||"."[h](/()()/)[p]>1||""[h](/.?/)[p]?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!s(e))return a.call(i,e,t);var n,r,l,o=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),m=0,h=void 0===t?v:t>>>0,g=new RegExp(e.source,u+"g");while(n=c.call(g,i)){if(r=g[d],r>m&&(o.push(i.slice(m,n.index)),n[p]>1&&n.index<i[p]&&f.apply(o,n.slice(1)),l=n[0][p],m=r,o[p]>=h))break;g[d]===n.index&&g[d]++}return m===i[p]?!l&&g.test("")||o.push(""):o.push(i.slice(m)),o[p]>h?o.slice(0,h):o}:"0"[h](void 0,0)[p]?function(e,t){return void 0===e&&0===t?[]:a.call(this,e,t)}:a,[function(a,s){var i=e(this),n=void 0==a?void 0:a[t];return void 0!==n?n.call(a,i,s):S.call(String(i),a,s)},function(e,t){var s=u(S,e,this,t,S!==a);if(s.done)return s.value;var c=i(e),f=String(this),h=n(c,RegExp),p=c.unicode,d=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(g?"y":"g"),y=new h(g?c:"^(?:"+c.source+")",d),C=void 0===t?v:t>>>0;if(0===C)return[];if(0===f.length)return null===o(y,f)?[f]:[];var b=0,T=0,N=[];while(T<f.length){y.lastIndex=g?T:0;var L,k=o(y,g?f:f.slice(T));if(null===k||(L=m(l(y.lastIndex+(g?0:T)),f.length))===b)T=r(f,T,p);else{if(N.push(f.slice(b,T)),N.length===C)return N;for(var x=1;x<=k.length-1;x++)if(N.push(k[x]),N.length===C)return N;T=b=L}}return N.push(f.slice(b)),N}]})},3354:function(e,t,a){},"38f5":function(e,t,a){"use strict";a.r(t);for(var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"vipapply"},[e.statusList.headerStatus?a("m-header"):e._e(),a("div",{staticClass:"vip-title"},[e._v("课程信息")]),a("van-cell-group",[a("van-field",{attrs:{label:"课程班名称","input-align":"right",size:"large",placeholder:"请输入班级名称"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}}),a("van-field",{attrs:{label:"科目名称",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(t){return e.onGetSheetList("subjectList")}},model:{value:e.formName.subjectListName,callback:function(t){e.$set(e.formName,"subjectListName",t)},expression:"formName.subjectListName"}}),a("van-field",{attrs:{label:"课程形式",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(t){return e.onGetSheetList("vipGroupCategory")}},model:{value:e.formName.vipGroupCategoryName,callback:function(t){e.$set(e.formName,"vipGroupCategoryName",t)},expression:"formName.vipGroupCategoryName"}}),a("van-field",{attrs:{label:"活动方案",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(t){return e.onGetSheetList("vipGroupActivity")}},model:{value:e.formName.vipGroupActivityName,callback:function(t){e.$set(e.formName,"vipGroupActivityName",t)},expression:"formName.vipGroupActivityName"}}),a("van-field",{attrs:{label:"线下课地址",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(t){return e.onGetSheetList("teacherSchool")}},model:{value:e.formName.teacherSchoolName,callback:function(t){e.$set(e.formName,"teacherSchoolName",t)},expression:"formName.teacherSchoolName"}})],1),a("div",{staticClass:"vip-title"},[e._v("课时组成")]),a("van-cell-group",[a("van-field",{attrs:{label:"每班人数",disabled:"","input-align":"right",size:"large",placeholder:"每班预计招收人数"},model:{value:e.form.studentNum,callback:function(t){e.$set(e.form,"studentNum",t)},expression:"form.studentNum"}}),a("van-field",{attrs:{label:"每课时长",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请输入每课时长"},on:{click:e.onClickSingleClass},model:{value:e.form.singleClassMinutes,callback:function(t){e.$set(e.form,"singleClassMinutes",t)},expression:"form.singleClassMinutes"}}),e.formName.vipGroupActivityName||e.statusList.hasOnline?a("van-field",{attrs:{label:"线上课","input-align":"right",size:"large",placeholder:"请输入次数",type:"number"},on:{keyup:e.onClassKeyUp},model:{value:e.form.onlineClassesNums,callback:function(t){e.$set(e.form,"onlineClassesNums",t)},expression:"form.onlineClassesNums"}}):e._e(),e.formName.vipGroupActivityName||e.statusList.hasOffline?a("van-field",{attrs:{label:"线下课","input-align":"right",size:"large",placeholder:"请输入次数",type:"number"},on:{keyup:e.onClassKeyUp},model:{value:e.form.offlineClassesNums,callback:function(t){e.$set(e.form,"offlineClassesNums",t)},expression:"form.offlineClassesNums"}}):e._e()],1),a("div",{staticClass:"vip-title"},[e._v("时间安排")]),a("van-cell-group",[a("van-field",{attrs:{label:"报名开始时间",disabled:"","input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(t){return e.onEnListShow("start",e.form.registrationStartTime)}},model:{value:e.form.registrationStartTime,callback:function(t){e.$set(e.form,"registrationStartTime",t)},expression:"form.registrationStartTime"}}),a("van-field",{attrs:{label:"报名截止时间",disabled:"","input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(t){return e.onEnListShow("end",e.form.coursesExpireDate)}},model:{value:e.form.coursesExpireDate,callback:function(t){e.$set(e.form,"coursesExpireDate",t)},expression:"form.coursesExpireDate"}})],1),a("div",{staticClass:"vip-title"},[e._v("课时安排")]),a("van-cell-group",[a("van-field",{attrs:{label:"课时总数",disabled:"","input-align":"right",size:"large",placeholder:"请输入次数"},model:{value:e.form.totalClassTime,callback:function(t){e.$set(e.form,"totalClassTime",t)},expression:"form.totalClassTime"}}),e.statusList.teachOnOrOff?a("van-field",{attrs:{label:"赠课类型",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:e.onGiveMode},model:{value:e.formName.giveTeachModeName,callback:function(t){e.$set(e.formName,"giveTeachModeName",t)},expression:"formName.giveTeachModeName"}}):e._e(),a("van-field",{attrs:{label:"排课开始时间",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(t){e.dataForm.status=!0}},model:{value:e.form.courseStart,callback:function(t){e.$set(e.form,"courseStart",t)},expression:"form.courseStart"}}),e._l(e.scheduleList,function(t,s){return a("van-cell",{key:s,attrs:{"title-class":"title-time"}},[a("template",{slot:"title"},[a("span",{staticClass:"online"},[e._v(e._s(t.type))]),a("span",{staticClass:"week"},[e._v(e._s(t.weekStr))]),a("span",{staticClass:"timer"},[e._v(e._s(t.startTime+"-"+t.endTime))])]),a("template",{slot:"default"},[a("van-button",{attrs:{type:"warning",round:"",size:"small",plain:""},on:{click:function(a){return e.onScheduleRemove(t)}}},[e._v("删除")])],1)],2)}),a("div",{staticClass:"add-plan van-cell",on:{click:e.onCourseShedule}},[a("van-icon",{attrs:{name:"add-o"}}),e._v("课时安排\n ")],1),e.scheduleList.length>0?a("van-field",{attrs:{label:"排课列表",disabled:"","input-align":"right","is-link":"",size:"large"},on:{click:e.onShowTimeTable}}):e._e()],2),a("div",{staticClass:"vip-title"},[e._v("课酬设置")]),a("van-cell-group",[e.statusList.hasOnline?a("van-field",{attrs:{label:"线上课单价",type:"number","input-align":"right",size:"large",disabled:0==e.loadData.vipGroupActivitySelect.salaryReadonlyFlag,placeholder:"金额(每课时)"},on:{keyUp:e.getCalcClass},model:{value:e.form.onlineClassesUnitPrice,callback:function(t){e.$set(e.form,"onlineClassesUnitPrice",t)},expression:"form.onlineClassesUnitPrice"}}):e._e(),e.statusList.hasOffline?a("van-field",{attrs:{label:"线下课单价",type:"number","input-align":"right",size:"large",disabled:0==e.loadData.vipGroupActivitySelect.salaryReadonlyFlag,placeholder:"金额(每课时)"},on:{keyUp:e.getCalcClass},model:{value:e.form.offlineClassesUnitPrice,callback:function(t){e.$set(e.form,"offlineClassesUnitPrice",t)},expression:"form.offlineClassesUnitPrice"}}):e._e(),e.statusList.hasOnline?a("van-field",{attrs:{label:"线上课课酬","input-align":"right",size:"large",disabled:0==e.loadData.vipGroupActivitySelect.salaryReadonlyFlag,placeholder:"金额(每课时)",type:"number"},model:{value:e.form.onlineTeacherSalary,callback:function(t){e.$set(e.form,"onlineTeacherSalary",t)},expression:"form.onlineTeacherSalary"}}):e._e(),e.statusList.hasOffline?a("van-field",{attrs:{label:"线下课课酬","input-align":"right",size:"large",disabled:0==e.loadData.vipGroupActivitySelect.salaryReadonlyFlag,placeholder:"金额(每课时)",type:"number"},model:{value:e.form.offlineTeacherSalary,callback:function(t){e.$set(e.form,"offlineTeacherSalary",t)},expression:"form.offlineTeacherSalary"}}):e._e(),a("van-field",{attrs:{disabled:"",label:"课程总价","input-align":"right",size:"large",placeholder:"金额(每课时)"},model:{value:e.form.totalCount,callback:function(t){e.$set(e.form,"totalCount",t)},expression:"form.totalCount"}})],1),a("div",{staticClass:"button-group"},[a("van-button",{attrs:{type:"primary",round:"",size:"large"},on:{click:e.onSubmit}},[e._v("确认")])],1),a("van-action-sheet",{attrs:{actions:e.loadData.classTimer,"cancel-text":"取消"},on:{cancel:function(t){e.statusList.classTimerStatus=!1},select:e.onClassTimerSelect},model:{value:e.statusList.classTimerStatus,callback:function(t){e.$set(e.statusList,"classTimerStatus",t)},expression:"statusList.classTimerStatus"}}),a("van-popup",{attrs:{position:"bottom"},model:{value:e.enlistForm.status,callback:function(t){e.$set(e.enlistForm,"status",t)},expression:"enlistForm.status"}},[a("van-datetime-picker",{attrs:{type:"date","min-date":e.enlistForm.minDate,"max-date":e.enlistForm.maxDate,formatter:e.formatter},on:{cancel:function(t){e.enlistForm.status=!1},confirm:e.onEnlistConfirm},model:{value:e.enlistForm.currentDate,callback:function(t){e.$set(e.enlistForm,"currentDate",t)},expression:"enlistForm.currentDate"}})],1),a("van-action-sheet",{attrs:{actions:e.loadData.giveTeachMode,"cancel-text":"取消"},on:{cancel:function(t){e.statusList.giveTeachModeStatus=!1},select:e.onModeSelect},model:{value:e.statusList.giveTeachModeStatus,callback:function(t){e.$set(e.statusList,"giveTeachModeStatus",t)},expression:"statusList.giveTeachModeStatus"}}),a("van-popup",{attrs:{position:"bottom"},model:{value:e.sheetForm.sheetStatus,callback:function(t){e.$set(e.sheetForm,"sheetStatus",t)},expression:"sheetForm.sheetStatus"}},[a("van-picker",{attrs:{loading:e.sheetForm.loading,"default-index":e.sheetForm.index,columns:e.sheetForm.columns,"show-toolbar":""},on:{cancel:function(t){e.sheetForm.sheetStatus=!1},confirm:e.onSheetConfirm}})],1),a("van-popup",{attrs:{position:"bottom"},model:{value:e.dataForm.status,callback:function(t){e.$set(e.dataForm,"status",t)},expression:"dataForm.status"}},[a("van-datetime-picker",{attrs:{type:"date","min-date":e.dataForm.minDate,"max-date":e.dataForm.maxDate,formatter:e.formatter},on:{cancel:function(t){e.dataForm.status=!1},confirm:e.onCurrentConfirm},model:{value:e.dataForm.currentDate,callback:function(t){e.$set(e.dataForm,"currentDate",t)},expression:"dataForm.currentDate"}})],1),a("van-popup",{attrs:{position:"bottom"},model:{value:e.courseForm.teachingStatus,callback:function(t){e.$set(e.courseForm,"teachingStatus",t)},expression:"courseForm.teachingStatus"}},[a("van-picker",{attrs:{columns:e.courseForm.columns,"show-toolbar":""},on:{cancel:function(t){e.courseForm.teachingStatus=!1},confirm:e.onTeachinConfirm}})],1),a("van-popup",{attrs:{position:"bottom"},model:{value:e.statusList.classTime,callback:function(t){e.$set(e.statusList,"classTime",t)},expression:"statusList.classTime"}},[a("van-row",[a("van-col",{attrs:{span:"12"}},[e._v("上课类型")]),a("van-col",{attrs:{span:"12"}},[e._v("上课时间")])],1),a("div",{staticClass:"tableContainer"},e._l(e.timeTable,function(t,s){return a("van-row",{key:s},[a("van-col",{attrs:{span:"12"}},[e._v("\n "+e._s("ONLINE"==t.teachMode?"线上":"线下")+"\n ")]),a("van-col",{attrs:{span:"12"}},[e._v("\n "+e._s(t.classDate)+" "+e._s(t.startClassTimeStr)+"\n ")])],1)}),1)],1)],1)},i=[],n=(a("a481"),a("c5f6"),a("28a5"),a("ac6a"),a("7f7f"),a("6e6e")),r=a("ff51"),l=a("9afb"),o=[],c=0;c<60;c++){var u=c<10?"0"+c:c;o.push(u+"分")}var m={name:"vipapply",components:{MHeader:n["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},loadData:{subjectList:[],subjectListSelect:[],vipGroupCategory:[],vipGroupCategorySelect:[],vipGroupActivity:[],vipGroupActivitySelect:[],teacherSchool:[],teacherSchoolSelect:[],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,21,22,23],className:"hours",defaultIndex:7},{values:o,className:"minutes"}]},form:{name:null,subjectIdList:null,vipGroupCategoryId:null,vipGroupActivityId:null,teacherSchoolId: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},other:{onlineSalary:null,offlineSalary:null,giveNum:0},scheduleList:[],timeTable:[]}},mounted:function(){document.title="VIP课程班申请",Object(r["a"])().android&&(this.headerStatus=!0)},methods:{onGetSheetList:function(e){var t=this.sheetForm;if(t.columns=[],this.form.vipGroupCategoryId||"vipGroupActivity"!=e){t.sheetStatus=!0,t.loading=!0,t.currentType=e,t.index=0;var a=this.loadData[e];a.length>0?(t.columns=a,t.index=this.formName[e+"Index"],t.loading=!1):this.onLoadingData(e)}else this.$toast("请选择课程形式")},onLoadingData:function(){var e=this,t=this.sheetForm;"subjectList"==t.currentType?Object(l["f"])().then(function(a){var s=a.data;if(200==s.code&&s.data.length>0){var i=[];s.data.forEach(function(e){e.value=e.id,e.text=e.name,i.push(e)}),e.loadData.subjectList=i,t.columns=i,t.loading=!1}else e.$toast("暂无科目列表"),t.loading=!1}):"vipGroupCategory"==t.currentType?Object(l["w"])().then(function(a){var s=a.data;if(200==s.code&&s.data.length>0){var i=[];s.data.forEach(function(e){e.value=e.id,e.text=e.name,i.push(e)}),e.loadData.vipGroupCategory=i,t.columns=i,t.loading=!1}else e.$toast("暂无课程形式"),t.loading=!1}):"vipGroupActivity"==t.currentType?Object(l["e"])({categoryId:this.form.vipGroupCategoryId}).then(function(a){var s=a.data;if(200==s.code&&s.data.length>0){var i=[];s.data.forEach(function(e){e.value=e.id,e.text=e.name,e.startTime=e.startTime?e.startTime.split(" ")[0]:null,e.endTime=e.endTime?e.endTime.split(" ")[0]:null,i.push(e)}),e.loadData.vipGroupActivity=i,t.columns=i,t.loading=!1}else e.$toast("暂无活动文案"),t.loading=!1}):"teacherSchool"==t.currentType&&Object(l["g"])().then(function(a){var s=a.data;if(200==s.code&&s.data.length>0){var i=[];s.data.forEach(function(e){e.value=e.id,e.text=e.name,i.push(e)}),e.loadData.teacherSchool=i,t.columns=i,t.loading=!1}else e.$toast("暂无教学点"),t.loading=!1})},findTeacherCategory:function(e){var t=this;Object(l["d"])({categoryId:e}).then(function(e){var a=e.data;200==a.code&&(t.loadData.teacherCategory=a.data)})},onSheetConfirm:function(e,t){var a=this,s=this.sheetForm,i=this.form,n=this.formName,r=this.loadData;if("subjectList"==s.currentType)i.subjectIdList=e.value,n.subjectListName=e.text,n.subjectListIndex=t,r.subjectListSelect=e;else if("vipGroupCategory"==s.currentType){r.vipGroupCategorySelect.id!=e.id&&this.findTeacherCategory(e.id),i.vipGroupCategoryId=e.value,n.vipGroupCategoryName=e.text,n.vipGroupCategoryIndex=t,r.vipGroupCategorySelect=e,i.studentNum=e.studentNum,i.onlineClassesUnitPrice=e.onlineClassesUnitPrice,i.offlineClassesUnitPrice=e.offlineClassesUnitPrice,i.singleClassMinutes=null,r.classTimer=[];var l=e.singleClassMinutes.split(",");l.forEach(function(e){a.loadData.classTimer.push({name:e,value:e})}),i.vipGroupActivityId=null,n.vipGroupActivityName=null,n.vipGroupActivityIndex=0,r.vipGroupActivity=[],r.vipGroupActivitySelect=[]}else"vipGroupActivity"==s.currentType?(i.vipGroupActivityId=e.value,n.vipGroupActivityName=e.text,n.vipGroupActivityIndex=t,r.vipGroupActivitySelect=e,this.onCalcClassTimes(e),this.getCalcClass(),this.setTimeTable()):"teacherSchool"==s.currentType&&(i.teacherSchoolId=e.value,n.teacherSchoolName=e.text,n.teacherSchoolIndex=t);s.sheetStatus=!1},onClassKeyUp:function(){var e=this.loadData.vipGroupActivitySelect;this.onCalcClassTimes(e),this.getCalcClass()},onCalcClassTimes:function(e){var t=this.form,a=this.other,s=this.statusList,i=Number(t.onlineClassesNums)+Number(t.offlineClassesNums);if(e.salarySettlementJson){var n=JSON.parse(e.salarySettlementJson);n&&n.onlineSalarySettlement?s.hasOnline=!0:s.hasOnline=!1,n&&n.offlineSalarySettlement?s.hasOffline=!0:s.hasOffline=!1}"GIVE_CLASS"==e.type?(this.statusList.teachOnOrOff=!0,i>=Number(e.attribute1)?(t.totalClassTime=i+"+"+e.attribute2,a.giveNum=e.attribute2):(t.totalClassTime=i,a.giveNum=0)):(t.totalClassTime=i,a.giveNum=0,this.statusList.teachOnOrOff=!1)},onModeSelect:function(e){this.form.giveTeachMode=e.value,this.formName.giveTeachModeName=e.name,this.statusList.giveTeachModeStatus=!1},onClickSingleClass:function(){this.formName.vipGroupCategoryName?this.statusList.classTimerStatus=!0:this.$toast("请选择课程形式")},onClassTimerSelect:function(e){this.form.singleClassMinutes=e.value,this.statusList.classTimerStatus=!1,this.getCalcClass()},onCurrentConfirm:function(e){var t=new Date(e),a=t.getMonth()+1>=10?t.getMonth()+1:"0"+(t.getMonth()+1),s=t.getDate()>=10?t.getDate():"0"+t.getDate();this.form.courseStart=t.getFullYear()+"-"+a+"-"+s,this.dataForm.status=!1},onEnlistConfirm:function(e){var t=new Date(e),a=t.getMonth()+1>=10?t.getMonth()+1:"0"+(t.getMonth()+1),s=t.getDate()>=10?t.getDate():"0"+t.getDate(),i=this.enlistForm;"start"==i.updateStatus?this.form.registrationStartTime=t.getFullYear()+"-"+a+"-"+s:"end"==i.updateStatus&&(this.form.coursesExpireDate=t.getFullYear()+"-"+a+"-"+s),i.status=!1},onEnListShow:function(e,t){var a=this.enlistForm;"end"==e&&(this.form.registrationStartTime?a.minDate=new Date(this.form.registrationStartTime.replace(/-/gi,"/")):a.minDate=new Date),a.currentDate=t?new Date(t.replace(/-/gi,"/")):new Date,a.updateStatus=e,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(e){var t=this.scheduleList.indexOf(e);-1!==t&&this.scheduleList.splice(t,1)},onTeachinConfirm:function(e){var t=this,a=this.scheduleList,s=(e[2]>=10?e[2]:"0"+e[2])+":"+e[3].split("分")[0],i=this.MinutesTest(e[2],e[3],this.form.singleClassMinutes),n=!0;a.forEach(function(a){var r=t.timeIsrange(s,i,a.startTime),l=t.timeIsrange(s,i,a.endTime);n&&(e[1]==a.weekStr?n=!r&&!l:e[1]!=a.weekStr&&(n=!0))}),n?(a.push({type:e[0],weekStr:e[1],weekIndex:this.getWeek(e[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 e=this.form,t=this.scheduleList,a=parseInt(e.onlineClassesNums?e.onlineClassesNums:0),s=parseInt(e.offlineClassesNums?e.offlineClassesNums:0),i=parseInt(this.other.giveNum),n=e.giveTeachMode;if("ONLINE"==n?a+=i:"OFFLINE"==n&&(s+=i),!(t.length<=0)){var r=Number(a)+Number(s),l=e.courseStart.replace(/-/gi,"/"),o=new Date(l),c=0;while(r&&r>0){for(var u=0;u<t.length;u++){if(0==a&&0==s)break;var m=t[u].weekIndex-o.getDay();c>0&&0==m&&0==u&&(m+=7),m<0&&(m+=7);var f=this.getThinkDate(o,m),h={classDate:f,startClassTimeStr:t[u].startTime,endClassTimeStr:t[u].endTime};"线上"==t[u].type&&a>0?(h.teachMode="ONLINE",this.timeTable.push(h),a--):"线下"==t[u].type&&s>0?(h.teachMode="OFFLINE",this.timeTable.push(h),s--):a>0?(h.teachMode="ONLINE",this.timeTable.push(h),a--):s>0&&(h.teachMode="OFFLINE",this.timeTable.push(h),s--),r--}1==t.length&&o.setDate(o.getDate()+7),t.every(function(e){return e.weekStr===t[0].weekStr})&&c++}}},onGiveMode:function(){this.statusList.giveTeachModeStatus=!0,this.getCalcClass()},getCalcClass:function(){var e=this.loadData,t=this.form,a=e.vipGroupActivitySelect,s=e.vipGroupCategorySelect,i=e.teacherCategory,n=t.onlineClassesNums?t.onlineClassesNums:0,r=t.offlineClassesNums?t.offlineClassesNums:0;if(a.salarySettlementJson){var l=JSON.parse(a.salarySettlementJson);if(l&&l.onlineSalarySettlement){var o=l.onlineSalarySettlement;"TEACHER_DEFAULT"==o.salarySettlementType?t.onlineTeacherSalary=i.onlineClassesSalary:"RATIO_DISCOUNT"==o.salarySettlementType?t.onlineTeacherSalary=(s.onlineClassesUnitPrice*(o.settlementValue?o.settlementValue:100)/100).toFixed(2):"FIXED_SALARY"==o.salarySettlementType&&(t.onlineTeacherSalary=o.settlementValue.toFixed(2)),t.onlineTeacherSalary=Number(t.onlineTeacherSalary)}if(l&&l.offlineSalarySettlement){var c=l.offlineSalarySettlement;"TEACHER_DEFAULT"==c.salarySettlementType?t.offlineTeacherSalary=i.offlineClassesSalary:"RATIO_DISCOUNT"==c.salarySettlementType?t.offlineTeacherSalary=(s.offlineClassesUnitPrice*(c.settlementValue?c.settlementValue:100)/100).toFixed(2):"FIXED_SALARY"==c.salarySettlementType&&(t.offlineTeacherSalary=c.settlementValue.toFixed(2)),t.offlineTeacherSalary=Number(t.offlineTeacherSalary)}}"GIVE_CLASS"==a.type||"BASE_ACTIVITY"==a.type?t.totalCount=n*t.onlineClassesUnitPrice+r*t.offlineClassesUnitPrice:"DISCOUNT"==a.type&&(t.totalCount=(n*t.onlineClassesUnitPrice+r*t.offlineClassesUnitPrice)*Number(a.attribute1)/100)},getThinkDate:function(e,t){var a=e;a.setDate(e.getDate()+t);var s=a.getFullYear(),i=a.getMonth()+1,n="";n=i<10?"0"+i:i+"";var r=a.getDate(),l="";return l=r<10?"0"+r:r+"",s+"-"+n+"-"+l},MinutesTest:function(e,t,a){var s=t.split("分")[0],i=new Date(1900,1,1,e,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(e,t,a){var s=e.split(":");if(2!=s.length)return!1;var i=t.split(":");if(2!=i.length)return!1;var n=a.split(":");if(2!=i.length)return!1;var r=new Date,l=new Date,o=new Date;return r.setHours(s[0]),r.setMinutes(s[1]),l.setHours(i[0]),l.setMinutes(i[1]),o.setHours(n[0]),o.setMinutes(n[1]),o.getTime()-r.getTime()>=0&&o.getTime()-l.getTime()<=0},getWeek:function(e){var t={"周一":1,"周二":2,"周三":3,"周四":4,"周五":5,"周六":6,"周日":0};return t[e]},formatter:function(e,t){return"year"===e?"".concat(t,"年"):"month"===e?"".concat(t,"月"):"day"===e?"".concat(t,"日"):t},onSubmit:function(){var e=this,t=this.form;if(!t.name)return this.$toast("请输入课程班名称"),!1;if(!t.subjectIdList)return this.$toast("请选择科目"),!1;if(!t.vipGroupCategoryId)return this.$toast("请选择课程形式"),!1;if(!t.vipGroupActivityId)return this.$toast("请选择活动方案"),!1;if(!t.teacherSchoolId)return this.$toast("请选择线下课地址"),!1;if(!t.singleClassMinutes)return this.$toast("请选择每课时长"),!1;if(!t.onlineClassesNums&&t.onlineClassesNums<=0)return this.$toast("上课次数有误"),!1;if(!t.offlineClassesNums&&t.offlineClassesNums<=0)return this.$toast("请输入线下课次数"),!1;if(!t.registrationStartTime)return this.$toast("请选择报名开始时间"),!1;if(!t.coursesExpireDate)return this.$toast("请选择报名结束时间"),!1;var a=this.loadData.vipGroupActivitySelect;if("GIVE_CLASS"==a.type&&!t.giveTeachMode)return this.$toast("请选择赠课类型"),!1;if(this.scheduleList.length<=0)return this.$toast("课时安排不能为空"),!1;if(!t.onlineClassesUnitPrice)return this.$toast("请输入线上课单价"),!1;if(!t.offlineClassesUnitPrice)return this.$toast("请输入线下课单价"),!1;if(!t.onlineTeacherSalary)return this.$toast("请输入线上课课酬"),!1;if(!t.offlineTeacherSalary)return this.$toast("请输入线下课课酬"),!1;"ONLINE"==t.giveTeachMode?(t.onlineClassesNum=Number(t.onlineClassesNums)+Number(this.other.giveNum),t.offlineClassesNum=Number(t.offlineClassesNums)):(t.onlineClassesNum=Number(t.onlineClassesNums),t.offlineClassesNum=Number(t.offlineClassesNums)+Number(this.other.giveNum)),t.totalClassTimes=Number(t.onlineClassesNums)+Number(t.offlineClassesNums)+Number(this.other.giveNum),t.paymentExpireDate=t.coursesExpireDate;var s={courseSchedules:this.timeTable,vipGroupApplyBaseInfo:t};Object(l["v"])(s).then(function(t){var a=t.data;200==a.code?(e.$toast("申请成功"),Object(r["a"])().iPhone?window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api:"back"})):Object(r["a"])().android?DAYA.postMessage(JSON.stringify({api:"back"})):e.$router.push("/business")):e.$toast(a.msg)})}}},f=m,h=(a("057b"),a("2877")),p=Object(h["a"])(f,s,i,!1,null,"406a0882",null);t["default"]=p.exports},5115:function(e,t,a){"use strict";var s=a("3354"),i=a.n(s);i.a},"5dbc":function(e,t,a){var s=a("d3f4"),i=a("8b97").set;e.exports=function(e,t,a){var n,r=t.constructor;return r!==a&&"function"==typeof r&&(n=r.prototype)!==a.prototype&&s(n)&&i&&i(e,n),e}},"6e6e":function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"mheader"},[a("header",{staticClass:"m-nav-header",class:[e.isFixed?"fixed":""]},[a("div",{directives:[{name:"show",rawName:"v-show",value:e.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:e.goBack}},[a("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),a("div",{staticClass:"m-nav-bar__title"},[e._t("default",[e._v(e._s(e.name?e.name:this.$route.meta.descrition))])],2),a("div",{staticClass:"m-nav-bar__right"},[e._t("right")],2)])])},i=[],n={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},methods:{goBack:function(){var e=this.backUrl;"function"==typeof e.callBack?e.callBack():e.path?this.$router.push({path:e.path,query:e.params}):history.go(-1)}}},r=n,l=(a("5115"),a("2877")),o=Object(l["a"])(r,s,i,!1,null,"61d0e2e4",null);t["a"]=o.exports},"77c8":function(e,t,a){},"7f7f":function(e,t,a){var s=a("86cc").f,i=Function.prototype,n=/^\s*function ([^ (]*)/,r="name";r in i||a("9e1e")&&s(i,r,{configurable:!0,get:function(){try{return(""+this).match(n)[1]}catch(e){return""}}})},"8b97":function(e,t,a){var s=a("d3f4"),i=a("cb7c"),n=function(e,t){if(i(e),!s(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,s){try{s=a("9b43")(Function.call,a("11e9").f(Object.prototype,"__proto__").set,2),s(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,a){return n(e,a),t?e.__proto__=a:s(e,a),e}}({},!1):void 0),check:n}},9093:function(e,t,a){var s=a("ce10"),i=a("e11e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,i)}},aa77:function(e,t,a){var s=a("5ca1"),i=a("be13"),n=a("79e5"),r=a("fdef"),l="["+r+"]",o="
",c=RegExp("^"+l+l+"*"),u=RegExp(l+l+"*$"),m=function(e,t,a){var i={},l=n(function(){return!!r[e]()||o[e]()!=o}),c=i[e]=l?t(f):r[e];a&&(i[a]=c),s(s.P+s.F*l,"String",i)},f=m.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(u,"")),e};e.exports=m},aae3:function(e,t,a){var s=a("d3f4"),i=a("2d95"),n=a("2b4c")("match");e.exports=function(e){var t;return s(e)&&(void 0!==(t=e[n])?!!t:"RegExp"==i(e))}},ac6a:function(e,t,a){for(var s=a("cadf"),i=a("0d58"),n=a("2aba"),r=a("7726"),l=a("32e9"),o=a("84f2"),c=a("2b4c"),u=c("iterator"),m=c("toStringTag"),f=o.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(h),d=0;d<p.length;d++){var v,g=p[d],S=h[g],y=r[g],C=y&&y.prototype;if(C&&(C[u]||l(C,u,f),C[m]||l(C,m,g),o[g]=f,S))for(v in s)C[v]||n(C,v,s[v],!0)}},c5f6:function(e,t,a){"use strict";var s=a("7726"),i=a("69a8"),n=a("2d95"),r=a("5dbc"),l=a("6a99"),o=a("79e5"),c=a("9093").f,u=a("11e9").f,m=a("86cc").f,f=a("aa77").trim,h="Number",p=s[h],d=p,v=p.prototype,g=n(a("2aeb")(v))==h,S="trim"in String.prototype,y=function(e){var t=l(e,!1);if("string"==typeof t&&t.length>2){t=S?t.trim():f(t,3);var a,s,i,n=t.charCodeAt(0);if(43===n||45===n){if(a=t.charCodeAt(2),88===a||120===a)return NaN}else if(48===n){switch(t.charCodeAt(1)){case 66:case 98:s=2,i=49;break;case 79:case 111:s=8,i=55;break;default:return+t}for(var r,o=t.slice(2),c=0,u=o.length;c<u;c++)if(r=o.charCodeAt(c),r<48||r>i)return NaN;return parseInt(o,s)}}return+t};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(e){var t=arguments.length<1?0:e,a=this;return a instanceof p&&(g?o(function(){v.valueOf.call(a)}):n(a)!=h)?r(new d(y(t)),a,p):y(t)};for(var C,b=a("9e1e")?c(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),T=0;b.length>T;T++)i(d,C=b[T])&&!i(p,C)&&m(p,C,u(d,C));p.prototype=v,v.constructor=p,a("2aba")(s,h,p)}},fdef:function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"}}]);
- //# sourceMappingURL=VIPApply.8cafe37c.js.map
|