|
@@ -367,8 +367,8 @@ class InvicationPageState extends State<InvicationPage> |
|
@@ -367,8 +367,8 @@ class InvicationPageState extends State<InvicationPage> |
|
367
|
//临餐不可以取消
|
367
|
//临餐不可以取消
|
|
368
|
|
368
|
|
|
369
|
//比较相差的天数
|
369
|
//比较相差的天数
|
|
370
|
-
|
|
|
|
371
|
- int differenceSeconds = detailModel.detailModelAllSunModel.ddateFhms
|
370
|
+
|
|
|
|
371
|
+ int differenceSeconds = detailModel.detailModelAllSunModel.ddateFhms
|
|
372
|
.difference(DateTime.now())
|
372
|
.difference(DateTime.now())
|
|
373
|
.inSeconds;
|
373
|
.inSeconds;
|
|
374
|
|
374
|
|
|
@@ -406,7 +406,7 @@ class InvicationPageState extends State<InvicationPage> |
|
@@ -406,7 +406,7 @@ class InvicationPageState extends State<InvicationPage> |
|
406
|
//临餐不可以取消
|
406
|
//临餐不可以取消
|
|
407
|
|
407
|
|
|
408
|
//比较相差的天数
|
408
|
//比较相差的天数
|
|
409
|
- int differenceSeconds = detailModel.detailModelAllSunModel.ddateFhms
|
409
|
+ int differenceSeconds = detailModel.detailModelAllSunModel.ddateFhms
|
|
410
|
.difference(DateTime.now())
|
410
|
.difference(DateTime.now())
|
|
411
|
.inSeconds;
|
411
|
.inSeconds;
|
|
412
|
|
412
|
|
|
@@ -485,6 +485,19 @@ class InvicationPageState extends State<InvicationPage> |
|
@@ -485,6 +485,19 @@ class InvicationPageState extends State<InvicationPage> |
|
485
|
currentRemark = oldRemark ?? "";
|
485
|
currentRemark = oldRemark ?? "";
|
|
486
|
customController.text = oldRemark ?? "";
|
486
|
customController.text = oldRemark ?? "";
|
|
487
|
oldSex = sex;
|
487
|
oldSex = sex;
|
|
|
|
488
|
+
|
|
|
|
489
|
+ if (sex != '' && sex != null) {
|
|
|
|
490
|
+ if (sex == '1') {
|
|
|
|
491
|
+ sexStr = '先生';
|
|
|
|
492
|
+ } else if (sex == '2') {
|
|
|
|
493
|
+ sexStr = '女士';
|
|
|
|
494
|
+ } else if (sex == '3') {
|
|
|
|
495
|
+ sexStr = '公司';
|
|
|
|
496
|
+ } else if (sex == '4') {
|
|
|
|
497
|
+ sexStr = '贵宾';
|
|
|
|
498
|
+ }
|
|
|
|
499
|
+ sexSelectIndex = sexList.indexOf(sexStr);
|
|
|
|
500
|
+ }
|
|
488
|
if (nameWidget != ' ' &&
|
501
|
if (nameWidget != ' ' &&
|
|
489
|
nameWidget != '' &&
|
502
|
nameWidget != '' &&
|
|
490
|
nameWidget != null &&
|
503
|
nameWidget != null &&
|
|
@@ -498,19 +511,10 @@ class InvicationPageState extends State<InvicationPage> |
|
@@ -498,19 +511,10 @@ class InvicationPageState extends State<InvicationPage> |
|
498
|
// }
|
511
|
// }
|
|
499
|
// }
|
512
|
// }
|
|
500
|
|
513
|
|
|
501
|
- if (sex == '1') {
|
|
|
|
502
|
- sexStr = '先生';
|
|
|
|
503
|
- } else if (sex == '2') {
|
|
|
|
504
|
- sexStr = '女士';
|
|
|
|
505
|
- } else if (sex == '3') {
|
|
|
|
506
|
- sexStr = '公司';
|
|
|
|
507
|
- } else if (sex == '4') {
|
|
|
|
508
|
- sexStr = '贵宾';
|
|
|
|
509
|
- }
|
|
|
|
510
|
- sexSelectIndex = sexList.indexOf(sexStr);
|
|
|
|
511
|
_addNameSuffix(nameStr, sexStr);
|
514
|
_addNameSuffix(nameStr, sexStr);
|
|
512
|
// setState(() {});
|
515
|
// setState(() {});
|
|
513
|
}
|
516
|
}
|
|
|
|
517
|
+
|
|
514
|
dateTime = DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000);
|
518
|
dateTime = DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000);
|
|
515
|
dateTimeStr =
|
519
|
dateTimeStr =
|
|
516
|
"${dateTime.year}年${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日 ${detailModel.detailModelAllSunModel.ddate_solt}";
|
520
|
"${dateTime.year}年${Utils.addZeroNumber(dateTime.month)}月${Utils.addZeroNumber(dateTime.day)}日 ${detailModel.detailModelAllSunModel.ddate_solt}";
|
|
@@ -903,9 +907,9 @@ class InvicationPageState extends State<InvicationPage> |
|
@@ -903,9 +907,9 @@ class InvicationPageState extends State<InvicationPage> |
|
903
|
needBack = false;
|
907
|
needBack = false;
|
|
904
|
Navigator.of(context).pop();
|
908
|
Navigator.of(context).pop();
|
|
905
|
}
|
909
|
}
|
|
906
|
- if (needSex) {
|
|
|
|
907
|
- needSex = false;
|
|
|
|
908
|
- }
|
910
|
+ // if (needSex) {
|
|
|
|
911
|
+ // needSex = false;
|
|
|
|
912
|
+ // }
|
|
909
|
// if (needRemark) {
|
913
|
// if (needRemark) {
|
|
910
|
// needRemark = false;
|
914
|
// needRemark = false;
|
|
911
|
// }
|
915
|
// }
|
|
@@ -944,7 +948,7 @@ class InvicationPageState extends State<InvicationPage> |
|
@@ -944,7 +948,7 @@ class InvicationPageState extends State<InvicationPage> |
|
944
|
needBlack = false;
|
948
|
needBlack = false;
|
|
945
|
}
|
949
|
}
|
|
946
|
|
950
|
|
|
947
|
- _updateReserve();
|
951
|
+ _updateReserve(needSex: needSex);
|
|
948
|
}
|
952
|
}
|
|
949
|
// DialogUtil.cupertinoAlertDialog(context,
|
953
|
// DialogUtil.cupertinoAlertDialog(context,
|
|
950
|
// title: "客户信息",
|
954
|
// title: "客户信息",
|
|
@@ -1385,13 +1389,16 @@ class InvicationPageState extends State<InvicationPage> |
|
@@ -1385,13 +1389,16 @@ class InvicationPageState extends State<InvicationPage> |
|
1385
|
}
|
1389
|
}
|
|
1386
|
|
1390
|
|
|
1387
|
/// 修改预订人信息
|
1391
|
/// 修改预订人信息
|
|
1388
|
- _updateReserve() async {
|
|
|
|
1389
|
- if ((nameStr == null || nameStr.trim().length == 0) &&
|
|
|
|
1390
|
- _baseIndoProvider.phoneController.text.replaceAll(' ', '').length ==
|
|
|
|
1391
|
- 0 &&
|
|
|
|
1392
|
- customController.text.trim().length == 0) {
|
|
|
|
1393
|
- return;
|
1392
|
+ _updateReserve({needSex = false}) async {
|
|
|
|
1393
|
+ if (!needSex) {
|
|
|
|
1394
|
+ if ((nameStr == null || nameStr.trim().length == 0) &&
|
|
|
|
1395
|
+ _baseIndoProvider.phoneController.text.replaceAll(' ', '').length ==
|
|
|
|
1396
|
+ 0 &&
|
|
|
|
1397
|
+ customController.text.trim().length == 0) {
|
|
|
|
1398
|
+ return;
|
|
|
|
1399
|
+ }
|
|
1394
|
}
|
1400
|
}
|
|
|
|
1401
|
+
|
|
1395
|
// if ((nameStr == null || nameStr.trim().length == 0) &&
|
1402
|
// if ((nameStr == null || nameStr.trim().length == 0) &&
|
|
1396
|
// _baseIndoProvider.phoneController.text.replaceAll(' ', '').length > 0 &&
|
1403
|
// _baseIndoProvider.phoneController.text.replaceAll(' ', '').length > 0 &&
|
|
1397
|
// oldName == null) {
|
1404
|
// oldName == null) {
|
|
@@ -1447,8 +1454,8 @@ class InvicationPageState extends State<InvicationPage> |
|
@@ -1447,8 +1454,8 @@ class InvicationPageState extends State<InvicationPage> |
|
1447
|
|
1454
|
|
|
1448
|
if (nameStr != null && nameStr.trim().length > 0) {
|
1455
|
if (nameStr != null && nameStr.trim().length > 0) {
|
|
1449
|
pramas['rname'] = nameStr;
|
1456
|
pramas['rname'] = nameStr;
|
|
1450
|
- pramas['sex'] = '${sexList.indexOf(sexStr) + 1}';
|
|
|
|
1451
|
}
|
1457
|
}
|
|
|
|
1458
|
+ pramas['sex'] = '${sexList.indexOf(sexStr) + 1}';
|
|
1452
|
if (_baseIndoProvider.phoneController.text.replaceAll(' ', '').length >
|
1459
|
if (_baseIndoProvider.phoneController.text.replaceAll(' ', '').length >
|
|
1453
|
0) {
|
1460
|
0) {
|
|
1454
|
pramas['phone'] =
|
1461
|
pramas['phone'] =
|
|
@@ -2675,8 +2682,8 @@ class InvicationPageState extends State<InvicationPage> |
|
@@ -2675,8 +2682,8 @@ class InvicationPageState extends State<InvicationPage> |
|
2675
|
sexStr = sexList[sexSelectIndex];
|
2682
|
sexStr = sexList[sexSelectIndex];
|
|
2676
|
if (nameStr != null && nameStr != '') {
|
2683
|
if (nameStr != null && nameStr != '') {
|
|
2677
|
_addNameSuffix(nameStr, sexStr);
|
2684
|
_addNameSuffix(nameStr, sexStr);
|
|
2678
|
- _showConfirmWidget(needSex: true);
|
|
|
|
2679
|
}
|
2685
|
}
|
|
|
|
2686
|
+ _showConfirmWidget(needSex: true);
|
|
2680
|
setState(() {});
|
2687
|
setState(() {});
|
|
2681
|
}
|
2688
|
}
|
|
2682
|
}, selecteds: [sexSelectIndex]).then((value) {});
|
2689
|
}, selecteds: [sexSelectIndex]).then((value) {});
|