企标制修订计划管控流程

This commit is contained in:
宋伟佳
2021-11-18 16:28:33 +08:00
parent 866a1884ca
commit 485e4e0ec2
9 changed files with 376 additions and 82 deletions
@@ -459,9 +459,11 @@ export default {
queryTaskFirst({
bpnId: this.$route.query.bpnId
}).then(res => {
console.log(res.mes);
let mes = JSON.parse(res.mes)
this.roleForm = mes.roleForm
this.standardSearch = mes.standardSearch
this.standardSearch = mes.qbfsForm
this.standShow = true
this.commentText = mes.commentText
});
},
@@ -567,7 +569,7 @@ export default {
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
_formData.append('createUserName', this.$store.getters.userInfo.userName)
_formData.append('prcType', '23')
_formData.append('prcType', '24')
_formData.append('json', JSON.stringify({
roleForm: this.roleForm,
qbfsForm: this.standardSearch,
@@ -243,6 +243,7 @@ export default {
components: {
ProcessTitle
},
props: ['message'],
data(){
return{
formRules: {
@@ -276,6 +277,15 @@ export default {
}
},
watch:{
message: {
immediate: true,
deep: true,
handler(val) {
this.qbfsForm = val
}
}
},
methods: {
validateForm () {
let flag = null
@@ -259,6 +259,7 @@ export default {
components: {
ProcessTitle
},
props: ['message'],
data(){
return{
formRules: {
@@ -298,6 +299,15 @@ export default {
}
},
watch:{
message: {
immediate: true,
deep: true,
handler(val) {
this.qbfsForm = val
}
}
},
methods: {
validateForm () {
let flag = null
@@ -97,6 +97,7 @@ export default {
components: {
ProcessTitle
},
props: ['message'],
data(){
return {
qbfsForm: {
@@ -148,6 +149,15 @@ export default {
}
},
watch:{
message: {
immediate: true,
deep: true,
handler(val) {
this.qbfsForm = val
}
}
},
methods: {
validateForm () {
let flag = null
@@ -307,6 +307,7 @@ export default {
components: {
ProcessTitle
},
props: ['message'],
data(){
return {
standShow: false,
@@ -372,6 +373,16 @@ export default {
},
mounted() {
this.getStandDataBtn()
},
watch:{
message: {
immediate: true,
deep: true,
handler(val) {
this.qbfsForm = val
}
}
},
methods: {
validateForm () {
@@ -250,6 +250,7 @@ export default {
components: {
ProcessTitle
},
props: ['message'],
data(){
return{
formRules: {
@@ -286,6 +287,15 @@ export default {
}
},
watch:{
message: {
immediate: true,
deep: true,
handler(val) {
this.qbfsForm = val
}
}
},
methods: {
validateForm () {
let flag = null
@@ -6,7 +6,9 @@
</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" v-if="approvalFlag" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
<div class="headerTabsItem" v-else :class="active === '2' ? 'active' : ''" @click="handleTabs('2')">人员信息</div>
</div>
<div class="content" v-show="active === '1'">
<div style="flex: auto; overflow: auto">
@@ -20,16 +22,21 @@
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="调整类型" class="add-form-item form-item-disabled">
<el-button size="small" type="primary" style="margin: 10px;" @click="toggleComName('merge')">合并</el-button>
<el-button size="small" type="primary" style="margin: 10px;" @click="toggleComName('delay')">延期</el-button>
<el-button size="small" type="primary" style="margin: 10px;" @click="toggleComName('cancel')">取消</el-button>
<el-button size="small" type="primary" style="margin: 10px;" @click="toggleComName('rename')">更名</el-button>
<el-button size="small" type="primary" style="margin: 10px;" @click="toggleComName('establish')">立项</el-button>
<el-button size="small" type="primary" style="margin: 10px;" @click="toggleComName('merge')">合并
</el-button>
<el-button size="small" type="primary" style="margin: 10px;" @click="toggleComName('delay')">延期
</el-button>
<el-button size="small" type="primary" style="margin: 10px;" @click="toggleComName('cancel')">取消
</el-button>
<el-button size="small" type="primary" style="margin: 10px;" @click="toggleComName('rename')">更名
</el-button>
<el-button size="small" type="primary" style="margin: 10px;" @click="toggleComName('establish')">立项
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<component ref="childForm" :is="comName" ></component>
<component ref="childForm" :message="qbfsForm" :is="comName"></component>
</div>
<div>
<el-collapse accordion>
@@ -56,9 +63,9 @@
:model="roleForm"
:rules="roleFormRules"
class="label-input-form">
<el-timeline-item timestamp="发起流程" placement="top" :color="roleForm.startUser ? '#66b1ff' : ''">
<el-timeline-item timestamp="发起流程" placement="top" :color="roleForm.prcCreateUser ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="startUserName" style="margin-bottom: 0">
<el-form-item prop="prcCreateUserName" style="margin-bottom: 0">
<h4>标准法规工程师</h4>
<div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.prcCreateUser" style="display: none;"></el-input>
@@ -69,7 +76,7 @@
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="选择申请部门高级经理审核" placement="top"
:color="roleForm.dockUser ? '#66b1ff' : ''" >
:color="roleForm.dockUser ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="dockUserName" style="margin-bottom: 0">
<h4>申请部门高级经理</h4>
@@ -83,7 +90,7 @@
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="选择申请部门中心主任会签" placement="top"
:color="roleForm.countersigner ? '#66b1ff' : ''" >
:color="roleForm.countersigner ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="countersignerName" style="margin-bottom: 0">
<h4>申请部门中心主任</h4>
@@ -97,7 +104,7 @@
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="选择标准法规工作组组长审定" placement="top"
:color="roleForm.examine ? '#66b1ff' : ''" >
:color="roleForm.examine ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="examineName" style="margin-bottom: 0">
<h4>标准法规工作组组长</h4>
@@ -111,7 +118,7 @@
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="选择标准法规部部长批准" placement="top"
:color="roleForm.approver ? '#66b1ff' : ''" >
:color="roleForm.approver ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="approverName" style="margin-bottom: 0">
<h4>标准法规部部长</h4>
@@ -125,7 +132,7 @@
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="选择标准法规部工程师抄送" placement="top"
:color="roleForm.engineer ? '#66b1ff' : ''" >
:color="roleForm.engineer ? '#66b1ff' : ''">
<el-card>
<el-form-item prop="engineerName" style="margin-bottom: 0">
<h4>标准法规部工程师</h4>
@@ -142,6 +149,73 @@
</el-timeline>
</div>
</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"
: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-save
show-submit
@@ -178,11 +252,11 @@ import rename from "process/creatProcess/qbzxdjhgk/component/rename";
import establish from "process/creatProcess/qbzxdjhgk/component/establish";
import delay from "process/creatProcess/qbzxdjhgk/component/delay";
import cancel from "process/creatProcess/qbzxdjhgk/component/cancel";
import {saveTaskFirst,queryTaskFirst, inboundLiaisonDetail } from "api/process";
import { saveTaskFirst, queryTaskFirst, inboundLiaisonDetail } from "api/process";
export default {
name: "qbzxdjhgkStep1",
components:{
components: {
ProcessHeader,
ProcessFooter,
ProcessTitle,
@@ -190,88 +264,222 @@ export default {
rename,
establish,
delay,
cancel,
cancel
},
data(){
return{
active: '1',
commentText: '',
comName: 'merge',
drawerTitle: '',
data() {
return {
active: "1",
commentText: "",
comName: "merge",
qbfsForm: {},
approvalFlag: false,
taskId: '',
bpnId: '',
drawerTitle: "",
nodeList: [],
nodeList2: [],
detailData: [],
isSubmit: false,
saveLoading: false,
modalshowflag: false,
modalshowflag2: false,
loading: false,
roleForm: {
prcCreateUserName: this.$store.getters.userInfo.userName,
prcCreateUser: this.$store.getters.userInfo.userId,
dockUser: '',
dockUserName: '',
countersigner: '',
countersignerName: '',
approver: '',
approverName: '',
dockUser: "",
dockUserName: "",
countersigner: "",
countersignerName: "",
approver: "",
approverName: "",
engineer: "",
engineerName: "",
examine: '',
examineName: '',
examine: "",
examineName: ""
},
//必填人员校验规则
roleFormRules: {
dockUserName: [
{required: true, message: "请选择工作组组长", trigger: "change"}
],
},
{ required: true, message: "请选择工作组组长", trigger: "change" }
]
}
};
},
mounted() {
this.taskId = this.$route.query.taskIds
this.bpnId = this.$route.query.bpnId
if (this.bpnId !== undefined) {
this.getDatas()
}
if(this.taskId){
this.approvalFlag = true
this.processTable()
}
this.getData();
},
methods: {
handleTabs(name){
this.active = name
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 => {
})
},
toggleComName(name){
this.comName = name
getDatas(){
queryTaskFirst({
bpnId: this.$route.query.bpnId
}).then(res => {
let mes = JSON.parse(res.mes)
this.roleForm = mes.roleForm
this.qbfsForm = mes.qbfsForm
this.commentText = mes.commentText
});
},
//流程保存
handleSave(){
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) {
this.$nextTick(() => {
this.qbfsForm = item;
this.roleForm.dockUser = item.dockUser;
this.roleForm.dockUserName = item.dockUserName;
this.roleForm.countersigner = item.countersigner;
this.roleForm.countersignerName = item.countersignerName;
this.roleForm.approver = item.approver;
this.roleForm.approverName = item.approverName;
this.roleForm.engineer = item.engineer;
this.roleForm.engineerName = item.engineerName;
this.roleForm.examine = item.examine;
this.roleForm.examineName = item.examineName;
});
},
handleTabs(name) {
this.active = name;
},
toggleComName(name) {
this.comName = name;
if(this.comName === 'merge'){
this.$refs["childForm"].qbfsForm = '1'
}else if(this.comName === 'delay'){
this.$refs["childForm"].qbfsForm.type = '2'
}else if(this.comName === 'cancel'){
this.$refs["childForm"].qbfsForm.type = '3'
}else if(this.comName === 'rename'){
this.$refs["childForm"].qbfsForm.type = '4'
}else if(this.comName === 'establish'){
this.$refs["childForm"].qbfsForm.type = '5'
}
},
//流程保存
handleSave() {
let qbzxdFrom = this.$refs["childForm"].qbfsForm;
this.saveLoading = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
_formData.append('createUserName', this.$store.getters.userInfo.userName)
_formData.append('prcType', '25')
_formData.append('json', JSON.stringify({
roleForm: this.roleForm,
qbfsForm: qbzxdFrom,
commentText: this.commentText
}))
saveTaskFirst(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
})
},
//流程提交
handleSubmit(){
let flag = this.$refs['childForm'].validateForm()
let qbzxdFrom = this.$refs["childForm"].qbfsForm
if(flag){
this.$refs['roleForm'].validate((valid) => {
if(valid){
this.isSubmit = true
var json = Object.assign(qbzxdFrom, this.roleForm)
this.$http.get('lawss/activiti/startProcess', {type: '25'}, {
_this: this
}, res => {
if (res.ok) {
this.$http.post('lawss/activiti/completeTask', {
taskIds: res.data,
userId : this.$store.getters.userInfo.userId,
json: JSON.stringify(json)
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message)
this.isSubmit = false
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}
})
}
})
}else{
this.$message.warning('请完善人员信息')
}
})
}else{
this.$message.warning('请完善基础信息')
}
handleSubmit() {
if (this.$route.query.prcNum === undefined) {
let flag = this.$refs["childForm"].validateForm();
let qbzxdFrom = this.$refs["childForm"].qbfsForm;
if (flag) {
this.$refs["roleForm"].validate((valid) => {
if (valid) {
this.isSubmit = true;
var json = Object.assign(qbzxdFrom, this.roleForm);
this.$http.get("lawss/activiti/startProcess", { type: "25" }, {
_this: this
}, res => {
if (res.ok) {
this.$http.post("lawss/activiti/completeTask", {
taskIds: res.data,
userId: this.$store.getters.userInfo.userId,
json: JSON.stringify(json)
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.isSubmit = false;
this.$router.push({ path: "/processCenter?tabsName=ProcessCenter" });
}
});
}
});
} else {
this.$message.warning("请完善人员信息");
}
});
} else {
this.$message.warning("请完善基础信息");
}
} else {
let flag = this.$refs["childForm"].validateForm();
let qbzxdFrom = this.$refs["childForm"].qbfsForm;
if (flag) {
this.$refs["roleForm"].validate((valid) => {
if (valid) {
this.isSubmit = true;
var json = Object.assign(qbzxdFrom, this.roleForm);
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.$route.query.taskIds,
userId: this.$store.getters.userInfo.userId,
json: JSON.stringify(json)
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.isSubmit = false;
this.$router.push({ path: "/processCenter?tabsName=ProcessCenter" });
}
});
} else {
this.$message.warning("请完善人员信息");
}
});
} else {
this.$message.warning("请完善基础信息");
}
}
},
// 流程阶段负责人选择
@@ -282,17 +490,17 @@ export default {
this.drawerTitle = title;
this.modalshowflag = true;
},
checkedRole (data) {
checkedRole(data) {
if (this.type === "dockUser") {
this.roleForm.dockUser = data[0].id;
this.roleForm.dockUserName = data[0].name;
}else if(this.type === 'examine'){
} else if (this.type === "examine") {
this.roleForm.examine = data[0].id;
this.roleForm.examineName = data[0].name;
}else if(this.type === 'approver'){
} else if (this.type === "approver") {
this.roleForm.approver = data[0].id;
this.roleForm.approverName = data[0].name;
}else if(this.type === 'engineer'){
} else if (this.type === "engineer") {
this.roleForm.engineer = data[0].id;
this.roleForm.engineerName = data[0].name;
}
@@ -318,8 +526,8 @@ export default {
});
this.roleForm.countersigner = idList;
this.roleForm.countersignerName = nameList;
},
},
}
}
};
</script>
@@ -1685,6 +1685,17 @@ export default {
prcType: row.prcType
}
})
}else if(row.taskInfo === '企标制修订计划整改') {
this.$router.push({
name: 'qbzxdjhgkStep1',
query:{
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
}
break
}
@@ -539,6 +539,28 @@ export default {
}
})
break
//企标废止
case '24':
this.$router.push({
name: 'qbfzStep1',
query: {
type: '24',
processName: '企标废止流程',
bpnId: id
}
})
break
//企标制修订计划管控
case '25':
this.$router.push({
name: 'qbzxdjhgkStep1',
query: {
type: '25',
processName: '企标制修订计划管控',
bpnId: id
}
})
break
}
},
...mapMutations(['setProcess', 'setHandleInfo']),