Forráskód Böngészése

1.加入泰国工作列表人员的打卡记录图片预览
2.部分列表的样式修改与全选的逻辑

liukai 4 napja
szülő
commit
e31ccb76fb

+ 56 - 19
packages/cpt_th/lib/modules/job_er/applied_er/applied_er_item.dart

@@ -6,7 +6,8 @@ import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/widgets.dart';
 import 'package:plugin_basic/basic_export.dart';
-import 'package:plugin_basic/service/app_config_service.dart';
+import 'package:plugin_platform/engine/image/image_preview.dart';
+import 'package:shared/utils/util.dart';
 import 'package:widgets/ext/ex_widget.dart';
 import 'package:widgets/my_button.dart';
 import 'package:widgets/my_load_image.dart';
@@ -102,7 +103,7 @@ class AppliedErItem extends StatelessWidget {
           //       ),
           //
           //     ],
-          //   ).marginOnly(top: 12),
+          //   ).marginOnly(top:10),
           // ),
 
           // 服装大小
@@ -134,7 +135,7 @@ class AppliedErItem extends StatelessWidget {
                 onClick: onMemberAction,
               ).expanded(),
             ],
-          ).marginOnly(top: 12),
+          ).marginOnly(top:10),
 
           // 工作开始时间
           Row(
@@ -157,7 +158,7 @@ class AppliedErItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 12),
+          ).marginOnly(top:10),
 
           // 工作开始时间
           Row(
@@ -180,7 +181,7 @@ class AppliedErItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 12),
+          ).marginOnly(top:10),
 
           // 门卫签到时间
           Row(
@@ -199,11 +200,20 @@ class AppliedErItem extends StatelessWidget {
                 item.securityIn?.time ?? "-",
                 marginLeft: 5,
                 isFontRegular: true,
-                textColor: item.securityIn?.changed == 1 ? ColorConstants.textRedFF6262 : Colors.white,
+                textColor: item.securityIn?.changed == 1 ? ColorConstants.textRedFF6262 : ColorConstants.textGreen0AC074,
                 fontSize: 14,
+                onClick: (){
+                  if (Utils.isNotEmpty(item.securityIn?.image)){
+                    ImagePreviewEngine.singleImagePreview(context, item.securityIn!.image!);
+                  }
+                },
+                textDecoration: Utils.isNotEmpty(item.securityIn?.image) ? TextDecoration.underline : TextDecoration.none,
+                decorationColor: ColorConstants.textGreen0AC074,
+                decorationThickness: 2.0,
+                decorationStyle: TextDecorationStyle.solid,
               ).expanded(),
             ],
-          ).marginOnly(top: 12),
+          ).marginOnly(top:10),
 
           // 工作地签到时间
           Row(
@@ -222,11 +232,20 @@ class AppliedErItem extends StatelessWidget {
                 item.workIn?.time ?? "-",
                 marginLeft: 5,
                 isFontRegular: true,
-                textColor: item.workIn?.changed == 1 ? ColorConstants.textRedFF6262 : Colors.white,
+                textColor: item.workIn?.changed == 1 ? ColorConstants.textRedFF6262 : ColorConstants.textGreen0AC074,
                 fontSize: 14,
+                onClick: (){
+                  if (Utils.isNotEmpty(item.workIn?.image)){
+                    ImagePreviewEngine.singleImagePreview(context, item.workIn!.image!);
+                  }
+                },
+                textDecoration: Utils.isNotEmpty(item.workIn?.image) ? TextDecoration.underline : TextDecoration.none,
+                decorationColor: ColorConstants.textGreen0AC074,
+                decorationThickness: 2.0,
+                decorationStyle: TextDecorationStyle.solid,
               ).expanded(),
             ],
-          ).marginOnly(top: 12),
+          ).marginOnly(top:10),
 
           //工作结束时间
           Row(
@@ -249,7 +268,7 @@ class AppliedErItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 12),
+          ).marginOnly(top:10),
 
           // 工作地签出时间
           Row(
@@ -268,11 +287,20 @@ class AppliedErItem extends StatelessWidget {
                 item.workOut?.time ?? "-",
                 marginLeft: 5,
                 isFontRegular: true,
-                textColor: item.workOut?.changed == 1 ? ColorConstants.textRedFF6262 : Colors.white,
+                textColor: item.workOut?.changed == 1 ? ColorConstants.textRedFF6262 : ColorConstants.textYellowF8AE00,
                 fontSize: 14,
+                onClick: (){
+                  if (Utils.isNotEmpty(item.workOut?.image)){
+                    ImagePreviewEngine.singleImagePreview(context, item.workOut!.image!);
+                  }
+                },
+                textDecoration: Utils.isNotEmpty(item.workOut?.image) ? TextDecoration.underline : TextDecoration.none,
+                decorationColor: ColorConstants.textYellowF8AE00,
+                decorationThickness: 2.0,
+                decorationStyle: TextDecorationStyle.solid,
               ).expanded(),
             ],
