|
@@ -3,25 +3,11 @@
|
|
|
<div slot="header" class="clearfix">
|
|
|
<span style="font-weight:bold">等级调整</span>
|
|
|
<div style="float: right; padding: 3px 0" type="text">
|
|
|
+ <el-button type="primary" size="mini" @click="btnAdjustMark" v-if="flow.status == 0">调整完成</el-button>
|
|
|
<el-button size="mini" plain @click="btnBack">返回</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="app-container" v-if="isList">
|
|
|
- <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
|
|
|
- <el-form-item label="员工" prop="staffName">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.staffName"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="btnSearch"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" size="mini" @click="btnSearch">搜索</el-button>
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="btnResetQuery">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div style="float:right">
|
|
|
- </div>
|
|
|
+ <div class="app-container">
|
|
|
<el-table size="mini" height="500px" v-loading="loading" :data="listData">
|
|
|
<el-table-column label="编号" align="center" prop="id" />
|
|
|
<el-table-column label="员工姓名" align="center" prop="staffName" />
|
|
@@ -32,65 +18,32 @@
|
|
|
<el-table-column label="上级评分" align="center" prop="ldMark" />
|
|
|
<el-table-column label="调整分" align="center" prop="ajMark" />
|
|
|
<el-table-column label="调整分等级" align="center" prop="ajGrade" />
|
|
|
- <el-table-column label="最终等级" align="center" prop="grade" />
|
|
|
- <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column width="150" label="最终等级" align="center" prop="grade">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select v-model="scope.row.grade" size="mini">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in ehr_pm_gradeconfig"
|
|
|
+ :key="dict.name"
|
|
|
+ :label="dict.name"
|
|
|
+ :value="dict.name"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="300" label="调整原因" align="center" prop="cause">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-search"
|
|
|
- @click="btnAdjustMark(scope.row)"
|
|
|
- >调整</el-button>
|
|
|
+ <el-input v-model="scope.row.cause" size="mini"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <div class="paginationClass">
|
|
|
- <pagination
|
|
|
- v-show="total>0"
|
|
|
- :total="total"
|
|
|
- :page.sync="queryParams.pageNum"
|
|
|
- :limit.sync="queryParams.pageSize"
|
|
|
- @pagination="getList"
|
|
|
- />
|
|
|
- </div>
|
|
|
</div>
|
|
|
-
|
|
|
- <el-dialog title="分数调整" :visible.sync="formOpen" width="1000px" :close-on-click-modal="false" :show-close="false">
|
|
|
- <el-descriptions :column="1">
|
|
|
- <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="自评分">{{form.saMark}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="上级评分">{{form.ldMark}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="调整分">{{form.ajMark}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="调整分等级">{{form.grade}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="调整分原因">{{form.ajCause}}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- <el-form size="mini" label-position="right" ref="form" :model="form" :rules="formRules" label-width="80px">
|
|
|
- <el-form-item label="最终等级" prop="grade">
|
|
|
- <el-select v-model="form.grade" >
|
|
|
- <el-option
|
|
|
- v-for="dict in ehr_pm_gradeconfig"
|
|
|
- :key="dict.name"
|
|
|
- :label="dict.name"
|
|
|
- :value="dict.name"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="调整原因" prop="cause">
|
|
|
- <el-input v-model="form.cause"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button size="mini" @click="btnClose">取 消</el-button>
|
|
|
- <el-button size="mini" type="primary" @click="btnConfirm">确 定</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listPerformance,getPerformance,gradeAdjust} from "@/api/business/ehr/pm/gradeadjust";
|
|
|
+import { listPerformance,savePm,saveFlow} from "@/api/business/ehr/pm/gradeadjust";
|
|
|
import { getGradeconfig} from "@/api/business/ehr/pm/gradeconfig";
|
|
|
+import { getFlow} from "@/api/business/ehr/pm/flow";
|
|
|
|
|
|
export default {
|
|
|
name: "AdjustGrade",
|
|
@@ -105,41 +58,25 @@ export default {
|
|
|
total: 0,
|
|
|
// 表格数据
|
|
|
listData: [],
|
|
|
- //表单数据
|
|
|
- form:{},
|
|
|
- //是否显示行明细弹出层
|
|
|
- formOpen:false,
|
|
|
- //当行明细校验规则
|
|
|
- formRules:{
|
|
|
- grade: [
|
|
|
- { required: true, message: "调整等级不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
- cause: [
|
|
|
- { required: true, message: "调整原因不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
- },
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
+ pageSize: 999999,
|
|
|
sourceId: null,
|
|
|
staffName: null,
|
|
|
},
|
|
|
- //页面显示
|
|
|
- isList: true,
|
|
|
- //页面状态
|
|
|
- page: '',
|
|
|
- //详情id
|
|
|
- rowId: '',
|
|
|
//等级配置数据
|
|
|
ehr_pm_gradeconfig:[],
|
|
|
+ //流程数据
|
|
|
+ flow:{},
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.queryParams.sourceId = this.$route.params.id;
|
|
|
- getGradeconfig(this.$route.params.gradeconfigId).then(response => {
|
|
|
+ this.queryParams.sourceId = this.$route.query.id;
|
|
|
+ getGradeconfig(this.$route.query.gradeconfigId).then(response => {
|
|
|
this.ehr_pm_gradeconfig = response.data.gradeconfigItem;
|
|
|
});
|
|
|
+ this.fetchFlow(this.$route.query.flowId);
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
@@ -152,46 +89,24 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
- /** 搜索按钮操作 */
|
|
|
- btnSearch() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- /** 重置按钮操作 */
|
|
|
- btnResetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.btnSearch();
|
|
|
- },
|
|
|
- /** 刷新 */
|
|
|
- refresh(){
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.getList();
|
|
|
- },
|
|
|
//调整分数
|
|
|
- async btnAdjustMark(row){
|
|
|
- await getPerformance(row.id).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.form = res.data
|
|
|
- this.formOpen = true;
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- //取消
|
|
|
- btnClose(){
|
|
|
- this.formOpen = false;
|
|
|
- },
|
|
|
- //确定
|
|
|
- btnConfirm(){
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
- if (valid) {
|
|
|
- gradeAdjust(this.form).then(response => {
|
|
|
- this.$modal.msgSuccess("保存成功");
|
|
|
- this.formOpen = false;
|
|
|
- this.getList();
|
|
|
- });
|
|
|
+ async btnAdjustMark(){
|
|
|
+ savePm(this.listData).then(response => {
|
|
|
+
|
|
|
+ });
|
|
|
+ saveFlow(this.flow).then(response => {
|
|
|
+ if(response.code == 200){
|
|
|
+ this.$modal.msgSuccess("调整完成");
|
|
|
+ this.fetchFlow(this.$route.query.flowId);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //查询流程
|
|
|
+ async fetchFlow(id){
|
|
|
+ await getFlow(id).then(res => {
|
|
|
+ this.flow = res.data;
|
|
|
+ })
|
|
|
+ },
|
|
|
//返回
|
|
|
btnBack(){
|
|
|
this.$router.back();
|