From 56cd1726304d6df46d3a9aca3acb176f3ac0e798 Mon Sep 17 00:00:00 2001
From: piaobo <1913856125@qq.com>
Date: Mon, 25 Aug 2025 14:53:53 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/biosafety/treatment/index.vue | 139 +++++++++++-------------
src/views/biosafety/usageInfo/index.vue | 5 +
2 files changed, 68 insertions(+), 76 deletions(-)
diff --git a/src/views/biosafety/treatment/index.vue b/src/views/biosafety/treatment/index.vue
index 4e5e374..a795b81 100644
--- a/src/views/biosafety/treatment/index.vue
+++ b/src/views/biosafety/treatment/index.vue
@@ -10,9 +10,9 @@
-
-
-
+
+
+
@@ -64,7 +64,7 @@
-
+
@@ -72,7 +72,8 @@
修改
- 诊断
+ 诊断
删除
@@ -82,8 +83,8 @@
v-model:limit="queryParams.pageSize" @pagination="getList" />
-
-
+
+
@@ -145,16 +146,16 @@
{{ scope.$index + 1 }}
-
+
-
+
-
+
@@ -171,23 +172,18 @@
-
-
-
+
+
+
-
+
-
+
@@ -207,7 +203,7 @@
-
+
@@ -229,7 +225,7 @@
-
+
@@ -343,35 +339,29 @@
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
@@ -389,10 +379,10 @@
-
+
-
-
+
+
@@ -402,7 +392,7 @@
-
+
@@ -458,7 +446,7 @@ import { useRouter } from 'vue-router'
const router = useRouter()
const { proxy } = getCurrentInstance()
-const { sheep_gender,diag_result,treat_status } = proxy.useDict("sheep_gender","diag_result","treat_status")
+const { sheep_gender, diag_result, treat_status } = proxy.useDict("sheep_gender", "diag_result", "treat_status")
/* ---------- 列表区域 ---------- */
@@ -502,7 +490,7 @@ const addForm = reactive({
diseasePid: null,
diseaseId: null,
veterinarian: '',
- stats:'',
+ stats: '',
comment: ''
})
@@ -534,7 +522,7 @@ const rules = {
}
const swPresDetailList = ref([
- { mediId: null, dosage: 0, unit: null, usageId: null, usetime: new Date().toISOString().slice(0, 10),manufacturer: '', batchNumber: '' }
+ { mediId: null, dosage: 0, unit: null, usageId: null, usetime: new Date().toISOString().slice(0, 10), manufacturer: '', batchNumber: '' }
])
/* ---------- 新增诊疗 ---------- */
@@ -542,8 +530,8 @@ const diagnosisDialog = ref(false)
const selectedSheepNos = ref([])
const addDia = reactive({
sheepfoldId: null,
- result:null,
- datetime:new Date().toISOString().slice(0, 10)
+ result: null,
+ datetime: new Date().toISOString().slice(0, 10)
})
@@ -561,9 +549,9 @@ function handleAddDiagnosis() {
function submitDiagnosis() {
const data = {
treatIds: ids.value,
- result:addDia.result,
- datetime:addDia.datetime,
- sheepfoldId:addDia.sheepfoldId
+ result: addDia.result,
+ datetime: addDia.datetime,
+ sheepfoldId: addDia.sheepfoldId
}
request.post('/diagnosis/diagnosis/adds', data).then(() => {
proxy.$modal.msgSuccess('诊疗成功')
@@ -621,7 +609,7 @@ function handleAddSwPresDetail() {
dosage: 0,
unit: null,
usageId: null,
- usetime:new Date().toISOString().slice(0, 10),
+ usetime: new Date().toISOString().slice(0, 10),
manufacturer: '',
batchNumber: ''
})
@@ -800,4 +788,3 @@ onMounted(() => {
})
})
-
diff --git a/src/views/biosafety/usageInfo/index.vue b/src/views/biosafety/usageInfo/index.vue
index f82c41e..d5167d6 100644
--- a/src/views/biosafety/usageInfo/index.vue
+++ b/src/views/biosafety/usageInfo/index.vue
@@ -202,6 +202,11 @@
+
+
+ {{ parseTime(scope.row.usetime, '{y}-{m}-{d}') }}
+
+
From 3f4de7df2b3528261db494320eabbc0da8f226cf Mon Sep 17 00:00:00 2001
From: ll <1079863556@qq.com>
Date: Mon, 25 Aug 2025 16:32:45 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E9=9C=80=E6=B1=82=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 1 +
.../parityCorrection/parityCorrection.js | 84 +-
src/api/sale/customer/customer.js | 39 +
src/api/sale/saleRecord/saleRecord.js | 62 ++
.../dryMatterCorrection/index.vue | 66 +-
.../milkProdclasses/milkProdclasses/index.vue | 12 +-
.../dairyProducts/parityCorrection/index.vue | 224 ++++-
.../dairyProducts/weightCorrection/index.vue | 12 +-
src/views/sale/customer/index.vue | 285 ++++++
.../sale/saleRecord/saleRecord/index.vue | 935 ++++++++++++++++++
10 files changed, 1632 insertions(+), 88 deletions(-)
create mode 100644 src/api/sale/customer/customer.js
create mode 100644 src/api/sale/saleRecord/saleRecord.js
create mode 100644 src/views/sale/customer/index.vue
create mode 100644 src/views/sale/saleRecord/saleRecord/index.vue
diff --git a/package.json b/package.json
index 0abbf3b..4903716 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,7 @@
"clipboard": "2.0.11",
"date-fns": "^4.1.0",
"echarts": "5.5.1",
+ "element-china-area-data": "^6.1.0",
"element-plus": "^2.7.6",
"file-saver": "2.0.5",
"fuse.js": "6.6.2",
diff --git a/src/api/dairyProducts/parityCorrection/parityCorrection.js b/src/api/dairyProducts/parityCorrection/parityCorrection.js
index 0d2488b..98e592f 100644
--- a/src/api/dairyProducts/parityCorrection/parityCorrection.js
+++ b/src/api/dairyProducts/parityCorrection/parityCorrection.js
@@ -1,56 +1,44 @@
-// import request from '@/utils/request'
-
-// // 查询胎次校正列表
-// export function listParityCorrection(query) {
-// return request({
-// url: '/parityCorrection/parityCorrection/list',
-// method: 'get',
-// params: query
-// })
-// }
-
-// // 查询胎次校正详细
-// export function getParityCorrection(id) {
-// return request({
-// url: '/parityCorrection/parityCorrection/' + id,
-// method: 'get'
-// })
-// }
-
-// // 新增胎次校正
-// export function addParityCorrection(data) {
-// return request({
-// url: '/parityCorrection/parityCorrection',
-// method: 'post',
-// data: data
-// })
-// }
-
-// // 修改胎次校正
-// export function updateParityCorrection(data) {
-// return request({
-// url: '/parityCorrection/parityCorrection',
-// method: 'put',
-// data: data
-// })
-// }
-
-// // 删除胎次校正
-// export function delParityCorrection(id) {
-// return request({
-// url: '/parityCorrection/parityCorrection/' + id,
-// method: 'delete'
-// })
-// }
-// 可以保留空文件或删除此文件
-// 因为前端不再需要调用后端API
import request from '@/utils/request'
// 查询胎次校正列表
export function listParityCorrection(query) {
return request({
- url: '/parityCorrection/parityCorrection/listAll',
+ url: '/parityCorrection/parityCorrection/list',
method: 'get',
params: query
})
-}
\ No newline at end of file
+}
+
+// 查询胎次校正详细
+export function getParityCorrection(id) {
+ return request({
+ url: '/parityCorrection/parityCorrection/' + id,
+ method: 'get'
+ })
+}
+
+// 新增胎次校正
+export function addParityCorrection(data) {
+ return request({
+ url: '/parityCorrection/parityCorrection',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改胎次校正
+export function updateParityCorrection(data) {
+ return request({
+ url: '/parityCorrection/parityCorrection',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除胎次校正
+export function delParityCorrection(id) {
+ return request({
+ url: '/parityCorrection/parityCorrection/' + id,
+ method: 'delete'
+ })
+}
diff --git a/src/api/sale/customer/customer.js b/src/api/sale/customer/customer.js
new file mode 100644
index 0000000..3fe02fd
--- /dev/null
+++ b/src/api/sale/customer/customer.js
@@ -0,0 +1,39 @@
+import request from '@/utils/request'
+
+export function listCustomer(query) {
+ return request({
+ url: '/customer/customer/list',
+ method: 'get',
+ params: query
+ })
+}
+
+export function getCustomer(id) {
+ return request({
+ url: '/customer/customer/' + id,
+ method: 'get'
+ })
+}
+
+export function addCustomer(data) {
+ return request({
+ url: '/customer/customer',
+ method: 'post',
+ data: data
+ })
+}
+
+export function updateCustomer(data) {
+ return request({
+ url: '/customer/customer',
+ method: 'put',
+ data: data
+ })
+}
+
+export function delCustomer(id) {
+ return request({
+ url: '/customer/customer/' + id,
+ method: 'delete'
+ })
+}
\ No newline at end of file
diff --git a/src/api/sale/saleRecord/saleRecord.js b/src/api/sale/saleRecord/saleRecord.js
new file mode 100644
index 0000000..5eb4513
--- /dev/null
+++ b/src/api/sale/saleRecord/saleRecord.js
@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 查询羊只销售记录列表
+export function listSaleRecord(query) {
+ return request({
+ url: '/saleRecord/saleRecord/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询羊只销售记录详细
+export function getSaleRecord(id) {
+ return request({
+ url: '/saleRecord/saleRecord/' + id,
+ method: 'get'
+ })
+}
+
+// 新增羊只销售记录
+export function addSaleRecord(data) {
+ return request({
+ url: '/saleRecord/saleRecord',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改羊只销售记录
+export function updateSaleRecord(data) {
+ return request({
+ url: '/saleRecord/saleRecord',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除羊只销售记录
+export function delSaleRecord(ids) {
+ return request({
+ url: '/saleRecord/saleRecord/' + ids,
+ method: 'delete'
+ })
+}
+
+// 导出羊只销售记录
+export function exportSaleRecord(query) {
+ return request({
+ url: '/saleRecord/saleRecord/export',
+ method: 'post',
+ data: query
+ })
+}
+
+// 根据耳号查询羊只信息
+export function getSheepInfo(bsManageTags) {
+ return request({
+ url: '/saleRecord/saleRecord/getSheepInfo',
+ method: 'get',
+ params: { bsManageTags }
+ })
+}
diff --git a/src/views/dairyProducts/dryMatterCorrection/index.vue b/src/views/dairyProducts/dryMatterCorrection/index.vue
index 8d2e6f3..b689612 100644
--- a/src/views/dairyProducts/dryMatterCorrection/index.vue
+++ b/src/views/dairyProducts/dryMatterCorrection/index.vue
@@ -1,5 +1,6 @@
+
+
-
+
- {{ scope.row.coefficient != null ? scope.row.coefficient.toFixed(4) : '' }}
+
+ {{ formatCoefficient(scope.row.coefficient) }}
@@ -99,6 +102,7 @@
+
-
+
@@ -136,7 +140,8 @@
-
+
+
@@ -151,6 +156,7 @@
-
-
\ No newline at end of file
+
+// 表单重置
+function reset() {
+ form.value = {
+ id: null,
+ parity: null,
+ coef: null
+ }
+ proxy.resetForm("parityCorrectionRef")
+}
+
+/** 搜索按钮操作 */
+function handleQuery() {
+ queryParams.value.pageNum = 1
+ getList()
+}
+
+/** 重置按钮操作 */
+function resetQuery() {
+ proxy.resetForm("queryRef")
+ handleQuery()
+}
+
+// 多选框选中数据
+function handleSelectionChange(selection) {
+ ids.value = selection.map(item => item.id)
+ single.value = selection.length != 1
+ multiple.value = !selection.length
+}
+
+/** 新增按钮操作 */
+function handleAdd() {
+ reset()
+ open.value = true
+ title.value = "添加胎次校正"
+}
+
+/** 修改按钮操作 */
+function handleUpdate(row) {
+ reset()
+ const _id = row.id || ids.value
+ getParityCorrection(_id).then(response => {
+ form.value = response.data
+ open.value = true
+ title.value = "修改胎次校正"
+ })
+}
+
+/** 提交按钮 */
+function submitForm() {
+ proxy.$refs["parityCorrectionRef"].validate(valid => {
+ if (valid) {
+ if (form.value.id != null) {
+ updateParityCorrection(form.value).then(() => {
+ proxy.$modal.msgSuccess("修改成功")
+ open.value = false
+ getList()
+ })
+ } else {
+ addParityCorrection(form.value).then(() => {
+ proxy.$modal.msgSuccess("新增成功")
+ open.value = false
+ getList()
+ })
+ }
+ }
+ })
+}
+
+/** 删除按钮操作 */
+function handleDelete(row) {
+ const _ids = row.id || ids.value
+ proxy.$modal.confirm('是否确认删除胎次校正编号为"' + _ids + '"的数据项?').then(function() {
+ return delParityCorrection(_ids)
+ }).then(() => {
+ getList()
+ proxy.$modal.msgSuccess("删除成功")
+ }).catch(() => {})
+}
+
+getList()
+
diff --git a/src/views/dairyProducts/weightCorrection/index.vue b/src/views/dairyProducts/weightCorrection/index.vue
index 94737ef..b46fba1 100644
--- a/src/views/dairyProducts/weightCorrection/index.vue
+++ b/src/views/dairyProducts/weightCorrection/index.vue
@@ -83,7 +83,7 @@
- {{ scope.row.coefficient.toFixed(4) }}
+ {{ scope.row.coefficient.toFixed(2) }}
@@ -245,25 +245,31 @@ function handleUpdate(row) {
})
}
-/** 提交按钮 */
+/* 提交按钮 */
function submitForm() {
proxy.$refs["weightCorrectionRef"].validate(valid => {
if (valid) {
// 确保数值类型正确
form.value.actual = parseFloat(form.value.actual)
- form.value.systemMilk = parseFloat(form.value.systemMilk) // 修改这里
+ form.value.systemMilk = parseFloat(form.value.systemMilk)
if (form.value.id != null) {
updateWeightCorrection(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功")
open.value = false
getList()
+ }).catch(error => {
+ // 捕获后端返回的错误信息并显示
+ proxy.$modal.msgError(error.response.data.msg || "修改失败")
})
} else {
addWeightCorrection(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功")
open.value = false
getList()
+ }).catch(error => {
+ // 捕获后端返回的错误信息并显示
+ proxy.$modal.msgError(error.response.data.msg || "新增失败")
})
}
}
diff --git a/src/views/sale/customer/index.vue b/src/views/sale/customer/index.vue
new file mode 100644
index 0000000..22759b9
--- /dev/null
+++ b/src/views/sale/customer/index.vue
@@ -0,0 +1,285 @@
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.province }}{{ scope.row.city }}{{ scope.row.district }}{{ scope.row.address }}
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/sale/saleRecord/saleRecord/index.vue b/src/views/sale/saleRecord/saleRecord/index.vue
new file mode 100644
index 0000000..666ddc9
--- /dev/null
+++ b/src/views/sale/saleRecord/saleRecord/index.vue
@@ -0,0 +1,935 @@
+
+
+
+
+ 首页
+ 销售管理
+ 销售记录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+ showSearch = val" @queryTable="getList" />
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.saleDate, '{y}-{m}-{d}') }}
+
+
+
+
+
+
+
+
+
+ {{ scope.row.unitPrice }}元
+
+
+
+
+ {{ scope.row.totalPrice }}元
+
+
+
+
+ {{ scope.row.totalWeight }}kg
+
+
+
+
+ {{ scope.row.avgWeight }}kg
+
+
+
+
+ {{ scope.row.avgPricePerSheep }}元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
open = val">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ form.variety }}
+ {{ form.sheepName }}
+ {{ form.gender }}
+ {{ form.monthAge }}
+ {{ form.parity }}
+ {{ form.breed }}
+ {{ form.postLambingDay }}
+ {{ form.lactationDay }}
+ {{ form.lambingDay }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 元
+
+
+
+
+
+
+ 元
+
+
+
+
+
+
+
+
+
+
+ kg
+
+
+
+
+
+
+ 元
+
+
+
+
+
+
+ 元
+
+
+
+
+
+
+ kg
+
+
+
+
+
+
+ 元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From fe143f8b2fbcf418e9fdb3ccc2c574351f837293 Mon Sep 17 00:00:00 2001
From: zyk
Date: Tue, 26 Aug 2025 10:30:01 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=8E=92=E5=BA=8F?=
=?UTF-8?q?=E6=9C=80=E5=85=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Breeding_records/index.vue | 120 +++++++++++-------
.../Pregnancy_Test/Pregnancy_Test/index.vue | 11 +-
src/views/Sperm/Sperm/index.vue | 30 ++---
src/views/Weaning/weaning_record/index.vue | 9 +-
src/views/drymilk/drymilk/index.vue | 9 +-
src/views/miscarriage/miscarriage/index.vue | 40 +++---
src/views/sheep_death/death/index.vue | 83 ++++++------
7 files changed, 176 insertions(+), 126 deletions(-)
diff --git a/src/views/Breeding_records/Breeding_records/index.vue b/src/views/Breeding_records/Breeding_records/index.vue
index 10dfb79..7ca9f3e 100644
--- a/src/views/Breeding_records/Breeding_records/index.vue
+++ b/src/views/Breeding_records/Breeding_records/index.vue
@@ -124,9 +124,29 @@
-
+
-
+
+
+
+ {{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}
+
+
+
@@ -135,7 +155,11 @@
-
+
+
+ {{ getBreedTypeText(scope.row.breedType) }}
+
+
@@ -197,11 +221,6 @@
-
-
- {{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}
-
-
@@ -366,9 +385,17 @@
\ No newline at end of file
diff --git a/src/views/Pregnancy_Test/Pregnancy_Test/index.vue b/src/views/Pregnancy_Test/Pregnancy_Test/index.vue
index 8295ae3..61148e8 100644
--- a/src/views/Pregnancy_Test/Pregnancy_Test/index.vue
+++ b/src/views/Pregnancy_Test/Pregnancy_Test/index.vue
@@ -89,6 +89,12 @@
+
+
+
+ {{ parseTime(scope.row.datetime, '{y}-{m}-{d}') }}
+
+
@@ -96,11 +102,6 @@
孕检
-
-
- {{ parseTime(scope.row.datetime, '{y}-{m}-{d}') }}
-
-
diff --git a/src/views/Sperm/Sperm/index.vue b/src/views/Sperm/Sperm/index.vue
index c32384a..21bfb45 100644
--- a/src/views/Sperm/Sperm/index.vue
+++ b/src/views/Sperm/Sperm/index.vue
@@ -75,10 +75,6 @@
搜索
重置
-
- 搜索
- 重置
-
@@ -125,14 +121,15 @@
-
-
-
-
+
+
{{ parseTime(scope.row.pickDate, '{y}-{m}-{d}') }}
+
+
+
@@ -258,9 +255,9 @@