Ver Fonte

Merge branch 'dev' into 'purchaseDev'

Dev20231213

See merge request new-business/drp-web!615
李园 há 1 ano atrás
pai
commit
6f1accba7a
31 ficheiros alterados com 4001 adições e 11 exclusões
  1. 10 0
      src/api/business/ehr/pm/evaluate.js
  2. 9 0
      src/api/business/ehr/pm/flow.js
  3. 18 0
      src/api/business/ehr/pm/pmmark.js
  4. 18 0
      src/api/business/ehr/pm/pmverify.js
  5. 261 0
      src/views/business/ehr/pm/awaitMarkPm/detail.vue
  6. 132 0
      src/views/business/ehr/pm/awaitMarkPm/index.vue
  7. 175 0
      src/views/business/ehr/pm/awaitVerifyPm/detail.vue
  8. 142 0
      src/views/business/ehr/pm/awaitVerifyPm/index.vue
  9. 196 0
      src/views/business/ehr/pm/evaluatePm/index.vue
  10. 56 0
      src/views/business/ehr/pm/finishMarkPm/btnAjMarkLog.vue
  11. 67 0
      src/views/business/ehr/pm/finishMarkPm/btnApproveLog.vue
  12. 88 0
      src/views/business/ehr/pm/finishMarkPm/btnCopyItem.vue
  13. 186 0
      src/views/business/ehr/pm/finishMarkPm/detail.vue
  14. 146 0
      src/views/business/ehr/pm/finishMarkPm/index.vue
  15. 56 0
      src/views/business/ehr/pm/finishVerifyPm/btnAjMarkLog.vue
  16. 67 0
      src/views/business/ehr/pm/finishVerifyPm/btnApproveLog.vue
  17. 88 0
      src/views/business/ehr/pm/finishVerifyPm/btnCopyItem.vue
  18. 170 0
      src/views/business/ehr/pm/finishVerifyPm/detail.vue
  19. 141 0
      src/views/business/ehr/pm/finishVerifyPm/index.vue
  20. 56 0
      src/views/business/ehr/pm/juniorPm/btnAjMarkLog.vue
  21. 67 0
      src/views/business/ehr/pm/juniorPm/btnApproveLog.vue
  22. 88 0
      src/views/business/ehr/pm/juniorPm/btnCopyItem.vue
  23. 445 0
      src/views/business/ehr/pm/juniorPm/detail.vue
  24. 371 0
      src/views/business/ehr/pm/juniorPm/index.vue
  25. 56 0
      src/views/business/ehr/pm/myPm/btnAjMarkLog.vue
  26. 67 0
      src/views/business/ehr/pm/myPm/btnApproveLog.vue
  27. 88 0
      src/views/business/ehr/pm/myPm/btnCopyItem.vue
  28. 445 0
      src/views/business/ehr/pm/myPm/detail.vue
  29. 162 0
      src/views/business/ehr/pm/myPm/index.vue
  30. 17 11
      src/views/business/ehr/pm/stagecontrol/index.vue
  31. 113 0
      src/views/purchase/transferOrder/reserved.vue

+ 10 - 0
src/api/business/ehr/pm/evaluate.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 查询阶段列表
+export function listEvaluate(query) {
+  return request({
+    url: '/ehr/pm/evaluate/list',
+    method: 'get',
+    params: query
+  })
+}

+ 9 - 0
src/api/business/ehr/pm/flow.js

@@ -15,4 +15,13 @@ export function getFlow(id) {
     url: '/ehr/pm/flow/' + id,
     method: 'get'
   })
+}
+
+// 查询流程详细
+export function getInfo(query) {
+  return request({
+    url: '/ehr/pm/flow/getInfo',
+    method: 'post',
+    params: query
+  })
 }

+ 18 - 0
src/api/business/ehr/pm/pmmark.js

@@ -17,6 +17,24 @@ export function listPerformance(query) {
   })
 }
 
