|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_screenutil/screenutil.dart';
|
|
|
|
import 'package:one_key/constant/state.dart';
|
|
|
|
import 'package:one_key/models/customer_list_model.dart';
|
|
|
|
import 'package:one_key/models/guest_info_model.dart';
|
|
|
|
import 'package:one_key/models/user_history_entity.dart';
|
|
|
|
import 'package:one_key/provider/customer_provider.dart';
|
|
|
|
import 'package:one_key/res/colors.dart';
|
|
|
|
import 'package:one_key/route/navigator_util.dart';
|
|
|
|
import 'package:one_key/utils/dialog_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';
|
|
|
|
|
|
|
|
class MyCustomerDetailPage extends StatefulWidget {
|
|
|
|
final CustomerListSunModel userHistoryEntity;
|
|
|
|
final FromPage fromPage;
|
|
|
|
|
|
|
|
MyCustomerDetailPage({Key key, this.userHistoryEntity, this.fromPage})
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
_MyCustomerDetailPageState createState() => _MyCustomerDetailPageState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _MyCustomerDetailPageState extends State<MyCustomerDetailPage> {
|
|
|
|
ScrollController controller = ScrollController();
|
|
|
|
CustomerProvider customerProvider;
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
|
|
|
_getGuestInfo();
|
|
|
|
});
|
|
|
|
bus.on("refresh_guest_info", (arg) {
|
|
|
|
_getGuestInfo();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
void dispose() {
|
|
|
|
EventBus().emit('refresh_guest_info');
|
|
|
|
super.dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
_getGuestInfo() async {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"id": widget.userHistoryEntity.id,
|
|
|
|
'phone': widget.userHistoryEntity.phone
|
|
|
|
};
|
|
|
|
await customerProvider.getGuestInfo(context, params);
|
|
|
|
// await customerProvider.searchData(customerProvider.controller.text);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _headerWidget() {
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40),
|
|
|
|
vertical: ScreenUtil().setWidth(40),
|
|
|
|
),
|
|
|
|
decoration: BoxDecoration(color: MyColours.color_ffffff, boxShadow: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_E0E0E0,
|
|
|
|
offset: Offset(2, -2), //x,y轴
|
|
|
|
blurRadius: ScreenUtil().setWidth(6), //阴影模糊程度
|
|
|
|
spreadRadius: 0 //阴影扩散程度
|
|
|
|
)
|
|
|
|
]),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
Stack(
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
clipBehavior: Clip.none,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: ScreenUtil().setWidth(120),
|
|
|
|
height: ScreenUtil().setWidth(120),
|
|
|
|
padding: EdgeInsets.only(bottom: ScreenUtil().setWidth(20)),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Color.fromRGBO(239, 239, 239, 1),
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(20))),
|
|
|
|
child: Text(
|
|
|
|
customerProvider.guestInfoSunModel.guest.rnameStr != ''
|
|
|
|
? customerProvider.guestInfoSunModel.guest.rnameStr
|
|
|
|
.substring(0, 1)
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Color.fromRGBO(206, 206, 206, 1),
|
|
|
|
fontSize: ScreenUtil().setSp(72)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
bottom: ScreenUtil().setWidth(-20),
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(10),
|
|
|
|
vertical: ScreenUtil().setWidth(2),
|
|
|
|
),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: customerProvider
|
|
|
|
.guestInfoSunModel.guest.attr !=
|
|
|
|
null &&
|
|
|
|
customerProvider
|
|
|
|
.guestInfoSunModel.guest.attr !=
|
|
|
|
''
|
|
|
|
? customerProvider
|
|
|
|
.guestInfoSunModel.guest.attr ==
|
|
|
|
'沉睡'
|
|
|
|
? Color.fromRGBO(223, 33, 81, 1)
|
|
|
|
: customerProvider
|
|
|
|
.guestInfoSunModel.guest.attr ==
|
|
|
|
'活跃'
|
|
|
|
? Color.fromRGBO(81, 170, 94, 1)
|
|
|
|
: customerProvider.guestInfoSunModel
|
|
|
|
.guest.attr ==
|
|
|
|
'流失'
|
|
|
|
? Color.fromRGBO(109, 101, 248, 1)
|
|
|
|
: Color.fromRGBO(239, 143, 49, 1)
|
|
|
|
: Colors.transparent,
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(10),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
customerProvider.guestInfoSunModel.guest.attr,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(28)))))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
HEmptyView(30),
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
constraints:
|
|
|
|
BoxConstraints(maxWidth: ScreenUtil().setWidth(260)),
|
|
|
|
child: Text(
|
|
|
|
customerProvider.guestInfoSunModel.guest.rnameStr,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(64)),
|
|
|
|
)),
|
|
|
|
HEmptyView(10),
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(bottom: ScreenUtil().setWidth(8)),
|
|
|
|
alignment: Alignment.bottomLeft,
|
|
|
|
child: Text(
|
|
|
|
customerProvider.guestInfoSunModel.guest.sexStr != ''
|
|
|
|
? '[${customerProvider.guestInfoSunModel.guest.sexStr}]'
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
fontSize: ScreenUtil().setSp(22),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
customerProvider.guestInfoSunModel.guest.label != null
|
|
|
|
? Container(
|
|
|
|
padding: EdgeInsets.only(top: ScreenUtil().setWidth(10)),
|
|
|
|
constraints:
|
|
|
|
BoxConstraints(maxWidth: ScreenUtil().setWidth(200)),
|
|
|
|
child: Text(
|
|
|
|
customerProvider.guestInfoSunModel.guest.label,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: Color.fromRGBO(193, 194, 63, 1),
|
|
|
|
fontSize: ScreenUtil().setSp(22),
|
|
|
|
),
|
|
|
|
))
|
|
|
|
: SizedBox(),
|
|
|
|
VEmptyView(20),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
DialogUtil.goPhone(
|
|
|
|
customerProvider.guestInfoSunModel.guest.phone);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(20),
|
|
|
|
vertical: ScreenUtil().setWidth(10)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(20))),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('c_phone'),
|
|
|
|
width: ScreenUtil().setWidth(30),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(
|
|
|
|
customerProvider.guestInfoSunModel.guest.phone,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
RoundButton(
|
|
|
|
text: '编辑',
|
|
|
|
radius: ScreenUtil().setWidth(20),
|
|
|
|
width: ScreenUtil().setWidth(90),
|
|
|
|
height: ScreenUtil().setWidth(50),
|
|
|
|
fontSize: 26,
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {
|
|
|
|
NavigatorUtil.goMyCustomerDetailEditPage(context,
|
|
|
|
customerProvider.guestInfoSunModel.guest, widget.fromPage);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _lineItemWidget(String title, String content) {
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40),
|
|
|
|
vertical: ScreenUtil().setWidth(30)),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
title,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(36),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
content,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(26),
|
|
|
|
color: title == '忌口' ? Colors.red : MyColours.color_199095),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
customerProvider = Provider.of<CustomerProvider>(context, listen: true);
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Color.fromRGBO(246, 248, 250, 1),
|
|
|
|
appBar: SystemAppBar(
|
|
|
|
'客户详情',
|
|
|
|
onTap: () {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
body: Consumer<CustomerProvider>(builder: (context, model, _) {
|
|
|
|
if (model.pageStateGuestInfo != PageState.Success) {
|
|
|
|
return ExceptionPage(
|
|
|
|
pageState: model.pageStateGuestInfo,
|
|
|
|
callback: () {
|
|
|
|
model.pageStateGuestInfo = PageState.Loading;
|
|
|
|
model.notifyListeners();
|
|
|
|
_getGuestInfo();
|
|
|
|
},
|
|
|
|
emptyMsg: "暂时没有客户哦",
|
|
|
|
emptyImg: "empty_search",
|
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: controller,
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setWidth(20),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
),
|
|
|
|
_headerWidget(),
|
|
|
|
VEmptyView(20),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40),
|
|
|
|
vertical: ScreenUtil().setWidth(20)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topRight:
|
|
|
|
Radius.circular(ScreenUtil().setWidth(20)),
|
|
|
|
topLeft:
|
|
|
|
Radius.circular(ScreenUtil().setWidth(20)))),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
'已创建 ${customerProvider.guestInfoSunModel.count.createTime} 天 | 累计 ${customerProvider.guestInfoSunModel.count.leiji} 单 | 取消 ${customerProvider.guestInfoSunModel.count.quxiao} 单',
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(30)),
|
|
|
|
)),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
NavigatorUtil.goMyCustomerOrderPage(
|
|
|
|
context,
|
|
|
|
customerProvider.guestInfoSunModel.guest.id,
|
|
|
|
customerProvider
|
|
|
|
.guestInfoSunModel.guest.phone);
|
|
|
|
},
|
|
|
|
child: Text('更多',
|
|
|
|
style: TextStyle(
|
|
|
|
decoration: TextDecoration.underline,
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(26)))),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(20),
|
|
|
|
vertical: ScreenUtil().setWidth(20)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Wrap(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'最近一次:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Utils.formatFromMill(customerProvider
|
|
|
|
.guestInfoSunModel.last.ddate),
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: Color.fromRGBO(208, 31, 37, 1)),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
customerProvider
|
|
|
|
.guestInfoSunModel.last.ddateSoltStr,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_199095),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
' 桌位:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
customerProvider
|
|
|
|
.guestInfoSunModel.last.tableinfoName,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_199095),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
' 人数:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
customerProvider
|
|
|
|
.guestInfoSunModel.last.actualPum ==
|
|
|
|
null
|
|
|
|
? '未记录'
|
|
|
|
: customerProvider
|
|
|
|
.guestInfoSunModel.last.actualPum,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_199095),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
' 消费:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
customerProvider
|
|
|
|
.guestInfoSunModel.last.conAmount ==
|
|
|
|
null
|
|
|
|
? '未记录'
|
|
|
|
: customerProvider
|
|
|
|
.guestInfoSunModel.last.conAmount,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_199095),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(6),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'客户经理:',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'${customerProvider.guestInfoSunModel.last.sellerUserNickName} ${customerProvider.guestInfoSunModel.last.sellerUserPhone}',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_199095),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
_lineItemWidget('工作单位',
|
|
|
|
'${customerProvider.guestInfoSunModel.guest.company == null ? '' : customerProvider.guestInfoSunModel.guest.company} ${customerProvider.guestInfoSunModel.guest.section == null ? '' : customerProvider.guestInfoSunModel.guest.section} ${customerProvider.guestInfoSunModel.guest.position == null ? '' : customerProvider.guestInfoSunModel.guest.position}'),
|
|
|
|
VEmptyView(20),
|
|
|
|
_lineItemWidget('忌口',
|
|
|
|
'${customerProvider.guestInfoSunModel.guest.taboos == null ? '' : customerProvider.guestInfoSunModel.guest.taboos}'),
|
|
|
|
VEmptyView(20),
|
|
|
|
_lineItemWidget('喜好',
|
|
|
|
'${customerProvider.guestInfoSunModel.guest.like == null ? '' : customerProvider.guestInfoSunModel.guest.like}'),
|
|
|
|
VEmptyView(20),
|
|
|
|
_lineItemWidget('服务',
|
|
|
|
'${customerProvider.guestInfoSunModel.guest.serve == null ? '' : customerProvider.guestInfoSunModel.guest.serve}'),
|
|
|
|
VEmptyView(20),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40),
|
|
|
|
vertical: ScreenUtil().setWidth(30)),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Column(children: [
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'纪念日',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(36),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
RoundButton(
|
|
|
|
text: '编辑',
|
|
|
|
radius: ScreenUtil().setWidth(20),
|
|
|
|
width: ScreenUtil().setWidth(90),
|
|
|
|
height: ScreenUtil().setWidth(50),
|
|
|
|
fontSize: 26,
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {
|
|
|
|
NavigatorUtil.goMyFestivalEditPage(
|
|
|
|
context,
|
|
|
|
customerProvider.guestInfoSunModel.guest,
|
|
|
|
widget.userHistoryEntity.id,
|
|
|
|
widget.userHistoryEntity.phone);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
ListView.builder(
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemCount:
|
|
|
|
customerProvider.guestInfoSunModel.guest.cDay !=
|
|
|
|
null
|
|
|
|
? customerProvider
|
|
|
|
.guestInfoSunModel.guest.cDay.length
|
|
|
|
: 0,
|
|
|
|
controller: controller,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return Center(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setWidth(10)),
|
|
|
|
child: Text(
|
|
|
|
customerProvider.guestInfoSunModel.guest
|
|
|
|
.cDay[index].content,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(26),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
));
|
|
|
|
},
|
|
|
|
)
|
|
|
|
])),
|
|
|
|
VEmptyView(20),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40),
|
|
|
|
vertical: ScreenUtil().setWidth(30)),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'营销记录',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(36),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'共 ${customerProvider.guestInfoSunModel.marketing?.length} 个',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(26),
|
|
|
|
color: MyColours.color_199095),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
ListView.builder(
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemCount: customerProvider
|
|
|
|
.guestInfoSunModel.marketing?.length,
|
|
|
|
controller: controller,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
Marketing marketing = customerProvider
|
|
|
|
.guestInfoSunModel.marketing[index];
|
|
|
|
return Center(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setWidth(10)),
|
|
|
|
child: Text(
|
|
|
|
'${marketing.cdateStr} ${marketing.content}',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(26),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
));
|
|
|
|
},
|
|
|
|
)
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
RoundButton(
|
|
|
|
text: '创建预订',
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
margin:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(90)),
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
fontSize: 26,
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {},
|
|
|
|
),
|
|
|
|
VEmptyView(30)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|