|
...
|
...
|
@@ -36,9 +36,10 @@ import '../../app.dart'; |
|
|
|
class NotebookDetailPage extends StatefulWidget {
|
|
|
|
final String rid;
|
|
|
|
final String mid;
|
|
|
|
final String uid;
|
|
|
|
final bool fromNotify;
|
|
|
|
|
|
|
|
NotebookDetailPage(this.rid, {this.fromNotify = false, this.mid});
|
|
|
|
NotebookDetailPage(this.rid, {this.fromNotify = false, this.mid, this.uid});
|
|
|
|
|
|
|
|
@override
|
|
|
|
State<StatefulWidget> createState() {
|
|
...
|
...
|
@@ -191,7 +192,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
"status": status, //5安排包间 6 拒绝订单
|
|
|
|
"tid": tid,
|
|
|
|
// "mid": widget.mid,
|
|
|
|
"cause": json.encode(causeMap)
|
|
|
|
"cause": json.encode(causeMap),
|
|
|
|
"uid": userModel.user.openid,
|
|
|
|
};
|
|
|
|
bool success =
|
|
|
|
await detailModel.setReserveStatus(context, params, ifPush: false);
|
|
...
|
...
|
@@ -452,7 +454,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
detailModel = Provider.of<NotebookDetailModel>(context, listen: true);
|
|
|
|
_onlineCheckEditProvider =
|
|
|
|
Provider.of<OnlineCheckEditProvider>(context, listen: true);
|
|
|
|
|
|
|
|
UserModel userModel = Provider.of<UserModel>(context, listen: false);
|
|
|
|
print(userModel.user.role_name);
|
|
|
|
print(userModel.user.openid);
|
|
|
|
print(widget.rid);
|
|
|
|
print(widget.uid);
|
|
|
|
return Scaffold(
|
|
|
|
body: SafeArea(
|
|
|
|
child: WillPopScope(
|
|
...
|
...
|
@@ -615,8 +621,15 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
DialogUtil.goPhone(formatPhone);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child:
|
|
|
|
RowMultiText("客户电话", formatPhone),
|
|
|
|
child: RowMultiText(
|
|
|
|
"客户电话",
|
|
|
|
userModel.user.role_name !=
|
|
|
|
'管理员' &&
|
|
|
|
widget.uid != "null" &&
|
|
|
|
widget.uid !=
|
|
|
|
userModel.user.openid
|
|
|
|
? Utils.starPhone(formatPhone)
|
|
|
|
: formatPhone),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: detailEntity.cusdem == '' ||
|
|
...
|
...
|
@@ -1045,7 +1058,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
horizontal: ScreenUtil().setHeight(40)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
color: 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)),
|
|
...
|
...
|
@@ -1058,18 +1075,46 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
|
|
Expanded(
|
|
|
|
child: _cancelAndChangeBtn(() {
|
|
|
|
print('点击变更预订');
|
|
|
|
NavigatorUtil.goNoteBookChangePage(
|
|
|
|
context, detailEntity, widget.rid);
|
|
|
|
}, '变更预订')),
|
|
|
|
if (userModel.user.role_name != '管理员' &&
|
|
|
|
widget.uid != "null" &&
|
|
|
|
widget.uid != userModel.user.openid) {
|
|
|
|
} else {
|
|
|
|
NavigatorUtil.goNoteBookChangePage(
|
|
|
|
context, detailEntity, widget.rid);
|
|
|
|
}
|
|
|
|
}, '变更预订',
|
|
|
|
fontColor: 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: MyColours.color_199095,
|
|
|
|
color: userModel.user.role_name != '管理员' &&
|
|
|
|
widget.uid != "null" &&
|
|
|
|
widget.uid != userModel.user.openid
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_199095,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: _cancelAndChangeBtn(() {
|
|
|
|
_showCancelWidget(context);
|
|
|
|
}, '取消预订')),
|
|
|
|
if (userModel.user.role_name != '管理员' &&
|
|
|
|
widget.uid != "null" &&
|
|
|
|
widget.uid != userModel.user.openid) {
|
|
|
|
} else {
|
|
|
|
_showCancelWidget(context);
|
|
|
|
}
|
|
|
|
}, '取消预订',
|
|
|
|
fontColor: userModel.user.role_name !=
|
|
|
|
'管理员' &&
|
|
|
|
widget.uid != "null" &&
|
|
|
|
widget.uid !=
|
|
|
|
userModel.user.openid
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_199095)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
...
|
...
|
|