Prechádzať zdrojové kódy

加入韩国的入口,初步测试通过

liukai 2 mesiacov pred
rodič
commit
76085e192a
20 zmenil súbory, kde vykonal 280 pridanie a 212 odobranie
  1. 1 1
      packages/cpt_auth/lib/modules/login/login_controller.dart
  2. 9 5
      packages/cpt_auth/lib/modules/login/login_page.dart
  3. 2 2
      packages/cpt_auth/lib/modules/main/main_controller.dart
  4. 7 5
      packages/cpt_auth/lib/modules/select_country/select_country_controller.dart
  5. 35 4
      packages/cpt_auth/lib/modules/select_country/select_country_page.dart
  6. 7 2
      packages/cpt_labour/lib/modules/labour_template_add/labour_template_add_controller.dart
  7. 201 186
      packages/cpt_labour/lib/modules/labour_template_add/labour_template_add_page.dart
  8. 1 0
      packages/cpt_labour/lib/modules/labour_template_add/labour_template_add_state.dart
  9. 1 1
      packages/cpt_report/lib/modules/report_list/report_list_controller.dart
  10. 1 1
      packages/cpt_report/lib/modules/report_staff_request/report_staff_request_controller.dart
  11. 3 0
      packages/cs_domain/lib/constants/api_constants.dart
  12. 0 2
      packages/cs_plugin_basic/lib/constants/app_constant.dart
  13. 2 2
      packages/cs_plugin_basic/lib/service/app_config_service.dart
  14. 5 0
      packages/cs_plugin_basic/lib/service/http_provider_injection.dart
  15. BIN
      packages/cs_resources/assets/cpt_auth/korea_icon.webp
  16. 1 0
      packages/cs_resources/lib/generated/assets.dart
  17. 1 0
      packages/cs_resources/lib/local/language/en_US.dart
  18. 1 0
      packages/cs_resources/lib/local/language/vi_VN.dart
  19. 1 0
      packages/cs_resources/lib/local/language/zh_CN.dart
  20. 1 1
      packages/cs_widgets/lib/shatter/custom_radio_check.dart

+ 1 - 1
packages/cpt_auth/lib/modules/login/login_controller.dart

