diff --git a/anrui-scm/anrui-scm-ui/src/api/ruzhang/scmapplyinbound.js b/anrui-scm/anrui-scm-ui/src/api/ruzhang/scmapplyinbound.js index c47792207b..6a67f59b10 100644 --- a/anrui-scm/anrui-scm-ui/src/api/ruzhang/scmapplyinbound.js +++ b/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' + } }) } } diff --git a/anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js b/anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js index 31d920d436..e28ea91403 100644 --- a/anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js +++ b/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 diff --git a/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue b/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue index f9717109f7..7ec0788d42 100644 --- a/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue +++ b/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', diff --git a/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue b/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue index 9ac20e0ca1..f63acd8984 100644 --- a/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue +++ b/anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangguanli.vue @@ -50,7 +50,7 @@ diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue index f9717109f7..7ade453195 100644 --- a/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue +++ b/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)) // url解码unescape()已从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') - }, + } } } diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangInfo.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangInfo.vue index 2694646412..e4a875de4b 100644 --- a/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangInfo.vue +++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangInfo.vue @@ -7,7 +7,11 @@
{{ viewTitle }}
- 返回 + 同 意 + 驳 回 + 终 止 + 撤 回 + 关 闭
@@ -71,6 +75,18 @@ +
+ + + + + + + + + + +
车辆列表
@@ -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)) // url解码unescape()已从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 + }) + } + }) + } } } @@ -215,5 +436,8 @@ export default { .el-form-item-right { text-align: right; } +.inputType { + width: 600px; +}