chore: release v1.0.2
Deploy / deploy (push) Successful in 1m13s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-05-25 22:25:05 +08:00
parent 117cec431b
commit b6223b3816
3 changed files with 32 additions and 7 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ migration:
- platform: root
create_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
base_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
- platform: web
- platform: android
create_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
base_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
+23 -6
View File
@@ -4,13 +4,15 @@ import 'dart:typed_data';
import 'package:web/web.dart' as web;
import '../../models/stock_in.dart';
import '../../models/stock_out.dart';
import '../errors/error_reporter.dart';
void _openPrintWindow(String html) {
final win = web.window.open('', '_blank');
if (win != null) {
win.document.write(html.toJS);
win.document.close();
if (win == null) {
throw Exception('浏览器已拦截弹窗,请在地址栏允许弹窗后重试');
}
win.document.write(html.toJS);
win.document.close();
}
Future<void> printProductLabelImpl({
@@ -187,7 +189,12 @@ body { width: 4in; height: 2in; overflow: hidden; background: #fff; }
</body>
</html>''';
_openPrintWindow(html);
try {
_openPrintWindow(html);
} catch (e, st) {
reportError(e, st);
rethrow;
}
}
// ── 入库单 ──────────────────────────────────────────────────────────────────
@@ -293,7 +300,12 @@ Future<void> printStockInOrderImpl(StockInOrder order) async {
</body>
</html>''';
_openPrintWindow(html);
try {
_openPrintWindow(html);
} catch (e, st) {
reportError(e, st);
rethrow;
}
}
// ── 出库单 ──────────────────────────────────────────────────────────────────
@@ -396,5 +408,10 @@ Future<void> printStockOutOrderImpl(StockOutOrder order) async {
</body>
</html>''';
_openPrintWindow(html);
try {
_openPrintWindow(html);
} catch (e, st) {
reportError(e, st);
rethrow;
}
}