Commit d4c0e956157639257e1be68832c1ef2c8343238f

Authored by gaiyaguang
1 parent 24dbf58b

UI修改2.0+bug修复

... ... @@ -55,7 +55,7 @@ class Table {
//获取最低消费
String get lowStr{
return (low==null||low.isEmpty||low=="0")?"":"最低消费$low元";
return (low==null||low.isEmpty||low=="0")?"":"最低消费\n$low元";
}
String get signStr{
... ...
... ... @@ -13,6 +13,7 @@ import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/MyDivider.dart';
import 'package:one_key/widgets/app_bar.dart';
import 'package:one_key/widgets/common_button.dart';
import 'package:one_key/widgets/need_item.dart';
import 'package:one_key/widgets/row_multi_text.dart';
import 'package:one_key/widgets/table_item.dart';
import 'package:one_key/models/table.dart' as t;
... ... @@ -83,19 +84,19 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
showDialog(context: context,builder: (context){
return AlertDialog(
title: Text("确定拒绝订单吗?\n拒绝后无法联系客户"),
titleTextStyle: TextStyle(color: MyColours.color_353535,fontSize: ScreenUtil().setSp(26)),
titleTextStyle: TextStyle(color: MyColours.color_353535,fontSize: ScreenUtil().setSp(32)),
content: Text("如果包间类型订满,请及时停用"),
contentTextStyle:TextStyle(color: MyColours.color_828282,fontSize: ScreenUtil().setSp(22)),
contentTextStyle:TextStyle(color: MyColours.color_828282,fontSize: ScreenUtil().setSp(28)),
actions: <Widget>[
FlatButton(
child: Text("拒绝订单"),
child: Text("拒绝订单",style: TextStyle(fontSize: ScreenUtil().setSp(32)),),
onPressed: (){
Navigator.of(context).pop();
setReserveStatus("6");
},
),
FlatButton(
child: Text("去安排"),
child: Text("去安排",style: TextStyle(fontSize: ScreenUtil().setSp(32)),),
onPressed: () async {
Navigator.of(context).pop();
String tid=await NavigatorUtil.goSelectTablePage(context,widget.rid,DateTime.fromMillisecondsSinceEpoch(int.parse(detailEntity.ddate)*1000),detailEntity.ddate_solt);
... ... @@ -181,13 +182,13 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
child: Row(
mainAxisSize: MainAxisSize.min,
children: detailEntity.demands.map((table){
return TableItem(table);
return NeedItem(table);
}).toList(),
),
),
RowMultiText("客户姓名", detailEntity.rnameStr),
RowMultiText("客户电话", detailEntity.phone),
MyDivider(double.infinity, ScreenUtil().setHeight(2)),
MyDivider(double.infinity, ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
... ... @@ -202,7 +203,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
"客户经理",
style: TextStyle(
color: MyColours.color_828282,
fontSize: ScreenUtil().setSp(22)),
fontSize: ScreenUtil().setSp(30)),
),
),
Positioned(
... ... @@ -224,7 +225,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
cusmanText,
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(26),
fontSize: ScreenUtil().setSp(30),
decoration: TextDecoration.underline,
),
),
... ... @@ -233,7 +234,6 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
],
),
),
MyDivider(double.infinity, ScreenUtil().setHeight(2)),
Container(
margin: EdgeInsets.only(top: ScreenUtil().setHeight(206)),
child: Column(
... ... @@ -242,7 +242,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
content: "安排包间",
width: 669,
height: 76,
fontSize: 26,
fontSize: 34,
onPress: () async {
String tid=await NavigatorUtil.goSelectTablePage(context,widget.rid,DateTime.fromMillisecondsSinceEpoch(int.parse(detailEntity.ddate)*1000),detailEntity.ddate_solt);
if(tid!=null){
... ... @@ -269,7 +269,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
"拒绝订单",
style: TextStyle(
color: MyColours.color_199095,
fontSize: ScreenUtil().setSp(26)),
fontSize: ScreenUtil().setSp(34)),
),
),
onTap: () {
... ... @@ -277,7 +277,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
},
)),
MyDivider(
ScreenUtil().setWidth(1),
ScreenUtil().setWidth(2),
ScreenUtil().setHeight(52),
color: MyColours.color_199095,
),
... ... @@ -288,7 +288,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
"联系顾客",
style: TextStyle(
color: MyColours.color_199095,
fontSize: ScreenUtil().setSp(26)),
fontSize: ScreenUtil().setSp(34)),
),
),
onTap: () {
... ...
... ... @@ -13,6 +13,7 @@ import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/MyDivider.dart';
import 'package:one_key/widgets/app_bar.dart';
import 'package:one_key/widgets/common_button.dart';
import 'package:one_key/widgets/need_item.dart';
import 'package:one_key/widgets/row_multi_text.dart';
import 'package:one_key/widgets/table_item.dart';
import 'package:one_key/models/table.dart' as t;
... ... @@ -120,7 +121,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
child: Row(
mainAxisSize: MainAxisSize.min,
children: detailEntity.demands.map((table){
return TableItem(table,height: 160,);
return NeedItem(table);
}).toList(),
),
)
... ...
... ... @@ -52,14 +52,14 @@ class InvicationPageState extends State<InvicationPage>{
Image.asset("assets/invication_line_left.png",width: ScreenUtil().setWidth(44),height: ScreenUtil().setWidth(4),),
Container(
margin: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(13)),
child: Text(title,style: TextStyle(color: MyColours.color_eadab9,fontSize: ScreenUtil().setSp(22),fontWeight: FontWeight.bold)),
child: Text(title,style: TextStyle(color: MyColours.color_eadab9,fontSize: ScreenUtil().setSp(32))),
),
Image.asset("assets/invication_line_right.png",width: ScreenUtil().setWidth(44),height: ScreenUtil().setWidth(4),)
],
),
Container(
margin: EdgeInsets.only(top: ScreenUtil().setHeight(20)),
child: Text(content,style: TextStyle(color: MyColours.color_ffffff,fontSize: ScreenUtil().setSp(26)),),
child: Text(content,style: TextStyle(color: MyColours.color_ffffff,fontSize: ScreenUtil().setSp(34)),),
)
],
);
... ... @@ -102,7 +102,7 @@ class InvicationPageState extends State<InvicationPage>{
child: Center(
child: Column(
children: <Widget>[
Image.asset("assets/img_ydap.png",width: ScreenUtil().setWidth(444),height: ScreenUtil().setHeight(234),),
Image.asset("assets/img_ydap.png",width: ScreenUtil().setWidth(500),height: ScreenUtil().setHeight(300),),
VEmptyView(69),
Row(
mainAxisSize: MainAxisSize.min,
... ... @@ -120,7 +120,7 @@ class InvicationPageState extends State<InvicationPage>{
border: Border.all(color: MyColours.color_ffffff,width: ScreenUtil().setWidth(2)),
borderRadius: BorderRadius.all(Radius.circular(ScreenUtil().setWidth(18)))
),
child: Text("订包间,用周到安排",style: TextStyle(color: MyColours.color_ffffff,fontSize: ScreenUtil().setSp(22),fontWeight: FontWeight.bold),),
child: Text("订包间,用周到安排",style: TextStyle(color: MyColours.color_ffffff,fontSize: ScreenUtil().setSp(28)),),
),
Container(
width: ScreenUtil().setWidth(108),
... ... @@ -141,14 +141,14 @@ class InvicationPageState extends State<InvicationPage>{
Image.asset("assets/invication_map.png",width: ScreenUtil().setWidth(22),height: ScreenUtil().setWidth(28),),
Container(
margin: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(13)),
child: Text("地址导航",style: TextStyle(color: MyColours.color_eadab9,fontSize: ScreenUtil().setSp(22),fontWeight: FontWeight.bold)),
child: Text("地址导航",style: TextStyle(color: MyColours.color_eadab9,fontSize: ScreenUtil().setSp(32))),
),
Image.asset("assets/invication_arrow_right.png",width: ScreenUtil().setWidth(14),height: ScreenUtil().setWidth(22),),
],
),
Container(
margin: EdgeInsets.only(top: ScreenUtil().setHeight(20)),
child: Text(user.sellerAddr,style: TextStyle(color: MyColours.color_ffffff,fontSize: ScreenUtil().setSp(26)),),
child: Text(user.sellerAddr,style: TextStyle(color: MyColours.color_ffffff,fontSize: ScreenUtil().setSp(34)),),
)
],
)
... ... @@ -170,7 +170,7 @@ class InvicationPageState extends State<InvicationPage>{
height: double.infinity,
color: MyColours.color_000000,
alignment: Alignment.center,
child: Text("发短信",style: TextStyle(color: MyColours.color_eadab9,fontSize: ScreenUtil().setSp(30)),),
child: Text("发短信",style: TextStyle(color: MyColours.color_eadab9,fontSize: ScreenUtil().setSp(34)),),
),
),
Expanded(
... ... @@ -184,7 +184,7 @@ class InvicationPageState extends State<InvicationPage>{
height: double.infinity,
color: MyColours.color_e3d2ac,
alignment: Alignment.center,
child: Text("通知客户",style: TextStyle(color: MyColours.color_83734d,fontSize: ScreenUtil().setSp(30)),),
child: Text("通知客户",style: TextStyle(color: MyColours.color_83734d,fontSize: ScreenUtil().setSp(34)),),
),
),
)
... ...
... ... @@ -139,12 +139,13 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver{
controller: _sellerCodeController,
focusNode: _sellerCodeFocusNode,
autofocus: _sellerCodeController.text.isEmpty,
style: TextStyle(color: MyColours.color_353535,fontSize: ScreenUtil().setSp(28)),
style: TextStyle(color: MyColours.color_353535,fontSize: ScreenUtil().setSp(28),textBaseline: TextBaseline.alphabetic),
textAlignVertical: TextAlignVertical.center,
decoration: InputDecoration(
hintText: "请输入6位商户编码",
hintStyle: TextStyle(color: MyColours.color_c1c1c1,fontSize: ScreenUtil().setSp(28)),
hintStyle: TextStyle(color: MyColours.color_c1c1c1,fontSize: ScreenUtil().setSp(28),),
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(vertical: ScreenUtil().setHeight(30),horizontal: ScreenUtil().setWidth(30))
contentPadding: EdgeInsets.symmetric(horizontal: 10,vertical: 14),
),
onChanged: (_){
setActivate();
... ... @@ -180,7 +181,7 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver{
hintText: "请输入4位工号",
hintStyle: TextStyle(color: MyColours.color_c1c1c1,fontSize: ScreenUtil().setSp(28)),
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(vertical: ScreenUtil().setHeight(30),horizontal: ScreenUtil().setWidth(30))
contentPadding: EdgeInsets.symmetric(horizontal: 10,vertical: 14),
),
onChanged: (_){
setActivate();
... ... @@ -217,7 +218,7 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver{
hintText: "请输入密码",
hintStyle: TextStyle(color: MyColours.color_c1c1c1,fontSize: ScreenUtil().setSp(28)),
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(vertical: ScreenUtil().setHeight(30),horizontal: ScreenUtil().setWidth(30))
contentPadding: EdgeInsets.symmetric(horizontal: 10,vertical: 14),
),
onChanged: (_){
setActivate();
... ...
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:one_key/pages/message/messsage_item.dart';
import 'package:one_key/provider/message_dialog_model.dart';
import 'package:one_key/provider/message_model.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:provider/provider.dart';
import 'package:one_key/utils/event_bus.dart';
import 'message_dialog_item.dart';
class MessageLeftPage extends StatefulWidget {
@override
... ... @@ -61,7 +61,7 @@ class MessageLeftPageState extends State<MessageLeftPage> {
SliverList(
delegate:
SliverChildBuilderDelegate((BuildContext context, int index) {
return MessageDialogItem(messages[index]);
return MessageItem(messages[index]);
},childCount: messages.length),
)
],onRefresh: () async {
... ...
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:one_key/pages/message/messsage_item.dart';
import 'package:one_key/provider/message_model.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/utils/log_util.dart';
import 'package:provider/provider.dart';
import 'message_dialog_item.dart';
class MessageRightPage extends StatefulWidget{
@override
State<StatefulWidget> createState() {
... ... @@ -59,7 +57,7 @@ class MessageRightPageState extends State<MessageRightPage>{
SliverList(
delegate:
SliverChildBuilderDelegate((BuildContext context, int index) {
return MessageDialogItem(messages[index],isTreated: true,);
return MessageItem(messages[index],isTreated: true,);
},childCount: messages.length),
)
],onRefresh: () async {
... ...
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/models/message.dart';
import 'package:one_key/provider/message_dialog_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/navigator_util.dart';
import 'package:one_key/widgets/common_button.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
class MessageItem extends StatelessWidget {
final Message message;
final bool isTreated;
final VoidCallback callback;
MessageItem(this.message,{this.isTreated=false,this.callback});
@override
Widget build(BuildContext context) {
// TODO: implement build
Color textColor=isTreated?MyColours.color_999999:MyColours.color_353535;
MessageDialogModel messageDialogModel=Provider.of<MessageDialogModel>(context,listen: false);
return GestureDetector(
onTap: (){
if(isTreated){
NavigatorUtil.goNotebookDetailPage(context,message.rid.toString());
}
},
child: Stack(
children: <Widget>[
Container(
margin: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(39),vertical: ScreenUtil().setWidth(12)),
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(12),
ScreenUtil().setWidth(45),
ScreenUtil().setWidth(21),
ScreenUtil().setWidth(43)),
decoration: BoxDecoration(
color: MyColours.color_fefefe,
borderRadius:
BorderRadius.all(Radius.circular(ScreenUtil().setWidth(8)))),
child:Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
"在线预订",
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28)),
),
Spacer(),
Text(
message.cdateStr,
style: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(24)),
),
],
),
VEmptyView(20),
Text(
"包间需求:${message.room_demand}",
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28)),
),
VEmptyView(10),
Text(
"就餐时间:${message.ddateStr}",
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28)),
),
VEmptyView(10),
Text(
"预订人:${message.rnameStr}",
style: TextStyle(
color: textColor,
fontSize: ScreenUtil().setSp(28)),
),
],
),
),
Positioned(
right: ScreenUtil().setWidth(60),
bottom: ScreenUtil().setWidth(55),
child:Offstage(
offstage: isTreated?true:false,
child: CommonButton(
width: 160,
height: 48,
fontSize: 28,
content: "立即处理",
state: 1,
onPress: () {
messageDialogModel.removeMessage(message.id);
NavigatorUtil.goHandleOnlinePage(context,message.rid.toString(),message.id);
},
),
),
)
],
)
);
}
}
... ...
... ... @@ -76,7 +76,7 @@ class SmsPageState extends State<SmsPage>{
Container(
alignment: Alignment.centerLeft,
margin: EdgeInsets.only(top: ScreenUtil().setHeight(30),left: ScreenUtil().setWidth(38)),
child: Text("已自动生成短信通知,可直接发送",style: TextStyle(color: MyColours.color_353535,fontSize: ScreenUtil().setSp(22)),),
child: Text("已自动生成短信通知,可直接发送",style: TextStyle(color: MyColours.color_353535,fontSize: ScreenUtil().setSp(28)),),
),
Container(
width: ScreenUtil().setWidth(673),
... ... @@ -86,7 +86,7 @@ class SmsPageState extends State<SmsPage>{
border: Border.all(color: MyColours.color_dbe3e3,width: ScreenUtil().setWidth(2)),
borderRadius: BorderRadius.all(Radius.circular(ScreenUtil().setWidth(8))),
),
child: Text(smsContent,style: TextStyle(color: MyColours.color_353535,fontSize: ScreenUtil().setSp(26),))
child: Text(smsContent,style: TextStyle(color: MyColours.color_353535,fontSize: ScreenUtil().setSp(30),))
),
Container(
margin: EdgeInsets.only(top: ScreenUtil().setHeight(143)),
... ... @@ -95,7 +95,7 @@ class SmsPageState extends State<SmsPage>{
CommonButton(
width: 672,
height: 76,
fontSize: 26,
fontSize: 34,
content: "直接发送",
state: 1,
onPress: (){
... ... @@ -106,7 +106,7 @@ class SmsPageState extends State<SmsPage>{
CommonButton(
width: 672,
height: 76,
fontSize: 26,
fontSize: 34,
content: "复制短信",
state: 0,
onPress: () async {
... ...
... ... @@ -200,7 +200,7 @@ class SelectTablePageState extends State<SelectTablePage>{
content: "确定",
width: 600,
height: 76,
fontSize: 26,
fontSize: 34,
state: 1,
onPress: (){
if(selectTables.length>0){
... ...
... ... @@ -28,6 +28,7 @@ class DialogUtil {
messageModel.showMessageDialog=true;
await showModalBottomSheet<int>(
context: context,
isScrollControlled: true,
builder: (BuildContext dialogContext) {
Widget widget = Container(
color: MyColours.app_main,
... ... @@ -70,7 +71,7 @@ class DialogUtil {
))
],
)),
model.messages.length>2?Container(
model.messages.length>3?Container(
margin: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(22),vertical: ScreenUtil().setWidth(11)),
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(16),
... ...
... ... @@ -26,6 +26,7 @@ class MyAppBar extends StatelessWidget {
onTap: () {
Navigator.of(context).pop();
},
behavior: HitTestBehavior.opaque,
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
... ...
... ... @@ -41,7 +41,7 @@ class AreaItemState extends State<AreaItem>{
color: isSelected?MyColours.color_ffffff:MyColours.color_f1f1f1,
border: Border(bottom: BorderSide(color: MyColours.color_ffffff,width: ScreenUtil().setHeight(1)))
),
child: Text(area.name,style: TextStyle(color: isSelected?MyColours.color_2bb5b7:MyColours.color_828282,fontSize: ScreenUtil().setSp(26),decoration: TextDecoration.none),),
child: Text(area.name,style: TextStyle(color: isSelected?MyColours.color_2bb5b7:MyColours.color_828282,fontSize: ScreenUtil().setSp(32),decoration: TextDecoration.none,fontWeight: FontWeight.normal),),
),
Positioned(
left: 0,
... ... @@ -54,7 +54,7 @@ class AreaItemState extends State<AreaItem>{
color: area.count<=0?MyColours.color_999999:MyColours.color_63a6d1,
borderRadius: BorderRadius.only(topRight: Radius.circular(ScreenUtil().setWidth(8)),bottomRight: Radius.circular(ScreenUtil().setWidth(8)))
),
child: Text(area.count<=0?"满座":"余${area.count}",style: TextStyle(color: MyColours.color_ffffff,fontSize: ScreenUtil().setSp(22),decoration: TextDecoration.none)),
child: Text(area.count<=0?"满座":"余${area.count}",style: TextStyle(color: MyColours.color_ffffff,fontSize: ScreenUtil().setSp(26),decoration: TextDecoration.none,fontWeight: FontWeight.normal)),
),
),
],
... ...
... ... @@ -34,7 +34,7 @@ class CommonButton extends StatelessWidget {
break;
case 0:
boxDecoration = BoxDecoration(
border: Border.all(color: MyColours.color_199095),
border: Border.all(color: MyColours.color_199095,width: ScreenUtil().setWidth(2)),
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(5)),
);
fontColor=MyColours.color_199095;
... ...
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/models/table.dart' as t;
import 'package:one_key/widgets/v_empty_view.dart';
class NeedItem extends StatefulWidget{
final t.Table table;
final bool canSelected;//是否能选中
final ValueChanged onSelected;
final int height;//高度
NeedItem(this.table,{this.onSelected,this.canSelected=false,this.height=183});
@override
State<StatefulWidget> createState() {
// TODO: implement createState
return new NeedItemState();
}
}
class NeedItemState extends State<NeedItem>{
@override
Widget build(BuildContext context) {
// TODO: implement build
t.Table table=widget.table;
return GestureDetector(
onTap: (){
if(widget.canSelected&&table.signStr.isEmpty){
setState(() {
table.selected=!(table.selected??false);
});
widget.onSelected(table);
}
},
child: Stack(
children: <Widget>[
Container(
width: ScreenUtil().setWidth(190),
height: ScreenUtil().setWidth(widget.height),
alignment: Alignment.center,
margin:EdgeInsets.all( ScreenUtil().setWidth(9)),
decoration: BoxDecoration(
color: MyColours.color_a8e2e4,
borderRadius: BorderRadius.all(Radius.circular(ScreenUtil().setWidth(8)))
),
child:Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(table.name,style: TextStyle(color: MyColours.color_131313,fontSize: ScreenUtil().setSp(30),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,),
Offstage(
offstage: table.tableNum.isEmpty?true:false,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
VEmptyView(5),
Text(table.tableNum,style: TextStyle(color: MyColours.color_777777,fontSize: ScreenUtil().setSp(26),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,),
],
),
),
Offstage(
offstage: table.lowStr.isEmpty?true:false,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
VEmptyView(5),
Text(table.lowStr,style: TextStyle(color: MyColours.color_2bb5b7,fontSize: ScreenUtil().setSp(24),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,)
],
),
)
],
)
),
],
),
);
}
}
\ No newline at end of file
... ...
... ... @@ -39,68 +39,73 @@ class TableItemState extends State<TableItem>{
widget.onSelected(table);
}
},
child: Container(
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setWidth(widget.height),
margin:EdgeInsets.all( ScreenUtil().setWidth(9)),
decoration: BoxDecoration(
color: MyColours.color_a8e2e4,
borderRadius: BorderRadius.all(Radius.circular(ScreenUtil().setWidth(8)))
),
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
top: 0,
child: table.tidStr==null?Container():Container(
width: ScreenUtil().setWidth(60),
height: ScreenUtil().setHeight(27),
alignment: Alignment.center,
decoration: BoxDecoration(
color: MyColours.color_63a6d1,
borderRadius: BorderRadius.only(topLeft: Radius.circular(ScreenUtil().setWidth(8)),topRight: Radius.circular(ScreenUtil().setWidth(8)),bottomRight: Radius.circular(ScreenUtil().setWidth(8)))
),
child: Text(table.tidStr,style: TextStyle(color: MyColours.color_ffffff,fontSize: ScreenUtil().setSp(19),decoration: TextDecoration.none)),
),
),
Container(
alignment: Alignment.centerLeft,
margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(table.name,style: TextStyle(color: MyColours.color_131313,fontSize: ScreenUtil().setSp(26),decoration: TextDecoration.none),),
VEmptyView(5),
Text((table.reserver==null||table.reserver.isEmpty)?table.tableNum:table.reserver,style: TextStyle(color: (table.reserver==null||table.reserver.isEmpty)?MyColours.color_777777:MyColours.color_2bb5b7,fontSize: ScreenUtil().setSp(22),decoration: TextDecoration.none),overflow: TextOverflow.ellipsis,),
VEmptyView(5),
Text(table.lowStr,style: TextStyle(color: MyColours.color_777777,fontSize: ScreenUtil().setSp(22),decoration: TextDecoration.none),overflow: TextOverflow.ellipsis,)
],
),
child: Stack(
children: <Widget>[
Container(
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setWidth(widget.height),
margin:EdgeInsets.all( ScreenUtil().setWidth(9)),
decoration: BoxDecoration(
color: MyColours.color_a8e2e4,
borderRadius: BorderRadius.all(Radius.circular(ScreenUtil().setWidth(8)))
),
Positioned(
bottom: 0,
left: 0,
right: 0,
child: table.signStr.isEmpty?Container():Container(
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setHeight(46),
alignment: Alignment.center,
decoration: BoxDecoration(
color:MyColours.color_89c0b7,
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(ScreenUtil().setWidth(8)),bottomRight: Radius.circular(ScreenUtil().setWidth(8)))
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
top: 0,
child: table.tidStr==null?Container():Container(
width: ScreenUtil().setWidth(70),
height: ScreenUtil().setHeight(32),
alignment: Alignment.center,
decoration: BoxDecoration(
color: MyColours.color_63a6d1,
borderRadius: BorderRadius.only(topLeft: Radius.circular(ScreenUtil().setWidth(8)),topRight: Radius.circular(ScreenUtil().setWidth(8)),bottomRight: Radius.circular(ScreenUtil().setWidth(8)))
),
child: Text(table.tidStr,style: TextStyle(color: MyColours.color_ffffff,fontSize: ScreenUtil().setSp(24),decoration: TextDecoration.none,fontWeight: FontWeight.normal)),
),
),
Container(
alignment: Alignment.centerLeft,
margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
VEmptyView(20),
Text(table.name,style: TextStyle(color: MyColours.color_131313,fontSize: ScreenUtil().setSp(30),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,),
VEmptyView(5),
Text((table.reserver==null||table.reserver.isEmpty)?table.tableNum:table.reserver,style: TextStyle(color: (table.reserver==null||table.reserver.isEmpty)?MyColours.color_777777:MyColours.color_2bb5b7,fontSize: ScreenUtil().setSp(26),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,),
VEmptyView(5),
Text(table.lowStr,style: TextStyle(color: MyColours.color_777777,fontSize: ScreenUtil().setSp(26),decoration: TextDecoration.none,fontWeight: FontWeight.normal),overflow: TextOverflow.ellipsis,)
],
),
),
Positioned(
bottom: 0,
left: 0,
right: 0,
child: table.signStr.isEmpty?Container():Container(
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setHeight(40),
alignment: Alignment.center,
decoration: BoxDecoration(
color:MyColours.color_89c0b7,
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(ScreenUtil().setWidth(8)),bottomRight: Radius.circular(ScreenUtil().setWidth(8)))
),
child: Text(table.signStr,style: TextStyle(color:MyColours.color_ffffff,fontSize: ScreenUtil().setSp(24),decoration: TextDecoration.none,fontWeight: FontWeight.normal),),
),
),
child: Text(table.signStr,style: TextStyle(color:MyColours.color_ffffff,fontSize: ScreenUtil().setSp(24),decoration: TextDecoration.none),),
),
],
),
Positioned(
top: 0,
right: 0,
child: !(table.selected??false)?Container():Image.asset("assets/icon_selected.png",width: ScreenUtil().setWidth(27),height: ScreenUtil().setWidth(27),)
)
],
),
),
Positioned(
top: 3,
right: 5,
child: !(table.selected??false)?Container():Image.asset("assets/icon_selected.png",width: ScreenUtil().setWidth(40),height: ScreenUtil().setWidth(40),)
)
],
),
);
}
... ...