Commit aad849da by 张立顺

test

1 parent 71bf1a8f
<template> <template>
<div class="shop"> <div class="shop">
<template> <template>
<el-alert title="每月最后一天24:00按当月业务完成情况自动计算员工绩效。" <el-alert title="每月最后一天24:00按当月业务完成情况自动计算员工绩效。" show-icon class="tip-cla"></el-alert>
show-icon
class="tip-cla">
</el-alert>
</template> </template>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"> @handleRest="handleReset">
<div slot="performanceMonth"> <div slot="performanceMonth">
<el-date-picker v-model="searchForm.performanceMonth" <el-date-picker v-model="searchForm.performanceMonth" type="month" placeholder="选择月" value-format="yyyy-MM"
type="month" format="yyyy-MM" clearable :picker-options="pickerOption"></el-date-picker>
placeholder="选择月"
value-format="yyyy-MM"
format="yyyy-MM"
clearable
:picker-options="pickerOption"></el-date-picker>
</div> </div>
</GLCombiForm> </GLCombiForm>
<div class="table-header"> <div class="table-header">
<h2>驻店绩效列表</h2> <h2>驻店绩效列表</h2>
<div> <div>
<el-button size="small" <el-button size="small" @click="exportExcel_summary" plain>导出汇总表</el-button>
@click="exportExcel_summary" <el-button size="small" @click="exportExcel_detail">导出明细</el-button>
plain>导出汇总表</el-button> <el-button size="small" @click="batchDistribute">批量下发</el-button>
<el-button size="small"
@click="exportExcel_detail">导出明细</el-button>
<el-button size="small"
@click="batchDistribute">批量下发</el-button>
</div> </div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="residentRef" <GLTable ref="residentRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:getListApi="getListApi" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"> @setTableFinishFun="setTableFinishFun">
<div class="tb-ellipsis" <div class="tb-ellipsis" slot="yqMerchantName" slot-scope="scope">
slot="yqMerchantName" <el-popover placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.yqMerchantName">
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.yqMerchantName">
<span slot="reference"> <span slot="reference">
{{ scope.scope.yqMerchantName }} {{ scope.scope.yqMerchantName }}
</span> </span>
</el-popover> </el-popover>
</div> </div>
<div slot="applyStatus" <div slot="applyStatus" slot-scope="scope" class="flex">
slot-scope="scope"
class="flex">
<div :class="['dot', statusClass[scope.scope.status]]"></div> <div :class="['dot', statusClass[scope.scope.status]]"></div>
{{ reviewStatusObj[scope.scope.status] }} {{ reviewStatusObj[scope.scope.status] }}
</div> </div>
...@@ -70,36 +42,25 @@ ...@@ -70,36 +42,25 @@
:buttonItem="scope.scope" :buttonItem="scope.scope"
:buttonNum="3"></GLTableButton> :buttonNum="3"></GLTableButton>
</div> --> </div> -->
<div class="table-btns" <div class="table-btns" slot="auth-button" slot-scope="scope">
slot="auth-button" <el-button type="text" v-if="scope.scope.status == 0" @click="handleCorrection(scope.scope)">校正</el-button>
slot-scope="scope"> <el-button type="text" v-if="scope.scope.status == 0" @click="distribute(scope.scope)">下发</el-button>
<el-button type="text" <el-button type="text" @click="handleDetail(scope.scope)">查看明细</el-button>
v-if="scope.scope.status == 0"
@click="handleCorrection(scope.scope)">校正</el-button>
<el-button type="text"
v-if="scope.scope.status == 0"
@click="distribute(scope.scope)">下发</el-button>
<el-button type="text"
@click="handleDetail(scope.scope)">查看明细</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<ResidentDetailDialog v-if="isResidentVisible" <ResidentDetailDialog v-if="isResidentVisible" :isVisible="isResidentVisible" :recordInfo="recordInfo"
:isVisible="isResidentVisible"
:recordInfo="recordInfo"
@handleClose="handleDetail"></ResidentDetailDialog> @handleClose="handleDetail"></ResidentDetailDialog>
<ResidentCorrectionDialog v-if="isCorrectionVisible" <ResidentCorrectionDialog v-if="isCorrectionVisible" :isVisible="isCorrectionVisible" :recordInfo="recordInfo"
:isVisible="isCorrectionVisible"
:recordInfo="recordInfo"
@handleClose="handleCorrectionClose"></ResidentCorrectionDialog> @handleClose="handleCorrectionClose"></ResidentCorrectionDialog>
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' // import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { downLoadFile } from '@/common/util' // import { downLoadFile } from '@/common/util'
import ResidentDetailDialog from './residentDetailDialog.vue' import ResidentDetailDialog from './residentDetailDialog.vue'
import ResidentCorrectionDialog from './residentCorrectionDialog.vue' import ResidentCorrectionDialog from './residentCorrectionDialog.vue'
export default { export default {
...@@ -122,7 +83,7 @@ export default { ...@@ -122,7 +83,7 @@ export default {
{ {
label: '绩效月份', label: '绩效月份',
prop: 'performanceMonth', prop: 'performanceMonth',
addHtml: 'performanceMonth', addHtml: 'performanceMonth'
}, },
{ {
label: '员工姓名', label: '员工姓名',
...@@ -135,7 +96,7 @@ export default { ...@@ -135,7 +96,7 @@ export default {
label: '员工手机号', label: '员工手机号',
name: 'staffPhone', name: 'staffPhone',
type: 'input', type: 'input',
inputType: "number", inputType: 'number',
isClear: true, isClear: true,
maxlength: '11' maxlength: '11'
}, },
...@@ -306,7 +267,7 @@ export default { ...@@ -306,7 +267,7 @@ export default {
prop: 'status', prop: 'status',
width: '100px', width: '100px',
addHtml: 'applyStatus' addHtml: 'applyStatus'
}, }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
...@@ -324,16 +285,18 @@ export default { ...@@ -324,16 +285,18 @@ export default {
// 基本数据 // 基本数据
baseData: { baseData: {
merchantList: [], merchantList: [],
statusList: [{ statusList: [
{
confId: 0, confId: 0,
confName: '未下发' confName: '未下发'
}, },
{ {
confId: 1, confId: 1,
confName: '已下发' confName: '已下发'
}] }
]
}, },
setMonthFlag: false,//第一次进入页面时设置绩效月份参数值 setMonthFlag: false //第一次进入页面时设置绩效月份参数值
} }
}, },
components: { components: {
...@@ -348,15 +311,15 @@ export default { ...@@ -348,15 +311,15 @@ export default {
methods: { methods: {
getLastMonth() { getLastMonth() {
// 获取上个月日期 // 获取上个月日期
var date = new Date; var date = new Date()
var year = date.getFullYear(); var year = date.getFullYear()
var month = date.getMonth(); var month = date.getMonth()
if (month == 0) { if (month == 0) {
year = year - 1; year = year - 1
month = 12; month = 12
} }
month = month > 10 ? month : "0" + month month = month > 10 ? month : '0' + month
this.searchForm.performanceMonth = year.toString() + '-' + month; this.searchForm.performanceMonth = year.toString() + '-' + month
}, },
getServiceCenterList() { getServiceCenterList() {
const params = { const params = {
...@@ -373,7 +336,8 @@ export default { ...@@ -373,7 +336,8 @@ export default {
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
if (!this.setMonthFlag) {//进入页面时设置绩效月份参数值 if (!this.setMonthFlag) {
//进入页面时设置绩效月份参数值
this.getLastMonth() this.getLastMonth()
} }
this.tableSearchForm = this.getParams() this.tableSearchForm = this.getParams()
...@@ -425,13 +389,13 @@ export default { ...@@ -425,13 +389,13 @@ export default {
distribute_commit(selectedData) { distribute_commit(selectedData) {
if (!selectedData?.length) { if (!selectedData?.length) {
this.$message({ this.$message({
message: "请选择需要下发的记录", message: '请选择需要下发的记录',
type: "warning", type: 'warning',
showClose: true showClose: true
}) })
return false return false
} }
var idList = selectedData.map((item) => { var idList = selectedData.map(item => {
return item.id return item.id
}) })
this.$confirm('<strong>是否确定下发?</strong> <div>完成工资记录下发后,员工可查看到对应的工资记录,且不允许再修改</div> ', '提示', { this.$confirm('<strong>是否确定下发?</strong> <div>完成工资记录下发后,员工可查看到对应的工资记录,且不允许再修改</div> ', '提示', {
...@@ -439,7 +403,8 @@ export default { ...@@ -439,7 +403,8 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { })
.then(() => {
this.$apis.performanceManage.batchIssueApi({ idList: idList }).then(res => { this.$apis.performanceManage.batchIssueApi({ idList: idList }).then(res => {
this.$notify({ this.$notify({
type: 'success', type: 'success',
...@@ -447,7 +412,8 @@ export default { ...@@ -447,7 +412,8 @@ export default {
}) })
this.$refs.residentRef.refreshTable() this.$refs.residentRef.refreshTable()
}) })
}).catch(err => { })
.catch(err => {
console.log(err) console.log(err)
}) })
}, },
...@@ -462,7 +428,7 @@ export default { ...@@ -462,7 +428,7 @@ export default {
this.$apis.performanceManage.exportDetailApi(params).then(res => { this.$apis.performanceManage.exportDetailApi(params).then(res => {
downLoadFile(res) downLoadFile(res)
}) })
}, }
} }
} }
</script> </script>
...@@ -474,10 +440,12 @@ export default { ...@@ -474,10 +440,12 @@ export default {
background: #e4e3ff; background: #e4e3ff;
border-radius: 4px; border-radius: 4px;
} }
.flex { .flex {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.dot { .dot {
width: 6px; width: 6px;
height: 6px; height: 6px;
...@@ -485,13 +453,15 @@ export default { ...@@ -485,13 +453,15 @@ export default {
border-radius: 4px; border-radius: 4px;
margin-right: 6px; margin-right: 6px;
} }
.green { .green {
background: #4aca74; background: #4aca74;
} }
.red { .red {
background: #eb4e4e; background: #eb4e4e;
} }
.grey { .grey {
background: #999999; background: #999999;
} }</style>
</style>
<template> <template>
<div class="shop"> <div class="shop">
<template> <template>
<el-alert title="每月最后一天24:00按当月业务完成情况自动计算员工绩效。" <el-alert title="每月最后一天24:00按当月业务完成情况自动计算员工绩效。" show-icon class="tip-cla"></el-alert>
show-icon
class="tip-cla">
</el-alert>
</template> </template>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"> @handleRest="handleReset">
<div slot="performanceMonth"> <div slot="performanceMonth">
<el-date-picker v-model="searchForm.performanceMonth" <el-date-picker v-model="searchForm.performanceMonth" type="month" placeholder="选择月" value-format="yyyy-MM"
type="month" format="yyyy-MM" clearable :picker-options="pickerOption"></el-date-picker>
placeholder="选择月"
value-format="yyyy-MM"
format="yyyy-MM"
clearable
:picker-options="pickerOption"></el-date-picker>
</div> </div>
</GLCombiForm> </GLCombiForm>
<div class="table-header"> <div class="table-header">
<h2>技师绩效列表</h2> <h2>技师绩效列表</h2>
<div> <div>
<el-button size="small" <el-button size="small" @click="exportExcel_summary" plain>导出汇总表</el-button>
@click="exportExcel_summary" <el-button size="small" @click="exportExcel_detail">导出明细</el-button>
plain>导出汇总表</el-button> <el-button size="small" @click="batchDistribute">批量下发</el-button>
<el-button size="small"
@click="exportExcel_detail">导出明细</el-button>
<el-button size="small"
@click="batchDistribute">批量下发</el-button>
</div> </div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="residentRef" <GLTable ref="residentRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:getListApi="getListApi" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"> @setTableFinishFun="setTableFinishFun">
<div class="tb-ellipsis" <div class="tb-ellipsis" slot="yqMerchantName" slot-scope="scope">
slot="yqMerchantName" <el-popover placement="top" popper-class="base-popper" trigger="hover" :content="scope.scope.yqMerchantName">
slot-scope="scope">
<el-popover placement="top"
popper-class="base-popper"
trigger="hover"
:content="scope.scope.yqMerchantName">
<span slot="reference"> <span slot="reference">
{{ scope.scope.yqMerchantName }} {{ scope.scope.yqMerchantName }}
</span> </span>
</el-popover> </el-popover>
</div> </div>
<div slot="applyStatus" <div slot="applyStatus" slot-scope="scope" class="flex">
slot-scope="scope"
class="flex">
<div :class="['dot', statusClass[scope.scope.status]]"></div> <div :class="['dot', statusClass[scope.scope.status]]"></div>
{{ reviewStatusObj[scope.scope.status] }} {{ reviewStatusObj[scope.scope.status] }}
</div> </div>
...@@ -70,36 +42,25 @@ ...@@ -70,36 +42,25 @@
:buttonItem="scope.scope" :buttonItem="scope.scope"
:buttonNum="3"></GLTableButton> :buttonNum="3"></GLTableButton>
</div> --> </div> -->
<div class="table-btns" <div class="table-btns" slot="auth-button" slot-scope="scope">
slot="auth-button" <el-button type="text" v-if="scope.scope.status == 0" @click="handleCorrection(scope.scope)">校正</el-button>
slot-scope="scope"> <el-button type="text" v-if="scope.scope.status == 0" @click="distribute(scope.scope)">下发</el-button>
<el-button type="text" <el-button type="text" @click="handleDetail(scope.scope)">查看明细</el-button>
v-if="scope.scope.status == 0"
@click="handleCorrection(scope.scope)">校正</el-button>
<el-button type="text"
v-if="scope.scope.status == 0"
@click="distribute(scope.scope)">下发</el-button>
<el-button type="text"
@click="handleDetail(scope.scope)">查看明细</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<TechnicianDetailDialog v-if="isTechnicianVisible" <TechnicianDetailDialog v-if="isTechnicianVisible" :isVisible="isTechnicianVisible" :recordInfo="recordInfo"
:isVisible="isTechnicianVisible"
:recordInfo="recordInfo"
@handleClose="handleDetail"></TechnicianDetailDialog> @handleClose="handleDetail"></TechnicianDetailDialog>
<TechnicianCorrectionDialog v-if="isCorrectionVisible" <TechnicianCorrectionDialog v-if="isCorrectionVisible" :isVisible="isCorrectionVisible" :recordInfo="recordInfo"
:isVisible="isCorrectionVisible"
:recordInfo="recordInfo"
@handleClose="handleCorrectionClose"></TechnicianCorrectionDialog> @handleClose="handleCorrectionClose"></TechnicianCorrectionDialog>
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' // import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { downLoadFile } from '@/common/util' // import { downLoadFile } from '@/common/util'
import TechnicianDetailDialog from './technicianDetailDialog.vue' import TechnicianDetailDialog from './technicianDetailDialog.vue'
import TechnicianCorrectionDialog from './technicianCorrectionDialog.vue' import TechnicianCorrectionDialog from './technicianCorrectionDialog.vue'
export default { export default {
...@@ -122,7 +83,7 @@ export default { ...@@ -122,7 +83,7 @@ export default {
{ {
label: '绩效月份', label: '绩效月份',
prop: 'performanceMonth', prop: 'performanceMonth',
addHtml: 'performanceMonth', addHtml: 'performanceMonth'
}, },
{ {
label: '员工姓名', label: '员工姓名',
...@@ -135,7 +96,7 @@ export default { ...@@ -135,7 +96,7 @@ export default {
label: '员工手机号', label: '员工手机号',
name: 'staffPhone', name: 'staffPhone',
type: 'input', type: 'input',
inputType: "number", inputType: 'number',
isClear: true, isClear: true,
maxlength: '11' maxlength: '11'
}, },
...@@ -239,7 +200,7 @@ export default { ...@@ -239,7 +200,7 @@ export default {
prop: 'status', prop: 'status',
width: '100px', width: '100px',
addHtml: 'applyStatus' addHtml: 'applyStatus'
}, }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
...@@ -257,16 +218,18 @@ export default { ...@@ -257,16 +218,18 @@ export default {
// 基本数据 // 基本数据
baseData: { baseData: {
merchantList: [], merchantList: [],
statusList: [{ statusList: [
{
confId: 0, confId: 0,
confName: '未下发' confName: '未下发'
}, },
{ {
confId: 1, confId: 1,
confName: '已下发' confName: '已下发'
}] }
]
}, },
setMonthFlag: false,//第一次进入页面时设置绩效月份参数值 setMonthFlag: false //第一次进入页面时设置绩效月份参数值
} }
}, },
components: { components: {
...@@ -280,14 +243,14 @@ export default { ...@@ -280,14 +243,14 @@ export default {
methods: { methods: {
getLastMonth() { getLastMonth() {
// 获取上个月日期 // 获取上个月日期
var date = new Date; var date = new Date()
var year = date.getFullYear(); var year = date.getFullYear()
var month = date.getMonth(); var month = date.getMonth()
if (month == 0) { if (month == 0) {
year = year - 1; year = year - 1
month = 12; month = 12
} }
this.searchForm.performanceMonth = year.toString() + '-' + month; this.searchForm.performanceMonth = year.toString() + '-' + month
}, },
getServiceCenterList() { getServiceCenterList() {
const params = { const params = {
...@@ -304,7 +267,8 @@ export default { ...@@ -304,7 +267,8 @@ export default {
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
if (!this.setMonthFlag) {//进入页面时设置绩效月份参数值 if (!this.setMonthFlag) {
//进入页面时设置绩效月份参数值
this.getLastMonth() this.getLastMonth()
} }
this.tableSearchForm = this.getParams() this.tableSearchForm = this.getParams()
...@@ -356,13 +320,13 @@ export default { ...@@ -356,13 +320,13 @@ export default {
distribute_commit(selectedData) { distribute_commit(selectedData) {
if (!selectedData?.length) { if (!selectedData?.length) {
this.$message({ this.$message({
message: "请选择需要下发的记录", message: '请选择需要下发的记录',
type: "warning", type: 'warning',
showClose: true showClose: true
}) })
return false return false
} }
var idList = selectedData.map((item) => { var idList = selectedData.map(item => {
return item.id return item.id
}) })
this.$confirm('<strong>是否确定下发?</strong> <div>完成工资记录下发后,员工可查看到对应的工资记录,且不允许再修改</div> ', '提示', { this.$confirm('<strong>是否确定下发?</strong> <div>完成工资记录下发后,员工可查看到对应的工资记录,且不允许再修改</div> ', '提示', {
...@@ -370,7 +334,8 @@ export default { ...@@ -370,7 +334,8 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { })
.then(() => {
this.$apis.performanceManage.batchIssueApi({ idList: idList }).then(res => { this.$apis.performanceManage.batchIssueApi({ idList: idList }).then(res => {
this.$notify({ this.$notify({
type: 'success', type: 'success',
...@@ -378,7 +343,8 @@ export default { ...@@ -378,7 +343,8 @@ export default {
}) })
this.$refs.residentRef.refreshTable() this.$refs.residentRef.refreshTable()
}) })
}).catch(err => { })
.catch(err => {
console.log(err) console.log(err)
}) })
}, },
...@@ -393,7 +359,7 @@ export default { ...@@ -393,7 +359,7 @@ export default {
this.$apis.performanceManage.exportDetailApi(params).then(res => { this.$apis.performanceManage.exportDetailApi(params).then(res => {
downLoadFile(res) downLoadFile(res)
}) })
}, }
} }
} }
</script> </script>
...@@ -405,10 +371,12 @@ export default { ...@@ -405,10 +371,12 @@ export default {
background: #e4e3ff; background: #e4e3ff;
border-radius: 4px; border-radius: 4px;
} }
.flex { .flex {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.dot { .dot {
width: 6px; width: 6px;
height: 6px; height: 6px;
...@@ -416,13 +384,15 @@ export default { ...@@ -416,13 +384,15 @@ export default {
border-radius: 4px; border-radius: 4px;
margin-right: 6px; margin-right: 6px;
} }
.green { .green {
background: #4aca74; background: #4aca74;
} }
.red { .red {
background: #eb4e4e; background: #eb4e4e;
} }
.grey { .grey {
background: #999999; background: #999999;
} }</style>
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!