Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,14 @@ 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.2] - 2026-05-25
|
||||||
|
|
||||||
|
### 改进
|
||||||
|
- 添加 /release 本地发版 slash command,一键完成构建、测试、打 tag 和推送
|
||||||
|
|
||||||
|
### 修复
|
||||||
|
- Web 版打印弹窗被浏览器拦截时,由静默失败改为给出明确提示,并自动上报错误
|
||||||
|
|
||||||
## [1.0.1] - 2026-05-25
|
## [1.0.1] - 2026-05-25
|
||||||
|
|
||||||
### 改进
|
### 改进
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ migration:
|
|||||||
- platform: root
|
- platform: root
|
||||||
create_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
|
create_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
|
||||||
base_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
|
base_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
|
||||||
- platform: web
|
- platform: android
|
||||||
create_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
|
create_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
|
||||||
base_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
|
base_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
|
||||||
|
|
||||||
|
|||||||
@@ -4,13 +4,15 @@ import 'dart:typed_data';
|
|||||||
import 'package:web/web.dart' as web;
|
import 'package:web/web.dart' as web;
|
||||||
import '../../models/stock_in.dart';
|
import '../../models/stock_in.dart';
|
||||||
import '../../models/stock_out.dart';
|
import '../../models/stock_out.dart';
|
||||||
|
import '../errors/error_reporter.dart';
|
||||||
|
|
||||||
void _openPrintWindow(String html) {
|
void _openPrintWindow(String html) {
|
||||||
final win = web.window.open('', '_blank');
|
final win = web.window.open('', '_blank');
|
||||||
if (win != null) {
|
if (win == null) {
|
||||||
win.document.write(html.toJS);
|
throw Exception('浏览器已拦截弹窗,请在地址栏允许弹窗后重试');
|
||||||
win.document.close();
|
|
||||||
}
|
}
|
||||||
|
win.document.write(html.toJS);
|
||||||
|
win.document.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> printProductLabelImpl({
|
Future<void> printProductLabelImpl({
|
||||||
@@ -187,7 +189,12 @@ body { width: 4in; height: 2in; overflow: hidden; background: #fff; }
|
|||||||
</body>
|
</body>
|
||||||
</html>''';
|
</html>''';
|
||||||
|
|
||||||
_openPrintWindow(html);
|
try {
|
||||||
|
_openPrintWindow(html);
|
||||||
|
} catch (e, st) {
|
||||||
|
reportError(e, st);
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── 入库单 ──────────────────────────────────────────────────────────────────
|
// ── 入库单 ──────────────────────────────────────────────────────────────────
|
||||||
@@ -293,7 +300,12 @@ Future<void> printStockInOrderImpl(StockInOrder order) async {
|
|||||||
</body>
|
</body>
|
||||||
</html>''';
|
</html>''';
|
||||||
|
|
||||||
_openPrintWindow(html);
|
try {
|
||||||
|
_openPrintWindow(html);
|
||||||
|
} catch (e, st) {
|
||||||
|
reportError(e, st);
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── 出库单 ──────────────────────────────────────────────────────────────────
|
// ── 出库单 ──────────────────────────────────────────────────────────────────
|
||||||
@@ -396,5 +408,10 @@ Future<void> printStockOutOrderImpl(StockOutOrder order) async {
|
|||||||
</body>
|
</body>
|
||||||
</html>''';
|
</html>''';
|
||||||
|
|
||||||
_openPrintWindow(html);
|
try {
|
||||||
|
_openPrintWindow(html);
|
||||||
|
} catch (e, st) {
|
||||||
|
reportError(e, st);
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user