Commit c2372ef5aa0b8119479c7ee1690bf25bc397e803

Authored by wdn127929
1 parent a569f4ea

订座详情+请客人反馈

@@ -104,6 +104,8 @@ class NotebookDetail { @@ -104,6 +104,8 @@ class NotebookDetail {
104 String gid; 104 String gid;
105 String place_order_name; //下单人 105 String place_order_name; //下单人
106 106
  107 + dynamic is_user_comments; //是否评价过
  108 +
107 109
108 110
109 String get statuImgAssets { 111 String get statuImgAssets {
@@ -300,7 +302,7 @@ class NotebookDetail { @@ -300,7 +302,7 @@ class NotebookDetail {
300 302
301 @override 303 @override
302 String toString() { 304 String toString() {
303 - 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}'; 305 + 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,is_user_comments:$is_user_comments}';
304 } 306 }
305 } 307 }
306 308
@@ -49,7 +49,8 @@ NotebookDetail _$NotebookDetailFromJson(Map<String, dynamic> json) { @@ -49,7 +49,8 @@ NotebookDetail _$NotebookDetailFromJson(Map<String, dynamic> json) {
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 + ..place_order_name = json['place_order_name'] as String
  53 + ..is_user_comments = json['is_user_comments'] as dynamic;
53 } 54 }
54 55
55 Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) => 56 Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) =>
@@ -83,7 +84,8 @@ Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) => @@ -83,7 +84,8 @@ Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) =>
83 'order': instance.order, 84 'order': instance.order,
84 'order_info': instance.orderInfo, 85 'order_info': instance.orderInfo,
85 'gid': instance.gid, 86 'gid': instance.gid,
86 - 'place_order_name': instance.place_order_name 87 + 'place_order_name': instance.place_order_name,
  88 + 'is_user_comments': instance.is_user_comments,
