Compare commits

..

1 Commits

Author SHA1 Message Date
wangjia ed7a37cc05 chore: release client-v1.0.85
Deploy Client / build-client-web (push) Successful in 50s
Deploy Client / build-macos (push) Successful in 2m16s
Deploy Client / build-android (push) Successful in 1m31s
Deploy Client / build-ios (push) Successful in 2m31s
Deploy Client / build-windows (push) Successful in 1m53s
Deploy Client / release-deploy-client (push) Successful in 1m55s
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 16:49:00 +08:00
2 changed files with 31 additions and 21 deletions
+5
View File
@@ -5,6 +5,11 @@ 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/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.0.85] - 2026-06-27
### 改进
- 出库单 / 入库单打印改为针式打印机友好版式:全部纯黑、去除灰色底纹、表格改纯黑实线边框、字体加粗加大,针打输出更清晰、不再发淡发糊;同时优化列宽,避免单价 / 金额 / 日期等数字被换行截断。
## [1.0.84] - 2026-06-26
### 修复
+26 -21
View File
@@ -660,7 +660,8 @@ const _orderHeaders = [
'商品编号', '商品名称', '系列', '规格', '批次号',
'生产日期', '数量', '单价', '金额', '备注',
];
const _orderColFlex = <double>[1.5, 2.0, 1.1, 1.3, 1.6, 1.3, 0.7, 1.1, 1.2, 0.9];
// 针打版式列宽:日期 / 单价 / 金额 加宽,避免大字号下数字、日期断行。
const _orderColFlex = <double>[1.4, 1.8, 1.0, 1.2, 1.6, 1.45, 0.7, 1.45, 1.45, 0.7];
/// 温馨提示文案(入库/出库统一)。
const _kTipsText =
@@ -709,17 +710,21 @@ List<pw.Widget> _buildOrderDoc({
required double totalQty,
required double totalAmt,
}) {
// 样式三「紧凑报表」:左侧竖线点缀 + 抬头左对齐内联 + 灰底信息条 + 密集明细表
// + 数字等宽(内置 Courier,ASCII 数字适用)+ 灰底总计条。
final mono = pw.Font.courier();
// 针打友好版式:全纯黑、无灰底纹、纯黑实线边框、字号加大。
// 针式打印机打不出灰色(只能抖成稀疏散点→淡而糊),且小号汉字笔画易糊;
// 故正文加粗(重击更黑)、字号上调、所有灰色一律改纯黑。
// 数字等宽(内置 CourierASCII 数字适用)。
final mono = pw.Font.courierBold();
final monoBold = pw.Font.courierBold();
final cellStyle = pw.TextStyle(font: font, fontSize: 8.5);
final numStyle = pw.TextStyle(font: mono, fontSize: 8.5);
final cellStyle = pw.TextStyle(
font: bold, fontSize: 9, fontWeight: pw.FontWeight.bold);
final numStyle = pw.TextStyle(font: mono, fontSize: 9);
final headStyle =
pw.TextStyle(font: bold, fontSize: 8.5, fontWeight: pw.FontWeight.bold);
final metaStyle = pw.TextStyle(font: font, fontSize: 9);
pw.TextStyle(font: bold, fontSize: 9.5, fontWeight: pw.FontWeight.bold);
final metaStyle = pw.TextStyle(
font: bold, fontSize: 10, fontWeight: pw.FontWeight.bold);
final metaBold =
pw.TextStyle(font: bold, fontSize: 9, fontWeight: pw.FontWeight.bold);
pw.TextStyle(font: bold, fontSize: 10.5, fontWeight: pw.FontWeight.bold);
pw.Widget metaText(String label, String value, pw.TextAlign align) =>
pw.Text('$label$value', style: metaStyle, textAlign: align);
@@ -742,10 +747,11 @@ List<pw.Widget> _buildOrderDoc({
padding: const pw.EdgeInsets.only(bottom: 1.5),
child: pw.Text(title,
style: pw.TextStyle(
font: font,
fontSize: 11,
font: bold,
fontSize: 12,
fontWeight: pw.FontWeight.bold,
letterSpacing: 3,
color: PdfColors.grey700)),
color: PdfColors.black)),
),
],
),
@@ -753,8 +759,7 @@ List<pw.Widget> _buildOrderDoc({
// ── 抬头信息:灰底信息条(两行三列)────────────────────────────
pw.Container(
decoration: pw.BoxDecoration(
color: PdfColors.grey100,
border: pw.Border.all(color: PdfColors.grey400, width: 0.5),
border: pw.Border.all(color: PdfColors.black, width: 0.8),
),
padding: const pw.EdgeInsets.symmetric(horizontal: 8, vertical: 6),
child: pw.Column(
@@ -796,14 +801,13 @@ List<pw.Widget> _buildOrderDoc({
pw.SizedBox(height: 8),
// ── 明细表(密集、灰底表头、数字等宽)──────────────────────────
pw.Table(
border: pw.TableBorder.all(color: PdfColors.grey500, width: 0.5),
border: pw.TableBorder.all(color: PdfColors.black, width: 0.8),
columnWidths: {
for (var i = 0; i < _orderColFlex.length; i++)
i: pw.FlexColumnWidth(_orderColFlex[i])
},
children: [
pw.TableRow(
decoration: const pw.BoxDecoration(color: PdfColors.grey300),
children: [
for (final h in _orderHeaders)
pw.Padding(
@@ -834,8 +838,7 @@ List<pw.Widget> _buildOrderDoc({
pw.Container(
width: double.infinity,
decoration: pw.BoxDecoration(
color: PdfColors.grey100,
border: pw.Border.all(color: PdfColors.grey400, width: 0.5),
border: pw.Border.all(color: PdfColors.black, width: 0.8),
),
padding: const pw.EdgeInsets.symmetric(horizontal: 10, vertical: 5),
child: pw.Row(
@@ -860,13 +863,15 @@ List<pw.Widget> _buildOrderDoc({
pw.Container(
width: double.infinity,
decoration: pw.BoxDecoration(
border: pw.Border.all(color: PdfColors.grey400, width: 0.5),
color: PdfColors.grey50,
border: pw.Border.all(color: PdfColors.black, width: 0.8),
),
padding: const pw.EdgeInsets.all(5),
child: pw.Text(_kTipsText,
style: pw.TextStyle(
font: font, fontSize: 8.5, color: PdfColors.grey800)),
font: bold,
fontSize: 9,
fontWeight: pw.FontWeight.bold,
color: PdfColors.black)),
),
],
pw.SizedBox(height: 24),