Commit 7322547730e8f81dcc928187d8696dff87aa4cdc

Authored by wdn127929
1 parent f376c561

客户详情店长管理员进入全店客情,其他人自己进入自己,不是自己的置灰

... ... @@ -103,6 +103,7 @@ class NotebookDetail {
OrderInfo orderInfo;
String con_amount;
String gid;
String guest_uid;
String place_order_name; //下单人
dynamic is_user_comments; //是否评价过
... ... @@ -303,7 +304,7 @@ class NotebookDetail {
@override
String toString() {
return 'NotebookDetail{id: $id, uid: $uid ,con_amount:$con_amount,abolition: $abolition, tableinfo: $tableinfo,actual_pum:$actual_pum, pnum: $pnum, rname: $rname, sex: $sex, phone: $phone, cusdem: $cusdem, cusman: $cusman, ddate: $ddate, is_set_ddate: $is_set_ddate, ddate_solt: $ddate_solt, status: $status, action: $action, type: $type, note_name: $note_name, seller_user_phone:$seller_user_phone, nick_name: $nick_name,channel: $channel, cdate: $cdate, demands: $demands, tables: $tables, cancel: $cancel, gid: $gid,place_order_name:$place_order_name,is_user_comments:$is_user_comments,up_date:$up_date}';
return 'NotebookDetail{id: $id, uid: $uid ,con_amount:$con_amount,abolition: $abolition, tableinfo: $tableinfo,actual_pum:$actual_pum, pnum: $pnum, rname: $rname, sex: $sex, phone: $phone, cusdem: $cusdem, cusman: $cusman, ddate: $ddate, is_set_ddate: $is_set_ddate, ddate_solt: $ddate_solt, status: $status, action: $action, type: $type, note_name: $note_name, seller_user_phone:$seller_user_phone, nick_name: $nick_name,channel: $channel, cdate: $cdate, demands: $demands, tables: $tables, cancel: $cancel, gid: $gid,guest_uid:$guest_uid,place_order_name:$place_order_name,is_user_comments:$is_user_comments,up_date:$up_date}';
}
}
... ...
... ... @@ -50,6 +50,7 @@ NotebookDetail _$NotebookDetailFromJson(Map<String, dynamic> json) {
? null
: OrderInfo.fromJson(json['order_info'] as Map<String, dynamic>)
..gid = json['gid'] as String
..guest_uid=json['guest_uid'] as String
..place_order_name = json['place_order_name'] as String
..is_user_comments = json['is_user_comments'] as dynamic
..up_date = json['up_date'] as String;
... ... @@ -89,6 +90,7 @@ Map<String, dynamic> _$NotebookDetailToJson(NotebookDetail instance) =>
'order': instance.order,
'order_info': instance.orderInfo,
'gid': instance.gid,
'guest_uid':instance.guest_uid,
'place_order_name': instance.place_order_name,
'is_user_comments': instance.is_user_comments,
'up_date':instance.up_date,
... ...
... ... @@ -490,4 +490,9 @@ class HttpUrl {
static const String get_marketing_sms_template =
"?service=App.SendSMS.GetMarketingSmsTemplate"; // 获取营销短信模板列表
static const String get_report_field =
"?service=App.Seller.GetReportField"; // 获取App导出字段
}
... ...
... ... @@ -52,6 +52,7 @@ import 'package:one_key/models/table.dart' as t;
import '../../app.dart';
import '../../models/customer_by_seller_model.dart';
import '../../models/customer_list_model.dart';
import '../../models/reserve_deposit_model.dart';
import '../../provider/collect_store_provider.dart';
import '../../utils/screen_util.dart';
... ... @@ -1746,6 +1747,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
showMsg: "加载中,请稍后...",
);
} else {
bool customerBtnHigh =
Provider.of<UserModel>(context, listen: false)
.user
.openid ==
detailEntity.guest_uid;
return Column(
children: [
Expanded(
... ... @@ -3043,51 +3049,66 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
.rnameStr,
textColor: MyColours
.color_515151),
(detailEntity.status ==
"4" &&
(detailEntity.status == "4" &&
detailEntity
.cancel !=
null &&
(detailEntity
.phone ==
(detailEntity.phone ==
null ||
detailEntity
.phone ==
detailEntity.phone ==
''))
? SizedBox()
: InkWell(
onTap: () {
if (formatPhone !=
null &&
formatPhone !=
'') {
if (Utils.getAuthority(
context,
'订座详情-电话') ||
widget.uid ==
userModel
.user.openid ||
(userModel.user.role_name == '店长' &&
detailEntity.role_name !=
'管理员' &&
detailEntity.role_name !=
'店长')) {
DialogUtil
.goPhone(
formatPhone);
}
}
},
child: RowMultiText(
"电话",
detailEntity.phone == null
? ''
: (Utils.getAuthority(context, '订座详情-电话') || widget.uid == userModel.user.openid || (userModel.user.role_name == '店长' && detailEntity.role_name != '管理员' && detailEntity.role_name != '店长'))
? detailEntity.phone
: Utils.starPhone(detailEntity.phone),
textColor: MyColours.color_515151,
textColorR: MyColours.color_438E93,
imageName: 'phone_detail')),
: InkWell(
onTap: () {
if (formatPhone !=
null &&
formatPhone !=
'') {
if (Utils.getAuthority(
context,
'订座详情-电话') ||
widget.uid ==
userModel
.user
.openid ||
(userModel
.user.role_name ==
'店长' &&
detailEntity.role_name !=
'管理员' &&
detailEntity.role_name !=
'店长')) {
DialogUtil
.goPhone(
formatPhone);
}
}
},
child: RowMultiText(
"电话",
detailEntity.phone ==
null
? ''
: (Utils.getAuthority(context, '订座详情-电话') ||
widget.uid ==
userModel
.user.openid ||
(userModel.user.role_name == '店长' &&
detailEntity.role_name !=
'管理员' &&
detailEntity.role_name !=
'店长'))
? detailEntity
.phone
: Utils.starPhone(detailEntity
.phone),
textColor: MyColours
.color_515151,
textColorR:
MyColours
.color_438E93,
imageName:
'phone_detail')),
(detailEntity.status ==
"4" &&
detailEntity
... ... @@ -3127,12 +3148,16 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
w(72),
height:
w(22),
borderColor:
MyColours
.color_438E93,
textColor:
MyColours
.color_438E93,
borderColor: customerBtnHigh
? MyColours
.color_438E93
: MyColours
.color_999999,
textColor: customerBtnHigh
? MyColours
.color_438E93
: MyColours
.color_999999,
gradientStart:
MyColours
.color_ffffff,
... ... @@ -3156,32 +3181,83 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
(v) {});
return;
}
//gid 跳转客户详情页面
CustomerBySellerSunModel userHistoryEntity = CustomerBySellerSunModel(
null,
null,
detailEntity
.phone,
null,
null,
null,
null,
null,
null,
null,
null,
//管理员和店长跳转全店客情
// 其他人是自己的客户跳转,不是置灰
UserModel
userModel =
Provider.of<UserModel>(
context,
listen: false);
if (userModel.user.role_name ==
'管理员' ||
userModel.user.role_name ==
'店长') {
//gid 跳转客户详情页面
CustomerBySellerSunModel userHistoryEntity = CustomerBySellerSunModel(
null,
null,
detailEntity.phone,
null,
null,
null,
null,
null,
null,
null,
null,
detailEntity.gid,
null,
null,
null,
null);
NavigatorUtil.goCustomerDetailPage(
context,
userHistoryEntity,
FromPage.FromPageMessagePage);
} else if (userModel
.user
.openid ==
detailEntity
.gid,
null,
null,
null,
null);
NavigatorUtil.goCustomerDetailPage(
context,
userHistoryEntity,
FromPage
.FromPageMessagePage);
.guest_uid) {
//当前客户是登录人的客户
// 进入我的客户详情
CustomerListSunModel userHistoryEntity = CustomerListSunModel(
null,
null,
null,
null,
null,
detailEntity.phone,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
detailEntity.gid,
null,
null,
null);
NavigatorUtil.goMyCustomerDetailPage(
context,
userHistoryEntity,
FromPage.FromPageMyCustomer,
userModel.user.openid);
}
},
),
))
... ...