(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ae12fff0"],{d6ed:function(e,t,r){},d9aa:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("div",{staticClass:"app-form margin-top"},[r("el-form",{ref:"dataForm",attrs:{rules:e.rules,model:e.form,"label-position":"right","label-width":"200px"}},[r("div",{staticClass:"app-form-group"},[r("div",{staticClass:"app-form-ti"},[e._v("基础配置")]),r("div",{staticClass:"padding-top-lg"},[r("el-form-item",{attrs:{label:"状态",prop:"is_repurchase"}},[r("el-radio-group",{model:{value:e.form.is_repurchase,callback:function(t){e.$set(e.form,"is_repurchase",t)},expression:"form.is_repurchase"}},[r("el-radio",{attrs:{label:1}},[e._v("开启")]),r("el-radio",{attrs:{label:0}},[e._v("关闭")])],1),r("el-alert",{attrs:{title:"开启复购奖后，当购买商品的用户是分销商时，一级佣金和级差奖的比例替换成复购奖比例计算",type:"error"}})],1),1==e.form.is_repurchase?r("el-form-item",{attrs:{label:"下单级差",prop:"repurchase_mode"}},[r("el-radio-group",{model:{value:e.form.repurchase_mode,callback:function(t){e.$set(e.form,"repurchase_mode",t)},expression:"form.repurchase_mode"}},[r("el-radio",{attrs:{label:1}},[e._v("开启")]),r("el-radio",{attrs:{label:0}},[e._v("关闭")])],1),r("el-alert",{attrs:{title:"开启后，会以下单人用户等级开始算入级差，需开启级差奖才有效",type:"error"}})],1):e._e(),1==e.form.is_repurchase&&0==e.form.repurchase_mode?r("el-form-item",{attrs:{label:"复购会员级差等级",prop:"repurchase_mode"}},[r("el-select",{attrs:{filterable:"",placeholder:"分销等级"},model:{value:e.form.repurchase_vip_jicha_level,callback:function(t){e.$set(e.form,"repurchase_vip_jicha_level",t)},expression:"form.repurchase_vip_jicha_level"}},[r("el-option",{attrs:{label:"选择等级",value:-1}}),e._l(e.levels,(function(e,t){return r("el-option",{key:t,attrs:{label:e.title,value:e.id}})}))],2),r("el-alert",{attrs:{title:"选择分销等级后，该分销等级和之后的等级复购奖都按照会员价级差来计算，不选择则按原来的逻辑计算奖励。",type:"error"}})],1):e._e()],1)]),r("div",{staticClass:"padding-lg flex justify-center"},[r("el-button",{on:{click:e.onBack}},[e._v("返回")]),r("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("提交")])],1)])],1),r("copyright")],1)},i=[],s=r("7f70"),l=r("8327"),o={name:"Repurchase",components:{},data:function(){return{activeIndex:"1",levels:[],rules:{},form:{is_repurchase:0}}},computed:Object(s["a"])({},Object(l["b"])(["config"])),watch:{config:function(e){this.init()}},mounted:function(){this.init()},methods:{onBack:function(){this.$router.go(-1)},handleSelect:function(e,t){this.activeIndex=e},submit:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&e.api.post("repurchase/config/set",e.form).then((function(t){1==t.code?(e.$util.success(t.message),e.$store.dispatch("settings/getSetting")):e.$util.error(t.message)}))}))},init:function(){var e=this,t=this.config;if(t&&t.fenxiao){var r=this.$util.restJson(t.fenxiao);this.form={is_repurchase:r.is_repurchase,repurchase_mode:r.repurchase_mode,repurchase_vip_jicha_level:r.repurchase_vip_jicha_level}}this.api.get("fenxiao/level/all").then((function(t){1==t.code&&(e.levels=t.data.list)}))}}},c=o,n=(r("ff41"),r("3d7a")),p=Object(n["a"])(c,a,i,!1,null,null,null);t["default"]=p.exports},ff41:function(e,t,r){"use strict";r("d6ed")}}]);