|
...
|
...
|
@@ -506,12 +506,12 @@ class DialogUtil { |
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
color: (data[index].select??false)
|
|
|
|
color: (data[index].select ??
|
|
|
|
false)
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: Colors.transparent,
|
|
|
|
width: w(3))),
|
|
|
|
child: Image.network(
|
|
|
|
data[index].url,
|
|
|
|
child: Image.network(data[index].url,
|
|
|
|
width: double.infinity,
|
|
|
|
height: w(44)))));
|
|
|
|
},
|
|
...
|
...
|
@@ -2816,6 +2816,7 @@ class DialogUtil { |
|
|
|
);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
static Future openFTablesChangeDialogOnly(
|
|
|
|
BuildContext context, List<TableListReserve> tables,
|
|
|
|
{CustomCallBack onTap}) async {
|
|
...
|
...
|
@@ -6657,7 +6658,8 @@ class DialogUtil { |
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
static tableListChangeWidgetOnly(
|
|
|
|
|
|
|
|
static tableListChangeWidgetOnly(
|
|
|
|
List<TableListReserve> tables, CustomCallBack callback) {
|
|
|
|
List<Widget> lists = tables.map((item) {
|
|
|
|
return remarkButton(
|
|
...
|
...
|
@@ -6673,7 +6675,6 @@ class DialogUtil { |
|
|
|
return lists;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static tableListChangeWidget(
|
|
|
|
List<TableList> tables, CustomCallBack callback) {
|
|
|
|
List<Widget> lists = tables.map((item) {
|
|
...
|
...
|
@@ -6689,7 +6690,8 @@ class DialogUtil { |
|
|
|
}).toList();
|
|
|
|
return lists;
|
|
|
|
}
|
|
|
|
static tableListWidgetNew(List tables, CustomCallBack callback) {
|
|
|
|
|
|
|
|
static tableListWidgetNew(List tables, CustomCallBack callback) {
|
|
|
|
List<Widget> lists = tables.map((item) {
|
|
|
|
return remarkButton(
|
|
|
|
content: item,
|
|
...
|
...
|
@@ -6916,6 +6918,7 @@ class DialogUtil { |
|
|
|
Provider.of<MessageDialogModel>(context, listen: false);
|
|
|
|
if (messageModel.messages.isEmpty) return null;
|
|
|
|
messageModel.showMessageDialog = true;
|
|
|
|
|
|
|
|
await showModalBottomSheet<int>(
|
|
|
|
context: context,
|
|
|
|
isScrollControlled: true,
|
|
...
|
...
|
@@ -6930,6 +6933,162 @@ class DialogUtil { |
|
|
|
Consumer<MessageDialogModel>(builder: (BuildContext context,
|
|
|
|
MessageDialogModel model, Widget child) {
|
|
|
|
if (messageModel.messages.isEmpty) return Container();
|
|
|
|
List<Widget> widgetData = [];
|
|
|
|
if (model.messages.length > 3) {
|
|
|
|
//分类
|
|
|
|
|
|
|
|
int online = 0; //10 在线预订
|
|
|
|
int cancel = 0; //11 取消预订
|
|
|
|
int order = 0; //1 提前点餐
|
|
|
|
int pay = 0; //12 在线买单
|
|
|
|
int payFinish = 0; //13 买单通知
|
|
|
|
int invoice = 0; //14 发票申请
|
|
|
|
int instore = 0; //15 店内消息
|
|
|
|
// int cancelManager = 0; //16 取消预订
|
|
|
|
int recharge = 0; //17 会员充值
|
|
|
|
int wine = 0; //18 存酒超期
|
|
|
|
int commemoration = 0; //19 纪念日提醒
|
|
|
|
// int person = 0; //20 补充预订 店内消息
|
|
|
|
|
|
|
|
model.messages.forEach((element) {
|
|
|
|
if (element.message_type == "10") {
|
|
|
|
online++;
|
|
|
|
} else if (element.message_type == "11" ||
|
|
|
|
element.message_type == "16") {
|
|
|
|
cancel++;
|
|
|
|
} else if (element.message_type == "1") {
|
|
|
|
order++;
|
|
|
|
} else if (element.message_type == "12") {
|
|
|
|
pay++;
|
|
|
|
} else if (element.message_type == "13") {
|
|
|
|
payFinish++;
|
|
|
|
} else if (element.message_type == "14") {
|
|
|
|
invoice++;
|
|
|
|
} else if (element.message_type == "15" ||
|
|
|
|
element.message_type == "20") {
|
|
|
|
instore++;
|
|
|
|
} else if (element.message_type == "17") {
|
|
|
|
recharge++;
|
|
|
|
} else if (element.message_type == "18") {
|
|
|
|
wine++;
|
|
|
|
} else if (element.message_type == "19") {
|
|
|
|
commemoration++;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
if (online > 0) {
|
|
|
|
widgetData.add(Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'在线预订 ${online}个',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(16)),
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
if (cancel > 0) {
|
|
|
|
widgetData.add(Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'取消预订 ${cancel}个',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(16)),
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
if (order > 0) {
|
|
|
|
widgetData.add(Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'提前点餐 ${order}个',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(16)),
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
if (pay > 0) {
|
|
|
|
widgetData.add(Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'在线买单 ${pay}个',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(16)),
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
if (payFinish > 0) {
|
|
|
|
widgetData.add(Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'买单通知 ${payFinish}个',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(16)),
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
if (invoice > 0) {
|
|
|
|
widgetData.add(Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'发票申请 ${invoice}个',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(16)),
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
if (instore > 0) {
|
|
|
|
widgetData.add(Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'店内消息 ${instore}个',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(16)),
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
if (recharge > 0) {
|
|
|
|
widgetData.add(Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'会员充值 ${recharge}个',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(16)),
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (wine > 0) {
|
|
|
|
widgetData.add(Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'存酒超期 ${wine}个',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(16)),
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
if (commemoration > 0) {
|
|
|
|
widgetData.add(Padding(
|
|
|
|
padding: EdgeInsets.only(bottom: w(10)),
|
|
|
|
child: Text(
|
|
|
|
'纪念日提醒 ${commemoration}个',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(16)),
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
widgetData.add(Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Spacer(),
|
|
|
|
RoundButton(
|
|
|
|
text:"立即处理",
|
|
|
|
width: w(100),
|
|
|
|
height: w(43),
|
|
|
|
fontSize: 28,
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
borderColor: MyColours.color_438E93,
|
|
|
|
radius: r(5),
|
|
|
|
textColor:MyColours.color_438E93,
|
|
|
|
onPressed: () {
|
|
|
|
NavigatorUtil.goHomePage(context, initialIndex: 0);
|
|
|
|
},
|
|
|
|
)
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
return Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: <Widget>[
|
|
...
|
...
|
@@ -6946,9 +7105,9 @@ class DialogUtil { |
|
|
|
// top: ScreenUtil().setWidth(21),
|
|
|
|
// bottom: ScreenUtil().setWidth(2)),
|
|
|
|
child: Text(
|
|
|
|
"您有一条新的消息",
|
|
|
|
"您有${messageModel.messages.length}条新的消息",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
color:model.messages.length > 3? MyColours.color_ffffff: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
)),
|
|
|
|
Align(
|
|
...
|
...
|
@@ -6968,7 +7127,7 @@ class DialogUtil { |
|
|
|
bottom: ScreenUtil().setWidth(38),
|
|
|
|
),
|
|
|
|
child: Image.asset(
|
|
|
|
"assets/close.png",
|
|
|
|
messageModel.messages.length > 3? "assets/dialog_close.png": "assets/close.png",
|
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28),
|
|
|
|
),
|
|
...
|
...
|
@@ -6992,55 +7151,57 @@ class DialogUtil { |
|
|
|
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: MyColours.color_353535,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Text(
|
|
|
|
"刚刚",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(22)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
Text(
|
|
|
|
"在线预订:${model.messages.length}个",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: widgetData
|
|
|
|
// <Widget>[
|
|
|
|
// widgetData()
|
|
|
|
// Row(
|
|
|
|
// crossAxisAlignment:
|
|
|
|
// CrossAxisAlignment.center,
|
|
|
|
// children: <Widget>[
|
|
|
|
// Text(
|
|
|
|
// "在线预订",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_353535,
|
|
|
|
// fontSize: ScreenUtil().setSp(32)),
|
|
|
|
// ),
|
|
|
|
// Spacer(),
|
|
|
|
// Text(
|
|
|
|
// "刚刚",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_999999,
|
|
|
|
// fontSize: ScreenUtil().setSp(22)),
|
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// VEmptyView(20),
|
|
|
|
// Text(
|
|
|
|
// "在线预订:${model.messages.length}个",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_353535,
|
|
|
|
// fontSize: ScreenUtil().setSp(32)),
|
|
|
|
// ),
|
|
|
|
// Row(
|
|
|
|
// crossAxisAlignment:
|
|
|
|
// CrossAxisAlignment.center,
|
|
|
|
// children: <Widget>[
|
|
|
|
// Spacer(),
|
|
|
|
// CommonButton(
|
|
|
|
// width: 160,
|
|
|
|
// height: 48,
|
|
|
|
// fontSize: 32,
|
|
|
|
// content: "立即处理",
|
|
|
|
// state: 1,
|
|
|
|
// onPress: () {
|
|
|
|
// NavigatorUtil.goHomePage(context,
|
|
|
|
// initialIndex: 0);
|
|
|
|
// },
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Spacer(),
|
|
|
|
CommonButton(
|
|
|
|
width: 160,
|
|
|
|
height: 48,
|
|
|
|
fontSize: 32,
|
|
|
|
content: "立即处理",
|
|
|
|
state: 1,
|
|
|
|
onPress: () {
|
|
|
|
NavigatorUtil.goHomePage(context,
|
|
|
|
initialIndex: 0);
|
|
|
|
},
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: ListView.builder(
|
|
|
|
itemBuilder: (context, index) {
|
...
|
...
|
|