feat(client): 新增入库单/出库单打印,增强商品标签打印布局
- 商品标签改为 4×2 英寸横向,二维码右置,左侧展示系列/规格/批次/生产日期 - 新增 printStockInOrder:A4 入库单,含单号/供应商/仓库/明细表/签字栏 - 新增 printStockOutOrder:A4 出库通知单(温馨提示),含客户/明细表/签字栏 - 入库单/出库单编辑页加载完成后显示「打印」按钮 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,13 +1,30 @@
|
||||
import 'dart:typed_data';
|
||||
import '../../models/stock_in.dart';
|
||||
import '../../models/stock_out.dart';
|
||||
import 'print_util_stub.dart'
|
||||
if (dart.library.js_interop) 'print_util_web.dart';
|
||||
|
||||
/// 打印商品标签(二维码 + 名称 + 编号)。
|
||||
/// Web:生成 HTML 弹出新窗口调用浏览器打印。
|
||||
/// 非 Web:生成 PDF 用 printing 包调起原生打印。
|
||||
Future<void> printProductLabel({
|
||||
required Uint8List qrBytes,
|
||||
required String name,
|
||||
required String code,
|
||||
String? spec,
|
||||
}) => printProductLabelImpl(qrBytes: qrBytes, name: name, code: code, spec: spec);
|
||||
String? series,
|
||||
String? batchNo,
|
||||
String? productionDate,
|
||||
}) =>
|
||||
printProductLabelImpl(
|
||||
qrBytes: qrBytes,
|
||||
name: name,
|
||||
code: code,
|
||||
spec: spec,
|
||||
series: series,
|
||||
batchNo: batchNo,
|
||||
productionDate: productionDate,
|
||||
);
|
||||
|
||||
Future<void> printStockInOrder(StockInOrder order) =>
|
||||
printStockInOrderImpl(order);
|
||||
|
||||
Future<void> printStockOutOrder(StockOutOrder order) =>
|
||||
printStockOutOrderImpl(order);
|
||||
|
||||
Reference in New Issue
Block a user