This commit is contained in:
bb_pan 2025-07-23 18:25:58 +08:00
parent 89fd68034d
commit fc3ebb9089
1 changed files with 56 additions and 48 deletions

View File

@ -756,56 +756,62 @@ export default {
this.queryParams.createBy = this.user.userName
// this.queryParams.companyId = this.user.companyId
this.queryParams.userId = this.user.userId
let res
if (this.taskId) {
this.leaseApplyInfoList.forEach((v) => {
v = Object.assign(
v,
this.queryParams.leaseApplyInfo,
try {
let res
if (this.taskId) {
this.leaseApplyInfoList.forEach((v) => {
v = Object.assign(
v,
this.queryParams.leaseApplyInfo,
)
this.$set(
v,
'leaseApplyDetails',
this.queryParams.leaseApplyDetails,
)
})
// 100 souceByRefuse1
if (this.rejectTaskStatus == 100) {
this.queryParams.souceByRefuse = 1
}
this.submitLoading = true
const params = {
...this.queryParams,
taskId: this.taskId,
leaseApplyInfoList: this.leaseApplyInfoList,
}
res = await editLeaseApply(params)
} else {
// console.log(this.queryParams)
let isNum = this.queryParams.leaseApplyDetails.every(
(e) => e.num != 0,
)
this.$set(
v,
'leaseApplyDetails',
this.queryParams.leaseApplyDetails,
)
})
// 100 souceByRefuse1
if (this.rejectTaskStatus == 100) {
this.queryParams.souceByRefuse = 1
if (!isNum) {
this.$message.error('机具类型库存量为零无法领料')
return
}
this.submitLoading = true
res = await submitLeaseApply(this.queryParams)
}
this.submitLoading = true
const params = {
...this.queryParams,
taskId: this.taskId,
leaseApplyInfoList: this.leaseApplyInfoList,
if (res.code == 200) {
this.$message({
type: 'success',
message: res.msg,
})
this.submitLoading = false
// this.$tab.closeOpenPage({
// path: '/claimAndRefund/receive/receiveApply',
// })
this.$emit('goBackPage')
} else {
this.submitLoading = false
}
res = await editLeaseApply(params)
} else {
// console.log(this.queryParams)
let isNum = this.queryParams.leaseApplyDetails.every(
(e) => e.num != 0,
)
if (!isNum) {
this.$message.error('机具类型库存量为零无法领料')
return
}
this.submitLoading = true
res = await submitLeaseApply(this.queryParams)
}
if (res.code == 200) {
this.$message({
type: 'success',
message: res.msg,
})
} catch (error) {
this.submitLoading = false
// this.$tab.closeOpenPage({
// path: '/claimAndRefund/receive/receiveApply',
// })
this.$emit('goBackPage')
} else {
} finally {
this.submitLoading = false
}
}
@ -836,8 +842,10 @@ export default {
let maxNum = row.num
if (row.preNum <= 1) {
row.preNum = 1
} else if (row.preNum >= maxNum) {
row.preNum = maxNum
} else if (row.preNum > maxNum) {
// row.preNum = maxNum
// :
this.$message.error(`该设备的库存为${maxNum},预领数量不可超过此库存,请重新填写!`)
}
},
///////