From 78b70d4fec0f7787bb4e37fef0080d2cafaca1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=87=E5=B3=B0?= Date: Thu, 23 Apr 2026 22:06:30 +0800 Subject: [PATCH] up --- backend/my_work/routers/apiWarehouse.go | 16 ++-- .../views/warehouse/WarehouseItemDetail.vue | 91 ++++++++++--------- 2 files changed, 55 insertions(+), 52 deletions(-) diff --git a/backend/my_work/routers/apiWarehouse.go b/backend/my_work/routers/apiWarehouse.go index 03a36b7..721a67e 100644 --- a/backend/my_work/routers/apiWarehouse.go +++ b/backend/my_work/routers/apiWarehouse.go @@ -50,14 +50,14 @@ type TabWarehouseItemFileBind struct { } type TabWarehouseItemCommit struct { - ID uint `gorm:"primaryKey"` - ItemID uint `gorm:"not null;index;comment:关联物品id"` - UserID uint `gorm:"not null;comment:操作人id"` - OldContainer *uint `gorm:"index;comment:原容器id"` - NewContainer *uint `gorm:"index;comment:新容器id"` - Remark string `gorm:"type:text;comment:备注"` - IP string `gorm:"size:50;comment:操作IP"` - CreatedAt time.Time `gorm:"type:datetime;autoCreateTime"` + ID uint `gorm:"primaryKey" json:"ID"` + ItemID uint `gorm:"not null;index;comment:关联物品id" json:"ItemID"` + UserID uint `gorm:"not null;comment:操作人id" json:"UserID"` + OldContainer *uint `gorm:"index;comment:原容器id" json:"OldContainer"` + NewContainer *uint `gorm:"index;comment:新容器id" json:"NewContainer"` + Remark string `gorm:"type:text;comment:备注" json:"Remark"` + IP string `gorm:"size:50;comment:操作IP" json:"IP"` + CreatedAt time.Time `gorm:"type:datetime;autoCreateTime" json:"CreatedAt"` } type TabWarehouseLog struct { diff --git a/frontend/ops_vue_js/src/views/warehouse/WarehouseItemDetail.vue b/frontend/ops_vue_js/src/views/warehouse/WarehouseItemDetail.vue index b401c41..f49d6e1 100644 --- a/frontend/ops_vue_js/src/views/warehouse/WarehouseItemDetail.vue +++ b/frontend/ops_vue_js/src/views/warehouse/WarehouseItemDetail.vue @@ -38,7 +38,7 @@ const notFound = ref(false) const containerNames = reactive({}) // ── Tab ── -const activeTab = ref('history') +const activeTab = ref('work_orders') // ── 编辑弹窗 ── const showEdit = ref(false) @@ -105,6 +105,8 @@ function fmtTs(ts) { return d.toLocaleString() } + + // ── 拉取物品详情 ── async function fetchItem() { loadingDetail.value = true @@ -428,15 +430,6 @@ onMounted(() => {
-
@@ -508,6 +476,41 @@ onMounted(() => { + +
+
+ {{ t('warehouse.no_move_history') }} +
+
+
+ +
+ +
+ +
+
+ {{ usersStore.getUsernameFromUserID(commit.UserID) || `User#${commit.UserID}` }} + {{ fmtTs(commit.CreatedAt) }} +
+
+ {{ getContainerName(commit.OldContainer) }} + + {{ getContainerName(commit.NewContainer) }} +
+

{{ commit.Remark }}

+
+
+
+
+