chunk-32de8cf7.c4b6e85f.js 2.0 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-32de8cf7"],{b5ad:function(t,e,s){"use strict";s("eab7")},e101:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"app-content setting-freight-wrap"},[s("el-form",{ref:"form",staticClass:"demo-form",attrs:{model:t.form,rules:t.rules,"label-width":"10px"}},[s("el-form-item",[s("div",{staticClass:"flex-center"},[s("el-input",{staticStyle:{width:"100px"},model:{value:t.form.first,callback:function(e){t.$set(t.form,"first",e)},expression:"form.first"}}),s("div",{staticClass:"prompt-text"},[s("span",[t._v("公里内免运费,超过每增加1公里运费增加")])]),s("el-input",{staticStyle:{width:"100px"},model:{value:t.form.add,callback:function(e){t.$set(t.form,"add",e)},expression:"form.add"}}),s("span",{staticStyle:{"margin-left":"10px"}},[t._v("元")])],1)]),s("el-form-item",[s("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm("form")}}},[t._v("保存")])],1)],1)],1)},n=[],o=s("6abc"),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("b5ad"),s("5d22")),l=Object(c["a"])(a,i,n,!1,null,null,null);e["default"]=l.exports},eab7:function(t,e,s){}}]);