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