|
@@ -24,7 +24,7 @@ import 'package:router/path/router_path.dart';
|
|
|
|
|
|
import 'job_list_edit_state.dart';
|
|
import 'job_list_edit_state.dart';
|
|
|
|
|
|
-/**
|
|
|
|
|
|
+/*
|
|
* 新加坡的工作详情,其实就是LabourRequest的详情和编辑
|
|
* 新加坡的工作详情,其实就是LabourRequest的详情和编辑
|
|
*/
|
|
*/
|
|
class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
@@ -90,11 +90,11 @@ class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
|
|
|
|
//工作标题
|
|
//工作标题
|
|
Container(
|
|
Container(
|
|
- padding: EdgeInsets.only(left: 16, right: 10),
|
|
|
|
- margin: EdgeInsets.only(top: 10),
|
|
|
|
|
|
+ padding: const EdgeInsets.only(left: 16, right: 10),
|
|
|
|
+ margin: const EdgeInsets.only(top: 10),
|
|
height: 45,
|
|
height: 45,
|
|
decoration: BoxDecoration(
|
|
decoration: BoxDecoration(
|
|
- color: Color(0xFF4DCFF6).withOpacity(0.5),
|
|
|
|
|
|
+ color: const Color(0xFF4DCFF6).withOpacity(0.5),
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
),
|
|
),
|
|
child: Row(
|
|
child: Row(
|
|
@@ -126,10 +126,10 @@ class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
//选择开始时间
|
|
//选择开始时间
|
|
Expanded(
|
|
Expanded(
|
|
child: Container(
|
|
child: Container(
|
|
- padding: EdgeInsets.only(left: 16, right: 10),
|
|
|
|
|
|
+ padding: const EdgeInsets.only(left: 16, right: 10),
|
|
height: 45,
|
|
height: 45,
|
|
decoration: BoxDecoration(
|
|
decoration: BoxDecoration(
|
|
- color: Color(0xFF4DCFF6).withOpacity(state.isEditType ? 0.2 : 0.5),
|
|
|
|
|
|
+ color: const Color(0xFF4DCFF6).withOpacity(state.isEditType ? 0.2 : 0.5),
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
),
|
|
),
|
|
child: Row(
|
|
child: Row(
|
|
@@ -148,7 +148,7 @@ class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
//下拉选图标
|
|
//下拉选图标
|
|
Visibility(
|
|
Visibility(
|
|
visible: state.isEditType,
|
|
visible: state.isEditType,
|
|
- child: MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
|
|
|
|
|
|
+ child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
|
|
),
|
|
),
|
|
],
|
|
],
|
|
),
|
|
),
|
|
@@ -161,11 +161,11 @@ class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
// //选择结束时间
|
|
// //选择结束时间
|
|
Expanded(
|
|
Expanded(
|
|
child: Container(
|
|
child: Container(
|
|
- padding: EdgeInsets.only(left: 16, right: 10),
|
|
|
|
- margin: EdgeInsets.only(left: 10),
|
|
|
|
|
|
+ padding: const EdgeInsets.only(left: 16, right: 10),
|
|
|
|
+ margin: const EdgeInsets.only(left: 10),
|
|
height: 45,
|
|
height: 45,
|
|
decoration: BoxDecoration(
|
|
decoration: BoxDecoration(
|
|
- color: Color(0xFF4DCFF6).withOpacity(state.isEditType ? 0.2 : 0.5),
|
|
|
|
|
|
+ color: const Color(0xFF4DCFF6).withOpacity(state.isEditType ? 0.2 : 0.5),
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
),
|
|
),
|
|
child: Row(
|
|
child: Row(
|
|
@@ -184,7 +184,7 @@ class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
//下拉选图标
|
|
//下拉选图标
|
|
Visibility(
|
|
Visibility(
|
|
visible: state.isEditType,
|
|
visible: state.isEditType,
|
|
- child: MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
|
|
|
|
|
|
+ child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
|
|
),
|
|
),
|
|
],
|
|
],
|
|
),
|
|
),
|
|
@@ -203,11 +203,11 @@ class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
|
|
|
|
//选择部门
|
|
//选择部门
|
|
Container(
|
|
Container(
|
|
- padding: EdgeInsets.only(left: 16, right: 10),
|
|
|
|
- margin: EdgeInsets.only(top: 10),
|
|
|
|
|
|
+ padding: const EdgeInsets.only(left: 16, right: 10),
|
|
|
|
+ margin: const EdgeInsets.only(top: 10),
|
|
height: 45,
|
|
height: 45,
|
|
decoration: BoxDecoration(
|
|
decoration: BoxDecoration(
|
|
- color: Color(0xFF4DCFF6).withOpacity(state.isEditType ? 0.2 : 0.5),
|
|
|
|
|
|
+ color: const Color(0xFF4DCFF6).withOpacity(state.isEditType ? 0.2 : 0.5),
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
),
|
|
),
|
|
child: Row(
|
|
child: Row(
|
|
@@ -225,7 +225,7 @@ class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
).expanded(),
|
|
).expanded(),
|
|
Visibility(
|
|
Visibility(
|
|
visible: state.isEditType,
|
|
visible: state.isEditType,
|
|
- child: MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
|
|
|
|
|
|
+ child: const MyAssetImage(Assets.baseServiceTriangleDropDownIcon, width: 11.5, height: 6.28),
|
|
),
|
|
),
|
|
],
|
|
],
|
|
),
|
|
),
|
|
@@ -261,7 +261,7 @@ class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
paddingBottom: 0,
|
|
paddingBottom: 0,
|
|
height: 45,
|
|
height: 45,
|
|
enabled: state.isEditType,
|
|
enabled: state.isEditType,
|
|
- fillBackgroundColor: Color(0xFF4DCFF6).withOpacity(state.isEditType ? 0.2 : 0.5),
|
|
|
|
|
|
+ fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.isEditType ? 0.2 : 0.5),
|
|
inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
|
|
inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
|
|
textInputType: TextInputType.number,
|
|
textInputType: TextInputType.number,
|
|
formData: state.formData,
|
|
formData: state.formData,
|
|
@@ -317,7 +317,7 @@ class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
paddingBottom: 0,
|
|
paddingBottom: 0,
|
|
height: 45,
|
|
height: 45,
|
|
enabled: state.isEditType,
|
|
enabled: state.isEditType,
|
|
- fillBackgroundColor: Color(0xFF4DCFF6).withOpacity(state.isEditType ? 0.2 : 0.5),
|
|
|
|
|
|
+ fillBackgroundColor: const Color(0xFF4DCFF6).withOpacity(state.isEditType ? 0.2 : 0.5),
|
|
inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
|
|
inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.digitsOnly],
|
|
textInputType: TextInputType.number,
|
|
textInputType: TextInputType.number,
|
|
formData: state.formData,
|
|
formData: state.formData,
|
|
@@ -361,11 +361,11 @@ class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
IgnoreKeyboardDismiss(
|
|
IgnoreKeyboardDismiss(
|
|
child: Container(
|
|
child: Container(
|
|
height: 160,
|
|
height: 160,
|
|
- margin: EdgeInsets.only(top: 10),
|
|
|
|
- padding: EdgeInsets.symmetric(vertical: 15, horizontal: 15),
|
|
|
|
|
|
+ margin: const EdgeInsets.only(top: 10),
|
|
|
|
+ padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 15),
|
|
decoration: BoxDecoration(
|
|
decoration: BoxDecoration(
|
|
- color: Color(0xFF4DCFF6).withOpacity(state.isEditType ? 0.2 : 0.5),
|
|
|
|
- borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
|
|
|
|
+ color: const Color(0xFF4DCFF6).withOpacity(state.isEditType ? 0.2 : 0.5),
|
|
|
|
+ borderRadius: const BorderRadius.all(Radius.circular(5)),
|
|
),
|
|
),
|
|
child: TextField(
|
|
child: TextField(
|
|
cursorColor: ColorConstants.white,
|
|
cursorColor: ColorConstants.white,
|
|
@@ -380,13 +380,13 @@ class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
isCollapsed: true,
|
|
isCollapsed: true,
|
|
border: InputBorder.none,
|
|
border: InputBorder.none,
|
|
hintText: state.formData["remark"]!['hintText'],
|
|
hintText: state.formData["remark"]!['hintText'],
|
|
- hintStyle: TextStyle(
|
|
|
|
|
|
+ hintStyle: const TextStyle(
|
|
color: ColorConstants.textGrayAECAE5,
|
|
color: ColorConstants.textGrayAECAE5,
|
|
fontSize: 15.0,
|
|
fontSize: 15.0,
|
|
fontWeight: FontWeight.w400,
|
|
fontWeight: FontWeight.w400,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
- style: TextStyle(
|
|
|
|
|
|
+ style: const TextStyle(
|
|
color: ColorConstants.white,
|
|
color: ColorConstants.white,
|
|
fontSize: 15.0,
|
|
fontSize: 15.0,
|
|
fontWeight: FontWeight.w400,
|
|
fontWeight: FontWeight.w400,
|
|
@@ -401,20 +401,22 @@ class JobListEditPage extends BaseStatelessPage<JobListEditController> {
|
|
),
|
|
),
|
|
|
|
|
|
//提交按钮
|
|
//提交按钮
|
|
- 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),
|
|
|
|
|
|
+ Visibility(
|
|
|
|
+ visible: state.isEditType,
|
|
|
|
+ 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),
|
|
).paddingOnly(left: 15, right: 15),
|
|
),
|
|
),
|