Commit 072356f736fdfd2ea2e8495f04885c3a4cea61d1

Authored by wdn127929
1 parent d4b27b4d

新客UI bug

... ... @@ -150,7 +150,7 @@ class TableManagerPageState extends State<TableManagerPage> {
1,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4,
childAspectRatio: 1,
childAspectRatio: 0.8,
mainAxisSpacing: ScreenUtil().setWidth(30),
crossAxisSpacing: ScreenUtil().setWidth(12),
),
... ... @@ -250,7 +250,7 @@ class TableManagerPageState extends State<TableManagerPage> {
shouldRebuild: (pre, next) => true,
selector: (context, model) => data[index],
builder: (context, table, _) {
return FTableItem(table, canSelected: true, onSelected: (table) {
return FTableItem(table,canSelected: true, onSelected: (table) {
if (table.signStr == '已预订') {
//进入订座详情页面
NavigatorUtil.goNotebookDetailPage(
... ...
... ... @@ -134,12 +134,14 @@ class FTableItemState extends State<FTableItem> {
// alignment: Alignment.center,
children: <Widget>[
Container(
alignment: Alignment.center,
// alignment: Alignment.center,
// color: Colors.blueAccent,
// height: ScreenUtil().setWidth(widget.height),
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(20)),
// margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
child: Column(
mainAxisSize: MainAxisSize.min,
// mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
... ... @@ -147,6 +149,7 @@ class FTableItemState extends State<FTableItem> {
? SizedBox()
: VEmptyView(10),
Container(
// color: Colors.red,
alignment: Alignment.center,
child: Text(
table.name,
... ... @@ -183,32 +186,53 @@ class FTableItemState extends State<FTableItem> {
table.pnum != '0'))
? VEmptyView(8)
: SizedBox(),
Text(
signStr == '已预订' && !isSelf
? (table.reserver == null || table.reserver.isEmpty)
? (table.pnum != '' &&
table.pnum != null &&
table.pnum != '0')
? '(${table.pnum}人)'
: ''
: '${table.reserver}' +
(table.pnum != '' &&
table.pnum != null &&
table.pnum != '0'
? '(${table.pnum}人)'
: '')
: table.tableNum,
style: TextStyle(
color: signStr == '已预订' && !isSelf
? MyColours.color_353535
: (widget.canSelected && table.selected)
? MyColours.color_ffffff
: MyColours.color_353535,
fontSize: ScreenUtil().setSp(22),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
overflow: TextOverflow.ellipsis,
),
signStr == '已预订' && !isSelf
? SizedBox()
: Text(
table.tableNum,
style: TextStyle(
color: signStr == '已预订' && !isSelf
? MyColours.color_353535
: (widget.canSelected && table.selected)
? MyColours.color_ffffff
: MyColours.color_353535,
fontSize: ScreenUtil().setSp(22),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
overflow: TextOverflow.ellipsis,
),
signStr == '已预订' &&
!isSelf &&
((table.reserver != null &&
!table.reserver.isEmpty) ||
(table.pnum != '' &&
table.pnum != null &&
table.pnum != '0'))
? Text(
(table.reserver == null || table.reserver.isEmpty)
? (table.pnum != '' &&
table.pnum != null &&
table.pnum != '0')
? '(${table.pnum}人)'
: ''
: '${table.reserver}' +
(table.pnum != '' &&
table.pnum != null &&
table.pnum != '0'
? '(${table.pnum}人)'
: ''),
style: TextStyle(
color: signStr == '已预订' && !isSelf
? MyColours.color_353535
: (widget.canSelected && table.selected)
? MyColours.color_ffffff
: MyColours.color_353535,
fontSize: ScreenUtil().setSp(22),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
overflow: TextOverflow.ellipsis,
)
: SizedBox(),
widget.need && signStr == '已预订' && !isSelf
? Padding(
... ... @@ -229,27 +253,6 @@ class FTableItemState extends State<FTableItem> {
),
)
: SizedBox(),
signStr == '已预订' && !isSelf
? Container(
// width: ScreenUtil().setWidth(160),
height: ScreenUtil().setWidth(34),
alignment: Alignment.centerLeft,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(10)),
decoration: BoxDecoration(
color: MyColours.color_d7d7d7,
),
child: Text(
'新客',
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(24),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
),
)
: SizedBox()
// VEmptyView(6),
// Text(
// table.lowStr,
... ... @@ -263,6 +266,7 @@ class FTableItemState extends State<FTableItem> {
],
),
),
signStr == '已预订' && !isSelf
? SizedBox()
: Positioned(
... ... @@ -358,7 +362,31 @@ class FTableItemState extends State<FTableItem> {
width: ScreenUtil().setWidth(22),
height: ScreenUtil().setWidth(22),
)
: Container())
: Container()),
Positioned(
bottom: ScreenUtil().setWidth(16),
right: 0,
left: 0,
child: signStr == '已预订' && !isSelf
? Container(
// width: ScreenUtil().setWidth(160),
height: ScreenUtil().setWidth(34),
alignment: Alignment.centerLeft,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(10)),
decoration: BoxDecoration(
color: MyColours.color_d7d7d7,
),
child: Text(
'新客',
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(24),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
),
)
: SizedBox())
],
),
);
... ...