11
WXL
2024-03-20 1e487a42549384f6e937a5c7d557563aedafec2c
src/views/project/statistics/performanceStaristics/index.vue
@@ -1,7 +1,6 @@
<!--  -->
<template>
  <div class="app-container">
    绩效
    <el-form
      :model="queryParams"
      ref="queryForm"
@@ -10,9 +9,9 @@
    >
      <el-row :gutter="8">
        <el-col :span="6">
          <el-form-item label="业务人员" prop="name">
          <el-form-item label="业务人员" prop="pauserno">
            <el-input
              v-model="queryParams.name"
              v-model="queryParams.pausername"
              placeholder="请输入姓名"
              clearable
              size="small"
@@ -21,25 +20,30 @@
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item align="left" label="业务组" prop="treatmenthospitalno">
            <org-selecter
              ref="orgSelecter"
              :org-type="'3'"
              v-model="queryParams.treatmenthospitalno"
            />
          <el-form-item align="left" label="业务组" prop="padeptno">
            <el-select
              v-model="queryParams.padeptno"
              placeholder="请选择案例状态"
            >
              <el-option
                v-for="item in deptList"
                :label="item.deptName"
                :value="item.deptId"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="案例状态">
          <el-form-item label="绩效类型">
            <el-select
              v-model="queryParams.reporterno"
              v-model="queryParams.pabonustype"
              placeholder="请选择案例状态"
            >
              <el-option
                v-for="item in reportlist"
                :key="item.index"
                :label="item.reportername"
                :value="item.reporterno"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
@@ -81,21 +85,26 @@
    </el-form>
    <!--<el-table v-loading="loading" border :data="donatebaseinfoList">     -->
    <el-table v-loading="loading" border :data="jxidata">
    <el-table
      v-loading="loading"
      :data="jxidata"
      ref="table"
      border
      max-height="700"
      highlight-current-row
      :summary-method="getSummaries"
      show-summary
    >
      <el-table-column label="序号" align="center" prop="id" width="100">
      </el-table-column>
      <el-table-column label="统计月份" align="center" prop="name" />
      <el-table-column label="统计月份" align="center" prop="bonusmonth" />
      <el-table-column label="业务组" align="center" prop="name">
      <el-table-column label="业务组" align="center" prop="deptName">
      </el-table-column>
      <el-table-column label="专职人员" align="center" prop="age" />
      <el-table-column label="专职人员" align="center" prop="beneficiaryname" />
      <el-table-column
        label="案例数量"
        align="center"
        prop="treatmenthospitalname"
      />
      <el-table-column label="金额" align="center" prop="amount" />
      <el-table-column
        label="操作"
@@ -106,24 +115,18 @@
        <template slot-scope="scope">
          <!--           v-if="scope.row.recordstate==2"
 -->
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleAdd(scope.row)"
            >医学评估</el-button
          <el-button size="mini" type="text" icon="el-icon-edit"
            >明细</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <div style="margin: 10px;text-align: right;">
      <div>
        共 <span style="color:#1890FF ;">{{ total }}</span> 条数据
      </div>
    </div>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- 添加或修改家属确认对话框 -->
  </div>
