bug修复

This commit is contained in:
zyh 2025-08-04 17:22:15 +08:00
parent 53b3efb432
commit 5df66f9b02

View File

@ -481,6 +481,7 @@ async function loadSheepInfo() {
const tagDetails = {};
const validResults = [];
let firstSheepfoldId = null;
let firstRanchId = null;
for (const tag of tags) {
try {
@ -498,6 +499,7 @@ async function loadSheepInfo() {
};
if (!firstSheepfoldId) {
firstSheepfoldId = sheepData.sheepfoldId;
firstRanchId = sheepData.ranchId;
}
}
} catch (error) {
@ -513,6 +515,11 @@ async function loadSheepInfo() {
}
form.value.tagDetails = tagDetails;
if (firstRanchId && isAdd.value) {
form.value.ranchId = firstRanchId;
handleRanchChange(firstRanchId);
}
if (firstSheepfoldId && isAdd.value) {
form.value.foldFrom = Number(firstSheepfoldId);
}