|
|
@@ -297,11 +297,11 @@ class _OvertimeApplyCreatePageState
|
|
|
: '',
|
|
|
startTime: d.startTime != null
|
|
|
? '${d.startTime!.year}-${d.startTime!.month.toString().padLeft(2, '0')}-${d.startTime!.day.toString().padLeft(2, '0')} '
|
|
|
- '${d.startTime!.hour.toString().padLeft(2, '0')}:${d.startTime!.minute.toString().padLeft(2, '0')}'
|
|
|
+ '${d.startTime!.hour.toString().padLeft(2, '0')}:${d.startTime!.minute.toString().padLeft(2, '0')}'
|
|
|
: '',
|
|
|
endTime: d.endTime != null
|
|
|
? '${d.endTime!.year}-${d.endTime!.month.toString().padLeft(2, '0')}-${d.endTime!.day.toString().padLeft(2, '0')} '
|
|
|
- '${d.endTime!.hour.toString().padLeft(2, '0')}:${d.endTime!.minute.toString().padLeft(2, '0')}'
|
|
|
+ '${d.endTime!.hour.toString().padLeft(2, '0')}:${d.endTime!.minute.toString().padLeft(2, '0')}'
|
|
|
: '',
|
|
|
jbHours: d.jbHours,
|
|
|
jbDays: d.jbDays,
|
|
|
@@ -346,9 +346,7 @@ class _OvertimeApplyCreatePageState
|
|
|
dep: d.dep,
|
|
|
depName: d.depName,
|
|
|
jbType: d.jbType,
|
|
|
- jbDate: d.jbDate.isNotEmpty
|
|
|
- ? DateTime.tryParse(d.jbDate)
|
|
|
- : null,
|
|
|
+ jbDate: d.jbDate.isNotEmpty ? DateTime.tryParse(d.jbDate) : null,
|
|
|
startTime: d.startTime.isNotEmpty
|
|
|
? DateTime.tryParse(d.startTime)
|
|
|
: null,
|
|
|
@@ -545,9 +543,7 @@ class _OvertimeApplyCreatePageState
|
|
|
'${l10n.get('jbDate')}: ${d.jbDate}',
|
|
|
colors,
|
|
|
trailing: _weekdayLabel(d.jbDate, l10n) != null
|
|
|
- ? _weekdayTag(
|
|
|
- _weekdayLabel(d.jbDate, l10n)!,
|
|
|
- )
|
|
|
+ ? _weekdayTag(_weekdayLabel(d.jbDate, l10n)!)
|
|
|
: null,
|
|
|
),
|
|
|
],
|
|
|
@@ -723,7 +719,11 @@ class _OvertimeApplyCreatePageState
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Widget _detailLabel(String text, AppColorsExtension colors, {Widget? trailing}) {
|
|
|
+ Widget _detailLabel(
|
|
|
+ String text,
|
|
|
+ AppColorsExtension colors, {
|
|
|
+ Widget? trailing,
|
|
|
+ }) {
|
|
|
return Padding(
|
|
|
padding: const EdgeInsets.only(top: 2),
|
|
|
child: Row(
|
|
|
@@ -739,10 +739,7 @@ class _OvertimeApplyCreatePageState
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
- if (trailing != null) ...[
|
|
|
- const SizedBox(width: 6),
|
|
|
- trailing,
|
|
|
- ],
|
|
|
+ if (trailing != null) ...[const SizedBox(width: 6), trailing],
|
|
|
],
|
|
|
),
|
|
|
);
|
|
|
@@ -856,12 +853,14 @@ class _OvertimeApplyCreatePageState
|
|
|
}
|
|
|
},
|
|
|
onRightTap: () async {
|
|
|
+ // 点提交先收键盘清焦点,避免输入框残留焦点导致键盘自动弹出
|
|
|
+ FocusManager.instance.primaryFocus?.unfocus();
|
|
|
+ FocusScope.of(context).unfocus();
|
|
|
final err = _validate(l10n);
|
|
|
if (err.isNotEmpty) {
|
|
|
TDToast.showText(err.first, context: context);
|
|
|
return;
|
|
|
}
|
|
|
- FocusScope.of(context).unfocus();
|
|
|
LoadingDialog.show(context, text: l10n.get('submitting'));
|
|
|
try {
|
|
|
final data = _buildSubmitData();
|