546 lines
16 KiB
Vue
546 lines
16 KiB
Vue
<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" style="height: 100%">
|
|
<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="创建时间"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") : "" }}</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 HH:mm:ss") : "" }}</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"
|
|
:isSubmitBack="isSubmit"
|
|
:saveLoading="isSubmit"
|
|
: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: "wbsmStep2",
|
|
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.isSubmit = 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 => {
|
|
if (res.success) {
|
|
this.drawerModal = false
|
|
this.$message.success('调整成功')
|
|
this.$router.push("/processCenter");
|
|
this.processNum()
|
|
} else {
|
|
this.$message.warning(res.message)
|
|
}
|
|
}).finally(() => {
|
|
this.isSubmit = false
|
|
})
|
|
},
|
|
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(){
|
|
if(!this.commentText){
|
|
this.$message.warning('请填写审批意见')
|
|
}else{
|
|
let son = {
|
|
signFlag: '2',
|
|
commentText: this.commentText,
|
|
dataList: this.dataList,
|
|
roleForm: this.roleForm
|
|
}
|
|
var json = JSON.stringify(son)
|
|
this.isSubmit = true
|
|
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 => {
|
|
});
|
|
}
|
|
},
|
|
//转办按钮
|
|
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>
|