账单报表
This commit is contained in:
@@ -1,17 +1,23 @@
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
typeName: '宠物',
|
||||
billList: [
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"猫抓板","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
{"title":"狗粮","type":"expend","dateTime":"01-06","from":"支付宝","money":"35.00"},
|
||||
]
|
||||
expendID: -1,
|
||||
rangeDate: app.$utils.formatDateMonth(new Date()),
|
||||
sumMoney: 0,
|
||||
billList: []
|
||||
},
|
||||
onLoad: function (options) {
|
||||
|
||||
let expendID = options.expendId
|
||||
let rangeDate = options.rangeDate
|
||||
this.setData({expendID,rangeDate})
|
||||
},
|
||||
onShow() {
|
||||
app.$api.listBillGroupDetail({expendId:this.data.expendID,rangeDate:this.data.rangeDate}).then(res =>{
|
||||
if (res.data){
|
||||
let sumMoney = res.data.sumMoney
|
||||
let billList = res.data.billList
|
||||
this.setData({sumMoney,billList})
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<view class="main_look">
|
||||
<view class="look_content">
|
||||
<view class="pay_look">
|
||||
<view class="inline_box font_big">{{typeName}}分类总计</view>
|
||||
<view class="inline_box font_big">分类总计</view>
|
||||
</view>
|
||||
<view class="pay_look">
|
||||
<text class="center_look font_big">{{ 89310.23 }}</text>
|
||||
<text class="center_look font_big">{{ sumMoney }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{billList != null && billList.length > 0}}">
|
||||
<t-cell-group theme="card">
|
||||
<t-cell wx:for="{{billList}}" wx:key="index"
|
||||
title="{{item.title}}"
|
||||
description="{{item.dateTime}} • {{item.from}}"
|
||||
title="{{item.moneyName}}"
|
||||
description="{{item.date}} • {{item.accountName}}"
|
||||
align="top"
|
||||
image="/image/bill/5.png"
|
||||
image="{{item.moneyIcon}}"
|
||||
note="{{item.money}}"
|
||||
class="t-cell-{{item.type}}"
|
||||
class="t-cell-{{item.billType}}"
|
||||
url="{{'/pages/bill/index?id=' + item.id}}"
|
||||
/>
|
||||
</t-cell-group>
|
||||
|
||||
Reference in New Issue
Block a user