优化出库参数
This commit is contained in:
parent
0d70cb70df
commit
eba5e97c19
|
|
@ -202,7 +202,7 @@
|
|||
<div class="auditing-container">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="remark"
|
||||
v-model="auditingParams.remark"
|
||||
placeholder="请输入审核意见"
|
||||
:autosize="{ minRows: 2, maxRows: 6 }"
|
||||
/>
|
||||
|
|
@ -222,7 +222,7 @@
|
|||
import TitleTip from './components/title-tip.vue'
|
||||
import { getLeaseTaskDetail, receiveDetail, getInfoById, getAuditInfo, auditDir } from '@/api/business/index'
|
||||
|
||||
import { getAuditingDetailsApi } from '@/api/receive-apply/index.js'
|
||||
import { getAuditingDetailsApi, submitAuditingApi } from '@/api/receive-apply/index.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -258,7 +258,16 @@ export default {
|
|||
type: 'image'
|
||||
}
|
||||
],
|
||||
previewList: []
|
||||
previewList: [],
|
||||
auditingParams: {
|
||||
nodeId: '', // 当前审核记录的id
|
||||
remark: '', // 审核意见
|
||||
typeId: '', // 当前审核记录中的 typeId
|
||||
taskId: '', // 外层列表的taskId
|
||||
isAccept: '', // 审批结果 1. 通过 2. 驳回
|
||||
recordId: '',
|
||||
nextNodeId: '' // 下个流程节点ID
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -287,8 +296,8 @@ export default {
|
|||
// this.getAuditInfo()
|
||||
if (this.$route.query) {
|
||||
const { nodeId, flowId } = this.$route.query
|
||||
// this.auditingParams.taskId = taskId
|
||||
// this.currentNodeId = nodeId
|
||||
this.auditingParams.taskId = flowId
|
||||
this.currentNodeId = nodeId
|
||||
this.getLeaseTaskDetailFun(flowId)
|
||||
}
|
||||
},
|
||||
|
|
@ -302,7 +311,8 @@ export default {
|
|||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.isAccept = 1
|
||||
// this.isAccept = 1
|
||||
this.auditingParams.isAccept = 1
|
||||
this.submitAuditing()
|
||||
})
|
||||
.catch(() => {
|
||||
|
|
@ -318,7 +328,7 @@ export default {
|
|||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.isAccept = 2
|
||||
this.auditingParams.isAccept = 2
|
||||
this.submitAuditing()
|
||||
})
|
||||
.catch(() => {
|
||||
|
|
@ -327,20 +337,50 @@ export default {
|
|||
},
|
||||
// 提交审核
|
||||
async submitAuditing() {
|
||||
const params = {
|
||||
flowId: this.flowId,
|
||||
nodeId: this.auditingList[this.auditingList.length - 1].nodeId,
|
||||
isAccept: this.isAccept,
|
||||
remark: this.remark
|
||||
// 组装参数
|
||||
|
||||
const currentAuditing = this.auditingList.filter(e => e.nodeId === this.currentNodeId) // 获取当前审核的节点
|
||||
const currentIndex = this.auditingList.findIndex(e => e.nodeId === this.currentNodeId) // 获取当前的索引
|
||||
|
||||
const { recordId, id, typeId, isAccept } = currentAuditing[0]
|
||||
|
||||
// if (isAccept !== 0) {
|
||||
// this.$modal.msgError('当前已审核,不可重复审核')
|
||||
// return
|
||||
// }
|
||||
Object.assign(this.auditingParams, {
|
||||
typeId,
|
||||
recordId,
|
||||
nodeId: id
|
||||
})
|
||||
if (currentIndex !== this.auditingList.length - 1) {
|
||||
this.auditingParams.nextNodeId = this.auditingList[currentIndex + 1].id
|
||||
}
|
||||
try {
|
||||
const res = await auditDir(params)
|
||||
console.log('🚀 ~ submitAuditing ~ res:', res)
|
||||
this.$message.success('审核成功')
|
||||
this.$tab.closePage()
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ submitAuditing ~ error:', error)
|
||||
|
||||
const res = await submitAuditingApi(this.auditingParams)
|
||||
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess('审核成功')
|
||||
setTimeout(() => {
|
||||
// const obj = { path: '/business-examine/receive-apply' }
|
||||
// this.$tab.closeOpenPage(obj)
|
||||
this.$tab.closePage()
|
||||
}, 500)
|
||||
}
|
||||
// const params = {
|
||||
// flowId: this.flowId,
|
||||
// nodeId: this.auditingList[this.auditingList.length - 1].nodeId,
|
||||
// isAccept: this.isAccept,
|
||||
// remark: this.remark
|
||||
// }
|
||||
// try {
|
||||
// const res = await auditDir(params)
|
||||
// console.log('🚀 ~ submitAuditing ~ res:', res)
|
||||
// this.$message.success('审核成功')
|
||||
// this.$tab.closePage()
|
||||
// } catch (error) {
|
||||
// console.log('🚀 ~ submitAuditing ~ error:', error)
|
||||
// }
|
||||
},
|
||||
// 获取详情
|
||||
async getTaskInfo() {
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ export default {
|
|||
console.log('row.configValues', row.configValue)
|
||||
|
||||
if (row.configValue) {
|
||||
return row.flowStatus != 1 && row.configValue.includes(this.userId)
|
||||
return row.flowStatus != 2 && row.configValue.includes(this.userId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -670,7 +670,7 @@ export default {
|
|||
maCode: item.maCode,
|
||||
parentId: this.parentIdTemp,
|
||||
outNum: 1,
|
||||
publishTask: item.publishTask
|
||||
publishTask: this.publishTask
|
||||
})
|
||||
})
|
||||
this.single = selection.length != 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue