| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 | <!-- 营收统计 --><template>  <view class="container">    <view class="table">      <!-- <view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view> -->      <view class="table-box">        <TableRanking          :loading="loading"          :tableTh="tableTh"          :tableData="tableData"          @pageChange="pageChange"        />      </view>    </view>    <view class="total">      <view>        车辆        <text>{{ totalData.vehicleCount || 0 }}</text>辆,应收金额        <text>{{ totalData.payAmount || 0 }}</text>元,实收金额        <text>{{ totalData.realAmount || 0 }}</text>元,        欠费金额        <text>{{ totalData.amtOwe || 0 }}</text>元,其中贵州银行快捷支付        <text>{{ totalData.quickAmt || 0 }}</text>元,贵州银行聚合支付        <text>{{ totalData.unionAmt || 0 }}</text>元,微信支付        <text>{{ totalData.wechatAmt || 0 }}</text>元,无感支付        <text>{{ totalData.unconsAmt || 0 }}</text>元,现金支付        <text>{{ totalData.cashAmt || 0 }}</text>元      </view>    </view>  </view></template><script>import TableRanking from '@/components/tableRanking.vue';export default {  components: {    TableRanking  },  props: {    tableTh: {      type: Array,      default: () => {        return [          {            field: '停车场/路段',            width: 120,            key: 'roadName'          },          {            field: '车辆(辆)',            width: 80,            key: 'vehicleCount'          },          {            field: '应收金额(元)',            width: 80,            key: 'payAmount'          },          {            field: '实收金额(次)',            width: 80,            key: 'realAmount'          },          {            field: '欠费金额(元)',            width: 80,            key: 'amtOwe'          },          {            field: '贵州银行快捷支付(元)',            width: 150,            key: 'quickAmt'          },          {            field: '贵州银行聚合支付(元)',            width: 150,            key: 'unionAmt'          },          {            field: '微信(元)',            width: 80,            key: 'wechatAmt'          },          {            field: '无感(元)',            width: 80,            key: 'unconsAmt'          },          {            field: '现金(元)',            width: 80,            key: 'cashAmt'          }        ];      }    }  },  data() {    return {      loading: false,      tableData: {        current: 1,        total: 0,        list: []      },      totalData: {},      currentDate: [],      beginTime: undefined,      endTime: undefined    };  },  methods: {    getData(data) {      if (data.length) {        this.beginTime = data[0];        this.endTime = data[1];      }      this.currentDate = data;      this.tableData.current = 1;      this.getIncomeTotal();      this.getIncomeList();    },    getIncomeTotal() {      uni.$u.api.statisticalReportApi        .getParkIncomeTotalApi({          beginTime: this.beginTime,          endTime: this.endTime        })        .then((res) => {          if (res.code === 200) {            this.totalData = res.data;          }        });    },    getIncomeList() {      this.loading = true;      uni.$u.api.statisticalReportApi        .getParkIncomeListApi({          beginTime: this.beginTime,          endTime: this.endTime,          pageNum: this.tableData.current,          pageSize: 10        })        .then((res) => {          if (res.code === 200) {            this.tableData.list = res.rows;            this.tableData.total = res.total;          }          this.loading = false;        });    },    pageChange(cur) {      this.tableData.current = cur;      this.getIncomeList();    }  }};</script><style lang="scss" scoped>@import './../../styles/report.scss';</style>
 |