Browse Source

任务中心绩效结果考核增加直接结束流程环节,服务联调,第三审批人同意增加选择领导进行审批;

SunZehao 1 year atrás
parent
commit
2bcafd893b

+ 9 - 0
src/api/api.js

@@ -209,6 +209,15 @@ export function apiGetcheckAuditAssessmentStatus(params) {
     })
 }
 
+//添加审批领导
+export function apiGetaddRepeatBatchLeader(params) {
+    return httpRequest({
+        url: 'evaluation-dept-ad/addRepeatBatchLeader',
+        method: 'post',
+        params: params
+    })
+}
+
 
 //----------------------------------------通告管理------------------------------------------------
 //---------列表

+ 3 - 3
src/components/assessment/assessmentApplicationPage.vue

@@ -312,14 +312,14 @@ export default {
         // 查询列表页面
         getassessmentApplicationList() {
             let that = this
-            // let userMes = JSON.parse(window.sessionStorage.getItem('user'))
+            let userMes = JSON.parse(window.sessionStorage.getItem('user'))
             let params = {
                 pageNum: that.page.currentPage,
                 pageSize: that.page.pagesize,
                 orderNumber: that.orderNumber,
                 deptName: that.departNameS,
-                // deptId: userMes.deptId,
-                deptId: '',
+                deptId: userMes.deptId,
+                // deptId: '',
                 annual: that.timeIds ? this.timeIds.substring(0, this.timeIds.indexOf('-'))*1 : null,
                 declarationMonth: that.timeIds ? this.timeIds.substring(this.timeIds.indexOf('-')+1, this.timeIds.length)*1 : null
             }

+ 91 - 9
src/components/taskCenter/taskApplicationFrom.vue

@@ -201,6 +201,31 @@
                 <span class="dialog-footer">
                     <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
                     <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
+                    <el-button v-if="changeLeader" @click="engProssionFn">结束流程</el-button>
+                </span>
+            </template>
+        </el-dialog>
+        <el-dialog title="选择审批领导" v-model="activeVisible" width="600px" :close-on-click-modal="false">
+            <div class="periodFrom">
+                <el-form ref="ruleForm" label-width="100px" class="demo-ruleForm" :validate-on-rule-change="false">
+                    <el-form-item label="审批领导">
+                        <el-select v-model="activeLeaderName" placeholder="请选择审批领导">
+                            <el-option
+                            v-for="item in leaderArr"
+                            :key="item.no"
+                            :label="item.userName"
+                            :value="item.no">
+                            <span style="float: left;display:inline-block;width:100px">{{ item.userName }}</span>
+                            <span style="float: right;color: #909399;font-size: 13px;" >{{ item.no }}</span>
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-form>
+            </div>
+            <template #footer>
+                <span class="dialog-footer">
+                    <el-button @click="activeVisible = false">取 消</el-button>
+                    <el-button type="primary" @click="activeresponsibility()">确 定</el-button>
                 </span>
             </template>
         </el-dialog>
@@ -212,7 +237,7 @@
 import importDailog from '../importPage/importDailog.vue'
 import {apiPostevaluationdeptadDetails,apiGetevaluationdeptadUpdate, apiGetevaluationdeptadDelete,apiPostIsdoAction,apideptAdmodify,
 apiPostevaluationdeptadDetailsHead, apiGetuserPageList, apiGetUserPostList, apiGetevaluationdeptadUpdateComplete,
-apiGetevaluationdeptadDeleteComplete, apiGetprocessInformation} from '../../api/api'
+apiGetevaluationdeptadDeleteComplete, apiGetprocessInformation, apiGetobtainApprovalLeader, apiGetaddRepeatBatchLeader} from '../../api/api'
 import ExcelJS from 'exceljs'
 import fileSave from 'file-saver'
 import addIcon from '../../assets/btnIcon/add.png'
@@ -228,10 +253,13 @@ export default {
     data() {
         return {
             dialogVisible: false,
+            leaderVisible: false,
             activeName: 'first',
+            leaderArr: [],
             quantifiedList: [],
             secondWorkSituation: [],
             changeDateSelect: [],
+            activeLeaderName: '',
             descMsg: '',
             receiptMsg: {
                 code: '',
@@ -271,6 +299,7 @@ export default {
             instanceChild: {},
             keyId: '',
             showMessage: false,
+            changeLeader: false,
             changeSituationSelect: [],
         }
     },
@@ -311,18 +340,22 @@ export default {
         //查询审批人领导给提示
         getprocessInformation(row) {
             let that = this
+            that.changeLeader = false
             let params = {
                 id: row.instId
             }
             apiGetprocessInformation(params).then(datas =>{
                 if (datas && datas.data && datas.data.length>0) {
-                    let item = datas.data[1]
+                    let item = datas.data[datas.data.length-1]
                     if (item.taskKey === 'UserTask2') {
                         that.$message({
                             message: '请领导对员工月度考核系数进行确认。',
                             type: 'success'
                         });
                     }
+                    if (item.taskKey === 'UserTask3') {
+                        that.changeLeader = true
+                    }
                 }
             })
         },
@@ -420,6 +453,7 @@ export default {
                         code: row.orderNumber,
                         des: row.declarationReason,
                         stage: row.stage,
+                        deptId: row.deptId,
                         deptName: row.deptName,
                         deptLeaderName: row.deptLeaderName,
                         declarationLevel: row.declarationLevel,
@@ -578,26 +612,74 @@ export default {
                 fileSave(blob, `绩效结果考核申报数据导出.xlsx`)
             })
         },
-        examineAndApprove(type) {
+        changeLeaderFn() {
+            this.leaderVisible = true
+            this.leaderArr = []
             let that = this
+            let params = {
+                id: that.receiptMsg.deptId
+            }
+            apiGetobtainApprovalLeader(params).then(datas =>{
+                if (datas && datas.data) {
+                    that.leaderArr = datas.data
+                    if (datas.data.length>0) {
+                        that.activeLeaderName = datas.data[0].no
+                    }
+                }
+            })
+        },
+        activeresponsibility() {
+            let that = this
+            let pars = {
+                id: that.keyId,
+                employeeNo: that.activeLeaderName
+            }
+            apiGetaddRepeatBatchLeader(pars).then(val =>{
+                if (val && val.data) {
+                    that.leaderVisible = false
+                    that.submitIsdoAction('leader')
+                }
+            })
+        },
+        engProssionFn() {
+            this.submitIsdoAction('agree', 'EndNoneEvent1')
+        },
+        examineAndApprove(type) {
             let actionCS = ''
             if (type === 'agree') {
-                if (that.rowMsg.taskType === 'SIGN') {
+                if (this.rowMsg.taskType === 'SIGN') {
                     actionCS = 'signAgree'
-                } else if (that.rowMsg.taskType === 'NORMAL') {
+                } else if (this.rowMsg.taskType === 'NORMAL') {
                     actionCS = 'agree'
                 }
+                if (this.changeLeader) {
+                    this.changeLeaderFn()
+                } else {
+                    this.submitIsdoAction(actionCS)
+                }
             } else {
-                if (that.rowMsg.taskType === 'SIGN') {
+                if (this.rowMsg.taskType === 'SIGN') {
                     actionCS = 'signReject'
-                } else if (that.rowMsg.taskType === 'NORMAL') {
+                } else if (this.rowMsg.taskType === 'NORMAL') {
                     actionCS = 'reject'
                 }
+                this.submitIsdoAction(actionCS)
+            }
+        },
+        submitIsdoAction(taskType, node) {
+            let that = this
+            let leaderTaskType = ''
+            if (that.changeLeader && taskType === 'leader') {
+                if (that.rowMsg.taskType === 'SIGN') {
+                    leaderTaskType = 'signAgree'
+                } else if (that.rowMsg.taskType === 'NORMAL') {
+                    leaderTaskType = 'agree'
+                }
             }
             let params = {
                 taskId: that.rowMsg.id, //任务ID
-                nodeId: that.rowMsg.nodeId, //节点ID
-                action: actionCS, //固定值
+                nodeId: node ? node : that.rowMsg.nodeId, //节点ID
+                action: taskType !== 'leader' ? taskType : leaderTaskType, //固定值
                 instanceId: that.rowMsg.instId, //流程实例ID
                 opinion: that.descMsg, //审批意见
                 iamCode: window.localStorage.getItem('code'), //认证后code值