@@ -132,13 +135,6 @@
<script>
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import 《组件名称》 from '《组件路径》';
import {
  listDonatebaseinfo,
  getDonatebaseinfo,
  addDonatebaseinfo,
  updateDonatebaseinfo
} from "@/api/project/donatebaseinfo";
import {
  listsfeistatistics,
@@ -152,6 +148,8 @@
import Li_area_select from "@/components/Address";
import OrgSelecter from "@/views/project/components/orgselect";
import AnnexUpload from "@/views/project/components/annexupload";
import { listDept } from "@/api/system/dept";
export default {
  //import引入的组件需要注入到对象中才能使用
@@ -172,7 +170,11 @@
      selecttime: "",
      reportervalue: "",
      reportlist: [],
      reportlist: [
        { label: "月度", value: 1 },
        { label: "季度", value: 2 },
        { label: "年度", value: 3 }
      ],
      //省市区
      //默认值设置,可为空
      searchAddress: {
@@ -210,6 +212,7 @@
        shi: "",
        qu: ""
      },
      deptList:[],
      // 遮罩层
      loading: false,
      // 导出遮罩层
@@ -236,11 +239,13 @@
      daterangeReporttime: [],
      // 查询参数
      queryParams: {
        pabonustype: null,
        pageNum: 1,
        pageSize: 10
        pabonustype:'',
        pabegtime: null,
        paendtime: null,
        pauserno: null,
        padeptno: null,
      },
      // 表单参数
      form: {},
      // 表单校验
@@ -269,14 +274,14 @@
  methods: {
    getTimeList(e) {
      if (this.selecttime != 0) {
        this.endtime = this.selecttime[1];
        this.starttime = this.selecttime[0];
        // if (this.endtime == this.starttime) {
        let num = Number(this.endtime.slice(5, 7));
        this.queryParams.pabegtime = this.selecttime[0];
        this.queryParams.paendtime = this.selecttime[1];
        // if (this.queryParams.paendtime == this.queryParams.pabegtime) {
        let num = Number(this.queryParams.paendtime.slice(5, 7));
        if (num < 9) {
          let mon = Number(this.endtime.slice(6, 7));
          this.endtime =
            this.endtime.slice(0, 5) +
          let mon = Number(this.queryParams.paendtime.slice(6, 7));
          this.queryParams.paendtime =
            this.queryParams.paendtime.slice(0, 5) +
            "0" +
            (mon + 1) +
            "-" +
@@ -288,10 +293,10 @@
            ":" +
            "00";
        }
        // this.endtime=this.endtime.slice(0,5)年
        // this.queryParams.paendtime=this.queryParams.paendtime.slice(0,5)年
        else if (num >= 10) {
          this.endtime =
            this.endtime.slice(0, 5) +
          this.queryParams.paendtime =
            this.queryParams.paendtime.slice(0, 5) +
            (num + 1) +
            "-" +
            "01" +
@@ -302,8 +307,8 @@
            ":" +
            "00";
        } else {
          this.endtime =
            this.endtime.slice(0, 5) +
          this.queryParams.paendtime =
            this.queryParams.paendtime.slice(0, 5) +
            "10" +
            "-" +
            "01" +
@@ -314,30 +319,15 @@
            ":" +
            "00";
        }
        this.starttime = this.starttime + " " + "00" + ":" + "00" + ":" + "00";
        this.queryParams.pabegtime =
          this.queryParams.pabegtime + " " + "00" + ":" + "00" + ":" + "00";
        // }
      } else {
        // this.starttime = "1998-01-01 00:00:00";
        // this.endtime = "2998-01-01 00:00:00";
        // this.queryParams.pabegtime = "1998-01-01 00:00:00";
        // this.queryParams.paendtime = "2998-01-01 00:00:00";
      }
    },
    LoadReportList() {
      listDonatebaseinfo().then(res => {
        let list = res.rows;
        let reportlist = [];
        list.forEach(item => {
          reportlist.push({
            reporterno: item.reporterno,
            reportername: item.reportername
          });
        });
        if (reportlist != 0) {
          reportlist = this.resetArr(reportlist);
          this.reportlist = reportlist;
        }
      });
    },
    resetArr(Arr) {
      var hash = {};
      Arr = Arr.reduce(function(arr, current) {
@@ -353,9 +343,18 @@
    getList() {
      listjixstatistics(this.queryParams).then(res => {
        this.jxidata = res.rows;
        this.jxidata.forEach(($obj, $index) => {
          $obj.id = $index + 1;
        });
        this.total=res.total;
      });
    },
    listDept() {
      listDept({}).then(response => {
        this.deptList = response.data;
        this.loading = false;
      });
    },
    // 表单重置
    reset() {
      this.form = {};
@@ -371,25 +370,13 @@
      this.reportervalue = "";
      this.form.treatmenthospitalno = "";
      this.queryParams = {
        doname: null,
        pageNum: 1,
        pageSize: 10,
        name: null,
        idcardno: null,
        residenceprovince: null,
        residencecity: null,
        residencetown: null,
        // "2"
        recordstate: null,
        treatmenthospitalname: null,
        donorno: null,
        acquisitiontissueno: null,
        reportername: null,
        reporttime: null,
        city: null
        pabonustype:'',
        pabegtime: null,
        paendtime: null,
        pauserno: null,
        padeptno: null
      };
      this.selecttime = [];
      this.getTimeList();
@@ -402,6 +389,37 @@
      this.resetForm("queryForm");
      this.handleQuery();
    },
    getSummaries(param) {
      const { columns, data } = param;
      const sums = [];
      var columnnames = ["applymonth", "deptmentName", "username",'deptName'];
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = "合计";
          return;
        }
        //去除部分字段计算
        if (columnnames.indexOf(column.property) > -1) {
          return;
        }
        const values = data.map(item => Number(item[column.property]));
        if (!values.every(value => isNaN(value))) {
          sums[index] = values.reduce((prev, curr) => {
            const value = Number(curr);
            if (!isNaN(value)) {
              return prev + curr;
            } else {
              return prev;
            }
          }, 0);
          sums[index] = sums[index].toFixed(2); // 保留2位小数,解决小数合计列;
        } else {
          sums[index] = "";
        }
      });
      return sums;
    }
  },
@@ -409,6 +427,7 @@
  created() {
    //获取列表
    this.getList();
    this.listDept();
  }
  // //生命周期 - 挂载完成(可以访问DOM元素)
  //    mounted() {},