|
|
|
// import 'package:cached_network_image/cached_network_image.dart';
|
|
|
|
// import 'package:common_utils/common_utils.dart';
|
|
|
|
// import 'package:flutter/material.dart';
|
|
|
|
// import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
// import 'package:one_key/models/seller_phone_model.dart';
|
|
|
|
// import 'package:one_key/models/user.dart';
|
|
|
|
// import 'package:one_key/pages/online_check/photo_view_wiget.dart';
|
|
|
|
// import 'package:one_key/provider/base_info_provider.dart';
|
|
|
|
// import 'package:one_key/provider/coupon_provider.dart';
|
|
|
|
// import 'package:one_key/provider/user_model.dart';
|
|
|
|
// import 'package:one_key/res/colors.dart';
|
|
|
|
// import 'package:one_key/utils/navigator_util.dart';
|
|
|
|
// import 'package:one_key/utils/utils.dart';
|
|
|
|
// import 'package:one_key/widgets/h_empty_view.dart';
|
|
|
|
// import 'package:one_key/widgets/round_button.dart';
|
|
|
|
// import 'package:one_key/widgets/v_empty_view.dart';
|
|
|
|
// import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
// class InvicationPage extends StatefulWidget {
|
|
|
|
// final String rid; //预订订单id
|
|
|
|
// final String tableInfo; //桌位信息
|
|
|
|
// final String ddate;
|
|
|
|
// final String ddateStr;
|
|
|
|
// final String phone;
|
|
|
|
|
|
|
|
// InvicationPage(
|
|
|
|
// this.rid, this.tableInfo, this.ddate, this.ddateStr, this.phone);
|
|
|
|
|
|
|
|
// @override
|
|
|
|
// State<StatefulWidget> createState() {
|
|
|
|
// // TODO: implement createState
|
|
|
|
// return new InvicationPageState();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// class InvicationPageState extends State<InvicationPage> {
|
|
|
|
// User user;
|
|
|
|
// DateTime dateTime;
|
|
|
|
// String dateTimeStr = "";
|
|
|
|
// ScrollController controller = ScrollController();
|
|
|
|
// double couponHeight = 180.0;
|
|
|
|
// CouponProvider couponProvider;
|
|
|
|
// BaseIndoProvider _baseIndoProvider;
|
|
|
|
// String name = '请填写姓名';
|
|
|
|
// String position = '请填写职位';
|
|
|
|
// String phone = '请填写电话';
|
|
|
|
// String qiniuUrl = '';
|
|
|
|
|
|
|
|
// @override
|
|
|
|
// void initState() {
|
|
|
|
// super.initState();
|
|
|
|
|
|
|
|
// WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
// _getActivityByRid();
|
|
|
|
// _getCustomerActivityBaseinfo();
|
|
|
|
// _getSellerPhotoById();
|
|
|
|
// });
|
|
|
|
// Utils.changeStatusColor(color: Colors.transparent);
|
|
|
|
// dateTime =
|
|
|
|
// DateTime.fromMillisecondsSinceEpoch(int.parse(widget.ddate) * 1000);
|
|
|
|
// user = Provider.of<UserModel>(context, listen: false).user;
|
|
|
|
// dateTimeStr =
|
|
|
|
// "${dateTime.year}/${Utils.addZeroNumber(dateTime.month)}/${Utils.addZeroNumber(dateTime.day)} 星期${Utils.formatWeekDayNum(dateTime.weekday)} ${widget.ddateStr}";
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _getSellerPhotoById() async {
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
// "type": '2',
|
|
|
|
// };
|
|
|
|
// bool success = await _baseIndoProvider.getSellerPhotoById(context, params);
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _getCustomerActivityBaseinfo() async {
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
// };
|
|
|
|
// bool success =
|
|
|
|
// await _baseIndoProvider.getCustomerActivityBaseinfo(context, params);
|
|
|
|
// if (success) {
|
|
|
|
// name = _baseIndoProvider.baseInfoSunModel.name;
|
|
|
|
// qiniuUrl = _baseIndoProvider.baseInfoSunModel.photo;
|
|
|
|
// // _uploadImageProvider.erweima.qiniuUrl =
|
|
|
|
// // _baseIndoProvider.baseInfoSunModel.qrcode;
|
|
|
|
// phone = _baseIndoProvider.baseInfoSunModel.phone;
|
|
|
|
// position = _baseIndoProvider.baseInfoSunModel.position;
|
|
|
|
// setState(() {});
|
|
|
|
// } else {
|
|
|
|
// // name = '请填写姓名';
|
|
|
|
// // position = '请填写职位';
|
|
|
|
// // phone = '请填写电话';
|
|
|
|
// // qiniuUrl = '';
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _getActivityByRid() async {
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// "rid": widget.rid,
|
|
|
|
// };
|
|
|
|
// await couponProvider.getActivityByRid(context, params, isShowLoading: true);
|
|
|
|
// //flase默认5个 true 不默认5个
|
|
|
|
// if (!couponProvider.hasModify) {
|
|
|
|
// //没有绑定的券,默认给5个,获取优惠券列表
|
|
|
|
// _couponNetworkData(isShowLoading: true);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ///消费券默认5张
|
|
|
|
// _couponNetworkData({bool isShowLoading = true}) async {
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
// 'status': '1'
|
|
|
|
// };
|
|
|
|
// await couponProvider.getCustomerSelectActivity(context, params,
|
|
|
|
// isShowLoading: isShowLoading);
|
|
|
|
// //此人已经新建好券
|
|
|
|
// if (couponProvider.couponListSelect.length > 0) {
|
|
|
|
// couponProvider.initCouponSelect(context);
|
|
|
|
|
|
|
|
// if (couponProvider.coupons.length == 0) {
|
|
|
|
// setState(() {
|
|
|
|
// couponHeight = 0;
|
|
|
|
// });
|
|
|
|
// } else {
|
|
|
|
// setState(() {
|
|
|
|
// couponHeight = 180.0;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// } else {
|
|
|
|
// //没有新建的优惠券
|
|
|
|
// setState(() {
|
|
|
|
// couponHeight = 0;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// @override
|
|
|
|
// void dispose() {
|
|
|
|
// Utils.changeStatusColor();
|
|
|
|
// couponProvider.clearSelect();
|
|
|
|
// super.dispose();
|
|
|
|
// }
|
|
|
|
|
|
|
|
// //中间内容显示组件
|
|
|
|
// Widget _middleWidget(String title, String content) {
|
|
|
|
// return Column(
|
|
|
|
// children: <Widget>[
|
|
|
|
// VEmptyView(80),
|
|
|
|
// Row(
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
// children: <Widget>[
|
|
|
|
// Image.asset(
|
|
|
|
// "assets/invication_line_left.png",
|
|
|
|
// width: ScreenUtil().setWidth(44),
|
|
|
|
// height: ScreenUtil().setWidth(4),
|
|
|
|
// ),
|
|
|
|
// Container(
|
|
|
|
// margin:
|
|
|
|
// EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(13)),
|
|
|
|
// child: Text(title,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_CEB689,
|
|
|
|
// fontSize: ScreenUtil().setSp(28))),
|
|
|
|
// ),
|
|
|
|
// Image.asset(
|
|
|
|
// "assets/invication_line_right.png",
|
|
|
|
// width: ScreenUtil().setWidth(44),
|
|
|
|
// height: ScreenUtil().setWidth(4),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// Container(
|
|
|
|
// margin: EdgeInsets.only(top: ScreenUtil().setHeight(20)),
|
|
|
|
// child: Text(
|
|
|
|
// content,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_F2F2F2,
|
|
|
|
// fontSize: ScreenUtil().setSp(36)),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// );
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _goBaseInfoPage() async {
|
|
|
|
// bool needRefresh = await NavigatorUtil.goBaseInfoPage(context);
|
|
|
|
// if (needRefresh != null && needRefresh) {
|
|
|
|
// //刷新页面数据
|
|
|
|
// _getCustomerActivityBaseinfo();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// //查看大图
|
|
|
|
// _showPhotoView(BuildContext context, int index, List imgs,
|
|
|
|
// {isShow = false, List dashName}) async {
|
|
|
|
// // if (imgs.length == 1 &&
|
|
|
|
// // imgs[0] ==
|
|
|
|
// // 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {
|
|
|
|
// // imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';
|
|
|
|
// // }
|
|
|
|
// Utils.setBarStatus(false, color: Colors.black);
|
|
|
|
// dynamic result = await showGeneralDialog(
|
|
|
|
// context: context,
|
|
|
|
// barrierDismissible: false,
|
|
|
|
// // barrierColor: Colors.red,
|
|
|
|
// barrierLabel:
|
|
|
|
// MaterialLocalizations.of(context).modalBarrierDismissLabel,
|
|
|
|
// transitionDuration: const Duration(milliseconds: 150),
|
|
|
|
// pageBuilder: (BuildContext context, Animation animation,
|
|
|
|
// Animation secondaryAnimation) {
|
|
|
|
// Widget child = Stack(
|
|
|
|
// children: <Widget>[
|
|
|
|
// PhotoPreview(
|
|
|
|
// initialIndex: index,
|
|
|
|
// photoList: imgs,
|
|
|
|
// isShow: isShow,
|
|
|
|
// dashName: dashName)
|
|
|
|
// ],
|
|
|
|
// );
|
|
|
|
// return child;
|
|
|
|
// });
|
|
|
|
// Utils.setBarStatus(true, color: Colors.white);
|
|
|
|
// }
|
|
|
|
|
|
|
|
// @override
|
|
|
|
// Widget build(BuildContext context) {
|
|
|
|
// // TODO: implement build
|
|
|
|
// _baseIndoProvider = Provider.of<BaseIndoProvider>(context, listen: true);
|
|
|
|
// couponProvider = Provider.of<CouponProvider>(context, listen: true);
|
|
|
|
// return Container(
|
|
|
|
// width: double.infinity,
|
|
|
|
// // height: double.infinity,
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// image: DecorationImage(
|
|
|
|
// image: AssetImage("assets/bg_invication.png"), fit: BoxFit.cover),
|
|
|
|
// ),
|
|
|
|
// child: Scaffold(
|
|
|
|
// backgroundColor: Colors.transparent,
|
|
|
|
// body: SafeArea(
|
|
|
|
// child: Stack(
|
|
|
|
// children: [
|
|
|
|
// Container(
|
|
|
|
// margin: EdgeInsets.only(top: ScreenUtil().setWidth(10 * 2)),
|
|
|
|
// padding:
|
|
|
|
// EdgeInsets.only(top: ScreenUtil().setWidth(35 * 2)),
|
|
|
|
// child: Column(children: [
|
|
|
|
// Expanded(
|
|
|
|
// child: ListView(
|
|
|
|
// controller: controller,
|
|
|
|
// physics: BouncingScrollPhysics(),
|
|
|
|
// children: <Widget>[
|
|
|
|
// Center(
|
|
|
|
// child: Column(
|
|
|
|
// children: <Widget>[
|
|
|
|
// Image.asset(
|
|
|
|
// "assets/img_ydap.png",
|
|
|
|
// width: ScreenUtil().setWidth(220 * 2),
|
|
|
|
// height: ScreenUtil().setHeight(98 * 2),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(10),
|
|
|
|
// Container(
|
|
|
|
// margin: EdgeInsets.symmetric(
|
|
|
|
// horizontal: ScreenUtil().setWidth(40)),
|
|
|
|
// // padding: EdgeInsets.all(
|
|
|
|
// // ScreenUtil().setWidth(60)),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// gradient: LinearGradient(
|
|
|
|
// begin: Alignment.topCenter,
|
|
|
|
// end: Alignment.bottomCenter,
|
|
|
|
// colors: [
|
|
|
|
// MyColours.color_F7F1E8,
|
|
|
|
// MyColours.color_E3D6C7,
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// borderRadius: BorderRadius.circular(
|
|
|
|
// ScreenUtil().setWidth(10))),
|
|
|
|
// child: Column(
|
|
|
|
// crossAxisAlignment:
|
|
|
|
// CrossAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// Container(
|
|
|
|
// width:
|
|
|
|
// ScreenUtil().setWidth(335 * 2),
|
|
|
|
// height:
|
|
|
|
// ScreenUtil().setWidth(200 * 2),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// image: DecorationImage(
|
|
|
|
// alignment:
|
|
|
|
// Alignment.topCenter,
|
|
|
|
// image: AssetImage(
|
|
|
|
// "assets/yd_baiinfo_bg.png"),
|
|
|
|
// fit: BoxFit.cover),
|
|
|
|
// ),
|
|
|
|
// child: Row(
|
|
|
|
// crossAxisAlignment:
|
|
|
|
// CrossAxisAlignment.start,
|
|
|
|
// children: [
|
|
|
|
// Padding(
|
|
|
|
// padding: EdgeInsets.only(
|
|
|
|
// top: ScreenUtil()
|
|
|
|
// .setWidth(20),
|
|
|
|
// left: ScreenUtil()
|
|
|
|
// .setWidth(60)),
|
|
|
|
// child: qiniuUrl == ''
|
|
|
|
// ? Image.asset(
|
|
|
|
// Utils.getImgPath(
|
|
|
|
// 'person'),
|
|
|
|
// width: ScreenUtil().setWidth(
|
|
|
|
// 143 * 2),
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 190 * 2))
|
|
|
|
// : Image.network(qiniuUrl,
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 143 * 2),
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(190 * 2)),
|
|
|
|
// ),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// Spacer(),
|
|
|
|
// Container(
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(200 * 2),
|
|
|
|
// child: Column(
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment
|
|
|
|
// .start,
|
|
|
|
// crossAxisAlignment:
|
|
|
|
// CrossAxisAlignment
|
|
|
|
// .start,
|
|
|
|
// children: [
|
|
|
|
// VEmptyView(60),
|
|
|
|
// GestureDetector(
|
|
|
|
// behavior:
|
|
|
|
// HitTestBehavior
|
|
|
|
// .opaque,
|
|
|
|
// onTap: () {
|
|
|
|
// _goBaseInfoPage();
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 100 * 2),
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 24 * 2),
|
|
|
|
// child: Text(
|
|
|
|
// name,
|
|
|
|
// overflow:
|
|
|
|
// TextOverflow
|
|
|
|
// .ellipsis,
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontWeight:
|
|
|
|
// FontWeight
|
|
|
|
// .bold,
|
|
|
|
// color: MyColours
|
|
|
|
// .color_794F28,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setSp(
|
|
|
|
// 36)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(6),
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// _goBaseInfoPage();
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 100 * 2),
|
|
|
|
// height:
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 18 *
|
|
|
|
// 2),
|
|
|
|
// child: Text(
|
|
|
|
// position,
|
|
|
|
// overflow:
|
|
|
|
// TextOverflow
|
|
|
|
// .ellipsis,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours
|
|
|
|
// .color_794F28,
|
|
|
|
// fontSize: ScreenUtil()
|
|
|
|
// .setSp(
|
|
|
|
// 28)),
|
|
|
|
// ),
|
|
|
|
// )),
|
|
|
|
// VEmptyView(6),
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// _goBaseInfoPage();
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 100 * 2),
|
|
|
|
// height:
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 18 *
|
|
|
|
// 2),
|
|
|
|
// child: Text(
|
|
|
|
// phone,
|
|
|
|
// overflow:
|
|
|
|
// TextOverflow
|
|
|
|
// .ellipsis,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours
|
|
|
|
// .color_794F28,
|
|
|
|
// fontSize: ScreenUtil()
|
|
|
|
// .setSp(
|
|
|
|
// 28)),
|
|
|
|
// ),
|
|
|
|
// )),
|
|
|
|
// VEmptyView(14),
|
|
|
|
// RoundButton(
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(94 * 2),
|
|
|
|
// image:
|
|
|
|
// Utils.getImgPath(
|
|
|
|
// 'yd_bianji'),
|
|
|
|
// imgWidth: 24,
|
|
|
|
// space: ScreenUtil()
|
|
|
|
// .setWidth(20),
|
|
|
|
// text: '编辑',
|
|
|
|
// textColor: MyColours
|
|
|
|
// .color_794F28,
|
|
|
|
// isBold: false,
|
|
|
|
// fontSize: 28,
|
|
|
|
// gradientStart: Colors
|
|
|
|
// .transparent,
|
|
|
|
// gradientEnd: Colors
|
|
|
|
// .transparent,
|
|
|
|
// onPressed: () {
|
|
|
|
// _goBaseInfoPage();
|
|
|
|
// },
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// )),
|
|
|
|
// HEmptyView(60),
|
|
|
|
// ],
|
|
|
|
// )),
|
|
|
|
// // Positioned(
|
|
|
|
// // bottom: 0,
|
|
|
|
// // child: Container(
|
|
|
|
// // color: MyColours.color_EEDBC4,
|
|
|
|
// // width: double.infinity,
|
|
|
|
// // height:
|
|
|
|
// // ScreenUtil().setWidth(40),
|
|
|
|
// // ))
|
|
|
|
// // ],
|
|
|
|
// // ),
|
|
|
|
// Container(
|
|
|
|
// color: MyColours.color_EEDBC4,
|
|
|
|
// width: double.infinity,
|
|
|
|
// height: ScreenUtil().setWidth(40),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(40),
|
|
|
|
// Image.asset(
|
|
|
|
// "assets/yd_up.png",
|
|
|
|
// width: ScreenUtil().setWidth(195 * 2),
|
|
|
|
// height:
|
|
|
|
// ScreenUtil().setHeight(33 * 2),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(50),
|
|
|
|
// Container(
|
|
|
|
// height: ScreenUtil().setWidth(48),
|
|
|
|
// child: Text(
|
|
|
|
// user.sellername,
|
|
|
|
// style: TextStyle(
|
|
|
|
// letterSpacing: ScreenUtil()
|
|
|
|
// .setWidth(2.13 * 2),
|
|
|
|
// color: MyColours.color_794F28,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil().setSp(36)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(30),
|
|
|
|
// Container(
|
|
|
|
// height: ScreenUtil().setWidth(36),
|
|
|
|
// child: Text(
|
|
|
|
// '已为您安排在包间',
|
|
|
|
// style: TextStyle(
|
|
|
|
// letterSpacing: ScreenUtil()
|
|
|
|
// .setWidth(1.7 * 2),
|
|
|
|
// color: MyColours.color_C19E5B,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil().setSp(28)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(12),
|
|
|
|
// Row(
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// Image.asset(
|
|
|
|
// "assets/bj_left.png",
|
|
|
|
// width:
|
|
|
|
// ScreenUtil().setWidth(30 * 2),
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setHeight(58 * 2),
|
|
|
|
// ),
|
|
|
|
// Container(
|
|
|
|
// height: ScreenUtil().setWidth(48),
|
|
|
|
// child: Text(
|
|
|
|
// widget.tableInfo
|
|
|
|
// .replaceAll("\n", ""),
|
|
|
|
// style: TextStyle(
|
|
|
|
// letterSpacing: ScreenUtil()
|
|
|
|
// .setWidth(2.13 * 2),
|
|
|
|
// color:
|
|
|
|
// MyColours.color_794F28,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil().setSp(42)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// Image.asset(
|
|
|
|
// "assets/bj_right.png",
|
|
|
|
// width:
|
|
|
|
// ScreenUtil().setWidth(30 * 2),
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setHeight(58 * 2),
|
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// _baseIndoProvider.photoList.length > 0
|
|
|
|
// ? VEmptyView(18)
|
|
|
|
// : Container(),
|
|
|
|
// _baseIndoProvider.photoList.length > 0
|
|
|
|
// ? RoundButton(
|
|
|
|
// onPressed: () {
|
|
|
|
// List<String> temp = [];
|
|
|
|
// if (_baseIndoProvider
|
|
|
|
// .photoList.length >
|
|
|
|
// 0) {
|
|
|
|
// for (int i = 0;
|
|
|
|
// i <
|
|
|
|
// _baseIndoProvider
|
|
|
|
// .photoList
|
|
|
|
// .length;
|
|
|
|
// i++) {
|
|
|
|
// temp.add(_baseIndoProvider
|
|
|
|
// .photoList[i].image);
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ///没有上传完成的不可以点击
|
|
|
|
// _showPhotoView(
|
|
|
|
// context, 0, temp);
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// text: '浏览照片',
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(68 * 2),
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(24 * 2),
|
|
|
|
// fontSize: 26,
|
|
|
|
// textColor:
|
|
|
|
// MyColours.color_794F28,
|
|
|
|
// isBold: false,
|
|
|
|
// gradientStart: Color.fromRGBO(
|
|
|
|
// 121, 79, 40, 0.1),
|
|
|
|
// gradientEnd: Color.fromRGBO(
|
|
|
|
// 121, 79, 40, 0.1),
|
|
|
|
// )
|
|
|
|
// : Container(),
|
|
|
|
// VEmptyView(60),
|
|
|
|
// Container(
|
|
|
|
// height: ScreenUtil().setWidth(40),
|
|
|
|
// child: Text(
|
|
|
|
// '时间:${dateTimeStr}',
|
|
|
|
// style: TextStyle(
|
|
|
|
// letterSpacing: ScreenUtil()
|
|
|
|
// .setWidth(1.8 * 2),
|
|
|
|
// color: MyColours.color_794F28,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil().setSp(30)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(20),
|
|
|
|
// Container(
|
|
|
|
// // height: ScreenUtil().setWidth(40),
|
|
|
|
// child: Text(
|
|
|
|
// '地址:${user.sellerAddr}',
|
|
|
|
// maxLines: 3,
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
// style: TextStyle(
|
|
|
|
// letterSpacing: ScreenUtil()
|
|
|
|
// .setWidth(1.8 * 2),
|
|
|
|
// color: MyColours.color_794F28,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil().setSp(30)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// // VEmptyView(20),
|
|
|
|
// // RoundButton(
|
|
|
|
// // text: '一键导航',
|
|
|
|
// // width: ScreenUtil().setWidth(68 * 2),
|
|
|
|
// // height: ScreenUtil().setWidth(24 * 2),
|
|
|
|
// // fontSize: 24,
|
|
|
|
// // textColor: MyColours.color_794F28,
|
|
|
|
// // isBold: false,
|
|
|
|
// // gradientStart:
|
|
|
|
// // Color.fromRGBO(121, 79, 40, 0.1),
|
|
|
|
// // gradientEnd:
|
|
|
|
// // Color.fromRGBO(121, 79, 40, 0.1),
|
|
|
|
// // ),
|
|
|
|
// VEmptyView(50),
|
|
|
|
// Image.asset(
|
|
|
|
// "assets/yd_down.png",
|
|
|
|
// width: ScreenUtil().setWidth(195 * 2),
|
|
|
|
// height:
|
|
|
|
// ScreenUtil().setHeight(33 * 2),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(60),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(couponHeight),
|
|
|
|
// ])),
|
|
|
|
// Container(
|
|
|
|
// width: double.infinity,
|
|
|
|
// height: ScreenUtil().setHeight(99),
|
|
|
|
// child: Row(
|
|
|
|
// children: <Widget>[
|
|
|
|
// GestureDetector(
|
|
|
|
// onTap: () {
|
|
|
|
// if (widget.phone.isEmpty) {
|
|
|
|
// Utils.showToast("没有预订人电话信息");
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// NavigatorUtil.goSmsPage(context, widget.rid);
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// width: ScreenUtil().setWidth(135 * 2),
|
|
|
|
// height: double.infinity,
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: MyColours.color_262628,
|
|
|
|
// border: Border(
|
|
|
|
// top: BorderSide(
|
|
|
|
// width: ScreenUtil().setWidth(1),
|
|
|
|
// color: MyColours.color_ECD9B7))),
|
|
|
|
// child: Text(
|
|
|
|
// "发短信",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_ECD9B7,
|
|
|
|
// fontSize: ScreenUtil().setSp(28)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// Expanded(
|
|
|
|
// child: GestureDetector(
|
|
|
|
// onTap: () async {
|
|
|
|
// if (ObjectUtil.isEmpty(
|
|
|
|
// _baseIndoProvider.baseInfoSunModel)) {
|
|
|
|
// Utils.showToast('请输入个人资料');
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// if (ObjectUtil.isEmpty(_baseIndoProvider
|
|
|
|
// .baseInfoSunModel.name)) {
|
|
|
|
// Utils.showToast('请填写您的姓名');
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// if (ObjectUtil.isEmpty(_baseIndoProvider
|
|
|
|
// .baseInfoSunModel.phone)) {
|
|
|
|
// Utils.showToast('请填写您的联系电话');
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// if (ObjectUtil.isEmpty(_baseIndoProvider
|
|
|
|
// .baseInfoSunModel.position)) {
|
|
|
|
// Utils.showToast('请填写您在餐厅中的职位');
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// if (ObjectUtil.isEmpty(_baseIndoProvider
|
|
|
|
// .baseInfoSunModel.phone)) {
|
|
|
|
// Utils.showToast('请上传您的头像');
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// if (ObjectUtil.isEmpty(_baseIndoProvider
|
|
|
|
// .baseInfoSunModel.qrcode)) {
|
|
|
|
// Utils.showToast('请上传您的微信二维码');
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// if (!couponProvider.hasModify &&
|
|
|
|
// couponProvider.coupons.length > 0) {
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// "rid": widget.rid,
|
|
|
|
// "aid": Utils.listToStringEnglish(
|
|
|
|
// couponProvider.coupons)
|
|
|
|
// };
|
|
|
|
// bool isSuc = await couponProvider
|
|
|
|
// .setActivityAsReserve(context, params);
|
|
|
|
// if (isSuc) {
|
|
|
|
// couponProvider.hasModify = true;
|
|
|
|
|
|
|
|
// bool isSuccess =
|
|
|
|
// await Utils.goShareInvicationToWeChat(
|
|
|
|
// widget.rid,
|
|
|
|
// Provider.of<UserModel>(context,
|
|
|
|
// listen: false)
|
|
|
|
// .user
|
|
|
|
// .openid);
|
|
|
|
// print(isSuccess);
|
|
|
|
// // couponProvider.couponsShow = [];
|
|
|
|
// // couponProvider.couponsShow
|
|
|
|
// // .addAll(couponProvider.coupons);
|
|
|
|
// // couponProvider.coupons = [];
|
|
|
|
// // couponProvider.notifyListeners();
|
|
|
|
// }
|
|
|
|
// } else {
|
|
|
|
// bool isSuccess =
|
|
|
|
// await Utils.goShareInvicationToWeChat(
|
|
|
|
// widget.rid,
|
|
|
|
// Provider.of<UserModel>(context,
|
|
|
|
// listen: false)
|
|
|
|
// .user
|
|
|
|
// .openid);
|
|
|
|
// print(isSuccess);
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// width: double.infinity,
|
|
|
|
// height: double.infinity,
|
|
|
|
// color: MyColours.color_ECD9B7,
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// child: Text(
|
|
|
|
// "通知客户",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_7B512A,
|
|
|
|
// fontSize: ScreenUtil().setSp(30)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ])),
|
|
|
|
// Positioned(
|
|
|
|
// left: ScreenUtil().setWidth(0),
|
|
|
|
// top: ScreenUtil().setWidth(0),
|
|
|
|
// child: GestureDetector(
|
|
|
|
// onTap: () {
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
// },
|
|
|
|
// behavior: HitTestBehavior.opaque,
|
|
|
|
// child: Container(
|
|
|
|
// padding: EdgeInsets.fromLTRB(
|
|
|
|
// ScreenUtil().setWidth(40),
|
|
|
|
// ScreenUtil().setWidth(40),
|
|
|
|
// ScreenUtil().setWidth(200),
|
|
|
|
// ScreenUtil().setWidth(100),
|
|
|
|
// ),
|
|
|
|
// alignment: Alignment.centerLeft,
|
|
|
|
// // color: Colors.red,
|
|
|
|
// child: Image.asset(
|
|
|
|
// "assets/invication_back.png",
|
|
|
|
// width: ScreenUtil().setWidth(20),
|
|
|
|
// height: ScreenUtil().setHeight(31),
|
|
|
|
// )),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// Positioned(
|
|
|
|
// // left: ScreenUtil().setWidth(180),
|
|
|
|
// bottom: ScreenUtil().setWidth(110),
|
|
|
|
// right: ScreenUtil().setWidth(40),
|
|
|
|
// child: couponProvider.hasModify ||
|
|
|
|
// couponProvider.coupons.length > 0 ||
|
|
|
|
// couponProvider.couponListSelect.length > 0
|
|
|
|
// ? GestureDetector(
|
|
|
|
// onTap: () async {
|
|
|
|
// NavigatorUtil.goCouponSelectPage(context,
|
|
|
|
// rid: widget.rid,
|
|
|
|
// hasModify: couponProvider.hasModify);
|
|
|
|
// },
|
|
|
|
// behavior: HitTestBehavior.opaque,
|
|
|
|
// child: Column(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// Container(
|
|
|
|
// padding: EdgeInsets.symmetric(
|
|
|
|
// horizontal: ScreenUtil().setWidth(40),
|
|
|
|
// vertical: ScreenUtil().setWidth(16)),
|
|
|
|
// height: ScreenUtil().setWidth(35 * 2),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: MyColours.color_000000,
|
|
|
|
// borderRadius: BorderRadius.circular(
|
|
|
|
// ScreenUtil().setWidth(20))),
|
|
|
|
// child: Row(
|
|
|
|
// children: [
|
|
|
|
// Text(
|
|
|
|
// '并赠送给顾客${couponProvider.coupons.length}张优惠券',
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_f5f5f5,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// fontSize: ScreenUtil().setSp(28),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// HEmptyView(40),
|
|
|
|
// RoundButton(
|
|
|
|
// width: ScreenUtil().setWidth(124),
|
|
|
|
// height: ScreenUtil().setWidth(46),
|
|
|
|
// text: '点击查看',
|
|
|
|
// textColor: MyColours.color_FDA31D,
|
|
|
|
// fontSize: 24,
|
|
|
|
// isBold: true,
|
|
|
|
// radius: ScreenUtil().setWidth(10),
|
|
|
|
// gradientStart: MyColours.color_f5f5f5,
|
|
|
|
// gradientEnd: MyColours.color_f5f5f5,
|
|
|
|
// onPressed: () async {
|
|
|
|
// NavigatorUtil.goCouponSelectPage(
|
|
|
|
// context,
|
|
|
|
// rid: widget.rid,
|
|
|
|
// hasModify:
|
|
|
|
// couponProvider.hasModify);
|
|
|
|
// },
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// )),
|
|
|
|
// Image.asset(Utils.getImgPath('jian'),
|
|
|
|
// width: ScreenUtil().setWidth(28),
|
|
|
|
// height: ScreenUtil().setWidth(20))
|
|
|
|
// ],
|
|
|
|
// ))
|
|
|
|
// : Container(),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ))));
|
|
|
|
// }
|
|
|
|
// } |
...
|
...
|
|