Commit 3a7b72d487ae45ffc566d52845d614f53079d060

Authored by wdn127929
1 parent 433f8f98

客户经理转发记录订座详情页修改订单和查看电话号码权限

@@ -11,14 +11,14 @@ if (flutterRoot == null) { @@ -11,14 +11,14 @@ if (flutterRoot == null) {
11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 } 12 }
13 13
14 -def flutterVersionCode = "274" 14 +def flutterVersionCode = "275"
15 if (flutterVersionCode == null) { 15 if (flutterVersionCode == null) {
16 - flutterVersionCode = '274' 16 + flutterVersionCode = '275'
17 } 17 }
18 18
19 -def flutterVersionName = "2.7.4" 19 +def flutterVersionName = "2.7.5"
20 if (flutterVersionName == null) { 20 if (flutterVersionName == null) {
21 - flutterVersionName = '2.7.4' 21 + flutterVersionName = '2.7.5'
22 } 22 }
23 23
24 apply plugin: 'com.android.application' 24 apply plugin: 'com.android.application'
  1 +import 'package:json_annotation/json_annotation.dart';
  2 +
  3 +part 'add_forward_model.g.dart';
  4 +
  5 +@JsonSerializable()
  6 +class AddForwardModel extends Object {
  7 + @JsonKey(name: 'ret')
  8 + int ret;
  9 +
  10 + @JsonKey(name: 'data')
  11 + AddForwardSunModel data;
  12 +
  13 + @JsonKey(name: 'msg')
  14 + String msg;
  15 +
  16 + AddForwardModel(
  17 + this.ret,
  18 + this.data,
  19 + this.msg,
  20 + );
  21 +
  22 + factory AddForwardModel.fromJson(Map<String, dynamic> srcJson) =>
  23 + _$AddForwardModelFromJson(srcJson);
  24 +
  25 + Map<String, dynamic> toJson() => _$AddForwardModelToJson(this);
  26 +}
  27 +
  28 +@JsonSerializable()
  29 +class AddForwardSunModel extends Object {
  30 + @JsonKey(name: 'uid')
  31 + int uid;
  32 +
  33 + @JsonKey(name: 'rid')
  34 + int rid;
  35 +
  36 + @JsonKey(name: 'sid')
  37 + int sid;
  38 +
  39 + @JsonKey(name: 'cdate')
  40 + int cdate;
  41 +
  42 + @JsonKey(name: 'id')
  43 + String id;
  44 +
  45 + AddForwardSunModel(
  46 + this.uid,
  47 + this.rid,
  48 + this.sid,
  49 + this.cdate,
  50 + this.id,
  51 + );
  52 +
  53 + factory AddForwardSunModel.fromJson(Map<String, dynamic> srcJson) =>
  54 + _$AddForwardSunModelFromJson(srcJson);
  55 +
  56 + Map<String, dynamic> toJson() => _$AddForwardSunModelToJson(this);
  57 +}
  1 +// GENERATED CODE - DO NOT MODIFY BY HAND
  2 +
  3 +part of 'add_forward_model.dart';
  4 +
  5 +// **************************************************************************
  6 +// JsonSerializableGenerator
  7 +// **************************************************************************
  8 +
  9 +AddForwardModel _$AddForwardModelFromJson(Map<String, dynamic> json) {
  10 + return AddForwardModel(
  11 + json['ret'] as int,
  12 + json['data'] == null
  13 + ? null
  14 + : AddForwardSunModel.fromJson(json['data'] as Map<String, dynamic>),
  15 + json['msg'] as String,
  16 + );
  17 +}
  18 +
  19 +Map<String, dynamic> _$AddForwardModelToJson(AddForwardModel instance) =>
  20 + <String, dynamic>{
  21 + 'ret': instance.ret,
  22 + 'data': instance.data,
  23 + 'msg': instance.msg,
  24 + };
  25 +
  26 +AddForwardSunModel _$AddForwardSunModelFromJson(Map<String, dynamic> json) {
  27 + return AddForwardSunModel(
  28 + json['uid'] as int,
  29 + json['rid'] as int,
  30 + json['sid'] as int,
  31 + json['cdate'] as int,
  32 + json['id'] as String,
  33 + );
  34 +}
  35 +
  36 +Map<String, dynamic> _$AddForwardSunModelToJson(AddForwardSunModel instance) =>
  37 + <String, dynamic>{
  38 + 'uid': instance.uid,
  39 + 'rid': instance.rid,
  40 + 'sid': instance.sid,
  41 + 'cdate': instance.cdate,
  42 + 'id': instance.id,
  43 + };
