const mixins = require('@/mixins/index.js')
const Constants = require('@/utils/Constants.js');
const app = getApp()
Page({
  mixins: [mixins],
  /**
   * 页面的初始数据
   */
  data: {
    // 路由
    routeObjName: 'saleReport',
    // 查询条件
    searchContent: [
      { code: 'createtime', title: mixins.$t("currentMonth"), defaultValue: 3, searchType: Constants.searchType.date },
      { code: 'choose', title: mixins.$t("dateDesc"), },
      { code: 'choose', title: mixins.$t("choose"), searchType: Constants.searchType.pick },

    ],
    // 列表区（内容）
    contentList: [
      { label: '订单数量', code: 'sumQuantity', image: 'order-bg' ,tip:'取值：销售订单'},
      { label: '出库数量', code: 'outQty', image: 'inbound-bg',tip:'取值：销售出库单' },
      { label: '已核销金额', code: 'sumUsePaymentResidue', amountFlag: true, image: 'reverse-bg' },
      { label: '订单金额', code: 'sumAmount', amountFlag: true, image: 'reverse-bg' },
      { label: '退货金额', code: 'returnAmt', amountFlag: true, image: 'reverse-bg' },
      { label: '未核销金额', code: 'sumShouldHandle', amountFlag: true, image: 'reverse-bg' },
    ],
  },

  /**
   * @desc : 查询
   * @date : 2024/2/1 15:49
   * @author : 于继渤
   */
  getData(params) {
    return this.excute(this.data.service, this.data.service.getSalesTrackingReport, params);
  },
})