优化出库参数

This commit is contained in:
BianLzhaoMin 2025-03-06 13:37:00 +08:00
parent 0d70cb70df
commit eba5e97c19
3 changed files with 61 additions and 21 deletions

View File

@ -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('审核成功')
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()
} catch (error) {
console.log('🚀 ~ submitAuditing ~ error:', error)
}, 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() {

View File

@ -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)
}
}
}

View File

@ -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