Commit 8d731f5f816903d181f5e390149fe4c9e5c35351

Authored by wdn127929
1 parent dea3744e

前台迎宾权限

... ... @@ -41,15 +41,17 @@ class PersonnelManageModelData extends Object {
@JsonKey(name: 'manager')
Manager manager;
@JsonKey(name: 'welcome')
Welcome welcome;
@JsonKey(name: 'reception')
Reception reception;
bool select = false;
PersonnelManageModelData(
this.admin,
this.shopowner,
this.cashier,
this.waiter,
this.manager,
);
PersonnelManageModelData(this.admin, this.shopowner, this.cashier,
this.waiter, this.manager, this.welcome, this.reception);
factory PersonnelManageModelData.fromJson(Map<String, dynamic> srcJson) =>
_$PersonnelManageModelDataFromJson(srcJson);
... ... @@ -119,19 +121,18 @@ class PersonnelManageSunModel extends Object {
bool select = false;
PersonnelManageSunModel(
this.id,
this.openid,
this.userName,
this.nickName,
this.isFirst,
this.roleId,
this.phone,
this.code,
this.account,
this.isOnCall,
this.headimgurl,
this.isStoreWine
);
this.id,
this.openid,
this.userName,
this.nickName,
this.isFirst,
this.roleId,
this.phone,
this.code,
this.account,
this.isOnCall,
this.headimgurl,
this.isStoreWine);
factory PersonnelManageSunModel.fromJson(Map<String, dynamic> srcJson) =>
_$PersonnelManageSunModelFromJson(srcJson);
... ... @@ -223,3 +224,47 @@ class Manager extends Object {
Map<String, dynamic> toJson() => _$ManagerToJson(this);
}
@JsonSerializable()
class Welcome extends Object {
@JsonKey(name: 'listdata')
List<PersonnelManageSunModel> listdata;
@JsonKey(name: 'role_id')
String roleId;
int hasWechatNum; //已绑定微信数量
bool select = false;
Welcome(
this.listdata,
this.roleId,
);
factory Welcome.fromJson(Map<String, dynamic> srcJson) =>
_$WelcomeFromJson(srcJson);
Map<String, dynamic> toJson() => _$WelcomeToJson(this);
}
@JsonSerializable()
class Reception extends Object {
@JsonKey(name: 'listdata')
List<PersonnelManageSunModel> listdata;
@JsonKey(name: 'role_id')
String roleId;
int hasWechatNum; //已绑定微信数量
bool select = false;
Reception(
this.listdata,
this.roleId,
);
factory Reception.fromJson(Map<String, dynamic> srcJson) =>
_$ReceptionFromJson(srcJson);
Map<String, dynamic> toJson() => _$ReceptionToJson(this);
}
... ...
... ... @@ -43,6 +43,12 @@ PersonnelManageModelData _$PersonnelManageModelDataFromJson(
json['manager'] == null
? null
: Manager.fromJson(json['manager'] as Map<String, dynamic>),
json['welcome'] == null
? null
: Welcome.fromJson(json['welcome'] as Map<String, dynamic>),
json['reception'] == null
? null
: Reception.fromJson(json['reception'] as Map<String, dynamic>),
);
}
... ... @@ -54,6 +60,8 @@ Map<String, dynamic> _$PersonnelManageModelDataToJson(
'cashier': instance.cashier,
'waiter': instance.waiter,
'manager': instance.manager,
'welcome': instance.welcome,
'reception': instance.reception
};
Admin _$AdminFromJson(Map<String, dynamic> json) {
... ... @@ -170,3 +178,35 @@ Map<String, dynamic> _$ManagerToJson(Manager instance) => <String, dynamic>{
'listdata': instance.listdata,
'role_id': instance.roleId,
};
Welcome _$WelcomeFromJson(Map<String, dynamic> json) {
return Welcome(
(json['listdata'] as List)
?.map((e) => e == null
? null
: PersonnelManageSunModel.fromJson(e as Map<String, dynamic>))
?.toList(),
json['role_id'] as String,
);
}
Map<String, dynamic> _$WelcomeToJson(Welcome instance) => <String, dynamic>{
'listdata': instance.listdata,
'role_id': instance.roleId,
};
Reception _$ReceptionFromJson(Map<String, dynamic> json) {
return Reception(
(json['listdata'] as List)
?.map((e) => e == null
? null
: PersonnelManageSunModel.fromJson(e as Map<String, dynamic>))
?.toList(),
json['role_id'] as String,
);
}
Map<String, dynamic> _$ReceptionToJson(Reception instance) => <String, dynamic>{
'listdata': instance.listdata,
'role_id': instance.roleId,
};
... ...
... ... @@ -31,7 +31,7 @@ class _CouponToPersonnalPageState extends State<CouponToPersonnalPage> {
void initState() {
// TODO: implement initState
super.initState();
titleList = ['管理员', '店长', '客户经理', '收银员', '服务员'];
titleList = ['管理员', '店长', '客户经理', '收银员', '服务员', '前台', '迎宾'];
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
_getAuthUserLists(showLoading: false);
});
... ... @@ -91,6 +91,18 @@ class _CouponToPersonnalPageState extends State<CouponToPersonnalPage> {
item.select = true;
}
}
for (PersonnelManageSunModel item
in personnelProvider.dataMap.reception.listdata) {
if (uid == item.id) {
item.select = true;
}
}
for (PersonnelManageSunModel item
in personnelProvider.dataMap.welcome.listdata) {
if (uid == item.id) {
item.select = true;
}
}
}
personnelProvider.dataMap.admin.select =
!personnelProvider.dataMap.admin.listdata.any((value) {
... ... @@ -112,6 +124,14 @@ class _CouponToPersonnalPageState extends State<CouponToPersonnalPage> {
!personnelProvider.dataMap.waiter.listdata.any((value) {
return value.select == false;
});
personnelProvider.dataMap.reception.select =
!personnelProvider.dataMap.reception.listdata.any((value) {
return value.select == false;
});
personnelProvider.dataMap.welcome.select =
!personnelProvider.dataMap.welcome.listdata.any((value) {
return value.select == false;
});
_btnAllSelect();
personnelProvider.notifyListeners();
}
... ... @@ -123,7 +143,9 @@ class _CouponToPersonnalPageState extends State<CouponToPersonnalPage> {
personnelProvider.dataMap.cashier.select &&
personnelProvider.dataMap.manager.select &&
personnelProvider.dataMap.admin.select &&
personnelProvider.dataMap.shopowner.select) {
personnelProvider.dataMap.shopowner.select &&
personnelProvider.dataMap.reception.select &&
personnelProvider.dataMap.welcome.select) {
personnelProvider.dataMap.select = true;
} else {
personnelProvider.dataMap.select = false;
... ... @@ -157,6 +179,8 @@ class _CouponToPersonnalPageState extends State<CouponToPersonnalPage> {
personnelProvider.dataMap.manager.select = true;
personnelProvider.dataMap.admin.select = true;
personnelProvider.dataMap.shopowner.select = true;
personnelProvider.dataMap.reception.select = true;
personnelProvider.dataMap.welcome.select = true;
for (PersonnelManageSunModel item
in personnelProvider.dataMap.waiter.listdata) {
item.select = true;
... ... @@ -177,12 +201,22 @@ class _CouponToPersonnalPageState extends State<CouponToPersonnalPage> {
in personnelProvider.dataMap.shopowner.listdata) {
item.select = true;
}
for (PersonnelManageSunModel item
in personnelProvider.dataMap.reception.listdata) {
item.select = true;
}
for (PersonnelManageSunModel item
in personnelProvider.dataMap.welcome.listdata) {
item.select = true;
}
} else {
personnelProvider.dataMap.waiter.select = false;
personnelProvider.dataMap.cashier.select = false;
personnelProvider.dataMap.manager.select = false;
personnelProvider.dataMap.admin.select = false;
personnelProvider.dataMap.shopowner.select = false;
personnelProvider.dataMap.reception.select = false;
personnelProvider.dataMap.welcome.select = false;
for (PersonnelManageSunModel item
in personnelProvider.dataMap.waiter.listdata) {
item.select = false;
... ... @@ -203,6 +237,14 @@ class _CouponToPersonnalPageState extends State<CouponToPersonnalPage> {
in personnelProvider.dataMap.shopowner.listdata) {
item.select = false;
}
for (PersonnelManageSunModel item
in personnelProvider.dataMap.reception.listdata) {
item.select = false;
}
for (PersonnelManageSunModel item
in personnelProvider.dataMap.welcome.listdata) {
item.select = false;
}
}
setState(() {});
},
... ... @@ -261,6 +303,12 @@ class _CouponToPersonnalPageState extends State<CouponToPersonnalPage> {
} else if (title == '服务员') {
data = personnelProvider.dataMap.waiter.listdata;
select = personnelProvider.dataMap.waiter.select;
} else if (title == '前台') {
data = personnelProvider.dataMap.reception.listdata;
select = personnelProvider.dataMap.reception.select;
} else if (title == '迎宾') {
data = personnelProvider.dataMap.welcome.listdata;
select = personnelProvider.dataMap.welcome.select;
}
}
... ... @@ -304,6 +352,19 @@ class _CouponToPersonnalPageState extends State<CouponToPersonnalPage> {
.dataMap.waiter.select;
select = personnelProvider
.dataMap.waiter.select;
} else if (title == '前台') {
personnelProvider
.dataMap.reception.select =
!personnelProvider
.dataMap.reception.select;
select = personnelProvider
.dataMap.reception.select;
} else if (title == '迎宾') {
personnelProvider.dataMap.welcome.select =
!personnelProvider
.dataMap.welcome.select;
select = personnelProvider
.dataMap.welcome.select;
}
if (select) {
for (PersonnelManageSunModel item
... ... @@ -420,6 +481,16 @@ class _CouponToPersonnalPageState extends State<CouponToPersonnalPage> {
.dataMap.waiter.select = false;
select = personnelProvider
.dataMap.waiter.select;
} else if (title == '前台') {
personnelProvider.dataMap.reception
.select = false;
select = personnelProvider
.dataMap.reception.select;
} else if (title == '迎宾') {
personnelProvider
.dataMap.welcome.select = false;
select = personnelProvider
.dataMap.welcome.select;
}
}
} else {
... ... @@ -449,6 +520,16 @@ class _CouponToPersonnalPageState extends State<CouponToPersonnalPage> {
.dataMap.waiter.select = true;
select = personnelProvider
.dataMap.waiter.select;
} else if (title == '前台') {
personnelProvider.dataMap.reception
.select = true;
select = personnelProvider
.dataMap.reception.select;
} else if (title == '迎宾') {
personnelProvider
.dataMap.welcome.select = true;
select = personnelProvider
.dataMap.welcome.select;
}
_btnAllSelect();
}
... ... @@ -542,6 +623,18 @@ class _CouponToPersonnalPageState extends State<CouponToPersonnalPage> {
uids += item.id + ',';
}
}
for (PersonnelManageSunModel item
in personnelProvider.dataMap.reception.listdata) {
if (item.select) {
uids += item.id + ',';
}
}
for (PersonnelManageSunModel item
in personnelProvider.dataMap.welcome.listdata) {
if (item.select) {
uids += item.id + ',';
}
}
if (uids.endsWith(',')) {
uids = uids.substring(0, uids.length - 1);
}
... ...
... ... @@ -1219,6 +1219,17 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
print(userModel.user.openid);
print(widget.rid);
print(widget.uid);
bool notDo = userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
widget.uid != "null" &&
(widget.uid != userModel.user.openid &&
userModel.user.role_name != '前台') &&
userModel.user.role_name != '前台';
bool notDoWechat = userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
widget.uid != "null" &&
widget.uid != userModel.user.openid;
return Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: MyColours.color_ffffff,
... ... @@ -1589,17 +1600,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
detailEntity.cusdem ??
"",
callback: () {
if (userModel.user
.role_name !=
'管理员' &&
userModel.user
.role_name !=
'店长' &&
widget.uid !=
"null" &&
widget.uid !=
userModel.user
.openid) {
if (notDo) {
return;
} else {
//备注弹窗
... ... @@ -2162,17 +2163,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
text: '填写预订人信息',
fontSize: 28,
isBold: false,
textColor: userModel.user.role_name != '管理员' &&
userModel
.user
.role_name !=
'店长' &&
widget.uid !=
"null" &&
widget.uid !=
userModel
.user
.openid
textColor: notDo
? MyColours
.color_999999
: Colors.white,
... ... @@ -2182,47 +2173,17 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
.setWidth(240),
radius: ScreenUtil()
.setWidth(10),
borderColor: userModel.user.role_name != '管理员' &&
userModel
.user
.role_name !=
'店长' &&
widget.uid !=
"null" &&
widget.uid !=
userModel
.user
.openid
borderColor: notDo
? MyColours
.color_999999
: MyColours
.color_199095,
gradientStart: userModel.user.role_name != '管理员' &&
userModel
.user
.role_name !=
'店长' &&
widget.uid !=
"null" &&
widget.uid !=
userModel
.user
.openid
gradientStart: notDo
? MyColours
.color_ffffff
: MyColours
.color_199095,
gradientEnd: userModel.user.role_name != '管理员' &&
userModel
.user
.role_name !=
'店长' &&
widget.uid !=
"null" &&
widget.uid !=
userModel
.user
.openid
gradientEnd: notDo
? MyColours
.color_ffffff
: MyColours
... ... @@ -2231,18 +2192,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
// setState(() {
// setTop = true;
// });
if (userModel.user
.role_name !=
'管理员' &&
userModel.user
.role_name !=
'店长' &&
widget.uid !=
"null" &&
widget.uid !=
userModel
.user
.openid) {
if (notDo) {
return;
} else {
NavigatorUtil
... ... @@ -2494,20 +2444,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
null &&
formatPhone !=
'') {
if (userModel
.user
.role_name !=
'管理员' &&
userModel
.user
.role_name !=
'店长' &&
widget.uid !=
"null" &&
widget.uid !=
userModel
.user
.openid) {
if (notDo) {
} else {
DialogUtil
.goPhone(
... ... @@ -2672,11 +2609,13 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
flex: 1,
child: InkWell(
onTap: () {
NavigatorUtil
.goOrderAdvanceHomePage(
context,
detailEntity,
widget.rid);
if (!notDoWechat) {
NavigatorUtil
.goOrderAdvanceHomePage(
context,
detailEntity,
widget.rid);
}
},
child: Container(
margin: EdgeInsets.only(
... ... @@ -2687,8 +2626,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
MyColours.color_ffffff,
border: Border.all(
width: w(1),
color: MyColours
.color_438E93),
color: notDoWechat
? MyColours
.color_999999
: MyColours
.color_438E93),
borderRadius:
BorderRadius.circular(
ScreenUtil()
... ... @@ -2698,8 +2640,11 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
alignment: Alignment.center,
child: Text('预点菜',
style: TextStyle(
color: MyColours
.color_438E93,
color: notDoWechat
? MyColours
.color_999999
: MyColours
.color_438E93,
fontSize:
ScreenUtil()
.setSp(
... ... @@ -2736,17 +2681,20 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
// _nameStr.length -
// 1);
// }
NavigatorUtil
.goInvicationPage(
context,
detailEntity.id,
);
if (!notDoWechat) {
NavigatorUtil
.goInvicationPage(
context,
detailEntity.id,
);
}
},
child: Container(
decoration: BoxDecoration(
color:
MyColours.color_199095,
color: notDoWechat
? MyColours.color_999999
: MyColours
.color_199095,
borderRadius:
BorderRadius.circular(
ScreenUtil()
... ... @@ -3165,10 +3113,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
horizontal: ScreenUtil().setHeight(40)),
decoration: BoxDecoration(
border: Border.all(
color: userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
widget.uid != "null" &&
widget.uid != userModel.user.openid
color: notDo
? MyColours.color_999999
: MyColours.color_199095,
width: ScreenUtil().setWidth(2)),
... ... @@ -3183,11 +3128,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
Expanded(
child: _cancelAndChangeBtn(() {
print('点击变更预订');
if (userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid) {
if (notDo) {
} else {
NavigatorUtil.goNoteBookChangeFPage(
context,
... ... @@ -3195,50 +3136,24 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
widget.rid);
}
}, '变更预订',
fontColor: userModel
.user.role_name !=
'管理员' &&
userModel
.user.role_name !=
'店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid
fontColor: notDo
? MyColours.color_999999
: MyColours.color_199095)),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setWidth(50),
color:
userModel.user.role_name != '管理员' &&
userModel.user.role_name !=
'店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid
? MyColours.color_999999
: MyColours.color_199095,
color: notDo
? MyColours.color_999999
: MyColours.color_199095,
),
Expanded(
child: _cancelAndChangeBtn(() {
if (userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid) {
if (notDo) {
} else {
_showCancelWidget(context);
}
}, '取消预订',
fontColor: userModel
.user.role_name !=
'管理员' &&
userModel
.user.role_name !=
'店长' &&
widget.uid != "null" &&
widget.uid !=
userModel.user.openid
fontColor: notDo
? MyColours.color_999999
: MyColours.color_199095)),
],
... ... @@ -3284,15 +3199,19 @@ class TitleAndBtn extends StatelessWidget {
@override
Widget build(BuildContext context) {
bool hasAuthority = true; //
if (title == "备注") {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
if (userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
uid != "null" &&
uid != userModel.user.openid) {
hasAuthority = false;
}
// if (title == "备注") {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
bool notDo = (userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
uid != "null" &&
(uid != userModel.user.openid &&
userModel.user.role_name != '前台') &&
userModel.user.role_name != '前台') ||
userModel.user.role_name == '迎宾';
if (notDo) {
hasAuthority = false;
}
// }
return Container(
color: MyColours.color_ffffff,
... ... @@ -3312,16 +3231,24 @@ class TitleAndBtn extends StatelessWidget {
),
),
Spacer(),
Text(
"选填",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(30)),
softWrap: true,
),
if (Provider.of<UserModel>(context, listen: false)
.user
.role_name !=
'迎宾')
Text(
"选填",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(30)),
softWrap: true,
),
HEmptyView(10),
InkWell(
onTap: callback,
onTap: () {
if (hasAuthority) {
callback();
}
},
child: Container(
height: ScreenUtil().setWidth(44),
decoration: BoxDecoration(
... ... @@ -3367,6 +3294,7 @@ class TitleAndTextfield extends StatefulWidget {
final bool isPrice;
final VoidCallback callback;
final String uid;
const TitleAndTextfield(
{Key key,
... ... @@ -3378,7 +3306,8 @@ class TitleAndTextfield extends StatefulWidget {
this.controller,
this.focusNode,
this.isPrice = true,
this.callback})
this.callback,
this.uid})
: super(key: key);
@override
... ... @@ -3389,9 +3318,23 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield>
with WidgetsBindingObserver {
// FocusNode numberFocusNode = new FocusNode();
OverlayEntry overlayEntry;
bool hasAuthority = true; //
@override
void initState() {
super.initState();
// if (title == "备注") {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
bool notDo = (userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
widget.uid != "null" &&
(widget.uid != userModel.user.openid &&
userModel.user.role_name != '前台') &&
userModel.user.role_name != '前台') ||
userModel.user.role_name == '迎宾';
if (notDo) {
hasAuthority = false;
}
WidgetsBinding.instance.addObserver(this);
// if (Platform.isIOS) {
widget.focusNode.addListener(() {
... ... @@ -3538,13 +3481,14 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield>
// widget.detailModel.strTF.trim().length > 0
// ? Text("¥", style: TextStyle(color: MyColours.color_199095))
// : SizedBox(),
Text(
"选填",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(30)),
softWrap: true,
),
if (hasAuthority)
Text(
"选填",
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(30)),
softWrap: true,
),
HEmptyView(6),
Container(
constraints:
... ... @@ -3554,7 +3498,9 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield>
border: Border(
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: MyColours.color_199095))),
color: hasAuthority
? MyColours.color_199095
: MyColours.color_999999))),
child: IntrinsicWidth(
child: TextField(
controller: widget.controller,
... ... @@ -3563,6 +3509,7 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield>
// LengthLimitingTextInputFormatter(9),
// FilteringTextInputFormatter.digitsOnly
// ],
enabled: hasAuthority,
inputFormatters: widget.isPrice
? [
... ... @@ -3577,13 +3524,17 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield>
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(30),
color: MyColours.color_199095),
color: hasAuthority
? MyColours.color_199095
: MyColours.color_333333),
textAlign: TextAlign.right,
textInputAction: TextInputAction.done,
decoration: InputDecoration(
hintText: "修改",
hintStyle: TextStyle(
color: MyColours.color_199095,
color: hasAuthority
? MyColours.color_199095
: MyColours.color_999999,
fontSize: ScreenUtil().setSp(30),
),
prefix: widget.detailModel.strTF != null &&
... ...
... ... @@ -103,26 +103,41 @@ class _FeastBoardPageState extends State<FeastBoardPage> {
content,
hasLeftBorder = true,
isSelect = false}) {
bool canDo = true;
if (content == '创建宴会') {
canDo =
Provider.of<UserModel>(context, listen: false).user.role_name != '迎宾';
}
return InkWell(
onTap: onPress,
child: Container(
height: h(48),
decoration: BoxDecoration(
color: isSelect ? MyColours.color_438E93 : MyColours.color_ffffff,
color: isSelect
? canDo
? MyColours.color_438E93
: MyColours.color_999999
: MyColours.color_ffffff,
border: Border(
bottom: BorderSide(
color: MyColours.color_438E93,
color:
canDo ? MyColours.color_438E93 : MyColours.color_999999,
width: ScreenUtil().setWidth(2)),
top: BorderSide(
color: MyColours.color_438E93,
color:
canDo ? MyColours.color_438E93 : MyColours.color_999999,
width: ScreenUtil().setWidth(2)),
left: hasLeftBorder
? BorderSide(
color: MyColours.color_438E93,
color: canDo
? MyColours.color_438E93
: MyColours.color_999999,
width: ScreenUtil().setWidth(2))
: BorderSide.none,
right: BorderSide(
color: MyColours.color_438E93,
color:
canDo ? MyColours.color_438E93 : MyColours.color_999999,
width: ScreenUtil().setWidth(2)))),
child: Align(
alignment: Alignment.center,
... ... @@ -363,10 +378,10 @@ class _FeastBoardPageState extends State<FeastBoardPage> {
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(32)),
padding: EdgeInsets.only(
bottom: ScreenUtil().setWidth(10),
bottom: ScreenUtil().setWidth(0),
left: ScreenUtil().setWidth(5),
right: ScreenUtil().setWidth(5),
top: ScreenUtil().setWidth(10)),
top: ScreenUtil().setWidth(0)),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
... ... @@ -425,10 +440,10 @@ class _FeastBoardPageState extends State<FeastBoardPage> {
// ScreenUtil().setWidth(12),
// ScreenUtil().setWidth(32)),
padding: EdgeInsets.only(
bottom: ScreenUtil().setWidth(10),
bottom: ScreenUtil().setWidth(0),
left: ScreenUtil().setWidth(5),
right: ScreenUtil().setWidth(5),
top: ScreenUtil().setWidth(10)),
top: ScreenUtil().setWidth(0)),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
... ... @@ -604,8 +619,14 @@ class _FeastBoardPageState extends State<FeastBoardPage> {
Expanded(
child: _callButton(
onPress: () async {
NavigatorUtil.goFeastCreatePage(context,
isCreate: true);
if (Provider.of<UserModel>(context, listen: false)
.user
.role_name !=
'迎宾') {
NavigatorUtil.goFeastCreatePage(context,
isCreate: true);
}
},
content: '创建宴会',
hasLeftBorder: true,
... ...
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:provider/provider.dart';
import '../../constant/state.dart';
... ... @@ -22,6 +23,7 @@ import '../../widgets/v_empty_view.dart';
class FeastDetailPage extends StatefulWidget {
final String rid;
final bool canEdit;
FeastDetailPage({Key key, this.rid, this.canEdit = true}) : super(key: key);
... ... @@ -33,10 +35,13 @@ class _FeastDetailPageState extends State<FeastDetailPage> {
FeastModel feastModel;
ScrollController _scrollController = ScrollController();
bool notDo = true;
@override
void initState() {
// TODO: implement initState
super.initState();
Utils.changeStatusColor(color: MyColours.color_438E93);
WidgetsBinding.instance.addPostFrameCallback((_) {
... ... @@ -61,6 +66,14 @@ class _FeastDetailPageState extends State<FeastDetailPage> {
Map<String, String> pramas = {'rid': widget.rid}; //
bool success = await feastModel.getBanquetById(context, pramas);
if (success) {
// UserModel userModel = Provider.of<UserModel>(context, listen: false);
// notDo = (userModel.user.role_name != '管理员' &&
// userModel.user.role_name != '店长' &&
// widget.uid != "null" &&
// (widget.uid != userModel.user.openid &&
// userModel.user.role_name != '前台') &&
// userModel.user.role_name != '前台') ||userModel.user.role_name == '迎宾' ;
// _uploadImageProvider.feastRemarkContractImageList = [];
// feastModel.banquetDetail.contractInfo.contractImages.forEach((element) {
// UploadImgModel uploadImgModel = UploadImgModel();
... ... @@ -738,26 +751,37 @@ class _FeastDetailPageState extends State<FeastDetailPage> {
hasLeftBorder = true,
Color textColor = MyColours.color_438E93,
isSelect = false}) {
bool canDo =
Provider.of<UserModel>(context, listen: false).user.role_name != '迎宾';
return InkWell(
onTap: onPress,
child: Container(
height: h(48),
decoration: BoxDecoration(
color: isSelect ? MyColours.color_438E93 : MyColours.color_ffffff,
color: isSelect
? canDo
? MyColours.color_438E93
: MyColours.color_999999
: MyColours.color_ffffff,
border: Border(
bottom: BorderSide(
color: MyColours.color_438E93,
color:
canDo ? MyColours.color_438E93 : MyColours.color_999999,
width: ScreenUtil().setWidth(2)),
top: BorderSide(
color: MyColours.color_438E93,
color:
canDo ? MyColours.color_438E93 : MyColours.color_999999,
width: ScreenUtil().setWidth(2)),
left: hasLeftBorder
? BorderSide(
color: MyColours.color_438E93,
color: canDo
? MyColours.color_438E93
: MyColours.color_999999,
width: ScreenUtil().setWidth(2))
: BorderSide.none,
right: BorderSide(
color: MyColours.color_438E93,
color:
canDo ? MyColours.color_438E93 : MyColours.color_999999,
width: ScreenUtil().setWidth(2)))),
child: Align(
alignment: Alignment.center,
... ... @@ -1302,20 +1326,39 @@ class _FeastDetailPageState extends State<FeastDetailPage> {
Expanded(
child: _callButton(
onPress: () {
_showCancelWidget(context);
if (Provider.of<UserModel>(context,
listen: false)
.user
.role_name !=
'迎宾') {
_showCancelWidget(context);
}
},
content: '丢单',
hasLeftBorder: true,
textColor: MyColours.color_E34D59,
textColor: Provider.of<UserModel>(context,
listen: false)
.user
.role_name !=
'迎宾'
? MyColours.color_E34D59
: MyColours.color_999999,
isSelect: false)),
Expanded(
child: _callButton(
onPress: () async {
NavigatorUtil.goFeastCreatePage(context,
rid: widget.rid,
banquetDetail: {
'object': feastModel.banquetDetailMap
});
if (Provider.of<UserModel>(context,
listen: false)
.user
.role_name !=
'迎宾') {
NavigatorUtil.goFeastCreatePage(context,
rid: widget.rid,
banquetDetail: {
'object': feastModel.banquetDetailMap
});
}
// selectMenu = '签约';
// menuSet.add('定金');
// menuSet.add('签约');
... ...
... ... @@ -29,11 +29,13 @@ class FeastPage extends StatefulWidget {
class _FeastPageState extends State<FeastPage> {
ScrollController controller = ScrollController();
FeastModel feastModel;
bool notDo = false;
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
notDo =
Provider.of<UserModel>(context, listen: false).user.role_name == '迎宾';
_getBanquetByTime();
_getBanquetBeFollow();
// scrollController.jumpTo(scrollController.position.minScrollExtent);
... ... @@ -100,7 +102,9 @@ class _FeastPageState extends State<FeastPage> {
title,
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_515151),
color: title != '宴会看板' && notDo
? MyColours.color_999999
: MyColours.color_515151),
)
],
));
... ... @@ -123,15 +127,21 @@ class _FeastPageState extends State<FeastPage> {
NavigatorUtil.goFeastBoardPage(context);
}),
upAndDown('y_new', '新建宴会', onTap: () {
NavigatorUtil.goFeastCreatePage(context, isCreate: true);
if (!notDo) {
NavigatorUtil.goFeastCreatePage(context, isCreate: true);
}
}),
InkWell(
onTap: () {
NavigatorUtil.goFeastFollowUpPage(context);
if (!notDo) {
NavigatorUtil.goFeastFollowUpPage(context);
}
},
child: Stack(clipBehavior: Clip.none, children: [
upAndDown('y_schedule', '待跟进', onTap: () {
NavigatorUtil.goFeastFollowUpPage(context);
if (!notDo) {
NavigatorUtil.goFeastFollowUpPage(context);
}
}),
feastModel.beFollowData != null &&
feastModel.beFollowData.length > 0
... ... @@ -159,7 +169,9 @@ class _FeastPageState extends State<FeastPage> {
: SizedBox()
])),
upAndDown('y_money', '定金管理', onTap: () {
NavigatorUtil.goFeastDepositDataPage(context);
if (!notDo) {
NavigatorUtil.goFeastDepositDataPage(context);
}
})
],
),
... ...
... ... @@ -126,6 +126,10 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
WidgetsBinding.instance.addObserver(this);
_currIndex = widget.initialIndex;
if (Provider.of<UserModel>(context, listen: false).user.role_name == '迎宾') {
_currIndex = 1;
}
if (App.sp.containsKey('sellerEdate')) {
List<String> data = App.sp.getStringList('sellerEdate');
if (data.contains('-1')) {
... ... @@ -184,7 +188,9 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
List<PullMarketingByUidSunModel> data =
Provider.of<UserModel>(context, listen: false)
.pullMarketingByUidSunModel;
if (data != null) {
if (data != null &&
Provider.of<UserModel>(context, listen: false).user.role_name !=
'迎宾') {
if (data.length > 0) {
Future.delayed(Duration(milliseconds: 300), () {
DialogUtil.cupertinoAlertDialog(context,
... ... @@ -223,9 +229,12 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
}
});
timer = Timer.periodic(Duration(minutes: 3), (_) {
_getAllUnMessages();
});
if (Provider.of<UserModel>(context, listen: false).user.role_name !=
'迎宾') {
timer = Timer.periodic(Duration(minutes: 3), (_) {
_getAllUnMessages();
});
}
_getUnMsgNum();
});
... ... @@ -1259,6 +1268,14 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
}
}
if (Provider.of<UserModel>(context, listen: false)
.user
.role_name ==
'迎宾' &&
(index == 0 || index == 2)) {
return;
}
if (mounted) {
setState(() {
_currIndex = index;
... ...
... ... @@ -51,6 +51,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
String outDay = ''; //过期天数
DateTime edate; //过期时间
bool notDo = false;
@override
void initState() {
// TODO: implement initState
... ... @@ -65,6 +66,9 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
});
});
WidgetsBinding.instance.addPostFrameCallback((_) async {
notDo =
Provider.of<UserModel>(context, listen: false).user.role_name == '迎宾';
///获取商家时间区间内订单数量
_getSellerReserveTotal();
... ... @@ -516,8 +520,10 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
),
InkWell(
onTap: () {
NavigatorUtil.goSmsManagePage(context,
smsInfoData: smsInfoData);
if (!notDo) {
NavigatorUtil.goSmsManagePage(context,
smsInfoData: smsInfoData);
}
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
... ... @@ -547,9 +553,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
VEmptyView(8),
RoundButton(
text: '充值短信',
gradientStart: MyColours.color_438E93,
gradientEnd: MyColours.color_438E93,
borderColor: MyColours.color_438E93,
gradientStart: notDo
? MyColours.color_999999
: MyColours.color_438E93,
gradientEnd: notDo
? MyColours.color_999999
: MyColours.color_438E93,
borderColor: notDo
? MyColours.color_999999
: MyColours.color_438E93,
width: ScreenUtil().setWidth(48 * 2),
height: ScreenUtil().setWidth(18 * 2),
fontSize: 20,
... ... @@ -557,9 +569,11 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
textColor: MyColours.color_ffffff,
radius: ScreenUtil().setWidth(8),
onPressed: () {
NavigatorUtil.goSmsManagePage(
context,
smsInfoData: smsInfoData);
if (!notDo) {
NavigatorUtil.goSmsManagePage(
context,
smsInfoData: smsInfoData);
}
})
],
)),
... ... @@ -573,7 +587,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
onTap: () {
// NavigatorUtil.goMyIntegralPage(context,
// sunModel: myModel.integralSunModel);
if (outDay != '') {
if (outDay != '' && !notDo) {
if (outDay == '0') {
DialogUtil
.cupertinoAlertSellerHasEdateDialog(
... ... @@ -634,9 +648,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
VEmptyView(8),
RoundButton(
text: '有效期',
gradientStart: MyColours.color_438E93,
gradientEnd: MyColours.color_438E93,
borderColor: MyColours.color_438E93,
gradientStart: notDo
? MyColours.color_999999
: MyColours.color_438E93,
gradientEnd: notDo
? MyColours.color_999999
: MyColours.color_438E93,
borderColor: notDo
? MyColours.color_999999
: MyColours.color_438E93,
width: ScreenUtil().setWidth(48 * 2),
height: ScreenUtil().setWidth(18 * 2),
fontSize: 20,
... ... @@ -644,7 +664,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
textColor: MyColours.color_ffffff,
radius: ScreenUtil().setWidth(8),
onPressed: () {
if (outDay != '') {
if (outDay != '' && !notDo) {
if (outDay == '0') {
DialogUtil
.cupertinoAlertSellerHasEdateDialog(
... ... @@ -693,11 +713,15 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
UserModel userModel = Provider.of<UserModel>(context, listen: false);
bool isRoleLow = userModel.user.role_name == '收银员' ||
userModel.user.role_name == '服务员' ||
userModel.user.role_name == '客户经理'
userModel.user.role_name == '客户经理' ||
userModel.user.role_name == '前台' ||
userModel.user.role_name == '迎宾'
? true
: false;
bool isRoleLowNoManage = userModel.user.role_name == '收银员' ||
userModel.user.role_name == '服务员'
userModel.user.role_name == '服务员' ||
userModel.user.role_name == '前台' ||
userModel.user.role_name == '迎宾'
? true
: false;
return Container(
... ... @@ -772,31 +796,42 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
InkWell(
onTap: () {
onTap: () {
if (!notDo) {
NavigatorUtil.goBaseInfoPage(
context, FromPage.FromPageMyPage);
},
child: _item(
Utils.getImgPath('grxx'), '个人信息')),
}
},
child: _item(Utils.getImgPath('grxx'), '个人信息',
isRowLow: notDo),
),
InkWell(
onTap: () {
NavigatorUtil.goMyCustomerPage(context);
if (!notDo) {
NavigatorUtil.goMyCustomerPage(context);
}
},
child: _item(
Utils.getImgPath('wdkq'), '我的客情')),
Utils.getImgPath('wdkq'), '我的客情',
isRowLow: notDo)),
InkWell(
onTap: () {
NavigatorUtil.goCouponPage(context);
if (!notDo) {
NavigatorUtil.goCouponPage(context);
}
},
child:
_item(Utils.getImgPath('yhq'), '优惠券')),
child: _item(Utils.getImgPath('yhq'), '优惠券',
isRowLow: notDo)),
InkWell(
onTap: () {
NavigatorUtil.goRemarkManagerPage(
context);
if (!notDo) {
NavigatorUtil.goRemarkManagerPage(
context);
}
},
child: _item(
Utils.getImgPath('cybz'), '常用备注')),
Utils.getImgPath('cybz'), '常用备注',
isRowLow: notDo)),
],
),
VEmptyView(68),
... ... @@ -806,18 +841,25 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver {
children: [
InkWell(
onTap: () {
NavigatorUtil.goMyPlanDishHomePage(
context);
if (!notDo) {
NavigatorUtil.goMyPlanDishHomePage(
context);
}
},
child: _item(
Utils.getImgPath('cdgl'), '套餐排菜')),
Utils.getImgPath('cdgl'), '套餐排菜',
isRowLow: notDo)),
InkWell(
onTap: () {
NavigatorUtil.goStoreWineManageHomePage(
context);
if (!notDo) {
NavigatorUtil
.goStoreWineManageHomePage(
context);
}
},
child: _item(
Utils.getImgPath('khcj'), '客户存酒')),
Utils.getImgPath('khcj'), '客户存酒',
isRowLow: notDo)),
InkWell(
onTap: () {}, child: _item('', '空空空空')),
InkWell(
... ...
... ... @@ -151,6 +151,10 @@ class _PersonnelDetailPageState extends State<PersonnelDetailPage> {
data = personnelProvider.dataMap.cashier.listdata[widget.index];
} else if (widget.position == '服务员') {
data = personnelProvider.dataMap.waiter.listdata[widget.index];
} else if (widget.position == '前台') {
data = personnelProvider.dataMap.reception.listdata[widget.index];
} else if (widget.position == '迎宾') {
data = personnelProvider.dataMap.welcome.listdata[widget.index];
}
nickName = data.nickName != null && data.nickName != 'null'
? data.nickName
... ...
... ... @@ -35,7 +35,7 @@ class _PersonnelManagePageState extends State<PersonnelManagePage> {
void initState() {
// TODO: implement initState
super.initState();
titleList = ['管理员', '店长', '客户经理', '收银员', '服务员'];
titleList = ['管理员', '店长', '客户经理', '收银员', '服务员', '前台', '迎宾'];
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
_getAuthUserLists(showLoading: false);
});
... ... @@ -158,6 +158,18 @@ class _PersonnelManagePageState extends State<PersonnelManagePage> {
hasWechatNum = personnelProvider
.dataMap.waiter.hasWechatNum
.toString();
} else if (title == '前台') {
data = personnelProvider.dataMap.reception.listdata;
roleId = personnelProvider.dataMap.reception.roleId;
hasWechatNum = personnelProvider
.dataMap.reception.hasWechatNum
.toString();
} else if (title == '迎宾') {
data = personnelProvider.dataMap.welcome.listdata;
roleId = personnelProvider.dataMap.welcome.roleId;
hasWechatNum = personnelProvider
.dataMap.welcome.hasWechatNum
.toString();
}
}
... ...
... ... @@ -173,6 +173,20 @@ class _StoreWineManageHomePageState extends State<StoreWineManageHomePage>
data = element;
}
});
} else if (userModel.user.role_name == '前台') {
personnelProvider.dataMap.reception.listdata.forEach((element) {
if (element.id == userModel.user.openid) {
//找到自己
data = element;
}
});
} else if (userModel.user.role_name == '迎宾') {
personnelProvider.dataMap.welcome.listdata.forEach((element) {
if (element.id == userModel.user.openid) {
//找到自己
data = element;
}
});
}
isStoreWine = data.isStoreWine == '1' ? true : false;
... ... @@ -380,7 +394,6 @@ class _StoreWineManageHomePageState extends State<StoreWineManageHomePage>
return KeyboardDismissOnTap(
child: Scaffold(
resizeToAvoidBottomInset: false,
appBar: SystemAppBar(
'存酒管理',
onTap: () {
... ...
... ... @@ -410,7 +410,10 @@ class NoteBookItemFState extends State<NoteBookItemF>
if (userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
notebook.uid != "null" &&
notebook.uid != userModel.user.openid) {
(notebook.uid != userModel.user.openid &&
userModel.user.role_name != '前台') &&
userModel.user.role_name != '前台' &&
userModel.user.role_name != '迎宾') {
canDo = false;
} else {
if (notebook.status == '0' ||
... ... @@ -445,6 +448,10 @@ class NoteBookItemFState extends State<NoteBookItemF>
if (notebook.status == '2') {
widthBtn = 208.0;
}
if (userModel.user.role_name == '迎宾') {
widthBtn = 328.0;
}
return Stack(
clipBehavior: Clip.none,
alignment: Alignment.centerRight,
... ... @@ -586,7 +593,7 @@ class NoteBookItemFState extends State<NoteBookItemF>
),
notebook.phoneStr.isNotEmpty
? Text(
'(' +
' (' +
Utils.showEndPhone(
'${notebook.phoneStr}') +
')',
... ... @@ -775,10 +782,14 @@ class NoteBookItemFState extends State<NoteBookItemF>
setReserveStatus('3');
},
),
notebook.status == '2'
notebook.status == '2' ||
userModel.user.role_name ==
'迎宾'
? SizedBox()
: HEmptyView(44),
notebook.status == '2'
notebook.status == '2' ||
userModel.user.role_name ==
'迎宾'
? SizedBox()
: InkWell(
onTap: () {
... ...
... ... @@ -422,7 +422,10 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
if (userModel.user.role_name != '管理员' &&
userModel.user.role_name != '店长' &&
notebook.uid != "null" &&
notebook.uid != userModel.user.openid) {
(notebook.uid != userModel.user.openid &&
userModel.user.role_name != '前台') &&
userModel.user.role_name != '前台' &&
userModel.user.role_name != '迎宾') {
canDo = false;
} else {
if (notebook.status == '0' ||
... ... @@ -457,6 +460,9 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
if (notebook.status == '2') {
widthBtn = 208.0;
}
if (userModel.user.role_name == '迎宾') {
widthBtn = 328.0;
}
return Stack(
clipBehavior: Clip.none,
alignment: Alignment.centerRight,
... ... @@ -756,10 +762,14 @@ class NoteBookItemSimpleState extends State<NoteBookItemSimple>
setReserveStatus('3');
},
),
notebook.status == '2'
notebook.status == '2' ||
userModel.user.role_name ==
'迎宾'
? SizedBox()
: HEmptyView(44),
notebook.status == '2'
notebook.status == '2' ||
userModel.user.role_name ==
'迎宾'
? SizedBox()
: InkWell(
onTap: () {
... ...
... ... @@ -927,6 +927,18 @@ class FeastModel extends ChangeNotifier {
model.roleName = '服务员';
sellerManageList.add(model);
}
for (PersonnelManageSunModel item in dataMap.reception.listdata) {
FilterBtnModel model = returnModel(item);
model.roleName = '前台';
sellerManageList.add(model);
}
for (PersonnelManageSunModel item in dataMap.welcome.listdata) {
FilterBtnModel model = returnModel(item);
model.roleName = '迎宾';
sellerManageList.add(model);
}
pageStatePersonnalHome = PageState.Success;
notifyListeners();
return true;
... ... @@ -1338,7 +1350,9 @@ class FeastModel extends ChangeNotifier {
};
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(context, Method.get, HttpUrl.get_setmeal,
data: params, showLoading:pageStateSetmeal == PageState.Loading ? false: isShowLoading)
data: params,
showLoading:
pageStateSetmeal == PageState.Loading ? false : isShowLoading)
.catchError((error) {
print(error.toString());
if (error is MyError) {
... ... @@ -1407,7 +1421,9 @@ class FeastModel extends ChangeNotifier {
{isShowLoading = true}) async {
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(context, Method.get, HttpUrl.get_setmeal_by_id,
data: params, showLoading:pageStateMenu == PageState.Loading ? false: isShowLoading)
data: params,
showLoading:
pageStateMenu == PageState.Loading ? false : isShowLoading)
.catchError((error) {
print(error.toString());
if (error is MyError) {
... ... @@ -1695,7 +1711,9 @@ class FeastModel extends ChangeNotifier {
};
BaseResp<dynamic> baseResp = await DioUtil()
.request<dynamic>(context, Method.get, HttpUrl.get_deposit,
data: params, showLoading:pageStateDeposit == PageState.Loading ? false: isShowLoading)
data: params,
showLoading:
pageStateDeposit == PageState.Loading ? false : isShowLoading)
.catchError((error) {
print(error.toString());
if (error is MyError) {
... ...
... ... @@ -111,6 +111,18 @@ class PersonnelProvider extends ChangeNotifier {
dataMap.waiter.hasWechatNum++;
}
}
dataMap.welcome.hasWechatNum = 0;
for (PersonnelManageSunModel item in dataMap.welcome.listdata) {
if (item.openid != null && item.openid != 'null' && item.openid != '') {
dataMap.welcome.hasWechatNum++;
}
}
dataMap.reception.hasWechatNum = 0;
for (PersonnelManageSunModel item in dataMap.reception.listdata) {
if (item.openid != null && item.openid != 'null' && item.openid != '') {
dataMap.reception.hasWechatNum++;
}
}
} else {
Utils.showToast(baseResp.msg ?? "");
}
... ... @@ -167,7 +179,7 @@ class PersonnelProvider extends ChangeNotifier {
print(error.toString());
});
if (baseResp != null && baseResp.code == Constant.status_success) {
if (baseResp.data.length == 1 ) {
if (baseResp.data.length == 1) {
return true;
}
} else {
... ... @@ -192,7 +204,7 @@ class PersonnelProvider extends ChangeNotifier {
});
if (baseResp != null && baseResp.code == Constant.status_success) {
// if (baseResp.data == 1) {
return true;
return true;
// }
} else {
Utils.showToast(baseResp.msg ?? "");
... ...
... ... @@ -1614,7 +1614,8 @@ class DialogUtil {
FocusNode()); //点击空白处隐藏键盘
},
keyboardType: title == '新建套餐'
? TextInputType.numberWithOptions(decimal: true)
? TextInputType.numberWithOptions(
decimal: true)
: TextInputType.text,
),
)),
... ... @@ -1885,7 +1886,8 @@ class DialogUtil {
FocusNode()); //点击空白处隐藏键盘
},
keyboardType: title == '新建套餐'
? TextInputType.numberWithOptions(decimal: true)
? TextInputType.numberWithOptions(
decimal: true)
: TextInputType.text,
),
)),
... ... @@ -3861,7 +3863,8 @@ class DialogUtil {
fontSize: ScreenUtil().setSp(32),
),
),
keyboardType: TextInputType.numberWithOptions(decimal: true),
keyboardType: TextInputType.numberWithOptions(
decimal: true),
onChanged: (value) {
state(() {});
},
... ... @@ -6131,7 +6134,7 @@ class DialogUtil {
child: Container(
padding:
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(72)),
height: ScreenUtil().setWidth(height),
// height: ScreenUtil().setWidth(height),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(30))),
child: Card(
... ... @@ -6139,6 +6142,7 @@ class DialogUtil {
borderRadius: BorderRadius.all(
Radius.circular(ScreenUtil().setWidth(30)))), //设置圆角
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
VEmptyView(40),
Container(
... ...