|
...
|
...
|
@@ -45,15 +45,14 @@ class CustomerListPageSim extends StatefulWidget { |
|
|
|
// final bool distribution;
|
|
|
|
// final List<SellerUser> sellerUser;
|
|
|
|
|
|
|
|
const CustomerListPageSim(
|
|
|
|
{Key key,
|
|
|
|
// this.fromPage,
|
|
|
|
// this.index,
|
|
|
|
// this.uidStr,
|
|
|
|
// this.distribution = false,
|
|
|
|
// this.sellerUser
|
|
|
|
})
|
|
|
|
: super(key: key);
|
|
|
|
const CustomerListPageSim({
|
|
|
|
Key key,
|
|
|
|
// this.fromPage,
|
|
|
|
// this.index,
|
|
|
|
// this.uidStr,
|
|
|
|
// this.distribution = false,
|
|
|
|
// this.sellerUser
|
|
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
|
|
_CustomerListPageSimState createState() => _CustomerListPageSimState();
|
|
|
|
}
|
|
...
|
...
|
@@ -82,8 +81,8 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
// uidAct = widget.uidStr;
|
|
|
|
|
|
|
|
// distribution = widget.distribution;
|
|
|
|
_tabBarTitle = ['全部', '活跃', '${S.of(context).dormant}', '${S.of(context).lost}'];
|
|
|
|
// timeTilte = ['大于', '等于', '小于'];
|
|
|
|
_tabBarTitle = ['全部', '活跃', '沉睡', '流失'];
|
|
|
|
super.initState();
|
|
|
|
tabController = TabController(length: 4, vsync: this);
|
|
|
|
// tabController.index = int.parse(widget.index);
|
|
...
|
...
|
@@ -133,7 +132,18 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
}
|
|
|
|
});
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
|
|
|
timeTilte = ['${S.of(context).equals}', '${S.of(context).less_than}', '${S.of(context).greater_than}'];
|
|
|
|
_tabBarTitle = [
|
|
|
|
'${S.of(context).all}',
|
|
|
|
'${S.of(context).active}',
|
|
|
|
'${S.of(context).dormant}',
|
|
|
|
'${S.of(context).lost}'
|
|
|
|
];
|
|
|
|
|
|
|
|
timeTilte = [
|
|
|
|
'${S.of(context).equals}',
|
|
|
|
'${S.of(context).less_than}',
|
|
|
|
'${S.of(context).greater_than}'
|
|
|
|
];
|
|
|
|
bool first = true;
|
|
|
|
getSellerVersion();
|
|
|
|
_getSeller();
|
|
...
|
...
|
@@ -192,8 +202,6 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
super.dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_getManagerAndList() async {
|
|
|
|
_getContantData();
|
|
|
|
// _getSellerGuestManage();
|
|
...
|
...
|
@@ -821,7 +829,8 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
if (value.title == '活跃') {
|
|
|
|
tabController.index = 1;
|
|
|
|
customerProvider.index = 1;
|
|
|
|
} else if (value.title == '${S.of(context).dormant}') {
|
|
|
|
} else if (value.title ==
|
|
|
|
'${S.of(context).dormant}') {
|
|
|
|
tabController.index = 2;
|
|
|
|
customerProvider.index = 2;
|
|
|
|
} else if (value.title == '${S.of(context).lost}') {
|
|
...
|
...
|
@@ -977,7 +986,8 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
_textWidget('${S.of(context).customer_manager}', MyColours.color_515151, FontWeight.bold, 28),
|
|
|
|
_textWidget('${S.of(context).customer_manager}',
|
|
|
|
MyColours.color_515151, FontWeight.bold, 28),
|
|
|
|
GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
state(() {
|
|
...
|
...
|
@@ -1004,7 +1014,9 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
alignment: Alignment.center,
|
|
|
|
padding: EdgeInsets.only(left: ScreenUtil().setWidth(130)),
|
|
|
|
child: _textWidget(
|
|
|
|
customerProvider.manageSelAll ? '全不选' : '${S.of(context).select_all}',
|
|
|
|
customerProvider.manageSelAll
|
|
|
|
? '全不选'
|
|
|
|
: '${S.of(context).select_all}',
|
|
|
|
MyColours.color_199095,
|
|
|
|
FontWeight.normal,
|
|
|
|
24)),
|
|
...
|
...
|
@@ -1039,7 +1051,8 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
_textWidget('${S.of(context).activity_level}', MyColours.color_515151, FontWeight.bold, 28),
|
|
|
|
_textWidget('${S.of(context).activity_level}',
|
|
|
|
MyColours.color_515151, FontWeight.bold, 28),
|
|
|
|
GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
state(() {
|
|
...
|
...
|
@@ -1062,8 +1075,13 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
height: ScreenUtil().setWidth(40),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
padding: EdgeInsets.only(left: ScreenUtil().setWidth(130)),
|
|
|
|
child: _textWidget(customerProvider.hydSelAll ? '全不选' : '${S.of(context).select_all}',
|
|
|
|
MyColours.color_199095, FontWeight.normal, 24)),
|
|
|
|
child: _textWidget(
|
|
|
|
customerProvider.hydSelAll
|
|
|
|
? '全不选'
|
|
|
|
: '${S.of(context).select_all}',
|
|
|
|
MyColours.color_199095,
|
|
|
|
FontWeight.normal,
|
|
|
|
24)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
...
|
...
|
@@ -1109,7 +1127,8 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
_textWidget('${S.of(context).custom_tags}', MyColours.color_515151, FontWeight.bold, 28),
|
|
|
|
_textWidget('${S.of(context).custom_tags}', MyColours.color_515151,
|
|
|
|
FontWeight.bold, 28),
|
|
|
|
GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
state(() {
|
|
...
|
...
|
@@ -1134,7 +1153,9 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
alignment: Alignment.center,
|
|
|
|
padding: EdgeInsets.only(left: ScreenUtil().setWidth(130)),
|
|
|
|
child: _textWidget(
|
|
|
|
customerProvider.labelSelAll ? '全不选' : '${S.of(context).select_all}',
|
|
|
|
customerProvider.labelSelAll
|
|
|
|
? '全不选'
|
|
|
|
: '${S.of(context).select_all}',
|
|
|
|
MyColours.color_199095,
|
|
|
|
FontWeight.normal,
|
|
|
|
24))),
|
|
...
|
...
|
@@ -1299,7 +1320,8 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
_textWidget('${S.of(context).custom_time}', MyColours.color_515151, FontWeight.bold, 28),
|
|
|
|
_textWidget('${S.of(context).custom_time}', MyColours.color_515151,
|
|
|
|
FontWeight.bold, 28),
|
|
|
|
GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
customerProvider.controllerstime.text = '';
|
|
...
|
...
|
@@ -1314,8 +1336,8 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
height: ScreenUtil().setWidth(40),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
padding: EdgeInsets.only(left: ScreenUtil().setWidth(130)),
|
|
|
|
child: _textWidget(
|
|
|
|
S.of(context).clear, MyColours.color_199095, FontWeight.normal, 24),
|
|
|
|
child: _textWidget(S.of(context).clear,
|
|
|
|
MyColours.color_199095, FontWeight.normal, 24),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
...
|
...
|
@@ -1392,7 +1414,8 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
}))
|
|
|
|
])),
|
|
|
|
VEmptyView(40),
|
|
|
|
_textWidget('${S.of(context).reservation_times}', MyColours.color_515151, FontWeight.bold, 28),
|
|
|
|
_textWidget('${S.of(context).reservation_times}',
|
|
|
|
MyColours.color_515151, FontWeight.bold, 28),
|
|
|
|
VEmptyView(20),
|
|
|
|
/**
|
|
|
|
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
...
|
...
|
@@ -1754,7 +1777,7 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
child: Align(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: _textWidget(
|
|
|
|
S.of(context).confirm,
|
|
|
|
S.of(context).confirm,
|
|
|
|
MyColours.color_ffffff,
|
|
|
|
FontWeight.normal,
|
|
|
|
30),
|
|
...
|
...
|
@@ -1907,60 +1930,62 @@ class _CustomerListPageSimState extends State<CustomerListPageSim> |
|
|
|
child: Column(mainAxisSize: MainAxisSize.min, children: [
|
|
|
|
_searchWidget(),
|
|
|
|
// _menuWidget(),
|
|
|
|
Expanded(child: Consumer<CustomerProvider>(builder: (context, model, _) {
|
|
|
|
if (model.pageState != PageState.Success) {
|
|
|
|
return ExceptionPage(
|
|
|
|
pageState: model.pageState,
|
|
|
|
callback: () {
|
|
|
|
model.pageState = PageState.Loading;
|
|
|
|
model.notifyListeners();
|
|
|
|
page = 1;
|
|
|
|
customerProvider.pageData = [];
|
|
|
|
_getContantData();
|
|
|
|
},
|
|
|
|
emptyMsg: "暂时没有客户哦",
|
|
|
|
emptyImg: "empty_search",
|
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return Container(
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
// height: 500,
|
|
|
|
child: ContactListPage(
|
|
|
|
contacts: model.customerBySellerList,
|
|
|
|
provider: customerProvider,
|
|
|
|
// fromPage: widget.fromPage,
|
|
|
|
sellerPreserve: collectStoreProvider.sellerPreserve,
|
|
|
|
sellerMarketing: collectStoreProvider.sellerMarketing),
|
|
|
|
);
|
|
|
|
// EasyRefresh(
|
|
|
|
// onRefresh: () async {
|
|
|
|
// // page = 0;
|
|
|
|
// // _getContantData(showLoading: false);
|
|
|
|
// },
|
|
|
|
// onLoad: () async {
|
|
|
|
// // page++;
|
|
|
|
// // _getContantData(showLoading: false);
|
|
|
|
// },
|
|
|
|
// child:
|
|
|
|
|
|
|
|
// SliverList(
|
|
|
|
// delegate: SliverChildBuilderDelegate(
|
|
|
|
// (BuildContext context, int index) {
|
|
|
|
// return Container(
|
|
|
|
// color: MyColours.color_f3f3f3,
|
|
|
|
// // height: 500,
|
|
|
|
// child: ContactListPageSim(
|
|
|
|
// contacts: model.customerBySellerList,
|
|
|
|
// provider: customerProvider,
|
|
|
|
// fromPage: widget.fromPage),
|
|
|
|
// );
|
|
|
|
// }, childCount: 1),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
Expanded(child:
|
|
|
|
Consumer<CustomerProvider>(builder: (context, model, _) {
|
|
|
|
if (model.pageState != PageState.Success) {
|
|
|
|
return ExceptionPage(
|
|
|
|
pageState: model.pageState,
|
|
|
|
callback: () {
|
|
|
|
model.pageState = PageState.Loading;
|
|
|
|
model.notifyListeners();
|
|
|
|
page = 1;
|
|
|
|
customerProvider.pageData = [];
|
|
|
|
_getContantData();
|
|
|
|
},
|
|
|
|
emptyMsg: "暂时没有客户哦",
|
|
|
|
emptyImg: "empty_search",
|
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return Container(
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
// height: 500,
|
|
|
|
child: ContactListPage(
|
|
|
|
contacts: model.customerBySellerList,
|
|
|
|
provider: customerProvider,
|
|
|
|
// fromPage: widget.fromPage,
|
|
|
|
sellerPreserve: collectStoreProvider.sellerPreserve,
|
|
|
|
sellerMarketing:
|
|
|
|
collectStoreProvider.sellerMarketing),
|
|
|
|
);
|
|
|
|
// EasyRefresh(
|
|
|
|
// onRefresh: () async {
|
|
|
|
// // page = 0;
|
|
|
|
// // _getContantData(showLoading: false);
|
|
|
|
// },
|
|
|
|
// onLoad: () async {
|
|
|
|
// // page++;
|
|
|
|
// // _getContantData(showLoading: false);
|
|
|
|
// },
|
|
|
|
// child:
|
|
|
|
|
|
|
|
// SliverList(
|
|
|
|
// delegate: SliverChildBuilderDelegate(
|
|
|
|
// (BuildContext context, int index) {
|
|
|
|
// return Container(
|
|
|
|
// color: MyColours.color_f3f3f3,
|
|
|
|
// // height: 500,
|
|
|
|
// child: ContactListPageSim(
|
|
|
|
// contacts: model.customerBySellerList,
|
|
|
|
// provider: customerProvider,
|
|
|
|
// fromPage: widget.fromPage),
|
|
|
|
// );
|
|
|
|
// }, childCount: 1),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
|
|
|
|
}
|
|
|
|
}))
|
|
|
|
}
|
|
|
|
}))
|
|
|
|
|
|
|
|
// Expanded(
|
|
|
|
// child: TabBarView(
|
...
|
...
|
|