feat: There is no way the,

This commit is contained in:
super_liu
2022-02-11 17:14:27 +08:00
parent 296c62f5a9
commit 5845addb96
7 changed files with 249 additions and 213 deletions
@@ -28,6 +28,9 @@ export default {
{
label: "企标制修订-产品标准",
value: "buss2"
},{
label: "企标复审流程",
value: "buss3"
},
{
label: "标准征求意见流程",
@@ -611,7 +611,7 @@
import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle";
import {saveTaskFirst,queryTaskFirst, inboundLiaisonDetail,taskDel } from "api/process";
import {saveTaskFirst,queryTaskFirst, inboundLiaisonDetail,taskDel,startProcessRollBack, completeTask } from "api/process";
export default {
name: "qbfsStep1",
@@ -1102,75 +1102,50 @@ export default {
this.saveLoading = false
})
},
async processExec(sendProcess){
const json = Object.assign(sendProcess, this.roleForm);
this.$http.post('lawss/activiti/startProcessRollBack', {
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: 'buss3',
json: JSON.stringify({
roleForm: this.roleForm,
qbfsForm: this.qbfsForm,
commentText: this.commentText
})
}, {
_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) {
sendProcess.processStatus = '1'
this.$message.success(res.message)
if (this.bpnId !== '') {
let taskId = {
id: this.bpnId
}
taskDel(taskId).then(res=>{
})
}
}
startProcessRollBack() {
return new Promise((resolve, reject) => {
startProcessRollBack({
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: 'buss3',
json: JSON.stringify({
roleForm: this.roleForm,
qbfsForm: this.qbfsForm,
commentText: this.commentText
})
}).then(res => {
const history = res;
resolve(history)
})
}
})
})
},
completeTask(res,json) {
return new Promise((resolve, reject) => {
this.$http.post('lawss/activiti/completeTask', {
taskIds: res.data,
userId : this.$store.getters.userInfo.userId,
json: JSON.stringify(json)
}, {
_this: this
}, res => {
const history = res;
resolve(history)
})
})
},
//流程提交
handleSubmit() {
async handleSubmit() {
if(this.$route.query.prcNum === undefined){
if(this.qbfsForm.modelData === undefined || this.qbfsForm.modelData === null || this.qbfsForm.modelData.length === 0){
this.$message.warning('请选择复审企标完善列表内容')
return
}
let boo = false
this.$refs['qbfsForm'].validate((valid) => {
if (valid) {
this.$refs['roleForm'].validate((valid) => {
if (valid) {
this.isSubmit = true
// this.qbfsForm.fileList = this.fileList
this.qbfsForm.commentText = this.commentText
// 批量发起列表流程
this.loading = true
this.qbfsForm.modelData.forEach(sendProcess =>{
sendProcess.processStatus = '2'
setTimeout(() => {
this.processExec(sendProcess)
}, 3000);
this.$forceUpdate()
})
const time = setInterval(() => {
const list = this.qbfsForm.modelData.filter ( item => item.processStatus === '1')
if(list && this.qbfsForm.modelData && list.length === this.qbfsForm.modelData.length){
this.isSubmit = false
clearInterval(time)
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}
},1000);
boo = true
}else {
this.$message.warning('请检查人员信息表单是否填写完整')
}
@@ -1179,36 +1154,42 @@ export default {
this.$message.warning('请检查基础信息表单是否填写完整')
}
})
// }else{
// this.$refs['qbfsForm'].validate((valid) => {
// if (valid) {
// this.$refs['roleForm'].validate((valid) => {
// if (valid) {
// this.isSubmit = true
// this.qbfsForm.commentText = this.commentText
// var json = Object.assign(this.qbfsForm, this.roleForm)
// 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('请检查基础信息表单是否填写完整')
// }
// })
if(boo){
this.isSubmit = true
// this.qbfsForm.fileList = this.fileList
this.qbfsForm.commentText = this.commentText
// 批量发起列表流程
this.loading = true
for (const sendProcess of this.qbfsForm.modelData) {
sendProcess.processStatus = '2'
const json = Object.assign(sendProcess, this.roleForm);
let startProcess = await this.startProcessRollBack()
if (startProcess.ok) {
let completeTask = await this.completeTask(startProcess,json)
if (completeTask.success) {
sendProcess.processStatus = '1'
this.$message.success(completeTask.message)
if (this.bpnId !== undefined && this.bpnId !== '') {
let taskId = {
id: this.bpnId
}
taskDel(taskId).then(res=>{
})
}
}
}
}
const time = setInterval(() => {
const list = this.qbfsForm.modelData.filter ( item => item.processStatus === '1')
if(list && this.qbfsForm.modelData && list.length === this.qbfsForm.modelData.length){
this.isSubmit = false
clearInterval(time)
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
}
},1000);
}
}
},
// 流程阶段负责人选择
choiceZRR(type, title, id) {
@@ -22,104 +22,10 @@
>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="企标编号" prop="entNumber" class="add-form-item form-item-disabled">
<el-form-item label="企标复审人" prop="bussFsSubUser2Name" class="add-form-item form-item-disabled">
<el-input
readonly
v-model="qbfsForm.entNumber"
placeholder="请输入企标编号"
clearable
></el-input>
</el-form-item>
<el-form-item label="中文名称" prop="cnName" class="add-form-item form-item-disabled">
<el-input
readonly
v-model="qbfsForm.cnName"
placeholder="请输入中文名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="英文名称" prop="enName" class="add-form-item form-item-disabled">
<el-input
readonly
v-model="qbfsForm.enName"
placeholder="请输入英文名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="企标类别" prop="entCategory" class="add-form-item form-item-disabled">
<el-input
readonly
v-model="qbfsForm.entCategory"
placeholder="请输入企标类别"
clearable
></el-input>
</el-form-item>
<el-form-item label="代替企标编号" prop="replaceNumber" class="add-form-item form-item-disabled">
<el-input
readonly
v-model="qbfsForm.replaceNumber"
placeholder="请输入代替企标编号"
clearable
></el-input>
</el-form-item>
<el-form-item label="被代替企标编号" prop="replacedNumber" class="add-form-item form-item-disabled">
<el-input
readonly
v-model="qbfsForm.replacedNumber"
placeholder="请输入被代替企标编号"
clearable
></el-input>
</el-form-item>
<el-form-item label="发布日期" prop="releaseDate" class="add-form-item form-item-disabled">
<el-input
readonly
v-model="qbfsForm.releaseDate"
placeholder="请输入发布日期"
clearable
></el-input>
</el-form-item>
<el-form-item label="实施日期" prop="implementDate" class="add-form-item form-item-disabled">
<el-input
readonly
v-model="qbfsForm.implementDate"
placeholder="请输入实施日期"
clearable
></el-input>
</el-form-item>
<el-form-item label="复审日期" prop="reviewDate" class="add-form-item form-item-disabled">
<el-input
readonly
v-model="qbfsForm.reviewDate"
placeholder="请输入复审日期"
clearable
></el-input>
</el-form-item>
<el-form-item label="附件" prop="fileName" class="add-form-item form-item-disabled">
<div class="file-box" v-if="fileList.length > 0">
<p v-for="item in fileList"
:key="item.id"> {{ item.oldFileName }}
<i
title="下载"
@click="downloadFile(item.id)"
class="icon-download"
v-btn-permission="''"
/>
<i
title="下载带水印"
@click="downloadFileByWater(item.id, item.name)"
class="icon-download2"
v-btn-permission="''"
/>
</p>
</div>
<div v-else>
暂无数据
</div>
</el-form-item>
<el-form-item label="工作组成员" prop="jgUser" class="add-form-item form-item-disabled">
<el-input
v-model="qbfsForm.jgUser"
placeholder="请选择工作组成员"
v-model="qbfsForm.bussFsSubUser2Name"
placeholder="请选择企标复审人"
clearable
@click.native="choiceZRRS"
></el-input>
@@ -212,14 +118,9 @@
</div>
</div>
<ProcessFooter
show-transfer
show-submit
:transfer-loading="isTransfer"
:submitLoading="isSubmit"
:saveLoading="saveLoading"
:approval="true"
@transfer="handleTransfer"
@submit="handleSubmit"
show-submit
:submitLoading="isSubmit"
@submit="handleSubmit"
>
</ProcessFooter>
<!-- 福田全公司选人解决方案 -->
@@ -247,7 +148,7 @@ import ProcessTitle from "../../components/ProcessTitle";
import { changeAssigneeNew, inboundLiaisonDetail, saveTaskFirst } from "api/process";
export default {
name: "qbfsStep2",
name: "qbfsStepSub1",
components:{
ProcessHeader,
ProcessFooter,
@@ -281,6 +182,8 @@ export default {
reviewDate: '',
jgUser: '',
jgUserId: '',
bussFsSubUser2:'',
bussFsSubUser2Name:'',
},
roleForm: {
jgUser: ""
@@ -289,6 +192,9 @@ export default {
jgUser: [
{required: true, message: "请选择工作组成员", trigger: "change"}
],
bussFsSubUser2Name: [
{required: true, message: "请选择企标复审人", trigger: "change"}
],
},
}
},
@@ -338,23 +244,29 @@ export default {
},
//流程提交
handleSubmit(){
this.isSubmit = true
this.qbfsForm.commentText = this.commentText
let json = JSON.stringify(this.qbfsForm);
this.$http.post('lawss/activiti/completeTask', {
taskIds: this.$route.query.taskIds,
userId: this.$store.getters.userInfo.userId,
json: json,
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message)
this.$router.push('/processCenter')
}
this.isSubmit = false
}, e => {
});
this.$refs['qbfsForm'].validate((valid) => {
if (valid) {
this.isSubmit = true
this.qbfsForm.commentText = this.commentText
let json = JSON.stringify(this.qbfsForm);
this.$http.post('lawss/activiti/completeTask', {
taskIds: this.$route.query.taskIds,
userId: this.$store.getters.userInfo.userId,
json: json,
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message)
this.$router.push('/processCenter')
}
this.isSubmit = false
}, e => {
});
}else {
this.$message.warning('请检查基础信息表单是否填写完整')
}
})
},
//转办事件
handleTransfer(){
@@ -398,10 +310,10 @@ export default {
})
},
choiceZRRS() {
this.drawerTitle = '请选择工作组成员'
this.drawerTitle = '请选择企标复审人'
this.nodeList2 = [];
if (this.qbfsForm.jgUserId) {
this.nodeList2 = this.qbfsForm.jgUserId.split(",");
if (this.qbfsForm.bussFsSubUser2) {
this.nodeList2 = this.qbfsForm.bussFsSubUser2.split(",");
}
this.modalshowflag = true;
},
@@ -421,6 +333,12 @@ export default {
if(this.qbfsForm.jgUser){
this.$refs.qbfsForm.validateField('jgUser')
}
this.$set(this.qbfsForm, 'bussFsSubUser2Name', nameList)
this.$set(this.qbfsForm, 'bussFsSubUser2', idList)
if(this.qbfsForm.jgUser){
this.$refs.qbfsForm.validateField('bussFsSubUser2')
}
},
/**
* @Description: 点击下载
@@ -657,6 +657,64 @@ export default {
})
}
break;
case 'buss3':
if (row.taskInfo === '对接人选择复审人') {
this.$router.push({
name: 'qbfsStepSub1',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
}else if (row.taskInfo === '复审人选择复审结果'){
this.$router.push({
name: 'qbfsStepSub2',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
}else if (row.taskInfo === '发起人汇总结果'){
this.$router.push({
name: 'bussFs2',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
}else if (row.taskInfo === '重新发起人汇总结果'){
this.$router.push({
name: 'bussFsC2',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
}else if (row.taskInfo === '标准法规部高级经理批准'){
this.$router.push({
name: 'bussFs3',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
prcName: row.prcName,
prcType: row.prcType
}
})
}
break;
case '2':
if (row.taskInfo === '任务分发') {
this.$router.push({