Browse Source

form 表单的详情

liukai 4 months ago
parent
commit
46e30646e4
23 changed files with 762 additions and 11 deletions
  1. 1 0
      packages/cpt_form/lib/modules/apply/renovation_date_page.dart
  2. 1 1
      packages/cpt_form/lib/modules/apply/vm/apply_view_model.g.dart
  3. 156 0
      packages/cpt_form/lib/modules/detail/detail_approved_fragment.dart
  4. 155 0
      packages/cpt_form/lib/modules/detail/detail_not_approved_fragment.dart
  5. 153 0
      packages/cpt_form/lib/modules/detail/detail_processing_fragment.dart
  6. 75 0
      packages/cpt_form/lib/modules/detail/form_detail_page.dart
  7. 31 0
      packages/cpt_form/lib/modules/detail/form_detail_state.dart
  8. 31 0
      packages/cpt_form/lib/modules/detail/form_detail_view_model.dart
  9. 27 0
      packages/cpt_form/lib/modules/detail/form_detail_view_model.g.dart
  10. 3 1
      packages/cpt_form/lib/modules/form/approve/form_approve_screen.dart
  11. 10 8
      packages/cpt_form/lib/modules/form/not_approve/form_not_approve_screen.dart
  12. 3 1
      packages/cpt_form/lib/modules/form/submit/form_submit_screen.dart
  13. 2 0
      packages/cpt_form/lib/router/page/form_page_router.dart
  14. 63 0
      packages/cpt_form/lib/router/page/form_page_router.gr.dart
  15. BIN
      packages/cs_resources/assets/form/detail_processing_img.webp
  16. 1 0
      packages/cs_resources/lib/generated/assets.dart
  17. 4 0
      packages/cs_resources/lib/generated/intl/messages_en.dart
  18. 30 0
      packages/cs_resources/lib/generated/l10n.dart
  19. 3 0
      packages/cs_resources/lib/l10n/intl_en.arb
  20. 3 0
      packages/cs_resources/lib/l10n/intl_zh_CN.arb
  21. 3 0
      packages/cs_resources/lib/l10n/intl_zh_HK.arb
  22. 6 0
      packages/cs_resources/lib/theme/app_colors_theme.dart
  23. 1 0
      packages/cs_router/lib/path/router_path.dart

+ 1 - 0
packages/cpt_form/lib/modules/apply/renovation_date_page.dart

@@ -14,6 +14,7 @@ import 'package:widgets/my_text_view.dart';
 import 'package:widgets/shatter/picker_container.dart';
 import '../../router/page/form_page_router.dart';
 import 'vm/apply_view_model.dart';
