contentItem.js 1.97 KB
// packageEquity/pages/aiInspection/components/contentItem/contentItem.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    item: Object,
    bussinessType: Number,
    time: String
  },

  /**
   * 组件的初始数据
   */
  data: {
    isPack: true,
    storeIndex: 0,
    contentObject: [{
        label: '工牌编号',
        key: 'badgeId'
      },
      {
        label: '录音时长',
        key: '_seconds',
      },
      {
        label: '预计接待批次',
        key: 'batchNum'
      },
      {
        label: '当日到店量/人',
        key: 'enterReceptionBatch'
      },
      {
        label: '异常占比',
        key: 'abnormalProportion',
        addHtml: 'abnormalProportionHtml'
      },
      {
        label: '归属门店',
        key: 'merchantDTOList',
        addHtml: 'store',
        tempKey: 'tempStore'

      },
    ],
  },

  /**
   * 组件的方法列表
   */
  pageLifetimes: {
    show: function () { 
      this.setData({
        storeIndex:0
      })
     },
  },
  methods: {
    goto(params) {
      if (this.data.bussinessType == 2) {
        wx.$router.go('packageEquity.orderList', params)
      } else {
        wx.$router.go('packageEquity.equityQualityOrderList', params)
      }
    },
  
    jumpDetail(e) {
      let {
        time,
        storeIndex,
        item: {
          merchantDTOList
        }
      } = this.data,
        merchantId = merchantDTOList[storeIndex].merchantNo, {
          staffUuid,
          phoneNumberLists
        } = merchantDTOList[storeIndex], params = {
          searchdate: time,
          staffUuid,
          merchantId,
          phoneNumberLists
        };
      if (merchantDTOList.length > 1) {
        let thisPage = wx.$router.getPageInstance()
        thisPage.setData({
         isStorePop: true,
         merchantDTOList
        })
        return
      }

      this.goto(params)

    },
    packHandle() {
      this.setData({
        isPack: !this.data.isPack
      })
    }
  }
})