Ver código fonte

Merge branch '黄' into 测试

xiaohaizhao 8 meses atrás
pai
commit
34349df8fa
2 arquivos alterados com 13 adições e 2 exclusões
  1. 10 2
      packageA/invoice/index.js
  2. 3 0
      packageA/invoice/modules/list/index.wxml

+ 10 - 2
packageA/invoice/index.js

@@ -1,5 +1,9 @@
-const _Http = getApp().globalData.http;
-
+const _Http = getApp().globalData.http,
+    currency = require("../../utils/currency"),
+    CNY = value => currency(value, {
+        symbol: "¥",
+        precision: 2
+    }).format();
 Page({
     data: {
         loading: true,
@@ -35,6 +39,10 @@ Page({
         }).then(res => {
             console.log("开票申请列表", res)
             this.selectComponent('#ListBox').RefreshToComplete();
+            res.data = res.data.map(v => {
+                v.redamount = CNY(v.redamount)
+                return v
+            })
             this.setData({
                 list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
                 "content.pageNumber": res.pageNumber + 1,

+ 3 - 0
packageA/invoice/modules/list/index.wxml

@@ -26,6 +26,9 @@
         <view class="exp">
             开票订单金额:{{item.suminvoiceamount || ' --'}}
         </view>
+        <view class="exp">
+            红冲金额:{{item.redamount || ' --'}}
+        </view>
         <view class="exp">
             审核时间:{{item.checkdate || ' --'}}
         </view>