// pages/mine/livingPay/billList/index.js

Page({
  data: {
    detail: {},
    charge_type: {
      1: '物业费',
      2: '水费',
      3: '电费',
      4: '气费',
      5: '车位管理费',
      6: '月租停车费',
      99: '其他'
    },
    type:"charge_type",
    amount:"amount",
    title: [
      {title:"房间号",name:"obj_name"},
      {
      title: "费用类型",
      name: "charge_type"
    }, {
      title: "费用名",
      name: "charge_name"
    },{
      title: "账单开始时间",
      name: "start"
    },{
      title: "账单结束时间",
      name: "end"
    },{
      title: "上期度数",
      name: "last_used"
    },{
      title: "本期度数",
      name: "current_used"
    },{
      title: "滞纳金",
      name: "late_fee"
    },{
      title: "费用描述",
      name: "charge_desc"
    },{
      title: "支付时间",
      name: "pay_time"
    },{
      title: "应缴费用",
      name: "amount"
    },]
  },
  onLoad(option) {
    const that = this;
    const eventChannel = that.getOpenerEventChannel()
    eventChannel.on('acceptDataFromOpenerPage', function (data) {
      that.setData({
        detail:data
      })
    })
  },
})