+
 @RoutePage()
 class RenovationDatePage extends HookConsumerWidget {
   const RenovationDatePage({Key? key}) : super(key: key);

+ 1 - 1
packages/cpt_form/lib/modules/apply/vm/apply_view_model.g.dart

@@ -6,7 +6,7 @@ part of 'apply_view_model.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$applyViewModelHash() => r'22aedac0efe149d5544938acf75c975b743c7cd9';
+String _$applyViewModelHash() => r'ea1cdebf421fe02f772e0f1896e1bf37df0b5a5c';
 
 /// See also [ApplyViewModel].
 @ProviderFor(ApplyViewModel)

+ 156 - 0
packages/cpt_form/lib/modules/detail/detail_approved_fragment.dart

@@ -0,0 +1,156 @@
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/src/widgets/framework.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_button.dart';
+import 'package:widgets/my_text_view.dart';
+
+class DetailApprovedFragment extends HookConsumerWidget {
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    return SizedBox(
+      width: double.infinity,
+      height: double.infinity,
+      child: Column(
+        children: [
+          SingleChildScrollView(
+            scrollDirection: Axis.vertical,
+            physics: const BouncingScrollPhysics(),
+            child: Container(
+              width: double.infinity,
+              color: context.appColors.whiteBG,
+              child: Column(
+                mainAxisSize: MainAxisSize.min,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  //状态
+                  MyTextView(
+                    S.current.approved,
+                    marginTop: 17,
+                    textColor: context.appColors.textPrimary,
+                    fontSize: 24,
+                    isFontMedium: true,
+                  ),
+                  MyTextView(
+                    S.current.status,
+                    marginTop: 12,
+                    textColor: context.appColors.textBlack,
+                    fontSize: 17,
+                    isFontRegular: true,
+                  ),
+
+                  //Send On时间
+                  RichText(
+                    text: TextSpan(
+                      style: TextStyle(fontSize: 15, fontWeight: FontWeight.w400, color: context.appColors.textBlack),
+                      children: <TextSpan>[
+                        TextSpan(
+                          text: S.current.send_on_sometime(' '),
+                        ),
+                        TextSpan(
+                          text: "21 Nov 2024, 03:08 PM",
+                          style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack),
+                        ),
+                      ],
+                    ),
+                  ).marginOnly(top: 12),
+
+                  //处理时间
+                  RichText(
+                    text: TextSpan(
+                      style: TextStyle(fontSize: 15, fontWeight: FontWeight.w400, color: context.appColors.textBlack),
+                      children: <TextSpan>[
+                        TextSpan(
+                          text: S.current.approved_on_sometime(' '),
+                        ),
+                        TextSpan(
+                          text: "21 Nov 2024, 03:08 PM",
+                          style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack),
+                        ),
+                      ],
+                    ),
+                  ).marginOnly(top: 10),
+
+                  //分割线
+                  Container(
+                    margin: const EdgeInsets.only(top: 19, bottom: 33),
+                    width: 260,
+                    color: context.appColors.dividerDefault,
+                    height: 0.5,
+                  ),
+
+                  //通行卡的数据
+                  MyTextView(
+                    S.current.serial_number,
+                    marginLeft: 50,
+                    marginRight: 50,
+                    textAlign: TextAlign.center,
+                    textColor: context.appColors.textBlack,
+                    fontSize: 17,
+                    isFontRegular: true,
+                  ),
+
+                  MyTextView(
+                    "PL24087",
+                    marginTop: 16,
+                    marginBottom: 16,
+                    textColor: context.appColors.textPrimary,
+                    fontSize: 24,
+                    isFontMedium: true,
+                  ),
+
+                  //提示 Feedback 文本
+                  MyTextView(
+                    S.current.send_feedback_management,
+                    marginBottom: 33,
+                    marginLeft: 50,
+                    marginRight: 50,
+                    textAlign: TextAlign.center,
+                    textColor: context.appColors.textBlack,
+                    fontSize: 15,
+                    isFontRegular: true,
+                  ),
+                ],
+              ),
+            ),
+          ).expanded(),
+          Row(
+            children: [
+              MyButton(
+                onPressed: () {},
+                text: S.current.send_feedback,
+                textColor: Colors.white,
+                fontSize: 15,
+                fontWeight: FontWeight.w400,
+                radius: 7,
+                backgroundColor: context.appColors.btnBgDefault,
+              ).expanded(),
+              const SizedBox(width: 10),
+              MyButton(
+                onPressed: () {},
+                text: S.current.view_application,
+                textColor: Colors.white,
+                fontSize: 15,
+                fontWeight: FontWeight.w400,
+                radius: 7,
+                backgroundColor: context.appColors.greenBG,
+              ).expanded(),
+            ],
+          ).marginOnly(left: 15, right: 15),
+          MyButton(
+            onPressed: () {},
+            text: S.current.remove,
+            textColor: Colors.white,
+            fontSize: 15,
+            fontWeight: FontWeight.w400,
+            radius: 7,
+            backgroundColor: context.appColors.orangeBG,
+          ).marginOnly(top: 6, left: 15, right: 15, bottom: 17.5),
+        ],
+      ),
+    );
+  }
+}

+ 155 - 0
packages/cpt_form/lib/modules/detail/detail_not_approved_fragment.dart

