Commit 6a5f81420187a1978cb44f0f54cd9e3e9a9e8ca8

Authored by wdn127929
1 parent 4841a11c

客请相关UI修改

... ... @@ -67,6 +67,9 @@ class CustomerBySellerSunModel extends Object with ISuspensionBean {
@JsonKey(name: 'label')
String label;
@JsonKey(name: 'is_member')
String isMember;
bool select = false;
String pinyin;
... ... @@ -106,7 +109,8 @@ class CustomerBySellerSunModel extends Object with ISuspensionBean {
this.uid,
this.nickName,
this.gid,
this.label);
this.label,
this.isMember);
factory CustomerBySellerSunModel.fromJson(Map<String, dynamic> srcJson) =>
_$CustomerBySellerSunModelFromJson(srcJson);
... ...
... ... @@ -43,6 +43,7 @@ CustomerBySellerSunModel _$CustomerBySellerSunModelFromJson(
json['nick_name'] as String,
json['gid'] as String,
json['label'] as String,
json['is_member'] as String,
);
}
... ... @@ -62,4 +63,5 @@ Map<String, dynamic> _$CustomerBySellerSunModelToJson(
'nick_name': instance.nickName,
'gid': instance.gid,
'label': instance.label,
'is_member': instance.isMember
};
... ...
... ... @@ -87,6 +87,9 @@ class CustomerListSunModel extends Object with ISuspensionBean {
String nickName;
@JsonKey(name: 'gid')
String gid;
@JsonKey(name: 'is_member')
String isMember;
bool select = false;
... ... @@ -140,6 +143,7 @@ class CustomerListSunModel extends Object with ISuspensionBean {
this.label,
this.nickName,
this.gid,
this.isMember
);
factory CustomerListSunModel.fromJson(Map<String, dynamic> srcJson) =>
... ...
... ... @@ -49,7 +49,8 @@ CustomerListSunModel _$CustomerListSunModelFromJson(Map<String, dynamic> json) {
json['month_count'] as String,
json['label'] as String,
json['nick_name'] as String,
json['id'] as String,
json['gid'] as String,
json['is_member'] as String,
);
}
... ... @@ -78,5 +79,6 @@ Map<String, dynamic> _$CustomerListSunModelToJson(
'month_count': instance.monthCount,
'label': instance.label,
'nick_name': instance.nickName,
'gid': instance.gid
'gid': instance.gid,
'is_member':instance.isMember
};
... ...
... ... @@ -101,6 +101,8 @@ class Guest extends Object {
String label;
@JsonKey(name: 'nick_name')
String nickName;
@JsonKey(name: 'is_member')
String isMember;
String get rnameStr {
if (rname == null || rname == '' || rname == ' ') return "";
... ... @@ -141,7 +143,8 @@ class Guest extends Object {
this.cDay,
this.udate,
this.label,
this.nickName);
this.nickName,
this.isMember);
factory Guest.fromJson(Map<String, dynamic> srcJson) =>
_$GuestFromJson(srcJson);
... ...
... ... @@ -71,6 +71,7 @@ Guest _$GuestFromJson(Map<String, dynamic> json) {
json['udate'] as String,
json['label'] as String,
json['nick_name'] as String,
json['is_member'] as String,
);
}
... ... @@ -91,7 +92,8 @@ Map<String, dynamic> _$GuestToJson(Guest instance) => <String, dynamic>{
'c_day': instance.cDay,
'udate': instance.udate,
'label': instance.label,
'nick_name': instance.nickName
'nick_name': instance.nickName,
'is_member': instance.isMember
};
Cday _$CdayFromJson(Map<String, dynamic> json) {
... ... @@ -112,17 +114,16 @@ Map<String, dynamic> _$CdayToJson(Cday instance) => <String, dynamic>{
Last _$LastFromJson(Map<String, dynamic> json) {
return Last(
json['id'] as String,
json['ddate'] as String,
json['ddate_solt'] as String,
json['tableinfo'] as String,
json['uid'] as String,
json['seller_user_nick_name'] as String,
json['seller_user_phone'] as String,
json['actual_pum'] as String,
json['con_amount'] as String,
json['account'] as String
);
json['id'] as String,
json['ddate'] as String,
json['ddate_solt'] as String,
json['tableinfo'] as String,
json['uid'] as String,
json['seller_user_nick_name'] as String,
json['seller_user_phone'] as String,
json['actual_pum'] as String,
json['con_amount'] as String,
json['account'] as String);
}
Map<String, dynamic> _$LastToJson(Last instance) => <String, dynamic>{
... ... @@ -135,7 +136,7 @@ Map<String, dynamic> _$LastToJson(Last instance) => <String, dynamic>{
'seller_user_phone': instance.sellerUserPhone,
'actual_pum': instance.actualPum,
'con_amount': instance.conAmount,
'account':instance.account
'account': instance.account
};
Count _$CountFromJson(Map<String, dynamic> json) {
... ...
... ... @@ -11,6 +11,8 @@ import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import '../../../../utils/screen_util.dart';
class MyContactListPage extends StatefulWidget {
final List<CustomerListSunModel> contacts;
final CustomerProvider provider;
... ... @@ -75,16 +77,18 @@ class _MyContactListPageState extends State<MyContactListPage> {
Widget _buildSusWidget(String susTag) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
horizontal: ScreenUtil().setWidth(30),
vertical: ScreenUtil().setWidth(10)),
// height: susItemHeight,
// margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(20)),
width: double.infinity,
color: Color.fromRGBO(239, 239, 239, 1),
margin: EdgeInsets.only(
bottom: ScreenUtil().setWidth(10)),
width: ScreenUtil().screenWidth,
color: MyColours.color_efefef,
alignment: Alignment.centerLeft,
child: Text(
'$susTag',
style: TextStyle(fontSize: ScreenUtil().setWidth(28)),
style: TextStyle(
color: MyColours.color_515151, fontSize: ScreenUtil().setWidth(24)),
),
);
}
... ... @@ -167,12 +171,11 @@ class _MyContactListPageState extends State<MyContactListPage> {
decoration: BoxDecoration(
color: model.attr != null && model.attr != ''
? model.attr == '沉睡'
? Color.fromRGBO(223, 33, 81, 1)
? MyColours.color_999999
: model.attr == '活跃'
? Color.fromRGBO(81, 170, 94, 1)
? MyColours.color_00715F
: model.attr == '流失'
? Color.fromRGBO(
109, 101, 248, 1)
? MyColours.color_E34D59
: Color.fromRGBO(
239, 143, 49, 1)
: Colors.transparent,
... ... @@ -365,6 +368,249 @@ class _MyContactListPageState extends State<MyContactListPage> {
);
}
Widget flatBtn(String tilte, Color color) {
return Container(
height: w(18),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: w(4)),
margin: EdgeInsets.only(left: w(10)),
decoration: BoxDecoration(
border: Border.all(color: color, width: w(1)),
borderRadius: BorderRadius.circular(r(5))),
child: Text(
tilte,
style: TextStyle(fontSize: font(10), color: color),
),
);
}
///改版item样式
Widget _buildListNewItem(CustomerListSunModel model, int index) {
String susTag = model.getSuspensionTag();
return
// Column(
// children: <Widget>[
// Offstage(
// offstage: model.isShowSuspension != true,
// child: _buildSusWidget(susTag),
// ),
// model.isShowSuspension ? VEmptyView(20) : SizedBox(),
Stack(
alignment: Alignment.centerLeft,
children: [
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (widget.fromPage != FromPage.FromPageShowCutomerList) {
NavigatorUtil.goMyCustomerDetailPage(
context, model, widget.fromPage);
}
},
child: Container(
margin: EdgeInsets.only(
left: ScreenUtil().setWidth(40),
right: ScreenUtil().setWidth(32),
bottom: ScreenUtil().setWidth(6),
top: model.isShowSuspension ? 0 : ScreenUtil().setWidth(6)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(r(8)),
boxShadow: [
BoxShadow(
offset: Offset(0, w(4)),
color: MyColours.color_40000000,
blurRadius: ScreenUtil().setWidth(8))
]),
child: Column(
children: [
Container(
height: w(35),
padding: EdgeInsets.symmetric(horizontal: w(15)),
decoration: BoxDecoration(
color: MyColours.color_F8F9FD,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(r(8)),
topRight: Radius.circular(r(8))),
),
child: Row(
children: [
model.rnameStr != null && model.rnameStr != ''
? Row(
// crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
width: w(72),
child: Text(
model.rnameStr,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(36),
fontWeight: FontWeight.bold),
)),
HEmptyView(10),
Text(
model.sexStr != '' && model.sexStr != null
? '${model.sexStr}'
: '',
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(20),
),
),
HEmptyView(10),
],
)
: SizedBox(),
Spacer(),
Container(
width: w(70),
child: Text(
model.phone,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
),
),
HEmptyView(88)
// HEmptyView(20),
// model.nickName == null
// ? SizedBox()
// : Text(
// '经理:${model.nickName}',
// style: TextStyle(
// color: MyColours.color_515151,
// fontSize: ScreenUtil().setSp(20),
// ),
// )
],
),
),
Padding(
padding: EdgeInsets.all(w(15)),
child: Row(
children: [
Container(
width: w(30),
height: w(16),
alignment: Alignment.center,
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(10),
// vertical: ScreenUtil().setWidth(2),
// ),
decoration: BoxDecoration(
color: model.attr != null && model.attr != ''
? model.attr == '沉睡'
? MyColours.color_999999
: model.attr == '活跃'
? MyColours.color_00715F
: model.attr == '流失'
? MyColours.color_E34D59
: Color.fromRGBO(
239, 143, 49, 1)
: Colors.transparent,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10),
),
),
child: Text(
model.attr == null || model.attr == ''
? ''
: model.attr,
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(20)))),
model.label != null
? flatBtn(model.label, MyColours.color_B39437)
: SizedBox(),
model.isMember == '1'
? flatBtn('会员', MyColours.color_438E93)
: SizedBox(),
true
? flatBtn('存酒14天', MyColours.color_438E93)
: SizedBox()
],
)),
Padding(
padding: EdgeInsets.only(
left: w(15), right: w(15), bottom: w(10)),
child: Row(
children: [
Text(
Utils.formatFromYmd(model.ddate),
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
),
HEmptyView(10),
Text(
model.ddateSolt != null ? model.ddateSolt : '',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
),
model.monthCount == '0' || model.monthCount == null
? SizedBox()
: HEmptyView(10),
model.monthCount == '0' || model.monthCount == null
? SizedBox()
: Text(
'30天内${model.monthCount}单',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
),
HEmptyView(10),
Text(
'累计${model.leiji}单',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
),
],
))
],
),
)),
widget.fromPage == FromPage.FromPageShowCutomerList
? SizedBox()
: Positioned(
left: ScreenUtil().setWidth(20),
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (widget.fromPage != FromPage.FromPageShowCutomerList) {
List<CustomerListSunModel> data =
widget.provider.userHistorys;
data[index].select = !data[index].select;
if (data[index].select) {
widget.provider.addDataMy(index);
} else {
widget.provider.cancelDataMy(index);
}
widget.provider.getCheckValueMy();
}
},
child: Image.asset(
Utils.getImgPath(
model.select ? 'c_mul_select' : 'c_not_edit'),
width: ScreenUtil().setWidth(40),
))),
],
)
// ],
// )
;
}
Decoration getIndexBarDecoration(Color color) {
return BoxDecoration(
color: color,
... ... @@ -374,36 +620,92 @@ class _MyContactListPageState extends State<MyContactListPage> {
@override
Widget build(BuildContext context) {
// return AzListView(
// data: widget.contacts,
// itemCount: widget.contacts.length,
// itemBuilder: (BuildContext context, int index) {
// // if (index == 0) return _buildHeader();
// CustomerListSunModel model = widget.contacts[index];
// return _buildListNewItem(model, index);
// },
// physics: BouncingScrollPhysics(),
// indexBarData: SuspensionUtil.getTagIndexList(widget.contacts),
// indexHintBuilder: (context, hint) {
// return Container(
// alignment: Alignment.center,
// width: ScreenUtil().setWidth(120),
// height: ScreenUtil().setWidth(120),
// decoration: BoxDecoration(
// color: Color.fromRGBO(239, 239, 239, 1),
// shape: BoxShape.circle,
// ),
// child:
// Text(hint, style: TextStyle(color: Colors.white, fontSize: 30.0)),
// );
// },
// indexBarMargin: EdgeInsets.all(10),
// indexBarOptions: IndexBarOptions(
// needRebuild: true,
// textStyle: TextStyle(
// fontSize: ScreenUtil().setSp(24), color: MyColours.color_199095),
// decoration: getIndexBarDecoration(Colors.transparent),
// downDecoration: getIndexBarDecoration(Colors.transparent),
// ),
// );
return AzListView(
indexBarItemHeight: w(12),
data: widget.contacts,
itemCount: widget.contacts.length,
itemBuilder: (BuildContext context, int index) {
// if (index == 0) return _buildHeader();
CustomerListSunModel model = widget.contacts[index];
return _buildListItem(model, index);
return _buildListNewItem(model, index);
},
physics: BouncingScrollPhysics(),
indexBarData: SuspensionUtil.getTagIndexList(widget.contacts),
indexBarAlignment: Alignment.centerRight,
// susItemBuilder: (context, index) {
// return Container(
// child: Text('ffsfgs'),
// );
// },
susItemBuilder: (context, index) {
CustomerListSunModel model = widget.contacts[index];
String susTag = model.getSuspensionTag();
return _buildSusWidget(susTag);
},
indexHintBuilder: (context, hint) {
return Container(
alignment: Alignment.center,
width: ScreenUtil().setWidth(120),
height: ScreenUtil().setWidth(120),
decoration: BoxDecoration(
color: Color.fromRGBO(239, 239, 239, 1),
color: MyColours.color_80D9D9D9,
shape: BoxShape.circle,
),
child:
Text(hint, style: TextStyle(color: Colors.white, fontSize: 30.0)),
child: Text(hint,
style:
TextStyle(color: MyColours.color_438E93, fontSize: font(30))),
);
},
indexBarMargin: EdgeInsets.all(10),
indexBarOptions: IndexBarOptions(
needRebuild: true,
hapticFeedback: true,
ignoreDragCancel: true,
indexHintAlignment: Alignment.centerRight,
textStyle: TextStyle(
fontSize: ScreenUtil().setSp(24), color: MyColours.color_199095),
decoration: getIndexBarDecoration(Colors.transparent),
downDecoration: getIndexBarDecoration(Colors.transparent),
fontSize: ScreenUtil().setSp(20), color: MyColours.color_999999),
// downTextStyle: TextStyle(
// fontSize: ScreenUtil().setSp(20), color: MyColours.color_438E93),
selectTextStyle: TextStyle(
fontSize: ScreenUtil().setSp(20), color: MyColours.color_438E93),
selectItemDecoration: BoxDecoration(color: Colors.transparent),
decoration: getIndexBarDecoration(MyColours.color_80D9D9D9),
downDecoration: getIndexBarDecoration(MyColours.color_80D9D9D9),
),
);
}
... ...
... ... @@ -47,9 +47,13 @@ class _MyCustomerDetailEditPageState extends State<MyCustomerDetailEditPage> {
CustomerProvider customerProvider;
String labelShow = '';
ScrollController scrollController = ScrollController();
List<String> memberList = [];
int memberIndex;
String memberShow = '';
@override
void initState() {
super.initState();
memberList = ['是', '否'];
_initSexList();
nameFocus.addListener(() {
if (nameFocus.hasFocus) {
... ... @@ -491,6 +495,70 @@ class _MyCustomerDetailEditPageState extends State<MyCustomerDetailEditPage> {
],
),
),
InkWell(
onTap: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //隐藏键盘
DialogUtil.showSelectCusmanDialog(
context, memberList, (value) {
if (value != null) {
setState(() {
memberIndex = value.first;
memberShow = memberList[memberIndex];
});
}
},
selecteds: memberIndex == null
? []
: [memberIndex])
.then((value) {});
},
child: Container(
// height: ScreenUtil().setWidth(60),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(50)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: Color.fromRGBO(
220, 220, 220, 1)))),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
// color: Colors.red,
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setWidth(35),
child: Text(
'会员',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_333333),
),
),
Expanded(
child: Text(
memberShow,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(28),
),
)),
HEmptyView(10),
Image.asset(
Utils.getImgPath(showLabel
? 'c_arrow_up'
: 'c_arrow_down'),
width: ScreenUtil().setWidth(24),
// height: ScreenUtil().setWidth(10),
)
],
),
)),
_textfieldWidget(
'电话', '填写电话', phoneController, phoneFocus),
_textfieldWidget(
... ...
... ... @@ -17,6 +17,8 @@ import 'package:one_key/widgets/round_button.dart';
import 'package:one_key/widgets/system_app_bar.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
import '../../../../utils/screen_util.dart';
/**
*
* 我的客户详情
... ... @@ -276,6 +278,332 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
));
}
///修改后widget
Widget _headNewItem() {
return Stack(
alignment: Alignment.centerRight,
children: [
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.only(
left: w(20), right: w(20 + 72), bottom: w(12), top: w(12)),
child: Wrap(
children: [
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Row(
children: [
Container(
constraints: BoxConstraints(
maxWidth: ScreenUtil().setWidth(260)),
child: Text(
customerProvider.guestInfoSunModel.guest.rnameStr,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(36)),
)),
HEmptyView(10),
Container(
child: Text(
customerProvider.guestInfoSunModel.guest.sexStr != ''
? '${customerProvider.guestInfoSunModel.guest.sexStr}'
: '',
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(20),
),
)),
HEmptyView(6),
Text(
customerProvider.guestInfoSunModel.guest.phone,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(20),
),
)
],
),
VEmptyView(20),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
if (customerProvider.guestInfoSunModel.guest.attr != null &&
customerProvider.guestInfoSunModel.guest.attr != '')
Container(
width: w(30),
height: w(16),
alignment: Alignment.center,
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(10),
// vertical: ScreenUtil().setWidth(2),
// ),
decoration: BoxDecoration(
color: customerProvider
.guestInfoSunModel.guest.attr !=
null &&
customerProvider
.guestInfoSunModel.guest.attr !=
''
? customerProvider
.guestInfoSunModel.guest.attr ==
'沉睡'
? MyColours.color_999999
: customerProvider
.guestInfoSunModel.guest.attr ==
'活跃'
? MyColours.color_00715F
: customerProvider.guestInfoSunModel
.guest.attr ==
'流失'
? MyColours.color_E34D59
: Color.fromRGBO(239, 143, 49, 1)
: Colors.transparent,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10),
),
),
child: Text(
customerProvider.guestInfoSunModel.guest.attr,
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(20)))),
if (customerProvider.guestInfoSunModel.guest.label != null)
flatBtn(customerProvider.guestInfoSunModel.guest.label,
MyColours.color_B39437),
if (customerProvider.guestInfoSunModel.guest.isMember ==
'1')
flatBtn('会员', MyColours.color_438E93),
if (true) flatBtn('存酒14天', MyColours.color_438E93)
],
),
VEmptyView(20),
// Text(
// customerProvider.guestInfoSunModel.guest.nickName == null
// ? '经理:未指派'
// : '经理:${customerProvider.guestInfoSunModel.guest.nickName}',
// style: TextStyle(
// color: MyColours.color_515151,
// fontSize: ScreenUtil().setSp(24)),
// ),
// VEmptyView(20),
Row(
children: [
Text(
'已创建 ',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(24)),
),
Text(
'${customerProvider.guestInfoSunModel.count.createTime}',
style: TextStyle(
color: MyColours.color_438E93,
fontSize: ScreenUtil().setSp(24),
),
strutStyle: StrutStyle(
forceStrutHeight: true, height: 1, leading: 0.3),
),
Text(
' 天 | 累计 ',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(24)),
),
Text(
'${customerProvider.guestInfoSunModel.count.leiji}',
style: TextStyle(
color: MyColours.color_438E93,
fontSize: ScreenUtil().setSp(24),
),
strutStyle: StrutStyle(
forceStrutHeight: true, height: 1, leading: 0.3),
),
Text(
' 单 | 取消 ',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(24)),
),
Text(
'${customerProvider.guestInfoSunModel.count.quxiao}',
style: TextStyle(
color: MyColours.color_438E93,
fontSize: ScreenUtil().setSp(24),
),
strutStyle: StrutStyle(
forceStrutHeight: true, height: 1, leading: 0.3),
),
Text(
' 单',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(24)),
),
],
),
VEmptyView(20),
Wrap(
children: [
Text(
Utils.formatFromMill(
customerProvider.guestInfoSunModel.last.ddate),
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_E34D59),
),
Text(
customerProvider.guestInfoSunModel.last.ddateSoltStr,
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_438E93),
),
Text(
' 桌位',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_515151),
),
Text(
customerProvider.guestInfoSunModel.last.tableinfoName,
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_438E93),
),
Text(
' 人数',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_515151),
),
Text(
customerProvider.guestInfoSunModel.last.actualPum == null
? '未记录'
: customerProvider.guestInfoSunModel.last.actualPum,
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_438E93),
),
Text(
' 消费',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_515151),
),
Text(
customerProvider.guestInfoSunModel.last.conAmount == null
? '未记录'
: customerProvider.guestInfoSunModel.last.conAmount,
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_438E93),
),
Text(
' 预订',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_515151),
),
Text(
'${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? ''} ${customerProvider.guestInfoSunModel.last.sellerUserPhone ?? ''}',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_438E93),
)
],
),
]),
],
),
),
Positioned(
right: w(20),
child: Column(
children: [
RoundButton(
text: '编辑',
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
textColor: MyColours.color_438E93,
borderColor: MyColours.color_438E93,
width: w(72),
radius: r(11),
fontSize: 24,
isBold: true,
height: w(22),
onPressed: () {
NavigatorUtil.goMyCustomerDetailEditPage(
context,
customerProvider.guestInfoSunModel.guest,
widget.fromPage);
},
),
VEmptyView(20),
RoundButton(
text: '拨打电话',
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
textColor: MyColours.color_438E93,
borderColor: MyColours.color_438E93,
width: w(72),
radius: r(11),
fontSize: 24,
isBold: true,
height: w(22),
onPressed: () {
DialogUtil.goPhone(
customerProvider.guestInfoSunModel.guest.phone);
},
),
VEmptyView(20),
RoundButton(
text: '预订历史',
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
textColor: MyColours.color_438E93,
borderColor: MyColours.color_438E93,
width: w(72),
radius: r(11),
fontSize: 24,
isBold: true,
height: w(22),
onPressed: () {
NavigatorUtil.goMyCustomerOrderPage(
context,
customerProvider.guestInfoSunModel.guest.id,
customerProvider.guestInfoSunModel.guest.phone);
},
)
],
))
],
);
}
Widget flatBtn(String tilte, Color color) {
return Container(
height: w(18),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: w(4)),
margin: EdgeInsets.only(left: w(10)),
decoration: BoxDecoration(
border: Border.all(color: color, width: w(1)),
borderRadius: BorderRadius.circular(r(5))),
child: Text(
tilte,
style: TextStyle(fontSize: font(10), color: color),
),
);
}
@override
Widget build(BuildContext context) {
customerProvider = Provider.of<CustomerProvider>(context, listen: true);
... ... @@ -313,145 +641,146 @@ class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
height: ScreenUtil().setWidth(20),
color: MyColours.color_ffffff,
),
_headerWidget(),
VEmptyView(20),
Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(20)),
decoration: BoxDecoration(
color: MyColours.color_199095,
borderRadius: BorderRadius.only(
topRight:
Radius.circular(ScreenUtil().setWidth(20)),
topLeft:
Radius.circular(ScreenUtil().setWidth(20)))),
child: Row(
children: [
Expanded(
child: Text(
'已创建 ${customerProvider.guestInfoSunModel.count.createTime} 天 | 累计 ${customerProvider.guestInfoSunModel.count.leiji} 单 | 取消 ${customerProvider.guestInfoSunModel.count.quxiao} 单',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(30)),
)),
InkWell(
onTap: () {
NavigatorUtil.goMyCustomerOrderPage(
context,
customerProvider.guestInfoSunModel.guest.id,
customerProvider
.guestInfoSunModel.guest.phone);
},
child: Text('更多',
style: TextStyle(
decoration: TextDecoration.underline,
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(26)))),
],
),
),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
vertical: ScreenUtil().setWidth(20)),
child: Column(
children: [
Wrap(
children: [
Text(
'最近一次:',
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_333333),
),
Text(
Utils.formatFromMill(customerProvider
.guestInfoSunModel.last.ddate),
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: Color.fromRGBO(208, 31, 37, 1)),
),
Text(
customerProvider
.guestInfoSunModel.last.ddateSoltStr,
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_199095),
),
Text(
' 桌位:',
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_333333),
),
Text(
customerProvider
.guestInfoSunModel.last.tableinfoName,
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_199095),
),
Text(
' 人数:',
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_333333),
),
Text(
customerProvider
.guestInfoSunModel.last.actualPum ==
null
? '未记录'
: customerProvider
.guestInfoSunModel.last.actualPum,
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_199095),
),
Text(
' 消费:',
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_333333),
),
Text(
customerProvider
.guestInfoSunModel.last.conAmount ==
null
? '未记录'
: customerProvider
.guestInfoSunModel.last.conAmount,
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_199095),
)
],
),
VEmptyView(6),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'客户经理:',
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_333333),
),
Text(
'${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? customerProvider.guestInfoSunModel.last.account} ${customerProvider.guestInfoSunModel.last.sellerUserPhone}',
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_199095),
)
],
)
],
),
),
// _headerWidget(),
// VEmptyView(20),
// Container(
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(40),
// vertical: ScreenUtil().setWidth(20)),
// decoration: BoxDecoration(
// color: MyColours.color_199095,
// borderRadius: BorderRadius.only(
// topRight:
// Radius.circular(ScreenUtil().setWidth(20)),
// topLeft:
// Radius.circular(ScreenUtil().setWidth(20)))),
// child: Row(
// children: [
// Expanded(
// child: Text(
// '已创建 ${customerProvider.guestInfoSunModel.count.createTime} 天 | 累计 ${customerProvider.guestInfoSunModel.count.leiji} 单 | 取消 ${customerProvider.guestInfoSunModel.count.quxiao} 单',
// overflow: TextOverflow.ellipsis,
// style: TextStyle(
// color: MyColours.color_ffffff,
// fontSize: ScreenUtil().setSp(30)),
// )),
// InkWell(
// onTap: () {
// NavigatorUtil.goMyCustomerOrderPage(
// context,
// customerProvider.guestInfoSunModel.guest.id,
// customerProvider
// .guestInfoSunModel.guest.phone);
// },
// child: Text('更多',
// style: TextStyle(
// decoration: TextDecoration.underline,
// color: MyColours.color_ffffff,
// fontSize: ScreenUtil().setSp(26)))),
// ],
// ),
// ),
// Container(
// color: MyColours.color_ffffff,
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(20),
// vertical: ScreenUtil().setWidth(20)),
// child: Column(
// children: [
// Wrap(
// children: [
// Text(
// '最近一次:',
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_333333),
// ),
// Text(
// Utils.formatFromMill(customerProvider
// .guestInfoSunModel.last.ddate),
// overflow: TextOverflow.ellipsis,
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: Color.fromRGBO(208, 31, 37, 1)),
// ),
// Text(
// customerProvider
// .guestInfoSunModel.last.ddateSoltStr,
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_199095),
// ),
// Text(
// ' 桌位:',
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_333333),
// ),
// Text(
// customerProvider
// .guestInfoSunModel.last.tableinfoName,
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_199095),
// ),
// Text(
// ' 人数:',
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_333333),
// ),
// Text(
// customerProvider
// .guestInfoSunModel.last.actualPum ==
// null
// ? '未记录'
// : customerProvider
// .guestInfoSunModel.last.actualPum,
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_199095),
// ),
// Text(
// ' 消费:',
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_333333),
// ),
// Text(
// customerProvider
// .guestInfoSunModel.last.conAmount ==
// null
// ? '未记录'
// : customerProvider
// .guestInfoSunModel.last.conAmount,
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_199095),
// )
// ],
// ),
// VEmptyView(6),
// Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Text(
// '客户经理:',
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_333333),
// ),
// Text(
// '${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? customerProvider.guestInfoSunModel.last.account} ${customerProvider.guestInfoSunModel.last.sellerUserPhone}',
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_199095),
// )
// ],
// )
// ],
// ),
// ),
_headNewItem(),
VEmptyView(20),
_lineItemWidget('工作单位',
'${customerProvider.guestInfoSunModel.guest.company == null ? '' : customerProvider.guestInfoSunModel.guest.company} ${customerProvider.guestInfoSunModel.guest.section == null ? '' : customerProvider.guestInfoSunModel.guest.section} ${customerProvider.guestInfoSunModel.guest.position == null ? '' : customerProvider.guestInfoSunModel.guest.position}'),
... ...
... ... @@ -9,7 +9,10 @@ import 'package:one_key/provider/customer_provider.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/route/navigator_util.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/common_button.dart';
import 'package:one_key/widgets/common_button_flat.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/round_button.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import '../../../../utils/screen_util.dart';
... ... @@ -76,16 +79,17 @@ class _ContactListPageState extends State<ContactListPage> {
Widget _buildSusWidget(String susTag) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
horizontal: ScreenUtil().setWidth(30),
vertical: ScreenUtil().setWidth(10)),
// height: susItemHeight,
// margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(20)),
width: double.infinity,
color: Color.fromRGBO(239, 239, 239, 1),
width: ScreenUtil().screenWidth,
color: MyColours.color_efefef,
alignment: Alignment.centerLeft,
child: Text(
'$susTag',
style: TextStyle(fontSize: ScreenUtil().setWidth(28)),
style: TextStyle(
color: MyColours.color_515151, fontSize: ScreenUtil().setWidth(24)),
),
);
}
... ... @@ -168,12 +172,11 @@ class _ContactListPageState extends State<ContactListPage> {
decoration: BoxDecoration(
color: model.attr != null && model.attr != ''
? model.attr == '沉睡'
? Color.fromRGBO(223, 33, 81, 1)
? MyColours.color_999999
: model.attr == '活跃'
? Color.fromRGBO(81, 170, 94, 1)
? MyColours.color_00715F
: model.attr == '流失'
? Color.fromRGBO(
109, 101, 248, 1)
? MyColours.color_E34D59
: Color.fromRGBO(
239, 143, 49, 1)
: Colors.transparent,
... ... @@ -348,6 +351,249 @@ class _ContactListPageState extends State<ContactListPage> {
);
}
Widget flatBtn(String tilte, Color color) {
return Container(
height: w(18),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: w(4)),
margin: EdgeInsets.only(left: w(10)),
decoration: BoxDecoration(
border: Border.all(color: color, width: w(1)),
borderRadius: BorderRadius.circular(r(5))),
child: Text(
tilte,
style: TextStyle(fontSize: font(10), color: color),
),
);
}
///改版item样式
Widget _buildListNewItem(CustomerBySellerSunModel model, int index) {
String susTag = model.getSuspensionTag();
return
// Column(
// children: <Widget>[
// Offstage(
// offstage: model.isShowSuspension != true,
// child: _buildSusWidget(susTag),
// ),
// model.isShowSuspension ? VEmptyView(20) : SizedBox(),
Stack(
alignment: Alignment.centerLeft,
children: [
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (model.gid != null &&
widget.fromPage != FromPage.FromPageShowCutomerList) {
NavigatorUtil.goCustomerDetailPage(
context, model, widget.fromPage);
}
},
child: Container(
margin: EdgeInsets.only(
left: ScreenUtil().setWidth(40),
right: ScreenUtil().setWidth(32),
bottom: ScreenUtil().setWidth(6),
top: model.isShowSuspension ? 0 : ScreenUtil().setWidth(6)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(r(8)),
boxShadow: [
BoxShadow(
offset: Offset(0, w(4)),
color: MyColours.color_40000000,
blurRadius: ScreenUtil().setWidth(8))
]),
child: Column(
children: [
Container(
height: w(35),
padding: EdgeInsets.symmetric(horizontal: w(15)),
decoration: BoxDecoration(
color: MyColours.color_F8F9FD,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(r(8)),
topRight: Radius.circular(r(8))),
),
child: Row(
children: [
model.rnameStr != null && model.rnameStr != ''
? Row(
// crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
width: w(72),
child: Text(
model.rnameStr,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(36),
fontWeight: FontWeight.bold),
)),
HEmptyView(10),
Text(
model.sexStr != '' && model.sexStr != null
? '${model.sexStr}'
: '',
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(20),
),
),
HEmptyView(10),
],
)
: SizedBox(),
HEmptyView(74),
Container(
width: w(70),
child: Text(
Utils.starPhone('${model.phone}'),
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
),
),
HEmptyView(20),
model.nickName == null
? SizedBox()
: Text(
'经理:${model.nickName}',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
)
],
),
),
Padding(
padding: EdgeInsets.all(w(15)),
child: Row(
children: [
Container(
width: w(30),
height: w(16),
alignment: Alignment.center,
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(10),
// vertical: ScreenUtil().setWidth(2),
// ),
decoration: BoxDecoration(
color: model.attr != null && model.attr != ''
?model.attr == '沉睡'
? MyColours.color_999999
: model.attr == '活跃'
? MyColours.color_00715F
: model.attr == '流失'
? MyColours.color_E34D59
: Color.fromRGBO(
239, 143, 49, 1)
: Colors.transparent,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10),
),
),
child: Text(
model.attr == null || model.attr == ''
? ''
: model.attr,
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(20)))),
model.label != null
? flatBtn(model.label, MyColours.color_B39437)
: SizedBox(),
model.isMember == '1'
? flatBtn('会员', MyColours.color_438E93)
: SizedBox(),
true
? flatBtn('存酒14天', MyColours.color_438E93)
: SizedBox()
],
)),
Padding(
padding: EdgeInsets.only(
left: w(15), right: w(15), bottom: w(10)),
child: Row(
children: [
Text(
Utils.formatFromYmd(model.ddate),
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
),
HEmptyView(10),
Text(
model.ddateSolt != null ? model.ddateSolt : '',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
),
model.monthCount == '0' || model.monthCount == null
? SizedBox()
: HEmptyView(10),
model.monthCount == '0' || model.monthCount == null
? SizedBox()
: Text(
'30天内${model.monthCount}单',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
),
HEmptyView(10),
Text(
'累计${model.leiji}单',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(20),
),
),
],
))
],
),
)),
widget.fromPage == FromPage.FromPageShowCutomerList
? SizedBox()
: Positioned(
left: ScreenUtil().setWidth(20),
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (model.gid != null) {
List<CustomerBySellerSunModel> data =
widget.provider.customerBySellerList;
data[index].select = !data[index].select;
if (data[index].select) {
widget.provider.addData(index);
} else {
widget.provider.cancelData(index);
}
widget.provider.getCheckValue();
}
},
child: Image.asset(
Utils.getImgPath(
model.select ? 'c_mul_select' : 'c_not_edit'),
width: ScreenUtil().setWidth(40),
))),
],
)
// ],
// )
;
}
Decoration getIndexBarDecoration(Color color) {
return BoxDecoration(
color: color,
... ... @@ -364,30 +610,53 @@ class _ContactListPageState extends State<ContactListPage> {
itemBuilder: (BuildContext context, int index) {
// if (index == 0) return _buildHeader();
CustomerBySellerSunModel model = widget.contacts[index];
return _buildListItem(model, index);
return _buildListNewItem(model, index);
},
physics: BouncingScrollPhysics(),
indexBarData: SuspensionUtil.getTagIndexList(widget.contacts),
indexBarAlignment: Alignment.centerRight,
// susItemBuilder: (context, index) {
// return Container(
// child: Text('ffsfgs'),
// );
// },
susItemBuilder: (context, index) {
CustomerBySellerSunModel model = widget.contacts[index];
String susTag = model.getSuspensionTag();
return _buildSusWidget(susTag);
},
indexHintBuilder: (context, hint) {
return Container(
alignment: Alignment.center,
width: ScreenUtil().setWidth(120),
height: ScreenUtil().setWidth(120),
decoration: BoxDecoration(
color: Color.fromRGBO(239, 239, 239, 1),
color: MyColours.color_80D9D9D9,
shape: BoxShape.circle,
),
child:
Text(hint, style: TextStyle(color: Colors.white, fontSize: 30.0)),
child: Text(hint,
style:
TextStyle(color: MyColours.color_438E93, fontSize: font(30))),
);
},
indexBarMargin: EdgeInsets.all(10),
indexBarOptions: IndexBarOptions(
needRebuild: true,
hapticFeedback: true,
ignoreDragCancel: true,
indexHintAlignment: Alignment.centerRight,
textStyle: TextStyle(
fontSize: ScreenUtil().setSp(24), color: MyColours.color_199095),
decoration: getIndexBarDecoration(Colors.transparent),
downDecoration: getIndexBarDecoration(Colors.transparent),
fontSize: ScreenUtil().setSp(20), color: MyColours.color_999999),
// downTextStyle: TextStyle(
// fontSize: ScreenUtil().setSp(20), color: MyColours.color_438E93),
selectTextStyle: TextStyle(
fontSize: ScreenUtil().setSp(20), color: MyColours.color_438E93),
selectItemDecoration: BoxDecoration(color: Colors.transparent),
decoration: getIndexBarDecoration(MyColours.color_80D9D9D9),
downDecoration: getIndexBarDecoration(MyColours.color_80D9D9D9),
),
);
}
... ...
... ... @@ -48,10 +48,14 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> {
CustomerProvider customerProvider;
String labelShow = '';
String manageShow = '';
String memberShow = '';
ScrollController scrollController = ScrollController();
List<String> memberList = [];
int memberIndex;
@override
void initState() {
super.initState();
memberList = ['是', '否'];
_initSexList();
nameFocus.addListener(() {
if (nameFocus.hasFocus) {
... ... @@ -506,6 +510,70 @@ class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> {
],
),
),
InkWell(
onTap: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //隐藏键盘
DialogUtil.showSelectCusmanDialog(
context, memberList, (value) {
if (value != null) {
setState(() {
memberIndex = value.first;
memberShow = memberList[memberIndex];
});
}
},
selecteds: memberIndex == null
? []
: [memberIndex])
.then((value) {});
},
child: Container(
// height: ScreenUtil().setWidth(60),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(50)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: Color.fromRGBO(
220, 220, 220, 1)))),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
// color: Colors.red,
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setWidth(35),
child: Text(
'会员',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_333333),
),
),
Expanded(
child: Text(
memberShow,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(28),
),
)),
HEmptyView(10),
Image.asset(
Utils.getImgPath(showLabel
? 'c_arrow_up'
: 'c_arrow_down'),
width: ScreenUtil().setWidth(24),
// height: ScreenUtil().setWidth(10),
)
],
),
)),
_textfieldWidget(
'电话', '填写电话', phoneController, phoneFocus),
_textfieldWidget(
... ...
... ... @@ -18,6 +18,8 @@ import 'package:one_key/widgets/system_app_bar.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
import '../../../../utils/screen_util.dart';
class CustomerDetailPage extends StatefulWidget {
final CustomerBySellerSunModel userHistoryEntity;
final FromPage fromPage;
... ... @@ -293,6 +295,332 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
));
}
///修改后widget
Widget _headNewItem() {
return Stack(
alignment: Alignment.centerRight,
children: [
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.only(
left: w(20), right: w(20 + 72), bottom: w(12), top: w(12)),
child: Wrap(
children: [
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Row(
children: [
Container(
constraints: BoxConstraints(
maxWidth: ScreenUtil().setWidth(260)),
child: Text(
customerProvider.guestInfoSunModel.guest.rnameStr,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(36)),
)),
HEmptyView(10),
Container(
child: Text(
customerProvider.guestInfoSunModel.guest.sexStr != ''
? '${customerProvider.guestInfoSunModel.guest.sexStr}'
: '',
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(20),
),
)),
HEmptyView(6),
Text(
customerProvider.guestInfoSunModel.guest.phone,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(20),
),
)
],
),
VEmptyView(20),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
if (customerProvider.guestInfoSunModel.guest.attr != null &&
customerProvider.guestInfoSunModel.guest.attr != '')
Container(
width: w(30),
height: w(16),
alignment: Alignment.center,
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(10),
// vertical: ScreenUtil().setWidth(2),
// ),
decoration: BoxDecoration(
color: customerProvider
.guestInfoSunModel.guest.attr !=
null &&
customerProvider
.guestInfoSunModel.guest.attr !=
''
? customerProvider
.guestInfoSunModel.guest.attr ==
'沉睡'
? MyColours.color_999999
: customerProvider
.guestInfoSunModel.guest.attr ==
'活跃'
? MyColours.color_00715F
: customerProvider.guestInfoSunModel
.guest.attr ==
'流失'
? MyColours.color_E34D59
: Color.fromRGBO(239, 143, 49, 1)
: Colors.transparent,
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10),
),
),
child: Text(
customerProvider.guestInfoSunModel.guest.attr,
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(20)))),
if (customerProvider.guestInfoSunModel.guest.label != null)
flatBtn(customerProvider.guestInfoSunModel.guest.label,
MyColours.color_B39437),
if (customerProvider.guestInfoSunModel.guest.isMember ==
'1')
flatBtn('会员', MyColours.color_438E93),
if (true) flatBtn('存酒14天', MyColours.color_438E93)
],
),
VEmptyView(20),
Text(
customerProvider.guestInfoSunModel.guest.nickName == null
? '经理:未指派'
: '经理:${customerProvider.guestInfoSunModel.guest.nickName}',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(24)),
),
VEmptyView(20),
Row(
children: [
Text(
'已创建 ',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(24)),
),
Text(
'${customerProvider.guestInfoSunModel.count.createTime}',
style: TextStyle(
color: MyColours.color_438E93,
fontSize: ScreenUtil().setSp(24),
),
strutStyle: StrutStyle(
forceStrutHeight: true, height: 1, leading: 0.3),
),
Text(
' 天 | 累计 ',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(24)),
),
Text(
'${customerProvider.guestInfoSunModel.count.leiji}',
style: TextStyle(
color: MyColours.color_438E93,
fontSize: ScreenUtil().setSp(24),
),
strutStyle: StrutStyle(
forceStrutHeight: true, height: 1, leading: 0.3),
),
Text(
' 单 | 取消 ',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(24)),
),
Text(
'${customerProvider.guestInfoSunModel.count.quxiao}',
style: TextStyle(
color: MyColours.color_438E93,
fontSize: ScreenUtil().setSp(24),
),
strutStyle: StrutStyle(
forceStrutHeight: true, height: 1, leading: 0.3),
),
Text(
' 单',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(24)),
),
],
),
VEmptyView(20),
Wrap(
children: [
Text(
Utils.formatFromMill(
customerProvider.guestInfoSunModel.last.ddate),
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_E34D59),
),
Text(
customerProvider.guestInfoSunModel.last.ddateSoltStr,
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_438E93),
),
Text(
' 桌位',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_515151),
),
Text(
customerProvider.guestInfoSunModel.last.tableinfoName,
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_438E93),
),
Text(
' 人数',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_515151),
),
Text(
customerProvider.guestInfoSunModel.last.actualPum == null
? '未记录'
: customerProvider.guestInfoSunModel.last.actualPum,
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_438E93),
),
Text(
' 消费',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_515151),
),
Text(
customerProvider.guestInfoSunModel.last.conAmount == null
? '未记录'
: customerProvider.guestInfoSunModel.last.conAmount,
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_438E93),
),
Text(
' 预订',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_515151),
),
Text(
'${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? ''} ${customerProvider.guestInfoSunModel.last.sellerUserPhone ?? ''}',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: MyColours.color_438E93),
)
],
),
]),
],
),
),
Positioned(
right: w(20),
child: Column(
children: [
RoundButton(
text: '编辑',
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
textColor: MyColours.color_438E93,
borderColor: MyColours.color_438E93,
width: w(72),
radius: r(11),
fontSize: 24,
isBold: true,
height: w(22),
onPressed: () {
NavigatorUtil.goCustomerDetailEditPage(
context,
customerProvider.guestInfoSunModel.guest,
widget.fromPage);
},
),
VEmptyView(20),
RoundButton(
text: '拨打电话',
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
textColor: MyColours.color_438E93,
borderColor: MyColours.color_438E93,
width: w(72),
radius: r(11),
fontSize: 24,
isBold: true,
height: w(22),
onPressed: () {
DialogUtil.goPhone(
customerProvider.guestInfoSunModel.guest.phone);
},
),
VEmptyView(20),
RoundButton(
text: '预订历史',
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
textColor: MyColours.color_438E93,
borderColor: MyColours.color_438E93,
width: w(72),
radius: r(11),
fontSize: 24,
isBold: true,
height: w(22),
onPressed: () {
NavigatorUtil.goCustomerOrderPage(
context,
customerProvider.guestInfoSunModel.guest.id,
customerProvider.guestInfoSunModel.guest.phone);
},
)
],
))
],
);
}
Widget flatBtn(String tilte, Color color) {
return Container(
height: w(18),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(horizontal: w(4)),
margin: EdgeInsets.only(left: w(10)),
decoration: BoxDecoration(
border: Border.all(color: color, width: w(1)),
borderRadius: BorderRadius.circular(r(5))),
child: Text(
tilte,
style: TextStyle(fontSize: font(10), color: color),
),
);
}
@override
Widget build(BuildContext context) {
customerProvider = Provider.of<CustomerProvider>(context, listen: true);
... ... @@ -330,145 +658,146 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> {
height: ScreenUtil().setWidth(20),
color: MyColours.color_ffffff,
),
_headerWidget(),
VEmptyView(20),
Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(20)),
decoration: BoxDecoration(
color: MyColours.color_199095,
borderRadius: BorderRadius.only(
topRight:
Radius.circular(ScreenUtil().setWidth(20)),
topLeft:
Radius.circular(ScreenUtil().setWidth(20)))),
child: Row(
children: [
Expanded(
child: Text(
'已创建 ${customerProvider.guestInfoSunModel.count.createTime} 天 | 累计 ${customerProvider.guestInfoSunModel.count.leiji} 单 | 取消 ${customerProvider.guestInfoSunModel.count.quxiao} 单',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(30)),
)),
InkWell(
onTap: () {
NavigatorUtil.goCustomerOrderPage(
context,
customerProvider.guestInfoSunModel.guest.id,
customerProvider
.guestInfoSunModel.guest.phone);
},
child: Text('更多',
style: TextStyle(
decoration: TextDecoration.underline,
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(26)))),
],
),
),
Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(20),
vertical: ScreenUtil().setWidth(20)),
child: Column(
children: [
Wrap(
children: [
Text(
'最近一次:',
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_333333),
),
Text(
Utils.formatFromMill(customerProvider
.guestInfoSunModel.last.ddate),
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: Color.fromRGBO(208, 31, 37, 1)),
),
Text(
customerProvider
.guestInfoSunModel.last.ddateSoltStr,
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_199095),
),
Text(
' 桌位:',
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_333333),
),
Text(
customerProvider
.guestInfoSunModel.last.tableinfoName,
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_199095),
),
Text(
' 人数:',
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_333333),
),
Text(
customerProvider
.guestInfoSunModel.last.actualPum ==
null
? '未记录'
: customerProvider
.guestInfoSunModel.last.actualPum,
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_199095),
),
Text(
' 消费:',
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_333333),
),
Text(
customerProvider
.guestInfoSunModel.last.conAmount ==
null
? '未记录'
: customerProvider
.guestInfoSunModel.last.conAmount,
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_199095),
)
],
),
VEmptyView(6),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'客户经理:',
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_333333),
),
Text(
'${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? ''} ${customerProvider.guestInfoSunModel.last.sellerUserPhone ?? ''}',
style: TextStyle(
fontSize: ScreenUtil().setSp(24),
color: MyColours.color_199095),
)
],
)
],
),
),
// _headerWidget(),
// VEmptyView(20),
// Container(
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(40),
// vertical: ScreenUtil().setWidth(20)),
// decoration: BoxDecoration(
// color: MyColours.color_199095,
// borderRadius: BorderRadius.only(
// topRight:
// Radius.circular(ScreenUtil().setWidth(20)),
// topLeft:
// Radius.circular(ScreenUtil().setWidth(20)))),
// child: Row(
// children: [
// Expanded(
// child: Text(
// '已创建 ${customerProvider.guestInfoSunModel.count.createTime} 天 | 累计 ${customerProvider.guestInfoSunModel.count.leiji} 单 | 取消 ${customerProvider.guestInfoSunModel.count.quxiao} 单',
// overflow: TextOverflow.ellipsis,
// style: TextStyle(
// color: MyColours.color_ffffff,
// fontSize: ScreenUtil().setSp(30)),
// )),
// InkWell(
// onTap: () {
// NavigatorUtil.goCustomerOrderPage(
// context,
// customerProvider.guestInfoSunModel.guest.id,
// customerProvider
// .guestInfoSunModel.guest.phone);
// },
// child: Text('更多',
// style: TextStyle(
// decoration: TextDecoration.underline,
// color: MyColours.color_ffffff,
// fontSize: ScreenUtil().setSp(26)))),
// ],
// ),
// ),
// Container(
// color: MyColours.color_ffffff,
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(20),
// vertical: ScreenUtil().setWidth(20)),
// child: Column(
// children: [
// Wrap(
// children: [
// Text(
// '最近一次:',
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_333333),
// ),
// Text(
// Utils.formatFromMill(customerProvider
// .guestInfoSunModel.last.ddate),
// overflow: TextOverflow.ellipsis,
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: Color.fromRGBO(208, 31, 37, 1)),
// ),
// Text(
// customerProvider
// .guestInfoSunModel.last.ddateSoltStr,
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_199095),
// ),
// Text(
// ' 桌位:',
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_333333),
// ),
// Text(
// customerProvider
// .guestInfoSunModel.last.tableinfoName,
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_199095),
// ),
// Text(
// ' 人数:',
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_333333),
// ),
// Text(
// customerProvider
// .guestInfoSunModel.last.actualPum ==
// null
// ? '未记录'
// : customerProvider
// .guestInfoSunModel.last.actualPum,
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_199095),
// ),
// Text(
// ' 消费:',
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_333333),
// ),
// Text(
// customerProvider
// .guestInfoSunModel.last.conAmount ==
// null
// ? '未记录'
// : customerProvider
// .guestInfoSunModel.last.conAmount,
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_199095),
// )
// ],
// ),
// VEmptyView(6),
// Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Text(
// '客户经理:',
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_333333),
// ),
// Text(
// '${customerProvider.guestInfoSunModel.last.sellerUserNickName ?? ''} ${customerProvider.guestInfoSunModel.last.sellerUserPhone ?? ''}',
// style: TextStyle(
// fontSize: ScreenUtil().setSp(24),
// color: MyColours.color_199095),
// )
// ],
// )
// ],
// ),
// ),
_headNewItem(),
VEmptyView(20),
_lineItemWidget('工作单位',
'${customerProvider.guestInfoSunModel.guest.company == null ? '' : customerProvider.guestInfoSunModel.guest.company} ${customerProvider.guestInfoSunModel.guest.section == null ? '' : customerProvider.guestInfoSunModel.guest.section} ${customerProvider.guestInfoSunModel.guest.position == null ? '' : customerProvider.guestInfoSunModel.guest.position}'),
... ...
... ... @@ -1583,10 +1583,13 @@ class _CustomerListPageState extends State<CustomerListPage>
showMsg: "加载中,请稍后...",
);
} else {
return ContactListPage(
contacts: model.customerBySellerList,
provider: customerProvider,
fromPage: widget.fromPage);
return Container(
color: MyColours.color_f3f3f3,
child: ContactListPage(
contacts: model.customerBySellerList,
provider: customerProvider,
fromPage: widget.fromPage),
);
}
}));
}
... ...
import 'package:flutter/material.dart';
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/models/customer_label_model.dart';
import 'package:one_key/provider/customer_provider.dart';
... ... @@ -6,10 +7,14 @@ import 'package:one_key/provider/user_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/dialog_util.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/MyDivider.dart';
import 'package:one_key/widgets/system_app_bar.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
import '../../../../utils/screen_util.dart';
import '../../../../widgets/h_empty_view.dart';
class CustomerSettingPage extends StatefulWidget {
CustomerSettingPage({Key key}) : super(key: key);
... ... @@ -20,6 +25,10 @@ class CustomerSettingPage extends StatefulWidget {
class _CustomerSettingPageState extends State<CustomerSettingPage> {
bool swichState = false;
CustomerProvider customerProvider;
bool swichSync = false; //会员系统同步
String memberShow = '';
bool showLabel = false;
@override
void initState() {
... ... @@ -109,12 +118,16 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> {
});
},
child: Container(
height: ScreenUtil().setWidth(40),
// height: ScreenUtil().setWidth(40),
padding: EdgeInsets.symmetric(horizontal: w(6), vertical: w(3)),
decoration: BoxDecoration(
border: Border.all(width: w(1), color: MyColours.color_A78E44),
borderRadius: BorderRadius.circular(r(5))),
child: Text(
item.label,
style: TextStyle(
color: Color.fromRGBO(193, 194, 63, 1),
fontSize: ScreenUtil().setSp(26),
color: MyColours.color_A78E44,
fontSize: ScreenUtil().setSp(22),
),
),
)));
... ... @@ -149,11 +162,62 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> {
return items;
}
Widget _itemWidget(String title, String hintText,
TextEditingController controller, FocusNode node) {
return Row(
children: [
Container(
width: w(112),
child: Text(
title,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(32)),
)),
HEmptyView(24),
Expanded(
child: Container(
height: w(30),
padding: EdgeInsets.symmetric(horizontal: w(10)),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(5)),
border:
Border.all(color: MyColours.color_DBDBDB, width: w(1)),
),
child: TextField(
controller: controller,
focusNode: node,
// autofocus: _sellerCodeController.text.isEmpty,
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(24),
),
textAlignVertical: TextAlignVertical.top,
decoration: InputDecoration(
hintText: hintText,
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(24),
),
contentPadding: EdgeInsets.zero,
border: OutlineInputBorder(borderSide: BorderSide.none),
),
onChanged: (_) {
// setActivate();
},
keyboardType: TextInputType.number,
))),
],
);
}
@override
Widget build(BuildContext context) {
customerProvider = Provider.of<CustomerProvider>(context, listen: true);
return Scaffold(
backgroundColor: Color.fromRGBO(246, 248, 250, 1),
return KeyboardDismissOnTap(
child: Scaffold(
backgroundColor: MyColours.color_ffffff,
appBar: SystemAppBar(
'客情设置',
onTap: () {
... ... @@ -165,47 +229,150 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> {
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(40)),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
InkWell(
onTap: () {
setState(() {
swichState = !swichState;
});
_sellerGuestSet();
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text('预订要求补录客人信息',
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(30))),
Image.asset(
swichState
? Utils.getImgPath('f_swich_on')
: Utils.getImgPath('f_swich_off'),
width: ScreenUtil().setWidth(70),
// height: ScreenUtil().setWidth(82),
),
],
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
InkWell(
onTap: () {
setState(() {
swichState = !swichState;
});
_sellerGuestSet();
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text('预订要求补录客人信息',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(32))),
Image.asset(
swichState
? Utils.getImgPath('f_swich_on')
: Utils.getImgPath('f_swich_off'),
width: ScreenUtil().setWidth(70),
// height: ScreenUtil().setWidth(82),
),
],
),
),
),
VEmptyView(50),
Text('店内自定义标签',
VEmptyView(20),
MyDivider(
double.infinity,
w(1),
color: MyColours.color_DBDBDB,
),
VEmptyView(48),
Text('店内自定义标签',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(32))),
VEmptyView(30),
Wrap(
spacing: ScreenUtil().setWidth(20),
runSpacing: ScreenUtil().setWidth(10),
children: _buildLabelItem(customerProvider.labelList)),
VEmptyView(34),
MyDivider(
double.infinity,
w(1),
color: MyColours.color_DBDBDB,
),
VEmptyView(52),
InkWell(
onTap: () {
setState(() {
swichSync = !swichSync;
});
// _sellerGuestSet();
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text('是否与会员系统同步',
style: TextStyle(
color: MyColours.color_515151,
fontSize: ScreenUtil().setSp(32))),
Image.asset(
swichSync
? Utils.getImgPath('f_swich_on')
: Utils.getImgPath('f_swich_off'),
width: ScreenUtil().setWidth(70),
// height: ScreenUtil().setWidth(82),
),
],
),
),
VEmptyView(48),
InkWell(
onTap: () {
FocusScope.of(context).requestFocus(FocusNode()); //隐藏键盘
// DialogUtil.showSelectCusmanDialog(context, memberList,
// (value) {
// if (value != null) {
// setState(() {
// memberIndex = value.first;
// memberShow = memberList[memberIndex];
// });
// }
// }, selecteds: memberIndex == null ? [] : [memberIndex])
// .then((value) {});
},
child: Container(
// height: ScreenUtil().setWidth(60),
padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(50)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
// color: Colors.red,
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setWidth(35),
child: Text(
'会员系统选择',
style: TextStyle(
fontSize: ScreenUtil().setSp(32),
color: MyColours.color_515151),
),
),
Expanded(
child: Text(
memberShow,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_353535,
fontSize: ScreenUtil().setSp(28),
),
)),
HEmptyView(10),
Image.asset(
Utils.getImgPath(
showLabel ? 'c_arrow_up' : 'c_arrow_down'),
width: ScreenUtil().setWidth(24),
// height: ScreenUtil().setWidth(10),
)
],
),
)),
_itemWidget('企业代码或账号', "点击这里输入企业代码或账号", null, null),
VEmptyView(50),
_itemWidget('管理员账号', "点击这里输入管理员账号", null, null),
VEmptyView(50),
_itemWidget('密码', "点击这里输入管理员密码", null, null),
VEmptyView(40),
Center(
child: Text(
'请与纳极客服400-000-9690 联系对接事宜',
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(30))),
VEmptyView(30),
Wrap(
spacing: ScreenUtil().setWidth(20),
runSpacing: ScreenUtil().setWidth(10),
children: _buildLabelItem(customerProvider.labelList)),
],
)),
color: MyColours.color_999999, fontSize: font(12)),
))
],
),
),
),
);
));
}
}
... ...
... ... @@ -2023,6 +2023,7 @@ class TableManagerPageState extends State<TableManagerPage> {
null,
null,
null,
null,
null);
if (widget.guest == null) {
guest.phone = _baseIndoProvider.phoneController.text
... ...
... ... @@ -68,6 +68,8 @@ class CustomerProvider extends ChangeNotifier {
MarketingByIdSunModel marketingByIdSunModel;
List<CustomerLabelSunModel> labelList = []; //标签数据
List<String> memberList = []; //会员数据
List<FilterBtnModel> sellerManageList = []; //经理数据 ---- 商家编辑页面
int labelSelIndex;
... ... @@ -328,7 +330,7 @@ class CustomerProvider extends ChangeNotifier {
pageState = PageState.ConnectivityTimeOut;
break;
default:
pageState = PageState.ConnectivityError;
pageState = PageState.ConnectivityError;
break;
}
}
... ...
import 'package:flutter/material.dart';
class MyColours {
static const Color color_00715F = Color(0xFF00715F);
static const Color color_80D9D9D9 = Color(0x80D9D9D9);
static const Color color_42A5FF = Color(0xFF42A5FF);
static const Color color_4C8DAD = Color(0xFF4C8DAD);
static const Color color_4D0C0F0E = Color(0x4D0C0F0E);
... ...