const app = getApp()
Page({
    data: {
        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.listGroupDetail({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})
            }
        })
    }
});