@@ -0,0 +1,155 @@
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/src/widgets/framework.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_button.dart';
+import 'package:widgets/my_text_view.dart';
+
+class DetailNotApprovedFragment extends HookConsumerWidget {
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    return SizedBox(
+      width: double.infinity,
+      height: double.infinity,
+      child: Column(
+        children: [
+          SingleChildScrollView(
+            scrollDirection: Axis.vertical,
+            physics: const BouncingScrollPhysics(),
+            child: Container(
+              width: double.infinity,
+              color: context.appColors.whiteBG,
+              child: Column(
+                mainAxisSize: MainAxisSize.min,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  //状态
+                  MyTextView(
+                    S.current.not_approved,
+                    marginTop: 17,
+                    textColor: context.appColors.textPrimary,
+                    fontSize: 24,
+                    isFontMedium: true,
+                  ),
+                  MyTextView(
+                    S.current.status,
+                    marginTop: 12,
+                    textColor: context.appColors.textBlack,
+                    fontSize: 17,
+                    isFontRegular: true,
+                  ),
+
+                  //Send On时间
+                  RichText(
+                    text: TextSpan(
+                      style: TextStyle(fontSize: 15, fontWeight: FontWeight.w400, color: context.appColors.textBlack),
+                      children: <TextSpan>[
+                        TextSpan(
+                          text: S.current.send_on_sometime(' '),
+                        ),
+                        TextSpan(
+                          text: "21 Nov 2024, 03:08 PM",
+                          style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack),
+                        ),
+                      ],
+                    ),
+                  ).marginOnly(top: 12),
+
+                  //处理时间
+                  RichText(
+                    text: TextSpan(
+                      style: TextStyle(fontSize: 15, fontWeight: FontWeight.w400, color: context.appColors.textBlack),
+                      children: <TextSpan>[
+                        TextSpan(
+                          text: S.current.approved_on_sometime(' '),
+                        ),
+                        TextSpan(
+                          text: "21 Nov 2024, 03:08 PM",
+                          style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack),
+                        ),
+                      ],
+                    ),
+                  ).marginOnly(top: 10),
+
+                  //分割线
+                  Container(
+                    margin: const EdgeInsets.only(top: 19, bottom: 20),
+                    width: 260,
+                    color: context.appColors.dividerDefault,
+                    height: 0.5,
+                  ),
+
+                  //拒绝原因
+                  MyTextView(
+                    "The information you sent is incorrect. Please confirm the information and resubmit!",
+                    marginLeft: 50,
+                    marginRight: 50,
+                    textAlign: TextAlign.center,
+                    textColor: context.appColors.textBlack,
+                    fontSize: 17,
+                    isFontRegular: true,
+                  ),
+
+                  //分割线
+                  Container(
+                    margin: const EdgeInsets.only(top: 19, bottom: 20),
+                    width: 260,
+                    color: context.appColors.dividerDefault,
+                    height: 0.5,
+                  ),
+
+                  //提示 Feedback 文本
+                  MyTextView(
+                    S.current.send_feedback_management,
+                    marginBottom: 33,
+                    marginLeft: 50,
+                    marginRight: 50,
+                    textAlign: TextAlign.center,
+                    textColor: context.appColors.textBlack,
+                    fontSize: 15,
+                    isFontRegular: true,
+                  ),
+                ],
+              ),
+            ),
+          ).expanded(),
+          Row(
+            children: [
+              MyButton(
+                onPressed: () {},
+                text: S.current.send_feedback,
+                textColor: Colors.white,
+                fontSize: 15,
+                fontWeight: FontWeight.w400,
+                radius: 7,
+                backgroundColor: context.appColors.btnBgDefault,
+              ).expanded(),
+              const SizedBox(width: 10),
+              MyButton(
+                onPressed: () {},
+                text: S.current.view_application,
+                textColor: Colors.white,
+                fontSize: 15,
+                fontWeight: FontWeight.w400,
+                radius: 7,
+                backgroundColor: context.appColors.greenBG,
+              ).expanded(),
+            ],
+          ).marginOnly(left: 15, right: 15),
+          MyButton(
+            onPressed: () {},
+            text: S.current.remove,
+            textColor: Colors.white,
+            fontSize: 15,
+            fontWeight: FontWeight.w400,
+            radius: 7,
+            backgroundColor: context.appColors.orangeBG,
+          ).marginOnly(top: 6, left: 15, right: 15, bottom: 17.5),
+        ],
+      ),
+    );
+  }
+}

+ 153 - 0
packages/cpt_form/lib/modules/detail/detail_processing_fragment.dart

