From 260b3fbc34b4e9ae2ee53e4a7917abb72ef848a7 Mon Sep 17 00:00:00 2001
From: dsmzx <dsmzx@123.com>
Date: 星期二, 02 七月 2024 15:44:15 +0800
Subject: [PATCH] 出库/入库打印 修改bug

---
 models/operation.go |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/models/operation.go b/models/operation.go
index 826208d..9e2846c 100644
--- a/models/operation.go
+++ b/models/operation.go
@@ -95,6 +95,12 @@
 	return &OperationSearch{Orm: mysqlx.GetDB()}
 }
 
+func (slf *OperationSearch) BeforeCreate(tx *gorm.DB) {
+	for k := range slf.Details {
+		slf.Details[k].BaseOperationType = slf.BaseOperationType
+	}
+}
+
 func (slf *OperationSearch) SetOrm(tx *gorm.DB) *OperationSearch {
 	slf.Orm = tx
 	return slf

--
Gitblit v1.8.0