Browse Source

完善家访考察申诉流程审批

master
yunuo970428 2 years ago
parent
commit
4461130fe4
  1. 62
      anrui-riskcenter-ui/src/api/homeappeal/homeappeal.js
  2. 14
      anrui-riskcenter-ui/src/router/index.js
  3. 309
      anrui-riskcenter-ui/src/views/workFlow/jiafangshensuFlow/homeappealDaiBan.vue
  4. 178
      anrui-riskcenter-ui/src/views/workFlow/jiafangshensuFlow/homeappealYiBan.vue

62
anrui-riskcenter-ui/src/api/homeappeal/homeappeal.js

@ -0,0 +1,62 @@
import request from '@/utils/request'
export default {
fetchBySid: function(data) {
return request({
url: '/riskcenter/v1/loanhomevisitappeal/fetchDetailsBySid/' + data,
method: 'get'
})
},
// 流程审批(同意)
complete: function(params) {
return request({
url: '/riskcenter/v1/loanhomevisitappeal/complete',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(驳回)
reject: function(params) {
return request({
url: '/riskcenter/v1/loanhomevisitappeal/reject',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(终止)
breakProcess: function(params) {
return request({
url: '/riskcenter/v1/loanhomevisitappeal/breakProcess',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 流程审批(撤回)
revokeProcess: function(params) {
return request({
url: '/riskcenter/v1/loanhomevisitappeal/revokeProcess',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({
url: '/riskcenter/v1/loanhomevisitappeal/getNextNodesForSubmit',
method: 'get',
params: data
})
},
// 审批流程(驳回)获取上一环节
getPreviousNodesForReject: function(data) {
return request({
url: '/riskcenter/v1/loanhomevisitappeal/getPreviousNodesForReject',
method: 'get',
params: data
})
}
}

14
anrui-riskcenter-ui/src/router/index.js

@ -454,6 +454,20 @@ export const constantRoutes = [
component: () =>
import('@/views/workFlow/qiankuanbeianFlow/delinquentcustomerfilingYiBan.vue'),
name: 'DelinquentCustomerFilingYiBan'
},
// 家访考察申诉--待办
{
path: '/jiafangshensuFlow/homeappealDaiBan',
component: () =>
import('@/views/workFlow/jiafangshensuFlow/homeappealDaiBan.vue'),
name: 'HomeAppealDaiBan'
},
// 家访考察申诉--已办
{
path: '/jiafangshensuFlow/homeappealYiBan',
component: () =>
import('@/views/workFlow/jiafangshensuFlow/homeappealYiBan.vue'),
name: 'HomeAppealYiBan'
}
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }

309
anrui-riskcenter-ui/src/views/workFlow/jiafangshensuFlow/homeappealDaiBan.vue

@ -0,0 +1,309 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<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>
</div>
</div>
</div>
<div class="">
<el-form ref="dataForm" :model="formobj" class="formaddcopy02" :rules="rules">
<el-row style="border-top: 1px solid #DFE6EC">
<el-col :span="24">
<div class="span-sty">销售订单查看</div>
<el-form-item>
<div class="addinputInfo">
<el-button type="primary" size="small" @click="lookSales(formobj.orderSid)">查看</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">家访考察结果</div>
<el-form-item><span class="addinputInfo">{{ formobj.investigateValue }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">家访考察意见</div>
<el-form-item><span class="addinputInfo">{{ formobj.homeVisOpinion }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">申诉原因</div>
<el-form-item><span class="addinputInfo">{{ formobj.appealReason }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item>
<el-image class="addinputInfo" style="width: 150px;height: 150px" v-for="(item, index) in formobj.ssImages" :key="index" :src="item" :preview-src-list="formobj.ssImages"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!-- 查看销售订单 -->
<salesOrder v-show="viewState == 2" ref="divInfo" @doback="resetState"/>
<!-- 选择待办人的弹出框 -->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd">
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable ></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/homeappeal/homeappeal'
import salesOrder from '../publicPage/salesOrder'
export default {
name: 'HomeAppealDaiBan',
components: {
salesOrder
},
data() {
return {
viewTitle: '',
viewState: 1,
formobj: {
investigateValue: '',
homeVisOpinion: '',
appealReason: '',
homeVisitSid: '',
billNo: '',
orderSid: '',
ssImages: []
},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
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 = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 350 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.viewTitle = '家访考察结果申诉'
req.fetchBySid(sid).then((resp) => {
if (resp.success) {
this.formobj = resp.data
}
})
},
lookSales(sid) {
this.viewState = 2
this.$refs['divInfo'].showInfo(sid)
},
resetState() {
this.viewState = 1
},
//
openAgree(val) {
this.operation = val
this.currentLink = 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
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.dialogList.comment = ''
req.getPreviousNodesForReject({ 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
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleStop()
}
}
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(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
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(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
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
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
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.rowClass{
border-top: 1px solid #E0E3EB;
}
.span-sty {
width: 170px !important;
}
.addinputInfo {
margin-left: 160px !important;
}
</style>

178
anrui-riskcenter-ui/src/views/workFlow/jiafangshensuFlow/homeappealYiBan.vue

@ -0,0 +1,178 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
</div>
<div class="">
<el-form ref="dataForm" :model="formobj" class="formaddcopy02" :rules="rules">
<el-row style="border-top: 1px solid #DFE6EC">
<el-col :span="24">
<div class="span-sty">销售订单查看</div>
<el-form-item>
<div class="addinputInfo">
<el-button type="primary" size="small" @click="lookSales(formobj.orderSid)">查看</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">家访考察结果</div>
<el-form-item><span class="addinputInfo">{{ formobj.investigateValue }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">家访考察意见</div>
<el-form-item><span class="addinputInfo">{{ formobj.homeVisOpinion }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">申诉原因</div>
<el-form-item><span class="addinputInfo">{{ formobj.appealReason }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item>
<el-image class="addinputInfo" style="width: 150px;height: 150px" v-for="(item, index) in formobj.ssImages" :key="index" :src="item" :preview-src-list="formobj.ssImages"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<salesOrder v-show="viewState == 2" ref="divInfo" @doback="resetState"/>
</div>
</template>
<script>
import req from '@/api/homeappeal/homeappeal'
import salesOrder from '../publicPage/salesOrder'
export default {
name: 'HomeAppealYiBan',
components: {
salesOrder
},
data() {
return {
viewTitle: '',
viewState: 1,
formobj: {
investigateValue: '',
homeVisOpinion: '',
appealReason: '',
homeVisitSid: '',
billNo: '',
orderSid: '',
ssImages: []
},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 350 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.viewTitle = '家访考察结果申诉'
req.fetchBySid(sid).then((resp) => {
if (resp.success) {
this.formobj = resp.data
}
})
},
lookSales(sid) {
this.viewState = 2
this.$refs['divInfo'].showInfo(sid)
},
resetState() {
this.viewState = 1
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
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
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 170px !important;
}
.addinputInfo {
margin-left: 160px !important;
}
</style>
Loading…
Cancel
Save