|
...
|
...
|
@@ -135,6 +135,7 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
String oldPhone; //联系人保存之前的值
|
|
|
|
String oldSex;
|
|
|
|
String oldRemark;
|
|
|
|
String oldPum;
|
|
|
|
bool needBack = false;
|
|
|
|
bool needBlack = false;
|
|
|
|
bool needHistory = false;
|
|
...
|
...
|
@@ -210,6 +211,8 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
showOverlay(context);
|
|
|
|
setState(() {});
|
|
|
|
} else {
|
|
|
|
|
|
|
|
_addNameSuffix(nameStr, sexStr);
|
|
|
|
if (!needBack &&
|
|
|
|
!needBlack &&
|
|
|
|
!needHistory &&
|
|
...
|
...
|
@@ -485,6 +488,7 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
currentRemark = oldRemark ?? "";
|
|
|
|
customController.text = oldRemark ?? "";
|
|
|
|
oldSex = sex;
|
|
|
|
oldPum = detailModel.detailModelAllSunModel.actualPum;
|
|
|
|
|
|
|
|
if (sex != '' && sex != null) {
|
|
|
|
if (sex == '1') {
|
|
...
|
...
|
@@ -896,7 +900,7 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
needSex ||
|
|
|
|
needHistory ||
|
|
|
|
needRemark ||
|
|
|
|
oldRemark != remark) {
|
|
|
|
oldRemark != remark || oldPum != detailModel.selectNum) {
|
|
|
|
showPhoneHistory = false;
|
|
|
|
if (needWechat) {
|
|
|
|
needWechat = false;
|
|
...
|
...
|
@@ -1398,7 +1402,7 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
if ((nameStr == null || nameStr.trim().length == 0) &&
|
|
|
|
_baseIndoProvider.phoneController.text.replaceAll(' ', '').length ==
|
|
|
|
0 &&
|
|
|
|
customController.text.trim().length == 0) {
|
|
|
|
customController.text.trim().length == 0&&detailModel.selectNum == null) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -1422,6 +1426,7 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
String name;
|
|
|
|
String sex;
|
|
|
|
String remark;
|
|
|
|
String actualPum;
|
|
|
|
if (_baseIndoProvider.phoneController.text.replaceAll(' ', '').length > 0) {
|
|
|
|
phone = _baseIndoProvider.phoneController.text.replaceAll(' ', '');
|
|
|
|
}
|
|
...
|
...
|
@@ -1431,9 +1436,12 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
if (customController.text.trim().length > 0) {
|
|
|
|
remark = customController.text;
|
|
|
|
}
|
|
|
|
if( detailModel.selectNum != null && detailModel.selectNum != ''){
|
|
|
|
actualPum = detailModel.selectNum;
|
|
|
|
}
|
|
|
|
|
|
|
|
sex = '${sexList.indexOf(sexStr) + 1}';
|
|
|
|
bool sucess = await detailModel.upReserveInfo(context, widget.rid,
|
|
|
|
bool sucess = await detailModel.upReserveInfo(context, widget.rid,actualPum: actualPum,
|
|
|
|
name: name, sex: sex, phone: phone, cusdem: remark, needToast: false);
|
|
|
|
if (sucess) {
|
|
|
|
reserverPhone = phone;
|
|
...
|
...
|
@@ -1441,6 +1449,7 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
oldName = name;
|
|
|
|
oldSex = sex;
|
|
|
|
oldRemark = remark;
|
|
|
|
oldPum = actualPum;
|
|
|
|
|
|
|
|
EventBus().emit("refresh_tablemanager"); //刷新桌位
|
|
|
|
bus.emit("refresh_book_list"); //刷新已预订列表
|
|
...
|
...
|
@@ -2250,19 +2259,19 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
// selectPnum = value.first;
|
|
|
|
// pnum = pnumlist[value.first];
|
|
|
|
// });
|
|
|
|
bool sucess = await detailModel
|
|
|
|
.upReserveInfo(context, widget.rid,
|
|
|
|
actualPum: detailModel.selectNum,
|
|
|
|
needToast: false);
|
|
|
|
|
|
|
|
if (sucess) {
|
|
|
|
EventBus()
|
|
|
|
.emit("refresh_tablemanager"); //刷新桌位
|
|
|
|
bus.emit("refresh_book_list"); //刷新已预订列表
|
|
|
|
bus.emit("refresh_detail");
|
|
|
|
// await _getReserveDetail(
|
|
|
|
// showCicle: false);
|
|
|
|
}
|
|
|
|
// bool sucess = await detailModel
|
|
|
|
// .upReserveInfo(context, widget.rid,
|
|
|
|
// actualPum: detailModel.selectNum,
|
|
|
|
// needToast: false);
|
|
|
|
|
|
|
|
// if (sucess) {
|
|
|
|
// EventBus()
|
|
|
|
// .emit("refresh_tablemanager"); //刷新桌位
|
|
|
|
// bus.emit("refresh_book_list"); //刷新已预订列表
|
|
|
|
// bus.emit("refresh_detail");
|
|
|
|
// // await _getReserveDetail(
|
|
|
|
// // showCicle: false);
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
...
|
...
|
|