191 lines
5.9 KiB
Vue
191 lines
5.9 KiB
Vue
<script src="../../api/modules/process.js"></script>
|
|
<template>
|
|
<!-- 此页面主要展示审核和已完成-->
|
|
<div class="process">
|
|
<div class="process_box">
|
|
<process-header v-if="$route.query.type !== 'yiban'" :title="'权限审批'" :proceesNum="prcNum"></process-header>
|
|
<process-header v-else :title="'已办流程'" :proceesNum="prcNum"></process-header>
|
|
<div class="procedure">
|
|
<div class="process_content">
|
|
<span class="base_title">基础信息</span>
|
|
<report-form :form-control="true" :form-controlname="true"
|
|
:process-form="processForm"></report-form>
|
|
|
|
</div>
|
|
<div class="process_content" v-if="$route.query.type !=='yiban'">
|
|
<span class="base_title">审核信息</span>
|
|
<audit-operation ref="operationRef" :prcId="prcId" :prcType="prcType" :taskId="taskId"
|
|
:examine="submitjson" :is-disable="disabled" @handleSubmit="handleSubmit" @handleTransfer="handleTransfer"></audit-operation>
|
|
</div>
|
|
<div class="process_content">
|
|
<span class="base_title">审批历史</span>
|
|
<process-approval-history :prcNum="prcNum"></process-approval-history>
|
|
</div>
|
|
<!-- v-if="$route.query.type !=='yiban'"-->
|
|
|
|
</div>
|
|
|
|
<!-- <process-choose-tree-->
|
|
<!-- dialog-model-->
|
|
<!-- :visible.sync="visibleTree"-->
|
|
<!-- :maxSelected="1"-->
|
|
<!-- :config="{value: '',valueName:''}"-->
|
|
<!-- @confirm="handleDblClick"-->
|
|
<!-- ></process-choose-tree>-->
|
|
<processChooseTree :visible.sync="visibleTree" title="人员列表" dialog-model :config="{
|
|
value: '',
|
|
valueName: ''
|
|
}" :workNumFlag="true" :maxSelected="1" @confirm="handleDblClick"></processChooseTree>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import processHeader from '@/components/ProcessHeader'
|
|
import processChooseTree from '@//components/OrgTable'
|
|
import processApprovalHistory from '@/components/ProcessApprovalHistory'
|
|
import auditOperation from './components/AuditOperation'
|
|
import reportTable from './components/reportForm'
|
|
import { PERMISSION } from '@/utils/Enum/enum'
|
|
import processMixin from "../../components/ProcessMixin";
|
|
import reportForm from "./components/reportForm";
|
|
export default {
|
|
name: 'launch',
|
|
mixins: [processMixin],
|
|
components: {
|
|
processHeader,
|
|
reportTable,
|
|
processApprovalHistory,
|
|
auditOperation,
|
|
reportForm,
|
|
processChooseTree
|
|
},
|
|
data () {
|
|
return {
|
|
processFormRule: {
|
|
prcName: [{
|
|
required: true,
|
|
message: '请输入流程名称',
|
|
trigger: 'change'
|
|
},{
|
|
max: 100,
|
|
message: '申请原因最多填写100字符',
|
|
trigger: 'change'
|
|
}]
|
|
},
|
|
processForm: { prcName : ''},
|
|
visibleTree: false,
|
|
formControl: true,
|
|
disabled:false,
|
|
assignForm: {},
|
|
tableData: [],
|
|
applicationForm: {
|
|
power:'',
|
|
applyReason:''
|
|
},
|
|
q: {
|
|
pageSize: 10000,
|
|
pageNo: 1
|
|
},
|
|
PERMISSION,
|
|
submitjson:{},
|
|
prcType: '',
|
|
application:'' //存储转办的意见
|
|
|
|
}
|
|
},
|
|
created () {
|
|
|
|
this.taskId=this.$store.getters.handleProcess.taskId
|
|
this.prcNum=this.$store.getters.handleProcess.prcNum
|
|
this.prcId=this.$store.getters.handleProcess.prcId
|
|
this.prcName=this.$store.getters.handleProcess.prcName
|
|
this.prcType = this.$store.getters.handleProcess?.prcType
|
|
|
|
let params={
|
|
prcId: this.prcId,
|
|
prcType: this.prcType
|
|
}
|
|
if(this.$route.query.type=='yiban'){
|
|
this.disabled=true
|
|
}
|
|
this.getProcessDetail(params).then(res=>{
|
|
this.processForm = JSON.parse(this.processOld.dataJson)
|
|
this.disabled=false
|
|
this.formControl= true
|
|
if(this.$route.query.type=='yiban'){
|
|
this.disabled=true
|
|
// this.submitjson=JSON.parse(res.processOld.submitJson)
|
|
}else{
|
|
|
|
}
|
|
})
|
|
|
|
|
|
},
|
|
methods: {
|
|
// 转办
|
|
handleTransfer(type) {
|
|
this.visibleTree = true
|
|
this.application = type
|
|
},
|
|
// 选择转办
|
|
handleDblClick(treeNode) {
|
|
this.JuggleSub(this.taskId).then(res=> {
|
|
if(res){
|
|
if( treeNode[0].USID == this.$store.getters.userInfo.usid){
|
|
this.$message.warning("您不能转办给自己")
|
|
}else{
|
|
this.$api.process.changeAssignee({
|
|
taskId: this.taskId,
|
|
assignee: treeNode[0].USID,
|
|
userId: this.$store.getters.userInfo.usid,
|
|
pId: this.prcId,
|
|
approvalOpinion:this.application
|
|
}).then(() => {
|
|
this.$message.success('转办成功')
|
|
this.$router.push({path: '/userCenter/processCenter', query: {id: this.$route.query.id}})
|
|
this.visibleTree = false
|
|
})
|
|
}
|
|
}
|
|
})
|
|
// taskId: this.$store.getters.getHandleInfo.taskId, // 任务id
|
|
// assignee: treeNode[0].userId, // 转办人
|
|
// userId: this.$store.getters.userInfo.userId, // dangqian人
|
|
// pId: this.$store.getters.getHandleInfo.prcId // 流程实例
|
|
|
|
|
|
},
|
|
handleSubmit(type) {
|
|
if(this.$refs.operationRef.submit()){
|
|
this.JuggleSub(this.taskId).then(res=> {
|
|
if(res){
|
|
let submit = JSON.parse(this.processOld.submitJson)
|
|
let dataJson = this.processOld.dataJson
|
|
let submitJson = JSON.stringify({...submit, ...this.$refs.operationRef.examineForm})
|
|
this.completeProcess({
|
|
dataJson,
|
|
submitJson,
|
|
taskId: this.taskId,
|
|
userId: this.$store.getters.userInfo.usid,
|
|
prcType: this.prcType,
|
|
reportId: this.processOld.dataId
|
|
})
|
|
}
|
|
})
|
|
}
|
|
|
|
// if (this.$refs.operationRef.submit()) {
|
|
// 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson
|
|
|
|
},
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|