|
...
|
...
|
@@ -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);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
),
|
|
|
|
))
|
...
|
...
|
|