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)),