diff --git a/src/api/Breeding_records/Breeding_records.js b/src/api/Breeding_records/Breeding_records.js index 24a5bff..42a430a 100644 --- a/src/api/Breeding_records/Breeding_records.js +++ b/src/api/Breeding_records/Breeding_records.js @@ -57,4 +57,29 @@ export function getBreedPlanByEweTags(manageTags) { url: '/Breeding_records/Breeding_records/getBreedPlan/' + manageTags, method: 'get' }) +} + +// 根据母羊耳号获取最新配种计划信息(优先从配种计划生成表获取) +export function getLatestBreedPlanByEweTags(manageTags) { + return request({ + url: '/Breeding_records/Breeding_records/getLatestBreedPlan/' + manageTags, + method: 'get' + }) +} + +// 同步孕检结果到配种记录 +export function syncPregnancyResult(data) { + return request({ + url: '/Breeding_records/Breeding_records/syncPregnancyResult', + method: 'post', + data: data + }) +} + +// 根据羊只ID和时间范围查询配种记录 +export function getBreedRecordsByTimeRange(sheepId, startDate, endDate) { + return request({ + url: `/Breeding_records/Breeding_records/getByTimeRange/${sheepId}/${startDate}/${endDate}`, + method: 'get' + }) } \ No newline at end of file diff --git a/src/api/Pregnancy_Test/Pregnancy_Test.js b/src/api/Pregnancy_Test/Pregnancy_Test.js index 8547e00..da354f4 100644 --- a/src/api/Pregnancy_Test/Pregnancy_Test.js +++ b/src/api/Pregnancy_Test/Pregnancy_Test.js @@ -52,4 +52,15 @@ export function getSheepByManageTags(manageTags) { manageTags: manageTags } }) +} + +// 根据耳号获取配种信息 +export function getBreedInfoByManageTags(manageTags) { + return request({ + url: '/Pregnancy_Test/Pregnancy_Test/getBreedInfoByManageTags', + method: 'get', + params: { + manageTags: manageTags + } + }) } \ No newline at end of file diff --git a/src/api/breed/lambing_records.js b/src/api/breed/lambing_records.js index d28f266..1f40c1a 100644 --- a/src/api/breed/lambing_records.js +++ b/src/api/breed/lambing_records.js @@ -17,6 +17,14 @@ export function getLambing_records(id) { }) } +// 根据母羊耳号查询最新配种记录 +export function getBreedingInfo(earNumber) { + return request({ + url: '/breed/lambing_records/breeding_info/' + earNumber, + method: 'get' + }) +} + // 新增产羔记录(包含羔羊信息) export function addLambing_records(data) { return request({ diff --git a/src/api/feed/FeedList.js b/src/api/feed/FeedList.js new file mode 100644 index 0000000..50e8a9d --- /dev/null +++ b/src/api/feed/FeedList.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询配料清单列表 +export function listFeedList(query) { + return request({ + url: '/feed/FeedList/list', + method: 'get', + params: query + }) +} + +// 查询配料清单详细 +export function getFeedList(id) { + return request({ + url: '/feed/FeedList/' + id, + method: 'get' + }) +} + +// 新增配料清单 +export function addFeedList(data) { + return request({ + url: '/feed/FeedList', + method: 'post', + data: data + }) +} + +// 修改配料清单 +export function updateFeedList(data) { + return request({ + url: '/feed/FeedList', + method: 'put', + data: data + }) +} + +// 删除配料清单 +export function delFeedList(id) { + return request({ + url: '/feed/FeedList/' + id, + method: 'delete' + }) +} diff --git a/src/api/feed/FeedStatistic.js b/src/api/feed/FeedStatistic.js new file mode 100644 index 0000000..9ba9f49 --- /dev/null +++ b/src/api/feed/FeedStatistic.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询饲喂量统计列表 +export function listFeedStatistic(query) { + return request({ + url: '/feed/FeedStatistic/list', + method: 'get', + params: query + }) +} + +// 查询饲喂量统计详细 +export function getFeedStatistic(id) { + return request({ + url: '/feed/FeedStatistic/' + id, + method: 'get' + }) +} + +// 新增饲喂量统计 +export function addFeedStatistic(data) { + return request({ + url: '/feed/FeedStatistic', + method: 'post', + data: data + }) +} + +// 修改饲喂量统计 +export function updateFeedStatistic(data) { + return request({ + url: '/feed/FeedStatistic', + method: 'put', + data: data + }) +} + +// 删除饲喂量统计 +export function delFeedStatistic(id) { + return request({ + url: '/feed/FeedStatistic/' + id, + method: 'delete' + }) +} + +// 查询饲喂量统计列表 +export function initFeedStatistic(query) { + return request({ + url: '/feed/FeedStatistic/init', + method: 'get', + params: query + }) +} diff --git a/src/api/mating_plan/generate.js b/src/api/mating_plan/generate.js index c224fbb..abee51a 100644 --- a/src/api/mating_plan/generate.js +++ b/src/api/mating_plan/generate.js @@ -60,11 +60,20 @@ export function updateBreedPlanGenerate(data) { }) } -// 审批配种计划 -export function approveBreedPlan(id) { +// 获取审批配种计划详情 +export function getApproveBreedPlan(id) { return request({ url: '/mating_plan/generate/approve/' + id, - method: 'put' + method: 'get' + }) +} + +// 确认审批配种计划 +export function confirmApproveBreedPlan(data) { + return request({ + url: '/mating_plan/generate/approve/confirm', + method: 'put', + data: data }) } @@ -76,6 +85,24 @@ export function viewBreedPlan(id) { }) } +// 导出配种计划详情 +export function exportBreedPlanDetails(id) { + return request({ + url: '/mating_plan/generate/export/' + id, + method: 'get', + responseType: 'blob' + }) +} + +// 修改配种计划详情 +export function updateBreedPlan(data) { + return request({ + url: '/mating_plan/generate/update', + method: 'put', + data: data + }) +} + // 删除配种计划生成 export function delBreedPlanGenerate(id) { return request({ diff --git a/src/api/mating_plan/mating_plan.js b/src/api/mating_plan/mating_plan.js index f856817..7d46169 100644 --- a/src/api/mating_plan/mating_plan.js +++ b/src/api/mating_plan/mating_plan.js @@ -41,4 +41,4 @@ export function delMating_plan(id) { url: '/mating_plan/mating_plan/' + id, method: 'delete' }) -} +} \ No newline at end of file diff --git a/src/api/miscarriage/miscarriage.js b/src/api/miscarriage/miscarriage.js new file mode 100644 index 0000000..117bba5 --- /dev/null +++ b/src/api/miscarriage/miscarriage.js @@ -0,0 +1,60 @@ +import request from '@/utils/request' + +// 查询流产记录列表 +export function listMiscarriage(query) { + return request({ + url: '/miscarriage/miscarriage/list', + method: 'get', + params: query + }) +} + +// 查询流产记录详细 +export function getMiscarriage(id) { + return request({ + url: '/miscarriage/miscarriage/' + id, + method: 'get' + }) +} + +// 根据耳号查询羊只信息 +export function getSheepInfo(manageTags) { + return request({ + url: '/miscarriage/miscarriage/sheep/' + manageTags, + method: 'get' + }) +} + +// 获取流产原因选项 +export function getReasonOptions() { + return request({ + url: '/miscarriage/miscarriage/reasonOptions', + method: 'get' + }) +} + +// 新增流产记录 +export function addMiscarriage(data) { + return request({ + url: '/miscarriage/miscarriage', + method: 'post', + data: data + }) +} + +// 修改流产记录 +export function updateMiscarriage(data) { + return request({ + url: '/miscarriage/miscarriage', + method: 'put', + data: data + }) +} + +// 删除流产记录 +export function delMiscarriage(id) { + return request({ + url: '/miscarriage/miscarriage/' + id, + method: 'delete' + }) +} \ No newline at end of file diff --git a/src/api/produce/bodyManage/body_measure.js b/src/api/produce/bodyManage/body_measure.js index 66862eb..99226d2 100644 --- a/src/api/produce/bodyManage/body_measure.js +++ b/src/api/produce/bodyManage/body_measure.js @@ -42,3 +42,10 @@ export function delBody_measure(id) { method: 'delete' }) } +//获取羊只类别列表 +export function getSheepTypeList() { + return request({ + url: '/base/base/list', + method: 'get' + }) +} \ No newline at end of file diff --git a/src/api/sheep_death/death.js b/src/api/sheep_death/death.js index cf76d09..6f85df7 100644 --- a/src/api/sheep_death/death.js +++ b/src/api/sheep_death/death.js @@ -17,14 +17,6 @@ export function getDeath(id) { }) } -// 根据管理耳号查询羊只信息 -export function getSheepInfo(manageTags) { - return request({ - url: '/sheep_death/death/sheepInfo/' + manageTags, - method: 'get' - }) -} - // 新增羊只死淘记录 export function addDeath(data) { return request({ @@ -49,4 +41,12 @@ export function delDeath(id) { url: '/sheep_death/death/' + id, method: 'delete' }) +} + +// 根据管理耳号查询羊只信息 +export function getSheepInfo(manageTags) { + return request({ + url: '/sheep_death/death/sheepInfo/' + manageTags, + 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 0f447f3..10dfb79 100644 --- a/src/views/Breeding_records/Breeding_records/index.vue +++ b/src/views/Breeding_records/Breeding_records/index.vue @@ -1,6 +1,6 @@ + + + + + + + + + + + + + + + + + + + + + - + + + @@ -110,6 +116,13 @@ {{ parseTime(scope.row.matingDate, '{y}-{m}-{d}') }} + + + + @@ -154,12 +167,13 @@ /> - + - + + - + @@ -168,15 +182,17 @@ v-model="form.datetime" type="date" value-format="YYYY-MM-DD" - placeholder="请选择孕检日期"> + placeholder="请选择孕检日期" + style="width: 100%"> - + + - + @@ -185,11 +201,18 @@ - + - + + @@ -197,7 +220,7 @@ - + @@ -205,48 +228,42 @@ - + + - + - - 羊只信息 - + + 配种信息 + - - + + - - + + - - + + - - - - - - - - - - - - - - - + + + + @@ -261,7 +278,7 @@ + \ No newline at end of file diff --git a/src/views/biosafety/prescription/index.vue b/src/views/biosafety/prescription/index.vue index 82ac02e..c9c156f 100644 --- a/src/views/biosafety/prescription/index.vue +++ b/src/views/biosafety/prescription/index.vue @@ -51,17 +51,19 @@ + - + diff --git a/src/views/biosafety/quarantine/index.vue b/src/views/biosafety/quarantine/index.vue index 5afd0c5..945e4ee 100644 --- a/src/views/biosafety/quarantine/index.vue +++ b/src/views/biosafety/quarantine/index.vue @@ -2,13 +2,37 @@
- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 重置 @@ -31,11 +55,13 @@ - - - + + + @@ -45,19 +71,22 @@ - + - + @@ -70,20 +99,25 @@ - + - - {{ id }} + {{ item.ear }} @@ -121,22 +155,27 @@ - + + + - + + + + - + - + @@ -153,11 +192,10 @@ + - - - + @@ -176,7 +214,7 @@ - {{ editForm.monthAge }} + {{ editForm.monthAge }} @@ -243,7 +281,13 @@ \ No newline at end of file diff --git a/src/views/biosafety/treatment/add.vue b/src/views/biosafety/treatment/add.vue index 1fd2571..c10d79d 100644 --- a/src/views/biosafety/treatment/add.vue +++ b/src/views/biosafety/treatment/add.vue @@ -147,7 +147,17 @@ - + + + - + + + + - + @@ -182,6 +201,13 @@ + + + + + + + @@ -199,7 +225,7 @@ - + @@ -261,14 +287,14 @@ - + @@ -313,23 +339,29 @@ - + + + + - + @@ -347,6 +379,13 @@ + + + + + + + @@ -354,6 +393,7 @@ + + + + + + {{ no }} + + + + + + + + + + + + + + + + + +
@@ -369,6 +435,7 @@ import { ref, reactive, onMounted, getCurrentInstance } from 'vue' import { listTreatment, getTreatment, delTreatment, addTreatment, updateTreatment } from '@/api/biosafety/treatment' import { listDisease } from '@/api/biosafety/disease' +import { listSheepfold_management } from "@/api/fileManagement/sheepfold_management" import { listPrescription, getPrescription } from '@/api/biosafety/prescription' import { listUnit } from '@/api/biosafety/unit' import { listUsage } from '@/api/biosafety/usage' @@ -379,7 +446,8 @@ import { useRouter } from 'vue-router' const router = useRouter() const { proxy } = getCurrentInstance() -const { sheep_gender } = proxy.useDict("sheep_gender") +const { sheep_gender, diag_result, treat_status } = proxy.useDict("sheep_gender", "diag_result", "treat_status") + /* ---------- 列表区域 ---------- */ const treatmentList = ref([]) @@ -390,6 +458,7 @@ const single = ref(true) const multiple = ref(true) const total = ref(0) const daterangeDatetime = ref([]) +const sheepfolds = ref([]) const queryParams = reactive({ pageNum: 1, @@ -421,6 +490,7 @@ const addForm = reactive({ diseasePid: null, diseaseId: null, veterinarian: '', + stats: '', comment: '' }) @@ -438,6 +508,7 @@ const editForm = reactive({ sheepType: '', monthAge: '', gender: '', + status: '', parity: '', breed: '', lactDay: '', @@ -451,9 +522,44 @@ const rules = { } const swPresDetailList = ref([ - { mediId: null, dosage: 0, unit: null, usageId: null, manufacturer: '', batchNumber: '' } + { mediId: null, dosage: 0, unit: null, usageId: null, usetime: new Date().toISOString().slice(0, 10), manufacturer: '', batchNumber: '' } ]) +/* ---------- 新增诊疗 ---------- */ +const diagnosisDialog = ref(false) +const selectedSheepNos = ref([]) +const addDia = reactive({ + sheepfoldId: null, + result: null, + datetime: new Date().toISOString().slice(0, 10) +}) + + +function handleAddDiagnosis() { + if (!ids.value.length) { + proxy.$modal.msgWarning('请至少选择一条治疗记录') + return + } + selectedSheepNos.value = treatmentList.value + .filter(item => ids.value.includes(item.id)) + .map(item => item.sheepNo) + diagnosisDialog.value = true +} + +function submitDiagnosis() { + const data = { + treatIds: ids.value, + result: addDia.result, + datetime: addDia.datetime, + sheepfoldId: addDia.sheepfoldId + } + request.post('/diagnosis/diagnosis/adds', data).then(() => { + proxy.$modal.msgSuccess('诊疗成功') + diagnosisDialog.value = false + getList() + }) +} + /* ---------- 列表查询 ---------- */ function getList() { loading.value = true @@ -498,7 +604,15 @@ function handleSelectPrescription(id) { /* ---------- 药品明细 ---------- */ function handleAddSwPresDetail() { - swPresDetailList.value.push({ mediId: null, dosage: 0, unit: null, usageId: null, manufacturer: '', batchNumber: '' }) + swPresDetailList.value.push({ + mediId: null, + dosage: 0, + unit: null, + usageId: null, + usetime: new Date().toISOString().slice(0, 10), + manufacturer: '', + batchNumber: '' + }) } function deletePresDetail(row) { swPresDetailList.value.splice(swPresDetailList.value.indexOf(row), 1) @@ -572,6 +686,7 @@ function handleUpdate(row) { gender: res.data.gender, parity: res.data.parity, breed: res.data.breed, + status: res.data.status, lactDay: res.data.lactDay, gestDay: res.data.gestDay }) @@ -668,6 +783,8 @@ onMounted(() => { listMedicine().then(res => { medicines.value = res.rows.map(item => ({ value: item.id, label: item.name })) }) + listSheepfold_management().then(res => { + sheepfolds.value = res.rows.map(item => ({ id: item.id, name: item.sheepfoldName })) + }) }) - diff --git a/src/views/biosafety/usageInfo/index.vue b/src/views/biosafety/usageInfo/index.vue index 2798caf..d5167d6 100644 --- a/src/views/biosafety/usageInfo/index.vue +++ b/src/views/biosafety/usageInfo/index.vue @@ -1,117 +1,217 @@ \ No newline at end of file diff --git a/src/views/mating_plan/mating_plan/index.vue b/src/views/mating_plan/mating_plan/mating_plan/index.vue similarity index 66% rename from src/views/mating_plan/mating_plan/index.vue rename to src/views/mating_plan/mating_plan/mating_plan/index.vue index ab78192..c84f453 100644 --- a/src/views/mating_plan/mating_plan/index.vue +++ b/src/views/mating_plan/mating_plan/mating_plan/index.vue @@ -3,18 +3,18 @@ @@ -26,40 +26,40 @@ 新增 修改 删除 导出 @@ -67,10 +67,17 @@ - + - + + + \ No newline at end of file diff --git a/src/views/produce/manage_sheep/transition_info/index.vue b/src/views/produce/manage_sheep/transition_info/index.vue index 51c4fd2..1ced6d2 100644 --- a/src/views/produce/manage_sheep/transition_info/index.vue +++ b/src/views/produce/manage_sheep/transition_info/index.vue @@ -2,14 +2,36 @@
+ + + + + + - + + + + + + + + + + + + + + @@ -25,10 +47,6 @@ - - - 搜索 重置 @@ -41,10 +59,10 @@ 新增 - + 删除 @@ -59,9 +77,21 @@ - + + + + + + + + + - + - - - - + - + + + @@ -94,33 +125,51 @@ - - - +
+ + + + + 已选 {{ form.manageTags.length }} 个 + +
- + - + + + + + + + + + + + + @@ -143,6 +192,9 @@ + + + @@ -161,6 +213,12 @@ + + + + +
\ No newline at end of file + + + \ No newline at end of file diff --git a/src/views/produce/other/castrate/index.vue b/src/views/produce/other/castrate/index.vue index 4a74ec7..873e55b 100644 --- a/src/views/produce/other/castrate/index.vue +++ b/src/views/produce/other/castrate/index.vue @@ -2,27 +2,24 @@
- - + + + + + - - - - - - - 搜索 重置 @@ -55,17 +52,18 @@ + + + - + + - - - - +