819527061@qq.com
2024-11-18 34aedd9998b5572488e49db884b2f7966d960a57
订单统计页面
1个文件已修改
48 ■■■■ 已修改文件
src/components/page/orderRecord/indexDay.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/orderRecord/indexDay.vue
@@ -1,6 +1,6 @@
<template>
    <div>
        <div style="padding: 10px 10px 0px 10px;">
    <div class="mod-config" style="padding: 10px 10px 0px 10px;">
        <div>
            <el-form :inline="true" :model="searchForm">
              <el-form-item label="停车场">
              <el-select v-model="searchForm.parkId" clearable>
@@ -23,16 +23,27 @@
            </el-form>
        </div>
        <el-table :data="table2" border style="width:55%;border:1px solid #bcbec2;" show-summary>
        <el-table
            :height="tableHeight"
            :data="table2"
            border
            style="width:100%;border:1px solid #bcbec2;"
            show-summary>
          <el-table-column
              prop="ti"
              prop="day"
              align="center"
              label="日期"
              fixed="left"
              width="120">
          </el-table-column>
            <el-table-column prop="parkName" label="停车场" align="center" >
              <el-table-column prop="num" label="有效订单数" align="center" ></el-table-column>
              <el-table-column prop="price" label="订单总金额(元)" align="center" ></el-table-column>
            <el-table-column
                v-for="(item,index) in headTable"
                :key="index"
                :label="item.parkName"
                :prop="item.parkId + ''"
                align="center">
              <el-table-column :prop="item.parkName + 'num'" label="有效订单数" align="right" header-align="center"></el-table-column>
              <el-table-column :prop="item.parkName + 'price'"  label="订单总金额(元)" align="right" header-align="center"></el-table-column>
            </el-table-column>
        </el-table>
    </div>
@@ -59,9 +70,14 @@
                urlPath:this.$systemconfig.basePath + '/ffzf/orderrecord/',
                table1:[],
                table2:[],
                headTable:[],
                tableHeight:500
            }
        },
        mounted() {
      created() {
        this.tableHeight = window.innerHeight - 170
      },
      mounted() {
            this.defaultDate();
            this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/park/findAll', this.formData, res => {
                this.table1 = res.data;
@@ -69,9 +85,19 @@
        },
        methods: {
            loadData() {
                this.$byutil.postData(this, this.urlPath+'findCountPageByDay', this.searchForm,res => {
                  this.table2 = res.data;
                });
              this.table2 = []
              this.$byutil.postData(this, this.urlPath+'findCountPageByDay', this.searchForm,res => {
                this.headTable = res.data[0].data
                let temp = res.data
                temp.forEach(item => {
                  let row = {day:item.day};
                  item.data.forEach(e=>{
                    row[e.parkName + 'num']=e.num;
                    row[e.parkName + 'price']=e.price;
                  })
                  this.table2.push(row)
                })
             });
            },
            onSearch() {
                this.loadData();