Commit fc4ce8472fc8cf179ad1ccf117262d02fa425a53

Authored by wdn127929
1 parent ff23faf9

新建分支

... ... @@ -11,14 +11,14 @@ if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = "280"
def flutterVersionCode = "282"
if (flutterVersionCode == null) {
flutterVersionCode = '280'
flutterVersionCode = '282'
}
def flutterVersionName = "2.8.0"
def flutterVersionName = "2.8.2"
if (flutterVersionName == null) {
flutterVersionName = '2.8.0'
flutterVersionName = '2.8.2'
}
apply plugin: 'com.android.application'
... ...
... ... @@ -491,193 +491,196 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
print(widget.uid);
return Scaffold(
resizeToAvoidBottomInset: false,
body: SafeArea(
child: WillPopScope(
child: Container(
color: MyColours.color_ffffff,
child: Column(
children: <Widget>[
MyAppBar(
"订座详情",
showBack: true,
callback: () {
if (widget.fromNotify) {
NavigatorUtil.goHomePage(context, initialIndex: 0);
} else {
Navigator.of(context).pop();
}
},
),
Expanded(child:
Consumer<NotebookDetailModel>(builder: (context, model, _) {
if (model.pageState != PageState.Success) {
return ExceptionPage(
pageState: model.pageState,
callback: () async {
// _getOrderListData();
_initCancel();
_getReserveDetail();
_getOrderInfo();
managers = await detailModel.getManagers(context);
body: InkWell(
onTap: () {
FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
},
child: SafeArea(
child: WillPopScope(
child: Container(
color: MyColours.color_ffffff,
child: Column(
children: <Widget>[
MyAppBar(
"订座详情",
showBack: true,
callback: () {
if (widget.fromNotify) {
NavigatorUtil.goHomePage(context, initialIndex: 0);
} else {
Navigator.of(context).pop();
}
},
emptyMsg: "暂时没有预订列表信息哦",
emptyImg: "empty_search",
showMsg: "加载中,请稍后...",
);
} else {
return Column(
children: [
Expanded(
child: DefaultTextStyle(
style: TextStyle(decoration: TextDecoration.none),
child: Container(
color: MyColours.color_ffffff,
child: SingleChildScrollView(
),
Expanded(child: Consumer<NotebookDetailModel>(
builder: (context, model, _) {
if (model.pageState != PageState.Success) {
return ExceptionPage(
pageState: model.pageState,
callback: () async {
// _getOrderListData();
_initCancel();
_getReserveDetail();
_getOrderInfo();
managers = await detailModel.getManagers(context);
},
emptyMsg: "暂时没有预订列表信息哦",
emptyImg: "empty_search",
showMsg: "加载中,请稍后...",
);
} else {
return Column(
children: [
Expanded(
child: DefaultTextStyle(
style:
TextStyle(decoration: TextDecoration.none),
child: Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(43)),
child: Column(
children: <Widget>[
RowMultiText(
"用餐时段", detailEntity.ddateMd),
Stack(
alignment: Alignment.center,
color: MyColours.color_ffffff,
child: SingleChildScrollView(
child: Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal:
ScreenUtil().setWidth(43)),
child: Column(
children: <Widget>[
Column(
RowMultiText(
"用餐时段", detailEntity.ddateMd),
Stack(
alignment: Alignment.center,
children: <Widget>[
RowMultiText("用餐时间",
detailEntity.ddateHm),
Column(
children: <Widget>[
RowMultiText("用餐时间",
detailEntity.ddateHm),
],
),
Image.asset(
detailEntity.statuImgAssets,
width: ScreenUtil()
.setWidth(114),
height:
ScreenUtil().setWidth(56),
)
],
),
Image.asset(
detailEntity.statuImgAssets,
width: ScreenUtil().setWidth(114),
height: ScreenUtil().setWidth(56),
)
],
),
Offstage(
offstage: detailEntity.type == "0"
? false
: true,
child: TitleAndBtn(
title: "用餐人数",
bookNum: detailEntity.pnum,
pnumlist: personNumList,
detailModel: model,
callback: () {
detailModel.upReserveInfo(context,
rid: widget.rid,
actualPum:
detailModel.selectNum);
},
),
),
Offstage(
offstage:
detailEntity.demands.length <= 0
? true
: false,
child: Column(
children: <Widget>[
RowMultiText(
"包间需求",
(detailEntity.demands.length
.toString() +
"个") ??
""),
Align(
alignment:
Alignment.centerRight,
child: Offstage(
offstage: detailEntity
.demands
.length >
0
? false
: true,
child: Container(
height: ScreenUtil()
.setHeight(210),
child: ListView.builder(
itemBuilder:
(BuildContext
contxt,
int index) {
return NeedItem(
detailEntity
.demands[
index]);
},
itemCount: detailEntity
.demands.length,
shrinkWrap: true,
scrollDirection:
Axis.horizontal,
),
),
))
],
),
),
RowMultiText(
"预订桌位",
(detailEntity.tables.length
.toString() +
"个")),
Align(
alignment: Alignment.centerRight,
child: Offstage(
Offstage(
offstage: detailEntity.type == "0"
? false
: true,
child: TitleAndBtn(
title: "用餐人数",
bookNum: detailEntity.pnum,
pnumlist: personNumList,
detailModel: model,
callback: () {
detailModel.upReserveInfo(
context,
rid: widget.rid,
actualPum: detailModel
.selectNum);
},
),
),
Offstage(
offstage:
detailEntity.tables.length > 0
detailEntity.demands.length <=
0
? true
: false,
child: Column(
children: <Widget>[
RowMultiText(
"包间需求",
(detailEntity.demands
.length
.toString() +
"个") ??
""),
Align(
alignment:
Alignment.centerRight,
child: Offstage(
offstage: detailEntity
.demands
.length >
0
? false
: true,
child: Container(
height: ScreenUtil()
.setHeight(210),
child:
ListView.builder(
itemBuilder:
(BuildContext
contxt,
int index) {
return NeedItem(
detailEntity
.demands[
index]);
},
itemCount:
detailEntity
.demands
.length,
shrinkWrap: true,
scrollDirection:
Axis.horizontal,
),
),
))
],
),
),
RowMultiText(
"预订桌位",
(detailEntity.tables.length
.toString() +
"个")),
Align(
alignment:
Alignment.centerRight,
child: Offstage(
offstage: detailEntity
.tables.length >
0
? false
: true,
child: Container(
height:
ScreenUtil().setHeight(210),
child: ListView.builder(
itemBuilder:
(BuildContext contxt,
int index) {
return TableItem(
detailEntity
.tables[index]);
},
itemCount: detailEntity
.tables.length,
shrinkWrap: true,
scrollDirection:
Axis.horizontal,
),
),
)),
TitleAndTextfield(
title: "消费金额",
detailModel: detailModel,
rid: widget.rid,
),
RowMultiText(
"客户姓名", detailEntity.rnameStr),
InkWell(
onTap: () {
if (formatPhone != null &&
formatPhone != '') {
if (userModel.user.role_name !=
'管理员' &&
userModel.user.role_name !=
'店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid) {
} else {
DialogUtil.goPhone(formatPhone);
}
}
},
child: RowMultiText(
"客户电话",
userModel.user.role_name !=
child: Container(
height: ScreenUtil()
.setHeight(210),
child: ListView.builder(
itemBuilder:
(BuildContext contxt,
int index) {
return TableItem(
detailEntity
.tables[index]);
},
itemCount: detailEntity
.tables.length,
shrinkWrap: true,
scrollDirection:
Axis.horizontal,
),
),
)),
TitleAndTextfield(
title: "消费金额",
detailModel: detailModel,
rid: widget.rid,
),
RowMultiText(
"客户姓名", detailEntity.rnameStr),
InkWell(
onTap: () {
if (formatPhone != null &&
formatPhone != '') {
if (userModel
.user.role_name !=
'管理员' &&
userModel
.user.role_name !=
... ... @@ -685,328 +688,362 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
widget.uid != "null" &&
widget.uid !=
userModel
.user.openid &&
formatPhone
.trim()
.length >
0
? Utils.starPhone(formatPhone)
: formatPhone),
),
Offstage(
offstage: detailEntity.cusdem == '' ||
detailEntity.cusdem == null,
child: RowMultiText("备注信息",
detailEntity.cusdem ?? ""),
),
MyDivider(double.infinity,
ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
height: ScreenUtil().setHeight(80),
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
child: Text(
"客户经理",
style: TextStyle(
color: MyColours
.color_828282,
fontSize: ScreenUtil()
.setSp(30)),
),
),
Positioned(
right: 0,
child: GestureDetector(
onTap: () async {
List<String> list = [];
for (Manager manager
in managers) {
list.add(
manager.roleUserName);
}
DialogUtil
.showSelectCusmanDialog(
context, list,
(value) {
if (value != null) {
setState(() {
cusmanText = managers[
value.first]
.userName;
});
_setCurrManager();
}
}).then((value) {});
},
child: Text(
cusmanText,
style: TextStyle(
color: MyColours
.color_353535,
fontSize: ScreenUtil()
.setSp(30),
decoration: TextDecoration
.underline,
.user.openid) {
} else {
DialogUtil.goPhone(
formatPhone);
}
}
},
child: RowMultiText(
"客户电话",
userModel.user.role_name !=
'管理员' &&
userModel.user
.role_name !=
'店长' &&
widget.uid !=
"null" &&
widget.uid !=
userModel.user
.openid &&
formatPhone
.trim()
.length >
0
? Utils.starPhone(
formatPhone)
: formatPhone),
),
Offstage(
offstage: detailEntity.cusdem ==
'' ||
detailEntity.cusdem == null,
child: RowMultiText("备注信息",
detailEntity.cusdem ?? ""),
),
MyDivider(double.infinity,
ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
height:
ScreenUtil().setHeight(80),
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
child: Text(
"客户经理",
style: TextStyle(
color: MyColours
.color_828282,
fontSize: ScreenUtil()
.setSp(30)),
),
),
),
)
],
),
),
Offstage(
offstage: detailEntity.note_name ==
'' ||
detailEntity.note_name == null,
child: RowMultiText("记录人",
detailEntity.note_name ?? ""),
),
RowMultiText("下单时间",
_getDateTime(detailEntity.cdate)),
Offstage(
offstage: (detailEntity.status ==
"4" &&
detailEntity.cancel != null)
? false
: true,
child: Column(
children: <Widget>[
MyDivider(double.infinity,
ScreenUtil().setHeight(2)),
RowMultiText(
"取消原因",
detailEntity.cancel?.desc ??
"",
textAlign: TextAlign.left),
RowMultiText(
"取消时间",
detailEntity
.cancel?.cdateStr ??
""),
RowMultiText(
"操作人",
detailEntity.abolition == '2'
? '顾客在线取消'
: detailEntity
.cancel?.uname ??
""),
],
),
),
_onlineCheckEditProvider
.orderInfoSunModel !=
null &&
_onlineCheckEditProvider
.orderInfoSunModel
.invoice !=
null &&
detailEntity.status != "4"
? MyDivider(double.infinity,
ScreenUtil().setHeight(1))
: Container(),
_onlineCheckEditProvider
.orderInfoSunModel !=
null &&
_onlineCheckEditProvider
.orderInfoSunModel
.invoice !=
null &&
detailEntity.status != "4"
? InkWell(
onTap: () {
NavigatorUtil
.goInvoiceDetailPage(
context,
fromNotify: false,
rid: widget.rid);
},
child: Container(
height: ScreenUtil()
.setWidth(87 * 2),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Text(
"发票抬头",
Positioned(
right: 0,
child: GestureDetector(
onTap: () async {
List<String> list = [];
for (Manager manager
in managers) {
list.add(manager
.roleUserName);
}
DialogUtil
.showSelectCusmanDialog(
context, list,
(value) {
if (value != null) {
setState(() {
cusmanText =
managers[value
.first]
.userName;
});
_setCurrManager();
}
}).then((value) {});
},
child: Text(
cusmanText,
style: TextStyle(
color: MyColours
.color_828282,
fontSize:
ScreenUtil()
.setSp(30)),
color: MyColours
.color_353535,
fontSize: ScreenUtil()
.setSp(30),
decoration:
TextDecoration
.underline,
),
),
Spacer(),
Column(
),
)
],
),
),
Offstage(
offstage:
detailEntity.note_name ==
'' ||
detailEntity.note_name ==
null,
child: RowMultiText("记录人",
detailEntity.note_name ?? ""),
),
RowMultiText(
"下单时间",
_getDateTime(
detailEntity.cdate)),
Offstage(
offstage:
(detailEntity.status == "4" &&
detailEntity.cancel !=
null)
? false
: true,
child: Column(
children: <Widget>[
MyDivider(
double.infinity,
ScreenUtil()
.setHeight(2)),
RowMultiText(
"取消原因",
detailEntity
.cancel?.desc ??
"",
textAlign:
TextAlign.left),
RowMultiText(
"取消时间",
detailEntity.cancel
?.cdateStr ??
""),
RowMultiText(
"操作人",
detailEntity.abolition ==
'2'
? '顾客在线取消'
: detailEntity.cancel
?.uname ??
""),
],
),
),
_onlineCheckEditProvider
.orderInfoSunModel !=
null &&
_onlineCheckEditProvider
.orderInfoSunModel
.invoice !=
null &&
detailEntity.status != "4"
? MyDivider(double.infinity,
ScreenUtil().setHeight(1))
: Container(),
_onlineCheckEditProvider
.orderInfoSunModel !=
null &&
_onlineCheckEditProvider
.orderInfoSunModel
.invoice !=
null &&
detailEntity.status != "4"
? InkWell(
onTap: () {
NavigatorUtil
.goInvoiceDetailPage(
context,
fromNotify: false,
rid: widget.rid);
},
child: Container(
height: ScreenUtil()
.setWidth(87 * 2),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.center,
.spaceBetween,
children: [
Text(
"发票抬头",
style: TextStyle(
color: MyColours
.color_828282,
fontSize:
ScreenUtil()
.setSp(
30)),
),
Spacer(),
Column(
mainAxisAlignment:
MainAxisAlignment
.center,
children: [
Text(
_onlineCheckEditProvider
.orderInfoSunModel
.invoice
.title,
style: TextStyle(
color: MyColours
.color_353535,
fontWeight:
FontWeight
.bold,
fontSize:
ScreenUtil()
.setSp(33))),
_onlineCheckEditProvider
.orderInfoSunModel
.invoice
.title,
.orderInfoSunModel
.invoice
.taxnumber ==
null ||
_onlineCheckEditProvider
.orderInfoSunModel
.invoice
.taxnumber ==
''
? Container()
: Column(
children: [
VEmptyView(
10),
Text(
'税号:${_onlineCheckEditProvider.orderInfoSunModel.invoice.taxnumber}',
style:
TextStyle(color: MyColours.color_707070, fontSize: ScreenUtil().setSp(28)))
],
)
],
),
HEmptyView(20),
Image.asset(
Utils.getImgPath(
'arr_right_gray'),
width: ScreenUtil()
.setWidth(12),
height: ScreenUtil()
.setWidth(22),
)
],
),
),
)
: Container(),
_onlineCheckEditProvider
.orderInfoSunModel !=
null &&
_onlineCheckEditProvider
.orderInfoSunModel
.price !=
null &&
detailEntity.status != "4"
? MyDivider(double.infinity,
ScreenUtil().setHeight(1))
: Container(),
_onlineCheckEditProvider
.orderInfoSunModel !=
null &&
_onlineCheckEditProvider
.orderInfoSunModel
.price !=
null &&
detailEntity.status != "4"
? InkWell(
onTap: () {
//在线买单消息 去查看 跳转在线买单详情页面
NavigatorUtil
.goOnlineCheckDetailPage(
context,
rid:
'${widget.rid}');
},
child: Container(
height: ScreenUtil()
.setWidth(87 * 2),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Text(
"实收金额:",
style: TextStyle(
color: MyColours
.color_707070,
fontSize:
ScreenUtil()
.setSp(
30)),
),
HEmptyView(20),
Text(
'¥ ${_onlineCheckEditProvider.orderInfoSunModel.price}',
style: TextStyle(
color: MyColours
.color_353535,
fontSize:
ScreenUtil()
.setSp(
32)),
),
Spacer(),
Text('查看明细',
style: TextStyle(
color: MyColours
.color_353535,
fontWeight:
FontWeight
.bold,
.color_707070,
fontSize:
ScreenUtil()
.setSp(
33))),
_onlineCheckEditProvider
.orderInfoSunModel
.invoice
.taxnumber ==
null ||
_onlineCheckEditProvider
.orderInfoSunModel
.invoice
.taxnumber ==
''
? Container()
: Column(
children: [
VEmptyView(
10),
Text(
'税号:${_onlineCheckEditProvider.orderInfoSunModel.invoice.taxnumber}',
style: TextStyle(
color:
MyColours.color_707070,
fontSize: ScreenUtil().setSp(28)))
],
)
28))),
HEmptyView(20),
Image.asset(
Utils.getImgPath(
'arr_right_gray'),
width: ScreenUtil()
.setWidth(12),
height: ScreenUtil()
.setWidth(22),
)
],
),
HEmptyView(20),
Image.asset(
Utils.getImgPath(
'arr_right_gray'),
width: ScreenUtil()
.setWidth(12),
height: ScreenUtil()
.setWidth(22),
)
],
),
),
)
: Container(),
_onlineCheckEditProvider
.orderInfoSunModel !=
null &&
_onlineCheckEditProvider
.orderInfoSunModel
.price !=
null &&
detailEntity.status != "4"
? MyDivider(double.infinity,
ScreenUtil().setHeight(1))
: Container(),
_onlineCheckEditProvider
.orderInfoSunModel !=
null &&
_onlineCheckEditProvider
.orderInfoSunModel
.price !=
null &&
detailEntity.status != "4"
? InkWell(
onTap: () {
//在线买单消息 去查看 跳转在线买单详情页面
NavigatorUtil
.goOnlineCheckDetailPage(
context,
rid: '${widget.rid}');
},
child: Container(
height: ScreenUtil()
.setWidth(87 * 2),
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
Text(
"实收金额:",
style: TextStyle(
color: MyColours
.color_707070,
fontSize:
ScreenUtil()
.setSp(30)),
),
HEmptyView(20),
Text(
'¥ ${_onlineCheckEditProvider.orderInfoSunModel.price}',
style: TextStyle(
color: MyColours
.color_353535,
fontSize:
ScreenUtil()
.setSp(32)),
),
Spacer(),
Text('查看明细',
style: TextStyle(
color: MyColours
.color_707070,
fontSize:
ScreenUtil()
.setSp(
28))),
HEmptyView(20),
Image.asset(
Utils.getImgPath(
'arr_right_gray'),
width: ScreenUtil()
.setWidth(12),
height: ScreenUtil()
.setWidth(22),
)
],
),
),
)
: Container(),
],
)),
),
)),
),
Offstage(
offstage: ((detailEntity.orderInfo != null &&
detailEntity.orderInfo.status == "3") ||
detailEntity.status == "3" ||
detailEntity.status == "4" ||
detailEntity.status == "6"),
child: Container(
width: double.infinity,
height: ScreenUtil().setWidth(84),
decoration: BoxDecoration(
color: MyColours.color_199095,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
),
margin: EdgeInsets.symmetric(
vertical: ScreenUtil().setHeight(20),
horizontal: ScreenUtil().setHeight(40)),
child: Row(
children: [
Offstage(
offstage:
((detailEntity.orderInfo != null &&
),
)
: Container(),
],
)),
),
)),
),
Offstage(
offstage: ((detailEntity.orderInfo != null &&
detailEntity.orderInfo.status == "3") ||
detailEntity.status == "3" ||
detailEntity.status == "4" ||
detailEntity.status == "6"),
child: Container(
width: double.infinity,
height: ScreenUtil().setWidth(84),
decoration: BoxDecoration(
color: MyColours.color_199095,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
),
margin: EdgeInsets.symmetric(
vertical: ScreenUtil().setHeight(20),
horizontal: ScreenUtil().setHeight(40)),
child: Row(
children: [
Offstage(
offstage: ((detailEntity.orderInfo !=
null &&
detailEntity.orderInfo
.status ==
"3") ||
... ... @@ -1015,209 +1052,241 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
detailEntity.status == "6")
? true
: false,
child: _cancelAndChangeBtn(() {
DialogUtil.showShareDialog(context)
?.then((value) {
switch (value) {
case 1: //微信
NavigatorUtil.goInvicationPage(
context,
detailEntity.id,
detailEntity.tableinfoStr,
detailEntity.ddate,
detailEntity.ddateStr,
detailEntity.phone,
detailEntity.ddate_solt);
break;
case 2: //短信
if (detailEntity.phone == null ||
detailEntity.phone.isEmpty) {
Utils.showToast("没有预订人电话信息");
return;
}
NavigatorUtil.goSmsPage(
context,
detailEntity.id,
);
break;
case 3: //电话
if (detailEntity.phone != null &&
detailEntity
.phone.isNotEmpty) {
if (userModel.user.role_name !=
'管理员' &&
userModel.user.role_name !=
'店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid) {
Utils.showToast("您无权拨打该电话");
} else {
Utils.goPhone(
detailEntity.phone);
}
} else {
Utils.showToast("没有预订人电话信息");
child: _cancelAndChangeBtn(() {
DialogUtil.showShareDialog(context)
?.then((value) {
switch (value) {
case 1: //微信
NavigatorUtil
.goInvicationPage(
context,
detailEntity.id,
detailEntity
.tableinfoStr,
detailEntity.ddate,
detailEntity.ddateStr,
detailEntity.phone,
detailEntity
.ddate_solt);
break;
case 2: //短信
if (detailEntity.phone ==
null ||
detailEntity
.phone.isEmpty) {
Utils.showToast(
"没有预订人电话信息");
return;
}
NavigatorUtil.goSmsPage(
context,
detailEntity.id,
);
break;
case 3: //电话
if (detailEntity.phone !=
null &&
detailEntity
.phone.isNotEmpty) {
if (userModel.user
.role_name !=
'管理员' &&
userModel.user
.role_name !=
'店长' &&
widget.uid != "null" &&
widget.uid !=
userModel
.user.openid) {
Utils.showToast(
"您无权拨打该电话");
} else {
Utils.goPhone(
detailEntity.phone);
}
} else {
Utils.showToast(
"没有预订人电话信息");
}
break;
}
break;
}
});
}, "通知客户",
bgColor: MyColours.color_199095,
width: detailEntity.order.cookbooklist
.length ==
0
? ScreenUtil.screenWidthDp -
ScreenUtil().setWidth(100)
: (ScreenUtil.screenWidthDp -
ScreenUtil()
.setWidth(91)) /
2,
fontColor: MyColours.color_ffffff)),
Offstage(
offstage: !(detailEntity
.order.cookbooklist.length >
0 &&
((detailEntity.orderInfo != null &&
detailEntity
.orderInfo.status ==
"3") &&
detailEntity.status != "3" &&
detailEntity.status != "4" &&
detailEntity.status != "6")),
child: MyDivider(ScreenUtil().setWidth(2),
ScreenUtil().setWidth(50),
color: MyColours.color_ffffff)),
Offstage(
offstage: detailEntity
.order.cookbooklist.length ==
0
? true
: false,
child: _cancelAndChangeBtn(() {
NavigatorUtil.goHasOrderFoodPage(
context,
rid: detailEntity.id);
}, '查看菜品',
bgColor: MyColours.color_199095,
width: ((detailEntity.orderInfo !=
});
}, "通知客户",
bgColor: MyColours.color_199095,
width: detailEntity
.order
.cookbooklist
.length ==
0
? ScreenUtil.screenWidthDp -
ScreenUtil().setWidth(100)
: (ScreenUtil.screenWidthDp -
ScreenUtil()
.setWidth(91)) /
2,
fontColor:
MyColours.color_ffffff)),
Offstage(
offstage: !(detailEntity.order
.cookbooklist.length >
0 &&
((detailEntity.orderInfo !=
null &&
detailEntity.orderInfo
.status ==
"3") ||
detailEntity.status == "3" ||
detailEntity.status == "4" ||
detailEntity.status == "6")
? ScreenUtil.screenWidthDp -
ScreenUtil().setWidth(91)
: (ScreenUtil.screenWidthDp -
ScreenUtil()
.setWidth(91)) /
2,
fontColor: MyColours.color_ffffff))
],
))),
Offstage(
offstage: ((detailEntity.orderInfo != null &&
detailEntity.orderInfo.status == "3") ||
detailEntity.status == "3" ||
detailEntity.status == "4" ||
detailEntity.status == "6")
? true
: false,
child: Container(
width: double.infinity,
height: ScreenUtil().setWidth(84),
margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setHeight(40)),
decoration: BoxDecoration(
border: Border.all(
color: userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
widget.uid != "null" &&
widget.uid != userModel.user.openid
? MyColours.color_999999
: MyColours.color_199095,
width: ScreenUtil().setWidth(2)),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
),
// child: Text('fff'),
child: Material(
color: Colors.transparent,
child: Row(
children: [
Expanded(
child: _cancelAndChangeBtn(() {
print('点击变更预订');
if (userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
widget.uid != "null" &&
widget.uid != userModel.user.openid) {
} else {
NavigatorUtil.goNoteBookChangePage(
context, detailEntity, widget.rid);
}
}, '变更预订',
fontColor: userModel.user.role_name !=
'管理员' &&
userModel.user.role_name !=
'店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid
? MyColours.color_999999
: MyColours.color_199095)),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setWidth(50),
"3") &&
detailEntity.status != "3" &&
detailEntity.status != "4" &&
detailEntity.status != "6")),
child: MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setWidth(50),
color: MyColours.color_ffffff)),
Offstage(
offstage: detailEntity.order
.cookbooklist.length ==
0
? true
: false,
child: _cancelAndChangeBtn(() {
NavigatorUtil.goHasOrderFoodPage(
context,
rid: detailEntity.id);
}, '查看菜品',
bgColor: MyColours.color_199095,
width: ((detailEntity.orderInfo !=
null &&
detailEntity.orderInfo
.status ==
"3") ||
detailEntity.status ==
"3" ||
detailEntity.status ==
"4" ||
detailEntity.status ==
"6")
? ScreenUtil.screenWidthDp -
ScreenUtil().setWidth(91)
: (ScreenUtil.screenWidthDp -
ScreenUtil()
.setWidth(91)) /
2,
fontColor:
MyColours.color_ffffff))
],
))),
Offstage(
offstage: ((detailEntity.orderInfo != null &&
detailEntity.orderInfo.status == "3") ||
detailEntity.status == "3" ||
detailEntity.status == "4" ||
detailEntity.status == "6")
? true
: false,
child: Container(
width: double.infinity,
height: ScreenUtil().setWidth(84),
margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setHeight(40)),
decoration: BoxDecoration(
border: Border.all(
color: userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
widget.uid != "null" &&
widget.uid != userModel.user.openid
? MyColours.color_999999
: MyColours.color_199095,
),
Expanded(
child: _cancelAndChangeBtn(() {
if (userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
widget.uid != "null" &&
widget.uid != userModel.user.openid) {
} else {
_showCancelWidget(context);
}
}, '取消预订',
fontColor: userModel.user.role_name !=
'管理员' &&
userModel.user.role_name !=
'店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid
? MyColours.color_999999
: MyColours.color_199095)),
],
)),
),
),
VEmptyView(ScreenUtil().setWidth(60))
],
);
}
})),
],
),
),
onWillPop: () async {
if (widget.fromNotify) {
NavigatorUtil.goHomePage(context, initialIndex: 0);
return true;
}
Navigator.of(context).pop();
return true;
},
)),
width: ScreenUtil().setWidth(2)),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
),
// child: Text('fff'),
child: Material(
color: Colors.transparent,
child: Row(
children: [
Expanded(
child: _cancelAndChangeBtn(() {
print('点击变更预订');
if (userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid) {
} else {
NavigatorUtil.goNoteBookChangePage(
context,
detailEntity,
widget.rid);
}
}, '变更预订',
fontColor: userModel
.user.role_name !=
'管理员' &&
userModel
.user.role_name !=
'店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid
? MyColours.color_999999
: MyColours.color_199095)),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setWidth(50),
color:
userModel.user.role_name != '管理员' &&
userModel.user.role_name !=
'店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid
? MyColours.color_999999
: MyColours.color_199095,
),
Expanded(
child: _cancelAndChangeBtn(() {
if (userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid) {
} else {
_showCancelWidget(context);
}
}, '取消预订',
fontColor: userModel
.user.role_name !=
'管理员' &&
userModel
.user.role_name !=
'店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid
? MyColours.color_999999
: MyColours.color_199095)),
],
)),
),
),
VEmptyView(ScreenUtil().setWidth(60))
],
);
}
})),
],
),
),
onWillPop: () async {
if (widget.fromNotify) {
NavigatorUtil.goHomePage(context, initialIndex: 0);
return true;
}
Navigator.of(context).pop();
return true;
},
))),
);
}
}
... ... @@ -1342,15 +1411,16 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> {
void initState() {
super.initState();
if (Platform.isIOS) {
// if (Platform.isIOS) {
numberFocusNode.addListener(() {
if (numberFocusNode.hasFocus) {
showOverlay(context);
} else {
_updateMoney();
removeOverlay();
}
});
}
// }
}
showOverlay(BuildContext context) {
... ... @@ -1363,7 +1433,7 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> {
left: 0.0,
child: InputDoneView(
callback: () {
_updateMoney();
// _updateMoney();
},
));
});
... ... @@ -1466,6 +1536,7 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> {
fontSize: ScreenUtil().setSp(30),
color: MyColours.color_199095),
textAlign: TextAlign.right,
textInputAction: TextInputAction.done,
decoration: InputDecoration(
hintText: "修改",
hintStyle: TextStyle(
... ... @@ -1499,7 +1570,7 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> {
},
onEditingComplete: () {
FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
_updateMoney();
// _updateMoney();
},
keyboardType:
TextInputType.numberWithOptions(decimal: true),
... ...