@@ -81,7 +81,7 @@ class LoginController extends GetxController with DioCancelableMixin {
     UserService.to.setToken(token);
 
     //保存是否是管理员登录
-    if (ConfigService.to.curSelectCountry.value == 1) {
+    if (ConfigService.to.selectCountry.value == 1) {
       //如果是新加坡用户,强制是管理员登录
       SPUtil.putInt(AppConstant.storageIsAdmin, 1);
     }else{

+ 9 - 5
packages/cpt_auth/lib/modules/login/login_page.dart

@@ -102,7 +102,11 @@ class _LoginPageState extends BaseState<LoginPage, LoginController> with StateLi
                     children: [
                       Obx(() {
                         return MyTextView(
-                          ConfigService.to.curSelectCountry == 0 ? "Vietnam".tr : "Singapore".tr,
+                          ConfigService.to.selectCountry.value == 1
+                              ? "Singapore".tr
+                              : ConfigService.to.selectCountry.value == 2
+                                  ? "Korea".tr
+                                  : "Vietnam".tr,
                           textColor: ColorConstants.white,
                           isFontMedium: true,
                           marginRight: 5,
@@ -141,10 +145,10 @@ class _LoginPageState extends BaseState<LoginPage, LoginController> with StateLi
                         //中间的输入框布局
                         Container(
                           width: double.infinity,
-                          margin: EdgeInsets.symmetric(vertical: 45, horizontal: 15),
-                          padding: EdgeInsets.symmetric(vertical: 33, horizontal: 20),
+                          margin: const EdgeInsets.symmetric(vertical: 45, horizontal: 15),
+                          padding: const EdgeInsets.symmetric(vertical: 33, horizontal: 20),
                           decoration: BoxDecoration(
-                            color: Color(0xFF4DCFF6).withOpacity(0.2), // 设置背景颜色和不透明度
+                            color: const Color(0xFF4DCFF6).withOpacity(0.2), // 设置背景颜色和不透明度
                             borderRadius: BorderRadius.circular(5.0), // 设置圆角
                           ),
                           child: Center(
@@ -214,7 +218,7 @@ class _LoginPageState extends BaseState<LoginPage, LoginController> with StateLi
                                 //选择签到功能还是全功能
                                 Obx(() {
                                   return Visibility(
-                                    visible: ConfigService.to.curSelectCountry == 0,
+                                    visible: ConfigService.to.selectCountry.value != 1,
                                     child: CustomRadioCheck(
                                       options: state.loginOption,
                                       onOptionSelected: (index, text) {

+ 2 - 2
packages/cpt_auth/lib/modules/main/main_controller.dart

@@ -119,7 +119,7 @@ class MainController extends GetxController {
   void gotoModulePage(HomeModule module) {
     switch (module.key) {
       case 'labReq':
-        if (ConfigService.to.curSelectCountry.value == 1) {
+        if (ConfigService.to.selectCountry.value == 1) {
           //新加坡的用工请求
           ComponentRouterServices.labourSGService.startLabourRequestPage();
         } else {
@@ -128,7 +128,7 @@ class MainController extends GetxController {
         }
         break;
       case 'jobList':
-        if (ConfigService.to.curSelectCountry.value == 1) {
+        if (ConfigService.to.selectCountry.value == 1) {
           ComponentRouterServices.labourSGService.startJobListPage();
         } else {
           //越南的工作列表

+ 7 - 5
packages/cpt_auth/lib/modules/select_country/select_country_controller.dart

@@ -5,19 +5,21 @@ import 'package:plugin_basic/service/app_config_service.dart';
 import 'package:plugin_basic/service/http_provider_injection.dart';
 import 'package:plugin_platform/engine/sp/sp_util.dart';
 
-
 class SelectCountryController extends GetxController {
-
   //设置下一步
   void setupNext() {
-    int country = ConfigService.to.curSelectCountry.value;
+    int country = ConfigService.to.selectCountry.value;
     SPUtil.putInt(AppConstant.storageSelectedCountry, country);
 
     String baseUrl;
-    if (country == 1){
+    if (country == 1) {
       //新加坡
       baseUrl = ApiConstants.sgBaseUrl;
-    }else {
+    }
+    if (country == 2) {
+      //韩国
+      baseUrl = ApiConstants.koreaBaseUrl;
+    } else {
       baseUrl = ApiConstants.baseUrl;
     }
 

+ 35 - 4
packages/cpt_auth/lib/modules/select_country/select_country_page.dart

@@ -113,14 +113,14 @@ class SelectCountryPage extends BaseStatelessPage<SelectCountryController> {
                             ).expanded(),
                             Obx(() {
                               return Visibility(
-                                visible: ConfigService.to.curSelectCountry.value == 1,
+                                visible: ConfigService.to.selectCountry.value == 1,
                                 child: const MyAssetImage(Assets.cptAuthCheckedIcon, width: 22, height: 22),
                               );
                             }),
                           ],
                         ),
                       ).onTap(() {
-                        ConfigService.to.curSelectCountry.value = 1;
+                        ConfigService.to.selectCountry.value = 1;
                       }),
 
                       //越南的选项
@@ -144,14 +144,45 @@ class SelectCountryPage extends BaseStatelessPage<SelectCountryController> {
                             ).expanded(),
                             Obx(() {
                               return Visibility(
-                                visible: ConfigService.to.curSelectCountry.value == 0,
+                                visible: ConfigService.to.selectCountry.value == 0,
                                 child: const MyAssetImage(Assets.cptAuthCheckedIcon, width: 22, height: 22),
                               );
                             }),
                           ],
                         ),
                       ).onTap(() {
-                        ConfigService.to.curSelectCountry.value = 0;
+                        ConfigService.to.selectCountry.value = 0;
+                      }),
+
+                      //韩国的选项
+                      Container(
+                        width: double.infinity,
+                        margin: const EdgeInsets.only(top: 13.5, left: 20, right: 20),
+                        padding: const EdgeInsets.symmetric(vertical: 13, horizontal: 17),
+                        decoration: BoxDecoration(
+                          color: const Color(0xFF4DCFF6).withOpacity(0.2), // 设置背景颜色和不透明度
+                          borderRadius: BorderRadius.circular(5.0), // 设置圆角
+                        ),
+                        child: Row(
+                          children: [
+                            const MyAssetImage(Assets.cptAuthKoreaIcon, width: 50, height: 33),
+                            MyTextView(
+                              "Korea".tr,
+                              marginLeft: 17,
+                              textColor: ColorConstants.white,
+                              isFontMedium: true,
+                              fontSize: 18,
+                            ).expanded(),
+                            Obx(() {
+                              return Visibility(
+                                visible: ConfigService.to.selectCountry.value == 2,
+                                child: const MyAssetImage(Assets.cptAuthCheckedIcon, width: 22, height: 22),
+                              );
+                            }),
+                          ],
+                        ),
+                      ).onTap(() {
+                        ConfigService.to.selectCountry.value = 2;
                       }),
 
                       //Next按钮

+ 7 - 2
packages/cpt_labour/lib/modules/labour_template_add/labour_template_add_controller.dart

@@ -40,13 +40,18 @@ class LabourTemplateAddController extends GetxController with DioCancelableMixin
       noteController.text = state.indexEntity?.note ?? "";
 
       //默认赋值
+      state.optionLanguageList.value = state.indexEntity?.languageList.map((e) => e.txt!).toList() ?? [];
+      Log.d("当前语言的选项为:${state.optionLanguageList}");
+
       state.selectedAgeList = state.indexEntity?.ageList.where((e) => e.checked == "checked").map((e) => e.value!).toList() ?? [];
-      Log.d("当前选中的年龄1:${ state.selectedAgeList}");
+      Log.d("当前选中的年龄:${state.selectedAgeList}");
       state.selectedLanguageList = state.indexEntity?.languageList.where((e) => e.checked == "checked").map((e) => e.value!).toList() ?? [];
-      Log.d("当前选中的语言1:${ state.selectedLanguageList}");
+      Log.d("当前选中的语言:${state.selectedLanguageList}");
       state.gender = state.indexEntity?.sexList.firstWhere((e) => e.checked == "checked").value;
+      Log.d("当前选中的性别:${state.gender}");
 
       update();
+
     } else {
       ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
     }

+ 201 - 186
packages/cpt_labour/lib/modules/labour_template_add/labour_template_add_page.dart

@@ -80,217 +80,232 @@ class LabourTemplateAddPage extends BaseStatelessPage<LabourTemplateAddControlle
                 child: SingleChildScrollView(
                   scrollDirection: Axis.vertical,
                   physics: const BouncingScrollPhysics(),
-                  child: Column(
-                    crossAxisAlignment: CrossAxisAlignment.start,
-                    children: [
-                      //模板名称
-                      FormRequireText(text: "Template Name".tr).marginOnly(left: 15, top: 19),
+                  child: Obx(() {
 
-                      CustomTextField(
-                        formKey: "template_name",
-                        formData: state.formData,
-                        height: 46,
-                        fontSize: 14,
-                        onSubmit: (key, value) {
-                          state.formData[key]!['focusNode'].unfocus();
-                          FocusScope.of(context).requestFocus(state.formData['desc']!['focusNode']);
-                        },
-                        marginTop: 10,
-                      ),
+                    return Column(
+                      crossAxisAlignment: CrossAxisAlignment.start,
+                      children: [
+                        //模板名称
+                        FormRequireText(text: "Template Name".tr).marginOnly(left: 15, top: 19),
 
-                      //年龄
-                      MyTextView(
-                        "Age".tr,
-                        textColor: Colors.white,
-                        fontSize: 14,
-                        isFontRegular: true,
-                        marginLeft: 15,
-                        marginTop: 15,
-                      ),
+                        CustomTextField(
+                          formKey: "template_name",
+                          formData: state.formData,
+                          height: 46,
+                          fontSize: 14,
+                          onSubmit: (key, value) {
+                            state.formData[key]!['focusNode'].unfocus();
+                            FocusScope.of(context).requestFocus(state.formData['desc']!['focusNode']);
+                          },
+                          marginTop: 10,
+                        ),
 
-                      // 年龄的多选
-                      CustomCheckBox(
-                        options: state.indexEntity?.ageList.map((e) => e.txt!).toList() ?? [],
-                        onOptionsSelected: (selected) {
-                          // 转换选中的索引为对应的 value
-                          state.selectedAgeList = selected
-                              .map((index) {
-                                return state.indexEntity?.ageList[index].value; // 获取对应的 value
-                              })
-                              .whereType<String>()
-                              .toList();
-                        },
-                        selectedOptions: state.indexEntity?.ageList.where((e) => e.checked == "checked").map((e) => e.txt!).toList() ?? [],
-                      ).marginOnly(left: 15, right: 15, top: 10),
+                        //年龄
+                        Visibility(
+                          visible: state.indexEntity?.ageList.isNotEmpty == true,
+                          child: MyTextView(
+                            "Age".tr,
+                            textColor: Colors.white,
+                            fontSize: 14,
+                            isFontRegular: true,
+                            marginLeft: 15,
+                            marginTop: 15,
+                          ),
+                        ),
 
-                      //性别
-                      MyTextView(
-                        "Gender".tr,
-                        textColor: Colors.white,
-                        fontSize: 14,
-                        isFontRegular: true,
-                        marginLeft: 15,
-                        marginTop: 15,
-                      ),
+                        // 年龄的多选
+                        Visibility(
+                          visible: state.indexEntity?.ageList.isNotEmpty == true,
+                          child: CustomCheckBox(
+                            options: state.indexEntity?.ageList.map((e) => e.txt!).toList() ?? [],
+                            onOptionsSelected: (selected) {
+                              // 转换选中的索引为对应的 value
+                              state.selectedAgeList = selected
+                                  .map((index) {
+                                    return state.indexEntity?.ageList[index].value; // 获取对应的 value
+                                  })
+                                  .whereType<String>()
+                                  .toList();
+                            },
+                            selectedOptions: state.indexEntity?.ageList.where((e) => e.checked == "checked").map((e) => e.txt!).toList() ?? [],
+                          ).marginOnly(left: 15, right: 15, top: 10),
+                        ),
 
-                      //性别单选
-                      CustomRadioCheck(
-                        options: state.indexEntity?.sexList.map((e) => e.txt!).toList() ?? [],
-                        onOptionSelected: (index, text) {
-                          state.gender = state.indexEntity!.sexList[index].value;
-                        },
-                        selectedPosition: state.indexEntity?.sexList.indexWhere((e) => e.checked == "checked") ?? -1,
-                      ).marginOnly(left: 15, right: 15, top: 10),
+                        //性别
+                        Visibility(
+                          visible: state.indexEntity?.sexList.isNotEmpty == true,
+                          child: MyTextView(
+                            "Gender".tr,
+                            textColor: Colors.white,
+                            fontSize: 14,
+                            isFontRegular: true,
+                            marginLeft: 15,
+                            marginTop: 15,
+                          ),
+                        ),
 
-                      //语言
-                      MyTextView(
-                        "Language".tr,
-                        textColor: Colors.white,
-                        fontSize: 14,
-                        isFontRegular: true,
-                        marginLeft: 15,
-                        marginTop: 15,
-                      ),
+                        //性别单选
+                        Visibility(
+                          visible: state.indexEntity?.sexList.isNotEmpty == true,
+                          child: CustomRadioCheck(
+                            options: state.indexEntity?.sexList.map((e) => e.txt!).toList() ?? [],
+                            onOptionSelected: (index, text) {
+                              state.gender = state.indexEntity!.sexList[index].value;
+                            },
+                            selectedPosition: state.indexEntity?.sexList.indexWhere((e) => e.checked == "checked") ?? -1,
+                          ).marginOnly(left: 15, right: 15, top: 10),
+                        ),
 
-                      // 语言的多选
-                      CustomCheckBox(
-                        options: state.indexEntity?.languageList.map((e) => e.txt!).toList() ?? [],
-                        onOptionsSelected: (selected) {
-                          // 转换选中的索引为对应的 value
-                          state.selectedLanguageList = selected
-                              .map((index) {
-                                return state.indexEntity?.languageList[index].value; // 获取对应的 value
-                              })
-                              .whereType<String>()
-                              .toList();
-                        },
-                        selectedOptions: state.indexEntity?.languageList.where((e) => e.checked == "checked").map((e) => e.txt!).toList() ?? [],
-                      ).marginOnly(left: 15, right: 15, top: 10),
+                        //语言
+                        MyTextView(
+                          "Language".tr,
+                          textColor: Colors.white,
+                          fontSize: 14,
+                          isFontRegular: true,
+                          marginLeft: 15,
+                          marginTop: 15,
+                        ),
 
+                        // 语言的多选 (使用 Obx 刷新)
+                        CustomCheckBox(
+                          options: state.optionLanguageList.value,
+                          onOptionsSelected: (selected) {
+                            // 转换选中的索引为对应的 value
+                            state.selectedLanguageList = selected
+                                .map((index) {
+                                  return state.indexEntity?.languageList[index].value; // 获取对应的 value
+                                })
+                                .whereType<String>()
+                                .toList();
+                          },
+                          selectedOptions: state.indexEntity?.languageList.where((e) => e.checked == "checked").map((e) => e.txt!).toList() ?? [],
+                        ).marginOnly(left: 15, right: 15, top: 10),
 
-                      //模板详情
-                      MyTextView(
-                        "Description".tr,
-                        textColor: Colors.white,
-                        fontSize: 14,
-                        isFontRegular: true,
-                        marginLeft: 15,
-                        marginTop: 15,
-                      ),
+                        //模板详情
+                        MyTextView(
+                          "Description".tr,
+                          textColor: Colors.white,
+                          fontSize: 14,
+                          isFontRegular: true,
+                          marginLeft: 15,
+                          marginTop: 15,
+                        ),
 
-                      IgnoreKeyboardDismiss(
-                        child: Container(
-                          height: 130,
-                          margin: const EdgeInsets.only(left: 15, right: 15, top: 10),
-                          padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 15),
-                          decoration: BoxDecoration(
-                            color: const Color(0xFF4DCFF6).withOpacity(0.2),
-                            borderRadius: const BorderRadius.all(Radius.circular(5)),
-                          ),
-                          child: TextField(
-                            cursorColor: ColorConstants.white,
-                            cursorWidth: 1.5,
-                            autofocus: false,
-                            enabled: true,
-                            focusNode: state.formData["desc"]!['focusNode'],
-                            controller: state.formData["desc"]!['controller'],
-                            // 装饰
-                            decoration: InputDecoration(
-                              isDense: true,
-                              isCollapsed: true,
-                              border: InputBorder.none,
-                              hintText: state.formData["desc"]!['hintText'],
-                              hintStyle: const TextStyle(
-                                color: ColorConstants.textGrayAECAE5,
+                        IgnoreKeyboardDismiss(
+                          child: Container(
+                            height: 130,
+                            margin: const EdgeInsets.only(left: 15, right: 15, top: 10),
+                            padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 15),
+                            decoration: BoxDecoration(
+                              color: const Color(0xFF4DCFF6).withOpacity(0.2),
+                              borderRadius: const BorderRadius.all(Radius.circular(5)),
+                            ),
+                            child: TextField(
+                              cursorColor: ColorConstants.white,
+                              cursorWidth: 1.5,
+                              autofocus: false,
+                              enabled: true,
+                              focusNode: state.formData["desc"]!['focusNode'],
+                              controller: state.formData["desc"]!['controller'],
+                              // 装饰
+                              decoration: InputDecoration(
+                                isDense: true,
+                                isCollapsed: true,
+                                border: InputBorder.none,
+                                hintText: state.formData["desc"]!['hintText'],
+                                hintStyle: const TextStyle(
+                                  color: ColorConstants.textGrayAECAE5,
+                                  fontSize: 15.0,
+                                  fontWeight: FontWeight.w400,
+                                ),
+                              ),
+                              style: const TextStyle(
+                                color: ColorConstants.white,
                                 fontSize: 15.0,
                                 fontWeight: FontWeight.w400,
                               ),
+                              // 键盘动作右下角图标
+                              textInputAction: TextInputAction.next,
+                              onSubmitted: (value) {
+                                state.formData[key]!['focusNode'].unfocus();
+                                FocusScope.of(context).requestFocus(state.formData['contact']!['focusNode']);
+                              },
                             ),
-                            style: const TextStyle(
-                              color: ColorConstants.white,
-                              fontSize: 15.0,
-                              fontWeight: FontWeight.w400,
-                            ),
-                            // 键盘动作右下角图标
-                            textInputAction: TextInputAction.next,
-                            onSubmitted: (value) {
-                              state.formData[key]!['focusNode'].unfocus();
-                              FocusScope.of(context).requestFocus(state.formData['contact']!['focusNode']);
-                            },
                           ),
                         ),
-                      ),
 
-                      //备注
-                      MyTextView(
-                        "Note".tr,
-                        textColor: Colors.white,
-                        fontSize: 14,
-                        isFontRegular: true,
-                        marginLeft: 15,
-                        marginTop: 18,
-                      ),
+                        //备注
+                        MyTextView(
+                          "Note".tr,
+                          textColor: Colors.white,
+                          fontSize: 14,
+                          isFontRegular: true,
+                          marginLeft: 15,
+                          marginTop: 18,
+                        ),
 
-                      IgnoreKeyboardDismiss(
-                        child: Container(
-                          height: 130,
-                          margin: const EdgeInsets.only(left: 15, right: 15, top: 10),
-                          padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 15),
-                          decoration: BoxDecoration(
-                            color: const Color(0xFF4DCFF6).withOpacity(0.2),
-                            borderRadius: const BorderRadius.all(Radius.circular(5)),
-                          ),
-                          child: TextField(
-                            cursorColor: ColorConstants.white,
-                            cursorWidth: 1.5,
-                            autofocus: false,
-                            enabled: true,
-                            focusNode: state.formData["note"]!['focusNode'],
-                            controller: state.formData["note"]!['controller'],
-                            // 装饰
-                            decoration: InputDecoration(
-                              isDense: true,
-                              isCollapsed: true,
-                              border: InputBorder.none,
-                              hintText: state.formData["note"]!['hintText'],
-                              hintStyle: const TextStyle(
-                                color: ColorConstants.textGrayAECAE5,
+                        IgnoreKeyboardDismiss(
+                          child: Container(
+                            height: 130,
+                            margin: const EdgeInsets.only(left: 15, right: 15, top: 10),
+                            padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 15),
+                            decoration: BoxDecoration(
+                              color: const Color(0xFF4DCFF6).withOpacity(0.2),
+                              borderRadius: const BorderRadius.all(Radius.circular(5)),
+                            ),
+                            child: TextField(
+                              cursorColor: ColorConstants.white,
+                              cursorWidth: 1.5,
+                              autofocus: false,
+                              enabled: true,
+                              focusNode: state.formData["note"]!['focusNode'],
+                              controller: state.formData["note"]!['controller'],
+                              // 装饰
+                              decoration: InputDecoration(
+                                isDense: true,
+                                isCollapsed: true,
+                                border: InputBorder.none,
+                                hintText: state.formData["note"]!['hintText'],
+                                hintStyle: const TextStyle(
+                                  color: ColorConstants.textGrayAECAE5,
+                                  fontSize: 14.0,
+                                  fontWeight: FontWeight.w400,
+                                ),
+                              ),
+                              style: const TextStyle(
+                                color: ColorConstants.white,
                                 fontSize: 14.0,
                                 fontWeight: FontWeight.w400,
                               ),
+                              // 键盘动作右下角图标
+                              textInputAction: TextInputAction.next,
+                              onSubmitted: (value) {
+                                state.formData[key]!['focusNode'].unfocus();
+                                FocusScope.of(context).requestFocus(state.formData['contact']!['focusNode']);
+                              },
                             ),
-                            style: const TextStyle(
-                              color: ColorConstants.white,
-                              fontSize: 14.0,
-                              fontWeight: FontWeight.w400,
-                            ),
-                            // 键盘动作右下角图标
-                            textInputAction: TextInputAction.next,
-                            onSubmitted: (value) {
-                              state.formData[key]!['focusNode'].unfocus();
-                              FocusScope.of(context).requestFocus(state.formData['contact']!['focusNode']);
-                            },
                           ),
                         ),
-                      ),
 
-                      //提交按钮
-                      MyButton(
-                        type: ClickType.throttle,
-                        milliseconds: 500,
-                        onPressed: () {
-                          FocusScope.of(context).unfocus();
-                          controller.doSubmit();
-                        },
-                        text: "Submit".tr,
-                        textColor: ColorConstants.white,
-                        fontSize: 16,
-                        radius: 20,
-                        backgroundColor: ColorConstants.textYellowFFBB1B,
-                        fontWeight: FontWeight.w500,
-                      ).marginSymmetric(vertical: 25, horizontal: 15),
-                    ],
-                  ),
+                        //提交按钮
+                        MyButton(
+                          type: ClickType.throttle,
+                          milliseconds: 500,
+                          onPressed: () {
+                            FocusScope.of(context).unfocus();
+                            controller.doSubmit();
+                          },
+                          text: "Submit".tr,
+                          textColor: ColorConstants.white,
+                          fontSize: 16,
+                          radius: 20,
+                          backgroundColor: ColorConstants.textYellowFFBB1B,
+                          fontWeight: FontWeight.w500,
+                        ).marginSymmetric(vertical: 25, horizontal: 15),
+                      ],
+                    );
+                  }),
+
                 ),
               ),
             ),

+ 1 - 0
packages/cpt_labour/lib/modules/labour_template_add/labour_template_add_state.dart

@@ -41,4 +41,5 @@ class LabourTemplateAddState {
   List<String> selectedLanguageList = [];   //选中的 language 的 id
   String? gender;
 
+  RxList<String> optionLanguageList = <String>[].obs;  // language 的选项字符串
 }

+ 1 - 1
packages/cpt_report/lib/modules/report_list/report_list_controller.dart

@@ -58,7 +58,7 @@ class ReportListController extends GetxController {
         ReportFinancePage.startInstance();
         break;
       case 'casLab':
-        if (ConfigService.to.curSelectCountry.value ==1){
+        if (ConfigService.to.selectCountry.value ==1){
           //新加坡
           ReportLabourPage.startInstance();
         }else{

+ 1 - 1
packages/cpt_report/lib/modules/report_staff_request/report_staff_request_controller.dart

@@ -34,7 +34,7 @@ class ReportStaffRequestController extends GetxController with DioCancelableMixi
     changeLoadingState(LoadState.State_Loading);
 
     //根据不同的国家,调用不同的接口
-    if (ConfigService.to.curSelectCountry.value == 1) {
+    if (ConfigService.to.selectCountry.value == 1) {
       //如果是新加坡版本的
       var result = await _otherRepository.fetchReportStaffRequest(
         DateTimeUtils.formatDate(state.startDateTime, format: "yyyy-MM-dd"),

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

@@ -10,6 +10,9 @@ class ApiConstants {
   //新加坡的域名
   static const sgBaseUrl = isServerRelease ? 'https://www.casualabour.com' : 'http://singapore-dev.casualabour.com';
 
+  //韩国的域名
+  static const koreaBaseUrl = isServerRelease ? 'https://korea.casualabour.com' : 'http://korea-dev.casualabour.com';
+
   // =========================== 用户相关 ↓=========================================
 
   // 酒店登录

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

@@ -7,8 +7,6 @@ class AppConstant {
   /// App运行在Release环境时,inProduction为true;当App运行在Debug和Profile环境时,inProduction为false
   static const bool inProduction = kReleaseMode; //本地打包的编译环境是 Debug 还是 Release (自动生成,不需手动修改)
 
-  static int selectCountry = 0;  //(没用到)当前选中的国家,默认越南  0越南  1新加坡  2马来西亚
-
   static const String theme = 'AppTheme';
   static const String locale = 'locale';
 

+ 2 - 2
packages/cs_plugin_basic/lib/service/app_config_service.dart

@@ -22,7 +22,7 @@ class ConfigService extends GetxService {
   static ConfigService get to => Get.find();
 
   //选择的国家
-  RxInt curSelectCountry = 0.obs;
+  RxInt selectCountry = 0.obs;  //0 越南  1 新加坡  2 韩国
 
   // 设备信息
   /// android 设备信息
@@ -99,7 +99,7 @@ class ConfigService extends GetxService {
 
     //赋值选中的国家
     int country = SPUtil.getInt(AppConstant.storageSelectedCountry, defValue: 0) ?? 0;
-    curSelectCountry.value = country;
+    selectCountry.value = country;
 
     //打印应用与设备的信息
     getDeviceInfo();

+ 5 - 0
packages/cs_plugin_basic/lib/service/http_provider_injection.dart

@@ -14,8 +14,13 @@ class HttpProviderInjection {
     String baseUrl;
     int country = SPUtil.getInt(AppConstant.storageSelectedCountry, defValue: 0) ?? 0;
     if (country == 1) {
+      //新加坡
       baseUrl = ApiConstants.sgBaseUrl;
+    }if (country == 2) {
+      //韩国
+      baseUrl = ApiConstants.koreaBaseUrl;
     } else {
+      //默认越南
       baseUrl = ApiConstants.baseUrl;
     }
 

BIN
packages/cs_resources/assets/cpt_auth/korea_icon.webp


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

@@ -23,6 +23,7 @@ class Assets {
   static const String baseServiceTriangleDropDown = 'assets/base_service/triangle_drop_down.webp';
   static const String baseServiceTriangleDropDownIcon = 'assets/base_service/triangle_drop_down_icon.webp';
   static const String cptAuthCheckedIcon = 'assets/cpt_auth/checked_icon.webp';
+  static const String cptAuthKoreaIcon = 'assets/cpt_auth/korea_icon.webp';
   static const String cptAuthLoginRadioChecked = 'assets/cpt_auth/login_radio_checked.webp';
   static const String cptAuthLoginRadioUncheck = 'assets/cpt_auth/login_radio_uncheck.webp';
   static const String cptAuthNextIcon = 'assets/cpt_auth/next_icon.webp';

+ 1 - 0
packages/cs_resources/lib/local/language/en_US.dart

@@ -237,6 +237,7 @@ const Map<String, String> en_US = {
   'Finance Report': 'Finance Report',
   'Created By': 'Created By',
   'Language': 'Language',
+  'Korea': 'Korea',
 
   //插件的国际化
   'Pull to refresh': 'Pull to refresh',

+ 1 - 0
packages/cs_resources/lib/local/language/vi_VN.dart

@@ -237,6 +237,7 @@ const Map<String, String> vi_VN = {
   'Finance Report':'Báo cáo tài chính',
   'Created By': 'Trang chủ',
   'Language': 'Ngôn ngữ',
+  'Korea': 'Hàn Quốc',
 
   //插件的国际化
   "Pull to refresh": "Kéo để làm mới",

+ 1 - 0
packages/cs_resources/lib/local/language/zh_CN.dart

@@ -237,6 +237,7 @@ const Map<String, String> zh_CN = {
   'Finance Report': '财务报表',
   'Created By': '创建者',
   'Language': '语言',
+  'Korea': '韩国',
 
   //插件的国际化
   'Pull to refresh': '下拉刷新',

+ 1 - 1
packages/cs_widgets/lib/shatter/custom_radio_check.dart

@@ -7,7 +7,7 @@ import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_load_image.dart';
 import 'package:widgets/my_text_view.dart';
 
-/**
+/*
  * 条件单选 Radio
  */
 class CustomRadioCheck extends StatefulWidget {