Commit 2c49a1dea513d105f4edbf37e99dde9bedee2f25

Authored by wdn127929
1 parent 536a7465

预订订金设置&&预订安排页订金设置

@@ -1681,7 +1681,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1681,7 +1681,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1681 style: TextStyle(color: MyColours.color_515151, fontSize: font(15)), 1681 style: TextStyle(color: MyColours.color_515151, fontSize: font(15)),
1682 ), 1682 ),
1683 Spacer(), 1683 Spacer(),
1684 - if(detailModel.reserveDepositList.length==0) RoundButton( 1684 + RoundButton(
1685 text: '添加一项', 1685 text: '添加一项',
1686 radius: r(11), 1686 radius: r(11),
1687 width: w(72), 1687 width: w(72),
@@ -1777,8 +1777,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1777,8 +1777,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1777 djText('支付方式 ', '${data.payType}'), 1777 djText('支付方式 ', '${data.payType}'),
1778 ], 1778 ],
1779 ), 1779 ),
1780 - HEmptyView(140),  
1781 - Column( 1780 + Spacer(), Column(
1782 crossAxisAlignment: CrossAxisAlignment.start, 1781 crossAxisAlignment: CrossAxisAlignment.start,
1783 mainAxisAlignment: MainAxisAlignment.spaceEvenly, 1782 mainAxisAlignment: MainAxisAlignment.spaceEvenly,
1784 children: [ 1783 children: [
@@ -1787,7 +1786,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1787,7 +1786,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1787 // djText('收款人 ', 1786 // djText('收款人 ',
1788 // '${data.nickName == null ? '' : data.nickName}'), 1787 // '${data.nickName == null ? '' : data.nickName}'),
1789 ], 1788 ],
1790 - ) 1789 + ),
  1790 + HEmptyView(32),
1791 ], 1791 ],
1792 )) 1792 ))
1793 ]))); 1793 ])));
@@ -58,6 +58,7 @@ import '../../provider/SmsModel.dart'; @@ -58,6 +58,7 @@ import '../../provider/SmsModel.dart';
58 import '../../provider/customer_provider.dart'; 58 import '../../provider/customer_provider.dart';
59 import '../../provider/marketing_center_provider.dart'; 59 import '../../provider/marketing_center_provider.dart';
60 import '../../provider/my_model.dart'; 60 import '../../provider/my_model.dart';
  61 +import '../../utils/MyNumberTextInputFormatter.dart';
61 import '../../utils/call_log_utils.dart'; 62 import '../../utils/call_log_utils.dart';
62 import '../../utils/common_utils.dart'; 63 import '../../utils/common_utils.dart';
63 import '../../utils/screen_util.dart'; 64 import '../../utils/screen_util.dart';
@@ -187,6 +188,10 @@ class InvicationPageState extends State<InvicationPage> @@ -187,6 +188,10 @@ class InvicationPageState extends State<InvicationPage>
187 188
188 MarketingCenterProvider marketingCenterProvider; 189 MarketingCenterProvider marketingCenterProvider;
189 String additionTitle = '点击设置本单追加的自定义图文'; 190 String additionTitle = '点击设置本单追加的自定义图文';
  191 + // String paymentTitle = '选填,未填写表示无需支付订金';
  192 +
  193 + TextEditingController moneyControl = TextEditingController();
  194 + FocusNode moneyFocusNode = FocusNode();
