Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 02082df525 | |||
| 4c75f328c7 |
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.0.35] - 2026-06-12
|
||||||
|
|
||||||
|
### 改进
|
||||||
|
- Debug 版本窗口标题增加 [DEBUG] 后缀,便于与正式安装版区分
|
||||||
|
|
||||||
|
## [1.0.34] - 2026-06-12
|
||||||
|
|
||||||
|
### 修复
|
||||||
|
- 修复 macOS 客户端打印时应用卡死、只能强制退出的问题
|
||||||
|
|
||||||
|
### 改进
|
||||||
|
- 「关于我们」中「打开文档」「更新日志」等链接指向新域名 jiu.51yanmei.com
|
||||||
|
|
||||||
## [1.0.33] - 2026-06-12
|
## [1.0.33] - 2026-06-12
|
||||||
|
|
||||||
### 改进
|
### 改进
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"provider": "岩美技术有限公司",
|
"provider": "岩美技术有限公司",
|
||||||
"website": "https://jiu.yanmei.com",
|
"website": "https://jiu.51yanmei.com",
|
||||||
"email": "yammy2023@163.com",
|
"email": "yammy2023@163.com",
|
||||||
"phone": "",
|
"phone": "",
|
||||||
"wechat": "",
|
"wechat": "",
|
||||||
"terms_url": "https://jiu.yanmei.com/terms/",
|
"terms_url": "https://jiu.51yanmei.com/terms/",
|
||||||
"privacy_url": "https://jiu.yanmei.com/privacy/",
|
"privacy_url": "https://jiu.51yanmei.com/privacy/",
|
||||||
"docs_url": "https://jiu.yanmei.com/docs/"
|
"docs_url": "https://jiu.51yanmei.com/docs/"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:io' show Platform;
|
||||||
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import '../errors/error_reporter.dart';
|
import '../errors/error_reporter.dart';
|
||||||
import 'package:pdf/pdf.dart';
|
import 'package:pdf/pdf.dart';
|
||||||
@@ -198,8 +200,14 @@ Future<void> printProductLabelImpl({
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// 预生成 PDF 字节,避免 macOS NSPrintPanel 打开后再调 doc.save() 导致主线程卡住。
|
||||||
|
final bytes = await doc.save();
|
||||||
|
if (!kIsWeb && Platform.isMacOS) {
|
||||||
|
// 让当前帧完成,再打开 macOS 原生打印面板,防止 sheet 动画与 Flutter 渲染死锁。
|
||||||
|
await Future<void>.delayed(Duration.zero);
|
||||||
|
}
|
||||||
await Printing.layoutPdf(
|
await Printing.layoutPdf(
|
||||||
name: '标签_${_fileTs()}', onLayout: (_) async => doc.save());
|
name: '标签_${_fileTs()}', onLayout: (_) async => bytes);
|
||||||
} catch (e, st) {
|
} catch (e, st) {
|
||||||
reportError(e, st);
|
reportError(e, st);
|
||||||
throw Exception('打印失败,请检查打印机连接和驱动是否正常。\n详情:$e');
|
throw Exception('打印失败,请检查打印机连接和驱动是否正常。\n详情:$e');
|
||||||
@@ -439,8 +447,12 @@ Future<void> printStockInOrderImpl(StockInOrder order) async {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
|
final bytes = await doc.save();
|
||||||
|
if (!kIsWeb && Platform.isMacOS) {
|
||||||
|
await Future<void>.delayed(Duration.zero);
|
||||||
|
}
|
||||||
await Printing.layoutPdf(
|
await Printing.layoutPdf(
|
||||||
name: '入库单_${_fileTs()}', onLayout: (_) async => doc.save());
|
name: '入库单_${_fileTs()}', onLayout: (_) async => bytes);
|
||||||
} catch (e, st) {
|
} catch (e, st) {
|
||||||
reportError(e, st);
|
reportError(e, st);
|
||||||
throw Exception('打印失败,请检查打印机连接和驱动是否正常。\n详情:$e');
|
throw Exception('打印失败,请检查打印机连接和驱动是否正常。\n详情:$e');
|
||||||
@@ -495,8 +507,12 @@ Future<void> printStockOutOrderImpl(StockOutOrder order) async {
|
|||||||
],
|
],
|
||||||
));
|
));
|
||||||
try {
|
try {
|
||||||
|
final bytes = await doc.save();
|
||||||
|
if (!kIsWeb && Platform.isMacOS) {
|
||||||
|
await Future<void>.delayed(Duration.zero);
|
||||||
|
}
|
||||||
await Printing.layoutPdf(
|
await Printing.layoutPdf(
|
||||||
name: '出库单_${_fileTs()}', onLayout: (_) async => doc.save());
|
name: '出库单_${_fileTs()}', onLayout: (_) async => bytes);
|
||||||
} catch (e, st) {
|
} catch (e, st) {
|
||||||
reportError(e, st);
|
reportError(e, st);
|
||||||
throw Exception('打印失败,请检查打印机连接和驱动是否正常。\n详情:$e');
|
throw Exception('打印失败,请检查打印机连接和驱动是否正常。\n详情:$e');
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
@@ -107,7 +108,7 @@ class _JiuAppState extends ConsumerState<JiuApp> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final router = ref.watch(appRouterProvider);
|
final router = ref.watch(appRouterProvider);
|
||||||
return MaterialApp.router(
|
return MaterialApp.router(
|
||||||
title: '岩美',
|
title: kDebugMode ? '岩美 [DEBUG]' : '岩美',
|
||||||
theme: AppTheme.light(),
|
theme: AppTheme.light(),
|
||||||
routerConfig: router,
|
routerConfig: router,
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user