From f34c2e45f133d9c6272f31b5180ddb9cc131da10 Mon Sep 17 00:00:00 2001 From: zyk Date: Wed, 3 Dec 2025 18:26:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=B2=E8=83=9A=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/embryo/flush.js | 61 ++ .../Breeding_records/index.vue | 26 +- src/views/embryo/flush/index.vue | 618 ++++++++++++++++++ 3 files changed, 695 insertions(+), 10 deletions(-) create mode 100644 src/api/embryo/flush.js create mode 100644 src/views/embryo/flush/index.vue diff --git a/src/api/embryo/flush.js b/src/api/embryo/flush.js new file mode 100644 index 0000000..1c24cfc --- /dev/null +++ b/src/api/embryo/flush.js @@ -0,0 +1,61 @@ +import request from '@/utils/request' + +// 查询冲胚记录列表 +export function listFlush(query) { + return request({ + url: '/embryo/flush/list', + method: 'get', + params: query + }) +} + +// 查询冲胚记录详细 +export function getFlush(id) { + return request({ + url: '/embryo/flush/' + id, + method: 'get' + }) +} + +// 新增冲胚记录 +export function addFlush(data) { + return request({ + url: '/embryo/flush', + method: 'post', + data: data + }) +} + +// 修改冲胚记录 +export function updateFlush(data) { + return request({ + url: '/embryo/flush', + method: 'put', + data: data + }) +} + +// 删除冲胚记录 +export function delFlush(id) { + return request({ + url: '/embryo/flush/' + id, + method: 'delete' + }) +} + +// 根据供体母羊耳号获取关联信息 +export function getDonorInfo(donorFemaleNo) { + return request({ + url: '/embryo/flush/getDonorInfo', + method: 'get', + params: { donorFemaleNo } + }) +} + +// 获取供体母羊下拉列表 +export function getDonorFemaleList() { + return request({ + url: '/embryo/flush/donorFemaleList', + method: 'get' + }) +} \ 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 7ca9f3e..b74850c 100644 --- a/src/views/Breeding_records/Breeding_records/index.vue +++ b/src/views/Breeding_records/Breeding_records/index.vue @@ -37,6 +37,8 @@ + + @@ -132,7 +134,7 @@ :default-sort="{prop: 'createTime', order: 'descending'}" > - + - + @@ -259,6 +261,8 @@ + + @@ -337,7 +341,7 @@ - + 孕检信息 @@ -452,6 +456,8 @@ const {queryParams, form, rules} = toRefs(data) function getBreedTypeText(breedType) { if (breedType === 1) return '同期发情' if (breedType === 2) return '本交' + if (breedType === 3) return '冲胚' + if (breedType === 4) return '自然发情人工授精' return '-' } @@ -549,7 +555,7 @@ function handleUpdate(row) { open.value = true title.value = "修改配种记录" - // 如果有母羊耳号,加载母羊信息 + // 如果有母羊耳号,加载母羊信息 if (form.value.eweManageTags) { getEweInfoAndPlan() } @@ -573,11 +579,11 @@ function getEweInfoAndPlan() { eweInfo.value = null }) - // 获取配种计划信息(使用最新的获取方法) + // 获取配种计划信息(使用最新的获取方法) getLatestBreedPlanByEweTags(form.value.eweManageTags).then(response => { if (response.data) { breedPlan.value = response.data - // 自动填充公羊耳号和配种方式(但允许用户修改) + // 自动填充公羊耳号和配种方式(但允许用户修改) if (!form.value.ramManageTags) { form.value.ramManageTags = response.data.ram_manage_tags } @@ -585,13 +591,13 @@ function getEweInfoAndPlan() { form.value.breedType = response.data.breed_type } - proxy.$modal.msgSuccess("已自动匹配配种计划信息,可手动调整") + proxy.$modal.msgSuccess("已自动匹配配种计划信息,可手动调整") } else { breedPlan.value = null - proxy.$modal.msgWarning("未找到该母羊的配种计划,请手动输入配种信息") + proxy.$modal.msgWarning("未找到该母羊的配种计划,请手动输入配种信息") } }).catch(() => { - proxy.$modal.msgWarning("查询配种计划失败,请手动输入配种信息") + proxy.$modal.msgWarning("查询配种计划失败,请手动输入配种信息") breedPlan.value = null }) } @@ -636,7 +642,7 @@ function submitForm() { /** 删除按钮操作 */ function handleDelete(row) { const _ids = row.id || ids.value - proxy.$modal.confirm('是否确认删除配种记录编号为"' + _ids + '"的数据项?').then(function () { + proxy.$modal.confirm('是否确认删除配种记录编号为"' + _ids + '"的数据项?').then(function () { return delBreeding_records(_ids) }).then(() => { getList() diff --git a/src/views/embryo/flush/index.vue b/src/views/embryo/flush/index.vue new file mode 100644 index 0000000..04d17b8 --- /dev/null +++ b/src/views/embryo/flush/index.vue @@ -0,0 +1,618 @@ + + + \ No newline at end of file