190 195
191 @override 196 @override
192 void initState() { 197 void initState() {
@@ -316,15 +321,42 @@ class InvicationPageState extends State<InvicationPage> @@ -316,15 +321,42 @@ class InvicationPageState extends State<InvicationPage>
316 bus.on("getDzSellerConf", (args) { 321 bus.on("getDzSellerConf", (args) {
317 getDzSellerConf(); 322 getDzSellerConf();
318 }); 323 });
319 - bus.on("getReserveImgText", (args) { 324 + bus.on("getReserveImgText", (args) {
320 getReserveImgText(); 325 getReserveImgText();
321 }); 326 });
322 327
  328 + bus.on("refresh_invication_deposit", (args) {
  329 + _getReserveDepositByRid(); //刷新订金数据
  330 + });
  331 +
323 // Utils.changeStatusColor(color: Colors.transparent); 332 // Utils.changeStatusColor(color: Colors.transparent);
324 333
325 user = Provider.of<UserModel>(context, listen: false).user; 334 user = Provider.of<UserModel>(context, listen: false).user;
326 } 335 }
327 336
  337 + /// 通过预订ID查收定金详情
  338 + _getReserveDepositByRid() async {
  339 + Map<String, String> params = {
  340 + 'rid': widget.rid,
  341 + };
  342 + await detailModel.getReserveDepositByRid(context, params);
  343 + if (detailModel.reserveDepositList.length > 0) {
  344 + //存在在线支付订金,找到赋值,
  345 + detailModel.reserveDepositList.forEach((element) {
  346 + if (element.payType == '微信预订通知') {
  347 + moneyControl.text = element.price;
  348 + detailModel.depositId = element.id;
  349 + setState(() {});
  350 + }
  351 + });
  352 + } else {
  353 + //全局设置
  354 + moneyControl.text =
  355 + marketingCenterProvider.dzSellerConfModel.depositPrice ??
  356 + '选填,未填写表示无需支付订金';
  357 + }
  358 + }
  359 +
