(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3287f9a5"],{2233:function(t,e,i){"use strict";i.r(e);var l=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"app-form"},[i("el-form",{ref:"dataForm",attrs:{rules:t.rules,model:t.form,"label-position":"right","label-width":"200px"}},[i("div",{staticClass:"app-form-group"},[i("div",{staticClass:"app-form-ti"},[t._v("基础配置")]),i("div",{staticClass:"padding-top-lg"},[i("el-form-item",{attrs:{label:"状态",prop:"is_team_building"}},[i("el-radio-group",{model:{value:t.form.is_team_building,callback:function(e){t.$set(t.form,"is_team_building",e)},expression:"form.is_team_building"}},[i("el-radio",{attrs:{label:1}},[t._v("开启")]),i("el-radio",{attrs:{label:0}},[t._v("关闭")])],1),i("el-alert",{staticClass:"margin-top",attrs:{title:"团队业绩（不含自己购买的业绩）达到档位之后，团队下任何新订单按档位比例*实际支付金额发放团队业绩奖。每个档位只发放一次奖励，若某条线上有多人处于统一档位，离下单用户最近者获得。带级差机制，即高档位所拿的奖金会扣除团队下低档位所拿奖金。",type:"error"}})],1),1==t.form.is_team_building?[i("el-form-item",{attrs:{label:"奖励等级",prop:"team_building_level"}},[i("el-select",{staticClass:"form-input",attrs:{multiple:"",filterable:"",placeholder:"请选择奖励等级"},model:{value:t.form.team_building_level,callback:function(e){t.$set(t.form,"team_building_level",e)},expression:"form.team_building_level"}},t._l(t.levels,(function(t,e){return i("el-option",{key:e,attrs:{label:t.title,value:t.id}})})),1)],1),i("el-form-item",{attrs:{label:"规则配置",prop:"team_building"}},[t._l(t.form.team_building,(function(e,l){return i("div",{staticClass:"flex align-center padding-bottom"},[i("el-input",{staticClass:"form-input ",attrs:{type:"text"},model:{value:e.achievement,callback:function(i){t.$set(e,"achievement",t._n(i))},expression:"item.achievement"}},[i("div",{attrs:{slot:"prepend"},slot:"prepend"},[t._v("团队业绩达到")]),i("template",{slot:"append"},[t._v("元")])],2),i("el-input",{staticClass:"form-input margin-left",attrs:{type:"text"},model:{value:e.money,callback:function(i){t.$set(e,"money",t._n(i))},expression:"item.money"}},[i("div",{attrs:{slot:"prepend"},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(l)}}})],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()],2)]),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)},n=[],a=i("7f70"),s=i("deab"),o=(i("e8d6"),i("baf6"),i("8327")),r={name:"TeamBuilding",components:{},data:function(){return Object(s["a"])({activeIndex:"1",rules:{},levels:[],form:{is_team_building:0,team_building:[],team_building_level:[]}},"levels",[])},computed:Object(a["a"])({},Object(o["b"])(["config"])),watch:{config:function(t){this.init()}},mounted:function(){this.init()},methods:{addRule:function(){this.form.team_building.push({achievement:"",money:""})},delRule:function(t){this.form.team_building.splice(t,1)},onBack:function(){this.$router.go(-1)},submit:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&t.api.post("team_building/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,e=this.$util.restJson(this.config.fenxiao);e&&(this.form={is_team_building:e.is_team_building,team_building:e.team_building,team_building_level:e.team_building_level}),this.api.get("fenxiao/level/all").then((function(e){1==e.code&&(t.levels=e.data.list)}))}}},u=r,c=(i("2e45"),i("3d7a")),m=Object(c["a"])(u,l,n,!1,null,null,null);e["default"]=m.exports},"2e45":function(t,e,i){"use strict";i("d950")},d950:function(t,e,i){}}]);