|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:one_key/res/colors.dart';
|
|
|
|
import 'package:one_key/utils/utils.dart';
|
|
|
|
import 'package:one_key/widgets/MyDivider.dart';
|
|
|
|
import 'package:one_key/widgets/h_empty_view.dart';
|
|
|
|
import 'package:one_key/widgets/system_app_bar.dart';
|
|
|
|
import 'package:one_key/widgets/v_empty_view.dart';
|
|
|
|
|
|
|
|
class CustomerOrderPage extends StatefulWidget {
|
|
|
|
CustomerOrderPage({Key key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
_CustomerOrderPageState createState() => _CustomerOrderPageState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _CustomerOrderPageState extends State<CustomerOrderPage> {
|
|
|
|
int year = DateTime.now().year;
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
appBar: SystemAppBar(
|
|
|
|
'客户订单',
|
|
|
|
onTap: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
body: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40),
|
|
|
|
vertical: ScreenUtil().setWidth(40)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
year--;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath('c_arrow_left'),
|
|
|
|
width: ScreenUtil().setWidth(24),
|
|
|
|
)),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(20)),
|
|
|
|
child: Text(
|
|
|
|
'${year}年',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (year >= DateTime.now().year) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setState(() {
|
|
|
|
year++;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(year != DateTime.now().year
|
|
|
|
? 'c_arrow_right'
|
|
|
|
: 'c_arrow_right_gray'),
|
|
|
|
width: ScreenUtil().setWidth(24),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
Wrap(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'全年累计',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
' 2000 ',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_199095),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'单',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'全年取消',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
' 2000 ',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_199095),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'单',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
Wrap(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'记录全额订单:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'2000 ',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'单',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'记录人数订单:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'2000 ',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'单',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
Wrap(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'总消费:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'2000 ',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'元',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'总人数:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'2000 ',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'人',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'人均:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'2000 ',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'元/人',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
MyDivider(
|
|
|
|
double.infinity,
|
|
|
|
ScreenUtil().setWidth(1),
|
|
|
|
color: MyColours.color_E0E0E0,
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
Expanded(
|
|
|
|
child: ListView.builder(
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemCount: 10,
|
|
|
|
// controller: controller,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
CircleAvatar(
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
backgroundColor: MyColours.color_199095,
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Wrap(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'[已完成]',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'42天前',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'2021-09-29',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'午餐',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'【201】',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'人数:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'未记录',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'消费:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'未记录',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'客户经理:xxx 18739837273',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
},
|
|
|
|
))
|
|
|
|
],
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|