yxh
21 小时以前 3873d3c350c8c1edd7bfdc8afe08c9e78f56d968
src/views/project/statistics/chargeStatistics/index.vue
@@ -2,6 +2,7 @@
<template>
  <div class="app-container">
    <el-form
      class="opo-query-form"
      :model="queryParams"
      ref="queryForm"
      :inline="true"
@@ -17,19 +18,19 @@
            />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="统计类型">
            <el-select
              v-model="queryParams.pachageflag"
              placeholder="请选择案例状态"
        <el-col :span="12">
          <el-form-item label="统计日期">
            <el-date-picker
              style="width: 100%"
              v-model="selecttime"
              type="monthrange"
              range-separator="至"
              start-placeholder="开始月份"
              end-placeholder="结束月份"
              value-format="yyyy-MM-dd"
              @change="getTimeList"
            >
              <el-option
                v-for="item in reportlist"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
@@ -284,6 +285,27 @@
      this.resetForm("queryForm");
      this.handleQuery();
    },
    getTimeList(e) {
      if (this.selecttime != 0) {
        this.queryParams.pabegtime = this.selecttime[0];
        this.queryParams.paendtime = this.selecttime[1];
        // if (this.queryParams.paendtime == this.queryParams.pabegtime) {
        // 结束时间取"所选结束月的次月 1 号",以包含整个结束月。
        // 原实现把月份 +1 后直接拼字符串,12 月会得到 13 月(2026-13-01),
        // MySQL 报 Incorrect datetime value,存储过程直接 500。
        this.queryParams.paendtime = this.$moment(this.queryParams.paendtime)
          .startOf("month")
          .add(1, "month")
          .format("YYYY-MM")
          .concat("-01 00:00:00");
        this.queryParams.pabegtime =
          this.queryParams.pabegtime + " " + "00" + ":" + "00" + ":" + "00";
        // }
      } else {
        // this.queryParams.pabegtime = "1998-01-01 00:00:00";
        // this.queryParams.paendtime = "2998-01-01 00:00:00";
      }
    },
    getSummaries(param) {
      const { columns, data } = param;
      const sums = [];