Browse Source

入账申请管理及流程

master
yunuo970428 3 years ago
parent
commit
d62bcc9c10
  1. 53
      anrui-scm/anrui-scm-ui/src/api/ruzhang/scmapplyinbound.js
  2. 16
      anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
  3. 4
      anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue
  4. 2
      anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue
  5. 31
      anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue
  6. 242
      anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangInfo.vue

53
anrui-scm/anrui-scm-ui/src/api/ruzhang/scmapplyinbound.js

@ -22,26 +22,61 @@ export default {
// 提交流程
submitVehicleApply: function(params) {
return request({
url: '/base/v1/busvehicleapply/submitVehicleApply',
url: '/scm/v1/scmapplyinbound/submitRecordApplication',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 通过sid删除一条或多条记录
delBySids: function(params) {
// 通过sid查询一条记录
fetchBySid: function(sid) {
return request({
url: '/scm/v1/scmapplyinbound/fetchSid/' + sid,
method: 'get'
})
},
// 代办任务同意办理
businessAgree: function(params) {
return request({
url: '/base/v1/busvehicleapply/delBySids',
url: '/scm/v1/scmapplyinbound/complete',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
headers: {
'Content-Type': 'application/json'
}
})
},
// 通过sid查询一条记录
fetchBySid: function(sid) {
// 代办任务驳回任务
rejectTask: function(params) {
return request({
url: '/scm/v1/scmapplyinbound/fetchSid/' + sid,
method: 'get'
url: '/scm/v1/scmapplyinbound/reject/' + params.businessSid,
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 代办任务终止任务
breakTask: function(params) {
return request({
url: '/scm/v1/scmapplyinbound/breakProcess/' + params.businessSid,
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 代办任务撤回任务
revokeTask: function(params) {
return request({
url: '/scm/v1/scmapplyinbound/revokeProcess/' + params.userSid + '/' + params.businessSid,
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
}
}

16
anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js

@ -277,6 +277,22 @@ const codemenu = [
component: () =>
import('@/views/workFlow/paichanguanliFlow/paichanguanli/cheliangpaichanEdit.vue'),
name: 'cheliangpaichanEdit'
},
// 入账管理
// 入账管理申请详情
{
path: '/ruzhangguanliFlow/ruzhangguanli/ruzhangInfo',
component: () =>
import('@/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangInfo.vue'),
name: 'ruzhangInfo'
},
// 入账管理申请编辑
{
path: '/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit',
component: () =>
import('@/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue'),
name: 'ruzhangEdit'
}
]
export default codemenu

4
anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue

@ -123,6 +123,7 @@ export default {
formobj: {
sid: '', // sid
applicationSid: window.sessionStorage.getItem('userSid'), // sid
userSid: window.sessionStorage.getItem('userSid'), // sid
applicationName: window.sessionStorage.getItem('name'), //
applicationCode: '', //
configName: '',
@ -204,7 +205,8 @@ export default {
},
submitVehicleApply() {
req.submitVehicleApply(this.formobj).then((res) => {
if (res.code == '200') {
console.log(res.code, res.success)
if (res.code == '200' && res.success) {
this.$message({
showClose: true,
type: 'success',

2
anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue

@ -50,7 +50,7 @@
<el-table-column width="80" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column width="150" label="操作" align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" :disabled="scope.row.nodeState =='' ? false : scope.row.nodeState == '排产申请' ? false : true" @click="toEdit(scope.row)">办理</el-button>
<el-button type="primary" size="small" :disabled="scope.row.nodeState =='' ? false : scope.row.nodeState == '填写入账申请' ? false : true" @click="toEdit(scope.row)">办理</el-button>
<el-button type="primary" size="small" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>

31
anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue

@ -123,6 +123,7 @@ export default {
formobj: {
sid: '', // sid
applicationSid: window.sessionStorage.getItem('userSid'), // sid
userSid: window.sessionStorage.getItem('userSid'), // sid
applicationName: window.sessionStorage.getItem('name'), //
applicationCode: '', //
configName: '',
@ -132,19 +133,41 @@ export default {
purchaseOrderNo: '',
remarks: '', //
vehicleOrderSid: '',
businessSid: '', // sid
instanceId: '', // id
taskId: '', // id
vehicleList: []
},
rules: {},
submitdisabled: false
}
},
created() {
console.log('url:' + window.location.href)
var a = window.location.href.indexOf('?') + 1 // ?
var b = window.location.href.indexOf('#data') // #data
const info = window.location.href.slice(a, b)
var sid = info.substr(info.indexOf('=') + 1)
this.showInfo(sid)
// ===
var one = window.location.href.lastIndexOf('#') + 1
var two = window.location.href.lastIndexOf('}') + 1
const data = decodeURI(window.location.href.slice(one, two)) // urlunescape()web,使
var tar = data.substr(data.indexOf('=') + 1)
const obj = JSON.parse(tar)
console.log('iframe页面获取的obj:', obj)
//
this.formobj.businessSid = sid
this.formobj.instanceId = obj.instanceId
this.formobj.taskId = obj.taskId
},
methods: {
showEdit(sid, row) {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '【编辑】入账单'
console.log('编辑回显', sid, row)
console.log('编辑回显', sid)
req.fetchBySid(sid).then((resp) => {
const data = resp.data
this.formobj.applicationCode = data.applicationCode
@ -178,7 +201,7 @@ export default {
}
}
}).catch((e) => {
this.formobj = row
this.formobj = {}
})
},
saveEdit() {
@ -228,7 +251,7 @@ export default {
this.formobj.vehicleList = []
this.$refs['form_obj'].resetFields()
this.$emit('doback')
},
}
}
}
</script>

242
anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangInfo.vue

@ -7,7 +7,11 @@
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="info" size="small" @click="handleReturn()">返回</el-button>
<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 type="info"> </el-button>
</div>
</div>
<!--标题按钮部分结束-->
@ -71,6 +75,18 @@
</el-form-item>
</el-col>
</el-row>
<div v-show="transactState=='00'">
<!-- <div class="diaTitle"><i class="el-icon-chat-line-square"></i><span>审批意见</span></div>-->
<el-form :model="dialogList" :inline="true" label-width="80px">
<el-row>
<el-col>
<el-form-item label="审批意见">
<el-input v-model="dialogList.comment" type="textarea" maxlength="20" placeholder="请输入审批意见" class="inputType" clearable/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="tableStyle">
<div style="margin-left: 5px;font-weight: bold">车辆列表</div>
</div>
@ -130,10 +146,79 @@ export default {
vehicleOrderSid: '',
vehicleList: []
},
dialogList: {
comment: ''
},
transactState: '', //
//
agreeList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
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')
},
rules: {},
submitdisabled: false
}
},
created() {
console.log('url:' + window.location.href)
var a = window.location.href.indexOf('?') + 1 // ?
var b = window.location.href.indexOf('#data') // #data
const info = window.location.href.slice(a, b)
var sid = info.substr(info.indexOf('=') + 1)
this.showInfo(sid)
// ===
var one = window.location.href.lastIndexOf('#') + 1
var two = window.location.href.lastIndexOf('}') + 1
const data = decodeURI(window.location.href.slice(one, two)) // urlunescape()web,使
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.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
},
methods: {
showInfo(sid, row) {
this.$nextTick(() => {
@ -167,15 +252,151 @@ export default {
this.formobj = row
})
},
// ===
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj.departureDate = ''
this.formobj.remarks = '' //
this.formobj.vehicleList = []
this.$refs['form_obj'].resetFields()
this.$emit('doback')
//
openAgree() {
this.$confirm('是否确认执行同意操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleAgree()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消同意'
})
})
},
//
openReject() {
this.$confirm('是否确认执行驳回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleReject()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消驳回'
})
})
},
//
openStop() {
this.$confirm('是否确认执行终止操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleStop()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消终止'
})
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 同意任务 */
handleAgree() {
this.agreeList.comment = this.dialogList.comment
req.businessAgree(this.agreeList).then((response) => {
if (response.code === '200') {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.refreshIt()
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000
})
}
})
},
/** 终止任务 */
handleStop() {
this.stopList.comment = this.dialogList.comment
req.breakTask(this.stopList).then((response) => {
if (response.code === '200') {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000
})
}
})
},
/** 驳回任务 */
handleReject() {
this.regectList.comment = this.dialogList.comment
req.rejectTask(this.regectList).then((response) => {
if (response.code === '200') {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000
})
}
})
},
/** 撤回任务 */
handleRevoke() {
this.revokeList.comment = this.dialogList.comment
req.revokeTask(this.revokeList).then((response) => {
if (response.code === '200') {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000
})
}
})
}
}
}
</script>
@ -215,5 +436,8 @@ export default {
.el-form-item-right {
text-align: right;
}
.inputType {
width: 600px;
}
</style>

Loading…
Cancel
Save