优化出库参数

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"> <div class="auditing-container">
<el-input <el-input
type="textarea" type="textarea"
v-model="remark" v-model="auditingParams.remark"
placeholder="请输入审核意见" placeholder="请输入审核意见"
:autosize="{ minRows: 2, maxRows: 6 }" :autosize="{ minRows: 2, maxRows: 6 }"
/> />
@ -222,7 +222,7 @@
import TitleTip from './components/title-tip.vue' import TitleTip from './components/title-tip.vue'
import { getLeaseTaskDetail, receiveDetail, getInfoById, getAuditInfo, auditDir } from '@/api/business/index' 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 { export default {
components: { components: {
@ -258,7 +258,16 @@ export default {
type: 'image' type: 'image'
} }
], ],
previewList: [] previewList: [],
auditingParams: {
nodeId: '', // id
remark: '', //
typeId: '', // typeId
taskId: '', // taskId
isAccept: '', // 1. 2.
recordId: '',
nextNodeId: '' // ID
}
} }
}, },
created() { created() {
@ -287,8 +296,8 @@ export default {
// this.getAuditInfo() // this.getAuditInfo()
if (this.$route.query) { if (this.$route.query) {
const { nodeId, flowId } = this.$route.query const { nodeId, flowId } = this.$route.query
// this.auditingParams.taskId = taskId this.auditingParams.taskId = flowId
// this.currentNodeId = nodeId this.currentNodeId = nodeId
this.getLeaseTaskDetailFun(flowId) this.getLeaseTaskDetailFun(flowId)
} }
}, },
@ -302,7 +311,8 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.isAccept = 1 // this.isAccept = 1
this.auditingParams.isAccept = 1
this.submitAuditing() this.submitAuditing()
}) })
.catch(() => { .catch(() => {
@ -318,7 +328,7 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.isAccept = 2 this.auditingParams.isAccept = 2
this.submitAuditing() this.submitAuditing()
}) })
.catch(() => { .catch(() => {
@ -327,20 +337,50 @@ export default {
}, },
// //
async submitAuditing() { async submitAuditing() {
const params = { //
flowId: this.flowId,
nodeId: this.auditingList[this.auditingList.length - 1].nodeId, const currentAuditing = this.auditingList.filter(e => e.nodeId === this.currentNodeId) //
isAccept: this.isAccept, const currentIndex = this.auditingList.findIndex(e => e.nodeId === this.currentNodeId) //
remark: this.remark
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) const res = await submitAuditingApi(this.auditingParams)
console.log('🚀 ~ submitAuditing ~ res:', res)
this.$message.success('审核成功') if (res.code === 200) {
this.$tab.closePage() this.$modal.msgSuccess('审核成功')
} catch (error) { setTimeout(() => {
console.log('🚀 ~ submitAuditing ~ error:', error) // 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() { async getTaskInfo() {

View File

@ -206,7 +206,7 @@ export default {
console.log('row.configValues', row.configValue) console.log('row.configValues', row.configValue)
if (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, maCode: item.maCode,
parentId: this.parentIdTemp, parentId: this.parentIdTemp,
outNum: 1, outNum: 1,
publishTask: item.publishTask publishTask: this.publishTask
}) })
}) })
this.single = selection.length != 1 this.single = selection.length != 1