Commit 08c437c8 authored by ww-xxy's avatar ww-xxy

汇总一张表详情

parent 3dc36b62
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <div class="userName">
<div class="user-left">
<div class="user-name">
{{ form.staffName }}
</div>
<div class="user-info">
<span class="user-i">工号:{{ form.workNum }}</span>
<span class="user-i">所属部门:{{ form.deptName }}</span>
</div>
</div>
<div class="user-right">
<div class="n">{{form.totalScore}}</div>
<div class="m">{{ form.month }}月得分</div>
</div>
</div>
<div class="userName user-t-item " :class="{t2:item.subAddType == 1,t1:item.subAddType == 2}" v-for="(item) in list" :key="item.id">
<div class="user-left">
<div class="user-name">
{{dictVal('checkType',item.checkType)}}
</div>
<div class="user-info">
<span class="user-i">绩效规则:{{item.ruleName}}</span>
</div>
<div class="user-info">
<span class="user-i">核查时间:{{momentVal(item.checkTime)}}</span>
</div>
</div>
<div class="user-right">
<div class="n">{{item.subAddType==1?'+':'-'}}{{item.score}}</div>
</div>
</div>
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field label="人员id" prop="staffId" v-model="form.staffId" placeholder="请输入人员id"/> <Field label="人员id" prop="staffId" v-model="form.staffId" placeholder="请输入人员id" />
<Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号"/> <Field label="工号" prop="workNum" v-model="form.workNum" placeholder="请输入工号" />
<Field label="人员名称" prop="staffName" v-model="form.staffName" type="textarea" placeholder="请输入人员名称"/> <Field label="人员名称" prop="staffName" v-model="form.staffName" type="textarea" placeholder="请输入人员名称" />
<Field label="部门id号" prop="deptId" v-model="form.deptId" placeholder="请输入部门id号"/> <Field label="部门id号" prop="deptId" v-model="form.deptId" placeholder="请输入部门id号" />
<Field label="部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入部门名称"/> <Field label="部门名称" prop="deptName" v-model="form.deptName" placeholder="请输入部门名称" />
<Field label="考勤绩效指标分数" prop="attendScore" v-model="form.attendScore" placeholder="请输入考勤绩效指标分数"/> <Field label="考勤绩效指标分数" prop="attendScore" v-model="form.attendScore" placeholder="请输入考勤绩效指标分数" />
<Field label="评价绩效指标分数" prop="assessScore" v-model="form.assessScore" placeholder="请输入评价绩效指标分数"/> <Field label="评价绩效指标分数" prop="assessScore" v-model="form.assessScore" placeholder="请输入评价绩效指标分数" />
<Field label="办件绩效分数" prop="workScore" v-model="form.workScore" placeholder="请输入办件绩效分数"/> <Field label="办件绩效分数" prop="workScore" v-model="form.workScore" placeholder="请输入办件绩效分数" />
<Field label="效能绩效分数" prop="effectScore" v-model="form.effectScore" placeholder="请输入效能绩效分数"/> <Field label="效能绩效分数" prop="effectScore" v-model="form.effectScore" placeholder="请输入效能绩效分数" />
<Field label="其它绩效分数" prop="otherScore" v-model="form.otherScore" placeholder="请输入其它绩效分数"/> <Field label="其它绩效分数" prop="otherScore" v-model="form.otherScore" placeholder="请输入其它绩效分数" />
<Field label="累计异常分数" prop="errorScore" v-model="form.errorScore" placeholder="请输入累计异常分数"/> <Field label="累计异常分数" prop="errorScore" v-model="form.errorScore" placeholder="请输入累计异常分数" />
<Field label="当月得分数" prop="totalScore" v-model="form.totalScore" placeholder="请输入当月得分数"/> <Field label="当月得分数" prop="totalScore" v-model="form.totalScore" placeholder="请输入当月得分数" />
<Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注"/> <Field label="备注" prop="remark" v-model="form.remark" type="textarea" placeholder="请输入备注" />
<Field label="年" prop="year" v-model="form.year" placeholder="请输入年"/> <Field label="年" prop="year" v-model="form.year" placeholder="请输入年" />
<Field label="月" prop="month" v-model="form.month" type="select" :enumData="dict.month" placeholder="请选择月"/> <Field label="月" prop="month" v-model="form.month" type="select" :enumData="dict.month"
placeholder="请选择月" />
</el-row> </el-row>
</el-form> </el-form> -->
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="pageInfo.type !== 'view'" @click="submitForm">确 定</el-button> <el-button type="primary" v-if="pageInfo.type !== 'view'" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
...@@ -30,12 +62,13 @@ ...@@ -30,12 +62,13 @@
</template> </template>
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
import dialogShow from "./dialogshow"; import dialogShow from "./dialogshow";
export default { import moment from "moment";
export default {
mixins: [form], mixins: [form],
components: { components: {
dialogShow , dialogShow,
}, },
data() { data() {
return { return {
...@@ -45,29 +78,52 @@ ...@@ -45,29 +78,52 @@
title: "员工绩效统计", title: "员工绩效统计",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
toString:[ toString: [
"month", "month",
], ],
// 表单校验 // 表单校验
rules: { rules: {
year: [ year: [
{required: true,message: "请输入年", trigger: "blur" }, { required: true, message: "请输入年", trigger: "blur" },
], ],
month: [ month: [
{required: true,message: "请输入月", trigger: "blur" }, { required: true, message: "请输入月", trigger: "blur" },
], ],
} },
list:[],
dict:{}
}; };
}, },
methods: { methods: {
// 日期
momentVal(v){
return moment(v).format('YYYY-MM-DD HH:SS')
},
// 字典转换
dictVal(key,val){
return this.dict[key][val]
},
/** 查看汇总 */
checkAll(id) {
this.$post("/check/all/record/list", {checkStatus:2,staffId:id}).then((res) => {
const { code, data, dict } = res
if (code == 1) {
const row = data.data || []
//deductTime申诉时间 checkTime 核查时间 ruleName规则checkType字典 subAddType:1增加2减score
this.list = row
this.dict = dict
console.log(row,dict,"22222222222")
}
});
},
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset()
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="staff/perform/summary/edit"; this.urls.currUrl = "staff/perform/summary/edit";
this.getData(); this.getData();
this.pageInfo.type="edit" this.pageInfo.type = "edit"
this.title = "修改员工绩效统计"; this.title = "修改员工绩效统计";
}, },
/** 新增 */ /** 新增 */
...@@ -75,17 +131,18 @@ ...@@ -75,17 +131,18 @@
this.reset() this.reset()
this.urls.currUrl = "staff/perform/summary/add"; this.urls.currUrl = "staff/perform/summary/add";
this.getData(); this.getData();
this.pageInfo.type="add" this.pageInfo.type = "add"
this.title = "新增员工绩效统计"; this.title = "新增员工绩效统计";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset() this.reset()
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl ="staff/perform/summary/view"; this.urls.currUrl = "staff/perform/summary/view";
this.getData(); this.getData();
this.pageInfo.type="view" this.pageInfo.type = "view"
this.title = "员工绩效统计详细"; this.title = "员工绩效统计详细";
this.checkAll(row.staffId)
}, },
/**取消按钮 */ /**取消按钮 */
cancel() { cancel() {
...@@ -104,21 +161,21 @@ ...@@ -104,21 +161,21 @@
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
staffId : 0, staffId: 0,
workNum : "", workNum: "",
staffName : "", staffName: "",
deptId : 0, deptId: 0,
deptName : "", deptName: "",
attendScore : null, attendScore: null,
assessScore : null, assessScore: null,
workScore : null, workScore: null,
effectScore : null, effectScore: null,
otherScore : null, otherScore: null,
errorScore : null, errorScore: null,
totalScore : null, totalScore: null,
remark : "", remark: "",
year : null, year: null,
month : null, month: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -128,5 +185,67 @@ ...@@ -128,5 +185,67 @@
} }
}, },
}, },
}; };
</script> </script>
<style lang="less" scoped>
.userName {
background: rgba(242, 246, 252, 1);
display: flex;
align-items: center;
padding: 15px;
.user-left {
flex: 1;
}
.user-name {
font-size: 18px;
font-weight: bold;
}
.user-info {
margin-top: 10px;
.user-i {
margin-right: 40px;
}
}
.user-right {
text-align: center;
.n {
font-size: 16px;
font-weight: bold;
}
.m {
font-size: 12px;
}
}
}
.user-t-item {
margin-top: 20px;
border-left: 4px solid #FF4242;
}
.t1 {
border-color: #FF4242;
background: rgba(255, 66, 66, 0.07);
.user-name,
.n {
color: #FF4242;
}
}
.t2 {
border-color: rgba(27, 198, 167, 1);
background: rgba(27, 198, 167, 0.07);
.user-name,
.n {
color: rgba(27, 198, 167, 1);
}
}
</style>
\ No newline at end of file
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