Commit 1df87d001790b0be9100634f776df4ebb392290f

Authored by wdn127929
1 parent 77577167

note_name && 下单人返回

@@ -161,5 +161,10 @@ class Constant { @@ -161,5 +161,10 @@ class Constant {
161 '管理员', 161 '管理员',
162 '店长', 162 '店长',
163 ], 163 ],
  164 + '全店-月订单量': [
  165 + '管理员',
  166 + '店长',
  167 + ],
  168 + '个人-月订单量': ['客户经理', '收银员', '服务员', '前台'],
164 }; 169 };
165 } 170 }
@@ -57,6 +57,7 @@ class Notebook { @@ -57,6 +57,7 @@ class Notebook {
57 String reserveCount; //该客户预订总次数 57 String reserveCount; //该客户预订总次数
58 58
59 bool large = false; 59 bool large = false;
  60 + String place_order_name; //下单人
60 61
61 // String get tableinfoStr { 62 // String get tableinfoStr {
62 // return name + 63 // return name +
@@ -53,7 +53,8 @@ Notebook _$NotebookFromJson(Map<String, dynamic> json) { @@ -53,7 +53,8 @@ Notebook _$NotebookFromJson(Map<String, dynamic> json) {
53 ..reserveCount = json['reserveCount'] as String 53 ..reserveCount = json['reserveCount'] as String
54 ..orderInfo = json['order_info'] == null 54 ..orderInfo = json['order_info'] == null
55 ? null 55 ? null
56 - : OrderInfo.fromJson(json['order_info'] as Map<String, dynamic>); 56 + : OrderInfo.fromJson(json['order_info'] as Map<String, dynamic>)
  57 + ..place_order_name = json['place_order_name'] ?? '';
57 } 58 }
58 59
59 Map<String, dynamic> _$NotebookToJson(Notebook instance) => <String, dynamic>{ 60 Map<String, dynamic> _$NotebookToJson(Notebook instance) => <String, dynamic>{
@@ -100,7 +101,8 @@ Map<String, dynamic> _$NotebookToJson(Notebook instance) => <String, dynamic>{ @@ -100,7 +101,8 @@ Map<String, dynamic> _$NotebookToJson(Notebook instance) => <String, dynamic>{
100 'name': instance.name, 101 'name': instance.name,
101 'order_info': instance.orderInfo, 102 'order_info': instance.orderInfo,
102 'nick_name': instance.nick_name, 103 'nick_name': instance.nick_name,
103 - 'reserveCount':instance.reserveCount 104 + 'reserveCount': instance.reserveCount,
  105 + 'place_order_name': instance.place_order_name
104 }; 106 };
105 107
106 OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) { 108 OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) {
@@ -102,6 +102,7 @@ class NotebookDetail { @@ -102,6 +102,7 @@ class NotebookDetail {
102 OrderInfo orderInfo; 102 OrderInfo orderInfo;
103 String con_amount; 103 String con_amount;
104 String gid; 104 String gid;
  105 + String place_order_name; //下单人
105 106
106 String get statuImgAssets { 107 String get statuImgAssets {
107 switch (status) { 108 switch (status) {
@@ -297,7 +298,7 @@ class NotebookDetail { @@ -297,7 +298,7 @@ class NotebookDetail {
297 298
298 @override 299 @override
299 String toString() { 300 String toString() {
300 - return 'NotebookDetail{id: $id, uid: $uid ,con_amount:$con_amount,abolition: $abolition, tableinfo: $tableinfo,actual_pum:$actual_pum, pnum: $pnum, rname: $rname, sex: $sex, phone: $phone, cusdem: $cusdem, cusman: $cusman, ddate: $ddate, is_set_ddate: $is_set_ddate, ddate_solt: $ddate_solt, status: $status, action: $action, type: $type, note_name: $note_name, seller_user_phone:$seller_user_phone, nick_name: $nick_name,channel: $channel, cdate: $cdate, demands: $demands, tables: $tables, cancel: $cancel, gid: $gid}'; 301 + return 'NotebookDetail{id: $id, uid: $uid ,con_amount:$con_amount,abolition: $abolition, tableinfo: $tableinfo,actual_pum:$actual_pum, pnum: $pnum, rname: $rname, sex: $sex, phone: $phone, cusdem: $cusdem, cusman: $cusman, ddate: $ddate, is_set_ddate: $is_set_ddate, ddate_solt: $ddate_solt, status: $status, action: $action, type: $type, note_name: $note_name, seller_user_phone:$seller_user_phone, nick_name: $nick_name,channel: $channel, cdate: $cdate, demands: $demands, tables: $tables, cancel: $cancel, gid: $gid,place_order_name:$place_order_name}';
301 } 302 }
302 } 303 }
303 304
@@ -48,7 +48,8 @@ NotebookDetail _$NotebookDetailFromJson(Map<String, dynamic> json) { @@ -48,7 +48,8 @@ NotebookDetail _$NotebookDetailFromJson(Map<String, dynamic> json) {
48 ..orderInfo = json['order_info'] == null 48 ..orderInfo = json['order_info'] == null
49 ? null 49 ? null
50 : OrderInfo.fromJson(json['order_info'] as Map<String, dynamic>) 50 : OrderInfo.fromJson(json['order_info'] as Map<String, dynamic>)
51 - ..gid = json['gid'] as String; 51 + ..gid = json['gid'] as String
  52 + ..place_order_name = json['place_order_name'] as String;
52 } 53 }
53 54
54 Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) => 55 Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) =>
@@ -81,7 +82,8 @@ Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) => @@ -81,7 +82,8 @@ Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) =>
81 'cancel': instance.cancel, 82 'cancel': instance.cancel,
82 'order': instance.order, 83 'order': instance.order,
83 'order_info': instance.orderInfo, 84 'order_info': instance.orderInfo,
84 - 'gid': instance.gid 85 + 'gid': instance.gid,
  86 + 'place_order_name': instance.place_order_name
85 }; 87 };
86 OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) { 88 OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) {
87 return OrderInfo( 89 return OrderInfo(
@@ -29,6 +29,7 @@ class Table { @@ -29,6 +29,7 @@ class Table {
29 String pnum; //预计人数 29 String pnum; //预计人数
30 String nickName; //操作人 30 String nickName; //操作人
31 String noteName; //操作人 31 String noteName; //操作人
  32 + String place_order_name; //预订人
32 String isLock; //是否被合并上锁 33 String isLock; //是否被合并上锁
33 String isMerge; //是否打开桌位合并开关 34 String isMerge; //是否打开桌位合并开关
34 String tids; //被合并桌位tids 35 String tids; //被合并桌位tids
@@ -363,6 +363,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -363,6 +363,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
363 "mid": widget.mid, 363 "mid": widget.mid,
364 "cause": json.encode(causeMap), 364 "cause": json.encode(causeMap),
365 "uid": userModel.user.openid, 365 "uid": userModel.user.openid,
  366 + 'note_name':userModel.user.account,
366 }; 367 };
367 if (status == "6") { 368 if (status == "6") {
368 isPause = (ac == "1" ? true : false); 369 isPause = (ac == "1" ? true : false);
@@ -1596,6 +1596,15 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1596,6 +1596,15 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1596 focusNode: priceF, 1596 focusNode: priceF,
1597 ), 1597 ),
1598 Offstage( 1598 Offstage(
  1599 + offstage: detailEntity.place_order_name ==
  1600 + '' ||
  1601 + detailEntity.place_order_name == null,
  1602 + child: RowMultiText("下单人",
  1603 + '${detailEntity.place_order_name ?? ''}',
  1604 + textColor:
  1605 + MyColours.color_333333),
  1606 + ),
  1607 + Offstage(
1599 offstage: 1608 offstage:
1600 detailEntity.nick_name == 1609 detailEntity.nick_name ==
1601 '' || 1610 '' ||
@@ -482,14 +482,26 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { @@ -482,14 +482,26 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
482 children: [ 482 children: [
483 InkWell( 483 InkWell(
484 onTap: () { 484 onTap: () {
485 - NavigatorUtil.goMonthOrderPage( 485 + if (Utils.getAuthority(
  486 + context, '全店-月订单量')) {
  487 + NavigatorUtil.goMonthOrderPage(
486 context, 488 context,
487 DateTime.now().year.toString(), 489 DateTime.now().year.toString(),
488 DateTime.now().month.toString(), 490 DateTime.now().month.toString(),
489 - uid: Provider.of<UserModel>(context,  
490 - listen: false)  
491 - .user  
492 - .openid); 491 + );
  492 + } else {
  493 + if (Utils.getAuthority(
  494 + context, '个人-月订单量')) {
  495 + NavigatorUtil.goMonthOrderPage(
  496 + context,
  497 + DateTime.now().year.toString(),
  498 + DateTime.now().month.toString(),
  499 + uid: Provider.of<UserModel>(context,
  500 + listen: false)
  501 + .user
  502 + .openid);
  503 + }
  504 + }
493 }, 505 },
494 child: Container( 506 child: Container(
495 padding: EdgeInsets.symmetric( 507 padding: EdgeInsets.symmetric(
@@ -705,13 +705,13 @@ class NoteBookItemFState extends State<NoteBookItemF> @@ -705,13 +705,13 @@ class NoteBookItemFState extends State<NoteBookItemF>
705 fontWeight: FontWeight.bold, 705 fontWeight: FontWeight.bold,
706 fontSize: ScreenUtil().setSp(28)), 706 fontSize: ScreenUtil().setSp(28)),
707 ), 707 ),
708 - notebook.nick_name == null 708 + notebook.place_order_name == null
709 ? SizedBox() 709 ? SizedBox()
710 : VEmptyView(6), 710 : VEmptyView(6),
711 - notebook.nick_name == null 711 + notebook.place_order_name == null
712 ? SizedBox() 712 ? SizedBox()
713 : Text( 713 : Text(
714 - notebook.nick_name + '订', 714 + notebook.place_order_name + '订',
715 maxLines: 1, 715 maxLines: 1,
716 overflow: TextOverflow.ellipsis, 716 overflow: TextOverflow.ellipsis,
717 style: TextStyle( 717 style: TextStyle(
@@ -616,7 +616,7 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> @@ -616,7 +616,7 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
616 ], 616 ],
617 ), 617 ),
618 VEmptyView(8), 618 VEmptyView(8),
619 - notebook.nick_name == null && 619 + notebook.place_order_name == null &&
620 notebook.tid.split(",").length < 2 && 620 notebook.tid.split(",").length < 2 &&
621 (notebook.cusdem == null || 621 (notebook.cusdem == null ||
622 notebook.cusdem == '') && 622 notebook.cusdem == '') &&
@@ -624,14 +624,14 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple> @@ -624,14 +624,14 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
624 ? SizedBox() 624 ? SizedBox()
625 : Row( 625 : Row(
626 children: [ 626 children: [
627 - notebook.nick_name == null 627 + notebook.place_order_name == null
628 ? SizedBox() 628 ? SizedBox()
629 : Padding( 629 : Padding(
630 padding: EdgeInsets.only( 630 padding: EdgeInsets.only(
631 right: 631 right:
632 ScreenUtil().setWidth(6)), 632 ScreenUtil().setWidth(6)),
633 child: Text( 633 child: Text(
634 - notebook.nick_name + '订', 634 + notebook.place_order_name + '订',
635 maxLines: 1, 635 maxLines: 1,
636 overflow: TextOverflow.ellipsis, 636 overflow: TextOverflow.ellipsis,
637 style: TextStyle( 637 style: TextStyle(
@@ -919,7 +919,8 @@ class NotebookDetailChangeModel with ChangeNotifier { @@ -919,7 +919,8 @@ class NotebookDetailChangeModel with ChangeNotifier {
919 "type": "0", 919 "type": "0",
920 "rdate": rdate, //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time) 920 "rdate": rdate, //预定用餐时间范围:时间戳 开始时间戳(time)-结束时间戳(time)
921 "ddate": '${ddate}'.substring(0, 10), //到店时间 921 "ddate": '${ddate}'.substring(0, 10), //到店时间
922 - "ddate_solt": ddateSolt 922 + "ddate_solt": ddateSolt,
  923 + 'note_name': userModel.user.account
923 }; 924 };
924 925
925 if (detailEntity.id.isNotEmpty && detailEntity.id != "-1") { 926 if (detailEntity.id.isNotEmpty && detailEntity.id != "-1") {
@@ -81,7 +81,7 @@ class NotebookDetailModel extends ChangeNotifier { @@ -81,7 +81,7 @@ class NotebookDetailModel extends ChangeNotifier {
81 BaseResp<Map<String, dynamic>> baseResp = await DioUtil() 81 BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
82 .request<Map<String, dynamic>>( 82 .request<Map<String, dynamic>>(
83 context, Method.get, HttpUrl.reserve_detail, 83 context, Method.get, HttpUrl.reserve_detail,
84 - data: params, showLoading:isShowLoading ? false: showCircle) 84 + data: params, showLoading: isShowLoading ? false : showCircle)
85 .catchError((error) { 85 .catchError((error) {
86 print(error.toString()); 86 print(error.toString());
87 if (error is MyError) { 87 if (error is MyError) {
@@ -204,6 +204,7 @@ class NotebookDetailModel extends ChangeNotifier { @@ -204,6 +204,7 @@ class NotebookDetailModel extends ChangeNotifier {
204 bool needToast = true}) async { 204 bool needToast = true}) async {
205 Map<String, dynamic> params = { 205 Map<String, dynamic> params = {
206 "rid": rid, 206 "rid": rid,
  207 + 'note_name': Provider.of<UserModel>(context, listen: false).user.account
207 }; 208 };
208 if (actualPum != null) { 209 if (actualPum != null) {
209 params['actual_pum'] = actualPum; 210 params['actual_pum'] = actualPum;
@@ -999,7 +999,7 @@ class TableManagerModel with ChangeNotifier { @@ -999,7 +999,7 @@ class TableManagerModel with ChangeNotifier {
999 table.nickName = notebook.nick_name; 999 table.nickName = notebook.nick_name;
1000 table.label = notebook.className; 1000 table.label = notebook.className;
1001 table.reserveCount = notebook.reserveCount; 1001 table.reserveCount = notebook.reserveCount;
1002 - 1002 + table.place_order_name = notebook.place_order_name;
1003 //剔除已经预订的桌子,剩下空桌子(仅看空座) 1003 //剔除已经预订的桌子,剩下空桌子(仅看空座)
1004 tempList.remove(table); 1004 tempList.remove(table);
1005 //全部 1005 //全部
@@ -366,17 +366,16 @@ class FTableItemState extends State<FTableItem> { @@ -366,17 +366,16 @@ class FTableItemState extends State<FTableItem> {
366 widget.need && 366 widget.need &&
367 signStr == '已预订' && 367 signStr == '已预订' &&
368 !isSelf && 368 !isSelf &&
369 - table.nickName != null &&  
370 - table.nickName != '' 369 + table.place_order_name != null &&
  370 + table.place_order_name != ''
371 ? Padding( 371 ? Padding(
372 padding: EdgeInsets.only( 372 padding: EdgeInsets.only(
373 top: ScreenUtil().setWidth(6), 373 top: ScreenUtil().setWidth(6),
374 bottom: ScreenUtil().setWidth(8), 374 bottom: ScreenUtil().setWidth(8),
375 ), 375 ),
376 child: Text( 376 child: Text(
377 - table.nickName != null &&  
378 - table.nickName != ''  
379 - ? '${table.nickName}订' 377 + table.place_order_name != null && table.place_order_name != ''
  378 + ? '${table.place_order_name}订'
380 : '', 379 : '',
381 style: TextStyle( 380 style: TextStyle(
382 color: MyColours.color_353535, 381 color: MyColours.color_353535,