配种记录和冲胚记录所有逻辑修改完成
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -207,29 +207,31 @@
|
|||||||
<!-- 胚胎等级 -->
|
<!-- 胚胎等级 -->
|
||||||
<el-divider content-position="left">胚胎等级</el-divider>
|
<el-divider content-position="left">胚胎等级</el-divider>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<el-form-item label="A+">
|
<el-form-item label="A+级" prop="gradeAPlus" label-width="60px">
|
||||||
<el-input-number v-model="form.gradeAPlus" :min="0" controls-position="right" @change="calculateTotal" style="width: 100%" />
|
<el-input-number v-model="form.gradeAPlus" :min="0" @change="calculateTotal" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<el-form-item label="A">
|
<el-form-item label="A级" prop="gradeA" label-width="60px">
|
||||||
<el-input-number v-model="form.gradeA" :min="0" controls-position="right" @change="calculateTotal" style="width: 100%" />
|
<el-input-number v-model="form.gradeA" :min="0" @change="calculateTotal" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<el-form-item label="B">
|
<el-form-item label="B级" prop="gradeB" label-width="60px">
|
||||||
<el-input-number v-model="form.gradeB" :min="0" controls-position="right" @change="calculateTotal" style="width: 100%" />
|
<el-input-number v-model="form.gradeB" :min="0" @change="calculateTotal" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<el-form-item label="C">
|
<el-form-item label="C级" prop="gradeC" label-width="60px">
|
||||||
<el-input-number v-model="form.gradeC" :min="0" controls-position="right" @change="calculateTotal" style="width: 100%" />
|
<el-input-number v-model="form.gradeC" :min="0" @change="calculateTotal" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
</el-row>
|
||||||
<el-form-item label="D">
|
<el-row :gutter="20">
|
||||||
<el-input-number v-model="form.gradeD" :min="0" controls-position="right" @change="calculateTotal" style="width: 100%" />
|
<el-col :span="6">
|
||||||
|
<el-form-item label="D级" prop="gradeD" label-width="60px">
|
||||||
|
<el-input-number v-model="form.gradeD" :min="0" @change="calculateTotal" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -237,29 +239,31 @@
|
|||||||
<!-- 发育阶段 -->
|
<!-- 发育阶段 -->
|
||||||
<el-divider content-position="left">发育阶段</el-divider>
|
<el-divider content-position="left">发育阶段</el-divider>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<el-form-item label="2/4细胞">
|
<el-form-item label="2/4细胞" prop="cell24" label-width="60px">
|
||||||
<el-input-number v-model="form.cell24" :min="0" controls-position="right" @change="calculateTotal" style="width: 100%" />
|
<el-input-number v-model="form.cell24" :min="0" @change="calculateTotal" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<el-form-item label="8细胞">
|
<el-form-item label="8细胞" prop="cell8" label-width="60px">
|
||||||
<el-input-number v-model="form.cell8" :min="0" controls-position="right" @change="calculateTotal" style="width: 100%" />
|
<el-input-number v-model="form.cell8" :min="0" @change="calculateTotal" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<el-form-item label="16细胞">
|
<el-form-item label="16细胞" prop="cell16" label-width="60px">
|
||||||
<el-input-number v-model="form.cell16" :min="0" controls-position="right" @change="calculateTotal" style="width: 100%" />
|
<el-input-number v-model="form.cell16" :min="0" @change="calculateTotal" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<el-form-item label="未受精">
|
<el-form-item label="未受精" prop="unfertilized" label-width="60px">
|
||||||
<el-input-number v-model="form.unfertilized" :min="0" controls-position="right" @change="calculateTotal" style="width: 100%" />
|
<el-input-number v-model="form.unfertilized" :min="0" @change="calculateTotal" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
</el-row>
|
||||||
<el-form-item label="退化">
|
<el-row :gutter="20">
|
||||||
<el-input-number v-model="form.degenerated" :min="0" controls-position="right" @change="calculateTotal" style="width: 100%" />
|
<el-col :span="6">
|
||||||
|
<el-form-item label="退化" prop="degenerated" label-width="60px">
|
||||||
|
<el-input-number v-model="form.degenerated" :min="0" @change="calculateTotal" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -310,7 +314,11 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="去向" prop="destination">
|
<el-form-item label="去向" prop="destination">
|
||||||
<el-input v-model="form.destination" placeholder="默认遗弃可自行修改" />
|
<el-select v-model="form.destination" placeholder="请选择去向" style="width: 100%">
|
||||||
|
<el-option label="冷冻保存" value="冷冻保存" />
|
||||||
|
<el-option label="移植" value="移植" />
|
||||||
|
<el-option label="遗弃" value="遗弃" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -511,15 +519,22 @@ function handleFlushTimeChange(val) {
|
|||||||
/** 供体母羊选择变化 */
|
/** 供体母羊选择变化 */
|
||||||
function handleDonorFemaleChange(val) {
|
function handleDonorFemaleChange(val) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
form.value.donorFemaleVariety = null
|
if (!val) { /* 清空逻辑... */ return; }
|
||||||
form.value.donorMaleNo = null
|
|
||||||
form.value.donorMaleVariety = null
|
getDonorInfo(val).then(response => {
|
||||||
form.value.embryoVariety = null
|
console.log("后端返回的数据:", response.data); // 检查这里是否有 embryoVariety 字段
|
||||||
form.value.ranchId = null
|
const info = response.data || {};
|
||||||
form.value.ranchName = null
|
// 确保这些字段名与后端 result.put(...) 的 Key 一致
|
||||||
form.value.embryoAge = null
|
form.value.donorFemaleVariety = info.donorFemaleVariety || null;
|
||||||
matingDateCache.value = null
|
form.value.donorMaleNo = info.donorMaleNo || null; // 匹配成功后会自动填入
|
||||||
return
|
form.value.donorMaleVariety = info.donorMaleVariety || null;
|
||||||
|
form.value.embryoVariety = info.embryoVariety || null; // 自动计算后的品种
|
||||||
|
form.value.ranchId = info.ranchId || null;
|
||||||
|
form.value.ranchName = info.ranchName || null;
|
||||||
|
|
||||||
|
matingDateCache.value = info.matingDate || null;
|
||||||
|
calculateEmbryoAge(); // 计算胎龄
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 调用接口获取关联信息
|
// 调用接口获取关联信息
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user