Commit 3c9b5a41467d893bebac1485a34d03c0068d1177

Authored by “gaiyaguang”
1 parent 8db2665e

合并

@@ -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 }
@@ -88,6 +88,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -88,6 +88,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
88 88
89 @override 89 @override
90 void dispose() { 90 void dispose() {
  91 + super.dispose();
91 bus.off("refresh_detail"); 92 bus.off("refresh_detail");
92 } 93 }
93 94
@@ -145,6 +146,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -145,6 +146,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
145 bool success = 146 bool success =
146 await detailModel.setReserveStatus(context, params, ifPush: false); 147 await detailModel.setReserveStatus(context, params, ifPush: false);
147 if (success) { 148 if (success) {
  149 + bus.emit("refresh_book_list");
148 _getReserveDetail(); 150 _getReserveDetail();
149 } 151 }
150 } 152 }
@@ -353,7 +355,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -353,7 +355,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
353 355
354 Navigator.of(context).pop(); 356 Navigator.of(context).pop();
355 Loading.showLoading(context); 357 Loading.showLoading(context);
356 - bus.emit("refresh_book_list"); 358 +
357 setReserveStatus('4', desc: desc); 359 setReserveStatus('4', desc: desc);
358 }, 360 },
359 text: '确认', 361 text: '确认',
@@ -506,6 +508,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -506,6 +508,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
506 RowMultiText("客户姓名", detailEntity.rnameStr), 508 RowMultiText("客户姓名", detailEntity.rnameStr),
507 RowMultiText( 509 RowMultiText(
508 "客户电话", detailEntity.phone ?? ""), 510 "客户电话", detailEntity.phone ?? ""),
  511 + Offstage(
  512 + offstage: detailEntity.cusdem == '' ||
  513 + detailEntity.cusdem == null,
  514 + child: RowMultiText(
  515 + "备注信息", detailEntity.cusdem ?? ""),
  516 + ),
509 MyDivider(double.infinity, 517 MyDivider(double.infinity,
510 ScreenUtil().setHeight(1)), 518 ScreenUtil().setHeight(1)),
511 Container( 519 Container(
@@ -565,7 +573,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -565,7 +573,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
565 ), 573 ),
566 ), 574 ),
567 Offstage( 575 Offstage(
568 - offstage: detailEntity.note_name == '', 576 + offstage: detailEntity.note_name == '' ||
  577 + detailEntity.note_name == null,
569 child: RowMultiText( 578 child: RowMultiText(
570 "记录人", detailEntity.note_name ?? ""), 579 "记录人", detailEntity.note_name ?? ""),
571 ), 580 ),
@@ -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';
@@ -66,12 +68,12 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -66,12 +68,12 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
66 create: (_) => MyModel(), 68 create: (_) => MyModel(),
67 child: MyPage(), 69 child: MyPage(),
68 )); 70 ));
69 - WidgetsBinding.instance.addPostFrameCallback((_){  
70 - if(widget.initialIndex==0)return;  
71 - if(Platform.isAndroid){ 71 + WidgetsBinding.instance.addPostFrameCallback((_) {
  72 + if (widget.initialIndex == 0) return;
  73 + if (Platform.isAndroid) {
72 _getIntent(); 74 _getIntent();
73 } 75 }
74 - Future.delayed(Duration(milliseconds: 300),(){ 76 + Future.delayed(Duration(milliseconds: 300), () {
75 initPlatformState(); 77 initPlatformState();
76 }); 78 });
77 Future.delayed(Duration(milliseconds: 30000), () { 79 Future.delayed(Duration(milliseconds: 30000), () {
@@ -162,9 +164,9 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -162,9 +164,9 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
162 }, 164 },
163 xgPushClickAction: (Map<String, dynamic> msg) async { 165 xgPushClickAction: (Map<String, dynamic> msg) async {
164 print("flutter xgPushClickAction ${msg['custom']}"); 166 print("flutter xgPushClickAction ${msg['custom']}");
165 - if(Platform.isIOS&&msg!=null&&msg['custom']!=null){  
166 - Map<String,dynamic> custom=jsonDecode(msg['custom'].toString());  
167 - switch(custom["messageType"].toString()){ 167 + if (Platform.isIOS && msg != null && msg['custom'] != null) {
  168 + Map<String, dynamic> custom = jsonDecode(msg['custom'].toString());
  169 + switch (custom["messageType"].toString()) {
168 case "10": 170 case "10":
169 NavigatorUtil.goNotebookDetailPage( 171 NavigatorUtil.goNotebookDetailPage(
170 context, custom['rid'].toString(), 172 context, custom['rid'].toString(),
@@ -240,18 +242,46 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { @@ -240,18 +242,46 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
240 } 242 }
241 243
242 @override 244 @override
243 - void didChangeAppLifecycleState(AppLifecycleState state) { 245 + void didChangeAppLifecycleState(AppLifecycleState state) async {
244 // TODO: implement didChangeAppLifecycleState 246 // TODO: implement didChangeAppLifecycleState
245 super.didChangeAppLifecycleState(state); 247 super.didChangeAppLifecycleState(state);
246 switch (state) { 248 switch (state) {
247 - case AppLifecycleState.resumed: //应用前台可见 249 + case AppLifecycleState.resumed: //应用前台可见,并且响应用户输入
248 getUntreatedMessage(); 250 getUntreatedMessage();
249 break; 251 break;
  252 + case AppLifecycleState.inactive:
  253 + print('inactive');
  254 + break;
  255 + case AppLifecycleState.paused:
  256 + print('paused');
  257 + break;
  258 + case AppLifecycleState.detached:
  259 + print('detached');
  260 + break;
  261 +
250 default: 262 default:
251 break; 263 break;
252 } 264 }
253 } 265 }
254 266
  267 + // 系统窗口相关改变回调
  268 + void didChangeMetrics() {
  269 + super.didChangeMetrics();
  270 + print('fffff');
  271 + }
  272 +
  273 +// // 系统亮度改变回调
  274 +// void didChangePlatformBrightness() {
  275 +// super.didChangePlatformBrightness();
  276 +// print('fdddddd');
  277 +// }
  278 +
  279 +// // 文本缩放系数改变回调
  280 +// void didChangeTextScaleFactor() {}
  281 +
  282 +// // 内存不足警告回调
  283 +// void didHaveMemoryPressure() {}
  284 +
255 @override 285 @override
256 Widget build(BuildContext context) { 286 Widget build(BuildContext context) {
257 // TODO: implement build 287 // TODO: implement build
@@ -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 }
@@ -8,7 +8,6 @@ class Tools { @@ -8,7 +8,6 @@ class Tools {
8 8
9 Future<Map> getIntent() async { 9 Future<Map> getIntent() async {
10 Map result = await _channel.invokeMethod("getIntent"); 10 Map result = await _channel.invokeMethod("getIntent");
11 - // Utils.showToast(json.encode(result));  
12 return result; 11 return result;
13 } 12 }
14 } 13 }
@@ -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组件扩展,支持多种图片效果展示