Commit 8c221f318ffa705026a85588dd9d218595f10565

Authored by wdn127929
1 parent b3ddaaa1

预订安排页

@@ -41,8 +41,9 @@ typedef clickCallback = void Function(String value); @@ -41,8 +41,9 @@ typedef clickCallback = void Function(String value);
41 class NoteBookChangeFPage extends StatefulWidget { 41 class NoteBookChangeFPage extends StatefulWidget {
42 final NotebookDetail detailEntity; 42 final NotebookDetail detailEntity;
43 final String rid; 43 final String rid;
  44 + final bool back;
44 45
45 - const NoteBookChangeFPage({Key key, this.detailEntity, this.rid}) 46 + const NoteBookChangeFPage({Key key, this.detailEntity, this.rid, this.back})
46 : super(key: key); 47 : super(key: key);
47 48
48 @override 49 @override
@@ -1963,58 +1964,70 @@ class _NoteBookChangeFPageState extends State<NoteBookChangeFPage> { @@ -1963,58 +1964,70 @@ class _NoteBookChangeFPageState extends State<NoteBookChangeFPage> {
1963 // _notebookDetailChangeModel.clearData(); 1964 // _notebookDetailChangeModel.clearData();
1964 bus.emit("refresh_detail"); 1965 bus.emit("refresh_detail");
1965 bus.emit("refresh_book_list"); //刷新已预订列表 1966 bus.emit("refresh_book_list"); //刷新已预订列表
1966 - String ddate_solt = '';  
1967 - if (_model.row.isSetDdate == '1') {  
1968 - String createtime =  
1969 - _model.row.ddate.toString() + '000';  
1970 - DateTime createTime =  
1971 - DateTime.fromMillisecondsSinceEpoch(  
1972 - int.parse(createtime));  
1973 - ddate_solt = DateUtil.formatDate(createTime,  
1974 - format: DateFormats.h_m); 1967 + if (widget.back) {
  1968 + EventBus()
  1969 + .emit("refresh_invitaion_info"); //刷新预订安排页面
  1970 + Navigator.pop(context);
1975 } else { 1971 } else {
1976 - if (_model.row.ddateSolt == '1') {  
1977 - ddate_solt = '早餐';  
1978 - } else if (_model.row.ddateSolt == '2') {  
1979 - ddate_solt = '午餐';  
1980 - } else if (_model.row.ddateSolt == '3') {  
1981 - ddate_solt = '晚餐'; 1972 + String ddate_solt = '';
  1973 + if (_model.row.isSetDdate == '1') {
  1974 + String createtime =
  1975 + _model.row.ddate.toString() + '000';
  1976 + DateTime createTime =
  1977 + DateTime.fromMillisecondsSinceEpoch(
  1978 + int.parse(createtime));
  1979 + ddate_solt = DateUtil.formatDate(createTime,
  1980 + format: DateFormats.h_m);
  1981 + } else {
  1982 + if (_model.row.ddateSolt == '1') {
  1983 + ddate_solt = '早餐';
  1984 + } else if (_model.row.ddateSolt == '2') {
  1985 + ddate_solt = '午餐';
  1986 + } else if (_model.row.ddateSolt == '3') {
  1987 + ddate_solt = '晚餐';
  1988 + }
1982 } 1989 }
  1990 + List<dynamic> tableinfo =
  1991 + convert.jsonDecode(_model.row.tableinfo);
  1992 + print(tableinfo);
  1993 +
  1994 + // if (tableinfo.length > 1) {
  1995 + // _nameStr =
  1996 + // t.TableList.fromJson(tableinfo[0]).name +
  1997 + // '等${tableinfo.length}桌';
  1998 + // }
  1999 + String _nameStr = '';
  2000 + String _tid = '';
  2001 + for (int i = 0; i < tableinfo.length; i++) {
  2002 + _nameStr +=
  2003 + '${t.TableList.fromJson(tableinfo[i]).name},';
  2004 +
  2005 + _tid +=
  2006 + '${t.TableList.fromJson(tableinfo[i]).id},';
  2007 + }
  2008 + if (_tid.endsWith(',')) {
  2009 + _tid = _tid.substring(0, _tid.length - 1);
  2010 + }
  2011 + if (_nameStr.endsWith(',')) {
  2012 + _nameStr =
  2013 + _nameStr.substring(0, _nameStr.length - 1);
  2014 + }
  2015 + LogUtil.v(_nameStr);
  2016 + NavigatorUtil.goInvicationPage(
  2017 + context,
  2018 + _model.row.id,
  2019 + _nameStr,
  2020 + _model.row.ddate,
  2021 + ddate_solt,
  2022 + _model.row.phone,
  2023 + _model.row.ddateSolt,
  2024 + _model.row.rname == null
  2025 + ? ''
  2026 + : _model.row.rname,
  2027 + _model.row.sex == null ? '' : _model.row.sex,
  2028 + tid: _tid,
  2029 + replace: true);
1983 } 2030 }
1984 - List<dynamic> tableinfo =  
1985 - convert.jsonDecode(_model.row.tableinfo);  
1986 - print(tableinfo);  
1987 - String _nameStr =  
1988 - t.TableList.fromJson(tableinfo[0]).name;  
1989 -  
1990 - if (tableinfo.length > 1) {  
1991 - _nameStr =  
1992 - t.TableList.fromJson(tableinfo[0]).name +  
1993 - '等${tableinfo.length}桌';  
1994 - }  
1995 - String _tid = '';  
1996 - for (int i = 0; i < tableinfo.length; i++) {  
1997 - _tid +=  
1998 - '${t.TableList.fromJson(tableinfo[i]).id},';  
1999 - }  
2000 - if (_tid.endsWith(',')) {  
2001 - _tid = _tid.substring(0, _tid.length - 1);  
2002 - }  
2003 - LogUtil.v(_nameStr);  
2004 - NavigatorUtil.goInvicationPage(  
2005 - context,  
2006 - _model.row.id,  
2007 - _nameStr,  
2008 - _model.row.ddate,  
2009 - ddate_solt,  
2010 - _model.row.phone,  
2011 - _model.row.ddateSolt,  
2012 - _model.row.rname == null  
2013 - ? ''  
2014 - : _model.row.rname,  
2015 - _model.row.sex == null ? '' : _model.row.sex,  
2016 - tid: _tid,  
2017 - replace: true);  
2018 EventBus().emit("refresh_tablemanager"); //刷新桌位 2031 EventBus().emit("refresh_tablemanager"); //刷新桌位
2019 } else { 2032 } else {
2020 Utils.showToast(widget.detailEntity.id == "-1" 2033 Utils.showToast(widget.detailEntity.id == "-1"
@@ -2505,12 +2505,16 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -2505,12 +2505,16 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
2505 flex: 2, 2505 flex: 2,
2506 child: InkWell( 2506 child: InkWell(
2507 onTap: () { 2507 onTap: () {
  2508 + String _nameStr = '';
2508 String _tid = ''; 2509 String _tid = '';
2509 for (int i = 0; 2510 for (int i = 0;
2510 i < 2511 i <
2511 detailEntity 2512 detailEntity
2512 .tables.length; 2513 .tables.length;
2513 i++) { 2514 i++) {
  2515 + _nameStr +=
  2516 + '${detailEntity.tables[i].name},';
  2517 +
2514 _tid += 2518 _tid +=
2515 '${detailEntity.tables[i].id},'; 2519 '${detailEntity.tables[i].id},';
2516 } 2520 }
@@ -2518,12 +2522,20 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -2518,12 +2522,20 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
2518 _tid = _tid.substring( 2522 _tid = _tid.substring(
2519 0, _tid.length - 1); 2523 0, _tid.length - 1);
2520 } 2524 }
  2525 + if (_nameStr
  2526 + .endsWith(',')) {
  2527 + _nameStr =
  2528 + _nameStr.substring(
  2529 + 0,
  2530 + _nameStr.length -
  2531 + 1);
  2532 + }
  2533 +
2521 NavigatorUtil 2534 NavigatorUtil
2522 .goInvicationPage( 2535 .goInvicationPage(
2523 context, 2536 context,
2524 detailEntity.id, 2537 detailEntity.id,
2525 - detailEntity  
2526 - .tableinfoStr, 2538 + _nameStr,
2527 detailEntity.ddate, 2539 detailEntity.ddate,
2528 detailEntity 2540 detailEntity
2529 .ddateStr, 2541 .ddateStr,
This diff could not be displayed because it is too large.
  1 +// import 'dart:typed_data';
  2 +// import 'dart:ui';
  3 +
  4 +// import 'package:cached_network_image/cached_network_image.dart';
  5 +// import 'package:common_utils/common_utils.dart';
  6 +// import 'package:flutter/material.dart';
  7 +// import 'package:flutter/rendering.dart';
  8 +// import 'package:flutter/services.dart';
  9 +// import 'package:flutter_screenutil/flutter_screenutil.dart';
  10 +// import 'package:one_key/models/seller_phone_model.dart';
  11 +// import 'package:one_key/models/user.dart';
  12 +// import 'package:one_key/pages/online_check/photo_view_wiget.dart';
  13 +// import 'package:one_key/provider/base_info_provider.dart';
  14 +// import 'package:one_key/provider/coupon_provider.dart';
  15 +// import 'package:one_key/provider/user_model.dart';
  16 +// import 'package:one_key/res/colors.dart';
  17 +// import 'package:one_key/utils/event_bus.dart';
  18 +// import 'package:one_key/utils/misc.dart';
  19 +// import 'package:one_key/route/navigator_util.dart';
  20 +// import 'package:one_key/utils/utils.dart';
  21 +// import 'package:one_key/widgets/h_empty_view.dart';
  22 +// import 'package:one_key/widgets/round_button.dart';
  23 +// import 'package:one_key/widgets/system_app_bar.dart';
  24 +// import 'package:one_key/widgets/v_empty_view.dart';
  25 +// import 'package:permission_handler/permission_handler.dart';
  26 +// import 'package:provider/provider.dart';
  27 +// import 'dart:ui' as ui;
  28 +
  29 +// class InvicationPage extends StatefulWidget {
  30 +// final String rid; //预订订单id
  31 +// final String tableInfo; //桌位信息
  32 +// final String ddate;
  33 +// final String ddateStr;
  34 +// final String phone;
  35 +// final String dateSolt;
  36 +// final String tid;
  37 +// final String name;
  38 +// final String sex;
  39 +
  40 +// InvicationPage(this.rid, this.tableInfo, this.ddate, this.ddateStr,
  41 +// this.phone, this.dateSolt, this.tid, this.name, this.sex);
  42 +
  43 +// @override
  44 +// State<StatefulWidget> createState() {
  45 +// // TODO: implement createState
  46 +// return new InvicationPageState();
  47 +// }
  48 +// }
  49 +
  50 +// class InvicationPageState extends State<InvicationPage> {
  51 +// User user;
  52 +// DateTime dateTime;
  53 +// String dateTimeStr = "";
  54 +// ScrollController controller = ScrollController();
  55 +// double couponHeight = 140.0;
  56 +// CouponProvider couponProvider;
  57 +// BaseIndoProvider _baseIndoProvider;
  58 +// String name = '';
  59 +// String position = '经理';
  60 +// String phone = '';
  61 +// String qiniuUrl = '';
  62 +// final GlobalKey key = new GlobalKey();
  63 +// final GlobalKey globalKey = GlobalKey();
  64 +// String reserverPhone;
  65 +
  66 +// @override
  67 +// void initState() {
  68 +// super.initState();
  69 +// reserverPhone = widget.phone;
  70 +
  71 +// WidgetsBinding.instance.addPostFrameCallback((_) {
  72 +// couponProvider.sendSMS = false;
  73 +// _getActivityByRid();
  74 +// _getCustomerActivityBaseinfo();
  75 +// _getTablesPhoto();
  76 +// });
  77 +// bus.on("refresh_coupon_invitation", (args) {
  78 +// _couponNetworkData(isShowLoading: false);
  79 +// });
  80 +// Utils.changeStatusColor(color: Colors.transparent);
  81 +// dateTime =
  82 +// DateTime.fromMillisecondsSinceEpoch(int.parse(widget.ddate) * 1000);
  83 +// user = Provider.of<UserModel>(context, listen: false).user;
  84 +
  85 +// dateTimeStr =
  86 +// "${dateTime.year}/${Utils.addZeroNumber(dateTime.month)}/${Utils.addZeroNumber(dateTime.day)} 星期${Utils.formatWeekDayNum(dateTime.weekday)} ${widget.ddateStr}";
  87 +// }
  88 +
  89 +// @override
  90 +// void dispose() {
  91 +// Utils.changeStatusColor();
  92 +// couponProvider.clearSelect();
  93 +// bus.off("refresh_coupon_invitation");
  94 +// super.dispose();
  95 +// }
  96 +
  97 +// _getTablesPhoto() async {
  98 +// Map<String, String> params = {
  99 +// "sellerid": Provider.of<UserModel>(context, listen: false).user.sellerid,
  100 +// "tableids": widget.tid,
  101 +// };
  102 +// bool success = await _baseIndoProvider.getTablesPhoto(context, params);
  103 +// }
  104 +
  105 +// //客户经理添加/修改基本信息
  106 +// _setCustomerActivityBaseinfo() async {
  107 +// Map<String, String> params = {
  108 +// 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  109 +// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
  110 +// "name": user.sellername,
  111 +// "photo": 'http://nosqn.colorcun.com/yd_person.png',
  112 +// "position": '经理',
  113 +// };
  114 +// if (user.userphone != null) {
  115 +// params['phone'] = user.userphone;
  116 +// }
  117 +
  118 +// bool isSuccess =
  119 +// await _baseIndoProvider.setCustomerActivityBaseinfo(context, params);
  120 +// // _baseIndoProvider.baseInfoSunModel = null;
  121 +// if (isSuccess) {
  122 +// name = user.sellername;
  123 +// qiniuUrl = 'http://nosqn.colorcun.com/yd_person.png';
  124 +// // _uploadImageProvider.erweima.qiniuUrl =
  125 +// // _baseIndoProvider.baseInfoSunModel.qrcode;
  126 +// phone = user.userphone != null ? user.userphone : '填写电话';
  127 +// position = '经理';
  128 +// qiniuUrl = 'http://nosqn.colorcun.com/yd_person.png';
  129 +// setState(() {});
  130 +// }
  131 +// }
  132 +
  133 +// _getCustomerActivityBaseinfo() async {
  134 +// Map<String, String> params = {
  135 +// 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  136 +// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
  137 +// };
  138 +// bool success =
  139 +// await _baseIndoProvider.getCustomerActivityBaseinfo(context, params);
  140 +// if (success) {
  141 +// name = _baseIndoProvider.baseInfoSunModel.name;
  142 +// qiniuUrl = _baseIndoProvider.baseInfoSunModel.photo;
  143 +// // _uploadImageProvider.erweima.qiniuUrl =
  144 +// // _baseIndoProvider.baseInfoSunModel.qrcode;
  145 +
  146 +// phone = _baseIndoProvider.baseInfoSunModel.phone != null
  147 +// ? _baseIndoProvider.baseInfoSunModel.phone
  148 +// : '填写电话';
  149 +
  150 +// position = _baseIndoProvider.baseInfoSunModel.position;
  151 +// setState(() {});
  152 +// } else {
  153 +// // name = '请填写姓名';
  154 +// // position = '请填写职位';
  155 +// // phone = '请填写电话';
  156 +// // qiniuUrl = '';
  157 +// _setCustomerActivityBaseinfo();
  158 +// }
  159 +// }
  160 +
  161 +// _getActivityByRid() async {
  162 +// Map<String, String> params = {
  163 +// "rid": widget.rid,
  164 +// };
  165 +// await couponProvider.getActivityByRid(context, params, isShowLoading: true);
  166 +// //flase默认5个 true 不默认5个
  167 +// if (!couponProvider.hasModify) {
  168 +// //没有绑定的券,默认给5个,获取优惠券列表
  169 +// _couponNetworkData(isShowLoading: true);
  170 +// }
  171 +// }
  172 +
  173 +// ///消费券默认5张
  174 +// _couponNetworkData({bool isShowLoading = true}) async {
  175 +// Map<String, String> params = {
  176 +// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
  177 +// 'status': '1'
  178 +// };
  179 +// await couponProvider.getCustomerSelectActivity(context, params,
  180 +// isShowLoading: isShowLoading);
  181 +// //此人已经新建好券
  182 +// if (couponProvider.couponListSelect.length > 0) {
  183 +// couponProvider.initCouponSelect(context);
  184 +
  185 +// if (couponProvider.coupons.length == 0) {
  186 +// setState(() {
  187 +// couponHeight = 0.0;
  188 +// });
  189 +// } else {
  190 +// setState(() {
  191 +// couponHeight = 140.0;
  192 +// });
  193 +// }
  194 +// } else {
  195 +// //没有新建的优惠券
  196 +// setState(() {
  197 +// couponHeight = 0.0;
  198 +// });
  199 +// }
  200 +// }
  201 +
  202 +// //中间内容显示组件
  203 +// Widget _middleWidget(String title, String content) {
  204 +// return Column(
  205 +// children: <Widget>[
  206 +// VEmptyView(80),
  207 +// Row(
  208 +// mainAxisSize: MainAxisSize.min,
  209 +// children: <Widget>[
  210 +// Image.asset(
  211 +// "assets/invication_line_left.png",
  212 +// width: ScreenUtil().setWidth(44),
  213 +// height: ScreenUtil().setWidth(4),
  214 +// ),
  215 +// Container(
  216 +// margin:
  217 +// EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(13)),
  218 +// child: Text(title,
  219 +// style: TextStyle(
  220 +// color: MyColours.color_CEB689,
  221 +// fontSize: ScreenUtil().setSp(28))),
  222 +// ),
  223 +// Image.asset(
  224 +// "assets/invication_line_right.png",
  225 +// width: ScreenUtil().setWidth(44),
  226 +// height: ScreenUtil().setWidth(4),
  227 +// )
  228 +// ],
  229 +// ),
  230 +// Container(
  231 +// margin: EdgeInsets.only(top: ScreenUtil().setHeight(20)),
  232 +// child: Text(
  233 +// content,
  234 +// style: TextStyle(
  235 +// color: MyColours.color_F2F2F2,
  236 +// fontSize: ScreenUtil().setSp(36)),
  237 +// ),
  238 +// )
  239 +// ],
  240 +// );
  241 +// }
  242 +
  243 +// _goBaseInfoPage() async {
  244 +// bool needRefresh = await NavigatorUtil.goBaseInfoPage(context);
  245 +// Utils.changeStatusColor(color: Colors.transparent);
  246 +// if (needRefresh != null && needRefresh) {
  247 +// //刷新页面数据
  248 +// _getCustomerActivityBaseinfo();
  249 +// }
  250 +// }
  251 +
  252 +// //查看大图
  253 +// _showPhotoView(BuildContext context, int index, List imgs,
  254 +// {isShow = false, List dashName}) async {
  255 +// // if (imgs.length == 1 &&
  256 +// // imgs[0] ==
  257 +// // 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {
  258 +// // imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';
  259 +// // }
  260 +// Utils.setBarStatus(false, color: Colors.black);
  261 +// dynamic result = await showGeneralDialog(
  262 +// context: context,
  263 +// barrierDismissible: false,
  264 +// // barrierColor: Colors.red,
  265 +// barrierLabel:
  266 +// MaterialLocalizations.of(context).modalBarrierDismissLabel,
  267 +// transitionDuration: const Duration(milliseconds: 150),
  268 +// pageBuilder: (BuildContext context, Animation animation,
  269 +// Animation secondaryAnimation) {
  270 +// Widget child = Stack(
  271 +// children: <Widget>[
  272 +// PhotoPreview(
  273 +// initialIndex: index,
  274 +// photoList: imgs,
  275 +// isShow: isShow,
  276 +// dashName: dashName)
  277 +// ],
  278 +// );
  279 +// return child;
  280 +// });
  281 +// // Utils.setBarStatus(true, color: Colors.white);
  282 +// }
  283 +
  284 +// ///浏览照片
  285 +// ///
  286 +// void onTapDown(BuildContext context, TapDownDetails details) {
  287 +// final RenderBox box = context.findRenderObject();
  288 +// final Offset localOffset = box.globalToLocal(details.globalPosition);
  289 +// final RenderBox containerBox = key.currentContext.findRenderObject();
  290 +// final Offset containerOffset = containerBox.localToGlobal(localOffset);
  291 +// final onTap = containerBox.paintBounds.contains(containerOffset);
  292 +// if (onTap) {
  293 +// _seePhoto();
  294 +// }
  295 +// }
  296 +
  297 +// _seePhoto() {
  298 +// // List<String> temp = [];
  299 +// if (_baseIndoProvider.photoList.length > 0) {
  300 +// // for (int i = 0; i < _baseIndoProvider.photoList.length; i++) {
  301 +// // temp.add(_baseIndoProvider.photoList[i].image);
  302 +// // }
  303 +
  304 +// ///没有上传完成的不可以点击
  305 +// _showPhotoView(context, 0, _baseIndoProvider.photoList);
  306 +// }
  307 +// }
  308 +
  309 +// ///获取截图
  310 +// Future<Uint8List> _getImage() async {
  311 +// BuildContext buildContext = globalKey.currentContext;
  312 +// if (null != buildContext) {
  313 +// RenderRepaintBoundary boundary = buildContext.findRenderObject();
  314 +// ui.Image image = await boundary.toImage(pixelRatio: 6);
  315 +// ByteData byteData = await image.toByteData(format: ImageByteFormat.png);
  316 +// Uint8List pngBytes = byteData.buffer.asUint8List();
  317 +// return pngBytes;
  318 +// }
  319 +// }
  320 +
  321 +// //发送短信
  322 +// _sendSms() async {
  323 +// UserModel userModel = Provider.of<UserModel>(context, listen: false);
  324 +// Map<String, String> params = {
  325 +// "rid": widget.rid,
  326 +// "sid": userModel.user.sellerid
  327 +// };
  328 +// await couponProvider.sendSms(context, params);
  329 +// }
  330 +
  331 +// // 客户经理转发记录
  332 +// _addForward() async {
  333 +// UserModel userModel = Provider.of<UserModel>(context, listen: false);
  334 +// Map<String, String> params = {
  335 +// "rid": widget.rid,
  336 +// "sid": userModel.user.sellerid,
  337 +// "uid": userModel.user.openid
  338 +// };
  339 +
  340 +// bool success = await couponProvider.addForwardAsReserve(context, params);
  341 +// if (success) {
  342 +// print('yes');
  343 +// }
  344 +// }
  345 +
  346 +// @override
  347 +// Widget build(BuildContext context) {
  348 +// // Utils.changeStatusColor(color: Colors.transparent);
  349 +// // TODO: implement build
  350 +// _baseIndoProvider = Provider.of<BaseIndoProvider>(context, listen: true);
  351 +// couponProvider = Provider.of<CouponProvider>(context, listen: true);
  352 +// return SafeArea(
  353 +// child: Scaffold(
  354 +// backgroundColor: Colors.white,
  355 +// appBar: SystemAppBar('', onTap: () {
  356 +// Navigator.pop(context);
  357 +// }),
  358 +// body: Stack(
  359 +// children: [
  360 +// Column(children: [
  361 +// Expanded(
  362 +// child: ListView(
  363 +// controller: controller,
  364 +// physics: BouncingScrollPhysics(),
  365 +// children: <Widget>[
  366 +// Center(
  367 +// child: Column(
  368 +// children: <Widget>[
  369 +// VEmptyView(20),
  370 +// Image.asset(
  371 +// "assets/yd_logo.png",
  372 +// width: ScreenUtil().setWidth(233 * 2),
  373 +// height: ScreenUtil().setHeight(51 * 2),
  374 +// ),
  375 +// VEmptyView(26),
  376 +// Container(
  377 +// margin: EdgeInsets.symmetric(
  378 +// horizontal: ScreenUtil().setWidth(40)),
  379 +// // padding: EdgeInsets.all(
  380 +// // ScreenUtil().setWidth(60)),
  381 +// // decoration: BoxDecoration(
  382 +// // gradient: LinearGradient(
  383 +// // begin: Alignment.topCenter,
  384 +// // end: Alignment.bottomCenter,
  385 +// // colors: [
  386 +// // MyColours.color_F7F1E8,
  387 +// // MyColours.color_E3D6C7,
  388 +// // ],
  389 +// // ),
  390 +// // borderRadius: BorderRadius.circular(
  391 +// // ScreenUtil().setWidth(10))),
  392 +// child: Column(
  393 +// crossAxisAlignment: CrossAxisAlignment.center,
  394 +// children: [
  395 +// Container(
  396 +// // color: Colors.red,
  397 +// width: ScreenUtil().setWidth(335 * 2),
  398 +// height: ScreenUtil().setWidth(200 * 2),
  399 +// // decoration: BoxDecoration(
  400 +// // image: DecorationImage(
  401 +// // alignment:
  402 +// // Alignment.topCenter,
  403 +// // image: AssetImage(
  404 +// // "assets/yd_baiinfo_bg.png"),
  405 +// // fit: BoxFit.cover),
  406 +// // ),
  407 +// child: Row(
  408 +// crossAxisAlignment:
  409 +// CrossAxisAlignment.start,
  410 +// children: [
  411 +// Padding(
  412 +// padding: EdgeInsets.only(
  413 +// left: ScreenUtil()
  414 +// .setWidth(70)),
  415 +// child: Stack(
  416 +// alignment:
  417 +// Alignment.bottomCenter,
  418 +// children: [
  419 +// Image.network(
  420 +// qiniuUrl == ''
  421 +// ? 'http://nosqn.colorcun.com/yd_person.png'
  422 +// : qiniuUrl,
  423 +// // 'http://nosqn.colorcun.com/yd_person.png',
  424 +// width: ScreenUtil()
  425 +// .setWidth(143 * 2),
  426 +// height: ScreenUtil()
  427 +// .setWidth(190 * 2)),
  428 +// couponProvider.coupons
  429 +// .length ==
  430 +// 0
  431 +// ? Align(
  432 +// alignment: Alignment
  433 +// .bottomCenter,
  434 +// child: RoundButton(
  435 +// width: ScreenUtil()
  436 +// .setWidth(
  437 +// 86 * 2),
  438 +// height:
  439 +// ScreenUtil()
  440 +// .setWidth(
  441 +// 30 *
  442 +// 2),
  443 +// radius:
  444 +// ScreenUtil()
  445 +// .setWidth(
  446 +// 30),
  447 +// space:
  448 +// ScreenUtil()
  449 +// .setWidth(
  450 +// 20),
  451 +// text: '添加优惠',
  452 +// textColor: MyColours
  453 +// .color_ffffff,
  454 +// isBold: false,
  455 +// fontSize: 28,
  456 +// gradientStart:
  457 +// MyColours
  458 +// .color_199095,
  459 +// gradientEnd: MyColours
  460 +// .color_199095,
  461 +// onPressed: () {
  462 +// NavigatorUtil
  463 +// .goCouponPage(
  464 +// context,
  465 +// needRefrsh:
  466 +// true);
  467 +// },
  468 +// ),
  469 +// )
  470 +// : Container()
  471 +// ],
  472 +// )),
  473 +// HEmptyView(10),
  474 +// Spacer(),
  475 +// Container(
  476 +// padding: EdgeInsets.only(
  477 +// top: ScreenUtil()
  478 +// .setWidth(37 * 2)),
  479 +// // height: ScreenUtil()
  480 +// // .setWidth(200 * 2),
  481 +// child: Column(
  482 +// mainAxisAlignment:
  483 +// MainAxisAlignment.start,
  484 +// crossAxisAlignment:
  485 +// CrossAxisAlignment.end,
  486 +// children: [
  487 +// // VEmptyView(60),
  488 +// GestureDetector(
  489 +// behavior: HitTestBehavior
  490 +// .opaque,
  491 +// onTap: () {
  492 +// _goBaseInfoPage();
  493 +// },
  494 +// child: Container(
  495 +// width: ScreenUtil()
  496 +// .setWidth(120 * 2),
  497 +// height: ScreenUtil()
  498 +// .setWidth(42 * 2),
  499 +// child: Text(
  500 +// name,
  501 +// overflow: TextOverflow
  502 +// .ellipsis,
  503 +// textAlign:
  504 +// TextAlign.right,
  505 +// style: TextStyle(
  506 +// color: MyColours
  507 +// .color_333333,
  508 +// fontSize:
  509 +// ScreenUtil()
  510 +// .setSp(
  511 +// 60)),
  512 +// ),
  513 +// ),
  514 +// ),
  515 +// // VEmptyView(6),
  516 +// InkWell(
  517 +// onTap: () {
  518 +// _goBaseInfoPage();
  519 +// },
  520 +// child: Container(
  521 +// width: ScreenUtil()
  522 +// .setWidth(
  523 +// 120 * 2),
  524 +// height: ScreenUtil()
  525 +// .setWidth(22 * 2),
  526 +// child: Text(
  527 +// phone,
  528 +// overflow:
  529 +// TextOverflow
  530 +// .ellipsis,
  531 +// textAlign:
  532 +// TextAlign.right,
  533 +// style: TextStyle(
  534 +// color: phone ==
  535 +// '填写电话'
  536 +// ? MyColours
  537 +// .color_999999
  538 +// : MyColours
  539 +// .color_333333,
  540 +// fontSize:
  541 +// ScreenUtil()
  542 +// .setSp(
  543 +// 32)),
  544 +// ),
  545 +// )),
  546 +// // VEmptyView(6),
  547 +// InkWell(
  548 +// onTap: () {
  549 +// _goBaseInfoPage();
  550 +// },
  551 +// child: Container(
  552 +// width: ScreenUtil()
  553 +// .setWidth(
  554 +// 120 * 2),
  555 +// height: ScreenUtil()
  556 +// .setWidth(24 * 2),
  557 +// child: Text(
  558 +// position,
  559 +// overflow:
  560 +// TextOverflow
  561 +// .ellipsis,
  562 +// textAlign:
  563 +// TextAlign.right,
  564 +// style: TextStyle(
  565 +// color: MyColours
  566 +// .color_333333,
  567 +// fontSize:
  568 +// ScreenUtil()
  569 +// .setSp(
  570 +// 34)),
  571 +// ),
  572 +// )),
  573 +
  574 +// RoundButton(
  575 +// // width: ScreenUtil().setWidth(95),
  576 +// height: ScreenUtil()
  577 +// .setWidth(60 * 2),
  578 +// image: Utils.getImgPath(
  579 +// 'yd_bianji'),
  580 +// imgWidth: 24,
  581 +// radius: 0,
  582 +// space: ScreenUtil()
  583 +// .setWidth(20),
  584 +// text: '编辑',
  585 +// textColor: MyColours
  586 +// .color_199095,
  587 +// isBold: false,
  588 +// fontSize: 28,
  589 +// gradientStart:
  590 +// Colors.transparent,
  591 +// gradientEnd:
  592 +// Colors.transparent,
  593 +// onPressed: () {
  594 +// _goBaseInfoPage();
  595 +// },
  596 +// )
  597 +// ],
  598 +// )),
  599 +// HEmptyView(60),
  600 +// ],
  601 +// )),
  602 +// // Positioned(
  603 +// // bottom: 0,
  604 +// // child: Container(
  605 +// // color: MyColours.color_EEDBC4,
  606 +// // width: double.infinity,
  607 +// // height:
  608 +// // ScreenUtil().setWidth(40),
  609 +// // ))
  610 +// // ],
  611 +// // ),
  612 +// // Container(
  613 +// // color: MyColours.color_EEDBC4,
  614 +// // width: double.infinity,
  615 +// // height: ScreenUtil().setWidth(40),
  616 +// // ),
  617 +// VEmptyView(76),
  618 +// // Image.asset(
  619 +// // "assets/yd_up.png",
  620 +// // width: ScreenUtil().setWidth(195 * 2),
  621 +// // height:
  622 +// // ScreenUtil().setHeight(33 * 2),
  623 +// // ),
  624 +// // VEmptyView(50),
  625 +
  626 +// RepaintBoundary(
  627 +// key: globalKey,
  628 +// child: Container(
  629 +// padding: EdgeInsets.fromLTRB(
  630 +// ScreenUtil().setWidth(10),
  631 +// ScreenUtil().setWidth(10),
  632 +// ScreenUtil().setWidth(10),
  633 +// ScreenUtil().setWidth(40)),
  634 +// // color: Colors.red,
  635 +// child: Column(
  636 +// children: [
  637 +// Container(
  638 +// height: ScreenUtil().setWidth(58),
  639 +// child: Text(
  640 +// user.sellername,
  641 +// style: TextStyle(
  642 +// // letterSpacing: ScreenUtil()
  643 +// // .setWidth(2.13 * 2),
  644 +// color:
  645 +// MyColours.color_333333,
  646 +// // fontWeight: FontWeight.bold,
  647 +// fontSize:
  648 +// ScreenUtil().setSp(42)),
  649 +// ),
  650 +// ),
  651 +// VEmptyView(14),
  652 +// Container(
  653 +// height: ScreenUtil().setWidth(58),
  654 +// child: Text(
  655 +// '${dateTimeStr}',
  656 +// style: TextStyle(
  657 +// letterSpacing: ScreenUtil()
  658 +// .setWidth(1.8 * 2),
  659 +// color:
  660 +// MyColours.color_333333,
  661 +// fontSize:
  662 +// ScreenUtil().setSp(42)),
  663 +// ),
  664 +// ),
  665 +// VEmptyView(26),
  666 +// Container(
  667 +// height: ScreenUtil().setWidth(44),
  668 +// child: Text(
  669 +// '已为您安排在包间',
  670 +// style: TextStyle(
  671 +// color:
  672 +// MyColours.color_666666,
  673 +// fontSize:
  674 +// ScreenUtil().setSp(32)),
  675 +// ),
  676 +// ),
  677 +// VEmptyView(28),
  678 +// GestureDetector(
  679 +// onTapDown: (TapDownDetails
  680 +// details) =>
  681 +// onTapDown(context, details),
  682 +// child: Container(
  683 +// child: Stack(
  684 +// alignment:
  685 +// Alignment.bottomCenter,
  686 +// overflow: Overflow.visible,
  687 +// children: [
  688 +// Container(
  689 +// margin: EdgeInsets.only(
  690 +// bottom: ScreenUtil()
  691 +// .setWidth(24)),
  692 +// constraints: BoxConstraints(
  693 +// maxWidth: ScreenUtil()
  694 +// .setWidth(
  695 +// 195 * 2)),
  696 +// padding:
  697 +// EdgeInsets.fromLTRB(
  698 +// ScreenUtil()
  699 +// .setWidth(60),
  700 +// ScreenUtil()
  701 +// .setWidth(30),
  702 +// ScreenUtil()
  703 +// .setWidth(60),
  704 +// ScreenUtil()
  705 +// .setWidth(
  706 +// 24 * 2)),
  707 +// decoration: BoxDecoration(
  708 +// borderRadius: BorderRadius.all(
  709 +// Radius.circular(
  710 +// ScreenUtil()
  711 +// .setWidth(
  712 +// 13 *
  713 +// 2))),
  714 +// border: Border.all(
  715 +// color: MyColours
  716 +// .color_199095,
  717 +// width:
  718 +// ScreenUtil()
  719 +// .setWidth(
  720 +// 4))),
  721 +// child: Text(
  722 +// widget.tableInfo
  723 +// .replaceAll(
  724 +// "\n", ""),
  725 +// style: TextStyle(
  726 +// // letterSpacing: ScreenUtil()
  727 +// // .setWidth(2.13 * 2),
  728 +// color: MyColours
  729 +// .color_333333,
  730 +// fontWeight:
  731 +// FontWeight.bold,
  732 +// fontSize:
  733 +// ScreenUtil()
  734 +// .setSp(52)),
  735 +// ),
  736 +// ),
  737 +// Positioned(
  738 +// key: key,
  739 +// bottom: 0,
  740 +// child: RoundButton(
  741 +// onPressed: () {
  742 +// _seePhoto();
  743 +// },
  744 +// text: '浏览照片',
  745 +// width: ScreenUtil()
  746 +// .setWidth(68 * 2),
  747 +// height: ScreenUtil()
  748 +// .setWidth(24 * 2),
  749 +// fontSize: 26,
  750 +// textColor: _baseIndoProvider
  751 +// .photoList
  752 +// .length >
  753 +// 0
  754 +// ? MyColours
  755 +// .color_ffffff
  756 +// : MyColours
  757 +// .color_999999,
  758 +// isBold: false,
  759 +// gradientStart: _baseIndoProvider
  760 +// .photoList
  761 +// .length >
  762 +// 0
  763 +// ? MyColours
  764 +// .color_199095
  765 +// : MyColours
  766 +// .color_E0E0E0,
  767 +// gradientEnd: _baseIndoProvider
  768 +// .photoList
  769 +// .length >
  770 +// 0
  771 +// ? MyColours
  772 +// .color_199095
  773 +// : MyColours
  774 +// .color_E0E0E0,
  775 +// ))
  776 +// ],
  777 +// ))),
  778 +// ],
  779 +// ),
  780 +// ),
  781 +// ),
  782 +
  783 +// VEmptyView(30),
  784 +// Container(
  785 +// // height: ScreenUtil().setWidth(40),
  786 +// child: Text(
  787 +// '${user.sellerAddr}',
  788 +// maxLines: 3,
  789 +// overflow: TextOverflow.ellipsis,
  790 +// textAlign: TextAlign.center,
  791 +// style: TextStyle(
  792 +// color: MyColours.color_333333,
  793 +// fontSize: ScreenUtil().setSp(28)),
  794 +// ),
  795 +// ),
  796 +// // VEmptyView(20),
  797 +// // RoundButton(
  798 +// // text: '一键导航',
  799 +// // width: ScreenUtil().setWidth(68 * 2),
  800 +// // height: ScreenUtil().setWidth(24 * 2),
  801 +// // fontSize: 24,
  802 +// // textColor: MyColours.color_794F28,
  803 +// // isBold: false,
  804 +// // gradientStart:
  805 +// // Color.fromRGBO(121, 79, 40, 0.1),
  806 +// // gradientEnd:
  807 +// // Color.fromRGBO(121, 79, 40, 0.1),
  808 +// // ),
  809 +// // VEmptyView(50),
  810 +// // Image.asset(
  811 +// // "assets/yd_down.png",
  812 +// // width: ScreenUtil().setWidth(195 * 2),
  813 +// // height:
  814 +// // ScreenUtil().setHeight(33 * 2),
  815 +// // ),
  816 +// // VEmptyView(60),
  817 +// ],
  818 +// ),
  819 +// )
  820 +// ],
  821 +// ),
  822 +// ),
  823 +// VEmptyView(couponHeight),
  824 +// ])),
  825 +// Padding(
  826 +// padding: EdgeInsets.fromLTRB(
  827 +// ScreenUtil().setWidth(70),
  828 +// ScreenUtil().setWidth(20),
  829 +// ScreenUtil().setWidth(70),
  830 +// ScreenUtil().setWidth(40)),
  831 +// child: Column(children: [
  832 +// RoundButton(
  833 +// text: '微信通知',
  834 +// width: double.infinity,
  835 +// height: ScreenUtil().setWidth(84),
  836 +// gradientStart: MyColours.color_199095,
  837 +// gradientEnd: MyColours.color_199095,
  838 +// textColor: MyColours.color_ffffff,
  839 +// fontSize: 34,
  840 +// radius: ScreenUtil().setWidth(10),
  841 +// isBold: false,
  842 +// onPressed: () async {
  843 +// // Uint8List image = await _getImage();
  844 +// print(widget.rid);
  845 +// print(Provider.of<UserModel>(context, listen: false)
  846 +// .user
  847 +// .openid);
  848 +// // if (ObjectUtil.isEmpty(
  849 +// // _baseIndoProvider.baseInfoSunModel)) {
  850 +// // Utils.showToast('请输入个人资料');
  851 +// // return;
  852 +// // }
  853 +// // if (ObjectUtil.isEmpty(
  854 +// // _baseIndoProvider.baseInfoSunModel.name)) {
  855 +// // Utils.showToast('请填写您的姓名');
  856 +// // return;
  857 +// // }
  858 +// if (ObjectUtil.isEmpty(
  859 +// _baseIndoProvider.baseInfoSunModel) ||
  860 +// ObjectUtil.isEmpty(
  861 +// _baseIndoProvider.baseInfoSunModel.phone)) {
  862 +// Utils.showToast('请填写您的联系电话');
  863 +// return;
  864 +// }
  865 +// // if (ObjectUtil.isEmpty(
  866 +// // _baseIndoProvider.baseInfoSunModel.position)) {
  867 +// // Utils.showToast('请填写您在餐厅中的职位');
  868 +// // return;
  869 +// // }
  870 +// // if (ObjectUtil.isEmpty(
  871 +// // _baseIndoProvider.baseInfoSunModel.phone)) {
  872 +// // Utils.showToast('请上传您的头像');
  873 +// // return;
  874 +// // }
  875 +// // if (ObjectUtil.isEmpty(
  876 +// // _baseIndoProvider.baseInfoSunModel.qrcode)) {
  877 +// // Utils.showToast('请上传您的微信二维码');
  878 +// // return;
  879 +// // }
  880 +// if (!couponProvider.hasModify &&
  881 +// couponProvider.coupons.length > 0) {
  882 +// Map<String, String> params = {
  883 +// "rid": widget.rid,
  884 +// "aid": Utils.listToStringEnglish(
  885 +// couponProvider.coupons)
  886 +// };
  887 +// bool isSuc = await couponProvider
  888 +// .setActivityAsReserve(context, params);
  889 +// if (isSuc) {
  890 +// couponProvider.hasModify = true;
  891 +
  892 +// bool isSuccess =
  893 +// await Utils.goShareInvicationToWeChat(
  894 +// widget.rid,
  895 +// Provider.of<UserModel>(context,
  896 +// listen: false)
  897 +// .user
  898 +// .openid);
  899 +// print(isSuccess);
  900 +// if (isSuccess) {
  901 +// _addForward();
  902 +// }
  903 +// // couponProvider.couponsShow = [];
  904 +// // couponProvider.couponsShow
  905 +// // .addAll(couponProvider.coupons);
  906 +// // couponProvider.coupons = [];
  907 +// // couponProvider.notifyListeners();
  908 +// }
  909 +// } else {
  910 +// bool isSuccess =
  911 +// await Utils.goShareInvicationToWeChat(
  912 +// widget.rid,
  913 +// Provider.of<UserModel>(context,
  914 +// listen: false)
  915 +// .user
  916 +// .openid);
  917 +// if (isSuccess) {
  918 +// _addForward();
  919 +// }
  920 +// }
  921 +// },
  922 +// ),
  923 +// VEmptyView(20),
  924 +// Stack(children: [
  925 +// Container(
  926 +// margin: EdgeInsets.only(
  927 +// top: ScreenUtil().setWidth(10),
  928 +// right: ScreenUtil().setWidth(6)),
  929 +// child: RoundButton(
  930 +// text: '发短信',
  931 +// width: double.infinity,
  932 +// height: ScreenUtil().setWidth(84),
  933 +// gradientStart: MyColours.color_ffffff,
  934 +// gradientEnd: MyColours.color_ffffff,
  935 +// textColor: MyColours.color_199095,
  936 +// borderColor: MyColours.color_199095,
  937 +// fontSize: 34,
  938 +// radius: ScreenUtil().setWidth(10),
  939 +// isBold: false,
  940 +// onPressed: () async {
  941 +// if (reserverPhone == null ||
  942 +// reserverPhone.isEmpty) {
  943 +// //跳转到录入联系人页面
  944 +// String temp =
  945 +// await NavigatorUtil.goEditReserverPage(
  946 +// context,
  947 +// widget.rid,
  948 +// widget.name,
  949 +// widget.sex,
  950 +// needBtn: true);
  951 +// if (temp != null) {
  952 +// reserverPhone = temp;
  953 +// }
  954 +// } else if (!Utils.phoneRegExp(
  955 +// reserverPhone)) {
  956 +// Utils.showToast('手机号错误,请修改正确');
  957 +// //跳转到录入联系人页面
  958 +// String temp =
  959 +// await NavigatorUtil.goEditReserverPage(
  960 +// context,
  961 +// widget.rid,
  962 +// widget.name,
  963 +// widget.sex,
  964 +// needBtn: true);
  965 +// if (temp != null) {
  966 +// reserverPhone = temp;
  967 +// }
  968 +// } else {
  969 +// if (!couponProvider.sendSMS) {
  970 +// /*
  971 +// String dateSoltStr = '';
  972 +// if (widget.dateSolt == '1') {
  973 +// dateSoltStr = '早餐';
  974 +// } else if (widget.dateSolt == '2') {
  975 +// dateSoltStr = '午餐';
  976 +// } else if (widget.dateSolt == '3') {
  977 +// dateSoltStr = '晚餐';
  978 +// }
  979 +// DateTime dateTimeTemp =
  980 +// DateTime.fromMillisecondsSinceEpoch(
  981 +// int.parse(widget.ddate) * 1000);
  982 +// String dateTimeStrTemp =
  983 +// "${Utils.addZeroNumber(dateTimeTemp.month)}月${Utils.addZeroNumber(dateTimeTemp.day)}日";
  984 +// Map<String, String> params = {
  985 +// "id": widget.rid,
  986 +// "uid": Provider.of<UserModel>(context,
  987 +// listen: false)
  988 +// .user
  989 +// .openid,
  990 +// "phone": widget.phone,
  991 +
  992 +// // "Strtext": user.sellername +
  993 +// // dateTimeStrTemp +
  994 +// // dateSoltStr +
  995 +// // ',' +
  996 +// // '餐厅经理' +
  997 +// // _baseIndoProvider.baseInfoSunModel.name +
  998 +// // '已为您安排在' +
  999 +// // widget.tableInfo.replaceAll("\n", "")
  1000 +// };
  1001 +// if (ObjectUtil.isNotEmpty(_baseIndoProvider
  1002 +// .baseInfoSunModel) &&
  1003 +// ObjectUtil.isNotEmpty(_baseIndoProvider
  1004 +// .baseInfoSunModel.name)) {
  1005 +// params['Strtext'] = user.sellername +
  1006 +// _baseIndoProvider
  1007 +// .baseInfoSunModel.name;
  1008 +// } else {
  1009 +// params['Strtext'] = user.sellername;
  1010 +// }
  1011 +// */
  1012 +// UserModel userModel =
  1013 +// Provider.of<UserModel>(context,
  1014 +// listen: false);
  1015 +// Map<String, String> params = {
  1016 +// "rid": widget.rid,
  1017 +// "sid": userModel.user.sellerid
  1018 +// };
  1019 +// bool success = await couponProvider
  1020 +// .sendSMSWxSendSms(context, params);
  1021 +// print(success);
  1022 +// // if (success) {
  1023 +// // Utils.showToast('短信已经发送成功!');
  1024 +// // } else {
  1025 +// // Utils.showToast('发送次数太频繁!');
  1026 +// // }
  1027 +// } else {
  1028 +// Utils.showToast('短信已经发送成功!');
  1029 +// }
  1030 +// }
  1031 +
  1032 +// // _sendSms();
  1033 +
  1034 +// // NavigatorUtil.goSmsPage(context, widget.rid);
  1035 +// },
  1036 +// )),
  1037 +// Positioned(
  1038 +// top: 0,
  1039 +// right: 0,
  1040 +// child: Container(
  1041 +// // padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(16),vertical: ScreenUtil().setWidth(4)),
  1042 +// padding: EdgeInsets.only(
  1043 +// bottom: ScreenUtil().setWidth(6)),
  1044 +// alignment: Alignment.center,
  1045 +// width: ScreenUtil().setWidth(62 * 2),
  1046 +// height: ScreenUtil().setWidth(42),
  1047 +// decoration: BoxDecoration(
  1048 +// // color: Colors.red,
  1049 +// image: DecorationImage(
  1050 +// image: ExactAssetImage(
  1051 +// Utils.getImgPath('sms_bg'),
  1052 +// ),
  1053 +// fit: BoxFit.cover,
  1054 +// ),
  1055 +// ),
  1056 +// child: Text(
  1057 +// '免费短信',
  1058 +// style: TextStyle(
  1059 +// color: MyColours.color_fefefe,
  1060 +// fontSize: ScreenUtil().setSp(24)),
  1061 +// )),
  1062 +// )
  1063 +// ])
  1064 +// ])),
  1065 +// ]),
  1066 +// Positioned(
  1067 +// // left: ScreenUtil().setWidth(180),
  1068 +// bottom: ScreenUtil().setWidth(124 * 2),
  1069 +// right: ScreenUtil().setWidth(52 * 2),
  1070 +// child: couponProvider.hasModify ||
  1071 +// couponProvider.coupons.length > 0 ||
  1072 +// couponProvider.couponListSelect.length > 0
  1073 +// ? GestureDetector(
  1074 +// onTap: () async {
  1075 +// NavigatorUtil.goCouponSelectPage(context,
  1076 +// from: 'other',
  1077 +// hasModify: couponProvider.hasModify);
  1078 +// },
  1079 +// behavior: HitTestBehavior.opaque,
  1080 +// child: Column(
  1081 +// crossAxisAlignment: CrossAxisAlignment.center,
  1082 +// children: [
  1083 +// Container(
  1084 +// padding: EdgeInsets.symmetric(
  1085 +// horizontal: ScreenUtil().setWidth(40),
  1086 +// vertical: ScreenUtil().setWidth(16)),
  1087 +// height: ScreenUtil().setWidth(35 * 2),
  1088 +// decoration: BoxDecoration(
  1089 +// color: Color.fromRGBO(0, 0, 0, 0.5),
  1090 +// borderRadius: BorderRadius.circular(
  1091 +// ScreenUtil().setWidth(20))),
  1092 +// child: Row(
  1093 +// children: [
  1094 +// Text(
  1095 +// '并赠送给顾客${couponProvider.coupons.length}张优惠券',
  1096 +// textAlign: TextAlign.center,
  1097 +// style: TextStyle(
  1098 +// color: MyColours.color_f5f5f5,
  1099 +// fontWeight: FontWeight.bold,
  1100 +// fontSize: ScreenUtil().setSp(28),
  1101 +// ),
  1102 +// ),
  1103 +// HEmptyView(40),
  1104 +// RoundButton(
  1105 +// width: ScreenUtil().setWidth(124),
  1106 +// height: ScreenUtil().setWidth(46),
  1107 +// text: '点击查看',
  1108 +// textColor: MyColours.color_FDA31D,
  1109 +// fontSize: 24,
  1110 +// isBold: true,
  1111 +// radius: ScreenUtil().setWidth(10),
  1112 +// gradientStart: MyColours.color_f5f5f5,
  1113 +// gradientEnd: MyColours.color_f5f5f5,
  1114 +// onPressed: () async {
  1115 +// NavigatorUtil.goCouponSelectPage(
  1116 +// context,
  1117 +// from: 'other',
  1118 +// hasModify:
  1119 +// couponProvider.hasModify);
  1120 +// },
  1121 +// )
  1122 +// ],
  1123 +// )),
  1124 +// Image.asset(Utils.getImgPath('jian'),
  1125 +// width: ScreenUtil().setWidth(28),
  1126 +// height: ScreenUtil().setWidth(20))
  1127 +// ],
  1128 +// ))
  1129 +// : Container(),
  1130 +// )
  1131 +// ],
  1132 +// )));
  1133 +// }
  1134 +// }
@@ -23,6 +23,31 @@ class NoteBookItem extends StatefulWidget { @@ -23,6 +23,31 @@ class NoteBookItem extends StatefulWidget {
23 class NotebookItemState extends State<NoteBookItem> { 23 class NotebookItemState extends State<NoteBookItem> {
24 _onOperateClick() { 24 _onOperateClick() {
25 if (widget.notebook.operationText == "通知客户") { 25 if (widget.notebook.operationText == "通知客户") {
  26 + // String _nameStr = '';
  27 + // String _tid = '';
  28 + // for (int i = 0;
  29 + // i <
  30 + // detailEntity
  31 + // .tables.length;
  32 + // i++) {
  33 + // _nameStr +=
  34 + // '${detailEntity.tables[i].name},';
  35 +
  36 + // _tid +=
  37 + // '${detailEntity.tables[i].id},';
  38 + // }
  39 + // if (_tid.endsWith(',')) {
  40 + // _tid = _tid.substring(
  41 + // 0, _tid.length - 1);
  42 + // }
  43 + // if (_nameStr
  44 + // .endsWith(',')) {
  45 + // _nameStr =
  46 + // _nameStr.substring(
  47 + // 0,
  48 + // _nameStr.length -
  49 + // 1);
  50 + // }
26 NavigatorUtil.goInvicationPage( 51 NavigatorUtil.goInvicationPage(
27 context, 52 context,
28 widget.notebook.id, 53 widget.notebook.id,
@@ -250,7 +250,7 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -250,7 +250,7 @@ class TableManagerPageState extends State<TableManagerPage> {
250 shouldRebuild: (pre, next) => true, 250 shouldRebuild: (pre, next) => true,
251 selector: (context, model) => data[index], 251 selector: (context, model) => data[index],
252 builder: (context, table, _) { 252 builder: (context, table, _) {
253 - return FTableItem(table,canSelected: true, onSelected: (table) { 253 + return FTableItem(table, canSelected: true, onSelected: (table) {
254 if (table.signStr == '已预订') { 254 if (table.signStr == '已预订') {
255 //进入订座详情页面 255 //进入订座详情页面
256 NavigatorUtil.goNotebookDetailPage( 256 NavigatorUtil.goNotebookDetailPage(
@@ -645,20 +645,34 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -645,20 +645,34 @@ class TableManagerPageState extends State<TableManagerPage> {
645 convert.jsonDecode(_model.row.tableinfo); 645 convert.jsonDecode(_model.row.tableinfo);
646 print(tableinfo); 646 print(tableinfo);
647 647
648 - String _nameStr =  
649 - table.TableList.fromJson(tableinfo[0]).name;  
650 - if (tableinfo.length > 1) {  
651 - _nameStr = table.TableList.fromJson(tableinfo[0]).name +  
652 - '等${tableinfo.length}桌';  
653 - }  
654 - LogUtil.v(_nameStr); 648 + // String _nameStr =
  649 + // table.TableList.fromJson(tableinfo[0]).name;
  650 + // if (tableinfo.length > 1) {
  651 + // _nameStr = table.TableList.fromJson(tableinfo[0]).name +
  652 + // '等${tableinfo.length}桌';
  653 + // }
  654 + // LogUtil.v(_nameStr);
  655 + // String _tid = '';
  656 + // for (int i = 0; i < tableinfo.length; i++) {
  657 + // _tid += '${table.TableList.fromJson(tableinfo[i]).id},';
  658 + // }
  659 + // if (_tid.endsWith(',')) {
  660 + // _tid = _tid.substring(0, _tid.length - 1);
  661 + // }
  662 + String _nameStr = '';
655 String _tid = ''; 663 String _tid = '';
656 for (int i = 0; i < tableinfo.length; i++) { 664 for (int i = 0; i < tableinfo.length; i++) {
  665 + _nameStr +=
  666 + '${table.TableList.fromJson(tableinfo[i]).name},';
  667 +
657 _tid += '${table.TableList.fromJson(tableinfo[i]).id},'; 668 _tid += '${table.TableList.fromJson(tableinfo[i]).id},';
658 } 669 }
659 if (_tid.endsWith(',')) { 670 if (_tid.endsWith(',')) {
660 _tid = _tid.substring(0, _tid.length - 1); 671 _tid = _tid.substring(0, _tid.length - 1);
661 } 672 }
  673 + if (_nameStr.endsWith(',')) {
  674 + _nameStr = _nameStr.substring(0, _nameStr.length - 1);
  675 + }
662 NavigatorUtil.goInvicationPage( 676 NavigatorUtil.goInvicationPage(
663 context, 677 context,
664 _model.row.id, 678 _model.row.id,
@@ -4,6 +4,7 @@ import 'package:one_key/constant/error.dart'; @@ -4,6 +4,7 @@ import 'package:one_key/constant/error.dart';
4 import 'package:one_key/models/base_info_model.dart'; 4 import 'package:one_key/models/base_info_model.dart';
5 import 'package:one_key/models/seller_phone_model.dart'; 5 import 'package:one_key/models/seller_phone_model.dart';
6 import 'package:one_key/models/table_photo_model.dart'; 6 import 'package:one_key/models/table_photo_model.dart';
  7 +import 'package:one_key/models/user_history_entity.dart';
7 import 'package:one_key/net/base_resp.dart'; 8 import 'package:one_key/net/base_resp.dart';
8 import 'package:one_key/net/dio_util.dart'; 9 import 'package:one_key/net/dio_util.dart';
9 import 'package:one_key/net/http_url.dart'; 10 import 'package:one_key/net/http_url.dart';
@@ -15,6 +16,55 @@ class BaseIndoProvider with ChangeNotifier { @@ -15,6 +16,55 @@ class BaseIndoProvider with ChangeNotifier {
15 BaseInfoSunModel baseInfoSunModel; //客户经理基础信息 16 BaseInfoSunModel baseInfoSunModel; //客户经理基础信息
16 List<String> photoList = []; //商家图片信息 17 List<String> photoList = []; //商家图片信息
17 18
  19 + TextEditingController phoneController = TextEditingController();
  20 + TextEditingController nameController = TextEditingController();
  21 + List sexList;
  22 + List<UserHistoryEntity> userHistorys = []; //历史录入
  23 + BaseIndoProvider() {
  24 + initSexList();
  25 + }
  26 +
  27 + ///称谓
  28 + initSexList() {
  29 + String sexStr = '1';
  30 + sexList = [
  31 + {
  32 + 'title': '先生',
  33 + 'select': sexStr == '1' ? true : false,
  34 + 'code': '1',
  35 + 'hasLeftBorder': true
  36 + },
  37 + {
  38 + 'title': '女士',
  39 + 'select': sexStr == '2' ? true : false,
  40 + 'code': '2',
  41 + 'hasLeftBorder': false
  42 + },
  43 + {
  44 + 'title': '公司',
  45 + 'select': sexStr == '3' ? true : false,
  46 + 'code': '3',
  47 + 'hasLeftBorder': false
  48 + }
  49 + ];
  50 + }
  51 +
  52 + //获取历史录入
  53 + getUserHistorys(BuildContext context, Map<String, String> params) async {
  54 + BaseResp<List> baseResp = await DioUtil()
  55 + .request<List>(context, Method.get, HttpUrl.get_reserve_user,
  56 + data: params, showLoading: false)
  57 + .catchError((error) {
  58 + print(error.toString());
  59 + });
  60 + if (baseResp != null && baseResp.code == Constant.status_success) {
  61 + userHistorys = baseResp.data.map<UserHistoryEntity>((value) {
  62 + return UserHistoryEntity.fromJson(value);
  63 + }).toList();
  64 + notifyListeners();
  65 + }
  66 + }
  67 +
18 ///客户经理添加/修改基本信息 68 ///客户经理添加/修改基本信息
19 Future<dynamic> setCustomerActivityBaseinfo( 69 Future<dynamic> setCustomerActivityBaseinfo(
20 BuildContext context, Map<String, String> params, 70 BuildContext context, Map<String, String> params,
@@ -116,7 +166,7 @@ class BaseIndoProvider with ChangeNotifier { @@ -116,7 +166,7 @@ class BaseIndoProvider with ChangeNotifier {
116 // } 166 // }
117 // } 167 // }
118 168
119 - ///App获取多个桌位关联图片 169 + ///App获取多个桌位关联图片
120 Future<dynamic> getTablesPhoto( 170 Future<dynamic> getTablesPhoto(
121 BuildContext context, Map<String, String> params, 171 BuildContext context, Map<String, String> params,
122 {isShowLoading = true}) async { 172 {isShowLoading = true}) async {
@@ -250,6 +250,73 @@ class CouponProvider with ChangeNotifier { @@ -250,6 +250,73 @@ class CouponProvider with ChangeNotifier {
250 return couponListHistory; 250 return couponListHistory;
251 } 251 }
252 252
  253 + ///客户经理获取所创建活动列表(选择优惠券)
  254 + Future<List<CouponSunModel>> getCustomerSelectActivityNew(
  255 + BuildContext context, Map<String, String> params,
  256 + {isShowLoading = true}) async {
  257 + if (isShowLoading) {
  258 + pageStateSelect = PageState.Loading;
  259 + notifyListeners();
  260 + }
  261 + BaseResp<dynamic> baseResp = await DioUtil()
  262 + .request<dynamic>(context, Method.get, HttpUrl.get_customer_activity,
  263 + data: params, showLoading: false)
  264 + .catchError((error) {
  265 + print(error.toString());
  266 + if (error is MyError) {
  267 + switch (error.type) {
  268 + case 1:
  269 + pageStateSelect = PageState.ConnectivityError;
  270 + break;
  271 + case 2:
  272 + pageStateSelect = PageState.ConnectivityTimeOut;
  273 + break;
  274 + default:
  275 + pageStateSelect = PageState.ConnectivityError;
  276 + break;
  277 + }
  278 + }
  279 + notifyListeners();
  280 + });
  281 + if (baseResp.code == Constant.status_success) {
  282 + if (baseResp.data.isEmpty) {
  283 + pageStateSelect = PageState.Empty;
  284 + } else {
  285 + pageStateSelect = PageState.Success;
  286 + }
  287 + couponListSelect = CouponModel.fromJson(baseResp.responseData).data;
  288 + if (hasModify) {
  289 + //已经绑定
  290 + List<CouponSunModel> temp = [];
  291 + for (int i = 0; i < couponListSelect.length; i++) {
  292 + for (int j = 0; j < coupons.length; j++) {
  293 + if (couponListSelect[i].id == coupons[j]) {
  294 + temp.add(couponListSelect[i]);
  295 + }
  296 + }
  297 + }
  298 + couponListSelect = temp;
  299 + } else {
  300 + for (int i = 0; i < couponListSelect.length; i++) {
  301 + for (int j = 0; j < coupons.length; j++) {
  302 + if (couponListSelect[i].id == coupons[j]) {
  303 + couponListSelect[i].isCheck = true;
  304 + }
  305 + }
  306 + }
  307 + }
  308 +
  309 + getCheckValue();
  310 + notifyListeners();
  311 + } else {
  312 + pageStateSelect = PageState.ConnectivityError;
  313 + if (baseResp != null) {
  314 + Utils.showToast(baseResp.msg ?? "");
  315 + }
  316 + }
  317 + return couponListSelect;
  318 + }
  319 +
253 ///客户经理获取所创建活动列表(选择优惠券) 320 ///客户经理获取所创建活动列表(选择优惠券)
254 Future<List<CouponSunModel>> getCustomerSelectActivity( 321 Future<List<CouponSunModel>> getCustomerSelectActivity(
255 BuildContext context, Map<String, String> params, 322 BuildContext context, Map<String, String> params,
@@ -162,14 +162,18 @@ class NavigatorUtil { @@ -162,14 +162,18 @@ class NavigatorUtil {
162 162
163 /// 变更预订——方硕新修改页面 163 /// 变更预订——方硕新修改页面
164 static void goNoteBookChangeFPage( 164 static void goNoteBookChangeFPage(
165 - BuildContext context, NotebookDetail detailEntity, String rid,  
166 - {replace = false}) { 165 + BuildContext context,
  166 + NotebookDetail detailEntity,
  167 + String rid, {
  168 + replace = false,
  169 + bool back = false,
  170 + }) {
167 if (detailEntity.type == "0") { 171 if (detailEntity.type == "0") {
168 //内部预订 172 //内部预订
169 detailEntity.is_set_ddate = "1"; 173 detailEntity.is_set_ddate = "1";
170 } 174 }
171 _navigateTo(context, 175 _navigateTo(context,
172 - "${Routes.change_detail_f}?detail=${FluroConvertUtils.object2string(detailEntity)}&rid=$rid", 176 + "${Routes.change_detail_f}?detail=${FluroConvertUtils.object2string(detailEntity)}&rid=$rid&back=${back}",
173 replace: replace); 177 replace: replace);
174 } 178 }
175 179
@@ -322,11 +322,16 @@ var noteBookChangeFPageHandle = new Handler( @@ -322,11 +322,16 @@ var noteBookChangeFPageHandle = new Handler(
322 NotebookDetail detailEntity = NotebookDetail.fromJson(json 322 NotebookDetail detailEntity = NotebookDetail.fromJson(json
323 .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first))); 323 .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first)));
324 String rid = params['rid'].first; 324 String rid = params['rid'].first;
  325 + bool back = FluroConvertUtils.string2bool(params["back"].first);
325 return ChangeNotifierProvider<NotebookDetailChangeModel>( 326 return ChangeNotifierProvider<NotebookDetailChangeModel>(
326 create: (_) => NotebookDetailChangeModel(detailEntity), 327 create: (_) => NotebookDetailChangeModel(detailEntity),
327 child: ChangeNotifierProvider<RemarkManagerModel>( 328 child: ChangeNotifierProvider<RemarkManagerModel>(
328 create: (_) => RemarkManagerModel(), 329 create: (_) => RemarkManagerModel(),
329 - child: NoteBookChangeFPage(detailEntity: detailEntity, rid: rid))); 330 + child: NoteBookChangeFPage(
  331 + detailEntity: detailEntity,
  332 + rid: rid,
  333 + back: back,
  334 + )));
330 }); 335 });
331 336
332 // 跳转可订时段管理页面 337 // 跳转可订时段管理页面