328 getReserveImgText() async { 360 getReserveImgText() async {
329 await marketingCenterProvider.getReserveImgText(context, widget.rid); 361 await marketingCenterProvider.getReserveImgText(context, widget.rid);
330 if (marketingCenterProvider.reserveImgText != null) { 362 if (marketingCenterProvider.reserveImgText != null) {
@@ -336,6 +368,14 @@ class InvicationPageState extends State<InvicationPage> @@ -336,6 +368,14 @@ class InvicationPageState extends State<InvicationPage>
336 getDzSellerConf() async { 368 getDzSellerConf() async {
337 bool success = await marketingCenterProvider.getDzSellerConf(context); 369 bool success = await marketingCenterProvider.getDzSellerConf(context);
338 if (success && marketingCenterProvider.dzSellerConfModel != null) { 370 if (success && marketingCenterProvider.dzSellerConfModel != null) {
  371 + if (marketingCenterProvider.dzSellerConfModel.isShowNoticeDeposit == '1'
  372 + // &&
  373 + // marketingCenterProvider.dzSellerConfModel.depositPrice != '0' &&
  374 + // marketingCenterProvider.dzSellerConfModel.depositPrice != null
  375 + ) {
  376 + //全局设置过金额,并且开通预订方式
  377 + _getReserveDepositByRid();
  378 + }
339 noticeSms = marketingCenterProvider.dzSellerConfModel.isNotice == '1' 379 noticeSms = marketingCenterProvider.dzSellerConfModel.isNotice == '1'
340 ? true 380 ? true
341 : false; 381 : false;
@@ -442,8 +482,8 @@ class InvicationPageState extends State<InvicationPage> @@ -442,8 +482,8 @@ class InvicationPageState extends State<InvicationPage>
442 bus.off("refresh_invitaion_info"); 482 bus.off("refresh_invitaion_info");
443 bus.off("refresh_photo_invication"); 483 bus.off("refresh_photo_invication");
444 bus.off("getDzSellerConf"); 484 bus.off("getDzSellerConf");
445 - bus.off("getReserveImgText");  
446 - 485 + bus.off("getReserveImgText");
  486 + bus.off("refresh_invication_deposit");
447 487
448 WidgetsBinding.instance.removeObserver(this); //销毁观察者 488 WidgetsBinding.instance.removeObserver(this); //销毁观察者
449 if (_timer != null) { 489 if (_timer != null) {
@@ -2582,16 +2622,111 @@ class InvicationPageState extends State<InvicationPage> @@ -2582,16 +2622,111 @@ class InvicationPageState extends State<InvicationPage>
2582 ) 2622 )
2583 ], 2623 ],
2584 )), 2624 )),
  2625 + if (marketingCenterProvider
  2626 + .dzSellerConfModel.isShowNoticeDeposit ==
  2627 + '1')
  2628 + InkWell(
  2629 + onTap: () async {
  2630 + FocusScope.of(context)
  2631 + .requestFocus(FocusNode()); //隐藏键盘
  2632 +
  2633 + //跳转到新页面
  2634 +// if (detailModel.reserveDepositList.length > 0) {
  2635 +// //查看页面
  2636 +// NavigatorUtil.goBookDepositPage(context, widget.rid,
  2637 +// onlyShow: true,bookDepositModel:detailModel.reserveDepositList[0] );
  2638 +
  2639 +// } else {
  2640 +// //编辑页面
  2641 +// NavigatorUtil.goBookDepositPage(
  2642 +// context, detailEntity.id);
  2643 +// }
  2644 + },
  2645 + child: Container(
  2646 + margin: EdgeInsets.only(
  2647 + // top: ScreenUtil().setWidth(40),
  2648 + bottom: ScreenUtil().setWidth(40)),
  2649 + height: ScreenUtil().setWidth(68),
  2650 + padding: EdgeInsets.symmetric(
  2651 + horizontal: ScreenUtil().setWidth(16)),
  2652 + decoration: BoxDecoration(
  2653 + borderRadius: BorderRadius.circular(
  2654 + ScreenUtil().setWidth(12)),
  2655 + // color: Colors.red,
  2656 + border: Border.all(
  2657 + width: ScreenUtil().setWidth(2),
  2658 + color: MyColours.color_DBDBDB)),
  2659 + child: Row(
  2660 + mainAxisAlignment:
  2661 + MainAxisAlignment.spaceBetween,
  2662 + crossAxisAlignment: CrossAxisAlignment.center,
  2663 + children: [
  2664 + Text(
  2665 + '预订订金:',
  2666 + style: TextStyle(
  2667 + fontSize: ScreenUtil().setSp(28),
  2668 + color: MyColours.color_515151),
  2669 + ),
  2670 + HEmptyView(40),
  2671 + Expanded(
  2672 + child: TextField(
  2673 + controller: moneyControl,
  2674 + textAlign: TextAlign.right,
  2675 + textAlignVertical:
  2676 + TextAlignVertical.bottom,
  2677 + maxLines: 1,
  2678 + inputFormatters: [
  2679 + FilteringTextInputFormatter(
  2680 + RegExp("[0-9.]"),
  2681 + allow: true),
  2682 + MyNumberTextInputFormatter(digit: 2),
  2683 + ],
  2684 + // //光标颜色
  2685 + // cursorColor:
  2686 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  2687 + //输入文本的样式
  2688 + style: TextStyle(
  2689 + color: MyColours.color_515151,
  2690 + fontSize: ScreenUtil().setSp(28),
  2691 + ),
  2692 + focusNode: moneyFocusNode,
  2693 + decoration: InputDecoration(
  2694 + isCollapsed: true,
  2695 + border: OutlineInputBorder(
  2696 + borderSide: BorderSide.none),
  2697 + hintText: '选填,未填写表示无需支付订金',
  2698 + hintStyle: TextStyle(
  2699 + color: MyColours.color_999999,
  2700 + fontSize: ScreenUtil().setSp(28),
  2701 + ),
  2702 + enabledBorder:
  2703 + new UnderlineInputBorder(
  2704 + borderSide: BorderSide.none,
  2705 + ),
  2706 + focusedBorder:
  2707 + new UnderlineInputBorder(
  2708 + borderSide: BorderSide.none,
  2709 + ),
  2710 + ),
  2711 + onChanged: (value) {},
  2712 + onEditingComplete: () {
  2713 + FocusScope.of(context).requestFocus(
  2714 + FocusNode()); //点击空白处隐藏键盘
  2715 + },
  2716 + keyboardType:
  2717 + TextInputType.numberWithOptions()),
  2718 + ),
  2719 + ],
  2720 + ))),
2585 InkWell( 2721 InkWell(
2586 - onTap: () async{ 2722 + onTap: () async {
2587 FocusScope.of(context) 2723 FocusScope.of(context)
2588 .requestFocus(FocusNode()); //隐藏键盘 2724 .requestFocus(FocusNode()); //隐藏键盘
2589 2725
2590 //跳转到新页面 2726 //跳转到新页面
2591 2727
2592 - await NavigatorUtil.goInvicationAdditionPage(context, 2728 + await NavigatorUtil.goInvicationAdditionPage(context,
2593 rid: widget.rid); 2729 rid: widget.rid);
2594 -  
2595 }, 2730 },
2596 child: Container( 2731 child: Container(
2597 margin: EdgeInsets.only( 2732 margin: EdgeInsets.only(
@@ -4535,6 +4670,63 @@ class InvicationPageState extends State<InvicationPage> @@ -4535,6 +4670,63 @@ class InvicationPageState extends State<InvicationPage>
4535 } 4670 }
4536 } 4671 }
4537 4672
  4673 + _createReserveDeposit() async {
  4674 + if (marketingCenterProvider.dzSellerConfModel.isShowNoticeDeposit == '1') {
  4675 + //页面有预订定金选项
  4676 +// if( detailModel.depositId == null){
  4677 + // //新建
  4678 + // }else{
  4679 + // // 修改或者不可编辑
  4680 + // }
  4681 + if (moneyControl.text != '选填,未填写表示无需支付订金' && moneyControl.text.trim().length > 0) {
  4682 + Map<String, String> pramas = {
  4683 + 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  4684 + 'rid': widget.rid,
  4685 + 'price': moneyControl.text,
  4686 + // 'rname': paymentC.text,
  4687 + 'uid': Provider.of<UserModel>(context, listen: false).user.openid,
  4688 + // 'pay_time': paymentTime == '请选择'
  4689 + // ? null
  4690 + // : (DateUtil.getDateTime(paymentTime).millisecondsSinceEpoch / 1000)
  4691 + // .floor()
  4692 + // .toString(),
  4693 + // 'pay_type': payTypeIndex == null ? null : payType[payTypeIndex],
  4694 +
  4695 + // 'pay_no':
  4696 + // receiptNumberC.text.trim().length == 0 ? null : receiptNumberC.text,
  4697 + 'insert_uid':
  4698 + Provider.of<UserModel>(context, listen: false).user.openid
  4699 + };
  4700 +
  4701 + bool success = await detailModel.createReserveDeposit(context, pramas);
  4702 + if (success) {
  4703 + bus.emit('refresh_detail_deposit');
  4704 + bool isSuccess = await Utils.goShareInvicationToWeChat(
  4705 + context,
  4706 + widget.rid,
  4707 + Provider.of<UserModel>(context, listen: false).user.openid,
  4708 + depositId: detailModel.depositId);
  4709 + print(isSuccess);
  4710 + if (isSuccess) {
  4711 + _addForward();
  4712 + }
  4713 + // bus.emit('refresh_invication_deposit');
  4714 + }
  4715 + }
  4716 + } else {
  4717 + //页面无预订定金选项
  4718 + bool isSuccess = await Utils.goShareInvicationToWeChat(
  4719 + context,
  4720 + widget.rid,
  4721 + Provider.of<UserModel>(context, listen: false).user.openid,
  4722 + depositId: detailModel.depositId);
  4723 + print(isSuccess);
  4724 + if (isSuccess) {
  4725 + _addForward();
  4726 + }
  4727 + }
  4728 + }
  4729 +
4538 ///微信通知、发短信 4730 ///微信通知、发短信
4539 Widget _btnWidget() { 4731 Widget _btnWidget() {
4540 return Padding( 4732 return Padding(
@@ -4852,31 +5044,21 @@ class InvicationPageState extends State<InvicationPage> @@ -4852,31 +5044,21 @@ class InvicationPageState extends State<InvicationPage>
4852 if (isSuc) { 5044 if (isSuc) {
4853 couponProvider.hasModify = true; 5045 couponProvider.hasModify = true;
4854 bus.emit("refresh_book_list"); 5046 bus.emit("refresh_book_list");
4855 - bool isSuccess =  
4856 - await Utils.goShareInvicationToWeChat(  
4857 - context,  
4858 - widget.rid,  
4859 - Provider.of<UserModel>(context, listen: false)  
4860 - .user  
4861 - .openid,  
4862 - );  
4863 - print(isSuccess);  
4864 - if (isSuccess) {  
4865 - _addForward();  
4866 - } 5047 + await _createReserveDeposit();
4867 } 5048 }
4868 } else { 5049 } else {
4869 - bool isSuccess =  
4870 - await Utils.goShareInvicationToWeChat(  
4871 - context,  
4872 - widget.rid,  
4873 - Provider.of<UserModel>(context,  
4874 - listen: false)  
4875 - .user  
4876 - .openid);  
4877 - if (isSuccess) {  
4878 - _addForward();  
4879 - } 5050 + await _createReserveDeposit();
  5051 + // bool isSuccess =
  5052 + // await Utils.goShareInvicationToWeChat(
  5053 + // context,
  5054 + // widget.rid,
  5055 + // Provider.of<UserModel>(context,
  5056 + // listen: false)
  5057 + // .user
  5058 + // .openid);
  5059 + // if (isSuccess) {
  5060 + // _addForward();
  5061 + // }
4880 } 5062 }
4881 }); 5063 });
4882 removeOverlay(); 5064 removeOverlay();
@@ -4907,28 +5089,30 @@ class InvicationPageState extends State<InvicationPage> @@ -4907,28 +5089,30 @@ class InvicationPageState extends State<InvicationPage>
4907 if (isSuc) { 5089 if (isSuc) {
4908 couponProvider.hasModify = true; 5090 couponProvider.hasModify = true;
4909 bus.emit("refresh_book_list"); 5091 bus.emit("refresh_book_list");
4910 - bool isSuccess =  
4911 - await Utils.goShareInvicationToWeChat(  
4912 - context,  
4913 - widget.rid,  
4914 - Provider.of<UserModel>(context, listen: false)  
4915 - .user  
4916 - .openid);  
4917 - print(isSuccess);  
4918 - if (isSuccess) {  
4919 - _addForward();  
4920 - } 5092 + await _createReserveDeposit();
  5093 + // bool isSuccess =
  5094 + // await Utils.goShareInvicationToWeChat(
  5095 + // context,
  5096 + // widget.rid,
  5097 + // Provider.of<UserModel>(context, listen: false)
  5098 + // .user
  5099 + // .openid);
  5100 + // print(isSuccess);
  5101 + // if (isSuccess) {
  5102 + // _addForward();
  5103 + // }
4921 } 5104 }
4922 } else { 5105 } else {
4923 - bool isSuccess = await Utils.goShareInvicationToWeChat(  
4924 - context,  
4925 - widget.rid,  
4926 - Provider.of<UserModel>(context, listen: false)  
4927 - .user  
4928 - .openid);  
4929 - if (isSuccess) {  
4930 - _addForward();  
4931 - } 5106 + await _createReserveDeposit();
  5107 + // bool isSuccess = await Utils.goShareInvicationToWeChat(
  5108 + // context,
  5109 + // widget.rid,
  5110 + // Provider.of<UserModel>(context, listen: false)
  5111 + // .user
  5112 + // .openid);
  5113 + // if (isSuccess) {
  5114 + // _addForward();
  5115 + // }
4932 } 5116 }
4933 } 5117 }
4934 }) 5118 })
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
2 import 'package:flutter/services.dart'; 2 import 'package:flutter/services.dart';
3 import 'package:flutter_screenutil/flutter_screenutil.dart'; 3 import 'package:flutter_screenutil/flutter_screenutil.dart';
4 import 'package:one_key/provider/marketing_center_provider.dart'; 4 import 'package:one_key/provider/marketing_center_provider.dart';
  5 +import 'package:one_key/utils/dialog_util.dart';
