|
|
@ -163,17 +163,20 @@ |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 车型 --> |
|
|
|
<!-- 选择待办人 --> |
|
|
|
<modellibrary v-show="viewState == 1.2" ref="chexingxuanze" @handleChexing="selectChexing"></modellibrary> |
|
|
|
<el-dialog title="选择待办人" :visible.sync="nodeDialogVisible" width="80%"> |
|
|
|
<el-form label-position="right" class="formadd" > |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb">当前环节</el-col> |
|
|
|
<el-col :span="20" class="trightb"> |
|
|
|
<!--当前环节指向下一环节--> |
|
|
|
<el-form-item prop="purchasingUnitName"><span>{{firstNode.name}}->{{ nextNode.name }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<!-- <el-row> |
|
|
|
<!-- |
|
|
|
第一个环节不用填写意见 |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb">意见</el-col> |
|
|
|
<el-col :span="20" class="trightb"> |
|
|
|
<el-input size="small" v-model="formobj.comment" placeholder="审批意见" class="addinputw" clearable ></el-input> |
|
|
@ -182,7 +185,8 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb">下一步处理人</el-col> |
|
|
|
<el-col :span="20" class="trightb"> |
|
|
|
{{this.userName}} <el-button type="primary" size="mini" @click="selectUser">选择</el-button> |
|
|
|
{{this.userName}} |
|
|
|
<el-button type="primary" size="mini" @click="selectUser">选择</el-button> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<div style="text-align:center;margin-top: 20px;"> |
|
|
@ -191,12 +195,13 @@ |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
</el-dialog> |
|
|
|
<!--选择用户的弹框--> |
|
|
|
<el-dialog title="选择用户" :visible.sync="nodeUserDialogVisible" width="80%"> |
|
|
|
<el-form label-position="right" class="formadd" > |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb">选择动作</el-col> |
|
|
|
<el-col :span="20" class="trightb" > |
|
|
|
<el-radio-group v-model="userSid"> |
|
|
|
<el-radio-group > |
|
|
|
<el-radio v-for="item in users" :key="item.sid" :label="item.sid" |
|
|
|
@change="checkedUser">{{ item.name }}</el-radio> |
|
|
|
</el-radio-group> |
|
|
@ -219,14 +224,17 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
//第一个环节 |
|
|
|
firstNode:{}, |
|
|
|
//下一个环节 |
|
|
|
nextNode:{}, |
|
|
|
//角色sid |
|
|
|
roleSid:'', |
|
|
|
userSid:'', |
|
|
|
//可选择的下一环节的用户集合 |
|
|
|
users:[], |
|
|
|
nodeSid:'', |
|
|
|
nodes:'', |
|
|
|
//点击提交按钮显示弹框 |
|
|
|
nodeDialogVisible:false, |
|
|
|
//选择用户弹框 |
|
|
|
nodeUserDialogVisible:false, |
|
|
|
selectedSids: '', |
|
|
|
vehicleDialogVisible: false, |
|
|
@ -234,18 +242,11 @@ export default { |
|
|
|
viewState: '1', |
|
|
|
submitdisabled: false, |
|
|
|
viewTitle: '', |
|
|
|
agreeList: { //同意办理列表 |
|
|
|
businessSid: '', |
|
|
|
comment: '', |
|
|
|
instanceId: '', |
|
|
|
taskId: '', |
|
|
|
taskName: '', |
|
|
|
nextNodeSid:'', |
|
|
|
userSid: window.sessionStorage.getItem('userSid') |
|
|
|
}, |
|
|
|
formobj: { |
|
|
|
//下一环节的用户sid |
|
|
|
nextUserSid:'', |
|
|
|
sid: '', |
|
|
|
userSid:'', |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid'), |
|
|
|
applicationCode: '', // 申请编号 |
|
|
|
createByName: window.sessionStorage.getItem('name'), // 申请人姓名 |
|
|
@ -412,12 +413,14 @@ export default { |
|
|
|
var pageindex=index+1+pagestart; |
|
|
|
return pageindex;*/ |
|
|
|
}, |
|
|
|
//打开选择用户的弹框,并且根据角色查询用户列表 |
|
|
|
selectUser() { |
|
|
|
this.nodeUserDialogVisible=true |
|
|
|
req.getUsers( this.roleSid).then(res => { |
|
|
|
this.nodeUserDialogVisible = true; |
|
|
|
req.getUsers( this.roleSid ).then(res => { |
|
|
|
this.users = res.data |
|
|
|
}) |
|
|
|
}, |
|
|
|
//选择下一环节的用户 |
|
|
|
checkedUser(val) { |
|
|
|
const choosetItem = this.users.filter((item) => item.sid == val) |
|
|
|
this.userName = choosetItem[0].name |
|
|
@ -429,19 +432,23 @@ export default { |
|
|
|
this.submitdisabled = true |
|
|
|
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.formobj.orgSid = this.$store.getters.orgSid |
|
|
|
//查验下一环节要用到,流程定义的id |
|
|
|
this.formobj.modelId = 'process_5tqysnjc:2:325008' |
|
|
|
req.getNextNodesForSubmit(this.formobj).then(resp=>{ |
|
|
|
if (resp.success) { |
|
|
|
this.nextNode=resp.data[1]; |
|
|
|
//第一个环节 |
|
|
|
this.firstNode=resp.data[0]; |
|
|
|
//下一环节 |
|
|
|
this.nextNode=resp.data[1]; |
|
|
|
//环节上配置的角色 |
|
|
|
var candidateGroups=this.nextNode.candidateGroups; |
|
|
|
this.roleSid=candidateGroups[0]; |
|
|
|
console.log(resp.data); |
|
|
|
this.nodeDialogVisible = true |
|
|
|
} |
|
|
|
this.submitdisabled = false |
|
|
|
}); |
|
|
|
}, |
|
|
|
//选择用户后点击确定/同意时向后台传递数据,启动流程,并从第一个环节流转到下一个环节 |
|
|
|
agree() { |
|
|
|
req |
|
|
|
.doSubmit(this.formobj) |
|
|
@ -451,13 +458,6 @@ export default { |
|
|
|
// 加提交后的逻辑 |
|
|
|
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
|
|
|
this.handleReturn('true') |
|
|
|
/* window.parent.postMessage({ |
|
|
|
cmd: 'returnHeight', |
|
|
|
params: { |
|
|
|
code: 1, |
|
|
|
data: document.body.scrollHeight + 'px' |
|
|
|
} |
|
|
|
}, '*')*/ |
|
|
|
} else { |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
} |
|
|
|