|
1
|
-import 'dart:convert';
|
1
|
+// import 'dart:convert';
|
|
2
|
|
2
|
|
|
3
|
-import 'package:flutter/material.dart';
|
|
|
|
4
|
-import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
5
|
-import 'package:one_key/constant/state.dart';
|
|
|
|
6
|
-import 'package:one_key/models/guest_manage_model.dart';
|
|
|
|
7
|
-import 'package:one_key/models/marketing_by_uid_model.dart';
|
|
|
|
8
|
-import 'package:one_key/provider/customer_provider.dart';
|
|
|
|
9
|
-import 'package:one_key/provider/user_model.dart';
|
|
|
|
10
|
-import 'package:one_key/res/colors.dart';
|
|
|
|
11
|
-import 'package:one_key/route/navigator_util.dart';
|
|
|
|
12
|
-import 'package:one_key/utils/event_bus.dart';
|
|
|
|
13
|
-import 'package:one_key/utils/utils.dart';
|
|
|
|
14
|
-import 'package:one_key/widgets/h_empty_view.dart';
|
|
|
|
15
|
-import 'package:one_key/widgets/page_exception.dart';
|
|
|
|
16
|
-import 'package:one_key/widgets/round_button.dart';
|
|
|
|
17
|
-import 'package:one_key/widgets/system_app_bar.dart';
|
|
|
|
18
|
-import 'package:one_key/widgets/v_empty_view.dart';
|
|
|
|
19
|
-import 'package:provider/provider.dart';
|
3
|
+// import 'package:flutter/material.dart';
|
|
|
|
4
|
+// import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
5
|
+// import 'package:one_key/constant/state.dart';
|
|
|
|
6
|
+// import 'package:one_key/models/guest_manage_model.dart';
|
|
|
|
7
|
+// import 'package:one_key/models/marketing_by_uid_model.dart';
|
|
|
|
8
|
+// import 'package:one_key/provider/customer_provider.dart';
|
|
|
|
9
|
+// import 'package:one_key/provider/user_model.dart';
|
|
|
|
10
|
+// import 'package:one_key/res/colors.dart';
|
|
|
|
11
|
+// import 'package:one_key/route/navigator_util.dart';
|
|
|
|
12
|
+// import 'package:one_key/utils/event_bus.dart';
|
|
|
|
13
|
+// import 'package:one_key/utils/utils.dart';
|
|
|
|
14
|
+// import 'package:one_key/widgets/h_empty_view.dart';
|
|
|
|
15
|
+// import 'package:one_key/widgets/page_exception.dart';
|
|
|
|
16
|
+// import 'package:one_key/widgets/round_button.dart';
|
|
|
|
17
|
+// import 'package:one_key/widgets/system_app_bar.dart';
|
|
|
|
18
|
+// import 'package:one_key/widgets/v_empty_view.dart';
|
|
|
|
19
|
+// import 'package:provider/provider.dart';
|
|
20
|
|
20
|
|
|
21
|
-class MyCustomerPage extends StatefulWidget {
|
|
|
|
22
|
- MyCustomerPage({Key key}) : super(key: key);
|
21
|
+// class MyCustomerPage extends StatefulWidget {
|
|
|
|
22
|
+// MyCustomerPage({Key key}) : super(key: key);
|
|
23
|
|
23
|
|
|
24
|
- @override
|
|
|
|
25
|
- _MyCustomerPageState createState() => _MyCustomerPageState();
|
|
|
|
26
|
-}
|
24
|
+// @override
|
|
|
|
25
|
+// _MyCustomerPageState createState() => _MyCustomerPageState();
|
|
|
|
26
|
+// }
|
|
27
|
|
27
|
|
|
28
|
-class _MyCustomerPageState extends State<MyCustomerPage> {
|
|
|
|
29
|
- ScrollController _controller = ScrollController();
|
|
|
|
30
|
- CustomerProvider customerProvider;
|
|
|
|
31
|
- bool showWarning = false;
|
|
|
|
32
|
- @override
|
|
|
|
33
|
- void initState() {
|
|
|
|
34
|
- super.initState();
|
28
|
+// class _MyCustomerPageState extends State<MyCustomerPage> {
|
|
|
|
29
|
+// ScrollController _controller = ScrollController();
|
|
|
|
30
|
+// CustomerProvider customerProvider;
|
|
|
|
31
|
+// bool showWarning = false;
|
|
|
|
32
|
+// @override
|
|
|
|
33
|
+// void initState() {
|
|
|
|
34
|
+// super.initState();
|
|
35
|
|
35
|
|
|
36
|
- WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
37
|
- _couponNetworkData();
|
36
|
+// WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
37
|
+// _couponNetworkData();
|
|
38
|
|
38
|
|
|
39
|
- _getMarketingByUid();
|
|
|
|
40
|
- });
|
|
|
|
41
|
- bus.on("refresh_my_customer_home", (arg) {
|
|
|
|
42
|
- _getGuestManageData(isShowLoading: false);
|
|
|
|
43
|
- _getMarketingByUid();
|
|
|
|
44
|
- });
|
|
|
|
45
|
- }
|
39
|
+// _getMarketingByUid();
|
|
|
|
40
|
+// });
|
|
|
|
41
|
+// bus.on("refresh_my_customer_home", (arg) {
|
|
|
|
42
|
+// _getGuestManageData(isShowLoading: false);
|
|
|
|
43
|
+// _getMarketingByUid();
|
|
|
|
44
|
+// });
|
|
|
|
45
|
+// }
|
|
46
|
|
46
|
|
|
47
|
- @override
|
|
|
|
48
|
- void dispose() {
|
|
|
|
49
|
- bus.off('refresh_my_customer_home');
|
|
|
|
50
|
- // bus.off("refresh_coupon_list");
|
|
|
|
51
|
- super.dispose();
|
|
|
|
52
|
- }
|
47
|
+// @override
|
|
|
|
48
|
+// void dispose() {
|
|
|
|
49
|
+// bus.off('refresh_my_customer_home');
|
|
|
|
50
|
+// // bus.off("refresh_coupon_list");
|
|
|
|
51
|
+// super.dispose();
|
|
|
|
52
|
+// }
|
|
53
|
|
53
|
|
|
54
|
- ///我的客户首页
|
|
|
|
55
|
- _getGuestManageData({bool isShowLoading = true}) async {
|
|
|
|
56
|
- GuestManageSunModel model = await customerProvider
|
|
|
|
57
|
- .getGuestManageData(context, isShowLoading: isShowLoading);
|
|
|
|
58
|
- // setState(() {});
|
|
|
|
59
|
- }
|
54
|
+// ///我的客户首页
|
|
|
|
55
|
+// _getGuestManageData({bool isShowLoading = true}) async {
|
|
|
|
56
|
+// GuestManageSunModel model = await customerProvider
|
|
|
|
57
|
+// .getGuestManageData(context, isShowLoading: isShowLoading);
|
|
|
|
58
|
+// // setState(() {});
|
|
|
|
59
|
+// }
|
|
60
|
|
60
|
|
|
61
|
- ///消费券
|
|
|
|
62
|
- _couponNetworkData({bool isShowLoading = true}) async {
|
|
|
|
63
|
- // customerMakingProvider.couponSelectIndex = 0;
|
|
|
|
64
|
- Map<String, String> params = {
|
|
|
|
65
|
- "uid": Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
66
|
- };
|
|
|
|
67
|
- await customerProvider.getCustomerSelectActivityNew(context, params,
|
|
|
|
68
|
- isShowLoading: isShowLoading);
|
|
|
|
69
|
- //此人已经新建好券
|
|
|
|
70
|
- // if (customerProvider.couponListSelect.length > 0) {
|
|
|
|
71
|
- // for (int i = 0; i < customerProvider.couponListSelect.length; i++) {
|
|
|
|
72
|
- // if (widget.sellerList.aid == customerProvider.couponListSelect[i].id) {
|
|
|
|
73
|
- // aidStr = customerProvider.couponListSelect[i].aname;
|
|
|
|
74
|
- // }
|
|
|
|
75
|
- // }
|
|
|
|
76
|
- // customerProvider.notifyListeners();
|
|
|
|
77
|
- // } else {
|
|
|
|
78
|
- // //没有新建的优惠券
|
|
|
|
79
|
- // }
|
|
|
|
80
|
- _getGuestManageData();
|
|
|
|
81
|
- }
|
61
|
+// ///消费券
|
|
|
|
62
|
+// _couponNetworkData({bool isShowLoading = true}) async {
|
|
|
|
63
|
+// // customerMakingProvider.couponSelectIndex = 0;
|
|
|
|
64
|
+// Map<String, String> params = {
|
|
|
|
65
|
+// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
66
|
+// };
|
|
|
|
67
|
+// await customerProvider.getCustomerSelectActivityNew(context, params,
|
|
|
|
68
|
+// isShowLoading: isShowLoading);
|
|
|
|
69
|
+// //此人已经新建好券
|
|
|
|
70
|
+// // if (customerProvider.couponListSelect.length > 0) {
|
|
|
|
71
|
+// // for (int i = 0; i < customerProvider.couponListSelect.length; i++) {
|
|
|
|
72
|
+// // if (widget.sellerList.aid == customerProvider.couponListSelect[i].id) {
|
|
|
|
73
|
+// // aidStr = customerProvider.couponListSelect[i].aname;
|
|
|
|
74
|
+// // }
|
|
|
|
75
|
+// // }
|
|
|
|
76
|
+// // customerProvider.notifyListeners();
|
|
|
|
77
|
+// // } else {
|
|
|
|
78
|
+// // //没有新建的优惠券
|
|
|
|
79
|
+// // }
|
|
|
|
80
|
+// _getGuestManageData();
|
|
|
|
81
|
+// }
|
|
82
|
|
82
|
|
|
83
|
- _getMarketingByUid() async {
|
|
|
|
84
|
- Map<String, String> params = {
|
|
|
|
85
|
- "uid": Provider.of<UserModel>(context, listen: false).user.openid
|
|
|
|
86
|
- };
|
|
|
|
87
|
- // await customerProvider.getMarketingByUid(context, params);
|
83
|
+// _getMarketingByUid() async {
|
|
|
|
84
|
+// Map<String, String> params = {
|
|
|
|
85
|
+// "uid": Provider.of<UserModel>(context, listen: false).user.openid
|
|
|
|
86
|
+// };
|
|
|
|
87
|
+// // await customerProvider.getMarketingByUid(context, params);
|
|
88
|
|
88
|
|
|
89
|
- MarketingByUidsSunModel myRecordData =
|
|
|
|
90
|
- await customerProvider.getMarketingByUid(context, params);
|
|
|
|
91
|
- if (myRecordData != null && myRecordData.sellerList.length > 0) {
|
|
|
|
92
|
- bool temp = myRecordData.sellerList.any((value) {
|
|
|
|
93
|
- return value.finishedStatus == '0';
|
|
|
|
94
|
- });
|
|
|
|
95
|
- setState(() {
|
|
|
|
96
|
- showWarning = temp;
|
|
|
|
97
|
- });
|
|
|
|
98
|
- }
|
|
|
|
99
|
- // await customerProvider.searchData(customerProvider.controller.text);
|
|
|
|
100
|
- }
|
89
|
+// MarketingByUidsSunModel myRecordData =
|
|
|
|
90
|
+// await customerProvider.getMarketingByUid(context, params);
|
|
|
|
91
|
+// if (myRecordData != null && myRecordData.sellerList.length > 0) {
|
|
|
|
92
|
+// bool temp = myRecordData.sellerList.any((value) {
|
|
|
|
93
|
+// return value.finishedStatus == '0';
|
|
|
|
94
|
+// });
|
|
|
|
95
|
+// setState(() {
|
|
|
|
96
|
+// showWarning = temp;
|
|
|
|
97
|
+// });
|
|
|
|
98
|
+// }
|
|
|
|
99
|
+// // await customerProvider.searchData(customerProvider.controller.text);
|
|
|
|
100
|
+// }
|
|
101
|
|
101
|
|
|
102
|
- ///活跃客户、沉睡客户、流失客户
|
|
|
|
103
|
- Widget _percentWidget(String pnum, String btnTitle, String percent) {
|
|
|
|
104
|
- return InkWell(
|
|
|
|
105
|
- onTap: () async {
|
|
|
|
106
|
- String index = '0';
|
|
|
|
107
|
- if (btnTitle == '活跃客户') {
|
|
|
|
108
|
- index = '1';
|
|
|
|
109
|
- } else if (btnTitle == '沉睡客户') {
|
|
|
|
110
|
- index = '2';
|
|
|
|
111
|
- } else if (btnTitle == '流失客户') {
|
|
|
|
112
|
- index = '3';
|
|
|
|
113
|
- }
|
|
|
|
114
|
- NavigatorUtil.goMyCustomerListPage(
|
|
|
|
115
|
- context, FromPage.FromPageMyCustomer,
|
|
|
|
116
|
- index: index);
|
|
|
|
117
|
- },
|
|
|
|
118
|
- child: Container(
|
|
|
|
119
|
- color: MyColours.color_ffffff,
|
|
|
|
120
|
- // height: ScreenUtil().setWidth(230),
|
|
|
|
121
|
- width: (ScreenUtil().screenWidth - ScreenUtil().setWidth(20)) / 3,
|
|
|
|
122
|
- height: (ScreenUtil().screenWidth - ScreenUtil().setWidth(20)) / 3,
|
|
|
|
123
|
- child: Column(
|
|
|
|
124
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
125
|
- children: [
|
|
|
|
126
|
- Row(
|
|
|
|
127
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
128
|
- children: [
|
|
|
|
129
|
- Text(pnum,
|
|
|
|
130
|
- style: TextStyle(
|
|
|
|
131
|
- color: MyColours.color_199095,
|
|
|
|
132
|
- fontSize: ScreenUtil().setSp(40),
|
|
|
|
133
|
- fontWeight: FontWeight.bold)),
|
|
|
|
134
|
- Text('位',
|
|
|
|
135
|
- style: TextStyle(
|
|
|
|
136
|
- color: MyColours.color_199095,
|
|
|
|
137
|
- fontSize: ScreenUtil().setSp(24),
|
|
|
|
138
|
- ))
|
|
|
|
139
|
- ],
|
|
|
|
140
|
- ),
|
|
|
|
141
|
- VEmptyView(20),
|
|
|
|
142
|
- RoundButton(
|
|
|
|
143
|
- onPressed: () async {
|
|
|
|
144
|
- String index = '0';
|
|
|
|
145
|
- if (btnTitle == '活跃客户') {
|
|
|
|
146
|
- index = '1';
|
|
|
|
147
|
- } else if (btnTitle == '沉睡客户') {
|
|
|
|
148
|
- index = '2';
|
|
|
|
149
|
- } else if (btnTitle == '流失客户') {
|
|
|
|
150
|
- index = '3';
|
|
|
|
151
|
- }
|
|
|
|
152
|
- NavigatorUtil.goMyCustomerListPage(
|
|
|
|
153
|
- context, FromPage.FromPageMyCustomer,
|
|
|
|
154
|
- index: index);
|
|
|
|
155
|
- },
|
|
|
|
156
|
- text: btnTitle,
|
|
|
|
157
|
- fontSize: 24,
|
|
|
|
158
|
- isBold: false,
|
|
|
|
159
|
- textColor: MyColours.color_333333,
|
|
|
|
160
|
- gradientStart: MyColours.color_ffffff,
|
|
|
|
161
|
- gradientEnd: MyColours.color_ffffff,
|
|
|
|
162
|
- borderColor: Color.fromRGBO(118, 118, 118, 1),
|
|
|
|
163
|
- height: ScreenUtil().setWidth(45),
|
|
|
|
164
|
- width: ScreenUtil().setWidth(160),
|
|
|
|
165
|
- radius: ScreenUtil().setWidth(30),
|
|
|
|
166
|
- ),
|
|
|
|
167
|
- VEmptyView(16),
|
|
|
|
168
|
- percent == null
|
|
|
|
169
|
- ? SizedBox()
|
|
|
|
170
|
- : Text('${percent}%',
|
|
|
|
171
|
- style: TextStyle(
|
|
|
|
172
|
- color: MyColours.color_199095,
|
|
|
|
173
|
- fontSize: ScreenUtil().setSp(24),
|
|
|
|
174
|
- )),
|
|
|
|
175
|
- ],
|
|
|
|
176
|
- ),
|
|
|
|
177
|
- ));
|
|
|
|
178
|
- }
|
102
|
+// ///活跃客户、沉睡客户、流失客户
|
|
|
|
103
|
+// Widget _percentWidget(String pnum, String btnTitle, String percent) {
|
|
|
|
104
|
+// return InkWell(
|
|
|
|
105
|
+// onTap: () async {
|
|
|
|
106
|
+// String index = '0';
|
|
|
|
107
|
+// if (btnTitle == '活跃客户') {
|
|
|
|
108
|
+// index = '1';
|
|
|
|
109
|
+// } else if (btnTitle == '沉睡客户') {
|
|
|
|
110
|
+// index = '2';
|
|
|
|
111
|
+// } else if (btnTitle == '流失客户') {
|
|
|
|
112
|
+// index = '3';
|
|
|
|
113
|
+// }
|
|
|
|
114
|
+// NavigatorUtil.goMyCustomerListPage(
|
|
|
|
115
|
+// context, FromPage.FromPageMyCustomer,
|
|
|
|
116
|
+// index: index);
|
|
|
|
117
|
+// },
|
|
|
|
118
|
+// child: Container(
|
|
|
|
119
|
+// color: MyColours.color_ffffff,
|
|
|
|
120
|
+// // height: ScreenUtil().setWidth(230),
|
|
|
|
121
|
+// width: (ScreenUtil().screenWidth - ScreenUtil().setWidth(20)) / 3,
|
|
|
|
122
|
+// height: (ScreenUtil().screenWidth - ScreenUtil().setWidth(20)) / 3,
|
|
|
|
123
|
+// child: Column(
|
|
|
|
124
|
+// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
125
|
+// children: [
|
|
|
|
126
|
+// Row(
|
|
|
|
127
|
+// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
128
|
+// children: [
|
|
|
|
129
|
+// Text(pnum,
|
|
|
|
130
|
+// style: TextStyle(
|
|
|
|
131
|
+// color: MyColours.color_199095,
|
|
|
|
132
|
+// fontSize: ScreenUtil().setSp(40),
|
|
|
|
133
|
+// fontWeight: FontWeight.bold)),
|
|
|
|
134
|
+// Text('位',
|
|
|
|
135
|
+// style: TextStyle(
|
|
|
|
136
|
+// color: MyColours.color_199095,
|
|
|
|
137
|
+// fontSize: ScreenUtil().setSp(24),
|
|
|
|
138
|
+// ))
|
|
|
|
139
|
+// ],
|
|
|
|
140
|
+// ),
|
|
|
|
141
|
+// VEmptyView(20),
|
|
|
|
142
|
+// RoundButton(
|
|
|
|
143
|
+// onPressed: () async {
|
|
|
|
144
|
+// String index = '0';
|
|
|
|
145
|
+// if (btnTitle == '活跃客户') {
|
|
|
|
146
|
+// index = '1';
|
|
|
|
147
|
+// } else if (btnTitle == '沉睡客户') {
|
|
|
|
148
|
+// index = '2';
|
|
|
|
149
|
+// } else if (btnTitle == '流失客户') {
|
|
|
|
150
|
+// index = '3';
|
|
|
|
151
|
+// }
|
|
|
|
152
|
+// NavigatorUtil.goMyCustomerListPage(
|
|
|
|
153
|
+// context, FromPage.FromPageMyCustomer,
|
|
|
|
154
|
+// index: index);
|
|
|
|
155
|
+// },
|
|
|
|
156
|
+// text: btnTitle,
|
|
|
|
157
|
+// fontSize: 24,
|
|
|
|
158
|
+// isBold: false,
|
|
|
|
159
|
+// textColor: MyColours.color_333333,
|
|
|
|
160
|
+// gradientStart: MyColours.color_ffffff,
|
|
|
|
161
|
+// gradientEnd: MyColours.color_ffffff,
|
|
|
|
162
|
+// borderColor: Color.fromRGBO(118, 118, 118, 1),
|
|
|
|
163
|
+// height: ScreenUtil().setWidth(45),
|
|
|
|
164
|
+// width: ScreenUtil().setWidth(160),
|
|
|
|
165
|
+// radius: ScreenUtil().setWidth(30),
|
|
|
|
166
|
+// ),
|
|
|
|
167
|
+// VEmptyView(16),
|
|
|
|
168
|
+// percent == null
|
|
|
|
169
|
+// ? SizedBox()
|
|
|
|
170
|
+// : Text('${percent}%',
|
|
|
|
171
|
+// style: TextStyle(
|
|
|
|
172
|
+// color: MyColours.color_199095,
|
|
|
|
173
|
+// fontSize: ScreenUtil().setSp(24),
|
|
|
|
174
|
+// )),
|
|
|
|
175
|
+// ],
|
|
|
|
176
|
+// ),
|
|
|
|
177
|
+// ));
|
|
|
|
178
|
+// }
|
|
179
|
|
179
|
|
|
180
|
- @override
|
|
|
|
181
|
- Widget build(BuildContext context) {
|
|
|
|
182
|
- customerProvider = Provider.of<CustomerProvider>(context, listen: false);
|
|
|
|
183
|
- return Scaffold(
|
|
|
|
184
|
- backgroundColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
185
|
- appBar: SystemAppBar('我的客情', onTap: () {
|
|
|
|
186
|
- EventBus().emit('changeStatusColor');
|
|
|
|
187
|
- Navigator.pop(context);
|
|
|
|
188
|
- }),
|
|
|
|
189
|
- body: WillPopScope(onWillPop: () async {
|
|
|
|
190
|
- EventBus().emit('changeStatusColor');
|
|
|
|
191
|
- return true;
|
|
|
|
192
|
- }, child: Consumer<CustomerProvider>(builder: (context, model, _) {
|
|
|
|
193
|
- if (model.pageStateMyHome != PageState.Success) {
|
|
|
|
194
|
- return ExceptionPage(
|
|
|
|
195
|
- pageState: model.pageStateMyHome,
|
|
|
|
196
|
- callback: () {
|
|
|
|
197
|
- _getGuestManageData();
|
|
|
|
198
|
- },
|
|
|
|
199
|
- emptyMsg: "暂时没有我的客情哦",
|
|
|
|
200
|
- emptyImg: "empty_search",
|
|
|
|
201
|
- showMsg: "加载中,请稍后...",
|
|
|
|
202
|
- );
|
|
|
|
203
|
- } else {
|
|
|
|
204
|
- return Column(children: [
|
|
|
|
205
|
- Expanded(
|
|
|
|
206
|
- child: SingleChildScrollView(
|
|
|
|
207
|
- controller: _controller,
|
|
|
|
208
|
- child: Column(
|
|
|
|
209
|
- children: [
|
|
|
|
210
|
- Container(
|
|
|
|
211
|
- color: MyColours.color_ffffff,
|
|
|
|
212
|
- padding: EdgeInsets.symmetric(
|
|
|
|
213
|
- vertical: ScreenUtil().setWidth(30)),
|
|
|
|
214
|
- child: Column(
|
|
|
|
215
|
- children: [
|
|
|
|
216
|
- Row(
|
|
|
|
217
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
218
|
- children: [
|
|
|
|
219
|
- Text(
|
|
|
|
220
|
- '${customerProvider.guestSunmodel.myCustomer}',
|
|
|
|
221
|
- style: TextStyle(
|
|
|
|
222
|
- color: MyColours.color_199095,
|
|
|
|
223
|
- fontSize: ScreenUtil().setSp(60),
|
|
|
|
224
|
- fontWeight: FontWeight.bold),
|
|
|
|
225
|
- ),
|
|
|
|
226
|
- Text(
|
|
|
|
227
|
- '位',
|
|
|
|
228
|
- style: TextStyle(
|
|
|
|
229
|
- color: MyColours.color_199095,
|
|
|
|
230
|
- fontWeight: FontWeight.bold,
|
|
|
|
231
|
- fontSize: ScreenUtil().setSp(30)),
|
|
|
|
232
|
- )
|
|
|
|
233
|
- ],
|
|
|
|
234
|
- ),
|
|
|
|
235
|
- VEmptyView(10),
|
|
|
|
236
|
- RoundButton(
|
|
|
|
237
|
- onPressed: () async {
|
|
|
|
238
|
- NavigatorUtil.goMyCustomerListPage(
|
|
|
|
239
|
- context, FromPage.FromPageMyCustomer);
|
|
|
|
240
|
- },
|
|
|
|
241
|
- text: '我的客户',
|
|
|
|
242
|
- fontSize: 24,
|
|
|
|
243
|
- isBold: false,
|
|
|
|
244
|
- textColor: MyColours.color_333333,
|
|
|
|
245
|
- gradientStart: MyColours.color_ffffff,
|
|
|
|
246
|
- gradientEnd: MyColours.color_ffffff,
|
|
|
|
247
|
- borderColor: Color.fromRGBO(118, 118, 118, 1),
|
|
|
|
248
|
- height: ScreenUtil().setWidth(45),
|
|
|
|
249
|
- width: ScreenUtil().setWidth(160),
|
|
|
|
250
|
- radius: ScreenUtil().setWidth(30),
|
|
|
|
251
|
- )
|
|
|
|
252
|
- ],
|
|
|
|
253
|
- ),
|
|
|
|
254
|
- ),
|
|
|
|
255
|
- VEmptyView(10),
|
|
|
|
256
|
- // GridView.builder(
|
|
|
|
257
|
- // controller: _controller,
|
|
|
|
258
|
- // shrinkWrap: true,
|
|
|
|
259
|
- // cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
260
|
- // itemCount: 3,
|
|
|
|
261
|
- // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
262
|
- // crossAxisCount: 3,
|
|
|
|
263
|
- // childAspectRatio: 1,
|
|
|
|
264
|
- // mainAxisSpacing: ScreenUtil().setWidth(10),
|
|
|
|
265
|
- // crossAxisSpacing: ScreenUtil().setWidth(10)),
|
|
|
|
266
|
- // itemBuilder: (BuildContext context, int index) {
|
|
|
|
267
|
- // // locationState = state;
|
|
|
|
268
|
- // return _percentWidget(
|
|
|
|
269
|
- // '${customerProvider.guestSunmodel.active.count}',
|
|
|
|
270
|
- // '活跃客户',
|
|
|
|
271
|
- // '${customerProvider.guestSunmodel.active.scale}');
|
|
|
|
272
|
- // }),
|
|
|
|
273
|
- Row(
|
|
|
|
274
|
- children: [
|
|
|
|
275
|
- _percentWidget(
|
|
|
|
276
|
- '${customerProvider.guestSunmodel.active.count}',
|
|
|
|
277
|
- '活跃客户',
|
|
|
|
278
|
- '${customerProvider.guestSunmodel.active.scale}'),
|
|
|
|
279
|
- HEmptyView(10),
|
|
|
|
280
|
- _percentWidget(
|
|
|
|
281
|
- '${customerProvider.guestSunmodel.sleep.count}',
|
|
|
|
282
|
- '沉睡客户',
|
|
|
|
283
|
- '${customerProvider.guestSunmodel.sleep.scale}'),
|
|
|
|
284
|
- HEmptyView(10),
|
|
|
|
285
|
- _percentWidget(
|
|
|
|
286
|
- '${customerProvider.guestSunmodel.drain.count}',
|
|
|
|
287
|
- '流失客户',
|
|
|
|
288
|
- '${customerProvider.guestSunmodel.drain.scale}'),
|
|
|
|
289
|
- ],
|
|
|
|
290
|
- ),
|
|
|
|
291
|
- ListView.builder(
|
|
|
|
292
|
- controller: _controller,
|
|
|
|
293
|
- shrinkWrap: true,
|
|
|
|
294
|
- cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
295
|
- itemCount: customerProvider.guestSunmodel.tips.task ==
|
|
|
|
296
|
- null ||
|
|
|
|
297
|
- customerProvider
|
|
|
|
298
|
- .guestSunmodel.tips.task.length ==
|
|
|
|
299
|
- 0
|
|
|
|
300
|
- ? 0
|
|
|
|
301
|
- : customerProvider.guestSunmodel.tips.task.length,
|
|
|
|
302
|
- itemBuilder: (BuildContext context, int index) {
|
|
|
|
303
|
- // locationState = state;
|
|
|
|
304
|
- Task data =
|
|
|
|
305
|
- customerProvider.guestSunmodel.tips.task[index];
|
|
|
|
306
|
- return Column(
|
|
|
|
307
|
- children: [
|
|
|
|
308
|
- VEmptyView(10),
|
|
|
|
309
|
- Container(
|
|
|
|
310
|
- color: MyColours.color_ffffff,
|
|
|
|
311
|
- padding: EdgeInsets.symmetric(
|
|
|
|
312
|
- horizontal: ScreenUtil().setWidth(20),
|
|
|
|
313
|
- vertical: ScreenUtil().setWidth(30)),
|
|
|
|
314
|
- child: Row(
|
|
|
|
315
|
- children: [
|
|
|
|
316
|
- Image.asset(
|
|
|
|
317
|
- Utils.getImgPath('warning'),
|
|
|
|
318
|
- width: ScreenUtil().setWidth(42),
|
|
|
|
319
|
- ),
|
|
|
|
320
|
- HEmptyView(15),
|
|
|
|
321
|
- Expanded(
|
|
|
|
322
|
- child: Column(
|
|
|
|
323
|
- crossAxisAlignment:
|
|
|
|
324
|
- CrossAxisAlignment.start,
|
|
|
|
325
|
- children: [
|
|
|
|
326
|
- Text(
|
|
|
|
327
|
- '店内任务:${data.content}',
|
|
|
|
328
|
- maxLines: 1,
|
|
|
|
329
|
- overflow: TextOverflow.ellipsis,
|
|
|
|
330
|
- style: TextStyle(
|
|
|
|
331
|
- color: MyColours.color_333333,
|
|
|
|
332
|
- fontSize: ScreenUtil().setSp(32)),
|
|
|
|
333
|
- ),
|
|
|
|
334
|
- data.aid != null && data.aidStr != null
|
|
|
|
335
|
- ? Padding(
|
|
|
|
336
|
- padding: EdgeInsets.only(
|
|
|
|
337
|
- top: ScreenUtil()
|
|
|
|
338
|
- .setWidth(8)),
|
|
|
|
339
|
- child: Text(
|
|
|
|
340
|
- '优惠内容:${data.aidStr}',
|
|
|
|
341
|
- maxLines: 1,
|
|
|
|
342
|
- overflow:
|
|
|
|
343
|
- TextOverflow.ellipsis,
|
|
|
|
344
|
- style: TextStyle(
|
|
|
|
345
|
- color: MyColours
|
|
|
|
346
|
- .color_333333,
|
|
|
|
347
|
- fontSize: ScreenUtil()
|
|
|
|
348
|
- .setSp(24)),
|
|
|
|
349
|
- ),
|
|
|
|
350
|
- )
|
|
|
|
351
|
- : SizedBox(),
|
|
|
|
352
|
- VEmptyView(8),
|
|
|
|
353
|
- Text(
|
|
|
|
354
|
- '创建人:${data.createUser}',
|
|
|
|
355
|
- maxLines: 1,
|
|
|
|
356
|
- overflow: TextOverflow.ellipsis,
|
|
|
|
357
|
- style: TextStyle(
|
|
|
|
358
|
- color: MyColours.color_333333,
|
|
|
|
359
|
- fontSize: ScreenUtil().setSp(26)),
|
|
|
|
360
|
- )
|
|
|
|
361
|
- ],
|
|
|
|
362
|
- )),
|
|
|
|
363
|
- HEmptyView(20),
|
|
|
|
364
|
- Column(children: [
|
|
|
|
365
|
- RoundButton(
|
|
|
|
366
|
- text: '立即完成',
|
180
|
+// @override
|
|
|
|
181
|
+// Widget build(BuildContext context) {
|
|
|
|
182
|
+// customerProvider = Provider.of<CustomerProvider>(context, listen: false);
|
|
|
|
183
|
+// return Scaffold(
|
|
|
|
184
|
+// backgroundColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
185
|
+// appBar: SystemAppBar('我的客情', onTap: () {
|
|
|
|
186
|
+// EventBus().emit('changeStatusColor');
|
|
|
|
187
|
+// Navigator.pop(context);
|
|
|
|
188
|
+// }),
|
|
|
|
189
|
+// body: WillPopScope(onWillPop: () async {
|
|
|
|
190
|
+// EventBus().emit('changeStatusColor');
|
|
|
|
191
|
+// return true;
|
|
|
|
192
|
+// }, child: Consumer<CustomerProvider>(builder: (context, model, _) {
|
|
|
|
193
|
+// if (model.pageStateMyHome != PageState.Success) {
|
|
|
|
194
|
+// return ExceptionPage(
|
|
|
|
195
|
+// pageState: model.pageStateMyHome,
|
|
|
|
196
|
+// callback: () {
|
|
|
|
197
|
+// _getGuestManageData();
|
|
|
|
198
|
+// },
|
|
|
|
199
|
+// emptyMsg: "暂时没有我的客情哦",
|
|
|
|
200
|
+// emptyImg: "empty_search",
|
|
|
|
201
|
+// showMsg: "加载中,请稍后...",
|
|
|
|
202
|
+// );
|
|
|
|
203
|
+// } else {
|
|
|
|
204
|
+// return Column(children: [
|
|
|
|
205
|
+// Expanded(
|
|
|
|
206
|
+// child: SingleChildScrollView(
|
|
|
|
207
|
+// controller: _controller,
|
|
|
|
208
|
+// child: Column(
|
|
|
|
209
|
+// children: [
|
|
|
|
210
|
+// Container(
|
|
|
|
211
|
+// color: MyColours.color_ffffff,
|
|
|
|
212
|
+// padding: EdgeInsets.symmetric(
|
|
|
|
213
|
+// vertical: ScreenUtil().setWidth(30)),
|
|
|
|
214
|
+// child: Column(
|
|
|
|
215
|
+// children: [
|
|
|
|
216
|
+// Row(
|
|
|
|
217
|
+// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
218
|
+// children: [
|
|
|
|
219
|
+// Text(
|
|
|
|
220
|
+// '${customerProvider.guestSunmodel.myCustomer}',
|
|
|
|
221
|
+// style: TextStyle(
|
|
|
|
222
|
+// color: MyColours.color_199095,
|
|
|
|
223
|
+// fontSize: ScreenUtil().setSp(60),
|
|
|
|
224
|
+// fontWeight: FontWeight.bold),
|
|
|
|
225
|
+// ),
|
|
|
|
226
|
+// Text(
|
|
|
|
227
|
+// '位',
|
|
|
|
228
|
+// style: TextStyle(
|
|
|
|
229
|
+// color: MyColours.color_199095,
|
|
|
|
230
|
+// fontWeight: FontWeight.bold,
|
|
|
|
231
|
+// fontSize: ScreenUtil().setSp(30)),
|
|
|
|
232
|
+// )
|
|
|
|
233
|
+// ],
|
|
|
|
234
|
+// ),
|
|
|
|
235
|
+// VEmptyView(10),
|
|
|
|
236
|
+// RoundButton(
|
|
|
|
237
|
+// onPressed: () async {
|
|
|
|
238
|
+// NavigatorUtil.goMyCustomerListPage(
|
|
|
|
239
|
+// context, FromPage.FromPageMyCustomer);
|
|
|
|
240
|
+// },
|
|
|
|
241
|
+// text: '我的客户',
|
|
|
|
242
|
+// fontSize: 24,
|
|
|
|
243
|
+// isBold: false,
|
|
|
|
244
|
+// textColor: MyColours.color_333333,
|
|
|
|
245
|
+// gradientStart: MyColours.color_ffffff,
|
|
|
|
246
|
+// gradientEnd: MyColours.color_ffffff,
|
|
|
|
247
|
+// borderColor: Color.fromRGBO(118, 118, 118, 1),
|
|
|
|
248
|
+// height: ScreenUtil().setWidth(45),
|
|
|
|
249
|
+// width: ScreenUtil().setWidth(160),
|
|
|
|
250
|
+// radius: ScreenUtil().setWidth(30),
|
|
|
|
251
|
+// )
|
|
|
|
252
|
+// ],
|
|
|
|
253
|
+// ),
|
|
|
|
254
|
+// ),
|
|
|
|
255
|
+// VEmptyView(10),
|
|
|
|
256
|
+// // GridView.builder(
|
|
|
|
257
|
+// // controller: _controller,
|
|
|
|
258
|
+// // shrinkWrap: true,
|
|
|
|
259
|
+// // cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
260
|
+// // itemCount: 3,
|
|
|
|
261
|
+// // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
262
|
+// // crossAxisCount: 3,
|
|
|
|
263
|
+// // childAspectRatio: 1,
|
|
|
|
264
|
+// // mainAxisSpacing: ScreenUtil().setWidth(10),
|
|
|
|
265
|
+// // crossAxisSpacing: ScreenUtil().setWidth(10)),
|
|
|
|
266
|
+// // itemBuilder: (BuildContext context, int index) {
|
|
|
|
267
|
+// // // locationState = state;
|
|
|
|
268
|
+// // return _percentWidget(
|
|
|
|
269
|
+// // '${customerProvider.guestSunmodel.active.count}',
|
|
|
|
270
|
+// // '活跃客户',
|
|
|
|
271
|
+// // '${customerProvider.guestSunmodel.active.scale}');
|
|
|
|
272
|
+// // }),
|
|
|
|
273
|
+// Row(
|
|
|
|
274
|
+// children: [
|
|
|
|
275
|
+// _percentWidget(
|
|
|
|
276
|
+// '${customerProvider.guestSunmodel.active.count}',
|
|
|
|
277
|
+// '活跃客户',
|
|
|
|
278
|
+// '${customerProvider.guestSunmodel.active.scale}'),
|
|
|
|
279
|
+// HEmptyView(10),
|
|
|
|
280
|
+// _percentWidget(
|
|
|
|
281
|
+// '${customerProvider.guestSunmodel.sleep.count}',
|
|
|
|
282
|
+// '沉睡客户',
|
|
|
|
283
|
+// '${customerProvider.guestSunmodel.sleep.scale}'),
|
|
|
|
284
|
+// HEmptyView(10),
|
|
|
|
285
|
+// _percentWidget(
|
|
|
|
286
|
+// '${customerProvider.guestSunmodel.drain.count}',
|
|
|
|
287
|
+// '流失客户',
|
|
|
|
288
|
+// '${customerProvider.guestSunmodel.drain.scale}'),
|
|
|
|
289
|
+// ],
|
|
|
|
290
|
+// ),
|
|
|
|
291
|
+// ListView.builder(
|
|
|
|
292
|
+// controller: _controller,
|
|
|
|
293
|
+// shrinkWrap: true,
|
|
|
|
294
|
+// cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
295
|
+// itemCount: customerProvider.guestSunmodel.tips.task ==
|
|
|
|
296
|
+// null ||
|
|
|
|
297
|
+// customerProvider
|
|
|
|
298
|
+// .guestSunmodel.tips.task.length ==
|
|
|
|
299
|
+// 0
|
|
|
|
300
|
+// ? 0
|
|
|
|
301
|
+// : customerProvider.guestSunmodel.tips.task.length,
|
|
|
|
302
|
+// itemBuilder: (BuildContext context, int index) {
|
|
|
|
303
|
+// // locationState = state;
|
|
|
|
304
|
+// Task data =
|
|
|
|
305
|
+// customerProvider.guestSunmodel.tips.task[index];
|
|
|
|
306
|
+// return Column(
|
|
|
|
307
|
+// children: [
|
|
|
|
308
|
+// VEmptyView(10),
|
|
|
|
309
|
+// Container(
|
|
|
|
310
|
+// color: MyColours.color_ffffff,
|
|
|
|
311
|
+// padding: EdgeInsets.symmetric(
|
|
|
|
312
|
+// horizontal: ScreenUtil().setWidth(20),
|
|
|
|
313
|
+// vertical: ScreenUtil().setWidth(30)),
|
|
|
|
314
|
+// child: Row(
|
|
|
|
315
|
+// children: [
|
|
|
|
316
|
+// Image.asset(
|
|
|
|
317
|
+// Utils.getImgPath('warning'),
|
|
|
|
318
|
+// width: ScreenUtil().setWidth(42),
|
|
|
|
319
|
+// ),
|
|
|
|
320
|
+// HEmptyView(15),
|
|
|
|
321
|
+// Expanded(
|
|
|
|
322
|
+// child: Column(
|
|
|
|
323
|
+// crossAxisAlignment:
|
|
|
|
324
|
+// CrossAxisAlignment.start,
|
|
|
|
325
|
+// children: [
|
|
|
|
326
|
+// Text(
|
|
|
|
327
|
+// '店内任务:${data.content}',
|
|
|
|
328
|
+// maxLines: 1,
|
|
|
|
329
|
+// overflow: TextOverflow.ellipsis,
|
|
|
|
330
|
+// style: TextStyle(
|
|
|
|
331
|
+// color: MyColours.color_333333,
|
|
|
|
332
|
+// fontSize: ScreenUtil().setSp(32)),
|
|
|
|
333
|
+// ),
|
|
|
|
334
|
+// data.aid != null && data.aidStr != null
|
|
|
|
335
|
+// ? Padding(
|
|
|
|
336
|
+// padding: EdgeInsets.only(
|
|
|
|
337
|
+// top: ScreenUtil()
|
|
|
|
338
|
+// .setWidth(8)),
|
|
|
|
339
|
+// child: Text(
|
|
|
|
340
|
+// '优惠内容:${data.aidStr}',
|
|
|
|
341
|
+// maxLines: 1,
|
|
|
|
342
|
+// overflow:
|
|
|
|
343
|
+// TextOverflow.ellipsis,
|
|
|
|
344
|
+// style: TextStyle(
|
|
|
|
345
|
+// color: MyColours
|
|
|
|
346
|
+// .color_333333,
|
|
|
|
347
|
+// fontSize: ScreenUtil()
|
|
|
|
348
|
+// .setSp(24)),
|
|
|
|
349
|
+// ),
|
|
|
|
350
|
+// )
|
|
|
|
351
|
+// : SizedBox(),
|
|
|
|
352
|
+// VEmptyView(8),
|
|
|
|
353
|
+// Text(
|
|
|
|
354
|
+// '创建人:${data.createUser}',
|
|
|
|
355
|
+// maxLines: 1,
|
|
|
|
356
|
+// overflow: TextOverflow.ellipsis,
|
|
|
|
357
|
+// style: TextStyle(
|
|
|
|
358
|
+// color: MyColours.color_333333,
|
|
|
|
359
|
+// fontSize: ScreenUtil().setSp(26)),
|
|
|
|
360
|
+// )
|
|
|
|
361
|
+// ],
|
|
|
|
362
|
+// )),
|
|
|
|
363
|
+// HEmptyView(20),
|
|
|
|
364
|
+// Column(children: [
|
|
|
|
365
|
+// RoundButton(
|
|
|
|
366
|
+// text: '立即完成',
|
|
367
|
|
367
|
|
|
368
|
- padding: EdgeInsets.symmetric(
|
|
|
|
369
|
- horizontal:
|
|
|
|
370
|
- ScreenUtil().setWidth(26)),
|
|
|
|
371
|
- gradientStart: MyColours.color_199095,
|
|
|
|
372
|
- gradientEnd: MyColours.color_199095,
|
|
|
|
373
|
- // borderColor: MyColours.color_999999,
|
|
|
|
374
|
- radius: ScreenUtil().setWidth(40),
|
|
|
|
375
|
- height: ScreenUtil().setWidth(64),
|
|
|
|
376
|
- width: ScreenUtil().setWidth(180),
|
|
|
|
377
|
- fontSize: 26,
|
|
|
|
378
|
- isBold: false,
|
|
|
|
379
|
- onPressed: () {
|
|
|
|
380
|
- SellerList sellerList =
|
|
|
|
381
|
- SellerList.fromJson(json
|
|
|
|
382
|
- .decode(json.encode(data)));
|
|
|
|
383
|
- NavigatorUtil
|
|
|
|
384
|
- .goMyMakeMarkingPageOnlyShow(
|
|
|
|
385
|
- context, sellerList);
|
|
|
|
386
|
- },
|
|
|
|
387
|
- ),
|
|
|
|
388
|
- data.remainingTime != null
|
|
|
|
389
|
- ? Padding(
|
|
|
|
390
|
- padding: EdgeInsets.only(
|
|
|
|
391
|
- top:
|
|
|
|
392
|
- ScreenUtil().setWidth(6)),
|
|
|
|
393
|
- child: Text(
|
|
|
|
394
|
- '${data.remainingTime}天内',
|
|
|
|
395
|
- maxLines: 1,
|
|
|
|
396
|
- overflow: TextOverflow.ellipsis,
|
|
|
|
397
|
- style: TextStyle(
|
|
|
|
398
|
- color: Color.fromRGBO(
|
|
|
|
399
|
- 215, 30, 40, 1),
|
|
|
|
400
|
- fontSize:
|
|
|
|
401
|
- ScreenUtil().setSp(26)),
|
|
|
|
402
|
- ))
|
|
|
|
403
|
- : SizedBox()
|
|
|
|
404
|
- ])
|
|
|
|
405
|
- ],
|
|
|
|
406
|
- ),
|
|
|
|
407
|
- ),
|
|
|
|
408
|
- ],
|
|
|
|
409
|
- );
|
|
|
|
410
|
- }),
|
|
|
|
411
|
- ListView.builder(
|
|
|
|
412
|
- controller: _controller,
|
|
|
|
413
|
- shrinkWrap: true,
|
|
|
|
414
|
- cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
415
|
- itemCount:
|
|
|
|
416
|
- customerProvider.guestSunmodel.tips.recover ==
|
|
|
|
417
|
- null ||
|
|
|
|
418
|
- customerProvider.guestSunmodel.tips.recover
|
|
|
|
419
|
- .length ==
|
|
|
|
420
|
- 0
|
|
|
|
421
|
- ? 0
|
|
|
|
422
|
- : 1,
|
|
|
|
423
|
- itemBuilder: (BuildContext context, int index) {
|
|
|
|
424
|
- // locationState = state;
|
368
|
+// padding: EdgeInsets.symmetric(
|
|
|
|
369
|
+// horizontal:
|
|
|
|
370
|
+// ScreenUtil().setWidth(26)),
|
|
|
|
371
|
+// gradientStart: MyColours.color_199095,
|
|
|
|
372
|
+// gradientEnd: MyColours.color_199095,
|
|
|
|
373
|
+// // borderColor: MyColours.color_999999,
|
|
|
|
374
|
+// radius: ScreenUtil().setWidth(40),
|
|
|
|
375
|
+// height: ScreenUtil().setWidth(64),
|
|
|
|
376
|
+// width: ScreenUtil().setWidth(180),
|
|
|
|
377
|
+// fontSize: 26,
|
|
|
|
378
|
+// isBold: false,
|
|
|
|
379
|
+// onPressed: () {
|
|
|
|
380
|
+// SellerList sellerList =
|
|
|
|
381
|
+// SellerList.fromJson(json
|
|
|
|
382
|
+// .decode(json.encode(data)));
|
|
|
|
383
|
+// NavigatorUtil
|
|
|
|
384
|
+// .goMyMakeMarkingPageOnlyShow(
|
|
|
|
385
|
+// context, sellerList);
|
|
|
|
386
|
+// },
|
|
|
|
387
|
+// ),
|
|
|
|
388
|
+// data.remainingTime != null
|
|
|
|
389
|
+// ? Padding(
|
|
|
|
390
|
+// padding: EdgeInsets.only(
|
|
|
|
391
|
+// top:
|
|
|
|
392
|
+// ScreenUtil().setWidth(6)),
|
|
|
|
393
|
+// child: Text(
|
|
|
|
394
|
+// '${data.remainingTime}天内',
|
|
|
|
395
|
+// maxLines: 1,
|
|
|
|
396
|
+// overflow: TextOverflow.ellipsis,
|
|
|
|
397
|
+// style: TextStyle(
|
|
|
|
398
|
+// color: Color.fromRGBO(
|
|
|
|
399
|
+// 215, 30, 40, 1),
|
|
|
|
400
|
+// fontSize:
|
|
|
|
401
|
+// ScreenUtil().setSp(26)),
|
|
|
|
402
|
+// ))
|
|
|
|
403
|
+// : SizedBox()
|
|
|
|
404
|
+// ])
|
|
|
|
405
|
+// ],
|
|
|
|
406
|
+// ),
|
|
|
|
407
|
+// ),
|
|
|
|
408
|
+// ],
|
|
|
|
409
|
+// );
|
|
|
|
410
|
+// }),
|
|
|
|
411
|
+// ListView.builder(
|
|
|
|
412
|
+// controller: _controller,
|
|
|
|
413
|
+// shrinkWrap: true,
|
|
|
|
414
|
+// cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
415
|
+// itemCount:
|
|
|
|
416
|
+// customerProvider.guestSunmodel.tips.recover ==
|
|
|
|
417
|
+// null ||
|
|
|
|
418
|
+// customerProvider.guestSunmodel.tips.recover
|
|
|
|
419
|
+// .length ==
|
|
|
|
420
|
+// 0
|
|
|
|
421
|
+// ? 0
|
|
|
|
422
|
+// : 1,
|
|
|
|
423
|
+// itemBuilder: (BuildContext context, int index) {
|
|
|
|
424
|
+// // locationState = state;
|
|
425
|
|
425
|
|
|
426
|
- return Column(
|
|
|
|
427
|
- children: [
|
|
|
|
428
|
- VEmptyView(10),
|
|
|
|
429
|
- Container(
|
|
|
|
430
|
- color: MyColours.color_ffffff,
|
|
|
|
431
|
- padding: EdgeInsets.symmetric(
|
|
|
|
432
|
- horizontal: ScreenUtil().setWidth(20),
|
|
|
|
433
|
- vertical: ScreenUtil().setWidth(30)),
|
|
|
|
434
|
- child: Row(
|
|
|
|
435
|
- children: [
|
|
|
|
436
|
- Image.asset(
|
|
|
|
437
|
- Utils.getImgPath('warning'),
|
|
|
|
438
|
- width: ScreenUtil().setWidth(42),
|
|
|
|
439
|
- ),
|
|
|
|
440
|
- HEmptyView(15),
|
|
|
|
441
|
- Expanded(
|
|
|
|
442
|
- child: Text(
|
|
|
|
443
|
- '${customerProvider.guestSunmodel.tips.recover[0]}',
|
|
|
|
444
|
- maxLines: 10,
|
|
|
|
445
|
- overflow: TextOverflow.ellipsis,
|
|
|
|
446
|
- style: TextStyle(
|
|
|
|
447
|
- color: MyColours.color_333333,
|
|
|
|
448
|
- fontSize: ScreenUtil().setSp(32)),
|
|
|
|
449
|
- )),
|
|
|
|
450
|
- HEmptyView(20),
|
|
|
|
451
|
- RoundButton(
|
|
|
|
452
|
- text: '一键追回',
|
|
|
|
453
|
- padding: EdgeInsets.symmetric(
|
|
|
|
454
|
- horizontal:
|
|
|
|
455
|
- ScreenUtil().setWidth(26)),
|
|
|
|
456
|
- gradientStart: MyColours.color_199095,
|
|
|
|
457
|
- gradientEnd: MyColours.color_199095,
|
|
|
|
458
|
- // borderColor: MyColours.color_999999,
|
|
|
|
459
|
- radius: ScreenUtil().setWidth(40),
|
|
|
|
460
|
- height: ScreenUtil().setWidth(64),
|
|
|
|
461
|
- width: ScreenUtil().setWidth(180),
|
|
|
|
462
|
- fontSize: 26,
|
|
|
|
463
|
- isBold: false,
|
|
|
|
464
|
- onPressed: () {
|
|
|
|
465
|
- NavigatorUtil.goMyMakeMarkingPage(
|
|
|
|
466
|
- context,
|
|
|
|
467
|
- fromPage:
|
|
|
|
468
|
- FromPage.FromPageMyCustomer,
|
|
|
|
469
|
- homeGid: Utils.listToStringEnglish1(
|
|
|
|
470
|
- customerProvider.guestSunmodel
|
|
|
|
471
|
- .tips.recover[1]));
|
|
|
|
472
|
- },
|
|
|
|
473
|
- ),
|
|
|
|
474
|
- ],
|
|
|
|
475
|
- ),
|
|
|
|
476
|
- ),
|
|
|
|
477
|
- ],
|
|
|
|
478
|
- );
|
|
|
|
479
|
- }),
|
|
|
|
480
|
- ListView.builder(
|
|
|
|
481
|
- controller: _controller,
|
|
|
|
482
|
- shrinkWrap: true,
|
|
|
|
483
|
- cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
484
|
- itemCount: customerProvider.guestSunmodel.tips.awaken ==
|
|
|
|
485
|
- null ||
|
|
|
|
486
|
- customerProvider
|
|
|
|
487
|
- .guestSunmodel.tips.awaken.length ==
|
|
|
|
488
|
- 0
|
|
|
|
489
|
- ? 0
|
|
|
|
490
|
- : 1,
|
|
|
|
491
|
- itemBuilder: (BuildContext context, int index) {
|
|
|
|
492
|
- // locationState = state;
|
426
|
+// return Column(
|
|
|
|
427
|
+// children: [
|
|
|
|
428
|
+// VEmptyView(10),
|
|
|
|
429
|
+// Container(
|
|
|
|
430
|
+// color: MyColours.color_ffffff,
|
|
|
|
431
|
+// padding: EdgeInsets.symmetric(
|
|
|
|
432
|
+// horizontal: ScreenUtil().setWidth(20),
|
|
|
|
433
|
+// vertical: ScreenUtil().setWidth(30)),
|
|
|
|
434
|
+// child: Row(
|
|
|
|
435
|
+// children: [
|
|
|
|
436
|
+// Image.asset(
|
|
|
|
437
|
+// Utils.getImgPath('warning'),
|
|
|
|
438
|
+// width: ScreenUtil().setWidth(42),
|
|
|
|
439
|
+// ),
|
|
|
|
440
|
+// HEmptyView(15),
|
|
|
|
441
|
+// Expanded(
|
|
|
|
442
|
+// child: Text(
|
|
|
|
443
|
+// '${customerProvider.guestSunmodel.tips.recover[0]}',
|
|
|
|
444
|
+// maxLines: 10,
|
|
|
|
445
|
+// overflow: TextOverflow.ellipsis,
|
|
|
|
446
|
+// style: TextStyle(
|
|
|
|
447
|
+// color: MyColours.color_333333,
|
|
|
|
448
|
+// fontSize: ScreenUtil().setSp(32)),
|
|
|
|
449
|
+// )),
|
|
|
|
450
|
+// HEmptyView(20),
|
|
|
|
451
|
+// RoundButton(
|
|
|
|
452
|
+// text: '一键追回',
|
|
|
|
453
|
+// padding: EdgeInsets.symmetric(
|
|
|
|
454
|
+// horizontal:
|
|
|
|
455
|
+// ScreenUtil().setWidth(26)),
|
|
|
|
456
|
+// gradientStart: MyColours.color_199095,
|
|
|
|
457
|
+// gradientEnd: MyColours.color_199095,
|
|
|
|
458
|
+// // borderColor: MyColours.color_999999,
|
|
|
|
459
|
+// radius: ScreenUtil().setWidth(40),
|
|
|
|
460
|
+// height: ScreenUtil().setWidth(64),
|
|
|
|
461
|
+// width: ScreenUtil().setWidth(180),
|
|
|
|
462
|
+// fontSize: 26,
|
|
|
|
463
|
+// isBold: false,
|
|
|
|
464
|
+// onPressed: () {
|
|
|
|
465
|
+// NavigatorUtil.goMyMakeMarkingPage(
|
|
|
|
466
|
+// context,
|
|
|
|
467
|
+// fromPage:
|
|
|
|
468
|
+// FromPage.FromPageMyCustomer,
|
|
|
|
469
|
+// homeGid: Utils.listToStringEnglish1(
|
|
|
|
470
|
+// customerProvider.guestSunmodel
|
|
|
|
471
|
+// .tips.recover[1]));
|
|
|
|
472
|
+// },
|
|
|
|
473
|
+// ),
|
|
|
|
474
|
+// ],
|
|
|
|
475
|
+// ),
|
|
|
|
476
|
+// ),
|
|
|
|
477
|
+// ],
|
|
|
|
478
|
+// );
|
|
|
|
479
|
+// }),
|
|
|
|
480
|
+// ListView.builder(
|
|
|
|
481
|
+// controller: _controller,
|
|
|
|
482
|
+// shrinkWrap: true,
|
|
|
|
483
|
+// cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
484
|
+// itemCount: customerProvider.guestSunmodel.tips.awaken ==
|
|
|
|
485
|
+// null ||
|
|
|
|
486
|
+// customerProvider
|
|
|
|
487
|
+// .guestSunmodel.tips.awaken.length ==
|
|
|
|
488
|
+// 0
|
|
|
|
489
|
+// ? 0
|
|
|
|
490
|
+// : 1,
|
|
|
|
491
|
+// itemBuilder: (BuildContext context, int index) {
|
|
|
|
492
|
+// // locationState = state;
|
|
493
|
|
493
|
|
|
494
|
- return Column(
|
|
|
|
495
|
- children: [
|
|
|
|
496
|
- VEmptyView(10),
|
|
|
|
497
|
- Container(
|
|
|
|
498
|
- color: MyColours.color_ffffff,
|
|
|
|
499
|
- padding: EdgeInsets.symmetric(
|
|
|
|
500
|
- horizontal: ScreenUtil().setWidth(20),
|
|
|
|
501
|
- vertical: ScreenUtil().setWidth(30)),
|
|
|
|
502
|
- child: Row(
|
|
|
|
503
|
- children: [
|
|
|
|
504
|
- Image.asset(
|
|
|
|
505
|
- Utils.getImgPath('warning'),
|
|
|
|
506
|
- width: ScreenUtil().setWidth(42),
|
|
|
|
507
|
- ),
|
|
|
|
508
|
- HEmptyView(15),
|
|
|
|
509
|
- Expanded(
|
|
|
|
510
|
- child: Text(
|
|
|
|
511
|
- '${customerProvider.guestSunmodel.tips.awaken[0]}',
|
|
|
|
512
|
- maxLines: 10,
|
|
|
|
513
|
- overflow: TextOverflow.ellipsis,
|
|
|
|
514
|
- style: TextStyle(
|
|
|
|
515
|
- color: MyColours.color_333333,
|
|
|
|
516
|
- fontSize: ScreenUtil().setSp(32)),
|
|
|
|
517
|
- )),
|
|
|
|
518
|
- HEmptyView(20),
|
|
|
|
519
|
- RoundButton(
|
|
|
|
520
|
- text: '一键唤醒',
|
|
|
|
521
|
- padding: EdgeInsets.symmetric(
|
|
|
|
522
|
- horizontal:
|
|
|
|
523
|
- ScreenUtil().setWidth(26)),
|
|
|
|
524
|
- gradientStart: MyColours.color_199095,
|
|
|
|
525
|
- gradientEnd: MyColours.color_199095,
|
|
|
|
526
|
- // borderColor: MyColours.color_999999,
|
|
|
|
527
|
- radius: ScreenUtil().setWidth(40),
|
|
|
|
528
|
- height: ScreenUtil().setWidth(64),
|
|
|
|
529
|
- width: ScreenUtil().setWidth(180),
|
|
|
|
530
|
- fontSize: 26,
|
|
|
|
531
|
- isBold: false,
|
|
|
|
532
|
- onPressed: () {
|
|
|
|
533
|
- NavigatorUtil.goMyMakeMarkingPage(
|
|
|
|
534
|
- context,
|
|
|
|
535
|
- fromPage:
|
|
|
|
536
|
- FromPage.FromPageMyCustomer,
|
|
|
|
537
|
- homeGid: Utils.listToStringEnglish1(
|
|
|
|
538
|
- customerProvider.guestSunmodel
|
|
|
|
539
|
- .tips.awaken[1]));
|
|
|
|
540
|
- },
|
|
|
|
541
|
- ),
|
|
|
|
542
|
- ],
|
|
|
|
543
|
- ),
|
|
|
|
544
|
- ),
|
|
|
|
545
|
- ],
|
|
|
|
546
|
- );
|
|
|
|
547
|
- })
|
|
|
|
548
|
- ],
|
|
|
|
549
|
- ),
|
|
|
|
550
|
- )),
|
|
|
|
551
|
- Padding(
|
|
|
|
552
|
- padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(30)),
|
|
|
|
553
|
- child: Stack(
|
|
|
|
554
|
- children: [
|
|
|
|
555
|
- RoundButton(
|
|
|
|
556
|
- onPressed: () {
|
|
|
|
557
|
- NavigatorUtil.goMyMarketingRecordsPage(
|
|
|
|
558
|
- context, FromPage.FromPageMyCustomer);
|
|
|
|
559
|
- },
|
|
|
|
560
|
- text: '营销记录',
|
|
|
|
561
|
- fontSize: 24,
|
|
|
|
562
|
- isBold: false,
|
|
|
|
563
|
- textColor: MyColours.color_199095,
|
|
|
|
564
|
- gradientStart: MyColours.color_ffffff,
|
|
|
|
565
|
- gradientEnd: MyColours.color_ffffff,
|
|
|
|
566
|
- borderColor: MyColours.color_199095,
|
|
|
|
567
|
- height: ScreenUtil().setWidth(75),
|
|
|
|
568
|
- width: ScreenUtil().setWidth(260),
|
|
|
|
569
|
- radius: ScreenUtil().setWidth(10),
|
|
|
|
570
|
- ),
|
|
|
|
571
|
- showWarning
|
|
|
|
572
|
- ? Positioned(
|
|
|
|
573
|
- right: ScreenUtil().setWidth(30),
|
|
|
|
574
|
- top: ScreenUtil().setWidth(40 / 2),
|
|
|
|
575
|
- child: Image.asset(
|
|
|
|
576
|
- Utils.getImgPath('warning'),
|
|
|
|
577
|
- width: ScreenUtil().setWidth(35),
|
|
|
|
578
|
- ))
|
|
|
|
579
|
- : SizedBox()
|
|
|
|
580
|
- ],
|
|
|
|
581
|
- ))
|
|
|
|
582
|
- ]);
|
|
|
|
583
|
- }
|
|
|
|
584
|
- })));
|
|
|
|
585
|
- }
|
|
|
|
586
|
-} |
494
|
+// return Column(
|
|
|
|
495
|
+// children: [
|
|
|
|
496
|
+// VEmptyView(10),
|
|
|
|
497
|
+// Container(
|
|
|
|
498
|
+// color: MyColours.color_ffffff,
|
|
|
|
499
|
+// padding: EdgeInsets.symmetric(
|
|
|
|
500
|
+// horizontal: ScreenUtil().setWidth(20),
|
|
|
|
501
|
+// vertical: ScreenUtil().setWidth(30)),
|
|
|
|
502
|
+// child: Row(
|
|
|
|
503
|
+// children: [
|
|
|
|
504
|
+// Image.asset(
|
|
|
|
505
|
+// Utils.getImgPath('warning'),
|
|
|
|
506
|
+// width: ScreenUtil().setWidth(42),
|
|
|
|
507
|
+// ),
|
|
|
|
508
|
+// HEmptyView(15),
|
|
|
|
509
|
+// Expanded(
|
|
|
|
510
|
+// child: Text(
|
|
|
|
511
|
+// '${customerProvider.guestSunmodel.tips.awaken[0]}',
|
|
|
|
512
|
+// maxLines: 10,
|
|
|
|
513
|
+// overflow: TextOverflow.ellipsis,
|
|
|
|
514
|
+// style: TextStyle(
|
|
|
|
515
|
+// color: MyColours.color_333333,
|
|
|
|
516
|
+// fontSize: ScreenUtil().setSp(32)),
|
|
|
|
517
|
+// )),
|
|
|
|
518
|
+// HEmptyView(20),
|
|
|
|
519
|
+// RoundButton(
|
|
|
|
520
|
+// text: '一键唤醒',
|
|
|
|
521
|
+// padding: EdgeInsets.symmetric(
|
|
|
|
522
|
+// horizontal:
|
|
|
|
523
|
+// ScreenUtil().setWidth(26)),
|
|
|
|
524
|
+// gradientStart: MyColours.color_199095,
|
|
|
|
525
|
+// gradientEnd: MyColours.color_199095,
|
|
|
|
526
|
+// // borderColor: MyColours.color_999999,
|
|
|
|
527
|
+// radius: ScreenUtil().setWidth(40),
|
|
|
|
528
|
+// height: ScreenUtil().setWidth(64),
|
|
|
|
529
|
+// width: ScreenUtil().setWidth(180),
|
|
|
|
530
|
+// fontSize: 26,
|
|
|
|
531
|
+// isBold: false,
|
|
|
|
532
|
+// onPressed: () {
|
|
|
|
533
|
+// NavigatorUtil.goMyMakeMarkingPage(
|
|
|
|
534
|
+// context,
|
|
|
|
535
|
+// fromPage:
|
|
|
|
536
|
+// FromPage.FromPageMyCustomer,
|
|
|
|
537
|
+// homeGid: Utils.listToStringEnglish1(
|
|
|
|
538
|
+// customerProvider.guestSunmodel
|
|
|
|
539
|
+// .tips.awaken[1]));
|
|
|
|
540
|
+// },
|
|
|
|
541
|
+// ),
|
|
|
|
542
|
+// ],
|
|
|
|
543
|
+// ),
|
|
|
|
544
|
+// ),
|
|
|
|
545
|
+// ],
|
|
|
|
546
|
+// );
|
|
|
|
547
|
+// })
|
|
|
|
548
|
+// ],
|
|
|
|
549
|
+// ),
|
|
|
|
550
|
+// )),
|
|
|
|
551
|
+// Padding(
|
|
|
|
552
|
+// padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(30)),
|
|
|
|
553
|
+// child: Stack(
|
|
|
|
554
|
+// children: [
|
|
|
|
555
|
+// RoundButton(
|
|
|
|
556
|
+// onPressed: () {
|
|
|
|
557
|
+// NavigatorUtil.goMyMarketingRecordsPage(
|
|
|
|
558
|
+// context, FromPage.FromPageMyCustomer);
|
|
|
|
559
|
+// },
|
|
|
|
560
|
+// text: '营销记录',
|
|
|
|
561
|
+// fontSize: 24,
|
|
|
|
562
|
+// isBold: false,
|
|
|
|
563
|
+// textColor: MyColours.color_199095,
|
|
|
|
564
|
+// gradientStart: MyColours.color_ffffff,
|
|
|
|
565
|
+// gradientEnd: MyColours.color_ffffff,
|
|
|
|
566
|
+// borderColor: MyColours.color_199095,
|
|
|
|
567
|
+// height: ScreenUtil().setWidth(75),
|
|
|
|
568
|
+// width: ScreenUtil().setWidth(260),
|
|
|
|
569
|
+// radius: ScreenUtil().setWidth(10),
|
|
|
|
570
|
+// ),
|
|
|
|
571
|
+// showWarning
|
|
|
|
572
|
+// ? Positioned(
|
|
|
|
573
|
+// right: ScreenUtil().setWidth(30),
|
|
|
|
574
|
+// top: ScreenUtil().setWidth(40 / 2),
|
|
|
|
575
|
+// child: Image.asset(
|
|
|
|
576
|
+// Utils.getImgPath('warning'),
|
|
|
|
577
|
+// width: ScreenUtil().setWidth(35),
|
|
|
|
578
|
+// ))
|
|
|
|
579
|
+// : SizedBox()
|
|
|
|
580
|
+// ],
|
|
|
|
581
|
+// ))
|
|
|
|
582
|
+// ]);
|
|
|
|
583
|
+// }
|
|
|
|
584
|
+// })));
|
|
|
|
585
|
+// }
|
|
|
|
586
|
+// } |