SAP收货批次判断

yangwl
mengjiao 1 month ago
parent c8901fba0d
commit ef6932006f

@ -1314,6 +1314,22 @@ export default {
this.$modal.msgError(`请选择数据`); this.$modal.msgError(`请选择数据`);
return false; return false;
} }
// 使 for...of reportRows
for (const row of this.reportRows) {
console.log("当前行: ", row.batchSK); //
const batchSK = row.batchSK;
// 使
const isUpperCase = /^[A-Z0-9]+$/.test(batchSK);
if (isUpperCase) {
console.log("当前行的 batchSK (符合要求): ", batchSK); // batchSK
} else {
console.log("当前行的 batchSK 不符合要求 (应为大写): ", batchSK); // batchSK
this.$modal.msgError("批次不符合要求 (英文应为大写): " + batchSK); //
return; //
}
}
// 使 forEach reportRows
this.reportRows.forEach((row) => { this.reportRows.forEach((row) => {
this.$set(row, "whCode", this.selectedWarehouse); this.$set(row, "whCode", this.selectedWarehouse);
}); });

Loading…
Cancel
Save