|
...
|
...
|
@@ -4,8 +4,11 @@ import 'package:one_key/models/notebook.dart'; |
|
|
|
import 'package:one_key/res/colors.dart';
|
|
|
|
|
|
|
|
import 'package:one_key/models/table.dart' as t;
|
|
|
|
import 'package:one_key/utils/utils.dart';
|
|
|
|
import 'package:one_key/widgets/v_empty_view.dart';
|
|
|
|
|
|
|
|
import '../utils/screen_util.dart';
|
|
|
|
|
|
|
|
class FTableItem extends StatefulWidget {
|
|
|
|
final t.Table table;
|
|
|
|
final bool canSelected; //是否能选中
|
|
...
|
...
|
@@ -59,6 +62,9 @@ class FTableItemState extends State<FTableItem> { |
|
|
|
return GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
if (widget.canSelected && widget.fromPage == 'change') {
|
|
|
|
if (table.isLock == '1' && signStr != '已预订') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
//从变更页面进来 canChoose = true
|
|
|
|
if (widget.canSelected && signStr.isEmpty) {
|
|
|
|
setState(() {
|
|
...
|
...
|
@@ -88,6 +94,9 @@ class FTableItemState extends State<FTableItem> { |
|
|
|
} else if (widget.fromPage == 'new' &&
|
|
|
|
widget.canSelected &&
|
|
|
|
signStr.isEmpty) {
|
|
|
|
if (table.isLock == '1' && signStr != '已预订') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
//从安排桌位进来
|
|
|
|
setState(() {
|
|
|
|
table.selected = !(table.selected ?? false);
|
|
...
|
...
|
@@ -95,6 +104,9 @@ class FTableItemState extends State<FTableItem> { |
|
|
|
widget.onSelected(table);
|
|
|
|
} else if (widget.fromPage == 'table_manage' ||
|
|
|
|
widget.fromPage == 'room_manage') {
|
|
|
|
if (table.isLock == '1' && signStr != '已预订') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setState(() {
|
|
|
|
table.selected = !(table.selected ?? false);
|
|
|
|
});
|
|
...
|
...
|
@@ -113,296 +125,382 @@ class FTableItemState extends State<FTableItem> { |
|
|
|
widget.onSelected(table);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Stack(
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
// width: ScreenUtil().setWidth(160),
|
|
|
|
// height: ScreenUtil().setWidth(widget.height),
|
|
|
|
// margin: EdgeInsets.all(ScreenUtil().setWidth(9)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: widget.need && signStr == '已预订' && !isSelf
|
|
|
|
? MyColours.color_afbcc4
|
|
|
|
: widget.canSelected && table.selected
|
|
|
|
? MyColours.color_199095
|
|
|
|
: MyColours.color_ffffff,
|
|
|
|
border: Border.all(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_E0E0E0),
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(ScreenUtil().setWidth(20)))),
|
|
|
|
child: Stack(
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
child: table.isLock == '1' &&
|
|
|
|
signStr != '已预订' &&
|
|
|
|
widget.fromPage != 'tablePhoto'
|
|
|
|
? Stack(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
// 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,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
widget.need && signStr == '已预订' && !isSelf
|
|
|
|
? SizedBox()
|
|
|
|
: VEmptyView(10),
|
|
|
|
Container(
|
|
|
|
// color: Colors.red,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
table.name,
|
|
|
|
maxLines: 1,
|
|
|
|
style: TextStyle(
|
|
|
|
color:
|
|
|
|
(widget.need && signStr == '已预订' && !isSelf)
|
|
|
|
? MyColours.color_333333
|
|
|
|
: (widget.canSelected && table.selected)
|
|
|
|
? MyColours.color_ffffff
|
|
|
|
: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
)
|
|
|
|
// Text(
|
|
|
|
// table.name,
|
|
|
|
// // textAlign: TextAlign.center,
|
|
|
|
// maxLines: 2,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: table.signStr == '已停用'
|
|
|
|
// ? MyColours.color_999999
|
|
|
|
// : MyColours.color_353535,
|
|
|
|
// fontSize: ScreenUtil().setSp(28),
|
|
|
|
// decoration: TextDecoration.none,
|
|
|
|
// fontWeight: FontWeight.normal),
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
((table.reserver != null && table.reserver != '') ||
|
|
|
|
(table.pnum != '' &&
|
|
|
|
table.pnum != null &&
|
|
|
|
table.pnum != '0'))
|
|
|
|
? VEmptyView(8)
|
|
|
|
: SizedBox(),
|
|
|
|
signStr == '已预订' && !isSelf
|
|
|
|
? SizedBox()
|
|
|
|
: Text(
|
|
|
|
table.tableNum,
|
|
|
|
// width: ScreenUtil().setWidth(160),
|
|
|
|
// height: ScreenUtil().setWidth(widget.height),
|
|
|
|
// margin: EdgeInsets.all(ScreenUtil().setWidth(9)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_DBDBDB,
|
|
|
|
border: Border.all(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_BFC4D4),
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(ScreenUtil().setWidth(20)))),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
widget.need && signStr == '已预订' && !isSelf
|
|
|
|
? SizedBox()
|
|
|
|
: VEmptyView(10),
|
|
|
|
Container(
|
|
|
|
// color: Colors.red,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
table.name,
|
|
|
|
maxLines: 1,
|
|
|
|
style: TextStyle(
|
|
|
|
color: signStr == '已预订' && !isSelf
|
|
|
|
? MyColours.color_353535
|
|
|
|
: (widget.canSelected && table.selected)
|
|
|
|
? MyColours.color_ffffff
|
|
|
|
: MyColours.color_353535,
|
|
|
|
fontSize: ScreenUtil().setSp(22),
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(36),
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
fontWeight: FontWeight.normal),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
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}人)'
|
|
|
|
: ''),
|
|
|
|
)),
|
|
|
|
VEmptyView(10),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('lock'),
|
|
|
|
width: w(16),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
Positioned(
|
|
|
|
left: 0,
|
|
|
|
top: 0,
|
|
|
|
child: table.tidStr == null
|
|
|
|
? Container()
|
|
|
|
: Container(
|
|
|
|
// width: ScreenUtil().setWidth(60),
|
|
|
|
// height: ScreenUtil().setWidth(42),
|
|
|
|
padding: EdgeInsets.all(ScreenUtil().setWidth(4)),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
// color: widget.canSelected && table.selected
|
|
|
|
// ? MyColours.color_199095
|
|
|
|
// : Color.fromRGBO(239, 239, 239, 1),
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(ScreenUtil().setWidth(20)),
|
|
|
|
// topRight:
|
|
|
|
// Radius.circular(ScreenUtil().setWidth(8)),
|
|
|
|
// bottomRight: Radius.circular(
|
|
|
|
// ScreenUtil().setWidth(8))
|
|
|
|
)),
|
|
|
|
child: Text(table.tidStr,
|
|
|
|
style: TextStyle(
|
|
|
|
color: signStr == '已预订' && !isSelf
|
|
|
|
? MyColours.color_353535
|
|
|
|
: (widget.canSelected && table.selected)
|
|
|
|
? MyColours.color_ffffff
|
|
|
|
: MyColours.color_353535,
|
|
|
|
fontSize: ScreenUtil().setSp(22),
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(20),
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
fontWeight: FontWeight.normal),
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
fontWeight: FontWeight.normal)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
: Stack(
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
// width: ScreenUtil().setWidth(160),
|
|
|
|
// height: ScreenUtil().setWidth(widget.height),
|
|
|
|
// margin: EdgeInsets.all(ScreenUtil().setWidth(9)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: widget.need && signStr == '已预订' && !isSelf
|
|
|
|
? table.sign == '10'
|
|
|
|
? MyColours.color_FEF3E6
|
|
|
|
: MyColours.color_afbcc4
|
|
|
|
: widget.canSelected && table.selected
|
|
|
|
? MyColours.color_199095
|
|
|
|
: MyColours.color_ffffff,
|
|
|
|
border: Border.all(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_E0E0E0),
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(ScreenUtil().setWidth(20)))),
|
|
|
|
child: Stack(
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
// 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,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
widget.need && signStr == '已预订' && !isSelf
|
|
|
|
? SizedBox()
|
|
|
|
: VEmptyView(10),
|
|
|
|
Container(
|
|
|
|
// color: Colors.red,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
table.name,
|
|
|
|
maxLines: 1,
|
|
|
|
style: TextStyle(
|
|
|
|
color: (widget.need &&
|
|
|
|
signStr == '已预订' &&
|
|
|
|
!isSelf)
|
|
|
|
? MyColours.color_333333
|
|
|
|
: (widget.canSelected &&
|
|
|
|
table.selected)
|
|
|
|
? MyColours.color_ffffff
|
|
|
|
: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
)
|
|
|
|
// Text(
|
|
|
|
// table.name,
|
|
|
|
// // textAlign: TextAlign.center,
|
|
|
|
// maxLines: 2,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: table.signStr == '已停用'
|
|
|
|
// ? MyColours.color_999999
|
|
|
|
// : MyColours.color_353535,
|
|
|
|
// fontSize: ScreenUtil().setSp(28),
|
|
|
|
// decoration: TextDecoration.none,
|
|
|
|
// fontWeight: FontWeight.normal),
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
((table.reserver != null && table.reserver != '') ||
|
|
|
|
(table.pnum != '' &&
|
|
|
|
table.pnum != null &&
|
|
|
|
table.pnum != '0'))
|
|
|
|
? VEmptyView(8)
|
|
|
|
: SizedBox(),
|
|
|
|
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 &&
|
|
|
|
table.nickName != null &&
|
|
|
|
table.nickName != ''
|
|
|
|
? Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(6),
|
|
|
|
bottom: ScreenUtil().setWidth(8),
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
table.nickName != null &&
|
|
|
|
table.nickName != ''
|
|
|
|
? '${table.nickName}订'
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontSize: ScreenUtil().setSp(22),
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
fontWeight: FontWeight.normal),
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
// VEmptyView(6),
|
|
|
|
// Text(
|
|
|
|
// table.lowStr,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_777777,
|
|
|
|
// fontSize: ScreenUtil().setSp(26),
|
|
|
|
// decoration: TextDecoration.none,
|
|
|
|
// fontWeight: FontWeight.normal),
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
// )
|
|
|
|
signStr == '已预订' && !isSelf
|
|
|
|
? Container(
|
|
|
|
// width: ScreenUtil().setWidth(160),
|
|
|
|
height: ScreenUtil().setWidth(34),
|
|
|
|
)
|
|
|
|
: SizedBox()
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
widget.need &&
|
|
|
|
signStr == '已预订' &&
|
|
|
|
!isSelf &&
|
|
|
|
table.nickName != null &&
|
|
|
|
table.nickName != ''
|
|
|
|
? Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(6),
|
|
|
|
bottom: ScreenUtil().setWidth(8),
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
table.nickName != null && table.nickName != ''
|
|
|
|
? '${table.nickName}订'
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontSize: ScreenUtil().setSp(22),
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
fontWeight: FontWeight.normal),
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
// VEmptyView(6),
|
|
|
|
// Text(
|
|
|
|
// table.lowStr,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_777777,
|
|
|
|
// fontSize: ScreenUtil().setSp(26),
|
|
|
|
// decoration: TextDecoration.none,
|
|
|
|
// fontWeight: FontWeight.normal),
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
// )
|
|
|
|
signStr == '已预订' && !isSelf
|
|
|
|
? Container(
|
|
|
|
// width: ScreenUtil().setWidth(160),
|
|
|
|
height: ScreenUtil().setWidth(34),
|
|
|
|
)
|
|
|
|
: SizedBox()
|
|
|
|
? SizedBox()
|
|
|
|
: Positioned(
|
|
|
|
left: 0,
|
|
|
|
top: 0,
|
|
|
|
child: table.tidStr == null
|
|
|
|
? Container()
|
|
|
|
: Container(
|
|
|
|
// width: ScreenUtil().setWidth(60),
|
|
|
|
// height: ScreenUtil().setWidth(42),
|
|
|
|
padding: EdgeInsets.all(
|
|
|
|
ScreenUtil().setWidth(4)),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: widget.canSelected &&
|
|
|
|
table.selected
|
|
|
|
? MyColours.color_199095
|
|
|
|
: Color.fromRGBO(
|
|
|
|
239, 239, 239, 1),
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(20)),
|
|
|
|
// topRight:
|
|
|
|
// Radius.circular(ScreenUtil().setWidth(8)),
|
|
|
|
// bottomRight: Radius.circular(
|
|
|
|
// ScreenUtil().setWidth(8))
|
|
|
|
)),
|
|
|
|
child: Text(table.tidStr,
|
|
|
|
style: TextStyle(
|
|
|
|
color: widget.canSelected &&
|
|
|
|
table.selected
|
|
|
|
? MyColours.color_ffffff
|
|
|
|
: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(20),
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
fontWeight: FontWeight.normal)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// widget.need && signStr == '已预订'
|
|
|
|
// ? Positioned(
|
|
|
|
// bottom: 0,
|
|
|
|
// left: 0,
|
|
|
|
// right: 0,
|
|
|
|
// child: signStr.isEmpty
|
|
|
|
// ? Container()
|
|
|
|
// : Container(
|
|
|
|
// width: ScreenUtil().setWidth(160),
|
|
|
|
// height: ScreenUtil().setWidth(40),
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: signStr == '已停用'
|
|
|
|
// ? MyColours.color_777777
|
|
|
|
// : signStr == '已买单'
|
|
|
|
// ? MyColours.color_F59A23
|
|
|
|
// : MyColours.color_E95750,
|
|
|
|
// borderRadius: BorderRadius.only(
|
|
|
|
// bottomLeft: Radius.circular(
|
|
|
|
// ScreenUtil().setWidth(8)),
|
|
|
|
// bottomRight: Radius.circular(
|
|
|
|
// ScreenUtil().setWidth(8)))),
|
|
|
|
// child: Text(
|
|
|
|
// signStr,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_ffffff,
|
|
|
|
// fontSize: ScreenUtil().setSp(24),
|
|
|
|
// decoration: TextDecoration.none,
|
|
|
|
// fontWeight: FontWeight.normal),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// : SizedBox(),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
signStr == '已预订' && !isSelf
|
|
|
|
// Positioned(
|
|
|
|
// top: 3,
|
|
|
|
// right: 5,
|
|
|
|
// child: widget.canSelected && (table.selected ?? false)
|
|
|
|
// ? Image.asset(
|
|
|
|
// "assets/icon_selected.png",
|
|
|
|
// width: ScreenUtil().setWidth(40),
|
|
|
|
// height: ScreenUtil().setWidth(40),
|
|
|
|
// )
|
|
|
|
// : Container()),
|
|
|
|
widget.need && signStr == '已预订' && !isSelf
|
|
|
|
? SizedBox()
|
|
|
|
: Positioned(
|
|
|
|
left: 0,
|
|
|
|
top: 0,
|
|
|
|
child: table.tidStr == null
|
|
|
|
? Container()
|
|
|
|
: Container(
|
|
|
|
// width: ScreenUtil().setWidth(60),
|
|
|
|
// height: ScreenUtil().setWidth(42),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.all(ScreenUtil().setWidth(4)),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: widget.canSelected && table.selected
|
|
|
|
? MyColours.color_199095
|
|
|
|
: Color.fromRGBO(239, 239, 239, 1),
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(20)),
|
|
|
|
// topRight:
|
|
|
|
// Radius.circular(ScreenUtil().setWidth(8)),
|
|
|
|
// bottomRight: Radius.circular(
|
|
|
|
// ScreenUtil().setWidth(8))
|
|
|
|
)),
|
|
|
|
child: Text(table.tidStr,
|
|
|
|
style: TextStyle(
|
|
|
|
color:
|
|
|
|
widget.canSelected && table.selected
|
|
|
|
? MyColours.color_ffffff
|
|
|
|
: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(20),
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
fontWeight: FontWeight.normal)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// widget.need && signStr == '已预订'
|
|
|
|
// ? Positioned(
|
|
|
|
// bottom: 0,
|
|
|
|
// left: 0,
|
|
|
|
// right: 0,
|
|
|
|
// child: signStr.isEmpty
|
|
|
|
// ? Container()
|
|
|
|
// : Container(
|
|
|
|
// width: ScreenUtil().setWidth(160),
|
|
|
|
// height: ScreenUtil().setWidth(40),
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: signStr == '已停用'
|
|
|
|
// ? MyColours.color_777777
|
|
|
|
// : signStr == '已买单'
|
|
|
|
// ? MyColours.color_F59A23
|
|
|
|
// : MyColours.color_E95750,
|
|
|
|
// borderRadius: BorderRadius.only(
|
|
|
|
// bottomLeft: Radius.circular(
|
|
|
|
// ScreenUtil().setWidth(8)),
|
|
|
|
// bottomRight: Radius.circular(
|
|
|
|
// ScreenUtil().setWidth(8)))),
|
|
|
|
// child: Text(
|
|
|
|
// signStr,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_ffffff,
|
|
|
|
// fontSize: ScreenUtil().setSp(24),
|
|
|
|
// decoration: TextDecoration.none,
|
|
|
|
// fontWeight: FontWeight.normal),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// : SizedBox(),
|
|
|
|
left: ScreenUtil().setWidth(18),
|
|
|
|
bottom: ScreenUtil().setWidth(12),
|
|
|
|
child: table.isPhoto != 1
|
|
|
|
? Image.asset(
|
|
|
|
widget.canSelected && table.selected
|
|
|
|
? 'assets/f_camera_white.png'
|
|
|
|
: "assets/f_camera.png",
|
|
|
|
width: ScreenUtil().setWidth(22),
|
|
|
|
height: ScreenUtil().setWidth(22),
|
|
|
|
)
|
|
|
|
: Container()),
|
|
|
|
Positioned(
|
|
|
|
bottom: 0,
|
|
|
|
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: table.sign == '10'
|
|
|
|
? MyColours.color_F7C797
|
|
|
|
: MyColours.color_d7d7d7,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
bottomLeft: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(20)),
|
|
|
|
bottomRight: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(20)))),
|
|
|
|
child: Text(
|
|
|
|
table.sign == '10' ? table.label : '新客',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
fontWeight: FontWeight.normal),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: SizedBox())
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// Positioned(
|
|
|
|
// top: 3,
|
|
|
|
// right: 5,
|
|
|
|
// child: widget.canSelected && (table.selected ?? false)
|
|
|
|
// ? Image.asset(
|
|
|
|
// "assets/icon_selected.png",
|
|
|
|
// width: ScreenUtil().setWidth(40),
|
|
|
|
// height: ScreenUtil().setWidth(40),
|
|
|
|
// )
|
|
|
|
// : Container()),
|
|
|
|
widget.need && signStr == '已预订' && !isSelf
|
|
|
|
? SizedBox()
|
|
|
|
: Positioned(
|
|
|
|
left: ScreenUtil().setWidth(18),
|
|
|
|
bottom: ScreenUtil().setWidth(12),
|
|
|
|
child: table.isPhoto != 1
|
|
|
|
? Image.asset(
|
|
|
|
widget.canSelected && table.selected
|
|
|
|
? 'assets/f_camera_white.png'
|
|
|
|
: "assets/f_camera.png",
|
|
|
|
width: ScreenUtil().setWidth(22),
|
|
|
|
height: ScreenUtil().setWidth(22),
|
|
|
|
)
|
|
|
|
: Container()),
|
|
|
|
Positioned(
|
|
|
|
bottom: 0,
|
|
|
|
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,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
bottomLeft:
|
|
|
|
Radius.circular(ScreenUtil().setWidth(20)),
|
|
|
|
bottomRight:
|
|
|
|
Radius.circular(ScreenUtil().setWidth(20)))),
|
|
|
|
child: Text(
|
|
|
|
'新客',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
fontWeight: FontWeight.normal),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: SizedBox())
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|