|
@@ -7,6 +7,7 @@ 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/service/app_config_service.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';
|
|
@@ -97,7 +98,7 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
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 || ConfigService.to.isTHOAType ? 0.5 : 0.2),
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
|
),
|
|
|
child: Row(
|
|
@@ -116,7 +117,7 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
|
|
|
//下拉选图标
|
|
|
Visibility(
|
|
|
- visible: state.pageType != 2,
|
|
|
+ visible: state.pageType != 2 && !ConfigService.to.isTHOAType,
|
|
|
child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
|
|
|
),
|
|
|
],
|
|
@@ -142,7 +143,7 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
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 || ConfigService.to.isTHOAType ? 0.5 : 0.2),
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
|
),
|
|
|
child: Row(
|
|
@@ -160,14 +161,14 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
).expanded(),
|
|
|
//下拉选图标
|
|
|
Visibility(
|
|
|
- visible: state.pageType != 2,
|
|
|
+ visible: state.pageType != 2 && !ConfigService.to.isTHOAType,
|
|
|
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 != 2 && !ConfigService.to.isTHOAType) controller.pickStartTime();
|
|
|
}),
|
|
|
),
|
|
|
|
|
@@ -178,7 +179,7 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
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 || ConfigService.to.isTHOAType ? 0.5 : 0.2),
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
|
),
|
|
|
child: Row(
|
|
@@ -196,14 +197,14 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
).expanded(),
|
|
|
//下拉选图标
|
|
|
Visibility(
|
|
|
- visible: state.pageType != 2,
|
|
|
+ visible: state.pageType != 2 && !ConfigService.to.isTHOAType,
|
|
|
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 != 2 && !ConfigService.to.isTHOAType) controller.pickEndTime();
|
|
|
}),
|
|
|
),
|
|
|
],
|
|
@@ -348,7 +349,7 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
margin: const EdgeInsets.only(right: 12),
|
|
|
height: 45,
|
|
|
decoration: BoxDecoration(
|
|
|
- color: const Color(0xFF4DCFF6).withOpacity(0.2),
|
|
|
+ color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 || ConfigService.to.isTHOAType ? 0.5 : 0.2),
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
|
),
|
|
|
child: Row(
|
|
@@ -364,12 +365,15 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
textColor: ColorConstants.white,
|
|
|
).expanded(),
|
|
|
//下拉选图标
|
|
|
- const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
|
|
|
+ Visibility(
|
|
|
+ visible: state.pageType != 2 && !ConfigService.to.isTHOAType,
|
|
|
+ child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
|
|
|
+ ),
|
|
|
],
|
|
|
),
|
|
|
).onTap(() {
|
|
|
FocusScope.of(context).unfocus();
|
|
|
- controller.pickLimitType();
|
|
|
+ if (state.pageType != 2 && !ConfigService.to.isTHOAType) controller.pickLimitType();
|
|
|
}).expanded(flex: 55),
|
|
|
|
|
|
//输入框-不限制性别
|
|
@@ -382,7 +386,8 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
paddingTop: 0,
|
|
|
paddingBottom: 0,
|
|
|
height: 45,
|
|
|
- fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(0.2),
|
|
|
+ enabled: state.pageType != 2 && !ConfigService.to.isTHOAType,
|
|
|
+ fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 || ConfigService.to.isTHOAType ? 0.5 : 0.2),
|
|
|
inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
|
|
|
textInputType: TextInputType.number,
|
|
|
formData: state.formData,
|
|
@@ -417,6 +422,7 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
paddingRight: 10,
|
|
|
height: 45,
|
|
|
cornerRadius: 0,
|
|
|
+ enabled: state.pageType != 2 && !ConfigService.to.isTHOAType,
|
|
|
fillBackgroundColor: Colors.transparent,
|
|
|
inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
|
|
|
textInputType: TextInputType.number,
|
|
@@ -429,7 +435,7 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
],
|
|
|
)
|
|
|
.decorated(
|
|
|
- color: const Color(0xFF4DCFF6).withOpacity(0.2),
|
|
|
+ color: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 || ConfigService.to.isTHOAType ? 0.5 : 0.2),
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
|
)
|
|
|
.expanded(),
|
|
@@ -452,6 +458,7 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
paddingLeft: 10,
|
|
|
paddingRight: 10,
|
|
|
height: 45,
|
|
|
+ enabled: state.pageType != 2 && !ConfigService.to.isTHOAType,
|
|
|
cornerRadius: 0,
|
|
|
fillBackgroundColor: Colors.transparent,
|
|
|
inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
|
|
@@ -475,6 +482,30 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
],
|
|
|
),
|
|
|
|
|
|
+ //OT的设置
|
|
|
+ Row(
|
|
|
+ children: [
|
|
|
+ MyTextView(
|
|
|
+ "${"OT".tr}:",
|
|
|
+ fontSize: 15,
|
|
|
+ textColor: Colors.white,
|
|
|
+ isFontRegular: true,
|
|
|
+ marginRight: 10,
|
|
|
+ ),
|
|
|
+ CupertinoSwitch(
|
|
|
+ value: state.isOTSelected,
|
|
|
+ activeColor: const Color(0XFF03DC9A),
|
|
|
+ trackColor: const Color(0XFFDCDDDD),
|
|
|
+ thumbColor: CupertinoColors.white,
|
|
|
+ onChanged: state.pageType == 2
|
|
|
+ ? null
|
|
|
+ : (value) {
|
|
|
+ controller.setOTSelected(value);
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ).marginOnly(top: 15, bottom: 10),
|
|
|
+
|
|
|
//输入类型
|
|
|
MyTextView("Event".tr, fontSize: 15, textColor: Colors.white, isFontRegular: true, marginTop: 15, marginBottom: 10),
|
|
|
|
|
@@ -487,7 +518,8 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
paddingTop: 0,
|
|
|
paddingBottom: 0,
|
|
|
height: 45,
|
|
|
- fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(0.2),
|
|
|
+ enabled: state.pageType != 2 && !ConfigService.to.isTHOAType,
|
|
|
+ fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 || ConfigService.to.isTHOAType ? 0.5 : 0.2),
|
|
|
inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
|
|
|
textInputType: TextInputType.number,
|
|
|
formData: state.formData,
|
|
@@ -505,7 +537,8 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
paddingTop: 0,
|
|
|
paddingBottom: 0,
|
|
|
height: 45,
|
|
|
- fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(0.2),
|
|
|
+ enabled: state.pageType != 2 && !ConfigService.to.isTHOAType,
|
|
|
+ fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.pageType == 2 || ConfigService.to.isTHOAType ? 0.5 : 0.2),
|
|
|
inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
|
|
|
textInputType: TextInputType.number,
|
|
|
formData: state.formData,
|
|
@@ -532,14 +565,14 @@ class _LabourRequestAddState extends BaseState<LabourRequestERAddPage, LabourReq
|
|
|
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 || ConfigService.to.isTHOAType ? 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 != 2 && !ConfigService.to.isTHOAType,
|
|
|
focusNode: state.formData["remark"]!['focusNode'],
|
|
|
controller: state.formData["remark"]!['controller'],
|
|
|
// 装饰
|