-          ).marginOnly(top: 12),
+          ).marginOnly(top:10),
 
           // 门卫签出时间
           Row(
@@ -291,11 +319,20 @@ class AppliedErItem extends StatelessWidget {
                 item.securityOut?.time ?? "-",
                 marginLeft: 5,
                 isFontRegular: true,
-                textColor: item.securityOut?.changed == 1 ? ColorConstants.textRedFF6262 : Colors.white,
+                textColor: item.securityOut?.changed == 1 ? ColorConstants.textRedFF6262 : ColorConstants.textYellowF8AE00,
                 fontSize: 14,
+                onClick: (){
+                  if (Utils.isNotEmpty(item.securityOut?.image)){
+                    ImagePreviewEngine.singleImagePreview(context, item.securityOut!.image!);
+                  }
+                },
+                textDecoration: Utils.isNotEmpty(item.securityOut?.image) ? TextDecoration.underline : TextDecoration.none,
+                decorationColor: ColorConstants.textYellowF8AE00,
+                decorationThickness: 2.0,
+                decorationStyle: TextDecorationStyle.solid,
               ).expanded(),
             ],
-          ).marginOnly(top: 12),
+          ).marginOnly(top:10),
 
           // + - Hours
           Row(
@@ -318,7 +355,7 @@ class AppliedErItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 12),
+          ).marginOnly(top:10),
 
           // Total Hours
           Row(
@@ -341,7 +378,7 @@ class AppliedErItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 12),
+          ).marginOnly(top:10),
 
           // // Total Rooms
           // Visibility(
@@ -366,7 +403,7 @@ class AppliedErItem extends StatelessWidget {
           //         fontSize: 14,
           //       ).expanded(),
           //     ],
-          //   ).marginOnly(top: 12),
+          //   ).marginOnly(top:10),
           // ),
 
           // // 申请时间
@@ -390,7 +427,7 @@ class AppliedErItem extends StatelessWidget {
           //       fontSize: 14,
           //     ).expanded(),
           //   ],
-          // ).marginOnly(top: 12),
+          // ).marginOnly(top:10),
 
           // 状态
           Row(
@@ -419,7 +456,7 @@ class AppliedErItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 12),
+          ).marginOnly(top:10),
 
           //按钮组
           Visibility(

+ 6 - 6
packages/cpt_th/lib/modules/job_er/job_list_er/job_list_er_item.dart

@@ -68,7 +68,7 @@ class JobListErItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top:10),
 
           // 工作日期时间
           Row(
@@ -91,7 +91,7 @@ class JobListErItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top:10),
 
           // 人数
           Row(
@@ -115,7 +115,7 @@ class JobListErItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top:10),
 
           // 预选
           Row(
@@ -138,7 +138,7 @@ class JobListErItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top:10),
 
           // 时薪
           // Row(
@@ -161,7 +161,7 @@ class JobListErItem extends StatelessWidget {
           //       fontSize: 14,
           //     ).expanded(),
           //   ],
-          // ).marginOnly(top: 15),
+          // ).marginOnly(top:10),
 
           // 状态
           Row(
@@ -190,7 +190,7 @@ class JobListErItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top:10),
 
           //按钮组
           Visibility(

+ 8 - 0
packages/cpt_th/lib/modules/labour/labour_review_list/labour_review_controller.dart

@@ -351,4 +351,12 @@ class LabourReviewController extends GetxController with DioCancelableMixin {
       ),
     );
   }
+
+  // 全部选择
+  void operationSelectAll() {
+    for (var element in state.datas) {
+      element.isSelected = true;
+    }
+    update();
+  }
 }

+ 6 - 7
packages/cpt_th/lib/modules/labour/labour_review_list/labour_review_item.dart

@@ -94,7 +94,7 @@ class LabourReviewItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top:10),
 
           // 工作日期时间
           Row(
@@ -117,7 +117,7 @@ class LabourReviewItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top:10),
 
           // 人数
           Row(
@@ -140,7 +140,7 @@ class LabourReviewItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top:10),
 
           // 薪水
           Row(
@@ -163,7 +163,7 @@ class LabourReviewItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top:10),
 
           // 状态
           Row(
@@ -192,7 +192,7 @@ class LabourReviewItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top:10),
 
           // 创建时间
           Row(
@@ -215,7 +215,7 @@ class LabourReviewItem extends StatelessWidget {
                 fontSize: 14,
               ).expanded(),
             ],
-          ).marginOnly(top: 15),
+          ).marginOnly(top:10),
 
           //按钮组
           Visibility(
@@ -225,7 +225,6 @@ class LabourReviewItem extends StatelessWidget {
               mainAxisAlignment: MainAxisAlignment.end,
               crossAxisAlignment: CrossAxisAlignment.center,
               children: [
-
                 //Edit按钮
                 Visibility(
                   visible: true,

+ 18 - 0
packages/cpt_th/lib/modules/labour/labour_review_list/labour_review_page.dart

@@ -146,6 +146,24 @@ class _LabourReviewState extends BaseState<LabourReviewPage, LabourReviewControl
                 ),
               ).expanded(),
 
+
+              Visibility(
+                visible: state.datas.isNotEmpty,
+                child: MyTextView(
+                  "Select All".tr,
+                  fontSize: 17,
+                  isFontMedium: true,
+                  boxHeight: 48,
+                  onClick: () {
+                    controller.operationSelectAll();
+                  },
+                  alignment: Alignment.center,
+                  textAlign: TextAlign.center,
+                  textColor: Colors.white,
+                  backgroundColor: const Color(0XFFCA28E4),
+                ),
+              ),
+
               Row(
                 mainAxisSize: MainAxisSize.max,
                 children: [