|
|
|
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
|
+// } |