chunk-e7a59ac4.7ed4b9dc.js 27 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e7a59ac4"],{"0137":function(t,e,n){"use strict";n.d(e,"b",function(){return a}),n.d(e,"c",function(){return i}),n.d(e,"a",function(){return o}),n.d(e,"e",function(){return s}),n.d(e,"d",function(){return u}),n.d(e,"f",function(){return c});var r=n("bf9a");function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("coupon",{params:t})}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("coupon_user_bags",{params:t})}function o(t){return r["b"].get("coupon/".concat(t,"/edit"))}function s(t){return r["b"].post("coupon",t)}function u(t){return r["b"].post("coupon/giveCouponToUser",t)}function c(t,e){return r["b"].put("coupon/".concat(t),e)}},"0fb6":function(t,e,n){},"15b5":function(t,e,n){"use strict";var r=n("5f54"),a=n.n(r);a.a},"1c4c":function(t,e,n){"use strict";var r=n("9b43"),a=n("5ca1"),i=n("4bf8"),o=n("1fa8"),s=n("33a4"),u=n("9def"),c=n("f1ae"),l=n("27ee");a(a.S+a.F*!n("5cc5")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,a,d,f=i(t),p="function"==typeof this?this:Array,h=arguments.length,m=h>1?arguments[1]:void 0,v=void 0!==m,b=0,g=l(f);if(v&&(m=r(m,h>2?arguments[2]:void 0,2)),void 0==g||p==Array&&s(g))for(e=u(f.length),n=new p(e);e>b;b++)c(n,b,v?m(f[b],b):f[b]);else for(d=g.call(f),n=new p;!(a=d.next()).done;b++)c(n,b,v?o(d,m,[a.value,b],!0):a.value);return n.length=b,n}})},"28b7":function(t,e,n){"use strict";n.d(e,"j",function(){return a}),n.d(e,"g",function(){return i}),n.d(e,"f",function(){return o}),n.d(e,"r",function(){return s}),n.d(e,"i",function(){return u}),n.d(e,"q",function(){return c}),n.d(e,"t",function(){return l}),n.d(e,"s",function(){return d}),n.d(e,"k",function(){return f}),n.d(e,"b",function(){return p}),n.d(e,"c",function(){return h}),n.d(e,"e",function(){return m}),n.d(e,"m",function(){return v}),n.d(e,"p",function(){return b}),n.d(e,"o",function(){return g}),n.d(e,"l",function(){return _}),n.d(e,"n",function(){return w}),n.d(e,"d",function(){return y}),n.d(e,"a",function(){return k}),n.d(e,"h",function(){return x});var r=n("bf9a");function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("user",{params:t})}function i(){return r["b"].get("user/number")}function o(){return r["b"].get("user/moneySum")}function s(t){return r["b"].post("user/status",t)}function u(t){return r["b"].get("user/wallet",{params:t})}function c(t,e){return r["b"].put("user/".concat(t),e)}function l(t){return r["b"].post("user/returnDeposit",t)}function d(t){return r["b"].post("user/reReturnDeposit",t)}function f(t){return r["b"].post("user/groupSendSms",t)}function p(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("user/groupSendSmsList",{params:t})}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("user/groupSmsTemplate",{params:t})}function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("user/getUserByMobile",{params:t})}function v(t){return r["b"].post("user/rechargeBalance",t)}function b(t){return r["b"].post("user/refundBalance",t)}function g(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("user/refundBalanceOrders",{params:t})}function _(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("user/queryRefundBalance",{params:t})}function w(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("user/refundBalanceAgain",{params:t})}function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("user/students",{params:t})}function k(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].post("user/student",t)}function x(){return r["b"].get("user/studentsNumber")}},3107:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("pop-confirm",t._b({attrs:{type:"danger",confirm:t.onConfirm,size:"small"}},"pop-confirm",t.$attrs,!1),[t._t("default",[t._v("删除")])],2)},a=[],i=(n("96cf"),n("3b8d")),o=n("bd0b"),s=n("bf9a"),u=n("873a"),c=n("91a0"),l={name:"RowDestroy",components:{PopConfirm:o["a"]},mixins:[c["a"]],methods:{onConfirm:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.checkResourceName(),this.setIdentify(),t.next=4,s["b"].delete("".concat(this.resource,"/").concat(this.identify));case 4:this.data.splice(this.getIndex(),1),this.$message.success(Object(u["h"])("destroyed"));case 6:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}()}},d=l,f=n("2877"),p=Object(f["a"])(d,r,a,!1,null,null,null);e["a"]=p.exports},"323a":function(t,e,n){"use strict";n.d(e,"e",function(){return a}),n.d(e,"f",function(){return i}),n.d(e,"a",function(){return o}),n.d(e,"c",function(){return s}),n.d(e,"d",function(){return u}),n.d(e,"b",function(){return c});var r=n("bf9a");function a(t){return r["b"].post("admin_merchants",t)}function i(t,e){return r["b"].put("admin_merchants/".concat(t),e)}function o(t){return r["b"].get("admin_merchants/".concat(t,"/edit"))}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("admin_merchants",{params:t})}function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("admin_merchant_config/get",{params:t})}function c(t){return r["b"].post("admin_merchant_config/edit",t)}},"386d":function(t,e,n){"use strict";var r=n("cb7c"),a=n("83a1"),i=n("5f1b");n("214f")("search",1,function(t,e,n,o){return[function(n){var r=t(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=o(n,t,this);if(e.done)return e.value;var s=r(t),u=String(this),c=s.lastIndex;a(c,0)||(s.lastIndex=0);var l=i(s,u);return a(s.lastIndex,c)||(s.lastIndex=c),null===l?-1:l.index}]})},"3c1b":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button-link",{attrs:{size:"small",to:t.link}},[t._t("default",[t._v("编辑")])],2)},a=[],i=n("c3c6"),o=n("91a0"),s={name:"RowToEdit",components:{ButtonLink:i["a"]},mixins:[o["a"]],data:function(){return{identify:void 0}},computed:{link:function(){return this.checkResourceName(),"/".concat(this.resource,"/").concat(this.identify,"/edit")}},mounted:function(){this.setIdentify()}},u=s,c=n("2877"),l=Object(c["a"])(u,r,a,!1,null,null,null);e["a"]=l.exports},"469f":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("7d7b")},"5d73":function(t,e,n){t.exports=n("469f")},"5f54":function(t,e,n){},"69d9":function(t,e,n){"use strict";n("8e6e"),n("456d"),n("7f7f"),n("ac6a");var r=n("bd86");function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(n,!0).forEach(function(e){Object(r["a"])(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var o,s,u={name:"SearchForm",data:function(){return{form:{},show:!0}},props:{fields:Array,resetCurrentPage:{type:Boolean,default:!0}},created:function(){this.initFormShow()},methods:{onSubmit:function(){var t=this,e=i({},this.$route.query);this.resetCurrentPage&&delete e.page,this.fields.forEach(function(n){var r=n.field,a=t.form[r];"string"===typeof a&&(a=a.trim()),""===a||void 0===a?delete e[r]:(e[r]=a,"time_between"===r&&(e[r]=null==a?a:[a[0],a[1]]))}),this.$router.push({path:this.$route.path,query:e})},dateFormat:function(t){var e=t.getFullYear()+"-"+this.p(t.getMonth()+1)+"-"+this.p(t.getDate()),n=this.p(t.getHours())+":"+this.p(t.getMinutes())+":"+this.p(t.getSeconds());return e+n},p:function(t){return t<10?"0"+t:t},onReset:function(){this.form={},this.onSubmit()},initFormShow:function(){var t=this;this.fields.some(function(e){if(t.$route.query[e.field])return t.show=!0,!0})},setFormValueFromQuery:function(){var t=this,e=this.$route.query;this.fields.forEach(function(n){var r=n.field,a=e[r];t.$set(t.form,r,a)})},toggleShow:function(){this.show=!this.show},getOffsetHeight:function(){var t=document.getElementById("div-searchForm"),e=t.clientWidth||t.offsetWidth;this.formHeight=e}},watch:{$route:{handler:function(){this.setFormValueFromQuery()},immediate:!0}},render:function(t){var e=this;return t("el-collapse-transition",[t("div",{directives:[{name:"show",value:this.show}]},[t("el-form",{attrs:{inline:!0},nativeOn:{keydown:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?(t.preventDefault(),e.onSubmit(t)):null}}},[this.fields.map(function(n){var r;switch(n.type){case"el-select":r=t("el-select",{style:"width:150px;",attrs:{placeholder:n.label,filterable:!0,clearable:!0},model:{value:e.form[n.field],callback:function(t){e.$set(e.form,n.field,t)}}},[n.options.map(function(e){return t("el-option",{key:e.value||e.id,attrs:{label:e.label||e.name,value:String(e.value||e.id)}})})]);break;case"time-between":r=t("el-date-picker",{attrs:{type:"datetimerange","value-format":"yyyy-MM-dd HH:mm:ss","start-placeholder":n.label1,"end-placeholder":n.label2},model:{value:e.form[n.field],callback:function(t){e.$set(e.form,n.field,t)}}});break;case"super-input":r=t("el-input",{attrs:{placeholder:n.label,clearable:!0},model:{value:e.form[n.field],callback:function(t){e.$set(e.form,n.field,t)}}});break;default:r=t("el-input",{attrs:{placeholder:n.label,clearable:!0},model:{value:e.form[n.field],callback:function(t){e.$set(e.form,n.field,t)}}})}return t("el-form-item",{key:n.field},[r])}),t("el-form-item",{class:"actions"},[t("el-button",{attrs:{type:"primary"},on:{click:this.onSubmit}},["查询"]),t("el-button",{on:{click:this.onReset}},["重置"])])])])])}},c=u,l=(n("cafd"),n("2877")),d=Object(l["a"])(c,o,s,!1,null,"6dd66826",null);e["a"]=d.exports},"6acf3":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-card",{scopedSlots:t._u([{key:"header",fn:function(){return[n("content-header")]},proxy:!0}])},[n("div",{staticClass:"header-button"},[n("search-form",{ref:"searchForm",attrs:{fields:t.search}}),n("div",{staticClass:"selections"},[n("button-link",{attrs:{type:"success",to:"/coupon/create"}},[t._t("default",[t._v("添加优惠券")])],2),n("el-button",{attrs:{type:"info"},on:{click:function(e){t.dialogVisibleSongQuan=!0}}},[t._v("赠送优惠券")])],1)],1),n("el-table",{attrs:{data:t.coupon,resource:"coupon"}},[n("el-table-column",{attrs:{prop:"id",label:"ID",width:"60",align:"center"}}),n("el-table-column",{attrs:{prop:"title",label:"名称",width:"150",align:"center"}}),n("el-table-column",{attrs:{prop:"type_name",label:"类型","show-overflow-tooltip":"","min-width":"5%",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.type?n("el-tag",{attrs:{type:"success"}},[t._v(t._s(e.row.type_name))]):t._e(),2==e.row.type?n("el-tag",{attrs:{type:"warning"}},[t._v(t._s(e.row.type_name))]):t._e(),3==e.row.type?n("el-tag",{attrs:{type:"danger"}},[t._v(t._s(e.row.type_name))]):t._e()]}}])}),n("el-table-column",{attrs:{prop:"area_name",label:"区域","show-overflow-tooltip":"","min-width":"7%",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-tag",{attrs:{type:"success"}},[t._v(t._s(e.row.area_name))])]}}])}),n("el-table-column",{attrs:{prop:"with_amount",label:"满多少金额(折扣)",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.type?n("el-tag",{attrs:{type:"info"}},[t._v(t._s(e.row.with_amount))]):t._e(),3==e.row.type?n("el-tag",{attrs:{type:"info"}},[t._v(t._s(e.row.discount/10)+" 折")]):t._e(),2==e.row.type?n("el-tag",{attrs:{type:"info"}},[t._v("无")]):t._e()]}}])}),n("el-table-column",{attrs:{prop:"used_amount",label:"(最多)可减金额",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-tag",{attrs:{type:"danger"}},[t._v(t._s(e.row.used_amount))])]}}])}),n("el-table-column",{attrs:{prop:"quota_type_name",label:"是否限制发放数量","show-overflow-tooltip":"","min-width":"9%",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-tag",[t._v(t._s(e.row.quota_type_name))])]}}])}),n("el-table-column",{attrs:{prop:"order_type_name",label:"适用订单类型","show-overflow-tooltip":"","min-width":"9%",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-tag",[t._v(t._s(e.row.order_type_name))])]}}])}),n("el-table-column",{attrs:{label:"状态",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.status?n("el-tag",{attrs:{type:"success"}},[t._v("启用")]):0==e.row.status?n("el-tag",{attrs:{type:"danger"}},[t._v("失效")]):2==e.row.status?n("el-tag",{attrs:{type:"danger"}},[t._v("已使用")]):t._e()]}}])}),n("el-table-column",{attrs:{prop:"created_at",label:"添加时间",width:"160",align:"center"}}),n("el-table-column",{attrs:{label:"操作",width:"250",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;e.$index;return[n("el-button-group",[n("row-to-edit"),n("row-destroy"),n("el-button",{attrs:{type:"success",size:"small"},on:{click:function(e){return t.dialogVisibleClick(r)}}},[t._v("详情")])],1)]}}])})],1),n("el-dialog",{attrs:{title:"详情",visible:t.dialogVisible,width:"20%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("div",{staticClass:"info-wrp"},[n("div",{staticClass:"title"},[t._v("优惠券详情")]),n("div",{staticClass:"info-item"},[n("span",[t._v("优惠券名称:")]),n("span",[t._v(t._s(t.rows.title))])]),n("div",{staticClass:"info-item"},[n("span",[t._v("优惠券类型:")]),n("span",[t._v(t._s(t.rows.type_name))])]),n("div",{directives:[{name:"show",rawName:"v-show",value:1==t.rows.type,expression:"rows.type==1"}],staticClass:"info-item"},[n("span",[t._v("满多少金额:")]),n("span",[t._v(t._s(t.rows.with_amount))])]),n("div",{staticClass:"info-item"},[n("span",[t._v("可减少金额:")]),n("span",[t._v(t._s(t.rows.used_amount))])]),n("div",{staticClass:"info-item"},[n("span",[t._v("是否限制发券量:")]),n("span",[t._v(t._s(t.rows.quota_type_name))])]),n("div",{directives:[{name:"show",rawName:"v-show",value:1==t.rows.is_quota,expression:"rows.is_quota==1"}],staticClass:"info-item"},[n("span",[t._v("总可发券数量:")]),n("span",{staticStyle:{width:"60%"}},[t._v(t._s(t.rows.quota))])]),n("div",{staticClass:"info-item"},[n("span",[t._v("已发券数量:")]),n("span",{staticStyle:{width:"60%"}},[t._v(t._s(t.rows.take_count))])]),n("div",{staticClass:"info-item"},[n("span",[t._v("券已使用数量:")]),n("span",{staticStyle:{width:"60%"}},[t._v(t._s(t.rows.used_count))])]),n("div",{staticClass:"info-item"},[n("span",[t._v("发放开始时间:")]),n("span",{staticStyle:{width:"60%"}},[t._v(t._s(t.rows.grant_start_at))])]),n("div",{staticClass:"info-item"},[n("span",[t._v("发放结束时间:")]),n("span",{staticStyle:{width:"60%"}},[t._v(t._s(t.rows.grant_end_at))])]),n("div",{staticClass:"info-item"},[n("span",[t._v("时效类型:")]),n("span",{staticStyle:{width:"60%"}},[t._v(t._s(t.rows.valid_type_name))])]),n("div",{directives:[{name:"show",rawName:"v-show",value:2==t.rows.valid_type,expression:"rows.valid_type==2"}],staticClass:"info-item"},[n("span",[t._v("自领取起有效天数:")]),n("span",{staticStyle:{width:"60%"}},[t._v(t._s(t.rows.valid_days))])]),n("div",{directives:[{name:"show",rawName:"v-show",value:1==t.rows.valid_type,expression:"rows.valid_type==1"}],staticClass:"info-item"},[n("span",[t._v("生效日期:")]),n("span",{staticStyle:{width:"60%"}},[t._v(t._s(t.rows.valid_start_time))])]),n("div",{directives:[{name:"show",rawName:"v-show",value:1==t.rows.valid_type,expression:"rows.valid_type==1"}],staticClass:"info-item"},[n("span",[t._v("失效日期:")]),n("span",{staticStyle:{width:"60%"}},[t._v(t._s(t.rows.valid_end_time))])]),n("div",{staticClass:"info-item"},[n("span",[t._v("状态:")]),n("span",{staticStyle:{width:"60%"}},[t._v(t._s(t.rows.status_name))])])])]),n("el-dialog",{attrs:{title:"赠送用户优惠券",visible:t.dialogVisibleSongQuan,width:"30%"},on:{"update:visible":function(e){t.dialogVisibleSongQuan=e}}},[n("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules,"label-width":"150px"}},[n("el-form-item",{attrs:{prop:"coupon_id",required:"",label:"优惠券"}},[n("el-select",{staticClass:"limit-width",attrs:{placeholder:"请选择"},model:{value:t.form.coupon_id,callback:function(e){t.$set(t.form,"coupon_id",e)},expression:"form.coupon_id"}},t._l(t.coupons,function(t){return n("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})}),1)],1),n("el-form-item",{attrs:{label:"用户手机号",required:"",prop:"mobile"}},[n("el-input",{nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.searchUser(e)}},model:{value:t.form.mobile,callback:function(e){t.$set(t.form,"mobile",e)},expression:"form.mobile"}})],1),n("el-form-item",{directives:[{name:"show",rawName:"v-show",value:t.is_show_user,expression:"is_show_user"}],attrs:{label:"用户名(真名)"}},[n("span",[t._v(t._s(t.nickname)+"("+t._s(t.truename)+")")])]),n("el-form-item",{directives:[{name:"show",rawName:"v-show",value:t.is_show_user,expression:"is_show_user"}],attrs:{label:"头像"}},[n("img",{attrs:{src:t.avatar,"min-width":"30",height:"30"}})])],1),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.dialogVisibleSongQuan=!1}}},[t._v("取 消")]),n("el-button",{attrs:{type:"primary"},on:{click:t.songquan}},[t._v("确 定")])],1)],1),n("div",{staticClass:"card-footer"},[n("pagination",{attrs:{page:t.page}})],1)],1)},a=[],i=(n("386d"),n("ac6a"),n("5df3"),n("768b")),o=(n("96cf"),n("3b8d")),s=n("69d9"),u=n("81df"),c=n("0137"),l=n("3107"),d=n("3c1b"),f=n("c3c6"),p=n("b64d"),h=n("873a"),m=n("28b7"),v=n("323a"),b={name:"Index",components:{RowToEdit:d["a"],RowDestroy:l["a"],SearchForm:s["a"],Pagination:u["a"],ButtonLink:f["a"]},data:function(){var t=function(t,e,n){if(!e)return n(new Error("手机号不能为空"));var r=/^1[3|4|5|7|8][0-9]\d{8}$/;if(!r.test(e))return n(new Error("请输入正确的手机号"));n()};return{dialogVisible:!1,search:[{type:"el-select",field:"area_id",label:"骑行区域",options:[{id:"",name:"全部"}]},{field:"title",label:"名称"},{type:"el-select",field:"valid_type",label:"选择时效",options:[{id:"",name:"全部"},{id:1,name:"绝对时效"},{id:2,name:"相对时效"}]},{type:"el-select",field:"status",label:"是否禁用",options:[{id:"",name:"全部"},{id:1,name:"启用"},{id:0,name:"禁用"}]},{type:"el-select",field:"is_quota",label:"是否限制发券数量",options:[{id:"",name:"全部"},{id:1,name:"限制"},{id:0,name:"不限制"}]},{type:"el-select",field:"merchant_id",label:"商户",options:[{id:"",name:"全部"}]}],coupon:[],page:null,first_blood:!0,card_name:"",areas:[],rows:{},dialogVisibleSongQuan:!1,is_show_user:!1,coupons:[],form:{mobile:"",coupon_id:""},truename:"",nickname:"",avatar:"",rules:{coupon_id:[{required:!0,message:"请选择赠送得优惠券",trigger:"change"}],mobile:[{validator:t,trigger:"blur"}]}}},created:function(){var t=Object(o["a"])(regeneratorRuntime.mark(function t(){var e,n,r,a,o,s,u,l;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([Object(p["b"])({all:1})]);case 2:return e=t.sent,n=Object(i["a"])(e,1),r=n[0].data,this.areas=r,this.search[0].options.push.apply(this.search[0].options,r),t.next=9,Object(c["b"])({all:1});case 9:if(a=t.sent,o=a.data,this.coupons=o,"administrator"!==this.$store.state.users.user.roles[0]){t.next=21;break}return t.next=15,Promise.all([Object(v["c"])({all:1})]);case 15:s=t.sent,u=Object(i["a"])(s,1),l=u[0].data,this.search[5].options.push.apply(this.search[5].options,l.data),t.next=22;break;case 21:this.search.splice(5,1);case 22:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),mixins:[h["m"]],watch:{$route:{handler:function(){var t=Object(o["a"])(regeneratorRuntime.mark(function t(e){var n,r,a,i;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.autoPageSize(53,e);case 2:return t.next=4,Object(c["b"])(e.query);case 4:n=t.sent,r=n.data,a=r.data,i=r.meta,this.coupon=a,this.page=i;case 10:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}(),immediate:!0}},methods:{dialogVisibleClick:function(t){this.rows=t,this.dialogVisible=!0},songquan:function(){var t=this;this.$refs["form"].validate(function(e){if(!e)return alert("请检查输入内容"),!1;Object(c["d"])(t.form).then(function(e){e.then(function(e){e&&(t.$message({message:"操作成功",type:"success"}),t.dialogVisibleSongQuan=!1,t.form.coupon_id="",t.form.mobile="",t.is_show_user=!1)})})})},searchUser:function(){var t=Object(o["a"])(regeneratorRuntime.mark(function t(){var e,n,r;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([Object(m["e"])({mobile:this.form.mobile})]);case 2:e=t.sent,n=Object(i["a"])(e,1),r=n[0].data,this.truename=r.truename,this.nickname=r.nickname,this.avatar=r.avatar,this.is_show_user=!0;case 9:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}()}},g=b,_=(n("a561"),n("2877")),w=Object(_["a"])(g,r,a,!1,null,"463a185c",null);e["default"]=w.exports},"768b":function(t,e,n){"use strict";var r=n("a745"),a=n.n(r);function i(t){if(a()(t))return t}var o=n("5d73"),s=n.n(o);function u(t,e){var n=[],r=!0,a=!1,i=void 0;try{for(var o,u=s()(t);!(r=(o=u.next()).done);r=!0)if(n.push(o.value),e&&n.length===e)break}catch(c){a=!0,i=c}finally{try{r||null==u["return"]||u["return"]()}finally{if(a)throw i}}return n}function c(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function l(t,e){return i(t)||u(t,e)||c()}n.d(e,"a",function(){return l})},"7d7b":function(t,e,n){var r=n("e4ae"),a=n("7cd6");t.exports=n("584a").getIterator=function(t){var e=a(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},"81df":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.page?n("el-pagination",t._b({ref:"page",attrs:{"page-sizes":t.pageSizes,"current-page":t.currentPage,"page-size":t.perPage,total:t.page.total,layout:t.layout,background:""},on:{"size-change":t.onSizeChange,"current-change":t.onChange,"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.perPage=e},"update:page-size":function(e){t.perPage=e}}},"el-pagination",t.$attrs,!1)):t._e()},a=[],i={name:"Pagination",data:function(){return{currentPage:1,perPage:10}},props:{page:Object,layout:{type:String,default:"total, prev, pager, next, sizes, jumper"},autoPush:{type:Boolean,default:!0}},computed:{pageSizes:function(){var t=[10,30,50,100,200],e=this.page.per_page;return-1===t.indexOf(e)?[this.page.per_page].concat(t):t}},methods:{push:function(){var t=Object.assign({},this.$route.query,{page:this.currentPage,per_page:this.perPage});this.$router.push({path:this.$route.path,query:t})},onSizeChange:function(t){this.$emit("size-change",t),this.autoPush&&(this.currentPage=1,this.push())},onChange:function(t){this.$emit("current-change",t),this.autoPush&&this.push()}},watch:{page:{handler:function(t){var e=this;t&&(this.currentPage=t.current_page,this.perPage=t.per_page,this.$nextTick(function(){e.$refs.page.internalCurrentPage=t.current_page}))},immediate:!0}}},o=i,s=n("2877"),u=Object(s["a"])(o,r,a,!1,null,"f691fd2e",null);e["a"]=u.exports},"83a1":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},"91a0":function(t,e,n){"use strict";n("7f7f"),n("5df3"),n("1c4c"),n("c5f6");e["a"]={inject:{elTable:{default:""}},data:function(){return{identify:void 0}},props:{resource:{type:String,default:function(){return this.elTable&&this.elTable.resource}},data:{type:Array,default:function(){return this.elTable&&this.elTable.data}},index:[Number,String],rowKey:{type:String,default:function(){return this.elTable&&this.elTable.rowKey}}},methods:{getIndex:function(){if(void 0!==this.index)return this.index;if(this.elTable){var t=this.findTr();if(t){var e=Array.from(this.elTable.$el.querySelectorAll(".el-table__body tr")).indexOf(t);return-1===e?void 0:e}}},findTr:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.$el;if(t){var e=t.tagName.toLowerCase();return"tr"===e?t:"tbody"===e?void 0:this.findTr(t.parentNode)}},setIdentify:function(){if(void 0===this.identify){var t=this.getIndex();this.identify=this.data[t][this.rowKey]}},checkResourceName:function(){if(!this.resource)throw new Error("必须在 [ 表格 ] 或者 [ ".concat(this.$options.name," ] 中,传入 [ resource ] 属性"))}}}},a561:function(t,e,n){"use strict";var r=n("dacd"),a=n.n(r);a.a},b64d:function(t,e,n){"use strict";n.d(e,"b",function(){return a}),n.d(e,"c",function(){return i}),n.d(e,"d",function(){return o}),n.d(e,"e",function(){return s}),n.d(e,"a",function(){return u});var r=n("bf9a");function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("area",{params:t})}function i(t){return r["b"].get("area/".concat(t))}function o(t){return r["b"].post("area",t)}function s(t,e){return r["b"].put("area/".concat(t),e)}function u(t){return r["b"].get("area/".concat(t,"/edit"))}},bd0b:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.comp,t._b({tag:"component",staticClass:"pop-confirm",attrs:{type:t.type,disabled:t.disabled}},"component",t.$attrs,!1),[n("el-popover",{attrs:{placement:"top",width:"160",disabled:t.disabled},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[n("p",[t._v(t._s(t.notice))]),n("div",{staticStyle:{"text-align":"right",margin:"0"}},[n("el-button",{attrs:{size:"mini"},on:{click:t.onCancel}},[t._v("取消")]),n("loading-action",{attrs:{type:t.confirmType,size:"mini",action:t.action,disabled:t.disabled}},[t._v("\n 确定\n ")])],1),n("span",{staticClass:"trigger",attrs:{slot:"reference"},slot:"reference"})]),t._t("default")],2)},a=[],i=(n("96cf"),n("3b8d")),o={name:"PopConfirm",data:function(){return{visible:!1}},props:{notice:{type:String,default:"确认操作?"},confirmType:{type:String,default:"primary"},confirm:Function,type:String,disabled:Boolean,comp:{type:String,default:"el-button"}},methods:{onCancel:function(){this.visible=!1,this.$emit("cancel")},action:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(!this.disabled){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,this.confirm();case 4:this.visible=!1;case 5:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}()}},s=o,u=(n("15b5"),n("2877")),c=Object(u["a"])(s,r,a,!1,null,"f59b5a72",null);e["a"]=c.exports},cafd:function(t,e,n){"use strict";var r=n("0fb6"),a=n.n(r);a.a},dacd:function(t,e,n){}}]);
  2. //# sourceMappingURL=chunk-e7a59ac4.7ed4b9dc.js.map