【修改】权限申请流程修改页面
This commit is contained in:
@@ -6,19 +6,19 @@
|
||||
:rules="examineFormRules"
|
||||
size="medium"
|
||||
class="label-input-form prc-content-border">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="9">
|
||||
<el-form-item label="选择赋权时间:" prop="date"
|
||||
label-width="132px" class="add-form-item"
|
||||
:class="{'form-item-disabled': formdisableflag}">
|
||||
<el-date-picker
|
||||
v-model="examineForm.date"
|
||||
type="date"
|
||||
placeholder="选择赋权时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row :gutter="24">-->
|
||||
<!-- <el-col :span="9">-->
|
||||
<!-- <el-form-item label="选择赋权时间:" prop="date"-->
|
||||
<!-- label-width="132px" class="add-form-item"-->
|
||||
<!-- :class="{'form-item-disabled': formdisableflag}">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="examineForm.date"-->
|
||||
<!-- type="date"-->
|
||||
<!-- placeholder="选择赋权时间">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审批结果:" prop="flag"
|
||||
@@ -76,15 +76,10 @@ export default {
|
||||
examineForm: {
|
||||
planReasonFile: '',
|
||||
oldName: '',
|
||||
flag: '1'
|
||||
flag: '1',
|
||||
approvalOpinion: ''
|
||||
},
|
||||
examineFormRules: {
|
||||
date: [
|
||||
{ required: true, message: '选择赋权时间不能为空', trigger: 'change' }
|
||||
],
|
||||
oldName: [
|
||||
{ required: true, message: '添加指派不能为空', trigger: 'change' }
|
||||
],
|
||||
flag: [
|
||||
{ required: true, message: '审核结果不能为空', trigger: 'change' }
|
||||
],
|
||||
|
||||
@@ -2,10 +2,21 @@
|
||||
<!-- 此页面主要展示审核和已完成-->
|
||||
<div class="process">
|
||||
<div class="process_box">
|
||||
<process-header :title="'权限审批'" :proceesNum="'proceesNum'"></process-header>
|
||||
<process-header :title="'权限审批'" :proceesNum="this.processOld.prcNum"></process-header>
|
||||
<div class="procedure">
|
||||
<div class="process_content">
|
||||
<span class="base_title">基础信息</span>
|
||||
<el-form ref="processFormRef" :model="processForm" label-width="150px"
|
||||
:rules="processFormRule" class="label-input-form" size="medium">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="流程名称:" prop="prcName">
|
||||
<el-input readonly :disabled="formControl " v-model="processForm.prcName" @click.native="handleCheck('spr1')"
|
||||
placeholder="请输入流程名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<report-table v-model="tableData" @updateTable="(newValue)=>{tableData=newValue}" :disabled="formControl"></report-table>
|
||||
</el-row>
|
||||
@@ -72,9 +83,10 @@ import processApprovalHistory from '@/components/ProcessApprovalHistory'
|
||||
import auditOperation from './components/AuditOperation'
|
||||
import reportTable from './components/reportTable'
|
||||
import { PERMISSION } from '@/utils/Enum/enum'
|
||||
|
||||
import processMixin from "../../components/ProcessMixin";
|
||||
export default {
|
||||
name: 'launch',
|
||||
mixins: [processMixin],
|
||||
components: {
|
||||
processHeader,
|
||||
reportTable,
|
||||
@@ -85,6 +97,18 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
processFormRule: {
|
||||
prcName: [{
|
||||
required: true,
|
||||
message: '请输入流程名称',
|
||||
trigger: 'change'
|
||||
},{
|
||||
max: 100,
|
||||
message: '申请原因最多填写100字符',
|
||||
trigger: 'change'
|
||||
}]
|
||||
},
|
||||
processForm: { prcName : ''},
|
||||
visibleTree: false,
|
||||
isSubmit: false,
|
||||
tranLoading: false,
|
||||
@@ -124,10 +148,20 @@ export default {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
if (this.$route.query.ids) {
|
||||
this.reportList(this.$route.query.ids)
|
||||
}
|
||||
console.log(this.PERMISSION, 'ddd')
|
||||
this.getProcessDetail().then(res=>{
|
||||
this.applicationForm.name = JSON.parse(this.processOld.dataJson).name
|
||||
this.applicationForm.send = JSON.parse(this.processOld.dataJson).send
|
||||
this.tableData = JSON.parse(this.processOld.dataJson).tableData
|
||||
this.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName
|
||||
this.formControl= true
|
||||
if(this.$route.query.yiban){
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 获取表格列表 吧查询到的值传给子组件
|
||||
|
||||
@@ -5,6 +5,17 @@
|
||||
<div class="procedure">
|
||||
<div class="process_content">
|
||||
<span class="base_title">基础信息</span>
|
||||
<el-form ref="processFormRef" :model="processForm" label-width="150px"
|
||||
:rules="processFormRule" class="label-input-form" size="medium">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="流程名称:" prop="prcName">
|
||||
<el-input readonly :disabled="formControl || formControlname" v-model="processForm.prcName" @click.native="handleCheck('spr1')"
|
||||
placeholder="请输入流程名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<report-table v-model="tableData" @updateTable="(newValue)=>{tableData=newValue}"></report-table>
|
||||
</el-row>
|
||||
@@ -106,6 +117,7 @@ import processApprovalHistory from '@/components/ProcessApprovalHistory'
|
||||
import reportTable from './components/reportTable'
|
||||
import { PERMISSION } from '@/utils/Enum/enum'
|
||||
import orgTable from '../../components/OrgTable'
|
||||
import processMixin from "../../components/ProcessMixin";
|
||||
export default {
|
||||
name: 'launch',
|
||||
components: {
|
||||
@@ -115,9 +127,10 @@ export default {
|
||||
processApprovalHistory,
|
||||
orgTable
|
||||
},
|
||||
mixins: [processMixin],
|
||||
data () {
|
||||
return {
|
||||
initShow: false, // 控制审批历史是否显示
|
||||
initShow: false, // 控制审批历史是否显示 只有在不是第一次的时候才是true
|
||||
treeType: '',
|
||||
orgTableVal: '',
|
||||
orgTableValName: '',
|
||||
@@ -127,17 +140,35 @@ export default {
|
||||
isShowReset: true,
|
||||
isShowSubmit: true,
|
||||
formControl: false,
|
||||
formControlname: false,
|
||||
assignForm: {
|
||||
oneApprove: '',
|
||||
twoApprove: ''
|
||||
},
|
||||
tableData: [],
|
||||
applicationForm: {},
|
||||
applicationForm: {
|
||||
name:'',
|
||||
send:''
|
||||
},
|
||||
q: {
|
||||
pageSize: 10000,
|
||||
pageNo: 1
|
||||
},
|
||||
PERMISSION,
|
||||
processForm: {
|
||||
prcName:''
|
||||
},
|
||||
processFormRule: {
|
||||
prcName: [{
|
||||
required: true,
|
||||
message: '请输入流程名称',
|
||||
trigger: 'change'
|
||||
},{
|
||||
max: 100,
|
||||
message: '申请原因最多填写100字符',
|
||||
trigger: 'change'
|
||||
}]
|
||||
},
|
||||
applicationFormRule: {
|
||||
name: [{
|
||||
max: 1000, message: '申请原因最多填写1000字符'
|
||||
@@ -169,6 +200,22 @@ export default {
|
||||
if (this.$route.query.ids) {
|
||||
this.reportList(this.$route.query.ids)
|
||||
this.handleReset()
|
||||
}
|
||||
if(this.$route.query.taskDefinitionKey){
|
||||
this.initShow = true
|
||||
this.formControlname=true
|
||||
this.getProcessDetail().then(res =>{
|
||||
//指派信息
|
||||
this.applicationForm.name = JSON.parse(this.processOld.dataJson).name
|
||||
this.applicationForm.send = JSON.parse(this.processOld.dataJson).send
|
||||
this.tableData = JSON.parse(this.processOld.dataJson).tableData
|
||||
this.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName
|
||||
//基础信息
|
||||
this.assignForm=JSON.parse(this.processOld.submitJson)
|
||||
})
|
||||
}
|
||||
if(this.$route.query.yiban){
|
||||
|
||||
}
|
||||
console.log(this.PERMISSION, 'ddd')
|
||||
},
|
||||
@@ -215,7 +262,10 @@ export default {
|
||||
},
|
||||
handleReset () {
|
||||
this.applicationForm = {
|
||||
name:'',
|
||||
send:''
|
||||
}
|
||||
this.processForm.prcName=''
|
||||
this.assignForm = {
|
||||
oneApprove: '',
|
||||
twoApprove: ''
|
||||
@@ -223,25 +273,49 @@ export default {
|
||||
this.$refs.applicationFormRef.clearValidate()
|
||||
this.$refs.assignFormRef.clearValidate()
|
||||
},
|
||||
// 整理数据
|
||||
organizeData() {
|
||||
let userId = this.$store.getters.userInfo.USID
|
||||
this.tableData=this.tableData.map(item=>{
|
||||
item = {...item, ... this.applicationForm,userId:userId}
|
||||
return item
|
||||
})
|
||||
},
|
||||
// 提交
|
||||
handleSubmit () {
|
||||
this.$refs.assignFormRef.validate(v => {
|
||||
this.$refs.applicationFormRef.validate(m => {
|
||||
if (v && m) {
|
||||
// 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
|
||||
// 表格数据没有不能提交 需要提示
|
||||
if (this.tableData.length == 0) {
|
||||
this.$message.warning('至少需要选择一条报告数据')
|
||||
this.$refs.processFormRef.validate(z =>{
|
||||
if (v && m && z) {
|
||||
// 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
|
||||
// 表格数据没有不能提交 需要提示
|
||||
if (this.tableData.length == 0) {
|
||||
this.$message.warning('至少需要选择一条报告数据')
|
||||
} else {
|
||||
// 调用流程数据
|
||||
console.log("发送数据")
|
||||
// 处理表格数据
|
||||
this.organizeData()
|
||||
//如果不是第一次
|
||||
if(this.initShow){
|
||||
this.completeProcess()
|
||||
}else{
|
||||
this.startProcess()
|
||||
this.completeProcess()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 调用流程数据
|
||||
console.log("发送数据")
|
||||
this.$message.warning('请检查表单填写完整')
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请检查表单填写完整')
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
startProcess() {
|
||||
|
||||
},
|
||||
//获取流程详细信息
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user