From 6c438003541e8011d4f74c966b42370208666d45 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Sun, 21 Jun 2026 22:51:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(client):=20=E9=80=80=E5=8D=95=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=94=B9=E7=BA=A2=E8=89=B2=E5=AE=9E=E5=BF=83=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E4=B8=8E=E5=8E=9F=E5=9E=8B=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E7=AA=81=E5=87=BA=E5=8D=B1=E9=99=A9=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01YZ4DskSRKsSiheQonFtQvx --- client/lib/widgets/order_row_actions.dart | 24 +++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/client/lib/widgets/order_row_actions.dart b/client/lib/widgets/order_row_actions.dart index af15c80..2c934d6 100644 --- a/client/lib/widgets/order_row_actions.dart +++ b/client/lib/widgets/order_row_actions.dart @@ -35,16 +35,36 @@ List buildOrderRowActions({ onPressed: onPressed, child: Text(text, style: TextStyle(fontSize: 12, color: color)), ); + // 实心强调按钮(用于「退单」这类需突出的危险操作,与原型一致)。 + Widget filledBtn(String text, Color color, VoidCallback onPressed, {Key? key}) => + Padding( + padding: const EdgeInsets.symmetric(horizontal: 4), + child: ElevatedButton( + key: key, + onPressed: onPressed, + style: ElevatedButton.styleFrom( + backgroundColor: color, + foregroundColor: Colors.white, + elevation: 0, + visualDensity: VisualDensity.compact, + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + minimumSize: const Size(0, 30), + padding: const EdgeInsets.symmetric(horizontal: 12), + textStyle: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500), + ), + child: Text(text), + ), + ); return [ btn('详情', AppTheme.primary, onDetail), btn('打印', AppTheme.primary, onPrint), ...afterPrint, if (!readonly && status == 'approved') WriteGuard(child: btn('结清', AppTheme.accent, onSettle)), - // 退单(已审核单退货):error 样式,按权限显示 + // 退单(已审核单退货):红色实心按钮突出(与原型一致),按权限显示 if (!readonly && status == 'approved' && canReturn) WriteGuard( - child: btn('退单', AppTheme.danger, onReturn, + child: filledBtn('退单', AppTheme.danger, onReturn, key: Key('btn_return_$orderId'))), if (!readonly && status == 'draft') ...[ WriteGuard(child: btn('修改', AppTheme.primary, onEdit)),