Commit 8aeef2a9 authored by 谢子梦's avatar 谢子梦

stage:发薪情况统计时间限制

parent 22ed45b6
......@@ -6,19 +6,25 @@
<!-- 按月-查询条件框 -->
<el-form :model="paramsMonth" label-width="80px" label-position="left">
<el-row :gutter="22">
<el-col :span="8">
<el-col :span="6">
<el-form-item label="发薪主体">
<el-input v-model="paramsMonth.payerAccName" placeholder="请输入发薪主体"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单位名称">
<el-input v-model="paramsMonth.companyName" placeholder="请输入单位名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="统计月份">
<el-date-picker style="width: 100%;" format="yyyy 年 MM 月" value-format="yyyy-MM"
v-model="paramsMonth.timeVal" type="month" placeholder="选择月">
v-model="paramsMonth.timeVal" type="month" placeholder="选择月"
:picker-options="pickerOptionsMonth">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<div>
<el-button size="small" icon="el-icon-search" type="primary"
@click="getStatisticsListMonth">搜索</el-button>
......@@ -32,17 +38,19 @@
<el-table :data="statisticsMothList" style="width: 100%" :key="statisticsMothKey"
:header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }"
height="calc(100vh - 300px)" show-summary :summary-method="getSummariesMonth">
<el-table-column label="序号" type="index" :index="indexMonthFN" width="50">
</el-table-column>
<el-table-column prop="companyName" label="单位名称">
</el-table-column>
<el-table-column prop="actualPayable" label="实发工资">
</el-table-column>
<!-- <el-table-column label="序号" type="index" :index="indexMonthFN" width="50">
</el-table-column> -->
<el-table-column prop="timeVal" label="时间">
<template slot-scope="{row}">
{{ statisticsMothTime(row.timeVal) }}
</template>
</el-table-column>
<el-table-column prop="payerAccName" label="发薪主体">
</el-table-column>
<el-table-column prop="companyName" label="单位名称">
</el-table-column>
<el-table-column prop="actualPayable" label="实发工资">
</el-table-column>
<el-table-column label="公司承担部分">
<el-table-column prop="gsbxCompanyMoney" label="工商保险">
</el-table-column>
......@@ -70,19 +78,25 @@
<!-- 按年-查询条件框 -->
<el-form :model="paramsYear" label-width="80px" label-position="left">
<el-row :gutter="22">
<el-col :span="8">
<el-col :span="6">
<el-form-item label="发薪主体">
<el-input v-model="paramsYear.payerAccName" placeholder="请输入发薪主体"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单位名称">
<el-input v-model="paramsYear.companyName" placeholder="请输入单位名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="统计年份">
<el-date-picker style="width: 100%;" format="yyyy 年" value-format="yyyy"
v-model="paramsYear.timeVal" type="year" placeholder="选择年">
v-model="paramsYear.timeVal" type="year" placeholder="选择年"
:picker-options="pickerOptionsYear">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<div>
<el-button size="small" icon="el-icon-search" type="primary"
@click="getStatisticsListYear">搜索</el-button>
......@@ -96,17 +110,19 @@
<el-table :data="statisticsYearList" style="width: 100%" :key="statisticsYearKey"
:header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }"
height="calc(100vh - 300px)" show-summary :summary-method="getSummariesYear">
<el-table-column label="序号" type="index" :index="indexYearFN" width="50">
</el-table-column>
<el-table-column prop="companyName" label="单位名称">
</el-table-column>
<el-table-column prop="actualPayable" label="实发工资">
</el-table-column>
<!-- <el-table-column label="序号" type="index" :index="indexYearFN" width="50">
</el-table-column> -->
<el-table-column prop="timeVal" label="时间">
<template slot-scope="{row}">
{{ statisticsYearTime(row.timeVal) }}
</template>
</el-table-column>
<el-table-column prop="payerAccName" label="发薪主体">
</el-table-column>
<el-table-column prop="companyName" label="单位名称">
</el-table-column>
<el-table-column prop="actualPayable" label="实发工资">
</el-table-column>
<el-table-column label="公司承担部分">
<el-table-column prop="gsbxCompanyMoney" label="工商保险">
</el-table-column>
......@@ -146,6 +162,7 @@ export default {
timeUnit: 'MONTH',
timeVal: null,
companyName: null,
payerAccName: null
},
totalMonth: 0,
statisticsMothList: [],
......@@ -157,14 +174,38 @@ export default {
timeUnit: 'YEAR',
timeVal: null,
companyName: null,
payerAccName: null
},
totalYear: 0,
statisticsYearList: [],
statisticsYearKey: 1,
activeName: 'first'
activeName: 'first',
/** 月份禁用 */
pickerOptionsMonth: {
disabledDate(time) {
const currentMonth = new Date();
currentMonth.setDate(1);
currentMonth.setHours(0, 0, 0, 0);
return time.getTime() > currentMonth.getTime();
}
},
/** 年份禁用 */
pickerOptionsYear: {
disabledDate(time) {
const currentYear = new Date();
currentYear.setMonth(0);
currentYear.setDate(1);
currentYear.setHours(0, 0, 0, 0);
return time.getTime() > currentYear.getTime();
}
}
}
},
created() { },
created() {
// 获取当前年、月份
this.paramsYear.timeVal = String(new Date().getFullYear());
this.paramsMonth.timeVal = String(new Date().getFullYear()) + '-' + String(new Date().getMonth() + 1).padStart(2, '0');
},
mounted() {
this.getStatisticsListMonth()
},
......@@ -273,8 +314,9 @@ export default {
pageNum: 1,
pageSize: 10,
timeUnit: 'YEAR',
timeVal: null,
timeVal: String(new Date().getFullYear()),
companyName: null,
payerAccName: null,
}
this.getStatisticsListYear()
},
......@@ -284,8 +326,9 @@ export default {
pageNum: 1,
pageSize: 10,
timeUnit: 'MONTH',
timeVal: null,
timeVal: String(new Date().getFullYear()) + '-' + String(new Date().getMonth() + 1).padStart(2, '0'),
companyName: null,
payerAccName: null,
}
this.getStatisticsListMonth()
},
......@@ -332,7 +375,7 @@ export default {
if (res.code == 200) {
this.statisticsMothList = res.rows
this.totalMonth = res.total
this.statisticsMothKey += 12
this.statisticsMothKey += 1
}
}).finally(() => {
this.$modal.closeLoading()
......@@ -345,7 +388,7 @@ export default {
if (res.code == 200) {
this.statisticsYearList = res.rows
this.totalYear = res.total
this.statisticsYearKey += 12
this.statisticsYearKey += 1
}
}).finally(() => {
this.$modal.closeLoading()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment