瀏覽代碼

Labour Request Review 的接口页面与逻辑

liukai 4 天之前
父節點
當前提交
0bb2df00a0
共有 19 個文件被更改,包括 718 次插入757 次删除
  1. 37 23
      packages/cpt_sg/lib/modules/labour/labour_request_edit/labour_request_edit_controller.dart
  2. 22 21
      packages/cpt_sg/lib/modules/labour/labour_request_edit/labour_request_edit_page.dart
  3. 1 1
      packages/cpt_sg/lib/modules/labour/labour_request_edit/labour_request_edit_state.dart
  4. 0 196
      packages/cpt_sg/lib/modules/review/labour_review_edit/labour_review_edit_controller.dart
  5. 0 357
      packages/cpt_sg/lib/modules/review/labour_review_edit/labour_review_edit_page.dart
  6. 0 41
      packages/cpt_sg/lib/modules/review/labour_review_edit/labour_review_edit_state.dart
  7. 33 27
      packages/cpt_sg/lib/modules/review/labour_review_list/labour_review_controller.dart
  8. 75 32
      packages/cpt_sg/lib/modules/review/labour_review_list/labour_review_filter.dart
  9. 45 47
      packages/cpt_sg/lib/modules/review/labour_review_list/labour_review_item.dart
  10. 6 4
      packages/cpt_sg/lib/modules/review/labour_review_list/labour_review_state.dart
  11. 0 7
      packages/cpt_sg/lib/router/sg_router.dart
  12. 15 0
      packages/cs_domain/lib/constants/api_constants.dart
  13. 28 0
      packages/cs_domain/lib/entity/response/s_g_labour_review_option_entity.dart
  14. 61 0
      packages/cs_domain/lib/entity/response/s_g_labour_review_table_entity.dart
  15. 14 0
      packages/cs_domain/lib/generated/json/base/json_convert_content.dart
  16. 51 0
      packages/cs_domain/lib/generated/json/s_g_labour_review_option_entity.g.dart
  17. 135 0
      packages/cs_domain/lib/generated/json/s_g_labour_review_table_entity.g.dart
  18. 195 0
      packages/cs_domain/lib/repository/labour_sg_repository.dart
  19. 0 1
      packages/cs_router/lib/path/router_path.dart

+ 37 - 23
packages/cpt_sg/lib/modules/labour/labour_request_edit/labour_request_edit_controller.dart

@@ -5,6 +5,7 @@ import 'package:plugin_platform/engine/loading/loading_engine.dart';
 import 'package:plugin_platform/engine/notify/notify_engine.dart';
 import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:plugin_platform/http/dio/dio_cancelable_mixin.dart';
+import 'package:plugin_platform/http/http_result.dart';
 import 'package:shared/utils/date_time_utils.dart';
 import 'package:shared/utils/log_utils.dart';
 import 'package:shared/utils/util.dart';
@@ -171,27 +172,46 @@ class LabourRequestEditController extends GetxController with DioCancelableMixin
       }
     }
 
-    var result = await _labourRepository.editLabourRequestSubmit(
-      requestId: state.requestId,
-      startTime: DateTimeUtils.formatDate(state.selectedStartTime),
-      endTime: DateTimeUtils.formatDate(state.selectedEndTime),
-      outletId: state.selectedOutletId,
-      sexLimit: state.genderOptionType,
-      maleLimit: maleNo,
-      femaleLimit: femaleNo,
-      needNum: needNo,
-      requestType: state.selectRequestTypeId,
-      positionId: state.selectPositionId,
-      remark: remark,
-      cancelToken: cancelToken,
-    );
+    HttpResult result;
+    if (state.pageType == 1) {
+      result = await _labourRepository.editLabourRequestSubmit(
+        requestId: state.requestId,
+        startTime: DateTimeUtils.formatDate(state.selectedStartTime),
+        endTime: DateTimeUtils.formatDate(state.selectedEndTime),
+        outletId: state.selectedOutletId,
+        sexLimit: state.genderOptionType,
+        maleLimit: maleNo,
+        femaleLimit: femaleNo,
+        needNum: needNo,
+        requestType: state.selectRequestTypeId,
+        positionId: state.selectPositionId,
+        remark: remark,
+        cancelToken: cancelToken,
+      );
+    } else {
+      // state.pageType == 3 这是 LabourRequestReview 的编辑提交
+      result = await _labourRepository.editLabourRequestReviewSubmit(
+        requestId: state.requestId,
+        startTime: DateTimeUtils.formatDate(state.selectedStartTime),
+        endTime: DateTimeUtils.formatDate(state.selectedEndTime),
+        outletId: state.selectedOutletId,
+        sexLimit: state.genderOptionType,
+        maleLimit: maleNo,
+        femaleLimit: femaleNo,
+        needNum: needNo,
+        requestType: state.selectRequestTypeId,
+        positionId: state.selectPositionId,
+        remark: remark,
+        cancelToken: cancelToken,
+      );
+    }
 
     //处理数据
     if (result.isSuccess) {
       NotifyEngine.showSuccess("Successful".tr);
 
       //根据类型刷新
-      state.cb?.call(true);
+      state.cb?.call(state.requestId);
 
       Get.back();
     } else {
@@ -225,14 +245,8 @@ class LabourRequestEditController extends GetxController with DioCancelableMixin
       items: list,
       initialSelectIndex: selectedIndex,
       onPickerChanged: (_, index) {
-        if (index == 0) {
-          state.selectPositionId = null;
-          state.selectPositionName = null;
-        } else {
-          state.selectPositionId = state.editDetailEntity!.positionList[index - 1].value!.toString();
-          state.selectPositionName = state.editDetailEntity!.positionList[index - 1].txt!.toString();
-        }
-
+        state.selectPositionId = state.editDetailEntity!.positionList[index].value!.toString();
+        state.selectPositionName = state.editDetailEntity!.positionList[index].txt!.toString();
         update();
       },
     );

+ 22 - 21
packages/cpt_sg/lib/modules/labour/labour_request_edit/labour_request_edit_page.dart

@@ -29,7 +29,7 @@ import 'labour_request_edit_state.dart';
 class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditController> {
   LabourRequestEditPage({Key? key}) : super(key: key);
 
-  //启动当前页面,pageType  1是编辑  2是详情
+  //启动当前页面,pageType  1是编辑  2是详情  3是review编辑  4是review详情
   static void startInstance(int pageType, String? requestId, void Function(dynamic value)? cb) {
     return Get.start(RouterPath.labourRequestEditSG, arguments: {'pageType': pageType, 'requestId': requestId, 'cb': cb});
   }
@@ -54,7 +54,7 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
     return autoCtlGetBuilder(builder: (controller) {
       return Scaffold(
         extendBodyBehindAppBar: true,
-        appBar: MyAppBar.appBar(context, state.pageType == 1 ? "Edit Labour Requisition".tr : "Labour Requisition".tr),
+        appBar: MyAppBar.appBar(context, state.pageType == 1 || state.pageType == 3 ? "Edit Labour Requisition".tr : "Labour Requisition".tr),
         body: SafeArea(
           bottom: true,
           top: false,
@@ -158,7 +158,7 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                               padding: const EdgeInsets.only(left: 16, right: 10),
                               height: 45,
                               decoration: BoxDecoration(
-                                color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
+                                color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 || state.pageType == 4 ? 0.5 : 0.2),
                                 borderRadius: const BorderRadius.all(Radius.circular(5)),
                               ),
                               child: Row(
@@ -176,14 +176,14 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                                   ).expanded(),
                                   //下拉选图标
                                   Visibility(
-                                    visible: state.pageType != 2,
+                                    visible: state.pageType == 1 || state.pageType == 3,
                                     child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
                                   ),
                                 ],
                               ),
                             ).onTap(() {
                               FocusScope.of(context).unfocus();
-                              if (state.pageType != 2) controller.pickStartTime();
+                              if (state.pageType == 1 || state.pageType == 3) controller.pickStartTime();
                             }),
                           ),
 
@@ -194,7 +194,7 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                               margin: const EdgeInsets.only(left: 10),
                               height: 45,
                               decoration: BoxDecoration(
-                                color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
+                                color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 || state.pageType == 4 ? 0.5 : 0.2),
                                 borderRadius: const BorderRadius.all(Radius.circular(5)),
                               ),
                               child: Row(
@@ -212,14 +212,14 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                                   ).expanded(),
                                   //下拉选图标
                                   Visibility(
-                                    visible: state.pageType != 2,
+                                    visible: state.pageType == 1 || state.pageType == 3,
                                     child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
                                   ),
                                 ],
                               ),
                             ).onTap(() {
                               FocusScope.of(context).unfocus();
-                              if (state.pageType != 2) controller.pickEndTime();
+                              if (state.pageType == 1 || state.pageType == 3) controller.pickEndTime();
                             }),
                           ),
                         ],
@@ -236,7 +236,7 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                         margin: const EdgeInsets.only(top: 10),
                         height: 45,
                         decoration: BoxDecoration(
-                          color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
+                          color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 || state.pageType == 4 ? 0.5 : 0.2),
                           borderRadius: const BorderRadius.all(Radius.circular(5)),
                         ),
                         child: Row(
@@ -253,14 +253,14 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                               textColor: ColorConstants.white,
                             ).expanded(),
                             Visibility(
-                              visible: state.pageType != 2,
+                              visible: state.pageType == 1 || state.pageType == 3,
                               child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
                             ),
                           ],
                         ),
                       ).onTap(() {
                         FocusScope.of(context).unfocus();
-                        if (state.pageType != 2) controller.pickOutlet();
+                        if (state.pageType == 1 || state.pageType == 3) controller.pickOutlet();
                       }),
 
                       //需要的人数
@@ -271,7 +271,7 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                       //选择人数类型单选
                       CustomRadioCheck(
                         options: state.genderOptions,
-                        enable: state.pageType != 2,
+                        enable: state.pageType == 1 || state.pageType == 3,
                         onOptionSelected: (index, text) {
                           state.genderOptionType = index;
                           controller.update();
@@ -289,8 +289,8 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                           paddingTop: 0,
                           paddingBottom: 0,
                           height: 45,
-                          fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
-                          enabled: state.pageType != 2,
+                          fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 || state.pageType == 4 ? 0.5 : 0.2),
+                          enabled: state.pageType == 1 || state.pageType == 3,
                           inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
                           textInputType: TextInputType.number,
                           formData: state.formData,
@@ -320,8 +320,8 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                               paddingTop: 0,
                               paddingBottom: 0,
                               height: 45,
-                              fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
-                              enabled: state.pageType != 2,
+                              fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 || state.pageType == 4 ? 0.5 : 0.2),
+                              enabled: state.pageType == 1 || state.pageType == 3,
                               inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
                               textInputType: TextInputType.number,
                               formData: state.formData,
@@ -345,8 +345,8 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                               paddingTop: 0,
                               paddingBottom: 0,
                               height: 45,
-                              fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
-                              enabled: state.pageType != 2,
+                              fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 || state.pageType == 4 ? 0.5 : 0.2),
+                              enabled: state.pageType == 1 || state.pageType == 3,
                               inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
                               textInputType: TextInputType.number,
                               formData: state.formData,
@@ -380,6 +380,7 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                             state.selectRequestTypeId = state.editDetailEntity!.requestType[index].value;
                             controller.update(["position"]);
                           },
+                          enable: state.pageType == 1 || state.pageType == 3,
                           selectedPosition: state.editDetailEntity == null ? -1 : state.editDetailEntity?.requestType.indexWhere((e) => e.checked == "checked"),
                         ).marginOnly(top: 10),
                       ),
@@ -437,14 +438,14 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
                           margin: const EdgeInsets.only(top: 10),
                           padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 15),
                           decoration: BoxDecoration(
-                            color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
+                            color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 || state.pageType == 4 ? 0.5 : 0.2),
                             borderRadius: const BorderRadius.all(Radius.circular(5)),
                           ),
                           child: TextField(
                             cursorColor: ColorConstants.white,
                             cursorWidth: 1.5,
                             autofocus: false,
-                            enabled: state.pageType != 2,
+                            enabled: state.pageType == 1 || state.pageType == 3,
                             focusNode: state.formData["remark"]!['focusNode'],
                             controller: state.formData["remark"]!['controller'],
                             // 装饰
@@ -475,7 +476,7 @@ class LabourRequestEditPage extends BaseStatelessPage<LabourRequestEditControlle
 
                       //提交按钮
                       Visibility(
-                        visible: state.pageType != 2,
+                        visible: state.pageType == 1 || state.pageType == 3,
                         child: MyButton(
                           type: ClickType.throttle,
                           milliseconds: 500,

+ 1 - 1
packages/cpt_sg/lib/modules/labour/labour_request_edit/labour_request_edit_state.dart

@@ -36,7 +36,7 @@ class LabourRequestEditState {
     },
   };
 
-  int pageType = 2;  //页面的状态 1是编辑  2是详
+  int pageType = 2;  //pageType  1是编辑  2是详情  3是review编辑  4是review详
   String? requestId;  //编辑和详情需要用到ID
   void Function(dynamic value)? cb;
 

+ 0 - 196
packages/cpt_sg/lib/modules/review/labour_review_edit/labour_review_edit_controller.dart

@@ -1,196 +0,0 @@
-import 'package:domain/entity/response/labour_request_edit_index_entity.dart';
-import 'package:domain/repository/labour_repository.dart';
-import 'package:flutter/cupertino.dart';
-import 'package:get/get.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/http/dio/dio_cancelable_mixin.dart';
-import 'package:plugin_platform/http/http_result.dart';
-import 'package:shared/utils/date_time_utils.dart';
-import 'package:shared/utils/event_bus.dart';
-import 'package:shared/utils/util.dart';
-import 'package:widgets/picker/date_picker_util.dart';
-import 'package:widgets/picker/option_pick_util.dart';
-
-import 'labour_review_edit_state.dart';
-
-class LabourReviewEditController extends GetxController with DioCancelableMixin {
-  final LabourRepository _labourRepository = Get.find();
-  final LabourReviewEditState state = LabourReviewEditState();
-
-  /// 获取首页的数据
-  void fetchRequestDetail() async {
-    //获取到数据
-
-    final taskFuture = _labourRepository.fetchLabourReviewDetail(state.requestId, cancelToken: cancelToken);
-
-    var result = await taskFuture;
-
-    //处理数据
-    if (result.isSuccess) {
-      state.labReqOption = result.data;
-      state.selectedStartTime = state.labReqOption?.jobStart == null ? null : DateTimeUtils.getDateTime(state.labReqOption!.jobStart!);
-      state.selectedEndTime = state.labReqOption?.jobEnd == null ? null : DateTimeUtils.getDateTime(state.labReqOption!.jobEnd!);
-      state.noStaff = state.labReqOption?.needNum.toString() == "0" ? "" : state.labReqOption?.needNum.toString();
-      var needNumController = state.formData['no_of_staff']!['controller'];
-      needNumController.text = state.noStaff;
-      var amountController = state.formData['amount']!['controller'];
-      amountController.text = state.labReqOption?.amount ?? "";
-      state.selectedTemplateId = state.labReqOption?.templateId;
-      state.selectedDepartmentId = state.labReqOption?.departmentId;
-
-      state.chargeOptionId = state.labReqOption?.chargeList.firstWhere((element) => element.checked == "checked").value;
-
-      update();
-    } else {
-      ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
-    }
-  }
-
-  @override
-  void onReady() {
-    super.onReady();
-    fetchRequestDetail();
-  }
-
-  /// 提交
-  void doSubmit() async {
-    var needNumController = state.formData['no_of_staff']!['controller'];
-    var amountController = state.formData['amount']!['controller'];
-    String needNum = needNumController.text.toString();
-    String amount = amountController.text.toString();
-
-    if (Utils.isEmpty(state.selectedTemplateId)) {
-      ToastEngine.show("Choose Job Title".tr);
-      return;
-    } else if (state.selectedStartTime == null) {
-      ToastEngine.show("Choose Start Date".tr);
-      return;
-    } else if (state.selectedEndTime == null) {
-      ToastEngine.show("Choose End Date".tr);
-      return;
-    } else if (Utils.isEmpty(state.selectedDepartmentId)) {
-      ToastEngine.show("Choose Outlet".tr);
-      return;
-    } else if (Utils.isEmpty(needNum)) {
-      ToastEngine.show("Enter No. of Staff".tr);
-      return;
-    } else if (state.labReqOption?.serviceType == 1 && Utils.isEmpty(amount)) {
-      ToastEngine.show("Enter Amount".tr);
-      return;
-    }
-
-
-    var result = await _labourRepository.editLabourReviewSubmit(
-      state.requestId,
-      state.selectedTemplateId,
-      DateTimeUtils.formatDate(state.selectedStartTime),
-      DateTimeUtils.formatDate(state.selectedEndTime),
-      state.selectedDepartmentId,
-      needNum,
-      state.chargeOptionId,
-      state.labReqOption?.serviceType == 1 ? amount : null,
-    );
-
-    //处理数据
-    if (result.isSuccess) {
-      NotifyEngine.showSuccess("Successful".tr);
-
-      //根据类型刷新
-      state.cb?.call(state.requestId ?? "");
-
-      Get.back();
-    } else {
-      ToastEngine.show(result.errorMsg ?? "Network Load Error".tr);
-    }
-  }
-
-  // 筛选工作模板
-  void pickJobTitle() {
-    if (state.labReqOption == null || state.pageType == 2) {
-      return;
-    }
-
-    int selectedTemplateIndex;
-    if (state.selectedTemplateId == null) {
-      selectedTemplateIndex = 0;
-    } else {
-      selectedTemplateIndex = state.labReqOption!.templateList.indexWhere((department) => department.value.toString() == state.selectedTemplateId);
-    }
-
-    if (selectedTemplateIndex < 0) {
-      selectedTemplateIndex = 0;
-    }
-
-    OptionPickerUtil.showCupertinoOptionPicker(
-      items: state.labReqOption!.templateList.map((e) => e.txt!).toList(growable: false),
-      initialSelectIndex: selectedTemplateIndex,
-      onPickerChanged: (_, index) {
-        state.selectedTemplateId = state.labReqOption!.templateList[index].value!.toString();
-        update();
-      },
-    );
-  }
-
-  //选择开始时间
-  void pickStartTime() {
-    if (state.labReqOption == null || state.pageType == 2) {
-      return;
-    }
-
-    DatePickerUtil.showCupertinoDatePicker(
-      selectedDateTime: state.selectedStartTime,
-      mode: CupertinoDatePickerMode.dateAndTime,
-      onDateTimeChanged: (date) {
-        state.selectedStartTime = date;
-        update();
-      },
-      title: "Start Time".tr,
-    );
-  }
-
-  // 选择结束时间
-  void pickEndTime() {
-    if (state.labReqOption == null || state.pageType == 2) {
-      return;
-    }
-
-    DatePickerUtil.showCupertinoDatePicker(
-      selectedDateTime: state.selectedEndTime ?? state.selectedStartTime,
-      mode: CupertinoDatePickerMode.dateAndTime,
-      onDateTimeChanged: (date) {
-        state.selectedEndTime = date;
-        update();
-      },
-      title: "End Time".tr,
-    );
-  }
-
-  // 筛选部门
-  void pickDepartment() {
-    if (state.labReqOption == null || state.pageType == 2) {
-      return;
-    }
-
-    int selectedDepartmentIndex;
-    if (state.selectedDepartmentId == null) {
-      selectedDepartmentIndex = 0;
-    } else {
-      selectedDepartmentIndex = state.labReqOption!.departmentList.indexWhere((department) => department.value.toString() == state.selectedDepartmentId);
-    }
-
-    if (selectedDepartmentIndex < 0) {
-      selectedDepartmentIndex = 0;
-    }
-
-    OptionPickerUtil.showCupertinoOptionPicker(
-      items: state.labReqOption!.departmentList.map((e) => e.txt!).toList(growable: false),
-      initialSelectIndex: selectedDepartmentIndex,
-      onPickerChanged: (_, index) {
-        state.selectedDepartmentId = state.labReqOption!.departmentList[index].value!.toString();
-        update();
-      },
-    );
-  }
-}

+ 0 - 357
packages/cpt_sg/lib/modules/review/labour_review_edit/labour_review_edit_page.dart

@@ -1,357 +0,0 @@
-import 'package:cs_resources/constants/color_constants.dart';
-import 'package:cs_resources/generated/assets.dart';
-import 'package:domain/entity/response/labour_request_edit_index_entity.dart';
-import 'package:flutter/cupertino.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
-import 'package:flutter/widgets.dart';
-import 'package:get/get.dart';
-import 'package:plugin_basic/base/base_state.dart';
-import 'package:plugin_basic/base/base_stateful_page.dart';
-import 'package:plugin_basic/utils/ext_get_nav.dart';
-import 'package:router/path/router_path.dart';
-import 'package:shared/utils/date_time_utils.dart';
-import 'package:shared/utils/screen_util.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/no_shadow_scroll_behavior.dart';
-import 'package:widgets/shatter/custom_radio_check.dart';
-import 'package:widgets/shatter/form_require_text.dart';
-import 'package:widgets/shatter/round_my_text_field.dart';
-
-import 'labour_review_edit_controller.dart';
-import 'labour_review_edit_state.dart';
-
-class SGLabourReviewEditPage extends BaseStatefulPage<LabourReviewEditController> {
-  SGLabourReviewEditPage({Key? key}) : super(key: key);
-
-  //启动当前页面,pageType  1是编辑  2是详情
-  static void startInstance(int pageType, String? requestId,void Function(dynamic value)? cb) {
-    return Get.start(RouterPath.SGLabourReviewEdit, arguments: {'pageType': pageType, 'requestId': requestId,'cb': cb});
-  }
-
-  @override
-  LabourReviewEditController createRawController() {
-    return LabourReviewEditController();
-  }
-
-  @override
-  State<SGLabourReviewEditPage> createState() => _LabourReviewEditState();
-}
-
-class _LabourReviewEditState extends BaseState<SGLabourReviewEditPage, LabourReviewEditController> {
-  late LabourReviewEditState state;
-
-  @override
-  void initState() {
-    super.initState();
-    state = controller.state;
-    state.pageType = Get.arguments['pageType'];
-    state.requestId = Get.arguments['requestId'];
-    state.cb = Get.arguments['cb'] as void Function(dynamic)?;
-  }
-
-  @override
-  Widget build(BuildContext context) {
-    return autoCtlGetBuilder(builder: (controller) {
-      return Scaffold(
-        extendBodyBehindAppBar: true,
-        appBar: MyAppBar.appBar(context, state.pageType == 1 ? "Edit Labour Requisition".tr : "Labour Requisition".tr),
-        body: SafeArea(
-          bottom: true,
-          top: false,
-          child: Container(
-            width: double.infinity,
-            height: double.infinity,
-            padding: EdgeInsets.only(top: kToolbarHeight + ScreenUtil.getStatusBarH(context) + 1),
-            decoration: const BoxDecoration(
-              gradient: LinearGradient(
-                colors: [
-                  Color(0xFF091D44),
-                  Color(0xFF245A8A),
-                  Color(0xFF7F7CEC),
-                ],
-                begin: Alignment.topCenter,
-                end: Alignment.bottomCenter,
-              ),
-            ),
-            child: Scrollbar(
-              child: ScrollConfiguration(
-                behavior: NoShadowScrollBehavior(),
-                child: SingleChildScrollView(
-                  scrollDirection: Axis.vertical,
-                  physics: const BouncingScrollPhysics(),
-                  child: Column(
-                    crossAxisAlignment: CrossAxisAlignment.start,
-                    children: [
-                      //工作标题,选择模板
-                      FormRequireText(
-                        text: "Job Title".tr,
-                      ).marginOnly(top: 15),
-
-                      //工作标题
-                      Container(
-                        padding: const EdgeInsets.only(left: 16, right: 10),
-                        margin: const EdgeInsets.only(top: 10),
-                        height: 45,
-                        decoration: BoxDecoration(
-                          color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
-                          borderRadius: const BorderRadius.all(Radius.circular(5)),
-                        ),
-                        child: Row(
-                          mainAxisSize: MainAxisSize.max,
-                          crossAxisAlignment: CrossAxisAlignment.center,
-                          mainAxisAlignment: MainAxisAlignment.start,
-                          children: [
-                            MyTextView(
-                              state.selectedTemplateId == null || state.selectedTemplateId == "0"
-                                  ? ""
-                                  : state.labReqOption!.templateList
-                                          .firstWhere((element) => element.value.toString() == state.selectedTemplateId,
-                                              orElse: () => LabourRequestEditIndexTemplateList())
-                                          .txt ??
-                                      "",
-                              fontSize: 14,
-                              hint: "Choose Job Title".tr,
-                              textHintColor: ColorConstants.textGrayAECAE5,
-                              isFontMedium: true,
-                              textColor: ColorConstants.white,
-                            ).expanded(),
-
-                            //下拉选图标
-                            Visibility(
-                              visible: state.pageType != 2,
-                              child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
-                            ),
-                          ],
-                        ),
-                      ).onTap(() {
-                        FocusScope.of(context).unfocus();
-                        controller.pickJobTitle();
-                      }),
-
-                      //开始时间
-                      FormRequireText(
-                        text: "Start Time".tr,
-                      ).marginOnly(top: 15),
-
-                      //选择时间
-                      Container(
-                        padding: const EdgeInsets.only(left: 16, right: 10),
-                        margin: const EdgeInsets.only(top: 10),
-                        height: 45,
-                        decoration: BoxDecoration(
-                          color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
-                          borderRadius: const BorderRadius.all(Radius.circular(5)),
-                        ),
-                        child: Row(
-                          mainAxisSize: MainAxisSize.max,
-                          crossAxisAlignment: CrossAxisAlignment.center,
-                          mainAxisAlignment: MainAxisAlignment.start,
-                          children: [
-                            MyTextView(
-                              state.selectedStartTime == null ? "" : DateTimeUtils.formatDate(state.selectedStartTime),
-                              fontSize: 14,
-                              hint: "Job Start Time".tr,
-                              textHintColor: ColorConstants.textGrayAECAE5,
-                              isFontMedium: true,
-                              textColor: ColorConstants.white,
-                            ).expanded(),
-                            //下拉选图标
-                            Visibility(
-                              visible: state.pageType != 2,
-                              child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
-                            ),
-                          ],
-                        ),
-                      ).onTap(() {
-                        FocusScope.of(context).unfocus();
-                        controller.pickStartTime();
-                      }),
-
-                      //结束时间
-                      FormRequireText(
-                        text: "End Time".tr,
-                      ).marginOnly(top: 15),
-
-                      //选择时间
-                      Container(
-                        padding: const EdgeInsets.only(left: 16, right: 10),
-                        margin: const EdgeInsets.only(top: 10),
-                        height: 45,
-                        decoration: BoxDecoration(
-                          color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
-                          borderRadius: const BorderRadius.all(Radius.circular(5)),
-                        ),
-                        child: Row(
-                          mainAxisSize: MainAxisSize.max,
-                          crossAxisAlignment: CrossAxisAlignment.center,
-                          mainAxisAlignment: MainAxisAlignment.start,
-                          children: [
-                            MyTextView(
-                              state.selectedEndTime == null ? "" : DateTimeUtils.formatDate(state.selectedEndTime),
-                              fontSize: 14,
-                              hint: "Job End Time".tr,
-                              textHintColor: ColorConstants.textGrayAECAE5,
-                              isFontMedium: true,
-                              textColor: ColorConstants.white,
-                            ).expanded(),
-                            //下拉选图标
-                            Visibility(
-                              visible: state.pageType != 2,
-                              child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
-                            ),
-                          ],
-                        ),
-                      ).onTap(() {
-                        FocusScope.of(context).unfocus();
-                        controller.pickEndTime();
-                      }),
-
-                      //工作选择部门
-                      FormRequireText(
-                        text: "Outlet".tr,
-                      ).marginOnly(top: 15),
-
-                      //选择部门
-                      Container(
-                        padding: const EdgeInsets.only(left: 16, right: 10),
-                        margin: const EdgeInsets.only(top: 10),
-                        height: 45,
-                        decoration: BoxDecoration(
-                          color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
-                          borderRadius: const BorderRadius.all(Radius.circular(5)),
-                        ),
-                        child: Row(
-                          mainAxisSize: MainAxisSize.max,
-                          crossAxisAlignment: CrossAxisAlignment.center,
-                          mainAxisAlignment: MainAxisAlignment.start,
-                          children: [
-                            MyTextView(
-                              state.selectedDepartmentId == null || state.selectedDepartmentId == "0"
-                                  ? ""
-                                  : state.labReqOption!.departmentList
-                                          .firstWhere((element) => element.value.toString() == state.selectedDepartmentId,
-                                              orElse: () => LabourRequestEditIndexDepartmentList())
-                                          .txt ??
-                                      "",
-                              fontSize: 14,
-                              hint: "Choose Outlet".tr,
-                              textHintColor: ColorConstants.textGrayAECAE5,
-                              isFontMedium: true,
-                              textColor: ColorConstants.white,
-                            ).expanded(),
-                            //下拉选图标
-                            Visibility(
-                              visible: state.pageType != 2,
-                              child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
-                            ),
-                          ],
-                        ),
-                      ).onTap(() {
-                        FocusScope.of(context).unfocus();
-                        controller.pickDepartment();
-                      }),
-
-                      //需要的人数
-                      FormRequireText(
-                        text: "No. of Staff".tr,
-                      ).marginOnly(top: 15),
-
-                      //输入框(只允许输入数字)
-                      CustomTextField(
-                        formKey: "no_of_staff",
-                        marginLeft: 0,
-                        marginRight: 0,
-                        paddingTop: 0,
-                        paddingBottom: 0,
-                        height: 45,
-                        fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
-                        enabled: state.pageType != 2,
-                        inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
-                        textInputType: TextInputType.number,
-                        formData: state.formData,
-                        textInputAction: TextInputAction.done,
-                        onSubmit: (key, value) {
-                          FocusScope.of(context).unfocus();
-                        },
-                        marginTop: 10,
-                      ),
-
-                      FormRequireText(
-                        text: "Salary By".tr,
-                      ).marginOnly(top: 15),
-
-                      //选择计费类型
-                      state.labReqOption != null
-                          ? CustomRadioCheck(
-                              options: state.labReqOption!.chargeList.map((e) => e.txt).whereType<String>().toList(), //后台返回的数据展示,并且根据后台的数据匹配索引
-                              selectedPosition: state.labReqOption!.chargeList.indexWhere((element) => element.checked == "checked"),
-                              onOptionSelected: (index, text) {
-                                //修改内存的值
-                                state.chargeOptionId = state.labReqOption!.chargeList[index].value;
-                              },
-                            ).marginOnly(top: 15)
-                          : const CircularProgressIndicator(),
-
-                      //选择是否需要输入金额
-                      Visibility(
-                        visible: state.labReqOption?.serviceType == 1,
-                        child: FormRequireText(
-                          text: "Amount".tr,
-                        ).marginOnly(top: 15),
-                      ),
-
-                      Visibility(
-                        visible: state.labReqOption?.serviceType == 1,
-                        child: CustomTextField(
-                          formKey: "amount",
-                          marginLeft: 0,
-                          marginRight: 0,
-                          paddingTop: 0,
-                          paddingBottom: 0,
-                          height: 45,
-                          fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 ? 0.5 : 0.2),
-                          enabled: state.pageType != 2,
-                          textInputType: TextInputType.number,
-                          formData: state.formData,
-                          textInputAction: TextInputAction.done,
-                          onSubmit: (key, value) {
-                            FocusScope.of(context).unfocus();
-                          },
-                          marginTop: 10,
-                        ),
-                      ),
-
-                      //提交按钮
-                      Visibility(
-                        visible: state.pageType != 2,
-                        child: MyButton(
-                          type: ClickType.throttle,
-                          milliseconds: 500,
-                          onPressed: () {
-                            FocusScope.of(context).unfocus();
-                            controller.doSubmit();
-                          },
-                          text: "Submit".tr,
-                          textColor: ColorConstants.white,
-                          fontSize: 16,
-                          radius: 22.5,
-                          backgroundColor: hexToColor("#FFBB1B"),
-                          fontWeight: FontWeight.w500,
-                        ).marginSymmetric(horizontal: 0, vertical: 30),
-                      ),
-                    ],
-                  ).paddingOnly(left: 15, right: 15),
-                ),
-              ),
-            ),
-          ),
-        ),
-      );
-    });
-  }
-}

+ 0 - 41
packages/cpt_sg/lib/modules/review/labour_review_edit/labour_review_edit_state.dart

@@ -1,41 +0,0 @@
-import 'package:domain/entity/response/labour_request_edit_index_entity.dart';
-import 'package:flutter/material.dart';
-import 'package:plugin_basic/basic_export.dart';
-
-class LabourReviewEditState {
-
-  int pageType = 2;  //页面的状态 1是编辑  2是详情
-  String? requestId;  //编辑和详情需要用到ID
-  void Function(dynamic value)? cb;
-
-  //页面对应的详情数据
-  LabourRequestEditIndexEntity? labReqOption;
-
-  //页面对应的选择的条件
-  DateTime? selectedStartTime;
-  DateTime? selectedEndTime;
-  String? selectedTemplateId;
-  String? selectedDepartmentId;
-  String? noStaff;  //成员数量
-
-  String? chargeOptionId;
-
-  //表单的校验与数据
-  Map<String, Map<String, dynamic>> formData = {
-    'no_of_staff': {
-      'value': '',
-      'controller': TextEditingController(),
-      'focusNode': FocusNode(),
-      'hintText': 'Enter No. of Staff'.tr,
-      'obsecure': false,
-    },
-    'amount': {
-      'value': '',
-      'controller': TextEditingController(),
-      'focusNode': FocusNode(),
-      'hintText': 'Enter Amount'.tr,
-      'obsecure': false,
-    },
-  };
-
-}

+ 33 - 27
packages/cpt_sg/lib/modules/review/labour_review_list/labour_review_controller.dart

@@ -1,6 +1,6 @@
-import 'package:domain/entity/response/labour_request_index_entity.dart';
-import 'package:domain/entity/response/labour_review_list_entity.dart';
-import 'package:domain/repository/labour_repository.dart';
+import 'package:domain/entity/response/s_g_labour_review_option_entity.dart';
+import 'package:domain/entity/response/s_g_labour_review_table_entity.dart';
+import 'package:domain/repository/labour_sg_repository.dart';
 import 'package:get/get.dart';
 import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
 import 'package:plugin_platform/engine/notify/notify_engine.dart';
@@ -13,14 +13,14 @@ import 'package:shared/utils/util.dart';
 import 'package:widgets/dialog/app_default_dialog.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
-import '../labour_review_edit/labour_review_edit_page.dart';
+import '../../labour/labour_request_edit/labour_request_edit_page.dart';
 import '../labour_review_workflow/labour_review_workflow_page.dart';
 import 'labour_review_filter.dart';
 import 'labour_review_reject_dialog.dart';
 import 'labour_review_state.dart';
 
 class LabourReviewController extends GetxController with DioCancelableMixin {
-  final LabourRepository _labourRepository = Get.find();
+  final LabourSGRepository _labourRepository = Get.find();
   final LabourReviewState state = LabourReviewState();
 
   var _curPage = 1;
@@ -69,16 +69,17 @@ class LabourReviewController extends GetxController with DioCancelableMixin {
 
     // 并发执行两个请求
     var futures = [
-      _labourRepository.fetchLabourReviewList(
-        state.keyword,
-        DateTimeUtils.formatDate(state.selectedStartDate, format: "yyyy-MM-dd"),
-        DateTimeUtils.formatDate(state.selectedEndDate, format: "yyyy-MM-dd"),
-        state.selectedDepartmentId,
+      _labourRepository.fetchLabourReviewTable(
+        keyword: state.keyword,
+        startDate: DateTimeUtils.formatDate(state.selectedStartDate, format: "yyyy-MM-dd"),
+        endDate: DateTimeUtils.formatDate(state.selectedEndDate, format: "yyyy-MM-dd"),
+        outletId: state.selectedDepartmentId,
+        agencyId: state.selectedSourceId,
         curPage: _curPage,
         cancelToken: cancelToken,
       ),
       state.indexOptions == null
-          ? _labourRepository.fetchLabourReviewIndex(
+          ? _labourRepository.fetchLabourReviewOption(
               cancelToken: cancelToken,
             )
           : Future(() => HttpResult(isSuccess: true).convert(data: state.indexOptions!)),
@@ -86,8 +87,8 @@ class LabourReviewController extends GetxController with DioCancelableMixin {
 
     //拿到结果
     var results = await Future.wait(futures);
-    var listResult = results[0] as HttpResult<LabourReviewListEntity>;
-    var optionResult = results[1] as HttpResult<LabourRequestIndexEntity>;
+    var listResult = results[0] as HttpResult<SGLabourReviewTableEntity>;
+    var optionResult = results[1] as HttpResult<SGLabourReviewOptionEntity>;
 
     //选项数据
     if (state.indexOptions == null && optionResult.isSuccess) {
@@ -107,7 +108,7 @@ class LabourReviewController extends GetxController with DioCancelableMixin {
   }
 
   // 处理数据与展示的逻辑
-  void handleList(List<LabourReviewListRows>? list) {
+  void handleList(List<SGLabourReviewTableRows>? list) {
     if (list != null && list.isNotEmpty) {
       //有数据,判断是刷新还是加载更多的数据
       if (_curPage == 1) {
@@ -163,12 +164,14 @@ class LabourReviewController extends GetxController with DioCancelableMixin {
     state.selectedStartDate = null;
     state.selectedEndDate = null;
     state.selectedDepartmentId = null;
+    state.selectedSourceId = null;
+
     //赋值之后刷新
     refreshController.callRefresh();
   }
 
   /// Item选中与未选中设置
-  void doSelectedOrNot(LabourReviewListRows data) {
+  void doSelectedOrNot(SGLabourReviewTableRows data) {
     data.isSelected = !data.isSelected;
     Log.d("isSelected:${data.isSelected}");
     update();
@@ -277,11 +280,13 @@ class LabourReviewController extends GetxController with DioCancelableMixin {
           optionResult: state.indexOptions!,
           selectedStartDate: state.selectedStartDate,
           selectedEndDate: state.selectedEndDate,
-          selectedDepartmentId: state.selectedDepartmentId,
-          onFilterAction: (startDate, endDate, departmentId) {
+          outletId: state.selectedDepartmentId,
+          sourceId: state.selectedSourceId,
+          onFilterAction: (startDate, endDate, outletId,sourceId) {
             state.selectedStartDate = startDate;
             state.selectedEndDate = endDate;
-            state.selectedDepartmentId = departmentId;
+            state.selectedDepartmentId = outletId;
+            state.selectedSourceId = sourceId;
 
             //赋值之后刷新
             refreshController.callRefresh();
@@ -294,13 +299,13 @@ class LabourReviewController extends GetxController with DioCancelableMixin {
   }
 
   /// 去详情页面
-  void gotoDetailPage(LabourReviewListRows data) {
-    SGLabourReviewEditPage.startInstance(2, data.requestId, null);
+  void gotoDetailPage(SGLabourReviewTableRows data) {
+    LabourRequestEditPage.startInstance(4, data.requestId, null);
   }
 
   /// 去编辑页面
-  void gotoEditPage(LabourReviewListRows data) {
-    SGLabourReviewEditPage.startInstance(1, data.requestId, (result) {
+  void gotoEditPage(SGLabourReviewTableRows data) {
+    LabourRequestEditPage.startInstance(3, data.requestId, (result) {
       if (Utils.isNotEmpty(result)) {
         fetchItemByIdAndRefreshItem(data.recordId);
       }
@@ -308,14 +313,15 @@ class LabourReviewController extends GetxController with DioCancelableMixin {
   }
 
   /// 去用工审核流程页面
-  void gotoStatusViewPage(LabourReviewListRows data) {
+  void gotoStatusViewPage(SGLabourReviewTableRows data) {
     SGLabourReviewWorkflowPage.startInstance(data.requestId);
   }
 
   /// 根据ID获取Item对象,用于刷新
   void fetchItemByIdAndRefreshItem(String? recordId) async {
-    var result = await _labourRepository.fetchItemByRecordId(
-      recordId,
+    var result = await _labourRepository.fetchLabourReviewTable(
+      recordId: recordId,
+      curPage: 1,
       cancelToken: cancelToken,
     );
 
@@ -323,10 +329,10 @@ class LabourReviewController extends GetxController with DioCancelableMixin {
     if (result.isSuccess) {
       var data = result.data;
       if (data != null && data.rows.isNotEmpty) {
-        List<LabourReviewListRows> newItem = data.rows;
+        List<SGLabourReviewTableRows> newItem = data.rows;
 
         // 创建一个 Map 来加速查找
-        Map<String, LabourReviewListRows> newItemMap = {for (var item in newItem) item.recordId ?? "": item};
+        Map<String, SGLabourReviewTableRows> newItemMap = {for (var item in newItem) item.recordId ?? "": item};
 
         // 遍历 state.datas 进行替换
         for (int i = 0; i < state.datas.length; i++) {

+ 75 - 32
packages/cpt_sg/lib/modules/review/labour_review_list/labour_review_filter.dart

@@ -1,13 +1,12 @@
 import 'dart:typed_data';
 import 'dart:ui';
 import 'package:cs_resources/generated/assets.dart';
-import 'package:domain/entity/response/labour_request_index_entity.dart';
+import 'package:domain/entity/response/s_g_labour_review_option_entity.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/widgets.dart';
 import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
 import 'package:get/get.dart';
-import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:shared/utils/date_time_utils.dart';
 import 'package:shared/utils/screen_util.dart';
 import 'package:widgets/ext/ex_widget.dart';
@@ -23,17 +22,19 @@ import 'package:widgets/widget_export.dart';
  * 用工请求列表的筛选
  */
 class LabourReviewFilter extends StatefulWidget {
-  void Function(DateTime? selectedStartDate, DateTime? selectedEndDate, String? selectedDepartmentId)? onFilterAction;
-  LabourRequestIndexEntity optionResult;
+  void Function(DateTime? selectedStartDate, DateTime? selectedEndDate, String? outletId, String? sourceId)? onFilterAction;
+  SGLabourReviewOptionEntity optionResult;
   DateTime? selectedStartDate;
   DateTime? selectedEndDate;
-  String? selectedDepartmentId;
+  String? outletId;
+  String? sourceId;
 
   LabourReviewFilter({
     required this.optionResult,
     required this.selectedStartDate,
     required this.selectedEndDate,
-    required this.selectedDepartmentId,
+    required this.outletId,
+    required this.sourceId,
     this.onFilterAction,
   });
 
@@ -44,15 +45,16 @@ class LabourReviewFilter extends StatefulWidget {
 class _LabourReviewFilterState extends State<LabourReviewFilter> {
   DateTime? selectedStartDate;
   DateTime? selectedEndDate;
-  String? selectedStatusId;
-  String? selectedDepartmentId;
+  String? selectedOutletId;
+  String? selectedSourceId;
 
   @override
   void initState() {
     super.initState();
     this.selectedStartDate = widget.selectedStartDate;
     this.selectedEndDate = widget.selectedEndDate;
-    this.selectedDepartmentId = widget.selectedDepartmentId;
+    this.selectedOutletId = widget.outletId;
+    this.selectedSourceId = widget.sourceId;
   }
 
   @override
@@ -73,10 +75,50 @@ class _LabourReviewFilterState extends State<LabourReviewFilter> {
           child: Column(
             crossAxisAlignment: CrossAxisAlignment.start,
             children: [
+              //中介
+              MyTextView(
+                "Source".tr,
+                fontSize: 14,
+                isFontMedium: true,
+                textColor: ColorConstants.black33,
+              ),
+
+              //选择中介
+              Container(
+                padding: const EdgeInsets.only(left: 16, right: 10),
+                margin: const EdgeInsets.only(top: 10),
+                height: 45,
+                decoration: const BoxDecoration(
+                  color: ColorConstants.grayECECEC,
+                  borderRadius: BorderRadius.all(Radius.circular(5)),
+                ),
+                child: Row(
+                  mainAxisSize: MainAxisSize.max,
+                  crossAxisAlignment: CrossAxisAlignment.center,
+                  mainAxisAlignment: MainAxisAlignment.start,
+                  children: [
+                    MyTextView(
+                      selectedSourceId == null
+                          ? ""
+                          : widget.optionResult.sourceList.firstWhere((element) => element.value.toString() == selectedSourceId).txt!,
+                      hint: "Choose Source".tr,
+                      textHintColor: ColorConstants.textBlackHint,
+                      fontSize: 14,
+                      isFontMedium: true,
+                      textColor: ColorConstants.black33,
+                    ).expanded(),
+                    const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
+                  ],
+                ),
+              ).onTap(() {
+                pickerSource();
+              }),
+
               //部门
               MyTextView(
                 "Outlet".tr,
                 fontSize: 14,
+                marginTop: 11,
                 isFontMedium: true,
                 textColor: ColorConstants.black33,
               ),
@@ -96,16 +138,16 @@ class _LabourReviewFilterState extends State<LabourReviewFilter> {
                   mainAxisAlignment: MainAxisAlignment.start,
                   children: [
                     MyTextView(
-                      selectedDepartmentId == null || selectedDepartmentId == "0"
+                      selectedOutletId == null || selectedOutletId == "0"
                           ? ""
-                          : widget.optionResult.departmentList!.firstWhere((element) => element.value.toString() == selectedDepartmentId).txt!,
+                          : widget.optionResult.outletList.firstWhere((element) => element.value.toString() == selectedOutletId).txt!,
                       hint: "Choose Outlet".tr,
                       textHintColor: ColorConstants.textBlackHint,
                       fontSize: 14,
                       isFontMedium: true,
                       textColor: ColorConstants.black33,
                     ).expanded(),
-                    MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
+                    const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
                   ],
                 ),
               ).onTap(() {
@@ -196,13 +238,14 @@ class _LabourReviewFilterState extends State<LabourReviewFilter> {
                       //只是Reset当前的弹窗筛选选项
                       widget.selectedStartDate = null;
                       widget.selectedEndDate = null;
-                      widget.selectedDepartmentId = null;
+                      widget.outletId = null;
+                      widget.sourceId = null;
 
                       setState(() {
                         selectedStartDate = null;
                         selectedEndDate = null;
-                        selectedStatusId = null;
-                        selectedDepartmentId = null;
+                        selectedOutletId = null;
+                        selectedSourceId = null;
                       });
                     },
                     text: "Reset".tr,
@@ -212,11 +255,11 @@ class _LabourReviewFilterState extends State<LabourReviewFilter> {
                     minWidth: 60,
                     minHeight: 36,
                   ).expanded(),
-                  SizedBox(width: 15),
+                  const SizedBox(width: 15),
                   MyButton(
                     onPressed: () {
                       onCancel();
-                      widget.onFilterAction?.call(selectedStartDate, selectedEndDate, selectedDepartmentId);
+                      widget.onFilterAction?.call(selectedStartDate, selectedEndDate, selectedOutletId, selectedSourceId);
                     },
                     text: "Filter".tr,
                     textColor: ColorConstants.white,
@@ -271,10 +314,10 @@ class _LabourReviewFilterState extends State<LabourReviewFilter> {
   /// 筛选部门
   void pickerOutlet() {
     int selectedDepartmentIndex;
-    if (selectedDepartmentId == null) {
+    if (selectedOutletId == null) {
       selectedDepartmentIndex = 0;
     } else {
-      selectedDepartmentIndex = widget.optionResult.departmentList!.indexWhere((department) => department.value.toString() == selectedDepartmentId);
+      selectedDepartmentIndex = widget.optionResult.outletList.indexWhere((department) => department.value.toString() == selectedOutletId);
     }
 
     if (selectedDepartmentIndex < 0) {
@@ -282,35 +325,35 @@ class _LabourReviewFilterState extends State<LabourReviewFilter> {
     }
 
     OptionPickerUtil.showCupertinoOptionPicker(
-      items: widget.optionResult.departmentList!.map((e) => e.txt!).toList(growable: false),
+      items: widget.optionResult.outletList.map((e) => e.txt!).toList(growable: false),
       initialSelectIndex: selectedDepartmentIndex,
       onPickerChanged: (_, index) {
         setState(() {
-          selectedDepartmentId = widget.optionResult.departmentList![index].value!.toString();
+          selectedOutletId = widget.optionResult.outletList[index].value!.toString();
         });
       },
     );
   }
 
-  /// 筛选状态
-  void pickerStatus() {
-    int selectedStatusIndex;
-    if (selectedStatusId == null) {
-      selectedStatusIndex = 0;
+  /// 筛选Source
+  void pickerSource() {
+    int selectedIndex;
+    if (selectedSourceId == null) {
+      selectedIndex = 0;
     } else {
-      selectedStatusIndex = widget.optionResult.statusList!.indexWhere((department) => department.value.toString() == selectedStatusId);
+      selectedIndex = widget.optionResult.sourceList.indexWhere((department) => department.value.toString() == selectedSourceId);
     }
 
-    if (selectedStatusIndex < 0) {
-      selectedStatusIndex = 0;
+    if (selectedIndex < 0) {
+      selectedIndex = 0;
     }
 
     OptionPickerUtil.showCupertinoOptionPicker(
-      items: widget.optionResult.statusList!.map((e) => e.txt!).toList(growable: false),
-      initialSelectIndex: selectedStatusIndex,
+      items: widget.optionResult.sourceList.map((e) => e.txt!).toList(growable: false),
+      initialSelectIndex: selectedIndex,
       onPickerChanged: (_, index) {
         setState(() {
-          selectedStatusId = widget.optionResult.statusList![index].value!.toString();
+          selectedSourceId = widget.optionResult.sourceList[index].value!.toString();
         });
       },
     );

+ 45 - 47
packages/cpt_sg/lib/modules/review/labour_review_list/labour_review_item.dart

@@ -1,8 +1,6 @@
 import 'package:cs_resources/constants/color_constants.dart';
 import 'package:cs_resources/generated/assets.dart';
-import 'package:domain/entity/response/job_list_applied_info_entity.dart';
-import 'package:domain/entity/response/job_list_applied_staff_list_entity.dart';
-import 'package:domain/entity/response/labour_review_list_entity.dart';
+import 'package:domain/entity/response/s_g_labour_review_table_entity.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/widgets.dart';
@@ -18,7 +16,7 @@ import 'package:widgets/my_text_view.dart';
  */
 class LabourReviewItem extends StatelessWidget {
   final int index;
-  final LabourReviewListRows item;
+  final SGLabourReviewTableRows item;
   final VoidCallback? onStatusAction;
   final VoidCallback? onEditAction;
   final VoidCallback? onDetailAction;
@@ -53,7 +51,7 @@ class LabourReviewItem extends StatelessWidget {
             children: [
               //名称
               MyTextView(
-                item.jobTitle ?? "-",
+                item.source ?? "-",
                 isFontMedium: true,
                 textColor: ColorConstants.textYellowFFBB1B,
                 fontSize: 14,
@@ -76,153 +74,153 @@ class LabourReviewItem extends StatelessWidget {
             ],
           ),
 
-          // 部门
+          // 工作日期
           Row(
             mainAxisSize: MainAxisSize.max,
             crossAxisAlignment: CrossAxisAlignment.center,
             children: [
               MyTextView(
-                "Outlet:".tr,
+                "${"Job Date".tr}:",
                 isFontRegular: true,
                 textColor: ColorConstants.textGrayAECAE5,
                 fontSize: 14,
               ),
 
-              //部门
+              //日期时间
               MyTextView(
-                item.departmentName ?? "-",
+                item.jobDate ?? "-",
                 marginLeft: 5,
                 isFontRegular: true,
                 textColor: Colors.white,
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top: 11),
 
-          // 工作日期时间
+          //工作标题
           Row(
             mainAxisSize: MainAxisSize.max,
             crossAxisAlignment: CrossAxisAlignment.center,
             children: [
               MyTextView(
-                "Datetime:".tr,
+                "${"Job Title".tr}:",
                 isFontRegular: true,
                 textColor: ColorConstants.textGrayAECAE5,
                 fontSize: 14,
               ),
 
-              //日期时间
+              //部门
               MyTextView(
-                item.jobTime ?? "-",
+                item.jobTitle ?? "-",
                 marginLeft: 5,
                 isFontRegular: true,
                 textColor: Colors.white,
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top: 11),
 
-          // 人数
+          // 部门
           Row(
             mainAxisSize: MainAxisSize.max,
             crossAxisAlignment: CrossAxisAlignment.center,
             children: [
               MyTextView(
-                "No. of Staff:".tr,
+                "Outlet:".tr,
                 isFontRegular: true,
                 textColor: ColorConstants.textGrayAECAE5,
                 fontSize: 14,
               ),
 
-              //人数
+              //部门
               MyTextView(
-                item.needNum.toString(),
+                item.outletName ?? "-",
                 marginLeft: 5,
                 isFontRegular: true,
                 textColor: Colors.white,
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top: 11),
 
-          // 薪水
+          //工作时间
           Row(
             mainAxisSize: MainAxisSize.max,
             crossAxisAlignment: CrossAxisAlignment.center,
             children: [
               MyTextView(
-                "${"Salary".tr}:",
+                "${"Job Time".tr}:",
                 isFontRegular: true,
                 textColor: ColorConstants.textGrayAECAE5,
                 fontSize: 14,
               ),
 
-              //发布状态
+              //日期时间
               MyTextView(
-                item.salaryShow ?? "-",
+                item.jobTime ?? "-",
                 marginLeft: 5,
                 isFontRegular: true,
                 textColor: Colors.white,
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top: 11),
 
-          // 状态
+          // 人数
           Row(
             mainAxisSize: MainAxisSize.max,
             crossAxisAlignment: CrossAxisAlignment.center,
             children: [
               MyTextView(
-                "Status:".tr,
+                "${"Manpower Needed".tr}:",
                 isFontRegular: true,
                 textColor: ColorConstants.textGrayAECAE5,
                 fontSize: 14,
               ),
 
-              //状态
+              //人数
               MyTextView(
-                item.statusShow == null ? "" : item.statusShow!.tr,
+                item.hiringNum.toString(),
                 marginLeft: 5,
                 isFontRegular: true,
-                textColor: "Approved" == item.statusShow
-                    ? ColorConstants.textGreen05DC82
-                    : "Rejected" == item.statusShow
-                        ? ColorConstants.textRedFF6262
-                        : "Recall" == item.statusShow
-                            ? ColorConstants.textYellowFFBB1B
-                            : ColorConstants.textBlue06D9FF,
+                textColor: Colors.white,
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top: 11),
 
-          // 创建时间
+          // 状态
           Row(
             mainAxisSize: MainAxisSize.max,
             crossAxisAlignment: CrossAxisAlignment.center,
             children: [
               MyTextView(
-                "Created At:".tr,
+                "Status:".tr,
                 isFontRegular: true,
                 textColor: ColorConstants.textGrayAECAE5,
                 fontSize: 14,
               ),
 
-              //发布状态
+              //状态
               MyTextView(
-                item.createdAt ?? "-",
+                item.statusShow == null ? "" : item.statusShow!.tr,
                 marginLeft: 5,
                 isFontRegular: true,
-                textColor: Colors.white,
+                textColor: "Approved" == item.statusShow
+                    ? ColorConstants.textGreen05DC82
+                    : "Rejected" == item.statusShow
+                        ? ColorConstants.textRedFF6262
+                        : "Recall" == item.statusShow
+                            ? ColorConstants.textYellowFFBB1B
+                            : ColorConstants.textBlue06D9FF,
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top: 11),
 
           //按钮组
           Visibility(
-            visible: item.btnList?.isNotEmpty ?? false,
+            visible: true,
             child: Row(
               mainAxisSize: MainAxisSize.max,
               mainAxisAlignment: MainAxisAlignment.end,
@@ -230,7 +228,7 @@ class LabourReviewItem extends StatelessWidget {
               children: [
                 //详情按钮
                 Visibility(
-                  visible: item.btnList?.contains("detail") ?? false,
+                  visible: true,
                   child: MyButton(
                     onPressed: () {
                       FocusScope.of(context).unfocus();
@@ -249,7 +247,7 @@ class LabourReviewItem extends StatelessWidget {
 
                 //Edit按钮
                 Visibility(
-                  visible: item.btnList.contains("edit") ?? false,
+                  visible: true,
                   child: MyButton(
                     onPressed: () {
                       FocusScope.of(context).unfocus();
@@ -266,7 +264,7 @@ class LabourReviewItem extends StatelessWidget {
 
                 //状态工作流按钮
                 Visibility(
-                  visible: item.btnList.contains("status") ?? false,
+                  visible: true,
                   child: MyButton(
                     onPressed: () {
                       FocusScope.of(context).unfocus();

+ 6 - 4
packages/cpt_sg/lib/modules/review/labour_review_list/labour_review_state.dart

@@ -1,5 +1,6 @@
-import 'package:domain/entity/response/labour_request_index_entity.dart';
-import 'package:domain/entity/response/labour_review_list_entity.dart';
+
+import 'package:domain/entity/response/s_g_labour_review_option_entity.dart';
+import 'package:domain/entity/response/s_g_labour_review_table_entity.dart';
 import 'package:flutter/material.dart';
 
 class LabourReviewState {
@@ -9,8 +10,9 @@ class LabourReviewState {
   DateTime? selectedStartDate;
   DateTime? selectedEndDate;
   String? selectedDepartmentId;
+  String? selectedSourceId;
 
   //页面的列表数据
-  List<LabourReviewListRows> datas = [];
-  LabourRequestIndexEntity? indexOptions;
+  List<SGLabourReviewTableRows> datas = [];
+  SGLabourReviewOptionEntity? indexOptions;
 }

+ 0 - 7
packages/cpt_sg/lib/router/sg_router.dart

@@ -36,7 +36,6 @@ import '../modules/report/report_labour/report_labour_page.dart';
 import '../modules/report/report_list/report_list_page.dart';
 import '../modules/report/report_staff_request/report_staff_request_page.dart';
 import '../modules/review/attendance_review_list/attendance_review_page.dart';
-import '../modules/review/labour_review_edit/labour_review_edit_page.dart';
 import '../modules/review/labour_review_list/labour_review_page.dart';
 import '../modules/review/labour_review_workflow/labour_review_workflow_page.dart';
 
@@ -179,12 +178,6 @@ class SGPageRouter {
       page: () => SGLabourReviewPage(),
     ),
 
-    //工作列表用工请求审核编辑
-    GetPage(
-      name: RouterPath.SGLabourReviewEdit,
-      page: () => SGLabourReviewEditPage(),
-    ),
-
     //工作列表用工请求审核的操作流
     GetPage(
       name: RouterPath.SGLabourReviewWorkflow,

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

@@ -416,4 +416,19 @@ class ApiConstants {
   //中介合同时薪 记录删除
   static const apiContractRateDelete = "/index.php/api/v2/hotel/contract-rate/destroy";
 
+  //新加坡 V2 Labour Request Review 选项
+  static const apiLabourRequestReviewOptionSG = "/index.php/api/v2/hotel/lab-review/index";
+
+  //新加坡 V2 Labour Request Review 列表
+  static const apiLabourRequestReviewTableSG = "/index.php/api/v2/hotel/lab-review/table";
+
+  //新加坡 V2 Labour Request Review 批量批准
+  static const apiLabourRequestReviewApproveSG = "/index.php/api/v2/hotel/lab-review/batch-approve";
+
+  //新加坡 V2 Labour Request Review 批量拒绝
+  static const apiLabourRequestReviewRejectSG = "/index.php/api/v2/hotel/lab-review/batch-reject";
+
+  //新加坡 V2 Labour Request Review 编辑提交
+  static const apiLabourRequestReviewEditSubmitSG = "/index.php/api/v2/hotel/lab-review/edit-submit";
+
 }

+ 28 - 0
packages/cs_domain/lib/entity/response/s_g_labour_review_option_entity.dart

@@ -0,0 +1,28 @@
+import 'package:domain/entity/response/index_option_entity.dart';
+import 'package:domain/generated/json/base/json_field.dart';
+import 'package:domain/generated/json/s_g_labour_review_option_entity.g.dart';
+import 'dart:convert';
+export 'package:domain/generated/json/s_g_labour_review_option_entity.g.dart';
+
+@JsonSerializable()
+class SGLabourReviewOptionEntity {
+	@JSONField(name: "start_time")
+	String? startTime;
+	@JSONField(name: "end_time")
+	String? endTime;
+	@JSONField(name: "source_list")
+	List<IndexOptionEntity> sourceList = [];
+	@JSONField(name: "outlet_list")
+	List<IndexOptionEntity> outletList = [];
+
+	SGLabourReviewOptionEntity();
+
+	factory SGLabourReviewOptionEntity.fromJson(Map<String, dynamic> json) => $SGLabourReviewOptionEntityFromJson(json);
+
+	Map<String, dynamic> toJson() => $SGLabourReviewOptionEntityToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}

+ 61 - 0
packages/cs_domain/lib/entity/response/s_g_labour_review_table_entity.dart

@@ -0,0 +1,61 @@
+import 'package:domain/generated/json/base/json_field.dart';
+import 'package:domain/generated/json/s_g_labour_review_table_entity.g.dart';
+import 'dart:convert';
+export 'package:domain/generated/json/s_g_labour_review_table_entity.g.dart';
+
+@JsonSerializable()
+class SGLabourReviewTableEntity {
+	int total= 0;
+	List<SGLabourReviewTableRows> rows = [];
+
+	SGLabourReviewTableEntity();
+
+	factory SGLabourReviewTableEntity.fromJson(Map<String, dynamic> json) => $SGLabourReviewTableEntityFromJson(json);
+
+	Map<String, dynamic> toJson() => $SGLabourReviewTableEntityToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}
+
+@JsonSerializable()
+class SGLabourReviewTableRows {
+	@JSONField(name: "record_id")
+	String? recordId;
+	@JSONField(name: "order_id")
+	String? orderId;
+	@JSONField(name: "request_id")
+	String? requestId;
+	String? source;
+	@JSONField(name: "status_show")
+	String? statusShow;
+	@JSONField(name: "created_at")
+	String? createdAt;
+	@JSONField(name: "job_date")
+	String? jobDate;
+	@JSONField(name: "outlet_name")
+	String? outletName;
+	@JSONField(name: "job_title")
+	String? jobTitle;
+	@JSONField(name: "job_time")
+	String? jobTime;
+	@JSONField(name: "working_hours")
+	String? workingHours;
+	@JSONField(name: "hiring_num")
+	String? hiringNum;
+
+	bool isSelected = false;
+
+	SGLabourReviewTableRows();
+
+	factory SGLabourReviewTableRows.fromJson(Map<String, dynamic> json) => $SGLabourReviewTableRowsFromJson(json);
+
+	Map<String, dynamic> toJson() => $SGLabourReviewTableRowsToJson(this);
+
+	@override
+	String toString() {
+		return jsonEncode(this);
+	}
+}

+ 14 - 0
packages/cs_domain/lib/generated/json/base/json_convert_content.dart

@@ -64,6 +64,8 @@ import 'package:domain/entity/response/s_g_labour_request_detail_entity.dart';
 import 'package:domain/entity/response/s_g_labour_request_option_entity.dart';
 import 'package:domain/entity/response/s_g_labour_request_table_entity.dart';
 import 'package:domain/entity/response/s_g_labour_request_worl_flow_entity.dart';
+import 'package:domain/entity/response/s_g_labour_review_option_entity.dart';
+import 'package:domain/entity/response/s_g_labour_review_table_entity.dart';
 import 'package:domain/entity/response/staff_detail_entity.dart';
 import 'package:domain/entity/response/staff_detail_s_g_entity.dart';
 import 'package:domain/entity/response/staff_job_history_s_g_entity.dart';
@@ -574,6 +576,15 @@ class JsonConvert {
     if (<SGLabourRequestWorlFlowRecords>[] is M) {
       return data.map<SGLabourRequestWorlFlowRecords>((Map<String, dynamic> e) => SGLabourRequestWorlFlowRecords.fromJson(e)).toList() as M;
     }
+    if (<SGLabourReviewOptionEntity>[] is M) {
+      return data.map<SGLabourReviewOptionEntity>((Map<String, dynamic> e) => SGLabourReviewOptionEntity.fromJson(e)).toList() as M;
+    }
+    if (<SGLabourReviewTableEntity>[] is M) {
+      return data.map<SGLabourReviewTableEntity>((Map<String, dynamic> e) => SGLabourReviewTableEntity.fromJson(e)).toList() as M;
+    }
+    if (<SGLabourReviewTableRows>[] is M) {
+      return data.map<SGLabourReviewTableRows>((Map<String, dynamic> e) => SGLabourReviewTableRows.fromJson(e)).toList() as M;
+    }
     if (<StaffDetailEntity>[] is M) {
       return data.map<StaffDetailEntity>((Map<String, dynamic> e) => StaffDetailEntity.fromJson(e)).toList() as M;
     }
@@ -774,6 +785,9 @@ class JsonConvertClassCollection {
     (SGLabourRequestWorlFlowEntity).toString(): SGLabourRequestWorlFlowEntity.fromJson,
     (SGLabourRequestWorlFlowRow).toString(): SGLabourRequestWorlFlowRow.fromJson,
     (SGLabourRequestWorlFlowRecords).toString(): SGLabourRequestWorlFlowRecords.fromJson,
+    (SGLabourReviewOptionEntity).toString(): SGLabourReviewOptionEntity.fromJson,
+    (SGLabourReviewTableEntity).toString(): SGLabourReviewTableEntity.fromJson,
+    (SGLabourReviewTableRows).toString(): SGLabourReviewTableRows.fromJson,
     (StaffDetailEntity).toString(): StaffDetailEntity.fromJson,
     (StaffDetailSGEntity).toString(): StaffDetailSGEntity.fromJson,
     (StaffDetailSGReviews).toString(): StaffDetailSGReviews.fromJson,

+ 51 - 0
packages/cs_domain/lib/generated/json/s_g_labour_review_option_entity.g.dart

@@ -0,0 +1,51 @@
+import 'package:domain/generated/json/base/json_convert_content.dart';
+import 'package:domain/entity/response/s_g_labour_review_option_entity.dart';
+import 'package:domain/entity/response/index_option_entity.dart';
+
+
+SGLabourReviewOptionEntity $SGLabourReviewOptionEntityFromJson(Map<String, dynamic> json) {
+  final SGLabourReviewOptionEntity sGLabourReviewOptionEntity = SGLabourReviewOptionEntity();
+  final String? startTime = jsonConvert.convert<String>(json['start_time']);
+  if (startTime != null) {
+    sGLabourReviewOptionEntity.startTime = startTime;
+  }
+  final String? endTime = jsonConvert.convert<String>(json['end_time']);
+  if (endTime != null) {
+    sGLabourReviewOptionEntity.endTime = endTime;
+  }
+  final List<IndexOptionEntity>? sourceList = (json['source_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (sourceList != null) {
+    sGLabourReviewOptionEntity.sourceList = sourceList;
+  }
+  final List<IndexOptionEntity>? outletList = (json['outlet_list'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
+  if (outletList != null) {
+    sGLabourReviewOptionEntity.outletList = outletList;
+  }
+  return sGLabourReviewOptionEntity;
+}
+
+Map<String, dynamic> $SGLabourReviewOptionEntityToJson(SGLabourReviewOptionEntity entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['start_time'] = entity.startTime;
+  data['end_time'] = entity.endTime;
+  data['source_list'] = entity.sourceList.map((v) => v.toJson()).toList();
+  data['outlet_list'] = entity.outletList.map((v) => v.toJson()).toList();
+  return data;
+}
+
+extension SGLabourReviewOptionEntityExtension on SGLabourReviewOptionEntity {
+  SGLabourReviewOptionEntity copyWith({
+    String? startTime,
+    String? endTime,
+    List<IndexOptionEntity>? sourceList,
+    List<IndexOptionEntity>? outletList,
+  }) {
+    return SGLabourReviewOptionEntity()
+      ..startTime = startTime ?? this.startTime
+      ..endTime = endTime ?? this.endTime
+      ..sourceList = sourceList ?? this.sourceList
+      ..outletList = outletList ?? this.outletList;
+  }
+}

+ 135 - 0
packages/cs_domain/lib/generated/json/s_g_labour_review_table_entity.g.dart

@@ -0,0 +1,135 @@
+import 'package:domain/generated/json/base/json_convert_content.dart';
+import 'package:domain/entity/response/s_g_labour_review_table_entity.dart';
+
+SGLabourReviewTableEntity $SGLabourReviewTableEntityFromJson(Map<String, dynamic> json) {
+  final SGLabourReviewTableEntity sGLabourReviewTableEntity = SGLabourReviewTableEntity();
+  final int? total = jsonConvert.convert<int>(json['total']);
+  if (total != null) {
+    sGLabourReviewTableEntity.total = total;
+  }
+  final List<SGLabourReviewTableRows>? rows = (json['rows'] as List<dynamic>?)?.map(
+          (e) => jsonConvert.convert<SGLabourReviewTableRows>(e) as SGLabourReviewTableRows).toList();
+  if (rows != null) {
+    sGLabourReviewTableEntity.rows = rows;
+  }
+  return sGLabourReviewTableEntity;
+}
+
+Map<String, dynamic> $SGLabourReviewTableEntityToJson(SGLabourReviewTableEntity entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['total'] = entity.total;
+  data['rows'] = entity.rows.map((v) => v.toJson()).toList();
+  return data;
+}
+
+extension SGLabourReviewTableEntityExtension on SGLabourReviewTableEntity {
+  SGLabourReviewTableEntity copyWith({
+    int? total,
+    List<SGLabourReviewTableRows>? rows,
+  }) {
+    return SGLabourReviewTableEntity()
+      ..total = total ?? this.total
+      ..rows = rows ?? this.rows;
+  }
+}
+
+SGLabourReviewTableRows $SGLabourReviewTableRowsFromJson(Map<String, dynamic> json) {
+  final SGLabourReviewTableRows sGLabourReviewTableRows = SGLabourReviewTableRows();
+  final String? recordId = jsonConvert.convert<String>(json['record_id']);
+  if (recordId != null) {
+    sGLabourReviewTableRows.recordId = recordId;
+  }
+  final String? orderId = jsonConvert.convert<String>(json['order_id']);
+  if (orderId != null) {
+    sGLabourReviewTableRows.orderId = orderId;
+  }
+  final String? requestId = jsonConvert.convert<String>(json['request_id']);
+  if (requestId != null) {
+    sGLabourReviewTableRows.requestId = requestId;
+  }
+  final String? source = jsonConvert.convert<String>(json['source']);
+  if (source != null) {
+    sGLabourReviewTableRows.source = source;
+  }
+  final String? statusShow = jsonConvert.convert<String>(json['status_show']);
+  if (statusShow != null) {
+    sGLabourReviewTableRows.statusShow = statusShow;
+  }
+  final String? createdAt = jsonConvert.convert<String>(json['created_at']);
+  if (createdAt != null) {
+    sGLabourReviewTableRows.createdAt = createdAt;
+  }
+  final String? jobDate = jsonConvert.convert<String>(json['job_date']);
+  if (jobDate != null) {
+    sGLabourReviewTableRows.jobDate = jobDate;
+  }
+  final String? outletName = jsonConvert.convert<String>(json['outlet_name']);
+  if (outletName != null) {
+    sGLabourReviewTableRows.outletName = outletName;
+  }
+  final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
+  if (jobTitle != null) {
+    sGLabourReviewTableRows.jobTitle = jobTitle;
+  }
+  final String? jobTime = jsonConvert.convert<String>(json['job_time']);
+  if (jobTime != null) {
+    sGLabourReviewTableRows.jobTime = jobTime;
+  }
+  final String? workingHours = jsonConvert.convert<String>(json['working_hours']);
+  if (workingHours != null) {
+    sGLabourReviewTableRows.workingHours = workingHours;
+  }
+  final String? hiringNum = jsonConvert.convert<String>(json['hiring_num']);
+  if (hiringNum != null) {
+    sGLabourReviewTableRows.hiringNum = hiringNum;
+  }
+  return sGLabourReviewTableRows;
+}
+
+Map<String, dynamic> $SGLabourReviewTableRowsToJson(SGLabourReviewTableRows entity) {
+  final Map<String, dynamic> data = <String, dynamic>{};
+  data['record_id'] = entity.recordId;
+  data['order_id'] = entity.orderId;
+  data['request_id'] = entity.requestId;
+  data['source'] = entity.source;
+  data['status_show'] = entity.statusShow;
+  data['created_at'] = entity.createdAt;
+  data['job_date'] = entity.jobDate;
+  data['outlet_name'] = entity.outletName;
+  data['job_title'] = entity.jobTitle;
+  data['job_time'] = entity.jobTime;
+  data['working_hours'] = entity.workingHours;
+  data['hiring_num'] = entity.hiringNum;
+  return data;
+}
+
+extension SGLabourReviewTableRowsExtension on SGLabourReviewTableRows {
+  SGLabourReviewTableRows copyWith({
+    String? recordId,
+    String? orderId,
+    String? requestId,
+    String? source,
+    String? statusShow,
+    String? createdAt,
+    String? jobDate,
+    String? outletName,
+    String? jobTitle,
+    String? jobTime,
+    String? workingHours,
+    String? hiringNum,
+  }) {
+    return SGLabourReviewTableRows()
+      ..recordId = recordId ?? this.recordId
+      ..orderId = orderId ?? this.orderId
+      ..requestId = requestId ?? this.requestId
+      ..source = source ?? this.source
+      ..statusShow = statusShow ?? this.statusShow
+      ..createdAt = createdAt ?? this.createdAt
+      ..jobDate = jobDate ?? this.jobDate
+      ..outletName = outletName ?? this.outletName
+      ..jobTitle = jobTitle ?? this.jobTitle
+      ..jobTime = jobTime ?? this.jobTime
+      ..workingHours = workingHours ?? this.workingHours
+      ..hiringNum = hiringNum ?? this.hiringNum;
+  }
+}

+ 195 - 0
packages/cs_domain/lib/repository/labour_sg_repository.dart

@@ -7,6 +7,8 @@ import 'package:domain/entity/response/job_template_s_g_entity.dart';
 import 'package:domain/entity/response/job_title_edit_index_entity.dart';
 import 'package:domain/entity/response/job_title_s_g_entity.dart';
 import 'package:domain/entity/response/s_g_labour_request_worl_flow_entity.dart';
+import 'package:domain/entity/response/s_g_labour_review_option_entity.dart';
+import 'package:domain/entity/response/s_g_labour_review_table_entity.dart';
 import 'package:get/get.dart';
 import 'package:plugin_platform/platform_export.dart';
 import 'package:plugin_platform/http/http_provider.dart';
@@ -1118,4 +1120,197 @@ class LabourSGRepository extends GetxService {
     }
     return result.convert();
   }
+
+  // ===================================  SG 的 Labour Request Review 相关接口  ↓  ===================================
+
+  /// 用工请求审核列表的选项数据
+  Future<HttpResult<SGLabourReviewOptionEntity>> fetchLabourReviewOption({
+    CancelToken? cancelToken,
+  }) async {
+    final result = await httpProvider.requestNetResult(
+      ApiConstants.apiLabourRequestReviewOptionSG,
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = SGLabourReviewOptionEntity.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<SGLabourReviewOptionEntity>(data: data);
+    }
+    return result.convert();
+  }
+
+  /// 用工请求审核列表 Table
+  Future<HttpResult<SGLabourReviewTableEntity>> fetchLabourReviewTable({
+    String? recordId,
+    String? agencyId,
+    String? startDate,
+    String? endDate,
+    String? outletId,
+    String? keyword,
+    String? status,
+    required int curPage,
+    CancelToken? cancelToken,
+  }) async {
+    Map<String, String> params = {};
+    params['cur_page'] = curPage.toString();
+    params['page_size'] = "10";
+
+    if (Utils.isNotEmpty(recordId)) {
+      params['record_id'] = recordId ?? "";
+    }
+    if (Utils.isNotEmpty(agencyId)) {
+      params['agency_id'] = agencyId ?? "";
+    }
+    if (Utils.isNotEmpty(startDate)) {
+      params['start_date'] = startDate ?? "";
+    }
+    if (Utils.isNotEmpty(endDate)) {
+      params['end_date'] = endDate ?? "";
+    }
+    if (Utils.isNotEmpty(status)) {
+      params['status'] = status ?? "";
+    }
+    if (Utils.isNotEmpty(outletId)) {
+      params['outlet_id'] = outletId ?? "";
+    }
+    if (Utils.isNotEmpty(keyword)) {
+      params['job_title'] = keyword ?? "";
+    }
+
+    final result = await httpProvider.requestNetResult(
+      ApiConstants.apiLabourRequestReviewTableSG,
+      params: params,
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      final json = result.getDataJson();
+      var data = SGLabourReviewTableEntity.fromJson(json!);
+      //重新赋值data或list
+      return result.convert<SGLabourReviewTableEntity>(data: data);
+    }
+    return result.convert();
+  }
+
+  /// 用工审核的批量同意
+  Future<HttpResult> approveLabourReviews(
+      String? recordIds, {
+        CancelToken? cancelToken,
+      }) async {
+    //参数
+    Map<String, String> params = {};
+    params['record_ids'] = recordIds ?? "";
+
+    final result = await httpProvider.requestNetResult(
+      ApiConstants.apiLabourRequestReviewApproveSG,
+      method: HttpMethod.POST,
+      params: params,
+      networkDebounce: true,
+      isShowLoadingDialog: true,
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      return result.convert();
+    }
+    return result.convert();
+  }
+
+  /// 用工审核的批量拒绝
+  Future<HttpResult> rejectLabourReviews(
+      String? recordIds,
+      String? reason, {
+        CancelToken? cancelToken,
+      }) async {
+    //参数
+    Map<String, String> params = {};
+    params['record_ids'] = recordIds ?? "";
+
+    if (Utils.isNotEmpty(reason)) {
+      params['audit_mark'] = reason ?? "";
+    }
+
+    final result = await httpProvider.requestNetResult(
+      ApiConstants.apiLabourRequestReviewRejectSG,
+      method: HttpMethod.POST,
+      params: params,
+      networkDebounce: true,
+      isShowLoadingDialog: true,
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      return result.convert();
+    }
+    return result.convert();
+  }
+
+  /// 用工请求 Review 的 Edit submit
+  Future<HttpResult> editLabourRequestReviewSubmit({
+    required String? requestId,
+    required String? startTime,
+    required String? endTime,
+    required String? outletId,
+    int sexLimit = 0,
+    String? maleLimit,
+    String? femaleLimit,
+    String? needNum,
+    String? requestType,
+    String? positionId,
+    String? remark,
+    CancelToken? cancelToken,
+  }) async {
+    //参数
+    Map<String, String> params = {};
+
+    params['request_id'] = requestId ?? "";
+    params['start_time'] = startTime ?? "";
+    params['end_time'] = endTime ?? "";
+    params['outlet_id'] = outletId ?? "";
+
+    if (Utils.isNotEmpty(requestType)) {
+      params['request_type'] = requestType ?? "";
+    }
+    if (Utils.isNotEmpty(positionId) && requestType == "1") {
+      params['position_id'] = positionId ?? "";
+    }
+    if (Utils.isNotEmpty(remark)) {
+      params['remark'] = remark ?? "";
+    }
+
+    params['sex_limit'] = sexLimit.toString();
+    if (sexLimit == 1) {
+      params['male_limit'] = maleLimit.toString();
+      params['female_limit'] = femaleLimit.toString();
+    } else {
+      params['need_num'] = needNum.toString();
+    }
+
+    final result = await httpProvider.requestNetResult(
+      ApiConstants.apiLabourRequestReviewEditSubmitSG,
+      method: HttpMethod.POST,
+      params: params,
+      networkDebounce: true,
+      isShowLoadingDialog: true,
+      cancelToken: cancelToken,
+    );
+
+    //根据返回的结果,封装原始数据为Bean/Entity对象
+    if (result.isSuccess) {
+      //重新赋值data或list
+      return result.convert();
+    }
+    return result.convert();
+  }
+
 }

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

@@ -116,7 +116,6 @@ class RouterPath {
 
   //新加坡的审合相关
   static const SGLabourReviewList= '/sg/labour/review/list';   //SG的用工请求审核列表
-  static const SGLabourReviewEdit= '/sg/labour/review/list';   //SG的用工请求审核编辑
   static const SGLabourReviewWorkflow= '/sg/labour/review/workflow';   //SG的用工请求审核的操作流
   static const SGAttendanceReviewList= '/sg/attendance/review/list';   //SG的考勤审核的操作流
   static const SGAttendanceReviewWorkflow= '/sg/attendance/review/workflow';   //SG的考勤审核的操作流