Commit eeaa715f722ade74e7daba5c83530155f6af0d26

Authored by gaiyaguang
2 parents e6d769df 3c9b5a41

冲突解决

@@ -404,7 +404,7 @@ @@ -404,7 +404,7 @@
404 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; 404 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
405 CODE_SIGN_IDENTITY = "Apple Development"; 405 CODE_SIGN_IDENTITY = "Apple Development";
406 CODE_SIGN_STYLE = Automatic; 406 CODE_SIGN_STYLE = Automatic;
407 - CURRENT_PROJECT_VERSION = 116; 407 + CURRENT_PROJECT_VERSION = 121;
408 DEVELOPMENT_TEAM = 8J59HM8B82; 408 DEVELOPMENT_TEAM = 8J59HM8B82;
409 ENABLE_BITCODE = NO; 409 ENABLE_BITCODE = NO;
410 FRAMEWORK_SEARCH_PATHS = ( 410 FRAMEWORK_SEARCH_PATHS = (
@@ -417,7 +417,7 @@ @@ -417,7 +417,7 @@
417 "$(inherited)", 417 "$(inherited)",
418 "$(PROJECT_DIR)/Flutter", 418 "$(PROJECT_DIR)/Flutter",
419 ); 419 );
420 - MARKETING_VERSION = 1.1.6; 420 + MARKETING_VERSION = 1.2.1;
421 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 421 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
422 PRODUCT_NAME = "一键订"; 422 PRODUCT_NAME = "一键订";
423 PROVISIONING_PROFILE_SPECIFIER = ""; 423 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -546,7 +546,7 @@ @@ -546,7 +546,7 @@
546 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 546 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
547 CODE_SIGN_IDENTITY = "Apple Development"; 547 CODE_SIGN_IDENTITY = "Apple Development";
548 CODE_SIGN_STYLE = Automatic; 548 CODE_SIGN_STYLE = Automatic;
549 - CURRENT_PROJECT_VERSION = 116; 549 + CURRENT_PROJECT_VERSION = 121;
550 DEVELOPMENT_TEAM = 8J59HM8B82; 550 DEVELOPMENT_TEAM = 8J59HM8B82;
551 ENABLE_BITCODE = NO; 551 ENABLE_BITCODE = NO;
552 FRAMEWORK_SEARCH_PATHS = ( 552 FRAMEWORK_SEARCH_PATHS = (
@@ -559,7 +559,7 @@ @@ -559,7 +559,7 @@
559 "$(inherited)", 559 "$(inherited)",
560 "$(PROJECT_DIR)/Flutter", 560 "$(PROJECT_DIR)/Flutter",
561 ); 561 );
562 - MARKETING_VERSION = 1.1.6; 562 + MARKETING_VERSION = 1.2.1;
563 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 563 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
564 PRODUCT_NAME = "一键订"; 564 PRODUCT_NAME = "一键订";
565 PROVISIONING_PROFILE_SPECIFIER = ""; 565 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -579,7 +579,7 @@ @@ -579,7 +579,7 @@
579 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 579 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
580 CODE_SIGN_IDENTITY = "Apple Development"; 580 CODE_SIGN_IDENTITY = "Apple Development";
581 CODE_SIGN_STYLE = Automatic; 581 CODE_SIGN_STYLE = Automatic;
582 - CURRENT_PROJECT_VERSION = 116; 582 + CURRENT_PROJECT_VERSION = 121;
583 DEVELOPMENT_TEAM = 8J59HM8B82; 583 DEVELOPMENT_TEAM = 8J59HM8B82;
584 ENABLE_BITCODE = NO; 584 ENABLE_BITCODE = NO;
585 FRAMEWORK_SEARCH_PATHS = ( 585 FRAMEWORK_SEARCH_PATHS = (
@@ -592,7 +592,7 @@ @@ -592,7 +592,7 @@
592 "$(inherited)", 592 "$(inherited)",
593 "$(PROJECT_DIR)/Flutter", 593 "$(PROJECT_DIR)/Flutter",
594 ); 594 );
595 - MARKETING_VERSION = 1.1.6; 595 + MARKETING_VERSION = 1.2.1;
596 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 596 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
597 PRODUCT_NAME = "一键订"; 597 PRODUCT_NAME = "一键订";
598 PROVISIONING_PROFILE_SPECIFIER = ""; 598 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -21,8 +21,6 @@ import Flutter @@ -21,8 +21,6 @@ import Flutter
21 } 21 }
22 } 22 }
23 GeneratedPluginRegistrant.register(with: self) 23 GeneratedPluginRegistrant.register(with: self)
24 -// NSDictionary * userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];//获取  
25 -  
26 return super.application(application, didFinishLaunchingWithOptions: launchOptions) 24 return super.application(application, didFinishLaunchingWithOptions: launchOptions)
27 } 25 }
28 } 26 }
@@ -22,11 +22,10 @@ import 'package:provider/provider.dart'; @@ -22,11 +22,10 @@ import 'package:provider/provider.dart';
22 import 'package:one_key/utils/event_bus.dart'; 22 import 'package:one_key/utils/event_bus.dart';
23 23
24 class HandleOnlinePage extends StatefulWidget { 24 class HandleOnlinePage extends StatefulWidget {
25 -  
26 final String rid; 25 final String rid;
27 final String mid; 26 final String mid;
28 final bool fromNotify; 27 final bool fromNotify;
29 - HandleOnlinePage(this.rid, this.mid, {this.fromNotify=false}); 28 + HandleOnlinePage(this.rid, this.mid, {this.fromNotify = false});
30 29
31 @override 30 @override
32 State<StatefulWidget> createState() { 31 State<StatefulWidget> createState() {
@@ -61,8 +60,8 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -61,8 +60,8 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
61 if (detailEntity.status != "0") { 60 if (detailEntity.status != "0") {
62 //已处理 61 //已处理
63 Future.delayed(Duration(milliseconds: 200), () { 62 Future.delayed(Duration(milliseconds: 200), () {
64 - NavigatorUtil.goNotebookDetailPage(context, detailEntity.id,fromNotify: widget.fromNotify,  
65 - replace: true); 63 + NavigatorUtil.goNotebookDetailPage(context, detailEntity.id,
  64 + fromNotify: widget.fromNotify, replace: true);
66 }); 65 });
67 setMessageStatus(); 66 setMessageStatus();
68 } else { 67 } else {
@@ -132,7 +131,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -132,7 +131,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
132 } 131 }
133 132
134 //处理在线预订 133 //处理在线预订
135 - setReserveStatus(String status, {String tid = ""}) { 134 + setReserveStatus(String status, {String tid = ""}) async {
136 bus.emit("remove_untreated_message", widget.mid); 135 bus.emit("remove_untreated_message", widget.mid);
137 UserModel userModel = Provider.of<UserModel>(context, listen: false); 136 UserModel userModel = Provider.of<UserModel>(context, listen: false);
138 Map<String, String> causeMap = { 137 Map<String, String> causeMap = {
@@ -147,7 +146,11 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -147,7 +146,11 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
147 "mid": widget.mid, 146 "mid": widget.mid,
148 "cause": json.encode(causeMap) 147 "cause": json.encode(causeMap)
149 }; 148 };
150 - detailModel.setReserveStatus(context, params,showLoading: true); 149 + bool success =
  150 + await detailModel.setReserveStatus(context, params, showLoading: true);
  151 + if (success) {
  152 + bus.emit("refresh_book_list");
  153 + }
151 } 154 }
152 155
153 //处理在线预订 156 //处理在线预订
@@ -165,241 +168,246 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -165,241 +168,246 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
165 Widget build(BuildContext context) { 168 Widget build(BuildContext context) {
166 // TODO: implement build 169 // TODO: implement build
167 return SafeArea( 170 return SafeArea(
168 - child: WillPopScope(  
169 - child: detailEntity == null  
170 - ? Container(  
171 - width: double.infinity,  
172 - height: double.infinity,  
173 - color: MyColours.color_ffffff,  
174 - )  
175 - : Column(  
176 - children: <Widget>[  
177 - MyAppBar(  
178 - "在线预订详情",  
179 - showBack: true,  
180 - callback: (){  
181 - if(widget.fromNotify){  
182 - NavigatorUtil.goHomePage(context,initialIndex: 0);  
183 - }else{  
184 - Navigator.of(context).pop();  
185 - }  
186 - },  
187 - ),  
188 - Expanded(  
189 - child: DefaultTextStyle(  
190 - style: TextStyle(decoration: TextDecoration.none),  
191 - child: Container(  
192 - color: MyColours.color_ffffff,  
193 - child: Column(  
194 - children: <Widget>[  
195 - Expanded(  
196 - child: SingleChildScrollView(  
197 - child: Container(  
198 - color: MyColours.color_ffffff,  
199 - padding: EdgeInsets.symmetric(  
200 - horizontal: ScreenUtil().setWidth(43)),  
201 - child: Column(  
202 - children: <Widget>[  
203 - RowMultiText(  
204 - "用餐时段", detailEntity.ddateMd),  
205 - Stack(  
206 - alignment: Alignment.center, 171 + child: WillPopScope(
  172 + child: detailEntity == null
  173 + ? Container(
  174 + width: double.infinity,
  175 + height: double.infinity,
  176 + color: MyColours.color_ffffff,
  177 + )
  178 + : Column(
  179 + children: <Widget>[
  180 + MyAppBar(
  181 + "在线预订详情",
  182 + showBack: true,
  183 + callback: () {
  184 + if (widget.fromNotify) {
  185 + NavigatorUtil.goHomePage(context, initialIndex: 0);
  186 + } else {
  187 + Navigator.of(context).pop();
  188 + }
  189 + },
  190 + ),
  191 + Expanded(
  192 + child: DefaultTextStyle(
  193 + style: TextStyle(decoration: TextDecoration.none),
  194 + child: Container(
  195 + color: MyColours.color_ffffff,
  196 + child: Column(
  197 + children: <Widget>[
  198 + Expanded(
  199 + child: SingleChildScrollView(
  200 + child: Container(
  201 + color: MyColours.color_ffffff,
  202 + padding: EdgeInsets.symmetric(
  203 + horizontal:
  204 + ScreenUtil().setWidth(43)),
  205 + child: Column(
207 children: <Widget>[ 206 children: <Widget>[
208 - Column( 207 + RowMultiText(
  208 + "用餐时段", detailEntity.ddateMd),
  209 + Stack(
  210 + alignment: Alignment.center,
209 children: <Widget>[ 211 children: <Widget>[
210 - RowMultiText("用餐时间",  
211 - detailEntity.ddateHm),  
212 - Offstage(  
213 - offstage:  
214 - detailEntity.type == "0"  
215 - ? false  
216 - : true,  
217 - child: RowMultiText("用餐人数",  
218 - detailEntity.pnum), 212 + Column(
  213 + children: <Widget>[
  214 + RowMultiText("用餐时间",
  215 + detailEntity.ddateHm),
  216 + Offstage(
  217 + offstage:
  218 + detailEntity.type == "0"
  219 + ? false
  220 + : true,
  221 + child: RowMultiText("用餐人数",
  222 + detailEntity.pnum),
  223 + )
  224 + ],
  225 + ),
  226 + Image.asset(
  227 + detailEntity.statuImgAssets,
  228 + width:
  229 + ScreenUtil().setWidth(100),
  230 + height:
  231 + ScreenUtil().setWidth(30),
219 ) 232 )
220 ], 233 ],
221 ), 234 ),
222 - Image.asset(  
223 - detailEntity.statuImgAssets,  
224 - width: ScreenUtil().setWidth(100),  
225 - height: ScreenUtil().setWidth(30),  
226 - )  
227 - ],  
228 - ),  
229 - RowMultiText(  
230 - "包间需求",  
231 - (detailEntity.demands.length  
232 - .toString() +  
233 - "个") ??  
234 - ""),  
235 - Align(  
236 - alignment: Alignment.centerRight,  
237 - child: Offstage(  
238 - offstage:  
239 - detailEntity.demands.length >  
240 - 0  
241 - ? false  
242 - : true,  
243 - child: Container(  
244 - height:  
245 - ScreenUtil().setHeight(210),  
246 - child: ListView.builder(  
247 - itemBuilder:  
248 - (BuildContext contxt,  
249 - int index) {  
250 - return NeedItem(detailEntity  
251 - .demands[index]);  
252 - },  
253 - itemCount: detailEntity  
254 - .demands.length,  
255 - shrinkWrap: true,  
256 - scrollDirection:  
257 - Axis.horizontal,  
258 - ),  
259 - ),  
260 - )),  
261 - RowMultiText(  
262 - "客户姓名", detailEntity.rnameStr),  
263 - RowMultiText(  
264 - "客户电话", detailEntity.phone),  
265 - RowMultiText(  
266 - "备注信息", detailEntity.cusdem ?? ""),  
267 - MyDivider(double.infinity,  
268 - ScreenUtil().setHeight(1)),  
269 - Container(  
270 - color: MyColours.color_ffffff,  
271 - width: double.infinity,  
272 - height: ScreenUtil().setHeight(80),  
273 - alignment: Alignment.center,  
274 - child: Stack(  
275 - alignment: Alignment.center,  
276 - children: <Widget>[  
277 - Positioned(  
278 - left: 0,  
279 - child: Text(  
280 - "客户经理",  
281 - style: TextStyle(  
282 - color: MyColours  
283 - .color_828282,  
284 - fontSize: ScreenUtil()  
285 - .setSp(30)),  
286 - ),  
287 - ),  
288 - Positioned(  
289 - right: 0,  
290 - child: GestureDetector(  
291 - onTap: () async {  
292 - List<String> list = [];  
293 - for (Manager manager  
294 - in managers) {  
295 - list.add(  
296 - manager.roleUserName);  
297 - }  
298 - DialogUtil  
299 - .showSelectCusmanDialog(  
300 - context, list,(value){  
301 - if(value!=null){  
302 - setState(() {  
303 - cusmanText = managers[  
304 - value.first]  
305 - .userName;  
306 - });  
307 - _setCurrManager();  
308 - }  
309 - })  
310 - .then((value) {  
311 -  
312 - });  
313 - },  
314 - child: Text(  
315 - cusmanText,  
316 - style: TextStyle(  
317 - color: MyColours  
318 - .color_353535,  
319 - fontSize: ScreenUtil()  
320 - .setSp(30),  
321 - decoration: TextDecoration  
322 - .underline, 235 + RowMultiText(
  236 + "包间需求",
  237 + (detailEntity.demands.length
  238 + .toString() +
  239 + "个") ??
  240 + ""),
  241 + Align(
  242 + alignment: Alignment.centerRight,
  243 + child: Offstage(
  244 + offstage: detailEntity
  245 + .demands.length >
  246 + 0
  247 + ? false
  248 + : true,
  249 + child: Container(
  250 + height: ScreenUtil()
  251 + .setHeight(210),
  252 + child: ListView.builder(
  253 + itemBuilder:
  254 + (BuildContext contxt,
  255 + int index) {
  256 + return NeedItem(
  257 + detailEntity
  258 + .demands[index]);
  259 + },
  260 + itemCount: detailEntity
  261 + .demands.length,
  262 + shrinkWrap: true,
  263 + scrollDirection:
  264 + Axis.horizontal,
323 ), 265 ),
324 ), 266 ),
325 - ),  
326 - )  
327 - ],  
328 - ),  
329 - ),  
330 - ],  
331 - )),  
332 - ),  
333 - ),  
334 - Container(  
335 - margin: EdgeInsets.only(  
336 - top: ScreenUtil().setHeight(30),  
337 - bottom: ScreenUtil().setHeight(30)),  
338 - child: Column(  
339 - children: <Widget>[  
340 - CommonButton(  
341 - content: "安排包间",  
342 - width: 669,  
343 - height: 76,  
344 - fontSize: 34,  
345 - onPress: () async {  
346 - Map map = await NavigatorUtil  
347 - .goSelectTablePage(  
348 - context,  
349 - widget.rid,  
350 - int.parse(detailEntity.ddate) *  
351 - 1000,  
352 - detailEntity.ddate_solt);  
353 - if (map['tid'] != null) {  
354 - setReserveStatus("5", tid: map['tid']);  
355 - }  
356 - }, 267 + )),
  268 + RowMultiText(
  269 + "客户姓名", detailEntity.rnameStr),
  270 + RowMultiText(
  271 + "客户电话", detailEntity.phone),
  272 + RowMultiText("备注信息",
  273 + detailEntity.cusdem ?? ""),
  274 + MyDivider(double.infinity,
  275 + ScreenUtil().setHeight(1)),
  276 + Container(
  277 + color: MyColours.color_ffffff,
  278 + width: double.infinity,
  279 + height: ScreenUtil().setHeight(80),
  280 + alignment: Alignment.center,
  281 + child: Stack(
  282 + alignment: Alignment.center,
  283 + children: <Widget>[
  284 + Positioned(
  285 + left: 0,
  286 + child: Text(
  287 + "客户经理",
  288 + style: TextStyle(
  289 + color: MyColours
  290 + .color_828282,
  291 + fontSize: ScreenUtil()
  292 + .setSp(30)),
  293 + ),
  294 + ),
  295 + Positioned(
  296 + right: 0,
  297 + child: GestureDetector(
  298 + onTap: () async {
  299 + List<String> list = [];
  300 + for (Manager manager
  301 + in managers) {
  302 + list.add(manager
  303 + .roleUserName);
  304 + }
  305 + DialogUtil
  306 + .showSelectCusmanDialog(
  307 + context, list,
  308 + (value) {
  309 + if (value != null) {
  310 + setState(() {
  311 + cusmanText =
  312 + managers[value
  313 + .first]
  314 + .userName;
  315 + });
  316 + _setCurrManager();
  317 + }
  318 + }).then((value) {});
  319 + },
  320 + child: Text(
  321 + cusmanText,
  322 + style: TextStyle(
  323 + color: MyColours
  324 + .color_353535,
  325 + fontSize: ScreenUtil()
  326 + .setSp(30),
  327 + decoration:
  328 + TextDecoration
  329 + .underline,
  330 + ),
  331 + ),
  332 + ),
  333 + )
  334 + ],
  335 + ),
  336 + ),
  337 + ],
  338 + )),
357 ), 339 ),
358 - VEmptyView(20),  
359 - Container(  
360 - width: ScreenUtil().setWidth(669),  
361 - height: ScreenUtil().setHeight(76),  
362 - decoration: BoxDecoration(  
363 - border: Border.all(  
364 - color: MyColours.color_199095),  
365 - borderRadius: BorderRadius.circular(  
366 - ScreenUtil().setWidth(5)),  
367 - ),  
368 - child: Row(  
369 - crossAxisAlignment:  
370 - CrossAxisAlignment.center,  
371 - children: <Widget>[  
372 - Expanded(  
373 - child: GestureDetector( 340 + ),
  341 + Container(
  342 + margin: EdgeInsets.only(
  343 + top: ScreenUtil().setHeight(30),
  344 + bottom: ScreenUtil().setHeight(30)),
  345 + child: Column(
  346 + children: <Widget>[
  347 + CommonButton(
  348 + content: "安排包间",
  349 + width: 669,
  350 + height: 76,
  351 + fontSize: 34,
  352 + onPress: () async {
  353 + Map map = await NavigatorUtil
  354 + .goSelectTablePage(
  355 + context,
  356 + widget.rid,
  357 + int.parse(detailEntity.ddate) *
  358 + 1000,
  359 + detailEntity.ddate_solt);
  360 + if (map['tid'] != null) {
  361 + setReserveStatus("5",
  362 + tid: map['tid']);
  363 + }
  364 + },
  365 + ),
  366 + VEmptyView(20),
  367 + Container(
  368 + width: ScreenUtil().setWidth(669),
  369 + height: ScreenUtil().setHeight(76),
  370 + decoration: BoxDecoration(
  371 + border: Border.all(
  372 + color: MyColours.color_199095),
  373 + borderRadius: BorderRadius.circular(
  374 + ScreenUtil().setWidth(5)),
  375 + ),
  376 + child: Row(
  377 + crossAxisAlignment:
  378 + CrossAxisAlignment.center,
  379 + children: <Widget>[
  380 + Expanded(
  381 + child: GestureDetector(
374 child: Center( 382 child: Center(
375 child: Text( 383 child: Text(
376 "拒绝订单", 384 "拒绝订单",
377 style: TextStyle( 385 style: TextStyle(
378 color: 386 color:
379 - MyColours.color_199095, 387 + MyColours.color_199095,
380 fontSize: 388 fontSize:
381 - ScreenUtil().setSp(34)), 389 + ScreenUtil().setSp(34)),
382 ), 390 ),
383 ), 391 ),
384 onTap: () { 392 onTap: () {
385 _showRefuseDialog(); 393 _showRefuseDialog();
386 }, 394 },
387 )), 395 )),
388 - MyDivider(  
389 - ScreenUtil().setWidth(2),  
390 - ScreenUtil().setHeight(52),  
391 - color: MyColours.color_199095,  
392 - ),  
393 - Expanded(  
394 - child: GestureDetector( 396 + MyDivider(
  397 + ScreenUtil().setWidth(2),
  398 + ScreenUtil().setHeight(52),
  399 + color: MyColours.color_199095,
  400 + ),
  401 + Expanded(
  402 + child: GestureDetector(
395 child: Center( 403 child: Center(
396 child: Text( 404 child: Text(
397 "联系顾客", 405 "联系顾客",
398 style: TextStyle( 406 style: TextStyle(
399 color: 407 color:
400 - MyColours.color_199095, 408 + MyColours.color_199095,
401 fontSize: 409 fontSize:
402 - ScreenUtil().setSp(34)), 410 + ScreenUtil().setSp(34)),
403 ), 411 ),
404 ), 412 ),
405 onTap: () { 413 onTap: () {
@@ -413,26 +421,25 @@ class HandleOnlinePageState extends State<HandleOnlinePage> { @@ -413,26 +421,25 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
413 } 421 }
414 }, 422 },
415 )), 423 )),
416 - ],  
417 - ),  
418 - )  
419 - ],  
420 - ),  
421 - )  
422 - ],  
423 - ))),  
424 - )  
425 - ],  
426 - ),  
427 - onWillPop: ()async{  
428 - if(widget.fromNotify){  
429 - NavigatorUtil.goHomePage(context,initialIndex: 0);  
430 - return true;  
431 - }  
432 - Navigator.of(context).pop(); 424 + ],
  425 + ),
  426 + )
  427 + ],
  428 + ),
  429 + )
  430 + ],
  431 + ))),
  432 + )
  433 + ],
  434 + ),
  435 + onWillPop: () async {
  436 + if (widget.fromNotify) {
  437 + NavigatorUtil.goHomePage(context, initialIndex: 0);
433 return true; 438 return true;
434 - },  
435 - )  
436 - ); 439 + }
  440 + Navigator.of(context).pop();
  441 + return true;
  442 + },
  443 + ));
437 } 444 }
438 } 445 }
@@ -103,6 +103,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -103,6 +103,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
103 103
104 @override 104 @override
105 void dispose() { 105 void dispose() {
  106 + super.dispose();
106 bus.off("refresh_detail"); 107 bus.off("refresh_detail");
107 } 108 }
108 109
@@ -161,8 +162,9 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -161,8 +162,9 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
161 "cause": json.encode(causeMap) 162 "cause": json.encode(causeMap)
162 }; 163 };
163 bool success = 164 bool success =
164 - await detailModel.setReserveStatus(context, params, ifPush: false); 165 + await detailModel.setReserveStatus(context, params, ifPush: false);
165 if (success) { 166 if (success) {
  167 + bus.emit("refresh_book_list");
166 _getReserveDetail(); 168 _getReserveDetail();
167 } 169 }
168 } 170 }
@@ -188,7 +190,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -188,7 +190,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
188 context: context, 190 context: context,
189 barrierDismissible: false, 191 barrierDismissible: false,
190 barrierLabel: 192 barrierLabel:
191 - MaterialLocalizations.of(context).modalBarrierDismissLabel, 193 + MaterialLocalizations.of(context).modalBarrierDismissLabel,
192 transitionDuration: const Duration(milliseconds: 150), 194 transitionDuration: const Duration(milliseconds: 150),
193 pageBuilder: (BuildContext context, Animation animation, 195 pageBuilder: (BuildContext context, Animation animation,
194 Animation secondaryAnimation) { 196 Animation secondaryAnimation) {
@@ -215,7 +217,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -215,7 +217,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
215 decoration: BoxDecoration( 217 decoration: BoxDecoration(
216 color: Colors.white, 218 color: Colors.white,
217 borderRadius: 219 borderRadius:
218 - BorderRadius.circular(ScreenUtil().setWidth(10)), 220 + BorderRadius.circular(ScreenUtil().setWidth(10)),
219 ), 221 ),
220 child: Column( 222 child: Column(
221 mainAxisSize: MainAxisSize.min, 223 mainAxisSize: MainAxisSize.min,
@@ -295,7 +297,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -295,7 +297,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
295 Text(value['title'], 297 Text(value['title'],
296 style: TextStyle( 298 style: TextStyle(
297 fontSize: 299 fontSize:
298 - ScreenUtil().setSp(32), 300 + ScreenUtil().setSp(32),
299 fontWeight: FontWeight.normal, 301 fontWeight: FontWeight.normal,
300 decoration: TextDecoration.none, 302 decoration: TextDecoration.none,
301 color: MyColours.color_333333)) 303 color: MyColours.color_333333))
@@ -303,42 +305,42 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -303,42 +305,42 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
303 ), 305 ),
304 value['title'] == '其他原因' && isShowTF 306 value['title'] == '其他原因' && isShowTF
305 ? Material( 307 ? Material(
306 - child: Container(  
307 - color: Colors.white,  
308 - padding: EdgeInsets.only(  
309 - left:  
310 - ScreenUtil().setWidth(76)),  
311 - child: TextField(  
312 - maxLines: 1,  
313 - controller: _cancelController,  
314 - focusNode: _cancelNode,  
315 - textAlignVertical:  
316 - TextAlignVertical.bottom,  
317 - decoration: InputDecoration(  
318 - hintText: "请填写原因",  
319 - hintStyle: TextStyle(  
320 - color: MyColours.color_999999,  
321 - fontSize:  
322 - ScreenUtil().setSp(30),  
323 - ),  
324 - enabledBorder:  
325 - UnderlineInputBorder(  
326 - borderSide: BorderSide(  
327 - color: MyColours  
328 - .color_d8d8d8), 308 + child: Container(
  309 + color: Colors.white,
  310 + padding: EdgeInsets.only(
  311 + left:
  312 + ScreenUtil().setWidth(76)),
  313 + child: TextField(
  314 + maxLines: 1,
  315 + controller: _cancelController,
  316 + focusNode: _cancelNode,
  317 + textAlignVertical:
  318 + TextAlignVertical.bottom,
  319 + decoration: InputDecoration(
  320 + hintText: "请填写原因",
  321 + hintStyle: TextStyle(
  322 + color: MyColours.color_999999,
  323 + fontSize:
  324 + ScreenUtil().setSp(30),
  325 + ),
  326 + enabledBorder:
  327 + UnderlineInputBorder(
  328 + borderSide: BorderSide(
  329 + color: MyColours
  330 + .color_d8d8d8),
  331 + ),
  332 + // border: InputBorder.none,
329 ), 333 ),
330 - // border: InputBorder.none, 334 + onChanged: (_) {
  335 + setState(() {});
  336 + },
  337 + onEditingComplete: () {
  338 + print('fff');
  339 + _cancelNode.unfocus();
  340 + },
  341 + // keyboardType: TextInputType.number,
331 ), 342 ),
332 - onChanged: (_) {  
333 - setState(() {});  
334 - },  
335 - onEditingComplete: () {  
336 - print('fff');  
337 - _cancelNode.unfocus();  
338 - },  
339 - // keyboardType: TextInputType.number,  
340 - ),  
341 - )) 343 + ))
342 : Container(), 344 : Container(),
343 VEmptyView(40) 345 VEmptyView(40)
344 ]), 346 ]),
@@ -371,8 +373,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -371,8 +373,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
371 373
372 Navigator.of(context).pop(); 374 Navigator.of(context).pop();
373 Loading.showLoading(context); 375 Loading.showLoading(context);
  376 +
