(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5dc1102c"],{"32ed":function(t,e,i){"use strict";i("785c")},"785c":function(t,e,i){},c014:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"app-form margin-top"},[i("el-form",{ref:"dataForm",attrs:{rules:t.rules,model:t.form,"label-position":"right","label-width":"200px"}},[i("div",{staticClass:"app-form-group margin-top"},[i("div",{staticClass:"app-form-ti"},[t._v("基础配置")]),i("div",{staticClass:"padding-top-lg"},[i("el-form-item",{attrs:{label:"状态",prop:"is_directpush_jiandan"}},[i("el-radio-group",{model:{value:t.form.is_directpush_jiandan,callback:function(e){t.$set(t.form,"is_directpush_jiandan",e)},expression:"form.is_directpush_jiandan"}},[i("el-radio",{attrs:{label:1}},[t._v("开启")]),i("el-radio",{attrs:{label:0}},[t._v("关闭")])],1),i("el-alert",{attrs:{title:"开启后，用户直推业绩达到条件后，团队里有人下单可获得百分比奖励",type:"error"}})],1),1==t.form.is_directpush_jiandan?i("el-form-item",{attrs:{label:"规则设置"}},[t._l(t.form.directpush_jiandan,(function(e,n){return i("div",{staticClass:"flex align-center padding-bottom"},[i("el-input",{staticClass:"form-input margin-left",model:{value:e.achievement,callback:function(i){t.$set(e,"achievement",t._n(i))},expression:"item.achievement"}},[i("template",{slot:"prepend"},[t._v("直推业绩")]),i("template",{slot:"append"},[t._v("元")])],2),i("el-input",{staticClass:"form-input margin-left",attrs:{type:"number"},model:{value:e.reward,callback:function(i){t.$set(e,"reward",i)},expression:"item.reward"}},[i("template",{slot:"prepend"},[t._v("奖励")]),i("template",{slot:"append"},[t._v("%")])],2),i("el-button",{staticClass:"margin-left",attrs:{type:"danger",icon:"el-icon-delete"},on:{click:function(e){return t.delRule(n)}}})],1)})),i("div",{},[i("el-button",{attrs:{type:"success",size:"mini",icon:"el-icon-plus"},on:{click:t.addRule}},[t._v("添加")])],1)],2):t._e()],1)]),i("div",{staticClass:"padding-lg flex justify-center"},[i("el-button",{on:{click:t.onBack}},[t._v("返回")]),i("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("提交")])],1)])],1),i("copyright")],1)},a=[],s=i("7f70"),r=(i("e8d6"),i("baf6"),i("8327")),c={name:"Management",components:{},data:function(){return{activeIndex:"1",rules:{},form:{is_directpush_jiandan:0,directpush_jiandan:[]}}},computed:Object(s["a"])({},Object(r["b"])(["config"])),watch:{config:function(t){this.init()}},mounted:function(){this.init()},methods:{onBack:function(){this.$router.go(-1)},addRule:function(){this.form.directpush_jiandan.push({achievement:"",reward:""})},delRule:function(t){this.form.directpush_jiandan.splice(t,1)},handleSelect:function(t,e){this.activeIndex=t},submit:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&t.api.post("directpush_jiandan/config/set",t.form).then((function(e){1==e.code?(t.$util.success(e.message),t.$store.dispatch("settings/getSetting")):t.$util.error(e.message)}))}))},init:function(){var t=this.config;if(t.fenxiao){var e=this.$util.restJson(t.fenxiao);this.form={is_directpush_jiandan:e.is_directpush_jiandan,directpush_jiandan:e.directpush_jiandan}}}}},o=c,l=(i("32ed"),i("3d7a")),d=Object(l["a"])(o,n,a,!1,null,null,null);e["default"]=d.exports}}]);