外部署名推荐流程

This commit is contained in:
宋伟佳
2021-11-01 14:49:42 +08:00
parent 403fb22aa4
commit 6bdc678459
7 changed files with 1759 additions and 34 deletions
@@ -62,7 +62,7 @@
<el-table-column prop="workPeople" label="推荐署名人及单位" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.workPeopleId" style="display: none;" readonly/>
<el-input v-model="scope.row.workPeople" placeholder="请选择分发责任人"
<el-input v-model="scope.row.workPeople" placeholder="请选择推荐署名人及单位"
@click.native="choiceZRRS(scope.row, scope.$index)" readonly/>
</template>
</el-table-column>
@@ -343,7 +343,7 @@
import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import { startProcess, completeTask, saveTaskFirst, queryTaskFirst } from '@/api/process.js'
import { startProcess, completeTask, saveTaskFirst, queryTaskFirst, inboundLiaisonDetail } from "@/api/process.js";
export default {
name: "wbsmStep1",
data() {
@@ -424,6 +424,7 @@ export default {
},
mounted() {
this.getStandData()
this.getData()
//从数据库中查询下拉框数据
this.$http.get('sys/dictype/getDicTypeListCode', '',{
_this:this
@@ -435,6 +436,30 @@ export default {
})
},
methods: {
getData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId
}).then(res => {
if (res) {
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
}
}).catch(e => {
});
});
},
/**
* @description: 动态表单读取
*/
getFormFieldList(item) {
console.log(item);
this.$nextTick(() => {
this.dataList = item.dataList
this.roleForm = item.roleForm
});
},
//点击新增事件
addList() {
this.standModel = true
@@ -617,8 +642,8 @@ export default {
this.$message.warning('请选择推荐署名人及单位')
}
})
this.roleForm.commentText = this.commentText
let json = {
commentText: this.commentText,
roleForm: this.roleForm,
dataList: this.dataList,
}
@@ -309,13 +309,7 @@ export default {
console.log(item);
this.$nextTick(() => {
this.dataList = item.dataList
// if(!item.directorUser){
// this.wbbzform = JSON.parse(JSON.stringify(item));
// this.associationData = item.associationData
// this.participantsData = item.participantsData
// }else{
//
// }
this.roleForm = item.roleForm
});
},
// 批量选择分发责任人
@@ -369,10 +363,51 @@ export default {
},
// 提交按钮
handleSubmit() {
this.isSubmit = true
let son = {
signFlag: '1',
commentText: this.commentText,
dataList: this.dataList,
roleForm: this.roleForm
}
var json = JSON.stringify(son)
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
this.isSubmit = false
}, e => {
});
},
//驳回按钮
beforeBack(){
let son = {
signFlag: '2',
commentText: this.commentText,
dataList: this.dataList,
roleForm: this.roleForm
}
var json = JSON.stringify(son)
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
}, e => {
});
},
//转办按钮
handleTransfer(){
@@ -0,0 +1,539 @@
<template>
<div class="wfhxzgStep2">
<ProcessHeader toggle>
<template slot="proName">外部署名推荐审批流程</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 === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div>
<div class="content" v-show="active === '1'">
<div style="flex: auto;">
<ProcessTitle>
<template slot="title">基础信息</template>
</ProcessTitle>
<el-table
:data="dataList"
border
ref="entryTable"
height="90%"
style="width: 100%"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="code"
width="180px"
align="center"
label="标准号">
<template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{
scope.row.standNumber
}}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSortShow }}
{{ scope.row.standNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称"
align="center"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column prop="standSortShow" label="标准类别" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<a>{{ scope.row.standSortShow }}</a>
</template>
</el-table-column>
<el-table-column prop="workPeople" label="推荐署名人及单位" align="center">
</el-table-column>
<el-table-column prop="reason" label="推荐署名原因" align="center">
</el-table-column>
<el-table-column prop="expenses" label="费用" align="center">
</el-table-column>
</el-table>
</div>
<el-collapse accordion>
<el-collapse-item title="回执说明">
<div style="margin: 10px 0;">
<el-input
type="textarea"
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="commentText">
</el-input>
</div>
</el-collapse-item>
</el-collapse>
</div>
<div class="content" v-show="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"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
>
</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-back
show-transfer
show-submit
:submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading"
:approval="true"
@back="beforeBack"
@transfer="handleTransfer"
@submit="handleSubmit"
>
</ProcessFooter>
<Role-tree
:is-title="drawerTitle"
check-box
:is-visible.sync="modalshowflag"
:nodeList="nodeList"
@checkedRole="drawerCheck"
/>
<!-- 福田全公司选人解决方案 -->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="drawerModal"
@checkedRole="checkedTransferRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
<script>
import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import { roleTreeData } from "@/api/unqualProcess.js"
import {completeTask, inboundLiaisonDetail, saveinboundTask, saveTaskForPub, changeAssigneeNew} from "@/api/process.js"
export default {
name: "wbsmStep3",
data() {
return {
passInfo: 0,
detailData: [],
loading: false,
commentText: '', // 意见
title: '', // 新增编辑抽屉标题
isTransfer: false,
ListModel: false, // 新增编辑抽屉开关
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
userId: this.$route.query.taskAssignee,
nonSearch: {
standSerialNumber: '',
standId: '', // 标准号/名称
productName: '', // 项目名称
responsibleUnit: '' // 责任部门
},
active: '1', // 默认显示
isSubmit: false,
saveLoading: false,
turnLoading: false,
drawerModal: false,
dataList: [],
endDataList: [],
lastDataList: [],
// 新增选择分发责任人数组
multipleSelection: [],
// 当前页数
pageNo: 1,
total: 0,
myLoading: false,
// 责任部门
zNodesSItem: [],
clearSelection: false,
nodeList: [],
drawerTitle: '', //drawer标题
modalshowflag: false, // drawer开关
roleForm: {
dutyUserInfo: [],
dutyUserInfoName: [],
dutyPeopleInfo: '',
dutyPeople: ''
},
rowDutyPeople: {},
props: { label: 'name', children: 'children', value: 'id', multiple: true, disabled: false },
dutyUserCaseData: [],
roleFormRules: {},
treeData: [], // 人员数据
defaultProps: {
children: 'children',
label: 'name'
},
}
},
components: {
ProcessHeader,
ProcessFooter,
ProcessTitle
},
created() {
this.processTable();
this.getData();
},
computed: {
listNoDataText() {
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
}
},
watch: {
nonSearch(val) {
this.nonSearch = val
}
},
methods: {
//确认转办
checkedTransferRole (data) {
this.assigneeNewLoading = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例
}).then(res => {
this.isTransfer = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
this.$router.push("/processCenter");
this.processNum()
} else {
this.$message.warning(res.message)
}
})
},
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
}).then(res => {
if (res) {
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
}
}).catch(e => {
});
});
},
/**
* @description: 动态表单读取
*/
getFormFieldList(item) {
console.log(item);
this.$nextTick(() => {
this.dataList = item.dataList
this.roleForm = item.roleForm
});
},
// 批量选择分发责任人
dutyEngineerList(id) {
if (this.multipleSelection.length === 0) {
this.$message.warning("请选择至少一条数据进行分发责任人");
} else {
this.nodeList = []
this.nodeList.push(id)
this.modalshowflag = true
}
},
// 每行选择负责人点击操作
clickOpen(val, id) {
this.$refs.multipleTable.clearSelection()
this.rowDutyPeople = val
this.nodeList = []
this.nodeList.push(id)
this.modalshowflag = true
},
// 选择勾选项的集合
handleSelectionChange(value) {
this.multipleSelection = value
},
handleTabs(name) {
this.active = name
},
// 转办按钮
handleTurnTo() {
this.modalshowflag = true
this.drawerTitle = '转办处理人'
},
// 保存按钮
handleSave() {
this.saveLoading = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
// roleForm: this.roleForm,
standardInfoList: this.dataList,
commentText: this.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
})
},
// 提交按钮
handleSubmit() {
this.isSubmit = true
let son = {
signFlag: '1',
commentText: this.commentText,
dataList: this.dataList,
roleForm: this.roleForm
}
var json = JSON.stringify(son)
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
this.isSubmit = false
}, e => {
});
},
//驳回按钮
beforeBack(){
let son = {
signFlag: '2',
commentText: this.commentText,
dataList: this.dataList,
roleForm: this.roleForm
}
var json = JSON.stringify(son)
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
}, e => {
});
},
//转办按钮
handleTransfer(){
this.drawerModal = true
this.drawerTitle = '转办处理人'
this.selectPeople = row
},
// 流程阶段负责人选择
choiceZRR (type, title, id) {
this.nodeList = []
this.nodeList.push(id)
this.type = type
this.drawerTitle = title
this.modalshowflag = true
},
drawerCheck (data) {
if (this.drawerTitle === '转办处理人') {
this.turnLoading = true
changeAssigneeNew({
taskId: this.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.userId, // 委托人
pId: this.pId // 流程实例
}).then(res =>{
if (res.success) {
this.turnLoading = false
this.$message.success('调整成功')
this.$router.push("/processCenter")
} else {
this.$message.warning(res.message)
}
})
} else {
this.roleRow = data[0]
// 选取负责人时的操作
if (this.multipleSelection.length === 0) {
this.rowDutyPeople.dutyPeopleInfo = this.roleRow.name
this.rowDutyPeople.dutyPeopleInfoId = this.roleRow.id
}else {
this.multipleSelection.forEach(item => {
item.dutyPeopleInfo = this.roleRow.name
item.dutyPeopleInfoId = this.roleRow.id
})
this.$refs.multipleTable.clearSelection()
}
this.lastDataList = this.dataList
// 选取流程信息完成
// this.roleForm.dutyUserInfoName = this.roleRow.name
}
this.modalshowflag = false
},
// 点击查看
handlePreview (item) {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.standId,
// pageType: 'FOREIGN_STAND'
pageType: item.standType + '_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
// 清空 查询条件
clearAllSearch () {
this.nonSearch = {
standId: '',
standSerialNumber: '',
productName: '',
responsibleUnit: ''
}
this.getData()
},
// 分页事件
pageChange (page) {
this.pageNo = page
this.getTableByPage()
},
pageSizeChange () {
this.getTableByPage()
},
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/style';
.wfhxzgStep2 {
/deep/.el-drawer__container {
.prc-content-border {
border: none;
padding: 0 20px 0;
}
}
position: relative;
height: 100%;
.headerTabs {
height: 52px;
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 10px;
.headerTabsItem {
border: 1px solid #c1c1c1;
padding: 0 5px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
.active {
border: 1px solid #E6A23C;
color: #fff;
background: #E6A23C;
}
}
.content-center {
padding: 10px 0px 10px 10px;
}
.content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'100% - 103px');
overflow: auto;
}
}
</style>
@@ -0,0 +1,539 @@
<template>
<div class="wfhxzgStep2">
<ProcessHeader toggle>
<template slot="proName">外部署名推荐审批流程</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 === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div>
<div class="content" v-show="active === '1'">
<div style="flex: auto;">
<ProcessTitle>
<template slot="title">基础信息</template>
</ProcessTitle>
<el-table
:data="dataList"
border
ref="entryTable"
height="90%"
style="width: 100%"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="code"
width="180px"
align="center"
label="标准号">
<template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{
scope.row.standNumber
}}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSortShow }}
{{ scope.row.standNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称"
align="center"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column prop="standSortShow" label="标准类别" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<a>{{ scope.row.standSortShow }}</a>
</template>
</el-table-column>
<el-table-column prop="workPeople" label="推荐署名人及单位" align="center">
</el-table-column>
<el-table-column prop="reason" label="推荐署名原因" align="center">
</el-table-column>
<el-table-column prop="expenses" label="费用" align="center">
</el-table-column>
</el-table>
</div>
<el-collapse accordion>
<el-collapse-item title="回执说明">
<div style="margin: 10px 0;">
<el-input
type="textarea"
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="commentText">
</el-input>
</div>
</el-collapse-item>
</el-collapse>
</div>
<div class="content" v-show="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"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
>
</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-back
show-transfer
show-submit
:submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading"
:approval="true"
@back="beforeBack"
@transfer="handleTransfer"
@submit="handleSubmit"
>
</ProcessFooter>
<Role-tree
:is-title="drawerTitle"
check-box
:is-visible.sync="modalshowflag"
:nodeList="nodeList"
@checkedRole="drawerCheck"
/>
<!-- 福田全公司选人解决方案 -->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="drawerModal"
@checkedRole="checkedTransferRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
<script>
import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import { roleTreeData } from "@/api/unqualProcess.js"
import {completeTask, inboundLiaisonDetail, saveinboundTask, saveTaskForPub, changeAssigneeNew} from "@/api/process.js"
export default {
name: "wbsmStep4",
data() {
return {
passInfo: 0,
detailData: [],
loading: false,
commentText: '', // 意见
title: '', // 新增编辑抽屉标题
isTransfer: false,
ListModel: false, // 新增编辑抽屉开关
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
userId: this.$route.query.taskAssignee,
nonSearch: {
standSerialNumber: '',
standId: '', // 标准号/名称
productName: '', // 项目名称
responsibleUnit: '' // 责任部门
},
active: '1', // 默认显示
isSubmit: false,
saveLoading: false,
turnLoading: false,
drawerModal: false,
dataList: [],
endDataList: [],
lastDataList: [],
// 新增选择分发责任人数组
multipleSelection: [],
// 当前页数
pageNo: 1,
total: 0,
myLoading: false,
// 责任部门
zNodesSItem: [],
clearSelection: false,
nodeList: [],
drawerTitle: '', //drawer标题
modalshowflag: false, // drawer开关
roleForm: {
dutyUserInfo: [],
dutyUserInfoName: [],
dutyPeopleInfo: '',
dutyPeople: ''
},
rowDutyPeople: {},
props: { label: 'name', children: 'children', value: 'id', multiple: true, disabled: false },
dutyUserCaseData: [],
roleFormRules: {},
treeData: [], // 人员数据
defaultProps: {
children: 'children',
label: 'name'
},
}
},
components: {
ProcessHeader,
ProcessFooter,
ProcessTitle
},
created() {
this.processTable();
this.getData();
},
computed: {
listNoDataText() {
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
}
},
watch: {
nonSearch(val) {
this.nonSearch = val
}
},
methods: {
//确认转办
checkedTransferRole (data) {
this.assigneeNewLoading = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例
}).then(res => {
this.isTransfer = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
this.$router.push("/processCenter");
this.processNum()
} else {
this.$message.warning(res.message)
}
})
},
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
}).then(res => {
if (res) {
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
}
}).catch(e => {
});
});
},
/**
* @description: 动态表单读取
*/
getFormFieldList(item) {
console.log(item);
this.$nextTick(() => {
this.dataList = item.dataList
this.roleForm = item.roleForm
});
},
// 批量选择分发责任人
dutyEngineerList(id) {
if (this.multipleSelection.length === 0) {
this.$message.warning("请选择至少一条数据进行分发责任人");
} else {
this.nodeList = []
this.nodeList.push(id)
this.modalshowflag = true
}
},
// 每行选择负责人点击操作
clickOpen(val, id) {
this.$refs.multipleTable.clearSelection()
this.rowDutyPeople = val
this.nodeList = []
this.nodeList.push(id)
this.modalshowflag = true
},
// 选择勾选项的集合
handleSelectionChange(value) {
this.multipleSelection = value
},
handleTabs(name) {
this.active = name
},
// 转办按钮
handleTurnTo() {
this.modalshowflag = true
this.drawerTitle = '转办处理人'
},
// 保存按钮
handleSave() {
this.saveLoading = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
// roleForm: this.roleForm,
standardInfoList: this.dataList,
commentText: this.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
})
},
// 提交按钮
handleSubmit() {
this.isSubmit = true
let son = {
signFlag: '1',
commentText: this.commentText,
dataList: this.dataList,
roleForm: this.roleForm
}
var json = JSON.stringify(son)
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
this.isSubmit = false
}, e => {
});
},
//驳回按钮
beforeBack(){
let son = {
signFlag: '2',
commentText: this.commentText,
dataList: this.dataList,
roleForm: this.roleForm
}
var json = JSON.stringify(son)
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
}, e => {
});
},
//转办按钮
handleTransfer(){
this.drawerModal = true
this.drawerTitle = '转办处理人'
this.selectPeople = row
},
// 流程阶段负责人选择
choiceZRR (type, title, id) {
this.nodeList = []
this.nodeList.push(id)
this.type = type
this.drawerTitle = title
this.modalshowflag = true
},
drawerCheck (data) {
if (this.drawerTitle === '转办处理人') {
this.turnLoading = true
changeAssigneeNew({
taskId: this.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.userId, // 委托人
pId: this.pId // 流程实例
}).then(res =>{
if (res.success) {
this.turnLoading = false
this.$message.success('调整成功')
this.$router.push("/processCenter")
} else {
this.$message.warning(res.message)
}
})
} else {
this.roleRow = data[0]
// 选取负责人时的操作
if (this.multipleSelection.length === 0) {
this.rowDutyPeople.dutyPeopleInfo = this.roleRow.name
this.rowDutyPeople.dutyPeopleInfoId = this.roleRow.id
}else {
this.multipleSelection.forEach(item => {
item.dutyPeopleInfo = this.roleRow.name
item.dutyPeopleInfoId = this.roleRow.id
})
this.$refs.multipleTable.clearSelection()
}
this.lastDataList = this.dataList
// 选取流程信息完成
// this.roleForm.dutyUserInfoName = this.roleRow.name
}
this.modalshowflag = false
},
// 点击查看
handlePreview (item) {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.standId,
// pageType: 'FOREIGN_STAND'
pageType: item.standType + '_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
// 清空 查询条件
clearAllSearch () {
this.nonSearch = {
standId: '',
standSerialNumber: '',
productName: '',
responsibleUnit: ''
}
this.getData()
},
// 分页事件
pageChange (page) {
this.pageNo = page
this.getTableByPage()
},
pageSizeChange () {
this.getTableByPage()
},
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/style';
.wfhxzgStep2 {
/deep/.el-drawer__container {
.prc-content-border {
border: none;
padding: 0 20px 0;
}
}
position: relative;
height: 100%;
.headerTabs {
height: 52px;
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 10px;
.headerTabsItem {
border: 1px solid #c1c1c1;
padding: 0 5px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
.active {
border: 1px solid #E6A23C;
color: #fff;
background: #E6A23C;
}
}
.content-center {
padding: 10px 0px 10px 10px;
}
.content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'100% - 103px');
overflow: auto;
}
}
</style>
@@ -0,0 +1,539 @@
<template>
<div class="wfhxzgStep2">
<ProcessHeader toggle>
<template slot="proName">外部署名推荐审批流程</template>
<template slot="proNode">工程研究总院院长/FU/BU/SBU领导审批</template>
</ProcessHeader>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
</div>
<div class="content" v-show="active === '1'">
<div style="flex: auto;">
<ProcessTitle>
<template slot="title">基础信息</template>
</ProcessTitle>
<el-table
:data="dataList"
border
ref="entryTable"
height="90%"
style="width: 100%"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="code"
width="180px"
align="center"
label="标准号">
<template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{
scope.row.standNumber
}}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSortShow }}
{{ scope.row.standNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称"
align="center"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column prop="standSortShow" label="标准类别" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<a>{{ scope.row.standSortShow }}</a>
</template>
</el-table-column>
<el-table-column prop="workPeople" label="推荐署名人及单位" align="center">
</el-table-column>
<el-table-column prop="reason" label="推荐署名原因" align="center">
</el-table-column>
<el-table-column prop="expenses" label="费用" align="center">
</el-table-column>
</el-table>
</div>
<el-collapse accordion>
<el-collapse-item title="回执说明">
<div style="margin: 10px 0;">
<el-input
type="textarea"
:rows="3"
resize="none"
placeholder="请输入意见"
v-model="commentText">
</el-input>
</div>
</el-collapse-item>
</el-collapse>
</div>
<div class="content" v-show="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"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
>
</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-back
show-transfer
show-submit
:submitLoading="isSubmit"
:transfer-loading="isTransfer"
:saveLoading="saveLoading"
:approval="true"
@back="beforeBack"
@transfer="handleTransfer"
@submit="handleSubmit"
>
</ProcessFooter>
<Role-tree
:is-title="drawerTitle"
check-box
:is-visible.sync="modalshowflag"
:nodeList="nodeList"
@checkedRole="drawerCheck"
/>
<!-- 福田全公司选人解决方案 -->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="drawerModal"
@checkedRole="checkedTransferRole"
:nodeList="nodeList"
></Role-tree>
</div>
</template>
<script>
import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import { roleTreeData } from "@/api/unqualProcess.js"
import {completeTask, inboundLiaisonDetail, saveinboundTask, saveTaskForPub, changeAssigneeNew} from "@/api/process.js"
export default {
name: "wbsmStep5",
data() {
return {
passInfo: 0,
detailData: [],
loading: false,
commentText: '', // 意见
title: '', // 新增编辑抽屉标题
isTransfer: false,
ListModel: false, // 新增编辑抽屉开关
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
userId: this.$route.query.taskAssignee,
nonSearch: {
standSerialNumber: '',
standId: '', // 标准号/名称
productName: '', // 项目名称
responsibleUnit: '' // 责任部门
},
active: '1', // 默认显示
isSubmit: false,
saveLoading: false,
turnLoading: false,
drawerModal: false,
dataList: [],
endDataList: [],
lastDataList: [],
// 新增选择分发责任人数组
multipleSelection: [],
// 当前页数
pageNo: 1,
total: 0,
myLoading: false,
// 责任部门
zNodesSItem: [],
clearSelection: false,
nodeList: [],
drawerTitle: '', //drawer标题
modalshowflag: false, // drawer开关
roleForm: {
dutyUserInfo: [],
dutyUserInfoName: [],
dutyPeopleInfo: '',
dutyPeople: ''
},
rowDutyPeople: {},
props: { label: 'name', children: 'children', value: 'id', multiple: true, disabled: false },
dutyUserCaseData: [],
roleFormRules: {},
treeData: [], // 人员数据
defaultProps: {
children: 'children',
label: 'name'
},
}
},
components: {
ProcessHeader,
ProcessFooter,
ProcessTitle
},
created() {
this.processTable();
this.getData();
},
computed: {
listNoDataText() {
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
}
},
watch: {
nonSearch(val) {
this.nonSearch = val
}
},
methods: {
//确认转办
checkedTransferRole (data) {
this.assigneeNewLoading = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.$store.getters.userInfo.userId, // 委托人
pId: this.$route.query.prcId // 流程实例
}).then(res => {
this.isTransfer = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
this.$router.push("/processCenter");
this.processNum()
} else {
this.$message.warning(res.message)
}
})
},
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
}).then(res => {
if (res) {
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
}
}).catch(e => {
});
});
},
/**
* @description: 动态表单读取
*/
getFormFieldList(item) {
console.log(item);
this.$nextTick(() => {
this.dataList = item.dataList
this.roleForm = item.roleForm
});
},
// 批量选择分发责任人
dutyEngineerList(id) {
if (this.multipleSelection.length === 0) {
this.$message.warning("请选择至少一条数据进行分发责任人");
} else {
this.nodeList = []
this.nodeList.push(id)
this.modalshowflag = true
}
},
// 每行选择负责人点击操作
clickOpen(val, id) {
this.$refs.multipleTable.clearSelection()
this.rowDutyPeople = val
this.nodeList = []
this.nodeList.push(id)
this.modalshowflag = true
},
// 选择勾选项的集合
handleSelectionChange(value) {
this.multipleSelection = value
},
handleTabs(name) {
this.active = name
},
// 转办按钮
handleTurnTo() {
this.modalshowflag = true
this.drawerTitle = '转办处理人'
},
// 保存按钮
handleSave() {
this.saveLoading = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
// roleForm: this.roleForm,
standardInfoList: this.dataList,
commentText: this.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
})
},
// 提交按钮
handleSubmit() {
this.isSubmit = true
let son = {
yzFlag: '1',
commentText: this.commentText,
dataList: this.dataList,
roleForm: this.roleForm
}
var json = JSON.stringify(son)
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
this.isSubmit = false
}, e => {
});
},
//驳回按钮
beforeBack(){
let son = {
yzFlag: '2',
commentText: this.commentText,
dataList: this.dataList,
roleForm: this.roleForm
}
var json = JSON.stringify(son)
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
json: json
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.$router.push("/processCenter");
}
}, e => {
});
},
//转办按钮
handleTransfer(){
this.drawerModal = true
this.drawerTitle = '转办处理人'
this.selectPeople = row
},
// 流程阶段负责人选择
choiceZRR (type, title, id) {
this.nodeList = []
this.nodeList.push(id)
this.type = type
this.drawerTitle = title
this.modalshowflag = true
},
drawerCheck (data) {
if (this.drawerTitle === '转办处理人') {
this.turnLoading = true
changeAssigneeNew({
taskId: this.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.userId, // 委托人
pId: this.pId // 流程实例
}).then(res =>{
if (res.success) {
this.turnLoading = false
this.$message.success('调整成功')
this.$router.push("/processCenter")
} else {
this.$message.warning(res.message)
}
})
} else {
this.roleRow = data[0]
// 选取负责人时的操作
if (this.multipleSelection.length === 0) {
this.rowDutyPeople.dutyPeopleInfo = this.roleRow.name
this.rowDutyPeople.dutyPeopleInfoId = this.roleRow.id
}else {
this.multipleSelection.forEach(item => {
item.dutyPeopleInfo = this.roleRow.name
item.dutyPeopleInfoId = this.roleRow.id
})
this.$refs.multipleTable.clearSelection()
}
this.lastDataList = this.dataList
// 选取流程信息完成
// this.roleForm.dutyUserInfoName = this.roleRow.name
}
this.modalshowflag = false
},
// 点击查看
handlePreview (item) {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.standId,
// pageType: 'FOREIGN_STAND'
pageType: item.standType + '_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
// 清空 查询条件
clearAllSearch () {
this.nonSearch = {
standId: '',
standSerialNumber: '',
productName: '',
responsibleUnit: ''
}
this.getData()
},
// 分页事件
pageChange (page) {
this.pageNo = page
this.getTableByPage()
},
pageSizeChange () {
this.getTableByPage()
},
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/style';
.wfhxzgStep2 {
/deep/.el-drawer__container {
.prc-content-border {
border: none;
padding: 0 20px 0;
}
}
position: relative;
height: 100%;
.headerTabs {
height: 52px;
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 10px;
.headerTabsItem {
border: 1px solid #c1c1c1;
padding: 0 5px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
.active {
border: 1px solid #E6A23C;
color: #fff;
background: #E6A23C;
}
}
.content-center {
padding: 10px 0px 10px 10px;
}
.content {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'100% - 103px');
overflow: auto;
}
}
</style>
@@ -944,30 +944,51 @@ export default {
prcType: row.prcType
}
})
}else if(row.taskInfo === '标准法规部部长审核'){
this.$router.push({
name: 'wbsmStep3',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
} else if(row.taskInfo === '技术管理中心主任审定'){
this.$router.push({
name: 'wbsmStep4',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
}else if(row.taskInfo === '工程研究总院院长批准'){
this.$router.push({
name: 'wbsmStep5',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
}else if(row.taskInfo === '修改信息'){
this.$router.push({
name: 'wbsmStep1',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
}
// else if(row.taskInfo === '标准法规工程师审核'){
// this.$router.push({
// name: 'jrbzhxhStep3',
// query: {
// taskIds: row.taskIds,
// prcId: row.prcId,
// prcNum: row.prcNum,
// prcName: row.prcName,
// prcType: row.prcType
// }
// })
// }else if(row.taskInfo === '标准法规部部长批准'){
// this.$router.push({
// name: 'jrbzhxhStep4',
// query: {
// taskIds: row.taskIds,
// prcId: row.prcId,
// prcNum: row.prcNum,
// prcName: row.prcName,
// prcType: row.prcType
// }
// })
// }
break
// 外部标准化协会入会流程
case '20':
+27
View File
@@ -1123,6 +1123,33 @@ const routes = [
title: '外部署名推荐审批流程'
}
},
{
path: '/wbsmStep3',
name: 'wbsmStep3',
component: () => import('@/pages/processCenter/pages/creatProcess/wbsm/step3.vue'),
meta: {
requireAuth: true,
title: '外部署名推荐审批流程'
}
},
{
path: '/wbsmStep4',
name: 'wbsmStep4',
component: () => import('@/pages/processCenter/pages/creatProcess/wbsm/step4.vue'),
meta: {
requireAuth: true,
title: '外部署名推荐审批流程'
}
},
{
path: '/wbsmStep5',
name: 'wbsmStep5',
component: () => import('@/pages/processCenter/pages/creatProcess/wbsm/step5.vue'),
meta: {
requireAuth: true,
title: '外部署名推荐审批流程'
}
},
{
path: '/cywbbzzxdStep1',
name: 'cywbbzzxdStep1',