diff --git a/src/views/feed/FeedPlan/index.vue b/src/views/feed/FeedPlan/index.vue
index aee8781..6828cc6 100644
--- a/src/views/feed/FeedPlan/index.vue
+++ b/src/views/feed/FeedPlan/index.vue
@@ -2,7 +2,10 @@
-
+
+
+
+
@@ -36,7 +39,7 @@
-
+
{{ getSheepHouseName(scope.row.sheepHouseId) }}
@@ -54,15 +57,15 @@
-
+
+
-
+ -->
@@ -72,18 +75,18 @@
-
+
- {{ scope.row.planDate ? parseTime(scope.row.planDate, '{y}-{m}-{d}') : '' }}
+ {{ scope.row.planDate ? parseTime(scope.row.planDate, '{y}-{m}-{d}') : '' }}
@@ -128,7 +131,7 @@
-
+
@@ -210,7 +213,7 @@
const formulaBatchDict = ref([]) // 配方批号字典(过滤后)
const sheepFolderDict = ref([]) // 羊舍字典
// 用于存储羊舍名称的字典
- const sheepNameDict = ref({})
+ const sheepNameDict = ref({})
// 获取配方编码 & 配方批号 字典
function getFormulaDict() {
@@ -274,19 +277,19 @@
}
// 羊舍ID与名称转换函数:输入可以是 ID 或 羊舍名称
-function getSheepHouseId(inputValue, sheepNameDict) {
- if (!inputValue) return '';
+ function getSheepHouseId(inputValue, sheepNameDict) {
+ if (!inputValue) return '';
- // 输入是纯数字,直接返回
- if (/^\d+$/.test(inputValue)) {
- return inputValue;
+ // 输入是纯数字,直接返回
+ if (/^\d+$/.test(inputValue)) {
+ return inputValue;
+ }
+
+ // 输入是名称,返回对应的 id
+ const match = sheepNameDict.find(item => item.value === inputValue);
+ return match ? match.label : '';
}
- // 输入是名称,返回对应的 id
- const match = sheepNameDict.find(item => item.value === inputValue);
- return match ? match.label : '';
-}
-
/** 查询饲喂计划列表 */
function getList() {
@@ -375,6 +378,8 @@ function getSheepHouseId(inputValue, sheepNameDict) {
/** 提交按钮 */
function submitForm() {
proxy.$refs["FeedPlanRef"].validate(valid => {
+ // 修改或添加时,中午比例字段置 0 (需求)
+ form.value.ratioNoon = 0
if (valid) {
if (form.value.createDate != null) {
updateFeedPlan(form.value).then(response => {
diff --git a/src/views/feed/FeedStatistic/index.vue b/src/views/feed/FeedStatistic/index.vue
index 77c5252..ba8882c 100644
--- a/src/views/feed/FeedStatistic/index.vue
+++ b/src/views/feed/FeedStatistic/index.vue
@@ -42,6 +42,7 @@
+