@@ -8,6 +8,7 @@ class Message { @@ -8,6 +8,7 @@ class Message {
8 Message(); 8 Message();
9 9
10 String id; 10 String id;
  11 + String uid;
11 dynamic message_type; 12 dynamic message_type;
12 String handle_time; //10在线预订 11取消预订 13 String handle_time; //10在线预订 11取消预订
13 String read_time; 14 String read_time;
@@ -9,6 +9,7 @@ part of 'message.dart'; @@ -9,6 +9,7 @@ part of 'message.dart';
9 Message _$MessageFromJson(Map<String, dynamic> json) { 9 Message _$MessageFromJson(Map<String, dynamic> json) {
10 return Message() 10 return Message()
11 ..id = json['id'] as String 11 ..id = json['id'] as String
  12 + ..uid = json['uid'] as String
12 ..message_type = json['message_type'] 13 ..message_type = json['message_type']
13 ..handle_time = json['handle_time'] as String 14 ..handle_time = json['handle_time'] as String
14 ..read_time = json['read_time'] as String 15 ..read_time = json['read_time'] as String
@@ -28,6 +29,7 @@ Message _$MessageFromJson(Map<String, dynamic> json) { @@ -28,6 +29,7 @@ Message _$MessageFromJson(Map<String, dynamic> json) {
28 29
29 Map<String, dynamic> _$MessageToJson(Message instance) => <String, dynamic>{ 30 Map<String, dynamic> _$MessageToJson(Message instance) => <String, dynamic>{
30 'id': instance.id, 31 'id': instance.id,
  32 + 'uid': instance.uid,
31 'message_type': instance.message_type, 33 'message_type': instance.message_type,
32 'handle_time': instance.handle_time, 34 'handle_time': instance.handle_time,
33 'read_time': instance.read_time, 35 'read_time': instance.read_time,
@@ -12,6 +12,7 @@ class Notebook { @@ -12,6 +12,7 @@ class Notebook {
12 String orderid; 12 String orderid;
13 String openid; 13 String openid;
14 String sid; 14 String sid;
  15 + String uid;
15 String room_demand; 16 String room_demand;
16 String tid; 17 String tid;
17 String pnum; 18 String pnum;
@@ -140,6 +141,9 @@ class OrderInfo extends Object { @@ -140,6 +141,9 @@ class OrderInfo extends Object {
140 @JsonKey(name: 'sid') 141 @JsonKey(name: 'sid')
141 String sid; 142 String sid;
142 143
  144 + @JsonKey(name: 'uid')
  145 + String uid;
  146 +
143 @JsonKey(name: 'rid') 147 @JsonKey(name: 'rid')
144 String rid; 148 String rid;
145 149
@@ -209,6 +213,7 @@ class OrderInfo extends Object { @@ -209,6 +213,7 @@ class OrderInfo extends Object {
209 this.outTradeNo, 213 this.outTradeNo,
210 this.openid, 214 this.openid,
211 this.sid, 215 this.sid,
  216 + this.uid,
212 this.rid, 217 this.rid,
213 this.sellername, 218 this.sellername,
214 this.tablename, 219 this.tablename,
@@ -12,6 +12,7 @@ Notebook _$NotebookFromJson(Map<String, dynamic> json) { @@ -12,6 +12,7 @@ Notebook _$NotebookFromJson(Map<String, dynamic> json) {
12 ..orderid = json['orderid'] as String 12 ..orderid = json['orderid'] as String
13 ..openid = json['openid'] as String 13 ..openid = json['openid'] as String
14 ..sid = json['sid'] as String 14 ..sid = json['sid'] as String
  15 + ..uid = json['uid'] as String
15 ..room_demand = json['room_demand'] as String 16 ..room_demand = json['room_demand'] as String
16 ..tid = json['tid'] as String 17 ..tid = json['tid'] as String
17 ..pnum = json['pnum'] as String 18 ..pnum = json['pnum'] as String
@@ -54,6 +55,7 @@ Map<String, dynamic> _$NotebookToJson(Notebook instance) => <String, dynamic>{ @@ -54,6 +55,7 @@ Map<String, dynamic> _$NotebookToJson(Notebook instance) => <String, dynamic>{
54 'orderid': instance.orderid, 55 'orderid': instance.orderid,
55 'openid': instance.openid, 56 'openid': instance.openid,
56 'sid': instance.sid, 57 'sid': instance.sid,
  58 + 'uid': instance.uid,
57 'room_demand': instance.room_demand, 59 'room_demand': instance.room_demand,
58 'tid': instance.tid, 60 'tid': instance.tid,
59 'pnum': instance.pnum, 61 'pnum': instance.pnum,
@@ -96,6 +98,7 @@ OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) { @@ -96,6 +98,7 @@ OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) {
96 json['out_trade_no'] as String, 98 json['out_trade_no'] as String,
97 json['openid'] as String, 99 json['openid'] as String,
98 json['sid'] as String, 100 json['sid'] as String,
  101 + json['uid'] as String,
99 json['rid'] as String, 102 json['rid'] as String,
100 json['sellername'] as String, 103 json['sellername'] as String,
101 json['tablename'] as String, 104 json['tablename'] as String,
@@ -125,6 +128,7 @@ Map<String, dynamic> _$OrderInfoToJson(OrderInfo instance) => <String, dynamic>{ @@ -125,6 +128,7 @@ Map<String, dynamic> _$OrderInfoToJson(OrderInfo instance) => <String, dynamic>{
125 'out_trade_no': instance.outTradeNo, 128 'out_trade_no': instance.outTradeNo,
126 'openid': instance.openid, 129 'openid': instance.openid,
127 'sid': instance.sid, 130 'sid': instance.sid,
  131 + 'uid': instance.uid,
128 'rid': instance.rid, 132 'rid': instance.rid,
129 'sellername': instance.sellername, 133 'sellername': instance.sellername,
130 'tablename': instance.tablename, 134 'tablename': instance.tablename,
@@ -74,6 +74,7 @@ class NotebookDetail { @@ -74,6 +74,7 @@ class NotebookDetail {
74 } 74 }
75 75
76 String id; 76 String id;
  77 + String uid;
77 String abolition; 78 String abolition;
78 String tableinfo; 79 String tableinfo;
79 String pnum; 80 String pnum;
@@ -9,6 +9,7 @@ part of 'notebook_detail.dart'; @@ -9,6 +9,7 @@ part of 'notebook_detail.dart';
9 NotebookDetail _$NotebookDetailFromJson(Map<String, dynamic> json) { 9 NotebookDetail _$NotebookDetailFromJson(Map<String, dynamic> json) {
10 return NotebookDetail() 10 return NotebookDetail()
11 ..id = json['id'] as String 11 ..id = json['id'] as String
  12 + ..uid = json['uid'] as String
12 ..tableinfo = json['tableinfo'] as String 13 ..tableinfo = json['tableinfo'] as String
13 ..abolition = json['abolition'] as String 14 ..abolition = json['abolition'] as String
14 ..pnum = json['pnum'] as String 15 ..pnum = json['pnum'] as String
@@ -106,5 +106,7 @@ class HttpUrl { @@ -106,5 +106,7 @@ class HttpUrl {
106 static const String get_area_by_sellerid = 106 static const String get_area_by_sellerid =
107 "?service=App.Tables.GetRegionBySellerid"; // 获取区域列表 107 "?service=App.Tables.GetRegionBySellerid"; // 获取区域列表
108 static const String add_table = "?service=App.Tables.AddTable"; // 添加商家桌位信息 108 static const String add_table = "?service=App.Tables.AddTable"; // 添加商家桌位信息
  109 + static const String add_forward =
  110 + "?service=App.Activity.AddForward"; // 客户经理转发记录
109 111
110 } 112 }
@@ -102,7 +102,8 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -102,7 +102,8 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
102 //已拒绝 102 //已拒绝
103 //已处理 103 //已处理
104 Future.delayed(Duration(milliseconds: 200), () { 104 Future.delayed(Duration(milliseconds: 200), () {
105 - NavigatorUtil.goNotebookDetailPage(context, detailEntity.id, 105 + NavigatorUtil.goNotebookDetailPage(
  106 + context, detailEntity.id, detailEntity.uid,
106 fromNotify: widget.fromNotify, replace: true); 107 fromNotify: widget.fromNotify, replace: true);
107 }); 108 });
108 setMessageStatus(); 109 setMessageStatus();
@@ -359,7 +360,8 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -359,7 +360,8 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
359 "status": status, //5安排包间 6 拒绝订单 360 "status": status, //5安排包间 6 拒绝订单
360 "tid": tid, 361 "tid": tid,
361 "mid": widget.mid, 362 "mid": widget.mid,
362 - "cause": json.encode(causeMap) 363 + "cause": json.encode(causeMap),
  364 + "uid": userModel.user.openid,
363 }; 365 };
364 if (status == "6") { 366 if (status == "6") {
365 isPause = (ac == "1" ? true : false); 367 isPause = (ac == "1" ? true : false);
@@ -36,9 +36,10 @@ import '../../app.dart'; @@ -36,9 +36,10 @@ import '../../app.dart';
36 class NotebookDetailPage extends StatefulWidget { 36 class NotebookDetailPage extends StatefulWidget {
37 final String rid; 37 final String rid;
38 final String mid; 38 final String mid;
  39 + final String uid;
39 final bool fromNotify; 40 final bool fromNotify;
40 41
41 - NotebookDetailPage(this.rid, {this.fromNotify = false, this.mid}); 42 + NotebookDetailPage(this.rid, {this.fromNotify = false, this.mid, this.uid});
42 43
43 @override 44 @override
44 State<StatefulWidget> createState() { 45 State<StatefulWidget> createState() {
@@ -191,7 +192,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -191,7 +192,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
191 "status": status, //5安排包间 6 拒绝订单 192 "status": status, //5安排包间 6 拒绝订单
192 "tid": tid, 193 "tid": tid,
193 // "mid": widget.mid, 194 // "mid": widget.mid,
194 - "cause": json.encode(causeMap) 195 + "cause": json.encode(causeMap),
  196 + "uid": userModel.user.openid,
195 }; 197 };
196 bool success = 198 bool success =
197 await detailModel.setReserveStatus(context, params, ifPush: false); 199 await detailModel.setReserveStatus(context, params, ifPush: false);
@@ -452,7 +454,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -452,7 +454,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
452 detailModel = Provider.of<NotebookDetailModel>(context, listen: true); 454 detailModel = Provider.of<NotebookDetailModel>(context, listen: true);
453 _onlineCheckEditProvider = 455 _onlineCheckEditProvider =
454 Provider.of<OnlineCheckEditProvider>(context, listen: true); 456 Provider.of<OnlineCheckEditProvider>(context, listen: true);
455 - 457 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  458 + print(userModel.user.role_name);
  459 + print(userModel.user.openid);
  460 + print(widget.rid);
  461 + print(widget.uid);
456 return Scaffold( 462 return Scaffold(
457 body: SafeArea( 463 body: SafeArea(
458 child: WillPopScope( 464 child: WillPopScope(
@@ -615,8 +621,15 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -615,8 +621,15 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
615 DialogUtil.goPhone(formatPhone); 621 DialogUtil.goPhone(formatPhone);
616 } 622 }
617 }, 623 },
618 - child:  
619 - RowMultiText("客户电话", formatPhone), 624 + child: RowMultiText(
  625 + "客户电话",
  626 + userModel.user.role_name !=
  627 + '管理员' &&
  628 + widget.uid != "null" &&
  629 + widget.uid !=
  630 + userModel.user.openid
  631 + ? Utils.starPhone(formatPhone)
  632 + : formatPhone),
620 ), 633 ),
621 Offstage( 634 Offstage(
622 offstage: detailEntity.cusdem == '' || 635 offstage: detailEntity.cusdem == '' ||
@@ -1045,7 +1058,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1045,7 +1058,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1045 horizontal: ScreenUtil().setHeight(40)), 1058 horizontal: ScreenUtil().setHeight(40)),
1046 decoration: BoxDecoration( 1059 decoration: BoxDecoration(
1047 border: Border.all( 1060 border: Border.all(
1048 - color: MyColours.color_199095, 1061 + color: userModel.user.role_name != '管理员' &&
  1062 + widget.uid != "null" &&
  1063 + widget.uid != userModel.user.openid
  1064 + ? MyColours.color_999999
  1065 + : MyColours.color_199095,
1049 width: ScreenUtil().setWidth(2)), 1066 width: ScreenUtil().setWidth(2)),
1050 borderRadius: BorderRadius.circular( 1067 borderRadius: BorderRadius.circular(
1051 ScreenUtil().setWidth(10)), 1068 ScreenUtil().setWidth(10)),
@@ -1058,18 +1075,46 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1058,18 +1075,46 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1058 Expanded( 1075 Expanded(
1059 child: _cancelAndChangeBtn(() { 1076 child: _cancelAndChangeBtn(() {
1060 print('点击变更预订'); 1077 print('点击变更预订');
1061 - NavigatorUtil.goNoteBookChangePage(  
1062 - context, detailEntity, widget.rid);  
1063 - }, '变更预订')), 1078 + if (userModel.user.role_name != '管理员' &&
  1079 + widget.uid != "null" &&
  1080 + widget.uid != userModel.user.openid) {
  1081 + } else {
  1082 + NavigatorUtil.goNoteBookChangePage(
  1083 + context, detailEntity, widget.rid);
  1084 + }
  1085 + }, '变更预订',
  1086 + fontColor: userModel.user.role_name !=
  1087 + '管理员' &&
  1088 + widget.uid != "null" &&
  1089 + widget.uid !=
  1090 + userModel.user.openid
  1091 + ? MyColours.color_999999
  1092 + : MyColours.color_199095)),
1064 MyDivider( 1093 MyDivider(
1065 ScreenUtil().setWidth(2), 1094 ScreenUtil().setWidth(2),
1066 ScreenUtil().setWidth(50), 1095 ScreenUtil().setWidth(50),
1067 - color: MyColours.color_199095, 1096 + color: userModel.user.role_name != '管理员' &&
  1097 + widget.uid != "null" &&
  1098 + widget.uid != userModel.user.openid
  1099 + ? MyColours.color_999999
  1100 + : MyColours.color_199095,
1068 ), 1101 ),
1069 Expanded( 1102 Expanded(
1070 child: _cancelAndChangeBtn(() { 1103 child: _cancelAndChangeBtn(() {
1071 - _showCancelWidget(context);  
1072 - }, '取消预订')), 1104 + if (userModel.user.role_name != '管理员' &&
  1105 + widget.uid != "null" &&
  1106 + widget.uid != userModel.user.openid) {
  1107 + } else {
  1108 + _showCancelWidget(context);
  1109 + }
  1110 + }, '取消预订',
  1111 + fontColor: userModel.user.role_name !=
  1112 + '管理员' &&
  1113 + widget.uid != "null" &&
  1114 + widget.uid !=
  1115 + userModel.user.openid
  1116 + ? MyColours.color_999999
  1117 + : MyColours.color_199095)),
1073 ], 1118 ],
1074 )), 1119 )),
1075 ), 1120 ),
@@ -125,7 +125,8 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -125,7 +125,8 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
125 fromNotify: true); 125 fromNotify: true);
126 break; 126 break;
127 case "11": 127 case "11":
128 - NavigatorUtil.goNotebookDetailPage(context, notifyParam['rid'], 128 + NavigatorUtil.goNotebookDetailPage(
  129 + context, notifyParam['rid'], notifyParam["uid"],
129 mid: notifyParam['mid'], fromNotify: true); 130 mid: notifyParam['mid'], fromNotify: true);
130 break; 131 break;
131 case "12": 132 case "12":
@@ -251,7 +252,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -251,7 +252,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
251 break; 252 break;
252 case "11": 253 case "11":
253 NavigatorUtil.goNotebookDetailPage( 254 NavigatorUtil.goNotebookDetailPage(
254 - context, custom['rid'].toString(), 255 + context, custom['rid'].toString(), custom["uid"].toString(),
255 mid: custom['mid'].toString(), fromNotify: true); 256 mid: custom['mid'].toString(), fromNotify: true);
256 break; 257 break;
257 case "12": 258 case "12":
@@ -323,6 +323,21 @@ class InvicationPageState extends State<InvicationPage> { @@ -323,6 +323,21 @@ class InvicationPageState extends State<InvicationPage> {
323 await couponProvider.sendSms(context, params); 323 await couponProvider.sendSms(context, params);
324 } 324 }
325 325
  326 + // 客户经理转发记录
  327 + _addForward() async {
  328 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  329 + Map<String, String> params = {
  330 + "rid": widget.rid,
  331 + "sid": userModel.user.sellerid,
  332 + "uid": userModel.user.openid
  333 + };
  334 +
  335 + bool success = await couponProvider.addForwardAsReserve(context, params);
  336 + if (success) {
  337 + print('yes');
  338 + }
  339 + }
  340 +
326 @override 341 @override
327 Widget build(BuildContext context) { 342 Widget build(BuildContext context) {
328 // Utils.changeStatusColor(color: Colors.transparent); 343 // Utils.changeStatusColor(color: Colors.transparent);
@@ -870,6 +885,9 @@ class InvicationPageState extends State<InvicationPage> { @@ -870,6 +885,9 @@ class InvicationPageState extends State<InvicationPage> {
870 .user 885 .user
871 .openid); 886 .openid);
872 print(isSuccess); 887 print(isSuccess);
  888 + if (isSuccess) {
  889 + _addForward();
  890 + }
873 // couponProvider.couponsShow = []; 891 // couponProvider.couponsShow = [];
874 // couponProvider.couponsShow 892 // couponProvider.couponsShow
875 // .addAll(couponProvider.coupons); 893 // .addAll(couponProvider.coupons);
@@ -884,7 +902,9 @@ class InvicationPageState extends State<InvicationPage> { @@ -884,7 +902,9 @@ class InvicationPageState extends State<InvicationPage> {
884 listen: false) 902 listen: false)
885 .user 903 .user
886 .openid); 904 .openid);
887 - print(isSuccess); 905 + if (isSuccess) {
  906 + _addForward();
  907 + }
888 } 908 }
889 }, 909 },
890 ), 910 ),
@@ -66,12 +66,12 @@ class MessageDialogItem extends StatelessWidget { @@ -66,12 +66,12 @@ class MessageDialogItem extends StatelessWidget {
66 if (isTreated) { 66 if (isTreated) {
67 if (message.message_type == "10") { 67 if (message.message_type == "10") {
68 NavigatorUtil.goNotebookDetailPage( 68 NavigatorUtil.goNotebookDetailPage(
69 - context, message.rid.toString()); 69 + context, message.rid.toString(),message.uid);
70 } else if (message.message_type == "1") { 70 } else if (message.message_type == "1") {
71 NavigatorUtil.goHasOrderFoodPage(context, rid: message.rid); 71 NavigatorUtil.goHasOrderFoodPage(context, rid: message.rid);
72 } else if (message.message_type == "11") { 72 } else if (message.message_type == "11") {
73 NavigatorUtil.goNotebookDetailPage( 73 NavigatorUtil.goNotebookDetailPage(
74 - context, message.rid.toString()); 74 + context, message.rid.toString(),message.uid);
75 } else if (message.message_type == "12") { 75 } else if (message.message_type == "12") {
76 //在线买单消息查看 76 //在线买单消息查看
77 NavigatorUtil.goOnlineCheckDetailPage(context, 77 NavigatorUtil.goOnlineCheckDetailPage(context,
@@ -185,7 +185,7 @@ class MessageDialogItem extends StatelessWidget { @@ -185,7 +185,7 @@ class MessageDialogItem extends StatelessWidget {
185 : false); 185 : false);
186 } else if (message.message_type == "11") { 186 } else if (message.message_type == "11") {
187 NavigatorUtil.goNotebookDetailPage( 187 NavigatorUtil.goNotebookDetailPage(
188 - context, message.rid.toString(), 188 + context, message.rid.toString(),message.uid,
189 replace: messageDialogModel.messages.isEmpty 189 replace: messageDialogModel.messages.isEmpty
190 ? true 190 ? true
191 : false); 191 : false);
@@ -56,12 +56,12 @@ class MessageItem extends StatelessWidget { @@ -56,12 +56,12 @@ class MessageItem extends StatelessWidget {
56 if (isTreated) { 56 if (isTreated) {
57 if (message.message_type == "10") { 57 if (message.message_type == "10") {
58 NavigatorUtil.goNotebookDetailPage( 58 NavigatorUtil.goNotebookDetailPage(
59 - context, message.rid.toString()); 59 + context, message.rid.toString(), message.uid);
60 } else if (message.message_type == "1") { 60 } else if (message.message_type == "1") {
61 NavigatorUtil.goHasOrderFoodPage(context, rid: message.rid); 61 NavigatorUtil.goHasOrderFoodPage(context, rid: message.rid);
62 } else if (message.message_type == "11") { 62 } else if (message.message_type == "11") {
63 NavigatorUtil.goNotebookDetailPage( 63 NavigatorUtil.goNotebookDetailPage(
64 - context, message.rid.toString()); 64 + context, message.rid.toString(), message.uid);
65 } else if (message.message_type == "12") { 65 } else if (message.message_type == "12") {
66 //在线买单消息查看 66 //在线买单消息查看
67 NavigatorUtil.goOnlineCheckDetailPage(context, 67 NavigatorUtil.goOnlineCheckDetailPage(context,
@@ -173,7 +173,7 @@ class MessageItem extends StatelessWidget { @@ -173,7 +173,7 @@ class MessageItem extends StatelessWidget {
173 context, message.rid.toString(), message.id); 173 context, message.rid.toString(), message.id);
174 } else if (message.message_type == "11") { 174 } else if (message.message_type == "11") {
175 NavigatorUtil.goNotebookDetailPage( 175 NavigatorUtil.goNotebookDetailPage(
176 - context, message.rid.toString()); 176 + context, message.rid.toString(), message.uid);
177 bus.emit("remove_untreated_message", message.id); 177 bus.emit("remove_untreated_message", message.id);
178 178
179 Map<String, String> params = { 179 Map<String, String> params = {
@@ -57,7 +57,8 @@ class NotebookItemState extends State<NoteBookItem> { @@ -57,7 +57,8 @@ class NotebookItemState extends State<NoteBookItem> {
57 GestureDetector( 57 GestureDetector(
58 behavior: HitTestBehavior.translucent, 58 behavior: HitTestBehavior.translucent,
59 onTap: () { 59 onTap: () {
60 - NavigatorUtil.goNotebookDetailPage(context, notebook.id); 60 + NavigatorUtil.goNotebookDetailPage(
  61 + context, notebook.id, notebook.uid);
61 }, 62 },
62 child: Row( 63 child: Row(
63 children: <Widget>[ 64 children: <Widget>[
@@ -239,8 +239,10 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -239,8 +239,10 @@ class TableManagerPageState extends State<TableManagerPage> {
239 if (value != null) { 239 if (value != null) {
240 switch (value) { 240 switch (value) {
241 case 1: //查看详情 241 case 1: //查看详情
242 - NavigatorUtil.goNotebookDetailPage(context,  
243 - tableManagerModel.tableMap[table.id].id); 242 + NavigatorUtil.goNotebookDetailPage(
  243 + context,
  244 + tableManagerModel.tableMap[table.id].id,
  245 + tableManagerModel.tableMap[table.id].uid);
244 break; 246 break;
245 case 2: //订座 247 case 2: //订座
246 NavigatorUtil.goNoteBookChangePage( 248 NavigatorUtil.goNoteBookChangePage(
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
2 import 'package:one_key/constant/constant.dart'; 2 import 'package:one_key/constant/constant.dart';
3 import 'package:one_key/constant/error.dart'; 3 import 'package:one_key/constant/error.dart';
4 import 'package:one_key/constant/state.dart'; 4 import 'package:one_key/constant/state.dart';
  5 +import 'package:one_key/models/add_forward_model.dart';
5 import 'package:one_key/models/coupon_model.dart'; 6 import 'package:one_key/models/coupon_model.dart';
6 import 'package:one_key/models/wx_send_sms_model.dart'; 7 import 'package:one_key/models/wx_send_sms_model.dart';
7 import 'package:one_key/net/dio_util.dart'; 8 import 'package:one_key/net/dio_util.dart';
@@ -476,4 +477,34 @@ class CouponProvider with ChangeNotifier { @@ -476,4 +477,34 @@ class CouponProvider with ChangeNotifier {
476 Utils.showToast(baseResp.msg ?? ""); 477 Utils.showToast(baseResp.msg ?? "");
477 } 478 }
478 } 479 }
  480 +
  481 + /// 客户经理转发记录
  482 + Future<dynamic> addForwardAsReserve(
  483 + BuildContext context, Map<String, String> params,
  484 + {isShowLoading = true}) async {
  485 + BaseResp<dynamic> baseResp = await DioUtil()
  486 + .request<dynamic>(context, Method.get, HttpUrl.add_forward,
  487 + data: params, showLoading: isShowLoading, needHeader: false)
  488 + .catchError((error) {
  489 + print(error.toString());
  490 + if (error is MyError) {}
  491 + return false;
  492 + });
  493 + AddForwardSunModel sunModel;
  494 + if (baseResp.code == Constant.status_success) {
  495 + if (baseResp.data != null) {
  496 + sunModel = AddForwardModel.fromJson(baseResp.responseData).data;
  497 +
  498 + return true;
  499 + } else {
  500 + // Utils.showToast(baseResp.msg ?? "修改失败");
  501 + return false;
  502 + }
  503 + } else {
  504 + if (baseResp != null) {
  505 + // Utils.showToast(baseResp.msg ?? "");
  506 + }
  507 + return false;
  508 + }
  509 + }
479 } 510 }
@@ -608,7 +608,8 @@ class EnterModel with ChangeNotifier { @@ -608,7 +608,8 @@ class EnterModel with ChangeNotifier {
608 "rdate": rdate, //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time) 608 "rdate": rdate, //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time)
609 "ddate": '$ddate'.substring(0, 10), //到店时间 609 "ddate": '$ddate'.substring(0, 10), //到店时间
610 "ddate_solt": ddateSolt, 610 "ddate_solt": ddateSolt,
611 - "channel":'5' 611 + "channel":'5',
  612 + "uid":userModel.user.openid
612 }; 613 };
613 print(params.toString()); 614 print(params.toString());
614 BaseResp<Map<String, dynamic>> baseResp = await DioUtil() 615 BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
@@ -649,7 +649,8 @@ class HomeEnterModel with ChangeNotifier { @@ -649,7 +649,8 @@ class HomeEnterModel with ChangeNotifier {
649 "rdate": rdate, //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time) 649 "rdate": rdate, //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time)
650 "ddate": '${ddate}'.substring(0, 10), //到店时间 650 "ddate": '${ddate}'.substring(0, 10), //到店时间
651 'is_set_ddate': '1', 651 'is_set_ddate': '1',
652 - "channel": '5' 652 + "channel": '5',
  653 + "uid": userModel.user.openid
653 }; 654 };
654 655
655 print(params); 656 print(params);
@@ -658,7 +658,8 @@ class NotebookDetailChangeModel with ChangeNotifier { @@ -658,7 +658,8 @@ class NotebookDetailChangeModel with ChangeNotifier {
658 "rdate": rdate, //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time) 658 "rdate": rdate, //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time)
659 "ddate": '${ddate}'.substring(0, 10), //到店时间 659 "ddate": '${ddate}'.substring(0, 10), //到店时间
660 'is_set_ddate': "1", 660 'is_set_ddate': "1",
661 - "channel": '5' 661 + "channel": '5',
  662 + "uid": userModel.user.openid
662 }; 663 };
663 if (detailEntity.id.isNotEmpty && detailEntity.id != "-1") { 664 if (detailEntity.id.isNotEmpty && detailEntity.id != "-1") {
664 params['rid'] = detailEntity.id; 665 params['rid'] = detailEntity.id;
@@ -105,10 +105,12 @@ class NotebookDetailModel extends ChangeNotifier { @@ -105,10 +105,12 @@ class NotebookDetailModel extends ChangeNotifier {
105 .catchError((error) { 105 .catchError((error) {
106 print(error.toString()); 106 print(error.toString());
107 }); 107 });
108 - if (baseResp == null)return false;  
109 - if (baseResp.code == Constant.status_success&&baseResp.data!=null) { 108 + if (baseResp == null) return false;
  109 + if (baseResp.code == Constant.status_success && baseResp.data != null) {
110 if (ifPush) { 110 if (ifPush) {
111 - NavigatorUtil.goNotebookDetailPage(context, params["rid"], 111 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
  112 + NavigatorUtil.goNotebookDetailPage(
  113 + context, params["rid"], userModel.user.openid,
112 replace: true); 114 replace: true);
113 } 115 }
114 return true; 116 return true;
@@ -41,10 +41,10 @@ class NavigatorUtil { @@ -41,10 +41,10 @@ class NavigatorUtil {
41 } 41 }
42 42
43 /// 订单详情 43 /// 订单详情
44 - static void goNotebookDetailPage(BuildContext context, String rid, 44 + static void goNotebookDetailPage(BuildContext context, String rid,String uid,
45 {String mid = "", bool fromNotify = false, replace = false}) { 45 {String mid = "", bool fromNotify = false, replace = false}) {
46 _navigateTo(context, 46 _navigateTo(context,
47 - "${Routes.reserve_detail}?rid=$rid&mid=$mid&fromNotify=$fromNotify", 47 + "${Routes.reserve_detail}?rid=$rid&mid=$mid&uid=$uid&fromNotify=$fromNotify",
48 replace: replace); 48 replace: replace);
49 } 49 }
50 50
@@ -80,12 +80,14 @@ var reserveDetailHandler = new Handler( @@ -80,12 +80,14 @@ var reserveDetailHandler = new Handler(
80 handlerFunc: (BuildContext context, Map<String, List<Object>> params) { 80 handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
81 String rid = params['rid'].first; 81 String rid = params['rid'].first;
82 String mid = params['mid'].first; 82 String mid = params['mid'].first;
  83 + String uid = params['uid'].first;
83 bool fromNotify = FluroConvertUtils.string2bool(params["fromNotify"].first); 84 bool fromNotify = FluroConvertUtils.string2bool(params["fromNotify"].first);
84 return ChangeNotifierProvider<NotebookDetailModel>( 85 return ChangeNotifierProvider<NotebookDetailModel>(
85 create: (_) => NotebookDetailModel(), 86 create: (_) => NotebookDetailModel(),
86 child: NotebookDetailPage( 87 child: NotebookDetailPage(
87 rid, 88 rid,
88 mid: mid, 89 mid: mid,
  90 + uid: uid,
89 fromNotify: fromNotify, 91 fromNotify: fromNotify,
90 )); 92 ));
91 }); 93 });