chunk-1eb3ee4d.c2ab171e.js 44 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1eb3ee4d","chunk-6fcb0e01"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),Math.easeInOutQuad=function(e,t,a,l){return e/=l/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var l=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function n(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(e,t,a){var o=r(),s=e-o,u=20,i=0;t="undefined"===typeof t?500:t;var c=function e(){i+=u;var r=Math.easeInOutQuad(i,o,s,t);n(r),i<t?l(e):a&&"function"===typeof a&&a()};c()}},"0a7d":function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"i",(function(){return r})),a.d(t,"g",(function(){return o})),a.d(t,"c",(function(){return s})),a.d(t,"h",(function(){return u})),a.d(t,"d",(function(){return i})),a.d(t,"e",(function(){return c})),a.d(t,"f",(function(){return p})),a.d(t,"b",(function(){return v})),a.d(t,"j",(function(){return d}));var l=a("829b"),n=(a("4328"),function(e){return Object(l["a"])({url:"/api-web/sysCoupon/add",data:e,method:"post",requestType:"form"})}),r=function(e){return Object(l["a"])({url:"/api-web/sysCoupon/updateCoupon",data:e,method:"post",requestType:"form"})},o=function(e){return Object(l["a"])({url:"/api-web/sysCoupon/queryPage",data:e,params:e,method:"get"})},s=function(e){return Object(l["a"])({url:"/api-web/sysCoupon/delete",data:e,method:"post",requestType:"form"})},u=function(e){return Object(l["a"])({url:"/api-web/sysCouponCode/queryPage",data:e,params:e,method:"get"})},i=function(e){return Object(l["a"])({url:"/api-web/sysCouponIssue/issueCoupon",data:e,method:"post"})},c=function(e){return Object(l["a"])({url:"/api-web/sysCouponIssue/queryIssueRecord",data:e,method:"post"})},p=function(e){return Object(l["a"])({url:"/api-web/sysCouponIssue/queryIssueDetail",data:e,method:"post"})},v=function(e){return Object(l["a"])({url:"/api-web/sysCouponIssue/checkRevoke",data:e,method:"post"})},d=function(e){return Object(l["a"])({url:"/api-web/sysCouponIssue/revokeCoupon",data:e,method:"post"})}},"1d61":function(e,t,a){},"36af":function(e,t,a){"use strict";a("1d61")},"92e3":function(e,t,a){"use strict";a.d(t,"u",(function(){return u})),a.d(t,"H",(function(){return i})),a.d(t,"s",(function(){return c})),a.d(t,"c",(function(){return p})),a.d(t,"D",(function(){return v})),a.d(t,"Y",(function(){return d})),a.d(t,"X",(function(){return b})),a.d(t,"d",(function(){return f})),a.d(t,"L",(function(){return h})),a.d(t,"w",(function(){return m})),a.d(t,"ab",(function(){return _})),a.d(t,"t",(function(){return g})),a.d(t,"o",(function(){return y})),a.d(t,"Z",(function(){return C})),a.d(t,"P",(function(){return w})),a.d(t,"cb",(function(){return O})),a.d(t,"db",(function(){return E})),a.d(t,"O",(function(){return I})),a.d(t,"T",(function(){return S})),a.d(t,"B",(function(){return L})),a.d(t,"l",(function(){return T})),a.d(t,"W",(function(){return k})),a.d(t,"bb",(function(){return x})),a.d(t,"I",(function(){return R})),a.d(t,"m",(function(){return j})),a.d(t,"v",(function(){return N})),a.d(t,"M",(function(){return F})),a.d(t,"f",(function(){return A})),a.d(t,"e",(function(){return $})),a.d(t,"K",(function(){return M})),a.d(t,"J",(function(){return D})),a.d(t,"S",(function(){return V})),a.d(t,"G",(function(){return G})),a.d(t,"a",(function(){return U})),a.d(t,"x",(function(){return P})),a.d(t,"p",(function(){return z})),a.d(t,"n",(function(){return B})),a.d(t,"q",(function(){return H})),a.d(t,"g",(function(){return q})),a.d(t,"F",(function(){return Y})),a.d(t,"r",(function(){return X})),a.d(t,"C",(function(){return W})),a.d(t,"A",(function(){return J})),a.d(t,"z",(function(){return K})),a.d(t,"h",(function(){return Q})),a.d(t,"k",(function(){return Z})),a.d(t,"i",(function(){return ee})),a.d(t,"j",(function(){return te})),a.d(t,"R",(function(){return ae})),a.d(t,"N",(function(){return le})),a.d(t,"E",(function(){return ne})),a.d(t,"y",(function(){return re})),a.d(t,"Q",(function(){return oe})),a.d(t,"U",(function(){return se})),a.d(t,"V",(function(){return ue})),a.d(t,"b",(function(){return ce}));var l=a("2d63"),n=a("768b"),r=a("267e"),o=sessionStorage.getItem("tenantConfig");o=o?JSON.parse(o):{};var s=o.tenantId,u=null,i=null;1==s?(i=[{label:"声部课",value:"SINGLE"},{label:"合奏课",value:"MIX"},{label:"基础技能课",value:"HIGH"},{label:"线上基础技能课",value:"HIGH_ONLINE"},{label:"乐团网管课",value:"MUSIC_NETWORK"},{label:"集训声部课",value:"TRAINING_SINGLE"},{label:"集训合奏课",value:"TRAINING_MIX"},{label:"课堂课",value:"CLASSROOM"},{label:"综合课",value:"COMPREHENSIVE"}],u=[{label:"声部课",value:"SINGLE"},{label:"合奏课",value:"MIX"},{label:"基础技能课",value:"HIGH"},{label:"线上基础技能课",value:"HIGH_ONLINE"},{label:"vip课",value:"VIP"},{label:"试听课",value:"DEMO"},{label:"综合课",value:"COMPREHENSIVE"},{label:"网管课",value:"PRACTICE"},{label:"乐团网管课",value:"MUSIC_NETWORK"},{label:"启蒙课",value:"ENLIGHTENMENT"},{label:"集训声部课",value:"TRAINING_SINGLE"},{label:"集训合奏课",value:"TRAINING_MIX"},{label:"课堂课",value:"CLASSROOM"},{label:"对外课",value:"COMM"},{label:"直播课",value:"LIVE"}]):(i=[{label:"声部课",value:"SINGLE"},{label:"合奏课",value:"MIX"},{label:"基础技能课",value:"HIGH"},{label:"集训声部课",value:"TRAINING_SINGLE"},{label:"集训合奏课",value:"TRAINING_MIX"},{label:"课堂课",value:"CLASSROOM"},{label:"综合课",value:"COMPREHENSIVE"}],u=[{label:"声部课",value:"SINGLE"},{label:"合奏课",value:"MIX"},{label:"vip课",value:"VIP"},{label:"试听课",value:"DEMO"},{label:"综合课",value:"COMPREHENSIVE"},{label:"网管课",value:"PRACTICE"},{label:"启蒙课",value:"ENLIGHTENMENT"},{label:"集训声部课",value:"TRAINING_SINGLE"},{label:"集训合奏课",value:"TRAINING_MIX"},{label:"课堂课",value:"CLASSROOM"},{label:"对外课",value:"COMM"},{label:"直播课",value:"LIVE"}]);var c=[{label:"乐团课",value:"MUSIC"},{label:"VIP课",value:"VIP"},{label:"网管课",value:"PRACTICE"},{label:"直播课",value:"LIVE"}],p=[{label:"正常签到",value:1},{label:"异常签到",value:0}],v=[{label:"兼职",value:"PART_TIME"},{label:"全职",value:"FULL_TIME"},{label:"劳务",value:"LABOUR"}],d=[{label:"正常",value:"0"},{label:"冻结",value:"1"},{label:"锁定",value:"9"}],b=[{value:"NORMAL",label:"正常"},{value:"TRUANT",label:"旷课"},{value:"LEAVE",label:"请假"}],f=[].concat(b,[{value:"QUIT_SCHOOL",label:"休学"},{value:"DROP_OUT",label:"退学"},{value:"LATE",label:"迟到"}]),h=[{value:"APPLY",label:"报名"},{value:"RENEW",label:"续费"},{value:"MEMBER",label:"会员购买"},{value:"SMALL_CLASS_TO_BUY",label:"VIP购买"},{value:"SPORADIC",label:"零星收费"},{value:"LUCK",label:"福袋活动"},{value:"DEGREE_REGISTRATION",label:"考级报名"},{value:"DOUBLE_ELEVEN2020",label:"2020双十一活动"},{value:"DOUBLE_ELEVEN2021",label:"2021双十一活动"},{value:"DEGREE",label:"儿童节活动"},{value:"PRACTICE_GROUP_BUY",label:"网管课"},{value:"PRACTICE_GROUP_RENEW",label:"网管课续费"},{value:"REPAIR",label:"乐器维修"},{value:"OUTORDER",label:"外部收入"},{value:"GOODS_SELL",label:"商品销售"},{value:"MALL_BUY",label:"商城销售"},{value:"SUBJECT_CHANGE",label:"声部更换"},{value:"MAINTENANCE",label:"乐器保养"},{value:"ADD_STUDENT",label:"乐团报名"},{value:"REPLACEMENT",label:"乐器置换"},{value:"SCHOOL",label:"学校订单"},{value:"PERSONAL",label:"个人订单"},{value:"OTHER",label:"其他"},{value:"ACTIVITY",label:"活动购买"},{value:"LIVE_BUY",label:"直播购物"},{value:"LIVE_GROUP_BUY",label:"直播课购买"}],m=[{value:"ING",label:"交易中"},{value:"SUCCESS",label:"成功交易"},{value:"FAILED",label:"交易失败"},{value:"CLOSE",label:"交易关闭"}],_=[{value:"0",text:"未开始"},{value:"1",text:"报名中"},{value:"2",text:"进行中"},{value:"4",text:"已结束"},{value:"3",text:"取消"}],g=[{value:"NOT_START",label:"未开始"},{value:"UNDERWAY",label:"进行中"},{value:"OVER",label:"已结束"}],y=[{value:"NORMAL",label:"进行中"},{value:"FINISH",label:"结束"},{value:"CANCEL",label:"关闭"},{value:"LOCK",label:"锁定"}],C=[{value:"RECHARGE",label:"充值"},{value:"CONSUME",label:"建课"},{value:"RETURN",label:"退课"},{value:"MANUAL_ADD",label:"系统充值"},{value:"MANUAL_SUB",label:"系统扣除"}],w=[{value:"FREE",label:"免费"},{value:"CHARGE",label:"收费"},{value:"TRIAL",label:"试听课"},{value:"CARE_PACKAGE",label:"关心包"},{value:"COME_ON_PACKAGE",label:"加油包"}],O=[{value:"课程推荐",label:"课程推荐",children:[{value:"新课推荐",label:"新课推荐"},{value:"续费提醒",label:"续费提醒"}]},{value:"常规回访",label:"常规回访",children:[{value:"课后及训练回访",label:"课后及训练回访"},{value:"练习及乐团表现",label:"练习及乐团表现"}]},{value:"其它",label:"其它",children:[{value:"其它",label:"其它"}]}],E=[{value:"课程推荐",label:"课程推荐",children:[{value:"新课推荐",label:"新课推荐"},{value:"续费提醒",label:"续费提醒"}]},{value:"常规回访",label:"常规回访",children:[{value:"课后及训练回访",label:"课后及训练回访"},{value:"练习及乐团表现",label:"练习及乐团表现"},{label:"考勤申诉",value:"考勤申诉"},{value:"异常请假回访",label:"异常请假回访"}]},{value:"小课回访",label:"小课回访",children:[{value:"续费类回访",label:"续费类回访"},{value:"服务回访",label:"服务回访"},{value:"其他",label:"其他"}]},{value:"云教练",label:"云教练",children:[{value:"体验回访",label:"体验回访"}]},{value:"其它",label:"其它",children:[{value:"其它",label:"其它"},{value:"会员续费",label:"会员续费"}]}],I=[{value:"YQPAY",label:"双乾"},{value:"BALANCE",label:"余额"},{value:"ADAPAY",label:"汇付"},{value:"YEEPAY",label:"易宝"}],S=[{value:"INSTRUMENT",label:"乐器销售"},{value:"ACCESSORIES",label:"配件销售"},{value:"SCHOOL_BUY",label:"学校采购"},{value:"OTHER",label:"其它"}],L=[{value:"INSTRUMENT",label:"乐器"},{value:"ACCESSORIES",label:"辅件"},{value:"TEACHING",label:"教材"},{value:"STAFF",label:"教谱"},{value:"OTHER",label:"其它"}],T=[{value:"1",label:"一年级"},{value:"2",label:"二年级"},{value:"3",label:"三年级"},{value:"4",label:"四年级"},{value:"5",label:"五年级"},{value:"6",label:"六年级"},{value:"7",label:"初一"},{value:"8",label:"初二"},{value:"9",label:"初三"},{value:"10",label:"高一"},{value:"11",label:"高二"},{value:"12",label:"高三"}],k=[{value:"INTERNAL",label:"内部"},{value:"EXTERNAL",label:"外部"},{value:"ALL",label:"全部"}],x=[{label:"不限制",value:"1"},{label:"线上不可调为线下",value:"0"},{label:"线下不可调为线上",value:"2"},{label:"线上线下不可互调",value:"3"}],R=ie(r["musicGroupType"]),j=ie(r["classTime"]),N=[{label:"课程收费",value:0},{label:"会员收费",value:2},{label:"免费",value:3}],F=ie(r["payOrderType"]),A=ie(r["auditType"]),$=ie(r["auditPaymentType"]),M=ie(r["orderServerType"]),D=ie(r["orderAuditType"]),V=ie(r["rewardModeType"]),G=ie(r["musicClassType"]),U=ie(r["ProbationPeriodStatus"]),P=ie(r["downListType"]),z=ie(r["conclusion"]),B=ie(r["clientType"]),H=ie(r["couponType"]),q=ie(r["backType"]),Y=ie(r["memberEnum"]),X=ie(r["coupontypeDetail"]),W=ie(r["issue"]),J=ie(r["feedbackType"]),K=ie(r["feedbackTypeDesc"]),Q=ie(r["campState"]),Z=ie(r["catgGoupType"]),ee=ie(r["catRole"]),te=ie(r["catType"]),ae=ie(r["quiteReason"]),le=ie(r["payUserType"]),ne=ie(r["levelStatus"]),re=ie(r["evaluateStatus"]),oe=ie(r["problemType"]),se=ie(r["schoolUserType"]),ue=ie(r["shareLiveType"]);function ie(e){var t=[];for(var a in e)t.push({label:e[a],value:a});return t}var ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["value","label"],a=Object(n["a"])(t,2),r=a[0],o=a[1],s={};if(e&&e.length){var u,i=Object(l["a"])(e);try{for(i.s();!(u=i.n()).done;){var c=u.value;s[c[r]]=c[o]}}catch(p){i.e(p)}finally{i.f()}}return s}},e533:function(e,t,a){"use strict";a.r(t);var l=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",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[a("el-form-item",{attrs:{prop:"search"}},[a("el-input",{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(" "),a("el-form-item",{attrs:{prop:"typeDetail"}},[a("el-select",{attrs:{placeholder:"请选择优惠券类型",filterable:"",clearable:""},model:{value:e.searchForm.typeDetail,callback:function(t){e.$set(e.searchForm,"typeDetail","string"===typeof t?t.trim():t)},expression:"searchForm.typeDetail"}},e._l(e.coupontypeDetail,(function(e){return a("el-option",{key:e.value,attrs:{value:e.value,label:e.label}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"issuanceType"}},[a("el-select",{attrs:{placeholder:"领券方式",filterable:"",clearable:""},model:{value:e.searchForm.issuanceType,callback:function(t){e.$set(e.searchForm,"issuanceType","string"===typeof t?t.trim():t)},expression:"searchForm.issuanceType"}},[a("el-option",{attrs:{value:0,label:"主动领取"}}),e._v(" "),a("el-option",{attrs:{value:1,label:"手动发放"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"status"}},[a("el-select",{attrs:{placeholder:"优惠券状态",filterable:"",clearable:""},model:{value:e.searchForm.status,callback:function(t){e.$set(e.searchForm,"status","string"===typeof t?t.trim():t)},expression:"searchForm.status"}},[a("el-option",{attrs:{label:"启用",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"停用",value:"0"}})],1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"primary"}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{"native-type":"reset",type:"danger"}},[e._v("重置")])],1)],1),e._v(" "),a("auth",{attrs:{auths:"sysCoupon/add"}},[a("el-button",{staticStyle:{"margin-bottom":"30px"},attrs:{type:"primary"},on:{click:function(t){return e.gotoDetail()}}},[e._v("新增优惠券")])],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList}},[a("el-table-column",{attrs:{align:"center",prop:"id",label:"优惠券编号"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"name",label:"优惠券名称"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"description",label:"描述"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("div",[a("Tooltip",{attrs:{content:e.row.description?e.row.description:""}})],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"studentId",label:"使用类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("coupontypeDetailType")(t.row.typeDetail))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"cloudStudyUseStudentDuty",width:"100px"},scopedSlots:e._u([{key:"header",fn:function(t){return[a("div",{staticClass:"titleCell"},[a("span",[e._v("面值")]),e._v(" "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[e._v("可优惠面值")]),e._v(" "),a("i",{staticClass:"el-icon-question micon el-tooltip",staticStyle:{"font-size":"18px",color:"#f56c6c",top:"2px",position:"relative"}})])],1)]}},{key:"default",fn:function(t){return["FULL_REDUCTION"==t.row.type?a("div",[e._v("\n "+e._s(e._f("hasMoneyFormat")(t.row.faceValue))+"\n ")]):e._e(),e._v(" "),"DISCOUNT"==t.row.type?a("div",[e._v("\n "+e._s(t.row.faceValue)+"%\n ")]):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"cloudStudyUseStudentDuty",width:"100px"},scopedSlots:e._u([{key:"header",fn:function(t){return[a("div",{staticClass:"titleCell"},[a("span",[e._v("满减金额")]),e._v(" "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[e._v("消费满多少才可使用")]),e._v(" "),a("i",{staticClass:"el-icon-question micon el-tooltip",staticStyle:{"font-size":"18px",color:"#f56c6c",top:"2px",position:"relative"}})])],1)]}},{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("hasMoneyFormat")(t.row.fullAmount)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"cloudStudyUseStudentDuty",width:"100"},scopedSlots:e._u([{key:"header",fn:function(t){return[a("div",{staticClass:"titleCell"},[a("span",[e._v("领取上限")]),e._v(" "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[e._v("用户最大领取数量")]),e._v(" "),a("i",{staticClass:"el-icon-question micon el-tooltip",staticStyle:{"font-size":"18px",color:"#f56c6c",top:"2px",position:"relative"}})])],1)]}},{key:"default",fn:function(t){return[a("div",[e._v(e._s(t.row.limitExchangeNum))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"cloudStudyUseStudentDuty",width:"120"},scopedSlots:e._u([{key:"header",fn:function(t){return[a("div",{staticClass:"titleCell"},[a("span",[e._v("有效期天数")]),e._v(" "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[e._v("自领取之日起多少天有效")]),e._v(" "),a("i",{staticClass:"el-icon-question micon el-tooltip",staticStyle:{"font-size":"18px",color:"#f56c6c",top:"2px",position:"relative"}})])],1)]}},{key:"default",fn:function(t){return[t.row.deadline?a("div",[e._v(e._s(t.row.deadline)+"天")]):a("div",[e._v("--")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"cloudStudyUseStudentDuty",width:"160px"},scopedSlots:e._u([{key:"header",fn:function(t){return[a("div",{staticClass:"titleCell"},[a("span",[e._v("有效期")]),e._v(" "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[e._v("优惠券可使用时间段")]),e._v(" "),a("i",{staticClass:"el-icon-question micon el-tooltip",staticStyle:{"font-size":"18px",color:"#f56c6c",top:"2px",position:"relative"}})])],1)]}},{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(t.row.effectiveStartTime))]),e._v(" "),a("p",[e._v(e._s(t.row.effectiveExpireTime))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"cloudStudyUseStudentDuty",width:"165px"},scopedSlots:e._u([{key:"header",fn:function(t){return[a("div",{staticClass:"titleCell"},[a("span",[e._v("领取时间")]),e._v(" "),a("el-tooltip",{attrs:{placement:"top","popper-class":"mTooltip"}},[a("div",{attrs:{slot:"content"},slot:"content"},[e._v("用户可领取优惠券时间段")]),e._v(" "),a("i",{staticClass:"el-icon-question micon el-tooltip",staticStyle:{"font-size":"18px",color:"#f56c6c",top:"2px",position:"relative"}})])],1)]}},{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(t.row.startDate))]),e._v(" "),a("p",[e._v(e._s(t.row.endDate))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"stockCount",label:"总库存"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(-1==t.row.stockCount?"不限制":t.row.stockCount)+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"warningStockNum",label:"领取数量"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(t.row.consumeNum)+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"useSystem",label:"系统类型"},scopedSlots:e._u([{key:"default",fn:function(t){return["MALL"==t.row.useSystem?a("div",[e._v("\n 商城\n ")]):e._e(),e._v(" "),"MEC"==t.row.useSystem?a("div",[e._v("\n 管乐迷\n ")]):e._e()]}}])}),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("\n "+e._s(t.row.status?"启用":"停用")+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"studentId",label:"操作",width:"170px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("auth",{attrs:{auths:"sysCoupon/updateCoupon"}},[t.row.status?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.stop(t.row)}}},[e._v("停用")]):a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.start(t.row)}}},[e._v("启用")])],1),e._v(" "),a("auth",{attrs:{auths:"sysCoupon/updateCoupon"}},[t.row.status?e._e():a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.gotoDetail(t.row)}}},[e._v("修改")])],1),e._v(" "),a("auth",{attrs:{auths:"sysCoupon/delete"}},[!t.row.consumeNum>0&&!t.row.status?a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.removeCoupon(t.row)}}},[e._v("删除")]):e._e()],1),e._v(" "),t.row.issuanceType&&t.row.status?a("auth",{attrs:{auths:"sysCoupon/delete"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.getCoupon(t.row)}}},[e._v("手动发放")])],1):e._e(),e._v(" "),t.row.issuanceType&&t.row.status?a("auth",{attrs:{auths:"sysCoupon/delete"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.getCouponRecord(t.row)}}},[e._v("发放记录")])],1):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),e._v(" "),e.addCouponVisible?a("el-dialog",{attrs:{title:e.title,visible:e.addCouponVisible,width:"1200px"},on:{"update:visible":function(t){e.addCouponVisible=t}}},[a("couponGrant",{ref:"couponGrant",attrs:{activeRow:e.activeRow},on:{getList:e.getList,close:function(t){e.addCouponVisible=!1}}}),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.addCouponVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.addCouponSubmit}},[e._v("确 定")])],1)],1):e._e(),e._v(" "),e.giveCouponVisible?a("el-dialog",{attrs:{title:"发放记录",visible:e.giveCouponVisible,width:"1200px"},on:{"update:visible":function(t){e.giveCouponVisible=t}}},[a("couponRecord",{attrs:{activeRow:e.activeRow}}),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.giveCouponVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.giveCouponVisible=!1}}},[e._v("确 定")])],1)],1):e._e()],1)},n=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("h2",[a("div",{staticClass:"squrt"}),e._v("\n 优惠券列表\n ")])}],r=(a("7f7f"),a("386d"),a("c80c")),o=a("db72"),s=(a("96cf"),a("3b8d")),u=(a("bc3a"),a("5f87"),a("333d")),i=(a("3908"),a("0a7d")),c=a("92e3"),p=a("a5b0"),v=a("ff37"),d=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{},[a("div",{staticClass:"m-core"},[a("el-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search}},[a("el-form-item",{attrs:{prop:"ops"}},[a("el-select",{attrs:{placeholder:"操作",clearable:""},model:{value:e.searchForm.ops,callback:function(t){e.$set(e.searchForm,"ops",t)},expression:"searchForm.ops"}},[a("el-option",{attrs:{label:"发放",value:0}}),e._v(" "),a("el-option",{attrs:{label:"撤回",value:1}})],1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"danger"},on:{click:e.search}},[e._v("搜索")])],1)],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{ref:"tableList",staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList}},[a("el-table-column",{attrs:{align:"center",prop:"createdTime",label:"发放时间"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"num",label:"数量"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"phone",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(t.row.ops?"撤回":"发放")+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"name",label:"操作人"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"subjectNames",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("auth",{attrs:{auths:"sysCoupon/delete"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.couponDetail(t.row)}}},[e._v("发放名单")])],1),e._v(" "),a("auth",{attrs:{auths:"sysCoupon/delete"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.revokeCoupon(t.row)}}},[e._v("撤销发放")])],1)],1)]}}])})],1),e._v(" "),a("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),e._v(" "),e.couponDetailVisible?a("el-dialog",{attrs:{title:"发放名单",visible:e.couponDetailVisible,width:"1000px","append-to-body":""},on:{"update:visible":function(t){e.couponDetailVisible=t}}},[a("couponGiveChiose",{attrs:{activeRow:e.activeRows}}),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.couponDetailVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.couponDetailVisible=!1}}},[e._v("确 定")])],1)],1):e._e()],1)])},b=[],f=a("a8db"),h=(a("7e78"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search}},[a("el-form-item",{attrs:{prop:"search"}},[a("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(" "),a("el-form-item",{attrs:{prop:"organId"}},[a("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.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:{prop:"usageStatus"}},[a("el-select",{attrs:{placeholder:"使用状态",clearable:""},model:{value:e.searchForm.usageStatus,callback:function(t){e.$set(e.searchForm,"usageStatus",t)},expression:"searchForm.usageStatus"}},[a("el-option",{attrs:{label:"未使用",value:0}}),e._v(" "),a("el-option",{attrs:{label:"已使用",value:1}}),e._v(" "),a("el-option",{attrs:{label:"已过期",value:2}})],1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"danger"},on:{click:e.search}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{"native-type":"reset",type:"primary"},on:{click:e.onReSet}},[e._v("重置")])],1)],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList}},[a("el-table-column",{attrs:{align:"center",prop:"organName",label:"分部"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"organName",label:"学生姓名(编号)"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(t.row.userName)+"("+e._s(t.row.userId)+")")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"phone",label:"手机号"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"couponId",label:"优惠券状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",[e._v(e._s(e._f("usageStatus")(t.row.usageStatus)))])])]}}])})],1),e._v(" "),a("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)}),m=[],_={components:{pagination:u["a"]},props:["activeRow"],data:function(){return{tableList:[],searchForm:{search:null,organId:null,usageStatus:null},rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},mounted:function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(){return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$store.dispatch("setBranchs");case 2:this.getList();case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{getList:function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(){var t;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(i["f"])(Object(o["a"])(Object(o["a"])({page:this.rules.page,rows:this.rules.limit},this.searchForm),{},{issueId:this.activeRow.id}));case 3:t=e.sent,this.tableList=t.data.rows,this.rules.total=t.data.total,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.rules.page=1,this.getList()},onReSet:function(){this.$refs.searchForm.resetFields(),this.search()}}},g=_,y=a("2877"),C=Object(y["a"])(g,h,m,!1,null,"39aecf32",null),w=C.exports,O=["organId"],E={props:["activeRow"],components:{pagination:u["a"],couponGiveChiose:w},data:function(){return{searchForm:{search:null},tableList:[],organList:[],title:"",rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},couponDetailVisible:!1,activeRows:null}},created:function(){},mounted:function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(){return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.getList();case 1: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(s["a"])(Object(r["a"])().mark((function e(){var t,a,l,n;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t=this.searchForm,t.organId,a=Object(f["a"])(t,O),l=Object(o["a"])(Object(o["a"])({},a),{},{page:this.rules.page,rows:this.rules.limit,couponId:this.activeRow.id}),e.next=5,Object(i["e"])(l);case 5:n=e.sent,this.tableList=n.data.rows,this.rules.total=n.data.total,e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](0),console.log(e.t0);case 13:case"end":return e.stop()}}),e,this,[[0,10]])})));function t(){return e.apply(this,arguments)}return t}(),revokeCoupon:function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(t){var a,l,n,o=this;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=0,e.prev=1,e.next=4,Object(i["b"])({issueId:t.id});case 4:l=e.sent,a=l.data,e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](1),console.log(e.t0);case 11:n="",n=a>0?"当前已有".concat(a,"学员优惠券已使用,仅可对未使用学员撤回.是否确认继续撤销?"):"是否确认继续撤销?",this.$confirm(n,"提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(a){return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(i["j"])({issueId:t.id});case 3:e.sent,o.$message.success("撤销成功"),o.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]])})));return function(t){return e.apply(this,arguments)}}());case 14:case"end":return e.stop()}}),e,this,[[1,8]])})));function t(t){return e.apply(this,arguments)}return t}(),couponDetail:function(e){this.activeRows=e,this.couponDetailVisible=!0}}},I=E,S=Object(y["a"])(I,d,b,!1,null,"564bb21e",null),L=S.exports,T={components:{pagination:u["a"],Tooltip:p["a"],couponGrant:v["default"],couponRecord:L},data:function(){return{coupontypeDetail:c["r"],couponTypeList:c["q"],searchForm:{search:null,type:null,status:null,typeDetail:null,issuanceType:null},activeRow:null,tableList:[],organList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},addCouponVisible:!1,giveCouponVisible:!1,title:""}},created:function(){},mounted:function(){this.init()},methods:{init:function(){this.getList()},getList:function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(){var t;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(i["g"])(Object(o["a"])(Object(o["a"])({},this.searchForm),{},{page:this.rules.page,rows:this.rules.limit}));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()},gotoDetail:function(e){e?this.$router.push({path:"/operateManager/couponUpdate",query:{row:JSON.stringify(e)}}):this.$router.push("/operateManager/couponUpdate")},stop:function(e){var t=this;this.$confirm("您确定停用优惠券?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(s["a"])(Object(r["a"])().mark((function a(){var l;return Object(r["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,l=Object(o["a"])({},e),l.status=0,a.next=5,Object(i["i"])(l);case 5:a.sent,t.$message.success("停用成功"),t.getList(),a.next=13;break;case 10:a.prev=10,a.t0=a["catch"](0),console.log(a.t0);case 13:case"end":return a.stop()}}),a,null,[[0,10]])})))).catch((function(){}))},start:function(e){var t=this;this.$confirm("您确定启用优惠券?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(s["a"])(Object(r["a"])().mark((function a(){var l;return Object(r["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,l=Object(o["a"])({},e),l.status=1,a.next=5,Object(i["i"])(l);case 5:a.sent,t.$message.success("启用成功"),t.getList(),a.next=13;break;case 10:a.prev=10,a.t0=a["catch"](0),console.log(a.t0);case 13:case"end":return a.stop()}}),a,null,[[0,10]])})))).catch((function(){}))},removeCoupon:function(e){var t=this;this.$confirm("您确定删除优惠券?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(s["a"])(Object(r["a"])().mark((function a(){return Object(r["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,Object(i["c"])({id:e.id});case 3:a.sent,t.$message.success("删除成功"),t.getList(),a.next=11;break;case 8:a.prev=8,a.t0=a["catch"](0),console.log(a.t0);case 11:case"end":return a.stop()}}),a,null,[[0,8]])})))).catch((function(){}))},getCoupon:function(e){this.activeRow=e,this.title=this.activeRow.name,this.addCouponVisible=!0},getCouponRecord:function(e){this.activeRow=e,this.giveCouponVisible=!0},addCouponSubmit:function(){this.$refs.couponGrant.submit()}}},k=T,x=(a("36af"),Object(y["a"])(k,l,n,!1,null,"6b9f6b80",null));t["default"]=x.exports},ff37:function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{},[a("div",{staticClass:"m-core"},[a("el-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search}},[a("el-form-item",{attrs:{prop:"search"}},[a("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(" "),a("el-form-item",{attrs:{prop:"organId"}},[a("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 a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"subjectId"}},[a("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 a("el-option",{key:e.id,attrs:{value:e.id,label:e.name}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"hasMusicCourse"}},[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"是否乐团在读"},model:{value:e.searchForm.hasMusicCourse,callback:function(t){e.$set(e.searchForm,"hasMusicCourse",t)},expression:"searchForm.hasMusicCourse"}},[a("el-option",{attrs:{value:"1",label:"是"}}),e._v(" "),a("el-option",{attrs:{value:"0",label:"否"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"hasVipCourse"}},[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"是否vip在读"},model:{value:e.searchForm.hasVipCourse,callback:function(t){e.$set(e.searchForm,"hasVipCourse",t)},expression:"searchForm.hasVipCourse"}},[a("el-option",{attrs:{value:"1",label:"是"}}),e._v(" "),a("el-option",{attrs:{value:"0",label:"否"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"hasPracticeCourse"}},[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"是否网管课在读"},model:{value:e.searchForm.hasPracticeCourse,callback:function(t){e.$set(e.searchForm,"hasPracticeCourse",t)},expression:"searchForm.hasPracticeCourse"}},[a("el-option",{attrs:{value:"1",label:"是"}}),e._v(" "),a("el-option",{attrs:{value:"0",label:"否"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{prop:"hasMember"}},[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"是否会员"},model:{value:e.searchForm.hasMember,callback:function(t){e.$set(e.searchForm,"hasMember",t)},expression:"searchForm.hasMember"}},[a("el-option",{attrs:{value:"1",label:"是"}}),e._v(" "),a("el-option",{attrs:{value:"0",label:"否"}})],1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"danger"},on:{click:e.search}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{"native-type":"reset",type:"primary"},on:{click:e.onReSet}},[e._v("重置")])],1)],1),e._v(" "),a("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.cancelChiose}},[e._v("取消选择")]),e._v(" "),a("div",{staticClass:"tableWrap"},[a("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}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"organName",label:"分部"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"userId",label:"学员编号"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"username",label:"学员姓名"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"phone",label:"手机号"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"subjectNames",label:"声部"}})],1),e._v(" "),a("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)])},n=[],r=(a("ac6a"),a("db72")),o=a("a8db"),s=(a("386d"),a("c80c")),u=(a("7f7f"),a("96cf"),a("3b8d")),i=a("333d"),c=a("7e78"),p=a("0a7d"),v=["organId"],d={props:["activeRow"],components:{pagination:i["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(u["a"])(Object(s["a"])().mark((function e(){return Object(s["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(u["a"])(Object(s["a"])().mark((function e(){var t,a,l,n,u,i,p=this;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t=this.searchForm,a=t.organId,l=Object(o["a"])(t,v),n=Object(r["a"])(Object(r["a"])({},l),{},{page:this.rules.page,rows:this.rules.limit,organId:a.join(",")}),e.next=5,Object(c["B"])(n);case 5:u=e.sent,this.tableList=u.data.rows,this.rules.total=u.data.total,i=this.deleteList.map((function(e){return e.userId})),this.isDetele=!0,this.$nextTick((function(){p.tableList.forEach((function(e){-1!=i.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 a=this.deleteList.map((function(e){return e.userId}));this.$nextTick((function(){var e=[];t.tableList.forEach((function(l){e.push(l.userId),-1!=a.indexOf(l.userId)&&t.$refs.tableList.toggleRowSelection(l,!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 a=this.deleteList.map((function(e){return e.userId}));-1!=a.indexOf(t.userId)&&(this.deleteList.splice(a.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={},a=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(a," ").concat(this.deleteList.length,"名发放优惠券"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var a=Object(u["a"])(Object(s["a"])().mark((function a(l){return Object(s["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,Object(p["d"])(t);case 3:a.sent,e.$message.success("发放成功"),e.$emit("getList"),e.$emit("close"),a.next=12;break;case 9:a.prev=9,a.t0=a["catch"](0),console.log(a.t0);case 12:case"end":return a.stop()}}),a,null,[[0,9]])})));return function(e){return a.apply(this,arguments)}}())}}},b=d,f=a("2877"),h=Object(f["a"])(b,l,n,!1,null,"33d77431",null);t["default"]=h.exports}}]);