【新增】增加报告上传流程
This commit is contained in:
@@ -0,0 +1,195 @@
|
||||
<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">
|
||||
<span class="base_title">审批历史</span>
|
||||
<process-approval-history :prcNum="prcNum"></process-approval-history>
|
||||
</div>
|
||||
<!-- v-if="$route.query.type !=='yiban'"-->
|
||||
<div class="process_content" v-if="$route.query.type !=='yiban'">
|
||||
<span class="base_title">审核信息</span>
|
||||
<audit-operation ref="operationRef" :examine="submitjson" :is-disable="disabled"></audit-operation>
|
||||
</div>
|
||||
</div>
|
||||
<process-footer
|
||||
v-if="!disabled"
|
||||
showCancel
|
||||
:show-transfer="isShowTran"
|
||||
:show-submit="isShowSubmit"
|
||||
:submitLoading="isSubmit"
|
||||
:TransferLoading="tranLoading"
|
||||
@transfer="handleTransfer"
|
||||
@submit="handleSubmit"
|
||||
></process-footer>
|
||||
<!-- <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 processFooter from '@/components/ProcessFooter'
|
||||
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,
|
||||
processFooter,
|
||||
processApprovalHistory,
|
||||
auditOperation,
|
||||
processChooseTree,
|
||||
reportForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
processFormRule: {
|
||||
prcName: [{
|
||||
required: true,
|
||||
message: '请输入流程名称',
|
||||
trigger: 'change'
|
||||
},{
|
||||
max: 100,
|
||||
message: '申请原因最多填写100字符',
|
||||
trigger: 'change'
|
||||
}]
|
||||
},
|
||||
processForm: { prcName : ''},
|
||||
visibleTree: false,
|
||||
isSubmit: false,
|
||||
tranLoading: false,
|
||||
isShowTran: true,
|
||||
isShowSubmit: true,
|
||||
formControl: true,
|
||||
disabled:false,
|
||||
assignForm: {},
|
||||
tableData: [],
|
||||
applicationForm: {
|
||||
power:'',
|
||||
applyReason:''
|
||||
},
|
||||
q: {
|
||||
pageSize: 10000,
|
||||
pageNo: 1
|
||||
},
|
||||
PERMISSION,
|
||||
submitjson:{},
|
||||
prcType:1
|
||||
}
|
||||
},
|
||||
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.$set(this.processForm,'prcName',this.prcName)
|
||||
|
||||
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() {
|
||||
this.visibleTree = true
|
||||
},
|
||||
// 选择转办
|
||||
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
|
||||
}).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() {
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
// if (this.$refs.operationRef.submit()) {
|
||||
// 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user