fix: 修复库存导入 500 错误 + 开启全局文字选中
- findOrCreateProductFn 补充 PublicID(UUID),避免 unique 约束冲突导致事务 500 - main.dart 加 SelectionArea builder,全局开启 Web 文字复制选中能力 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
"github.com/extrame/xls"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
"github.com/xuri/excelize/v2"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@@ -703,6 +704,7 @@ func findOrCreateProductFn(db *gorm.DB, shopID uint64, name, series, spec string
|
||||
}
|
||||
p = model.Product{
|
||||
TenantBase: model.TenantBase{ShopID: shopID},
|
||||
PublicID: uuid.New().String(),
|
||||
Name: name,
|
||||
Series: series,
|
||||
Spec: spec,
|
||||
|
||||
@@ -54,6 +54,8 @@ class _JiuAppState extends ConsumerState<JiuApp> {
|
||||
theme: AppTheme.light(),
|
||||
routerConfig: router,
|
||||
debugShowCheckedModeBanner: false,
|
||||
builder: (context, child) =>
|
||||
SelectionArea(child: child ?? const SizedBox()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user