From 557c2b3c50027c2eb6fb9f7e562fc2c7b2b38203 Mon Sep 17 00:00:00 2001
From: quxin <592870522@qq.com>
Date: 星期五, 04 九月 2026 11:37:17 +0800
Subject: [PATCH] 修复: 生产领料后的退料应该是选择领料的记录,不是选择库存的记录(同时库存数据需要根据领料退料变动,比如库存100,领用80,然后领用80中退料30,库存应由原来的20变成50)
---
src/bootstrap.ts | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/bootstrap.ts b/src/bootstrap.ts
index 6a97710..bbfb549 100644
--- a/src/bootstrap.ts
+++ b/src/bootstrap.ts
@@ -18,6 +18,9 @@
import App from './app.vue';
import { router } from './router';
+import { getCompanyConfig } from '#/api/system/company-config';
+import { applyCompanyConfig } from '#/utils/company-config';
+
async function bootstrap(namespace: string) {
// 鍒濆鍖栫粍浠堕�傞厤鍣�
await initComponentAdapter();
@@ -49,6 +52,17 @@
// 閰嶇疆 pinia-store
await initStores(app, { namespace });
+ // 鍔犺浇鍏徃鍝佺墝淇℃伅锛堜粠鍚庣锛屽厤鐧诲綍鎺ュ彛锛夛紝鑱斿姩鐧诲綍椤�/鑿滃崟鏍�/缃戦〉鏍囬銆�
+ // 娉細姝ゆ椂 pinia 灏氭湭鍦ㄧ粍浠跺婵�娲伙紝杩欓噷鐢ㄧ函鍑芥暟锛屼笉渚濊禆 store銆�
+ try {
+ const companyConfig = await getCompanyConfig();
+ if (companyConfig) {
+ applyCompanyConfig(companyConfig);
+ }
+ } catch {
+ // 鍚庣涓嶅彲鐢ㄦ垨鏈厤缃紝淇濇寔缂栬瘧鏈熼粯璁�
+ }
+
// 瀹夎鏉冮檺鎸囦护
registerAccessDirective(app);
--
Gitblit v1.9.3