table.js 4.38 KB
// pages/components/table/table.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    table: {
      type: Array,
      value: []
    },
    tableObj: {
      type: Array,
      value: []
    },
    tableFlag: {
      type: Boolean,
      value: true
    },
    tableWidth: {
      type: String,
      value: '100%'
    },
    headerConfig: {
      type: Object,
      value: {}
    },
    itemTableHeight: {
      type: String,
      value: '0rpx'
    },
    itemHeight: {
      type: String,
      value: '72rpx'
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    // tableWidth: 1088,
    // tableFlag: true,
    table: [
      // {
      //   id: null,
      //   merchantId: 44218100,
      //   merchantName: '测试门店22',
      //   dataDate: null,
      //   getTotal: 0,
      //   usedTotal: 0,
      //   upgradeTotal: 0,
      //   upgradeMoneyTotal: null,
      //   createdBy: null,
      //   createdDate: null,
      //   updatedBy: null,
      //   updatedDate: null,
      //   deletedFlag: null,
      //   startDate: null,
      //   endDate: null,
      //   yqMerchantIds: null,
      //   orderByType: null,
      //   addTotal: 0,
      //   orderMoneyTotal: 0,
      //   merchantIdList: null,
      //   usedPer: null,
      //   upgradePer: null,
      //   totalUsedPer: null,
      //   totalUpgradePer: null,
      //   customerUnitMoney: 0,
      //   upgradeRate: 0,
      //   experienceTotal: 0,
      //   filmTimes: 0,
      //   notUpgradeTotal: null,
      //   filmTimesGrowth: null,
      //   usedTotalGrowth: null,
      //   upgradeTotalGrowth: null,
      //   notUpgradeTotalGrowth: null,
      //   orderMoneyTotalGrowth: null,
      //   customerUnitMoneyGrowth: null,
      //   experienceTotalGrowth: null,
      //   upgradeRateGrowth: null,
      //   goodsOrCouponType: null,
      //   queryRangeType: null
      // },
      // {
      //   id: null,
      //   merchantId: 44218100,
      //   merchantName: '测试门店22',
      //   dataDate: null,
      //   getTotal: 0,
      //   usedTotal: 0,
      //   upgradeTotal: 0,
      //   upgradeMoneyTotal: null,
      //   createdBy: null,
      //   createdDate: null,
      //   updatedBy: null,
      //   updatedDate: null,
      //   deletedFlag: null,
      //   startDate: null,
      //   endDate: null,
      //   yqMerchantIds: null,
      //   orderByType: null,
      //   addTotal: 0,
      //   orderMoneyTotal: 0,
      //   merchantIdList: null,
      //   usedPer: null,
      //   upgradePer: null,
      //   totalUsedPer: null,
      //   totalUpgradePer: null,
      //   customerUnitMoney: 0,
      //   upgradeRate: 0,
      //   experienceTotal: 0,
      //   filmTimes: 0,
      //   notUpgradeTotal: null,
      //   filmTimesGrowth: null,
      //   usedTotalGrowth: null,
      //   upgradeTotalGrowth: null,
      //   notUpgradeTotalGrowth: null,
      //   orderMoneyTotalGrowth: null,
      //   customerUnitMoneyGrowth: null,
      //   experienceTotalGrowth: null,
      //   upgradeRateGrowth: null,
      //   goodsOrCouponType: null,
      //   queryRangeType: null
      // }
    ]
    // tableObj: [
    //   {
    //     name: '贴膜',
    //     unit: '/台',
    //     key: 'filmTimes',
    //     width: 'var(--fontSize110)'
    //   },
    //   {
    //     name: '核销',
    //     unit: '/张',
    //     key: 'usedTotal',
    //     width: 'var(--fontSize110)'
    //   },
    //   {
    //     name: '体验',
    //     unit: '/位',
    //     key: 'experienceTotal',
    //     width: 'var(--fontSize110)'
    //   },
    //   {
    //     name: '转化',
    //     unit: '/单',
    //     key: 'upgradeTotal',
    //     width: 'var(--fontSize110)'
    //   },
    // ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    scrollonReachBottom() {
      // console.log('scrollonReachBottom')
      // let { pages, pageNum } = this.data
      // // 判断当前页是否是末页
      // if (pages == pageNum) return wx.$util.showToast('列表已到底')
      // this.setData({
      //   pageNum: pageNum + 1
      // })
      // this.getMerchantCouponList()
    },
    restPageNum() {
      // this.setData({
      //   pageNum: 1
      // })
      // this.getMerchantCouponList()
    }
  }
})