RS2509
jheng 2026-01-24 18:26:35 +08:00
parent 1b52659752
commit 5cc866f56a
1 changed files with 14 additions and 0 deletions

View File

@ -330,6 +330,20 @@
// }
//表单提交
formSubmit: function(ref) {
// 1. 新增核心校验:判断actQty是否为null
// 先判断数组是否存在且有数据,避免数组为空时报错
if (this.billInfo.checkPltInfos.length > 0) {
const firstItem = this.billInfo.checkPltInfos[0];
// 校验actQty是否为null/空/未定义
if (firstItem.actQty === null || firstItem.actQty === undefined || firstItem.actQty === '') {
this.$modal.msgError("请先填写确认数量,不允许为空!");
return; // 阻止后续提交逻辑
}
} else {
// 可选:如果数组为空也阻止提交(根据你的业务需求调整)
this.$modal.msgError("暂无盘点数据,无法提交!");
return;
}
//拿到 formaData
var details = this.getSelectDetail()
if (details && details.length > 0) {