@@ -0,0 +1,153 @@
+import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/src/widgets/framework.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_button.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+
+class DetailProcessingFragment extends HookConsumerWidget {
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    return SizedBox(
+      width: double.infinity,
+      height: double.infinity,
+      child: Column(
+        children: [
+          SingleChildScrollView(
+            scrollDirection: Axis.vertical,
+            physics: const BouncingScrollPhysics(),
+            child: Container(
+              width: double.infinity,
+              color: context.appColors.whiteBG,
+              child: Column(
+                mainAxisSize: MainAxisSize.min,
+                crossAxisAlignment: CrossAxisAlignment.center,
+                children: [
+                  //状态
+                  MyTextView(
+                    S.current.processing,
+                    marginTop: 17,
+                    textColor: context.appColors.textPrimary,
+                    fontSize: 24,
+                    isFontMedium: true,
+                  ),
+                  MyTextView(
+                    S.current.status,
+                    marginTop: 12,
+                    textColor: context.appColors.textBlack,
+                    fontSize: 17,
+                    isFontRegular: true,
+                  ),
+
+                  //Send On时间
+                  RichText(
+                    text: TextSpan(
+                      style: TextStyle(fontSize: 15, fontWeight: FontWeight.w400, color: context.appColors.textBlack),
+                      children: <TextSpan>[
+                        TextSpan(
+                          text: S.current.send_on_sometime(' '),
+                        ),
+                        TextSpan(
+                          text: "21 Nov 2024, 03:08 PM",
+                          style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack),
+                        ),
+                      ],
+                    ),
+                  ).marginOnly(top: 12,bottom: 28),
+
+                  //图片
+                  const MyAssetImage(
+                    Assets.formDetailProcessingImg,
+                    width: 40,
+                    height: 51.5,
+                  ),
+
+                  //提示文本
+                  MyTextView(
+                    S.current.processing_in_progress,
+                    marginTop: 15,
+                    marginBottom: 34,
+                    marginLeft: 50,
+                    marginRight: 50,
+                    textAlign: TextAlign.center,
+                    textColor: context.appColors.textBlack,
+                    fontSize: 15,
+                    isFontRegular: true,
+                  ),
+
+                  Container(
+                    color: context.appColors.backgroundDark,
+                    height: 10,
+                  ),
+
+                  Align(
+                    alignment: Alignment.centerLeft, // 左对齐
+                    child: MyTextView(
+                      "Access Card - Owner",
+                      marginTop: 22,
+                      marginBottom: 12,
+                      marginLeft: 18,
+                      textColor: context.appColors.textPrimary,
+                      fontSize: 17,
+                      isFontMedium: true,
+                    ),
+                  ),
+
+                  Align(
+                    alignment: Alignment.centerLeft, // 左对齐
+                    child: MyTextView(
+                      "Damaged or faulty",
+                      marginBottom: 22,
+                      marginLeft: 18,
+                      textColor: context.appColors.textBlack,
+                      fontSize: 15,
+                      isFontMedium: true,
+                    ),
+                  ),
+
+                ],
+              ),
+            ),
+          ).expanded(),
+          Row(
+            children: [
+              MyButton(
+                onPressed: () {},
+                text: S.current.send_feedback,
+                textColor: Colors.white,
+                fontSize: 15,
+                fontWeight: FontWeight.w400,
+                radius: 7,
+                backgroundColor: context.appColors.btnBgDefault,
+              ).expanded(),
+              const SizedBox(width: 10),
+              MyButton(
+                onPressed: () {},
+                text: S.current.view_application,
+                textColor: Colors.white,
+                fontSize: 15,
+                fontWeight: FontWeight.w400,
+                radius: 7,
+                backgroundColor: context.appColors.greenBG,
+              ).expanded(),
+            ],
+          ).marginOnly(left: 15, right: 15),
+          MyButton(
+            onPressed: () {},
+            text: S.current.remove,
+            textColor: Colors.white,
+            fontSize: 15,
+            fontWeight: FontWeight.w400,
+            radius: 7,
+            backgroundColor: context.appColors.orangeBG,
+          ).marginOnly(top: 6, left: 15, right: 15, bottom: 17.5),
+        ],
+      ),
+    );
+  }
+}

+ 75 - 0
packages/cpt_form/lib/modules/detail/form_detail_page.dart

