cpop_nftmeta_sdm/web/admin-web/static/js/chunk-3c96ccc2.d1bfb002.js
2024-10-25 16:17:26 +08:00

1 line
2.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3c96ccc2"],{"14c3":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("div",{staticClass:"DeductionRate"},[n("el-form",{ref:"form",staticClass:"demo-form-inline",attrs:{inline:!0,rules:t.rules,model:t.form}},[n("h2",[t._v("当前金额-积分扣减比率为:"),n("span",{staticClass:"red-text"},[t._v(t._s(t.form.rate))]),t._v(" "+t._s(t.divisionResult))]),t._v(" "),n("el-form-item",{attrs:{label:"",prop:"newRate"}},[n("el-input",{attrs:{clearable:"",placeholder:"请输入要修改的积分比率"},model:{value:t.form.newRate,callback:function(e){t.$set(t.form,"newRate",e)},expression:"form.newRate"}})],1),t._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:t.updateRate}},[t._v("修改")])],1)],1)],1)])},r=[],o=n("b775");function i(t){return Object(o["a"])({url:"/admin/rate",method:"get"})}function c(t){return Object(o["a"])({url:"/admin/rate/update/"+t,method:"get"})}var s={data:function(){return{form:{rate:0,newRate:""},rules:{newRate:[{required:!0,trigger:"blur",message:"请填写比率!"}]}}},mounted:function(){this.getRate()},computed:{divisionResult:function(){return 0!=this.form.rate?""+1/this.form.rate+" 积分抵扣1元人民币":"(取消积分扣减金额)"}},methods:{getRate:function(){var t=this;i().then((function(e){t.form.rate=e.data}))},updateRate:function(){var t=this;this.$refs.form.validate((function(e){e&&t.$confirm("0"!=t.form.newRate?"是否修改积分比率为 "+t.form.newRate+", 即 "+1/t.form.newRate+" 积分抵扣1元人民币?":"是否修改积分比率为 "+t.form.newRate+", 取消积分扣减金额?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){c(t.form.newRate).then((function(e){t.$message.success(e.msg),t.form.rate=t.form.newRate}))})).catch((function(){}))}))}}},u=s,f=(n("da4c"),n("2877")),l=Object(f["a"])(u,a,r,!1,null,null,null);e["default"]=l.exports},"4a6a":function(t,e,n){},da4c:function(t,e,n){"use strict";n("4a6a")}}]);