|
|
|
import 'dart:convert';
|
|
|
|
import 'dart:ui';
|
|
|
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:one_key/constant/state.dart';
|
|
|
|
import 'package:one_key/models/guest_manage_model.dart';
|
|
|
|
import 'package:one_key/models/marketing_by_uid_model.dart';
|
|
|
|
import 'package:one_key/provider/customer_provider.dart';
|
|
|
|
import 'package:one_key/provider/personnel_provider.dart';
|
|
|
|
import 'package:one_key/provider/user_model.dart';
|
|
|
|
import 'package:one_key/res/colors.dart';
|
|
|
|
import 'package:one_key/route/navigator_util.dart';
|
|
|
|
import 'package:one_key/utils/event_bus.dart';
|
|
|
|
import 'package:one_key/utils/utils.dart';
|
|
|
|
import 'package:one_key/widgets/h_empty_view.dart';
|
|
|
|
import 'package:one_key/widgets/page_exception.dart';
|
|
|
|
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 '../../../../models/message_menu_model.dart';
|
|
|
|
import '../../../../models/personnel_manage_model.dart';
|
|
|
|
import '../../../../models/seller_counts_list.dart';
|
|
|
|
import '../../../../models/store_customer_home_model.dart';
|
|
|
|
import '../../../../utils/screen_util.dart';
|
|
|
|
import '../../../../widgets/MyDivider.dart';
|
|
|
|
import '../month_item.dart';
|
|
|
|
import '../store_customer/bar_chart_page.dart';
|
|
|
|
import 'month_order_page.dart';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 月度订单分经理页面
|
|
|
|
*/
|
|
|
|
class MonthOrderHomeRightPage extends StatefulWidget {
|
|
|
|
final CustomerProvider customerProvider;
|
|
|
|
|
|
|
|
MonthOrderHomeRightPage({
|
|
|
|
Key key,
|
|
|
|
this.customerProvider,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
_MonthOrderHomeRightpageStateMonth createState() =>
|
|
|
|
_MonthOrderHomeRightpageStateMonth();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _MonthOrderHomeRightpageStateMonth
|
|
|
|
extends State<MonthOrderHomeRightPage> {
|
|
|
|
ScrollController _controller = ScrollController();
|
|
|
|
|
|
|
|
// int year;
|
|
|
|
|
|
|
|
List<MessageMenuModel> menuTitle = [];
|
|
|
|
|
|
|
|
PersonnelProvider personnelProvider;
|
|
|
|
|
|
|
|
List<PersonnelManageSunModel> data = [];
|
|
|
|
|
|
|
|
CustomerProvider customerProvider;
|
|
|
|
|
|
|
|
String uid = '';
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
// year = DateTime.now().year;
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
|
|
|
print(mounted);
|
|
|
|
|
|
|
|
await _getAuthUserLists(showLoading: false);
|
|
|
|
await _getSellerCountsListByMonth(isShowLoading: false);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
void dispose() {
|
|
|
|
super.dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
//获取员工信息列表
|
|
|
|
_getAuthUserLists({bool showLoading = true}) async {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"sellerid": Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
};
|
|
|
|
|
|
|
|
await personnelProvider.getAuthUserLists(context, params,
|
|
|
|
showLoading: showLoading);
|
|
|
|
|
|
|
|
if (personnelProvider.dataMap != null) {
|
|
|
|
data.addAll(personnelProvider.dataMap.admin.listdata);
|
|
|
|
data.addAll(personnelProvider.dataMap.shopowner.listdata);
|
|
|
|
data.addAll(personnelProvider.dataMap.manager.listdata);
|
|
|
|
data.addAll(personnelProvider.dataMap.cashier.listdata);
|
|
|
|
data.addAll(personnelProvider.dataMap.waiter.listdata);
|
|
|
|
data.addAll(personnelProvider.dataMap.reception.listdata);
|
|
|
|
data.addAll(personnelProvider.dataMap.welcome.listdata);
|
|
|
|
data.forEach((element) {
|
|
|
|
MessageMenuModel messageMenuModel = MessageMenuModel();
|
|
|
|
messageMenuModel.uid = element.id;
|
|
|
|
messageMenuModel.title = element.nickName ?? element.account;
|
|
|
|
messageMenuModel.select = false;
|
|
|
|
if (messageMenuModel.title != null) {
|
|
|
|
menuTitle.add(messageMenuModel);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
if (menuTitle.length > 0) {
|
|
|
|
menuTitle[0].select = true;
|
|
|
|
uid = menuTitle[0].uid;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (mounted) {
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
_getSellerCountsListByMonth(
|
|
|
|
{isShowLoading = false, VoidCallback callback}) async {
|
|
|
|
if (mounted) {
|
|
|
|
String uid = '';
|
|
|
|
menuTitle.forEach((element) {
|
|
|
|
if (element.select) {
|
|
|
|
uid = element.uid;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
Map<String, String> params = {
|
|
|
|
'sellerid':
|
|
|
|
Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
'year': DateTime.now().year.toString(),
|
|
|
|
'month': DateTime.now().month.toString(),
|
|
|
|
'uid': uid
|
|
|
|
};
|
|
|
|
|
|
|
|
await customerProvider.getSellerCountsListByMonth(context, params,
|
|
|
|
isShowLoading: isShowLoading);
|
|
|
|
// setState(() {});
|
|
|
|
if ((customerProvider.monthStaticsData == null ||
|
|
|
|
customerProvider.monthStaticsData.dayList.length == 0) &&
|
|
|
|
callback != null) {
|
|
|
|
callback();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// _getSellerCountsList({isShowLoading = false, VoidCallback callback}) async {
|
|
|
|
// String uid = '';
|
|
|
|
// menuTitle.forEach((element) {
|
|
|
|
// if (element.select) {
|
|
|
|
// uid = element.uid;
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
// 'year': year.toString(),
|
|
|
|
// 'uid': uid
|
|
|
|
// };
|
|
|
|
// await widget.customerProvider
|
|
|
|
// .getSellerCountsList(context, params, isShowLoading: isShowLoading);
|
|
|
|
// widget.customerProvider.pageStateMonthMyHome = pageStateMonth.Success;
|
|
|
|
// setState(() {});
|
|
|
|
// if ((widget.customerProvider.managerStatisticsList == null ||
|
|
|
|
// widget.customerProvider.managerStatisticsList.length == 0) &&
|
|
|
|
// callback != null) {
|
|
|
|
// callback();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
personnelProvider = Provider.of<PersonnelProvider>(context, listen: true);
|
|
|
|
customerProvider = Provider.of<CustomerProvider>(context, listen: true);
|
|
|
|
return Scaffold(
|
|
|
|
// backgroundColor: MyColours.color_f3f3f3,
|
|
|
|
// appBar: SystemAppBar('我的客情', onTap: () {
|
|
|
|
// EventBus().emit('changeStatusColor');
|
|
|
|
// Navigator.pop(context);
|
|
|
|
// }),
|
|
|
|
body: Column(children: [
|
|
|
|
Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
height: ScreenUtil().setWidth(70),
|
|
|
|
padding: EdgeInsets.only(bottom: w(12)),
|
|
|
|
margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
HEmptyView(48),
|
|
|
|
Expanded(
|
|
|
|
child: SizedBox(
|
|
|
|
// height: ScreenUtil().setWidth(30),
|
|
|
|
child: ListView.builder(
|
|
|
|
itemCount: menuTitle.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _controller,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
itemBuilder: (BuildContext contxt, int index) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
for (MessageMenuModel item in menuTitle) {
|
|
|
|
item.select = false;
|
|
|
|
}
|
|
|
|
menuTitle[index].select = true;
|
|
|
|
uid = menuTitle[index].uid;
|
|
|
|
customerProvider.pageStateMonth =
|
|
|
|
PageState.Loading;
|
|
|
|
setState(() {});
|
|
|
|
_getSellerCountsListByMonth();
|
|
|
|
// _getMarketingByUid();
|
|
|
|
// _getSellerCountsList();
|
|
|
|
// _getSellerCountsListByMonth(
|
|
|
|
// isShowLoading: true, callback: () {});
|
|
|
|
|
|
|
|
// offset = 0;
|
|
|
|
// 1提前点餐/2内部预订/10在线预订/15店内消息传/12在线买单
|
|
|
|
|
|
|
|
// if (index == 0) {
|
|
|
|
// typeid = '';
|
|
|
|
// } else if (index == 1) {
|
|
|
|
// //店内消息
|
|
|
|
// typeid = '15';
|
|
|
|
// } else if (index == 2) {
|
|
|
|
// //在线预订
|
|
|
|
// typeid = '10';
|
|
|
|
// } else if (index == 3) {
|
|
|
|
// //提前点餐
|
|
|
|
// typeid = '1';
|
|
|
|
// } else if (index == 4) {
|
|
|
|
// //在线买单
|
|
|
|
// typeid = '12';
|
|
|
|
// } else if (index == 5) {
|
|
|
|
// //会员充值
|
|
|
|
// typeid = '17';
|
|
|
|
// } else if (index == 6) {
|
|
|
|
// //存酒超期
|
|
|
|
// typeid = '18';
|
|
|
|
// }
|
|
|
|
// getMessage(typeid, showLoading: true);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
// width: ScreenUtil().setWidth(104 * 2),
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
right: ScreenUtil().setWidth(30),
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(10),
|
|
|
|
vertical: ScreenUtil().setWidth(4)),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(10)),
|
|
|
|
// color: menuTitle[index].select
|
|
|
|
// ? MyColours.color_438E93
|
|
|
|
// : MyColours.color_999999,
|
|
|
|
border: Border.all(
|
|
|
|
color: menuTitle[index].select
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: MyColours.color_999999,
|
|
|
|
width: ScreenUtil().setWidth(2))),
|
|
|
|
child: Text(
|
|
|
|
menuTitle[index].title,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: menuTitle[index].select
|
|
|
|
? MyColours.color_438E93
|
|
|
|
: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
fontWeight: FontWeight.normal),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
})))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
Consumer<CustomerProvider>(builder: (context, model, _) {
|
|
|
|
if (model.pageStateMonth != PageState.Success) {
|
|
|
|
return Expanded(
|
|
|
|
child: ExceptionPage(
|
|
|
|
pageState: model.pageStateMonth,
|
|
|
|
callback: () async {
|
|
|
|
await _getAuthUserLists(showLoading: true);
|
|
|
|
await _getSellerCountsListByMonth(isShowLoading: true);
|
|
|
|
},
|
|
|
|
emptyMsg: "暂时没有预订数据哦",
|
|
|
|
emptyImg: "empty_search",
|
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
));
|
|
|
|
} else {
|
|
|
|
return Expanded(
|
|
|
|
child: MonthOrderPage(
|
|
|
|
year: DateTime.now().year.toString(),
|
|
|
|
month: DateTime.now().month.toString(),
|
|
|
|
uid: uid,
|
|
|
|
needAppBar: false,
|
|
|
|
monthStaticsData: customerProvider.monthStaticsData));
|
|
|
|
}
|
|
|
|
}) //全店
|
|
|
|
// Consumer<CustomerProvider>(builder: (context, model, _) {
|
|
|
|
// if (model.pageStateMonthMyHome != pageStateMonth.Success) {
|
|
|
|
// if (model.pageStateMonthMyHome == pageStateMonth.Loading) {
|
|
|
|
// return SingleChildScrollView(
|
|
|
|
// controller: _controller,
|
|
|
|
// child: Stack(alignment: Alignment.center, children: [
|
|
|
|
// Column(children: [
|
|
|
|
// VEmptyView(10),
|
|
|
|
// // Stack(
|
|
|
|
// // children: [
|
|
|
|
// Container(
|
|
|
|
// height: w(80),
|
|
|
|
// color: MyColours.color_ffffff,
|
|
|
|
// child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// Text(
|
|
|
|
// '',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_438E93,
|
|
|
|
// fontSize: ScreenUtil().setSp(64),
|
|
|
|
// fontWeight: FontWeight.bold),
|
|
|
|
// ),
|
|
|
|
// Text(
|
|
|
|
// '位',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_515151,
|
|
|
|
// // fontWeight: FontWeight.bold,
|
|
|
|
// fontSize: ScreenUtil().setSp(32)),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// VEmptyView(10),
|
|
|
|
// Row(
|
|
|
|
// children: [
|
|
|
|
// _percentWidget('', '活跃', '', tap: false),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// _percentWidget('', '60天未预订', '', tap: false),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// _percentWidget('', '120天未预订', '', tap: false),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// // VEmptyView(10),
|
|
|
|
// // GridView.builder(
|
|
|
|
// // controller: _controller,
|
|
|
|
// // shrinkWrap: true,
|
|
|
|
// // cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
// // itemCount: 6,
|
|
|
|
// // gridDelegate:
|
|
|
|
// // SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
// // crossAxisCount: 3,
|
|
|
|
// // childAspectRatio: 1.05,
|
|
|
|
// // mainAxisSpacing:
|
|
|
|
// // ScreenUtil().setWidth(10),
|
|
|
|
// // crossAxisSpacing:
|
|
|
|
// // ScreenUtil().setWidth(10)),
|
|
|
|
// // itemBuilder: (BuildContext context, int index) {
|
|
|
|
// // return _managerWidget('', '', null, '',
|
|
|
|
// // uid: '', onTap: () {});
|
|
|
|
// // })
|
|
|
|
// ]),
|
|
|
|
// Align(
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// child: Center(
|
|
|
|
// child: Column(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
// children: <Widget>[
|
|
|
|
// ClipRRect(
|
|
|
|
// borderRadius: BorderRadius.circular(10),
|
|
|
|
// child: Container(
|
|
|
|
// width: 200,
|
|
|
|
// height: 200,
|
|
|
|
// color: Colors.transparent,
|
|
|
|
// child: CupertinoActivityIndicator(
|
|
|
|
// color: MyColours.color_000000,
|
|
|
|
// radius: 30,
|
|
|
|
// ),
|
|
|
|
// ))
|
|
|
|
// // VEmptyView(30),
|
|
|
|
// // Text(
|
|
|
|
// // '加载中,请稍后...',
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // color: MyColours.color_666666,
|
|
|
|
// // fontSize: ScreenUtil().setSp(24)),
|
|
|
|
// // )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ))
|
|
|
|
// ]));
|
|
|
|
// }
|
|
|
|
// return Expanded(
|
|
|
|
// child: ExceptionPage(
|
|
|
|
// pageStateMonth: model.pageStateMonthMyHome,
|
|
|
|
// callback: () {
|
|
|
|
// _couponNetworkData();
|
|
|
|
|
|
|
|
// // _getMarketingByUid();
|
|
|
|
// _getSellerCountsList();
|
|
|
|
// },
|
|
|
|
// emptyMsg: "暂时没有我的客情哦",
|
|
|
|
// emptyImg: "empty_search",
|
|
|
|
// showMsg: "加载中,请稍后...",
|
|
|
|
// ));
|
|
|
|
// } else {
|
|
|
|
// return Expanded(
|
|
|
|
// child: SingleChildScrollView(
|
|
|
|
// controller: _controller,
|
|
|
|
// child: Column(
|
|
|
|
// children: [
|
|
|
|
// // VEmptyView(10),
|
|
|
|
|
|
|
|
// if (widget.customerProvider.guestSunmodel != null)
|
|
|
|
// Column(
|
|
|
|
// children: [
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// String uid = '';
|
|
|
|
// menuTitle.forEach((element) {
|
|
|
|
// if (element.select) {
|
|
|
|
// uid = element.uid;
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// NavigatorUtil.goMyCustomerListPage(
|
|
|
|
// context, FromPage.FromPageMyCustomer, uid);
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// height: w(80),
|
|
|
|
// color: MyColours.color_ffffff,
|
|
|
|
// child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// // Text(
|
|
|
|
// // '累计',
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // color: MyColours.color_515151,
|
|
|
|
// // fontWeight: FontWeight.bold,
|
|
|
|
// // fontSize: ScreenUtil().setSp(32)),
|
|
|
|
// // ),
|
|
|
|
// Text(
|
|
|
|
// '${widget.customerProvider.guestSunmodel.myCustomer}',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_199095,
|
|
|
|
// fontSize: ScreenUtil().setSp(64),
|
|
|
|
// fontWeight: FontWeight.bold),
|
|
|
|
// ),
|
|
|
|
// Text(
|
|
|
|
// '位',
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_515151,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// fontSize: ScreenUtil().setSp(32)),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// )),
|
|
|
|
// VEmptyView(10),
|
|
|
|
// // GridView.builder(
|
|
|
|
// // controller: _controller,
|
|
|
|
// // shrinkWrap: true,
|
|
|
|
// // cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
// // itemCount: 3,
|
|
|
|
// // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
// // crossAxisCount: 3,
|
|
|
|
// // childAspectRatio: 1,
|
|
|
|
// // mainAxisSpacing: ScreenUtil().setWidth(10),
|
|
|
|
// // crossAxisSpacing: ScreenUtil().setWidth(10)),
|
|
|
|
// // itemBuilder: (BuildContext context, int index) {
|
|
|
|
// // // locationState = state;
|
|
|
|
// // return _percentWidget(
|
|
|
|
// // '${widget.customerProvider.guestSunmodel.active.count}',
|
|
|
|
// // '活跃客户',
|
|
|
|
// // '${widget.customerProvider.guestSunmodel.active.scale}');
|
|
|
|
// // }),
|
|
|
|
// Row(
|
|
|
|
// children: [
|
|
|
|
// _percentWidget(
|
|
|
|
// '${widget.customerProvider.guestSunmodel.active.count}',
|
|
|
|
// '活跃',
|
|
|
|
// '${widget.customerProvider.guestSunmodel.active.scale}'),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// _percentWidget(
|
|
|
|
// '${widget.customerProvider.guestSunmodel.sleep.count}',
|
|
|
|
// '60天未预订',
|
|
|
|
// '${widget.customerProvider.guestSunmodel.sleep.scale}'),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// _percentWidget(
|
|
|
|
// '${widget.customerProvider.guestSunmodel.drain.count}',
|
|
|
|
// '120天未预订',
|
|
|
|
// '${widget.customerProvider.guestSunmodel.drain.scale}'),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// // ListView.builder(
|
|
|
|
// // controller: _controller,
|
|
|
|
// // shrinkWrap: true,
|
|
|
|
// // cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
// // itemCount: widget.customerProvider.guestSunmodel
|
|
|
|
// // .tips.task ==
|
|
|
|
// // null ||
|
|
|
|
// // widget.customerProvider.guestSunmodel.tips
|
|
|
|
// // .task.length ==
|
|
|
|
// // 0
|
|
|
|
// // ? 0
|
|
|
|
// // : widget.customerProvider.guestSunmodel.tips
|
|
|
|
// // .task.length,
|
|
|
|
// // itemBuilder: (BuildContext context, int index) {
|
|
|
|
// // // locationState = state;
|
|
|
|
// // Task data = widget.customerProvider.guestSunmodel
|
|
|
|
// // .tips.task[index];
|
|
|
|
// // return Column(
|
|
|
|
// // children: [
|
|
|
|
// // VEmptyView(10),
|
|
|
|
// // Container(
|
|
|
|
// // color: MyColours.color_ffffff,
|
|
|
|
// // padding: EdgeInsets.symmetric(
|
|
|
|
// // horizontal: ScreenUtil().setWidth(20),
|
|
|
|
// // vertical: ScreenUtil().setWidth(30)),
|
|
|
|
// // child: Row(
|
|
|
|
// // children: [
|
|
|
|
// // Image.asset(
|
|
|
|
// // Utils.getImgPath('warning'),
|
|
|
|
// // width: ScreenUtil().setWidth(42),
|
|
|
|
// // ),
|
|
|
|
// // HEmptyView(15),
|
|
|
|
// // Expanded(
|
|
|
|
// // child: Column(
|
|
|
|
// // crossAxisAlignment:
|
|
|
|
// // CrossAxisAlignment.start,
|
|
|
|
// // children: [
|
|
|
|
// // Text(
|
|
|
|
// // '店内任务:${data.content}',
|
|
|
|
// // maxLines: 1,
|
|
|
|
// // overflow: TextOverflow.ellipsis,
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // color: MyColours.color_333333,
|
|
|
|
// // fontSize:
|
|
|
|
// // ScreenUtil().setSp(32)),
|
|
|
|
// // ),
|
|
|
|
// // data.aid != null &&
|
|
|
|
// // data.aidStr != null
|
|
|
|
// // ? Padding(
|
|
|
|
// // padding: EdgeInsets.only(
|
|
|
|
// // top: ScreenUtil()
|
|
|
|
// // .setWidth(8)),
|
|
|
|
// // child: Text(
|
|
|
|
// // '优惠内容:${data.aidStr}',
|
|
|
|
// // maxLines: 1,
|
|
|
|
// // overflow:
|
|
|
|
// // TextOverflow.ellipsis,
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // color: MyColours
|
|
|
|
// // .color_333333,
|
|
|
|
// // fontSize: ScreenUtil()
|
|
|
|
// // .setSp(24)),
|
|
|
|
// // ),
|
|
|
|
// // )
|
|
|
|
// // : SizedBox(),
|
|
|
|
// // VEmptyView(8),
|
|
|
|
// // Text(
|
|
|
|
// // '创建人:${data.createUser}',
|
|
|
|
// // maxLines: 1,
|
|
|
|
// // overflow: TextOverflow.ellipsis,
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // color: MyColours.color_333333,
|
|
|
|
// // fontSize:
|
|
|
|
// // ScreenUtil().setSp(26)),
|
|
|
|
// // )
|
|
|
|
// // ],
|
|
|
|
// // )),
|
|
|
|
// // HEmptyView(20),
|
|
|
|
// // Column(children: [
|
|
|
|
// // RoundButton(
|
|
|
|
// // text: '立即完成',
|
|
|
|
|
|
|
|
// // padding: EdgeInsets.symmetric(
|
|
|
|
// // horizontal:
|
|
|
|
// // ScreenUtil().setWidth(26)),
|
|
|
|
// // gradientStart:
|
|
|
|
// // MyColours.color_199095,
|
|
|
|
// // gradientEnd: MyColours.color_199095,
|
|
|
|
// // // borderColor: MyColours.color_999999,
|
|
|
|
// // radius: ScreenUtil().setWidth(40),
|
|
|
|
// // height: ScreenUtil().setWidth(64),
|
|
|
|
// // width: ScreenUtil().setWidth(180),
|
|
|
|
// // fontSize: 26,
|
|
|
|
// // isBold: false,
|
|
|
|
// // onPressed: () {
|
|
|
|
// // SellerList sellerList =
|
|
|
|
// // SellerList.fromJson(
|
|
|
|
// // json.decode(
|
|
|
|
// // json.encode(data)));
|
|
|
|
// // NavigatorUtil
|
|
|
|
// // .goMyMakeMarkingPageOnlyShow(
|
|
|
|
// // context, sellerList);
|
|
|
|
// // },
|
|
|
|
// // ),
|
|
|
|
// // data.remainingTime != null
|
|
|
|
// // ? Padding(
|
|
|
|
// // padding: EdgeInsets.only(
|
|
|
|
// // top: ScreenUtil()
|
|
|
|
// // .setWidth(6)),
|
|
|
|
// // child: Text(
|
|
|
|
// // '${data.remainingTime}天内',
|
|
|
|
// // maxLines: 1,
|
|
|
|
// // overflow:
|
|
|
|
// // TextOverflow.ellipsis,
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // color: Color.fromRGBO(
|
|
|
|
// // 215, 30, 40, 1),
|
|
|
|
// // fontSize: ScreenUtil()
|
|
|
|
// // .setSp(26)),
|
|
|
|
// // ))
|
|
|
|
// // : SizedBox()
|
|
|
|
// // ])
|
|
|
|
// // ],
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // ],
|
|
|
|
// // );
|
|
|
|
// // }),
|
|
|
|
// // ListView.builder(
|
|
|
|
// // controller: _controller,
|
|
|
|
// // shrinkWrap: true,
|
|
|
|
// // cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
// // itemCount: widget.customerProvider.guestSunmodel
|
|
|
|
// // .tips.recover ==
|
|
|
|
// // null ||
|
|
|
|
// // widget.customerProvider.guestSunmodel.tips
|
|
|
|
// // .recover.length ==
|
|
|
|
// // 0
|
|
|
|
// // ? 0
|
|
|
|
// // : 1,
|
|
|
|
// // itemBuilder: (BuildContext context, int index) {
|
|
|
|
// // // locationState = state;
|
|
|
|
|
|
|
|
// // return Column(
|
|
|
|
// // children: [
|
|
|
|
// // VEmptyView(10),
|
|
|
|
// // Container(
|
|
|
|
// // color: MyColours.color_ffffff,
|
|
|
|
// // padding: EdgeInsets.symmetric(
|
|
|
|
// // horizontal: ScreenUtil().setWidth(20),
|
|
|
|
// // vertical: ScreenUtil().setWidth(30)),
|
|
|
|
// // child: Row(
|
|
|
|
// // children: [
|
|
|
|
// // Image.asset(
|
|
|
|
// // Utils.getImgPath('warning'),
|
|
|
|
// // width: ScreenUtil().setWidth(42),
|
|
|
|
// // ),
|
|
|
|
// // HEmptyView(15),
|
|
|
|
// // Expanded(
|
|
|
|
// // child: Text(
|
|
|
|
// // '${widget.customerProvider.guestSunmodel.tips.recover[0]}',
|
|
|
|
// // maxLines: 10,
|
|
|
|
// // overflow: TextOverflow.ellipsis,
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // color: MyColours.color_333333,
|
|
|
|
// // fontSize: ScreenUtil().setSp(32)),
|
|
|
|
// // )),
|
|
|
|
// // HEmptyView(20),
|
|
|
|
// // RoundButton(
|
|
|
|
// // text: '一键追回',
|
|
|
|
// // padding: EdgeInsets.symmetric(
|
|
|
|
// // horizontal:
|
|
|
|
// // ScreenUtil().setWidth(26)),
|
|
|
|
// // gradientStart: MyColours.color_199095,
|
|
|
|
// // gradientEnd: MyColours.color_199095,
|
|
|
|
// // // borderColor: MyColours.color_999999,
|
|
|
|
// // radius: ScreenUtil().setWidth(40),
|
|
|
|
// // height: ScreenUtil().setWidth(64),
|
|
|
|
// // width: ScreenUtil().setWidth(180),
|
|
|
|
// // fontSize: 26,
|
|
|
|
// // isBold: false,
|
|
|
|
// // onPressed: () {
|
|
|
|
// // String uid = '';
|
|
|
|
// // menuTitle.forEach((element) {
|
|
|
|
// // if (element.select) {
|
|
|
|
// // uid = element.uid;
|
|
|
|
// // }
|
|
|
|
// // });
|
|
|
|
// // NavigatorUtil.goMyMakeMarkingPage(
|
|
|
|
// // context, uid,
|
|
|
|
// // fromPage: FromPage
|
|
|
|
// // .FromPageMyCustomer,
|
|
|
|
// // homeGid:
|
|
|
|
// // Utils.listToStringEnglish1(
|
|
|
|
// // widget
|
|
|
|
// // .customerProvider
|
|
|
|
// // .guestSunmodel
|
|
|
|
// // .tips
|
|
|
|
// // .recover[1]));
|
|
|
|
// // },
|
|
|
|
// // ),
|
|
|
|
// // ],
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // ],
|
|
|
|
// // );
|
|
|
|
// // }),
|
|
|
|
// // ListView.builder(
|
|
|
|
// // controller: _controller,
|
|
|
|
// // shrinkWrap: true,
|
|
|
|
// // cacheExtent: ScreenUtil().setWidth(0),
|
|
|
|
// // itemCount: widget.customerProvider.guestSunmodel
|
|
|
|
// // .tips.awaken ==
|
|
|
|
// // null ||
|
|
|
|
// // widget.customerProvider.guestSunmodel.tips
|
|
|
|
// // .awaken.length ==
|
|
|
|
// // 0
|
|
|
|
// // ? 0
|
|
|
|
// // : 1,
|
|
|
|
// // itemBuilder: (BuildContext context, int index) {
|
|
|
|
// // // locationState = state;
|
|
|
|
|
|
|
|
// // return Column(
|
|
|
|
// // children: [
|
|
|
|
// // VEmptyView(10),
|
|
|
|
// // Container(
|
|
|
|
// // color: MyColours.color_ffffff,
|
|
|
|
// // padding: EdgeInsets.symmetric(
|
|
|
|
// // horizontal: ScreenUtil().setWidth(20),
|
|
|
|
// // vertical: ScreenUtil().setWidth(30)),
|
|
|
|
// // child: Row(
|
|
|
|
// // children: [
|
|
|
|
// // Image.asset(
|
|
|
|
// // Utils.getImgPath('warning'),
|
|
|
|
// // width: ScreenUtil().setWidth(42),
|
|
|
|
// // ),
|
|
|
|
// // HEmptyView(15),
|
|
|
|
// // Expanded(
|
|
|
|
// // child: Text(
|
|
|
|
// // '${widget.customerProvider.guestSunmodel.tips.awaken[0]}',
|
|
|
|
// // maxLines: 10,
|
|
|
|
// // overflow: TextOverflow.ellipsis,
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // color: MyColours.color_333333,
|
|
|
|
// // fontSize: ScreenUtil().setSp(32)),
|
|
|
|
// // )),
|
|
|
|
// // HEmptyView(20),
|
|
|
|
// // RoundButton(
|
|
|
|
// // text: '一键唤醒',
|
|
|
|
// // padding: EdgeInsets.symmetric(
|
|
|
|
// // horizontal:
|
|
|
|
// // ScreenUtil().setWidth(26)),
|
|
|
|
// // gradientStart: MyColours.color_199095,
|
|
|
|
// // gradientEnd: MyColours.color_199095,
|
|
|
|
// // // borderColor: MyColours.color_999999,
|
|
|
|
// // radius: ScreenUtil().setWidth(40),
|
|
|
|
// // height: ScreenUtil().setWidth(64),
|
|
|
|
// // width: ScreenUtil().setWidth(180),
|
|
|
|
// // fontSize: 26,
|
|
|
|
// // isBold: false,
|
|
|
|
// // onPressed: () {
|
|
|
|
// // String uid = '';
|
|
|
|
// // menuTitle.forEach((element) {
|
|
|
|
// // if (element.select) {
|
|
|
|
// // uid = element.uid;
|
|
|
|
// // }
|
|
|
|
// // });
|
|
|
|
// // NavigatorUtil.goMyMakeMarkingPage(
|
|
|
|
// // context, uid,
|
|
|
|
// // fromPage: FromPage
|
|
|
|
// // .FromPageMyCustomer,
|
|
|
|
// // homeGid:
|
|
|
|
// // Utils.listToStringEnglish1(
|
|
|
|
// // widget
|
|
|
|
// // .customerProvider
|
|
|
|
// // .guestSunmodel
|
|
|
|
// // .tips
|
|
|
|
// // .awaken[1]));
|
|
|
|
// // },
|
|
|
|
// // ),
|
|
|
|
// // ],
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // ],
|
|
|
|
// // );
|
|
|
|
// // }),
|
|
|
|
// if (widget.customerProvider.managerStatisticsList != null &&
|
|
|
|
// widget.customerProvider.managerStatisticsList.length > 0)
|
|
|
|
// Column(
|
|
|
|
// children: [
|
|
|
|
// _chart(),
|
|
|
|
// ListView.builder(
|
|
|
|
// itemCount: widget
|
|
|
|
// .customerProvider.managerStatisticsList.length,
|
|
|
|
// shrinkWrap: true,
|
|
|
|
// controller: _controller,
|
|
|
|
// padding: EdgeInsets.symmetric(horizontal: w(10)),
|
|
|
|
// itemBuilder: (context, index) {
|
|
|
|
// SellerCountsListSunModel countsListSunModel = widget
|
|
|
|
// .customerProvider.managerStatisticsList[index];
|
|
|
|
// return InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// String uid = '';
|
|
|
|
// menuTitle.forEach((element) {
|
|
|
|
// if (element.select) {
|
|
|
|
// uid = element.uid;
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// NavigatorUtil.goMonthOrderPage(
|
|
|
|
// context,
|
|
|
|
// year.toString(),
|
|
|
|
// countsListSunModel.monthss.toString(),
|
|
|
|
// uid: uid);
|
|
|
|
// },
|
|
|
|
// child: MonthItem(
|
|
|
|
// countsListSunModel: countsListSunModel));
|
|
|
|
// })
|
|
|
|
// ],
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ));
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// Container(
|
|
|
|
// color: MyColours.color_FAFAFA,
|
|
|
|
// padding: EdgeInsets.only(
|
|
|
|
// top: w(13), bottom: w(26), left: w(45), right: (45)),
|
|
|
|
// child: Stack(
|
|
|
|
// children: [
|
|
|
|
// RoundButton(
|
|
|
|
// onPressed: () {
|
|
|
|
// NavigatorUtil.goMyMarketingRecordsPage(
|
|
|
|
// context, FromPage.FromPageMyCustomer);
|
|
|
|
// },
|
|
|
|
// text: '历史营销记录',
|
|
|
|
// fontSize: 32,
|
|
|
|
// isBold: true,
|
|
|
|
// // margin: EdgeInsets.only(
|
|
|
|
// // top: w(13),
|
|
|
|
// // bottom: w(26),
|
|
|
|
// // left: w(45),
|
|
|
|
// // right: (45)),
|
|
|
|
// textColor: MyColours.color_F8F9FD,
|
|
|
|
// gradientStart: MyColours.color_199095,
|
|
|
|
// gradientEnd: MyColours.color_199095,
|
|
|
|
// borderColor: MyColours.color_199095,
|
|
|
|
// height: ScreenUtil().setWidth(86),
|
|
|
|
// // width: ScreenUtil().setWidth(260),
|
|
|
|
// radius: ScreenUtil().setWidth(10),
|
|
|
|
// ),
|
|
|
|
// showWarning
|
|
|
|
// ? Positioned(
|
|
|
|
// right: ScreenUtil().setWidth(30),
|
|
|
|
// top: ScreenUtil().setWidth(45 / 2),
|
|
|
|
// child: Image.asset(
|
|
|
|
// Utils.getImgPath('warning'),
|
|
|
|
// width: ScreenUtil().setWidth(35),
|
|
|
|
// ))
|
|
|
|
// : SizedBox()
|
|
|
|
// ],
|
|
|
|
// ))
|
|
|
|
]));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|