|
@@ -21,7 +21,7 @@ class ReportLabourItem extends StatelessWidget {
|
|
|
Widget build(BuildContext context) {
|
|
|
return Container(
|
|
|
width: double.infinity,
|
|
|
- padding: const EdgeInsets.only(top: 16,bottom: 20),
|
|
|
+ padding: const EdgeInsets.only(top: 16, bottom: 20),
|
|
|
margin: const EdgeInsets.symmetric(vertical: 5, horizontal: 15),
|
|
|
decoration: BoxDecoration(
|
|
|
color: const Color(0xFF4DCFF6).withOpacity(0.2), // 设置背景颜色和不透明度
|
|
@@ -31,17 +31,26 @@ class ReportLabourItem extends StatelessWidget {
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
|
MyTextView(
|
|
|
- type == 0 ? "Completed".tr : type == 1 ? "Incomplete".tr : "Completed + Incomplete".tr,
|
|
|
+ type == 0
|
|
|
+ ? "Completed".tr
|
|
|
+ : type == 1
|
|
|
+ ? "Incomplete".tr
|
|
|
+ : "Completed + Incomplete".tr,
|
|
|
fontSize: 14,
|
|
|
isFontBold: true,
|
|
|
marginBottom: 15,
|
|
|
marginLeft: 20,
|
|
|
marginRight: 20,
|
|
|
- textColor: type == 0 ? ColorConstants.textGreen0AC074 : type == 1 ? ColorConstants.textBlue06D9FF : ColorConstants.textRedFF6262,
|
|
|
+ textColor: type == 0
|
|
|
+ ? ColorConstants.textGreen0AC074
|
|
|
+ : type == 1
|
|
|
+ ? ColorConstants.textBlue06D9FF
|
|
|
+ : ColorConstants.textRedFF6262,
|
|
|
),
|
|
|
const Divider(height: 0.5, color: ColorConstants.dividerBar),
|
|
|
|
|
|
Row(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
|
MyTextView(
|
|
|
"Outlet".tr,
|
|
@@ -49,49 +58,58 @@ class ReportLabourItem extends StatelessWidget {
|
|
|
textColor: Colors.white,
|
|
|
isFontRegular: true,
|
|
|
).expanded(),
|
|
|
-
|
|
|
- RichText(
|
|
|
- text: TextSpan(
|
|
|
- children: [
|
|
|
- TextSpan(
|
|
|
- text: "Hours".tr,
|
|
|
- style: const TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
|
|
|
- ),
|
|
|
- TextSpan(
|
|
|
- text: "(${entity?.total?.hrs})",
|
|
|
- style: const TextStyle(color: ColorConstants.textGreen0AC074, fontSize: 14, fontWeight: FontWeight.w400),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
+ Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ MyTextView("Hours".tr, textColor: Colors.white, fontSize: 14, isFontRegular: true),
|
|
|
+ MyTextView(
|
|
|
+ "(${entity?.total?.hrs})",
|
|
|
+ textColor: type == 0
|
|
|
+ ? ColorConstants.textGreen0AC074
|
|
|
+ : type == 1
|
|
|
+ ? ColorConstants.textBlue06D9FF
|
|
|
+ : ColorConstants.textRedFF6262,
|
|
|
+ fontSize: 14,
|
|
|
+ isFontRegular: true,
|
|
|
+ ),
|
|
|
+ ],
|
|
|
).expanded(),
|
|
|
-
|
|
|
- RichText(
|
|
|
- text: TextSpan(
|
|
|
- children: [
|
|
|
- TextSpan(
|
|
|
- text: "TotalAmt".tr,
|
|
|
- style: const TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w400),
|
|
|
- ),
|
|
|
- TextSpan(
|
|
|
- text: "(${entity?.total?.agAmt})",
|
|
|
- style: const TextStyle(color: ColorConstants.textGreen0AC074, fontSize: 14, fontWeight: FontWeight.w400),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
+ Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ MyTextView("TotalAmt".tr, textColor: Colors.white, fontSize: 14, isFontRegular: true),
|
|
|
+ MyTextView(
|
|
|
+ "(${entity?.total?.agAmt})",
|
|
|
+ textColor: type == 0
|
|
|
+ ? ColorConstants.textGreen0AC074
|
|
|
+ : type == 1
|
|
|
+ ? ColorConstants.textBlue06D9FF
|
|
|
+ : ColorConstants.textRedFF6262,
|
|
|
+ fontSize: 14,
|
|
|
+ isFontRegular: true,
|
|
|
+ ),
|
|
|
+ ],
|
|
|
).expanded(),
|
|
|
-
|
|
|
],
|
|
|
- ).marginOnly(left: 20,right:20,top: 18,bottom: 2),
|
|
|
+ ).marginOnly(left: 20, right: 20, top: 18, bottom: 2),
|
|
|
|
|
|
//底部的实际数据
|
|
|
...(entity?.rows.map((item) {
|
|
|
- return _childItem(
|
|
|
- item.outletName,
|
|
|
- type == 0 ? item.hrs : type == 1 ? item.inHrs : item.totHrs,
|
|
|
- type == 0 ? item.agAmt : type == 1 ? item.inAgAmt : item.totAgAmt,
|
|
|
- );
|
|
|
- }).toList() ?? []),
|
|
|
-
|
|
|
+ return _childItem(
|
|
|
+ item.outletName,
|
|
|
+ type == 0
|
|
|
+ ? item.hrs
|
|
|
+ : type == 1
|
|
|
+ ? item.inHrs
|
|
|
+ : item.totHrs,
|
|
|
+ type == 0
|
|
|
+ ? item.agAmt
|
|
|
+ : type == 1
|
|
|
+ ? item.inAgAmt
|
|
|
+ : item.totAgAmt,
|
|
|
+ );
|
|
|
+ }).toList() ??
|
|
|
+ []),
|
|
|
],
|
|
|
),
|
|
|
);
|
|
@@ -106,22 +124,19 @@ class ReportLabourItem extends StatelessWidget {
|
|
|
textColor: Colors.white,
|
|
|
isFontRegular: true,
|
|
|
).expanded(),
|
|
|
-
|
|
|
MyTextView(
|
|
|
"$hours H",
|
|
|
fontSize: 14,
|
|
|
textColor: Colors.white,
|
|
|
isFontRegular: true,
|
|
|
).expanded(),
|
|
|
-
|
|
|
MyTextView(
|
|
|
"\$ $agAmt",
|
|
|
fontSize: 14,
|
|
|
textColor: Colors.white,
|
|
|
isFontRegular: true,
|
|
|
).expanded(),
|
|
|
-
|
|
|
],
|
|
|
- ).marginOnly(top: 16,left: 20,right: 20);
|
|
|
+ ).marginOnly(top: 16, left: 20, right: 20);
|
|
|
}
|
|
|
}
|