人员资料生日数据格式错误

This commit is contained in:
czz
2025-07-16 18:48:38 +08:00
parent db6903ee78
commit 8687a4b0dd
5 changed files with 237 additions and 32 deletions

View File

@@ -84,7 +84,6 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
gradientDirection: GradientDirection.vertical,
onTap: () async {
bool isValid = true;
// 数据验证
for (int i = 0;
i < controller.model.peopleList.length;
@@ -125,15 +124,11 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
break;
}
}
// 所有数据合法,开始保存
if (isValid) {
for (var data in controller.model.peopleList) {
try {
await controller.savePeoples(data);
TopSlideNotification.show(context,
text: "更新成功".tr,
textColor: Color(0XFF00C1AA));
await controller.savePeoples(data, context);
MHTHomeController mhtHomeController =
Get.find();
mhtHomeController.getPersonList();
@@ -652,6 +647,16 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
controller
.updateAll();
print("$d");
// final String dateStr =
// "${d.year}-${d.month.toString().padLeft(2, '0')}";
// controller.model.peopleList[
// index]
// ['birthday'] =
// dateStr;
// controller
// .updateAll();
// print(dateStr);
});
});
},
@@ -781,7 +786,6 @@ class PeopleInfoPage extends GetView<PeopleInfoController> {
.peopleList[
index]
['contact'] = value;
controller.updateAll();
},
controller: controller.onReDraw(
TextEditingController(