马宇豪
2025-03-04 509f1d71c91242b11fd287cfcdeafe3d19b2d807
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<template>
  <div class="app-container">
    <div>
      <el-date-picker
        v-model="queryParams.year"
        type="year"
        style="width: 300px"
        value-format="yyyy"
        placeholder="选择年">
      </el-date-picker>
      <el-select v-model="queryParams.quarter" placeholder="请选择季度" style="width: 300px;margin-left: 5px" clearable>
        <el-option
          v-for="item in quarterList"
          :key="item.id"
          :label="item.label"
          :value="item.id">
        </el-option>
      </el-select>
      <el-cascader v-model="queryParams.deptId" :show-all-levels="false" style="margin-left: 10px" filterable :options="deptOptions"
                   placeholder="组织架构"
                   :props="{ emitPath: false,value:'deptId',label: 'deptName' }"></el-cascader>
      <el-button
        type="primary"
        style="margin-left: 20px"
        @click="handleQuery()"
      >查询
      </el-button>
      <el-button
        type="primary"
        @click="resetQuery()"
      >重置
      </el-button>
      <!--      <el-select v-model="queryParams.districtCode" placeholder="所辖行政区划" style="width: 100%;">-->
      <!--        <el-option-->
      <!--          v-for="item in areaList"-->
      <!--          :key="item.id"-->
      <!--          :label="item.name"-->
      <!--          :value="item.code">-->
      <!--        </el-option>-->
      <!--      </el-select>-->
    </div>
 
    <el-table v-loading="loading" :data="dataList" style="margin-top: 20px" :row-class-name="tableAddClass">
      <el-table-column label="工种类别" align="center" prop="subjectName"></el-table-column>
      <el-table-column label="缴费人次" align="center" prop="num" :show-overflow-tooltip="true"/>
      <el-table-column label="缴费标准" align="center" prop="amount">
        <template #default="scope">
          {{ scope.row.amount }}元/人次
        </template>
      </el-table-column>
      <el-table-column label="总额" align="center" prop="totalMoney"/>
      <el-table-column label="上缴费中央" align="center" prop="turnContent"/>
      <el-table-column label="自治区级" align="center" prop="autonomy"/>
      <!--      <el-table-column label="地(州、市级)" align="center" prop="describe" />-->
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </div>
</template>
 
<script>
import {
  coalCount
} from '@/api/specialOperationsPay/coalPay'
import Cookies from 'js-cookie'
import {listDept} from "@/api/system/dept";
 
export default {
  name: "coalCalculate",
  dicts: [],
  components: {},
  data() {
    return {
      loading: false,
      single: true,
      multiple: true,
      showSearch: true,
      dataList: [],
      deptOptions: [],
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        year: '',
        quarter: null,
        deptId: null
      },
      total: 0,
      quarterList: [
        {
          id: 1,
          label: '第一季度'
        },
        {
          id: 2,
          label: '第二季度'
        },
        {
          id: 3,
          label: '第三季度'
        },
        {
          id: 4,
          label: '第四季度'
        }
      ]
    };
  },
  created() {
    this.getList()
    this.getDeptTree()
  },
  methods: {
    getList() {
      this.loading = true;
      coalCount(this.queryParams).then((res) => {
        if (res.code == 200) {
          this.dataList = res.rows
          this.total = res.total
          this.loading = false
        }
      })
    },
    getDeptTree() {
      listDept({
        deptName: undefined,
        status: undefined
      }).then(response => {
        this.deptOptions = this.handleTree(response.data, "deptId")
      })
    },
    changeStatus(val) {
      this.getList()
    },
    tableAddClass({row, rowIndex}) {
      if (row.difference < row.duration) {
        return "tr-red";
      }
      return "";
    },
 
    handleQuery() {
      this.getList();
    },
    resetQuery() {
      this.queryParams = {
        pageNum: 1,
        pageSize: 10,
        year: '',
        quarter: null,
        deptId: null
      }
      this.getList()
    },
  }
};
</script>
 
<style scoped>
.app-container /deep/ .el-table .tr-red {
  color: red !important;
}
</style>