Преглед на файлове

fix #19900 #19888 加班申请单、用车申请单

chengc преди 1 седмица
родител
ревизия
6f2232938a

+ 27 - 25
lib/features/expense/expense_create_page.dart

@@ -402,12 +402,13 @@ class _ExpenseCreatePageState extends ConsumerState<ExpenseCreatePage> {
         'BX_DD': _today(),
         'DEP': _selectedDeptId,
         'USR_NO': _selEmployee?.salNo ?? '',
-        'PAY_ID': expense.paymentMethod,
+        // TODO: 支付方式、币别暂时隐藏
+        //'PAY_ID': expense.paymentMethod,
         //'PRT_SW': 'N',
         'USR': HostAppChannel.usr,
         'REM': expense.remark,
-        'CUR_ID': expense.currencyCode,
-        'EXC_RTO': expense.excRto,
+        //'CUR_ID': expense.currencyCode,
+        //'EXC_RTO': expense.excRto,
         'REASON': expense.purpose,
         'VOH_ID': expense.isGenerateVoucher ? 'T' : 'F',
       },
@@ -600,28 +601,29 @@ class _ExpenseCreatePageState extends ConsumerState<ExpenseCreatePage> {
           backgroundColor: colors.bgPage,
           onChanged: (_) => controller.updatePurpose(_purposeController.text),
         ),
