diff --git a/src/components/PigBatchList.vue b/src/components/PigBatchList.vue index 6e39e43e..98098015 100644 --- a/src/components/PigBatchList.vue +++ b/src/components/PigBatchList.vue @@ -24,7 +24,7 @@
- 增加猪栏 + 增加猪栏 编辑 删除
@@ -35,6 +35,7 @@ v-for="pen in batch.pens" :key="pen.id" :pen="pen" + :isBatchActive="batch.is_active" @modify-pig-count="emitModifyPigCountPen" @remove="emitRemovePen" /> diff --git a/src/components/PigBatchPenCard.vue b/src/components/PigBatchPenCard.vue index 70956ec6..f682c508 100644 --- a/src/components/PigBatchPenCard.vue +++ b/src/components/PigBatchPenCard.vue @@ -10,8 +10,8 @@
存栏: {{ pen.current_pig_count || 0 }}
- 修改猪只数量 - 移除 + 修改猪只数量 + 移除
@@ -25,6 +25,10 @@ export default { pen: { type: Object, required: true + }, + isBatchActive: { + type: Boolean, + default: true // 默认活跃,以防万一没有传递 } }, emits: ['remove', 'modify-pig-count'],