(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-dcbb8af8"],{"0a96":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"vipmangeadd"},[a("div",{staticClass:"outmain ba_f heighthv pad_20 bor_rad5"},[e._m(0),a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"180px"}},[a("div",{staticClass:"mar_t20 flex-bet flex-y-top"},[a("div",{staticClass:"flex-g-1"},[a("el-form-item",{attrs:{label:"等级名称",required:!0,prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入等级名称"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:"等级背景"}},[a("el-radio-group",{model:{value:e.form.bgType,callback:function(t){e.$set(e.form,"bgType",t)},expression:"form.bgType"}},[a("el-radio",{attrs:{label:"1"}},[e._v("背景色")]),a("el-radio",{attrs:{label:"2"}},[e._v("背景图")])],1)],1),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form.bgType,expression:"form.bgType=='1'"}],attrs:{label:"背景色"}},[a("el-color-picker",{model:{value:e.form.color,callback:function(t){e.$set(e.form,"color",t)},expression:"form.color"}})],1),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"2"==e.form.bgType,expression:"form.bgType=='2'"}],attrs:{label:"背景图"}},[e.form.bgImg?a("div",{staticClass:"uploadSource bor_de rel flex"},[a("label",{staticClass:"statusLabel curs",on:{mouseenter:function(t){return e.enter(1)},mouseleave:function(t){return e.leave(1)}}},[a("i",{ref:"imgicon1",staticClass:"el-icon-check"}),a("i",{staticClass:"el-icon-close",on:{click:function(t){return e.deleteMultiImage(e.form.bgImg,1)}}})]),a("img",{staticClass:"wid",attrs:{src:e.form.bgImg},on:{click:function(t){return e.test(1)}}})]):a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(1)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})]),a("div",{staticClass:"yb_margin"},[e._v("建议尺寸:1000*600像素")])]),"1"!=this.form.level?a("el-form-item",{attrs:{label:"获得条件",required:!0}},[a("el-input",{attrs:{placeholder:"请输入成长值"},model:{value:e.form.condition,callback:function(t){e.$set(e.form,"condition",t)},expression:"form.condition"}}),a("span",{staticClass:"mar_l10"},[e._v("成长值")]),a("div",{staticClass:"yb_margin lh16"},[e._v("修改等级所需成长值后,部分客户会因无法达到该成长值要求而发生会员等级的变化")])],1):e._e()],1),a("div",{staticClass:"flex-g-0 pad_lr_20"},[a("div",{staticClass:"cardshow",style:{background:1==e.form.bgType?e.form.color:e.form.bgImg&&"url("+e.form.bgImg+") center center / cover no-repeat"}},[a("div",{staticClass:"cardbg"}),a("div",{staticClass:"fon_18 lh22 wei"},[e._v(e._s(e.form.name))]),"1"!=this.form.level?a("div",{staticClass:"mar_t20"},[a("span",{staticClass:"mar_r10 fon_26"},[e._v(e._s(e.form.condition))]),a("span",[e._v("成长值")])]):e._e(),a("div",{staticClass:"line"},[a("div",{staticClass:"lineright"})]),a("div",{staticClass:"mar_t20 fon_12"},[e._v(e._s(e.form.name))])]),a("div",{staticClass:"yb_margin lh16 t_c"},[e._v("仅为预览,实际以用户查看时为准")])])]),a("div",{staticClass:"shuju_title mar_b20"},[a("div",{staticClass:"shuju_title_text"},[a("span",[e._v("权益礼包")])])]),a("el-form-item",{attrs:{label:"会员权益"}},[a("div",{},[a("div",{staticClass:"mar_lr10"},[a("el-checkbox-group",{model:{value:e.form.rights,callback:function(t){e.$set(e.form,"rights",t)},expression:"form.rights"}},e._l(e.rightsList,(function(t){return a("el-checkbox",{key:t.id,attrs:{label:t.id}},[e._v(e._s(t.name))])})),1)],1)])]),a("el-form-item",{attrs:{label:"当面付折扣"}},[a("div",{staticClass:"t_l numberInput"},[a("div",{staticClass:"mar_lr10"},[a("el-checkbox-group",{model:{value:e.form.isCashier,callback:function(t){e.$set(e.form,"isCashier",t)},expression:"form.isCashier"}},[a("el-checkbox",{attrs:{"true-label":"1","false-label":"2"}},[e._v("会员折扣")])],1)],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form.isCashier,expression:"form.isCashier=='1'"}]},[a("el-input-number",{attrs:{"controls-position":"right",min:.01,max:99999999},model:{value:e.form.cashierDiscount,callback:function(t){e.$set(e.form,"cashierDiscount",t)},expression:"form.cashierDiscount"}}),a("span",{staticClass:"mar_l10"},[e._v("折")])],1)])]),a("el-form-item",{attrs:{label:"升级礼包"}},[a("div",{},[a("div",{staticClass:"mar_lr10"},[a("el-checkbox-group",{model:{value:e.form.isCoupon,callback:function(t){e.$set(e.form,"isCoupon",t)},expression:"form.isCoupon"}},[a("el-checkbox",{attrs:{"true-label":"1","false-label":"2"}},[e._v("赠送优惠券")])],1)],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form.isCoupon,expression:"form.isCoupon=='1'"}],staticClass:"flex"},[a("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 a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)]),a("div",{staticClass:"t_l numberInput"},[a("div",{staticClass:"mar_lr10"},[a("el-checkbox-group",{model:{value:e.form.isBalance,callback:function(t){e.$set(e.form,"isBalance",t)},expression:"form.isBalance"}},[a("el-checkbox",{attrs:{"true-label":"1","false-label":"2"}},[e._v("赠送余额")])],1)],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form.isBalance,expression:"form.isBalance=='1'"}]},[a("el-input-number",{attrs:{"controls-position":"right",min:.01,max:99999999},model:{value:e.form.balance,callback:function(t){e.$set(e.form,"balance",t)},expression:"form.balance"}}),a("span",{staticClass:"mar_l10"},[e._v("元")])],1)]),a("div",{staticClass:"t_l numberInput"},[a("div",{staticClass:"mar_lr10"},[a("el-checkbox-group",{model:{value:e.form.isIntegral,callback:function(t){e.$set(e.form,"isIntegral",t)},expression:"form.isIntegral"}},[a("el-checkbox",{attrs:{"true-label":"1","false-label":"2"}},[e._v("赠送积分")])],1)],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form.isIntegral,expression:"form.isIntegral=='1'"}]},[a("el-input-number",{attrs:{"controls-position":"right",min:1,max:99999999},model:{value:e.form.integral,callback:function(t){e.$set(e.form,"integral",t)},expression:"form.integral"}}),a("span",{staticClass:"mar_l10"},[e._v("积分")])],1)]),a("div",{staticClass:"t_l numberInput"},[a("div",{staticClass:"mar_lr10"},[a("el-checkbox-group",{model:{value:e.form.isGrowth,callback:function(t){e.$set(e.form,"isGrowth",t)},expression:"form.isGrowth"}},[a("el-checkbox",{attrs:{"true-label":"1","false-label":"2"}},[e._v("赠送成长值")])],1)],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form.isGrowth,expression:"form.isGrowth=='1'"}]},[a("el-input-number",{attrs:{"controls-position":"right",min:1,max:99999999},model:{value:e.form.growth,callback:function(t){e.$set(e.form,"growth",t)},expression:"form.growth"}}),a("span",{staticClass:"mar_l10"},[e._v("成长值")])],1)])])],1)],1),a("div",{staticClass:"mar_t20 ba_f pad_20 t_c"},[a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("立即创建")])],1),a("attachment-img",{ref:"img1",attrs:{type:"img"},on:{attachment:e.imgadd1}})],1)},r=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"shuju_title mar_b20"},[a("div",{staticClass:"shuju_title_text"},[a("span",[e._v("基本信息")])])])}],i=(a("c975"),a("d81d"),a("a434"),a("96cf"),a("1da1")),s=a("c24f"),o=a("fc6e"),l={created:function(){this.$route.query.level&&(this.form.level=this.$route.query.level),this.getSaveLevel(),this.getSelectCoupon()},components:{attachmentImg:o["a"]},data:function(){return{form:{level:"",name:"",color:"#E2A850",bgImg:"",bgType:"1",condition:"0",rights:[],isBalance:"2",isIntegral:"2",isGrowth:"2",isCoupon:"2",balance:"",integral:"",growth:"",coupon:[],cashierDiscount:"",isCashier:""},checkedCities:[],rightsList:[],comgrouping:[]}},methods:{getSelectCoupon:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(s["n"])();case 2:a=t.sent,n=a.data,e.comgrouping=n||[];case 5:case"end":return t.stop()}}),t)})))()},getSaveLevel:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(s["m"])({level:e.form.level?e.form.level:""});case 2:a=t.sent,n=a.data,n.id&&(e.form=Object.assign({},n)),e.rightsList=n.rightsList;case 6:case"end":return t.stop()}}),t)})))()},submitForm:function(){var e=this;return Object(i["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(i["a"])(regeneratorRuntime.mark((function t(a){var n,r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=11;break}return n=e.rightsList&&e.rightsList.map((function(e){return e.id})),e.form.rights=e.getArrEqual(n,e.form.rights),t.next=5,Object(s["y"])(e.form);case 5:r=t.sent,i=r.msg,e.$baseMessage(i,"success"),e.$router.push({path:"vipmange"}),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)})))()},getArrEqual:function(e,t){for(var a=[],n=0;n0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+e].style.display="none"},leave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+e].style.display="inline-block"},test:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["img"+e].dialogVisible=!0},imgadd1:function(e){this.form.bgImg=e.str},deleteMultiImage:function(e,t,a){if(Array.prototype.remove=function(e){var t=this.indexOf(e);t>-1&&this.splice(t,1)},"multigraph"==a)switch(t){case 2:this.form2.environment.remove(e);break}else switch(t){case 1:this.form.bgImg="";break}}}},c=l,u=(a("5711"),a("2877")),m=Object(u["a"])(c,n,r,!1,null,null,null);t["default"]=m.exports},5711:function(e,t,a){"use strict";var n=a("efe1"),r=a.n(n);r.a},a434:function(e,t,a){"use strict";var n=a("23e7"),r=a("23cb"),i=a("a691"),s=a("50c4"),o=a("7b0b"),l=a("65f0"),c=a("8418"),u=a("1dde"),m=a("ae40"),d=u("splice"),f=m("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,g=Math.min,h=9007199254740991,v="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!d||!f},{splice:function(e,t){var a,n,u,m,d,f,b=o(this),_=s(b.length),y=r(e,_),x=arguments.length;if(0===x?a=n=0:1===x?(a=0,n=_-y):(a=x-2,n=g(p(i(t),0),_-y)),_+a-n>h)throw TypeError(v);for(u=l(b,n),m=0;m_-n+a;m--)delete b[m-1]}else if(a>n)for(m=_-n;m>y;m--)d=m+n-1,f=m+a-1,d in b?b[f]=b[d]:delete b[f];for(m=0;m