浏览代码

修改产品费率展示

silent 4 年之前
父节点
当前提交
9dbf5a6ba3
共有 2 个文件被更改,包括 16 次插入0 次删除
  1. 8 0
      src/views/ldt_mall/comps/mall-product-fee.vue
  2. 8 0
      src/views/ldt_shop/comps/shop-product-fee.vue

+ 8 - 0
src/views/ldt_mall/comps/mall-product-fee.vue

@@ -262,6 +262,14 @@ export default {
       queryProductFee({
       queryProductFee({
         id: this.operateId
         id: this.operateId
       }).then(res => {
       }).then(res => {
+        res.data.data.forEach(ele=>{
+          if(ele["fixedRate"]){
+            ele.fixedRate = parseFloat(ele.fixedRate).toFixed(2);
+          }
+          if(ele["percentRate"]){
+            ele.percentRate = parseFloat(ele.percentRate).toFixed(2);
+          }
+        });
         this.data = res.data.data;
         this.data = res.data.data;
       });
       });
     },
     },

+ 8 - 0
src/views/ldt_shop/comps/shop-product-fee.vue

@@ -262,6 +262,14 @@ export default {
       queryProductFee({
       queryProductFee({
         id: this.operateId
         id: this.operateId
       }).then(res => {
       }).then(res => {
+        res.data.data.forEach(ele=>{
+          if(ele["fixedRate"]){
+            ele.fixedRate = parseFloat(ele.fixedRate).toFixed(2);
+          }
+          if(ele["percentRate"]){
+            ele.percentRate = parseFloat(ele.percentRate).toFixed(2);
+          }
+        });
         this.data = res.data.data;
         this.data = res.data.data;
       });
       });
     },
     },