Commit f2180262cee844b72ae395a7d01cb873e049ebac

Authored by wdn127929
1 parent 3b18793b

预订安排页人数变更修改

@@ -135,6 +135,7 @@ class InvicationPageState extends State<InvicationPage> @@ -135,6 +135,7 @@ class InvicationPageState extends State<InvicationPage>
135 String oldPhone; //联系人保存之前的值 135 String oldPhone; //联系人保存之前的值
136 String oldSex; 136 String oldSex;
137 String oldRemark; 137 String oldRemark;
  138 + String oldPum;
138 bool needBack = false; 139 bool needBack = false;
139 bool needBlack = false; 140 bool needBlack = false;
140 bool needHistory = false; 141 bool needHistory = false;
@@ -210,6 +211,8 @@ class InvicationPageState extends State<InvicationPage> @@ -210,6 +211,8 @@ class InvicationPageState extends State<InvicationPage>
210 showOverlay(context); 211 showOverlay(context);
211 setState(() {}); 212 setState(() {});
212 } else { 213 } else {
  214 +
  215 + _addNameSuffix(nameStr, sexStr);
213 if (!needBack && 216 if (!needBack &&
214 !needBlack && 217 !needBlack &&
215 !needHistory && 218 !needHistory &&
@@ -485,6 +488,7 @@ class InvicationPageState extends State<InvicationPage> @@ -485,6 +488,7 @@ class InvicationPageState extends State<InvicationPage>
485 currentRemark = oldRemark ?? ""; 488 currentRemark = oldRemark ?? "";
486 customController.text = oldRemark ?? ""; 489 customController.text = oldRemark ?? "";
487 oldSex = sex; 490 oldSex = sex;
  491 + oldPum = detailModel.detailModelAllSunModel.actualPum;
488 492
489 if (sex != '' && sex != null) { 493 if (sex != '' && sex != null) {
490 if (sex == '1') { 494 if (sex == '1') {
@@ -896,7 +900,7 @@ class InvicationPageState extends State<InvicationPage> @@ -896,7 +900,7 @@ class InvicationPageState extends State<InvicationPage>
896 needSex || 900 needSex ||
897 needHistory || 901 needHistory ||
898 needRemark || 902 needRemark ||
899 - oldRemark != remark) { 903 + oldRemark != remark || oldPum != detailModel.selectNum) {
900 showPhoneHistory = false; 904 showPhoneHistory = false;
901 if (needWechat) { 905 if (needWechat) {
902 needWechat = false; 906 needWechat = false;
@@ -1398,7 +1402,7 @@ class InvicationPageState extends State<InvicationPage> @@ -1398,7 +1402,7 @@ class InvicationPageState extends State<InvicationPage>
1398 if ((nameStr == null || nameStr.trim().length == 0) && 1402 if ((nameStr == null || nameStr.trim().length == 0) &&
1399 _baseIndoProvider.phoneController.text.replaceAll(' ', '').length == 1403 _baseIndoProvider.phoneController.text.replaceAll(' ', '').length ==
1400 0 && 1404 0 &&
1401 - customController.text.trim().length == 0) { 1405 + customController.text.trim().length == 0&&detailModel.selectNum == null) {
1402 return; 1406 return;
1403 } 1407 }
1404 } 1408 }
@@ -1422,6 +1426,7 @@ class InvicationPageState extends State<InvicationPage> @@ -1422,6 +1426,7 @@ class InvicationPageState extends State<InvicationPage>
1422 String name; 1426 String name;
1423 String sex; 1427 String sex;
1424 String remark; 1428 String remark;
  1429 + String actualPum;
1425 if (_baseIndoProvider.phoneController.text.replaceAll(' ', '').length > 0) { 1430 if (_baseIndoProvider.phoneController.text.replaceAll(' ', '').length > 0) {
1426 phone = _baseIndoProvider.phoneController.text.replaceAll(' ', ''); 1431 phone = _baseIndoProvider.phoneController.text.replaceAll(' ', '');
1427 } 1432 }
@@ -1431,9 +1436,12 @@ class InvicationPageState extends State<InvicationPage> @@ -1431,9 +1436,12 @@ class InvicationPageState extends State<InvicationPage>
1431 if (customController.text.trim().length > 0) { 1436 if (customController.text.trim().length > 0) {
1432 remark = customController.text; 1437 remark = customController.text;
1433 } 1438 }
  1439 + if( detailModel.selectNum != null && detailModel.selectNum != ''){
  1440 + actualPum = detailModel.selectNum;
  1441 + }
1434 1442
1435 sex = '${sexList.indexOf(sexStr) + 1}'; 1443 sex = '${sexList.indexOf(sexStr) + 1}';
1436 - bool sucess = await detailModel.upReserveInfo(context, widget.rid, 1444 + bool sucess = await detailModel.upReserveInfo(context, widget.rid,actualPum: actualPum,
1437 name: name, sex: sex, phone: phone, cusdem: remark, needToast: false); 1445 name: name, sex: sex, phone: phone, cusdem: remark, needToast: false);
1438 if (sucess) { 1446 if (sucess) {
1439 reserverPhone = phone; 1447 reserverPhone = phone;
@@ -1441,6 +1449,7 @@ class InvicationPageState extends State<InvicationPage> @@ -1441,6 +1449,7 @@ class InvicationPageState extends State<InvicationPage>
1441 oldName = name; 1449 oldName = name;
1442 oldSex = sex; 1450 oldSex = sex;
1443 oldRemark = remark; 1451 oldRemark = remark;
  1452 + oldPum = actualPum;
1444 1453
1445 EventBus().emit("refresh_tablemanager"); //刷新桌位 1454 EventBus().emit("refresh_tablemanager"); //刷新桌位
1446 bus.emit("refresh_book_list"); //刷新已预订列表 1455 bus.emit("refresh_book_list"); //刷新已预订列表
@@ -2250,19 +2259,19 @@ class InvicationPageState extends State<InvicationPage> @@ -2250,19 +2259,19 @@ class InvicationPageState extends State<InvicationPage>
2250 // selectPnum = value.first; 2259 // selectPnum = value.first;
2251 // pnum = pnumlist[value.first]; 2260 // pnum = pnumlist[value.first];
2252 // }); 2261 // });
2253 - bool sucess = await detailModel  
2254 - .upReserveInfo(context, widget.rid,  
2255 - actualPum: detailModel.selectNum,  
2256 - needToast: false);  
2257 -  
2258 - if (sucess) {  
2259 - EventBus()  
2260 - .emit("refresh_tablemanager"); //刷新桌位  
2261 - bus.emit("refresh_book_list"); //刷新已预订列表  
2262 - bus.emit("refresh_detail");  
2263 - // await _getReserveDetail(  
2264 - // showCicle: false);  
2265 - } 2262 + // bool sucess = await detailModel
  2263 + // .upReserveInfo(context, widget.rid,
  2264 + // actualPum: detailModel.selectNum,
  2265 + // needToast: false);
  2266 +
  2267 + // if (sucess) {
  2268 + // EventBus()
  2269 + // .emit("refresh_tablemanager"); //刷新桌位
  2270 + // bus.emit("refresh_book_list"); //刷新已预订列表
  2271 + // bus.emit("refresh_detail");
  2272 + // // await _getReserveDetail(
  2273 + // // showCicle: false);
  2274 + // }
2266 } 2275 }
2267 }, 2276 },
2268 onEditingComplete: () { 2277 onEditingComplete: () {
@@ -37,7 +37,7 @@ class NotebookDetailModel extends ChangeNotifier { @@ -37,7 +37,7 @@ class NotebookDetailModel extends ChangeNotifier {
37 PageState pageState = PageState.Loading; 37 PageState pageState = PageState.Loading;
38 PageState pageStateChange = PageState.Loading; 38 PageState pageStateChange = PageState.Loading;
39 PageState pageStateSim = PageState.Loading; 39 PageState pageStateSim = PageState.Loading;
40 - 40 +
41 41
42 String selectNum; 42 String selectNum;
43 int selectIndex; 43 int selectIndex;