(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21d6b0"],{d0e3:function(t,e,o){"use strict";o.r(e);var l=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"app-container"},[t.config.id?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:"status"}},[o("el-radio-group",{model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},[o("el-radio",{attrs:{label:1}},[t._v("开启")]),o("el-radio",{attrs:{label:0}},[t._v("关闭")])],1),o("el-alert",{staticClass:"margin-top-sm",attrs:{title:"开启后，达到开启云仓功能的用户，购买云仓商品后订单状态变为已完成，云仓商品库存直接到账，可在云仓商品页面选择提货。未开启的用户按照正常流程发货。",type:"error"}})],1),1==t.form.status?[o("el-form-item",{attrs:{label:"开启云仓等级",prop:"level"}},[o("el-select",{attrs:{filterable:"",placeholder:"选择分销等级"},model:{value:t.form.level,callback:function(e){t.$set(t.form,"level",e)},expression:"form.level"}},t._l(t.levels,(function(t,e){return o("el-option",{key:e,attrs:{label:t.title,value:t.id}})})),1),o("el-alert",{staticClass:"margin-top-sm",attrs:{title:"大于等于设置的等级是时该等级用户开启云仓功能",type:"error"}})],1),o("el-form-item",{attrs:{label:"云仓商品",prop:"cw_goods"}},[o("selgoods",{attrs:{multiple:!0},model:{value:t.form.cw_goods,callback:function(e){t.$set(t.form,"cw_goods",e)},expression:"form.cw_goods"}})],1),o("el-form-item",{attrs:{label:"出货奖扣除平级奖",prop:"chuhuo_deduct_pingji"}},[o("el-radio-group",{model:{value:t.form.chuhuo_deduct_pingji,callback:function(e){t.$set(t.form,"chuhuo_deduct_pingji",e)},expression:"form.chuhuo_deduct_pingji"}},[o("el-radio",{attrs:{label:1}},[t._v("开启")]),o("el-radio",{attrs:{label:0}},[t._v("关闭")])],1)],1)]:t._e()],2)]),o("div",{staticClass:"padding-top-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):t._e(),o("copyright")],1)},s=[],a=o("7f70"),i=o("8327"),r=o("1fe5"),n={name:"CloudWarehouse",components:{selgoods:r["a"]},data:function(){return{activeIndex:"1",rules:{},form:{},levels:[]}},computed:Object(a["a"])({},Object(i["b"])(["config"])),watch:{config:function(t){this.init()}},mounted:function(){this.init()},methods:{onBack:function(){this.$router.go(-1)},handleSelect:function(t,e){this.activeIndex=t},submit:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&t.api.post("cloud_warehouse/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;this.config.cloud_warehouse&&(this.form=this.$util.restJson(this.config.cloud_warehouse)),this.api.get("fenxiao/level/all").then((function(e){1==e.code&&(t.levels=e.data.list)}))}}},c=n,u=o("3d7a"),d=Object(u["a"])(c,l,s,!1,null,null,null);e["default"]=d.exports}}]);