diff --git a/src/api/Breeding_records/Breeding_records.js b/src/api/Breeding_records/Breeding_records.js
index 42a430a..cb651d9 100644
--- a/src/api/Breeding_records/Breeding_records.js
+++ b/src/api/Breeding_records/Breeding_records.js
@@ -82,4 +82,14 @@ export function getBreedRecordsByTimeRange(sheepId, startDate, endDate) {
url: `/Breeding_records/Breeding_records/getByTimeRange/${sheepId}/${startDate}/${endDate}`,
method: 'get'
})
+}
+
+// 模糊搜索耳号(用于表单 autocomplete)
+// gender: 'ewe'=母羊 'ram'=公羊 不传=不限
+export function searchBreedEarNumbers(query, gender) {
+ return request({
+ url: '/Breeding_records/Breeding_records/searchEarNumbers',
+ method: 'get',
+ params: { query, gender }
+ })
}
\ No newline at end of file
diff --git a/src/api/Sperm/Sperm.js b/src/api/Sperm/Sperm.js
index 26caaa0..2799a3b 100644
--- a/src/api/Sperm/Sperm.js
+++ b/src/api/Sperm/Sperm.js
@@ -75,4 +75,4 @@ export function exportSperm(query) {
data: query,
responseType: 'blob'
})
-}
\ No newline at end of file
+}
diff --git a/src/api/embryodetail/embryodetail.js b/src/api/embryodetail/embryodetail.js
new file mode 100644
index 0000000..ccf1f5d
--- /dev/null
+++ b/src/api/embryodetail/embryodetail.js
@@ -0,0 +1,63 @@
+import request from '@/utils/request'
+
+// 查询可供移植的胚胎明细
+// flushId 可选:传则只查该批次,不传则返回所有可移植胚胎
+export function listAvailableEmbryos(flushId) {
+ return request({
+ url: '/embryo/detail/available',
+ method: 'get',
+ params: flushId ? { flushId } : {}
+ })
+}
+
+// 将某枚胚胎标记为已移植,并关联配种记录ID
+export function markEmbryoTransferred(id, breedRecordId) {
+ return request({
+ url: '/embryo/detail/markTransferred',
+ method: 'post',
+ params: { id, breedRecordId }
+ })
+}
+
+// 批量标记胚胎已移植,并同步冲胚表统计字段
+// data: { ids: [1,2,3], breedRecordId: 100 }
+export function markBatchEmbryoTransferred(data) {
+ return request({
+ url: '/Breeding_records/Breeding_records/markBatchEmbryoTransferred',
+ method: 'post',
+ data: data
+ })
+}
+
+// 根据配种记录ID查询已移植的胚胎明细列表(用于"查看胚胎"弹窗)
+export function getEmbryosByBreedRecord(breedRecordId) {
+ return request({
+ url: '/Breeding_records/Breeding_records/embryosByBreedRecord/' + breedRecordId,
+ method: 'get'
+ })
+}
+
+// 根据冲胚记录ID查询胚胎明细列表(含父记录字段,供冲胚编辑/查看回显用)
+export function listEmbryosByFlushId(flushId) {
+ return request({
+ url: `/embryo/detail/byFlush/${flushId}`,
+ method: 'get'
+ })
+}
+
+// 获取单条胚胎明细
+export function getEmbryoDetail(id) {
+ return request({
+ url: `/embryo/detail/${id}`,
+ method: 'get'
+ })
+}
+
+// 修改单条胚胎明细(如修改去向、存储方式)
+export function updateEmbryoDetail(data) {
+ return request({
+ url: '/embryo/detail',
+ method: 'put',
+ data: data
+ })
+}
\ No newline at end of file
diff --git a/src/views/Breeding_records/Breeding_records/index.vue b/src/views/Breeding_records/Breeding_records/index.vue
index 81b510d..a6a12f5 100644
--- a/src/views/Breeding_records/Breeding_records/index.vue
+++ b/src/views/Breeding_records/Breeding_records/index.vue
@@ -1,417 +1,29 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
-
+
+
-
+
+
@@ -420,19 +32,13 @@
+
新增
- 删除
+ 删除
导出
@@ -440,29 +46,26 @@
+
-
配种
-
+
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
-
-
{{ getBreedTypeText(scope.row.breedType) }}
-
@@ -477,46 +80,84 @@
-
-
{{ scope.row.eweControlled === 1 ? '是' : '否' }}
-
-
修改
删除
+ 查看胚胎
+
-
+
+
+ {{ item.value }}
+ {{ item.variety }}
+
+
+
-
+
+
+
+
+ {{ item.value }}
+ {{ item.variety }}
+
+
+ 从采精记录选
+
+
@@ -529,18 +170,20 @@
/>
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -548,18 +191,26 @@
+
- 胚胎移植手动录入
+ 胚胎移植
-
+
+
-
+
@@ -567,12 +218,12 @@
-
+
-
+
@@ -580,7 +231,7 @@
-
+
@@ -590,7 +241,9 @@
-
+
@@ -612,13 +265,143 @@
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+ {{ parseTime(scope.row.pickDate, '{y}-{m}-{d}') }}
+
+
+
+
+
+
+
+
+
+
+ 确认选择
+ 取 消
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.flushTime, '{y}-{m}-{d}') }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ (scope.row.validEmbryo || 0) - (scope.row.transferred || 0) }}
+
+
+
+
+
+
+
+
+
+
+ 已选 {{ selectedEmbryoRows.length }} 枚,移胚数将自动同步。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已选 {{ selectedEmbryoRows.length }} 枚
+ 确认选择
+ 取 消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 关 闭
+
+
+
+
\ No newline at end of file
diff --git a/src/views/embryo/flush/index.vue b/src/views/embryo/flush/index.vue
index d422ad9..5aeb974 100644
--- a/src/views/embryo/flush/index.vue
+++ b/src/views/embryo/flush/index.vue
@@ -1,6 +1,6 @@
-
+
+ />
-
+
-
+
搜索
@@ -34,89 +24,57 @@
-
+
- 新增
-
-
-
- 修改
+ 新增
- 删除
+ 修改
- 导出
+ 删除
-
+
+ 导出
+
+
-
+
-
-
- {{ parseTime(scope.row.flushTime, '{y}-{m}-{d}') }}
-
+
+ {{ parseTime(scope.row.flushTime, '{y}-{m}-{d}') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 修改
+ 修改
删除
@@ -124,49 +82,45 @@
-
-
+
+
+
基础信息
-
-
+
-
+
-
- {{ item.manageTag }}
- {{ item.variety }}
-
-
+ placeholder="输入耳号或从配种记录选择"
+ clearable
+ style="width: calc(100% - 88px)"
+ @change="handleDonorFemaleInputChange"
+ />
+
+ 从配种记录选
+
@@ -178,20 +132,12 @@
-
-
+
+
{{ item.manageTag }}
- {{ item.variety }}
+ {{ item.variety }}
@@ -210,7 +156,8 @@
-
+
@@ -220,92 +167,102 @@
-
- 胚胎等级
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 胚胎明细
+
+ 共 {{ form.embryoDetails.length }} 枚 | 有效胚 {{ computedValidEmbryo }} 枚
+
+
-
- 发育阶段
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ + A+级
+ + A级
+ + B级
+ + C级
+ + 2/4细胞
+ + 8细胞
+ + 16细胞
+ + 未受精
+ + 退化
+
-
+
+
+
+ {{ scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂无胚胎明细,请点击上方按钮添加
+
+
+
统计信息
-
+
-
+
-
-
+
+
-
-
+
+
@@ -315,7 +272,7 @@
-
+
@@ -325,28 +282,12 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -357,13 +298,16 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+ {{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
+
+
+
+
+
+
+
+
+ 确认选择
+ 取 消
+
+
+
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/src/views/embryodetail/embryodetail/index.vue b/src/views/embryodetail/embryodetail/index.vue
new file mode 100644
index 0000000..944aec1
--- /dev/null
+++ b/src/views/embryodetail/embryodetail/index.vue
@@ -0,0 +1,724 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.flushTime, '{y}-{m}-{d}') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+ 基础信息
+
+
+
+
+
+
+
+
+
+
+
+ 从配种记录选
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.manageTag }}
+ {{ item.variety }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 胚胎明细
+
+ 共 {{ form.embryoDetails.length }} 枚 | 有效胚 {{ computedValidEmbryo }} 枚
+
+
+
+
+
+ + A级
+ + B级
+ + C级
+ + 16细胞
+ + 未受精
+ + 退化
+
+
+
+
+
+ {{ scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂无胚胎明细,请点击上方按钮添加
+
+
+
+ 统计信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 其他信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+ {{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
+
+
+
+
+
+
+
+
+ 确认选择
+ 取 消
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/mating_plan/mating_plan/generate/index.vue b/src/views/mating_plan/mating_plan/generate/index.vue
index e4147c6..9c8ca59 100644
--- a/src/views/mating_plan/mating_plan/generate/index.vue
+++ b/src/views/mating_plan/mating_plan/generate/index.vue
@@ -107,6 +107,13 @@
type="info" :closable="false" show-icon />
+
+
+ 下载配对模板
+
+ 下载空白模板,填写耳号后上传
+
+
@@ -364,7 +371,8 @@ import {
confirmApproveBreedPlan,
viewBreedPlan,
exportBreedPlanDetails,
- delBreedPlanGenerate
+ delBreedPlanGenerate,
+ downloadPairTemplate
} from '@/api/mating_plan/generate'
const { proxy } = getCurrentInstance()
@@ -520,6 +528,23 @@ function handleClearImport() {
if (uploadRef.value) uploadRef.value.clearFiles()
}
+async function handleDownloadTemplate() {
+ try {
+ const res = await downloadPairTemplate()
+ const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
+ const url = window.URL.createObjectURL(blob)
+ const a = document.createElement('a')
+ a.href = url
+ a.download = '配种配对模板.xlsx'
+ document.body.appendChild(a)
+ a.click()
+ document.body.removeChild(a)
+ window.URL.revokeObjectURL(url)
+ } catch (e) {
+ proxy.$modal.msgError('下载模板失败:' + e.message)
+ }
+}
+
// =================== Tab3:计划列表 ===================
const listLoading = ref(false)
const planList = ref([])