-        const SizedBox(height: 16),
-        FormFieldRow(
-          label: l10n.get('paymentMethod'),
-          value: expense.paymentMethod,
-          hint: l10n.get('pleaseEnter'),
-          onTap: () => _showTextInput(
-            l10n.get('paymentMethod'),
-            (v) => controller.updatePaymentMethod(v),
-            initialText: expense.paymentMethod,
-          ),
-          onClear: () => controller.updatePaymentMethod(''),
-        ),
-        const SizedBox(height: 16),
-        FormFieldRow(
-          label: l10n.get('currency'),
-          value: expense.currencyCode.isNotEmpty
-              ? _currencyLabel(expense.currencyCode)
-              : null,
-          hint: l10n.get('selectCurrency'),
-          onTap: () => _showCurrencyPicker(controller, expense.currencyCode),
-          onClear: () => controller.updateCurrencyCode('', 1.0),
-        ),
+        // TODO: 支付方式、币别暂时隐藏
+        // const SizedBox(height: 16),
+        // FormFieldRow(
+        //   label: l10n.get('paymentMethod'),
+        //   value: expense.paymentMethod,
+        //   hint: l10n.get('pleaseEnter'),
+        //   onTap: () => _showTextInput(
+        //     l10n.get('paymentMethod'),
+        //     (v) => controller.updatePaymentMethod(v),
+        //     initialText: expense.paymentMethod,
+        //   ),
+        //   onClear: () => controller.updatePaymentMethod(''),
+        // ),
+        // const SizedBox(height: 16),
+        // FormFieldRow(
+        //   label: l10n.get('currency'),
+        //   value: expense.currencyCode.isNotEmpty
+        //       ? _currencyLabel(expense.currencyCode)
+        //       : null,
+        //   hint: l10n.get('selectCurrency'),
+        //   onTap: () => _showCurrencyPicker(controller, expense.currencyCode),
+        //   onClear: () => controller.updateCurrencyCode('', 1.0),
+        // ),
         const SizedBox(height: 16),
         Row(
           mainAxisAlignment: MainAxisAlignment.spaceBetween,

+ 17 - 15
lib/features/expense/expense_detail_page.dart

@@ -282,21 +282,23 @@ class _ExpenseDetailPageState extends ConsumerState<ExpenseDetailPage> {
           readOnly: true,
           showArrow: false,
         ),
-        const SizedBox(height: 16),
-        FormFieldRow(
-          label: l10n.get('currency'),
-          value: expense.currencyCode.isNotEmpty ? expense.currencyCode : '-',
-          readOnly: true,
-          showArrow: false,
-        ),
-        const SizedBox(height: 16),
-        FormFieldRow(
-          label: l10n.get('paymentMethod'),
-          value: expense.paymentMethod.isNotEmpty ? expense.paymentMethod : '-',
-          readOnly: true,
-          showArrow: false,
-        ),
-        const SizedBox(height: 16),
+        // TODO: 支付方式、币别暂时隐藏
+        // const SizedBox(height: 16),
+        // FormFieldRow(
+        //   label: l10n.get('currency'),
+        //   value: expense.currencyCode.isNotEmpty ? expense.currencyCode : '-',
+        //   readOnly: true,
+        //   showArrow: false,
+        // ),
+        // TODO: 支付方式、币别暂时隐藏
+        // const SizedBox(height: 16),
+        // FormFieldRow(
+        //   label: l10n.get('paymentMethod'),
+        //   value: expense.paymentMethod.isNotEmpty ? expense.paymentMethod : '-',
+        //   readOnly: true,
+        //   showArrow: false,
+        // ),
+        // const SizedBox(height: 16),
         FormFieldRow(
           label: l10n.get('remark'),
           value: expense.remark.isNotEmpty ? expense.remark : '-',

+ 27 - 25
lib/features/expense/expense_edit_page.dart

@@ -323,11 +323,12 @@ class _ExpenseEditPageState extends ConsumerState<ExpenseEditPage> {
         'BX_DD': _today(),
         'DEP': _selectedDeptId,
         'USR_NO': _selEmployee?.salNo ?? '',
-        'PAY_ID': expense.paymentMethod,
+        // TODO: 支付方式、币别暂时隐藏
+        //'PAY_ID': expense.paymentMethod,
         'USR': HostAppChannel.usr,
         'REM': expense.remark,
-        'CUR_ID': expense.currencyCode,
-        'EXC_RTO': expense.excRto,
+        //'CUR_ID': expense.currencyCode,
+        //'EXC_RTO': expense.excRto,
         'REASON': expense.purpose,
         'VOH_ID': expense.isGenerateVoucher ? 'T' : 'F',
       },
@@ -522,28 +523,29 @@ class _ExpenseEditPageState extends ConsumerState<ExpenseEditPage> {
           backgroundColor: colors.bgPage,
           onChanged: (_) => _updatePurpose(_purposeController.text),
         ),
-        const SizedBox(height: 16),
-        FormFieldRow(
-          label: l10n.get('paymentMethod'),
-          value: expense.paymentMethod,
-          hint: l10n.get('pleaseEnter'),
-          onTap: () => _showTextInput(
-            l10n.get('paymentMethod'),
-            (v) => _updatePaymentMethod(v),
-            initialText: expense.paymentMethod,
-          ),
-          onClear: () => _updatePaymentMethod(''),
-        ),
-        const SizedBox(height: 16),
-        FormFieldRow(
-          label: l10n.get('currency'),
-          value: expense.currencyCode.isNotEmpty
-              ? _currencyLabel(expense.currencyCode)
-              : null,
-          hint: l10n.get('selectCurrency'),
-          onTap: () => _showCurrencyPicker(expense.currencyCode),
-          onClear: () => _updateCurrencyCode(''),
-        ),
+        // TODO: 支付方式、币别暂时隐藏
+        // const SizedBox(height: 16),
+        // FormFieldRow(
+        //   label: l10n.get('paymentMethod'),
+        //   value: expense.paymentMethod,
+        //   hint: l10n.get('pleaseEnter'),
+        //   onTap: () => _showTextInput(
+        //     l10n.get('paymentMethod'),
+        //     (v) => _updatePaymentMethod(v),
+        //     initialText: expense.paymentMethod,
+        //   ),
+        //   onClear: () => _updatePaymentMethod(''),
+        // ),
+        // const SizedBox(height: 16),
+        // FormFieldRow(
+        //   label: l10n.get('currency'),
+        //   value: expense.currencyCode.isNotEmpty
+        //       ? _currencyLabel(expense.currencyCode)
+        //       : null,
+        //   hint: l10n.get('selectCurrency'),
+        //   onTap: () => _showCurrencyPicker(expense.currencyCode),
+        //   onClear: () => _updateCurrencyCode(''),
+        // ),
         const SizedBox(height: 16),
         Row(
           mainAxisAlignment: MainAxisAlignment.spaceBetween,

+ 3 - 3
lib/features/overtime/widgets/overtime_apply_detail_dialog.dart

@@ -863,7 +863,7 @@ class _OvertimeApplyDetailDialogState extends State<OvertimeApplyDetailDialog> {
     if (totalHours < 0) totalHours += 24;
 
     if (totalHours > 0) {
-      _hoursCtrl.text = ((totalHours * 2).ceil() / 2.0).toStringAsFixed(1);
+      _hoursCtrl.text = ((totalHours * 2).floor() / 2.0).toStringAsFixed(1);
     }
     _autoCalcDays();
   }
@@ -873,7 +873,7 @@ class _OvertimeApplyDetailDialogState extends State<OvertimeApplyDetailDialog> {
     if (hours <= 0) return;
     // 8小时工作制:天数 = 小时 ÷ 8
     final diffDays = hours / 8.0;
-    _daysCtrl.text = ((diffDays * 2).ceil() / 2.0).toStringAsFixed(1);
+    _daysCtrl.text = ((diffDays * 2).floor() / 2.0).toStringAsFixed(1);
   }
 
   /// 手动输入时失焦自动按 0.5 向上取整
@@ -882,7 +882,7 @@ class _OvertimeApplyDetailDialogState extends State<OvertimeApplyDetailDialog> {
     if (text.isEmpty) return;
     final value = double.tryParse(text);
     if (value == null || value <= 0) return;
-    final rounded = (value * 2).ceil() / 2.0;
+    final rounded = (value * 2).floor() / 2.0;
     final formatted = rounded.toStringAsFixed(1);
     if (controller.text != formatted) {
       controller.text = formatted;

+ 2 - 0
lib/features/report/overtime_detail_report_page.dart

@@ -1171,6 +1171,8 @@ class _OvertimeDetailReportPageState
         return l10n.get('compensatoryLeave');
       case 'NO_COMPENSATION':
         return l10n.get('noCompensation');
+      case 'OTHER':
+        return l10n.get('other');
       default:
         return type;
     }