|
|
@ -7,6 +7,7 @@ |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<!--start 添加修改按钮--> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" @click="openCountersign('加签')">加 签</el-button> |
|
|
|
<el-button type="primary" size="small" @click="openAgree('同意')">同 意</el-button> |
|
|
|
<!-- <el-button type="danger" size="small" @click="openReject('驳回')">驳 回</el-button> --> |
|
|
|
<el-button type="danger" size="small" @click="openStop('终止')">终 止</el-button> |
|
|
@ -159,6 +160,19 @@ |
|
|
|
<!-- 选择待办人 的弹出框--> |
|
|
|
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> |
|
|
|
<el-form class="formadd" > |
|
|
|
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb"> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>加签人员:</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item> |
|
|
|
<el-select v-model="countersign.assignee" placeholder="请选择" filterable> |
|
|
|
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>当前环节:</span> |
|
|
@ -189,6 +203,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import req from '@/api/Yjsq/index' |
|
|
|
import { getUserListAll } from '@/api/Common/dictCommon' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'commission', |
|
|
@ -198,12 +213,10 @@ export default { |
|
|
|
return { |
|
|
|
viewState: 1, |
|
|
|
viewTitle: '', |
|
|
|
operation: '', // 点击操作按钮 |
|
|
|
index: 0, |
|
|
|
tableKey: 0, |
|
|
|
imgList: [], |
|
|
|
useMoney: '', // 本次需使用金额 |
|
|
|
applyMoney: '', // 本次申请金额 |
|
|
|
operation: '', // 点击操作按钮 |
|
|
|
dialogList: { |
|
|
|
comment: '' |
|
|
|
}, |
|
|
@ -215,21 +228,23 @@ export default { |
|
|
|
nextNode: {}, // 下一环节 |
|
|
|
nodeDialogVisible: false, |
|
|
|
currentLink: true, |
|
|
|
countersignLink: false, |
|
|
|
options: [], |
|
|
|
// 表单数据 |
|
|
|
purchaseForm: { |
|
|
|
project_sid:'', // 项目sid |
|
|
|
project_name:'', // 项目名称 |
|
|
|
code:'', // 审批编号 |
|
|
|
applicant_date:'',// 申请日期 |
|
|
|
applicant_name:'', // 申请人name |
|
|
|
user_name:'', // 用印章人姓名 |
|
|
|
user_sid:'', // 当前登陆人的sid |
|
|
|
use_date:'', // 使用日期 |
|
|
|
use_reason:'', // 用印章事由 |
|
|
|
use_file_name:'', // 用印文件名称 |
|
|
|
seal_type:'', // 加盖何种公章 |
|
|
|
file_paths:[], // 用印文件(附件) |
|
|
|
remarks:'', // 备注 |
|
|
|
project_sid: '', // 项目sid |
|
|
|
project_name: '', // 项目名称 |
|
|
|
code: '', // 审批编号 |
|
|
|
applicant_date: '', // 申请日期 |
|
|
|
applicant_name: '', // 申请人name |
|
|
|
user_name: '', // 用印章人姓名 |
|
|
|
user_sid: '', // 当前登陆人的sid |
|
|
|
use_date: '', // 使用日期 |
|
|
|
use_reason: '', // 用印章事由 |
|
|
|
use_file_name: '', // 用印文件名称 |
|
|
|
seal_type: '', // 加盖何种公章 |
|
|
|
file_paths: [], // 用印文件(附件) |
|
|
|
remarks: '' // 备注 |
|
|
|
}, |
|
|
|
// 环节所需参数 |
|
|
|
linkByParameter: { |
|
|
@ -241,11 +256,19 @@ export default { |
|
|
|
taskDefKey: '', |
|
|
|
userSid: '' |
|
|
|
}, |
|
|
|
// 加签按钮所需参数 |
|
|
|
countersign: { |
|
|
|
taskId: '', |
|
|
|
assignee: '', |
|
|
|
userSid: '', |
|
|
|
instanceId: '', |
|
|
|
views: '' |
|
|
|
}, |
|
|
|
rules: {}, |
|
|
|
checkLists:'', |
|
|
|
msg:[], |
|
|
|
dialogImageUrl:'', |
|
|
|
dialogVisible: false, |
|
|
|
checkLists: '', |
|
|
|
msg: [], |
|
|
|
dialogImageUrl: '', |
|
|
|
dialogVisible: false |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -263,6 +286,10 @@ export default { |
|
|
|
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.current.taskDefKey = obj.taskDefKey |
|
|
|
this.current.taskName = obj.taskName |
|
|
|
// 加签参数 |
|
|
|
this.countersign.taskId = obj.taskId |
|
|
|
this.countersign.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.countersign.instanceId = obj.instanceId |
|
|
|
// 加载表单数据 |
|
|
|
this.showInfo(obj.businessSid) |
|
|
|
}, |
|
|
@ -282,28 +309,49 @@ export default { |
|
|
|
this.$refs['form_obj'].clearValidate() |
|
|
|
}) |
|
|
|
this.viewTitle = '用章详情' |
|
|
|
getUserListAll().then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.options = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
req.fetchDetailsBySid(sid).then((resp) => { |
|
|
|
var aa = '' |
|
|
|
this.purchaseForm = resp.data |
|
|
|
var checkList=resp.data.seal_type |
|
|
|
var checkList = resp.data.seal_type |
|
|
|
for (var i = 0; i < checkList.length; i++) { |
|
|
|
aa+=checkList[i]+ ',' |
|
|
|
aa +=checkList[i] + ',' |
|
|
|
} |
|
|
|
var str = aa.slice(0, -1); |
|
|
|
var List=str.replace(/^,+/, ''); |
|
|
|
var str = aa.slice(0, -1) |
|
|
|
var List = str.replace(/^,+/, '') |
|
|
|
this.checkLists = List |
|
|
|
let value=resp.data.file_paths |
|
|
|
for(let i=0;i<value.length;i++){ |
|
|
|
let value = resp.data.file_paths |
|
|
|
for (let i = 0; i < value.length; i++) { |
|
|
|
this.msg.push(value[i]) |
|
|
|
} |
|
|
|
}).catch((e) => { |
|
|
|
this.purchaseForm = {} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 加签 |
|
|
|
openCountersign(val) { |
|
|
|
this.operation = val |
|
|
|
this.currentLink = true |
|
|
|
this.countersignLink = true |
|
|
|
this.dialogList.comment = '' |
|
|
|
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
var arr = resp.data |
|
|
|
this.nextNode = arr[0] |
|
|
|
this.nodeDialogVisible = true |
|
|
|
} |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 同意 |
|
|
|
openAgree(val) { |
|
|
|
this.operation = val |
|
|
|
this.currentLink = true |
|
|
|
this.countersignLink = false |
|
|
|
this.dialogList.comment = '同意' |
|
|
|
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
@ -318,6 +366,7 @@ export default { |
|
|
|
openReject(val) { |
|
|
|
this.operation = val |
|
|
|
this.currentLink = true |
|
|
|
this.countersignLink = false |
|
|
|
this.dialogList.comment = '' |
|
|
|
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
@ -333,6 +382,7 @@ export default { |
|
|
|
this.operation = val |
|
|
|
this.dialogList.comment = '' |
|
|
|
this.currentLink = false |
|
|
|
this.countersignLink = false |
|
|
|
this.nodeDialogVisible = true |
|
|
|
}, |
|
|
|
reject() { |
|
|
@ -350,7 +400,40 @@ export default { |
|
|
|
} else { |
|
|
|
this.handleStop() |
|
|
|
} |
|
|
|
} else if (this.operation === '加签') { |
|
|
|
this.handleCountersign() |
|
|
|
} |
|
|
|
}, |
|
|
|
/** 加签 */ |
|
|
|
handleCountersign() { |
|
|
|
if (this.countersign.assignee === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择加签人员' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.dialogList.comment === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.countersign.views = this.dialogList.comment |
|
|
|
req.delegate(this.countersign).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '执行成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
this.nodeDialogVisible = false |
|
|
|
// 子页面向父级页面传递值 |
|
|
|
window.parent.postMessage({ |
|
|
|
cmd: 'returnHeight', |
|
|
|
params: { |
|
|
|
// 操作成功,告诉父级页面关闭弹框 |
|
|
|
code: 1 |
|
|
|
} |
|
|
|
}, '*') |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** 同意任务 */ |
|
|
|
handleAgree() { |
|
|
|