@@ -0,0 +1,75 @@
+import 'package:cpt_form/modules/detail/detail_processing_fragment.dart';
+import 'package:cpt_form/modules/form/form_types.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
+import 'package:flutter/material.dart';
+import 'package:auto_route/auto_route.dart';
+import 'package:flutter_hooks/flutter_hooks.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:router/ext/auto_router_extensions.dart';
+import 'package:widgets/load_state_layout.dart';
+import 'package:widgets/my_appbar.dart';
+
+import '../../router/page/form_page_router.dart';
+import 'detail_approved_fragment.dart';
+import 'detail_not_approved_fragment.dart';
+import 'form_detail_view_model.dart';
+
+@RoutePage()
+class FormDetailPage extends HookConsumerWidget {
+  final String applyId;
+  final String type;
+
+  const FormDetailPage({
+    Key? key,
+    @PathParam() required this.applyId,
+    @PathParam() required this.type,
+  }) : super(key: key);
+
+  //启动当前页面
+  static void startInstance({
+    BuildContext? context,
+    required String applyId,
+    required String type,
+  }) {
+    if (context != null) {
+      context.router.push(FormDetailPageRoute(applyId: applyId, type: type));
+    } else {
+      appRouter.push(FormDetailPageRoute(applyId: applyId, type: type));
+    }
+  }
+
+  @override
+  Widget build(BuildContext context, WidgetRef ref) {
+    final viewModel = ref.watch(formDetailViewModelProvider.notifier);
+    final state = ref.watch(formDetailViewModelProvider);
+
+    useEffect(() {
+      // 组件挂载时执行 - 执行接口请求
+      Future.microtask(() => viewModel.fetchFormDetail());
+      return () {
+        // 组件卸载时执行
+      };
+    }, []);
+
+    return Scaffold(
+      appBar: MyAppBar.appBar(context, FormTypes.iconMap[type]?['name'] ?? "", backgroundColor: context.appColors.whiteBG),
+      backgroundColor: context.appColors.backgroundDark,
+      body: SizedBox(
+        width: double.infinity,
+        height: double.infinity,
+        child: LoadStateLayout(
+            state: state.loadingState,
+            errorMessage: state.errorMessage,
+            errorRetry: () {
+              viewModel.retryRequest();
+            },
+            successWidget: state.status == 0
+                ? DetailProcessingFragment()
+                : state.status == 1
+                    ? DetailApprovedFragment()
+                    : DetailNotApprovedFragment()),
+      ),
+    );
+  }
+}

+ 31 - 0
packages/cpt_form/lib/modules/detail/form_detail_state.dart

@@ -0,0 +1,31 @@
+import 'package:widgets/load_state_layout.dart';
+
+class FormDetailState{
+
+  //页面 LoadView 状态的展示
+  LoadState loadingState;
+  String? errorMessage;
+
+  int status;  // 0是Pending , 1是Approve , 2是Not Approve
+
+  // ===================================  Begin  ↓  ===================================
+
+  FormDetailState({
+    this.loadingState = LoadState.State_Loading,
+    this.errorMessage,
+    this.status = 0,
+  });
+
+  FormDetailState copyWith({
+    LoadState? loadingState,
+    String? errorMessage,
+    int? status,
+  }) {
+    return FormDetailState(
+      errorMessage: errorMessage ?? this.errorMessage,
+      loadingState: loadingState ?? this.loadingState,
+      status: status ?? this.status,
+    );
+  }
+
+}

+ 31 - 0
packages/cpt_form/lib/modules/detail/form_detail_view_model.dart

@@ -0,0 +1,31 @@
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:widgets/load_state_layout.dart';
+
+import 'form_detail_state.dart';
+
+part 'form_detail_view_model.g.dart';
+
+@riverpod
+class FormDetailViewModel extends _$FormDetailViewModel {
+  @override
+  FormDetailState build() {
+    return FormDetailState();
+  }
+
+  void retryRequest() {
+    fetchFormDetail();
+  }
+
+  //获取表单的详情数据
+  void fetchFormDetail() async {
+    //显示加载数据
+    state = state.copyWith(loadingState: LoadState.State_Loading);
+
+    await Future.delayed(const Duration(milliseconds: 1500));
+
+    //根据后端返回的数据赋值状态
+    state = state.copyWith(loadingState: LoadState.State_Success, status: 2);
+
+
+  }
+}

