|
@@ -339,7 +339,7 @@ class _DialogAppliedModifyState extends State<DialogAppliedModify> {
|
|
fontSize: 14,
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w400,
|
|
fontWeight: FontWeight.w400,
|
|
),
|
|
),
|
|
- inputType: TextInputType.numberWithOptions(signed: true,decimal: true),
|
|
|
|
|
|
+ inputType: TextInputType.numberWithOptions(signed: true, decimal: true),
|
|
textInputAction: TextInputAction.next,
|
|
textInputAction: TextInputAction.next,
|
|
enabled: true,
|
|
enabled: true,
|
|
onSubmit: (key, value) {},
|
|
onSubmit: (key, value) {},
|
|
@@ -464,60 +464,67 @@ class _DialogAppliedModifyState extends State<DialogAppliedModify> {
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
- /// 选择门卫签到
|
|
|
|
- void pickerSecurityIn() {
|
|
|
|
|
|
+ /// 选择工作地签到
|
|
|
|
+ void pickerWorkIn() {
|
|
if (editIndexOption == null) return;
|
|
if (editIndexOption == null) return;
|
|
|
|
|
|
DatePickerUtil.showCupertinoDatePicker(
|
|
DatePickerUtil.showCupertinoDatePicker(
|
|
- selectedDateTime: DateTimeUtils.getDateTime(editIndexOption!.securityIn ?? ""),
|
|
|
|
|
|
+ selectedDateTime: Utils.isNotEmpty(editIndexOption!.workIn)
|
|
|
|
+ ? DateTimeUtils.getDateTime(editIndexOption!.workIn ?? "")
|
|
|
|
+ : DateTimeUtils.getDateTime(editIndexOption!.startTime ?? ""),
|
|
mode: CupertinoDatePickerMode.dateAndTime,
|
|
mode: CupertinoDatePickerMode.dateAndTime,
|
|
onDateTimeChanged: (date) {
|
|
onDateTimeChanged: (date) {
|
|
setState(() {
|
|
setState(() {
|
|
- editIndexOption?.securityIn = DateTimeUtils.formatDate(date);
|
|
|
|
|
|
+ editIndexOption?.workIn = DateTimeUtils.formatDate(date);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- title: "Security Clock In".tr,
|
|
|
|
|
|
+ title: "Work Clock In".tr,
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
- /// 选择工作地签到
|
|
|
|
- void pickerWorkIn() {
|
|
|
|
|
|
+ /// 选择工作地签出
|
|
|
|
+ void pickerWorkOut() {
|
|
if (editIndexOption == null) return;
|
|
if (editIndexOption == null) return;
|
|
|
|
|
|
DatePickerUtil.showCupertinoDatePicker(
|
|
DatePickerUtil.showCupertinoDatePicker(
|
|
- selectedDateTime: DateTimeUtils.getDateTime(editIndexOption!.workIn ?? ""),
|
|
|
|
|
|
+ selectedDateTime: Utils.isNotEmpty(editIndexOption!.workOut)
|
|
|
|
+ ? DateTimeUtils.getDateTime(editIndexOption!.workOut ?? "")
|
|
|
|
+ : DateTimeUtils.getDateTime(editIndexOption!.endTime ?? ""),
|
|
mode: CupertinoDatePickerMode.dateAndTime,
|
|
mode: CupertinoDatePickerMode.dateAndTime,
|
|
onDateTimeChanged: (date) {
|
|
onDateTimeChanged: (date) {
|
|
setState(() {
|
|
setState(() {
|
|
- editIndexOption?.workIn = DateTimeUtils.formatDate(date);
|
|
|
|
|
|
+ editIndexOption?.workOut = DateTimeUtils.formatDate(date);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- title: "Work Clock In".tr,
|
|
|
|
|
|
+ title: "Work Clock Out".tr,
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
- /// 选择工作地签出
|
|
|
|
- void pickerWorkOut() {
|
|
|
|
|
|
+ /// 选择门卫签到
|
|
|
|
+ void pickerSecurityIn() {
|
|
if (editIndexOption == null) return;
|
|
if (editIndexOption == null) return;
|
|
|
|
|
|
DatePickerUtil.showCupertinoDatePicker(
|
|
DatePickerUtil.showCupertinoDatePicker(
|
|
- selectedDateTime: DateTimeUtils.getDateTime(editIndexOption!.workOut ?? ""),
|
|
|
|
|
|
+ selectedDateTime: Utils.isNotEmpty(editIndexOption!.securityIn)
|
|
|
|
+ ? DateTimeUtils.getDateTime(editIndexOption!.securityIn ?? "")
|
|
|
|
+ : DateTimeUtils.getDateTime(editIndexOption!.startTime ?? ""),
|
|
mode: CupertinoDatePickerMode.dateAndTime,
|
|
mode: CupertinoDatePickerMode.dateAndTime,
|
|
onDateTimeChanged: (date) {
|
|
onDateTimeChanged: (date) {
|
|
setState(() {
|
|
setState(() {
|
|
- editIndexOption?.workOut = DateTimeUtils.formatDate(date);
|
|
|
|
|
|
+ editIndexOption?.securityIn = DateTimeUtils.formatDate(date);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- title: "Work Clock Out".tr,
|
|
|
|
|
|
+ title: "Security Clock In".tr,
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
/// 选择门卫签出
|
|
/// 选择门卫签出
|
|
void pickerSecurityOut() {
|
|
void pickerSecurityOut() {
|
|
if (editIndexOption == null) return;
|
|
if (editIndexOption == null) return;
|
|
-
|
|
|
|
DatePickerUtil.showCupertinoDatePicker(
|
|
DatePickerUtil.showCupertinoDatePicker(
|
|
- selectedDateTime: DateTimeUtils.getDateTime(editIndexOption!.securityOut ?? ""),
|
|
|
|
|
|
+ selectedDateTime: Utils.isNotEmpty(editIndexOption!.securityOut)
|
|
|
|
+ ? DateTimeUtils.getDateTime(editIndexOption!.securityOut ?? "")
|
|
|
|
+ : DateTimeUtils.getDateTime(editIndexOption!.endTime ?? ""),
|
|
mode: CupertinoDatePickerMode.dateAndTime,
|
|
mode: CupertinoDatePickerMode.dateAndTime,
|
|
onDateTimeChanged: (date) {
|
|
onDateTimeChanged: (date) {
|
|
setState(() {
|
|
setState(() {
|