+// 查询待评分列表
+export function listUnMark(query) {
+  return request({
+    url: '/ehr/pm/pmMark/listUnMark',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询已评分列表
+export function listMark(query) {
+  return request({
+    url: '/ehr/pm/pmMark/listMark/',
+    method: 'get',
+    params: query
+  })
+}
+
 // 上级评论
 export function savePerformance(data) {
   return request({

+ 18 - 0
src/api/business/ehr/pm/pmverify.js

@@ -17,6 +17,24 @@ export function listPerformance(query) {
   })
 }
 
+// 查询待确认列表
+export function listUnVerify(query) {
+  return request({
+    url: '/ehr/pm/pmVerify/listUnVerify',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询已经确认列表
+export function listVerify(query) {
+  return request({
+    url: '/ehr/pm/pmVerify/listVerify',
+    method: 'get',
+    params: query
+  })
+}
+
 //绩效确认
 export function verify(data) {
   return request({

+ 261 - 0
src/views/business/ehr/pm/awaitMarkPm/detail.vue

@@ -0,0 +1,261 @@
+<template>
+  <div>
+    <el-card v-if="flow.staff == this.$store.state.user.name">
+      <div slot="header" class="clearfix">
+        <span style="font-weight:bold">绩效评分</span>
+        <div style="float: right; padding: 3px 0" type="text">
+          <el-button size="mini" plain @click="btnBack">返回</el-button>
+          <el-button size="mini" plain @click="btnTurnDown(1)" v-if="flow.status == 0">驳回</el-button>
+          <el-button size="mini" type="primary" plain @click="btnverify" v-if="flow.status == 0">提交</el-button>
+        </div>
+      </div>
+      <div v-loading="loading">
+        <el-form size="mini" ref="dataForm" :model="form" :rules="rules">
+          <el-descriptions :column="6 ">
+            <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
+            <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
+            <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
+            <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
+            <el-descriptions-item label="部门" span="2">{{form.deptName}}</el-descriptions-item>
+            <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
+            <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
+            <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
+            <el-descriptions-item label="所属分组">
+              <div v-for="dict in dict.type.ehr_pm_group" v-if="form.staffDivide == dict.value">
+                <div>{{ dict.label }}</div>
+              </div>
+            </el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions :column="6 ">
+            <el-descriptions-item label="自评分" v-if="form.status > 3">{{form.saMark}}</el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions v-if="form.status > 3">
+            <el-descriptions-item label="个人总结">{{form.summary}}</el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions v-if="form.status > 4">
+            <el-descriptions-item label="评语">{{form.comment}}</el-descriptions-item>
+          </el-descriptions>
+          <div v-if="flow.status == 0">
+            <el-form-item label="评语" prop="comment">
+              <el-input type="textarea" v-model="form.comment"></el-input>
+            </el-form-item>
+          </div>
+          <!-- <div style="float:right">
+            <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button>
+          </div> -->
+          <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries" border>
+            <el-table-column type="index" width="50" label="序号"/>
+            <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.ehr_pm_aspect" :value="scope.row.aspect"/>
+              </template>
+            </el-table-column>
+            <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
+            <el-table-column width="80" label="权重" align="center" prop="weight"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="指标说明" align="center" prop="instructions">
+              <template slot-scope="scope">
+                <div style="white-space: pre-wrap;text-align: left">{{scope.row.instructions}}</div>
+              </template>
+            </el-table-column>
+            <!-- <el-table-column width="100" label="角色" align="center" prop="role">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.ehr_pm_role" :value="scope.row.role"/>
+              </template>
+            </el-table-column> -->
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="评分标准" align="center" prop="standard">
+              <template slot-scope="scope">
+                <div style="white-space: pre-wrap;text-align: left">{{scope.row.standard}}</div>
+              </template>
+            </el-table-column>
+            <el-table-column width="100" label="数据来源" align="center" prop="source" />
+            <el-table-column width="80" label="自评分" align="center" prop="selfScoring"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="自评语" align="center" prop="selfComment"/>
+            <el-table-column width="80" label="上级评分" align="center" prop="leaderScoring" v-if="flow.status != 0"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="上级评语" align="center" prop="leaderComment" v-if="flow.status != 0"/>
+            <el-table-column width="85" label="上级评分" align="center" prop="leaderScoring" :render-header="addRedStar" v-if="flow.status == 0">
+              <template slot-scope="scope">
+                <el-form-item :prop="'performanceItem.'+scope.$index+'.leaderScoring'" :rules="{required: true,message: ' ',trigger: 'blur'}">
+                  <el-input  v-model="scope.row.leaderScoring" v-only-number="{max:saMarkMax,min:0,precision:1}" size="mini"/>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="上级评语" align="center" prop="leaderComment" :render-header="addRedStar" v-if="flow.status == 0">
+              <template slot-scope="scope">
+                <el-form-item :prop="'performanceItem.'+scope.$index+'.leaderComment'" :rules="{required: true,message: ' ',trigger: 'blur'}">
+                  <el-input size="mini" type="textarea" v-model="scope.row.leaderComment"/>
+                </el-form-item>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form>
+      </div>
+    </el-card>
+
+    <el-dialog title="" :visible.sync="turnDownOpen" width="1000px" :close-on-click-modal="false" :show-close="false">
+      <el-form size="mini" label-position="right" ref="flow" :model="flow" :rules="flowRules" label-width="80px">
+        <el-form-item label="驳回原因" prop="result">
+          <el-input type="textarea" v-model="flow.result"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="btnTurnDownClose">取 消</el-button>
+        <el-button size="mini" type="primary" @click="btnTurnDownConfirm">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { getPerformance} from "@/api/business/ehr/pm/performance";
+import { getFlow} from "@/api/business/ehr/pm/flow";
+import { savePerformance,superiorevaluation} from "@/api/business/ehr/pm/pmmark";
+
+export default {
+  name: "AwaitMarkPmDetail",
+  dicts: ['ehr_pm_aspect','ehr_pm_role','ehr_pm_group'],
+  data() {
+    return {
+      //遮罩层
+      loading: true,
+      //表单
+      form:{},
+      //流程数据
+      flow:{},
+      //提交规则
+      rules:{
+        comment: [
+          { required: true, message: " ", trigger: "blur" },
+        ],
+      },
+      //流程数据规则
+      flowRules:{
+        result: [
+          { required: true, message: "驳回原因不能为空", trigger: "blur" },
+        ],
+      },
+      //是否展开
+      isUnfold:false,
+      //是否显驳回弹出层
+      turnDownOpen:false,
+    };
+  },
+  computed: {
+    //自评分最大值
+    saMarkMax: function () {
+      return this.form.staffDivide == 'C1' ? 150 : 100
+    }
+	},
+  created() {
+    console.log("this.$route.query",this.$route.query);
+    this.fetchPerformance(this.$route.query.performanceId);
+    this.fetchFlow(this.$route.query.flowId);
+  },
+  methods: {
+    //查询详情
+    async fetchPerformance(id){
+      this.loading = true;
+      await getPerformance(id).then(res => {
+        if (res.code === 200) {
+          this.form = res.data;
+          this.id = res.data.id;
+         }
+         this.loading = false;
+      })
+    },
+    //查询流程详情
+    async fetchFlow(id){
+      this.loading = true;
+      await getFlow(id).then(res => {
+        if (res.code === 200) {
+          this.flow = res.data;
+         }
+         this.loading = false;
+      })
+    },
+    //展开/收起
+    btnUnfold(){
+      this.isUnfold = !this.isUnfold;
+    },
+    //合计
+    getSummaries(param){
+      const { columns, data } = param;
+      let ldMark = 0;
+      if(this.form.ldMark){
+        ldMark = this.form.ldMark;
+      }else{
+        ldMark = data.reduce((sum, e) => sum + Number(e.leaderScoring || 0) * (Number(e.weight || 0) / 100), 0);
+        ldMark = ldMark.toFixed(1);
+      }
+      return ['合计','','',this.form.weight,'','','',this.form.saMark,'',ldMark];
+    },
+    //驳回
+    btnTurnDown(){
+      this.turnDownOpen = true;
+    },
+    //驳回取消
+    btnTurnDownClose(){
+      this.turnDownOpen = false;
+    },
+    //驳回确认
+    async btnTurnDownConfirm(){
+      this.$refs["flow"].validate(async valid => {
+        if (valid) {
+          //保存绩效数据
+          savePerformance(this.form);
+          this.loading = true;
+          this.turnDownOpen = false;
+          this.flow.status = 1;
+          //保存流程数据
+          await superiorevaluation(this.flow).then(res => {
+            if (res.code === 200) {
+              this.fetchPerformance(this.$route.query.performanceId);
+              this.fetchFlow(this.$route.query.flowId);
+              this.$modal.msgSuccess("已确认");
+            }
+            this.loading = false;
+          })
+        }
+      });
+    },
+    //评写完成
+    async btnverify(){
+      this.$refs["dataForm"].validate(async (valid, obj) => {
+        if (valid) {
+          //保存绩效数据
+          savePerformance(this.form);
+          this.loading = true;
+          this.flow.status = 2;
+          this.flow.result = "已评分";
+          //保存流程数据
+          await superiorevaluation(this.flow).then(res => {
+            if (res.code === 200) {
+              this.fetchPerformance(this.$route.query.performanceId);
+              this.fetchFlow(this.$route.query.flowId);
+              this.$modal.msgSuccess("已确认");
+            }
+            this.loading = false;
+          })
+        } else {
+          this.$modal.msgWarning("评分或评语不能为空!");
+          return false;
+        }
+      });
+    },
+    //返回
+    btnBack(){
+      this.$router.back();
+    },
+    //必选标识
+    addRedStar(h, { column }) {
+      return [
+        h('span', { style: 'color: #F56C6C' }, '*'),
+        h('span', ' ' + column.label)
+      ];
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 132 - 0
src/views/business/ehr/pm/awaitMarkPm/index.vue

@@ -0,0 +1,132 @@
+<template>
+  <div>
+    <div class="app-container">
+      <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
+        <el-row >
+          <el-col :span="18">
+            <el-form-item label="状态" prop="status">
+              <el-select
+                size="mini"
+                v-model="queryParams.status"
+                placeholder=""
+                clearable
+                @change="getList"
+              >
+                <el-option
+                  v-for="dict in dict.type.ehr_pm_status"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item style="float:right">
+              <el-button size="mini" plain @click="btnBack">返回</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <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" />
+        <el-table-column label="评估周期" align="center" prop="name" />
+        <el-table-column label="月度" align="center" prop="month" />
+        <el-table-column label="自评分" align="center" prop="saMark" />
+        <el-table-column label="状态" align="center" prop="status" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.status"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-search"
+              @click="btnPmVerify(scope.row)"
+              v-if="scope.row.status == 4"
+            >待评分</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+import { listUnMark} from "@/api/business/ehr/pm/pmmark";
+import { getInfo} from "@/api/business/ehr/pm/flow";
+
+export default {
+  name: "AwaitMarkPm",
+  dicts: ['ehr_pm_status'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 表格数据
+      listData: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        sourceId: null,
+        status: null,
+      },
+    };
+  },
+  created() {
+    this.queryParams.sourceId = this.$route.params.id;
+    this.getList();
+  },
+  methods: {
+    /** 查询绩效列表 */
+    getList() {
+      this.loading = true;
+      listUnMark(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.loading = false;
+      });
+    },
+    //待确认
+    async btnPmVerify(row){
+      let params = {
+        performanceId:row.id,
+        performanceStatus:4,
+        staff:this.$store.state.user.name,
+        status:0,
+      }
+      let res = await getInfo(params);
+      if(res.code == 200 && res.data){
+        this.$router.push({ name: 'AwaitMarkPmDetail', query: { performanceId: row.id,flowId: res.data.id } });
+      }else{
+        console.log("params",params);
+        this.$modal.msgSuccess("未找到对应流程,请联系管理员!");
+      }
+    },
+    //返回
+    btnBack(){
+      this.$router.push({name:'EvaluatePm'});
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 175 - 0
src/views/business/ehr/pm/awaitVerifyPm/detail.vue

@@ -0,0 +1,175 @@
+<template>
+  <div>
+    <el-card v-if="flow.staff == this.$store.state.user.name">
+      <div slot="header" class="clearfix">
+        <span style="font-weight:bold">绩效确认</span>
+        <div style="float: right; padding: 3px 0" type="text">
+          <el-button size="mini" plain @click="btnBack">返回</el-button>
+          <el-button size="mini" plain @click="btnTurnDown(1)" v-if="flow.status == 0">驳回</el-button>
+          <el-button size="mini" type="primary" plain @click="btnverify(2)" v-if="flow.status == 0">通过</el-button>
+        </div>
+      </div>
+      <div v-loading="loading">
+        <el-descriptions :column="6 ">
+          <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
+          <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
+          <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
+          <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
+          <el-descriptions-item label="部门" span="2">{{form.deptName}}</el-descriptions-item>
+          <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
+          <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
+          <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
+          <el-descriptions-item label="所属分组">
+            <div v-for="dict in dict.type.ehr_pm_group" v-if="form.staffDivide == dict.value">
+              <div>{{ dict.label }}</div>
+            </div>
+          </el-descriptions-item>
+        </el-descriptions>
+        <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries" border>
+          <el-table-column type="index" width="50" label="序号"/>
+          <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.ehr_pm_aspect" :value="scope.row.aspect"/>
+            </template>
+          </el-table-column>
+          <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
+          <el-table-column width="80" label="权重" align="center" prop="weight"/>
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="指标说明" align="center" prop="instructions">
+            <template slot-scope="scope">
+              <div style="white-space: pre-wrap;text-align: left">{{scope.row.instructions}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column :show-overflow-tooltip="!isUnfold" label="评分标准" align="center" prop="standard">
+            <template slot-scope="scope">
+              <div style="white-space: pre-wrap;text-align: left">{{scope.row.standard}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column width="100" label="数据来源" align="center" prop="source" />
+        </el-table>
+      </div>
+    </el-card>
+
+    <el-dialog title="" :visible.sync="turnDownOpen" width="1000px" :close-on-click-modal="false" :show-close="false">
+      <el-form size="mini" label-position="right" ref="flow" :model="flow" :rules="flowRules" label-width="80px">
+        <el-form-item label="驳回原因" prop="result">
+          <el-input type="textarea" v-model="flow.result"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="btnTurnDownClose">取 消</el-button>
+        <el-button size="mini" type="primary" @click="btnTurnDownConfirm">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { getPerformance} from "@/api/business/ehr/pm/performance";
+import { getFlow} from "@/api/business/ehr/pm/flow";
+import { verify} from "@/api/business/ehr/pm/pmverify";
+
+export default {
+  name: "AwaitVerifyPmDetail",
+  dicts: ['ehr_pm_aspect','ehr_pm_role','ehr_pm_group'],
+  data() {
+    return {
+      //遮罩层
+      loading: true,
+      //表单
+      form:{},
+      //流程数据
+      flow:{},
+      //流程数据规则
+      flowRules:{
+        result: [
+          { required: true, message: "驳回原因不能为空", trigger: "blur" },
+        ],
+      },
+      //是否展开
+      isUnfold:false,
+      //是否显驳回弹出层
+      turnDownOpen:false,
+    };
+  },
+  created() {
+    console.log("this.$route.query",this.$route.query);
+    this.fetchPerformance(this.$route.query.performanceId);
+    this.fetchFlow(this.$route.query.flowId);
+  },
+  methods: {
+    //查询详情
+    async fetchPerformance(id){
+      this.loading = true;
+      await getPerformance(id).then(res => {
+        if (res.code === 200) {
+          this.form = res.data;
+          this.id = res.data.id;
+         }
+         this.loading = false;
+      })
+    },
+    //查询流程详情
+    async fetchFlow(id){
+      this.loading = true;
+      await getFlow(id).then(res => {
+        if (res.code === 200) {
+          this.flow = res.data;
+         }
+         this.loading = false;
+      })
+    },
+    //展开/收起
+    btnUnfold(){
+      this.isUnfold = !this.isUnfold;
+    },
+    //合计
+    getSummaries(param){
+      const { columns, data } = param;
+      let val = data.reduce((sum, e) => sum + Number(e.weight || 0), 0);
+      this.weightSum = val;
+      return ['合计','','',val,'','','',this.form.saMark,'',this.form.ldMark];
+    },
+    //驳回
+    btnTurnDown(){
+      this.turnDownOpen = true;
+    },
+    //驳回取消
+    btnTurnDownClose(){
+      this.turnDownOpen = false;
+    },
+    //驳回确认
+    btnTurnDownConfirm(){
+      this.$refs["flow"].validate(valid => {
+        if (valid) {
+          this.btnverify(1);
+          this.turnDownOpen = false;
+        }
+      });
+    },
+    //绩效确认
+    async btnverify(val){
+      this.flow.status = val;
+      if(this.flow.status == 2){
+        this.flow.result = "同意";
+      }
+      await verify(this.flow).then(res => {
+        if (res.code === 200) {
+          this.fetchPerformance(this.$route.query.performanceId);
+          this.fetchFlow(this.$route.query.flowId);
+          this.$modal.msgSuccess("已确认");
+        }
+        this.loading = false;
+      })
+    },
+    //返回
+    btnBack(){
+      // this.$router.back();
+      this.$router.push({name:'AwaitVerifyPm',params: { id: this.form.sourceId}});
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 142 - 0
src/views/business/ehr/pm/awaitVerifyPm/index.vue

@@ -0,0 +1,142 @@
+<template>
+  <div>
+    <div class="app-container">
+      <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
+        <el-row >
+          <el-col :span="18">
+            <el-form-item label="状态" prop="status">
+              <el-select
+                size="mini"
+                v-model="queryParams.status"
+                placeholder=""
+                clearable
+                @change="getList"
+              >
+                <el-option
+                  v-for="dict in dict.type.ehr_pm_status"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item style="float:right">
+              <el-button size="mini" plain @click="btnBack">返回</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <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" />
+        <el-table-column label="评估周期" align="center" prop="name" />
+        <el-table-column label="月度" align="center" prop="month" />
+        <el-table-column label="状态" align="center" prop="status" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.status"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-search"
+              @click="btnPmVerify(scope.row)"
+              v-if="scope.row.status == 1"
+            >待确认</el-button>
+          </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>
+  </div>
+</template>
+
+<script>
+import { listUnVerify} from "@/api/business/ehr/pm/pmverify";
+import { getInfo} from "@/api/business/ehr/pm/flow";
+
+export default {
+  name: "AwaitVerifyPm",
+  dicts: ['ehr_pm_status'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        sourceId: null,
+        status: null,
+      },
+    };
+  },
+  created() {
+    this.queryParams.sourceId = this.$route.params.id;
+    this.getList();
+  },
+  methods: {
+    /** 查询绩效列表 */
+    getList() {
+      this.loading = true;
+      listUnVerify(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.loading = false;
+      });
+    },
+    //待确认
+    async btnPmVerify(row){
+      let params = {
+        performanceId:row.id,
+        performanceStatus:1,
+        staff:this.$store.state.user.name,
+        status:0,
+      }
+      let res = await getInfo(params);
+      if(res.code == 200 && res.data){
+        this.$router.push({ name: 'AwaitVerifyPmDetail', query: { performanceId: row.id,flowId: res.data.id } });
+      }else{
+        console.log("params",params);
+        this.$modal.msgSuccess("未找到对应流程,请联系管理员!");
+      }
+    },
+    //返回
+    btnBack(){
+      this.$router.push({name:'EvaluatePm'});
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 196 - 0
src/views/business/ehr/pm/evaluatePm/index.vue

@@ -0,0 +1,196 @@
+<template>
+  <div>
+    <div class="app-container">
+      <div style="float:right">
+        <el-badge :value="adjustCount" class="item" style="margin: 0 10px"  v-if="adjustCount> 0">
+          <el-button type="primary" size="mini" @click="btnGradeAdjust">待分数调整</el-button>
+        </el-badge>
+      </div>
+      <el-table size="mini" v-loading="loading" :data="listData" height="500px">
+        <el-table-column label="周期编号" align="center" prop="id" />
+        <el-table-column label="名称" align="center" prop="name" />
+        <el-table-column label="月份" align="center" prop="month" />
+        <el-table-column label="阶段" align="center" prop="stage" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.stage"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="待确认" align="center" prop="unVerify">
+          <template scope="scope">
+            <div v-if="scope.row.unVerify > 0" style="color:red" @click="btnEntryUnVerify(scope.row)">{{ scope.row.unVerify}}</div>
+            <div v-if="scope.row.unVerify == 0" @click="btnEntryUnVerify(scope.row)">{{ scope.row.unVerify}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="已确认" align="center" prop="verify">
+          <template scope="scope">
+            <div v-if="scope.row.verify > 0" style="color:blue" @click="btnEntryVerify(scope.row)">{{ scope.row.verify}}</div>
+            <div v-if="scope.row.verify == 0" @click="btnEntryVerify(scope.row)">{{ scope.row.verify}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="待评分" align="center" prop="unMark">
+          <template scope="scope">
+            <div v-if="scope.row.unMark > 0" style="color:red" @click="btnEntryUnMark(scope.row)">{{ scope.row.unMark}}</div>
+            <div v-if="scope.row.unMark == 0" @click="btnEntryUnMark(scope.row)">{{ scope.row.unMark}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="已评分" align="center" prop="mark">
+          <template scope="scope">
+            <div v-if="scope.row.mark > 0" style="color:blue" @click="btnEntryMark(scope.row)">{{ scope.row.mark}}</div>
+            <div v-if="scope.row.mark == 0" @click="btnEntryMark(scope.row)">{{ scope.row.mark}}</div>
+          </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="stageListOpen" width="1000px" :close-on-click-modal="false">
+      <el-table size="mini" height="500px" v-loading="stageListLoading" :data="stageList">
+        <el-table-column label="名称" align="center" prop="name" />
+        <el-table-column label="月份" align="center" prop="month" />
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-search"
+              @click="btnEntryAdjust(scope.row)"
+            >进入调整</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listEvaluate} from "@/api/business/ehr/pm/evaluate";
+import { getGradeAdjustConut,toDoList} from "@/api/business/ehr/pm/gradeadjust";
+
+export default {
+  name: "EvaluatePm",
+  dicts: ['ehr_pm_status'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // id集合
+      ids: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+      },
+      //等级调整周期列表
+      stageList:[],
+      //等级调整周期列表弹出层
+      stageListOpen:false,
+      //等级调整数量
+      adjustCount: null,
+      //等级调整周期列表遮罩层
+      stageListLoading: true,
+    };
+  },
+  async created() {
+    //查询等级调整数量
+    let res = await getGradeAdjustConut();
+    this.adjustCount = res.row;
+    this.getList();
+  },
+  methods: {
+    /** 查询行动列表 */
+    getList() {
+      this.loading = true;
+      listEvaluate(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.ids = response.rows.map(item => item.id);
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 搜索按钮操作 */
+    btnSearch() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    btnResetQuery() {
+      this.resetForm("queryForm");
+      this.btnSearch();
+    },
+    /** 刷新 */
+    refresh(){
+      this.resetForm("queryForm");
+      this.getList();
+    },
+    //等级调整
+    btnGradeAdjust(){
+      this.stageListOpen = true;
+      this.getlistStage();
+    },
+    //查询周期列表
+    getlistStage() {
+      this.stageListLoading = true;
+      toDoList().then(response => {
+        this.stageList = response.rows;
+        this.stageListLoading = false;
+      });
+    },
+    //进入调整
+    btnEntryAdjust(row){
+      this.$router.push({ name: 'AdjustGrade', query: { id: row.id,flowId: row.flowId } });
+    },
+    //进入待确认
+    btnEntryUnVerify(val) {
+      if(val.unVerify > 0){
+        this.$router.push({name:'AwaitVerifyPm',params: { id: val.id}});
+      }
+    },
+    //进入已确认
+    btnEntryVerify(val) {
+      if(val.verify > 0){
+        this.$router.push({name:'FinishVerifyPm',params: { id: val.id}});
+      }
+    },
+    //进入待评分
+    btnEntryUnMark(val) {
+      if(val.unMark > 0){
+        this.$router.push({name:'AwaitMarkPm',params: { id: val.id}});
+      }
+    },
+    //进入已评分
+    btnEntryMark(val) {
+      if(val.mark > 0){
+        this.$router.push({name:'FinishMarkPm',params: { id: val.id}});
+      }
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 56 - 0
src/views/business/ehr/pm/finishMarkPm/btnAjMarkLog.vue

@@ -0,0 +1,56 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">分数调整记录</el-button>
+    <el-dialog title="分数调整记录" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData">
+        <el-table-column label="调整分" align="center" prop="ajMark" />
+        <el-table-column label="调整原因" align="center" prop="ajCause" />
+        <el-table-column label="调整时间" align="center" prop="createTime" />
+        <el-table-column label="调整人" align="center" prop="createBy" />
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listAdjustlog} from "@/api/business/ehr/pm/adjustlog";
+export default {
+  name: "AdjustlogDialog",
+  props: ['pmId'],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 1000,
+        performanceId: null,
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  watch: {},
+  methods: {
+    //点击了当前按钮
+    click() {
+      this.queryParams.performanceId = this.pmId;
+      this.open = true;
+      this.loading = true;
+      listAdjustlog(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>

+ 67 - 0
src/views/business/ehr/pm/finishMarkPm/btnApproveLog.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">绩效审批记录</el-button>
+    <el-dialog title="绩效审批记录" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData">
+        <el-table-column label="时间" align="center" prop="createTime" />
+        <el-table-column label="阶段" align="center" prop="performanceStatus" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.performanceStatus"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="评估人" align="center" prop="staffName" />
+        <el-table-column label="状态" align="center" prop="status" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_flow_status" :value="scope.row.status"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="意见" align="center" prop="result" />
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+
+<script>
+import { listFlow} from "@/api/business/ehr/pm/flow";
+export default {
+  name: "ApproveLogDialog",
+  dicts: ['ehr_pm_status','ehr_pm_flow_status'],
+  props: ['pmId'],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 1000,
+        performanceId: null,
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  watch: {},
+  methods: {
+    //点击了当前按钮
+    click() {
+      this.queryParams.performanceId = this.pmId;
+      this.open = true;
+      this.loading = true;
+      listFlow(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>

+ 88 - 0
src/views/business/ehr/pm/finishMarkPm/btnCopyItem.vue

@@ -0,0 +1,88 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">复制指标</el-button>
+    <el-dialog title="历史绩效" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      复制操作将覆盖当前绩效明细
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData" @row-dblclick="btnCopy">
+        <el-table-column label="员工" align="center" prop="staffName" />
+        <el-table-column label="评估周期" align="center" prop="name" />
+        <el-table-column label="月度" align="center" prop="month" />
+        <el-table-column label="创建时间" align="center" prop="createTime" />
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-document-copy"
+                @click="btnCopy(scope.row)"
+              >复制</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div>
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPerformance} from "@/api/business/ehr/pm/performance";
+export default {
+  name: "CopyItemDialog",
+  props: ["id"],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        staff: null,
+        params:{
+          neId: null,
+        },
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  methods: {
+    /** 查询绩效列表 */
+    getList() {
+      this.loading = true;
+      listPerformance(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //点击了当前按钮
+    click() {
+      this.queryParams.staff = this.$store.state.user.name;
+      this.open = true;
+      this.getList();
+    },
+    //复制
+    async btnCopy(row){
+      this.$emit('setItems',row.id);
+      this.open = false;
+    },
+  },
+  created() {
+    this.queryParams.params.neId = this.id;
+  },
+};
+</script>
+

+ 186 - 0
src/views/business/ehr/pm/finishMarkPm/detail.vue

@@ -0,0 +1,186 @@
+<template>
+  <div>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <span style="font-weight:bold">绩效考核表</span>-{{form.name}}
+        <div style="float: right; padding: 3px 0; display:flex;justify-content:space-between" type="text">
+          <el-button size="mini" plain @click="btnBack">返回</el-button>
+          <ApproveLogDialog style="margin: 0 10px" :pmId="form.id"></ApproveLogDialog>
+          <AdjustlogDialog style="margin: 0 10px" :pmId="form.id"></AdjustlogDialog>
+          <el-button size="mini" plain @click="btnPreviou" v-if="ids">上一个</el-button>
+          <el-button size="mini" plain @click="btnNext" v-if="ids">下一个</el-button>
+        </div>
+      </div>
+      <div v-loading="loading">
+        <el-form size="mini" ref="dataForm" :model="form" :rules="rules">
+          <el-descriptions :column="6">
+            <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
+            <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
+            <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
+            <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
+            <el-descriptions-item label="部门" span="2">{{form.deptName}}</el-descriptions-item>
+            <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
+            <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
+            <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
+            <el-descriptions-item label="所属分组">
+              <div v-for="dict in dict.type.ehr_pm_group" v-if="form.staffDivide == dict.value">
+                <div>{{ dict.label }}</div>
+              </div>
+            </el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions :column="6 ">
+            <el-descriptions-item label="自评分">{{form.saMark}}</el-descriptions-item>
+            <el-descriptions-item label="上级评分">{{form.ldMark}}</el-descriptions-item>
+            <el-descriptions-item label="综合得分">{{form.mark}}</el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions>
+            <el-descriptions-item label="个人总结">{{form.summary}}</el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions>
+            <el-descriptions-item label="评语">{{form.comment}}</el-descriptions-item>
+          </el-descriptions>
+          <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries" border>
+            <el-table-column type="index" width="50" label="序号"/>
+            <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.ehr_pm_aspect" :value="scope.row.aspect"/>
+              </template>
+            </el-table-column>
+            <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
+            <el-table-column width="80" label="权重(%)" align="center" prop="weight"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="指标说明" align="center" prop="instructions">
+              <template slot-scope="scope">
+                <div style="white-space: pre-wrap;text-align: left">{{scope.row.instructions}}</div>
+              </template>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="评分标准" align="center" prop="standard">
+              <template slot-scope="scope">
+                <div style="white-space: pre-wrap;text-align: left">{{scope.row.standard}}</div>
+              </template>
+            </el-table-column>
+            <el-table-column width="100" label="数据来源" align="center" prop="source"/>
+            <el-table-column width="80" label="自评分" align="center" prop="selfScoring"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="自评语" align="center" prop="selfComment"/>
+            <el-table-column width="80" label="上级评分" align="center" prop="leaderScoring"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="上级评语" align="center" prop="leaderComment"/>
+          </el-table>
+        </el-form>
+      </div>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import ApproveLogDialog from './btnApproveLog.vue'
+import AdjustlogDialog from './btnAjMarkLog.vue'
+import CopyItemDialog from './btnCopyItem.vue'
+import { getPerformance,fillinFinish,selfestimate,copyItem} from "@/api/business/ehr/pm/performance";
+import { getPerformanceItem,addPerformanceItem,updatePerformanceItem,delPerformanceItem} from "@/api/business/ehr/pm/performanceitem";
+
+export default {
+  name: 'detail',
+  dicts: ['ehr_pm_aspect','ehr_pm_role','ehr_pm_group'],
+  props: ['pageStu','rowId',"ids"],
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  components: {ApproveLogDialog,AdjustlogDialog,CopyItemDialog},
+  data() {
+    return {
+      //id
+      id:null,
+      //表单
+      form:{},
+      //遮罩
+      loading: false,
+      //是否展开
+      isUnfold:false,
+      //明细权重合计值
+      weightSum: 0,
+    }
+  },
+  computed: {
+    //自评分最大值
+    saMarkMax: function () {
+      //业务组最高自评分为150;非业务组最高自评分为100;
+      return this.form.staffDivide == 'C1' ? 150 : 100
+    },
+	},
+  async created() {
+    this.id = this.rowId;
+    this.fetchPerformance(this.id);
+    if(this.pageStu == 'add'){
+    }
+    if(this.pageStu == 'edit' || this.pageStu == 'see') {
+    }
+  },
+  watch: {
+  },
+  methods: {
+    //返回
+    btnBack(){
+      this.$emit('jugislist', true)
+      this.$emit('refresh')
+    },
+    //查询详情
+    async fetchPerformance(id){
+      this.loading = true;
+      await getPerformance(id).then(res => {
+        if (res.code === 200) {
+          this.form = res.data;
+          this.id = res.data.id;
+         }
+         this.loading = false;
+      })
+    },
+    //上一个
+    btnPreviou(){
+      let i = this.ids.indexOf(this.id) - 1;
+      if(i > -1){
+        let id = this.ids[i];
+        this.fetchPerformance(id);
+      }else{
+        this.$modal.msgSuccess("已经是当前页第一条了!");
+      }
+    },
+    //下一个
+    btnNext(){
+      let i = this.ids.indexOf(this.id) + 1;
+      if(i < this.ids.length){
+        let id = this.ids[i];
+        this.fetchPerformance(id);
+      }else{
+        this.$modal.msgSuccess("已经是当前页最后一条了!");
+      }
+      
+    },
+    //合计
+    getSummaries(param){
+      const { columns, data } = param;
+      let weight = data.reduce((sum, e) => sum + Number(e.weight || 0), 0);
+      this.weightSum = weight;
+      let selfScoring = 0;
+      if(this.form.saMark){
+        selfScoring = this.form.saMark;
+      }else{
+        selfScoring = data.reduce((sum, e) => sum + Number(e.selfScoring || 0) * (Number(e.weight || 0) / 100), 0);
+        selfScoring = selfScoring.toFixed(1);
+      }
+      return ['合计','','',weight,'','','',selfScoring,'',this.form.ldMark];
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+.btn_group {
+  z-index: 500;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 146 - 0
src/views/business/ehr/pm/finishMarkPm/index.vue

@@ -0,0 +1,146 @@
+<template>
+  <div>
+    <div class="app-container" v-if="isList">
+      <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
+        <el-row >
+          <el-col :span="18">
+            <el-form-item label="状态" prop="status">
+              <el-select
+                size="mini"
+                v-model="queryParams.status"
+                placeholder=""
+                clearable
+                @change="getList"
+              >
+                <el-option
+                  v-for="dict in dict.type.ehr_pm_status"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item style="float:right">
+              <el-button size="mini" plain @click="btnBack">返回</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData" @row-dblclick="btnDetails">
+        <el-table-column label="绩效编号" align="center" prop="id" />
+        <el-table-column label="员工姓名" align="center" prop="staffName" />
+        <el-table-column show-overflow-tooltip label="评估周期" align="center" prop="name" />
+        <el-table-column label="月度" align="center" prop="month" />
+        <el-table-column label="自评分" align="center" prop="saMark" />
+        <el-table-column label="上级评分" align="center" prop="ldMark" />
+        <el-table-column label="综合得分" align="center" prop="mark" />
+        <el-table-column label="等级" align="center" prop="grade" />
+        <el-table-column label="绩效系数" align="center" prop="coefficient" />
+        <el-table-column label="状态" align="center" prop="status" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.status"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-search"
+              @click="btnDetails(scope.row)"
+            >详情</el-button>
+          </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>
+    <detail v-model="isList" v-if="!isList" :pageStu="page" :rowId="rowId" :ids="ids" @refresh="refresh" />
+  </div>
+</template>
+
+<script>
+import detail from './detail.vue'
+import { listMark} from "@/api/business/ehr/pm/pmmark";
+
+export default {
+  name: "FinishMarkPm",
+  dicts: ['ehr_pm_status'],
+  components: {detail},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // id集合
+      ids: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        sourceId: null,
+        status: null,
+      },
+      //页面显示
+      isList: true,
+      //页面状态
+      page: '',
+    };
+  },
+  async created() {
+    this.queryParams.sourceId = this.$route.params.id;
+    this.getList();
+  },
+  methods: {
+    /** 查询绩效列表 */
+    getList() {
+      this.loading = true;
+      listMark(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.ids = response.rows.map(item => item.id);
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 进入详情 */
+    btnDetails(row){
+      this.rowId = row.id;
+      this.page = 'add';
+      this.isList = false;
+    },
+    //返回
+    btnBack(){
+      this.$router.push({name:'EvaluatePm'});
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 56 - 0
src/views/business/ehr/pm/finishVerifyPm/btnAjMarkLog.vue

@@ -0,0 +1,56 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">分数调整记录</el-button>
+    <el-dialog title="分数调整记录" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData">
+        <el-table-column label="调整分" align="center" prop="ajMark" />
+        <el-table-column label="调整原因" align="center" prop="ajCause" />
+        <el-table-column label="调整时间" align="center" prop="createTime" />
+        <el-table-column label="调整人" align="center" prop="createBy" />
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listAdjustlog} from "@/api/business/ehr/pm/adjustlog";
+export default {
+  name: "AdjustlogDialog",
+  props: ['pmId'],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 1000,
+        performanceId: null,
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  watch: {},
+  methods: {
+    //点击了当前按钮
+    click() {
+      this.queryParams.performanceId = this.pmId;
+      this.open = true;
+      this.loading = true;
+      listAdjustlog(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>

+ 67 - 0
src/views/business/ehr/pm/finishVerifyPm/btnApproveLog.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">绩效审批记录</el-button>
+    <el-dialog title="绩效审批记录" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData">
+        <el-table-column label="时间" align="center" prop="createTime" />
+        <el-table-column label="阶段" align="center" prop="performanceStatus" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.performanceStatus"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="评估人" align="center" prop="staffName" />
+        <el-table-column label="状态" align="center" prop="status" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_flow_status" :value="scope.row.status"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="意见" align="center" prop="result" />
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+
+<script>
+import { listFlow} from "@/api/business/ehr/pm/flow";
+export default {
+  name: "ApproveLogDialog",
+  dicts: ['ehr_pm_status','ehr_pm_flow_status'],
+  props: ['pmId'],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 1000,
+        performanceId: null,
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  watch: {},
+  methods: {
+    //点击了当前按钮
+    click() {
+      this.queryParams.performanceId = this.pmId;
+      this.open = true;
+      this.loading = true;
+      listFlow(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>

+ 88 - 0
src/views/business/ehr/pm/finishVerifyPm/btnCopyItem.vue

@@ -0,0 +1,88 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">复制指标</el-button>
+    <el-dialog title="历史绩效" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      复制操作将覆盖当前绩效明细
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData" @row-dblclick="btnCopy">
+        <el-table-column label="员工" align="center" prop="staffName" />
+        <el-table-column label="评估周期" align="center" prop="name" />
+        <el-table-column label="月度" align="center" prop="month" />
+        <el-table-column label="创建时间" align="center" prop="createTime" />
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-document-copy"
+                @click="btnCopy(scope.row)"
+              >复制</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div>
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPerformance} from "@/api/business/ehr/pm/performance";
+export default {
+  name: "CopyItemDialog",
+  props: ["id"],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        staff: null,
+        params:{
+          neId: null,
+        },
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  methods: {
+    /** 查询绩效列表 */
+    getList() {
+      this.loading = true;
+      listPerformance(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //点击了当前按钮
+    click() {
+      this.queryParams.staff = this.$store.state.user.name;
+      this.open = true;
+      this.getList();
+    },
+    //复制
+    async btnCopy(row){
+      this.$emit('setItems',row.id);
+      this.open = false;
+    },
+  },
+  created() {
+    this.queryParams.params.neId = this.id;
+  },
+};
+</script>
+

+ 170 - 0
src/views/business/ehr/pm/finishVerifyPm/detail.vue

@@ -0,0 +1,170 @@
+<template>
+  <div>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <span style="font-weight:bold">绩效考核表</span>-{{form.name}}
+        <div style="float: right; padding: 3px 0; display:flex;justify-content:space-between" type="text">
+          <el-button size="mini" plain @click="btnBack">返回</el-button>
+          <ApproveLogDialog style="margin: 0 10px" :pmId="form.id"></ApproveLogDialog>
+          <el-button size="mini" plain @click="btnPreviou" v-if="ids">上一个</el-button>
+          <el-button size="mini" plain @click="btnNext" v-if="ids">下一个</el-button>
+        </div>
+      </div>
+      <div v-loading="loading">
+        <el-form size="mini" ref="dataForm" :model="form" :rules="rules">
+          <el-descriptions :column="6">
+            <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
+            <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
+            <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
+            <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
+            <el-descriptions-item label="部门" span="2">{{form.deptName}}</el-descriptions-item>
+            <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
+            <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
+            <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
+            <el-descriptions-item label="所属分组">
+              <div v-for="dict in dict.type.ehr_pm_group" v-if="form.staffDivide == dict.value">
+                <div>{{ dict.label }}</div>
+              </div>
+            </el-descriptions-item>
+          </el-descriptions>
+          <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries" border>
+            <el-table-column type="index" width="50" label="序号"/>
+            <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.ehr_pm_aspect" :value="scope.row.aspect"/>
+              </template>
+            </el-table-column>
+            <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
+            <el-table-column width="80" label="权重(%)" align="center" prop="weight"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="指标说明" align="center" prop="instructions">
+              <template slot-scope="scope">
+                <div style="white-space: pre-wrap;text-align: left">{{scope.row.instructions}}</div>
+              </template>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="评分标准" align="center" prop="standard">
+              <template slot-scope="scope">
+                <div style="white-space: pre-wrap;text-align: left">{{scope.row.standard}}</div>
+              </template>
+            </el-table-column>
+            <el-table-column width="100" label="数据来源" align="center" prop="source" />
+          </el-table>
+        </el-form>
+      </div>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import ApproveLogDialog from './btnApproveLog.vue'
+import AdjustlogDialog from './btnAjMarkLog.vue'
+import CopyItemDialog from './btnCopyItem.vue'
+import { getPerformance,fillinFinish,selfestimate,copyItem} from "@/api/business/ehr/pm/performance";
+import { getPerformanceItem,addPerformanceItem,updatePerformanceItem,delPerformanceItem} from "@/api/business/ehr/pm/performanceitem";
+
+export default {
+  name: 'detail',
+  dicts: ['ehr_pm_aspect','ehr_pm_role','ehr_pm_group'],
+  props: ['pageStu','rowId',"ids"],
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  components: {ApproveLogDialog,AdjustlogDialog,CopyItemDialog},
+  data() {
+    return {
+      //id
+      id:null,
+      //表单
+      form:{},
+      //遮罩
+      loading: false,
+      //是否展开
+      isUnfold:false,
+      //明细权重合计值
+      weightSum: 0,
+    }
+  },
+  computed: {
+    //自评分最大值
+    saMarkMax: function () {
+      //业务组最高自评分为150;非业务组最高自评分为100;
+      return this.form.staffDivide == 'C1' ? 150 : 100
+    },
+	},
+  async created() {
+    this.id = this.rowId;
+    this.fetchPerformance(this.id);
+    if(this.pageStu == 'add'){
+    }
+    if(this.pageStu == 'edit' || this.pageStu == 'see') {
+    }
+  },
+  watch: {
+  },
+  methods: {
+    //返回
+    btnBack(){
+      this.$emit('jugislist', true)
+      this.$emit('refresh')
+    },
+    //查询详情
+    async fetchPerformance(id){
+      this.loading = true;
+      await getPerformance(id).then(res => {
+        if (res.code === 200) {
+          this.form = res.data;
+          this.id = res.data.id;
+         }
+         this.loading = false;
+      })
+    },
+    //上一个
+    btnPreviou(){
+      let i = this.ids.indexOf(this.id) - 1;
+      if(i > -1){
+        let id = this.ids[i];
+        this.fetchPerformance(id);
+      }else{
+        this.$modal.msgSuccess("已经是当前页第一条了!");
+      }
+    },
+    //下一个
+    btnNext(){
+      let i = this.ids.indexOf(this.id) + 1;
+      if(i < this.ids.length){
+        let id = this.ids[i];
+        this.fetchPerformance(id);
+      }else{
+        this.$modal.msgSuccess("已经是当前页最后一条了!");
+      }
+      
+    },
+    //合计
+    getSummaries(param){
+      const { columns, data } = param;
+      let weight = data.reduce((sum, e) => sum + Number(e.weight || 0), 0);
+      this.weightSum = weight;
+      let selfScoring = 0;
+      if(this.form.saMark){
+        selfScoring = this.form.saMark;
+      }else{
+        selfScoring = data.reduce((sum, e) => sum + Number(e.selfScoring || 0) * (Number(e.weight || 0) / 100), 0);
+        selfScoring = selfScoring.toFixed(1);
+      }
+      return ['合计','','',weight,'','','',selfScoring,'',this.form.ldMark];
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+.btn_group {
+  z-index: 500;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 141 - 0
src/views/business/ehr/pm/finishVerifyPm/index.vue

@@ -0,0 +1,141 @@
+<template>
+  <div>
+    <div class="app-container" v-if="isList">
+      <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
+        <el-row >
+          <el-col :span="18">
+            <el-form-item label="状态" prop="status">
+              <el-select
+                size="mini"
+                v-model="queryParams.status"
+                placeholder=""
+                clearable
+                @change="getList"
+              >
+                <el-option
+                  v-for="dict in dict.type.ehr_pm_status"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item style="float:right">
+              <el-button size="mini" plain @click="btnBack">返回</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData" @row-dblclick="btnDetails">
+        <el-table-column label="绩效编号" align="center" prop="id" />
+        <el-table-column label="员工姓名" align="center" prop="staffName" />
+        <el-table-column show-overflow-tooltip label="评估周期" align="center" prop="name" />
+        <el-table-column label="月度" align="center" prop="month" />
+        <el-table-column label="状态" align="center" prop="status" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.status"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-search"
+              @click="btnDetails(scope.row)"
+            >详情</el-button>
+          </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>
+    <detail v-model="isList" v-if="!isList" :pageStu="page" :rowId="rowId" :ids="ids" @refresh="refresh" />
+  </div>
+</template>
+
+<script>
+import detail from './detail.vue'
+import { listVerify} from "@/api/business/ehr/pm/pmverify";
+
+export default {
+  name: "FinishVerifyPm",
+  dicts: ['ehr_pm_status'],
+  components: {detail},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // id集合
+      ids: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        sourceId: null,
+        status: null,
+      },
+      //页面显示
+      isList: true,
+      //页面状态
+      page: '',
+    };
+  },
+  async created() {
+    this.queryParams.sourceId = this.$route.params.id;
+    this.getList();
+  },
+  methods: {
+    /** 查询绩效列表 */
+    getList() {
+      this.loading = true;
+      listVerify(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.ids = response.rows.map(item => item.id);
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 进入详情 */
+    btnDetails(row){
+      this.rowId = row.id;
+      this.page = 'add';
+      this.isList = false;
+    },
+    //返回
+    btnBack(){
+      this.$router.push({name:'EvaluatePm'});
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 56 - 0
src/views/business/ehr/pm/juniorPm/btnAjMarkLog.vue

@@ -0,0 +1,56 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">分数调整记录</el-button>
+    <el-dialog title="分数调整记录" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData">
+        <el-table-column label="调整分" align="center" prop="ajMark" />
+        <el-table-column label="调整原因" align="center" prop="ajCause" />
+        <el-table-column label="调整时间" align="center" prop="createTime" />
+        <el-table-column label="调整人" align="center" prop="createBy" />
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listAdjustlog} from "@/api/business/ehr/pm/adjustlog";
+export default {
+  name: "AdjustlogDialog",
+  props: ['pmId'],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 1000,
+        performanceId: null,
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  watch: {},
+  methods: {
+    //点击了当前按钮
+    click() {
+      this.queryParams.performanceId = this.pmId;
+      this.open = true;
+      this.loading = true;
+      listAdjustlog(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>

+ 67 - 0
src/views/business/ehr/pm/juniorPm/btnApproveLog.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">绩效审批记录</el-button>
+    <el-dialog title="绩效审批记录" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData">
+        <el-table-column label="时间" align="center" prop="createTime" />
+        <el-table-column label="阶段" align="center" prop="performanceStatus" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.performanceStatus"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="评估人" align="center" prop="staffName" />
+        <el-table-column label="状态" align="center" prop="status" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_flow_status" :value="scope.row.status"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="意见" align="center" prop="result" />
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+
+<script>
+import { listFlow} from "@/api/business/ehr/pm/flow";
+export default {
+  name: "ApproveLogDialog",
+  dicts: ['ehr_pm_status','ehr_pm_flow_status'],
+  props: ['pmId'],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 1000,
+        performanceId: null,
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  watch: {},
+  methods: {
+    //点击了当前按钮
+    click() {
+      this.queryParams.performanceId = this.pmId;
+      this.open = true;
+      this.loading = true;
+      listFlow(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>

+ 88 - 0
src/views/business/ehr/pm/juniorPm/btnCopyItem.vue

@@ -0,0 +1,88 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">复制指标</el-button>
+    <el-dialog title="历史绩效" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      复制操作将覆盖当前绩效明细
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData" @row-dblclick="btnCopy">
+        <el-table-column label="员工" align="center" prop="staffName" />
+        <el-table-column label="评估周期" align="center" prop="name" />
+        <el-table-column label="月度" align="center" prop="month" />
+        <el-table-column label="创建时间" align="center" prop="createTime" />
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-document-copy"
+                @click="btnCopy(scope.row)"
+              >复制</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div>
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPerformance} from "@/api/business/ehr/pm/performance";
+export default {
+  name: "CopyItemDialog",
+  props: ["id"],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        staff: null,
+        params:{
+          neId: null,
+        },
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  methods: {
+    /** 查询绩效列表 */
+    getList() {
+      this.loading = true;
+      listPerformance(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //点击了当前按钮
+    click() {
+      this.queryParams.staff = this.$store.state.user.name;
+      this.open = true;
+      this.getList();
+    },
+    //复制
+    async btnCopy(row){
+      this.$emit('setItems',row.id);
+      this.open = false;
+    },
+  },
+  created() {
+    this.queryParams.params.neId = this.id;
+  },
+};
+</script>
+

+ 445 - 0
src/views/business/ehr/pm/juniorPm/detail.vue

@@ -0,0 +1,445 @@
+<template>
+  <div>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <span style="font-weight:bold">绩效考核表</span>-{{form.name}}
+        <div style="float: right; padding: 3px 0; display:flex;justify-content:space-between" type="text">
+          <el-button size="mini" plain @click="btnBack">返回</el-button>
+          <el-button type="primary" size="mini" @click="btnSubmit" :loading="loading" v-if="this.$store.state.user.name == form.staff && (form.status == '0' || form.status == '3')">提交</el-button>
+          <CopyItemDialog style="margin: 0 10px" @setItems="setItems" v-if="this.$store.state.user.name == form.staff && form.status == '0'" :id="rowId"></CopyItemDialog>
+          <ApproveLogDialog style="margin: 0 10px" :pmId="form.id"></ApproveLogDialog>
+          <AdjustlogDialog style="margin: 0 10px" :pmId="form.id"></AdjustlogDialog>
+          <el-button size="mini" plain @click="btnPreviou" v-if="ids">上一个</el-button>
+          <el-button size="mini" plain @click="btnNext" v-if="ids">下一个</el-button>
+        </div>
+      </div>
+      <div v-loading="loading">
+        <el-form size="mini" ref="dataForm" :model="form" :rules="rules">
+          <el-descriptions :column="6">
+            <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
+            <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
+            <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
+            <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
+            <el-descriptions-item label="部门" span="2">{{form.deptName}}</el-descriptions-item>
+            <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
+            <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
+            <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
+            <el-descriptions-item label="所属分组">
+              <div v-for="dict in dict.type.ehr_pm_group" v-if="form.staffDivide == dict.value">
+                <div>{{ dict.label }}</div>
+              </div>
+            </el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions :column="6 ">
+            <el-descriptions-item label="自评分" v-if="form.status > 3">{{form.saMark}}</el-descriptions-item>
+            <el-descriptions-item label="上级评分" v-if="form.status > 4">{{form.ldMark}}</el-descriptions-item>
+            <el-descriptions-item label="综合得分" v-if="form.status > 4">{{form.mark}}</el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions v-if="form.status > 3">
+            <el-descriptions-item label="个人总结">{{form.summary}}</el-descriptions-item>
+          </el-descriptions>
+          <div v-if="this.$store.state.user.name == form.staff && form.status == '3'">
+            <el-form-item label="个人总结" prop="summary">
+              <el-input type="textarea" placeholder="总结本月工作的亮点和暗点" v-model="form.summary"></el-input>
+            </el-form-item>
+          </div>
+          <el-descriptions v-if="form.status > 4">
+            <el-descriptions-item label="评语">{{form.comment}}</el-descriptions-item>
+          </el-descriptions>
+          <div style="float:right">
+            <el-button type="primary" size="mini" @click="btnAddRow" v-if="this.$store.state.user.name == form.staff && form.status == '0'">增加指标</el-button>
+            <!-- <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button> -->
+          </div>
+          <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries" border>
+            <el-table-column type="index" width="50" label="序号"/>
+            <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.ehr_pm_aspect" :value="scope.row.aspect"/>
+              </template>
+            </el-table-column>
+            <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
+            <el-table-column width="80" label="权重(%)" align="center" prop="weight"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="指标说明" align="center" prop="instructions">
+              <template slot-scope="scope">
+                <div style="white-space: pre-wrap;text-align: left">{{scope.row.instructions}}</div>
+              </template>
+            </el-table-column>
+            <!-- <el-table-column width="100" label="角色" align="center" prop="role">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.ehr_pm_role" :value="scope.row.role"/>
+              </template>
+            </el-table-column> -->
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="评分标准" align="center" prop="standard">
+              <template slot-scope="scope">
+                <div style="white-space: pre-wrap;text-align: left">{{scope.row.standard}}</div>
+              </template>
+            </el-table-column>
+            <el-table-column width="100" label="数据来源" align="center" prop="source" />
+
+            <el-table-column width="80" label="自评分" align="center" prop="selfScoring" v-if="form.status > 3"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="自评语" align="center" prop="selfComment" v-if="form.status > 3"/>
+              
+            <el-table-column width="80" label="自评分" align="center" prop="selfScoring" :render-header="addRedStar" v-if="this.$store.state.user.name == form.staff && form.status == '3'">
+              <template slot-scope="scope">
+                <el-form-item :prop="'performanceItem.'+scope.$index+'.selfScoring'" :rules="{required: true,message: ' ',trigger: 'blur'}">
+                  <el-input  v-model="scope.row.selfScoring" v-only-number="{max:saMarkMax,min:0,precision:1}" size="mini"/>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="自评语" align="center" prop="selfComment" :render-header="addRedStar" v-if="this.$store.state.user.name == form.staff && form.status == '3'">
+              <template slot-scope="scope">
+                <el-form-item :prop="'performanceItem.'+scope.$index+'.selfComment'" :rules="{required: true,message: ' ',trigger: 'blur'}">
+                  <el-input size="mini" type="textarea" :rows="3" v-model="scope.row.selfComment"></el-input>
+                </el-form-item>
+              </template>
+            </el-table-column>
+
+            <el-table-column width="80" label="上级评分" align="center" prop="leaderScoring" v-if="form.status > 4"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="上级评语" align="center" prop="leaderComment" v-if="form.status > 4"/>
+            <!-- <el-table-column width="80" label="加权得分" align="center" prop="weightedScore" v-if="form.status > 4"/> -->
+          
+            <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" v-if="this.$store.state.user.name == form.staff && form.status == '0'">
+              <template slot-scope="scope">
+                <el-button size="mini" type="text" @click="btnEdit(scope.row)">修改</el-button>
+                <el-button size="mini" type="text" @click="btnDelete(scope.row)">删行</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form>
+      </div>
+    </el-card>
+    
+    <el-dialog title="指标明细" :visible.sync="rowDataOpen" width="1000px" :close-on-click-modal="false" :show-close="false">
+      <el-form size="mini" label-position="right" ref="rowDataForm" :model="rowData" :rules="rowRules" label-width="80px">
+        <el-form-item label="评估方面" prop="aspect">
+          <el-select v-model="rowData.aspect" >
+            <el-option
+              v-for="dict in dict.type.ehr_pm_aspect"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="评估指标" prop="target">
+          <el-input v-model="rowData.target"></el-input>
+        </el-form-item>
+        <el-form-item label="加/减分项" prop="asItem">
+          <el-checkbox v-model="rowData.asItem" @change="handleCheckedChange"></el-checkbox>
+        </el-form-item>
+        <el-form-item label="权重(%)" prop="weight" v-if="!rowData.asItem">
+          <el-input  v-model.number="rowData.weight" v-only-number="{max:100,min:0,precision:0}" size="mini">
+            <i slot="suffix" style="color: #000;font-style:normal;margin-right: 10px;">%</i>
+          </el-input>
+        </el-form-item>
+        <el-form-item label="指标说明" prop="instructions">
+          <el-input type="textarea" v-model="rowData.instructions" :rows="5"></el-input>
+        </el-form-item>
+        <!-- <el-form-item label="角色" prop="role">
+          <el-select v-model="rowData.role" >
+            <el-option
+              v-for="dict in dict.type.ehr_pm_role"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item> -->
+        <el-form-item label="评分标准" prop="standard">
+          <el-input type="textarea" v-model="rowData.standard" :rows="5"></el-input>
+        </el-form-item>
+        <el-form-item label="数据来源" prop="source">
+          <el-input v-model="rowData.source"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="btnRowClose">取 消</el-button>
+        <el-button size="mini" type="primary" @click="btnRowConfirm">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import ApproveLogDialog from './btnApproveLog.vue'
+import AdjustlogDialog from './btnAjMarkLog.vue'
+import CopyItemDialog from './btnCopyItem.vue'
+import { getPerformance,fillinFinish,selfestimate,copyItem} from "@/api/business/ehr/pm/performance";
+import { getPerformanceItem,addPerformanceItem,updatePerformanceItem,delPerformanceItem} from "@/api/business/ehr/pm/performanceitem";
+
+export default {
+  name: 'detail',
+  dicts: ['ehr_pm_aspect','ehr_pm_role','ehr_pm_group'],
+  props: ['pageStu','rowId',"ids"],
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  components: {ApproveLogDialog,AdjustlogDialog,CopyItemDialog},
+  data() {
+    return {
+      //id
+      id:null,
+      //表单
+      form:{},
+      //提交规则
+      rules:{
+        summary: [
+          { required: true, message: " ", trigger: "blur" },
+        ],
+      },
+      //遮罩
+      loading: false,
+      //单行明细
+      rowData:{},
+      //是否显示行明细弹出层
+      rowDataOpen:false,
+      //当行明细校验规则
+      rowRules:{
+        aspect: [
+          { required: true, message: "评估方面不能为空", trigger: "blur" },
+        ],
+        target: [
+          { required: true, message: "评估指标不能为空", trigger: "blur" },
+        ],
+        instructions: [
+          { required: true, message: "评估说明不能为空", trigger: "blur" },
+        ],
+        role: [
+          { required: true, message: "角色不能为空", trigger: "blur" },
+        ],
+        weight: [
+          { required: true, message: "权重不能为空", trigger: "blur" },
+        ],
+        standard: [
+          { required: true, message: "绩效标准不能为空", trigger: "blur" },
+        ],
+        source: [
+          { required: true, message: "数据来源不能为空", trigger: "blur" },
+        ],
+      },
+      //是否展开
+      isUnfold:false,
+      //明细权重合计值
+      weightSum: 0,
+    }
+  },
+  computed: {
+    //自评分最大值
+    saMarkMax: function () {
+      //业务组最高自评分为150;非业务组最高自评分为100;
+      return this.form.staffDivide == 'C1' ? 150 : 100
+    },
+	},
+  async created() {
+    this.id = this.rowId;
+    this.fetchPerformance(this.id);
+    if(this.pageStu == 'add'){
+    }
+    if(this.pageStu == 'edit' || this.pageStu == 'see') {
+    }
+  },
+  watch: {
+  },
+  methods: {
+    //返回
+    btnBack(){
+      this.$emit('jugislist', true)
+      this.$emit('refresh')
+    },
+    //查询详情
+    async fetchPerformance(id){
+      this.loading = true;
+      await getPerformance(id).then(res => {
+        if (res.code === 200) {
+          this.form = res.data;
+          this.id = res.data.id;
+         }
+         this.loading = false;
+      })
+    },
+    //增行
+    btnAddRow(){
+      this.rowData = {};
+      this.rowData.assessId = this.form.id;
+      this.rowDataOpen = true;
+    },
+    //修改
+    async btnEdit(row){
+      this.rowData = {};
+      await getPerformanceItem(row.id).then(res => {
+        if (res.code === 200) {
+          this.rowData = res.data
+          this.rowDataOpen = true;
+         }
+      })
+    },
+    //删行
+    btnDelete(row){
+      this.$modal.confirm('是否确认删除第"' + row.aspect + '"行数据?').then(function() {
+        return delPerformanceItem(row.id);
+      }).then(() => {
+        this.fetchPerformance(this.id);
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    //单行明细取消
+    btnRowClose(){
+      this.rowData = {};
+      this.rowDataOpen = false;
+    },
+    //单行明细确认
+    btnRowConfirm(){
+      if(this.form.staffDivide == 'C1' && this.rowData.aspect == 0 && this.rowData.weight < 80){
+        this.$modal.msgSuccess("业务组的业绩考核权重不能低于80!");
+        return;
+      }
+      let sum = 100;
+      if(this.rowData.id){
+        let arr = this.form.performanceItem.filter(ele => ele.id != this.rowData.id);
+        sum = arr.reduce((sum, e) => sum + Number(e.weight || 0), 0);
+      }else{
+        sum = this.form.performanceItem.reduce((sum, e) => sum + Number(e.weight || 0), 0);
+      }
+      console.log("sum",sum);
+      console.log("sum + this.rowData.weight",sum + this.rowData.weight);
+      if(sum + this.rowData.weight > 100){
+        this.$modal.msgSuccess("总权重超过100,剩余权重比为" + (100 - sum));
+        return;
+      }
+      this.$refs["rowDataForm"].validate(valid => {
+        if (valid) {
+          if (this.rowData.id != undefined) {
+            updatePerformanceItem(this.rowData).then(response => {
+              this.$modal.msgSuccess("保存成功");
+              this.rowDataOpen = false;
+              this.fetchPerformance(this.id);
+            });
+          } else {
+            addPerformanceItem(this.rowData).then(response => {
+              this.$modal.msgSuccess("保存成功");
+              this.rowDataOpen = false;
+              this.fetchPerformance(this.id);
+            });
+          }
+        }
+      });
+    },
+    //展开/收起
+    btnUnfold(){
+      this.isUnfold = !this.isUnfold;
+    },
+    //上一个
+    btnPreviou(){
+      let i = this.ids.indexOf(this.id) - 1;
+      if(i > -1){
+        let id = this.ids[i];
+        this.fetchPerformance(id);
+      }else{
+        this.$modal.msgSuccess("已经是当前页第一条了!");
+      }
+    },
+    //下一个
+    btnNext(){
+      let i = this.ids.indexOf(this.id) + 1;
+      if(i < this.ids.length){
+        let id = this.ids[i];
+        this.fetchPerformance(id);
+      }else{
+        this.$modal.msgSuccess("已经是当前页最后一条了!");
+      }
+      
+    },
+    //合计
+    getSummaries(param){
+      const { columns, data } = param;
+      let weight = data.reduce((sum, e) => sum + Number(e.weight || 0), 0);
+      this.weightSum = weight;
+      let selfScoring = 0;
+      if(this.form.saMark){
+        selfScoring = this.form.saMark;
+      }else{
+        selfScoring = data.reduce((sum, e) => sum + Number(e.selfScoring || 0) * (Number(e.weight || 0) / 100), 0);
+        selfScoring = selfScoring.toFixed(1);
+      }
+      return ['合计','','',weight,'','','',selfScoring,'',this.form.ldMark];
+    },
+    //提交
+    btnSubmit(){
+      if(this.form.status == '0'){
+        if(this.weightSum != 100){
+          this.$modal.msgWarning("权重不为100%无法提交!");
+          return;
+        }
+        let that = this;
+        this.$modal.confirm('确认提交吗?').then(async function() {
+          that.loading = true;
+          return await fillinFinish(that.form);
+        }).then(() => {
+          that.fetchPerformance(that.id);
+          that.$modal.msgSuccess("提交成功");
+          that.loading = false;
+        }).catch(() => {
+          that.loading = false;
+        });
+      }
+      if(this.form.status == '3'){
+        this.$refs["dataForm"].validate(async valid => {
+          if (valid) {
+            let that = this;
+              this.$modal.confirm('确认提交吗?').then(async function() {
+                that.loading = true;
+                return await selfestimate(that.form);
+              }).then(() => {
+                that.fetchPerformance(that.id);
+                that.$modal.msgSuccess("提交成功");
+                that.loading = false;
+              }).catch(() => {
+                that.loading = false;
+              });
+          }else{
+            this.$modal.msgWarning("评分或评语不能为空!");
+            return false;
+          }
+        });
+      }
+    },
+    //设置明细
+    async setItems(cId){
+      let params = {
+        id : this.id,
+        cId : cId
+      }
+      let res = await copyItem(params);
+      if("200" == res.code){
+        this.$modal.msgSuccess("复制成功");
+        this.fetchPerformance(this.id);
+      }
+    },
+    //选择加减分项后
+    handleCheckedChange(value){
+      this.rowData.weight = 0;
+    },
+    //必选标识
+    addRedStar(h, { column }) {
+      return [
+        h('span', { style: 'color: #F56C6C' }, '*'),
+        h('span', ' ' + column.label)
+      ];
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+.btn_group {
+  z-index: 500;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 371 - 0
src/views/business/ehr/pm/juniorPm/index.vue

@@ -0,0 +1,371 @@
+<template>
+  <div>
+    <div class="app-container" v-if="isList">
+      <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
+        <el-row >
+          <el-col :span="18">
+            <el-form-item label="部门">
+              <el-cascader
+                v-model="treeValue"
+                :options="deptTree"
+                :props="{ checkStrictly: true }"
+                ref="cascaderHandle"
+                clearable
+                @change="handleChange"
+                placeholder=""
+                >
+              </el-cascader>
+            </el-form-item>
+            <el-form-item label="员工">
+              <el-input
+                v-model="queryParams.params.staffCodeOrName"
+                clearable
+                @keyup.enter.native="btnSearch"
+              />
+            </el-form-item>
+            <el-form-item label="状态" prop="status">
+              <el-select
+                size="mini"
+                v-model="queryParams.status"
+                placeholder=""
+                clearable
+              >
+                <el-option
+                  v-for="dict in dict.type.ehr_pm_status"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="月份" prop="month">
+              <el-date-picker type="month" value-format="yyyy-MM" v-model="queryParams.month">
+              </el-date-picker>
+            </el-form-item>
+            <el-form-item label="评估人" prop="evaluatorName">
+              <el-input
+                v-model="queryParams.evaluatorName"
+                clearable
+                @keyup.enter.native="btnSearch"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item style="float:right">
+              <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-col>
+        </el-row>
+      </el-form>
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData" @row-dblclick="btnDetails">
+        <el-table-column label="绩效编号" align="center" prop="id" />
+        <el-table-column label="员工姓名" align="center" prop="staffName" />
+        <el-table-column show-overflow-tooltip label="评估周期" align="center" prop="name" />
+        <el-table-column label="月度" align="center" prop="month" />
+        <el-table-column label="自评分" align="center" prop="saMark" />
+        <el-table-column label="上级评分" align="center" prop="ldMark" />
+        <el-table-column label="综合得分" align="center" prop="mark" />
+        <el-table-column label="等级" align="center" prop="grade" />
+        <el-table-column label="绩效系数" align="center" prop="coefficient" />
+        <el-table-column label="状态" align="center" prop="status" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.status"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-search"
+              @click="btnDetails(scope.row)"
+            >详情</el-button>
+          </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>
+    <detail v-model="isList" v-if="!isList" :pageStu="page" :rowId="rowId" :ids="ids" @refresh="refresh" />
+
+    <el-dialog title="分数调整" :visible.sync="stageListOpen" width="1000px" :close-on-click-modal="false">
+      <el-table size="mini" height="500px" v-loading="stageListLoading" :data="stageList" @row-dblclick="btnDetails">
+        <el-table-column label="名称" align="center" prop="name" />
+        <el-table-column label="月份" align="center" prop="month" />
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-search"
+              @click="btnEntryAdjust(scope.row)"
+            >进入调整</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import detail from './detail.vue'
+import { listPerformance,getCurrentMonthId,getNextMonthId} from "@/api/business/ehr/pm/performance";
+import { getGradeAdjustConut,toDoList} from "@/api/business/ehr/pm/gradeadjust";
+import { getPmVerifyConut} from "@/api/business/ehr/pm/pmverify";
+import { getPmMarkConut} from "@/api/business/ehr/pm/pmmark";
+import { listDept} from "@/api/business/ehr/ehr/dept";
+
+export default {
+  name: "assess",
+  dicts: ['ehr_pm_status'],
+  components: {detail},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // id集合
+      ids: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        params:{
+          dataPermission: 'Y',
+          oneself: false,
+          staffCodeOrName: null,
+        },
+        status: null,
+        month: null,
+        dept: null,
+      },
+      // 查询日期范围
+      dateRange: [],
+      pickerOptions: {
+        shortcuts: [{
+          text: '最近一周',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近一个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '最近三个月',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
+      },
+      //页面显示
+      isList: true,
+      //页面状态
+      page: '',
+      //详情id
+      rowId: '',
+      //等级调整数量
+      adjustCount: null,
+      //等级调整周期列表
+      stageList:[],
+      //等级调整周期列表弹出层
+      stageListOpen:false,
+      //等级调整周期列表遮罩层
+      stageListLoading: true,
+      //待确认数量
+      verifyCount: null,
+      //待评分数量
+      markCount: null,
+      //部门树
+      deptTree: [],
+      //value
+      treeValue: [],
+    };
+  },
+  async created() {
+    //查询等级调整数量
+    let res = await getGradeAdjustConut();
+    this.adjustCount = res.row;
+    //查询待确认数量
+    res = await getPmVerifyConut();
+    this.verifyCount = res.row;
+    //查询待评分数量
+    res = await getPmMarkConut();
+    this.markCount = res.row;
+    this.getList();
+    //如果是跳转过来的页面带了参数flowId则直接进入填写页面
+    if(this.$route['query'] !== undefined && this.$route.query['flowId'] !== undefined){
+      this.rowId = this.$route.query.performanceId;
+      this.page = 'add';
+      this.ids = [this.$route.query.performanceId];
+      this.isList = false;
+    }
+    listDept().then(response => {
+      let arr = response.rows;
+      arr.forEach(function(element) {
+        element.parent_id = element.superiorsDept;
+        element.value = element.code;
+        element.label = element.name;
+      });
+      console.log("arr",arr);
+      this.deptTree = this.arrayToTree(arr,null);
+      console.log("deptTree",this.deptTree);
+    });
+  },
+  methods: {
+    /** 查询绩效列表 */
+    getList() {
+      this.loading = true;
+      this.queryParams.dept = this.treeValue[this.treeValue.length - 1];
+      listPerformance(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+        this.listData = response.rows;
+        this.ids = response.rows.map(item => item.id);
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 搜索按钮操作 */
+    async btnSearch() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    btnResetQuery() {
+      this.resetForm("queryForm");
+      this.dateRange = [];
+      this.treeValue = [];
+      this.queryParams.params.staffCodeOrName = null;
+      this.btnSearch();
+    },
+    /** 刷新 */
+    refresh(){
+      this.resetForm("queryForm");
+      this.dateRange = [];
+      this.treeValue = [];
+      this.getList();
+    },
+    /** 进入详情 */
+    btnDetails(row){
+      this.rowId = row.id;
+      this.page = 'add';
+      this.isList = false;
+    },
+    //只看自己按钮
+    btnOneself(){
+      this.btnSearch();
+    },
+    //等级调整
+    btnGradeAdjust(){
+      this.stageListOpen = true;
+      this.getlistStage();
+    },
+    //查看当月绩效
+    async btnCurrentMonth(){
+      let res = await getCurrentMonthId();
+      if(!res.id){
+        this.$modal.msgSuccess("未查询到本月绩效!");
+      }else{
+        this.rowId = res.id;
+        this.page = 'add';
+        this.ids = [res.id];
+        this.isList = false;
+      }
+    },
+    //查看下月绩效
+    async btnNextMonth(){
+      let res = await getNextMonthId();
+      if(!res.id){
+        this.$modal.msgSuccess("未查询到下月绩效!");
+      }else{
+        this.rowId = res.id;
+        this.page = 'add';
+        this.ids = [res.id];
+        this.isList = false;
+      }
+    },
+    //查询周期列表
+    getlistStage() {
+      this.stageListLoading = true;
+      toDoList().then(response => {
+        this.stageList = response.rows;
+        this.stageListLoading = false;
+      });
+    },
+    //进入调整
+    btnEntryAdjust(row){
+      this.$router.push({ name: 'AdjustGrade', query: { id: row.id,flowId: row.flowId } });
+    },
+    //待确认
+    btnPmVerify(){
+      this.$router.push({name:'PmVerify'});
+    },
+    //待评分
+    btnPmMark(){
+      this.$router.push({name:'PmMark'});
+    },
+    arrayToTree(data, pid) {
+      let result = []
+      this.getChildren(data, result, pid)
+      return result
+    },
+    getChildren(data, result, pid) {
+      for (const item of data) {
+        if (item.parent_id === pid) {
+          const newItem = { children: [], ...item }
+          result.push(newItem)
+          this.getChildren(data, newItem.children, item.code)
+        }
+      }
+    },
+    //
+    handleChange(value){
+      console.log("value",value);
+      this.$refs.cascaderHandle.dropDownVisible = false;
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 56 - 0
src/views/business/ehr/pm/myPm/btnAjMarkLog.vue

@@ -0,0 +1,56 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">分数调整记录</el-button>
+    <el-dialog title="分数调整记录" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData">
+        <el-table-column label="调整分" align="center" prop="ajMark" />
+        <el-table-column label="调整原因" align="center" prop="ajCause" />
+        <el-table-column label="调整时间" align="center" prop="createTime" />
+        <el-table-column label="调整人" align="center" prop="createBy" />
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listAdjustlog} from "@/api/business/ehr/pm/adjustlog";
+export default {
+  name: "AdjustlogDialog",
+  props: ['pmId'],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 1000,
+        performanceId: null,
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  watch: {},
+  methods: {
+    //点击了当前按钮
+    click() {
+      this.queryParams.performanceId = this.pmId;
+      this.open = true;
+      this.loading = true;
+      listAdjustlog(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>

+ 67 - 0
src/views/business/ehr/pm/myPm/btnApproveLog.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <el-button size="mini" @click="click">绩效审批记录</el-button>
+    <el-dialog title="绩效审批记录" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData">
+        <el-table-column label="时间" align="center" prop="createTime" />
+        <el-table-column label="阶段" align="center" prop="performanceStatus" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.performanceStatus"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="评估人" align="center" prop="staffName" />
+        <el-table-column label="状态" align="center" prop="status" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_flow_status" :value="scope.row.status"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="意见" align="center" prop="result" />
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+
+<script>
+import { listFlow} from "@/api/business/ehr/pm/flow";
+export default {
+  name: "ApproveLogDialog",
+  dicts: ['ehr_pm_status','ehr_pm_flow_status'],
+  props: ['pmId'],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 1000,
+        performanceId: null,
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  watch: {},
+  methods: {
+    //点击了当前按钮
+    click() {
+      this.queryParams.performanceId = this.pmId;
+      this.open = true;
+      this.loading = true;
+      listFlow(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>

+ 88 - 0
src/views/business/ehr/pm/myPm/btnCopyItem.vue

@@ -0,0 +1,88 @@
+<template>
+  <div>
+    <el-button type="primary" size="mini" @click="click">复制指标</el-button>
+    <el-dialog title="历史绩效" :visible.sync="open" width="1000px" :close-on-click-modal="false">
+      复制操作将覆盖当前绩效明细
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData" @row-dblclick="btnCopy">
+        <el-table-column label="员工" align="center" prop="staffName" />
+        <el-table-column label="评估周期" align="center" prop="name" />
+        <el-table-column label="月度" align="center" prop="month" />
+        <el-table-column label="创建时间" align="center" prop="createTime" />
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-document-copy"
+                @click="btnCopy(scope.row)"
+              >复制</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div>
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPerformance} from "@/api/business/ehr/pm/performance";
+export default {
+  name: "CopyItemDialog",
+  props: ["id"],
+  data() {
+    return {
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        staff: null,
+        params:{
+          neId: null,
+        },
+      },
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // 遮罩层
+      loading: true,
+      // 是否显示弹出层
+      open: false,
+    };
+  },
+  methods: {
+    /** 查询绩效列表 */
+    getList() {
+      this.loading = true;
+      listPerformance(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //点击了当前按钮
+    click() {
+      this.queryParams.staff = this.$store.state.user.name;
+      this.open = true;
+      this.getList();
+    },
+    //复制
+    async btnCopy(row){
+      this.$emit('setItems',row.id);
+      this.open = false;
+    },
+  },
+  created() {
+    this.queryParams.params.neId = this.id;
+  },
+};
+</script>
+

+ 445 - 0
src/views/business/ehr/pm/myPm/detail.vue

@@ -0,0 +1,445 @@
+<template>
+  <div>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <span style="font-weight:bold">绩效考核表</span>-{{form.name}}
+        <div style="float: right; padding: 3px 0; display:flex;justify-content:space-between" type="text">
+          <el-button size="mini" plain @click="btnBack">返回</el-button>
+          <el-button type="primary" size="mini" @click="btnSubmit" :loading="loading" v-if="this.$store.state.user.name == form.staff && (form.status == '0' || form.status == '3')">提交</el-button>
+          <ApproveLogDialog style="margin: 0 10px" :pmId="form.id"></ApproveLogDialog>
+          <AdjustlogDialog style="margin: 0 10px" :pmId="form.id"></AdjustlogDialog>
+          <el-button size="mini" plain @click="btnPreviou" v-if="ids">上一个</el-button>
+          <el-button size="mini" plain @click="btnNext" v-if="ids">下一个</el-button>
+        </div>
+      </div>
+      <div v-loading="loading">
+        <el-form size="mini" ref="dataForm" :model="form" :rules="rules">
+          <el-descriptions :column="6">
+            <el-descriptions-item label="员工编号">{{form.staff}}</el-descriptions-item>
+            <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
+            <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
+            <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
+            <el-descriptions-item label="部门" span="2">{{form.deptName}}</el-descriptions-item>
+            <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
+            <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
+            <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
+            <el-descriptions-item label="所属分组">
+              <div v-for="dict in dict.type.ehr_pm_group" v-if="form.staffDivide == dict.value">
+                <div>{{ dict.label }}</div>
+              </div>
+            </el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions :column="6 ">
+            <el-descriptions-item label="自评分" v-if="form.status > 3">{{form.saMark}}</el-descriptions-item>
+            <el-descriptions-item label="上级评分" v-if="form.status > 4">{{form.ldMark}}</el-descriptions-item>
+            <el-descriptions-item label="综合得分" v-if="form.status > 4">{{form.mark}}</el-descriptions-item>
+          </el-descriptions>
+          <el-descriptions v-if="form.status > 3">
+            <el-descriptions-item label="个人总结">{{form.summary}}</el-descriptions-item>
+          </el-descriptions>
+          <div v-if="this.$store.state.user.name == form.staff && form.status == '3'">
+            <el-form-item label="个人总结" prop="summary">
+              <el-input type="textarea" placeholder="总结本月工作的亮点和暗点" v-model="form.summary"></el-input>
+            </el-form-item>
+          </div>
+          <el-descriptions v-if="form.status > 4">
+            <el-descriptions-item label="评语">{{form.comment}}</el-descriptions-item>
+          </el-descriptions>
+          <div style="float: right; padding: 3px 0; display:flex;justify-content:space-between">
+            <el-button type="primary" size="mini" @click="btnAddRow" v-if="this.$store.state.user.name == form.staff && form.status == '0'">增加指标</el-button>
+            <CopyItemDialog style="margin: 0 10px" @setItems="setItems" v-if="this.$store.state.user.name == form.staff && form.status == '0'" :id="rowId"></CopyItemDialog>
+            <!-- <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button> -->
+          </div>
+          <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries" border>
+            <el-table-column type="index" width="50" label="序号"/>
+            <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.ehr_pm_aspect" :value="scope.row.aspect"/>
+              </template>
+            </el-table-column>
+            <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估指标" align="center" prop="target" />
+            <el-table-column width="80" label="权重(%)" align="center" prop="weight"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="指标说明" align="center" prop="instructions">
+              <template slot-scope="scope">
+                <div style="white-space: pre-wrap;text-align: left">{{scope.row.instructions}}</div>
+              </template>
+            </el-table-column>
+            <!-- <el-table-column width="100" label="角色" align="center" prop="role">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.ehr_pm_role" :value="scope.row.role"/>
+              </template>
+            </el-table-column> -->
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="评分标准" align="center" prop="standard">
+              <template slot-scope="scope">
+                <div style="white-space: pre-wrap;text-align: left">{{scope.row.standard}}</div>
+              </template>
+            </el-table-column>
+            <el-table-column width="100" label="数据来源" align="center" prop="source" />
+
+            <el-table-column width="80" label="自评分" align="center" prop="selfScoring" v-if="form.status > 3"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="自评语" align="center" prop="selfComment" v-if="form.status > 3"/>
+              
+            <el-table-column width="80" label="自评分" align="center" prop="selfScoring" :render-header="addRedStar" v-if="this.$store.state.user.name == form.staff && form.status == '3'">
+              <template slot-scope="scope">
+                <el-form-item :prop="'performanceItem.'+scope.$index+'.selfScoring'" :rules="{required: true,message: ' ',trigger: 'blur'}">
+                  <el-input  v-model="scope.row.selfScoring" v-only-number="{max:saMarkMax,min:0,precision:1}" size="mini"/>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="自评语" align="center" prop="selfComment" :render-header="addRedStar" v-if="this.$store.state.user.name == form.staff && form.status == '3'">
+              <template slot-scope="scope">
+                <el-form-item :prop="'performanceItem.'+scope.$index+'.selfComment'" :rules="{required: true,message: ' ',trigger: 'blur'}">
+                  <el-input size="mini" type="textarea" :rows="3" v-model="scope.row.selfComment"></el-input>
+                </el-form-item>
+              </template>
+            </el-table-column>
+
+            <el-table-column width="80" label="上级评分" align="center" prop="leaderScoring" v-if="form.status > 4"/>
+            <el-table-column :show-overflow-tooltip="!isUnfold" label="上级评语" align="center" prop="leaderComment" v-if="form.status > 4"/>
+            <!-- <el-table-column width="80" label="加权得分" align="center" prop="weightedScore" v-if="form.status > 4"/> -->
+          
+            <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" v-if="this.$store.state.user.name == form.staff && form.status == '0'">
+              <template slot-scope="scope">
+                <el-button size="mini" type="text" @click="btnEdit(scope.row)">修改</el-button>
+                <el-button size="mini" type="text" @click="btnDelete(scope.row)">删行</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form>
+      </div>
+    </el-card>
+    
+    <el-dialog title="指标明细" :visible.sync="rowDataOpen" width="1000px" :close-on-click-modal="false" :show-close="false">
+      <el-form size="mini" label-position="right" ref="rowDataForm" :model="rowData" :rules="rowRules" label-width="80px">
+        <el-form-item label="评估方面" prop="aspect">
+          <el-select v-model="rowData.aspect" >
+            <el-option
+              v-for="dict in dict.type.ehr_pm_aspect"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="评估指标" prop="target">
+          <el-input v-model="rowData.target"></el-input>
+        </el-form-item>
+        <el-form-item label="加/减分项" prop="asItem">
+          <el-checkbox v-model="rowData.asItem" @change="handleCheckedChange"></el-checkbox>
+        </el-form-item>
+        <el-form-item label="权重(%)" prop="weight" v-if="!rowData.asItem">
+          <el-input  v-model.number="rowData.weight" v-only-number="{max:100,min:0,precision:0}" size="mini">
+            <i slot="suffix" style="color: #000;font-style:normal;margin-right: 10px;">%</i>
+          </el-input>
+        </el-form-item>
+        <el-form-item label="指标说明" prop="instructions">
+          <el-input type="textarea" v-model="rowData.instructions" :rows="5"></el-input>
+        </el-form-item>
+        <!-- <el-form-item label="角色" prop="role">
+          <el-select v-model="rowData.role" >
+            <el-option
+              v-for="dict in dict.type.ehr_pm_role"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item> -->
+        <el-form-item label="评分标准" prop="standard">
+          <el-input type="textarea" v-model="rowData.standard" :rows="5"></el-input>
+        </el-form-item>
+        <el-form-item label="数据来源" prop="source">
+          <el-input v-model="rowData.source"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="btnRowClose">取 消</el-button>
+        <el-button size="mini" type="primary" @click="btnRowConfirm">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import ApproveLogDialog from './btnApproveLog.vue'
+import AdjustlogDialog from './btnAjMarkLog.vue'
+import CopyItemDialog from './btnCopyItem.vue'
+import { getPerformance,fillinFinish,selfestimate,copyItem} from "@/api/business/ehr/pm/performance";
+import { getPerformanceItem,addPerformanceItem,updatePerformanceItem,delPerformanceItem} from "@/api/business/ehr/pm/performanceitem";
+
+export default {
+  name: 'detail',
+  dicts: ['ehr_pm_aspect','ehr_pm_role','ehr_pm_group'],
+  props: ['pageStu','rowId',"ids"],
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  components: {ApproveLogDialog,AdjustlogDialog,CopyItemDialog},
+  data() {
+    return {
+      //id
+      id:null,
+      //表单
+      form:{},
+      //提交规则
+      rules:{
+        summary: [
+          { required: true, message: " ", trigger: "blur" },
+        ],
+      },
+      //遮罩
+      loading: false,
+      //单行明细
+      rowData:{},
+      //是否显示行明细弹出层
+      rowDataOpen:false,
+      //当行明细校验规则
+      rowRules:{
+        aspect: [
+          { required: true, message: "评估方面不能为空", trigger: "blur" },
+        ],
+        target: [
+          { required: true, message: "评估指标不能为空", trigger: "blur" },
+        ],
+        instructions: [
+          { required: true, message: "评估说明不能为空", trigger: "blur" },
+        ],
+        role: [
+          { required: true, message: "角色不能为空", trigger: "blur" },
+        ],
+        weight: [
+          { required: true, message: "权重不能为空", trigger: "blur" },
+        ],
+        standard: [
+          { required: true, message: "绩效标准不能为空", trigger: "blur" },
+        ],
+        source: [
+          { required: true, message: "数据来源不能为空", trigger: "blur" },
+        ],
+      },
+      //是否展开
+      isUnfold:false,
+      //明细权重合计值
+      weightSum: 0,
+    }
+  },
+  computed: {
+    //自评分最大值
+    saMarkMax: function () {
+      //业务组最高自评分为150;非业务组最高自评分为100;
+      return this.form.staffDivide == 'C1' ? 150 : 100
+    },
+	},
+  async created() {
+    this.id = this.rowId;
+    this.fetchPerformance(this.id);
+    if(this.pageStu == 'add'){
+    }
+    if(this.pageStu == 'edit' || this.pageStu == 'see') {
+    }
+  },
+  watch: {
+  },
+  methods: {
+    //返回
+    btnBack(){
+      this.$emit('jugislist', true)
+      this.$emit('refresh')
+    },
+    //查询详情
+    async fetchPerformance(id){
+      this.loading = true;
+      await getPerformance(id).then(res => {
+        if (res.code === 200) {
+          this.form = res.data;
+          this.id = res.data.id;
+         }
+         this.loading = false;
+      })
+    },
+    //增行
+    btnAddRow(){
+      this.rowData = {};
+      this.rowData.assessId = this.form.id;
+      this.rowDataOpen = true;
+    },
+    //修改
+    async btnEdit(row){
+      this.rowData = {};
+      await getPerformanceItem(row.id).then(res => {
+        if (res.code === 200) {
+          this.rowData = res.data
+          this.rowDataOpen = true;
+         }
+      })
+    },
+    //删行
+    btnDelete(row){
+      this.$modal.confirm('是否确认删除第"' + row.aspect + '"行数据?').then(function() {
+        return delPerformanceItem(row.id);
+      }).then(() => {
+        this.fetchPerformance(this.id);
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    //单行明细取消
+    btnRowClose(){
+      this.rowData = {};
+      this.rowDataOpen = false;
+    },
+    //单行明细确认
+    btnRowConfirm(){
+      if(this.form.staffDivide == 'C1' && this.rowData.aspect == 0 && this.rowData.weight < 80){
+        this.$modal.msgSuccess("业务组的业绩考核权重不能低于80!");
+        return;
+      }
+      let sum = 100;
+      if(this.rowData.id){
+        let arr = this.form.performanceItem.filter(ele => ele.id != this.rowData.id);
+        sum = arr.reduce((sum, e) => sum + Number(e.weight || 0), 0);
+      }else{
+        sum = this.form.performanceItem.reduce((sum, e) => sum + Number(e.weight || 0), 0);
+      }
+      console.log("sum",sum);
+      console.log("sum + this.rowData.weight",sum + this.rowData.weight);
+      if(sum + this.rowData.weight > 100){
+        this.$modal.msgSuccess("总权重超过100,剩余权重比为" + (100 - sum));
+        return;
+      }
+      this.$refs["rowDataForm"].validate(valid => {
+        if (valid) {
+          if (this.rowData.id != undefined) {
+            updatePerformanceItem(this.rowData).then(response => {
+              this.$modal.msgSuccess("保存成功");
+              this.rowDataOpen = false;
+              this.fetchPerformance(this.id);
+            });
+          } else {
+            addPerformanceItem(this.rowData).then(response => {
+              this.$modal.msgSuccess("保存成功");
+              this.rowDataOpen = false;
+              this.fetchPerformance(this.id);
+            });
+          }
+        }
+      });
+    },
+    //展开/收起
+    btnUnfold(){
+      this.isUnfold = !this.isUnfold;
+    },
+    //上一个
+    btnPreviou(){
+      let i = this.ids.indexOf(this.id) - 1;
+      if(i > -1){
+        let id = this.ids[i];
+        this.fetchPerformance(id);
+      }else{
+        this.$modal.msgSuccess("已经是当前页第一条了!");
+      }
+    },
+    //下一个
+    btnNext(){
+      let i = this.ids.indexOf(this.id) + 1;
+      if(i < this.ids.length){
+        let id = this.ids[i];
+        this.fetchPerformance(id);
+      }else{
+        this.$modal.msgSuccess("已经是当前页最后一条了!");
+      }
+      
+    },
+    //合计
+    getSummaries(param){
+      const { columns, data } = param;
+      let weight = data.reduce((sum, e) => sum + Number(e.weight || 0), 0);
+      this.weightSum = weight;
+      let selfScoring = 0;
+      if(this.form.saMark){
+        selfScoring = this.form.saMark;
+      }else{
+        selfScoring = data.reduce((sum, e) => sum + Number(e.selfScoring || 0) * (Number(e.weight || 0) / 100), 0);
+        selfScoring = selfScoring.toFixed(1);
+      }
+      return ['合计','','',weight,'','','',selfScoring,'',this.form.ldMark];
+    },
+    //提交
+    btnSubmit(){
+      if(this.form.status == '0'){
+        if(this.weightSum != 100){
+          this.$modal.msgWarning("权重不为100%无法提交!");
+          return;
+        }
+        let that = this;
+        this.$modal.confirm('确认提交吗?').then(async function() {
+          that.loading = true;
+          return await fillinFinish(that.form);
+        }).then(() => {
+          that.fetchPerformance(that.id);
+          that.$modal.msgSuccess("提交成功");
+          that.loading = false;
+        }).catch(() => {
+          that.loading = false;
+        });
+      }
+      if(this.form.status == '3'){
+        this.$refs["dataForm"].validate(async valid => {
+          if (valid) {
+            let that = this;
+              this.$modal.confirm('确认提交吗?').then(async function() {
+                that.loading = true;
+                return await selfestimate(that.form);
+              }).then(() => {
+                that.fetchPerformance(that.id);
+                that.$modal.msgSuccess("提交成功");
+                that.loading = false;
+              }).catch(() => {
+                that.loading = false;
+              });
+          }else{
+            this.$modal.msgWarning("评分或评语不能为空!");
+            return false;
+          }
+        });
+      }
+    },
+    //设置明细
+    async setItems(cId){
+      let params = {
+        id : this.id,
+        cId : cId
+      }
+      let res = await copyItem(params);
+      if("200" == res.code){
+        this.$modal.msgSuccess("复制成功");
+        this.fetchPerformance(this.id);
+      }
+    },
+    //选择加减分项后
+    handleCheckedChange(value){
+      this.rowData.weight = 0;
+    },
+    //必选标识
+    addRedStar(h, { column }) {
+      return [
+        h('span', { style: 'color: #F56C6C' }, '*'),
+        h('span', ' ' + column.label)
+      ];
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+.btn_group {
+  z-index: 500;
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 162 - 0
src/views/business/ehr/pm/myPm/index.vue

@@ -0,0 +1,162 @@
+<template>
+  <div>
+    <div class="app-container" v-if="isList">
+      <div style="float:right">
+        <el-button type="primary" size="mini" @click="btnCurrentMonth">本月绩效</el-button>
+        <el-button type="primary" size="mini" @click="btnNextMonth">下月绩效</el-button>
+      </div>
+      <el-table size="mini" height="500px" v-loading="loading" :data="listData" @row-dblclick="btnDetails">
+        <el-table-column label="绩效编号" align="center" prop="id" />
+        <el-table-column label="员工姓名" align="center" prop="staffName" />
+        <el-table-column show-overflow-tooltip label="评估周期" align="center" prop="name" />
+        <el-table-column label="月度" align="center" prop="month" />
+        <el-table-column label="自评分" align="center" prop="saMark" />
+        <el-table-column label="上级评分" align="center" prop="ldMark" />
+        <el-table-column label="综合得分" align="center" prop="mark" />
+        <el-table-column label="等级" align="center" prop="grade" />
+        <el-table-column label="绩效系数" align="center" prop="coefficient" />
+        <el-table-column label="状态" align="center" prop="status" >
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.ehr_pm_status" :value="scope.row.status"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-search"
+              @click="btnDetails(scope.row)"
+            >详情</el-button>
+          </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>
+    <detail v-model="isList" v-if="!isList" :pageStu="page" :rowId="rowId" :ids="ids" @refresh="refresh" />
+  </div>
+</template>
+
+<script>
+import detail from './detail.vue'
+import { listPerformance,getCurrentMonthId,getNextMonthId} from "@/api/business/ehr/pm/performance";
+
+export default {
+  name: "assess",
+  dicts: ['ehr_pm_status'],
+  components: {detail},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 表格数据
+      listData: [],
+      // id集合
+      ids: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        params:{
+          dataPermission: 'Y',
+          oneself: true,
+        },
+      },
+      //页面显示
+      isList: true,
+      //页面状态
+      page: '',
+      //详情id
+      rowId: '',
+    };
+  },
+  async created() {
+    //如果是跳转过来的页面带了参数flowId则直接进入填写页面
+    if(this.$route['query'] !== undefined && this.$route.query['flowId'] !== undefined){
+      this.rowId = this.$route.query.performanceId;
+      this.page = 'add';
+      this.ids = [this.$route.query.performanceId];
+      this.isList = false;
+    }
+    this.getList();
+  },
+  methods: {
+    /** 查询绩效列表 */
+    getList() {
+      this.loading = true;
+      listPerformance(this.queryParams).then(response => {
+        this.listData = response.rows;
+        this.ids = response.rows.map(item => item.id);
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 刷新 */
+    refresh(){
+      this.resetForm("queryForm");
+      this.dateRange = [];
+      this.treeValue = [];
+      this.getList();
+    },
+    /** 进入详情 */
+    btnDetails(row){
+      this.rowId = row.id;
+      this.page = 'add';
+      this.isList = false;
+    },
+    //查看当月绩效
+    async btnCurrentMonth(){
+      let res = await getCurrentMonthId();
+      if(!res.id){
+        this.$modal.msgSuccess("未查询到本月绩效!");
+      }else{
+        this.rowId = res.id;
+        this.page = 'add';
+        this.ids = [res.id];
+        this.isList = false;
+      }
+    },
+    //查看下月绩效
+    async btnNextMonth(){
+      let res = await getNextMonthId();
+      if(!res.id){
+        this.$modal.msgSuccess("未查询到下月绩效!");
+      }else{
+        this.rowId = res.id;
+        this.page = 'add';
+        this.ids = [res.id];
+        this.isList = false;
+      }
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.paginationClass {
+  z-index: 500;
+  position: fixed;
+  bottom: 10px;
+  right: 10px;
+  width: 100%;
+  line-height: var(--footer-height);
+  color: #fff;
+}
+</style>

+ 17 - 11
src/views/business/ehr/pm/stagecontrol/index.vue

@@ -2,17 +2,23 @@
   <div>
     <div class="app-container" v-if="isList">
       <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true" label-width="68px">
-        <el-form-item label="名称" prop="name">
-          <el-input
-            v-model="queryParams.name"
-            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-row >
+          <el-col :span="18">
+            <el-form-item label="名称" prop="name">
+              <el-input
+                v-model="queryParams.name"
+                clearable
+                @keyup.enter.native="btnSearch"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item style="float:right">
+              <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-col>
+        </el-row>
       </el-form>
       <div style="float:right">
         <el-button type="primary" size="mini" @click="btnAdd">新增</el-button>

+ 113 - 0
src/views/purchase/transferOrder/reserved.vue

@@ -0,0 +1,113 @@
+<template>
+  <div class="reserved">
+    <el-dialog
+      :visible.sync="visible"
+      :before-close="handleClose"
+      width="70%"
+    >
+    <el-descriptions class="margin-top" title="货权预留单" :column="3" size="small" border>
+      <el-descriptions-item>
+        <template slot="label">
+          预留单据号
+        </template>
+        {{ resData.code }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">
+          来源单据号
+        </template>
+        {{ resData.source }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">
+          客户名称
+        </template>
+        {{ resData.customerName }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">
+          创建人
+        </template>
+        {{ resData.createByName }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">
+          创建人编码
+        </template>
+        {{ resData.createBy }}
+      </el-descriptions-item>
+      <el-descriptions-item>
+        <template slot="label">
+          创建时间
+        </template>
+        {{ resData.createTime }}
+      </el-descriptions-item>
+    </el-descriptions>
+      <el-table style="margin-top: 50px" :data="items" @row-click="rowClick">
+        <el-table-column show-overflow-tooltip prop="materialCode" label="物料编码" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="materialName" label="物料名称" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="unitName" label="单位名称" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="reservedQty" label="预留数量" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="qty" label="可用量" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="usedQty" label="已用量" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="warehouseName" label="仓库名称" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="allocationName" label="货位名称" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="createTime" label="创建时间" width="200"></el-table-column>
+      </el-table>
+      <el-table style="margin-top: 50px" :data="showHistoryItems">
+        <el-table-column show-overflow-tooltip prop="materialCode" label="物料编码" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="materialName" label="物料名称" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="unitName" label="单位名称" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="allotQty" label="操作数量" width="150"></el-table-column>
+        <el-table-column show-overflow-tooltip prop="createTime" label="操作时间" width="200"></el-table-column>
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {getDetailBySource} from '@/api/purchase/ownership.js'
+
+export default {
+  props: {
+    isVisible: {
+      type: Boolean,
+      default: false
+    },
+    info: {
+      type: Object,
+      default: null
+    }
+  },
+  mounted() {
+    this.getDetails(this.info)
+  },
+  data() {
+    return {
+      visible:this.isVisible,
+      resData: {},
+      items: [],
+      historyItems: [],
+      showHistoryItems: [],
+    }
+  },
+  methods: {
+    getDetails(row) {
+      getDetailBySource(row.code).then(res => {
+        if (res.code === 200) {
+          this.resData = res.data;
+          this.items = res.data.stMaterialOwnershipItemList;
+          this.historyItems = res.data.stMaterialOwnershipHistoryList;
+          this.showHistoryItems = this.historyItems.filter(ele => ele.ownerId == this.items[0].id);
+        }
+      })
+    },
+    handleClose() {
+      this.$emit('updateReserved', false)
+    },
+    rowClick(row){
+      this.showHistoryItems = this.historyItems.filter(ele => ele.ownerId == row.id);
+    }
+  }
+}
+</script>