流程详情

This commit is contained in:
yf
2021-06-23 15:29:02 +08:00
parent 72afe1c685
commit 8b317d0927
3 changed files with 292 additions and 32 deletions
@@ -3,11 +3,12 @@
<!-- 标准入库流程-->
<ProcessHeader toggle>
<template slot="proName">标准入库流程</template>
<template slot="proNode">经理人审批</template>
<template slot="proNode">责任人会签</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">审批历史</div>
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
<!-- <div class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">审批历史</div>-->
</div>
<div class="content" v-if="active === '1'">
<div style="flex: auto; overflow: auto;">
@@ -45,6 +46,7 @@
disabled
v-model="form.standYear"
type="year"
value-format="yyy"
placeholder="请选择标准年份">
</el-date-picker>
</el-form-item>
@@ -519,16 +521,16 @@
<el-collapse accordion>
<el-collapse-item title="意见填写">
<div style="margin: 10px 0;">
<el-select v-model="approvalOpinion" placeholder="请审批" style="margin-bottom: 20px;">
<el-option label="驳回" value="1"></el-option>
<el-option label="通过" value="0"></el-option>
</el-select>
<!-- <el-select v-model="approvalOpinion" placeholder="请审批" style="margin-bottom: 20px;">-->
<!-- <el-option label="驳回" value="1"></el-option>-->
<!-- <el-option label="通过" value="0"></el-option>-->
<!-- </el-select>-->
<el-input
type="textarea"
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="textarea">
v-model="commentText">
</el-input>
</div>
</el-collapse-item>
@@ -581,6 +583,75 @@
</el-timeline>
</div>
</div>
<div class="content" v-if="active === '3'">
<div class="flow-list">
<el-table
height="100%"
ref="selection"
:data="detailData"
tooltip-effect="dark"
style="width: 100%"
border
row-key="id"
:no-data-text="listNoDataText"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="name"
label="任务步骤"
align="center"
sortable="custom"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
sortable="custom"
>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
sortable="custom"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="endTime"
label="完成时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="comment"
label="审批意见"
align="center">
<template slot-scope="scope">
<span>{{scope.row.commentText}}</span>
</template>
</el-table-column>
<el-table-column
prop="completeFlag"
label="状态"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? '已完成' : '未完成'}}</span>
</template>
</el-table-column>
</el-table>
<loading :loading="loading">流程列表加载中</loading>
</div>
</div>
<ProcessFooter
show-save
show-submit
@@ -602,8 +673,14 @@ export default {
name: "bzrkStep3",
data () {
return {
// 当前流程类型(1待办/2已办)
processType: 1,
detailData: [],
userId:this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
approvalOpinion: '', // 通过/驳回
textarea: '', // 意见
commentText: '', // 意见
title: '', // 新增编辑抽屉标题
ListModel: false, // 新增编辑抽屉开关
active: '1', // 默认显示
@@ -668,6 +745,11 @@ export default {
glwj: '', // 关联文件
xglc: '', // 相关流程
chjl: '', // 参会记录
//流程信息
prcNum:'',
commentText:'',
prcName:'',
standType: '',
}, // 标准信息
standSortOptions: [], // 标准类别
standNatureOptions: [], // 标准性质
@@ -688,6 +770,9 @@ export default {
user3: '',
user4: '',
user5: '',
// 流程路由信息
prcNum : this.$route.query.prcNum,
prcName : this.$route.query.prcName,
}
},
components: {
@@ -695,20 +780,50 @@ export default {
ProcessFooter,
ProcessTitle
},
computed: {
listNoDataText () {
return this.processType === 1 ? '暂无待办流程' : '暂无已办流程'
},
},
methods: {
processTable () {
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum,
sortWord: this.shunxu ? this.paixu : '',
shunxu: this.shunxu
}, {
loading: 'loading',
_this: this
}, res => {
this.detailData = res
}, e => {})
},
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
if (res) {
this.form = JSON.parse(res.mesg)
const processForm = JSON.parse(res.mesg)
this.getFormFieldList(processForm)
}
}).catch(e => {
})
})
},
/**
* @description: 动态表单读取
*/
getFormFieldList (item) {
this.$nextTick(() => {
this.form = JSON.parse(JSON.stringify(item))
this.form.standType = this.form.standInData === '0' ? 'INLAND' : 'FOREIGN'
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
this.form['id'] = item.id
})
},
closeDrawer() {
this.ListModel = false
},
@@ -728,8 +843,22 @@ export default {
},
handleSave() {},
handleSubmit() {
this.form.commentText = this.commentText
this.form.approvalOpinion = this.approvalOpinion
const json = JSON.stringify(this.form);
console.log(json)
this.$http.post('lawss/activiti/completeTask', {
taskIds: this.taskIds,
userId : this.userId,
json: json
}, {
_this: this
}, res => {
console.log(res);
// if (res.success) {
// this.processCreateStand(json)
// }
})
// this.$http.post('lawss/activiti/completeTask', {
// taskIds: res.data,
// userId : this.$store.getters.userInfo.userId,
@@ -767,6 +896,7 @@ export default {
},
},
mounted () {
this.processTable()
this.getData()
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
@@ -3,11 +3,12 @@
<!-- 标准入库流程-->
<ProcessHeader toggle>
<template slot="proName">标准入库流程</template>
<template slot="proNode">经理人审批</template>
<template slot="proNode">申请人修订</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">审批历史</div>
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
<!-- <div class="headerTabsItem" :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">审批历史</div>-->
</div>
<div class="content" v-if="active === '1'">
<div style="flex: auto; overflow: auto;">
@@ -45,6 +46,7 @@
disabled
v-model="form.standYear"
type="year"
value-format="yyy"
placeholder="请选择标准年份">
</el-date-picker>
</el-form-item>
@@ -516,23 +518,23 @@
</el-form>
</div>
<div>
<!-- <el-collapse accordion>-->
<!-- <el-collapse-item title="意见填写">-->
<!-- <div style="margin: 10px 0;">-->
<el-collapse accordion>
<el-collapse-item title="意见填写">
<div style="margin: 10px 0;">
<!-- <el-select v-model="approvalOpinion" placeholder="请审批" style="margin-bottom: 20px;">-->
<!-- <el-option label="驳回" value="1"></el-option>-->
<!-- <el-option label="通过" value="0"></el-option>-->
<!-- </el-select>-->
<!-- <el-input-->
<!-- type="textarea"-->
<!-- :rows="3"-->
<!-- resize="none"-->
<!-- placeholder="请输入意见"-->
<!-- v-model="textarea">-->
<!-- </el-input>-->
<!-- </div>-->
<!-- </el-collapse-item>-->
<!-- </el-collapse>-->
<el-input
type="textarea"
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="commentText">
</el-input>
</div>
</el-collapse-item>
</el-collapse>
</div>
</div>
<div class="content" v-if="active === '2'">
@@ -581,6 +583,75 @@
</el-timeline>
</div>
</div>
<div class="content" v-if="active === '3'">
<div class="flow-list">
<el-table
height="100%"
ref="selection"
:data="detailData"
tooltip-effect="dark"
style="width: 100%"
border
row-key="id"
:no-data-text="listNoDataText"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="name"
label="任务步骤"
align="center"
sortable="custom"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
sortable="custom"
>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
sortable="custom"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="endTime"
label="完成时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="comment"
label="审批意见"
align="center">
<template slot-scope="scope">
<span>{{scope.row.commentText}}</span>
</template>
</el-table-column>
<el-table-column
prop="completeFlag"
label="状态"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? '已完成' : '未完成'}}</span>
</template>
</el-table-column>
</el-table>
<loading :loading="loading">流程列表加载中</loading>
</div>
</div>
<ProcessFooter
show-save
show-submit
@@ -602,8 +673,14 @@ export default {
name: "bzrkStep4",
data () {
return {
// 当前流程类型(1待办/2已办)
processType: 1,
detailData: [],
userId:this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
approvalOpinion: '', // 通过/驳回
textarea: '', // 意见
commentText: '', // 意见
title: '', // 新增编辑抽屉标题
ListModel: false, // 新增编辑抽屉开关
active: '1', // 默认显示
@@ -668,6 +745,11 @@ export default {
glwj: '', // 关联文件
xglc: '', // 相关流程
chjl: '', // 参会记录
//流程信息
prcNum:'',
commentText:'',
prcName:'',
standType: '',
}, // 标准信息
standSortOptions: [], // 标准类别
standNatureOptions: [], // 标准性质
@@ -688,6 +770,9 @@ export default {
user3: '',
user4: '',
user5: '',
// 流程路由信息
prcNum : this.$route.query.prcNum,
prcName : this.$route.query.prcName,
}
},
components: {
@@ -695,20 +780,50 @@ export default {
ProcessFooter,
ProcessTitle
},
computed: {
listNoDataText () {
return this.processType === 1 ? '暂无待办流程' : '暂无已办流程'
},
},
methods: {
processTable () {
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.$route.query.prcNum,
sortWord: this.shunxu ? this.paixu : '',
shunxu: this.shunxu
}, {
loading: 'loading',
_this: this
}, res => {
this.detailData = res
}, e => {})
},
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
if (res) {
this.form = JSON.parse(res.mesg)
const processForm = JSON.parse(res.mesg)
this.getFormFieldList(processForm)
}
}).catch(e => {
})
})
},
/**
* @description: 动态表单读取
*/
getFormFieldList (item) {
this.$nextTick(() => {
this.form = JSON.parse(JSON.stringify(item))
this.form.standType = this.form.standInData === '0' ? 'INLAND' : 'FOREIGN'
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
this.form['id'] = item.id
})
},
closeDrawer() {
this.ListModel = false
},
@@ -728,8 +843,22 @@ export default {
},
handleSave() {},
handleSubmit() {
this.form.commentText = this.commentText
this.form.approvalOpinion = this.approvalOpinion
const json = JSON.stringify(this.form);
console.log(json)
this.$http.post('lawss/activiti/completeTask', {
taskIds: this.taskIds,
userId : this.userId,
json: json
}, {
_this: this
}, res => {
console.log(res);
if (res.success) {
this.processCreateStand(json)
}
})
// this.$http.post('lawss/activiti/completeTask', {
// taskIds: res.data,
// userId : this.$store.getters.userInfo.userId,
@@ -767,6 +896,7 @@ export default {
},
},
mounted () {
this.processTable()
this.getData()
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
@@ -233,7 +233,7 @@ export default {
})
}else if (row.taskInfo === '责任人会签'){
this.$router.push({
name: 'step3',
name: 'bzrkStep3',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
@@ -244,7 +244,7 @@ export default {
})
}else if (row.taskInfo === '申请人修订'){
this.$router.push({
name: 'step4',
name: 'bzrkStep4',
query: {
taskIds: row.taskIds,
prcId: row.prcId,