chunk-3d31c8c8.a73e96d7.js 15 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3d31c8c8"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),Math.easeInOutQuad=function(e,t,a,n){return e/=n/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function r(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(e,t,a){var i=o(),s=e-i,l=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=l;var o=Math.easeInOutQuad(c,i,s,t);r(o),c<t?n(e):a&&"function"===typeof a&&a()};u()}},"8e19":function(e,t,a){"use strict";a.r(t);var n=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("save-form",{staticClass:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[a("el-form-item",[a("el-input",{attrs:{clearable:"",placeholder:"课程名称"},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search","string"===typeof t?t.trim():t)},expression:"searchForm.search"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"orgin"}},[a("el-select",{staticClass:"multiple",attrs:{filterable:"",clearable:"",placeholder:"请选择分部"},model:{value:e.searchForm.orgin,callback:function(t){e.$set(e.searchForm,"orgin","string"===typeof t?t.trim():t)},expression:"searchForm.orgin"}},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:{prop:"status"}},[a("el-select",{staticClass:"multiple",attrs:{filterable:"",clearable:"",placeholder:"请选课程状态"},model:{value:e.searchForm.status,callback:function(t){e.$set(e.searchForm,"status","string"===typeof t?t.trim():t)},expression:"searchForm.status"}},e._l(e.statusList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.lable,value:e.value}})})),1)],1),e._v(" "),a("el-form-item",[a("remote-search",{attrs:{commit:"setTeachers",isForzenWithQueryCondition:!0},model:{value:e.searchForm.teacherId,callback:function(t){e.$set(e.searchForm,"teacherId",t)},expression:"searchForm.teacherId"}})],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"活动方案"},model:{value:e.searchForm.activityId,callback:function(t){e.$set(e.searchForm,"activityId","string"===typeof t?t.trim():t)},expression:"searchForm.activityId"}},e._l(e.activeList,(function(e,t){return a("el-option",{key:t,attrs:{value:e.id,label:e.name}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"status"}},[a("el-select",{staticClass:"multiple",attrs:{filterable:"",clearable:"",placeholder:"是否有乐团主管"},model:{value:e.searchForm.hasEducationalTeacherId,callback:function(t){e.$set(e.searchForm,"hasEducationalTeacherId","string"===typeof t?t.trim():t)},expression:"searchForm.hasEducationalTeacherId"}},[a("el-option",{attrs:{label:"是",value:"true"}}),e._v(" "),a("el-option",{attrs:{label:"否",value:"false"}})],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:"/buildVip",expression:"'/buildVip'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.gotoBuildVip}},[e._v("\n 新建\n ")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"export/vipGroupList",expression:"'export/vipGroupList'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.onVIPCourseExport}},[e._v("\n 导出\n ")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"export/vipGroup",expression:"'export/vipGroup'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.onStudentExport}},[e._v("\n 课程续费提醒导出\n ")]),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableData}},[a("el-table-column",{attrs:{align:"center",width:"120px",prop:"id",label:"课程组编号"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("copy-text",[e._v(e._s(t.row.id))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",width:"200px",prop:"name",label:"课程名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("copy-text",[e._v(e._s(t.row.name))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"name",label:"分部名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("copy-text",[e._v(e._s(t.row.organName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"userName",label:"指导老师",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("copy-text",[e._v(e._s(t.row.userName))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"vipGroupCategoryName",label:"课程形式"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"status",label:"课程状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("formatterStatus")(t.row.status)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"educationalTeacherName",label:"乐团主管"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"studentNum",label:"班级人数"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"vipGroupActivityName",label:"活动方案"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("overflow-text",{attrs:{text:e.row.vipGroupActivityName,width:"100%"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"当前课次"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v("\n "+e._s(t.row.currentClassTimes+"/"+t.row.totalClassTimes)+"\n ")])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"月均消耗"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.monthConsumeRate)+"%")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"createTime",label:"上次课时间",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(e._f("formatterTime")(t.row.lastOverTime)))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"paymentExpireDate",label:"开课时间",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(e._f("formatterTime")(t.row.courseStartDate)))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"coursesExpireDate",label:"结束时间",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(e._f("formatterTime")(t.row.coursesExpireDate)))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"createTime",label:"申请时间",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(e._f("formatterTime")(t.row.createTime)))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"stopReason",label:"备注"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",width:"150px",fixed:"right",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e.permission("/vipDetail")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.gotoVipDetail(t.row)}}},[e._v("详情")]):e._e(),e._v(" "),t.row.status<3&&1!=t.row.enableDelete&&e.permission("vipGroupManage/stopVipGroup")?a("el-popover",{ref:t.$index,attrs:{placement:"top",width:"160"}},[a("p",{staticStyle:{"margin-bottom":"10px"}},[e._v("确定停止该vip课?")]),e._v(" "),a("el-input",{attrs:{placeholder:"请输入关闭原因"},model:{value:e.stopReason,callback:function(t){e.stopReason="string"===typeof t?t.trim():t},expression:"stopReason"}}),e._v(" "),a("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onCancelVip(t)}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(a){return e.closeVip(t)}}},[e._v("确定")])],1),e._v(" "),a("el-button",{attrs:{slot:"reference",type:"text"},slot:"reference"},[e._v("停止")])],1):e._e(),e._v(" "),1==t.row.enableDelete&&e.permission("vipGroupManage/deleteVipGroup")?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.onVipDelete(t.row)}}},[e._v("删除")]):e._e(),e._v(" "),"乐理课"==t.row.vipGroupCategoryName&&e.permission("vipGroupManage/update")&&1==t.row.status?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.isStartCourse(t.row)}}},[e._v("确认成课")]):e._e()],1)]}}])})],1),e._v(" "),a("pagination",{attrs:{sync:"",total:e.rules.total,page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:total":function(t){return e.$set(e.rules,"total",t)},"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}})],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 VIP管理\n ")])}],o=(a("28a5"),a("7f7f"),a("386d"),a("333d")),i=a("7e78"),s=a("1cc7"),l=(a("4360"),a("bc3a")),c=a.n(l),u=a("5f87"),p=a("3908"),d=a("ec8a"),m={components:{pagination:o["a"]},name:"vipList",data:function(){return{organId:null,searchForm:{teacherId:null,activityId:null,search:null,orgin:null,status:null,hasEducationalTeacherId:null},teacherList:[],activeList:[],tableData:[],organList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},statusList:[{lable:"未开始",value:"0"},{lable:"报名中",value:"1"},{lable:"报名结束",value:"5"},{lable:"进行中",value:"2"},{lable:"已结束",value:"4"},{lable:"取消",value:"3"},{lable:"暂停",value:"6"}],stopReason:null}},created:function(){},mounted:function(){var e=this.$route.query;e.search&&(this.searchForm.search=e.search),this.init()},activated:function(){this.init()},methods:{init:function(){var e=this;Object(s["gb"])().then((function(t){200==t.code&&(e.organList=t.data)})),Object(i["Y"])({organId:this.organId,rows:9999}).then((function(t){200==t.code&&(e.activeList=t.data.rows)})),this.getList()},search:function(){this.rules.page=1,this.getList()},onReSet:function(){this.searchForm={teacherId:null,activityId:null,search:null,orgin:null,status:null},this.getList()},getList:function(){var e=this,t=this.searchForm;t.page=this.rules.page,t.rows=this.rules.limit,t.hasEducationalTeacherId=this.searchForm.hasEducationalTeacherId||null,t.organId=this.searchForm.orgin||null,t.status=this.searchForm.status||null,t.groupType="VIP",Object(i["L"])(t).then((function(t){200==t.code&&(setTimeout((function(){e.tableData=t.data.rows}),50),e.rules.total=t.data.total)}))},gotoVipDetail:function(e){var t=e.id,a=e.organId,n=e.educationalTeacherId,r=e.userId,o=(JSON.stringify(this.rules),JSON.stringify(this.searchForm),e.name),i=e.coursesExpireDate,s=e.courseStartDate;this.$router.push({path:"/business/vipDetail",query:{id:t,educationalTeacherId:n,organId:a,userId:r,name:o,endTimeStr:i,startTimeStr:s}})},closeVip:function(e){var t=this,a=e.row.id;Object(i["j"])({vipGroupId:a,stopReason:this.stopReason}).then((function(a){200==a.code&&(t.$message.success("停止课程成功"),e._self.$refs[e.$index].doClose(),t.getList())}))},onCancelVip:function(e){this.stopReason=null,e._self.$refs[e.$index].doClose()},gotoBuildVip:function(){this.$router.push({path:"/business/buildVip"})},onVIPCourseExport:function(){var e=this,t=this.searchForm,a={teacherId:t.teacherId||null,activityId:t.activityId||null,organId:t.orgin||null,status:t.status||null,search:t.search||null},n="/api-web/export/vipGroupList",r={method:"get",headers:{Authorization:Object(u["b"])(),tenantId:Object(u["a"])()},params:a,url:n,responseType:"blob"};this.$confirm("您确定导出VIP课吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){p["a"].startLoading(),c()(r).then((function(t){var a=new Blob([t.data],{type:"application/vnd.ms-excel;charset=utf-8"}),n=new Response(a).text();n.then((function(t){if(-1!=t.indexOf("code")){var n=JSON.parse(t);if(403==n.code)return e.$message.error("登录过期,请重新登录!"),void setTimeout((function(){e.$store.dispatch("user/resetToken").then((function(){location.reload()}))}),1e3);e.$message.error(n.msg)}else{var r=URL.createObjectURL(a),o=document.createElement("a"),i="VIP列表"+(new Date).getTime()+".xls";o.href=r,o.setAttribute("download",i),document.body.appendChild(o),o.click()}})),p["a"].endLoading()})).catch((function(t){e.$message.error("导出数据失败,请联系管理员"),p["a"].endLoading()}))})).catch((function(){}))},onStudentExport:function(){var e=this,t={},a="/api-web/export/vipGroup",n={method:"get",headers:{Authorization:Object(u["b"])(),tenantId:Object(u["a"])()},params:t,url:a,responseType:"blob"};this.$confirm("VIP课程续费提醒导出?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){p["a"].startLoading(),c()(n).then((function(t){var a=new Blob([t.data],{type:"application/vnd.ms-excel;charset=utf-8"}),n=new Response(a).text();n.then((function(t){if(-1!=t.indexOf("code")){var n=JSON.parse(t);if(403==n.code)return e.$message.error("登录过期,请重新登录!"),void setTimeout((function(){e.$store.dispatch("user/resetToken").then((function(){location.reload()}))}),1e3);e.$message.error(n.msg)}else{var r=URL.createObjectURL(a),o=document.createElement("a"),i="VIP课程续费提醒"+(new Date).getTime()+".xls";o.href=r,o.setAttribute("download",i),document.body.appendChild(o),o.click()}})),p["a"].endLoading()})).catch((function(t){e.$message.error("导出数据失败,请联系管理员"),p["a"].endLoading()}))})).catch((function(){}))},resetVip:function(e){var t=e.id,a=e.organId,n=e.educationalTeacherId,r=e.userId,o=(JSON.stringify(this.rules),JSON.stringify(this.searchForm),e.name),i=e.coursesExpireDate,s=e.courseStartDate;this.$router.push({path:"/business/vipReset",query:{id:t,educationalTeacherId:n,organId:a,userId:r,name:o,endTimeStr:i,startTimeStr:s}})},onVipDelete:function(e){var t=this;this.$confirm("您确定删除该VIP课吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(i["o"])({vipGroupId:e.id}).then((function(e){200==e.code&&(t.$message.success("删除成功"),t.getList())}))})).catch((function(){}))},permission:function(e){return Object(d["a"])(e)},isStartCourse:function(e){var t=this;this.$confirm("确定开启乐理课","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(i["bb"])({id:e.id,status:"PROGRESS"}).then((function(e){200==e.code&&(t.$message.success("提交成功"),t.getList())}))})).catch((function(){}))}},filters:{formatterTime:function(e){var t;return t=e?e.split(" ")[0]:"",t},formatterStatus:function(e){var t=["未开始","报名中","进行中","取消","已结束","报名结束","暂停"];return t[e]}}},f=m,h=(a("a7b1"),a("2877")),v=Object(h["a"])(f,n,r,!1,null,"8023f1ba",null);t["default"]=v.exports},a7b1:function(e,t,a){"use strict";a("f377")},f377:function(e,t,a){}}]);