87 }; 89 };
88 OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) { 90 OrderInfo _$OrderInfoFromJson(Map<String, dynamic> json) {
89 return OrderInfo( 91 return OrderInfo(
@@ -1458,36 +1458,34 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1458,36 +1458,34 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1458 "预订日期", detailEntity.ddateF, 1458 "预订日期", detailEntity.ddateF,
1459 textColor: 1459 textColor:
1460 MyColours.color_333333), 1460 MyColours.color_333333),
1461 - Stack(  
1462 - alignment: Alignment.center,  
1463 - children: <Widget>[  
1464 - RowMultiText("时段",  
1465 - detailEntity.ddateSolt,  
1466 - textColor:  
1467 - MyColours.color_333333),  
1468 - Image.asset(  
1469 - detailEntity.statuImgAssets,  
1470 - width: ScreenUtil()  
1471 - .setWidth(114),  
1472 - height:  
1473 - ScreenUtil().setWidth(56),  
1474 - )  
1475 - ],  
1476 - ),  
1477 1461
1478 - TitleAndBtn(  
1479 - title: "时间",  
1480 - content: ddateHm,  
1481 - list: personNumList,  
1482 - detailModel: model,  
1483 - uid: widget.uid,  
1484 - callback: () {  
1485 - //时间弹窗  
1486 - FocusScope.of(context)  
1487 - .requestFocus(  
1488 - FocusNode()); //隐藏键盘  
1489 - _showDateChooseWidget(context);  
1490 - }, 1462 + Row(
  1463 + children: [
  1464 + Expanded(
  1465 + flex: 1,
  1466 + child: RowMultiText("时段",
  1467 + detailEntity.ddateSolt,
  1468 + textColor: MyColours
  1469 + .color_333333)),
  1470 + HEmptyView(60),
  1471 + Expanded(
  1472 + flex: 1,
  1473 + child: TitleAndBtn(
  1474 + title: "时间",
  1475 + content: ddateHm,
  1476 + list: personNumList,
  1477 + detailModel: model,
  1478 + uid: widget.uid,
  1479 + callback: () {
  1480 + //时间弹窗
  1481 + FocusScope.of(context)
  1482 + .requestFocus(
  1483 + FocusNode()); //隐藏键盘
  1484 + _showDateChooseWidget(
  1485 + context);
  1486 + },
  1487 + )),
  1488 + ],
1491 ), 1489 ),
1492 1490
1493 // Offstage( 1491 // Offstage(
@@ -1547,33 +1545,52 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1547,33 +1545,52 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1547 // ]) 1545 // ])
1548 // .then((value) {}); 1546 // .then((value) {});
1549 // }), 1547 // }),
1550 - TitleAndTextfield(  
1551 - title: "人数",  
1552 - detailModel: detailModel,  
1553 - rid: widget.rid,  
1554 - isPrice: false,  
1555 - controller: pnumC,  
1556 - focusNode: pnumF,  
1557 - uid: widget.uid,  
1558 - callback: () async {  
1559 - bool sucess =  
1560 - await detailModel  
1561 - .upReserveInfo(  
1562 - context,  
1563 - widget.rid,  
1564 - actualPum:  
1565 - pnumC.text);  
1566 -  
1567 - if (sucess) {  
1568 - bus.emit(  
1569 - "refresh_book_list"); //刷新已预订列表  
1570 -  
1571 - EventBus().emit(  
1572 - "refresh_tablemanager"); //刷新桌位  
1573 - await _getReserveDetail(  
1574 - showCicle: false);  
1575 - }  
1576 - }), 1548 + Row(children: [
  1549 + Expanded(
  1550 + flex: 1,
  1551 + child: TitleAndTextfield(
  1552 + title: "人数",
  1553 + detailModel: detailModel,
  1554 + rid: widget.rid,
  1555 + isPrice: false,
  1556 + controller: pnumC,
  1557 + focusNode: pnumF,
  1558 + uid: widget.uid,
  1559 + callback: () async {
  1560 + bool sucess =
  1561 + await detailModel
  1562 + .upReserveInfo(
  1563 + context,
  1564 + widget.rid,
  1565 + actualPum:
  1566 + pnumC
  1567 + .text);
  1568 +
  1569 + if (sucess) {
  1570 + bus.emit(
  1571 + "refresh_book_list"); //刷新已预订列表
  1572 +
  1573 + EventBus().emit(
  1574 + "refresh_tablemanager"); //刷新桌位
  1575 + await _getReserveDetail(
  1576 + showCicle: false);
  1577 + }
  1578 + })),
  1579 + HEmptyView(60),
  1580 + Expanded(
  1581 + flex: 1,
  1582 + child: TitleAndTextfield(
  1583 + title: "消费金额",
  1584 + detailModel: detailModel,
  1585 + rid: widget.rid,
  1586 + isPrice: true,
  1587 + uid: widget.uid,
  1588 + controller: detailModel
  1589 + .numController,
  1590 + focusNode: priceF,
  1591 + ))
  1592 + ]),
  1593 +
1577 // ), 1594 // ),
1578 // Offstage( 1595 // Offstage(
1579 // offstage: 1596 // offstage:
@@ -1627,42 +1644,54 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1627,42 +1644,54 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1627 // ], 1644 // ],
1628 // ), 1645 // ),
1629 // ), 1646 // ),
1630 - TitleAndTextfield(  
1631 - title: "消费金额",  
1632 - detailModel: detailModel,  
1633 - rid: widget.rid,  
1634 - isPrice: true,  
1635 - uid: widget.uid,  
1636 - controller:  
1637 - detailModel.numController,  
1638 - focusNode: priceF,  
1639 - ),  
1640 - Offstage(  
1641 - offstage: detailEntity  
1642 - .place_order_name ==  
1643 - '' ||  
1644 - detailEntity  
1645 - .place_order_name ==  
1646 - null,  
1647 - child: RowMultiText("下单人",  
1648 - '${detailEntity.place_order_name ?? ''}',  
1649 - textColor:  
1650 - MyColours.color_333333),  
1651 - ),  
1652 - Offstage(  
1653 - offstage:  
1654 - detailEntity.nick_name ==  
1655 - '' ||  
1656 - detailEntity.nick_name ==  
1657 - null,  
1658 - child: RowMultiText(  
1659 - "记录人",  
1660 - '${detailEntity.nick_name ?? ''}' +  
1661 - ' ' +  
1662 - '${detailEntity.seller_user_phone ?? ''}',  
1663 - textColor:  
1664 - MyColours.color_333333),  
1665 - ), 1647 + Stack(
  1648 + alignment: Alignment.topCenter,
  1649 + children: [
  1650 + Column(
  1651 + children: [
  1652 + // Offstage(
  1653 + // offstage: detailEntity
  1654 + // .place_order_name ==
  1655 + // '' ||
  1656 + // detailEntity
  1657 + // .place_order_name ==
  1658 + // null,
  1659 + // child:
  1660 + // ),
  1661 + RowMultiText("下单人",
  1662 + '${detailEntity.place_order_name ?? ''}',
  1663 + textColor: MyColours
  1664 + .color_333333),
  1665 + // Offstage(
  1666 + // offstage: detailEntity
  1667 + // .nick_name ==
  1668 + // '' ||
  1669 + // detailEntity
  1670 + // .nick_name ==
  1671 + // null,
  1672 + // child:
  1673 + RowMultiText(
  1674 + "记录人",
  1675 + '${detailEntity.nick_name ?? ''}' +
  1676 + ' ' +
  1677 + '${detailEntity.seller_user_phone ?? ''}',
  1678 + textColor: MyColours
  1679 + .color_333333),
  1680 + // ),
  1681 + ],
  1682 + ),
  1683 + Positioned(
  1684 + top: w(10),
  1685 + child: Image.asset(
  1686 + detailEntity
  1687 + .statuImgAssets,
  1688 + width: ScreenUtil()
  1689 + .setWidth(114),
  1690 + height: ScreenUtil()
  1691 + .setWidth(56),
  1692 + ))
  1693 + ]),
  1694 +
1666 RowMultiText( 1695 RowMultiText(
1667 "下单时间", 1696 "下单时间",
1668 _getDateTime( 1697 _getDateTime(
@@ -2885,75 +2914,62 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -2885,75 +2914,62 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
2885 ), 2914 ),
2886 )), 2915 )),
2887 // : SizedBox(), 2916 // : SizedBox(),
2888 - Expanded(  
2889 - flex: 1,  
2890 - child: InkWell(  
2891 - onTap: () {  
2892 - // String _nameStr = '';  
2893 - // String _tid = '';  
2894 - // for (int i = 0;  
2895 - // i <  
2896 - // detailEntity  
2897 - // .tables.length;  
2898 - // i++) {  
2899 - // _nameStr +=  
2900 - // '${detailEntity.tables[i].name},';  
2901 -  
2902 - // _tid +=  
2903 - // '${detailEntity.tables[i].id},';  
2904 - // }  
2905 - // if (_tid.endsWith(',')) {  
2906 - // _tid = _tid.substring(  
2907 - // 0, _tid.length - 1);  
2908 - // }  
2909 - // if (_nameStr.endsWith(',')) {  
2910 - // _nameStr =  
2911 - // _nameStr.substring(  
2912 - // 0,  
2913 - // _nameStr.length -  
2914 - // 1);  
2915 - // }  
2916 - if (Utils.getAuthority(  
2917 - context, '通知客户') ||  
2918 - widget.uid ==  
2919 - userModel  
2920 - .user.openid) {  
2921 - NavigatorUtil  
2922 - .goInvicationPage(  
2923 - context,  
2924 - detailEntity.id,  
2925 - );  
2926 - }  
2927 - },  
2928 - child: Container(  
2929 - decoration: BoxDecoration(  
2930 - color: !(Utils.getAuthority( 2917 + if ('${detailEntity.is_user_comments}' !=
  2918 + '1')
  2919 + Expanded(
  2920 + flex: 1,
  2921 + child: InkWell(
  2922 + onTap: () {
  2923 + // if (Utils.getAuthority(
  2924 + // context, '请客人反馈') ||
  2925 + // widget.uid ==
  2926 + // userModel
  2927 + // .user.openid) {
  2928 +
  2929 + Utils.goShareFeedbackPageToWeChat(
  2930 + context,
  2931 + title: '欢迎来吐槽',
  2932 + img:
  2933 + 'https://nosqn.colorcun.com/share_feedback.jpg',
  2934 + rid: widget.rid,
  2935 + // oid: oid,
  2936 + sid: Provider.of<
  2937 + UserModel>(
2931 context, 2938 context,
2932 - '通知客户') ||  
2933 - widget.uid ==  
2934 - userModel.user  
2935 - .openid)  
2936 - ? MyColours.color_999999  
2937 - : MyColours  
2938 - .color_199095,  
2939 - borderRadius:  
2940 - BorderRadius.circular(  
2941 - ScreenUtil()  
2942 - .setWidth(10)),  
2943 - ),  
2944 - child: Align(  
2945 - alignment: Alignment.center,  
2946 - child: Text('通知客户',  
2947 - style: TextStyle(  
2948 - color: MyColours  
2949 - .color_ffffff,  
2950 - fontSize:  
2951 - ScreenUtil()  
2952 - .setSp(  
2953 - 34))), 2939 + listen: false)
  2940 + .user
  2941 + .sellerid);
  2942 + // }
  2943 + },
  2944 + child: Container(
  2945 + margin: EdgeInsets.only(
  2946 + right: ScreenUtil()
  2947 + .setWidth(20)),
  2948 + decoration: BoxDecoration(
  2949 + color: MyColours
  2950 + .color_ffffff,
  2951 + border: Border.all(
  2952 + width: w(1),
  2953 + color: MyColours
  2954 + .color_438E93),
  2955 + borderRadius: BorderRadius
  2956 + .circular(ScreenUtil()
  2957 + .setWidth(10)),
  2958 + ),
  2959 + child: Align(
  2960 + alignment:
  2961 + Alignment.center,
  2962 + child: Text('请客人反馈',
  2963 + style: TextStyle(
  2964 + color: MyColours
  2965 + .color_438E93,
  2966 + fontSize:
  2967 + ScreenUtil()
  2968 + .setSp(
  2969 + 34))),
  2970 + ),
2954 ), 2971 ),
2955 - ),  
2956 - )), 2972 + )),
2957 2973
2958 // Expanded( 2974 // Expanded(
2959 // flex: 1, 2975 // flex: 1,
@@ -3340,83 +3356,274 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -3340,83 +3356,274 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
3340 // ], 3356 // ],
3341 )), 3357 )),
3342 Offstage( 3358 Offstage(
3343 - offstage: ((detailEntity.orderInfo != null &&  
3344 - detailEntity.orderInfo.status == "3") ||  
3345 - detailEntity.status == "3" ||  
3346 - detailEntity.status == "4" ||  
3347 - detailEntity.status == "6")  
3348 - ? true  
3349 - : false,  
3350 - child: Container(  
3351 - width: double.infinity,  
3352 - height: ScreenUtil().setWidth(84),  
3353 - margin: EdgeInsets.symmetric(  
3354 - horizontal: ScreenUtil().setHeight(40)),  
3355 - decoration: BoxDecoration(  
3356 - border: Border.all(  
3357 - color: !(Utils.getAuthority(  
3358 - context, '变更预订') ||  
3359 - widget.uid == userModel.user.openid)  
3360 - ? MyColours.color_999999  
3361 - : MyColours.color_199095,  
3362 - width: ScreenUtil().setWidth(2)),  
3363 - borderRadius: BorderRadius.circular(  
3364 - ScreenUtil().setWidth(10)),  
3365 - ),  
3366 - // child: Text('fff'),  
3367 - child: Material(  
3368 - color: Colors.transparent,  
3369 - child: Row(  
3370 - children: [  
3371 - Expanded(  
3372 - child: _cancelAndChangeBtn(() {  
3373 - print('点击变更预订');  
3374 - if (Utils.getAuthority(  
3375 - context, '变更预订') ||  
3376 - widget.uid ==  
3377 - userModel.user.openid) {  
3378 - NavigatorUtil.goNoteBookChangeFPage(  
3379 - context,  
3380 - detailEntity,  
3381 - widget.rid);  
3382 - }  
3383 - }, '变更预订',  
3384 - fontColor: !(Utils.getAuthority(  
3385 - context, '变更预订') ||  
3386 - widget.uid ==  
3387 - userModel.user.openid)  
3388 - ? MyColours.color_999999  
3389 - : MyColours.color_199095)),  
3390 - MyDivider(  
3391 - ScreenUtil().setWidth(2),  
3392 - ScreenUtil().setWidth(50),  
3393 - color: !(Utils.getAuthority( 3359 + offstage: ((detailEntity.orderInfo != null &&
  3360 + detailEntity.orderInfo.status == "3") ||
  3361 + detailEntity.status == "3" ||
  3362 + detailEntity.status == "4" ||
  3363 + detailEntity.status == "6"),
  3364 + child: Container(
  3365 + // width: double.infinity,
  3366 + height: ScreenUtil().setWidth(84),
  3367 + decoration: BoxDecoration(
  3368 + color: MyColours.color_ffffff,
  3369 + borderRadius: BorderRadius.circular(
  3370 + ScreenUtil().setWidth(10)),
  3371 + ),
  3372 + margin: EdgeInsets.symmetric(
  3373 + vertical: ScreenUtil().setHeight(20),
  3374 + horizontal: ScreenUtil().setHeight(40)),
  3375 + child: Row(children: [
  3376 + Expanded(
  3377 + flex: 1,
  3378 + child: InkWell(
  3379 + onTap: () {
  3380 + print('点击变更预订');
  3381 + if (Utils.getAuthority(
  3382 + context, '变更预订') ||
  3383 + widget.uid ==
  3384 + userModel.user.openid) {
  3385 + NavigatorUtil
  3386 + .goNoteBookChangeFPage(
  3387 + context,
  3388 + detailEntity,
  3389 + widget.rid);
  3390 + }
  3391 + },
  3392 + child: Container(
  3393 + margin: EdgeInsets.only(
  3394 + right:
  3395 + ScreenUtil().setWidth(20)),
  3396 + decoration: BoxDecoration(
  3397 + color: MyColours.color_ffffff,
  3398 + border: Border.all(
  3399 + width: w(1),
  3400 + color: !(Utils.getAuthority(
  3401 + context, '变更预订') ||
  3402 + widget.uid ==
  3403 + userModel
  3404 + .user.openid)
  3405 + ? MyColours.color_999999
  3406 + : MyColours.color_199095,
  3407 + ),
  3408 + borderRadius:
  3409 + BorderRadius.circular(
  3410 + ScreenUtil()
  3411 + .setWidth(10)),
  3412 + ),
  3413 + child: Align(
  3414 + alignment: Alignment.center,
  3415 + child: Text('变更预订',
  3416 + style: TextStyle(
  3417 + color: !(Utils
  3418 + .getAuthority(
  3419 + context,
  3420 + '变更预订') ||
  3421 + widget.uid ==
  3422 + userModel.user
  3423 + .openid)
  3424 + ? MyColours
  3425 + .color_999999
  3426 + : MyColours
  3427 + .color_199095,
  3428 + fontSize: ScreenUtil()
  3429 + .setSp(34))),
  3430 + ),
  3431 + ),
  3432 + )),
  3433 + Expanded(
  3434 + flex: 1,
  3435 + child: InkWell(
  3436 + onTap: () {
  3437 + if (Utils.getAuthority(
3394 context, '取消预订') || 3438 context, '取消预订') ||
3395 widget.uid == 3439 widget.uid ==
3396 - userModel.user.openid)  
3397 - ? MyColours.color_999999  
3398 - : MyColours.color_199095,  
3399 - ),  
3400 - Expanded(  
3401 - child: _cancelAndChangeBtn(() {  
3402 - if (Utils.getAuthority(  
3403 - context, '取消预订') ||  
3404 - widget.uid ==  
3405 - userModel.user.openid) {  
3406 - _showCancelWidget(  
3407 - context, detailEntity.phone);  
3408 - }  
3409 - }, '取消预订',  
3410 - fontColor: !(Utils.getAuthority(  
3411 - context, '取消预订') || 3440 + userModel.user.openid) {
  3441 + _showCancelWidget(
  3442 + context, detailEntity.phone);
  3443 + }
  3444 + },
  3445 + child: Container(
  3446 + margin: EdgeInsets.only(
  3447 + right:
  3448 + ScreenUtil().setWidth(20)),
  3449 + decoration: BoxDecoration(
  3450 + color: MyColours.color_ffffff,
  3451 + border: Border.all(
  3452 + width: w(1),
  3453 + color: !(Utils.getAuthority(
  3454 + context, '取消预订') ||
  3455 + widget.uid ==
  3456 + userModel
  3457 + .user.openid)
  3458 + ? MyColours.color_999999
  3459 + : MyColours.color_199095,
  3460 + ),
  3461 + borderRadius:
  3462 + BorderRadius.circular(
  3463 + ScreenUtil()
  3464 + .setWidth(10)),
  3465 + ),
  3466 + child: Align(
  3467 + alignment: Alignment.center,
  3468 + child: Text('取消预订',
  3469 + style: TextStyle(
  3470 + color: !(Utils
  3471 + .getAuthority(
  3472 + context,
  3473 + '取消预订') ||
  3474 + widget.uid ==
  3475 + userModel.user
  3476 + .openid)
  3477 + ? MyColours
  3478 + .color_999999
  3479 + : MyColours
  3480 + .color_199095,
  3481 + fontSize: ScreenUtil()
  3482 + .setSp(34))),
  3483 + ),
  3484 + ),
  3485 + )),
  3486 + Expanded(
  3487 + flex: 1,
  3488 + child: InkWell(
  3489 + onTap: () {
  3490 + // String _nameStr = '';
  3491 + // String _tid = '';
  3492 + // for (int i = 0;
  3493 + // i <
  3494 + // detailEntity
  3495 + // .tables.length;
  3496 + // i++) {
  3497 + // _nameStr +=
  3498 + // '${detailEntity.tables[i].name},';
  3499 +
  3500 + // _tid +=
  3501 + // '${detailEntity.tables[i].id},';
  3502 + // }
  3503 + // if (_tid.endsWith(',')) {
  3504 + // _tid = _tid.substring(
  3505 + // 0, _tid.length - 1);
  3506 + // }
  3507 + // if (_nameStr.endsWith(',')) {
  3508 + // _nameStr =
  3509 + // _nameStr.substring(
  3510 + // 0,
  3511 + // _nameStr.length -
  3512 + // 1);
  3513 + // }
  3514 + if (Utils.getAuthority(
  3515 + context, '通知客户') ||
  3516 + widget.uid ==
  3517 + userModel.user.openid) {
  3518 + NavigatorUtil.goInvicationPage(
  3519 + context,
  3520 + detailEntity.id,
  3521 + );
  3522 + }
  3523 + },
  3524 + child: Container(
  3525 + decoration: BoxDecoration(
  3526 + color: !(Utils.getAuthority(
  3527 + context, '通知客户') ||
3412 widget.uid == 3528 widget.uid ==
3413 userModel.user.openid) 3529 userModel.user.openid)
3414 ? MyColours.color_999999 3530 ? MyColours.color_999999
3415 - : MyColours.color_199095)),  
3416 - ],  
3417 - )),  
3418 - ),  
3419 - ), 3531 + : MyColours.color_199095,
  3532 + borderRadius:
  3533 + BorderRadius.circular(
  3534 + ScreenUtil()
  3535 + .setWidth(10)),
  3536 + ),
  3537 + child: Align(
  3538 + alignment: Alignment.center,
  3539 + child: Text('通知客户',
  3540 + style: TextStyle(
  3541 + color: MyColours
  3542 + .color_ffffff,
  3543 + fontSize: ScreenUtil()
  3544 + .setSp(34))),
  3545 + ),
  3546 + ),
  3547 + )),
  3548 + ]))),
  3549 + // Offstage(
  3550 + // offstage: ((detailEntity.orderInfo != null &&
  3551 + // detailEntity.orderInfo.status == "3") ||
  3552 + // detailEntity.status == "3" ||
  3553 + // detailEntity.status == "4" ||
  3554 + // detailEntity.status == "6")
  3555 + // ? true
  3556 + // : false,
  3557 + // child: Container(
  3558 + // width: double.infinity,
  3559 + // height: ScreenUtil().setWidth(84),
  3560 + // margin: EdgeInsets.symmetric(
  3561 + // horizontal: ScreenUtil().setHeight(40)),
  3562 + // decoration: BoxDecoration(
  3563 + // border: Border.all(
  3564 + // color: !(Utils.getAuthority(
  3565 + // context, '变更预订') ||
  3566 + // widget.uid == userModel.user.openid)
  3567 + // ? MyColours.color_999999
  3568 + // : MyColours.color_199095,
  3569 + // width: ScreenUtil().setWidth(2)),
  3570 + // borderRadius: BorderRadius.circular(
  3571 + // ScreenUtil().setWidth(10)),
  3572 + // ),
  3573 + // // child: Text('fff'),
  3574 + // child: Material(
  3575 + // color: Colors.transparent,
  3576 + // child: Row(
  3577 + // children: [
  3578 + // Expanded(
  3579 + // child: _cancelAndChangeBtn(() {
  3580 + // print('点击变更预订');
  3581 + // if (Utils.getAuthority(
  3582 + // context, '变更预订') ||
  3583 + // widget.uid ==
  3584 + // userModel.user.openid) {
  3585 + // NavigatorUtil.goNoteBookChangeFPage(
  3586 + // context,
  3587 + // detailEntity,
  3588 + // widget.rid);
  3589 + // }
  3590 + // }, '变更预订',
  3591 + // fontColor: !(Utils.getAuthority(
  3592 + // context, '变更预订') ||
  3593 + // widget.uid ==
  3594 + // userModel.user.openid)
  3595 + // ? MyColours.color_999999
  3596 + // : MyColours.color_199095)),
  3597 + // MyDivider(
  3598 + // ScreenUtil().setWidth(2),
  3599 + // ScreenUtil().setWidth(50),
  3600 + // color: !(Utils.getAuthority(
  3601 + // context, '取消预订') ||
  3602 + // widget.uid ==
  3603 + // userModel.user.openid)
  3604 + // ? MyColours.color_999999
  3605 + // : MyColours.color_199095,
  3606 + // ),
  3607 + // Expanded(
  3608 + // child: _cancelAndChangeBtn(() {
  3609 + // if (Utils.getAuthority(
  3610 + // context, '取消预订') ||
  3611 + // widget.uid ==
  3612 + // userModel.user.openid) {
  3613 + // _showCancelWidget(
  3614 + // context, detailEntity.phone);
  3615 + // }
  3616 + // }, '取消预订',
  3617 + // fontColor: !(Utils.getAuthority(
  3618 + // context, '取消预订') ||
  3619 + // widget.uid ==
  3620 + // userModel.user.openid)
  3621 + // ? MyColours.color_999999
  3622 + // : MyColours.color_199095)),
  3623 + // ],
  3624 + // )),
  3625 + // ),
  3626 + // ),