5 import 'package:one_key/widgets/system_app_bar.dart'; 6 import 'package:one_key/widgets/system_app_bar.dart';
6 import 'package:provider/provider.dart'; 7 import 'package:provider/provider.dart';
7 8
@@ -60,7 +61,6 @@ class _PaymentSettingPageState extends State<PaymentSettingPage> { @@ -60,7 +61,6 @@ class _PaymentSettingPageState extends State<PaymentSettingPage> {
60 _setData() async { 61 _setData() async {
61 Future.wait<bool>([ 62 Future.wait<bool>([
62 _setIsShowNoticeDeposit(), 63 _setIsShowNoticeDeposit(),
63 -  
64 _setDepositPrice(), 64 _setDepositPrice(),
65 ]).then((results) { 65 ]).then((results) {
66 print(results[0]); 66 print(results[0]);
@@ -87,7 +87,14 @@ class _PaymentSettingPageState extends State<PaymentSettingPage> { @@ -87,7 +87,14 @@ class _PaymentSettingPageState extends State<PaymentSettingPage> {
87 _setData(); 87 _setData();
88 } else { 88 } else {
89 //商家未开通微信支付 89 //商家未开通微信支付
90 - Utils.showToast('商家未开通微信支付功能!'); 90 + // Utils.showToast('商家未开通微信支付功能!');
  91 + isPayment = false;
  92 + setState(() {});
  93 + _setIsShowNoticeDeposit();
  94 +
  95 + DialogUtil.cupertinoAlertDialogOnly(context,
  96 + content: '您的店铺尚未开通微信支付商家账号,请拨打400-0009690 联系客服,或联系您的销售服务开通后再开启本功能!',
  97 + rTitle: '我知道了');
91 } 98 }
92 } 99 }
93 } 100 }
@@ -112,25 +119,24 @@ class _PaymentSettingPageState extends State<PaymentSettingPage> { @@ -112,25 +119,24 @@ class _PaymentSettingPageState extends State<PaymentSettingPage> {
112 119
113 ///使用店铺手机发送通知短信 120 ///使用店铺手机发送通知短信
114 Future<bool> _setDepositPrice({bool isShowLoading = true}) async { 121 Future<bool> _setDepositPrice({bool isShowLoading = true}) async {
115 - if(moneyControl.text.trim().length > 0){  
116 - Map<String, String> params = {  
117 - 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,  
118 - 'key': 'deposit_price',  
119 - 'value': moneyControl.text  
120 - }; 122 + if (moneyControl.text.trim().length > 0) {
  123 + Map<String, String> params = {
  124 + 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  125 + 'key': 'deposit_price',
  126 + 'value': moneyControl.text
  127 + };
121 128
122 - bool success = await marketingCenterProvider.setConfing(context, params,  
123 - needToast: false); 129 + bool success = await marketingCenterProvider.setConfing(context, params,
  130 + needToast: false);
124 131
125 - if (success) {  
126 - return true;  
127 - } else {  
128 - return false;  
129 - }  
130 - }else{ 132 + if (success) {
131 return true; 133 return true;
  134 + } else {
  135 + return false;
132 } 136 }
133 - 137 + } else {
  138 + return true;
  139 + }
134 } 140 }
135 141
136 ///输入框 142 ///输入框
@@ -303,8 +309,7 @@ class _PaymentSettingPageState extends State<PaymentSettingPage> { @@ -303,8 +309,7 @@ class _PaymentSettingPageState extends State<PaymentSettingPage> {
303 height: w(40), 309 height: w(40),
304 isBold: true, 310 isBold: true,
305 onPressed: () async { 311 onPressed: () async {
306 - FocusScope.of(context)  
307 - .requestFocus(FocusNode()); //隐藏键盘 312 + FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
308 313
309 _getSellerById(); 314 _getSellerById();
310 }, 315 },
@@ -42,6 +42,8 @@ class NotebookDetailModel extends ChangeNotifier { @@ -42,6 +42,8 @@ class NotebookDetailModel extends ChangeNotifier {
42 42
43 List<ReserveActionLogSunModol> reserveActionLogData = []; // 获取预订操作记录 43 List<ReserveActionLogSunModol> reserveActionLogData = []; // 获取预订操作记录
44 44
  45 + String depositId; //订金id
  46 +
45 NotebookDetailModel() { 47 NotebookDetailModel() {
46 initSexList(); 48 initSexList();
47 } 49 }
@@ -272,6 +274,9 @@ class NotebookDetailModel extends ChangeNotifier { @@ -272,6 +274,9 @@ class NotebookDetailModel extends ChangeNotifier {
272 return false; 274 return false;
273 }); 275 });
274 if (baseResp.code == Constant.status_success) { 276 if (baseResp.code == Constant.status_success) {
  277 + if(baseResp.data is Map){
  278 + depositId = baseResp.data['id'];
  279 + }
275 return true; 280 return true;
276 } else { 281 } else {
277 Utils.showToast(baseResp.msg ?? ""); 282 Utils.showToast(baseResp.msg ?? "");
@@ -2045,7 +2045,7 @@ class NavigatorUtil { @@ -2045,7 +2045,7 @@ class NavigatorUtil {
2045 ///预订----添加定金 2045 ///预订----添加定金
2046 static Future<dynamic> goBookDepositPage(BuildContext context, String rid, 2046 static Future<dynamic> goBookDepositPage(BuildContext context, String rid,
2047 {replace = false, 2047 {replace = false,
2048 - bool onlyShow = false, 2048 +
2049 bool isNew = true, 2049 bool isNew = true,
2050 BookDepositSunModel bookDepositModel}) { 2050 BookDepositSunModel bookDepositModel}) {
2051 return _navigateTo(context, 2051 return _navigateTo(context,
@@ -3556,6 +3556,7 @@ var bookDepositPageHandle = new Handler( @@ -3556,6 +3556,7 @@ var bookDepositPageHandle = new Handler(
3556 String rid = params["rid"].first; 3556 String rid = params["rid"].first;
3557 // String uids = params["uids"].first; 3557 // String uids = params["uids"].first;
3558 bool isNew = FluroConvertUtils.string2bool(params["isNew"].first); 3558 bool isNew = FluroConvertUtils.string2bool(params["isNew"].first);
  3559 + // bool onlyShow = FluroConvertUtils.string2bool(params["onlyShow"].first);
3559 if (!isNew) { 3560 if (!isNew) {
3560 BookDepositSunModel depositSunModel = BookDepositSunModel.fromJson( 3561 BookDepositSunModel depositSunModel = BookDepositSunModel.fromJson(
3561 json.decode(FluroConvertUtils.fluroCnParamsDecode( 3562 json.decode(FluroConvertUtils.fluroCnParamsDecode(
@@ -3565,15 +3566,16 @@ var bookDepositPageHandle = new Handler( @@ -3565,15 +3566,16 @@ var bookDepositPageHandle = new Handler(
3565 create: (_) => NotebookDetailModel(), 3566 create: (_) => NotebookDetailModel(),
3566 child: ChangeNotifierProvider<FeastModel>( 3567 child: ChangeNotifierProvider<FeastModel>(
3567 create: (_) => FeastModel(), 3568 create: (_) => FeastModel(),
3568 - child: 3569 + child:
3569 BookDepositPage(rid: rid, depositSunModel: depositSunModel))); 3570 BookDepositPage(rid: rid, depositSunModel: depositSunModel)));
3570 } 3571 }
3571 return ChangeNotifierProvider<NotebookDetailModel>( 3572 return ChangeNotifierProvider<NotebookDetailModel>(
3572 create: (_) => NotebookDetailModel(), 3573 create: (_) => NotebookDetailModel(),
3573 child: ChangeNotifierProvider<FeastModel>( 3574 child: ChangeNotifierProvider<FeastModel>(
3574 create: (_) => FeastModel(), 3575 create: (_) => FeastModel(),
3575 - child: BookDepositPage( 3576 + child: BookDepositPage(
3576 rid: rid, 3577 rid: rid,
  3578 +
3577 ))); 3579 )));
3578 }); 3580 });
3579 3581
@@ -2081,7 +2081,7 @@ class Utils { @@ -2081,7 +2081,7 @@ class Utils {
2081 2081
2082 //分享邀请函 2082 //分享邀请函
2083 static goShareInvicationToWeChat(BuildContext context, String rid, String uid, 2083 static goShareInvicationToWeChat(BuildContext context, String rid, String uid,
2084 - {bool isWechat = true}) async { 2084 + {bool isWechat = true,String depositId}) async {
2085 String _webPageUrl = "http://colorcun.com/"; 2085 String _webPageUrl = "http://colorcun.com/";
2086 // String _thumbnail = 2086 // String _thumbnail =
2087 // "https://xt04.colorcun.com/h5/index.html#/?id=163854&hasInvitation=1"; 2087 // "https://xt04.colorcun.com/h5/index.html#/?id=163854&hasInvitation=1";
@@ -2111,7 +2111,10 @@ class Utils { @@ -2111,7 +2111,10 @@ class Utils {
2111 // "pages/customer/index?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid"; 2111 // "pages/customer/index?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid";
2112 String _path = 2112 String _path =
2113 "pages/customer/detail_owner_invitation_new?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid"; 2113 "pages/customer/detail_owner_invitation_new?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid";
2114 - 2114 + if(depositId != null){
  2115 + _path =
  2116 + "pages/customer/detail_owner_invitation_new?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid&paymentId=$depositId";
  2117 + }
2115 var model = new WeChatShareMiniProgramModel( 2118 var model = new WeChatShareMiniProgramModel(
2116 webPageUrl: _webPageUrl, 2119 webPageUrl: _webPageUrl,
2117 userName: _userName, 2120 userName: _userName,
@@ -2134,7 +2137,10 @@ class Utils { @@ -2134,7 +2137,10 @@ class Utils {
2134 // "pages/customer/index.html?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid"; 2137 // "pages/customer/index.html?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid";
2135 String _path = 2138 String _path =
2136 "pages/customer/detail_owner_invitation_new.html?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid"; 2139 "pages/customer/detail_owner_invitation_new.html?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid";
2137 - 2140 + if(depositId != null){
  2141 + _path =
  2142 + "pages/customer/detail_owner_invitation_new.html?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid&paymentId=$depositId";
  2143 + }
2138 FlutterWxwork flutterWxwork = FlutterWxwork(); 2144 FlutterWxwork flutterWxwork = FlutterWxwork();
2139 bool isAppInstalled = await flutterWxwork.isAppInstalled(); 2145 bool isAppInstalled = await flutterWxwork.isAppInstalled();
2140 print(isAppInstalled); 2146 print(isAppInstalled);