Browse Source

完善排产管理终止和撤回功能

zhanglei
yunuo970428 3 years ago
parent
commit
3d3d5e1618
  1. 28
      anrui-scm/anrui-scm-ui/src/api/supplychain/busvehicleapply.js
  2. 54
      anrui-scm/anrui-scm-ui/src/views/workFlow/paichanguanliFlow/paichanguanli/cheliangpaichanEdit.vue
  3. 136
      anrui-scm/anrui-scm-ui/src/views/workFlow/paichanguanliFlow/paichanguanli/cheliangpaichanInfo.vue

28
anrui-scm/anrui-scm-ui/src/api/supplychain/busvehicleapply.js

@ -96,21 +96,21 @@ export default {
})
},
// 流程审批(终止)
// complete: function(params) {
// return request({
// url: '/base/v1/busvehicleapply/complete',
// method: 'post',
// data: params
// })
// },
breakProcess: function(params) {
return request({
url: '/base/v1/busvehicleapply/breakProcess',
method: 'post',
data: params
})
},
// 流程审批(撤回)
// complete: function(params) {
// return request({
// url: '/base/v1/busvehicleapply/complete',
// method: 'post',
// data: params
// })
// },
revokeProcess: function(params) {
return request({
url: '/base/v1/busvehicleapply/revokeProcess',
method: 'post',
data: params
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({

54
anrui-scm/anrui-scm-ui/src/views/workFlow/paichanguanliFlow/paichanguanli/cheliangpaichanEdit.vue

@ -11,7 +11,7 @@
</el-button>
<el-button type="primary" size="small" @click="submitVehicleApply()">提交
</el-button>
<el-button type="info" size="small" @click="handleReturn()">返回</el-button>
<!-- <el-button type="info" size="small" @click="handleReturn()">返回</el-button>-->
</div>
</div>
<!--标题按钮部分结束-->
@ -332,7 +332,15 @@ export default {
type: 'success',
message: resp.msg
})
this.handleReturn('true')
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
// this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
@ -351,6 +359,14 @@ export default {
type: 'success',
message: '提交成功'
})
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.$message({
showClose: true,
@ -360,23 +376,23 @@ export default {
}
})
},
// ===
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj.schedulingType = '' //
this.formobj.schedulingTypeKey =''
this.formobj.remarks = '' //
this.formobj.currentAmount = ''
this.formobj.applicationCode = ''
this.formobj.applicationDate = ''
this.formobj.createBySid = ''
this.formobj.createByName = ''
this.formobj.taskId = ''
this.formobj.instanceId = ''
this.formobj.busVehicleApplyDetailDtoList = []
this.$refs['form_obj'].resetFields()
this.$emit('doback')
},
// // ===
// handleReturn(isreload) {
// if (isreload === 'true') this.$emit('reloadlist')
// this.formobj.schedulingType = '' //
// this.formobj.schedulingTypeKey =''
// this.formobj.remarks = '' //
// this.formobj.currentAmount = ''
// this.formobj.applicationCode = ''
// this.formobj.applicationDate = ''
// this.formobj.createBySid = ''
// this.formobj.createByName = ''
// this.formobj.taskId = ''
// this.formobj.instanceId = ''
// this.formobj.busVehicleApplyDetailDtoList = []
// this.$refs['form_obj'].resetFields()
// this.$emit('doback')
// },
//
getSummaries(param) {
const { columns, data } = param

136
anrui-scm/anrui-scm-ui/src/views/workFlow/paichanguanliFlow/paichanguanli/cheliangpaichanInfo.vue

@ -10,7 +10,7 @@
<el-button v-show="transactState=='00'" type="primary" @click="openAgree('同意')"> </el-button>
<el-button v-show="transactState=='00'" type="danger" @click="openReject('驳回')"> </el-button>
<el-button v-show="transactState=='00'" type="danger" @click="openStop('终止')"> </el-button>
<el-button v-show="transactState=='01'" type="danger" @click="openRevoke('撤回')"> </el-button>
<el-button v-show="transactState=='01' && current.taskName !== '排产申请'" type="danger" @click="openRevoke()"> </el-button>
</div>
</div>
<!--标题按钮部分结束-->
@ -186,7 +186,6 @@
<script>
import req from '@/api/supplychain/busvehicleapply'
import { businessAgree, rejectTask, breakTask, revokeTask } from '@/api/flow/todo'
import flow from '../../../baseoutsourcingapplication/workflow/flow'
export default {
name: 'cheliangpaichandetails',
@ -227,39 +226,15 @@ export default {
busVehicleApplyDetailDtoList: []
},
transactState: '', //
//
agreeList: {
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: window.sessionStorage.getItem('userSid')
},
//
regectList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
userSid: window.sessionStorage.getItem('userSid')
},
//
stopList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
userSid: window.sessionStorage.getItem('userSid')
},
//
revokeList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
userSid: window.sessionStorage.getItem('userSid')
userSid: ''
},
rules: {}
}
@ -278,26 +253,15 @@ export default {
var tar = data.substr(data.indexOf('=') + 1)
const obj = JSON.parse(tar)
console.log('iframe页面获取的obj:', obj)
//
this.agreeList.businessSid = sid
this.agreeList.instanceId = obj.instanceId
this.agreeList.taskId = obj.taskId
this.agreeList.taskDefKey = obj.taskDefKey
this.agreeList.orgSidPath = window.sessionStorage.getItem('orgSidPath')
//
this.linkByParameter.businessSid = sid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = obj.userSid
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.regectList.businessSid = sid
this.regectList.instanceId = obj.instanceId
this.regectList.taskId = obj.taskId
//
this.stopList.businessSid = sid
this.stopList.instanceId = obj.instanceId
this.stopList.taskId = obj.taskId
//
this.revokeList.businessSid = sid
this.revokeList.instanceId = obj.instanceId
this.revokeList.taskId = obj.taskId
//
this.transactState = obj.transactState
//
@ -344,8 +308,8 @@ export default {
})
},
//
getFlowViewer(procInsId){
req.getFlowViewer(procInsId).then((res) =>{
getFlowViewer(procInsId) {
req.getFlowViewer(procInsId).then((res) => {
this.taskList = res.data
})
},
@ -374,18 +338,15 @@ export default {
})
},
//
openStop() {
this.$confirm('是否确认执行终止操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleStop()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消终止'
})
openStop(val) {
this.operation = val
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
/** 确认撤回任务 */
@ -395,13 +356,13 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
})
},
reject() {
if (this.operation === '同意') {
@ -409,13 +370,13 @@ export default {
} else if (this.operation === '驳回') {
this.handleReject()
} else if (this.operation === '终止') {
} else if (this.operation === '撤回') {
this.handleStop()
}
},
/** 同意任务 */
handleAgree() {
this.agreeList.comment = this.dialogList.comment
req.complete(this.agreeList).then((response) => {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
@ -444,8 +405,8 @@ export default {
},
/** 驳回任务 */
handleReject() {
this.regectList.comment = this.dialogList.comment
req.reject(this.regectList).then((response) => {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
@ -474,15 +435,25 @@ export default {
},
/** 终止任务 */
handleStop() {
this.stopList.comment = this.dialogList.comment
breakTask(this.stopList).then((response) => {
if (response.code === '200') {
this.linkByParameter.comment = this.dialogList.comment
console.log(this.stopList, 99999)
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.$notify({
title: '提示',
@ -495,15 +466,24 @@ export default {
},
/** 撤回任务 */
handleRevoke() {
this.revokeList.comment = this.dialogList.comment
revokeTask(this.revokeList).then((response) => {
if (response.code === '200') {
this.linkByParameter.comment = this.dialogList.comment
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.$notify({
title: '提示',

Loading…
Cancel
Save