3420 VEmptyView(ScreenUtil().setWidth(60)) 3627 VEmptyView(ScreenUtil().setWidth(60))
3421 ]) 3628 ])
3422 ], 3629 ],
@@ -3488,16 +3695,16 @@ class TitleAndBtn extends StatelessWidget { @@ -3488,16 +3695,16 @@ class TitleAndBtn extends StatelessWidget {
3488 ), 3695 ),
3489 ), 3696 ),
3490 Spacer(), 3697 Spacer(),
3491 - if (Utils.getAuthority(context, title) ||  
3492 - uid == userModel.user.openid)  
3493 - Text(  
3494 - "选填",  
3495 - style: TextStyle(  
3496 - color: MyColours.color_353535,  
3497 - fontSize: ScreenUtil().setSp(30)),  
3498 - softWrap: true,  
3499 - ),  
3500 - HEmptyView(10), 3698 + // if (Utils.getAuthority(context, title) ||
  3699 + // uid == userModel.user.openid)
  3700 + // Text(
  3701 + // "选填",
  3702 + // style: TextStyle(
  3703 + // color: MyColours.color_353535,
  3704 + // fontSize: ScreenUtil().setSp(30)),
  3705 + // softWrap: true,
  3706 + // ),
  3707 + // HEmptyView(10),
