(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-59d65ad1"],{"0857":function(t,a,e){"use strict";e("a0e0");var o=e("a013"),i=e("f425"),l=e("dad2"),n="toString",r=/./[n],s=function(t){e("e5ef")(RegExp.prototype,n,t,!0)};e("b6f1")(function(){return"/a/b"!=r.call({source:"a",flags:"b"})})?s(function(){var t=o(this);return"/".concat(t.source,"/","flags"in t?t.flags:!l&&t instanceof RegExp?i.call(t):void 0)}):r.name!=n&&s(function(){return r.call(this)})},"3c72":function(t,a,e){"use strict";e.r(a);var o,i=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-dialog",{attrs:{fullscreen:"","hide-overlay":"",transition:"dialog-bottom-transition"},model:{value:t.thisValue,callback:function(a){t.thisValue=a},expression:"thisValue"}},[e("v-card",[e("v-toolbar",{attrs:{id:"core-toolbar",app:"",color:"dark",prominent:""}},[e("div",{staticClass:"v-toolbar-title"},[e("v-toolbar-title",{staticClass:"white--text font-weight-light"},[t._v("新增优惠券")])],1),e("v-spacer"),e("v-toolbar-items",[e("v-btn",{attrs:{icon:"",dark:""},on:{click:function(a){t.thisValue=!1}}},[e("v-icon",[t._v("el-icon-close")])],1)],1)],1),e("v-card-text",[e("v-container",[e("div",{staticStyle:{height:"60px"}}),e("v-form",{ref:"form",model:{value:t.valid,callback:function(a){t.valid=a},expression:"valid"}},[e("v-text-field",{attrs:{label:"优惠券名称",rules:[function(t){return!!t||"优惠券名称"}],required:"",placeholder:"输入4-12个字符",counter:12},model:{value:t.formData.coupon_name,callback:function(a){t.$set(t.formData,"coupon_name",a)},expression:"formData.coupon_name"}}),e("v-text-field",{attrs:{label:"过期天数(天)",rules:[function(t){return!!t||"过期天数必填"}],required:"",placeholder:"用户领取后生效",type:"number"},model:{value:t.formData.deadline_days,callback:function(a){t.$set(t.formData,"deadline_days",a)},expression:"formData.deadline_days"}}),e("v-text-field",{attrs:{label:"优惠金额(元)",rules:[function(t){return!!t||"优惠金额必填"}],required:"",type:"number"},model:{value:t.formData.discount_amount,callback:function(a){t.$set(t.formData,"discount_amount",a)},expression:"formData.discount_amount"}}),e("v-text-field",{attrs:{label:"满足最低消费(元)",type:"number"},model:{value:t.formData.conditions_amount,callback:function(a){t.$set(t.formData,"conditions_amount",a)},expression:"formData.conditions_amount"}}),e("p",{staticClass:"mt-4"},[t._v("服务类型限制")]),e("v-radio-group",{attrs:{mandatory:!1,row:""},model:{value:t.formData.limit_service,callback:function(a){t.$set(t.formData,"limit_service",a)},expression:"formData.limit_service"}},[e("v-radio",{attrs:{label:"限制服务",value:1}}),e("v-radio",{attrs:{label:"不限制服务",value:0}})],1),e("el-checkbox-group",{model:{value:t.formData.condition_service,callback:function(a){t.$set(t.formData,"condition_service",a)},expression:"formData.condition_service"}},[e("el-checkbox",{attrs:{label:"帮我送",disabled:0==t.formData.limit_service}}),e("el-checkbox",{attrs:{label:"帮我取",disabled:0==t.formData.limit_service}}),e("el-checkbox",{attrs:{label:"帮我买",disabled:0==t.formData.limit_service}}),e("el-checkbox",{attrs:{label:"代驾",disabled:0==t.formData.limit_service}})],1),e("v-text-field",{staticClass:"mt-4",attrs:{label:"发放数量限制(填-1表示不限制)",type:"number"},model:{value:t.formData.limit_no,callback:function(a){t.$set(t.formData,"limit_no",a)},expression:"formData.limit_no"}}),e("p",{staticClass:"mt-4"},[t._v("优惠券状态")]),e("v-radio-group",{attrs:{mandatory:!1,row:""},model:{value:t.formData.status,callback:function(a){t.$set(t.formData,"status",a)},expression:"formData.status"}},[e("v-radio",{attrs:{label:"开启优惠券",value:1}}),e("v-radio",{attrs:{label:"不可领取",value:2}}),e("v-radio",{attrs:{label:"停用优惠券",value:3}})],1),e("v-btn",{attrs:{color:"dark",loading:t.loading},on:{click:function(a){return t.doEdit()}}},[t._v("确认添加")])],1)],1)],1)],1)],1)},l=[],n=(e("0857"),{props:{value:{type:Boolean,required:!0,default:!1}},data:function(){return{thisValue:this.value,loading:!1,roles:[],valid:!0,formData:{coupon_name:"",deadline_days:"",discount_amount:"",conditions_amount:0,condition_service:[],status:1,limit_no:"",limit_service:0}}},watch:{value:function(t){this.thisValue=t},thisValue:function(t){this.$emit("change",t)}},mounted:function(){o=this},methods:{doEdit:function(){if(this.$refs.form.validate()){this.loading=!0;var t=JSON.parse(JSON.stringify(this.formData));t.condition_service=t.condition_service.toString(),this.$post("coupon/add",t,function(t){o.loading=!1,0==t.errno&&(o.$message({showClose:!0,message:t.errmsg,type:"success"}),o.thisValue=!1,o.$emit("changemsg",t))})}}}}),r=n,s=e("6691"),c=Object(s["a"])(r,i,l,!1,null,null,null);a["default"]=c.exports},a0e0:function(t,a,e){e("dad2")&&"g"!=/./g.flags&&e("ddf7").f(RegExp.prototype,"flags",{configurable:!0,get:e("f425")})}}]);
//# sourceMappingURL=chunk-59d65ad1.5868dd00.js.map