chunk-23be7c19.0cd94600.js 32 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-23be7c19","chunk-2d217e7a"],{"06df":function(e,t,a){},"23c5":function(e,t,a){"use strict";a("7f24")},"39a67":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"m-container"},[e._m(0),e._v(" "),a("div",{staticClass:"m-core"},[a("tab-router",{on:{"tab-click":e.handleClick},model:{value:e.activeIndex,callback:function(t){e.activeIndex="string"===typeof t?t.trim():t},expression:"activeIndex"}},[e.permissionList.chargesList?a("el-tab-pane",{attrs:{label:"乐团收费标准",lazy:"",name:"3"}},[3==e.activeIndex?a("chargesList"):e._e()],1):e._e(),e._v(" "),e.permissionList.courseTimerSetting?a("el-tab-pane",{attrs:{label:"乐团课时长设置",lazy:"",name:"1"}},[1==e.activeIndex?a("courseTimerSetting"):e._e()],1):e._e(),e._v(" "),e.permissionList.typesManager?a("el-tab-pane",{attrs:{label:"乐团收费类型设置",lazy:"",name:"6"}},[6==e.activeIndex?a("typesManager"):e._e()],1):e._e(),e._v(" "),e.permissionList.discountManage?a("el-tab-pane",{attrs:{label:"商品折扣&声部设置",lazy:"",name:"7"}},[7==e.activeIndex?a("discountManage"):e._e()],1):e._e(),e._v(" "),e.permissionList.musicCourseFee?a("el-tab-pane",{attrs:{label:"乐团课程价格设置",lazy:"",name:"2"}},[2==e.activeIndex?a("musicCourseFee"):e._e()],1):e._e(),e._v(" "),e.permissionList.vipCourseType?a("el-tab-pane",{attrs:{label:"VIP课设置",lazy:"",name:"4"}},["4"==e.activeIndex?a("vipCourseType"):e._e()],1):e._e(),e._v(" "),e.permissionList.vipChargeSeting?a("el-tab-pane",{attrs:{label:"VIP课程收费设置",lazy:"",name:"8"}},["8"==e.activeIndex?a("vipChargeSeting"):e._e()],1):e._e(),e._v(" "),e.permissionList.practiceRules?a("el-tab-pane",{attrs:{label:"网管课收费设置",lazy:"",name:"5"}},["5"==e.activeIndex?a("practiceRules"):e._e()],1):e._e()],1)],1)])},r=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("h2",[a("div",{staticClass:"squrt"}),e._v("\n 课程参数设置\n ")])}],n=(a("7f7f"),a("b58c6")),s=a("baa9"),o=a("f946"),l=a("b044"),c=a("49d7"),u=a("a4ed"),p=a("c95c"),m=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"m-container"},[a("save-form",{ref:"searchForm",staticClass:"searchForm",attrs:{inline:!0,saveKey:"auditionSetting",model:e.searchForm},on:{submit:e.search,reset:e.reset,"update:model":function(t){e.searchForm=t}}},[a("el-form-item",{attrs:{rules:[]}},[a("el-select",{staticClass:"multiple",attrs:{filterable:"",clearable:"",placeholder:"请选择分部"},model:{value:e.searchForm.organId,callback:function(t){e.$set(e.searchForm,"organId","string"===typeof t?t.trim():t)},expression:"searchForm.organId"}},e._l(e.selects.branchs,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"danger"}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{"native-type":"reset",type:"primary"}},[e._v("重置")])],1)],1),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"organizationCourseDurationSettings/insert",expression:"'organizationCourseDurationSettings/insert'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:function(t){return e.openJob("create")}}},[e._v("添加")]),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",prop:"organ.name",label:"分部名称"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"classGroupTypeName",label:"课程时长(分钟)"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("coursesType")(t.row.courseType))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"课程单价(元)",prop:"duration"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"organizationCourseDurationSettings/update",expression:"'organizationCourseDurationSettings/update'"}],attrs:{type:"text"},on:{click:function(a){return e.resetCourseTime(t.row)}}},[e._v("修改")])]}}])})],1),e._v(" "),a("pagination",{attrs:{saveKey:"auditionSetting",sync:"",total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"update:total":function(t){return e.$set(e.pageInfo,"total",t)},"update:page":function(t){return e.$set(e.pageInfo,"page",t)},"update:limit":function(t){return e.$set(e.pageInfo,"limit",t)},pagination:e.getList}})],1),e._v(" "),a("el-dialog",{staticClass:"courseMask",attrs:{title:e.isAdd?"新增网管课设置":"修改网管课设置",width:"500px",visible:e.courseVisible},on:{"update:visible":function(t){e.courseVisible=t}}},[e.courseVisible?a("auditionForm",{ref:"auditionForm",attrs:{activeRow:e.activeRow,organList:e.selects.branchs,courseType:e.courseType},on:{close:e.close}}):e._e(),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.courseVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.submitInfo}},[e._v("确 定")])],1)],1)],1)},d=[],f=(a("386d"),a("c80c")),b=(a("96cf"),a("3b8d")),v=a("db72"),g=a("333d"),h=a("92e3"),y=a("d349"),_=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-form",{ref:"auditionForm",attrs:{model:e.auditionForm}},[a("el-form-item",{attrs:{label:"分部",prop:"organId","label-width":e.formLabelWidth,rules:[{required:!0,message:"请选择分部",trigger:"blur"}]}},[a("el-select",{staticClass:"multiple",staticStyle:{width:"100% !important"},attrs:{filterable:"",clearable:"",placeholder:"请选择分部"},model:{value:e.auditionForm.organId,callback:function(t){e.$set(e.auditionForm,"organId","string"===typeof t?t.trim():t)},expression:"auditionForm.organId"}},e._l(e.organList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"课程时长",prop:"courseType","label-width":e.formLabelWidth,rules:[{required:!0,message:"请选择课程时长",trigger:"blur"}]}},[a("el-select",{staticClass:"multiple",staticStyle:{width:"100% !important"},attrs:{filterable:"",clearable:"",placeholder:"课程时长"},model:{value:e.auditionForm.courseType,callback:function(t){e.$set(e.auditionForm,"courseType","string"===typeof t?t.trim():t)},expression:"auditionForm.courseType"}},e._l(e.courseType,(function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"课程单价",prop:"courseType","label-width":e.formLabelWidth,rules:[{required:!0,message:"请选择课程单价",trigger:"blur"}]}},[a("el-input",{attrs:{clearable:"",placeholder:"课程单价",type:"number",maxlength:"9"},model:{value:e.courseType,callback:function(t){e.courseType=t},expression:"courseType"}})],1)],1)],1)},w=[],x=(a("28a5"),{props:["activeRow","organList","courseType"],data:function(){return{auditionForm:{organId:"",courseType:"",timer:[],id:""},inputVisible:!1,formLabelWidth:"80px",dynamicTags:[],inputValue:""}},mounted:function(){this.activeRow&&(this.auditionForm.organId=this.activeRow.organId,this.auditionForm.timer=this.activeRow.duration.split(","),this.dynamicTags=this.activeRow.duration.split(","),this.auditionForm.courseType=this.activeRow.courseType,this.auditionForm.id=this.activeRow.id)},methods:{submitInfo:function(){var e=Object(b["a"])(Object(f["a"])().mark((function e(t){var a=this;return Object(f["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:console.log(t),this.$refs.auditionForm.validate(function(){var e=Object(b["a"])(Object(f["a"])().mark((function e(i){return Object(f["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!i){e.next=25;break}if("update"!=t){e.next=14;break}return e.prev=2,e.next=5,Object(y["D"])({organId:a.auditionForm.organId,duration:a.dynamicTags.join(","),courseType:a.auditionForm.courseType,id:a.auditionForm.id});case 5:e.sent,a.$message.success("修改成功"),a.$emit("close"),e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](2);case 12:e.next=25;break;case 14:if("create"!=t){e.next=25;break}return e.prev=15,e.next=18,Object(y["a"])({organId:a.auditionForm.organId,duration:a.dynamicTags.join(","),courseType:a.auditionForm.courseType});case 18:e.sent,a.$message.success("新建成功"),a.$emit("close"),e.next=25;break;case 23:e.prev=23,e.t1=e["catch"](15);case 25:case"end":return e.stop()}}),e,null,[[2,10],[15,23]])})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},watch:{dynamicTags:function(e){this.auditionForm.timer=e}}}),F=x,k=(a("5220"),a("2877")),C=Object(k["a"])(F,_,w,!1,null,"161703ee",null),I=C.exports,S={courseScheduleType:null,organId:null},T={components:{pagination:g["a"],auditionForm:I},data:function(){return{tableList:[],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},searchForm:Object(v["a"])({},S),courseType:h["F"],isAdd:!0,courseVisible:!1,activeRow:null}},mounted:function(){this.$store.dispatch("setBranchs"),this.getList()},methods:{getList:function(){var e=Object(b["a"])(Object(f["a"])().mark((function e(){var t;return Object(f["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(y["o"])(Object(v["a"])(Object(v["a"])({},this.searchForm),{},{page:this.pageInfo.page,rows:this.pageInfo.limit}));case 3:t=e.sent,this.pageInfo.total=t.data.total,this.tableList=t.data.rows,e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),search:function(){this.pageInfo.page=1,this.$refs.searchForm.save(this.searchForm),this.$refs.searchForm.save(this.pageInfo,"page"),this.getList()},reset:function(){this.searchForm=Object(v["a"])({},S),this.search()},resetCourseTime:function(e){this.isAdd=!1,this.activeRow=e,this.courseVisible=!0},submitInfo:function(){var e=this.isAdd?"create":"update";this.$refs.auditionForm.submitInfo(e)},close:function(){this.courseVisible=!1,this.getList()},openJob:function(){this.isAdd=!0,this.activeRow=null,this.courseVisible=!0},delCourseTime:function(){var e=Object(b["a"])(Object(f["a"])().mark((function e(t){var a=this;return Object(f["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(b["a"])(Object(f["a"])().mark((function e(){return Object(f["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(y["n"])({id:t.id});case 3:e.sent,a.$message.success("删除成功"),a.getList(),e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])}))));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}},O=T,j=Object(k["a"])(O,m,d,!1,null,"2383e360",null),L=j.exports,$=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[(e.tableList.length>0||e.pageInfo.page>1)&&e.contextFlag?a("div",[a("save-form",{ref:"searchForm",attrs:{inline:!0,saveKey:"practiceRules",model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[a("el-form-item",{attrs:{prop:"organId"}},[a("el-select",{attrs:{placeholder:"请选择分部",filterable:"",clearable:""},model:{value:e.searchForm.organId,callback:function(t){e.$set(e.searchForm,"organId",t)},expression:"searchForm.organId"}},e._l(e.selects.branchs,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"danger","native-type":"submit"}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{"native-type":"reset",type:"primary"}},[e._v("重置")])],1)],1),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"practiceGroupSellPrice/add",expression:"'practiceGroupSellPrice/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:e.addPrice}},[e._v("添加")]),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{align:"center",prop:"organName",label:"分部名称"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"singleClassMinutesPrice",label:"网管课课时单价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.singleClassMinutesPrice)+"元")]}}],null,!1,4277427313)}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"comeOnPackagePrice",label:"加油包课时总价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.comeOnPackagePrice)+"元")]}}],null,!1,2614620295)}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"practiceGroupSellPrice/update",expression:"'practiceGroupSellPrice/update'"}],attrs:{type:"text"},on:{click:function(a){return e.openTypes(t.row)}}},[e._v("修改")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"practiceGroupSellPrice/del",expression:"'practiceGroupSellPrice/del'"}],attrs:{type:"text"},on:{click:function(a){return e.onTypesDel(t.row)}}},[e._v("删除")])]}}],null,!1,2974331739)})],1),e._v(" "),a("pagination",{attrs:{saveKey:"musicCourseFee",sync:"",total:e.pageInfo.total,page:e.pageInfo.page,limit:e.pageInfo.limit,"page-sizes":e.pageInfo.page_size},on:{"update:total":function(t){return e.$set(e.pageInfo,"total",t)},"update:page":function(t){return e.$set(e.pageInfo,"page",t)},"update:limit":function(t){return e.$set(e.pageInfo,"limit",t)},pagination:e.getList}})],1)],1):e._e(),e._v(" "),e.tableList.length>0||e.pageInfo.page>1||!e.contextFlag?e._e():a("emptyPage",{attrs:{title:"网管课收费设置",btnTitle:"新建网管课收费设置",context:e.context},on:{submit:e.addPrice}}),e._v(" "),e.newVisiable?a("el-dialog",{attrs:{title:e.activeRow?"修改":"新建",visible:e.newVisiable,width:"600px"},on:{"update:visible":function(t){e.newVisiable=t}}},[a("el-form",{ref:"ruleForm",staticClass:"createForm",attrs:{model:e.createForm}},[a("el-form-item",{attrs:{label:"所属分部",rules:[{required:!0,message:"所属分部",trigger:"blur"}],prop:"organId","label-width":e.formLabelWidth}},[a("el-select",{attrs:{placeholder:"请选择分部",filterable:"",clearable:""},model:{value:e.createForm.organId,callback:function(t){e.$set(e.createForm,"organId",t)},expression:"createForm.organId"}},e._l(e.selects.branchs,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"网管课课时单价","label-width":e.formLabelWidth,rules:[{required:!0,message:"请输入每分钟课程费用",trigger:"blur"}],prop:"singleClassMinutesPrice"}},[a("el-input",{attrs:{type:"number",min:"0",step:"0.00000001"},model:{value:e.createForm.singleClassMinutesPrice,callback:function(t){e.$set(e.createForm,"singleClassMinutesPrice",t)},expression:"createForm.singleClassMinutesPrice"}},[a("template",{slot:"append"},[e._v("每分钟费用(元)")])],2)],1),e._v(" "),a("el-form-item",{attrs:{label:"加油包课时总价","label-width":e.formLabelWidth,rules:[{required:!0,message:"请输入每分钟课程费用",trigger:"blur"}],prop:"comeOnPackagePrice"}},[a("el-input",{attrs:{type:"number",min:"0",step:"0.00000001"},model:{value:e.createForm.comeOnPackagePrice,callback:function(t){e.$set(e.createForm,"comeOnPackagePrice",t)},expression:"createForm.comeOnPackagePrice"}},[a("template",{slot:"append"},[e._v("每分钟费用(元)")])],2)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.newVisiable=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.submitInfo}},[e._v("确 定")])],1)],1):e._e()],1)},P=[],V=(a("b775"),a("829b")),G=(a("4328"),"/api-web");function R(e){return Object(V["a"])({url:G+"/practiceGroupSellPrice/list",method:"get",params:e})}function M(e){return Object(V["a"])({url:G+"/practiceGroupSellPrice/update",method:"post",data:e,requestType:"form"})}function E(e){return Object(V["a"])({url:G+"/practiceGroupSellPrice/add",method:"post",data:e,requestType:"form"})}function N(e){return Object(V["a"])({url:G+"/practiceGroupSellPrice/del",method:"post",data:e,requestType:"form"})}var z=a("1062"),q={name:"practiceRules",components:{pagination:g["a"],emptyPage:z["a"]},data:function(){return{newVisiable:!1,resetVisible:!1,tableList:[],dataList:[],organList:[],searchForm:{organId:null,courseScheduleType:null},createForm:{organId:null,comeOnPackagePrice:null,singleClassMinutesPrice:null},pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},formLabelWidth:"120px",activeRow:null,context:"可根据不同分部设置不同的网管课课时和加油包课时总价,设置完成后,所选分部学员可在学生端APP以此价格自行购买网管课课程。加油包是由8节网管组成的课程组,用于为乐团训练中跟不上进度的学员单独辅导,每个学员仅有一次购买加油包的机会,且只可在后台为学员创建,设置单价时建议酌情优惠。",contextFlag:!1}},mounted:function(){this.$store.dispatch("setBranchs"),this.getList()},methods:{search:function(){this.pageInfo.page=1,this.getList()},onReSet:function(){this.$refs.searchForm.resetFields(),this.search()},onTypesDel:function(){var e=Object(b["a"])(Object(f["a"])().mark((function e(t){var a=this;return Object(f["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.$confirm("是否删除此条数据?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:N({organId:t.organId}).then((function(e){a.$message.success("删除成功"),a.getList()})),e.next=8;break;case 6:e.prev=6,e.t0=e["catch"](0);case 8:case"end":return e.stop()}}),e,this,[[0,6]])})));function t(t){return e.apply(this,arguments)}return t}(),getList:function(){var e=this;R({rows:this.pageInfo.limit,page:this.pageInfo.page,organId:this.searchForm.organId}).then((function(t){e.contextFlag=!0;var a=t.data;e.tableList=a.rows,e.pageInfo.total=a.total}))},submitInfo:function(){var e=this;this.$refs.ruleForm.validate(function(){var t=Object(b["a"])(Object(f["a"])().mark((function t(a){return Object(f["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=26;break}if(console.log(e.createForm),!e.activeRow){t.next=15;break}return t.prev=3,t.next=6,M(e.createForm);case 6:e.$message.success("修改成功"),e.getList(),e.newVisiable=!1,t.next=13;break;case 11:t.prev=11,t.t0=t["catch"](3);case 13:t.next=26;break;case 15:return t.prev=15,t.next=18,E(e.createForm);case 18:e.$message.success("创建成功"),e.getList(),e.newVisiable=!1,t.next=26;break;case 23:t.prev=23,t.t1=t["catch"](15),console.log(t.t1);case 26:case"end":return t.stop()}}),t,null,[[3,11],[15,23]])})));return function(e){return t.apply(this,arguments)}}())},openTypes:function(e){this.activeRow=e,this.createForm=Object(v["a"])({},e),this.newVisiable=!0},addPrice:function(){this.activeRow=null,this.$set(this,"createForm",{organId:null,comeOnPackagePrice:null,singleClassMinutesPrice:null}),this.newVisiable=!0}}},W=q,D=(a("5873"),Object(k["a"])(W,$,P,!1,null,"755e9132",null)),U=D.exports,A=a("ec8a"),B={components:{courseTimerSetting:n["a"],musicCourseFee:s["a"],chargesList:l["a"],vipCourseType:c["a"],auditionSetting:L,typesManager:o["default"],discountManage:u["a"],vipChargeSeting:p["default"],practiceRules:U},name:"baseRulersManager",data:function(){return{activeIndex:"6",permissionList:{courseTimerSetting:Object(A["a"])("/globalConfig/courseTimerSetting"),musicCourseFee:Object(A["a"])("/globalConfig/musicCourseFee"),chargesList:Object(A["a"])("/globalConfig/chargesList"),vipCourseType:Object(A["a"])("/vipCourseType"),typesManager:Object(A["a"])("/globalConfig/typesManager"),discountManage:Object(A["a"])("/specialSetup/discountManage"),vipChargeSeting:Object(A["a"])("/vipChargeSeting"),practiceRules:Object(A["a"])("/practiceRules")}}},mounted:function(){console.log(this.$route.query)},methods:{handleClick:function(e){this.activeIndex=e.name}},watch:{"$route.query":function(e){e.tabrouter&&this.handleClick(e.tabrouter)}}},J=B,K=(a("23c5"),Object(k["a"])(J,i,r,!1,null,"1aab2682",null));t["default"]=K.exports},"49d7":function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupCategory/add",expression:"'vipGroupCategory/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:e.addGroupCategory}},[e._v("新建")]),e._v(" "),a("el-table",{attrs:{data:e.leftList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{label:"课程形式",prop:"name"}}),e._v(" "),a("el-table-column",{attrs:{label:"课程类型",prop:"singleClassMinutes"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(t.row.musicTheory?"乐理课":"VIP课")+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"班级人数(人)",prop:"studentNum"}}),e._v(" "),a("el-table-column",{attrs:{label:"课程课时(分钟)",prop:"singleClassMinutes"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupCategory/update",expression:"'vipGroupCategory/update'"}],attrs:{type:"text"},on:{click:function(a){return e.resetGroupCategory(t.row)}}},[e._v("修改")]),e._v(" "),a("el-popover",{directives:[{name:"permission",rawName:"v-permission",value:"vipGroupCategory/delete",expression:"'vipGroupCategory/delete'"}],ref:t.row.id,attrs:{placement:"top",width:"160"}},[a("p",[e._v("您确定删除该课程形态吗?")]),e._v(" "),a("div",{staticStyle:{"text-align":"right",margin:"0"}},[a("el-button",{attrs:{type:"text"},on:{click:function(e){t._self.$refs[t.row.id].doClose()}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(a){return e.removeGroupCategory(t)}}},[e._v("确定")])],1),e._v(" "),a("el-button",{attrs:{slot:"reference",type:"text"},slot:"reference"},[e._v("删除")])],1)],1)]}}])})],1),e._v(" "),a("el-dialog",{staticClass:"courseMask",attrs:{title:(e.vipStatusFrom.isAdd?"添加":"修改")+"VIP课程形式",width:"500px",visible:e.vipStatus},on:{close:function(t){return e.onVipStatusClose("vipStatus")},"update:visible":function(t){e.vipStatus=t}}},[a("el-form",{ref:"vipStatus",attrs:{model:e.vipStatusFrom}},[a("el-form-item",{attrs:{label:"课程形式",prop:"name",rules:[{required:!0,message:"请输入课程形式",trigger:"blur"}],"label-width":e.formLabelWidth}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.vipStatusFrom.name,callback:function(t){e.$set(e.vipStatusFrom,"name","string"===typeof t?t.trim():t)},expression:"vipStatusFrom.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"课程类型",rules:[{required:!0,message:"请输入课程形式",trigger:"blur"}],"label-width":e.formLabelWidth,prop:"musicTheory"}},[a("el-select",{staticStyle:{width:"100%!important"},model:{value:e.vipStatusFrom.musicTheory,callback:function(t){e.$set(e.vipStatusFrom,"musicTheory",t)},expression:"vipStatusFrom.musicTheory"}},[a("el-option",{attrs:{label:"VIP",value:!1}}),e._v(" "),a("el-option",{attrs:{label:"乐理课",value:!0}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"班级人数",prop:"num",rules:[{required:!0,message:"请输入班级人数",trigger:"blur"},{required:!0,message:"班级人数最大6人",trigger:"blur",pattern:/^[0-6]$/}],"label-width":e.formLabelWidth}},[a("el-input",{attrs:{type:"number",autocomplete:"off"},model:{value:e.vipStatusFrom.num,callback:function(t){e.$set(e.vipStatusFrom,"num","string"===typeof t?t.trim():t)},expression:"vipStatusFrom.num"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"课程课时",prop:"dynamicTags",rules:[{required:!0,message:"请输入课程课时",trigger:"blur, change"}],"label-width":e.formLabelWidth}},[e._l(e.vipStatusFrom.dynamicTags,(function(t,i){return a("el-tag",{key:i,attrs:{effect:"dark",type:"info",closable:"","disable-transitions":!1},on:{close:function(a){return e.handleClose(t)}}},[e._v("\n "+e._s(t)+"\n ")])})),e._v(" "),e.inputVisible?a("el-input",{ref:"saveTagInput",staticClass:"input-new-tag",staticStyle:{width:"100px"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleInputConfirm(t)}},model:{value:e.inputValue,callback:function(t){e.inputValue="string"===typeof t?t.trim():t},expression:"inputValue"}}):e._e(),e._v(" "),e.inputVisible?e._e():a("el-button",{staticClass:"button-new-tag",on:{click:e.showInput}},[e._v("+ 添加")]),e._v(" "),e.inputVisible?a("el-button",{staticClass:"button-new-tag",on:{click:e.handleInputConfirm}},[e._v("保存")]):e._e()],2)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.vipStatus=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.addVipStatus("vipStatus")}}},[e._v("确 定")])],1)],1)],1)},r=[],n=a("c80c"),s=(a("96cf"),a("3b8d")),o=(a("28a5"),a("7f7f"),a("7e78")),l={data:function(){return{leftList:[],vipStatus:!1,formLabelWidth:"120px",inputValue:"",vipStatusFrom:{name:"",num:"",dynamicTags:[],isAdd:!0,musicTheory:!1,id:""},inputVisible:!1}},mounted:function(){this.getVipGroupCategoryList()},methods:{resetGroupCategory:function(e){var t=this.vipStatusFrom;this.vipStatus=!0,this.$nextTick((function(){t.name=e.name,t.timer=e.singleClassMinutes.split(","),t.dynamicTags=e.singleClassMinutes.split(","),t.num=e.studentNum,t.id=e.id,t.isAdd=!1,t.musicTheory=e.musicTheory}))},removeGroupCategory:function(){var e=Object(s["a"])(Object(n["a"])().mark((function e(t){var a=this;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(o["Q"])({id:t.row.id}).then((function(e){200==e.code&&(t._self.$refs[t.row.id].doClose(),a.$message.success("删除成功"),a.getVipGroupCategoryList())}));case 2:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}(),addGroupCategory:function(){this.vipStatus=!0,this.vipStatusFrom.isAdd=!0},showInput:function(){var e=this;this.inputVisible=!0,this.$nextTick((function(t){e.$refs.saveTagInput.$refs.input.focus()}))},onVipStatusClose:function(e){this.inputVisible=!1,this.inputValue="",this.$refs[e].resetFields()},getVipGroupCategoryList:function(){var e=Object(s["a"])(Object(n["a"])().mark((function e(){var t=this;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(o["Z"])().then((function(e){200==e.code&&(t.leftList=e.data)}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),addVipStatus:function(e){var t=this;this.$refs[e].validate(function(){var e=Object(s["a"])(Object(n["a"])().mark((function e(a){var i;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(console.log(a),!a){e.next=10;break}if(i=t.vipStatusFrom,!i.isAdd){e.next=8;break}return e.next=6,Object(o["e"])({name:i.name,singleClassMinutes:i.dynamicTags.join(","),studentNum:i.num,musicTheory:i.musicTheory}).then((function(e){200==e.code&&(t.$message.success("添加成功"),t.getVipGroupCategoryList(),t.vipStatus=!1)}));case 6:e.next=10;break;case 8:return e.next=10,Object(o["U"])({name:i.name,singleClassMinutes:i.dynamicTags.join(","),studentNum:i.num,id:i.id,musicTheory:i.musicTheory}).then((function(e){t.$message.success("修改成功"),t.getVipGroupCategoryList(),t.vipStatus=!1}));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},handleInputConfirm:function(){var e=this.inputValue;e&&this.vipStatusFrom.dynamicTags.push(e),this.inputVisible=!1,this.inputValue=""},handleClose:function(e){this.vipStatusFrom.dynamicTags.splice(this.vipStatusFrom.dynamicTags.indexOf(e),1)}}},c=l,u=(a("8313"),a("2877")),p=Object(u["a"])(c,i,r,!1,null,"146ffc6e",null);t["a"]=p.exports},5220:function(e,t,a){"use strict";a("8120")},5873:function(e,t,a){"use strict";a("f128")},"7f24":function(e,t,a){},8120:function(e,t,a){},8313:function(e,t,a){"use strict";a("06df")},c95c:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",[a("save-form",{ref:"searchForm",staticClass:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,"update:model":function(t){e.searchForm=t}}},[a("el-form-item",{attrs:{prop:"organId"}},[a("el-select",{staticClass:"multiple",staticStyle:{width:"180px !important"},attrs:{filterable:"",placeholder:"请选择分部"},model:{value:e.searchForm.organId,callback:function(t){e.$set(e.searchForm,"organId","string"===typeof t?t.trim():t)},expression:"searchForm.organId"}},e._l(e.selects.branchs,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"primary"}},[e._v("搜索")])],1)],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{staticStyle:{width:"100% !important"},attrs:{data:e.dataList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[a("el-table-column",{attrs:{prop:"name",label:"课程形式"}}),e._v(" "),a("el-table-column",{attrs:{prop:"onlineClassesUnitPrice",label:"线上课单价"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("el-input",{attrs:{disabled:t.row.onlineDis},model:{value:t.row.onlineClassesUnitPrice,callback:function(a){e.$set(t.row,"onlineClassesUnitPrice","string"===typeof a?a.trim():a)},expression:"scope.row.onlineClassesUnitPrice"}},[a("template",{slot:"append"},[e._v("元/节")])],2)],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"offlineClassesUnitPrice",label:"线下课单价"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("el-input",{model:{value:t.row.offlineClassesUnitPrice,callback:function(a){e.$set(t.row,"offlineClassesUnitPrice","string"===typeof a?a.trim():a)},expression:"scope.row.offlineClassesUnitPrice"}},[a("template",{slot:"append"},[e._v("元/节")])],2)],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e.$helpers.permission("vipGroupDefaultClassesUnitPrice/add")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.saveSeting(t.row)}}},[e._v("保存")]):e._e()],1)]}}])})],1)],1)],1)])},r=[],n=(a("ac6a"),a("c80c")),s=(a("386d"),a("96cf"),a("3b8d")),o=a("7e78"),l=(a("1cc7"),a("ce96")),c={name:"vipChargeSeting",data:function(){return{dataList:[],organList:[],searchForm:{organId:null},studentRuleNum:0}},mounted:function(){var e=Object(s["a"])(Object(n["a"])().mark((function e(){var t,a,i,r,s,c;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$store.dispatch("setBranchs");case 2:return i=new l["a"](this.$route.fullPath),r=null===(t=i.searchs[i.key])||void 0===t?void 0:t.form.organId,this.searchForm.organId=r||(null===(a=this.selects)||void 0===a?void 0:a.branchs[0]["id"]),e.prev=5,e.next=8,Object(o["y"])();case 8:s=e.sent,c=JSON.parse(s.data.config),this.studentRuleNum=c.cloud_room_rule.cloud_room_up_limit-1,e.next=16;break;case 13:e.prev=13,e.t0=e["catch"](5),console.log(e.t0);case 16:this.search();case 17:case"end":return e.stop()}}),e,this,[[5,13]])})));function t(){return e.apply(this,arguments)}return t}(),methods:{search:function(){var e=this;this.$refs.searchForm.validate((function(t){e.getList()}))},getList:function(){var e=this;Object(o["Z"])({organId:this.searchForm.organId}).then((function(t){200==t.code&&(e.dataList=t.data,e.dataList.forEach((function(t){t.studentNum>e.studentRuleNum&&(t.onlineDis=!0)})))}))},saveSeting:function(e){var t=this;Object(o["n"])({offlineClassesUnitPrice:e.offlineClassesUnitPrice,onlineClassesUnitPrice:e.onlineClassesUnitPrice,organId:this.searchForm.organId,vipGroupCategoryId:e.id}).then((function(e){200==e.code?t.$message.success("保存成功"):t.$message.error("保存失败,请重试")}))}}},u=c,p=a("2877"),m=Object(p["a"])(u,i,r,!1,null,null,null);t["default"]=m.exports},f128:function(e,t,a){}}]);