Commit 2653b7a5307d61f3aee76265a1cfe30e76cf7dbe

Authored by wdn127929
1 parent 19a98f8b

订座详情页按钮 客户详情 赋值gid 错位 && 客户取消预订通知增加设置默认模版

@@ -3829,39 +3829,47 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -3829,39 +3829,47 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
3829 .guest_uid) { 3829 .guest_uid) {
3830 //当前客户是登录人的客户 3830 //当前客户是登录人的客户
3831 // 进入我的客户详情 3831 // 进入我的客户详情
3832 - CustomerListSunModel userHistoryEntity = CustomerListSunModel(  
3833 - null,  
3834 - null,  
3835 - null,  
3836 - null,  
3837 - null,  
3838 - detailEntity.phone,  
3839 - null,  
3840 - null,  
3841 - null,  
3842 - null,  
3843 - null,  
3844 - null,  
3845 - null,  
3846 - null,  
3847 - null,  
3848 - null,  
3849 - null,  
3850 - null,  
3851 - null,  
3852 - null,  
3853 - null,  
3854 - null,  
3855 - detailEntity.gid,  
3856 - null,  
3857 - null,  
3858 - null); 3832 + CustomerListSunModel
  3833 + userHistoryEntity =
  3834 + CustomerListSunModel(
  3835 + detailEntity
  3836 + .gid,
  3837 + null,
  3838 + null,
  3839 + null,
  3840 + null,
  3841 + detailEntity
  3842 + .phone,
  3843 + null,
  3844 + null,
  3845 + null,
  3846 + null,
  3847 + null,
  3848 + null,
  3849 + null,
  3850 + null,
  3851 + null,
  3852 + null,
  3853 + null,
  3854 + null,
  3855 + null,
  3856 + null,
  3857 + null,
  3858 + null,
  3859 + null,
  3860 + null,
  3861 + null,
  3862 + null,
  3863 + );
3859 3864
3860 NavigatorUtil.goMyCustomerDetailPage( 3865 NavigatorUtil.goMyCustomerDetailPage(
3861 context, 3866 context,
3862 userHistoryEntity, 3867 userHistoryEntity,
3863 FromPage.FromPageMyCustomer, 3868 FromPage.FromPageMyCustomer,
3864 userModel.user.openid); 3869 userModel.user.openid);
  3870 + } else {
  3871 + Utils.showToast(
  3872 + '您没有权限查看');
3865 } 3873 }
3866 }, 3874 },
3867 ), 3875 ),
@@ -4732,8 +4740,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -4732,8 +4740,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
4732 detailEntity.role_name != 4740 detailEntity.role_name !=
4733 '管理员' && 4741 '管理员' &&
4734 detailEntity.role_name != 4742 detailEntity.role_name !=
4735 - '店长'))  
4736 - { 4743 + '店长')) {
4737 _showCancelWidget( 4744 _showCancelWidget(
4738 context, detailEntity.phone); 4745 context, detailEntity.phone);
4739 } 4746 }
@@ -4747,15 +4754,19 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -4747,15 +4754,19 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
4747 border: Border.all( 4754 border: Border.all(
4748 width: w(1), 4755 width: w(1),
4749 color: !(Utils.getAuthority( 4756 color: !(Utils.getAuthority(
4750 - context, '取消预订') ||  
4751 - widget.uid ==  
4752 - userModel.user.openid ||  
4753 - (userModel.user.role_name ==  
4754 - '店长' &&  
4755 - detailEntity.role_name !=  
4756 - '管理员' &&  
4757 - detailEntity.role_name !=  
4758 - '店长')) 4757 + context, '取消预订') ||
  4758 + widget.uid ==
  4759 + userModel
  4760 + .user.openid ||
  4761 + (userModel.user
  4762 + .role_name ==
  4763 + '店长' &&
  4764 + detailEntity
  4765 + .role_name !=
  4766 + '管理员' &&
  4767 + detailEntity
  4768 + .role_name !=
  4769 + '店长'))
4759 ? MyColours.color_999999 4770 ? MyColours.color_999999
4760 : MyColours.color_199095, 4771 : MyColours.color_199095,
4761 ), 4772 ),
@@ -4769,15 +4780,19 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -4769,15 +4780,19 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
4769 child: Text('取消预订', 4780 child: Text('取消预订',
4770 style: TextStyle( 4781 style: TextStyle(
4771 color: !(Utils.getAuthority( 4782 color: !(Utils.getAuthority(
4772 - context, '取消预订') ||  
4773 - widget.uid ==  
4774 - userModel.user.openid ||  
4775 - (userModel.user.role_name ==  
4776 - '店长' &&  
4777 - detailEntity.role_name !=  
4778 - '管理员' &&  
4779 - detailEntity.role_name !=  
4780 - '店长')) 4783 + context, '取消预订') ||
  4784 + widget.uid ==
  4785 + userModel.user
  4786 + .openid ||
  4787 + (userModel.user
  4788 + .role_name ==
  4789 + '店长' &&
  4790 + detailEntity
  4791 + .role_name !=
  4792 + '管理员' &&
  4793 + detailEntity
  4794 + .role_name !=
  4795 + '店长'))
4781 ? MyColours 4796 ? MyColours
4782 .color_999999 4797 .color_999999
4783 : MyColours 4798 : MyColours
@@ -186,9 +186,20 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> { @@ -186,9 +186,20 @@ class _CustomerNoticeSettingPageState extends State<CustomerNoticeSettingPage> {
186 186
187 bool success = await marketingCenterProvider.setConfing(context, params, 187 bool success = await marketingCenterProvider.setConfing(context, params,
188 needToast: false); 188 needToast: false);
189 -  
190 if (success) { 189 if (success) {
191 - return true; 190 + Map<String, String> params1 = {
  191 + 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
  192 + 'key': 'saiyouyun_cancel',
  193 + 'value': cancelSms ? 'qRaZc2' : ''
  194 + };
  195 +
  196 + bool success1 = await marketingCenterProvider.setConfing(context, params1,
  197 + needToast: false);
  198 + if (success1) {
  199 + return true;
  200 + } else {
  201 + return false;
  202 + }
192 } else { 203 } else {
193 return false; 204 return false;
194 } 205 }