(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0f046d"],{"9c4a":function(t,o,n){"use strict";n.r(o);var s,e=function(){var t=this,o=t.$createElement,n=t._self._c||o;return n("v-dialog",{attrs:{persistent:"","max-width":"600px"},model:{value:t.thisValue,callback:function(o){t.thisValue=o},expression:"thisValue"}},[n("v-card",[n("v-card-title",[n("span",{staticClass:"headline"},[t._v("群发优惠券")])]),n("v-card-text",[n("v-container",[n("el-select",{attrs:{placeholder:"请选择优惠券"},model:{value:t.couponFlag,callback:function(o){t.couponFlag=o},expression:"couponFlag"}},t._l(t.coupons,function(t,o){return n("el-option",{key:t.id,attrs:{label:t.coupon_name+" "+t.discount_amount+"元",value:o}})}),1),""!=t.couponFlag?n("p",{staticClass:"mt-3"},[t._v("数量限制："+t._s(-1==t.coupons[t.couponFlag].limit_no?"不限制":"剩余可发"+(t.coupons[t.couponFlag].limit_no-t.coupons[t.couponFlag].cumulative_draw_no)+"张"))]):t._e(),n("p",{staticClass:"mt-3"},[t._v("您选择了“"+t._s(t.thisIds.split(",").length)+"”个用户")])],1)],1),n("v-card-actions",{staticClass:"justify-space-between"},[n("v-btn",{attrs:{color:"blue gray",text:""},on:{click:function(o){t.thisValue=!1}}},[t._v("取消")]),n("v-btn",{attrs:{color:"dark darken-1",loading:t.loading,text:""},on:{click:function(o){return t.doUpdate()}}},[t._v("立即发放")])],1)],1)],1)},i=[],a={props:{value:{type:Boolean,required:!0,default:!1},ids:{type:String,required:!0}},data:function(){return{thisValue:this.value,thisIds:this.ids,loading:!1,couponFlag:"",coupons:[]}},watch:{value:function(t){this.thisValue=t},thisValue:function(t){this.$emit("change",t)},ids:function(t){this.thisIds=t}},mounted:function(){s=this,s.getCouponList()},methods:{getCouponList:function(){this.$post("coupon/list",{pageSize:200,currentPage:1,status:1,limit_service:""},function(t){0===t.errno&&(s.coupons=t.data.data)})},doUpdate:function(){this.loading=!0,this.$post("coupon/send",{coupon_id:this.coupons[this.couponFlag].id,ids:this.thisIds},function(t){s.loading=!1,0==t.errno&&(s.$message({showClose:!0,message:t.errmsg,type:"success"}),s.thisValue=!1,s.$emit("changemsg",t))})}}},c=a,u=n("6691"),l=Object(u["a"])(c,e,i,!1,null,null,null);o["default"]=l.exports}}]);
//# sourceMappingURL=chunk-2d0f046d.ef32bcb7.js.map