Browse Source

Merge branch 'dev-stripe' into dev

# Conflicts:
#	app/ios/Runner.xcodeproj/project.pbxproj
liukai 2 weeks ago
parent
commit
ba93089352
97 changed files with 1567 additions and 589 deletions
  1. 22 16
      app/android/app/build.gradle
  2. 4 4
      app/android/app/src/main/AndroidManifest.xml
  3. 4 2
      app/android/app/src/main/kotlin/com/hongyegroup/property_management/MainActivity.java
  4. 1 1
      app/android/app/src/main/kotlin/com/hongyegroup/property_management/MyApplication.kt
  5. 0 0
      app/android/app/src/main/kotlin/com/hongyegroup/app24ifm/RouterActivity.java
  6. 2 2
      app/android/app/src/main/res/values-night/styles.xml
  7. 2 2
      app/android/app/src/main/res/values/styles.xml
  8. 1 1
      app/android/gradle/wrapper/gradle-wrapper.properties
  9. 2 2
      app/android/settings.gradle
  10. 2 2
      app/ios/Podfile
  11. 3 3
      app/ios/Runner.xcodeproj/project.pbxproj
  12. 15 15
      app/lib/main.dart
  13. 0 3
      packages/cpt_auth/lib/modules/tenant_doc/tenant_doc_view_model.dart
  14. 1 1
      packages/cpt_facility/lib/modules/book_confirm/book_confirm_page.dart
  15. 3 3
      packages/cpt_facility/lib/modules/booking/facility_booking_page.dart
  16. 4 0
      packages/cpt_facility/lib/modules/booking/facility_booking_state.dart
  17. 19 2
      packages/cpt_facility/lib/modules/booking/facility_booking_view_model.dart
  18. 101 80
      packages/cpt_facility/lib/modules/detail/facility_detail_page.dart
  19. 20 0
      packages/cpt_facility/lib/modules/detail/facility_detail_view_model.dart
  20. 22 1
      packages/cpt_facility/lib/modules/facility/active/facility_active_view_model.dart
  21. 22 8
      packages/cpt_facility/lib/modules/facility/active/item_facility_active.dart
  22. 2 3
      packages/cpt_facility/lib/modules/facility/deposit/item_facility_deposit.dart
  23. 21 20
      packages/cpt_facility/lib/modules/facility/history/item_facility_history.dart
  24. 30 19
      packages/cpt_form/lib/modules/apply/form_payment_page.dart
  25. 31 21
      packages/cpt_form/lib/modules/apply/vm/apply_view_model.dart
  26. 61 26
      packages/cpt_form/lib/modules/detail/detail_processing_fragment.dart
  27. 20 0
      packages/cpt_form/lib/modules/detail/form_detail_view_model.dart
  28. 21 8
      packages/cpt_form/lib/modules/form/approve/item_form_approve.dart
  29. 11 8
      packages/cpt_form/lib/modules/form/form_page.dart
  30. 21 8
      packages/cpt_form/lib/modules/form/not_approve/item_form_not_approve.dart
  31. 23 2
      packages/cpt_form/lib/modules/form/submit/form_submit_view_model.dart
  32. 21 8
      packages/cpt_form/lib/modules/form/submit/item_form_submit.dart
  33. 13 2
      packages/cpt_main/lib/modules/home/home_page.dart
  34. 6 1
      packages/cpt_main/lib/modules/notification/item_notification.dart
  35. 28 4
      packages/cpt_notice_board/lib/modules/documents/page/documents_page.dart
  36. 46 20
      packages/cpt_notice_board/lib/modules/documents_list/page/documents_list_page.dart
  37. 1 1
      packages/cpt_payment/lib/modules/choose_card/choose_card_view_model.g.dart
  38. 2 0
      packages/cpt_payment/lib/modules/payment/manage/item_manage.dart
  39. 1 1
      packages/cpt_payment/lib/modules/payment/manage/manage_view_model.g.dart
  40. 1 1
      packages/cpt_payment/lib/modules/payment/payment/payment_list_view_model.g.dart
  41. 13 13
      packages/cpt_payment/lib/modules/payment/payment_page.dart
  42. 134 0
      packages/cpt_payment/lib/provider/stripe_service.dart
  43. 27 0
      packages/cpt_payment/lib/provider/stripe_service.g.dart
  44. 8 2
      packages/cpt_payment/lib/router/component/payment_component_service.dart
  45. 3 0
      packages/cs_domain/lib/constants/api_constants.dart
  46. 22 29
      packages/cs_domain/lib/entity/facility_page_entity.dart
  47. 27 0
      packages/cs_domain/lib/entity/form_detail_entity.dart
  48. 51 0
      packages/cs_domain/lib/entity/form_order_entity.dart
  49. 28 2
      packages/cs_domain/lib/entity/form_submitted_entity.dart
  50. 21 0
      packages/cs_domain/lib/entity/payment_intent_entity.dart
  51. 25 7
      packages/cs_domain/lib/generated/json/base/json_convert_content.dart
  52. 62 56
      packages/cs_domain/lib/generated/json/facility_page_entity.g.dart
  53. 67 1
      packages/cs_domain/lib/generated/json/form_detail_entity.g.dart
  54. 106 0
      packages/cs_domain/lib/generated/json/form_order_entity.g.dart
  55. 67 10
      packages/cs_domain/lib/generated/json/form_submitted_entity.g.dart
  56. 26 0
      packages/cs_domain/lib/generated/json/payment_intent_entity.g.dart
  57. 0 1
      packages/cs_domain/lib/repository/facility_repository.dart
  58. 5 3
      packages/cs_domain/lib/repository/form_repository.dart
  59. 24 0
      packages/cs_domain/lib/repository/payment_repository.dart
  60. 1 0
      packages/cs_plugin_basic/lib/constants/app_constant.dart
  61. 2 2
      packages/cs_plugin_basic/lib/dialog/country_code_selecter.dart
  62. 72 129
      packages/cs_plugin_basic/lib/widget/webview_page.dart
  63. 1 1
      packages/cs_plugin_platform/lib/platform_export.dart
  64. 1 1
      packages/cs_plugin_platform/pubspec.yaml
  65. BIN
      packages/cs_resources/assets/auth/yy_home_success.webp
  66. BIN
      packages/cs_resources/assets/main/home_info_news.png
  67. BIN
      packages/cs_resources/assets/main/home_info_news.webp
  68. BIN
      packages/cs_resources/assets/main/home_internal_news.png
  69. BIN
      packages/cs_resources/assets/main/home_internal_news.webp
  70. BIN
      packages/cs_resources/assets/main/home_property_news.png
  71. BIN
      packages/cs_resources/assets/main/home_property_news.webp
  72. BIN
      packages/cs_resources/assets/main/home_publish_news.png
  73. BIN
      packages/cs_resources/assets/main/home_publish_news.webp
  74. BIN
      packages/cs_resources/assets/main/notification_item_icon.webp
  75. 4 4
      packages/cs_resources/lib/generated/assets.dart
  76. 4 1
      packages/cs_resources/lib/generated/intl/messages_en.dart
  77. 3 0
      packages/cs_resources/lib/generated/intl/messages_zh_CN.dart
  78. 3 0
      packages/cs_resources/lib/generated/intl/messages_zh_HK.dart
  79. 32 2
      packages/cs_resources/lib/generated/l10n.dart
  80. 4 1
      packages/cs_resources/lib/l10n/intl_en.arb
  81. 3 0
      packages/cs_resources/lib/l10n/intl_zh_CN.arb
  82. 3 0
      packages/cs_resources/lib/l10n/intl_zh_HK.arb
  83. 6 0
      packages/cs_resources/lib/theme/app_colors_theme.dart
  84. 2 1
      packages/cs_resources/pubspec.yaml
  85. 0 1
      packages/cs_router/lib/componentRouter/form_service.dart
  86. 3 0
      packages/cs_router/lib/componentRouter/payment_service.dart
  87. 2 1
      packages/cs_router/pubspec.yaml
  88. 60 0
      packages/cs_shared/lib/utils/file_utils.dart
  89. 2 1
      packages/cs_shared/pubspec.yaml
  90. 3 0
      packages/cs_widgets/lib/shatter/select_calendar/calendar_bottom_sheet.dart
  91. 4 9
      packages/cs_widgets/lib/shatter/select_calendar/full_calendar.dart
  92. 8 0
      packages/cs_widgets/lib/shatter/weekly_calendar/calendar_utils.dart
  93. 4 5
      packages/cs_widgets/lib/shatter/weekly_calendar/day_cell.dart
  94. 6 2
      packages/cs_widgets/lib/shatter/weekly_calendar/day_table_view.dart
  95. 3 0
      packages/cs_widgets/lib/shatter/weekly_calendar/weekly_calendar.dart
  96. 3 2
      packages/cs_widgets/pubspec.yaml
  97. 2 1
      pubspec.yaml

+ 22 - 16
app/android/app/build.gradle