+ 27 - 0
packages/cpt_form/lib/modules/detail/form_detail_view_model.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'form_detail_view_model.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$formDetailViewModelHash() =>
+    r'ff75168453999e002ef05e85ede97021615b2181';
+
+/// See also [FormDetailViewModel].
+@ProviderFor(FormDetailViewModel)
+final formDetailViewModelProvider =
+    AutoDisposeNotifierProvider<FormDetailViewModel, FormDetailState>.internal(
+  FormDetailViewModel.new,
+  name: r'formDetailViewModelProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$formDetailViewModelHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+typedef _$FormDetailViewModel = AutoDisposeNotifier<FormDetailState>;
+// ignore_for_file: type=lint
+// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package

+ 3 - 1
packages/cpt_form/lib/modules/form/approve/form_approve_screen.dart

@@ -9,6 +9,7 @@ import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/widget_export.dart';
 
+import '../../detail/form_detail_page.dart';
 import 'form_approve_view_model.dart';
 import 'item_form_approve.dart';
 
@@ -45,7 +46,8 @@ class FormApproveScreen extends HookConsumerWidget {
                 delegate: SliverChildBuilderDelegate(
               (context, index) {
                 return FormApproveItem(index: index, item: state.datas[index]).onTap((){
-
+                  //去详情页面
+                  FormDetailPage.startInstance(context: context, applyId: "123", type: state.datas[index]);
                 });
               },
               childCount: state.datas.length,

+ 10 - 8
packages/cpt_form/lib/modules/form/not_approve/form_not_approve_screen.dart

@@ -1,4 +1,5 @@
 import 'package:auto_route/auto_route.dart';
+import 'package:cpt_form/modules/detail/form_detail_page.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
@@ -8,7 +9,6 @@ import 'package:widgets/widget_export.dart';
 import 'form_not_approve_view_model.dart';
 import 'item_form_not_approve.dart';
 
-
 @RoutePage()
 class FormNotApproveScreen extends HookConsumerWidget {
   @override
@@ -39,13 +39,15 @@ class FormNotApproveScreen extends HookConsumerWidget {
           },
           successSliverWidget: [
             SliverList(
-                delegate: SliverChildBuilderDelegate((context, index) {
-                    return FormNotApproveItem(index: index, item: state.datas[index]).onTap((){
-
-                    });
-                  },
-                  childCount: state.datas.length,
-                )),
+                delegate: SliverChildBuilderDelegate(
+              (context, index) {
+                return FormNotApproveItem(index: index, item: state.datas[index]).onTap(() {
+                  //去详情页面
+                  FormDetailPage.startInstance(context: context, applyId: "123", type: state.datas[index]);
+                });
+              },
+              childCount: state.datas.length,
+            )),
           ],
         ),
       ).marginOnly(top: 5, bottom: 5),

+ 3 - 1
packages/cpt_form/lib/modules/form/submit/form_submit_screen.dart

@@ -6,6 +6,7 @@ import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
+import '../../detail/form_detail_page.dart';
 import 'form_submit_view_model.dart';
 import 'item_form_submit.dart';
 
@@ -42,7 +43,8 @@ class FormSubmitScreen extends HookConsumerWidget {
                 delegate: SliverChildBuilderDelegate(
               (context, index) {
                 return FormSubmitItem(index: index, item: state.datas[index]).onTap(() {
-
+                  //去详情页面
+                  FormDetailPage.startInstance(context: context, applyId: "123", type: state.datas[index]);
                 });
               },
               childCount: state.datas.length,

+ 2 - 0
packages/cpt_form/lib/router/page/form_page_router.dart

@@ -21,6 +21,7 @@ import '../../modules/apply/signature_page.dart';
 import '../../modules/apply/type_of_application_page.dart';
 import '../../modules/apply/vehicle_info_page.dart';
 import '../../modules/apply/form_terms_page.dart';
+import '../../modules/detail/form_detail_page.dart';
 
 part 'form_page_router.gr.dart';
 
@@ -55,5 +56,6 @@ class FormPageRouter extends _$FormPageRouter {
         CustomRoute(page: TypeOfApplicationPageRoute.page, path: RouterPath.formTypeOfApplication, transitionsBuilder: applySlideTransition),
         CustomRoute(page: VehicleInfoPageRoute.page, path: RouterPath.formVehicleInfo, transitionsBuilder: applySlideTransition),
         CustomRoute(page: FormTermsPageRoute.page, path: "${RouterPath.formTerms}:type", transitionsBuilder: applySlideTransition),
+        CustomRoute(page: FormDetailPageRoute.page, path: "${RouterPath.formDetail}:applyId/:type", transitionsBuilder: applySlideTransition),
       ];
 }

+ 63 - 0
packages/cpt_form/lib/router/page/form_page_router.gr.dart

@@ -33,6 +33,22 @@ abstract class _$FormPageRouter extends RootStackRouter {
         child: FormApproveScreen(),
       );
     },
+    FormDetailPageRoute.name: (routeData) {
+      final pathParams = routeData.inheritedPathParams;
+      final args = routeData.argsAs<FormDetailPageRouteArgs>(
+          orElse: () => FormDetailPageRouteArgs(
+                applyId: pathParams.getString('applyId'),
+                type: pathParams.getString('type'),
+              ));
+      return AutoRoutePage<dynamic>(
+        routeData: routeData,
+        child: FormDetailPage(
+          key: args.key,
+          applyId: args.applyId,
+          type: args.type,
+        ),
+      );
+    },
     FormNotApprovePageRoute.name: (routeData) {
       return AutoRoutePage<dynamic>(
         routeData: routeData,
@@ -176,6 +192,53 @@ class FormApprovePageRoute extends PageRouteInfo<void> {
 }
 
 /// generated route for
+/// [FormDetailPage]
+class FormDetailPageRoute extends PageRouteInfo<FormDetailPageRouteArgs> {
+  FormDetailPageRoute({
+    Key? key,
+    required String applyId,
+    required String type,
+    List<PageRouteInfo>? children,
+  }) : super(
+          FormDetailPageRoute.name,
+          args: FormDetailPageRouteArgs(
+            key: key,
+            applyId: applyId,
+            type: type,
+          ),
+          rawPathParams: {
+            'applyId': applyId,
+            'type': type,
+          },
+          initialChildren: children,
+        );
+
+  static const String name = 'FormDetailPageRoute';
+
+  static const PageInfo<FormDetailPageRouteArgs> page =
+      PageInfo<FormDetailPageRouteArgs>(name);
+}
+
+class FormDetailPageRouteArgs {
+  const FormDetailPageRouteArgs({
+    this.key,
+    required this.applyId,
+    required this.type,
+  });
+
+  final Key? key;
+
+  final String applyId;
+
+  final String type;
+
+  @override
+  String toString() {
+    return 'FormDetailPageRouteArgs{key: $key, applyId: $applyId, type: $type}';
+  }
+}
+
+/// generated route for
 /// [FormNotApproveScreen]
 class FormNotApprovePageRoute extends PageRouteInfo<void> {
   const FormNotApprovePageRoute({List<PageRouteInfo>? children})

BIN
packages/cs_resources/assets/form/detail_processing_img.webp


+ 1 - 0
packages/cs_resources/lib/generated/assets.dart

@@ -79,6 +79,7 @@ class Assets {
   static const String formApprovedIcon = 'assets/form/approved_icon.webp';
   static const String formBicycles = 'assets/form/bicycles.webp';
   static const String formCarVehicle = 'assets/form/car_vehicle.webp';
+  static const String formDetailProcessingImg = 'assets/form/detail_processing_img.webp';
   static const String formLabeReplace = 'assets/form/labe_replace.webp';
   static const String formMoveInOut = 'assets/form/move_in_out.webp';
   static const String formNotApprovedIcon = 'assets/form/not_approved_icon.webp';

+ 4 - 0
packages/cs_resources/lib/generated/intl/messages_en.dart

@@ -295,6 +295,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Privacy Policy"),
         "proceed_with_payment":
             MessageLookupByLibrary.simpleMessage("Proceed With Payment"),
+        "processing": MessageLookupByLibrary.simpleMessage("Processing"),
         "processing_in_progress": MessageLookupByLibrary.simpleMessage(
             "Processing in progress, please be patient..."),
         "property": MessageLookupByLibrary.simpleMessage("Property"),
@@ -343,6 +344,7 @@ class MessageLookup extends MessageLookupByLibrary {
             "If you would like more information,please send a feedback to the Management"),
         "send_on_sometime": m5,
         "sent": MessageLookupByLibrary.simpleMessage("Sent"),
+        "serial_number": MessageLookupByLibrary.simpleMessage("Serial Number"),
         "service": MessageLookupByLibrary.simpleMessage("Service"),
         "set_primary_card":
             MessageLookupByLibrary.simpleMessage("Set as Primary Card"),
@@ -420,6 +422,8 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Verification Code"),
         "version_no": MessageLookupByLibrary.simpleMessage("Version No."),
         "view": MessageLookupByLibrary.simpleMessage("View"),
+        "view_application":
+            MessageLookupByLibrary.simpleMessage("View Application"),
         "visitor": MessageLookupByLibrary.simpleMessage("Visitor"),
         "visitor_active": MessageLookupByLibrary.simpleMessage("Active"),
         "visitor_msg": MessageLookupByLibrary.simpleMessage(

+ 30 - 0
packages/cs_resources/lib/generated/l10n.dart

@@ -2630,6 +2630,36 @@ class S {
     );
   }
 
+  /// `View Application`
+  String get view_application {
+    return Intl.message(
+      'View Application',
+      name: 'view_application',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Serial Number`
+  String get serial_number {
+    return Intl.message(
+      'Serial Number',
+      name: 'serial_number',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Processing`
+  String get processing {
+    return Intl.message(
+      'Processing',
+      name: 'processing',
+      desc: '',
+      args: [],
+    );
+  }
+
   /// `Other`
   String get other {
     return Intl.message(

+ 3 - 0
packages/cs_resources/lib/l10n/intl_en.arb

@@ -257,5 +257,8 @@
   "fee": "Fee",
   "card": "Card",
   "renovation_company": "RENOVATION COMPANY",
+  "view_application": "View Application",
+  "serial_number": "Serial Number",
+  "processing": "Processing",
   "other": "Other"
 }

+ 3 - 0
packages/cs_resources/lib/l10n/intl_zh_CN.arb

@@ -257,5 +257,8 @@
   "fee": "费用",
   "card": "银行卡",
   "renovation_company": "装修公司",
+  "view_application": "查看记录",
+  "serial_number": "序列号",
+  "processing": "处理中",
   "other": "其他"
 }

+ 3 - 0
packages/cs_resources/lib/l10n/intl_zh_HK.arb

@@ -243,5 +243,8 @@
   "fee": "费用",
   "card": "银行卡",
   "renovation_company": "装修公司",
+  "view_application": "查看记录",
+  "serial_number": "序列号",
+  "processing": "处理中",
   "other": "其他"
 }

+ 6 - 0
packages/cs_resources/lib/theme/app_colors_theme.dart

@@ -33,6 +33,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   static const _colorFE4066 = Color(0xFFFE4066);
   static const _colorE9E9E9 = Color(0xFFE9E9E9);
   static const _color99A8CA = Color(0xFF99A8CA);
+  static const _color0DBE1E= Color(0xFF0DBE1E);
 
   //暗色主题的一些自定义颜色值
   static const _darkBlackBg = Color(0xFF0F0F0F);
@@ -76,6 +77,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   final Color grayBgE9; //e9灰色背景
   final Color disEnableGray; //禁用的灰色
   final Color authFiledHintDark; //文本Hint的深蓝色
+  final Color greenBG; //按钮的绿色背景
 
   // 私有的构造函数
   const AppColorsTheme._internal({
@@ -112,6 +114,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
     required this.grayBgE9,
     required this.disEnableGray,
     required this.authFiledHintDark,
+    required this.greenBG,
   });
 
   // 浅色主题工厂方法
@@ -150,6 +153,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       grayBgE9: _colorE9E9E9,
       disEnableGray: _colorBDBDBD,
       authFiledHintDark: _color99A8CA,
+      greenBG: _color0DBE1E,
     );
   }
 
@@ -189,6 +193,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       grayBgE9: _darkBlackItemLightMost,
       disEnableGray: _darkBlackItemLight,
       authFiledHintDark: _color99A8CA,
+      greenBG: _darkBlackItemLight,
     );
   }
 
@@ -237,6 +242,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       grayBgE9: Color.lerp(grayBgE9, other.grayBgE9, t)!,
       disEnableGray: Color.lerp(disEnableGray, other.disEnableGray, t)!,
       authFiledHintDark: Color.lerp(authFiledHintDark, other.authFiledHintDark, t)!,
+      greenBG: Color.lerp(greenBG, other.greenBG, t)!,
     );
   }
 }

+ 1 - 0
packages/cs_router/lib/path/router_path.dart

@@ -77,6 +77,7 @@ class RouterPath {
   static const formTypeOfApplication='/form/type/application';
   static const formVehicleInfo='/form/vehicle/info';
   static const formTerms='/form/terms';
+  static const formDetail='/form/detail';
 
   //消息板
   static const noticeBoard = '/notice_board';