Commit 1f2b73d823f4a074bb448b5bcdb1507b7a039163

Authored by gaiyaguang
2 parents a139ce4f 15e3d534

2020-10-30

... ... @@ -28,8 +28,7 @@ class NotebookItemState extends State<NoteBookItem> {
widget.notebook.tableinfoStr,
widget.notebook.ddate,
widget.notebook.ddateStr,
widget.notebook.phone
);
widget.notebook.phone);
}
}
... ... @@ -46,7 +45,7 @@ class NotebookItemState extends State<NoteBookItem> {
return Container(
width: double.infinity,
height: ScreenUtil().setWidth(120),
// height: ScreenUtil().setWidth(120),
color: (widget.index % 2 == 0)
? MyColours.color_f7fdfd
: MyColours.color_ffffff,
... ... @@ -62,11 +61,12 @@ class NotebookItemState extends State<NoteBookItem> {
Container(
width: ScreenUtil().setWidth(171),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(24)),
horizontal: ScreenUtil().setWidth(24),
vertical: ScreenUtil().setWidth(20)),
alignment: Alignment.center,
child: Text(
notebook.tableinfoStr?.trim(),
maxLines: 3,
maxLines: 30,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: textColor,
... ...
... ... @@ -431,12 +431,12 @@ class NoteBookPageState extends State<NoteBookPage> {
return EasyRefresh.custom(
controller: _controller,
slivers: [
SliverFixedExtentList(
SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
return NoteBookItem(model.notebooks[index], index);
}, childCount: model.notebooks.length),
itemExtent: ScreenUtil().setWidth(112),
// itemExtent: ScreenUtil().setWidth(112),
)
],
onRefresh: () async {
... ...
... ... @@ -199,7 +199,7 @@ class DialogUtil {
TableCalendar(
calendarController: _calendarController,
initialSelectedDay: selectDateTime,
onDaySelected: (day, events,holidays) {
onDaySelected: (day, events) {
Navigator.of(dialogContext).pop(day);
},
availableGestures: AvailableGestures.none,
... ... @@ -527,7 +527,8 @@ class DialogUtil {
}
//显示桌位管理弹框
static Future<int> showTableManagerDialog(BuildContext context,t.Table table) {
static Future<int> showTableManagerDialog(
BuildContext context, t.Table table) {
return showModalBottomSheet(
context: context,
builder: (context) {
... ... @@ -540,43 +541,60 @@ class DialogUtil {
Container(
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(20)),
child: Text("${table.name}",style: TextStyle(fontSize: ScreenUtil().setSp(30),color: MyColours.color_999999),),
padding:
EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(20)),
child: Text(
"${table.name}",
style: TextStyle(
fontSize: ScreenUtil().setSp(30),
color: MyColours.color_999999),
),
),
Offstage(
offstage: table.enable=="0",
offstage: table.enable == "0",
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Offstage(
offstage: !(table.signStr=="已预订"||table.signStr=="用餐中"),
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pop(1);
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(40)),
child: Text("查看详情",style: TextStyle(fontSize: ScreenUtil().setSp(34),color: MyColours.color_353535),),
),
)
),
offstage: !(table.signStr == "已预订" ||
table.signStr == "用餐中"),
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pop(1);
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(40)),
child: Text(
"查看详情",
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: MyColours.color_353535),
),
),
)),
Offstage(
offstage: table.signStr!="",
offstage: table.signStr != "",
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pop(2);
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(40)),
child: Text("订座",style: TextStyle(fontSize: ScreenUtil().setSp(34),color: MyColours.color_353535),),
)
),
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pop(2);
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(40)),
child: Text(
"订座",
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: MyColours.color_353535),
),
)),
),
Container(
width: double.infinity,
... ... @@ -588,16 +606,21 @@ class DialogUtil {
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
onTap: () {
Navigator.of(context).pop(3);
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(40)),
child: Text("${table.enable=='1'?'停用桌位':'启用桌位'}",style: TextStyle(fontSize: ScreenUtil().setSp(34),color: MyColours.color_353535),),
)
),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(40)),
child: Text(
"${table.enable == '1' ? '停用桌位' : '启用桌位'}",
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: MyColours.color_353535),
),
)),
Container(
width: double.infinity,
height: ScreenUtil().setWidth(10),
... ... @@ -605,16 +628,21 @@ class DialogUtil {
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
onTap: () {
Navigator.of(context).pop();
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(40)),
child: Text("取消",style: TextStyle(fontSize: ScreenUtil().setSp(34),color: MyColours.color_353535),),
)
),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(40)),
child: Text(
"取消",
style: TextStyle(
fontSize: ScreenUtil().setSp(34),
color: MyColours.color_353535),
),
)),
],
),
);
... ...