Commit 18dc71fb6bc10397523aa110e1633a7a2f5d7342

Authored by wdn127929
1 parent 42f05758

UI 3

... ... @@ -5,6 +5,7 @@ import 'package:flutter_screenutil/flutter_screenutil.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/utils.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/v_empty_view.dart';
... ... @@ -273,7 +274,12 @@ class _ContactListPageState extends State<ContactListPage> {
itemBuilder: (BuildContext context, int index) {
// if (index == 0) return _buildHeader();
UserHistoryEntity model = widget.contacts[index];
return _buildListItem(model);
return InkWell(
onTap: () {
NavigatorUtil.goCustomerDetailPage(context, model);
},
child: _buildListItem(model),
);
},
physics: BouncingScrollPhysics(),
indexBarData: SuspensionUtil.getTagIndexList(widget.contacts),
... ...
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/dialog_util.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/h_empty_view.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';
class CustomerDetailEditPage extends StatefulWidget {
CustomerDetailEditPage({Key key}) : super(key: key);
@override
_CustomerDetailEditPageState createState() => _CustomerDetailEditPageState();
}
class _CustomerDetailEditPageState extends State<CustomerDetailEditPage> {
List sexList = []; // 先生、女士、公司
TextEditingController nameController = TextEditingController();
FocusNode nameFocus = FocusNode();
String nameStr;
TextEditingController phoneController = TextEditingController();
FocusNode phoneFocus = FocusNode();
TextEditingController adressController = TextEditingController();
FocusNode adressFocus = FocusNode();
TextEditingController departmentController = TextEditingController();
FocusNode departmentFocus = FocusNode();
TextEditingController positionController = TextEditingController();
FocusNode positionFocus = FocusNode();
TextEditingController jkController = TextEditingController();
TextEditingController xhController = TextEditingController();
TextEditingController fwController = TextEditingController();
bool showLabel = false;
@override
void initState() {
super.initState();
_initSexList();
nameFocus.addListener(() {
if (nameFocus.hasFocus) {
print('得到焦点');
} else {
print('失去焦点');
// _homeEnterModel.nameController.text = nameStr + _nameSuffix();
_addNameSuffix(nameStr, _nameSuffix());
}
setState(() {});
});
WidgetsBinding.instance.addPostFrameCallback((_) {
// if (widget.name != '' &&
// widget.name != null &&
// widget.sex != '' &&
// widget.sex != null) {
// nameStr = widget.name;
// for (var item in detailModel.sexList) {
// item['select'] = false;
// if (item['code'] == widget.sex) {
// item['select'] = true;
// }
// }
// _addNameSuffix(nameStr, _nameSuffix());
// setState(() {});
// }
});
}
///称谓
_initSexList() {
// String sexStr = detailEntity.sex;
String sexStr = '1';
sexList = [
{
'title': '先生',
'select': sexStr == '1' ? true : false,
'code': '1',
'hasLeftBorder': true
},
{
'title': '女士',
'select': sexStr == '2' ? true : false,
'code': '2',
'hasLeftBorder': false
},
{
'title': '公司',
'select': sexStr == '3' ? true : false,
'code': '3',
'hasLeftBorder': false
}
];
}
_addNameSuffix(String name, String suffix) {
if (name == nameController.text && nameController.text.endsWith(suffix)) {
return;
}
nameController.text = name + suffix;
}
//姓名后缀
_nameSuffix() {
for (var item in sexList) {
if (item['select'] == true) {
return item['title'];
}
}
}
Widget _callButton(
{GestureTapCallback onPress,
content,
hasLeftBorder = true,
isSelect = false}) {
return InkWell(
onTap: onPress,
child: Container(
width: ScreenUtil().setWidth(84),
height: ScreenUtil().setHeight(48),
decoration: BoxDecoration(
color: isSelect ? MyColours.color_199095 : MyColours.color_fefefe,
border: Border(
bottom: BorderSide(
color: MyColours.color_6AB6B9,
width: ScreenUtil().setWidth(2)),
top: BorderSide(
color: MyColours.color_6AB6B9,
width: ScreenUtil().setWidth(2)),
left: hasLeftBorder
? BorderSide(
color: MyColours.color_6AB6B9,
width: ScreenUtil().setWidth(2))
: BorderSide.none,
right: BorderSide(
color: MyColours.color_6AB6B9,
width: ScreenUtil().setWidth(2)))),
child: Align(
alignment: Alignment.center,
child: Text(
content,
style: TextStyle(
color: isSelect ? Colors.white : MyColours.color_353535,
fontSize: ScreenUtil().setSp(28)),
),
),
),
);
}
Widget _textfieldWidget(String title, String hint,
TextEditingController controller, FocusNode focusNode) {
return Container(
// height: ScreenUtil().setWidth(60),
padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(10)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: Color.fromRGBO(220, 220, 220, 1)))),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setWidth(35),
child: Text(
title,
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_333333),
),
),
Expanded(
child: TextField(
maxLines: 1,
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(30),
color: MyColours.color_353535),
controller: controller,
focusNode: focusNode,
// textAlignVertical: TextAlignVertical.top,
decoration: InputDecoration(
hintText: hint,
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(30),
),
// contentPadding:
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
contentPadding: EdgeInsets.zero,
border: OutlineInputBorder(borderSide: BorderSide.none),
),
onChanged: (value) {
print('ggg');
nameStr = value;
},
onEditingComplete: () {
print('fff');
nameFocus.unfocus();
// _homeEnterModel.nameController.text =
// nameStr + _nameSuffix();
_addNameSuffix(nameStr, _nameSuffix());
},
keyboardType: TextInputType.text,
),
),
],
),
);
}
///忌口和喜好
Widget _textMulLine(
String title, String hintText, TextEditingController controller) {
return Container(
// height: ScreenUtil().setWidth(380),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Align(
alignment: Alignment.centerLeft,
child: Text(
title,
textAlign: TextAlign.left,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(28)),
)),
VEmptyView(20),
TextField(
controller: controller,
// keyboardType: TextInputType.number, //键盘类型,数字键盘
maxLines: 4,
// maxLength: 50,
// maxLengthEnforced: true,
style: TextStyle(
fontSize: ScreenUtil().setSp(30),
color: MyColours.color_333333), //输入文本的样式
decoration: InputDecoration(
contentPadding: EdgeInsets.all(ScreenUtil().setWidth(30)),
hintText: hintText,
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(30),
),
// fillColor: MyColours.color_F9F9F9,
// fillColor: Colors.red,
// filled: true,
enabledBorder: OutlineInputBorder(
//未选中时候的颜色
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
borderSide: BorderSide(
color: MyColours.color_cccccc,
width: ScreenUtil().setWidth(2)),
),
focusedBorder: OutlineInputBorder(
//选中时外边框颜色
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
borderSide: BorderSide(
color: MyColours.app_main,
),
),
// border: OutlineInputBorder(
// borderRadius:
// BorderRadius.circular(ScreenUtil().setWidth(20)),
// borderSide: BorderSide(
// color: Colors.red, width: ScreenUtil().setWidth(2))),
),
onChanged: (value) {},
),
],
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: MyColours.color_ffffff,
appBar: SystemAppBar(
'编辑客户详情',
onTap: () {
Navigator.of(context).pop();
},
),
body: Column(
children: [
Expanded(
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(50)),
child: SingleChildScrollView(
child: Column(
children: [
// VEmptyView(30),
Container(
// height: ScreenUtil().setWidth(60),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(10)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color:
Color.fromRGBO(220, 220, 220, 1)))),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
// color: Colors.red,
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setWidth(35),
child: Text(
'姓名',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_333333),
),
),
Expanded(
child: TextField(
maxLines: 1,
//输入文本的样式
style: TextStyle(
fontSize: ScreenUtil().setSp(30),
color: MyColours.color_353535),
controller: nameController,
focusNode: nameFocus,
// textAlignVertical: TextAlignVertical.top,
decoration: InputDecoration(
hintText: "填写姓名",
hintStyle: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(30),
),
// contentPadding:
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
contentPadding: EdgeInsets.zero,
border: OutlineInputBorder(
borderSide: BorderSide.none),
),
onChanged: (value) {
print('ggg');
nameStr = value;
},
onEditingComplete: () {
print('fff');
nameFocus.unfocus();
// _homeEnterModel.nameController.text =
// nameStr + _nameSuffix();
_addNameSuffix(nameStr, _nameSuffix());
},
keyboardType: TextInputType.text,
),
),
// HEmptyView(40),
Row(
children: sexList.map((value) {
return _callButton(
onPress: () {
for (var item in sexList) {
item['select'] = false;
if (item['title'] == value['title']) {
item['select'] = true;
// _homeEnterModel.nameController.text =
// nameStr + item['title'];
if (nameStr != null &&
nameStr != '') {
_addNameSuffix(
nameStr, item['title']);
}
}
}
setState(() {});
},
content: value['title'],
hasLeftBorder: value['hasLeftBorder'],
isSelect: value['select']);
}).toList()),
],
),
),
_textfieldWidget(
'电话', '填写电话', phoneController, phoneFocus),
_textfieldWidget(
'工作单位', '填写工作单位', adressController, adressFocus),
_textfieldWidget('部门', '填写部门', departmentController,
departmentFocus),
_textfieldWidget(
'职位', '填写职位', positionController, positionFocus),
InkWell(
onTap: () {
FocusScope.of(context)
.requestFocus(FocusNode()); //隐藏键盘
// DialogUtil.showSelectCusmanDialog(
// context, couponList, (value) {
// if (value != null) {
// setState(() {
// couponSelectIndex = value.first;
// });
// }
// },
// selecteds: couponSelectIndex == null
// ? []
// : [couponSelectIndex])
// .then((value) {});
},
child: Container(
// height: ScreenUtil().setWidth(60),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(50)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: Color.fromRGBO(
220, 220, 220, 1)))),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
// color: Colors.red,
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setWidth(35),
child: Text(
'自定义标签',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_333333),
),
),
Expanded(
child: Text(
'低频高消费',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color.fromRGBO(193, 194, 63, 1),
fontSize: ScreenUtil().setSp(28),
),
)),
HEmptyView(10),
Image.asset(
Utils.getImgPath(showLabel
? 'c_arrow_up'
: 'c_arrow_down'),
width: ScreenUtil().setWidth(24),
// height: ScreenUtil().setWidth(10),
)
],
),
)),
InkWell(
onTap: () {
// DialogUtil.showSelectCusmanDialog(
// context, couponList, (value) {
// if (value != null) {
// setState(() {
// couponSelectIndex = value.first;
// });
// }
// },
// selecteds: couponSelectIndex == null
// ? []
// : [couponSelectIndex])
// .then((value) {});
},
child: Container(
// height: ScreenUtil().setWidth(60),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(50)),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: ScreenUtil().setWidth(2),
color: Color.fromRGBO(
220, 220, 220, 1)))),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
// color: Colors.red,
width: ScreenUtil().setWidth(150),
height: ScreenUtil().setWidth(35),
child: Text(
'客户经理',
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_333333),
),
),
Expanded(
child: Text(
'xxxj',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(28),
),
)),
HEmptyView(10),
Image.asset(
Utils.getImgPath(showLabel
? 'c_arrow_up'
: 'c_arrow_down'),
width: ScreenUtil().setWidth(24),
// height: ScreenUtil().setWidth(10),
)
],
),
)),
VEmptyView(60),
_textMulLine('忌口', '输入忌口的东西', jkController),
VEmptyView(30),
_textMulLine('喜好', '输入喜好', xhController),
VEmptyView(30),
_textMulLine('服务', '输入服务', fwController),
],
),
))),
RoundButton(
text: '保存',
radius: ScreenUtil().setWidth(10),
margin:
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(90)),
height: ScreenUtil().setWidth(80),
fontSize: 26,
isBold: false,
onPressed: () {},
),
VEmptyView(30)
],
));
}
}
... ...
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:one_key/models/user_history_entity.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/utils.dart';
import 'package:one_key/widgets/h_empty_view.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';
class CustomerDetailPage extends StatefulWidget {
final UserHistoryEntity userHistoryEntity;
CustomerDetailPage({Key key, this.userHistoryEntity}) : super(key: key);
@override
_CustomerDetailPageState createState() => _CustomerDetailPageState();
}
class _CustomerDetailPageState extends State<CustomerDetailPage> {
ScrollController controller = ScrollController();
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),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color.fromRGBO(239, 239, 239, 1),
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(20))),
child: Text(
widget.userHistoryEntity.rnameStr != ''
? widget.userHistoryEntity.rnameStr.substring(0, 1)
: '',
style: TextStyle(
color: Color.fromRGBO(206, 206, 206, 1),
fontSize: ScreenUtil().setSp(78)),
),
),
Positioned(
bottom: ScreenUtil().setWidth(-20),
child: Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(10),
vertical: ScreenUtil().setWidth(2),
),
decoration: BoxDecoration(
color: Color.fromRGBO(223, 33, 81, 1),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10),
),
),
child: Text('沉睡',
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(28)))))
],
),
VEmptyView(40),
Container(
padding:
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(10)),
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_199095,
width: ScreenUtil().setWidth(2)),
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(10))),
child: Text(
// widget.userHistoryEntity.rnameStr == ''
// ? '未指派经理'
// : widget.userHistoryEntity.rnameStr,
'xxx经理',
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(26)),
),
)
],
),
HEmptyView(30),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
constraints:
BoxConstraints(maxWidth: ScreenUtil().setWidth(260)),
child: Text(
widget.userHistoryEntity.rnameStr,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(68)),
)),
HEmptyView(10),
Text(
widget.userHistoryEntity.sexStr != ''
? '[${widget.userHistoryEntity.sexStr}]'
: '',
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(22),
),
),
],
),
VEmptyView(10),
Container(
constraints:
BoxConstraints(maxWidth: ScreenUtil().setWidth(200)),
child: Text(
'低频高消费',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color.fromRGBO(193, 194, 63, 1),
fontSize: ScreenUtil().setSp(22),
),
)),
VEmptyView(20),
InkWell(
onTap: () {
DialogUtil.goPhone(widget.userHistoryEntity.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(
widget.userHistoryEntity.phone,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_ffffff,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(36),
),
)
],
)))
],
),
Spacer(),
RoundButton(
text: '编辑',
radius: ScreenUtil().setWidth(20),
width: ScreenUtil().setWidth(90),
height: ScreenUtil().setWidth(50),
fontSize: 26,
isBold: false,
onPressed: () {
NavigatorUtil.goCustomerDetailEditPage(context);
},
),
],
),
);
}
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) {
return Scaffold(
backgroundColor: Color.fromRGBO(246, 248, 250, 1),
appBar: SystemAppBar(
'客户详情',
onTap: () {
Navigator.of(context).pop();
},
),
body: 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(
'已创建 97 天 累计 2 单',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_ffffff,
fontSize: ScreenUtil().setSp(32)),
)),
InkWell(
onTap: () {
// NavigatorUtil.goMarketingRecordsDetailPage(context);
},
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(26),
color: MyColours.color_333333),
),
Text(
'3天后 ',
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: ScreenUtil().setSp(26),
color: Color.fromRGBO(193, 194, 63, 1)),
),
Text(
'午餐',
style: TextStyle(
fontSize: ScreenUtil().setSp(26),
color: MyColours.color_199095),
),
Text(
' 桌位:',
style: TextStyle(
fontSize: ScreenUtil().setSp(26),
color: MyColours.color_333333),
),
Text(
'vip5',
style: TextStyle(
fontSize: ScreenUtil().setSp(26),
color: MyColours.color_199095),
),
Text(
' 人数:',
style: TextStyle(
fontSize: ScreenUtil().setSp(26),
color: MyColours.color_333333),
),
Text(
'未记录',
style: TextStyle(
fontSize: ScreenUtil().setSp(26),
color: MyColours.color_199095),
),
Text(
' 消费:',
style: TextStyle(
fontSize: ScreenUtil().setSp(26),
color: MyColours.color_333333),
),
Text(
'未记录',
style: TextStyle(
fontSize: ScreenUtil().setSp(26),
color: MyColours.color_199095),
)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'客户经理:',
style: TextStyle(
fontSize: ScreenUtil().setSp(26),
color: MyColours.color_333333),
),
Text(
'xxx 18799999999',
style: TextStyle(
fontSize: ScreenUtil().setSp(26),
color: MyColours.color_199095),
)
],
)
],
),
),
VEmptyView(20),
_lineItemWidget('工作单位', '政府部门 办公室主任'),
VEmptyView(20),
_lineItemWidget('忌口', '葱姜蒜'),
VEmptyView(20),
_lineItemWidget('喜好', '酸甜苦辣'),
VEmptyView(20),
_lineItemWidget('服务', '湿巾、茶水'),
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: () {},
),
],
),
ListView.builder(
shrinkWrap: true,
itemCount: 10,
controller: controller,
itemBuilder: (BuildContext context, int index) {
return Center(
child: Padding(
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(10)),
child: Text(
'本人生日:12月18日(公历)',
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(
'共 1 个',
style: TextStyle(
fontSize: ScreenUtil().setSp(26),
color: MyColours.color_199095),
)
],
),
ListView.builder(
shrinkWrap: true,
itemCount: 10,
controller: controller,
itemBuilder: (BuildContext context, int index) {
return Center(
child: Padding(
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setWidth(10)),
child: Text(
'2021-12-12 短信营销 承诺优惠98折',
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)
],
),
);
}
}
... ...
... ... @@ -9,6 +9,7 @@ import 'package:one_key/models/personnel_manage_model.dart';
import 'package:one_key/models/sms_info.dart';
import 'package:one_key/models/statics_model.dart';
import 'package:one_key/models/table_list.dart';
import 'package:one_key/models/user_history_entity.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/route/routes.dart';
import 'package:one_key/utils/fluro_convert_utils.dart';
... ... @@ -554,4 +555,24 @@ class NavigatorUtil {
return _navigateTo(context, "${Routes.make_marketing_page}",
replace: replace);
}
/// 客户详情
static Future<dynamic> goCustomerDetailPage(
BuildContext context,
UserHistoryEntity userHistoryEntity, {
replace = false,
}) {
return _navigateTo(context,
"${Routes.customer_detail_page}?userHistoryEntity=${FluroConvertUtils.object2string(userHistoryEntity)}",
replace: replace);
}
///编辑客户详情
static Future<dynamic> goCustomerDetailEditPage(
BuildContext context, {
replace = false,
}) {
return _navigateTo(context, "${Routes.customer_edit_detail_page}",
replace: replace);
}
}
... ...
... ... @@ -10,6 +10,7 @@ import 'package:one_key/models/personnel_manage_model.dart';
import 'package:one_key/models/sms_info.dart';
import 'package:one_key/models/statics_model.dart';
import 'package:one_key/models/table_list.dart';
import 'package:one_key/models/user_history_entity.dart';
import 'package:one_key/pages/coupon/coupon_detail_page.dart';
import 'package:one_key/pages/coupon/coupon_edit_page.dart';
import 'package:one_key/pages/coupon/coupon_history_page.dart';
... ... @@ -39,6 +40,8 @@ import 'package:one_key/pages/detail/handle_online_page.dart';
import 'package:one_key/pages/detail/notebook_detail_page.dart';
import 'package:one_key/pages/login/web_page.dart';
import 'package:one_key/pages/message/message_order_menu.dart';
import 'package:one_key/pages/my/customer_type/customer_detail_edit_page.dart';
import 'package:one_key/pages/my/customer_type/customer_detail_page.dart';
import 'package:one_key/pages/my/customer_type/customer_list_page.dart';
import 'package:one_key/pages/my/customer_type/customer_setting_page.dart';
import 'package:one_key/pages/my/customer_type/make_marking_page.dart';
... ... @@ -869,3 +872,28 @@ var makeMarkingPageHandle = new Handler(
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(), child: MakeMarkingPage());
});
///客户详情
var customerDetailPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
// String idstr = params["idstr"].first;
UserHistoryEntity userHistoryEntity = UserHistoryEntity.fromJson(json.decode(
FluroConvertUtils.fluroCnParamsDecode(
params["userHistoryEntity"].first)));
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(),
child: CustomerDetailPage(
userHistoryEntity: userHistoryEntity,
));
});
///编辑客户详情
var customerDetailEditPageHandle = new Handler(
handlerFunc: (BuildContext context, Map<dynamic, List<Object>> params) {
// String idstr = params["idstr"].first;
// UserHistoryEntity userHistoryEntity = UserHistoryEntity.fromJson(json.decode(
// FluroConvertUtils.fluroCnParamsDecode(
// params["userHistoryEntity"].first)));
return ChangeNotifierProvider<CustomerProvider>(
create: (_) => CustomerProvider(), child: CustomerDetailEditPage());
});
... ...
... ... @@ -73,9 +73,10 @@ class Routes {
static String marketing_records_page = "/marketing_records_page"; //全店营销记录
static String marketing_records_detail_page =
"/marketing_records_detail_page"; //全店营销记录详情
static String make_marketing_page =
"/make_marketing_page"; //创建营销
static String make_marketing_page = "/make_marketing_page"; //创建营销
static String customer_detail_page = "/customer_detail_page"; //客户详情
static String customer_edit_detail_page =
"/customer_edit_detail_page"; //编辑客户详情
static void configureRoutes(FluroRouter router) {
router.notFoundHandler = new Handler(
... ... @@ -157,9 +158,9 @@ class Routes {
router.define(marketing_records_page, handler: marketingRecordsPageHandle);
router.define(marketing_records_detail_page,
handler: marketingRecordsDetailPageHandle);
router.define(make_marketing_page,
handler: makeMarkingPageHandle);
router.define(make_marketing_page, handler: makeMarkingPageHandle);
router.define(customer_detail_page, handler: customerDetailPageHandle);
router.define(customer_edit_detail_page, handler: customerDetailEditPageHandle);
}
}
... ...