Browse Source

完善专项返利预提 -- 流程审批增加加签功能

master
yunuo970428 3 months ago
parent
commit
9ce37ab37f
  1. 10
      anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatewithholding.js
  2. 117
      anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiDaiBanInfo.vue

10
anrui-scm/anrui-scm-ui/src/api/specialrebate/specialrebatewithholding.js

@ -93,6 +93,16 @@ export default {
data: params data: params
}) })
}, },
// 流程审批(加签)
delegate: function(params) {
return request({
url: '/scm/v1/scmspecialrebatewithapply/delegate',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
//
// 代办任务驳回任务 // 代办任务驳回任务
reject: function(params) { reject: function(params) {
return request({ return request({

117
anrui-scm/anrui-scm-ui/src/views/workFlow/zhuanxiangfanliyutiFlow/zhuanxiangfanliyutiDaiBanInfo.vue

@ -7,6 +7,7 @@
<div>{{ viewTitle }}</div> <div>{{ viewTitle }}</div>
<!--start 添加修改按钮--> <!--start 添加修改按钮-->
<div> <div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<el-button type="primary" size="small" @click="openAgree('同意')"> </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="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button> <el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
@ -74,8 +75,19 @@
<zhuanxiangfanliyutiInfo v-show="viewState == 2" ref="divInfo" @doback="resetState"/> <zhuanxiangfanliyutiInfo v-show="viewState == 2" ref="divInfo" @doback="resetState"/>
<!-- 选择待办人 的弹出框--> <!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%"> <el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formaddcopy02" > <el-form class="formaddcopy02">
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb"> <el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="24">
<span class="span-sty icon">*</span>加签人员:
<el-form-item>
<el-select class="addinputInfo" 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">
<el-col :span="24"> <el-col :span="24">
<div class="span-sty"><span>当前环节:</span></div> <div class="span-sty"><span>当前环节:</span></div>
<el-form-item><span class="addinputInfo">{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> <el-form-item><span class="addinputInfo">{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
@ -84,7 +96,9 @@
<el-row :class="{ rowClass:!currentLink }"> <el-row :class="{ rowClass:!currentLink }">
<el-col :span="24"> <el-col :span="24">
<div class="span-sty"><span>意见:</span></div> <div class="span-sty"><span>意见:</span></div>
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputInfo addinputw" clearable ></el-input></el-form-item> <el-form-item>
<el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw addinputInfo" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable />
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div style="text-align:center;margin-top: 20px;"> <div style="text-align:center;margin-top: 20px;">
@ -99,6 +113,7 @@
<script> <script>
import req from '@/api/specialrebate/specialrebatewithholding' import req from '@/api/specialrebate/specialrebatewithholding'
import zhuanxiangfanliyutiInfo from './relation/zhuanxiangfanliyutiInfo' import zhuanxiangfanliyutiInfo from './relation/zhuanxiangfanliyutiInfo'
import { selectStaffListss } from '@/api/Common/dictcommons'
export default { export default {
name: 'ZhuanXiangFanLiYuTiDaiBanInfo', name: 'ZhuanXiangFanLiYuTiDaiBanInfo',
@ -111,18 +126,6 @@ export default {
index: 0, index: 0,
tableKey: 0, tableKey: 0,
viewState: 1, viewState: 1,
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
// //
formobj: { formobj: {
sid: '', sid: '',
@ -145,6 +148,20 @@ export default {
}, },
rules: {}, rules: {},
submitdisabled: false, submitdisabled: false,
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
// //
linkByParameter: { linkByParameter: {
businessSid: '', businessSid: '',
@ -154,6 +171,14 @@ export default {
orgSidPath: '', orgSidPath: '',
taskDefKey: '', taskDefKey: '',
userSid: '' userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
} }
} }
}, },
@ -168,10 +193,14 @@ export default {
this.linkByParameter.instanceId = obj.instanceId this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath') // this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid') this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName 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) this.showInfo(obj.businessSid)
}, },
@ -199,6 +228,11 @@ export default {
}).catch((e) => { }).catch((e) => {
this.formobj = {} this.formobj = {}
}) })
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
}, },
handleLook(row) { handleLook(row) {
this.viewState = 2 this.viewState = 2
@ -261,10 +295,26 @@ export default {
}) })
return sums return sums
}, },
//
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) { openAgree(val) {
this.operation = val this.operation = val
this.currentLink = true this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意' this.dialogList.comment = '同意'
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => { req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) { if (resp.success) {
@ -279,6 +329,7 @@ export default {
openReject(val) { openReject(val) {
this.operation = val this.operation = val
this.currentLink = true this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '' this.dialogList.comment = ''
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => { req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) { if (resp.success) {
@ -293,6 +344,7 @@ export default {
openStop(val) { openStop(val) {
this.operation = val this.operation = val
this.currentLink = false this.currentLink = false
this.countersignLink = false
this.dialogList.comment = '' this.dialogList.comment = ''
this.nodeDialogVisible = true this.nodeDialogVisible = true
}, },
@ -311,7 +363,40 @@ export default {
} else { } else {
this.handleStop() 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() { handleAgree() {

Loading…
Cancel
Save