(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d4a6e722"],{"3bbe":function(e,t,r){var n=r("861d");e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},7156:function(e,t,r){var n=r("861d"),a=r("d2bb");e.exports=function(e,t,r){var o,c;return a&&"function"==typeof(o=t.constructor)&&o!==r&&n(c=o.prototype)&&c!==r.prototype&&a(e,c),e}},"98ff":function(e,t,r){"use strict";var n=r("a80e"),a=r.n(n);a.a},a80e:function(e,t,r){},a9e3:function(e,t,r){"use strict";var n=r("83ab"),a=r("da84"),o=r("94ca"),c=r("6eeb"),i=r("5135"),u=r("c6b6"),s=r("7156"),l=r("c04e"),m=r("d039"),d=r("7c73"),f=r("241c").f,p=r("06cf").f,b=r("9bf2").f,h=r("58a8").trim,g="Number",v=a[g],_=v.prototype,O=u(d(_))==g,j=function(e){var t,r,n,a,o,c,i,u,s=l(e,!1);if("string"==typeof s&&s.length>2)if(s=h(s),t=s.charCodeAt(0),43===t||45===t){if(r=s.charCodeAt(2),88===r||120===r)return NaN}else if(48===t){switch(s.charCodeAt(1)){case 66:case 98:n=2,a=49;break;case 79:case 111:n=8,a=55;break;default:return+s}for(o=s.slice(2),c=o.length,i=0;ia)return NaN;return parseInt(o,n)}return+s};if(o(g,!v(" 0o1")||!v("0b1")||v("+0x1"))){for(var x,w=function(e){var t=arguments.length<1?0:e,r=this;return r instanceof w&&(O?m((function(){_.valueOf.call(r)})):u(r)!=g)?s(new v(j(t)),r,w):j(t)},y=n?f(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),N=0;y.length>N;N++)i(v,x=y[N])&&!i(w,x)&&b(w,x,p(v,x));w.prototype=_,_.constructor=w,c(a,g,w)}},bf19:function(e,t,r){"use strict";var n=r("23e7");n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},c147:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"exchangeadd"},[r("div",{staticClass:"outmain ba_f heighthv pad_20 bor_rad5"},[e._m(0),r("div",{staticClass:"mar_t20 flex-bet flex-y-top"},[r("div",{staticClass:"flex-g-1"},[r("el-form",{ref:"form",attrs:{model:e.form,"label-width":"180px"}},[r("el-form-item",{attrs:{label:"兑换码名称",required:!0,prop:"name"}},[r("el-input",{attrs:{placeholder:"请输入兑换码名称"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),r("el-form-item",{attrs:{label:"活动时间",required:!0}},[r("el-date-picker",{attrs:{type:"datetimerange",align:"right","start-placeholder":"开始日期","end-placeholder":"结束日期","default-time":["08:00:00","23:59:59"]},model:{value:e.timeData,callback:function(t){e.timeData=t},expression:"timeData"}})],1),r("el-form-item",{attrs:{label:"库存",required:!0,prop:"stock"}},[r("el-input",{attrs:{placeholder:"请输入发放总量",disabled:e.id>0},model:{value:e.form.stock,callback:function(t){e.$set(e.form,"stock",t)},expression:"form.stock"}}),r("span",{staticClass:"mar_lr10"},[e._v("个")])],1),r("el-form-item",{attrs:{label:"每人可用",required:!0}},[r("div",{staticClass:"time_item"},[r("el-radio",{attrs:{label:"1"},model:{value:e.form.limitType,callback:function(t){e.$set(e.form,"limitType",t)},expression:"form.limitType"}},[e._v("不限制")]),r("el-radio",{attrs:{label:"2"},model:{value:e.form.limitType,callback:function(t){e.$set(e.form,"limitType",t)},expression:"form.limitType"}},[e._v("限制")]),r("span",{directives:[{name:"show",rawName:"v-show",value:"2"==e.form.limitType,expression:"form.limitType=='2'"}]},[r("el-input-number",{attrs:{"controls-position":"right",min:1,max:1e6},model:{value:e.form.maxNum,callback:function(t){e.$set(e.form,"maxNum",t)},expression:"form.maxNum"}}),r("span",{staticClass:"mar_l10"},[e._v("个码")])],1)],1)]),r("el-form-item",{attrs:{label:"兑换权益"}},[r("div",{},[r("div",{staticClass:"mar_lr10"},[r("el-checkbox-group",{model:{value:e.form.isCoupon,callback:function(t){e.$set(e.form,"isCoupon",t)},expression:"form.isCoupon"}},[r("el-checkbox",{attrs:{"true-label":"1","false-label":"2"}},[e._v("兑换优惠券")])],1)],1),r("div",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form.isCoupon,expression:"form.isCoupon=='1'"}],staticClass:"flex"},[r("el-select",{attrs:{multiple:"",filterable:"",placeholder:"请选择优惠券"},model:{value:e.form.coupon,callback:function(t){e.$set(e.form,"coupon",t)},expression:"form.coupon"}},e._l(e.comgrouping,(function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)])])],1)],1),r("div",{staticClass:"flex-g-0 pad_lr_20"},[r("div",{staticClass:"fon_16"},[e._v("常见问题")]),r("el-collapse",{staticClass:"mar_tb10",staticStyle:{width:"260px"},attrs:{accordion:""},model:{value:e.collapseName,callback:function(t){e.collapseName=t},expression:"collapseName"}},[r("el-collapse-item",{attrs:{title:"什么是兑换码?",name:"1"}},[r("div",[e._v("兑换码是门店通过不同的渠道发放给用户,用户通过兑换码来兑换相对应的代金券")])]),r("el-collapse-item",{attrs:{title:"为什么要做兑换码活动?",name:"2"}},[r("div",[e._v("可以通过兑换码活动来回馈不同的用户群体,增加下单率")])]),r("el-collapse-item",{attrs:{title:"哪些用户可以领取兑换码?",name:"3"}},[r("div",[e._v("兑换码由门店自行发放,同一兑换码只能发放给同一用户,并且只能兑换一次。")])])],1),r("div",{staticClass:"fon_16 mar_t20"},[e._v("活动规则")]),e._m(1)],1)])]),r("div",{staticClass:"mar_t20 ba_f pad_20 t_c"},[r("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("立即创建")])],1)])},a=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"shuju_title mar_b20"},[r("div",{staticClass:"shuju_title_text"},[r("span",[e._v("创建兑换码活动")])])])},function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"color_9 mar_t10 lh30 fon_13"},[r("div",[e._v("1.活动仅限在线支付订单;")]),r("div",[e._v("2.活动成本由商家承担,与店铺其他活动默认同享")])])}],o=(r("96cf"),r("1da1")),c=r("5530"),i=r("7cb7"),u=r("c24f"),s=r("ed08"),l=r("2f62"),m={computed:Object(c["a"])({},Object(l["d"])(["storeId"])),created:function(){this.$route.query.id&&(this.id=this.$route.query.id,this.edit()),this.getSelectCoupon()},components:{},data:function(){return{form:{name:"",stock:"",limitType:"1",maxNum:"",coupon:[],isCoupon:"2"},id:"",timeData:[new Date,(new Date).setMonth((new Date).getMonth()+3)],comgrouping:[],collapseName:""}},methods:{getSelectCoupon:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(u["n"])();case 2:r=t.sent,n=r.data,e.comgrouping=n||[];case 5:case"end":return t.stop()}}),t)})))()},edit:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["K"])({id:e.id,storeId:e.storeId});case 2:r=t.sent,n=r.data,e.form2=e.form,e.form=Object.assign(e.form2,n),n.startTime&&(e.timeData=[n.startTime,n.endTime]);case 7:case"end":return t.stop()}}),t)})))()},submitForm:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs["form"].validate(function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(r){var n,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=11;break}return e.timeData&&(e.form.startTime=Object(s["a"])(e.timeData[0]),e.form.endTime=Object(s["a"])(e.timeData[1])),e.form.storeId=e.storeId,t.next=5,Object(i["Xb"])(e.form);case 5:n=t.sent,a=n.msg,e.$baseMessage(a,"success"),e.$router.go(-1),t.next=12;break;case 11:return t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()}}},d=m,f=(r("98ff"),r("2877")),p=Object(f["a"])(d,n,a,!1,null,null,null);t["default"]=p.exports},c24f:function(e,t,r){"use strict";r.d(t,"k",(function(){return a})),r.d(t,"E",(function(){return o})),r.d(t,"C",(function(){return c})),r.d(t,"d",(function(){return i})),r.d(t,"b",(function(){return u})),r.d(t,"s",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"j",(function(){return m})),r.d(t,"q",(function(){return d})),r.d(t,"i",(function(){return f})),r.d(t,"r",(function(){return p})),r.d(t,"f",(function(){return b})),r.d(t,"x",(function(){return h})),r.d(t,"h",(function(){return g})),r.d(t,"n",(function(){return v})),r.d(t,"u",(function(){return _})),r.d(t,"g",(function(){return O})),r.d(t,"l",(function(){return j})),r.d(t,"t",(function(){return x})),r.d(t,"A",(function(){return w})),r.d(t,"z",(function(){return y})),r.d(t,"w",(function(){return N})),r.d(t,"p",(function(){return k})),r.d(t,"m",(function(){return C})),r.d(t,"y",(function(){return I})),r.d(t,"a",(function(){return D})),r.d(t,"o",(function(){return T})),r.d(t,"B",(function(){return S})),r.d(t,"e",(function(){return M})),r.d(t,"F",(function(){return E})),r.d(t,"D",(function(){return $})),r.d(t,"v",(function(){return A}));var n=r("b775");function a(e){return Object(n["a"])({url:"channel/member/get-member-list",method:"get",params:e})}function o(e){return Object(n["a"])({url:"channel/member/get-member-list",method:"post",data:e})}function c(e){return Object(n["a"])({url:"channel/activity/select-user",method:"post",data:e})}function i(e){return Object(n["a"])({url:"channel/member/change-status",method:"post",data:e})}function u(e){return Object(n["a"])({url:"channel/member/change-info",method:"post",data:e})}function s(e){return Object(n["a"])({url:"channel/member/member-label-save",method:"post",data:e})}function l(e){return Object(n["a"])({url:"channel/member/change-member-label",method:"post",data:e})}function m(e){return Object(n["a"])({url:"channel/member/get-member-label",method:"get",params:e})}function d(e){return Object(n["a"])({url:"channel/member/member-excel-list",method:"get",params:e})}function f(e){return Object(n["a"])({url:"channel/member/get-member-info",method:"post",data:e})}function p(e){return Object(n["a"])({url:"channel/member/member-info-save",method:"post",data:e})}function b(e){return Object(n["a"])({url:"channel/member/get-deposit-list",method:"get",params:e})}function h(e){return Object(n["a"])({url:"channel/member/deposit-save",method:"post",data:e})}function g(e){return Object(n["a"])({url:"channel/member/deposit-save",method:"get",params:e})}function v(e){return Object(n["a"])({url:"channel/activity/select-coupon",method:"get",params:e})}function _(e){return Object(n["a"])({url:"channel/member/modify-deposit",method:"post",data:e})}function O(e){return Object(n["a"])({url:"channel/member/get-deposit-order",method:"get",params:e})}function j(e){return Object(n["a"])({url:"channel/member/get-member-set-info",method:"get",params:e})}function x(e){return Object(n["a"])({url:"channel/member/member-set",method:"post",data:e})}function w(e){return Object(n["a"])({url:"channel/vip-card/rights-list",method:"get",params:e})}function y(e){return Object(n["a"])({url:"channel/vip-card/save-rights",method:"post",data:e})}function N(e){return Object(n["a"])({url:"channel/vip-card/modify-rights",method:"post",data:e})}function k(e){return Object(n["a"])({url:"channel/vip-card/level-list",method:"get",params:e})}function C(e){return Object(n["a"])({url:"channel/vip-card/save-level",method:"get",params:e})}function I(e){return Object(n["a"])({url:"channel/vip-card/save-level",method:"post",data:e})}function D(e){return Object(n["a"])({url:"channel/vip-card/card-record",method:"get",params:e})}function T(e){return Object(n["a"])({url:"channel/good/goods-vip",method:"get",params:e})}function S(e){return Object(n["a"])({url:"channel/good/save-goods-vip",method:"post",data:e})}function M(e){return Object(n["a"])({url:"channel/member/get-coupon-list",method:"get",params:e})}function E(e){return Object(n["a"])({url:"channel/member/store-coupon-list",method:"get",params:e})}function $(e){return Object(n["a"])({url:"channel/member/send-coupon",method:"post",data:e})}function A(e){return Object(n["a"])({url:"channel/vip-card/modify-level",method:"post",data:e})}},d2bb:function(e,t,r){var n=r("825a"),a=r("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(r,[]),t=r instanceof Array}catch(o){}return function(r,o){return n(r),a(o),t?e.call(r,o):r.__proto__=o,r}}():void 0)},ed08:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return o}));r("a9e3"),r("ac1f"),r("5319"),r("bf19");function n(e){var t=new Date(e).toJSON(),r=new Date(+new Date(t)+288e5).toISOString().replace(/T/g," ").replace(/\.[\d]{3}Z/,"");return r}function a(e){var t=new Date(e),r=t.getFullYear(),n=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,a=t.getDate()<10?"0"+t.getDate():t.getDate(),o=t.getHours()<10?"0"+t.getHours():t.getHours(),c=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),i=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return r+"-"+n+"-"+a+" "+o+":"+c+":"+i}function o(e){var t=new Date(1e3*Number(e)),r=t.getFullYear()+"-",n=(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-",a=(t.getDate()<10?"0"+t.getDate():t.getDate())+" ",o=(t.getHours()<10?"0"+t.getHours():t.getHours())+":",c=(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":",i=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),u=r+n+a+o+c+i;return u}}}]);