This commit is contained in:
zyh
2025-07-22 15:01:57 +08:00
30 changed files with 3987 additions and 546 deletions

View File

@@ -405,5 +405,5 @@ onMounted(() => {
getList()
getSheepfoldOptions()
getVarietyOptions()
})
</script>

View File

@@ -107,7 +107,11 @@
</template>
<script setup name="FixHoof">
<<<<<<< HEAD
import { listFixHoof, getFixHoof, delFixHoof, addFixHoof, updateFixHoof, checkSheepByManageTags, getVarietyOptions, getSheepBySheepfoldId } from '@/api/produce/other/fixHoof/fixHoof'
=======
import { listFixHoof, getFixHoof, delFixHoof, addFixHoof, updateFixHoof, checkSheepByManageTags, getVarietyOptions } from '@/api/produce/other/fixHoof'
>>>>>>> d6ae5f3654d4c07227a4547ae1732ddb570bda9f
import { listSheepfold_management as listSheepfold } from '@/api/fileManagement/sheepfold_management'
const { proxy } = getCurrentInstance()
@@ -351,9 +355,38 @@ function getSheepfoldOptions() {
})
}
<<<<<<< HEAD
onMounted(() => {
=======
//校验羊只是否存在 失焦时校验
async function validateSheep() {
if (!form.value.manageTags) return;
try {
const { data } = await checkSheepByManageTags(form.value.manageTags.trim())
if (!data) {
proxy.$modal.msgError('该管理耳号不存在');
// 清空
form.value.manageTags = null;
form.value.sheepId = null;
form.value.sheepfold = null;
form.value.varietyId = null;
} else {
// 隐藏字段:真正保存用
form.value.sheepId = data.id;
// 自动带出下拉框
form.value.sheepfold = data.sheepfoldId;
form.value.varietyId = data.varietyId;
}
} catch {
proxy.$modal.msgError('校验失败');
}
}
/* 只保留一个 onMounted */
getList()
>>>>>>> d6ae5f3654d4c07227a4547ae1732ddb570bda9f
getSheepfoldOptions()
getVarietyOptions()
getList()
})
</script>