|
|
|
// import 'dart:typed_data';
|
|
|
|
// import 'dart:ui';
|
|
|
|
|
|
|
|
// import 'package:cached_network_image/cached_network_image.dart';
|
|
|
|
// import 'package:common_utils/common_utils.dart';
|
|
|
|
// import 'package:flutter/material.dart';
|
|
|
|
// import 'package:flutter/rendering.dart';
|
|
|
|
// import 'package:flutter/services.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/event_bus.dart';
|
|
|
|
// import 'package:one_key/utils/misc.dart';
|
|
|
|
// import 'package:one_key/route/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/system_app_bar.dart';
|
|
|
|
// import 'package:one_key/widgets/v_empty_view.dart';
|
|
|
|
// import 'package:permission_handler/permission_handler.dart';
|
|
|
|
// import 'package:provider/provider.dart';
|
|
|
|
// import 'dart:ui' as ui;
|
|
|
|
|
|
|
|
// class InvicationPage extends StatefulWidget {
|
|
|
|
// final String rid; //预订订单id
|
|
|
|
// final String tableInfo; //桌位信息
|
|
|
|
// final String ddate;
|
|
|
|
// final String ddateStr;
|
|
|
|
// final String phone;
|
|
|
|
// final String dateSolt;
|
|
|
|
// final String tid;
|
|
|
|
// final String name;
|
|
|
|
// final String sex;
|
|
|
|
|
|
|
|
// InvicationPage(this.rid, this.tableInfo, this.ddate, this.ddateStr,
|
|
|
|
// this.phone, this.dateSolt, this.tid, this.name, this.sex);
|
|
|
|
|
|
|
|
// @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 = 140.0;
|
|
|
|
// CouponProvider couponProvider;
|
|
|
|
// BaseIndoProvider _baseIndoProvider;
|
|
|
|
// String name = '';
|
|
|
|
// String position = '经理';
|
|
|
|
// String phone = '';
|
|
|
|
// String qiniuUrl = '';
|
|
|
|
// final GlobalKey key = new GlobalKey();
|
|
|
|
// final GlobalKey globalKey = GlobalKey();
|
|
|
|
// String reserverPhone;
|
|
|
|
|
|
|
|
// @override
|
|
|
|
// void initState() {
|
|
|
|
// super.initState();
|
|
|
|
// reserverPhone = widget.phone;
|
|
|
|
|
|
|
|
// WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
// couponProvider.sendSMS = false;
|
|
|
|
// _getActivityByRid();
|
|
|
|
// _getCustomerActivityBaseinfo();
|
|
|
|
// _getTablesPhoto();
|
|
|
|
// });
|
|
|
|
// bus.on("refresh_coupon_invitation", (args) {
|
|
|
|
// _couponNetworkData(isShowLoading: false);
|
|
|
|
// });
|
|
|
|
// 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}";
|
|
|
|
// }
|
|
|
|
|
|
|
|
// @override
|
|
|
|
// void dispose() {
|
|
|
|
// Utils.changeStatusColor();
|
|
|
|
// couponProvider.clearSelect();
|
|
|
|
// bus.off("refresh_coupon_invitation");
|
|
|
|
// super.dispose();
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _getTablesPhoto() async {
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// "sellerid": Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
// "tableids": widget.tid,
|
|
|
|
// };
|
|
|
|
// bool success = await _baseIndoProvider.getTablesPhoto(context, params);
|
|
|
|
// }
|
|
|
|
|
|
|
|
// //客户经理添加/修改基本信息
|
|
|
|
// _setCustomerActivityBaseinfo() async {
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
// "name": user.sellername,
|
|
|
|
// "photo": 'http://nosqn.colorcun.com/yd_person.png',
|
|
|
|
// "position": '经理',
|
|
|
|
// };
|
|
|
|
// if (user.userphone != null) {
|
|
|
|
// params['phone'] = user.userphone;
|
|
|
|
// }
|
|
|
|
|
|
|
|
// bool isSuccess =
|
|
|
|
// await _baseIndoProvider.setCustomerActivityBaseinfo(context, params);
|
|
|
|
// // _baseIndoProvider.baseInfoSunModel = null;
|
|
|
|
// if (isSuccess) {
|
|
|
|
// name = user.sellername;
|
|
|
|
// qiniuUrl = 'http://nosqn.colorcun.com/yd_person.png';
|
|
|
|
// // _uploadImageProvider.erweima.qiniuUrl =
|
|
|
|
// // _baseIndoProvider.baseInfoSunModel.qrcode;
|
|
|
|
// phone = user.userphone != null ? user.userphone : '填写电话';
|
|
|
|
// position = '经理';
|
|
|
|
// qiniuUrl = 'http://nosqn.colorcun.com/yd_person.png';
|
|
|
|
// setState(() {});
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _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 != null
|
|
|
|
// ? _baseIndoProvider.baseInfoSunModel.phone
|
|
|
|
// : '填写电话';
|
|
|
|
|
|
|
|
// position = _baseIndoProvider.baseInfoSunModel.position;
|
|
|
|
// setState(() {});
|
|
|
|
// } else {
|
|
|
|
// // name = '请填写姓名';
|
|
|
|
// // position = '请填写职位';
|
|
|
|
// // phone = '请填写电话';
|
|
|
|
// // qiniuUrl = '';
|
|
|
|
// _setCustomerActivityBaseinfo();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _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.0;
|
|
|
|
// });
|
|
|
|
// } else {
|
|
|
|
// setState(() {
|
|
|
|
// couponHeight = 140.0;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// } else {
|
|
|
|
// //没有新建的优惠券
|
|
|
|
// setState(() {
|
|
|
|
// couponHeight = 0.0;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// //中间内容显示组件
|
|
|
|
// 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);
|
|
|
|
// Utils.changeStatusColor(color: Colors.transparent);
|
|
|
|
// 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);
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ///浏览照片
|
|
|
|
// ///
|
|
|
|
// void onTapDown(BuildContext context, TapDownDetails details) {
|
|
|
|
// final RenderBox box = context.findRenderObject();
|
|
|
|
// final Offset localOffset = box.globalToLocal(details.globalPosition);
|
|
|
|
// final RenderBox containerBox = key.currentContext.findRenderObject();
|
|
|
|
// final Offset containerOffset = containerBox.localToGlobal(localOffset);
|
|
|
|
// final onTap = containerBox.paintBounds.contains(containerOffset);
|
|
|
|
// if (onTap) {
|
|
|
|
// _seePhoto();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _seePhoto() {
|
|
|
|
// // 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, _baseIndoProvider.photoList);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ///获取截图
|
|
|
|
// Future<Uint8List> _getImage() async {
|
|
|
|
// BuildContext buildContext = globalKey.currentContext;
|
|
|
|
// if (null != buildContext) {
|
|
|
|
// RenderRepaintBoundary boundary = buildContext.findRenderObject();
|
|
|
|
// ui.Image image = await boundary.toImage(pixelRatio: 6);
|
|
|
|
// ByteData byteData = await image.toByteData(format: ImageByteFormat.png);
|
|
|
|
// Uint8List pngBytes = byteData.buffer.asUint8List();
|
|
|
|
// return pngBytes;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// //发送短信
|
|
|
|
// _sendSms() async {
|
|
|
|
// UserModel userModel = Provider.of<UserModel>(context, listen: false);
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// "rid": widget.rid,
|
|
|
|
// "sid": userModel.user.sellerid
|
|
|
|
// };
|
|
|
|
// await couponProvider.sendSms(context, params);
|
|
|
|
// }
|
|
|
|
|
|
|
|
// // 客户经理转发记录
|
|
|
|
// _addForward() async {
|
|
|
|
// UserModel userModel = Provider.of<UserModel>(context, listen: false);
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// "rid": widget.rid,
|
|
|
|
// "sid": userModel.user.sellerid,
|
|
|
|
// "uid": userModel.user.openid
|
|
|
|
// };
|
|
|
|
|
|
|
|
// bool success = await couponProvider.addForwardAsReserve(context, params);
|
|
|
|
// if (success) {
|
|
|
|
// print('yes');
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// @override
|
|
|
|
// Widget build(BuildContext context) {
|
|
|
|
// // Utils.changeStatusColor(color: Colors.transparent);
|
|
|
|
// // TODO: implement build
|
|
|
|
// _baseIndoProvider = Provider.of<BaseIndoProvider>(context, listen: true);
|
|
|
|
// couponProvider = Provider.of<CouponProvider>(context, listen: true);
|
|
|
|
// return SafeArea(
|
|
|
|
// child: Scaffold(
|
|
|
|
// backgroundColor: Colors.white,
|
|
|
|
// appBar: SystemAppBar('', onTap: () {
|
|
|
|
// Navigator.pop(context);
|
|
|
|
// }),
|
|
|
|
// body: Stack(
|
|
|
|
// children: [
|
|
|
|
// Column(children: [
|
|
|
|
// Expanded(
|
|
|
|
// child: ListView(
|
|
|
|
// controller: controller,
|
|
|
|
// physics: BouncingScrollPhysics(),
|
|
|
|
// children: <Widget>[
|
|
|
|
// Center(
|
|
|
|
// child: Column(
|
|
|
|
// children: <Widget>[
|
|
|
|
// VEmptyView(20),
|
|
|
|
// Image.asset(
|
|
|
|
// "assets/yd_logo.png",
|
|
|
|
// width: ScreenUtil().setWidth(233 * 2),
|
|
|
|
// height: ScreenUtil().setHeight(51 * 2),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(26),
|
|
|
|
// 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(
|
|
|
|
// // color: Colors.red,
|
|
|
|
// 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(
|
|
|
|
// left: ScreenUtil()
|
|
|
|
// .setWidth(70)),
|
|
|
|
// child: Stack(
|
|
|
|
// alignment:
|
|
|
|
// Alignment.bottomCenter,
|
|
|
|
// children: [
|
|
|
|
// Image.network(
|
|
|
|
// qiniuUrl == ''
|
|
|
|
// ? 'http://nosqn.colorcun.com/yd_person.png'
|
|
|
|
// : qiniuUrl,
|
|
|
|
// // 'http://nosqn.colorcun.com/yd_person.png',
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(143 * 2),
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(190 * 2)),
|
|
|
|
// couponProvider.coupons
|
|
|
|
// .length ==
|
|
|
|
// 0
|
|
|
|
// ? Align(
|
|
|
|
// alignment: Alignment
|
|
|
|
// .bottomCenter,
|
|
|
|
// child: RoundButton(
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 86 * 2),
|
|
|
|
// height:
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 30 *
|
|
|
|
// 2),
|
|
|
|
// radius:
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 30),
|
|
|
|
// space:
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 20),
|
|
|
|
// text: '添加优惠',
|
|
|
|
// textColor: MyColours
|
|
|
|
// .color_ffffff,
|
|
|
|
// isBold: false,
|
|
|
|
// fontSize: 28,
|
|
|
|
// gradientStart:
|
|
|
|
// MyColours
|
|
|
|
// .color_199095,
|
|
|
|
// gradientEnd: MyColours
|
|
|
|
// .color_199095,
|
|
|
|
// onPressed: () {
|
|
|
|
// NavigatorUtil
|
|
|
|
// .goCouponPage(
|
|
|
|
// context,
|
|
|
|
// needRefrsh:
|
|
|
|
// true);
|
|
|
|
// },
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// : Container()
|
|
|
|
// ],
|
|
|
|
// )),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// Spacer(),
|
|
|
|
// Container(
|
|
|
|
// padding: EdgeInsets.only(
|
|
|
|
// top: ScreenUtil()
|
|
|
|
// .setWidth(37 * 2)),
|
|
|
|
// // height: ScreenUtil()
|
|
|
|
// // .setWidth(200 * 2),
|
|
|
|
// child: Column(
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment.start,
|
|
|
|
// crossAxisAlignment:
|
|
|
|
// CrossAxisAlignment.end,
|
|
|
|
// children: [
|
|
|
|
// // VEmptyView(60),
|
|
|
|
// GestureDetector(
|
|
|
|
// behavior: HitTestBehavior
|
|
|
|
// .opaque,
|
|
|
|
// onTap: () {
|
|
|
|
// _goBaseInfoPage();
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(120 * 2),
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(42 * 2),
|
|
|
|
// child: Text(
|
|
|
|
// name,
|
|
|
|
// overflow: TextOverflow
|
|
|
|
// .ellipsis,
|
|
|
|
// textAlign:
|
|
|
|
// TextAlign.right,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours
|
|
|
|
// .color_333333,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setSp(
|
|
|
|
// 60)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// // VEmptyView(6),
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// _goBaseInfoPage();
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 120 * 2),
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(22 * 2),
|
|
|
|
// child: Text(
|
|
|
|
// phone,
|
|
|
|
// overflow:
|
|
|
|
// TextOverflow
|
|
|
|
// .ellipsis,
|
|
|
|
// textAlign:
|
|
|
|
// TextAlign.right,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: phone ==
|
|
|
|
// '填写电话'
|
|
|
|
// ? MyColours
|
|
|
|
// .color_999999
|
|
|
|
// : MyColours
|
|
|
|
// .color_333333,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setSp(
|
|
|
|
// 32)),
|
|
|
|
// ),
|
|
|
|
// )),
|
|
|
|
// // VEmptyView(6),
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// _goBaseInfoPage();
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 120 * 2),
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(24 * 2),
|
|
|
|
// child: Text(
|
|
|
|
// position,
|
|
|
|
// overflow:
|
|
|
|
// TextOverflow
|
|
|
|
// .ellipsis,
|
|
|
|
// textAlign:
|
|
|
|
// TextAlign.right,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours
|
|
|
|
// .color_333333,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setSp(
|
|
|
|
// 34)),
|
|
|
|
// ),
|
|
|
|
// )),
|
|
|
|
|
|
|
|
// RoundButton(
|
|
|
|
// // width: ScreenUtil().setWidth(95),
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(60 * 2),
|
|
|
|
// image: Utils.getImgPath(
|
|
|
|
// 'yd_bianji'),
|
|
|
|
// imgWidth: 24,
|
|
|
|
// radius: 0,
|
|
|
|
// space: ScreenUtil()
|
|
|
|
// .setWidth(20),
|
|
|
|
// text: '编辑',
|
|
|
|
// textColor: MyColours
|
|
|
|
// .color_199095,
|
|
|
|
// 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(76),
|
|
|
|
// // Image.asset(
|
|
|
|
// // "assets/yd_up.png",
|
|
|
|
// // width: ScreenUtil().setWidth(195 * 2),
|
|
|
|
// // height:
|
|
|
|
// // ScreenUtil().setHeight(33 * 2),
|
|
|
|
// // ),
|
|
|
|
// // VEmptyView(50),
|
|
|
|
|
|
|
|
// RepaintBoundary(
|
|
|
|
// key: globalKey,
|
|
|
|
// child: Container(
|
|
|
|
// padding: EdgeInsets.fromLTRB(
|
|
|
|
// ScreenUtil().setWidth(10),
|
|
|
|
// ScreenUtil().setWidth(10),
|
|
|
|
// ScreenUtil().setWidth(10),
|
|
|
|
// ScreenUtil().setWidth(40)),
|
|
|
|
// // color: Colors.red,
|
|
|
|
// child: Column(
|
|
|
|
// children: [
|
|
|
|
// Container(
|
|
|
|
// height: ScreenUtil().setWidth(58),
|
|
|
|
// child: Text(
|
|
|
|
// user.sellername,
|
|
|
|
// style: TextStyle(
|
|
|
|
// // letterSpacing: ScreenUtil()
|
|
|
|
// // .setWidth(2.13 * 2),
|
|
|
|
// color:
|
|
|
|
// MyColours.color_333333,
|
|
|
|
// // fontWeight: FontWeight.bold,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil().setSp(42)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(14),
|
|
|
|
// Container(
|
|
|
|
// height: ScreenUtil().setWidth(58),
|
|
|
|
// child: Text(
|
|
|
|
// '${dateTimeStr}',
|
|
|
|
// style: TextStyle(
|
|
|
|
// letterSpacing: ScreenUtil()
|
|
|
|
// .setWidth(1.8 * 2),
|
|
|
|
// color:
|
|
|
|
// MyColours.color_333333,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil().setSp(42)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(26),
|
|
|
|
// Container(
|
|
|
|
// height: ScreenUtil().setWidth(44),
|
|
|
|
// child: Text(
|
|
|
|
// '已为您安排在包间',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color:
|
|
|
|
// MyColours.color_666666,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil().setSp(32)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(28),
|
|
|
|
// GestureDetector(
|
|
|
|
// onTapDown: (TapDownDetails
|
|
|
|
// details) =>
|
|
|
|
// onTapDown(context, details),
|
|
|
|
// child: Container(
|
|
|
|
// child: Stack(
|
|
|
|
// alignment:
|
|
|
|
// Alignment.bottomCenter,
|
|
|
|
// overflow: Overflow.visible,
|
|
|
|
// children: [
|
|
|
|
// Container(
|
|
|
|
// margin: EdgeInsets.only(
|
|
|
|
// bottom: ScreenUtil()
|
|
|
|
// .setWidth(24)),
|
|
|
|
// constraints: BoxConstraints(
|
|
|
|
// maxWidth: ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 195 * 2)),
|
|
|
|
// padding:
|
|
|
|
// EdgeInsets.fromLTRB(
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setWidth(60),
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setWidth(30),
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setWidth(60),
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 24 * 2)),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// borderRadius: BorderRadius.all(
|
|
|
|
// Radius.circular(
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 13 *
|
|
|
|
// 2))),
|
|
|
|
// border: Border.all(
|
|
|
|
// color: MyColours
|
|
|
|
// .color_199095,
|
|
|
|
// width:
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setWidth(
|
|
|
|
// 4))),
|
|
|
|
// child: Text(
|
|
|
|
// widget.tableInfo
|
|
|
|
// .replaceAll(
|
|
|
|
// "\n", ""),
|
|
|
|
// style: TextStyle(
|
|
|
|
// // letterSpacing: ScreenUtil()
|
|
|
|
// // .setWidth(2.13 * 2),
|
|
|
|
// color: MyColours
|
|
|
|
// .color_333333,
|
|
|
|
// fontWeight:
|
|
|
|
// FontWeight.bold,
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil()
|
|
|
|
// .setSp(52)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// Positioned(
|
|
|
|
// key: key,
|
|
|
|
// bottom: 0,
|
|
|
|
// child: RoundButton(
|
|
|
|
// onPressed: () {
|
|
|
|
// _seePhoto();
|
|
|
|
// },
|
|
|
|
// text: '浏览照片',
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(68 * 2),
|
|
|
|
// height: ScreenUtil()
|
|
|
|
// .setWidth(24 * 2),
|
|
|
|
// fontSize: 26,
|
|
|
|
// textColor: _baseIndoProvider
|
|
|
|
// .photoList
|
|
|
|
// .length >
|
|
|
|
// 0
|
|
|
|
// ? MyColours
|
|
|
|
// .color_ffffff
|
|
|
|
// : MyColours
|
|
|
|
// .color_999999,
|
|
|
|
// isBold: false,
|
|
|
|
// gradientStart: _baseIndoProvider
|
|
|
|
// .photoList
|
|
|
|
// .length >
|
|
|
|
// 0
|
|
|
|
// ? MyColours
|
|
|
|
// .color_199095
|
|
|
|
// : MyColours
|
|
|
|
// .color_E0E0E0,
|
|
|
|
// gradientEnd: _baseIndoProvider
|
|
|
|
// .photoList
|
|
|
|
// .length >
|
|
|
|
// 0
|
|
|
|
// ? MyColours
|
|
|
|
// .color_199095
|
|
|
|
// : MyColours
|
|
|
|
// .color_E0E0E0,
|
|
|
|
// ))
|
|
|
|
// ],
|
|
|
|
// ))),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// VEmptyView(30),
|
|
|
|
// Container(
|
|
|
|
// // height: ScreenUtil().setWidth(40),
|
|
|
|
// child: Text(
|
|
|
|
// '${user.sellerAddr}',
|
|
|
|
// maxLines: 3,
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_333333,
|
|
|
|
// fontSize: ScreenUtil().setSp(28)),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// // 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),
|
|
|
|
// ])),
|
|
|
|
// Padding(
|
|
|
|
// padding: EdgeInsets.fromLTRB(
|
|
|
|
// ScreenUtil().setWidth(70),
|
|
|
|
// ScreenUtil().setWidth(20),
|
|
|
|
// ScreenUtil().setWidth(70),
|
|
|
|
// ScreenUtil().setWidth(40)),
|
|
|
|
// child: Column(children: [
|
|
|
|
// RoundButton(
|
|
|
|
// text: '微信通知',
|
|
|
|
// width: double.infinity,
|
|
|
|
// height: ScreenUtil().setWidth(84),
|
|
|
|
// gradientStart: MyColours.color_199095,
|
|
|
|
// gradientEnd: MyColours.color_199095,
|
|
|
|
// textColor: MyColours.color_ffffff,
|
|
|
|
// fontSize: 34,
|
|
|
|
// radius: ScreenUtil().setWidth(10),
|
|
|
|
// isBold: false,
|
|
|
|
// onPressed: () async {
|
|
|
|
// // Uint8List image = await _getImage();
|
|
|
|
// print(widget.rid);
|
|
|
|
// print(Provider.of<UserModel>(context, listen: false)
|
|
|
|
// .user
|
|
|
|
// .openid);
|
|
|
|
// // if (ObjectUtil.isEmpty(
|
|
|
|
// // _baseIndoProvider.baseInfoSunModel)) {
|
|
|
|
// // Utils.showToast('请输入个人资料');
|
|
|
|
// // return;
|
|
|
|
// // }
|
|
|
|
// // if (ObjectUtil.isEmpty(
|
|
|
|
// // _baseIndoProvider.baseInfoSunModel.name)) {
|
|
|
|
// // Utils.showToast('请填写您的姓名');
|
|
|
|
// // return;
|
|
|
|
// // }
|
|
|
|
// if (ObjectUtil.isEmpty(
|
|
|
|
// _baseIndoProvider.baseInfoSunModel) ||
|
|
|
|
// 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);
|
|
|
|
// if (isSuccess) {
|
|
|
|
// _addForward();
|
|
|
|
// }
|
|
|
|
// // 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);
|
|
|
|
// if (isSuccess) {
|
|
|
|
// _addForward();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// ),
|
|
|
|
// VEmptyView(20),
|
|
|
|
// Stack(children: [
|
|
|
|
// Container(
|
|
|
|
// margin: EdgeInsets.only(
|
|
|
|
// top: ScreenUtil().setWidth(10),
|
|
|
|
// right: ScreenUtil().setWidth(6)),
|
|
|
|
// child: RoundButton(
|
|
|
|
// text: '发短信',
|
|
|
|
// width: double.infinity,
|
|
|
|
// height: ScreenUtil().setWidth(84),
|
|
|
|
// gradientStart: MyColours.color_ffffff,
|
|
|
|
// gradientEnd: MyColours.color_ffffff,
|
|
|
|
// textColor: MyColours.color_199095,
|
|
|
|
// borderColor: MyColours.color_199095,
|
|
|
|
// fontSize: 34,
|
|
|
|
// radius: ScreenUtil().setWidth(10),
|
|
|
|
// isBold: false,
|
|
|
|
// onPressed: () async {
|
|
|
|
// if (reserverPhone == null ||
|
|
|
|
// reserverPhone.isEmpty) {
|
|
|
|
// //跳转到录入联系人页面
|
|
|
|
// String temp =
|
|
|
|
// await NavigatorUtil.goEditReserverPage(
|
|
|
|
// context,
|
|
|
|
// widget.rid,
|
|
|
|
// widget.name,
|
|
|
|
// widget.sex,
|
|
|
|
// needBtn: true);
|
|
|
|
// if (temp != null) {
|
|
|
|
// reserverPhone = temp;
|
|
|
|
// }
|
|
|
|
// } else if (!Utils.phoneRegExp(
|
|
|
|
// reserverPhone)) {
|
|
|
|
// Utils.showToast('手机号错误,请修改正确');
|
|
|
|
// //跳转到录入联系人页面
|
|
|
|
// String temp =
|
|
|
|
// await NavigatorUtil.goEditReserverPage(
|
|
|
|
// context,
|
|
|
|
// widget.rid,
|
|
|
|
// widget.name,
|
|
|
|
// widget.sex,
|
|
|
|
// needBtn: true);
|
|
|
|
// if (temp != null) {
|
|
|
|
// reserverPhone = temp;
|
|
|
|
// }
|
|
|
|
// } else {
|
|
|
|
// if (!couponProvider.sendSMS) {
|
|
|
|
// /*
|
|
|
|
// String dateSoltStr = '';
|
|
|
|
// if (widget.dateSolt == '1') {
|
|
|
|
// dateSoltStr = '早餐';
|
|
|
|
// } else if (widget.dateSolt == '2') {
|
|
|
|
// dateSoltStr = '午餐';
|
|
|
|
// } else if (widget.dateSolt == '3') {
|
|
|
|
// dateSoltStr = '晚餐';
|
|
|
|
// }
|
|
|
|
// DateTime dateTimeTemp =
|
|
|
|
// DateTime.fromMillisecondsSinceEpoch(
|
|
|
|
// int.parse(widget.ddate) * 1000);
|
|
|
|
// String dateTimeStrTemp =
|
|
|
|
// "${Utils.addZeroNumber(dateTimeTemp.month)}月${Utils.addZeroNumber(dateTimeTemp.day)}日";
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// "id": widget.rid,
|
|
|
|
// "uid": Provider.of<UserModel>(context,
|
|
|
|
// listen: false)
|
|
|
|
// .user
|
|
|
|
// .openid,
|
|
|
|
// "phone": widget.phone,
|
|
|
|
|
|
|
|
// // "Strtext": user.sellername +
|
|
|
|
// // dateTimeStrTemp +
|
|
|
|
// // dateSoltStr +
|
|
|
|
// // ',' +
|
|
|
|
// // '餐厅经理' +
|
|
|
|
// // _baseIndoProvider.baseInfoSunModel.name +
|
|
|
|
// // '已为您安排在' +
|
|
|
|
// // widget.tableInfo.replaceAll("\n", "")
|
|
|
|
// };
|
|
|
|
// if (ObjectUtil.isNotEmpty(_baseIndoProvider
|
|
|
|
// .baseInfoSunModel) &&
|
|
|
|
// ObjectUtil.isNotEmpty(_baseIndoProvider
|
|
|
|
// .baseInfoSunModel.name)) {
|
|
|
|
// params['Strtext'] = user.sellername +
|
|
|
|
// _baseIndoProvider
|
|
|
|
// .baseInfoSunModel.name;
|
|
|
|
// } else {
|
|
|
|
// params['Strtext'] = user.sellername;
|
|
|
|
// }
|
|
|
|
// */
|
|
|
|
// UserModel userModel =
|
|
|
|
// Provider.of<UserModel>(context,
|
|
|
|
// listen: false);
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// "rid": widget.rid,
|
|
|
|
// "sid": userModel.user.sellerid
|
|
|
|
// };
|
|
|
|
// bool success = await couponProvider
|
|
|
|
// .sendSMSWxSendSms(context, params);
|
|
|
|
// print(success);
|
|
|
|
// // if (success) {
|
|
|
|
// // Utils.showToast('短信已经发送成功!');
|
|
|
|
// // } else {
|
|
|
|
// // Utils.showToast('发送次数太频繁!');
|
|
|
|
// // }
|
|
|
|
// } else {
|
|
|
|
// Utils.showToast('短信已经发送成功!');
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// // _sendSms();
|
|
|
|
|
|
|
|
// // NavigatorUtil.goSmsPage(context, widget.rid);
|
|
|
|
// },
|
|
|
|
// )),
|
|
|
|
// Positioned(
|
|
|
|
// top: 0,
|
|
|
|
// right: 0,
|
|
|
|
// child: Container(
|
|
|
|
// // padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(16),vertical: ScreenUtil().setWidth(4)),
|
|
|
|
// padding: EdgeInsets.only(
|
|
|
|
// bottom: ScreenUtil().setWidth(6)),
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// width: ScreenUtil().setWidth(62 * 2),
|
|
|
|
// height: ScreenUtil().setWidth(42),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// // color: Colors.red,
|
|
|
|
// image: DecorationImage(
|
|
|
|
// image: ExactAssetImage(
|
|
|
|
// Utils.getImgPath('sms_bg'),
|
|
|
|
// ),
|
|
|
|
// fit: BoxFit.cover,
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// child: Text(
|
|
|
|
// '免费短信',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_fefefe,
|
|
|
|
// fontSize: ScreenUtil().setSp(24)),
|
|
|
|
// )),
|
|
|
|
// )
|
|
|
|
// ])
|
|
|
|
// ])),
|
|
|
|
// ]),
|
|
|
|
// Positioned(
|
|
|
|
// // left: ScreenUtil().setWidth(180),
|
|
|
|
// bottom: ScreenUtil().setWidth(124 * 2),
|
|
|
|
// right: ScreenUtil().setWidth(52 * 2),
|
|
|
|
// child: couponProvider.hasModify ||
|
|
|
|
// couponProvider.coupons.length > 0 ||
|
|
|
|
// couponProvider.couponListSelect.length > 0
|
|
|
|
// ? GestureDetector(
|
|
|
|
// onTap: () async {
|
|
|
|
// NavigatorUtil.goCouponSelectPage(context,
|
|
|
|
// from: 'other',
|
|
|
|
// 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: Color.fromRGBO(0, 0, 0, 0.5),
|
|
|
|
// 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,
|
|
|
|
// from: 'other',
|
|
|
|
// hasModify:
|
|
|
|
// couponProvider.hasModify);
|
|
|
|
// },
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// )),
|
|
|
|
// Image.asset(Utils.getImgPath('jian'),
|
|
|
|
// width: ScreenUtil().setWidth(28),
|
|
|
|
// height: ScreenUtil().setWidth(20))
|
|
|
|
// ],
|
|
|
|
// ))
|
|
|
|
// : Container(),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// )));
|
|
|
|
// }
|
|
|
|
// } |
...
|
...
|
|