调整卡片

This commit is contained in:
2025-10-23 13:46:54 +08:00
parent 1a55330734
commit 263af9fa3a
4 changed files with 160 additions and 29 deletions

View File

@@ -39,8 +39,8 @@
@edit-batch="handleEditBatch"
@delete-batch="handleDeleteBatch"
@add-pen="handleAddPen"
@edit-pen="handleEditPen"
@delete-pen="handleDeletePen"
@modify-pig-count-pen="handleModifyPigCountPen"
@remove-pen="handleRemovePen"
@assign-pen-to-batch="handleAssignPenToBatch"
/>
<el-empty v-else description="暂无数据" />
@@ -201,17 +201,12 @@ export default {
}
},
// --- 猪栏操作 (在猪群管理中) ---
handleAddPen(batch) {
this.currentPen = { pig_batch_id: batch.id }; // 预设猪栏所属批次
this.isEditPen = false;
this.penDialogVisible = true;
},
handleEditPen(pen) {
handleModifyPigCountPen(pen) {
this.currentPen = { ...pen };
this.isEditPen = true;
this.penDialogVisible = true;
},
async handleDeletePen(pen) {
async handleRemovePen(pen) {
try {
await this.$confirm(`确认删除猪栏 "${pen.pen_number}" 吗?`, '提示', {
confirmButtonText: '确定',