@@ -24,19 +24,17 @@ if (flutterRoot == null) {
     throw new Exception("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
 }
 
-// 模拟器运行报错时尝试开启此项
-// project.setProperty('target-platform', 'android-arm')
-
 android {
-    compileSdkVersion 34
+    namespace 'com.hongyegroup.app24ifm'
+    compileSdk 35
 
     compileOptions {
-        sourceCompatibility JavaVersion.VERSION_11
-        targetCompatibility JavaVersion.VERSION_11
+        sourceCompatibility JavaVersion.VERSION_17
+        targetCompatibility JavaVersion.VERSION_17
     }
 
     kotlinOptions {
-        jvmTarget = JavaVersion.VERSION_11
+        jvmTarget = JavaVersion.VERSION_17
     }
 
     sourceSets {
@@ -49,11 +47,12 @@ android {
     }
 
     defaultConfig {
-        applicationId "com.hongyegroup.proanperty_management"
+        applicationId "com.hongyegroup.app24ifm"
         minSdkVersion 21
-        targetSdkVersion 34
-        versionCode 100          //Android打包上线记得要加固并重新签名再传
+        targetSdkVersion 35
+        versionCode 100
         versionName "1.0.0"
+        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 
         multiDexEnabled true
 
@@ -91,8 +90,6 @@ android {
             signingConfig signingConfigs.release
             //默认系统混淆
             minifyEnabled true
-            // 不显示Log
-            buildConfigField "boolean", "LOG_DEBUG", "false"
             //是否可调试
             debuggable false
             //Zipalign优化
@@ -113,14 +110,23 @@ flutter {
     source '../..'
 }
 
+// 覆盖所有子模块的命名空间规则
+subprojects {
+    afterEvaluate { project ->
+        if (project.hasProperty("android") && project.android.namespace == null) {
+            project.android.namespace = "com.hongyegroup.app24ifm.${project.name}"
+        }
+    }
+}
+
 dependencies {
-    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0"
-    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0"
+    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.0"
+    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.0"
 
     implementation 'com.github.bumptech.glide:glide:4.11.0'
     kapt 'com.github.bumptech.glide:compiler:4.11.0'
 
-    implementation 'androidx.appcompat:appcompat:1.3.1'  //加入AndroidX依赖
+    implementation 'androidx.appcompat:appcompat:1.6.1'  //加入AndroidX依赖
     implementation 'com.android.support:multidex:1.0.3'
 //    implementation 'androidx.core:core-splashscreen:1.0.0' //启动12兼容
-}
+}

+ 4 - 4
app/android/app/src/main/AndroidManifest.xml

@@ -1,5 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.hongyegroup.property_management">
+    package="com.hongyegroup.app24ifm">
 
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
@@ -39,7 +39,7 @@
     </queries>
 
     <application
-        android:name="android.app.src.main.kotlin.com.hongyegroup.property_management.MyApplication"
+        android:name="android.app.src.main.kotlin.com.hongyegroup.app24ifm.MyApplication"
         android:allowBackup="false"
         android:icon="@mipmap/ic_launcher"
         android:label="24IFM"
@@ -48,7 +48,7 @@
         android:usesCleartextTraffic="true">
 
         <activity
-            android:name="android.app.src.main.kotlin.com.hongyegroup.property_management.MainActivity"
+            android:name="android.app.src.main.kotlin.com.hongyegroup.app24ifm.MainActivity"
             android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
             android:exported="true"
             android:hardwareAccelerated="true"
@@ -128,7 +128,7 @@
     </queries>
 
     <!-- Android 11 使用相机适配  -->
-    <queries package="com.monstarlab.yyjobs">
+    <queries package="com.hongyegroup.app24ifm">
         <intent>
             <action android:name="android.media.action.IMAGE_CAPTURE">
 

+ 4 - 2
app/android/app/src/main/kotlin/com/hongyegroup/property_management/MainActivity.java

@@ -1,4 +1,4 @@
-package android.app.src.main.kotlin.com.hongyegroup.property_management;
+package android.app.src.main.kotlin.com.hongyegroup.app24ifm;
 
 import android.os.Bundle;
 import android.util.Log;
@@ -9,11 +9,12 @@ import androidx.annotation.Nullable;
 //import androidx.core.splashscreen.SplashScreen;
 
 import io.flutter.embedding.android.FlutterActivity;
+import io.flutter.embedding.android.FlutterFragmentActivity;
 import io.flutter.embedding.engine.FlutterEngine;
 import io.flutter.plugin.common.MethodChannel;
 import android.os.Build;
 
-public class MainActivity extends FlutterActivity {
+public class MainActivity extends FlutterFragmentActivity {
 
 //    private SplashScreen mSplashScreen;
     @Override
@@ -34,6 +35,7 @@ public class MainActivity extends FlutterActivity {
             //返回安卓版本
            if (call.method.equals("getAndroidSdkInt")) {
                result.success(Build.VERSION.SDK_INT);
+
             } else if (call.method.equals("getNativeRouterName")) {
                 // 获取当前需要跳转的子路由
                 Log.d("MainActivity", "执行 methodChannel -> getNativeRouterName");

+ 1 - 1
app/android/app/src/main/kotlin/com/hongyegroup/property_management/MyApplication.kt

@@ -1,4 +1,4 @@
-package android.app.src.main.kotlin.com.hongyegroup.property_management
+package android.app.src.main.kotlin.com.hongyegroup.app24ifm
 
 import android.content.Context
 import androidx.multidex.MultiDex

app/android/app/src/main/kotlin/com/hongyegroup/property_management/RouterActivity.java → app/android/app/src/main/kotlin/com/hongyegroup/app24ifm/RouterActivity.java


+ 2 - 2
app/android/app/src/main/res/values-night/styles.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
     <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
-    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
+    <style name="LaunchTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
         <!-- Show a splash screen on the activity. Automatically removed when
              Flutter draws its first frame -->
         <item name="android:windowBackground">@drawable/launch_background</item>
@@ -12,7 +12,7 @@
          running.
 
          This Theme is only used starting with V2 of Flutter's Android embedding. -->
-    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
+    <style name="NormalTheme" parent="Theme.MaterialComponents">
         <item name="android:windowBackground">?android:colorBackground</item>
     </style>
 

+ 2 - 2
app/android/app/src/main/res/values/styles.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
     <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
-    <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
+    <style name="LaunchTheme" parent="Theme.AppCompat.Light.NoActionBar">
         <!-- Show a splash screen on the activity. Automatically removed when
              Flutter draws its first frame -->
         <item name="android:windowBackground">@drawable/launch_background</item>
@@ -12,7 +12,7 @@
          running.
 
          This Theme is only used starting with V2 of Flutter's Android embedding. -->
-    <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
+    <style name="NormalTheme" parent="Theme.MaterialComponents">
         <item name="android:windowBackground">?android:colorBackground</item>
     </style>
 

+ 1 - 1
app/android/gradle/wrapper/gradle-wrapper.properties

@@ -1,6 +1,6 @@
 #Sun Jan 24 20:08:12 CST 2021
 distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
 distributionPath=wrapper/dists
 zipStorePath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME

+ 2 - 2
app/android/settings.gradle

@@ -23,8 +23,8 @@ pluginManagement {
 
 plugins {
     id "dev.flutter.flutter-plugin-loader" version "1.0.0"
-    id "com.android.application" version "7.1.2" apply false
-    id "org.jetbrains.kotlin.android" version "1.8.0" apply false
+    id "com.android.application" version "8.7.3" apply false
+    id "org.jetbrains.kotlin.android" version "1.9.0" apply false
 }
 
 include ":app"

+ 2 - 2
app/ios/Podfile

@@ -1,5 +1,5 @@
 # Uncomment this line to define a global platform for your project
-platform :ios, '12.0'
+platform :ios, '13.0'
 
 
 # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
@@ -35,7 +35,7 @@ target 'Runner' do
   flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
 end
 
-$iOSVersion = '12.0'
+$iOSVersion = '13.0'
 
 post_install do |installer|
   

+ 3 - 3
app/ios/Runner.xcodeproj/project.pbxproj

@@ -410,7 +410,7 @@
 				FLUTTER_BUILD_MODE = profile;
 				INFOPLIST_FILE = Runner/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = 24iFM;
-				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
@@ -551,7 +551,7 @@
 				FLUTTER_BUILD_MODE = debug;
 				INFOPLIST_FILE = Runner/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = 24iFM;
-				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",
@@ -584,7 +584,7 @@
 				FLUTTER_BUILD_MODE = release;
 				INFOPLIST_FILE = Runner/Info.plist;
 				INFOPLIST_KEY_CFBundleDisplayName = 24iFM;
-				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 13.0;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/Frameworks",

+ 15 - 15
app/lib/main.dart

@@ -13,10 +13,10 @@ import 'package:plugin_basic/constants/app_constant.dart';
 import 'package:plugin_basic/provider/app_config/app_config_service.dart';
 import 'package:plugin_basic/provider/global_provider_container.dart';
 import 'package:plugin_platform/engine/sp/sp_util.dart';
+import 'package:plugin_platform/platform_export.dart';
 import 'package:router/componentRouter/component_service_manager.dart';
 import 'package:cpt_profile/router/component/profile_service_provider.dart';
 import 'package:plugin_basic/obs/my_navigator_observer.dart';
-import 'package:shared/utils/device_utils.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/dialog/custom_toast_widget.dart';
 import 'package:widgets/dialog/custom_error_widget.dart';
@@ -118,20 +118,20 @@ class MyApp extends HookConsumerWidget {
     int? darkModel = SPUtil.getInt(AppConstant.storageDarkModel, defValue: 0);
     late SystemUiOverlayStyle systemUiOverlayStyle;
 
-      //根据SP存入的暗色模式,指定全局页面的状态栏,导航栏等设置
-      switch (darkModel) {
-        case 1:
-          Log.d("main.dart - 指定亮色模式");
-          systemUiOverlayStyle = ThemeConfig.systemUiOverlayStyleLightThemeBlack;
-          break;
-        case 2:
-          Log.d("main.dart - 指定暗色模式");
-          systemUiOverlayStyle = ThemeConfig.systemUiOverlayStyleDarkTheme;
-          break;
-        default:
-          systemUiOverlayStyle = ThemeConfig.getSystemUiOverlayStyleByTheme(context);
-          break;
-      }
+    //根据SP存入的暗色模式,指定全局页面的状态栏,导航栏等设置
+    switch (darkModel) {
+      case 1:
+        Log.d("main.dart - 指定亮色模式");
+        systemUiOverlayStyle = ThemeConfig.systemUiOverlayStyleLightThemeBlack;
+        break;
+      case 2:
+        Log.d("main.dart - 指定暗色模式");
+        systemUiOverlayStyle = ThemeConfig.systemUiOverlayStyleDarkTheme;
+        break;
+      default:
+        systemUiOverlayStyle = ThemeConfig.getSystemUiOverlayStyleByTheme(context);
+        break;
+    }
 
     SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
 

+ 0 - 3
packages/cpt_auth/lib/modules/tenant_doc/tenant_doc_view_model.dart

@@ -1,11 +1,8 @@
-import 'package:cs_resources/generated/l10n.dart';
 import 'package:domain/repository/profile_repository.dart';
 import 'package:plugin_basic/constants/app_constant.dart';
 import 'package:plugin_basic/provider/user_config/user_config_service.dart';
-import 'package:plugin_platform/engine/notify/notify_engine.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
-import 'package:router/componentRouter/component_service_manager.dart';
 import 'package:shared/utils/event_bus.dart';
 import 'package:shared/utils/log_utils.dart';
 

+ 1 - 1
packages/cpt_facility/lib/modules/book_confirm/book_confirm_page.dart

@@ -118,7 +118,7 @@ class BookConfirmPage extends HookConsumerWidget {
           ),
 
           // 显示支付信息
-          _paymentInfo(context, ref),
+          // _paymentInfo(context, ref),
 
           // 底部按钮
           MyButton(

+ 3 - 3
packages/cpt_facility/lib/modules/booking/facility_booking_page.dart

@@ -12,7 +12,6 @@ import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:shared/utils/date_time_utils.dart';
-import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/my_appbar.dart';
@@ -107,9 +106,10 @@ class FacilityBookingPage extends HookConsumerWidget {
             ],
           ),
 
-          //二周的日期选择
+          //二周的日期选择 (自定义控件)
           WeeklyCalendar(
             selectedDate: state.selectedDate,
+            maxDate: DateTime.now().add(Duration(days: state.bookAdvanceDays)),
             onChangedSelectedDate: (dateTime) {
               viewModel.changeSelectedDate(dateTime);
             },
@@ -175,7 +175,7 @@ class FacilityBookingPage extends HookConsumerWidget {
       builder: (BuildContext context) {
         return CustomCalendarBottomSheet(
           firstDate: DateTime.now(),
-          lastDate: DateTime.now().add(const Duration(days: 365)),
+          lastDate: DateTime.now().add(Duration(days: state.bookAdvanceDays)),
           selectedDate: state.selectedDate,
           locale: "en",
           onDateChange: (dateTime) {

+ 4 - 0
packages/cpt_facility/lib/modules/booking/facility_booking_state.dart

@@ -11,6 +11,7 @@ class FacilityBookingState {
 
   //网络请求数据
   FacilityBookEntity? data;
+  int bookAdvanceDays = 0; //最大可以提前多少天预定
 
   String? facilityId;
   String? facilityName;
@@ -24,6 +25,7 @@ class FacilityBookingState {
     required this.selectedDate,
     this.loadingState = LoadState.State_Loading,
     this.data,
+    this.bookAdvanceDays = 0,
     this.errorMessage,
     this.facilityId,
     this.facilityName,
@@ -40,6 +42,7 @@ class FacilityBookingState {
     FacilityBookEntity? data,
     int? index,
     int? innerIndex,
+    int? bookAdvanceDays,
   }) {
     return FacilityBookingState(
       selectedDate: selectedDate ?? this.selectedDate,
@@ -50,6 +53,7 @@ class FacilityBookingState {
       facilityName: facilityName ?? this.facilityName,
       index: index ?? this.index,
       innerIndex: innerIndex ?? this.innerIndex,
+      bookAdvanceDays: this.bookAdvanceDays > 0 ? this.bookAdvanceDays : bookAdvanceDays ?? this.bookAdvanceDays,
     );
   }
 }

+ 19 - 2
packages/cpt_facility/lib/modules/booking/facility_booking_view_model.dart

@@ -1,5 +1,6 @@
 import 'package:domain/entity/facility_book_entity.dart';
 import 'package:domain/repository/facility_repository.dart';
+import 'package:plugin_platform/engine/loading/loading_engine.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
@@ -63,7 +64,7 @@ class FacilityBookingViewModel extends _$FacilityBookingViewModel with DioCancel
     if (result.isSuccess) {
       if (result.data != null) {
         //有数据
-        state = state.copyWith(data: result.data, loadingState: LoadState.State_Success);
+        state = state.copyWith(data: result.data, bookAdvanceDays: result.data?.facilityType?.bookAdvanceDays ?? 0, loadingState: LoadState.State_Success);
       } else {
         //展示无数据的布局
         state = state.copyWith(data: null, loadingState: LoadState.State_Empty, errorMessage: null);
@@ -142,6 +143,9 @@ class FacilityBookingViewModel extends _$FacilityBookingViewModel with DioCancel
 
   //确认页面执行支付
   void doPayment() async {
+    //支付流程 Loading 开始
+    LoadingEngine.show();
+
     final result = await _facilityRepository.submitBooking(
       periodId: state.data?.facilities?[state.index].periods?[state.innerIndex].id,
       date: state.selectedDate,
@@ -150,7 +154,20 @@ class FacilityBookingViewModel extends _$FacilityBookingViewModel with DioCancel
 
     if (result.isSuccess) {
       final bookingId = result.data?.booking?.id;
-      FacilityDetailPage.startWithPop2Main(bookingId: bookingId);
+      String orderId = result.data?.order?.id ?? "";
+
+      Log.d("当前 Facility 生成的订单ID:$orderId");
+
+      //调用支付服务
+      bool success = await ComponentServiceManager().paymentService.executePayment(orderId: orderId);
+
+      //支付流程 Loading 结束
+      LoadingEngine.dismiss();
+
+      //如果成功,走下一步流程
+      if (success) {
+        FacilityDetailPage.startWithPop2Main(bookingId: bookingId);
+      }
     } else {
       ToastEngine.show(result.errorMsg ?? "UnKnow Error");
     }

+ 101 - 80
packages/cpt_facility/lib/modules/detail/facility_detail_page.dart

@@ -8,6 +8,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_button.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 import 'package:widgets/utils/dark_theme_util.dart';
@@ -55,74 +56,94 @@ class FacilityDetailPage extends HookConsumerWidget {
     return Scaffold(
       appBar: MyAppBar.appBar(context, state.detail?.facility?.type?.name ?? "", backgroundColor: context.appColors.backgroundWhite),
       backgroundColor: context.appColors.backgroundDark,
-      body: SingleChildScrollView(
-        scrollDirection: Axis.vertical,
-        physics: const BouncingScrollPhysics(),
-        child: Column(
-          mainAxisSize: MainAxisSize.max,
-          crossAxisAlignment: CrossAxisAlignment.center,
-          children: [
-            //顶部的信息展示
-            _buildHeaderWidget(context, ref),
+      body: Column(children: [
+        SingleChildScrollView(
+          scrollDirection: Axis.vertical,
+          physics: const BouncingScrollPhysics(),
+          child: Column(
+            mainAxisSize: MainAxisSize.max,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              //顶部的信息展示
+              state.detail?.order?.paymentStatus == 1 ? _buildHeaderWidget(context, ref) : const SizedBox.shrink(),
 
-            //预定
-            _buildDetailItem(
-              context,
-              ref,
-              S.current.book,
-              Assets.facilityConfirmDateIcon,
-              28.5,
-              29,
-              state.detail?.booking?.date ?? "",
-              null,
-              "${state.detail?.booking?.start ?? ""}-${state.detail?.booking?.end ?? ""}",
-              null,
-            ),
+              //预定
+              _buildDetailItem(
+                context,
+                ref,
+                S.current.book,
+                Assets.facilityConfirmDateIcon,
+                28.5,
+                29,
+                state.detail?.booking?.date ?? "",
+                null,
+                "${state.detail?.booking?.start ?? ""}-${state.detail?.booking?.end ?? ""}",
+                null,
+              ),
 
-            //设施
-            _buildDetailItem(
-              context,
-              ref,
-              S.current.facility,
-              Assets.facilityConfirmFacilityIcon,
-              25.0,
-              30.5,
-              state.detail?.facility?.type?.name ?? "",
-              null,
-              state.detail?.facility?.name ?? "",
-              null,
-            ),
+              //设施
+              _buildDetailItem(
+                context,
+                ref,
+                S.current.facility,
+                Assets.facilityConfirmFacilityIcon,
+                25.0,
+                30.5,
+                state.detail?.facility?.type?.name ?? "",
+                null,
+                state.detail?.facility?.name ?? "",
+                null,
+              ),
 
-            //付款
-            _buildDetailItem(
-              context,
-              ref,
-              S.current.payment,
-              Assets.facilityConfirmPaymentIcon,
-              27.0,
-              22.0,
-              S.current.booking_fee,
-              state.detail?.timePeriod?.price ?? "",
-              S.current.total,
-              "\$${state.detail?.timePeriod?.price ?? ""}",
-            ),
+              //付款
+              _buildDetailItem(
+                context,
+                ref,
+                S.current.payment,
+                Assets.facilityConfirmPaymentIcon,
+                27.0,
+                22.0,
+                S.current.booking_fee,
+                state.detail?.timePeriod?.price ?? "",
+                S.current.total,
+                "\$${state.detail?.timePeriod?.price ?? ""}",
+              ),
 
-            // 押金
-            _buildDetailItem(
-              context,
-              ref,
-              S.current.deposit,
-              Assets.facilityConfirmDepositIcon,
-              28.0,
-              26.5,
-              S.current.on_hold,
-              "\$${state.detail?.timePeriod?.deposit ?? ""}",
-              null,
-              null,
-            ),
-          ],
+              // 押金
+              _buildDetailItem(
+                context,
+                ref,
+                S.current.deposit,
+                Assets.facilityConfirmDepositIcon,
+                28.0,
+                26.5,
+                S.current.on_hold,
+                "\$${state.detail?.timePeriod?.deposit ?? ""}",
+                null,
+                null,
+              ),
+            ],
+          ),
+        ).expanded(),
+
+        // 底部按钮
+        Visibility(
+          visible: state.detail?.order?.paymentStatus != 1,
+          child: MyButton(
+            onPressed: () {
+              viewModel.doPaymentOrder(state.detail?.order?.id ?? "");
+            },
+            text: S.current.proceed_with_payment,
+            textColor: Colors.white,
+            backgroundColor: context.appColors.btnBgDefault,
+            fontWeight: FontWeight.w500,
+            type: ClickType.throttle,
+            fontSize: 16,
+            minHeight: 50,
+            radius: 0,
+          ).marginOnly(top: 15),
         ),
-      ),
+      ]),
     );
   }
 
@@ -173,23 +194,23 @@ class FacilityDetailPage extends HookConsumerWidget {
           ),
 
           //付款类型与时间
-          Row(
-            mainAxisSize: MainAxisSize.min,
-            children: [
-              MyTextView(
-                "Master card ending",
-                fontSize: 15,
-                isFontRegular: true,
-                textColor: context.appColors.textBlack,
-              ),
-              MyTextView(
-                "9423",
-                fontSize: 15,
-                isFontMedium: true,
-                textColor: context.appColors.textBlack,
-              ),
-            ],
-          ).marginOnly(top: 12),
+          // Row(
+          //   mainAxisSize: MainAxisSize.min,
+          //   children: [
+          //     MyTextView(
+          //       "Master card ending",
+          //       fontSize: 15,
+          //       isFontRegular: true,
+          //       textColor: context.appColors.textBlack,
+          //     ),
+          //     MyTextView(
+          //       "9423",
+          //       fontSize: 15,
+          //       isFontMedium: true,
+          //       textColor: context.appColors.textBlack,
+          //     ),
+          //   ],
+          // ).marginOnly(top: 12),
 
           Row(
             mainAxisSize: MainAxisSize.min,

+ 20 - 0
packages/cpt_facility/lib/modules/detail/facility_detail_view_model.dart

@@ -1,7 +1,10 @@
 import 'package:domain/repository/facility_repository.dart';
+import 'package:plugin_platform/engine/loading/loading_engine.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:router/componentRouter/component_service_manager.dart';
+import 'package:router/ext/auto_router_extensions.dart';
 
 import 'facility_detail_state.dart';
 
@@ -30,4 +33,21 @@ class FacilityDetailViewModel extends _$FacilityDetailViewModel with DioCancelab
     }
   }
 
+  //根据OrderId继续支付订单
+  void doPaymentOrder(String orderId) async {
+    //支付流程 Loading 开始
+    LoadingEngine.show();
+
+    //调用支付服务
+    bool success = await ComponentServiceManager().paymentService.executePayment(orderId: orderId);
+
+    //支付流程 Loading 结束
+    LoadingEngine.dismiss();
+
+    //如果成功,返回页面
+    if (success) {
+      appRouter.maybePop();
+    }
+  }
+
 }

+ 22 - 1
packages/cpt_facility/lib/modules/facility/active/facility_active_view_model.dart

@@ -1,7 +1,9 @@
 import 'package:domain/entity/facility_page_entity.dart';
 import 'package:domain/repository/facility_repository.dart';
+import 'package:plugin_basic/constants/app_constant.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/event_bus.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
@@ -26,7 +28,12 @@ class FacilityActiveViewModel extends _$FacilityActiveViewModel with DioCancelab
   FacilityActiveState build() {
     _facilityRepository = ref.read(facilityRepositoryProvider);
     final state = FacilityActiveState(datas: []);
-    registerCancellation();
+
+    registerEventBus();
+    registerCancellation(callback: () {
+      unregisterEventBus();
+    });
+
     return state;
   }
 
@@ -105,4 +112,18 @@ class FacilityActiveViewModel extends _$FacilityActiveViewModel with DioCancelab
       }
     }
   }
+
+  // EventBus 的事件接收
+  Subscription? subscribe;
+
+  void registerEventBus() {
+    subscribe = bus.on(AppConstant.eventStripePaymentSuccess, (arg) {
+      //用户支付成功的通知
+      refreshController.callRefresh();
+    });
+  }
+
+  void unregisterEventBus() {
+    bus.off(AppConstant.eventStripePaymentSuccess, subscribe);
+  }
 }

+ 22 - 8
packages/cpt_facility/lib/modules/facility/active/item_facility_active.dart

@@ -119,15 +119,29 @@ class FacilityActiveItem extends StatelessWidget {
             children: [
               //查看按钮
               MyTextView(
-                S.current.view,
-                textColor: Colors.white,
-                backgroundColor: context.appColors.btnBgDefault,
-                cornerRadius: 7,
-                paddingTop: 9,
-                paddingBottom: 9,
+                item.order?.refundStatus != 0
+                    ? S.current.refunded
+                    : item.order?.paymentStatus == 1
+                    ? S.current.paid
+                    : S.current.unpaid,
+                textColor: item.order?.refundStatus != 0
+                    ? context.appColors.textDisEnableGray
+                    : item.order?.paymentStatus == 1
+                    ? context.appColors.textPrimary
+                    : context.appColors.deleteRed,
+                cornerRadius: 3,
+                borderWidth: 0.5,
+                borderColor: item.order?.refundStatus != 0
+                    ? context.appColors.textDisEnableGray
+                    : item.order?.paymentStatus == 1
+                    ? context.appColors.textPrimary
+                    : context.appColors.deleteRed,
+                paddingTop: 3,
+                paddingBottom: 3,
+                paddingLeft: 15,
+                paddingRight: 15,
                 textAlign: TextAlign.center,
-                boxWidth: 60,
-              )
+              ),
             ],
           )
         ],

+ 2 - 3
packages/cpt_facility/lib/modules/facility/deposit/item_facility_deposit.dart

@@ -3,7 +3,6 @@ import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:domain/entity/facility_page_entity.dart';
 import 'package:flutter/material.dart';
 import 'package:widgets/ext/ex_widget.dart';
-import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 
 ///  设施的Deposit的Item
@@ -42,7 +41,7 @@ class FacilityDepositItem extends StatelessWidget {
               ),
               const Spacer(),
               MyTextView(
-                "\$${item.booking?.depositPaid??""}",
+                "\$${item.booking?.deposit ?? ""}",
                 fontSize: 14.5,
                 textColor: context.appColors.textBlack,
                 isFontMedium: true,
@@ -50,7 +49,7 @@ class FacilityDepositItem extends StatelessWidget {
             ],
           ).marginOnly(top: 10),
         ],
-      ).expanded(),
+      ),
     );
   }
 }

+ 21 - 20
packages/cpt_facility/lib/modules/facility/history/item_facility_history.dart

@@ -117,29 +117,30 @@ class FacilityHistoryItem extends StatelessWidget {
             mainAxisAlignment:MainAxisAlignment.start,
             crossAxisAlignment: CrossAxisAlignment.start,
             children: [
-              //查看按钮
               MyTextView(
-                S.current.view,
-                textColor: Colors.white,
-                backgroundColor: context.appColors.btnBgDefault,
-                cornerRadius: 7,
-                paddingTop: 9,
-                paddingBottom: 9,
+                item.order?.refundStatus != 0
+                    ? S.current.refunded
+                    : item.order?.paymentStatus == 1
+                    ? S.current.paid
+                    : S.current.unpaid,
+                textColor: item.order?.refundStatus != 0
+                    ? context.appColors.textDisEnableGray
+                    : item.order?.paymentStatus == 1
+                    ? context.appColors.textPrimary
+                    : context.appColors.deleteRed,
+                cornerRadius: 3,
+                borderWidth: 0.5,
+                borderColor: item.order?.refundStatus != 0
+                    ? context.appColors.textDisEnableGray
+                    : item.order?.paymentStatus == 1
+                    ? context.appColors.textPrimary
+                    : context.appColors.deleteRed,
+                paddingTop: 3,
+                paddingBottom: 3,
+                paddingLeft: 15,
+                paddingRight: 15,
                 textAlign: TextAlign.center,
-                boxWidth: 60,
               ),
-
-              // MyTextView(
-              //   S.current.delete,
-              //   textColor: Colors.white,
-              //   backgroundColor: context.appColors.orangeBG,
-              //   cornerRadius: 7,
-              //   paddingTop: 9,
-              //   marginTop: 15,
-              //   paddingBottom: 9,
-              //   textAlign: TextAlign.center,
-              //   boxWidth: 60,
-              // )
             ],
           )
         ],

+ 30 - 19
packages/cpt_form/lib/modules/apply/form_payment_page.dart

@@ -19,6 +19,7 @@ import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_button.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 import '../../router/page/form_page_router.dart';
 import 'vm/apply_view_model.dart';
@@ -79,7 +80,12 @@ class FormPaymentPage extends HookConsumerWidget {
                           visible: state.formItem != null && state.formItem!.price > 0,
                           child: Row(
                             children: [
-                              const MyAssetImage(Assets.paymentInfoDetails, width: 27, height: 27),
+                              MyAssetImage(
+                                Assets.paymentInfoDetails,
+                                width: 27,
+                                height: 27,
+                                color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                              ),
                               MyTextView(
                                 S.current.payment,
                                 textColor: context.appColors.textBlack,
@@ -135,7 +141,12 @@ class FormPaymentPage extends HookConsumerWidget {
                           visible: state.formItem != null && state.formItem!.deposit > 0,
                           child: Row(
                             children: [
-                              const MyAssetImage(Assets.paymentInfoDetails, width: 27, height: 27),
+                              MyAssetImage(
+                                Assets.paymentInfoDetails,
+                                width: 27,
+                                height: 27,
+                                color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
+                              ),
                               MyTextView(
                                 S.current.deposit,
                                 textColor: context.appColors.textBlack,
@@ -186,21 +197,21 @@ class FormPaymentPage extends HookConsumerWidget {
                         ),
 
                         //银行卡
-                        Row(
-                          children: [
-                            const MyAssetImage(Assets.paymentCardIcon, width: 27, height: 27),
-                            MyTextView(
-                              S.current.card,
-                              textColor: context.appColors.textBlack,
-                              fontSize: 17,
-                              marginLeft: 14,
-                              isFontMedium: true,
-                            ).expanded(),
-                          ],
-                        ).marginOnly(top: 14, left: 15, right: 15, bottom: 14),
-
-                        //选择支付卡
-                        _paymentInfo(context, ref),
+                        // Row(
+                        //   children: [
+                        //     const MyAssetImage(Assets.paymentCardIcon, width: 27, height: 27),
+                        //     MyTextView(
+                        //       S.current.card,
+                        //       textColor: context.appColors.textBlack,
+                        //       fontSize: 17,
+                        //       marginLeft: 14,
+                        //       isFontMedium: true,
+                        //     ).expanded(),
+                        //   ],
+                        // ).marginOnly(top: 14, left: 15, right: 15, bottom: 14),
+                        //
+                        // //选择支付卡
+                        // _paymentInfo(context, ref),
 
                         //签名
                         MyTextView(
@@ -300,7 +311,7 @@ class FormPaymentPage extends HookConsumerWidget {
 
                 //底部按钮
                 MyButton(
-                  onPressed: () async{
+                  onPressed: () async {
                     final isFilled = handSignatureControl.isFilled;
                     if (!isFilled) {
                       ToastEngine.show("Please sign first");
@@ -322,7 +333,7 @@ class FormPaymentPage extends HookConsumerWidget {
 
                     viewModel.submitForm();
                   },
-                  text: S.current.next,
+                  text: S.current.payment,
                   textColor: Colors.white,
                   backgroundColor: context.appColors.btnBgDefault,
                   fontWeight: FontWeight.w500,

+ 31 - 21
packages/cpt_form/lib/modules/apply/vm/apply_view_model.dart

@@ -5,11 +5,14 @@ import 'package:domain/entity/form_content_entity.dart';
 import 'package:domain/entity/form_list_entity.dart';
 import 'package:domain/repository/form_repository.dart';
 import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/engine/loading/loading_engine.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:plugin_platform/engine/notify/notify_engine.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:plugin_platform/platform_export.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:router/componentRouter/component_service_manager.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/picker/date_picker_util.dart';
 import '../../form/form_page.dart';
@@ -154,26 +157,33 @@ class ApplyViewModel extends _$ApplyViewModel with DioCancelableMixin {
 
   /// 提交Form表单
   void submitForm() async {
-    //   final result = await _formRepository.submitForm(
-    //     estateFormId: state.estateFormId,
-    //     typeId: state.formType,
-    //     content: state.formContentDetail,
-    //     cancelToken: cancelToken,
-    //   );
-    //
-    //   if (result.isSuccess) {
-    //     NotifyEngine.showSuccess(S.current.successful);
-    //     gotoNextPage();
-    //   } else {
-    //     ToastEngine.show(result.errorMsg ?? "UnKnow Error");
-    //   }
-    // }
-
-    //TODO 测试Stripe支付
-    // Stripe.instance.initPaymentSheet(paymentSheetParameters: paymentSheetParameters)
-    // PaymentIntent pi = await Stripe.instance.confirmPayment(
-    //   paymentIntentClientSecret: 'pi_3RNlYBRpg7SPAcNn1CwGxP7e',
-    // );
-    // Log.d("测试Stripe支付 pi:$pi");
+    //支付流程 Loading 开始
+    LoadingEngine.show();
+
+    //调用接口生成订单
+    final result = await _formRepository.submitForm(
+      estateFormId: state.estateFormId,
+      typeId: state.formType,
+      content: state.formContentDetail,
+      cancelToken: cancelToken,
+    );
+
+    if (result.isSuccess) {
+      String orderId = result.data?.order?.id ?? "";
+      Log.d("当前Form生成的订单ID:$orderId");
+
+      //调用支付服务
+      bool success = await ComponentServiceManager().paymentService.executePayment(orderId: orderId);
+
+      //支付流程 Loading 结束
+      LoadingEngine.dismiss();
+
+      //如果成功,走下一步流程
+      if (success){
+        gotoNextPage();
+      }
+    } else {
+      ToastEngine.show(result.errorMsg ?? "UnKnow Error");
+    }
   }
 }

+ 61 - 26
packages/cpt_form/lib/modules/detail/detail_processing_fragment.dart

@@ -19,6 +19,7 @@ class DetailProcessingFragment extends HookConsumerWidget {
   @override
   Widget build(BuildContext context, WidgetRef ref) {
     final state = ref.watch(formDetailViewModelProvider);
+    final viewModel = ref.read(formDetailViewModelProvider.notifier);
 
     return SizedBox(
       width: double.infinity,
@@ -37,9 +38,17 @@ class DetailProcessingFragment extends HookConsumerWidget {
                 children: [
                   //状态
                   MyTextView(
-                    S.current.processing,
+                    state.forDetail?.order?.refundStatus != 0
+                        ? S.current.refunded //已退款
+                        : state.forDetail?.order?.paymentStatus != 1
+                            ? S.current.unpaid //未支付
+                            : S.current.processing,
                     marginTop: 17,
-                    textColor: context.appColors.textPrimary,
+                    textColor: state.forDetail?.order?.refundStatus != 0
+                        ? context.appColors.textDisEnableGray //已退款
+                        : state.forDetail?.order?.paymentStatus != 1
+                            ? context.appColors.deleteRed //未支付
+                            : context.appColors.textPrimary,
                     fontSize: 24,
                     isFontMedium: true,
                   ),
@@ -51,6 +60,18 @@ class DetailProcessingFragment extends HookConsumerWidget {
                     isFontRegular: true,
                   ),
 
+                  //退款的金额和待支付的金额展示
+                  Visibility(
+                    visible: state.forDetail?.order?.refundStatus != 0 || state.forDetail?.order?.paymentStatus != 1,
+                    child: MyTextView(
+                      "\$${state.forDetail?.order?.totalAmount ?? "-"}",
+                      marginTop: 15,
+                      textColor: context.appColors.textPrimary,
+                      fontSize: 24,
+                      isFontMedium: true,
+                    ),
+                  ),
+
                   //Send On时间
                   RichText(
                     text: TextSpan(
@@ -68,25 +89,31 @@ class DetailProcessingFragment extends HookConsumerWidget {
                   ).marginOnly(top: 12, bottom: 28),
 
                   //图片
-                  const MyAssetImage(
-                    Assets.formDetailProcessingImg,
-                    width: 40,
-                    height: 51.5,
-                  ),
+                  Visibility(
+                      visible: state.forDetail?.order?.refundStatus == 0 && state.forDetail?.order?.paymentStatus == 1,
+                      child: 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,
+                  Visibility(
+                    visible: state.forDetail?.order?.refundStatus == 0 && state.forDetail?.order?.paymentStatus == 1,
+                    child: 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,
@@ -120,6 +147,7 @@ class DetailProcessingFragment extends HookConsumerWidget {
               ),
             ),
           ).expanded(),
+
           Row(
             children: [
               MyButton(
@@ -153,15 +181,22 @@ class DetailProcessingFragment extends HookConsumerWidget {
               ).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),
+
+          Visibility(
+            visible: state.forDetail?.order?.refundStatus != 0 || state.forDetail?.order?.paymentStatus != 1,
+            child: MyButton(
+              onPressed: () {
+                viewModel.doPaymentOrder(state.forDetail?.order?.id??"");
+              },
+              text: S.current.payment,
+              textColor: Colors.white,
+              fontSize: 15,
+              fontWeight: FontWeight.w400,
+              radius: 7,
+              backgroundColor: context.appColors.orangeBG,
+            ).marginOnly(top: 6, left: 15, right: 15),
+          ),
+          const SizedBox(height: 17.5),
         ],
       ),
     );

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

@@ -1,6 +1,9 @@
 import 'package:domain/repository/form_repository.dart';
+import 'package:plugin_platform/engine/loading/loading_engine.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:router/componentRouter/component_service_manager.dart';
+import 'package:router/ext/auto_router_extensions.dart';
 import 'package:widgets/load_state_layout.dart';
 
 import 'form_detail_state.dart';
@@ -41,4 +44,21 @@ class FormDetailViewModel extends _$FormDetailViewModel with DioCancelableMixin
       state = state.copyWith(loadingState: LoadState.State_Error, errorMessage: result.errorMsg);
     }
   }
+
+  //根据OrderId继续支付订单
+  void doPaymentOrder(String orderId) async {
+    //支付流程 Loading 开始
+    LoadingEngine.show();
+
+    //调用支付服务
+    bool success = await ComponentServiceManager().paymentService.executePayment(orderId: orderId);
+
+    //支付流程 Loading 结束
+    LoadingEngine.dismiss();
+
+    //如果成功,返回页面
+    if (success) {
+      appRouter.maybePop();
+    }
+  }
 }

+ 21 - 8
packages/cpt_form/lib/modules/form/approve/item_form_approve.dart

@@ -63,16 +63,29 @@ class FormApproveItem extends StatelessWidget {
                 ],
               ).marginOnly(left: 11, right: 11).expanded(),
 
-              //查看按钮
               MyTextView(
-                S.current.view,
-                textColor: Colors.white,
-                backgroundColor: context.appColors.btnBgDefault,
-                cornerRadius: 7,
-                paddingTop: 9,
-                paddingBottom: 9,
+                item.order?.refundStatus != 0
+                    ? S.current.refunded
+                    : item.order?.paymentStatus == 1
+                    ? S.current.paid
+                    : S.current.unpaid,
+                textColor: item.order?.refundStatus != 0
+                    ? context.appColors.textDisEnableGray
+                    : item.order?.paymentStatus == 1
+                    ? context.appColors.textPrimary
+                    : context.appColors.deleteRed,
+                cornerRadius: 3,
+                borderWidth: 0.5,
+                borderColor: item.order?.refundStatus != 0
+                    ? context.appColors.textDisEnableGray
+                    : item.order?.paymentStatus == 1
+                    ? context.appColors.textPrimary
+                    : context.appColors.deleteRed,
+                paddingTop: 3,
+                paddingBottom: 3,
+                paddingLeft: 15,
+                paddingRight: 15,
                 textAlign: TextAlign.center,
-                boxWidth: 60,
               ),
             ],
           ),

+ 11 - 8
packages/cpt_form/lib/modules/form/form_page.dart

@@ -53,7 +53,6 @@ class FormPage extends HookConsumerWidget {
                 color: context.appColors.whiteBG,
                 height: 120,
                 child: Row(
-                  mainAxisAlignment: MainAxisAlignment.spaceAround,
                   children: [
                     _buildCategory(
                       context,
@@ -62,11 +61,12 @@ class FormPage extends HookConsumerWidget {
                       44,
                       S.current.apply,
                       tabsRouter.activeIndex == 0,
+                      14.0,
                     ).onTap(
                       () {
                         tabsRouter.setActiveIndex(0);
                       },
-                    ),
+                    ).expanded(),
                     _buildCategory(
                       context,
                       Assets.formSubmitIcon,
@@ -74,11 +74,12 @@ class FormPage extends HookConsumerWidget {
                       39,
                       S.current.form_submit_title,
                       tabsRouter.activeIndex == 1,
+                      14.0,
                     ).onTap(
                       () {
                         tabsRouter.setActiveIndex(1);
                       },
-                    ),
+                    ).expanded(),
                     _buildCategory(
                       context,
                       Assets.formApprovedIcon,
@@ -86,11 +87,12 @@ class FormPage extends HookConsumerWidget {
                       39,
                       S.current.approved,
                       tabsRouter.activeIndex == 2,
+                      14.0,
                     ).onTap(
                       () {
                         tabsRouter.setActiveIndex(2);
                       },
-                    ),
+                    ).expanded(),
                     _buildCategory(
                       context,
                       Assets.formNotApprovedIcon,
@@ -98,13 +100,14 @@ class FormPage extends HookConsumerWidget {
                       39.5,
                       S.current.not_approved,
                       tabsRouter.activeIndex == 3,
+                      13.0,
                     ).onTap(
                       () {
                         tabsRouter.setActiveIndex(3);
                       },
-                    ),
+                    ).expanded(),
                   ],
-                ),
+                ).paddingOnly(left: 5, right: 5),
               ),
               Expanded(
                 child: child,
@@ -117,7 +120,7 @@ class FormPage extends HookConsumerWidget {
   }
 
   //顶部的Tab布局
-  Widget _buildCategory(BuildContext context, String iconPath, double iconWidth, double iconHeight, String title, bool isSelected) {
+  Widget _buildCategory(BuildContext context, String iconPath, double iconWidth, double iconHeight, String title, bool isSelected, double testSize) {
     return Column(
       mainAxisAlignment: MainAxisAlignment.center,
       crossAxisAlignment: CrossAxisAlignment.center,
@@ -146,7 +149,7 @@ class FormPage extends HookConsumerWidget {
         const SizedBox(height: 7),
         MyTextView(
           title,
-          fontSize: 15,
+          fontSize: testSize,
           isFontMedium: true,
           textColor: isSelected ? context.appColors.tabTextSelectedDefault : context.appColors.tabTextUnSelectedDefault,
         ),

+ 21 - 8
packages/cpt_form/lib/modules/form/not_approve/item_form_not_approve.dart

@@ -64,16 +64,29 @@ class FormNotApproveItem extends StatelessWidget {
                 ],
               ).marginOnly(left: 11, right: 11).expanded(),
 
-              //查看按钮
               MyTextView(
-                S.current.view,
-                textColor: Colors.white,
-                backgroundColor: context.appColors.btnBgDefault,
-                cornerRadius: 7,
-                paddingTop: 9,
-                paddingBottom: 9,
+                item.order?.refundStatus != 0
+                    ? S.current.refunded
+                    : item.order?.paymentStatus == 1
+                    ? S.current.paid
+                    : S.current.unpaid,
+                textColor: item.order?.refundStatus != 0
+                    ? context.appColors.textDisEnableGray
+                    : item.order?.paymentStatus == 1
+                    ? context.appColors.textPrimary
+                    : context.appColors.deleteRed,
+                cornerRadius: 3,
+                borderWidth: 0.5,
+                borderColor: item.order?.refundStatus != 0
+                    ? context.appColors.textDisEnableGray
+                    : item.order?.paymentStatus == 1
+                    ? context.appColors.textPrimary
+                    : context.appColors.deleteRed,
+                paddingTop: 3,
+                paddingBottom: 3,
+                paddingLeft: 15,
+                paddingRight: 15,
                 textAlign: TextAlign.center,
-                boxWidth: 60,
               ),
             ],
           ),

+ 23 - 2
packages/cpt_form/lib/modules/form/submit/form_submit_view_model.dart

@@ -1,11 +1,12 @@
 import 'package:domain/entity/form_submitted_entity.dart';
 import 'package:domain/repository/form_repository.dart';
+import 'package:plugin_basic/constants/app_constant.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
-
+import 'package:shared/utils/event_bus.dart';
 import 'form_submit_state.dart';
 
 part 'form_submit_view_model.g.dart';
@@ -26,7 +27,12 @@ class FormSubmitViewModel extends _$FormSubmitViewModel with DioCancelableMixin{
   FormSubmitState build() {
     _formRepository = ref.read(formRepositoryProvider);
     final state = FormSubmitState(datas: []);
-    registerCancellation();
+
+    registerEventBus();
+    registerCancellation(callback: () {
+      unregisterEventBus();
+    });
+
     return state;
   }
 
@@ -105,4 +111,19 @@ class FormSubmitViewModel extends _$FormSubmitViewModel with DioCancelableMixin{
       }
     }
   }
+
+  // EventBus 的事件接收
+  Subscription? subscribe;
+
+  void registerEventBus() {
+    subscribe = bus.on(AppConstant.eventStripePaymentSuccess, (arg) {
+      //用户支付成功的通知
+      refreshController.callRefresh();
+    });
+  }
+
+  void unregisterEventBus() {
+    bus.off(AppConstant.eventStripePaymentSuccess, subscribe);
+  }
+
 }

+ 21 - 8
packages/cpt_form/lib/modules/form/submit/item_form_submit.dart

@@ -63,16 +63,29 @@ class FormSubmitItem extends StatelessWidget {
                 ],
               ).marginOnly(left: 11, right: 11).expanded(),
 
-              //查看按钮
               MyTextView(
-                S.current.view,
-                textColor: Colors.white,
-                backgroundColor: context.appColors.btnBgDefault,
-                cornerRadius: 7,
-                paddingTop: 9,
-                paddingBottom: 9,
+                item.order?.refundStatus != 0
+                    ? S.current.refunded
+                    : item.order?.paymentStatus == 1
+                        ? S.current.paid
+                        : S.current.unpaid,
+                textColor: item.order?.refundStatus != 0
+                    ? context.appColors.textDisEnableGray
+                    : item.order?.paymentStatus == 1
+                        ? context.appColors.textPrimary
+                        : context.appColors.deleteRed,
+                cornerRadius: 3,
+                borderWidth: 0.5,
+                borderColor: item.order?.refundStatus != 0
+                    ? context.appColors.textDisEnableGray
+                    : item.order?.paymentStatus == 1
+                        ? context.appColors.textPrimary
+                        : context.appColors.deleteRed,
+                paddingTop: 3,
+                paddingBottom: 3,
+                paddingLeft: 15,
+                paddingRight: 15,
                 textAlign: TextAlign.center,
-                boxWidth: 60,
               ),
             ],
           ),

+ 13 - 2
packages/cpt_main/lib/modules/home/home_page.dart

@@ -18,6 +18,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_appbar.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 import 'package:widgets/widget_export.dart';
 
 import 'item_home_category.dart';
@@ -235,7 +236,12 @@ class HomePage extends HookConsumerWidget {
                 fontSize: 14,
                 isFontRegular: true,
               ).paddingOnly(left: 8, right: 8).expanded(),
-              const MyAssetImage(Assets.mainHomeMoreIcon, width: 6, height: 8.5).marginOnly(right: 15),
+              MyAssetImage(
+                Assets.mainHomeMoreIcon,
+                width: 6,
+                height: 8.5,
+                color: context.appColors.textBlack,
+              ).marginOnly(right: 15),
             ],
           )
               .constrained(height: 46)
@@ -267,7 +273,12 @@ class HomePage extends HookConsumerWidget {
                 fontSize: 14,
                 isFontBold: true,
               ).paddingOnly(left: 1, right: 4),
-              const MyAssetImage(Assets.mainHomeMoreIcon, width: 6, height: 8.5).marginOnly(right: 8),
+              MyAssetImage(
+                Assets.mainHomeMoreIcon,
+                width: 6,
+                height: 8.5,
+                color: context.appColors.textBlack,
+              ).marginOnly(right: 8),
             ],
           )
               .constrained(height: 46)

+ 6 - 1
packages/cpt_main/lib/modules/notification/item_notification.dart

@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 
 class NotificationItem extends StatelessWidget {
   final String item;
@@ -24,7 +25,11 @@ class NotificationItem extends StatelessWidget {
         children: [
           Row(
             children: [
-              const MyAssetImage(Assets.mainNotificationItemIcon, width: 42.5, height: 42.5).marginOnly(right: 16),
+            const  MyAssetImage(
+                Assets.mainNotificationItemIcon,
+                width: 42.5,
+                height: 42.5,
+              ).marginOnly(right: 16),
               Column(
                 children: [
                   //标题

+ 28 - 4
packages/cpt_notice_board/lib/modules/documents/page/documents_page.dart

@@ -5,15 +5,16 @@ 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:plugin_basic/basic_export.dart';
 import 'package:plugin_basic/modules/global_web_page.dart';
+import 'package:plugin_platform/engine/image/image_preview.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:router/ext/auto_router_extensions.dart';
 import 'package:shared/utils/log_utils.dart';
-import 'package:shared/utils/color_utils.dart';
+import 'package:shared/utils/file_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/load_state_layout.dart';
-import 'package:widgets/my_load_image.dart';
 import 'package:widgets/widget_export.dart';
-import 'package:cs_resources/generated/assets.dart';
 
 import '../../../router/page/notice_board_page_router.dart';
 import '../../documents_list/page/documents_list_page.dart';
@@ -121,13 +122,36 @@ class DocumentsPage extends HookConsumerWidget {
         // 去详情
         if (url != '') {
           // _vm.launchURL(url);
-          GlobalWebPage.startInstance(context: context, title: item['name'], url: url);
+          _previewFile(context, item['name'], url);
         }
         // DocumentsListPage.startInstance(context: context);
       }),
     ).marginOnly(left: 15, bottom: 15, right: 15);
   }
 
+  //预览Url
+  void _previewFile(BuildContext context, String title, String url) async {
+    final fileType = FileUtils.getFileType(url);
+
+    switch (fileType) {
+      case FileType.image:
+        ImagePreviewEngine.singleImagePreview(context, url);
+        break;
+      case FileType.document:
+        GlobalWebPage.startInstance(context: context, title: title, url: "https://docs.google.com/gview?embedded=true&url=$url");
+        break;
+      case FileType.unknown:
+      default:
+        // 处理未知类型,比如直接打开链接
+        if (await canLaunchUrl(Uri.parse(url))) {
+          await launchUrl(Uri.parse(url));
+        } else {
+          ToastEngine.show("Could not launch $url");
+        }
+        break;
+    }
+  }
+
   // list
   Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
     final state = ref.watch(documentsVmProvider);

+ 46 - 20
packages/cpt_notice_board/lib/modules/documents_list/page/documents_list_page.dart

@@ -5,8 +5,12 @@ 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:plugin_basic/basic_export.dart';
 import 'package:plugin_basic/modules/global_web_page.dart';
+import 'package:plugin_platform/engine/image/image_preview.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:router/ext/auto_router_extensions.dart';
+import 'package:shared/utils/file_utils.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:shared/utils/color_utils.dart';
 import 'package:widgets/ext/ex_widget.dart';
@@ -22,8 +26,8 @@ import '../vm/documents_list_vm.dart';
 @RoutePage()
 class DocumentsListPage extends HookConsumerWidget {
   final int? id;
-  const DocumentsListPage({Key? key, @PathParam('id') required this.id})
-      : super(key: key);
+
+  const DocumentsListPage({Key? key, @PathParam('id') required this.id}) : super(key: key);
 
   //启动当前页面
   static void startInstance({
@@ -44,29 +48,27 @@ class DocumentsListPage extends HookConsumerWidget {
         item['name'],
         maxLines: 2, // 设置最大行数为2
         overflow: TextOverflow.ellipsis, // 超出部分用省略号表示
-        style:  TextStyle(
-            fontSize: 16.0,
-            color: context.appColors.textBlack,
-            fontWeight: FontWeight.w700), // 设置字体大小
+        style: TextStyle(fontSize: 16.0, color: context.appColors.textBlack, fontWeight: FontWeight.w700), // 设置字体大小
       ),
     ).marginOnly(right: 17.5);
   }
 
-  Widget _buildItemRightSection(
-      BuildContext context, WidgetRef ref, item, _vm) {
+  Widget _buildItemRightSection(BuildContext context, WidgetRef ref, item, _vm) {
     return Container(
       color: Colors.white,
       child: TextButton(
         onPressed: () {},
         style: TextButton.styleFrom(
           foregroundColor: context.appColors.textBlack,
-          backgroundColor: context.appColors.tabBgSelectedPrimary, // 背景颜色
-          minimumSize: const Size(91.5, 30), // 最小宽度和高度
-          padding:
-              const EdgeInsets.symmetric(horizontal: 11.0, vertical: 9), // 内边距
+          backgroundColor: context.appColors.tabBgSelectedPrimary,
+          // 背景颜色
+          minimumSize: const Size(91.5, 30),
+          // 最小宽度和高度
+          padding: const EdgeInsets.symmetric(horizontal: 11.0, vertical: 9),
+          // 内边距
           shape: RoundedRectangleBorder(
             borderRadius: BorderRadius.circular(5), // 圆角
-            side: BorderSide(
+            side: const BorderSide(
               color: AppColorsTheme.colorPrimary,
               width: 1.0,
             ), // 边框
@@ -74,7 +76,7 @@ class DocumentsListPage extends HookConsumerWidget {
         ),
         child: Text(
           S.current.open_folder,
-          style:  TextStyle(
+          style: TextStyle(
             color: context.appColors.textWhite,
           ),
         ),
@@ -82,15 +84,17 @@ class DocumentsListPage extends HookConsumerWidget {
     );
   }
 
-  // listitem
+  // list item
   Widget _buildSaleItem(BuildContext context, WidgetRef ref, item, _vm) {
     String url = item['url'];
     return Container(
-      decoration:  BoxDecoration(
+      decoration: BoxDecoration(
         color: context.appColors.whiteBG,
         borderRadius: const BorderRadius.all(Radius.circular(6.0)),
         boxShadow: [
-          BoxShadow( color: context.appColors.itemBGShadow,)
+          BoxShadow(
+            color: context.appColors.itemBGShadow,
+          )
         ],
       ),
       child: Row(
@@ -120,12 +124,34 @@ class DocumentsListPage extends HookConsumerWidget {
       ).onTap(() {
         // 去详情
         // _vm.launchURL(url);
-        GlobalWebPage.startInstance(
-            context: context, title: item['name'], url: url);
+        _previewFile(context, item['name'], url);
       }),
     ).marginOnly(left: 15, bottom: 15, right: 15);
   }
 
+  //预览Url
+  void _previewFile(BuildContext context, String title, String url) async {
+    final fileType = FileUtils.getFileType(url);
+
+    switch (fileType) {
+      case FileType.image:
+        ImagePreviewEngine.singleImagePreview(context, url);
+        break;
+      case FileType.document:
+        GlobalWebPage.startInstance(context: context, title: title, url: "https://docs.google.com/gview?embedded=true&url=$url");
+        break;
+      case FileType.unknown:
+      default:
+        // 处理未知类型,比如直接打开链接
+        if (await canLaunchUrl(Uri.parse(url))) {
+          await launchUrl(Uri.parse(url));
+        } else {
+          ToastEngine.show("Could not launch $url");
+        }
+        break;
+    }
+  }
+
   // list
   Widget _buildSaleList(BuildContext context, WidgetRef ref, _vm) {
     final state = ref.watch(documentsListVmProvider);
@@ -144,7 +170,7 @@ class DocumentsListPage extends HookConsumerWidget {
       Future.microtask(() => vm.initPageData(id: id));
       return () {
         // 组件卸载时执行
-        Log.d("property_news_page 组件卸载时执行");
+        Log.d("DocumentsListPage 组件卸载时执行");
       };
     }, []);
     return Scaffold(

+ 1 - 1
packages/cpt_payment/lib/modules/choose_card/choose_card_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'choose_card_view_model.dart';
 // **************************************************************************
 
 String _$chooseCardViewModelHash() =>
-    r'695dfc67ae41a495d3df9ee35782c4dc4e881154';
+    r'91730dc6c7e7eff35f79d336db212d6001acfbfc';
 
 /// See also [ChooseCardViewModel].
 @ProviderFor(ChooseCardViewModel)

+ 2 - 0
packages/cpt_payment/lib/modules/payment/manage/item_manage.dart

@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
+import 'package:widgets/utils/dark_theme_util.dart';
 
 ///  Condo的Manage的Item
 class ManageItem extends StatelessWidget {
@@ -32,6 +33,7 @@ class ManageItem extends StatelessWidget {
           //选中
           MyAssetImage(
             item ? Assets.baseServiceRadioChecked : Assets.baseServiceRadioUncheck,
+            color: DarkThemeUtil.multiColors(context, AppColorsTheme.colorPrimary, darkColor: Colors.white),
             width: 25,
             height: 25,
           ),

+ 1 - 1
packages/cpt_payment/lib/modules/payment/manage/manage_view_model.g.dart

@@ -6,7 +6,7 @@ part of 'manage_view_model.dart';
 // RiverpodGenerator
 // **************************************************************************
 
-String _$manageViewModelHash() => r'f4c5c44517f9bd9640d429bf8f95209aae685b8a';
+String _$manageViewModelHash() => r'b09fe6224f9fcff8d9fad1722f538895f55747e6';
 
 /// See also [ManageViewModel].
 @ProviderFor(ManageViewModel)

+ 1 - 1
packages/cpt_payment/lib/modules/payment/payment/payment_list_view_model.g.dart

@@ -7,7 +7,7 @@ part of 'payment_list_view_model.dart';
 // **************************************************************************
 
 String _$paymentListViewModelHash() =>
-    r'640d7c8a8415a9987bb43e592076c0ebc70c0f30';
+    r'aac4515525c2ec4c013bb07ad3da281258cef311';
 
 /// See also [PaymentListViewModel].
 @ProviderFor(PaymentListViewModel)

+ 13 - 13
packages/cpt_payment/lib/modules/payment/payment_page.dart

@@ -43,7 +43,7 @@ class PaymentPage extends HookConsumerWidget {
           InfoPageRoute(),
           PaymentListPageRoute(),
           HistoryListPageRoute(),
-          ManagePageRoute(),
+          // ManagePageRoute(),
         ],
         builder: (context, child, pageController) {
           final tabsRouter = AutoTabsRouter.of(context);
@@ -92,18 +92,18 @@ class PaymentPage extends HookConsumerWidget {
                         tabsRouter.setActiveIndex(2);
                       },
                     ),
-                    _buildTopCategory(
-                      context,
-                      Assets.paymentManageIcon,
-                      42.0,
-                      32.0,
-                      S.current.manage,
-                      tabsRouter.activeIndex == 3,
-                    ).onTap(
-                      () {
-                        tabsRouter.setActiveIndex(3);
-                      },
-                    ),
+                    // _buildTopCategory(
+                    //   context,
+                    //   Assets.paymentManageIcon,
+                    //   42.0,
+                    //   32.0,
+                    //   S.current.manage,
+                    //   tabsRouter.activeIndex == 3,
+                    // ).onTap(
+                    //   () {
+                    //     tabsRouter.setActiveIndex(3);
+                    //   },
+                    // ),
                   ],
                 ),
               ),

+ 134 - 0
packages/cpt_payment/lib/provider/stripe_service.dart

@@ -0,0 +1,134 @@
+import 'package:domain/repository/payment_repository.dart';
+import 'package:flutter/material.dart';
+import 'package:plugin_basic/constants/app_constant.dart';
+import 'package:plugin_platform/engine/notify/notify_engine.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
+import 'package:plugin_platform/platform_export.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/util.dart';
+import 'package:shared/utils/event_bus.dart';
+
+part 'stripe_service.g.dart';
+
+@Riverpod(keepAlive: true)
+StripeService stripeService(Ref ref) {
+  return StripeService(ref.read(paymentRepositoryProvider));
+}
+
+class StripeService {
+  final PaymentRepository _paymentRepository;
+
+  StripeService(this._paymentRepository); // 依赖注入 Dio 实例
+
+  bool _isInitialized = false;
+
+  // 4242 4242 4242 4242 – Visa (无需 3D)
+  // 4000 0025 0000 3155 – 需要 3D Secure 验证
+
+  //初始化 Stripe
+  Future<void> _ensureInitialized() async {
+    if (_isInitialized) return;
+
+    Stripe.publishableKey = 'pk_test_51RMmxaRpg7SPAcNndAqMUMEOkRFsY5mL0JqJmdunL3vspxrYsGjGARQddaVu3ZQVEy1e1WTF8yalt0cYZCY8sK9R0005VIg5mC';
+    await Stripe.instance.applySettings();
+
+    Log.d("Stripe 初始化完成");
+    _isInitialized = true;
+  }
+
+  ///执行支付
+  Future<bool> executePayment({
+    required String orderId,
+  }) async {
+    try {
+      //尝试初始化 Stripe SDK
+      await _ensureInitialized();
+
+      //从服务端获取 clientSecret
+      final clientSecret = await _fetchPaymentIntent(orderId);
+
+      await _initializePaymentSheet(clientSecret);
+      await Stripe.instance.presentPaymentSheet();
+
+      Log.d("presentPaymentSheet 关闭,用户操作完成 !");
+
+      return await _verifyPaymentResult(clientSecret);
+
+    } on StripeException catch (e) {
+      // Stripe SDK 出错
+      _handleStripeError(e);
+      return false;
+    } catch (e) {
+      // 其他的错误捕获
+      _handleGenericError(e);
+      return false;
+    }
+  }
+
+  ///调用网络请求
+  Future<String> _fetchPaymentIntent(String orderId) async {
+    final result = await _paymentRepository.obtainPaymentIntent(orderId: orderId);
+    if (result.isSuccess) {
+      if (Utils.isNotEmpty(result.data?.clientSecret)) {
+        return result.data!.clientSecret!;
+      } else {
+        throw Exception("Empty client secret");
+      }
+    } else {
+      ToastEngine.show(result.errorMsg ?? "UnKnow Error");
+      throw Exception("Failed to get payment intent");
+    }
+  }
+
+  Future<void> _initializePaymentSheet(String clientSecret) async {
+    await Stripe.instance.initPaymentSheet(
+      paymentSheetParameters: SetupPaymentSheetParameters(
+        customFlow: false,
+        paymentIntentClientSecret: clientSecret,
+        merchantDisplayName: 'Your App Demo',
+        style: ThemeMode.light,
+        allowsDelayedPaymentMethods: false,
+      ),
+    );
+  }
+
+  Future<bool> _verifyPaymentResult(String clientSecret) async {
+    final paymentIntent = await Stripe.instance.retrievePaymentIntent(clientSecret);
+
+    switch (paymentIntent.status) {
+      case PaymentIntentsStatus.Succeeded:
+        NotifyEngine.showSuccess('支付成功');
+        //发送 EventBus 事件
+        bus.emit(AppConstant.eventStripePaymentSuccess, true);
+        return true;
+      case PaymentIntentsStatus.RequiresPaymentMethod:
+        NotifyEngine.showFailure('支付方式无效');
+        return false;
+      case PaymentIntentsStatus.Processing:
+        return await _handleProcessingPayment(clientSecret);
+      default:
+        return false;
+    }
+  }
+
+  Future<bool> _handleProcessingPayment(String clientSecret) async {
+    // 处理需要等待的支付状态
+    await Future.delayed(const Duration(seconds: 2));
+    final updatedIntent = await Stripe.instance.retrievePaymentIntent(clientSecret);
+
+    return updatedIntent.status == PaymentIntentsStatus.Succeeded;
+  }
+
+  void _handleStripeError(StripeException e) {
+    final errorMessage = e.error.localizedMessage ?? '支付失败';
+    Log.e('Stripe Error: ${e.error.code} - $errorMessage');
+    NotifyEngine.showError(errorMessage);
+  }
+
+  void _handleGenericError(dynamic e) {
+    Log.e('System Error: $e');
+    NotifyEngine.showError('支付异常:$e');
+  }
+}

+ 27 - 0
packages/cpt_payment/lib/provider/stripe_service.g.dart

@@ -0,0 +1,27 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'stripe_service.dart';
+
+// **************************************************************************
+// RiverpodGenerator
+// **************************************************************************
+
+String _$stripeServiceHash() => r'248042042fd310ebd7ad3f00515c409ed82dc5ef';
+
+/// See also [stripeService].
+@ProviderFor(stripeService)
+final stripeServiceProvider = Provider<StripeService>.internal(
+  stripeService,
+  name: r'stripeServiceProvider',
+  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
+      ? null
+      : _$stripeServiceHash,
+  dependencies: null,
+  allTransitiveDependencies: null,
+);
+
+@Deprecated('Will be removed in 3.0. Use Ref instead')
+// ignore: unused_element
+typedef StripeServiceRef = ProviderRef<StripeService>;
+// 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

+ 8 - 2
packages/cpt_payment/lib/router/component/payment_component_service.dart

@@ -2,7 +2,8 @@
  * Community 组件的组件路由
  */
 import 'package:cpt_payment/modules/add_card/add_card_page.dart';
-import 'package:cpt_payment/modules/choose_card/choose_card_page.dart';
+import 'package:cpt_payment/provider/stripe_service.dart';
+import 'package:plugin_basic/provider/global_provider_container.dart';
 import 'package:router/componentRouter/payment_service.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
@@ -29,6 +30,11 @@ class PaymentComponentService extends PaymentService {
 
   @override
   void startChooseCardPage() {
-    ChooseCardPage.startInstance();
+
+  }
+
+  @override
+  Future<bool> executePayment({required String orderId}) {
+    return globalContainer.read(stripeServiceProvider).executePayment(orderId: orderId);
   }
 }

+ 3 - 0
packages/cs_domain/lib/constants/api_constants.dart

@@ -148,6 +148,9 @@ class ApiConstants {
   //可支付列表
   static const apiPaymentList = "/api/v1/user/payment/bill/index";
 
+  //生成支付意图
+  static const apiPaymentIntent = "/api/v1/user/payment/create-payment-intent";
+
   // =========================== 其他 ↓=========================================
 
   //服务器时间

+ 22 - 29
packages/cs_domain/lib/entity/facility_page_entity.dart

@@ -1,3 +1,4 @@
+import 'package:domain/entity/id_name_entity.dart';
 import 'package:domain/generated/json/base/json_field.dart';
 import 'package:domain/generated/json/facility_page_entity.g.dart';
 import 'dart:convert';
@@ -33,7 +34,8 @@ class FacilityDetail {
 	FacilityPageListFacility? facility;
 	@JSONField(name: "time_period")
 	FacilityPageListTimePeriod? timePeriod;
-	FacilityPageListAccount? account;
+	IdNameEntity? account;
+	FacilityOrder? order;
 
 	FacilityDetail();
 
@@ -53,8 +55,7 @@ class FacilityPageListBooking {
 	String? date;
 	String? start;
 	String? end;
-	@JSONField(name: "deposit_paid")
-	String? depositPaid;
+	String? deposit;
 	@JSONField(name: "deposit_refund")
 	String? depositRefund;
 	@JSONField(name: "deposit_refund_at")
@@ -76,7 +77,7 @@ class FacilityPageListBooking {
 class FacilityPageListFacility {
 	String? id;
 	String? name;
-	FacilityPageListFacilityType? type;
+	IdNameEntity? type;
 
 	FacilityPageListFacility();
 
@@ -91,23 +92,6 @@ class FacilityPageListFacility {
 }
 
 @JsonSerializable()
-class FacilityPageListFacilityType {
-	String? id;
-	String? name;
-
-	FacilityPageListFacilityType();
-
-	factory FacilityPageListFacilityType.fromJson(Map<String, dynamic> json) => $FacilityPageListFacilityTypeFromJson(json);
-
-	Map<String, dynamic> toJson() => $FacilityPageListFacilityTypeToJson(this);
-
-	@override
-	String toString() {
-		return jsonEncode(this);
-	}
-}
-
-@JsonSerializable()
 class FacilityPageListTimePeriod {
 	String? price;
 	String? deposit;
@@ -125,15 +109,24 @@ class FacilityPageListTimePeriod {
 }
 
 @JsonSerializable()
-class FacilityPageListAccount {
+class FacilityOrder {
 	String? id;
-	String? name;
-
-	FacilityPageListAccount();
-
-	factory FacilityPageListAccount.fromJson(Map<String, dynamic> json) => $FacilityPageListAccountFromJson(json);
-
-	Map<String, dynamic> toJson() => $FacilityPageListAccountToJson(this);
+	@JSONField(name: "total_amount")
+	String? totalAmount;
+	@JSONField(name: "order_amount")
+	String? orderAmount;
+	@JSONField(name: "deposit_amount")
+	String? depositAmount;
+	@JSONField(name: "payment_status")
+	int paymentStatus = 0;  //0=未支付,1=已支付,2=支付失败
+	@JSONField(name: "refund_status")
+	int refundStatus = 0;   //0=末退歌,1=部分退歌,2=己退款
+
+	FacilityOrder();
+
+	factory FacilityOrder.fromJson(Map<String, dynamic> json) => $FacilityOrderFromJson(json);
+
+	Map<String, dynamic> toJson() => $FacilityOrderToJson(this);
 
 	@override
 	String toString() {

+ 27 - 0
packages/cs_domain/lib/entity/form_detail_entity.dart

@@ -17,6 +17,7 @@ class FormDetailEntity {
 	String? rejectedOn;
 	@JSONField(name: "approved_on")
 	String? approvedOn;
+	FormOrder? order;
 
 	FormDetailEntity();
 
@@ -29,3 +30,29 @@ class FormDetailEntity {
 		return jsonEncode(this);
 	}
 }
+
+@JsonSerializable()
+class FormOrder {
+	String? id;
+	@JSONField(name: "total_amount")
+	String? totalAmount;
+	@JSONField(name: "order_amount")
+	String? orderAmount;
+	@JSONField(name: "deposit_amount")
+	String? depositAmount;
+	@JSONField(name: "payment_status")
+	int paymentStatus = 0;  //0=未支付,1=已支付,2=支付失败
+	@JSONField(name: "refund_status")
+	int refundStatus = 0;   //0=末退歌,1=部分退歌,2=己退款
+
+	FormOrder();
+
+	factory FormOrder.fromJson(Map<String, dynamic> json) => $FormOrderFromJson(json);
+
+	Map<String, dynamic> toJson() => $FormOrderToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}

+ 51 - 0
packages/cs_domain/lib/entity/form_order_entity.dart

@@ -0,0 +1,51 @@
+import 'package:domain/generated/json/base/json_field.dart';
+import 'package:domain/generated/json/form_order_entity.g.dart';
+import 'dart:convert';
+export 'package:domain/generated/json/form_order_entity.g.dart';
+
+@JsonSerializable()
+class FormOrderEntity {
+	String? id;
+	@JSONField(name: "user_id")
+	String? userId;
+	int status = 0;
+	FormOrderOrder? order;
+
+	FormOrderEntity();
+
+	factory FormOrderEntity.fromJson(Map<String, dynamic> json) => $FormOrderEntityFromJson(json);
+
+	Map<String, dynamic> toJson() => $FormOrderEntityToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}
+
+
+@JsonSerializable()
+class FormOrderOrder {
+	String? id;
+	@JSONField(name: "total_amount")
+	String? totalAmount;
+	@JSONField(name: "order_amount")
+	String? orderAmount;
+	@JSONField(name: "deposit_amount")
+	String? depositAmount;
+	@JSONField(name: "payment_status")
+	String? paymentStatus;
+	@JSONField(name: "refund_status")
+	String? refundStatus;
+
+	FormOrderOrder();
+
+	factory FormOrderOrder.fromJson(Map<String, dynamic> json) => $FormOrderOrderFromJson(json);
+
+	Map<String, dynamic> toJson() => $FormOrderOrderToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}

+ 28 - 2
packages/cs_domain/lib/entity/form_submitted_entity.dart

@@ -1,4 +1,3 @@
-import 'package:domain/entity/form_content_entity.dart';
 import 'package:domain/entity/id_name_entity.dart';
 import 'package:domain/generated/json/base/json_field.dart';
 import 'package:domain/generated/json/form_submitted_entity.g.dart';
@@ -12,7 +11,6 @@ class FormSubmittedEntity {
 	String? userId;
 	@JSONField(name: "estate_online_form_id")
 	String? estateOnlineFormId;
-	FormContentEntity? content;
 	@JSONField(name: "sent_on")
 	String? sentOn;
 	@JSONField(name: "rejected_on")
@@ -22,6 +20,7 @@ class FormSubmittedEntity {
 	@JSONField(name: "estate_online_form")
 	FormSubmittedEstateOnlineForm? estateOnlineForm;
 	IdNameEntity? account;
+	FormSubmittedOrder? order;
 
 	FormSubmittedEntity();
 
@@ -53,4 +52,31 @@ class FormSubmittedEstateOnlineForm {
 	String toString() {
 		return jsonEncode(this);
 	}
+}
+
+
+@JsonSerializable()
+class FormSubmittedOrder {
+	String? id;
+	@JSONField(name: "total_amount")
+	String? totalAmount;
+	@JSONField(name: "order_amount")
+	String? orderAmount;
+	@JSONField(name: "deposit_amount")
+	String? depositAmount;
+	@JSONField(name: "payment_status")
+	int paymentStatus = 0;  //0=未支付,1=已支付,2=支付失败
+	@JSONField(name: "refund_status")
+	int refundStatus = 0;   //0=末退歌,1=部分退歌,2=己退款
+
+	FormSubmittedOrder();
+
+	factory FormSubmittedOrder.fromJson(Map<String, dynamic> json) => $FormSubmittedOrderFromJson(json);
+
+	Map<String, dynamic> toJson() => $FormSubmittedOrderToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
 }

+ 21 - 0
packages/cs_domain/lib/entity/payment_intent_entity.dart

@@ -0,0 +1,21 @@
+import 'package:domain/generated/json/base/json_field.dart';
+import 'package:domain/generated/json/payment_intent_entity.g.dart';
+import 'dart:convert';
+export 'package:domain/generated/json/payment_intent_entity.g.dart';
+
+@JsonSerializable()
+class PaymentIntentEntity {
+	@JSONField(name: "client_secret")
+	String? clientSecret;
+
+	PaymentIntentEntity();
+
+	factory PaymentIntentEntity.fromJson(Map<String, dynamic> json) => $PaymentIntentEntityFromJson(json);
+
+	Map<String, dynamic> toJson() => $PaymentIntentEntityToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}

+ 25 - 7
packages/cs_domain/lib/generated/json/base/json_convert_content.dart

@@ -15,6 +15,7 @@ import 'package:domain/entity/form_content_entity.dart';
 import 'package:domain/entity/form_detail_entity.dart';
 import 'package:domain/entity/form_list_entity.dart';
 import 'package:domain/entity/form_option_entity.dart';
+import 'package:domain/entity/form_order_entity.dart';
 import 'package:domain/entity/form_submitted_entity.dart';
 import 'package:domain/entity/form_submitted_page_entity.dart';
 import 'package:domain/entity/garage_sale_history_entity.dart';
@@ -40,6 +41,7 @@ import 'package:domain/entity/notice_board_event_entity.dart';
 import 'package:domain/entity/paid_service_detail_entity.dart';
 import 'package:domain/entity/paid_service_entity.dart';
 import 'package:domain/entity/paid_service_pay_success_info_entity.dart';
+import 'package:domain/entity/payment_intent_entity.dart';
 import 'package:domain/entity/payment_page_entity.dart';
 import 'package:domain/entity/property_news_detail_entity.dart';
 import 'package:domain/entity/property_news_entity.dart';
@@ -234,14 +236,11 @@ class JsonConvert {
     if (<FacilityPageListFacility>[] is M) {
       return data.map<FacilityPageListFacility>((Map<String, dynamic> e) => FacilityPageListFacility.fromJson(e)).toList() as M;
     }
-    if (<FacilityPageListFacilityType>[] is M) {
-      return data.map<FacilityPageListFacilityType>((Map<String, dynamic> e) => FacilityPageListFacilityType.fromJson(e)).toList() as M;
-    }
     if (<FacilityPageListTimePeriod>[] is M) {
       return data.map<FacilityPageListTimePeriod>((Map<String, dynamic> e) => FacilityPageListTimePeriod.fromJson(e)).toList() as M;
     }
-    if (<FacilityPageListAccount>[] is M) {
-      return data.map<FacilityPageListAccount>((Map<String, dynamic> e) => FacilityPageListAccount.fromJson(e)).toList() as M;
+    if (<FacilityOrder>[] is M) {
+      return data.map<FacilityOrder>((Map<String, dynamic> e) => FacilityOrder.fromJson(e)).toList() as M;
     }
     if (<FeedbackDetailEntity>[] is M) {
       return data.map<FeedbackDetailEntity>((Map<String, dynamic> e) => FeedbackDetailEntity.fromJson(e)).toList() as M;
@@ -261,18 +260,30 @@ class JsonConvert {
     if (<FormDetailEntity>[] is M) {
       return data.map<FormDetailEntity>((Map<String, dynamic> e) => FormDetailEntity.fromJson(e)).toList() as M;
     }
+    if (<FormOrder>[] is M) {
+      return data.map<FormOrder>((Map<String, dynamic> e) => FormOrder.fromJson(e)).toList() as M;
+    }
     if (<FormListEntity>[] is M) {
       return data.map<FormListEntity>((Map<String, dynamic> e) => FormListEntity.fromJson(e)).toList() as M;
     }
     if (<FormOptionEntity>[] is M) {
       return data.map<FormOptionEntity>((Map<String, dynamic> e) => FormOptionEntity.fromJson(e)).toList() as M;
     }
+    if (<FormOrderEntity>[] is M) {
+      return data.map<FormOrderEntity>((Map<String, dynamic> e) => FormOrderEntity.fromJson(e)).toList() as M;
+    }
+    if (<FormOrderOrder>[] is M) {
+      return data.map<FormOrderOrder>((Map<String, dynamic> e) => FormOrderOrder.fromJson(e)).toList() as M;
+    }
     if (<FormSubmittedEntity>[] is M) {
       return data.map<FormSubmittedEntity>((Map<String, dynamic> e) => FormSubmittedEntity.fromJson(e)).toList() as M;
     }
     if (<FormSubmittedEstateOnlineForm>[] is M) {
       return data.map<FormSubmittedEstateOnlineForm>((Map<String, dynamic> e) => FormSubmittedEstateOnlineForm.fromJson(e)).toList() as M;
     }
+    if (<FormSubmittedOrder>[] is M) {
+      return data.map<FormSubmittedOrder>((Map<String, dynamic> e) => FormSubmittedOrder.fromJson(e)).toList() as M;
+    }
     if (<FormSubmittedPageEntity>[] is M) {
       return data.map<FormSubmittedPageEntity>((Map<String, dynamic> e) => FormSubmittedPageEntity.fromJson(e)).toList() as M;
     }
@@ -465,6 +476,9 @@ class JsonConvert {
     if (<PaidServicePaySuccessInfoEstateUnit>[] is M) {
       return data.map<PaidServicePaySuccessInfoEstateUnit>((Map<String, dynamic> e) => PaidServicePaySuccessInfoEstateUnit.fromJson(e)).toList() as M;
     }
+    if (<PaymentIntentEntity>[] is M) {
+      return data.map<PaymentIntentEntity>((Map<String, dynamic> e) => PaymentIntentEntity.fromJson(e)).toList() as M;
+    }
     if (<PaymentPageEntity>[] is M) {
       return data.map<PaymentPageEntity>((Map<String, dynamic> e) => PaymentPageEntity.fromJson(e)).toList() as M;
     }
@@ -718,19 +732,22 @@ class JsonConvertClassCollection {
     (FacilityDetail).toString(): FacilityDetail.fromJson,
     (FacilityPageListBooking).toString(): FacilityPageListBooking.fromJson,
     (FacilityPageListFacility).toString(): FacilityPageListFacility.fromJson,
-    (FacilityPageListFacilityType).toString(): FacilityPageListFacilityType.fromJson,
     (FacilityPageListTimePeriod).toString(): FacilityPageListTimePeriod.fromJson,
-    (FacilityPageListAccount).toString(): FacilityPageListAccount.fromJson,
+    (FacilityOrder).toString(): FacilityOrder.fromJson,
     (FeedbackDetailEntity).toString(): FeedbackDetailEntity.fromJson,
     (FeedbackDetailReplies).toString(): FeedbackDetailReplies.fromJson,
     (FeedbackListEntity).toString(): FeedbackListEntity.fromJson,
     (FeedbackItemEntity).toString(): FeedbackItemEntity.fromJson,
     (FormContentEntity).toString(): FormContentEntity.fromJson,
     (FormDetailEntity).toString(): FormDetailEntity.fromJson,
+    (FormOrder).toString(): FormOrder.fromJson,
     (FormListEntity).toString(): FormListEntity.fromJson,
     (FormOptionEntity).toString(): FormOptionEntity.fromJson,
+    (FormOrderEntity).toString(): FormOrderEntity.fromJson,
+    (FormOrderOrder).toString(): FormOrderOrder.fromJson,
     (FormSubmittedEntity).toString(): FormSubmittedEntity.fromJson,
     (FormSubmittedEstateOnlineForm).toString(): FormSubmittedEstateOnlineForm.fromJson,
+    (FormSubmittedOrder).toString(): FormSubmittedOrder.fromJson,
     (FormSubmittedPageEntity).toString(): FormSubmittedPageEntity.fromJson,
     (GarageSaleHistoryEntity).toString(): GarageSaleHistoryEntity.fromJson,
     (GarageSaleHistoryList).toString(): GarageSaleHistoryList.fromJson,
@@ -795,6 +812,7 @@ class JsonConvertClassCollection {
     (PaidServicePaySuccessInfoOrderProducts).toString(): PaidServicePaySuccessInfoOrderProducts.fromJson,
     (PaidServicePaySuccessInfoEstate).toString(): PaidServicePaySuccessInfoEstate.fromJson,
     (PaidServicePaySuccessInfoEstateUnit).toString(): PaidServicePaySuccessInfoEstateUnit.fromJson,
+    (PaymentIntentEntity).toString(): PaymentIntentEntity.fromJson,
     (PaymentPageEntity).toString(): PaymentPageEntity.fromJson,
     (PaymentPageList).toString(): PaymentPageList.fromJson,
     (PropertyNewsDetailEntity).toString(): PropertyNewsDetailEntity.fromJson,

+ 62 - 56
packages/cs_domain/lib/generated/json/facility_page_entity.g.dart

@@ -1,5 +1,7 @@
 import 'package:domain/generated/json/base/json_convert_content.dart';
 import 'package:domain/entity/facility_page_entity.dart';
+import 'package:domain/entity/id_name_entity.dart';
+
 
 FacilityPageEntity $FacilityPageEntityFromJson(Map<String, dynamic> json) {
   final FacilityPageEntity facilityPageEntity = FacilityPageEntity();
@@ -75,10 +77,14 @@ FacilityDetail $FacilityDetailFromJson(Map<String, dynamic> json) {
   if (timePeriod != null) {
     facilityDetail.timePeriod = timePeriod;
   }
-  final FacilityPageListAccount? account = jsonConvert.convert<FacilityPageListAccount>(json['account']);
+  final IdNameEntity? account = jsonConvert.convert<IdNameEntity>(json['account']);
   if (account != null) {
     facilityDetail.account = account;
   }
+  final FacilityOrder? order = jsonConvert.convert<FacilityOrder>(json['order']);
+  if (order != null) {
+    facilityDetail.order = order;
+  }
   return facilityDetail;
 }
 
@@ -88,6 +94,7 @@ Map<String, dynamic> $FacilityDetailToJson(FacilityDetail entity) {
   data['facility'] = entity.facility?.toJson();
   data['time_period'] = entity.timePeriod?.toJson();
   data['account'] = entity.account?.toJson();
+  data['order'] = entity.order?.toJson();
   return data;
 }
 
@@ -96,13 +103,15 @@ extension FacilityDetailExtension on FacilityDetail {
     FacilityPageListBooking? booking,
     FacilityPageListFacility? facility,
     FacilityPageListTimePeriod? timePeriod,
-    FacilityPageListAccount? account,
+    IdNameEntity? account,
+    FacilityOrder? order,
   }) {
     return FacilityDetail()
       ..booking = booking ?? this.booking
       ..facility = facility ?? this.facility
       ..timePeriod = timePeriod ?? this.timePeriod
-      ..account = account ?? this.account;
+      ..account = account ?? this.account
+      ..order = order ?? this.order;
   }
 }
 
@@ -124,9 +133,9 @@ FacilityPageListBooking $FacilityPageListBookingFromJson(Map<String, dynamic> js
   if (end != null) {
     facilityPageListBooking.end = end;
   }
-  final String? depositPaid = jsonConvert.convert<String>(json['deposit_paid']);
-  if (depositPaid != null) {
-    facilityPageListBooking.depositPaid = depositPaid;
+  final String? deposit = jsonConvert.convert<String>(json['deposit']);
+  if (deposit != null) {
+    facilityPageListBooking.deposit = deposit;
   }
   final String? depositRefund = jsonConvert.convert<String>(json['deposit_refund']);
   if (depositRefund != null) {
@@ -145,7 +154,7 @@ Map<String, dynamic> $FacilityPageListBookingToJson(FacilityPageListBooking enti
   data['date'] = entity.date;
   data['start'] = entity.start;
   data['end'] = entity.end;
-  data['deposit_paid'] = entity.depositPaid;
+  data['deposit'] = entity.deposit;
   data['deposit_refund'] = entity.depositRefund;
   data['deposit_refund_at'] = entity.depositRefundAt;
   return data;
@@ -157,7 +166,7 @@ extension FacilityPageListBookingExtension on FacilityPageListBooking {
     String? date,
     String? start,
     String? end,
-    String? depositPaid,
+    String? deposit,
     String? depositRefund,
     String? depositRefundAt,
   }) {
@@ -166,7 +175,7 @@ extension FacilityPageListBookingExtension on FacilityPageListBooking {
       ..date = date ?? this.date
       ..start = start ?? this.start
       ..end = end ?? this.end
-      ..depositPaid = depositPaid ?? this.depositPaid
+      ..deposit = deposit ?? this.deposit
       ..depositRefund = depositRefund ?? this.depositRefund
       ..depositRefundAt = depositRefundAt ?? this.depositRefundAt;
   }
@@ -182,7 +191,7 @@ FacilityPageListFacility $FacilityPageListFacilityFromJson(Map<String, dynamic>
   if (name != null) {
     facilityPageListFacility.name = name;
   }
-  final FacilityPageListFacilityType? type = jsonConvert.convert<FacilityPageListFacilityType>(json['type']);
+  final IdNameEntity? type = jsonConvert.convert<IdNameEntity>(json['type']);
   if (type != null) {
     facilityPageListFacility.type = type;
   }
@@ -201,7 +210,7 @@ extension FacilityPageListFacilityExtension on FacilityPageListFacility {
   FacilityPageListFacility copyWith({
     String? id,
     String? name,
-    FacilityPageListFacilityType? type,
+    IdNameEntity? type,
   }) {
     return FacilityPageListFacility()
       ..id = id ?? this.id
@@ -210,37 +219,6 @@ extension FacilityPageListFacilityExtension on FacilityPageListFacility {
   }
 }
 
-FacilityPageListFacilityType $FacilityPageListFacilityTypeFromJson(Map<String, dynamic> json) {
-  final FacilityPageListFacilityType facilityPageListFacilityType = FacilityPageListFacilityType();
-  final String? id = jsonConvert.convert<String>(json['id']);
-  if (id != null) {
-    facilityPageListFacilityType.id = id;
-  }
-  final String? name = jsonConvert.convert<String>(json['name']);
-  if (name != null) {
-    facilityPageListFacilityType.name = name;
-  }
-  return facilityPageListFacilityType;
-}
-
-Map<String, dynamic> $FacilityPageListFacilityTypeToJson(FacilityPageListFacilityType entity) {
-  final Map<String, dynamic> data = <String, dynamic>{};
-  data['id'] = entity.id;
-  data['name'] = entity.name;
-  return data;
-}
-
-extension FacilityPageListFacilityTypeExtension on FacilityPageListFacilityType {
-  FacilityPageListFacilityType copyWith({
-    String? id,
-    String? name,
-  }) {
-    return FacilityPageListFacilityType()
-      ..id = id ?? this.id
-      ..name = name ?? this.name;
-  }
-}
-
 FacilityPageListTimePeriod $FacilityPageListTimePeriodFromJson(Map<String, dynamic> json) {
   final FacilityPageListTimePeriod facilityPageListTimePeriod = FacilityPageListTimePeriod();
   final String? price = jsonConvert.convert<String>(json['price']);
@@ -272,33 +250,61 @@ extension FacilityPageListTimePeriodExtension on FacilityPageListTimePeriod {
   }
 }
 
-FacilityPageListAccount $FacilityPageListAccountFromJson(Map<String, dynamic> json) {
-  final FacilityPageListAccount facilityPageListAccount = FacilityPageListAccount();
+FacilityOrder $FacilityOrderFromJson(Map<String, dynamic> json) {
+  final FacilityOrder facilityOrder = FacilityOrder();
   final String? id = jsonConvert.convert<String>(json['id']);
   if (id != null) {
-    facilityPageListAccount.id = id;
+    facilityOrder.id = id;
   }
-  final String? name = jsonConvert.convert<String>(json['name']);
-  if (name != null) {
-    facilityPageListAccount.name = name;
+  final String? totalAmount = jsonConvert.convert<String>(json['total_amount']);
+  if (totalAmount != null) {
+    facilityOrder.totalAmount = totalAmount;
+  }
+  final String? orderAmount = jsonConvert.convert<String>(json['order_amount']);
+  if (orderAmount != null) {
+    facilityOrder.orderAmount = orderAmount;
+  }
+  final String? depositAmount = jsonConvert.convert<String>(json['deposit_amount']);
+  if (depositAmount != null) {
+    facilityOrder.depositAmount = depositAmount;
   }
-  return facilityPageListAccount;
+  final int? paymentStatus = jsonConvert.convert<int>(json['payment_status']);
+  if (paymentStatus != null) {
+    facilityOrder.paymentStatus = paymentStatus;
+  }
+  final int? refundStatus = jsonConvert.convert<int>(json['refund_status']);
+  if (refundStatus != null) {
+    facilityOrder.refundStatus = refundStatus;
+  }
+  return facilityOrder;
 }
 
-Map<String, dynamic> $FacilityPageListAccountToJson(FacilityPageListAccount entity) {
+Map<String, dynamic> $FacilityOrderToJson(FacilityOrder entity) {
   final Map<String, dynamic> data = <String, dynamic>{};
   data['id'] = entity.id;
-  data['name'] = entity.name;
+  data['total_amount'] = entity.totalAmount;
+  data['order_amount'] = entity.orderAmount;
+  data['deposit_amount'] = entity.depositAmount;
+  data['payment_status'] = entity.paymentStatus;
+  data['refund_status'] = entity.refundStatus;
   return data;
 }
 
-extension FacilityPageListAccountExtension on FacilityPageListAccount {
-  FacilityPageListAccount copyWith({
+extension FacilityOrderExtension on FacilityOrder {
+  FacilityOrder copyWith({
     String? id,
-    String? name,
+    String? totalAmount,
+    String? orderAmount,
+    String? depositAmount,
+    int? paymentStatus,
+    int? refundStatus,
   }) {
-    return FacilityPageListAccount()
+    return FacilityOrder()
       ..id = id ?? this.id
-      ..name = name ?? this.name;
+      ..totalAmount = totalAmount ?? this.totalAmount
+      ..orderAmount = orderAmount ?? this.orderAmount
+      ..depositAmount = depositAmount ?? this.depositAmount
+      ..paymentStatus = paymentStatus ?? this.paymentStatus
+      ..refundStatus = refundStatus ?? this.refundStatus;
   }
 }

+ 67 - 1
packages/cs_domain/lib/generated/json/form_detail_entity.g.dart

@@ -33,6 +33,10 @@ FormDetailEntity $FormDetailEntityFromJson(Map<String, dynamic> json) {
   if (approvedOn != null) {
     formDetailEntity.approvedOn = approvedOn;
   }
+  final FormOrder? order = jsonConvert.convert<FormOrder>(json['order']);
+  if (order != null) {
+    formDetailEntity.order = order;
+  }
   return formDetailEntity;
 }
 
@@ -45,6 +49,7 @@ Map<String, dynamic> $FormDetailEntityToJson(FormDetailEntity entity) {
   data['sent_on'] = entity.sentOn;
   data['rejected_on'] = entity.rejectedOn;
   data['approved_on'] = entity.approvedOn;
+  data['order'] = entity.order?.toJson();
   return data;
 }
 
@@ -57,6 +62,7 @@ extension FormDetailEntityExtension on FormDetailEntity {
     String? sentOn,
     String? rejectedOn,
     String? approvedOn,
+    FormOrder? order,
   }) {
     return FormDetailEntity()
       ..id = id ?? this.id
@@ -65,6 +71,66 @@ extension FormDetailEntityExtension on FormDetailEntity {
       ..status = status ?? this.status
       ..sentOn = sentOn ?? this.sentOn
       ..rejectedOn = rejectedOn ?? this.rejectedOn
-      ..approvedOn = approvedOn ?? this.approvedOn;
+      ..approvedOn = approvedOn ?? this.approvedOn
+      ..order = order ?? this.order;
+  }
+}
+
+FormOrder $FormOrderFromJson(Map<String, dynamic> json) {
+  final FormOrder formOrder = FormOrder();
+  final String? id = jsonConvert.convert<String>(json['id']);
+  if (id != null) {
+    formOrder.id = id;
+  }
+  final String? totalAmount = jsonConvert.convert<String>(json['total_amount']);
+  if (totalAmount != null) {
+    formOrder.totalAmount = totalAmount;
+  }
+  final String? orderAmount = jsonConvert.convert<String>(json['order_amount']);
+  if (orderAmount != null) {
+    formOrder.orderAmount = orderAmount;
+  }
+  final String? depositAmount = jsonConvert.convert<String>(json['deposit_amount']);
+  if (depositAmount != null) {
+    formOrder.depositAmount = depositAmount;
+  }
+  final int? paymentStatus = jsonConvert.convert<int>(json['payment_status']);
+  if (paymentStatus != null) {
+    formOrder.paymentStatus = paymentStatus;
+  }
+  final int? refundStatus = jsonConvert.convert<int>(json['refund_status']);
+  if (refundStatus != null) {
+    formOrder.refundStatus = refundStatus;
+  }
+  return formOrder;
+}
+
+Map<String, dynamic> $FormOrderToJson(FormOrder entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['id'] = entity.id;
+  data['total_amount'] = entity.totalAmount;
+  data['order_amount'] = entity.orderAmount;
+  data['deposit_amount'] = entity.depositAmount;
+  data['payment_status'] = entity.paymentStatus;
+  data['refund_status'] = entity.refundStatus;
+  return data;
+}
+
+extension FormOrderExtension on FormOrder {
+  FormOrder copyWith({
+    String? id,
+    String? totalAmount,
+    String? orderAmount,
+    String? depositAmount,
+    int? paymentStatus,
+    int? refundStatus,
+  }) {
+    return FormOrder()
+      ..id = id ?? this.id
+      ..totalAmount = totalAmount ?? this.totalAmount
+      ..orderAmount = orderAmount ?? this.orderAmount
+      ..depositAmount = depositAmount ?? this.depositAmount
+      ..paymentStatus = paymentStatus ?? this.paymentStatus
+      ..refundStatus = refundStatus ?? this.refundStatus;
   }
 }

+ 106 - 0
packages/cs_domain/lib/generated/json/form_order_entity.g.dart

@@ -0,0 +1,106 @@
+import 'package:domain/generated/json/base/json_convert_content.dart';
+import 'package:domain/entity/form_order_entity.dart';
+
+FormOrderEntity $FormOrderEntityFromJson(Map<String, dynamic> json) {
+  final FormOrderEntity formOrderEntity = FormOrderEntity();
+  final String? id = jsonConvert.convert<String>(json['id']);
+  if (id != null) {
+    formOrderEntity.id = id;
+  }
+  final String? userId = jsonConvert.convert<String>(json['user_id']);
+  if (userId != null) {
+    formOrderEntity.userId = userId;
+  }
+  final int? status = jsonConvert.convert<int>(json['status']);
+  if (status != null) {
+    formOrderEntity.status = status;
+  }
+  final FormOrderOrder? order = jsonConvert.convert<FormOrderOrder>(json['order']);
+  if (order != null) {
+    formOrderEntity.order = order;
+  }
+  return formOrderEntity;
+}
+
+Map<String, dynamic> $FormOrderEntityToJson(FormOrderEntity entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['id'] = entity.id;
+  data['user_id'] = entity.userId;
+  data['status'] = entity.status;
+  data['order'] = entity.order?.toJson();
+  return data;
+}
+
+extension FormOrderEntityExtension on FormOrderEntity {
+  FormOrderEntity copyWith({
+    String? id,
+    String? userId,
+    int? status,
+    FormOrderOrder? order,
+  }) {
+    return FormOrderEntity()
+      ..id = id ?? this.id
+      ..userId = userId ?? this.userId
+      ..status = status ?? this.status
+      ..order = order ?? this.order;
+  }
+}
+
+FormOrderOrder $FormOrderOrderFromJson(Map<String, dynamic> json) {
+  final FormOrderOrder formOrderOrder = FormOrderOrder();
+  final String? id = jsonConvert.convert<String>(json['id']);
+  if (id != null) {
+    formOrderOrder.id = id;
+  }
+  final String? totalAmount = jsonConvert.convert<String>(json['total_amount']);
+  if (totalAmount != null) {
+    formOrderOrder.totalAmount = totalAmount;
+  }
+  final String? orderAmount = jsonConvert.convert<String>(json['order_amount']);
+  if (orderAmount != null) {
+    formOrderOrder.orderAmount = orderAmount;
+  }
+  final String? depositAmount = jsonConvert.convert<String>(json['deposit_amount']);
+  if (depositAmount != null) {
+    formOrderOrder.depositAmount = depositAmount;
+  }
+  final String? paymentStatus = jsonConvert.convert<String>(json['payment_status']);
+  if (paymentStatus != null) {
+    formOrderOrder.paymentStatus = paymentStatus;
+  }
+  final String? refundStatus = jsonConvert.convert<String>(json['refund_status']);
+  if (refundStatus != null) {
+    formOrderOrder.refundStatus = refundStatus;
+  }
+  return formOrderOrder;
+}
+
+Map<String, dynamic> $FormOrderOrderToJson(FormOrderOrder entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['id'] = entity.id;
+  data['total_amount'] = entity.totalAmount;
+  data['order_amount'] = entity.orderAmount;
+  data['deposit_amount'] = entity.depositAmount;
+  data['payment_status'] = entity.paymentStatus;
+  data['refund_status'] = entity.refundStatus;
+  return data;
+}
+
+extension FormOrderOrderExtension on FormOrderOrder {
+  FormOrderOrder copyWith({
+    String? id,
+    String? totalAmount,
+    String? orderAmount,
+    String? depositAmount,
+    String? paymentStatus,
+    String? refundStatus,
+  }) {
+    return FormOrderOrder()
+      ..id = id ?? this.id
+      ..totalAmount = totalAmount ?? this.totalAmount
+      ..orderAmount = orderAmount ?? this.orderAmount
+      ..depositAmount = depositAmount ?? this.depositAmount
+      ..paymentStatus = paymentStatus ?? this.paymentStatus
+      ..refundStatus = refundStatus ?? this.refundStatus;
+  }
+}

+ 67 - 10
packages/cs_domain/lib/generated/json/form_submitted_entity.g.dart

@@ -1,7 +1,5 @@
 import 'package:domain/generated/json/base/json_convert_content.dart';
 import 'package:domain/entity/form_submitted_entity.dart';
-import 'package:domain/entity/form_content_entity.dart';
-
 import 'package:domain/entity/id_name_entity.dart';
 
 
@@ -19,10 +17,6 @@ FormSubmittedEntity $FormSubmittedEntityFromJson(Map<String, dynamic> json) {
   if (estateOnlineFormId != null) {
     formSubmittedEntity.estateOnlineFormId = estateOnlineFormId;
   }
-  final FormContentEntity? content = jsonConvert.convert<FormContentEntity>(json['content']);
-  if (content != null) {
-    formSubmittedEntity.content = content;
-  }
   final String? sentOn = jsonConvert.convert<String>(json['sent_on']);
   if (sentOn != null) {
     formSubmittedEntity.sentOn = sentOn;
@@ -43,6 +37,10 @@ FormSubmittedEntity $FormSubmittedEntityFromJson(Map<String, dynamic> json) {
   if (account != null) {
     formSubmittedEntity.account = account;
   }
+  final FormSubmittedOrder? order = jsonConvert.convert<FormSubmittedOrder>(json['order']);
+  if (order != null) {
+    formSubmittedEntity.order = order;
+  }
   return formSubmittedEntity;
 }
 
@@ -51,12 +49,12 @@ Map<String, dynamic> $FormSubmittedEntityToJson(FormSubmittedEntity entity) {
   data['id'] = entity.id;
   data['user_id'] = entity.userId;
   data['estate_online_form_id'] = entity.estateOnlineFormId;
-  data['content'] = entity.content?.toJson();
   data['sent_on'] = entity.sentOn;
   data['rejected_on'] = entity.rejectedOn;
   data['approved_on'] = entity.approvedOn;
   data['estate_online_form'] = entity.estateOnlineForm?.toJson();
   data['account'] = entity.account?.toJson();
+  data['order'] = entity.order?.toJson();
   return data;
 }
 
@@ -65,23 +63,23 @@ extension FormSubmittedEntityExtension on FormSubmittedEntity {
     String? id,
     String? userId,
     String? estateOnlineFormId,
-    FormContentEntity? content,
     String? sentOn,
     String? rejectedOn,
     String? approvedOn,
     FormSubmittedEstateOnlineForm? estateOnlineForm,
     IdNameEntity? account,
+    FormSubmittedOrder? order,
   }) {
     return FormSubmittedEntity()
       ..id = id ?? this.id
       ..userId = userId ?? this.userId
       ..estateOnlineFormId = estateOnlineFormId ?? this.estateOnlineFormId
-      ..content = content ?? this.content
       ..sentOn = sentOn ?? this.sentOn
       ..rejectedOn = rejectedOn ?? this.rejectedOn
       ..approvedOn = approvedOn ?? this.approvedOn
       ..estateOnlineForm = estateOnlineForm ?? this.estateOnlineForm
-      ..account = account ?? this.account;
+      ..account = account ?? this.account
+      ..order = order ?? this.order;
   }
 }
 
@@ -128,4 +126,63 @@ extension FormSubmittedEstateOnlineFormExtension on FormSubmittedEstateOnlineFor
       ..name = name ?? this.name
       ..type = type ?? this.type;
   }
+}
+
+FormSubmittedOrder $FormSubmittedOrderFromJson(Map<String, dynamic> json) {
+  final FormSubmittedOrder formSubmittedOrder = FormSubmittedOrder();
+  final String? id = jsonConvert.convert<String>(json['id']);
+  if (id != null) {
+    formSubmittedOrder.id = id;
+  }
+  final String? totalAmount = jsonConvert.convert<String>(json['total_amount']);
+  if (totalAmount != null) {
+    formSubmittedOrder.totalAmount = totalAmount;
+  }
+  final String? orderAmount = jsonConvert.convert<String>(json['order_amount']);
+  if (orderAmount != null) {
+    formSubmittedOrder.orderAmount = orderAmount;
+  }
+  final String? depositAmount = jsonConvert.convert<String>(json['deposit_amount']);
+  if (depositAmount != null) {
+    formSubmittedOrder.depositAmount = depositAmount;
+  }
+  final int? paymentStatus = jsonConvert.convert<int>(json['payment_status']);
+  if (paymentStatus != null) {
+    formSubmittedOrder.paymentStatus = paymentStatus;
+  }
+  final int? refundStatus = jsonConvert.convert<int>(json['refund_status']);
+  if (refundStatus != null) {
+    formSubmittedOrder.refundStatus = refundStatus;
+  }
+  return formSubmittedOrder;
+}
+
+Map<String, dynamic> $FormSubmittedOrderToJson(FormSubmittedOrder entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['id'] = entity.id;
+  data['total_amount'] = entity.totalAmount;
+  data['order_amount'] = entity.orderAmount;
+  data['deposit_amount'] = entity.depositAmount;
+  data['payment_status'] = entity.paymentStatus;
+  data['refund_status'] = entity.refundStatus;
+  return data;
+}
+
+extension FormSubmittedOrderExtension on FormSubmittedOrder {
+  FormSubmittedOrder copyWith({
+    String? id,
+    String? totalAmount,
+    String? orderAmount,
+    String? depositAmount,
+    int? paymentStatus,
+    int? refundStatus,
+  }) {
+    return FormSubmittedOrder()
+      ..id = id ?? this.id
+      ..totalAmount = totalAmount ?? this.totalAmount
+      ..orderAmount = orderAmount ?? this.orderAmount
+      ..depositAmount = depositAmount ?? this.depositAmount
+      ..paymentStatus = paymentStatus ?? this.paymentStatus
+      ..refundStatus = refundStatus ?? this.refundStatus;
+  }
 }

+ 26 - 0
packages/cs_domain/lib/generated/json/payment_intent_entity.g.dart

@@ -0,0 +1,26 @@
+import 'package:domain/generated/json/base/json_convert_content.dart';
+import 'package:domain/entity/payment_intent_entity.dart';
+
+PaymentIntentEntity $PaymentIntentEntityFromJson(Map<String, dynamic> json) {
+  final PaymentIntentEntity paymentIntentEntity = PaymentIntentEntity();
+  final String? clientSecret = jsonConvert.convert<String>(json['client_secret']);
+  if (clientSecret != null) {
+    paymentIntentEntity.clientSecret = clientSecret;
+  }
+  return paymentIntentEntity;
+}
+
+Map<String, dynamic> $PaymentIntentEntityToJson(PaymentIntentEntity entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['client_secret'] = entity.clientSecret;
+  return data;
+}
+
+extension PaymentIntentEntityExtension on PaymentIntentEntity {
+  PaymentIntentEntity copyWith({
+    String? clientSecret,
+  }) {
+    return PaymentIntentEntity()
+      ..clientSecret = clientSecret ?? this.clientSecret;
+  }
+}

+ 0 - 1
packages/cs_domain/lib/repository/facility_repository.dart

@@ -112,7 +112,6 @@ class FacilityRepository {
       ApiConstants.apiFacilityBook,
       params: params,
       method: HttpMethod.POST,
-      isShowLoadingDialog: true,
       networkDebounce: true,
       cancelToken: cancelToken,
     );

+ 5 - 3
packages/cs_domain/lib/repository/form_repository.dart

@@ -15,6 +15,7 @@ import 'package:plugin_basic/provider/http_provider/http_provider.dart';
 import '../entity/form_content_entity.dart';
 import '../entity/form_detail_entity.dart';
 import '../entity/form_list_entity.dart';
+import '../entity/form_order_entity.dart';
 import '../entity/form_submitted_page_entity.dart';
 import '../entity/id_name_entity.dart';
 
@@ -163,7 +164,7 @@ class FormRepository {
   }
 
   /// 上传表单
-  Future<HttpResult> submitForm({
+  Future<HttpResult<FormOrderEntity>> submitForm({
     required String? estateFormId,
     required String? typeId,
     required FormContentEntity content,
@@ -285,13 +286,14 @@ class FormRepository {
       paths: paths,
       pathStreams: streams,
       method: HttpMethod.POST,
-      isShowLoadingDialog: true,
       networkDebounce: true,
       cancelToken: cancelToken,
     );
 
     if (result.isSuccess) {
-      return result.convert();
+      final json = result.getDataJson();
+      var data = FormOrderEntity.fromJson(json!);
+      return result.convert<FormOrderEntity>(data: data);
     }
     return result.convert();
   }

+ 24 - 0
packages/cs_domain/lib/repository/payment_repository.dart

@@ -1,5 +1,6 @@
 import 'dart:typed_data';
 
+import 'package:domain/entity/payment_intent_entity.dart';
 import 'package:domain/entity/payment_page_entity.dart';
 import 'package:plugin_platform/platform_export.dart';
 import 'package:plugin_platform/http/dio_engine.dart';
@@ -51,4 +52,27 @@ class PaymentRepository {
     }
     return result.convert();
   }
+
+  /// 根据 OrderId 生成对应的 PaymentIntent
+  Future<HttpResult<PaymentIntentEntity>> obtainPaymentIntent({
+    required String orderId,
+    CancelToken? cancelToken,
+  }) async {
+    Map<String, String> params = {};
+    params['order_id'] = orderId;
+
+    final result = await dioEngine.requestNetResult(
+      ApiConstants.apiPaymentIntent,
+      params: params,
+      method: HttpMethod.POST,
+      cancelToken: cancelToken,
+    );
+
+    if (result.isSuccess) {
+      final json = result.getDataJson();
+      var data = PaymentIntentEntity.fromJson(json!);
+      return result.convert<PaymentIntentEntity>(data: data);
+    }
+    return result.convert();
+  }
 }

+ 1 - 0
packages/cs_plugin_basic/lib/constants/app_constant.dart

@@ -25,5 +25,6 @@ class AppConstant {
   static const eventProfileRefresh = 'event_profile_refresh'; //通知用户信息需要刷新
   static const eventEstateRefresh = 'event_estate_refresh'; //通知用户的房产信息需要刷新
   static const eventServiceOrderRefresh = 'event_service_order_refresh'; //通知用户的服务订单
+  static const eventStripePaymentSuccess = 'event_stripe_payment_success'; //用户支付成功的同志
 
 }

+ 2 - 2
packages/cs_plugin_basic/lib/dialog/country_code_selecter.dart

@@ -154,8 +154,8 @@ class _AttachCountryDialog extends StatelessWidget {
                 MyAssetImage(item['icon']!, width: 28, height: 20),
                 MyTextView(
                   item['code']!,
-                  marginLeft: 8,
-                  marginRight: 10,
+                  marginLeft: 6,
+                  marginRight: 0,
                   textColor: context.appColors.textBlack,
                   isFontMedium: true,
                   fontSize: 16,

+ 72 - 129
packages/cs_plugin_basic/lib/widget/webview_page.dart

@@ -45,14 +45,80 @@ class _WebViewPageState extends State<WebViewPage> {
     _showAppbar = widget.showAppbar ?? true;
     Log.d("传入的initialUrl:${widget.initialUrl}");
     _initialUrl = widget.initialUrl ?? widget.arguments!['initialUrl'];
-    if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView();
+
+    _initializeController();
+  }
+
+  void _initializeController() {
+    webViewController = WebViewController()
+      ..setJavaScriptMode(JavaScriptMode.unrestricted)
+      ..setBackgroundColor(const Color(0x00000000))
+      ..setNavigationDelegate(
+        NavigationDelegate(
+          onProgress: (int progress) {
+            if (progress == 100) {
+              Future.delayed(const Duration(milliseconds: 500)).then((value) => {
+                    // 获取页面高度
+                    _getWebViewHeight()
+                  });
+            }
+          },
+          onPageStarted: (String url) {
+            if (mounted) {
+              setState(() {
+                _stackToView = 1;
+              });
+            }
+          },
+          onPageFinished: (String url) {
+            if (mounted) {
+              setState(() {
+                _stackToView = 0;
+              });
+            }
+          },
+          onWebResourceError: (WebResourceError error) {},
+          onNavigationRequest: (NavigationRequest request) async {
+            if (request.url.startsWith('tel:')) {
+              // 拦截tel链接
+              if (!await launchUrl(Uri.parse(request.url))) throw 'Unable to activate the call function';
+              return NavigationDecision.prevent; // 阻止WebView导航到该链接
+            }
+            return NavigationDecision.navigate;
+          },
+        ),
+      )
+      ..loadRequest(Uri.parse(_initialUrl ?? ""));
+  }
+
+  _getWebViewHeight() async {
+    // try {
+    //   final result = await webViewController?.runJavaScriptReturningResult('''
+    //   new Promise((resolve) => {
+    //     const scrollHeight = document.documentElement.scrollHeight;
+    //     resolve(scrollHeight);
+    //   });
+    // ''');
+    //   return double.parse(result.toString());
+    // } catch (e) {
+    //   return 300.0; // 默认高度
+    // }
+
+    // 方式二:
+    var originalHeight = await webViewController?.runJavaScriptReturningResult("document.body.offsetHeight;");
+    _webViewHeight = double.parse(originalHeight.toString());
+    if (mounted) {
+      setState(() {
+        _webViewHeight = _webViewHeight <= 0 ? 300 : _webViewHeight;
+      });
+    }
   }
 
   @override
   void dispose() async {
     super.dispose();
     // 销毁 WebView 实例
-    webViewController?.loadUrl('about:blank');
+    webViewController?.loadHtmlString('about:blank');
     webViewController?.clearCache();
   }
 
@@ -64,80 +130,6 @@ class _WebViewPageState extends State<WebViewPage> {
     }
   }
 
-  // 注册js回调
-  _invokeJavascriptChannel(BuildContext context) {
-    return [
-      JavascriptChannel(
-        name: 'Invoke',
-        onMessageReceived: (JavascriptMessage message) {
-          // var webHeight = double.parse(message.message);
-          // setState(() {
-          //   print('打印webHeight:$_webViewHeight');
-          //   _webViewHeight = webHeight;
-          // });
-        },
-      ),
-      JavascriptChannel(
-        name: 'Invoke1',
-        onMessageReceived: (JavascriptMessage message) {
-          // var devicePixelRatio = double.parse(message.message);
-          // setState(() {
-          // _webViewHeight = devicePixelRatio;
-          // });
-        },
-      ),
-      JavascriptChannel(
-        name: "integral",
-        onMessageReceived: (JavascriptMessage message) {
-          // print("交互");
-          // print("参数: ${message.message}");
-          // Map res = changeStringToJsonMap(message.message);
-          // print(res["operation"]);
-          // _controller?.evaluateJavascript("getAddressBook('sdad')");
-        },
-      ),
-      JavascriptChannel(
-        name: "MessageDeal",
-        onMessageReceived: (JavascriptMessage message) async {
-          // print("交互");
-          // print("参数: ${message.message}");
-          // print(webViewController);
-          // webViewController
-          //     ?.runJavascriptReturningResult("showMessage('我(Flutter)收到了你的消息)");
-          // _controller?.evaluateJavascript("document.title");
-        },
-      ),
-      JavascriptChannel(
-        name: "callWithDict",
-        onMessageReceived: (JavascriptMessage message) {
-          // print("交互");
-          // print("参数: ${message.message}");
-        },
-      ),
-    ];
-  }
-
-  // 获取页面高度
-  _getWebViewHeight() async {
-    // 方式一:
-    // await webViewController?.runJavascriptReturningResult('''
-    //     try {
-    //       // Invoke.postMessage([document.body.clientHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight]);
-    //       let scrollHeight = document.documentElement.scrollHeight;
-    //       if (scrollHeight) {
-    //         Invoke.postMessage(scrollHeight);
-    //       }
-    //     } catch {}
-    //     ''');
-    // 方式二:
-    var originalHeight = await webViewController!.runJavascriptReturningResult("document.body.offsetHeight;");
-    _webViewHeight = double.parse(originalHeight);
-    setState(() {
-      _webViewHeight = _webViewHeight <= 0 ? 300 : _webViewHeight;
-    });
-    // print('网页高度-----' + _webViewHeight.toString());
-  }
-
   // 返回与后退的处理
   Future<bool> _onWillPop() async {
     if (webViewController == null) {
@@ -180,70 +172,21 @@ class _WebViewPageState extends State<WebViewPage> {
               IndexedStack(
                 index: _stackToView,
                 children: [
+                  //WebView控件
                   Column(
                     children: [
                       Expanded(
                         child: WillPopScope(
                           onWillPop: _onWillPop,
-                          child: WebView(
+                          child: WebViewWidget(
                             key: _key,
-                            initialUrl: _initialUrl!.startsWith("http")
-                                ? _initialUrl
-                                : Uri.dataFromString(
-                                    _initialUrl!,
-                                    mimeType: 'text/html',
-                                    encoding: Encoding.getByName('utf-8'),
-                                  ).toString(),
-
-                            userAgent: '',
-                            //JS执行模式 是否允许JS执行
-                            javascriptMode: JavascriptMode.unrestricted,
-                            //webview创建好
-                            onWebViewCreated: (WebViewController controller) {
-                              webViewController = controller;
-                            },
-                            onProgress: (int progress) {
-                              // print('progress=====>$progress');
-                              if (progress == 100) {
-                                Future.delayed(const Duration(milliseconds: 500)).then((value) => {
-                                      // 获取页面高度
-                                      _getWebViewHeight()
-                                    });
-                              }
-                            },
-                            onPageStarted: (String url) {
-                              // print('onPageStarted=====>$url');
-                            },
-                            onPageFinished: (String url) {
-                              Log.d('onPageFinished=====>$url');
-                              if (mounted) {
-                                setState(() {
-                                  _stackToView = 0;
-                                });
-                              }
-                            },
-                            onWebResourceError: (WebResourceError error) {
-                              // print('error=====>$error');
-                            },
-                            gestureNavigationEnabled: true,
-                            // 注册js 回调
-                            javascriptChannels: _invokeJavascriptChannel(context).toSet(),
-                            navigationDelegate: (NavigationRequest request) async {
-                              //如果是tel标签需要阻止并调用 launchUrl 的方法调用拨打电话
-                              if (request.url.startsWith('tel:')) {
-                                // 拦截tel链接
-                                if (!await launchUrl(Uri.parse(request.url))) throw '无法启动拨打电话功能';
-                                return NavigationDecision.prevent; // 阻止WebView导航到该链接
-                              }
-
-                              // 可以继续WebView的内部跳转
-                              return NavigationDecision.navigate;
-                            },
+                            controller: webViewController!,
                           ),
                         ),
                       )
                     ],
                   ),
+                  //Loading加载控件
                   Container(
                     color: Colors.white,
                     child: const Center(

+ 1 - 1
packages/cs_plugin_platform/lib/platform_export.dart

@@ -2,4 +2,4 @@ export 'package:dio/dio.dart';
 export 'package:permission_handler/permission_handler.dart';
 export 'engine/image/image_nine_grid.dart';
 export 'engine/media/image_picker_utils.dart';
-// export 'package:flutter_stripe/flutter_stripe.dart';
+export 'package:flutter_stripe/flutter_stripe.dart';

+ 1 - 1
packages/cs_plugin_platform/pubspec.yaml

@@ -36,7 +36,7 @@ dependencies:
   dio: 5.3.3
 
   #处理权限
-  permission_handler: 11.3.1
+  permission_handler: 12.0.0+1
 
   # 图片选择  https://github.com/fluttercandies/flutter_wechat_assets_picker/blob/main/README-ZH.md
   wechat_assets_picker: ^9.2.2

BIN
packages/cs_resources/assets/auth/yy_home_success.webp


BIN
packages/cs_resources/assets/main/home_info_news.png


BIN
packages/cs_resources/assets/main/home_info_news.webp


BIN
packages/cs_resources/assets/main/home_internal_news.png


BIN
packages/cs_resources/assets/main/home_internal_news.webp


BIN
packages/cs_resources/assets/main/home_property_news.png


BIN
packages/cs_resources/assets/main/home_property_news.webp


BIN
packages/cs_resources/assets/main/home_publish_news.png


BIN
packages/cs_resources/assets/main/home_publish_news.webp


BIN
packages/cs_resources/assets/main/notification_item_icon.webp


+ 4 - 4
packages/cs_resources/lib/generated/assets.dart

@@ -112,14 +112,14 @@ class Assets {
   static const String mainHomeCommunityIcon = 'assets/main/home_community_icon.webp';
   static const String mainHomeFacilityIcon = 'assets/main/home_facility_icon.webp';
   static const String mainHomeFormsIcon = 'assets/main/home_forms_icon.webp';
-  static const String mainHomeInfoNews = 'assets/main/home_info_news.webp';
-  static const String mainHomeInternalNews = 'assets/main/home_internal_news.webp';
+  static const String mainHomeInfoNews = 'assets/main/home_info_news.png';
+  static const String mainHomeInternalNews = 'assets/main/home_internal_news.png';
   static const String mainHomeMoreIcon = 'assets/main/home_more_icon.webp';
   static const String mainHomeNotificationIcon = 'assets/main/home_notification_icon.webp';
   static const String mainHomePaymentIcon = 'assets/main/home_payment_icon.webp';
   static const String mainHomePropertyIcon = 'assets/main/home_property_icon.webp';
-  static const String mainHomePropertyNews = 'assets/main/home_property_news.webp';
-  static const String mainHomePublishNews = 'assets/main/home_publish_news.webp';
+  static const String mainHomePropertyNews = 'assets/main/home_property_news.png';
+  static const String mainHomePublishNews = 'assets/main/home_publish_news.png';
   static const String mainHomeRewardsIcon = 'assets/main/home_rewards_icon.webp';
   static const String mainHomeServiceIcon = 'assets/main/home_service_icon.webp';
   static const String mainHomeTopImgBg = 'assets/main/home_top_img_bg.webp';

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

@@ -274,7 +274,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Forgot Password?"),
         "forgot_text": MessageLookupByLibrary.simpleMessage(
             "Enter your email and mobile phone number"),
-        "form": MessageLookupByLibrary.simpleMessage("Form"),
+        "form": MessageLookupByLibrary.simpleMessage("Forms"),
         "form_submit_title": MessageLookupByLibrary.simpleMessage("Submit"),
         "full_name": MessageLookupByLibrary.simpleMessage("Full Name"),
         "function_room": MessageLookupByLibrary.simpleMessage("Function Room"),
@@ -455,6 +455,7 @@ class MessageLookup extends MessageLookupByLibrary {
             "The Management will verify your application accordingly"),
         "ownership_status":
             MessageLookupByLibrary.simpleMessage("OWNERSHIP STATUS"),
+        "paid": MessageLookupByLibrary.simpleMessage("Paid"),
         "paid_on": MessageLookupByLibrary.simpleMessage("paid on"),
         "parking_fee_payment":
             MessageLookupByLibrary.simpleMessage("Parking Fee Payment"),
@@ -539,6 +540,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "redemption_reservation_txt": MessageLookupByLibrary.simpleMessage(
             "Reservation not required.Present your YY Circle Voucher (it’s under “Me”tab)At the outlet."),
         "refinancing": MessageLookupByLibrary.simpleMessage("Refinancing"),
+        "refunded": MessageLookupByLibrary.simpleMessage("Refunded"),
         "registration_of_2_vehicle":
             MessageLookupByLibrary.simpleMessage("Registration of 2nd Vehicle"),
         "rejected": MessageLookupByLibrary.simpleMessage("Rejected"),
@@ -666,6 +668,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "type_of_application":
             MessageLookupByLibrary.simpleMessage("TYPE OF APPLICATION"),
         "unit_number": MessageLookupByLibrary.simpleMessage("Unit Number"),
+        "unpaid": MessageLookupByLibrary.simpleMessage("Unpaid"),
         "up_3_img": MessageLookupByLibrary.simpleMessage(
             "(Up to 3 images can be uploaded)"),
         "up_to_max_images": MessageLookupByLibrary.simpleMessage(

+ 3 - 0
packages/cs_resources/lib/generated/intl/messages_zh_CN.dart

@@ -362,6 +362,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "owners_desc4": MessageLookupByLibrary.simpleMessage("我是拥有该单元的公司的股东"),
         "owners_desc5": MessageLookupByLibrary.simpleMessage("管理员将相应地验证您的申请"),
         "ownership_status": MessageLookupByLibrary.simpleMessage("所有权状态"),
+        "paid": MessageLookupByLibrary.simpleMessage("已支付"),
         "paid_on": MessageLookupByLibrary.simpleMessage("付款时间"),
         "parking_fee_payment": MessageLookupByLibrary.simpleMessage("停车费"),
         "password": MessageLookupByLibrary.simpleMessage("密码"),
@@ -424,6 +425,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "redemption_reservation_txt": MessageLookupByLibrary.simpleMessage(
             "无需预约。请在门店出示您的 YY Circle 优惠券(在“我”标签下)。"),
         "refinancing": MessageLookupByLibrary.simpleMessage("再融资"),
+        "refunded": MessageLookupByLibrary.simpleMessage("已退款"),
         "registration_of_2_vehicle":
             MessageLookupByLibrary.simpleMessage("第二辆车登记"),
         "rejected": MessageLookupByLibrary.simpleMessage("已拒绝"),
@@ -527,6 +529,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "type_here": MessageLookupByLibrary.simpleMessage("在此输入"),
         "type_of_application": MessageLookupByLibrary.simpleMessage("申请类型"),
         "unit_number": MessageLookupByLibrary.simpleMessage("单元"),
+        "unpaid": MessageLookupByLibrary.simpleMessage("待支付"),
         "up_3_img": MessageLookupByLibrary.simpleMessage("(最多可上传3张图片)"),
         "up_to_max_images":
             MessageLookupByLibrary.simpleMessage("(您最多可以上传10张图片)"),

+ 3 - 0
packages/cs_resources/lib/generated/intl/messages_zh_HK.dart

@@ -354,6 +354,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("请提供过夜停车时间。"),
         "overseas_home_loan": MessageLookupByLibrary.simpleMessage("海外房贷"),
         "ownership_status": MessageLookupByLibrary.simpleMessage("所有权状态"),
+        "paid": MessageLookupByLibrary.simpleMessage("已支付"),
         "paid_on": MessageLookupByLibrary.simpleMessage("付款时间"),
         "parking_fee_payment": MessageLookupByLibrary.simpleMessage("停车费"),
         "password": MessageLookupByLibrary.simpleMessage("密码"),
@@ -416,6 +417,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "redemption_reservation_txt": MessageLookupByLibrary.simpleMessage(
             "无需预约。请在门店出示您的 YY Circle 优惠券(在“我”标签下)。"),
         "refinancing": MessageLookupByLibrary.simpleMessage("再融资"),
+        "refunded": MessageLookupByLibrary.simpleMessage("已退款"),
         "registration_of_2_vehicle":
             MessageLookupByLibrary.simpleMessage("第二辆车登记"),
         "rejected": MessageLookupByLibrary.simpleMessage("已拒绝"),
@@ -514,6 +516,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "type_here": MessageLookupByLibrary.simpleMessage("在此输入"),
         "type_of_application": MessageLookupByLibrary.simpleMessage("申请类型"),
         "unit_number": MessageLookupByLibrary.simpleMessage("单元"),
+        "unpaid": MessageLookupByLibrary.simpleMessage("待支付"),
         "up_3_img": MessageLookupByLibrary.simpleMessage("(最多可上传3张图片)"),
         "up_to_max_images":
             MessageLookupByLibrary.simpleMessage("(您最多可以上传10张图片)"),

+ 32 - 2
packages/cs_resources/lib/generated/l10n.dart

@@ -90,10 +90,10 @@ class S {
     );
   }
 
-  /// `Form`
+  /// `Forms`
   String get form {
     return Intl.message(
-      'Form',
+      'Forms',
       name: 'form',
       desc: '',
       args: [],
@@ -4520,6 +4520,36 @@ class S {
     );
   }
 
+  /// `Paid`
+  String get paid {
+    return Intl.message(
+      'Paid',
+      name: 'paid',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Unpaid`
+  String get unpaid {
+    return Intl.message(
+      'Unpaid',
+      name: 'unpaid',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Refunded`
+  String get refunded {
+    return Intl.message(
+      'Refunded',
+      name: 'refunded',
+      desc: '',
+      args: [],
+    );
+  }
+
   /// `Other`
   String get other {
     return Intl.message(

+ 4 - 1
packages/cs_resources/lib/l10n/intl_en.arb

@@ -4,7 +4,7 @@
   "rewards": "Rewards",
   "notification": "Notification",
   "facility": "Facility",
-  "form": "Form",
+  "form": "Forms",
   "notice_board": "Notice Board",
   "phone_email": "Phone/Email",
   "password": "Password",
@@ -447,5 +447,8 @@
   "congratulations": "Congratulations",
   "verification_code_cap": "VERIFICATION CODE",
   "show_verification_cap": "SHOW THE VERIFICATION CODE TO YOUR MERCHANT",
+  "paid": "Paid",
+  "unpaid": "Unpaid",
+  "refunded": "Refunded",
   "other": "Other"
 }

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

@@ -444,5 +444,8 @@
   "congratulations": "恭喜",
   "verification_code_cap": "验证码",
   "show_verification_cap": "向商家出示验证码",
+  "paid": "已支付",
+  "unpaid": "待支付",
+  "refunded": "已退款",
   "other": "其他"
 }

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

@@ -430,5 +430,8 @@
   "congratulations": "恭喜",
   "verification_code_cap": "验证码",
   "show_verification_cap": "向商家出示验证码",
+  "paid": "已支付",
+  "unpaid": "待支付",
+  "refunded": "已退款",
   "other": "其他"
 }

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

@@ -38,6 +38,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   static const _color05CC67= Color(0xFF05CC67);
   static const _colorB8BFD9= Color(0x4DB8BFD9);
   static const _color063148= Color(0XFF063148);
+  static const _color939393= Color(0XFF939393);
 
   //暗色主题的一些自定义颜色值
   static const _darkBlackBg = Color(0xFF0F0F0F);
@@ -61,6 +62,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   final Color textBlack; //黑色文本
   final Color textWhite; // 白色文本
   final Color textDarkGray; //深灰色 666 文本
+  final Color textDisEnableGray; //深灰色 939393 文本
   final Color orangeBG; //按钮的橙色背景
   final Color tabBgSelectedPrimary; //Tab的选中主题色背景
   final Color tabBgUnSelectedPrimary; //Tab的未选中主题色背景
@@ -103,6 +105,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
     required this.textBlack,
     required this.textWhite,
     required this.textDarkGray,
+    required this.textDisEnableGray,
     required this.orangeBG,
     required this.tabBgSelectedPrimary,
     required this.tabBgUnSelectedPrimary,
@@ -173,6 +176,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       textGreen: _color05CC67,
       imageDarkModelWhite: Colors.transparent,
       itemBGShadow: _colorB8BFD9,
+      textDisEnableGray: _color939393,
     );
   }
 
@@ -218,6 +222,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       textGreen: Colors.white,
       imageDarkModelWhite: Colors.white,
       itemBGShadow: _darkBlackItemLight,
+      textDisEnableGray: Colors.white,
     );
   }
 
@@ -272,6 +277,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       textGreen: Color.lerp(textGreen, other.textGreen, t)!,
       imageDarkModelWhite: Color.lerp(imageDarkModelWhite, other.imageDarkModelWhite, t)!,
       itemBGShadow: Color.lerp(itemBGShadow, other.itemBGShadow, t)!,
+      textDisEnableGray: Color.lerp(textDisEnableGray, other.textDisEnableGray, t)!,
     );
   }
 }

+ 2 - 1
packages/cs_resources/pubspec.yaml

@@ -4,7 +4,8 @@ description: 整体项目的资源,颜色,图片,字体等
 version: 1.0.0
 
 environment:
-  sdk: ">=3.0.2 <4.0.0"
+  sdk: ">=3.3.0 <4.0.0"
+  flutter: ">=3.0.0"
 
 dependencies:
   flutter_localizations:

+ 0 - 1
packages/cs_router/lib/componentRouter/form_service.dart

@@ -4,5 +4,4 @@
 abstract class FormService {
 
   void startFormPage();
-
 }

+ 3 - 0
packages/cs_router/lib/componentRouter/payment_service.dart

@@ -9,4 +9,7 @@ abstract class PaymentService {
 
   void startAddCardPage();
 
+  Future<bool> executePayment({
+    required String orderId,
+  });
 }

+ 2 - 1
packages/cs_router/pubspec.yaml

@@ -4,7 +4,8 @@ description: 基础包,用于提供路由与路由相关逻辑
 version: 1.0.0
 
 environment:
-  sdk: '>=3.0.2 <4.0.0'
+  sdk: ">=3.3.0 <4.0.0"
+  flutter: ">=3.0.0"
 
 dependencies:
 

+ 60 - 0
packages/cs_shared/lib/utils/file_utils.dart

@@ -0,0 +1,60 @@
+class FileUtils {
+
+  // 支持的图片格式列表
+  static const imageExtensions = [
+    'jpg', 'jpeg', 'png', 'gif', 'webp',
+    'bmp', 'tiff', 'svg', 'heic', 'heif'
+  ];
+
+  // 支持的文档格式列表
+  static const documentExtensions = [
+    'pdf', 'doc', 'docx', 'xls', 'xlsx',
+    'ppt', 'pptx', 'txt', 'rtf', 'csv',
+    'odt', 'ods', 'odp'
+  ];
+
+
+  // 获取 URL 的文件扩展名(小写)
+  static String? _getFileExtension(String url) {
+    try {
+      // 处理带有查询参数的 URL
+      final uri = Uri.parse(url);
+      final pathSegments = uri.pathSegments;
+      if (pathSegments.isEmpty) return null;
+
+      final fileName = pathSegments.last;
+      final dotIndex = fileName.lastIndexOf('.');
+      if (dotIndex == -1) return null;
+
+      return fileName.substring(dotIndex + 1).toLowerCase();
+    } catch (e) {
+      return null;
+    }
+  }
+
+  // 判断是否是图片
+  static bool isImage(String url) {
+    final ext = _getFileExtension(url);
+    return ext != null && imageExtensions.contains(ext);
+  }
+
+  // 判断是否是文档
+  static bool isDocument(String url) {
+    final ext = _getFileExtension(url);
+    return ext != null && documentExtensions.contains(ext);
+  }
+
+  // 综合判断方法
+  static FileType getFileType(String url) {
+    final ext = _getFileExtension(url);
+    if (ext == null) return FileType.unknown;
+
+    if (imageExtensions.contains(ext)) return FileType.image;
+    if (documentExtensions.contains(ext)) return FileType.document;
+
+    return FileType.unknown;
+  }
+
+}
+
+enum FileType { image, document, unknown }

+ 2 - 1
packages/cs_shared/pubspec.yaml

@@ -4,7 +4,8 @@ description: 基础包,提供基本的全局的工具类与服务类
 version: 1.0.0
 
 environment:
-  sdk: '>=3.0.2 <4.0.0'
+  sdk: ">=3.3.0 <4.0.0"
+  flutter: ">=3.0.0"
 
 dependencies:
 

+ 3 - 0
packages/cs_widgets/lib/shatter/select_calendar/calendar_bottom_sheet.dart

@@ -2,6 +2,9 @@ import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'full_calendar.dart';
 
+/*
+ *  自定义的日历选择 BottomSheet 弹框
+ */
 class CustomCalendarBottomSheet extends StatelessWidget {
   final DateTime firstDate;
   final DateTime? lastDate;

+ 4 - 9
packages/cs_widgets/lib/shatter/select_calendar/full_calendar.dart

@@ -8,7 +8,7 @@ import 'package:widgets/my_load_image.dart';
 
 import '../../utils/dark_theme_util.dart';
 
-//日历的具体展示
+//日历的具体控件展示
 class FullCalendar extends StatefulWidget {
   final DateTime startDate;
   final DateTime? endDate;
@@ -43,7 +43,6 @@ class FullCalendar extends StatefulWidget {
 
 class _FullCalendarState extends State<FullCalendar> {
   late DateTime endDate;
-
   late DateTime startDate;
   late int _initialPage;
 
@@ -55,7 +54,6 @@ class _FullCalendarState extends State<FullCalendar> {
   void initState() {
     setState(() {
       startDate = DateTime.parse("${widget.startDate.toString().split(" ").first} 00:00:00.000");
-
       endDate = DateTime.parse("${widget.endDate.toString().split(" ").first} 23:00:00.000");
 
       _events = widget.events;
@@ -149,7 +147,7 @@ class _FullCalendarState extends State<FullCalendar> {
               child: Row(
                 mainAxisAlignment: MainAxisAlignment.spaceBetween,
                 children: [
-                   MyAssetImage(
+                  MyAssetImage(
                     Assets.baseLibCalendarLeftIcon,
                     width: 44,
                     height: 44,
@@ -160,7 +158,7 @@ class _FullCalendarState extends State<FullCalendar> {
                       curve: Curves.ease,
                     );
                   }),
-                   MyAssetImage(
+                  MyAssetImage(
                     Assets.baseLibCalendarRightIcon,
                     width: 44,
                     height: 44,
@@ -303,9 +301,7 @@ class _FullCalendarState extends State<FullCalendar> {
         // 底部的每月的每一天
         Container(
           padding: const EdgeInsets.only(top: 10.0),
-          height: (fullDates.length > 28)
-              ? (fullDates.length > 35 ? 6.2 * width / 7 : 5.2 * width / 7)
-              : 4 * width / 7,
+          height: (fullDates.length > 28) ? (fullDates.length > 35 ? 6.2 * width / 7 : 5.2 * width / 7) : 4 * width / 7,
           width: MediaQuery.of(context).size.width - 2 * widget.padding!,
           child: GridView.builder(
             itemCount: fullDates.length,
@@ -337,5 +333,4 @@ class _FullCalendarState extends State<FullCalendar> {
       ],
     );
   }
-
 }

+ 8 - 0
packages/cs_widgets/lib/shatter/weekly_calendar/calendar_utils.dart

@@ -39,6 +39,14 @@ bool isPastDate(DateTime now, DateTime date) {
   return date.isBefore(todayMidnight);
 }
 
+//检查日期是否大于Max日期
+bool isAfterMaxDate(DateTime max, DateTime date) {
+  // 获取当前日期的凌晨时间
+  DateTime maxMidnight = DateTime(max.year, max.month, max.day);
+  // 判断给定日期是否大于指定日期的凌晨时间
+  return date.isAfter(maxMidnight);
+}
+
 // ===================================  获取一周的数据  ↓  ===================================
 
 List<DateTime> getWeekdays(DateTime date, int at) {

+ 4 - 5
packages/cs_widgets/lib/shatter/weekly_calendar/day_cell.dart

@@ -8,11 +8,13 @@ class DayCell extends StatelessWidget {
     super.key,
     required this.display,
     required this.selected,
+    required this.maxDate,
     required this.current,
   });
 
   final DateTime display;
   final DateTime selected;
+  final DateTime maxDate;
   final DateTime current;
 
   //显示的日期文本
@@ -27,8 +29,8 @@ class DayCell extends StatelessWidget {
       width: 40,
       height: 40,
       decoration: BoxDecoration(
-        color: isPastDate(current,display)
-            ? context.appColors.disEnableGray.withOpacity(0.6) // 小于今天的日期背景颜色,禁用
+        color: isPastDate(current, display) || isAfterMaxDate(maxDate, display)
+            ? context.appColors.disEnableGray.withOpacity(0.6) // 小于今天的日期背景颜色和大于Max日期变灰并禁用
             : _isSelected(display)
                 ? _isToday(display)
                     ? context.appColors.btnBgDefault // 今天的日期背景颜色
@@ -79,7 +81,4 @@ class DayCell extends StatelessWidget {
   bool _isToday(DateTime date) {
     return DateTimeUtils.formatDate(date, format: 'yyyyMMdd') == DateTimeUtils.formatDate(current, format: 'yyyyMMdd');
   }
-
-
-
 }

+ 6 - 2
packages/cs_widgets/lib/shatter/weekly_calendar/day_table_view.dart

@@ -9,12 +9,14 @@ class DayTableView extends StatelessWidget {
     required this.weekdays,
     required this.onSelect,
     required this.selectedDate,
+    required this.maxDate,
     required this.currentDate,
   });
 
   final List<DateTime> weekdays;
   final Function(DateTime)? onSelect;
   final DateTime selectedDate;
+  final DateTime maxDate;
   final DateTime currentDate;
 
   @override
@@ -27,13 +29,14 @@ class DayTableView extends StatelessWidget {
           children: weekdays.sublist(0, 7).map(
             (date) {
               return GestureDetector(
-                onTap: isPastDate(currentDate, date) ? null : () => onSelect?.call(date),
+                onTap: isPastDate(currentDate, date) || isAfterMaxDate(maxDate, date) ? null : () => onSelect?.call(date),
                 child: SizedBox(
                   width: 40,
                   height: 40,
                   child: DayCell(
                     display: date,
                     selected: selectedDate,
+                    maxDate: maxDate,
                     current: currentDate,
                   ),
                 ),
@@ -50,13 +53,14 @@ class DayTableView extends StatelessWidget {
           children: weekdays.sublist(7, 14).map(
             (date) {
               return GestureDetector(
-                onTap: isPastDate(currentDate, date) ? null : () => onSelect?.call(date),
+                onTap: isPastDate(currentDate, date) || isAfterMaxDate(maxDate, date) ? null : () => onSelect?.call(date),
                 child: SizedBox(
                   width: 40,
                   height: 40,
                   child: DayCell(
                     display: date,
                     selected: selectedDate,
+                    maxDate: maxDate,
                     current: currentDate,
                   ),
                 ),

+ 3 - 0
packages/cs_widgets/lib/shatter/weekly_calendar/weekly_calendar.dart

@@ -10,10 +10,12 @@ class WeeklyCalendar extends StatefulWidget {
   const WeeklyCalendar({
     super.key,
     this.onChangedSelectedDate,
+    required this.maxDate,
     this.selectedDate,
   });
 
   final DateTime? selectedDate; //当前选中的日期
+  final DateTime maxDate; //可选的最大日期
   final Function(DateTime)? onChangedSelectedDate; //选择日期的回调
 
   @override
@@ -74,6 +76,7 @@ class _WeeklyCalendarState extends State<WeeklyCalendar> {
             widget.onChangedSelectedDate?.call(date);
           },
           selectedDate: selectedDate ?? now,
+          maxDate: widget.maxDate,
           currentDate: now,
         )
       ],

+ 3 - 2
packages/cs_widgets/pubspec.yaml

@@ -4,7 +4,8 @@ description: 基础包,原生的封装控件,扩展控件,自定义控件
 version: 1.0.0
 
 environment:
-  sdk: '>=3.0.2 <4.0.0'
+  sdk: ">=3.3.0 <4.0.0"
+  flutter: ">=3.0.0"
 
 dependencies:
 
@@ -41,7 +42,7 @@ dependencies:
   hooks_riverpod: ^2.5.1
 
   # WebView插件 https://github.com/flutter/plugins/tree/master/packages/webview_flutter
-  webview_flutter: ^3.0.4
+  webview_flutter: ^4.10.0
   # 如何使用?WebviewScaffold 整体WebView带上下结构布局
   #          FlutterWebviewPlugin  单独的WebView插件
   # https://pub.dev/packages/flutter_webview_plugin#-readme-tab

+ 2 - 1
pubspec.yaml

@@ -3,7 +3,8 @@ version: 1.0.0
 description: HongYeGroup物业管理系统
 
 environment:
-  sdk: '>=3.0.2 <4.0.0'
+  sdk: ">=3.3.0 <4.0.0"
+  flutter: ">=3.0.0"
 
 dependencies:
   flutter_lints: ^2.0.1