|
...
|
...
|
@@ -1516,13 +1516,29 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
MyColours.color_333333)
|
|
|
|
: TitleAndBtn(
|
|
|
|
title: "备注",
|
|
|
|
uid: widget.uid,
|
|
|
|
content:
|
|
|
|
detailEntity.cusdem ??
|
|
|
|
"",
|
|
|
|
callback: () {
|
|
|
|
//备注弹窗
|
|
|
|
_showCusdemDialog(
|
|
|
|
context, widget.rid);
|
|
|
|
if (userModel.user
|
|
|
|
.role_name !=
|
|
|
|
'管理员' &&
|
|
|
|
userModel.user
|
|
|
|
.role_name !=
|
|
|
|
'店长' &&
|
|
|
|
widget.uid !=
|
|
|
|
"null" &&
|
|
|
|
widget.uid !=
|
|
|
|
userModel.user
|
|
|
|
.openid) {
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
//备注弹窗
|
|
|
|
_showCusdemDialog(
|
|
|
|
context,
|
|
|
|
widget.rid);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
),
|
|
|
|
|
|
...
|
...
|
@@ -2076,25 +2092,99 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
text: '填写预订人信息',
|
|
|
|
fontSize: 28,
|
|
|
|
isBold: false,
|
|
|
|
textColor: userModel.user.role_name != '管理员' &&
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.role_name !=
|
|
|
|
'店长' &&
|
|
|
|
widget.uid !=
|
|
|
|
"null" &&
|
|
|
|
widget.uid !=
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid
|
|
|
|
? MyColours
|
|
|
|
.color_999999
|
|
|
|
: Colors.white,
|
|
|
|
height: ScreenUtil()
|
|
|
|
.setWidth(70),
|
|
|
|
width: ScreenUtil()
|
|
|
|
.setWidth(240),
|
|
|
|
radius: ScreenUtil()
|
|
|
|
.setWidth(10),
|
|
|
|
borderColor: userModel.user.role_name != '管理员' &&
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.role_name !=
|
|
|
|
'店长' &&
|
|
|
|
widget.uid !=
|
|
|
|
"null" &&
|
|
|
|
widget.uid !=
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid
|
|
|
|
? MyColours
|
|
|
|
.color_999999
|
|
|
|
: MyColours
|
|
|
|
.color_199095,
|
|
|
|
gradientStart: userModel.user.role_name != '管理员' &&
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.role_name !=
|
|
|
|
'店长' &&
|
|
|
|
widget.uid !=
|
|
|
|
"null" &&
|
|
|
|
widget.uid !=
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid
|
|
|
|
? MyColours
|
|
|
|
.color_ffffff
|
|
|
|
: MyColours
|
|
|
|
.color_199095,
|
|
|
|
gradientEnd: userModel.user.role_name != '管理员' &&
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.role_name !=
|
|
|
|
'店长' &&
|
|
|
|
widget.uid !=
|
|
|
|
"null" &&
|
|
|
|
widget.uid !=
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid
|
|
|
|
? MyColours
|
|
|
|
.color_ffffff
|
|
|
|
: MyColours
|
|
|
|
.color_199095,
|
|
|
|
onPressed: () {
|
|
|
|
// setState(() {
|
|
|
|
// setTop = true;
|
|
|
|
// });
|
|
|
|
NavigatorUtil
|
|
|
|
.goEditReserverPage(
|
|
|
|
context,
|
|
|
|
widget
|
|
|
|
.rid,
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
needBtn:
|
|
|
|
false);
|
|
|
|
if (userModel.user
|
|
|
|
.role_name !=
|
|
|
|
'管理员' &&
|
|
|
|
userModel.user
|
|
|
|
.role_name !=
|
|
|
|
'店长' &&
|
|
|
|
widget.uid !=
|
|
|
|
"null" &&
|
|
|
|
widget.uid !=
|
|
|
|
userModel
|
|
|
|
.user
|
|
|
|
.openid) {
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
NavigatorUtil
|
|
|
|
.goEditReserverPage(
|
|
|
|
context,
|
|
|
|
widget
|
|
|
|
.rid,
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
needBtn:
|
|
|
|
false);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
))
|
|
|
|
],
|
|
...
|
...
|
@@ -3066,17 +3156,30 @@ class TitleAndBtn extends StatelessWidget { |
|
|
|
final List<String> list;
|
|
|
|
final NotebookDetailModel detailModel;
|
|
|
|
final GestureTapCallback callback;
|
|
|
|
final String uid;
|
|
|
|
const TitleAndBtn(
|
|
|
|
{Key key,
|
|
|
|
this.title,
|
|
|
|
this.content,
|
|
|
|
this.list,
|
|
|
|
this.detailModel,
|
|
|
|
this.callback})
|
|
|
|
this.callback,
|
|
|
|
this.uid})
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
bool hasAuthority = true; //
|
|
|
|
if (title == "备注") {
|
|
|
|
UserModel userModel = Provider.of<UserModel>(context, listen: false);
|
|
|
|
if (userModel.user.role_name != '管理员' &&
|
|
|
|
userModel.user.role_name != '店长' &&
|
|
|
|
uid != "null" &&
|
|
|
|
uid != userModel.user.openid) {
|
|
|
|
hasAuthority = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
width: double.infinity,
|
|
...
|
...
|
@@ -3111,10 +3214,14 @@ class TitleAndBtn extends StatelessWidget { |
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_199095))),
|
|
|
|
color: hasAuthority
|
|
|
|
? MyColours.color_199095
|
|
|
|
: MyColours.color_999999))),
|
|
|
|
child: Text(content == null || content == '' ? "修改" : content,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
color: hasAuthority
|
|
|
|
? MyColours.color_199095
|
|
|
|
: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(32))),
|
|
|
|
),
|
|
|
|
),
|
...
|
...
|
|