chunk-29ad53a6.2bad3db2.js 30 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-29ad53a6"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),Math.easeInOutQuad=function(e,t,r,a){return e/=a/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function i(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function s(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function n(e,t,r){var n=s(),o=e-n,l=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=l;var s=Math.easeInOutQuad(c,n,o,t);i(s),c<t?a(e):r&&"function"===typeof r&&r()};u()}},"4b15":function(e,t,r){},"781b":function(e,t,r){"use strict";r("c7b4")},"80f9":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"m-container"},[r("h2",[r("el-page-header",{attrs:{content:e.title},on:{back:e.onCancel}})],1),e._v(" "),r("div",{staticClass:"m-core"},[r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"activityUserMapper/add",expression:"'activityUserMapper/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.addStudent}},[e._v("添加学员")]),e._v(" "),r("save-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[r("el-form-item",{attrs:{prop:"search"}},[r("el-input",{staticClass:"search",attrs:{clearable:"",placeholder:"学员名称/编号/手机号"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:function(t){t.target.blur(),e.$refs.searchForm.save(),e.search()}(t)}},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(" "),r("el-form-item",{attrs:{prop:"organId"}},[r("el-select",{staticClass:"multiple",staticStyle:{width:"180px !important"},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.organList,(function(e,t){return r("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{"native-type":"submit",type:"primary"}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{"native-type":"reset",type:"danger"}},[e._v("重置")])],1)],1),e._v(" "),r("div",{staticClass:"tableWrap"},[r("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList}},[r("el-table-column",{attrs:{align:"center",prop:"organName",label:"分部"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"userId",label:"学员编号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"username",label:"学员姓名"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"phone",label:"手机号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"付费剩余课时数/总课时数"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.userId?r("div",[e._v("\n "+e._s(t.row.subCourseNum+"/"+t.row.totalCourseNum)+"\n ")]):e._e()]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"赠送剩余课时数/总课时数"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.userId?r("div",[e._v("\n "+e._s(t.row.subGiveCourseNum+"/"+t.row.totalGiveCourseNum)+"\n ")]):e._e()]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"操作",width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"activityUserMapper/add",expression:"'activityUserMapper/add'"}],attrs:{type:"text"},on:{click:function(r){return e.addCount(t.row)}}},[e._v("添加资格")]),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"activityUserMapper/cut",expression:"'activityUserMapper/cut'"}],attrs:{type:"text"},on:{click:function(r){return e.reduceCount(t.row)}}},[e._v("减少资格")]),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"activityUserMapperAdjustLog/queryPage",expression:"'activityUserMapperAdjustLog/queryPage'"}],attrs:{type:"text"},on:{click:function(r){return e.lookInfo(t.row)}}},[e._v("调整记录")])],1)]}}])})],1),e._v(" "),r("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),e._v(" "),e.addStudentVisible?r("el-dialog",{attrs:{title:"添加学员",visible:e.addStudentVisible,width:"1000px"},on:{"update:visible":function(t){e.addStudentVisible=t}}},[r("addStudentSenior",{ref:"addStudentSenior",attrs:{organList:e.organList,hasGive:e.hasGive},on:{getList:e.getList,close:function(t){e.addStudentVisible=!1}}}),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.addStudentVisible=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.submitStudent}},[e._v("确 定")])],1)],1):e._e(),e._v(" "),e.addSeniorVisible?r("el-dialog",{attrs:{title:"添加资格",visible:e.addSeniorVisible,width:"800px"},on:{"update:visible":function(t){e.addSeniorVisible=t}}},[r("addSenior",{ref:"addSenior",attrs:{hasGive:e.hasGive,activeRow:e.activeRow},on:{getList:e.getList,close:function(t){e.addSeniorVisible=!1}}}),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.addSeniorVisible=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.addSeniorSubmit}},[e._v("确 定")])],1)],1):e._e(),e._v(" "),e.reduceVisible?r("el-dialog",{attrs:{title:"减少资格",visible:e.reduceVisible,width:"1000px"},on:{"update:visible":function(t){e.reduceVisible=t}}},[r("reduceSenior",{attrs:{activeRow:e.activeRow,courseType:e.courseType,giveCourseType:e.giveCourseType},on:{getList:e.getList}}),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.reduceVisible=!1}}},[e._v("确 定")])],1)],1):e._e(),e._v(" "),e.infoVisible?r("el-dialog",{attrs:{title:"资格记录",visible:e.infoVisible,width:"1000px"},on:{"update:visible":function(t){e.infoVisible=t}}},[r("seniorInfo",{attrs:{activeRow:e.activeRow}})],1):e._e()],1)},i=[],s=(r("ac6a"),r("c5f6"),r("28a5"),r("7f7f"),r("386d"),r("db72")),n=r("c80c"),o=(r("96cf"),r("3b8d")),l=(r("bc3a"),r("5f87"),r("333d")),c=(r("3908"),r("7e78")),u=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-form",{ref:"form",attrs:{inline:!0,model:e.topForm,"label-width":"110px"}},[r("el-row",[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"学生姓名:"}},[e._v("\n "+e._s(e.topForm.userName)+"\n ")])],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"手机号:"}},[e._v("\n "+e._s(e.topForm.phone)+"\n ")])],1)],1),e._v(" "),r("el-row",[r("el-col",{attrs:{span:12}},[r("el-form-item",{staticStyle:{width:"100%"},attrs:{label:"付费课资格:",prop:"paySeniorNum",rules:[{required:!0,message:"请输入付费课资格数",trigger:"blur"},{pattern:/^(0|\+?[1-9][0-9]*)$/,message:"请输入正确的付费课资格数",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"270px"},model:{value:e.topForm.paySeniorNum,callback:function(t){e.$set(e.topForm,"paySeniorNum",t)},expression:"topForm.paySeniorNum"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[e.hasGive?r("el-form-item",{staticStyle:{width:"100%"},attrs:{prop:"giveSeniorNum",label:"赠课资格:",rules:[{required:!0,message:"请输入赠课资格数",trigger:"blur"},{pattern:/^(0|\+?[1-9][0-9]*)$/,message:"请输入正确的赠课资格数",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"270px"},model:{value:e.topForm.giveSeniorNum,callback:function(t){e.$set(e.topForm,"giveSeniorNum",t)},expression:"topForm.giveSeniorNum"}})],1):e._e()],1)],1),e._v(" "),r("el-row",[r("el-form-item",{attrs:{label:"调整原因:",prop:"memo",rules:[{required:!0,message:"请输入调整原因",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"650px"},attrs:{type:"textarea",maxlength:"50","show-word-limit":"",rows:3},model:{value:e.topForm.memo,callback:function(t){e.$set(e.topForm,"memo",t)},expression:"topForm.memo"}})],1)],1)],1)],1)},p=[],d={props:["hasGive","activeRow"],data:function(){return{topForm:{userName:"",phone:"",paySeniorNum:"",giveSeniorNum:""}}},mounted:function(){var e,t;this.topForm.userName=(null===(e=this.activeRow)||void 0===e?void 0:e.username)||"",this.topForm.phone=(null===(t=this.activeRow)||void 0===t?void 0:t.phone)||""},methods:{submit:function(){var e=this;this.$refs.form.validate(function(){var t=Object(o["a"])(Object(n["a"])().mark((function t(r){var a;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=14;break}return a={activityId:e.$route.query.id,memo:e.topForm.memo,activityStudentAdjustDtos:[{courseNum:e.topForm.paySeniorNum,giveCourseNum:e.topForm.giveSeniorNum,userId:e.activeRow.userId}]},t.prev=2,t.next=5,Object(c["b"])(a);case 5:t.sent,e.$message.success("添加成功"),e.$emit("getList"),e.$emit("close"),t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](2),console.log(t.t0);case 14:case"end":return t.stop()}}),t,null,[[2,11]])})));return function(e){return t.apply(this,arguments)}}())}}},m=d,v=(r("caa9"),r("2877")),f=Object(v["a"])(m,u,p,!1,null,"a7390042",null),b=f.exports,h=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("p",{staticStyle:{color:"red","margin-bottom":"20px"}},[e._v("\n 赠课资格显示“--”说明该活动无赠课\n ")]),e._v(" "),r("div",{staticClass:"tableWrap"},[r("el-table",{ref:"tableList",staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList}},[r("el-table-column",{attrs:{align:"center",prop:"createTime",label:"资格添加时间"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"createTime",label:"添加方式"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v("\n "+e._s(t.row.paymentOrderId?"订单购买":"后台添加")+"\n ")])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"createTime",label:"订单号"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v("\n "+e._s(t.row.paymentOrderId?t.row.paymentOrderId:"--")+"\n ")])]}}])}),e._v(" "),e.courseType&&"VIP"==e.courseType?r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"付费课资格"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.userId?r("div",[t.row.returnFee&&0!=t.row.vipFlag?r("p",[e._v("已退费")]):r("p",[e._v(e._s(e._f("filtersType")(t.row.vipFlag)))])]):e._e()]}}],null,!1,3246606727)}):r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"付费课资格"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.userId?r("div",[t.row.returnFee&&0!=t.row.practiceFlag?r("p",[e._v("已退费")]):r("p",[e._v(e._s(e._f("filtersType")(t.row.practiceFlag)))])]):e._e()]}}])}),e._v(" "),"VIP"==e.giveCourseType?r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"赠课资格"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.userId?r("div",[t.row.returnFee&&0!=t.row.giveVipFlag?r("p",[e._v("已退费")]):r("p",[e._v(e._s(e._f("filtersType")(t.row.giveVipFlag)))])]):e._e()]}}],null,!1,325844551)}):e._e(),e._v(" "),"PRACTICE"==e.giveCourseType?r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"赠课资格"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.userId?r("div",[t.row.returnFee&&0!=t.row.givePracticeFlag?r("p",[e._v("已退费")]):r("p",[e._v(e._s(e._f("filtersType")(t.row.givePracticeFlag)))])]):e._e()]}}],null,!1,626369127)}):e._e(),e._v(" "),"PRACTICE"!=e.giveCourseType&&"VIP"!=e.giveCourseType?r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"赠课资格"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.userId?r("div",[e._v("\n "+e._s("--")+"\n ")]):e._e()]}}],null,!1,2733942482)}):e._e(),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e.showCancle(t.row)?r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.cancleSenior(t.row)}}},[e._v("取消资格")]):e._e()],1)]}}])})],1)],1),e._v(" "),e.cancleVisible?r("el-dialog",{attrs:{title:"取消资格","append-to-body":"",visible:e.cancleVisible,width:"450px"},on:{"update:visible":function(t){e.cancleVisible=t}}},[r("el-form",{ref:"form",attrs:{inline:!0,model:e.form}},[r("el-row",[r("el-form-item",{attrs:{label:"退费金额",prop:"actualPrice",rules:[{required:!0,message:"请输入退费金额",trigger:"blur"},{pattern:/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,message:"请输入正确的金额",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"320px"},model:{value:e.form.actualPrice,callback:function(t){e.$set(e.form,"actualPrice",t)},expression:"form.actualPrice"}})],1)],1),e._v(" "),r("el-row",[r("el-form-item",{attrs:{label:"调整原因",prop:"memo",rules:[{required:!0,message:"请输入调整原因",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"320px"},attrs:{type:"textarea",rows:3,maxlength:"50","show-word-limit":""},model:{value:e.form.memo,callback:function(t){e.$set(e.form,"memo",t)},expression:"form.memo"}})],1)],1)],1),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.cancleVisible=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.submitCancle}},[e._v("确 定")])],1)],1):e._e()],1)},g=[],y={props:["activeRow","courseType","giveCourseType"],data:function(){return{tableList:[],activeSenior:null,cancleVisible:!1,form:{memo:null,actualPrice:null}}},mounted:function(){this.getList()},methods:{getList:function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(){var t;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(c["E"])({activityId:this.$route.query.id,userId:this.activeRow.userId,page:1,rows:9999});case 3:t=e.sent,this.tableList=t.data.rows,e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](0);case 9:case"end":return e.stop()}}),e,this,[[0,7]])})));function t(){return e.apply(this,arguments)}return t}(),cancleSenior:function(e){this.activeSenior=e,this.form.actualPrice=e.actualPrice,this.form.activityUserMapperId=e.id,this.form.memo=null,this.cancleVisible=!0},showCancle:function(e){return!e.returnFee&&2!==e.vipFlag&&2!==e.practiceFlag&&2!==e.givePracticeFlag&&2!==e.giveVipFlag},submitCancle:function(){var e=this;this.$refs.form.validate(function(){var t=Object(o["a"])(Object(n["a"])().mark((function t(r){var a;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=14;break}return a={activityUserMapperId:e.form.activityUserMapperId,amount:e.form.actualPrice,memo:e.form.memo},t.prev=2,t.next=5,Object(c["m"])(a);case 5:t.sent,e.$message.success("取消成功"),e.cancleVisible=!1,e.$emit("getList"),e.getList(),t.next=14;break;case 12:t.prev=12,t.t0=t["catch"](2);case 14:case"end":return t.stop()}}),t,null,[[2,12]])})));return function(e){return t.apply(this,arguments)}}())}},filters:{filtersType:function(e){var t=["--","未使用","已使用"];return t[e]}}},_=y,w=Object(v["a"])(_,h,g,!1,null,"96ee22e6",null),S=w.exports,x=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-alert",{staticClass:"alert",attrs:{title:"资格信息",closable:!1,type:"info"}}),e._v(" "),r("el-form",{ref:"form",attrs:{inline:!0,model:e.topForm,"label-width":"110px"}},[r("el-row",[r("el-col",{attrs:{span:12}},[r("el-form-item",{staticStyle:{width:"100%"},attrs:{label:"付费课资格:",prop:"paySeniorNum",rules:[{required:!0,message:"请输入资格数",trigger:"blur"},{pattern:/^(0|\+?[1-9][0-9]*)$/,message:"请输入正确的资格数",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"370px"},model:{value:e.topForm.paySeniorNum,callback:function(t){e.$set(e.topForm,"paySeniorNum",t)},expression:"topForm.paySeniorNum"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[e.hasGive?r("el-form-item",{attrs:{label:"赠课资格:",rules:[{required:!0,message:"请输入赠课资格数",trigger:"blur"},{pattern:/^(0|\+?[1-9][0-9]*)$/,message:"请输入正确的赠课资格数",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"370px"},model:{value:e.topForm.giveSeniorNum,callback:function(t){e.$set(e.topForm,"giveSeniorNum",t)},expression:"topForm.giveSeniorNum"}})],1):e._e()],1)],1),e._v(" "),r("el-row",[r("el-form-item",{attrs:{label:"备注:",prop:"memo",rules:[{required:!0,message:"请输入备注",trigger:"blur"}]}},[r("el-input",{staticStyle:{width:"370px"},attrs:{type:"textarea",rows:3,maxlength:"50","show-word-limit":""},model:{value:e.topForm.memo,callback:function(t){e.$set(e.topForm,"memo",t)},expression:"topForm.memo"}})],1)],1)],1),e._v(" "),r("el-alert",{staticClass:"alert",attrs:{title:"添加学员",closable:!1,type:"info"}}),e._v(" "),r("el-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search}},[r("el-form-item",{attrs:{prop:"search"}},[r("el-input",{staticClass:"search",attrs:{type:"text",clearable:"",placeholder:"学员名称/编号/手机号"},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search",t)},expression:"searchForm.search"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"organId"}},[r("el-select",{staticClass:"multiple",staticStyle:{width:"180px !important"},attrs:{filterable:"",clearable:"",multiple:"",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.organList,(function(e,t){return r("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"subjectId"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"声部"},model:{value:e.searchForm.subjectId,callback:function(t){e.$set(e.searchForm,"subjectId",t)},expression:"searchForm.subjectId"}},e._l(e.selects.subjects,(function(e){return r("el-option",{key:e.id,attrs:{value:e.id,label:e.name}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"hasMusicCourse"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"是否乐团在读"},model:{value:e.searchForm.hasMusicCourse,callback:function(t){e.$set(e.searchForm,"hasMusicCourse",t)},expression:"searchForm.hasMusicCourse"}},[r("el-option",{attrs:{value:"1",label:"是"}}),e._v(" "),r("el-option",{attrs:{value:"0",label:"否"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"hasVipCourse"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"是否vip在读"},model:{value:e.searchForm.hasVipCourse,callback:function(t){e.$set(e.searchForm,"hasVipCourse",t)},expression:"searchForm.hasVipCourse"}},[r("el-option",{attrs:{value:"1",label:"是"}}),e._v(" "),r("el-option",{attrs:{value:"0",label:"否"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"hasPracticeCourse"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"是否网管课在读"},model:{value:e.searchForm.hasPracticeCourse,callback:function(t){e.$set(e.searchForm,"hasPracticeCourse",t)},expression:"searchForm.hasPracticeCourse"}},[r("el-option",{attrs:{value:"1",label:"是"}}),e._v(" "),r("el-option",{attrs:{value:"0",label:"否"}})],1)],1),e._v(" "),r("el-form-item",{attrs:{prop:"hasMember"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"是否会员"},model:{value:e.searchForm.hasMember,callback:function(t){e.$set(e.searchForm,"hasMember",t)},expression:"searchForm.hasMember"}},[r("el-option",{attrs:{value:"1",label:"是"}}),e._v(" "),r("el-option",{attrs:{value:"0",label:"否"}})],1)],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"danger"},on:{click:e.search}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{"native-type":"reset",type:"primary"},on:{click:e.onReSet}},[e._v("重置")])],1)],1),e._v(" "),r("div",{staticClass:"tableWrap"},[r("el-table",{ref:"tableList",staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList,"row-key":"userId"},on:{"selection-change":e.handleSelectionChange,select:e.onTableSelect}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"organName",label:"分部"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"userId",label:"学员编号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"username",label:"学员姓名"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"phone",label:"手机号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"subjectNames",label:"声部"}})],1),e._v(" "),r("pagination",{attrs:{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)},"update:pageSizes":function(t){return e.$set(e.rules,"page_size",t)},"update:page-sizes":function(t){return e.$set(e.rules,"page_size",t)},pagination:e.getList}})],1)],1)},F=[],k=r("a8db"),I=["organId"],$={components:{pagination:l["a"]},props:["organList","hasGive"],data:function(){return{topForm:{paySeniorNum:null,giveSeniorNum:null,memo:""},searchForm:{search:null,organId:this.organList.map((function(e){return e.id})),subjectId:null,hasMember:null,hasMusicCourse:null,hasPracticeCourse:null,hasVipCourse:null},tableList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},isDetele:!1,deleteList:[]}},mounted:function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(){return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$store.dispatch("setSubjects");case 2:this.getList();case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{search:function(){this.rules.page=1,this.getList()},onReSet:function(){this.$refs.searchForm.resetFields(),this.search()},getList:function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(){var t,r,a,i,o,l,u=this;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t=this.searchForm,r=t.organId,a=Object(k["a"])(t,I),i=Object(s["a"])(Object(s["a"])({},a),{},{page:this.rules.page,rows:this.rules.limit,organId:r.join(",")}),e.next=5,Object(c["B"])(i);case 5:o=e.sent,this.tableList=o.data.rows,this.rules.total=o.data.total,l=this.deleteList.map((function(e){return e.userId})),this.isDetele=!0,this.$nextTick((function(){u.tableList.forEach((function(e){-1!=l.indexOf(e.userId)&&(console.log(e),u.$refs.tableList.toggleRowSelection(e,!0))})),u.isDetele=!1})),e.next=16;break;case 13:e.prev=13,e.t0=e["catch"](0),console.log(e.t0);case 16:case"end":return e.stop()}}),e,this,[[0,13]])})));function t(){return e.apply(this,arguments)}return t}(),handleSelectionChange:function(e){var t=this;if(e.length>0)this.deleteList=this.deleteList.concat(e),this.deleteList=this.$helpers.lodash.uniqBy(this.deleteList,"userId");else{if(this.isDetele)return;var r=this.deleteList.map((function(e){return e.userId}));this.$nextTick((function(){var e=[];t.tableList.forEach((function(a){e.push(a.userId),-1!=r.indexOf(a.userId)&&t.$refs.tableList.toggleRowSelection(a,!1)})),t.deleteList=t.$helpers.lodash.remove(t.deleteList,(function(t){return-1==e.indexOf(t.userId)})),t.deleteList.length<=0&&t.clearCom()}))}},onTableSelect:function(e,t){var r=this.deleteList.map((function(e){return e.userId}));-1!=r.indexOf(t.userId)&&(this.deleteList.splice(r.indexOf(t.userId),1),this.deleteList.length<=0&&this.clearCom())},clearCom:function(){this.$set(this,"deleteList",[]),this.$refs.tableList.clearSelection()},submit:function(){var e=Object(o["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:this.$refs.form.validate(function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(r){var a,i;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=16;break}return a={activityId:t.$route.query.id,memo:t.topForm.memo},i=t.deleteList.map((function(e){return{userId:e.userId,courseNum:t.topForm.paySeniorNum,giveCourseNum:t.topForm.giveSeniorNum}})),a.activityStudentAdjustDtos=i,e.prev=4,e.next=7,Object(c["b"])(a);case 7:e.sent,t.$message.success("添加成功"),t.$emit("getList"),t.$emit("close"),e.next=16;break;case 13:e.prev=13,e.t0=e["catch"](4),console.log(e.t0);case 16:case"end":return e.stop()}}),e,null,[[4,13]])})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}},C=$,L=(r("781b"),Object(v["a"])(C,x,F,!1,null,"4320fec7",null)),j=L.exports,O=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList}},[r("el-table-column",{attrs:{align:"center",prop:"operatorName",label:"操作人"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"createTime",label:"操作时间"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"operatorName",label:"类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v("\n "+e._s(t.row.type?"添加资格":"减少资格")+"\n ")])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"courseNum",label:"付费资格数"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"giveCourseNum",label:"赠课资格数"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"备注"},scopedSlots:e._u([{key:"default",fn:function(e){return[r("div",[r("overflow-text",{attrs:{text:e.row.memo}})],1)]}}])})],1)],1)},N=[],V={props:["activeRow"],data:function(){return{tableList:[]}},mounted:function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(){var t;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(c["a"])({rows:9999,page:1,userId:this.activeRow.userId,activityId:this.$route.query.id});case 3:t=e.sent,this.tableList=t.data.rows,e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));function t(){return e.apply(this,arguments)}return t}(),methods:{}},T=V,R=Object(v["a"])(T,O,N,!1,null,null,null),E=R.exports,M={components:{pagination:l["a"],addSenior:b,reduceSenior:S,addStudentSenior:j,seniorInfo:E},data:function(){return{searchForm:{search:null,organId:null},title:"",tableList:[{}],organList:[],activeRow:null,hasGive:!1,addStudentVisible:!1,addSeniorVisible:!1,reduceVisible:!1,infoVisible:!1,courseType:"",giveCourseType:"",rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},created:function(){},mounted:function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(){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:this.init();case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{init:function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(){var t;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!this.$route.query.id){e.next=11;break}return e.prev=1,e.next=4,Object(c["G"])({id:this.$route.query.id});case 4:t=e.sent,this.formatDetail(t.data),e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](1),console.log(e.t0);case 11:this.getList();case 12:case"end":return e.stop()}}),e,this,[[1,8]])})));function t(){return e.apply(this,arguments)}return t}(),getList:function(){var e=Object(o["a"])(Object(n["a"])().mark((function e(){var t;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(c["v"])(Object(s["a"])(Object(s["a"])({},this.searchForm),{},{page:this.rules.page,rows:this.rules.limit,activityId:this.$route.query.id}));case 3:t=e.sent,this.tableList=t.data.rows,this.rules.total=t.data.total,e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),console.log(e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),search:function(){this.rules.page=1,this.getList()},onReSet:function(){this.$refs.searchForm.resetFields(),this.search()},onCancel:function(){this.$store.dispatch("delVisitedViews",this.$route),this.$router.push({path:"/vipActiveManager/vipActiveList",query:{rules:this.rules,searchForm:this.searchForm}})},formatDetail:function(e){var t=this;this.title=e.name;var r=e.organId.split(",").map((function(e){return Number(e)}));this.organList=[],this.selects.branchs.forEach((function(e){-1!=r.indexOf(e.id)&&t.organList.push(e)})),this.hasGive=Boolean(e.giveCourseType&&"MEMBER"!=e.giveCourseType),this.courseType=e.courseType,this.giveCourseType=e.giveCourseType,console.log(this.courseType,this.giveCourseType)},addCount:function(e){this.activeRow=e,this.addSeniorVisible=!0},reduceCount:function(e){this.activeRow=e,this.reduceVisible=!0},addStudent:function(){this.addStudentVisible=!0},submitStudent:function(){this.$refs.addStudentSenior.submit()},addSeniorSubmit:function(){this.$refs.addSenior.submit()},lookInfo:function(e){this.activeRow=e,this.infoVisible=!0}}},P=M,q=(r("b70c"),Object(v["a"])(P,a,i,!1,null,"82dfa35c",null));t["default"]=q.exports},b70c:function(e,t,r){"use strict";r("4b15")},c7b4:function(e,t,r){},caa9:function(e,t,r){"use strict";r("ffd5")},ffd5:function(e,t,r){}}]);