优化退料接收之前的校验

This commit is contained in:
BianLzhaoMin 2024-07-05 16:44:21 +08:00
parent b25ca75270
commit 4b7763fcfd
2 changed files with 32 additions and 15 deletions

View File

@ -218,6 +218,14 @@ export function getRecord(query) {
params: query
})
}
// 退料完成之前 判断所有设备是否全部操作退料
export function endBackBeforeQueryApi(query) {
return request({
url: 'backReceive/getReceiveViewWebNum',
method: 'post',
query
})
}
// 退料接收 撤回操作
export function revoke(data) {

View File

@ -693,6 +693,7 @@ import {
getRecord,
endBack,
revoke,
endBackBeforeQueryApi,
} from '@/api/claimAndRefund/return'
import { getTypeList } from '@/api/store/warehousing'
import { equipmentTypeTree } from '@/api/store/tools'
@ -907,11 +908,20 @@ export default {
},
//退
async completeBack() {
let param1 = {
parentId: this.queryParams.id,
// let param1 = {
// parentId: this.queryParams.id,
// }
// const res1 = await getRecord(param1)
const { data: res } = await endBackBeforeQueryApi({
id: this.queryParams.id,
})
if (res == 0) {
this.$message.error(
'当前存在未退料机具,请处理之后再点击完成退料!',
)
return
}
const res1 = await getRecord(param1)
if (res1.code == 200) {
let param = {
createBy: this.createBy,
parentId: this.queryParams.id,
@ -924,7 +934,6 @@ export default {
this.$emit('goBackPage')
}
})
}
},
//
handleViewCode(row) {