374 setReserveStatus('4', desc: desc); 377 setReserveStatus('4', desc: desc);
375 - bus.emit("refresh_book_list");  
376 }, 378 },
377 text: '确认', 379 text: '确认',
378 height: ScreenUtil().setWidth(80), 380 height: ScreenUtil().setWidth(80),
@@ -397,321 +399,334 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -397,321 +399,334 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
397 return WillPopScope( 399 return WillPopScope(
398 child: detailEntity == null 400 child: detailEntity == null
399 ? Container( 401 ? Container(
400 - width: double.infinity,  
401 - height: double.infinity,  
402 - color: MyColours.color_ffffff,  
403 - ) 402 + width: double.infinity,
  403 + height: double.infinity,
  404 + color: MyColours.color_ffffff,
  405 + )
404 : Container( 406 : Container(
405 - color: MyColours.color_ffffff,  
406 - child: Column(  
407 - children: <Widget>[  
408 - SizedBox(height: ScreenUtil.statusBarHeight),  
409 - MyAppBar(  
410 - "订座详情",  
411 - showBack: true,  
412 - callback: (){  
413 - if(widget.fromNotify){  
414 - NavigatorUtil.goHomePage(context,initialIndex: 0);  
415 - }else{  
416 - Navigator.of(context).pop();  
417 - }  
418 - },  
419 - ),  
420 - Expanded(  
421 - child: DefaultTextStyle(  
422 - style: TextStyle(decoration: TextDecoration.none),  
423 - child: Container(  
424 - color: MyColours.color_ffffff,  
425 - child: SingleChildScrollView(  
426 - child: Container( 407 + color: MyColours.color_ffffff,
  408 + child: Column(
  409 + children: <Widget>[
  410 + SizedBox(height: ScreenUtil.statusBarHeight),
  411 + MyAppBar(
  412 + "订座详情",
  413 + showBack: true,
  414 + callback: () {
  415 + if (widget.fromNotify) {
  416 + NavigatorUtil.goHomePage(context, initialIndex: 0);
  417 + } else {
  418 + Navigator.of(context).pop();
  419 + }
  420 + },
  421 + ),
  422 + Expanded(
  423 + child: DefaultTextStyle(
  424 + style: TextStyle(decoration: TextDecoration.none),
  425 + child: Container(
427 color: MyColours.color_ffffff, 426 color: MyColours.color_ffffff,
428 - padding: EdgeInsets.symmetric(  
429 - horizontal: ScreenUtil().setWidth(43)),  
430 - child: Column(  
431 - children: <Widget>[  
432 - RowMultiText("用餐时段", detailEntity.ddateMd),  
433 - Stack(  
434 - alignment: Alignment.center,  
435 - children: <Widget>[  
436 - Column(  
437 - children: <Widget>[  
438 - RowMultiText(  
439 - "用餐时间", detailEntity.ddateHm),  
440 - Offstage(  
441 - offstage: detailEntity.type == "0"  
442 - ? false  
443 - : true,  
444 - child: RowMultiText(  
445 - "用餐人数", detailEntity.pnum),  
446 - )  
447 - ],  
448 - ),  
449 - Image.asset(  
450 - detailEntity.statuImgAssets,  
451 - width: ScreenUtil().setWidth(100),  
452 - height: ScreenUtil().setWidth(30),  
453 - )  
454 - ],  
455 - ),  
456 - Offstage(  
457 - offstage: detailEntity.demands.length <= 0  
458 - ? true  
459 - : false, 427 + child: SingleChildScrollView(
  428 + child: Container(
  429 + color: MyColours.color_ffffff,
  430 + padding: EdgeInsets.symmetric(
  431 + horizontal: ScreenUtil().setWidth(43)),
460 child: Column( 432 child: Column(
461 children: <Widget>[ 433 children: <Widget>[
  434 + RowMultiText("用餐时段", detailEntity.ddateMd),
  435 + Stack(
  436 + alignment: Alignment.center,
  437 + children: <Widget>[
  438 + Column(
  439 + children: <Widget>[
  440 + RowMultiText(
  441 + "用餐时间", detailEntity.ddateHm),
  442 + Offstage(
  443 + offstage: detailEntity.type == "0"
  444 + ? false
  445 + : true,
  446 + child: RowMultiText(
  447 + "用餐人数", detailEntity.pnum),
  448 + )
  449 + ],
  450 + ),
  451 + Image.asset(
  452 + detailEntity.statuImgAssets,
  453 + width: ScreenUtil().setWidth(100),
  454 + height: ScreenUtil().setWidth(30),
  455 + )
  456 + ],
  457 + ),
  458 + Offstage(
  459 + offstage: detailEntity.demands.length <= 0
  460 + ? true
  461 + : false,
  462 + child: Column(
  463 + children: <Widget>[
  464 + RowMultiText(
  465 + "包间需求",
  466 + (detailEntity.demands.length
  467 + .toString() +
  468 + "个") ??
  469 + ""),
  470 + Align(
  471 + alignment: Alignment.centerRight,
  472 + child: Offstage(
  473 + offstage: detailEntity
  474 + .demands.length >
  475 + 0
  476 + ? false
  477 + : true,
  478 + child: Container(
  479 + height: ScreenUtil()
  480 + .setHeight(210),
  481 + child: ListView.builder(
  482 + itemBuilder:
  483 + (BuildContext contxt,
  484 + int index) {
  485 + return NeedItem(
  486 + detailEntity
  487 + .demands[index]);
  488 + },
  489 + itemCount: detailEntity
  490 + .demands.length,
  491 + shrinkWrap: true,
  492 + scrollDirection:
  493 + Axis.horizontal,
  494 + ),
  495 + ),
  496 + ))
  497 + ],
  498 + ),
  499 + ),
462 RowMultiText( 500 RowMultiText(
463 - "包间需求",  
464 - (detailEntity.demands.length  
465 - .toString() +  
466 - "个") ??  
467 - ""), 501 + "预订桌位",
  502 + (detailEntity.tables.length.toString() +
  503 + "个")),
468 Align( 504 Align(
469 alignment: Alignment.centerRight, 505 alignment: Alignment.centerRight,
470 child: Offstage( 506 child: Offstage(
471 offstage: 507 offstage:
472 - detailEntity.demands.length >  
473 - 0  
474 - ? false  
475 - : true, 508 + detailEntity.tables.length > 0
  509 + ? false
  510 + : true,
476 child: Container( 511 child: Container(
477 - height:  
478 - ScreenUtil().setHeight(210), 512 + height: ScreenUtil().setHeight(210),
479 child: ListView.builder( 513 child: ListView.builder(
480 - itemBuilder:  
481 - (BuildContext contxt, 514 + itemBuilder: (BuildContext contxt,
482 int index) { 515 int index) {
483 - return NeedItem(detailEntity  
484 - .demands[index]); 516 + return TableItem(
  517 + detailEntity.tables[index]);
485 }, 518 },
486 - itemCount: detailEntity  
487 - .demands.length, 519 + itemCount:
  520 + detailEntity.tables.length,
488 shrinkWrap: true, 521 shrinkWrap: true,
489 - scrollDirection:  
490 - Axis.horizontal, 522 + scrollDirection: Axis.horizontal,
491 ), 523 ),
492 ), 524 ),
493 - ))  
494 - ],  
495 - ),  
496 - ),  
497 - RowMultiText(  
498 - "预订桌位",  
499 - (detailEntity.tables.length.toString() +  
500 - "个")),  
501 - Align(  
502 - alignment: Alignment.centerRight,  
503 - child: Offstage(  
504 - offstage: detailEntity.tables.length > 0  
505 - ? false  
506 - : true,  
507 - child: Container(  
508 - height: ScreenUtil().setHeight(210),  
509 - child: ListView.builder(  
510 - itemBuilder: (BuildContext contxt,  
511 - int index) {  
512 - return TableItem(  
513 - detailEntity.tables[index]);  
514 - },  
515 - itemCount:  
516 - detailEntity.tables.length,  
517 - shrinkWrap: true,  
518 - scrollDirection: Axis.horizontal,  
519 - ), 525 + )),
  526 + RowMultiText("客户姓名", detailEntity.rnameStr),
  527 + RowMultiText(
  528 + "客户电话", detailEntity.phone ?? ""),
  529 + Offstage(
  530 + offstage: detailEntity.cusdem == '' ||
  531 + detailEntity.cusdem == null,
  532 + child: RowMultiText(
  533 + "备注信息", detailEntity.cusdem ?? ""),
520 ), 534 ),
521 - )),  
522 - RowMultiText("客户姓名", detailEntity.rnameStr),  
523 - RowMultiText(  
524 - "客户电话", detailEntity.phone ?? ""),  
525 - MyDivider(double.infinity,  
526 - ScreenUtil().setHeight(1)),  
527 - Container(  
528 - color: MyColours.color_ffffff,  
529 - width: double.infinity,  
530 - height: ScreenUtil().setHeight(80),  
531 - alignment: Alignment.center,  
532 - child: Stack(  
533 - alignment: Alignment.center,  
534 - children: <Widget>[  
535 - Positioned(  
536 - left: 0,  
537 - child: Text(  
538 - "客户经理",  
539 - style: TextStyle(  
540 - color: MyColours.color_828282,  
541 - fontSize:  
542 - ScreenUtil().setSp(30)), 535 + MyDivider(double.infinity,
  536 + ScreenUtil().setHeight(1)),
  537 + Container(
  538 + color: MyColours.color_ffffff,
  539 + width: double.infinity,
  540 + height: ScreenUtil().setHeight(80),
  541 + alignment: Alignment.center,
  542 + child: Stack(
  543 + alignment: Alignment.center,
  544 + children: <Widget>[
  545 + Positioned(
  546 + left: 0,
  547 + child: Text(
  548 + "客户经理",
  549 + style: TextStyle(
  550 + color: MyColours.color_828282,
  551 + fontSize:
  552 + ScreenUtil().setSp(30)),
  553 + ),
  554 + ),
  555 + Positioned(
  556 + right: 0,
  557 + child: GestureDetector(
  558 + onTap: () async {
  559 + List<String> list = [];
  560 + for (Manager manager
  561 + in managers) {
  562 + list.add(
  563 + manager.roleUserName);
  564 + }
  565 + DialogUtil
  566 + .showSelectCusmanDialog(
  567 + context, list, (value) {
  568 + if (value != null) {
  569 + setState(() {
  570 + cusmanText =
  571 + managers[value.first]
  572 + .userName;
  573 + });
  574 + _setCurrManager();
  575 + }
  576 + }).then((value) {});
  577 + },
  578 + child: Text(
  579 + cusmanText,
  580 + style: TextStyle(
  581 + color: MyColours.color_353535,
  582 + fontSize:
  583 + ScreenUtil().setSp(30),
  584 + decoration:
  585 + TextDecoration.underline,
  586 + ),
  587 + ),
  588 + ),
  589 + )
  590 + ],
543 ), 591 ),
544 ), 592 ),
545 - Positioned(  
546 - right: 0,  
547 - child: GestureDetector(  
548 - onTap: () async {  
549 - List<String> list = [];  
550 - for (Manager manager  
551 - in managers) {  
552 - list.add(manager.roleUserName);  
553 - }  
554 - DialogUtil.showSelectCusmanDialog(  
555 - context, list, (value) {  
556 - if (value != null) {  
557 - setState(() {  
558 - cusmanText =  
559 - managers[value.first]  
560 - .userName;  
561 - });  
562 - _setCurrManager();  
563 - }  
564 - }).then((value) {});  
565 - },  
566 - child: Text(  
567 - cusmanText,  
568 - style: TextStyle(  
569 - color: MyColours.color_353535,  
570 - fontSize:  
571 - ScreenUtil().setSp(30),  
572 - decoration:  
573 - TextDecoration.underline,  
574 - ),  
575 - ), 593 + Offstage(
  594 + offstage: detailEntity.note_name == '' ||
  595 + detailEntity.note_name == null,
  596 + child: RowMultiText(
  597 + "记录人", detailEntity.note_name ?? ""),
  598 + ),
  599 + Offstage(
  600 + offstage: (detailEntity.status == "4" &&
  601 + detailEntity.cancel != null)
  602 + ? false
  603 + : true,
  604 + child: Column(
  605 + children: <Widget>[
  606 + MyDivider(double.infinity,
  607 + ScreenUtil().setHeight(2)),
  608 + RowMultiText("取消原因",
  609 + detailEntity.cancel?.desc ?? "",
  610 + textAlign: TextAlign.left),
  611 + RowMultiText(
  612 + "取消时间",
  613 + detailEntity.cancel?.cdateStr ??
  614 + ""),
  615 + RowMultiText(
  616 + "操作人",
  617 + detailEntity.abolition == '2'
  618 + ? '顾客在线取消'
  619 + : detailEntity
  620 + .cancel?.uname ??
  621 + ""),
  622 + ],
576 ), 623 ),
577 - )  
578 - ],  
579 - ),  
580 - ),  
581 - Offstage(  
582 - offstage: detailEntity.note_name == '',  
583 - child: RowMultiText(  
584 - "记录人", detailEntity.note_name ?? ""),  
585 - ),  
586 - Offstage(  
587 - offstage: (detailEntity.status == "4" &&  
588 - detailEntity.cancel != null)  
589 - ? false  
590 - : true,  
591 - child: Column(  
592 - children: <Widget>[  
593 - MyDivider(double.infinity,  
594 - ScreenUtil().setHeight(2)),  
595 - RowMultiText("取消原因",  
596 - detailEntity.cancel?.desc ?? "",  
597 - textAlign: TextAlign.left),  
598 - RowMultiText(  
599 - "取消时间",  
600 - detailEntity.cancel?.cdateStr ??  
601 - ""),  
602 - RowMultiText(  
603 - "操作人",  
604 - detailEntity.abolition == '2'  
605 - ? '顾客在线取消'  
606 - : detailEntity.cancel?.uname ??  
607 - ""), 624 + ),
608 ], 625 ],
609 - ),  
610 - ),  
611 - ],  
612 - )), 626 + )),
  627 + ),
  628 + )),
  629 + ),
  630 + Offstage(
  631 + offstage: (detailEntity.status == "3" ||
  632 + detailEntity.status == "4" ||
  633 + detailEntity.status == "6")
  634 + ? true
  635 + : false,
  636 + child: Container(
  637 + width: double.infinity,
  638 + decoration: BoxDecoration(
  639 + color: MyColours.color_ffffff,
  640 + border: Border(
  641 + top: BorderSide(
  642 + color: MyColours.color_dbe3e3,
  643 + width: ScreenUtil().setWidth(1)))),
  644 + padding: EdgeInsets.symmetric(
  645 + horizontal: ScreenUtil().setHeight(40)),
  646 + margin: EdgeInsets.symmetric(
  647 + vertical: ScreenUtil().setHeight(20)),
  648 + child: CommonButton(
  649 + content: "通知客户",
  650 + width: 669,
  651 + height: 80,
  652 + fontSize: 34,
  653 + onPress: () {
  654 + DialogUtil.showShareDialog(context)?.then((value) {
  655 + switch (value) {
  656 + case 1: //微信
  657 + NavigatorUtil.goInvicationPage(
  658 + context,
  659 + detailEntity.id,
  660 + detailEntity.tableinfoStr,
  661 + detailEntity.ddate,
  662 + detailEntity.ddateStr);
  663 + break;
  664 + case 2: //短信
  665 + NavigatorUtil.goSmsPage(
  666 + context, detailEntity.id);
  667 + break;
  668 + case 3: //电话
  669 + if (detailEntity.phone != null &&
  670 + detailEntity.phone.isNotEmpty) {
  671 + Utils.goPhone(detailEntity.phone);
  672 + } else {
  673 + Utils.showToast("没有客户电话!");
  674 + }
  675 + break;
  676 + }
  677 + });
  678 + },
  679 + ),
613 ), 680 ),
614 - )),  
615 - ),  
616 - Offstage(  
617 - offstage: (detailEntity.status == "3" ||  
618 - detailEntity.status == "4" ||  
619 - detailEntity.status == "6")  
620 - ? true  
621 - : false,  
622 - child: Container(  
623 - width: double.infinity,  
624 - decoration: BoxDecoration(  
625 - color: MyColours.color_ffffff,  
626 - border: Border(  
627 - top: BorderSide(  
628 - color: MyColours.color_dbe3e3,  
629 - width: ScreenUtil().setWidth(1)))),  
630 - padding: EdgeInsets.symmetric(  
631 - horizontal: ScreenUtil().setHeight(40)),  
632 - margin: EdgeInsets.symmetric(  
633 - vertical: ScreenUtil().setHeight(20)),  
634 - child: CommonButton(  
635 - content: "通知客户",  
636 - width: 669,  
637 - height: 80,  
638 - fontSize: 34,  
639 - onPress: () {  
640 - DialogUtil.showShareDialog(context)?.then((value) {  
641 - switch (value) {  
642 - case 1: //微信  
643 - NavigatorUtil.goInvicationPage(  
644 - context,  
645 - detailEntity.id,  
646 - detailEntity.tableinfoStr,  
647 - detailEntity.ddate,  
648 - detailEntity.ddateStr);  
649 - break;  
650 - case 2: //短信  
651 - NavigatorUtil.goSmsPage(context, detailEntity.id);  
652 - break;  
653 - case 3: //电话  
654 - if (detailEntity.phone != null &&  
655 - detailEntity.phone.isNotEmpty) {  
656 - Utils.goPhone(detailEntity.phone);  
657 - } else {  
658 - Utils.showToast("没有客户电话!");  
659 - }  
660 - break;  
661 - }  
662 - });  
663 - },  
664 - ),  
665 - ),  
666 - ),  
667 - Offstage(  
668 - offstage: (detailEntity.status == "3" ||  
669 - detailEntity.status == "4" ||  
670 - detailEntity.status == "6")  
671 - ? true  
672 - : false,  
673 - child: Container(  
674 - width: double.infinity,  
675 - height: ScreenUtil().setWidth(80),  
676 - margin: EdgeInsets.symmetric(  
677 - horizontal: ScreenUtil().setHeight(40)),  
678 - decoration: BoxDecoration(  
679 - border: Border.all(  
680 - color: MyColours.color_199095,  
681 - width: ScreenUtil().setWidth(2)),  
682 - borderRadius:  
683 - BorderRadius.circular(ScreenUtil().setWidth(5)),  
684 - ),  
685 - // child: Text('fff'),  
686 - child: Material(  
687 - child: Row(  
688 - children: [  
689 - Expanded(  
690 - child: _cancelAndChangeBtn(() {  
691 - print('点击变更预订');  
692 - NavigatorUtil.goNoteBookChangePage(  
693 - context, detailEntity, widget.rid);  
694 - }, '变更预订')),  
695 - MyDivider(  
696 - ScreenUtil().setWidth(2),  
697 - ScreenUtil().setWidth(50),  
698 - color: MyColours.color_199095,  
699 - ),  
700 - Expanded(  
701 - child: _cancelAndChangeBtn(() {  
702 - _showCancelWidget(context);  
703 - }, '取消预订')),  
704 - ],  
705 - )), 681 + ),
  682 + Offstage(
  683 + offstage: (detailEntity.status == "3" ||
  684 + detailEntity.status == "4" ||
  685 + detailEntity.status == "6")
  686 + ? true
  687 + : false,
  688 + child: Container(
  689 + width: double.infinity,
  690 + height: ScreenUtil().setWidth(80),
  691 + margin: EdgeInsets.symmetric(
  692 + horizontal: ScreenUtil().setHeight(40)),
  693 + decoration: BoxDecoration(
  694 + border: Border.all(
  695 + color: MyColours.color_199095,
  696 + width: ScreenUtil().setWidth(2)),
  697 + borderRadius:
  698 + BorderRadius.circular(ScreenUtil().setWidth(5)),
  699 + ),
  700 + // child: Text('fff'),
  701 + child: Material(
  702 + child: Row(
  703 + children: [
  704 + Expanded(
  705 + child: _cancelAndChangeBtn(() {
  706 + print('点击变更预订');
  707 + NavigatorUtil.goNoteBookChangePage(
  708 + context, detailEntity, widget.rid);
  709 + }, '变更预订')),
  710 + MyDivider(
  711 + ScreenUtil().setWidth(2),
  712 + ScreenUtil().setWidth(50),
  713 + color: MyColours.color_199095,
  714 + ),
  715 + Expanded(
  716 + child: _cancelAndChangeBtn(() {
  717 + _showCancelWidget(context);
  718 + }, '取消预订')),
  719 + ],
  720 + )),
  721 + ),
  722 + ),
  723 + VEmptyView(ScreenUtil().setWidth(60))
  724 + ],
706 ), 725 ),
707 ), 726 ),
708 - VEmptyView(ScreenUtil().setWidth(60))  
709 - ],  
710 - ),  
711 - ),  
712 - onWillPop: ()async{  
713 - if(widget.fromNotify){  
714 - NavigatorUtil.goHomePage(context,initialIndex: 0); 727 + onWillPop: () async {
  728 + if (widget.fromNotify) {
  729 + NavigatorUtil.goHomePage(context, initialIndex: 0);
715 return true; 730 return true;
716 } 731 }
717 Navigator.of(context).pop(); 732 Navigator.of(context).pop();
@@ -18,8 +18,10 @@ import 'package:one_key/provider/update_model.dart'; @@ -18,8 +18,10 @@ import 'package:one_key/provider/update_model.dart';
18 import 'package:one_key/provider/user_model.dart'; 18 import 'package:one_key/provider/user_model.dart';
19 import 'package:one_key/res/colors.dart'; 19 import 'package:one_key/res/colors.dart';
20 import 'package:one_key/utils/log_util.dart'; 20 import 'package:one_key/utils/log_util.dart';
  21 +import 'package:one_key/utils/misc.dart';
21 import 'package:one_key/utils/navigator_util.dart'; 22 import 'package:one_key/utils/navigator_util.dart';
22 import 'package:one_key/utils/utils.dart'; 23 import 'package:one_key/utils/utils.dart';
  24 +import 'package:permission_handler/permission_handler.dart';
23 import 'package:provider/provider.dart'; 25 import 'package:provider/provider.dart';
24 import 'package:shared_preferences/shared_preferences.dart'; 26 import 'package:shared_preferences/shared_preferences.dart';
25 import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; 27 import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
@@ -239,18 +241,46 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -239,18 +241,46 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
239 } 241 }
240 242
241 @override 243 @override
242 - void didChangeAppLifecycleState(AppLifecycleState state) { 244 + void didChangeAppLifecycleState(AppLifecycleState state) async {
243 // TODO: implement didChangeAppLifecycleState 245 // TODO: implement didChangeAppLifecycleState
244 super.didChangeAppLifecycleState(state); 246 super.didChangeAppLifecycleState(state);
245 switch (state) { 247 switch (state) {
246 case AppLifecycleState.resumed: //应用前台可见 248 case AppLifecycleState.resumed: //应用前台可见
247 // getUntreatedMessage(); 249 // getUntreatedMessage();
248 break; 250 break;
  251 + case AppLifecycleState.inactive:
  252 + print('inactive');
  253 + break;
  254 + case AppLifecycleState.paused:
  255 + print('paused');
  256 + break;
  257 + case AppLifecycleState.detached:
  258 + print('detached');
  259 + break;
  260 +
249 default: 261 default:
250 break; 262 break;
251 } 263 }
252 } 264 }
253 265
  266 + // 系统窗口相关改变回调
  267 + void didChangeMetrics() {
  268 + super.didChangeMetrics();
  269 + print('fffff');
  270 + }
  271 +
  272 +// // 系统亮度改变回调
  273 +// void didChangePlatformBrightness() {
  274 +// super.didChangePlatformBrightness();
  275 +// print('fdddddd');
  276 +// }
  277 +
  278 +// // 文本缩放系数改变回调
  279 +// void didChangeTextScaleFactor() {}
  280 +
  281 +// // 内存不足警告回调
  282 +// void didHaveMemoryPressure() {}
  283 +
254 @override 284 @override
255 Widget build(BuildContext context) { 285 Widget build(BuildContext context) {
256 // TODO: implement build 286 // TODO: implement build
@@ -45,12 +45,13 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -45,12 +45,13 @@ class NoteBookPageState extends State<NoteBookPage> {
45 userModel = Provider.of<UserModel>(context, listen: false); 45 userModel = Provider.of<UserModel>(context, listen: false);
46 _controller = EasyRefreshController(); 46 _controller = EasyRefreshController();
47 _initTime(); 47 _initTime();
  48 + bus.on("refresh_book_list", (args) {
  49 + _getReserveList();
  50 + });
  51 +
48 WidgetsBinding.instance.addPostFrameCallback((_) { 52 WidgetsBinding.instance.addPostFrameCallback((_) {
49 _getReserveList(); 53 _getReserveList();
50 _reserveCountDay(); 54 _reserveCountDay();
51 - bus.on("refresh_book_list", (args) {  
52 - _getReserveList();  
53 - });  
54 }); 55 });
55 } 56 }
56 57
@@ -251,19 +252,15 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -251,19 +252,15 @@ class NoteBookPageState extends State<NoteBookPage> {
251 setState(() { 252 setState(() {
252 DateTime dateNow = DateTime.now(); 253 DateTime dateNow = DateTime.now();
253 dateText = 254 dateText =
254 - Utils.addZeroNumber(day.month) + "-" +Utils.addZeroNumber(day.day); 255 + Utils.addZeroNumber(day.month) + "-" + Utils.addZeroNumber(day.day);
255 if (Utils.isOneDay(day, dateNow)) { 256 if (Utils.isOneDay(day, dateNow)) {
256 - dateText +=  
257 - " 今天";  
258 - } else if(Utils.isOneDay(day,dateNow.add(Duration(days: 1)))){  
259 - dateText +=  
260 - " 明天";  
261 - }else if(Utils.isOneDay(day,dateNow.add(Duration(days: 2)))){  
262 - dateText +=  
263 - " 后天";  
264 - }else{  
265 - dateText +=  
266 - " 周${Utils.formatWeekDayNum(day.weekday)}"; 257 + dateText += " 今天";
  258 + } else if (Utils.isOneDay(day, dateNow.add(Duration(days: 1)))) {
  259 + dateText += " 明天";
  260 + } else if (Utils.isOneDay(day, dateNow.add(Duration(days: 2)))) {
  261 + dateText += " 后天";
  262 + } else {
  263 + dateText += " 周${Utils.formatWeekDayNum(day.weekday)}";
267 } 264 }
268 dateTime = day; 265 dateTime = day;
269 }); 266 });
@@ -62,7 +62,7 @@ class NotebookDetailModel extends ChangeNotifier { @@ -62,7 +62,7 @@ class NotebookDetailModel extends ChangeNotifier {
62 62
63 //安排在线预订 63 //安排在线预订
64 setReserveStatus(BuildContext context, Map<String, String> params, 64 setReserveStatus(BuildContext context, Map<String, String> params,
65 - {ifPush = true,showLoading=false}) async { 65 + {ifPush = true, showLoading = false}) async {
66 BaseResp<Map<String, dynamic>> baseResp = await DioUtil() 66 BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
67 .request<Map<String, dynamic>>( 67 .request<Map<String, dynamic>>(
68 context, Method.get, HttpUrl.set_reserve_status, 68 context, Method.get, HttpUrl.set_reserve_status,
@@ -74,9 +74,8 @@ class NotebookDetailModel extends ChangeNotifier { @@ -74,9 +74,8 @@ class NotebookDetailModel extends ChangeNotifier {
74 if (ifPush) { 74 if (ifPush) {
75 NavigatorUtil.goNotebookDetailPage(context, params["rid"], 75 NavigatorUtil.goNotebookDetailPage(context, params["rid"],
76 replace: true); 76 replace: true);
77 - } else {  
78 - return true;  
79 } 77 }
  78 + return true;
80 } else { 79 } else {
81 Utils.showToast(baseResp.msg); 80 Utils.showToast(baseResp.msg);
82 } 81 }
@@ -15,13 +15,12 @@ import 'package:provider/provider.dart'; @@ -15,13 +15,12 @@ import 'package:provider/provider.dart';
15 import 'package:table_calendar/table_calendar.dart'; 15 import 'package:table_calendar/table_calendar.dart';
16 16
17 class DialogUtil { 17 class DialogUtil {
18 -  
19 //显示消息弹框 18 //显示消息弹框
20 static showMessageDialog(BuildContext context) async { 19 static showMessageDialog(BuildContext context) async {
21 MessageDialogModel messageModel = 20 MessageDialogModel messageModel =
22 - Provider.of<MessageDialogModel>(context, listen: false); 21 + Provider.of<MessageDialogModel>(context, listen: false);
23 if (messageModel.messages.isEmpty) return null; 22 if (messageModel.messages.isEmpty) return null;
24 - messageModel.showMessageDialog=true; 23 + messageModel.showMessageDialog = true;
25 await showModalBottomSheet<int>( 24 await showModalBottomSheet<int>(
26 context: context, 25 context: context,
27 isScrollControlled: true, 26 isScrollControlled: true,
@@ -33,12 +32,14 @@ class DialogUtil { @@ -33,12 +32,14 @@ class DialogUtil {
33 children: <Widget>[ 32 children: <Widget>[
34 Consumer<MessageDialogModel>(builder: (BuildContext context, 33 Consumer<MessageDialogModel>(builder: (BuildContext context,
35 MessageDialogModel model, Widget child) { 34 MessageDialogModel model, Widget child) {
36 - if(messageModel.messages.isEmpty)return Container(); 35 + if (messageModel.messages.isEmpty) return Container();
37 return Column( 36 return Column(
38 mainAxisSize: MainAxisSize.min, 37 mainAxisSize: MainAxisSize.min,
39 children: <Widget>[ 38 children: <Widget>[
40 Container( 39 Container(
41 - margin: EdgeInsets.only(top: ScreenUtil().setWidth(21),bottom: ScreenUtil().setWidth(12)), 40 + margin: EdgeInsets.only(
  41 + top: ScreenUtil().setWidth(21),
  42 + bottom: ScreenUtil().setWidth(12)),
42 width: double.infinity, 43 width: double.infinity,
43 child: Stack( 44 child: Stack(
44 alignment: Alignment.center, 45 alignment: Alignment.center,
@@ -56,8 +57,8 @@ class DialogUtil { @@ -56,8 +57,8 @@ class DialogUtil {
56 Navigator.of(dialogContext).pop(); 57 Navigator.of(dialogContext).pop();
57 }, 58 },
58 child: Padding( 59 child: Padding(
59 - padding:  
60 - EdgeInsets.all(ScreenUtil().setWidth(12)), 60 + padding: EdgeInsets.all(
  61 + ScreenUtil().setWidth(12)),
61 child: Image.asset( 62 child: Image.asset(
62 "assets/icon_close.png", 63 "assets/icon_close.png",
63 width: ScreenUtil().setWidth(28), 64 width: ScreenUtil().setWidth(28),
@@ -67,70 +68,78 @@ class DialogUtil { @@ -67,70 +68,78 @@ class DialogUtil {
67 )) 68 ))
68 ], 69 ],
69 )), 70 )),
70 - model.messages.length>3?Container(  
71 - margin: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(22),vertical: ScreenUtil().setWidth(11)),  
72 - padding: EdgeInsets.fromLTRB(  
73 - ScreenUtil().setWidth(16),  
74 - ScreenUtil().setWidth(76),  
75 - ScreenUtil().setWidth(16),  
76 - ScreenUtil().setWidth(41)),  
77 - decoration: BoxDecoration(  
78 - color: MyColours.color_fefefe,  
79 - borderRadius:  
80 - BorderRadius.all(Radius.circular(ScreenUtil().setWidth(8)))),  
81 - child: Column(  
82 - mainAxisSize: MainAxisSize.min,  
83 - crossAxisAlignment: CrossAxisAlignment.start,  
84 - children: <Widget>[  
85 - Row(  
86 - crossAxisAlignment: CrossAxisAlignment.center,  
87 - children: <Widget>[  
88 - Text(  
89 - "在线预订",  
90 - style: TextStyle(  
91 - color: MyColours.color_353535,  
92 - fontSize: ScreenUtil().setSp(32)),  
93 - ),  
94 - Spacer(),  
95 - Text(  
96 - "刚刚",  
97 - style: TextStyle(  
98 - color: MyColours.color_999999,  
99 - fontSize: ScreenUtil().setSp(22)),  
100 - ),  
101 - ],  
102 - ),  
103 - VEmptyView(20),  
104 - Text(  
105 - "在线预订:${model.messages.length}个",  
106 - style: TextStyle(  
107 - color: MyColours.color_353535,  
108 - fontSize: ScreenUtil().setSp(32)),  
109 - ),  
110 - Row(  
111 - crossAxisAlignment: CrossAxisAlignment.center,  
112 - children: <Widget>[  
113 - Spacer(),  
114 - CommonButton(  
115 - width: 160,  
116 - height: 48,  
117 - fontSize: 32,  
118 - content: "立即处理",  
119 - state: 1,  
120 - onPress: () {  
121 - NavigatorUtil.goHomePage(context,initialIndex: 0);  
122 - },  
123 - )  
124 - ], 71 + model.messages.length > 3
  72 + ? Container(
  73 + margin: EdgeInsets.symmetric(
  74 + horizontal: ScreenUtil().setWidth(22),
  75 + vertical: ScreenUtil().setWidth(11)),
  76 + padding: EdgeInsets.fromLTRB(
  77 + ScreenUtil().setWidth(16),
  78 + ScreenUtil().setWidth(76),
  79 + ScreenUtil().setWidth(16),
  80 + ScreenUtil().setWidth(41)),
  81 + decoration: BoxDecoration(
  82 + color: MyColours.color_fefefe,
  83 + borderRadius: BorderRadius.all(
  84 + Radius.circular(
  85 + ScreenUtil().setWidth(8)))),
  86 + child: Column(
  87 + mainAxisSize: MainAxisSize.min,
  88 + crossAxisAlignment: CrossAxisAlignment.start,
  89 + children: <Widget>[
  90 + Row(
  91 + crossAxisAlignment:
  92 + CrossAxisAlignment.center,
  93 + children: <Widget>[
  94 + Text(
  95 + "在线预订",
  96 + style: TextStyle(
  97 + color: MyColours.color_353535,
  98 + fontSize: ScreenUtil().setSp(32)),
  99 + ),
  100 + Spacer(),
  101 + Text(
  102 + "刚刚",
  103 + style: TextStyle(
  104 + color: MyColours.color_999999,
  105 + fontSize: ScreenUtil().setSp(22)),
  106 + ),
  107 + ],
  108 + ),
  109 + VEmptyView(20),
  110 + Text(
  111 + "在线预订:${model.messages.length}个",
  112 + style: TextStyle(
  113 + color: MyColours.color_353535,
  114 + fontSize: ScreenUtil().setSp(32)),
  115 + ),
  116 + Row(
  117 + crossAxisAlignment:
  118 + CrossAxisAlignment.center,
  119 + children: <Widget>[
  120 + Spacer(),
  121 + CommonButton(
  122 + width: 160,
  123 + height: 48,
  124 + fontSize: 32,
  125 + content: "立即处理",
  126 + state: 1,
  127 + onPress: () {
  128 + NavigatorUtil.goHomePage(context,
  129 + initialIndex: 0);
  130 + },
  131 + )
  132 + ],
  133 + )
  134 + ],
  135 + ),
125 ) 136 )
126 - ],  
127 - ),  
128 - ):ListView.builder(  
129 - itemBuilder: (context, index) {  
130 - return MessageDialogItem(model.messages[index]);  
131 - },  
132 - itemCount: model.messages.length,  
133 - shrinkWrap: true) 137 + : ListView.builder(
  138 + itemBuilder: (context, index) {
  139 + return MessageDialogItem(model.messages[index]);
  140 + },
  141 + itemCount: model.messages.length,
  142 + shrinkWrap: true)
134 ], 143 ],
135 ); 144 );
136 }) 145 })
@@ -139,30 +148,42 @@ class DialogUtil { @@ -139,30 +148,42 @@ class DialogUtil {
139 ); 148 );
140 return widget; 149 return widget;
141 }); 150 });
142 - messageModel.showMessageDialog=false; 151 + messageModel.showMessageDialog = false;
143 } 152 }
144 153
145 //解析返回显示的日期 154 //解析返回显示的日期
146 - static String _parseDateDay(DateTime dateTime){  
147 - DateTime now=DateTime.now();  
148 - if(Utils.isOneDay(dateTime,now)){ 155 + static String _parseDateDay(DateTime dateTime) {
  156 + DateTime now = DateTime.now();
  157 + if (Utils.isOneDay(dateTime, now)) {
149 return "今"; 158 return "今";
150 - }else if(Utils.isOneDay(dateTime,now.add(Duration(days: 1)))){ 159 + } else if (Utils.isOneDay(dateTime, now.add(Duration(days: 1)))) {
151 return "明"; 160 return "明";
152 - }else if(Utils.isOneDay(dateTime,now.add(Duration(days: 2)))){ 161 + } else if (Utils.isOneDay(dateTime, now.add(Duration(days: 2)))) {
153 return "后"; 162 return "后";
154 - }else{ 163 + } else {
155 return dateTime.day.toString(); 164 return dateTime.day.toString();
156 } 165 }
157 } 166 }
158 167
159 //显示日历弹框 168 //显示日历弹框
160 - static Future<DateTime> showCalendarDialog(BuildContext context,DateTime selectDateTime) { 169 + static Future<DateTime> showCalendarDialog(
  170 + BuildContext context, DateTime selectDateTime) {
161 CalendarController _calendarController = CalendarController(); 171 CalendarController _calendarController = CalendarController();
162 - Map<DateTime, List> _events = {}; 172 + final _selectedDay = DateTime.now();
  173 + Map<DateTime, List> _events = {
  174 + _selectedDay: ['Event A7', 'Event B7', 'Event C7', 'Event D7'],
  175 + _selectedDay.add(Duration(days: 1)): [
  176 + 'Event A8',
  177 + 'Event B8',
  178 + 'Event C8',
  179 + 'Event D8'
  180 + ],
  181 + _selectedDay.add(Duration(days: 2)):
  182 + Set.from(['Event A9', 'Event A9', 'Event B9']).toList(),
  183 + };
163 return showModalBottomSheet<DateTime>( 184 return showModalBottomSheet<DateTime>(
164 context: context, 185 context: context,
165 - isScrollControlled:true, 186 + isScrollControlled: true,
166 builder: (BuildContext context) { 187 builder: (BuildContext context) {
167 BuildContext dialogContext = context; 188 BuildContext dialogContext = context;
168 Widget widget = StatefulBuilder(builder: (context, _setState) { 189 Widget widget = StatefulBuilder(builder: (context, _setState) {
@@ -183,8 +204,8 @@ class DialogUtil { @@ -183,8 +204,8 @@ class DialogUtil {
183 locale: "zh_CN", 204 locale: "zh_CN",
184 initialCalendarFormat: CalendarFormat.month, 205 initialCalendarFormat: CalendarFormat.month,
185 headerStyle: HeaderStyle( 206 headerStyle: HeaderStyle(
186 - decoration: BoxDecoration(  
187 - color: MyColours.color_2bb5b7), 207 + decoration:
  208 + BoxDecoration(color: MyColours.color_2bb5b7),
188 headerPadding: EdgeInsets.zero, 209 headerPadding: EdgeInsets.zero,
189 formatButtonVisible: false, 210 formatButtonVisible: false,
190 centerHeaderTitle: false, 211 centerHeaderTitle: false,
@@ -197,10 +218,10 @@ class DialogUtil { @@ -197,10 +218,10 @@ class DialogUtil {
197 titleTextStyle: TextStyle( 218 titleTextStyle: TextStyle(
198 color: MyColours.color_ffffff, 219 color: MyColours.color_ffffff,
199 fontSize: ScreenUtil().setSp(30)), 220 fontSize: ScreenUtil().setSp(30)),
200 - leftChevronIcon:  
201 - const Icon(Icons.chevron_left, color: Colors.white),  
202 - rightChevronIcon:  
203 - const Icon(Icons.chevron_right, color: Colors.white), 221 + leftChevronIcon: const Icon(Icons.chevron_left,
  222 + color: Colors.white),
  223 + rightChevronIcon: const Icon(Icons.chevron_right,
  224 + color: Colors.white),
204 ), 225 ),
205 calendarStyle: CalendarStyle( 226 calendarStyle: CalendarStyle(
206 contentPadding: const EdgeInsets.only(bottom: 4.0), 227 contentPadding: const EdgeInsets.only(bottom: 4.0),
@@ -218,6 +239,7 @@ class DialogUtil { @@ -218,6 +239,7 @@ class DialogUtil {
218 return Container( 239 return Container(
219 color: MyColours.color_2bb5b7, 240 color: MyColours.color_2bb5b7,
220 alignment: Alignment.center, 241 alignment: Alignment.center,
  242 + margin: EdgeInsets.only(bottom: 20),
221 padding: EdgeInsets.symmetric( 243 padding: EdgeInsets.symmetric(
222 vertical: ScreenUtil().setHeight(25)), 244 vertical: ScreenUtil().setHeight(25)),
223 child: Text( 245 child: Text(
@@ -228,17 +250,20 @@ class DialogUtil { @@ -228,17 +250,20 @@ class DialogUtil {
228 ), 250 ),
229 ); 251 );
230 }, 252 },
231 - dayBuilder: (context,date,_){ 253 + dayBuilder: (context, date, _) {
232 return Container( 254 return Container(
  255 + height: 100,
233 decoration: BoxDecoration( 256 decoration: BoxDecoration(
234 - shape: BoxShape.circle, 257 + shape: BoxShape.circle,
  258 + // color: Colors.blue,
235 ), 259 ),
236 alignment: Alignment.center, 260 alignment: Alignment.center,
237 - margin: const EdgeInsets.all(6.0), 261 + margin: const EdgeInsets.fromLTRB(6, 6, 6, 16),
238 padding: const EdgeInsets.only( 262 padding: const EdgeInsets.only(
239 bottom: 4.0, left: 8.0, right: 8.0, top: 4.0), 263 bottom: 4.0, left: 8.0, right: 8.0, top: 4.0),
240 child: Text( 264 child: Text(
241 - "${_parseDateDay(date)}", 265 + // "${_parseDateDay(date)}",
  266 + '${date.day}',
242 style: TextStyle().copyWith( 267 style: TextStyle().copyWith(
243 fontSize: ScreenUtil().setSp(32), 268 fontSize: ScreenUtil().setSp(32),
244 color: MyColours.color_353535), 269 color: MyColours.color_353535),
@@ -249,14 +274,14 @@ class DialogUtil { @@ -249,14 +274,14 @@ class DialogUtil {
249 return Container( 274 return Container(
250 decoration: BoxDecoration( 275 decoration: BoxDecoration(
251 shape: BoxShape.circle, 276 shape: BoxShape.circle,
252 - color: MyColours.color_2bb5b7  
253 - ), 277 + color: MyColours.color_2bb5b7),
254 alignment: Alignment.center, 278 alignment: Alignment.center,
255 - margin: const EdgeInsets.all(6.0), 279 + margin: const EdgeInsets.fromLTRB(6, 6, 6, 16),
256 padding: const EdgeInsets.only( 280 padding: const EdgeInsets.only(
257 bottom: 4.0, left: 8.0, right: 8.0, top: 4.0), 281 bottom: 4.0, left: 8.0, right: 8.0, top: 4.0),
258 child: Text( 282 child: Text(
259 - "${_parseDateDay(date)}", 283 + // "${_parseDateDay(date)}",
  284 + '${date.day}',
260 style: TextStyle().copyWith( 285 style: TextStyle().copyWith(
261 fontSize: ScreenUtil().setSp(32), 286 fontSize: ScreenUtil().setSp(32),
262 color: MyColours.color_ffffff), 287 color: MyColours.color_ffffff),
@@ -270,29 +295,59 @@ class DialogUtil { @@ -270,29 +295,59 @@ class DialogUtil {
270 border: Border.all( 295 border: Border.all(
271 color: MyColours.color_2bb5b7, width: 1)), 296 color: MyColours.color_2bb5b7, width: 1)),
272 alignment: Alignment.center, 297 alignment: Alignment.center,
273 - margin: const EdgeInsets.all(6.0), 298 + margin: const EdgeInsets.fromLTRB(6, 6, 6, 16),
274 padding: const EdgeInsets.only( 299 padding: const EdgeInsets.only(
275 bottom: 4.0, left: 8.0, right: 8.0, top: 4.0), 300 bottom: 4.0, left: 8.0, right: 8.0, top: 4.0),
276 child: Text( 301 child: Text(
277 - '今', 302 + // '今',
  303 + '${date.day}',
278 style: TextStyle().copyWith( 304 style: TextStyle().copyWith(
279 fontSize: ScreenUtil().setSp(32), 305 fontSize: ScreenUtil().setSp(32),
280 color: MyColours.color_2bb5b7), 306 color: MyColours.color_2bb5b7),
281 ), 307 ),
282 ); 308 );
283 }, 309 },
284 - singleMarkerBuilder: (context, dateTime, event) {  
285 - return Container(  
286 - width: ScreenUtil().setWidth(6),  
287 - height: ScreenUtil().setWidth(6),  
288 - margin: const EdgeInsets.symmetric(  
289 - horizontal: 0.3),  
290 - decoration: BoxDecoration(  
291 - shape: BoxShape.circle,  
292 - color: MyColours.color_ff0000,  
293 - ), 310 + markersBuilder: (context, date, events, holidays) {
  311 + final children = <Widget>[];
  312 +
  313 + // if (events.isNotEmpty) {
  314 + // children.add(
  315 + // Positioned(
  316 + // right: 1,
  317 + // bottom: 1,
  318 + // child: _buildEventsMarker(date, events),
  319 + // ),
  320 + // );
  321 + // }
  322 +
  323 + // if (holidays.isNotEmpty) {
  324 + children.add(
  325 + Positioned(
  326 + right: ScreenUtil().setWidth(27),
  327 + bottom: 0,
  328 + top: 5,
  329 + child: buildMarker(date)),
  330 + // Align(
  331 + // alignment: Alignment.bottomCenter,
  332 + // child: buildMarker(date),
  333 + // )
294 ); 334 );
  335 + // }
  336 +
  337 + return children;
295 }, 338 },
  339 + // singleMarkerBuilder: (context, dateTime, event) {
  340 + // return Container(
  341 + // width: ScreenUtil().setWidth(6),
  342 + // height: ScreenUtil().setWidth(6),
  343 + // margin:
  344 + // const EdgeInsets.symmetric(horizontal: 0.3),
  345 + // decoration: BoxDecoration(
  346 + // shape: BoxShape.circle,
  347 + // color: MyColours.color_ff0000,
  348 + // ),
  349 + // );
  350 + // },
296 ), 351 ),
297 ), 352 ),
298 ], 353 ],
@@ -310,17 +365,17 @@ class DialogUtil { @@ -310,17 +365,17 @@ class DialogUtil {
310 child: Container( 365 child: Container(
311 child: ClipOval( 366 child: ClipOval(
312 child: Container( 367 child: Container(
313 - width: ScreenUtil().setWidth(100),  
314 - height: ScreenUtil().setWidth(100),  
315 - alignment: Alignment.center,  
316 - color: MyColours.color_2bb5b7,  
317 - child: Text(  
318 - "今天",  
319 - style: TextStyle(  
320 - color: MyColours.color_ffffff,  
321 - fontSize: ScreenUtil().setSp(32)),  
322 - ),  
323 - )), 368 + width: ScreenUtil().setWidth(100),
  369 + height: ScreenUtil().setWidth(100),
  370 + alignment: Alignment.center,
  371 + color: MyColours.color_2bb5b7,
  372 + child: Text(
  373 + "回到\n今天",
  374 + style: TextStyle(
  375 + color: MyColours.color_ffffff,
  376 + fontSize: ScreenUtil().setSp(26)),
  377 + ),
  378 + )),
324 ), 379 ),
325 ), 380 ),
326 ), 381 ),
@@ -336,93 +391,131 @@ class DialogUtil { @@ -336,93 +391,131 @@ class DialogUtil {
336 }); 391 });
337 } 392 }
338 393
  394 + static Widget buildMarker(date) {
  395 + return Container(
  396 + height: ScreenUtil().setWidth(30),
  397 + // color: Colors.red,
  398 + // decoration:
  399 + // BoxDecoration(shape: BoxShape.circle, color: MyColours.color_2bb5b7),
  400 + alignment: Alignment.bottomCenter,
  401 + margin: const EdgeInsets.fromLTRB(6, 6, 6, 0),
  402 + padding: const EdgeInsets.only(top: 10.0),
  403 + child: Text(
  404 + "${_parseDateDay(date)}",
  405 + style: TextStyle().copyWith(
  406 + fontSize: ScreenUtil().setSp(28), color: MyColours.color_2bb5b7),
  407 + ),
  408 + );
  409 + }
  410 +
339 //显示分享弹框 411 //显示分享弹框
340 static showShareDialog(BuildContext context) { 412 static showShareDialog(BuildContext context) {
341 - return showModalBottomSheet(context: context, builder: (context) {  
342 - Widget widget = Container(  
343 - width: double.infinity,  
344 - height: ScreenUtil().setHeight(233),  
345 - color: MyColours.color_f1f1f1,  
346 - child: Row(  
347 - children: <Widget>[  
348 - Expanded(  
349 - child: GestureDetector(  
350 - onTap: (){  
351 - Navigator.of(context).pop(1);  
352 - },  
353 - behavior: HitTestBehavior.opaque,  
354 - child: Column(  
355 - mainAxisSize: MainAxisSize.min,  
356 - children: <Widget>[  
357 - Image.asset(  
358 - "assets/icon_wechat.png", width: ScreenUtil().setWidth(140),  
359 - height: ScreenUtil().setWidth(140),),  
360 - Text("微信", style: TextStyle(color: MyColours.color_353535,  
361 - fontSize: ScreenUtil().setSp(32)),)  
362 - ], 413 + return showModalBottomSheet(
  414 + context: context,
  415 + builder: (context) {
  416 + Widget widget = Container(
  417 + width: double.infinity,
  418 + height: ScreenUtil().setHeight(233),
  419 + color: MyColours.color_f1f1f1,
  420 + child: Row(
  421 + children: <Widget>[
  422 + Expanded(
  423 + child: GestureDetector(
  424 + onTap: () {
  425 + Navigator.of(context).pop(1);
  426 + },
  427 + behavior: HitTestBehavior.opaque,
  428 + child: Column(
  429 + mainAxisSize: MainAxisSize.min,
  430 + children: <Widget>[
  431 + Image.asset(
  432 + "assets/icon_wechat.png",
  433 + width: ScreenUtil().setWidth(140),
  434 + height: ScreenUtil().setWidth(140),
  435 + ),
  436 + Text(
  437 + "微信",
  438 + style: TextStyle(
  439 + color: MyColours.color_353535,
  440 + fontSize: ScreenUtil().setSp(32)),
  441 + )
  442 + ],
  443 + ),
  444 + ),
363 ), 445 ),
364 - ),  
365 - ),  
366 - Expanded(  
367 - child: GestureDetector(  
368 - onTap: (){  
369 - Navigator.of(context).pop(2);  
370 - },  
371 - behavior: HitTestBehavior.opaque,  
372 - child: Column(  
373 - mainAxisSize: MainAxisSize.min,  
374 - children: <Widget>[  
375 - Image.asset(  
376 - "assets/icon_sms.png", width: ScreenUtil().setWidth(140),  
377 - height: ScreenUtil().setWidth(140),),  
378 - Text("短信", style: TextStyle(color: MyColours.color_353535,  
379 - fontSize: ScreenUtil().setSp(32)),)  
380 - ], 446 + Expanded(
  447 + child: GestureDetector(
  448 + onTap: () {
  449 + Navigator.of(context).pop(2);
  450 + },
  451 + behavior: HitTestBehavior.opaque,
  452 + child: Column(
  453 + mainAxisSize: MainAxisSize.min,
  454 + children: <Widget>[
  455 + Image.asset(
  456 + "assets/icon_sms.png",
  457 + width: ScreenUtil().setWidth(140),
  458 + height: ScreenUtil().setWidth(140),
  459 + ),
  460 + Text(
  461 + "短信",
  462 + style: TextStyle(
  463 + color: MyColours.color_353535,
  464 + fontSize: ScreenUtil().setSp(32)),
  465 + )
  466 + ],
  467 + ),
  468 + ),
381 ), 469 ),
382 - ), 470 + Expanded(
  471 + child: GestureDetector(
  472 + onTap: () {
  473 + Navigator.of(context).pop(3);
  474 + },
  475 + behavior: HitTestBehavior.opaque,
  476 + child: Column(
  477 + mainAxisSize: MainAxisSize.min,
  478 + children: <Widget>[
  479 + Image.asset(
  480 + "assets/icon_phone.png",
  481 + width: ScreenUtil().setWidth(140),
  482 + height: ScreenUtil().setWidth(140),
  483 + ),
  484 + Text(
  485 + "电话",
  486 + style: TextStyle(
  487 + color: MyColours.color_353535,
  488 + fontSize: ScreenUtil().setSp(32)),
  489 + )
  490 + ],
  491 + ),
  492 + ),
  493 + )
  494 + ],
383 ), 495 ),
384 - Expanded(  
385 - child: GestureDetector(  
386 - onTap: (){  
387 - Navigator.of(context).pop(3);  
388 - },  
389 - behavior: HitTestBehavior.opaque,  
390 - child: Column(  
391 - mainAxisSize: MainAxisSize.min,  
392 - children: <Widget>[  
393 - Image.asset(  
394 - "assets/icon_phone.png", width: ScreenUtil().setWidth(140),  
395 - height: ScreenUtil().setWidth(140),),  
396 - Text("电话", style: TextStyle(color: MyColours.color_353535,  
397 - fontSize: ScreenUtil().setSp(32)),)  
398 - ],  
399 - ),  
400 - ),  
401 - )  
402 - ],  
403 - ),  
404 - );  
405 - return widget;  
406 - }); 496 + );
  497 + return widget;
  498 + });
407 } 499 }
408 500
409 //显示选择客户经理弹框 501 //显示选择客户经理弹框
410 - static Future<List<int>> showSelectCusmanDialog(BuildContext context,List<String> data,ValueChanged valueChanged){ 502 + static Future<List<int>> showSelectCusmanDialog(
  503 + BuildContext context, List<String> data, ValueChanged valueChanged) {
411 return Picker( 504 return Picker(
412 adapter: PickerDataAdapter<String>(pickerdata: data), 505 adapter: PickerDataAdapter<String>(pickerdata: data),
413 hideHeader: false, 506 hideHeader: false,
414 cancelText: "取消", 507 cancelText: "取消",
415 - cancelTextStyle: TextStyle(color: MyColours.color_828282,fontSize: 20), 508 + cancelTextStyle: TextStyle(color: MyColours.color_828282, fontSize: 20),
416 confirmText: "确定", 509 confirmText: "确定",
417 - confirmTextStyle: TextStyle(color: MyColours.color_2bb5b7,fontSize: 20), 510 + confirmTextStyle:
  511 + TextStyle(color: MyColours.color_2bb5b7, fontSize: 20),
418 selectedTextStyle: TextStyle(color: Colors.blue), 512 selectedTextStyle: TextStyle(color: Colors.blue),
419 onConfirm: (Picker picker, List value) { 513 onConfirm: (Picker picker, List value) {
420 print(value.toString()); 514 print(value.toString());
421 - if(valueChanged!=null){ 515 + if (valueChanged != null) {
422 valueChanged(value); 516 valueChanged(value);
423 } 517 }
424 - }  
425 - ).showModal<List<int>>(context).then((value){ 518 + }).showModal<List<int>>(context).then((value) {
426 LogUtil.v("value:${value.toString()}"); 519 LogUtil.v("value:${value.toString()}");
427 return value; 520 return value;
428 }); 521 });
@@ -154,7 +154,7 @@ packages: @@ -154,7 +154,7 @@ packages:
154 name: connectivity 154 name: connectivity
155 url: "https://pub.flutter-io.cn" 155 url: "https://pub.flutter-io.cn"
156 source: hosted 156 source: hosted
157 - version: "0.4.9+2" 157 + version: "0.4.9+3"
158 connectivity_for_web: 158 connectivity_for_web:
159 dependency: transitive 159 dependency: transitive
160 description: 160 description:
@@ -168,7 +168,7 @@ packages: @@ -168,7 +168,7 @@ packages:
168 name: connectivity_macos 168 name: connectivity_macos
169 url: "https://pub.flutter-io.cn" 169 url: "https://pub.flutter-io.cn"
170 source: hosted 170 source: hosted
171 - version: "0.1.0+4" 171 + version: "0.1.0+5"
172 connectivity_platform_interface: 172 connectivity_platform_interface:
173 dependency: transitive 173 dependency: transitive
174 description: 174 description:
@@ -238,7 +238,7 @@ packages: @@ -238,7 +238,7 @@ packages:
238 name: device_info 238 name: device_info
239 url: "https://pub.flutter-io.cn" 239 url: "https://pub.flutter-io.cn"
240 source: hosted 240 source: hosted
241 - version: "0.4.2+7" 241 + version: "0.4.2+8"
242 device_info_platform_interface: 242 device_info_platform_interface:
243 dependency: transitive 243 dependency: transitive
244 description: 244 description:
@@ -260,6 +260,13 @@ packages: @@ -260,6 +260,13 @@ packages:
260 url: "https://pub.flutter-io.cn" 260 url: "https://pub.flutter-io.cn"
261 source: hosted 261 source: hosted
262 version: "1.1.0" 262 version: "1.1.0"
  263 + ffi:
  264 + dependency: transitive
  265 + description:
  266 + name: ffi
  267 + url: "https://pub.flutter-io.cn"
  268 + source: hosted
  269 + version: "0.1.3"
263 file: 270 file:
264 dependency: transitive 271 dependency: transitive
265 description: 272 description:
@@ -561,7 +568,7 @@ packages: @@ -561,7 +568,7 @@ packages:
561 name: path_provider 568 name: path_provider
562 url: "https://pub.flutter-io.cn" 569 url: "https://pub.flutter-io.cn"
563 source: hosted 570 source: hosted
564 - version: "1.6.14" 571 + version: "1.6.18"
565 path_provider_linux: 572 path_provider_linux:
566 dependency: transitive 573 dependency: transitive
567 description: 574 description:
@@ -575,7 +582,7 @@ packages: @@ -575,7 +582,7 @@ packages:
575 name: path_provider_macos 582 name: path_provider_macos
576 url: "https://pub.flutter-io.cn" 583 url: "https://pub.flutter-io.cn"
577 source: hosted 584 source: hosted
578 - version: "0.0.4+3" 585 + version: "0.0.4+4"
579 path_provider_platform_interface: 586 path_provider_platform_interface:
580 dependency: transitive 587 dependency: transitive
581 description: 588 description:
@@ -583,6 +590,13 @@ packages: @@ -583,6 +590,13 @@ packages:
583 url: "https://pub.flutter-io.cn" 590 url: "https://pub.flutter-io.cn"
584 source: hosted 591 source: hosted
585 version: "1.0.3" 592 version: "1.0.3"
  593 + path_provider_windows:
  594 + dependency: transitive
  595 + description:
  596 + name: path_provider_windows
  597 + url: "https://pub.flutter-io.cn"
  598 + source: hosted
  599 + version: "0.0.4+1"
586 pedantic: 600 pedantic:
587 dependency: transitive 601 dependency: transitive
588 description: 602 description:
@@ -611,13 +625,6 @@ packages: @@ -611,13 +625,6 @@ packages:
611 url: "https://pub.flutter-io.cn" 625 url: "https://pub.flutter-io.cn"
612 source: hosted 626 source: hosted
613 version: "2.2.1" 627 version: "2.2.1"
614 - platform_detect:  
615 - dependency: transitive  
616 - description:  
617 - name: platform_detect  
618 - url: "https://pub.flutter-io.cn"  
619 - source: hosted  
620 - version: "1.4.0"  
621 plugin_platform_interface: 628 plugin_platform_interface:
622 dependency: transitive 629 dependency: transitive
623 description: 630 description:
@@ -687,7 +694,7 @@ packages: @@ -687,7 +694,7 @@ packages:
687 name: shared_preferences 694 name: shared_preferences
688 url: "https://pub.flutter-io.cn" 695 url: "https://pub.flutter-io.cn"
689 source: hosted 696 source: hosted
690 - version: "0.5.10" 697 + version: "0.5.12"
691 shared_preferences_linux: 698 shared_preferences_linux:
692 dependency: transitive 699 dependency: transitive
693 description: 700 description:
@@ -716,6 +723,13 @@ packages: @@ -716,6 +723,13 @@ packages:
716 url: "https://pub.flutter-io.cn" 723 url: "https://pub.flutter-io.cn"
717 source: hosted 724 source: hosted
718 version: "0.1.2+7" 725 version: "0.1.2+7"
  726 + shared_preferences_windows:
  727 + dependency: transitive
  728 + description:
  729 + name: shared_preferences_windows
  730 + url: "https://pub.flutter-io.cn"
  731 + source: hosted
  732 + version: "0.0.1+1"
719 shelf: 733 shelf:
720 dependency: transitive 734 dependency: transitive
721 description: 735 description:
@@ -855,7 +869,7 @@ packages: @@ -855,7 +869,7 @@ packages:
855 name: url_launcher 869 name: url_launcher
856 url: "https://pub.flutter-io.cn" 870 url: "https://pub.flutter-io.cn"
857 source: hosted 871 source: hosted
858 - version: "5.6.0" 872 + version: "5.7.2"
859 url_launcher_linux: 873 url_launcher_linux:
860 dependency: transitive 874 dependency: transitive
861 description: 875 description:
@@ -869,7 +883,7 @@ packages: @@ -869,7 +883,7 @@ packages:
869 name: url_launcher_macos 883 name: url_launcher_macos
870 url: "https://pub.flutter-io.cn" 884 url: "https://pub.flutter-io.cn"
871 source: hosted 885 source: hosted
872 - version: "0.0.1+7" 886 + version: "0.0.1+8"
873 url_launcher_platform_interface: 887 url_launcher_platform_interface:
874 dependency: transitive 888 dependency: transitive
875 description: 889 description:
@@ -883,7 +897,7 @@ packages: @@ -883,7 +897,7 @@ packages:
883 name: url_launcher_web 897 name: url_launcher_web
884 url: "https://pub.flutter-io.cn" 898 url: "https://pub.flutter-io.cn"
885 source: hosted 899 source: hosted
886 - version: "0.1.3+2" 900 + version: "0.1.4+1"
887 url_launcher_windows: 901 url_launcher_windows:
888 dependency: transitive 902 dependency: transitive
889 description: 903 description:
@@ -925,7 +939,14 @@ packages: @@ -925,7 +939,14 @@ packages:
925 name: webview_flutter 939 name: webview_flutter
926 url: "https://pub.flutter-io.cn" 940 url: "https://pub.flutter-io.cn"
927 source: hosted 941 source: hosted
928 - version: "0.3.22+1" 942 + version: "0.3.24"
  943 + win32:
  944 + dependency: transitive
  945 + description:
  946 + name: win32
  947 + url: "https://pub.flutter-io.cn"
  948 + source: hosted
  949 + version: "1.7.3"
929 xdg_directories: 950 xdg_directories:
930 dependency: transitive 951 dependency: transitive
931 description: 952 description:
@@ -39,6 +39,7 @@ dependencies: @@ -39,6 +39,7 @@ dependencies:
39 fluttertoast: ^3.1.3 39 fluttertoast: ^3.1.3
40 # 权限管理 40 # 权限管理
41 permission_handler: ^4.4.0 41 permission_handler: ^4.4.0
  42 + # permission_handler: ^5.0.1+1
42 # 文件系统访问 43 # 文件系统访问
43 path_provider: ^1.6.5 44 path_provider: ^1.6.5
44 ## 官方image组件扩展,支持多种图片效果展示 45 ## 官方image组件扩展,支持多种图片效果展示