|
@@ -52,6 +52,7 @@ import 'package:one_key/models/table.dart' as t; |
|
@@ -52,6 +52,7 @@ import 'package:one_key/models/table.dart' as t; |
|
52
|
import '../../app.dart';
|
52
|
import '../../app.dart';
|
|
53
|
|
53
|
|
|
54
|
import '../../models/customer_by_seller_model.dart';
|
54
|
import '../../models/customer_by_seller_model.dart';
|
|
|
|
55
|
+import '../../models/customer_list_model.dart';
|
|
55
|
import '../../models/reserve_deposit_model.dart';
|
56
|
import '../../models/reserve_deposit_model.dart';
|
|
56
|
import '../../provider/collect_store_provider.dart';
|
57
|
import '../../provider/collect_store_provider.dart';
|
|
57
|
import '../../utils/screen_util.dart';
|
58
|
import '../../utils/screen_util.dart';
|
|
@@ -1746,6 +1747,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
@@ -1746,6 +1747,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
1746
|
showMsg: "加载中,请稍后...",
|
1747
|
showMsg: "加载中,请稍后...",
|
|
1747
|
);
|
1748
|
);
|
|
1748
|
} else {
|
1749
|
} else {
|
|
|
|
1750
|
+ bool customerBtnHigh =
|
|
|
|
1751
|
+ Provider.of<UserModel>(context, listen: false)
|
|
|
|
1752
|
+ .user
|
|
|
|
1753
|
+ .openid ==
|
|
|
|
1754
|
+ detailEntity.guest_uid;
|
|
1749
|
return Column(
|
1755
|
return Column(
|
|
1750
|
children: [
|
1756
|
children: [
|
|
1751
|
Expanded(
|
1757
|
Expanded(
|
|
@@ -3043,51 +3049,66 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
@@ -3043,51 +3049,66 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
3043
|
.rnameStr,
|
3049
|
.rnameStr,
|
|
3044
|
textColor: MyColours
|
3050
|
textColor: MyColours
|
|
3045
|
.color_515151),
|
3051
|
.color_515151),
|
|
3046
|
- (detailEntity.status ==
|
|
|
|
3047
|
- "4" &&
|
3052
|
+ (detailEntity.status == "4" &&
|
|
3048
|
detailEntity
|
3053
|
detailEntity
|
|
3049
|
.cancel !=
|
3054
|
.cancel !=
|
|
3050
|
null &&
|
3055
|
null &&
|
|
3051
|
- (detailEntity
|
|
|
|
3052
|
- .phone ==
|
3056
|
+ (detailEntity.phone ==
|
|
3053
|
null ||
|
3057
|
null ||
|
|
3054
|
- detailEntity
|
|
|
|
3055
|
- .phone ==
|
3058
|
+ detailEntity.phone ==
|
|
3056
|
''))
|
3059
|
''))
|
|
3057
|
? SizedBox()
|
3060
|
? SizedBox()
|
|
3058
|
- : InkWell(
|
|
|
|
3059
|
- onTap: () {
|
|
|
|
3060
|
- if (formatPhone !=
|
|
|
|
3061
|
- null &&
|
|
|
|
3062
|
- formatPhone !=
|
|
|
|
3063
|
- '') {
|
|
|
|
3064
|
- if (Utils.getAuthority(
|
|
|
|
3065
|
- context,
|
|
|
|
3066
|
- '订座详情-电话') ||
|
|
|
|
3067
|
- widget.uid ==
|
|
|
|
3068
|
- userModel
|
|
|
|
3069
|
- .user.openid ||
|
|
|
|
3070
|
- (userModel.user.role_name == '店长' &&
|
|
|
|
3071
|
- detailEntity.role_name !=
|
|
|
|
3072
|
- '管理员' &&
|
|
|
|
3073
|
- detailEntity.role_name !=
|
|
|
|
3074
|
- '店长')) {
|
|
|
|
3075
|
- DialogUtil
|
|
|
|
3076
|
- .goPhone(
|
|
|
|
3077
|
- formatPhone);
|
|
|
|
3078
|
- }
|
|
|
|
3079
|
- }
|
|
|
|
3080
|
- },
|
|
|
|
3081
|
- child: RowMultiText(
|
|
|
|
3082
|
- "电话",
|
|
|
|
3083
|
- detailEntity.phone == null
|
|
|
|
3084
|
- ? ''
|
|
|
|
3085
|
- : (Utils.getAuthority(context, '订座详情-电话') || widget.uid == userModel.user.openid || (userModel.user.role_name == '店长' && detailEntity.role_name != '管理员' && detailEntity.role_name != '店长'))
|
|
|
|
3086
|
- ? detailEntity.phone
|
|
|
|
3087
|
- : Utils.starPhone(detailEntity.phone),
|
|
|
|
3088
|
- textColor: MyColours.color_515151,
|
|
|
|
3089
|
- textColorR: MyColours.color_438E93,
|
|
|
|
3090
|
- imageName: 'phone_detail')),
|
3061
|
+ : InkWell(
|
|
|
|
3062
|
+ onTap: () {
|
|
|
|
3063
|
+ if (formatPhone !=
|
|
|
|
3064
|
+ null &&
|
|
|
|
3065
|
+ formatPhone !=
|
|
|
|
3066
|
+ '') {
|
|
|
|
3067
|
+ if (Utils.getAuthority(
|
|
|
|
3068
|
+ context,
|
|
|
|
3069
|
+ '订座详情-电话') ||
|
|
|
|
3070
|
+ widget.uid ==
|
|
|
|
3071
|
+ userModel
|
|
|
|
3072
|
+ .user
|
|
|
|
3073
|
+ .openid ||
|
|
|
|
3074
|
+ (userModel
|
|
|
|
3075
|
+ .user.role_name ==
|
|
|
|
3076
|
+ '店长' &&
|
|
|
|
3077
|
+ detailEntity.role_name !=
|
|
|
|
3078
|
+ '管理员' &&
|
|
|
|
3079
|
+ detailEntity.role_name !=
|
|
|
|
3080
|
+ '店长')) {
|
|
|
|
3081
|
+ DialogUtil
|
|
|
|
3082
|
+ .goPhone(
|
|
|
|
3083
|
+ formatPhone);
|
|
|
|
3084
|
+ }
|
|
|
|
3085
|
+ }
|
|
|
|
3086
|
+ },
|
|
|
|
3087
|
+ child: RowMultiText(
|
|
|
|
3088
|
+ "电话",
|
|
|
|
3089
|
+ detailEntity.phone ==
|
|
|
|
3090
|
+ null
|
|
|
|
3091
|
+ ? ''
|
|
|
|
3092
|
+ : (Utils.getAuthority(context, '订座详情-电话') ||
|
|
|
|
3093
|
+ widget.uid ==
|
|
|
|
3094
|
+ userModel
|
|
|
|
3095
|
+ .user.openid ||
|
|
|
|
3096
|
+ (userModel.user.role_name == '店长' &&
|
|
|
|
3097
|
+ detailEntity.role_name !=
|
|
|
|
3098
|
+ '管理员' &&
|
|
|
|
3099
|
+ detailEntity.role_name !=
|
|
|
|
3100
|
+ '店长'))
|
|
|
|
3101
|
+ ? detailEntity
|
|
|
|
3102
|
+ .phone
|
|
|
|
3103
|
+ : Utils.starPhone(detailEntity
|
|
|
|
3104
|
+ .phone),
|
|
|
|
3105
|
+ textColor: MyColours
|
|
|
|
3106
|
+ .color_515151,
|
|
|
|
3107
|
+ textColorR:
|
|
|
|
3108
|
+ MyColours
|
|
|
|
3109
|
+ .color_438E93,
|
|
|
|
3110
|
+ imageName:
|
|
|
|
3111
|
+ 'phone_detail')),
|
|
3091
|
(detailEntity.status ==
|
3112
|
(detailEntity.status ==
|
|
3092
|
"4" &&
|
3113
|
"4" &&
|
|
3093
|
detailEntity
|
3114
|
detailEntity
|
|
@@ -3127,12 +3148,16 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
@@ -3127,12 +3148,16 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
3127
|
w(72),
|
3148
|
w(72),
|
|
3128
|
height:
|
3149
|
height:
|
|
3129
|
w(22),
|
3150
|
w(22),
|
|
3130
|
- borderColor:
|
|
|
|
3131
|
- MyColours
|
|
|
|
3132
|
- .color_438E93,
|
|
|
|
3133
|
- textColor:
|
|
|
|
3134
|
- MyColours
|
|
|
|
3135
|
- .color_438E93,
|
3151
|
+ borderColor: customerBtnHigh
|
|
|
|
3152
|
+ ? MyColours
|
|
|
|
3153
|
+ .color_438E93
|
|
|
|
3154
|
+ : MyColours
|
|
|
|
3155
|
+ .color_999999,
|
|
|
|
3156
|
+ textColor: customerBtnHigh
|
|
|
|
3157
|
+ ? MyColours
|
|
|
|
3158
|
+ .color_438E93
|
|
|
|
3159
|
+ : MyColours
|
|
|
|
3160
|
+ .color_999999,
|
|
3136
|
gradientStart:
|
3161
|
gradientStart:
|
|
3137
|
MyColours
|
3162
|
MyColours
|
|
3138
|
.color_ffffff,
|
3163
|
.color_ffffff,
|
|
@@ -3156,32 +3181,83 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
@@ -3156,32 +3181,83 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { |
|
3156
|
(v) {});
|
3181
|
(v) {});
|
|
3157
|
return;
|
3182
|
return;
|
|
3158
|
}
|
3183
|
}
|
|
3159
|
- //gid 跳转客户详情页面
|
|
|
|
3160
|
- CustomerBySellerSunModel userHistoryEntity = CustomerBySellerSunModel(
|
|
|
|
3161
|
- null,
|
|
|
|
3162
|
- null,
|
|
|
|
3163
|
- detailEntity
|
|
|
|
3164
|
- .phone,
|
|
|
|
3165
|
- null,
|
|
|
|
3166
|
- null,
|
|
|
|
3167
|
- null,
|
|
|
|
3168
|
- null,
|
|
|
|
3169
|
- null,
|
|
|
|
3170
|
- null,
|
|
|
|
3171
|
- null,
|
|
|
|
3172
|
- null,
|
3184
|
+
|
|
|
|
3185
|
+ //管理员和店长跳转全店客情
|
|
|
|
3186
|
+ // 其他人是自己的客户跳转,不是置灰
|
|
|
|
3187
|
+
|
|
|
|
3188
|
+ UserModel
|
|
|
|
3189
|
+ userModel =
|
|
|
|
3190
|
+ Provider.of<UserModel>(
|
|
|
|
3191
|
+ context,
|
|
|
|
3192
|
+ listen: false);
|
|
|
|
3193
|
+
|
|
|
|
3194
|
+ if (userModel.user.role_name ==
|
|
|
|
3195
|
+ '管理员' ||
|
|
|
|
3196
|
+ userModel.user.role_name ==
|
|
|
|
3197
|
+ '店长') {
|
|
|
|
3198
|
+ //gid 跳转客户详情页面
|
|
|
|
3199
|
+ CustomerBySellerSunModel userHistoryEntity = CustomerBySellerSunModel(
|
|
|
|
3200
|
+ null,
|
|
|
|
3201
|
+ null,
|
|
|
|
3202
|
+ detailEntity.phone,
|
|
|
|
3203
|
+ null,
|
|
|
|
3204
|
+ null,
|
|
|
|
3205
|
+ null,
|
|
|
|
3206
|
+ null,
|
|
|
|
3207
|
+ null,
|
|
|
|
3208
|
+ null,
|
|
|
|
3209
|
+ null,
|
|
|
|
3210
|
+ null,
|
|
|
|
3211
|
+ detailEntity.gid,
|
|
|
|
3212
|
+ null,
|
|
|
|
3213
|
+ null,
|
|
|
|
3214
|
+ null,
|
|
|
|
3215
|
+ null);
|
|
|
|
3216
|
+ NavigatorUtil.goCustomerDetailPage(
|
|
|
|
3217
|
+ context,
|
|
|
|
3218
|
+ userHistoryEntity,
|
|
|
|
3219
|
+ FromPage.FromPageMessagePage);
|
|
|
|
3220
|
+ } else if (userModel
|
|
|
|
3221
|
+ .user
|
|
|
|
3222
|
+ .openid ==
|
|
3173
|
detailEntity
|
3223
|
detailEntity
|
|
3174
|
- .gid,
|
|
|
|
3175
|
- null,
|
|
|
|
3176
|
- null,
|
|
|
|
3177
|
- null,
|
|
|
|
3178
|
- null);
|
|
|
|
3179
|
-
|
|
|
|
3180
|
- NavigatorUtil.goCustomerDetailPage(
|
|
|
|
3181
|
- context,
|
|
|
|
3182
|
- userHistoryEntity,
|
|
|
|
3183
|
- FromPage
|
|
|
|
3184
|
- .FromPageMessagePage);
|
3224
|
+ .guest_uid) {
|
|
|
|
3225
|
+ //当前客户是登录人的客户
|
|
|
|
3226
|
+ // 进入我的客户详情
|
|
|
|
3227
|
+ CustomerListSunModel userHistoryEntity = CustomerListSunModel(
|
|
|
|
3228
|
+ null,
|
|
|
|
3229
|
+ null,
|
|
|
|
3230
|
+ null,
|
|
|
|
3231
|
+ null,
|
|
|
|
3232
|
+ null,
|
|
|
|
3233
|
+ detailEntity.phone,
|
|
|
|
3234
|
+ null,
|
|
|
|
3235
|
+ null,
|
|
|
|
3236
|
+ null,
|
|
|
|
3237
|
+ null,
|
|
|
|
3238
|
+ null,
|
|
|
|
3239
|
+ null,
|
|
|
|
3240
|
+ null,
|
|
|
|
3241
|
+ null,
|
|
|
|
3242
|
+ null,
|
|
|
|
3243
|
+ null,
|
|
|
|
3244
|
+ null,
|
|
|
|
3245
|
+ null,
|
|
|
|
3246
|
+ null,
|
|
|
|
3247
|
+ null,
|
|
|
|
3248
|
+ null,
|
|
|
|
3249
|
+ null,
|
|
|
|
3250
|
+ detailEntity.gid,
|
|
|
|
3251
|
+ null,
|
|
|
|
3252
|
+ null,
|
|
|
|
3253
|
+ null);
|
|
|
|
3254
|
+
|
|
|
|
3255
|
+ NavigatorUtil.goMyCustomerDetailPage(
|
|
|
|
3256
|
+ context,
|
|
|
|
3257
|
+ userHistoryEntity,
|
|
|
|
3258
|
+ FromPage.FromPageMyCustomer,
|
|
|
|
3259
|
+ userModel.user.openid);
|
|
|
|
3260
|
+ }
|
|
3185
|
},
|
3261
|
},
|
|
3186
|
),
|
3262
|
),
|
|
3187
|
))
|
3263
|
))
|