1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6fcb0e01"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),Math.easeInOutQuad=function(e,t,r,s){return e/=s/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var s=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function n(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(e,t,r){var o=n(),i=e-o,l=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=l;var n=Math.easeInOutQuad(c,o,i,t);a(n),c<t?s(e):r&&"function"===typeof r&&r()};u()}},"0a7d":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"i",(function(){return n})),r.d(t,"g",(function(){return o})),r.d(t,"c",(function(){return i})),r.d(t,"h",(function(){return l})),r.d(t,"d",(function(){return c})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return p})),r.d(t,"b",(function(){return d})),r.d(t,"j",(function(){return h}));var s=r("829b"),a=(r("4328"),function(e){return Object(s["a"])({url:"/api-web/sysCoupon/add",data:e,method:"post",requestType:"form"})}),n=function(e){return Object(s["a"])({url:"/api-web/sysCoupon/updateCoupon",data:e,method:"post",requestType:"form"})},o=function(e){return Object(s["a"])({url:"/api-web/sysCoupon/queryPage",data:e,params:e,method:"get"})},i=function(e){return Object(s["a"])({url:"/api-web/sysCoupon/delete",data:e,method:"post",requestType:"form"})},l=function(e){return Object(s["a"])({url:"/api-web/sysCouponCode/queryPage",data:e,params:e,method:"get"})},c=function(e){return Object(s["a"])({url:"/api-web/sysCouponIssue/issueCoupon",data:e,method:"post"})},u=function(e){return Object(s["a"])({url:"/api-web/sysCouponIssue/queryIssueRecord",data:e,method:"post"})},p=function(e){return Object(s["a"])({url:"/api-web/sysCouponIssue/queryIssueDetail",data:e,method:"post"})},d=function(e){return Object(s["a"])({url:"/api-web/sysCouponIssue/checkRevoke",data:e,method:"post"})},h=function(e){return Object(s["a"])({url:"/api-web/sysCouponIssue/revokeCoupon",data:e,method:"post"})}},ff37:function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{},[r("div",{staticClass:"m-core"},[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.selects.branchs,(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("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.cancelChiose}},[e._v("取消选择")]),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)])},a=[],n=(r("ac6a"),r("db72")),o=r("a8db"),i=(r("386d"),r("c80c")),l=(r("7f7f"),r("96cf"),r("3b8d")),c=r("333d"),u=r("7e78"),p=r("0a7d"),d=["organId"],h={props:["activeRow"],components:{pagination:c["a"]},data:function(){return{searchForm:{search:null,organId:[],subjectId:null,hasMember:null,hasMusicCourse:null,hasPracticeCourse:null,hasVipCourse:null},tableList:[],organList:[],title:"",rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},isDetele:!1,deleteList:[]}},created:function(){},mounted:function(){var e=Object(l["a"])(Object(i["a"])().mark((function e(){return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.$route.query.row&&(this.activeRow=JSON.parse(this.$route.query.row),this.title=this.activeRow.name),e.next=3,this.$store.dispatch("setBranchs");case 3:return e.next=5,this.$store.dispatch("setSubjects");case 5:this.getList();case 6: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(l["a"])(Object(i["a"])().mark((function e(){var t,r,s,a,l,c,p=this;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t=this.searchForm,r=t.organId,s=Object(o["a"])(t,d),a=Object(n["a"])(Object(n["a"])({},s),{},{page:this.rules.page,rows:this.rules.limit,organId:r.join(",")}),e.next=5,Object(u["B"])(a);case 5:l=e.sent,this.tableList=l.data.rows,this.rules.total=l.data.total,c=this.deleteList.map((function(e){return e.userId})),this.isDetele=!0,this.$nextTick((function(){p.tableList.forEach((function(e){-1!=c.indexOf(e.userId)&&(console.log(e),p.$refs.tableList.toggleRowSelection(e,!0))})),p.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(s){e.push(s.userId),-1!=r.indexOf(s.userId)&&t.$refs.tableList.toggleRowSelection(s,!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()},cancelChiose:function(){this.clearCom()},submit:function(){var e=this;console.log(this.deleteList);var t={},r=this.deleteList.map((function(e){return e.username})).join(",");t.couponId=this.activeRow.id,t.studentIds=this.deleteList.map((function(e){return e.userId})).join(","),this.$confirm("是否给以下".concat(r," ").concat(this.deleteList.length,"名发放优惠券"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var r=Object(l["a"])(Object(i["a"])().mark((function r(s){return Object(i["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,Object(p["d"])(t);case 3:r.sent,e.$message.success("发放成功"),e.$emit("getList"),e.$emit("close"),r.next=12;break;case 9:r.prev=9,r.t0=r["catch"](0),console.log(r.t0);case 12:case"end":return r.stop()}}),r,null,[[0,9]])})));return function(e){return r.apply(this,arguments)}}())}}},m=h,f=r("2877"),b=Object(f["a"])(m,s,a,!1,null,"33d77431",null);t["default"]=b.exports}}]);
|