fix(client): 抽屉内操作不再收抽屉(原地刷新)+ 日期输入框垂直居中
- 出入库详情抽屉:通过/拒绝/撤回/提交/结清/退单/确认定价/打印 全部不收抽屉, 操作完成后原地重拉单据刷新内容(StatefulBuilder+refresh);仅 遮罩/X/ 修改·删除(离开语义)关闭——对齐拍板「点抽屉外才收回」 - 往来抽屉「编辑」、财务往来抽屉「登记收款/付款」(完成后流水原地刷新)、 商品编辑抽屉「保存」同规则;「取消」保持关闭语义 - 日期组件输入框 forceStrutHeight 锁行盒:修等宽字体 ascent/descent 不对称 导致的文字垂直偏移 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -181,16 +181,22 @@ class _FinancePartnerDrawer extends ConsumerWidget {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
DsButton('登记收款', small: true, onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
showFinanceEntryDialog(context,
|
||||
// 抽屉内按钮不收抽屉(2026-07-04 拍板):登记弹窗叠在抽屉之上,
|
||||
// 保存后失效流水 provider → 抽屉内近期流水原地刷新
|
||||
DsButton('登记收款', small: true, onPressed: () async {
|
||||
await showFinanceEntryDialog(context,
|
||||
type: 'receipt', partnerId: row.partnerId);
|
||||
if (row.partnerId != null) {
|
||||
ref.invalidate(_partnerFlowsProvider(row.partnerId!));
|
||||
}
|
||||
}),
|
||||
const SizedBox(width: 10),
|
||||
DsButton('登记付款', small: true, onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
showFinanceEntryDialog(context,
|
||||
DsButton('登记付款', small: true, onPressed: () async {
|
||||
await showFinanceEntryDialog(context,
|
||||
type: 'payment', partnerId: row.partnerId);
|
||||
if (row.partnerId != null) {
|
||||
ref.invalidate(_partnerFlowsProvider(row.partnerId!));
|
||||
}
|
||||
}),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -194,10 +194,8 @@ class _PartnerDetailDrawer extends ConsumerWidget {
|
||||
const SizedBox(width: 10),
|
||||
if (onEdit != null)
|
||||
WriteGuard(
|
||||
child: DsButton('编辑', small: true, onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
onEdit!();
|
||||
}),
|
||||
// 抽屉内按钮不收抽屉(2026-07-04 拍板):编辑弹窗叠在抽屉之上
|
||||
child: DsButton('编辑', small: true, onPressed: onEdit),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -623,7 +623,7 @@ class _ProductEditorDrawerState extends ConsumerState<_ProductEditorDrawer> {
|
||||
if (_introDocId != null) 'description_doc_id': _introDocId,
|
||||
});
|
||||
if (!mounted) return;
|
||||
Navigator.of(context).pop();
|
||||
// 抽屉内按钮不收抽屉(2026-07-04 拍板):保存后停留,可继续编辑
|
||||
showDsToast(context, '商品介绍已保存 ✓');
|
||||
} catch (e) {
|
||||
if (mounted) {
|
||||
|
||||
@@ -427,9 +427,16 @@ class _DatePaneState extends State<_DatePane> {
|
||||
focusNode: _focus,
|
||||
keyboardType: TextInputType.datetime,
|
||||
textAlign: TextAlign.center,
|
||||
textAlignVertical: TextAlignVertical.center,
|
||||
// 强制 strut 统一行盒(等宽字体 ascent/descent 不对称会让文字
|
||||
// 视觉偏离垂直中心;height:1 行高=字号,Center 精确居中)
|
||||
strutStyle: const StrutStyle(
|
||||
fontSize: AppDims.fsBody,
|
||||
height: 1.0,
|
||||
forceStrutHeight: true,
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: AppDims.fsBody,
|
||||
height: 1.0,
|
||||
color: t.text,
|
||||
fontFamily: AppFonts.mono,
|
||||
fontFamilyFallback: AppFonts.monoFallback),
|
||||
|
||||
Reference in New Issue
Block a user