|
...
|
...
|
@@ -346,69 +346,74 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { |
|
|
|
],
|
|
|
|
),
|
|
|
|
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' ||
|
|
|
|
customerProvider.guestInfoSunModel.guest.isMember ==
|
|
|
|
'0')
|
|
|
|
flatBtn(
|
|
|
|
customerProvider.guestInfoSunModel.guest.isMember ==
|
|
|
|
'1'
|
|
|
|
? '会员'
|
|
|
|
: '非会员',
|
|
|
|
MyColours.color_438E93),
|
|
|
|
if ('${customerProvider.guestInfoSunModel.store.storeDay}' !=
|
|
|
|
'0')
|
|
|
|
flatBtn(
|
|
|
|
'存酒${customerProvider.guestInfoSunModel.store.storeDay}天',
|
|
|
|
MyColours.color_438E93)
|
|
|
|
],
|
|
|
|
Wrap(
|
|
|
|
runSpacing: w(10),
|
|
|
|
spacing: w(10),
|
|
|
|
children: labelsWidget(),
|
|
|
|
),
|
|
|
|
// 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' ||
|
|
|
|
// customerProvider.guestInfoSunModel.guest.isMember ==
|
|
|
|
// '0')
|
|
|
|
// flatBtn(
|
|
|
|
// customerProvider.guestInfoSunModel.guest.isMember ==
|
|
|
|
// '1'
|
|
|
|
// ? '会员'
|
|
|
|
// : '非会员',
|
|
|
|
// MyColours.color_438E93),
|
|
|
|
// if ('${customerProvider.guestInfoSunModel.store.storeDay}' !=
|
|
|
|
// '0')
|
|
|
|
// flatBtn(
|
|
|
|
// '存酒${customerProvider.guestInfoSunModel.store.storeDay}天',
|
|
|
|
// MyColours.color_438E93)
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
VEmptyView(20),
|
|
|
|
Text(
|
|
|
|
customerProvider.guestInfoSunModel.guest.nickName == null
|
|
...
|
...
|
@@ -646,10 +651,10 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { |
|
|
|
|
|
|
|
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)),
|
|
|
|
// height: w(18),
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(4), vertical: w(0.5)),
|
|
|
|
// margin: EdgeInsets.only(left: w(10)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(color: color, width: w(1)),
|
|
|
|
borderRadius: BorderRadius.circular(r(5))),
|
|
...
|
...
|
@@ -660,6 +665,108 @@ class _CustomerDetailPageState extends State<CustomerDetailPage> { |
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
List<Widget> labelsWidget() {
|
|
|
|
List<Widget> data = [];
|
|
|
|
|
|
|
|
if (customerProvider.guestInfoSunModel.guest.attr != null &&
|
|
|
|
customerProvider.guestInfoSunModel.guest.attr != '') {
|
|
|
|
data.add(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) {
|
|
|
|
List<String> labels =
|
|
|
|
customerProvider.guestInfoSunModel.guest.label.split(',');
|
|
|
|
labels.forEach((element) {
|
|
|
|
data.add(flatBtn(element, MyColours.color_B39437));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
if (customerProvider.guestInfoSunModel.guest.isMember == '1' ||
|
|
|
|
customerProvider.guestInfoSunModel.guest.isMember == '0') {
|
|
|
|
data.add(flatBtn(
|
|
|
|
customerProvider.guestInfoSunModel.guest.isMember == '1'
|
|
|
|
? '会员'
|
|
|
|
: '非会员',
|
|
|
|
MyColours.color_438E93));
|
|
|
|
}
|
|
|
|
if ('${customerProvider.guestInfoSunModel.store.storeDay}' != '0') {
|
|
|
|
data.add(flatBtn(
|
|
|
|
'存酒${customerProvider.guestInfoSunModel.store.storeDay}天',
|
|
|
|
MyColours.color_438E93));
|
|
|
|
}
|
|
|
|
|
|
|
|
// data.add(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)))));}
|
|
|
|
|
|
|
|
// if (model.label != null) {
|
|
|
|
// List<String> labels = model.label.split(',');
|
|
|
|
// labels.forEach((element) {
|
|
|
|
// data.add(flatBtn(element, MyColours.color_B39437));
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (model.isMember == '1' || model.isMember == '0') {
|
|
|
|
// data.add(flatBtn(
|
|
|
|
// model.isMember == '1' ? '会员' : '非会员', MyColours.color_438E93));
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if ('${model.storeDay}' != '0' && model.storeDay != null) {
|
|
|
|
// data.add(flatBtn('存酒${model.storeDay}天', MyColours.color_438E93));
|
|
|
|
// }
|
|
|
|
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
customerProvider = Provider.of<CustomerProvider>(context, listen: true);
|
...
|
...
|
|