|
...
|
...
|
@@ -1244,17 +1244,17 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
print(userModel.user.openid);
|
|
|
|
print(widget.rid);
|
|
|
|
print(widget.uid);
|
|
|
|
bool notDo = userModel.user.role_name != '管理员' &&
|
|
|
|
userModel.user.role_name != '店长' &&
|
|
|
|
widget.uid != "null" &&
|
|
|
|
(widget.uid != userModel.user.openid &&
|
|
|
|
userModel.user.role_name != '前台') &&
|
|
|
|
userModel.user.role_name != '前台';
|
|
|
|
|
|
|
|
bool notDoWechat = userModel.user.role_name != '管理员' &&
|
|
|
|
userModel.user.role_name != '店长' &&
|
|
|
|
widget.uid != "null" &&
|
|
|
|
widget.uid != userModel.user.openid;
|
|
|
|
// bool notDo = userModel.user.role_name != '管理员' &&
|
|
|
|
// userModel.user.role_name != '店长' &&
|
|
|
|
// widget.uid != "null" &&
|
|
|
|
// (widget.uid != userModel.user.openid &&
|
|
|
|
// userModel.user.role_name != '前台') &&
|
|
|
|
// userModel.user.role_name != '前台';
|
|
|
|
|
|
|
|
// bool notDoWechat = userModel.user.role_name != '管理员' &&
|
|
|
|
// userModel.user.role_name != '店长' &&
|
|
|
|
// widget.uid != "null" &&
|
|
|
|
// widget.uid != userModel.user.openid;
|
|
|
|
return Scaffold(
|
|
|
|
resizeToAvoidBottomInset: false,
|
|
|
|
backgroundColor: MyColours.color_ffffff,
|
|
...
|
...
|
@@ -1628,9 +1628,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
detailEntity.cusdem ??
|
|
|
|
"",
|
|
|
|
callback: () {
|
|
|
|
if (notDo) {
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
if (Utils.getAuthority(
|
|
|
|
context, '备注') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel.user
|
|
|
|
.openid) {
|
|
|
|
//备注弹窗
|
|
|
|
_showCusdemDialog(
|
|
|
|
context,
|
|
...
|
...
|
@@ -2191,7 +2193,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
text: '填写预订人信息',
|
|
|
|
fontSize: 28,
|
|
|
|
isBold: false,
|
|
|
|
textColor: notDo
|
|
|
|
textColor: !(Utils.getAuthority(
|
|
|
|
context,
|
|
|
|
'填写预订人信息') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid)
|
|
|
|
? MyColours
|
|
|
|
.color_999999
|
|
|
|
: Colors.white,
|
|
...
|
...
|
@@ -2201,17 +2209,35 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
.setWidth(240),
|
|
|
|
radius: ScreenUtil()
|
|
|
|
.setWidth(10),
|
|
|
|
borderColor: notDo
|
|
|
|
borderColor: !(Utils.getAuthority(
|
|
|
|
context,
|
|
|
|
'填写预订人信息') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid)
|
|
|
|
? MyColours
|
|
|
|
.color_999999
|
|
|
|
: MyColours
|
|
|
|
.color_199095,
|
|
|
|
gradientStart: notDo
|
|
|
|
gradientStart: !(Utils.getAuthority(
|
|
|
|
context,
|
|
|
|
'填写预订人信息') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid)
|
|
|
|
? MyColours
|
|
|
|
.color_ffffff
|
|
|
|
: MyColours
|
|
|
|
.color_199095,
|
|
|
|
gradientEnd: notDo
|
|
|
|
gradientEnd: !(Utils.getAuthority(
|
|
|
|
context,
|
|
|
|
'填写预订人信息') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid)
|
|
|
|
? MyColours
|
|
|
|
.color_ffffff
|
|
|
|
: MyColours
|
|
...
|
...
|
@@ -2220,9 +2246,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
// setState(() {
|
|
|
|
// setTop = true;
|
|
|
|
// });
|
|
|
|
if (notDo) {
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
if (Utils.getAuthority(
|
|
|
|
context,
|
|
|
|
'填写预订人信息') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid) {
|
|
|
|
NavigatorUtil
|
|
|
|
.goEditReserverPage(
|
|
|
|
context,
|
|
...
|
...
|
@@ -2472,8 +2502,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
null &&
|
|
|
|
formatPhone !=
|
|
|
|
'') {
|
|
|
|
if (notDo) {
|
|
|
|
} else {
|
|
|
|
if (Utils.getAuthority(
|
|
|
|
context,
|
|
|
|
'电话') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid) {
|
|
|
|
DialogUtil
|
|
|
|
.goPhone(
|
|
|
|
formatPhone);
|
|
...
|
...
|
@@ -2637,7 +2672,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
flex: 1,
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (!notDoWechat) {
|
|
|
|
if (Utils.getAuthority(
|
|
|
|
context, '预点菜') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel
|
|
|
|
.user.openid) {
|
|
|
|
NavigatorUtil
|
|
|
|
.goOrderAdvanceHomePage(
|
|
|
|
context,
|
|
...
|
...
|
@@ -2654,7 +2693,14 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
MyColours.color_ffffff,
|
|
|
|
border: Border.all(
|
|
|
|
width: w(1),
|
|
|
|
color: notDoWechat
|
|
|
|
color: !(Utils
|
|
|
|
.getAuthority(
|
|
|
|
context,
|
|
|
|
'预点菜') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid)
|
|
|
|
? MyColours
|
|
|
|
.color_999999
|
|
|
|
: MyColours
|
|
...
|
...
|
@@ -2668,7 +2714,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('预点菜',
|
|
|
|
style: TextStyle(
|
|
|
|
color: notDoWechat
|
|
|
|
color: !(Utils.getAuthority(
|
|
|
|
context,
|
|
|
|
'预点菜') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid)
|
|
|
|
? MyColours
|
|
|
|
.color_999999
|
|
|
|
: MyColours
|
|
...
|
...
|
@@ -2709,7 +2761,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
// _nameStr.length -
|
|
|
|
// 1);
|
|
|
|
// }
|
|
|
|
if (!notDoWechat) {
|
|
|
|
if (Utils.getAuthority(
|
|
|
|
context, '通知客户') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel
|
|
|
|
.user.openid) {
|
|
|
|
NavigatorUtil
|
|
|
|
.goInvicationPage(
|
|
|
|
context,
|
|
...
|
...
|
@@ -2719,7 +2775,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: notDoWechat
|
|
|
|
color: !(Utils.getAuthority(
|
|
|
|
context,
|
|
|
|
'通知客户') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel.user
|
|
|
|
.openid)
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours
|
|
|
|
.color_199095,
|
|
...
|
...
|
@@ -3141,7 +3202,9 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
horizontal: ScreenUtil().setHeight(40)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
color: notDo
|
|
|
|
color: !(Utils.getAuthority(
|
|
|
|
context, '变更预订') ||
|
|
|
|
widget.uid == userModel.user.openid)
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_199095,
|
|
|
|
width: ScreenUtil().setWidth(2)),
|
|
...
|
...
|
@@ -3156,32 +3219,45 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
Expanded(
|
|
|
|
child: _cancelAndChangeBtn(() {
|
|
|
|
print('点击变更预订');
|
|
|
|
if (notDo) {
|
|
|
|
} else {
|
|
|
|
if (Utils.getAuthority(
|
|
|
|
context, '变更预订') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel.user.openid) {
|
|
|
|
NavigatorUtil.goNoteBookChangeFPage(
|
|
|
|
context,
|
|
|
|
detailEntity,
|
|
|
|
widget.rid);
|
|
|
|
}
|
|
|
|
}, '变更预订',
|
|
|
|
fontColor: notDo
|
|
|
|
fontColor: !(Utils.getAuthority(
|
|
|
|
context, '变更预订') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel.user.openid)
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_199095)),
|
|
|
|
MyDivider(
|
|
|
|
ScreenUtil().setWidth(2),
|
|
|
|
ScreenUtil().setWidth(50),
|
|
|
|
color: notDo
|
|
|
|
color: !(Utils.getAuthority(
|
|
|
|
context, '取消预订') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel.user.openid)
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_199095,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: _cancelAndChangeBtn(() {
|
|
|
|
if (notDo) {
|
|
|
|
} else {
|
|
|
|
if (Utils.getAuthority(
|
|
|
|
context, '取消预订') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel.user.openid) {
|
|
|
|
_showCancelWidget(context);
|
|
|
|
}
|
|
|
|
}, '取消预订',
|
|
|
|
fontColor: notDo
|
|
|
|
fontColor: !(Utils.getAuthority(
|
|
|
|
context, '取消预订') ||
|
|
|
|
widget.uid ==
|
|
|
|
userModel.user.openid)
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_199095)),
|
|
|
|
],
|
...
|
...
|
|