退料接收管理-退料审核-批量审核

This commit is contained in:
binbin_pan 2024-04-22 10:07:03 +08:00
parent 62c669aa9f
commit 546eb704fb
2 changed files with 52 additions and 12 deletions

View File

@ -291,6 +291,14 @@ export function getUseNumByTypeId(params){
})
}
// 批量审核
export function auditAll(params){
return request({
url: '/material/backApply/auditAll',
method: 'post',
data: params
})
}

View File

@ -426,7 +426,7 @@ import {
ApiBackApplyRefuse,
} from '@/api/claimAndRefund/return.js'
import { getInfo, h } from '@/api/login'
import { getUnitData, getProData, getAgreementInfoById } from '@/api/claimAndRefund/receive.js'
import { getUnitData, getProData, getAgreementInfoById, auditAll } from '@/api/claimAndRefund/receive.js'
import dialogForm from './dialogFormExame.vue'
import { listPartTypeApi } from '@/api/repairTest/repair'
import Tree from './tree.vue'
@ -536,6 +536,7 @@ export default {
loadingTotal: 0,
rowObj: {},
loadingType: '',
idList: [],
}
},
created() {
@ -608,6 +609,14 @@ export default {
this.ids = selection.map(item => item.id)
this.single = selection.length != 1
this.multiple = !selection.length
this.idList = selection.map(item => {
return {
id: item.id,
taskId: item.taskId,
agreementId: item.agreementId,
badId: item.badId,
}
})
},
handlePrint(row) {
this.isShowOneFlag = true
@ -747,18 +756,41 @@ export default {
}
},
handleExam() {
let params = {
ids: this.ids.join(','),
}
ApiBackApplyAudit(params)
.then(res => {
if (res.code == 200) {
this.ids = []
this.$message.error(res.msg)
this.getList()
}
let backApplyList = []
//
this.$confirm('是否确认审核通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.idList.map(item => {
let params = {
taskId: item.taskId,
agreementId: item.agreementId,
badId: item.badId,
pageNum: this.dialogQueryParams.pageNum,
pageSize: this.dialogQueryParams.pageSize,
}
getViewByExamine(params).then(res => {
backApplyList.push({
id: item.id,
backApplyDetails: res.rows,
})
})
})
setTimeout(() => {
auditAll({ backApplyList }).then(res => {
this.$message.success(res.msg)
this.getList()
})
}, 100)
})
.catch(() => {
this.$message.info('已取消审核')
})
.catch(() => {})
},
/** 删除按钮操作 */