Commit aad849da by 张立顺

test

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