(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4b426dc8"],{"4e85":function(t,i,o){"use strict";o("c034")},"51f7":function(t,i,o){"use strict";o.r(i);var e=function(){var t=this,i=t.$createElement,o=t._self._c||i;return o("div",{staticClass:"app-container"},[o("div",{staticClass:"app-form"},[o("el-form",{ref:"dataForm",attrs:{rules:t.rules,model:t.form,"label-position":"right","label-width":"200px"}},[o("div",{staticClass:"app-form-group"},[o("div",{staticClass:"app-form-ti"},[t._v("基础配置")]),o("div",{staticClass:"padding-top-lg"},[o("el-form-item",{attrs:{label:"手动分红商品",prop:"condition_goods"}},[t._l(t.form.condition_goods,(function(i,e){return o("div",{key:e,staticClass:"margin-bottom"},[o("div",{staticClass:"flex align-center"},[o("selgoods",{attrs:{multiple:!1,tips:"选择商品"},model:{value:i.id,callback:function(o){t.$set(i,"id",o)},expression:"item.id"}}),o("el-input",{staticClass:"form-input margin-left",attrs:{type:"number",placeholder:"出局倍数"},model:{value:i.strikeout_multiple,callback:function(o){t.$set(i,"strikeout_multiple",o)},expression:"item.strikeout_multiple"}},[o("template",{slot:"prepend"},[t._v("出局倍数")]),o("template",{slot:"append"},[t._v("倍")])],2),o("el-button",{staticClass:"margin-left",attrs:{type:"danger",icon:"el-icon-delete"},on:{click:function(i){return t.delRule(e)}}})],1)])})),o("el-button",{attrs:{type:"primary",icon:"el-icon-plus"},on:{click:t.addRule}},[t._v("添加商品")])],2),o("el-form-item",{attrs:{label:"输入手动分红金额",prop:"abonus_money"}},[o("el-input",{staticClass:"form-input",model:{value:t.form.abonus_money,callback:function(i){t.$set(t.form,"abonus_money",i)},expression:"form.abonus_money"}},[o("template",{slot:"append"},[t._v("元")])],2),o("el-button",{staticClass:"margin-left",attrs:{type:"success"},on:{click:t.setAbonus}},[t._v("发放分红")]),o("el-alert",{attrs:{title:"手动分红金额不能大于资金池金额",type:"error"}})],1)],1)]),o("div",{staticClass:"padding-lg flex justify-center"},[o("el-button",{on:{click:t.onBack}},[t._v("返回")]),o("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("提交")])],1)])],1),o("copyright")],1)},s=[],n=o("7f70"),a=(o("e8d6"),o("baf6"),o("23d4"),o("8327")),l=o("1fe5"),r={name:"Capitalpool",components:{selgoods:l["a"]},data:function(){return{activeIndex:"1",rules:{},form:{condition_goods:[{id:"",strikeout_multiple:""}],abonus_money:""},levels:[],defaultForm:{}}},computed:Object(n["a"])(Object(n["a"])({},Object(a["b"])(["config"])),{},{isEdit:function(){var t=JSON.stringify(this.defaultForm),i=JSON.stringify(this.form);return t!=i}}),watch:{config:function(t){this.init()}},mounted:function(){this.init()},methods:{addRule:function(){this.form.condition_goods.push({id:"",strikeout_multiple:""})},delRule:function(t){this.form.condition_goods.splice(t,1)},onBack:function(){this.$router.go(-1)},setAbonus:function(){var t=this;this.form.abonus_money?this.isEdit?this.$util.error("请先保存修改"):this.$util.confirm("确定手动分红吗?",(function(i){i&&t.api.get("capitalpool/capitalpool/setAbonusReward").then((function(i){1==i.code?(t.$util.success(i.message),t.$store.dispatch("settings/getSetting")):t.$util.error(i.message)}))})):this.$util.error("请输入分红金额")},submit:function(){var t=this;this.$refs["dataForm"].validate((function(i){i&&t.api.post("capitalpool/capitalpool/subManualAbonusConfig",{manual_abonus:t.form}).then((function(i){1==i.code?(t.$util.success(i.message),t.$store.dispatch("settings/getSetting")):t.$util.error(i.message)}))}))},init:function(){var t=this.config;t.capitalpool&&t.capitalpool.manual_abonus&&(this.form=this.$util.restJson(t.capitalpool.manual_abonus),this.defaultForm=this.$util.restJson(t.capitalpool.manual_abonus))}}},u=r,c=(o("4e85"),o("3d7a")),p=Object(c["a"])(u,e,s,!1,null,null,null);i["default"]=p.exports},c034:function(t,i,o){}}]);