| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b2c82c90"],{afc2:function(t,e,s){},e101:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-content setting-freight-wrap"},[e("el-form",{ref:"form",staticClass:"demo-form",attrs:{model:t.form,rules:t.rules,"label-width":"10px"}},[e("el-form-item",[e("div",{staticClass:"flex-center"},[e("el-input",{staticStyle:{width:"60px"},model:{value:t.form.first,callback:function(e){t.$set(t.form,"first",e)},expression:"form.first"}}),e("div",{staticClass:"prompt-text"},[e("span",[t._v("公里内免运费,超过每加1公里加收")])]),e("el-input",{staticStyle:{width:"60px"},model:{value:t.form.add,callback:function(e){t.$set(t.form,"add",e)},expression:"form.add"}}),e("span",{staticStyle:{"margin-left":"10px"}},[t._v("元")])],1)]),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm("form")}}},[t._v("保存")])],1)],1)],1)},n=[],o=s("1f77"),r=s("5880"),f={name:"setting-freight",data:function(){return{form:{first:"",add:""},rules:{}}},computed:Object(o["a"])({},Object(r["mapGetters"])({shopInfo:"shopInfo"})),watch:{shopInfo:function(){this.$util.isEmpty(this.shopInfo)||(this.form.first=this.shopInfo.extend.freeDistance,this.form.add=this.shopInfo.extend.freight)}},mounted:function(){this.init()},methods:{init:function(){this.$util.isEmpty(this.shopInfo)||(this.form.first=this.shopInfo.extend.freeDistance,this.form.add=this.shopInfo.extend.freight)},_updateFn:function(){var t=this;this.$service.single.setFreight(this.form).then((function(e){t.$store.dispatch("shopInfo"),t.$message.success("更新成功!")}))},submitForm:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return console.log("error submit!!"),!1;e._updateFn()}))},resetForm:function(t){this.$refs[t].resetFields()}}},a=f,c=(s("e838"),s("1805")),u=Object(c["a"])(a,i,n,!1,null,null,null);e["default"]=u.exports},e838:function(t,e,s){"use strict";s("afc2")}}]);
|