Commit d94136f235416d1a1644f343202076da4d84bcc9

Authored by wdn127929
1 parent a7260a95

包间置满app

... ... @@ -555,29 +555,29 @@ class StoreTypeFillManagePageState extends State<StoreTypeFillManagePage> {
),
);
},
todayDayBuilder: (context, date, _) {
return Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: MyColours.color_199095,
width: 1)),
alignment: Alignment.center,
margin: const EdgeInsets.all(6.0),
padding: const EdgeInsets.only(
bottom: 4.0,
left: 8.0,
right: 8.0,
top: 4.0),
child: Text(
'今',
style: TextStyle().copyWith(
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_199095,
fontWeight: FontWeight.bold),
),
);
},
// todayDayBuilder: (context, date, _) {
// return Container(
// decoration: BoxDecoration(
// shape: BoxShape.circle,
// border: Border.all(
// color: MyColours.color_199095,
// width: 1)),
// alignment: Alignment.center,
// margin: const EdgeInsets.all(6.0),
// padding: const EdgeInsets.only(
// bottom: 4.0,
// left: 8.0,
// right: 8.0,
// top: 4.0),
// child: Text(
// '今',
// style: TextStyle().copyWith(
// fontSize: ScreenUtil().setSp(32),
// color: MyColours.color_199095,
// fontWeight: FontWeight.bold),
// ),
// );
// },
singleMarkerBuilder:
(context, dateTime, event) {
return Container(
... ... @@ -621,7 +621,7 @@ class StoreTypeFillManagePageState extends State<StoreTypeFillManagePage> {
childAspectRatio: 2.4),
itemBuilder: (context, index) {
return GestureDetector(
onTap: () {
onTap: () async {
// if (tables[index]
// .status
// .toString() ==
... ... @@ -671,8 +671,26 @@ class StoreTypeFillManagePageState extends State<StoreTypeFillManagePage> {
params['id'] =
tables[index].fid;
}
model.setTableClassFull(
context, params, index);
bool success =
await model.setTableClassFull(
context, params, index);
if (success) {
if (tables[index].isFull == 1 &&
tables[index].fid != null) {
//置满成功
// fillTimes.add(
// "${_selectDateTime.year}-${Utils.addZeroNumber(_selectDateTime.month)}-${Utils.addZeroNumber(_selectDateTime.day)}");
// setState(() {});
_getTableFillUpDate();
} else {
//取消置满成功
// fillTimes.remove(
// "${_selectDateTime.year}-${Utils.addZeroNumber(_selectDateTime.month)}-${Utils.addZeroNumber(_selectDateTime.day)}");
// setState(() {});
_getTableFillUpDate();
}
}
},
child: Stack(
children: <Widget>[
... ...
... ... @@ -51,11 +51,13 @@ class StoreDetailModel with ChangeNotifier {
if (baseResp.data == true) {
tables[index].isFull = null;
tables[index].fid = null;
return true;
}
} else {
if (baseResp.data != null) {
tables[index].isFull = 1;
tables[index].fid = baseResp.data;
return true;
}
}
notifyListeners();
... ...