3501 InkWell( 3708 InkWell(
3502 onTap: () { 3709 onTap: () {
3503 if (Utils.getAuthority(context, title) || 3710 if (Utils.getAuthority(context, title) ||
@@ -3743,16 +3950,16 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> @@ -3743,16 +3950,16 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield>
3743 // widget.detailModel.strTF.trim().length > 0 3950 // widget.detailModel.strTF.trim().length > 0
3744 // ? Text("¥", style: TextStyle(color: MyColours.color_199095)) 3951 // ? Text("¥", style: TextStyle(color: MyColours.color_199095))
3745 // : SizedBox(), 3952 // : SizedBox(),
3746 - if (Utils.getAuthority(context, widget.title) ||  
3747 - widget.uid == userModel.user.openid)  
3748 - Text(  
3749 - "选填",  
3750 - style: TextStyle(  
3751 - color: MyColours.color_353535,  
3752 - fontSize: ScreenUtil().setSp(30)),  
3753 - softWrap: true,  
3754 - ),  
3755 - HEmptyView(6), 3953 + // if (Utils.getAuthority(context, widget.title) ||
  3954 + // widget.uid == userModel.user.openid)
  3955 + // Text(
  3956 + // "选填",
  3957 + // style: TextStyle(
  3958 + // color: MyColours.color_353535,
  3959 + // fontSize: ScreenUtil().setSp(30)),
  3960 + // softWrap: true,
  3961 + // ),
  3962 + // HEmptyView(6),
3756 Container( 3963 Container(
3757 constraints: 3964 constraints:
3758 BoxConstraints(maxHeight: ScreenUtil().setWidth(50)), 3965 BoxConstraints(maxHeight: ScreenUtil().setWidth(50)),
@@ -1317,6 +1317,44 @@ class Utils { @@ -1317,6 +1317,44 @@ class Utils {
1317 Loading.hideLoading(context); 1317 Loading.hideLoading(context);
1318 } 1318 }
1319 1319
  1320 + //请客人反馈----跳转小程序请客人反馈
  1321 + static goShareFeedbackPageToWeChat(BuildContext context,
  1322 + {String title, String rid, String img, String oid, String sid}) async {
  1323 + Loading.showLoading(context);
  1324 + String _webPageUrl = "http://colorcun.com/";
  1325 + // String _thumbnail = img;
  1326 +
  1327 + // String _thumbnail = sellerImage == null || sellerImage == ''
  1328 + // ? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
  1329 + // : sellerImage;
  1330 + String _thumbnail = 'https://nosqn.colorcun.com/share_feedback.jpg';
  1331 + String _title = title;
  1332 + String _userName = "gh_487873d353b3";
  1333 + // String _path = "pack-cookbook/pages/index?rid=$rid&identity=2&sid=$sid";
  1334 + String _path =
  1335 + "pages/pinglun/createOpinion?oid=$rid&types=1&sellerid=$sid&sellerName=${Provider.of<UserModel>(context, listen: false).user.sellername}";
  1336 +
  1337 + String _description = "OneKey";
  1338 + // Uint8List source = await testComporessList(context, _thumbnail);
  1339 + var model = new WeChatShareMiniProgramModel(
  1340 + // miniProgramType: , //体验版
  1341 + miniProgramType: Constant.wxMiniProgramType, //正式版
  1342 + // miniProgramType: //开发版
  1343 + webPageUrl: _webPageUrl,
  1344 + userName: _userName,
  1345 + title: _title,
  1346 + path: _path,
  1347 + // thumbnail: WeChatImage.asset(Utils.getImgPath('mini_image')),
  1348 + description: _description,
  1349 +
  1350 + // thumbnail: WeChatImage.binary(source)
  1351 +
  1352 + thumbnail: WeChatImage.network(_thumbnail));
  1353 + bool isShare = await shareToWeChat(model);
  1354 + print(isShare);
  1355 + Loading.hideLoading(context);
  1356 + }
  1357 +
1320 //请客户点菜----跳转小程序提前点餐 1358 //请客户点菜----跳转小程序提前点餐
1321 static goShareOrderPageToWeChat(BuildContext context, 1359 static goShareOrderPageToWeChat(BuildContext context,
1322 {String title, String rid, String img, String oid, String sid}) async { 1360 {String title, String rid, String img, String oid, String sid}) async {