yujk 3 lat temu
rodzic
commit
cc8303a2fa
2 zmienionych plików z 22 dodań i 5 usunięć
  1. +18
    -1
      pages/index/index.js
  2. +4
    -4
      pages/index/index.wxml

+ 18
- 1
pages/index/index.js Wyświetl plik

@@ -145,6 +145,8 @@ Page({
for(let i = 0;i<res.total;i++){
let d = this.dictTranslate(this.data.transferType,res.rows[i].formData.transferType)
res.rows[i].formData.transferType = d
res.rows[i].formData.totalAmount = Number(res.rows[i].formData.totalAmount).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => {
return $1 + ","; }).replace(/\.$/, "")
}
this.setData({todoList:res.rows})
}
@@ -174,6 +176,8 @@ Page({
for(let i = 0;i<res.total;i++){
let d = this.dictTranslate(this.data.transferType,res.rows[i].formData.transferType)
res.rows[i].formData.transferType = d
res.rows[i].formData.totalAmount = Number(res.rows[i].formData.totalAmount).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => {
return $1 + ","; }).replace(/\.$/, "")
}
this.setData({doneList:res.rows})
}
@@ -200,6 +204,10 @@ Page({
if (res.code == API.SUCCESS_CODE) {
let a = res.total
this.setData({yfqNum:a})
for(let i = 0;i<res.total;i++){
res.rows[i].totalAmount = Number(res.rows[i].totalAmount).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => {
return $1 + ","; }).replace(/\.$/, "")
}
this.setData({yfqList:res.rows})
}
}, fail: (res) => {
@@ -223,7 +231,12 @@ Page({
let a = this.data.yfqNum+res.total
this.setData({yfqNum:a})
let b = this.data.yfqList
this.setData({yfqList:res.rows.concat(b)})
let c = res.rows.concat(b)
for(let i = 0;i< c.lenght;i++){
c[i].totalAmount = Number(c[i].totalAmount).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => {
return $1 + ","; }).replace(/\.$/, "")
}
this.setData({yfqList:c})
}
}, fail: (res) => {
},
@@ -245,6 +258,10 @@ Page({
success: (res) => {
if (res.code == API.SUCCESS_CODE) {
this.setData({yzdNum:res.total})
for(let i = 0;i< res.rows.lenght;i++){
res.rows[i].totalAmount = Number(res.rows[i].totalAmount).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => {
return $1 + ","; }).replace(/\.$/, "")
}
this.setData({yzdList:res.rows})
}
}, fail: (res) => {


+ 4
- 4
pages/index/index.wxml Wyświetl plik

@@ -130,7 +130,7 @@
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image>
<text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text>
</view>
<view class="amount"><text class="unit">¥</text>{{float.float(item.formData.totalAmount)}}</view>
<view class="amount"><text class="unit">¥</text>{{item.formData.totalAmount}}</view>
</view>
</view>
</view>
@@ -147,7 +147,7 @@
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image>
<text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text>
</view>
<view class="amount"><text class="unit">¥</text>{{float.float(item.formData.totalAmount)}}</view>
<view class="amount"><text class="unit">¥</text>{{item.formData.totalAmount}}</view>
</view>
</view>
</view>
@@ -167,7 +167,7 @@
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image>
<text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text>
</view>
<view class="amount"><text class="unit">¥</text>{{float.float(item.totalAmount)}}</view>
<view class="amount"><text class="unit">¥</text>{{item.totalAmount}}</view>
</view>
</view>
</view>
@@ -184,7 +184,7 @@
<image class="amount_icon" src="../../image/index/process_icon.png" mode="aspectFit"></image>
<text class="textLimit">{{item.formData.activityBusinessType=='35'?'现金转账':'银行转账'}}</text>
</view>
<view class="amount"><text class="unit">¥</text>{{float.float(item.totalAmount)}}</view>
<view class="amount"><text class="unit">¥</text>{{item.totalAmount}}</view>
</view>
</view>
<view slot="right" class="deleteBox">


Ładowanie…
Anuluj
Zapisz