|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:one_key/utils/repaint_boundary_utils.dart';
|
|
|
|
import 'package:one_key/widgets/system_app_bar.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
import '../../../res/colors.dart';
|
|
|
|
import '../../../utils/screen_util.dart';
|
|
...
|
...
|
@@ -8,12 +10,29 @@ import '../../../widgets/MyDivider.dart'; |
|
|
|
import '../../../widgets/h_empty_view.dart';
|
|
|
|
import '../../../widgets/round_button.dart';
|
|
|
|
import '../../../widgets/v_empty_view.dart';
|
|
|
|
import '../../models/cookbook_model.dart';
|
|
|
|
import '../../provider/user_model.dart';
|
|
|
|
import '../../utils/share_helper.dart';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生成的预览页
|
|
|
|
*/
|
|
|
|
class OrderPreviewPage extends StatefulWidget {
|
|
|
|
OrderPreviewPage({Key key}) : super(key: key);
|
|
|
|
final List<MenuModel> showList;
|
|
|
|
final String priceSum;
|
|
|
|
final String memberPriceSum;
|
|
|
|
final String planDishText;
|
|
|
|
final String name;
|
|
|
|
final String remark;
|
|
|
|
OrderPreviewPage(
|
|
|
|
{Key key,
|
|
|
|
this.showList,
|
|
|
|
this.priceSum,
|
|
|
|
this.memberPriceSum,
|
|
|
|
this.planDishText,
|
|
|
|
this.name,
|
|
|
|
this.remark})
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
_OrderPreviewPageState createState() => _OrderPreviewPageState();
|
|
...
|
...
|
@@ -21,6 +40,8 @@ class OrderPreviewPage extends StatefulWidget { |
|
|
|
|
|
|
|
class _OrderPreviewPageState extends State<OrderPreviewPage> {
|
|
|
|
ScrollController controller = ScrollController();
|
|
|
|
//全局key-截图key
|
|
|
|
final GlobalKey boundaryKey = GlobalKey();
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
...
|
...
|
@@ -52,6 +73,10 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> { |
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
String sellername =
|
|
|
|
Provider.of<UserModel>(context, listen: false).user.sellername;
|
|
|
|
String sellerAdr =
|
|
|
|
Provider.of<UserModel>(context, listen: false).user.sellerAddr;
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: MyColours.color_ffffff,
|
|
|
|
body: Column(
|
|
...
|
...
|
@@ -59,327 +84,397 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> { |
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: controller,
|
|
|
|
child: Column(children: [
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
margin: EdgeInsets.zero,
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(20), right: w(20), top: w(30), bottom: w(15)),
|
|
|
|
// height: w(200),
|
|
|
|
// constraints: new BoxConstraints.expand(
|
|
|
|
// height: w(200),
|
|
|
|
// ),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
image: DecorationImage(
|
|
|
|
image: AssetImage(Utils.getImgPath('preview_bg')),
|
|
|
|
fit: BoxFit.cover
|
|
|
|
child: RepaintBoundary(
|
|
|
|
key: boundaryKey,
|
|
|
|
child: Container(
|
|
|
|
color: Colors.white,
|
|
|
|
child: Column(children: [
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
margin: EdgeInsets.zero,
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(20),
|
|
|
|
right: w(20),
|
|
|
|
top: w(30),
|
|
|
|
bottom: w(15)),
|
|
|
|
// height: w(200),
|
|
|
|
// constraints: new BoxConstraints.expand(
|
|
|
|
// height: w(200),
|
|
|
|
// ),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
image: DecorationImage(
|
|
|
|
image: AssetImage(
|
|
|
|
Utils.getImgPath('preview_bg')),
|
|
|
|
fit: BoxFit.cover
|
|
|
|
|
|
|
|
// centerSlice: new Rect.fromLTRB(270.0, 180.0, 1360.0, 730.0),
|
|
|
|
)),
|
|
|
|
// centerSlice: new Rect.fromLTRB(270.0, 180.0, 1360.0, 730.0),
|
|
|
|
)),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'14号酒庄 贵宾排菜菜单',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(20),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_CFB53B),
|
|
|
|
),
|
|
|
|
VEmptyView(26),
|
|
|
|
Text(
|
|
|
|
'预定贵宾 | 刘生先生',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_303030),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'预定时间 | 2022年11月11日 晚餐',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_303030),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'区域桌台 | 一楼包间 108、一楼包间 108、一楼包间 108、一楼包间 108、一楼包间 108',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_303030),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'餐厅地址 | 唐山市路北区拥军道88号',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_303030),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'专属服务 | 张山山 18866668888',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_303030),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
// width: w(32),
|
|
|
|
height: w(48),
|
|
|
|
padding: EdgeInsets.only(left: w(10), right: w(20)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
// top: BorderSide(
|
|
|
|
// width: w(1), color: MyColours.color_DBDBDB),
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours.color_DBDBDB))),
|
|
|
|
// constraints: BoxConstraints(minWidth: w(20)),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
maxLines: 1,
|
|
|
|
// controller:
|
|
|
|
// focusNode: _focusNode,
|
|
|
|
// autofocus: true,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(16),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
// textAlignVertical: TextAlignVertical.center,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
// hintText: "请输入排菜名称",
|
|
|
|
hintText: '朋友小聚888套餐(若无名称不展示本行)',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: font(16),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
// isCollapsed:
|
|
|
|
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide.none),
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'${sellername} 贵宾排菜菜单',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(20),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_CFB53B),
|
|
|
|
),
|
|
|
|
VEmptyView(26),
|
|
|
|
Text(
|
|
|
|
'预定贵宾 | 刘生先生',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_303030),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'预定时间 | 2022年11月11日 晚餐',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_303030),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'区域桌台 | 一楼包间 108、一楼包间 108、一楼包间 108、一楼包间 108、一楼包间 108',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_303030),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'餐厅地址 | ${sellerAdr}',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_303030),
|
|
|
|
),
|
|
|
|
VEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'专属服务 | 张山山 18866668888',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_303030),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
textInputAction: TextInputAction.done,
|
|
|
|
|
|
|
|
onChanged: (value) {
|
|
|
|
// setState(() {});
|
|
|
|
// _searchSellerLocation();
|
|
|
|
// customerProvider.searchData(value);
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
// contantShowModel.searchData(
|
|
|
|
// contantShowModel.controller.text);
|
|
|
|
// _searchSellerLocation();
|
|
|
|
// _focusNode.unfocus();
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
Text(
|
|
|
|
'1份',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: 20,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: controller,
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
return ListView.builder(
|
|
|
|
itemCount: 2 + 1,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: controller,
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
if (index == 0) {
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
//头
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
// width: w(32),
|
|
|
|
height: w(48),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(10), right: w(20)),
|
|
|
|
widget.name != null && widget.name != ''
|
|
|
|
? Container(
|
|
|
|
width: double.infinity,
|
|
|
|
// width: w(32),
|
|
|
|
// constraints: BoxConstraints(
|
|
|
|
// minHeight: w(48),
|
|
|
|
// ),
|
|
|
|
// height: w(48),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(10),
|
|
|
|
right: w(20),
|
|
|
|
top: w(10),
|
|
|
|
bottom: w(10)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
// top: BorderSide(
|
|
|
|
// width: w(1), color: MyColours.color_DBDBDB),
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color:
|
|
|
|
MyColours.color_DBDBDB))),
|
|
|
|
// constraints: BoxConstraints(minWidth: w(20)),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
widget.name,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(16),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
)
|
|
|
|
// TextField(
|
|
|
|
// maxLines: 1,
|
|
|
|
// // controller:
|
|
|
|
// // focusNode: _focusNode,
|
|
|
|
// // autofocus: true,
|
|
|
|
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_515151,
|
|
|
|
// fontSize: font(16),
|
|
|
|
// fontWeight: FontWeight.bold),
|
|
|
|
// textAlign: TextAlign.left,
|
|
|
|
// // textAlignVertical: TextAlignVertical.center,
|
|
|
|
// decoration: InputDecoration(
|
|
|
|
// // hintText: "请输入排菜名称",
|
|
|
|
// hintText: '朋友小聚888套餐(若无名称不展示本行)',
|
|
|
|
// hintStyle: TextStyle(
|
|
|
|
// color: MyColours.color_999999,
|
|
|
|
// fontSize: font(16),
|
|
|
|
// fontWeight: FontWeight.bold),
|
|
|
|
// // isCollapsed:
|
|
|
|
// // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
|
|
|
|
// border: OutlineInputBorder(
|
|
|
|
// borderSide: BorderSide.none),
|
|
|
|
// contentPadding: EdgeInsets.zero,
|
|
|
|
// ),
|
|
|
|
// keyboardType: TextInputType.text,
|
|
|
|
// textInputAction: TextInputAction.done,
|
|
|
|
|
|
|
|
// onChanged: (value) {
|
|
|
|
// // setState(() {});
|
|
|
|
// // _searchSellerLocation();
|
|
|
|
// // customerProvider.searchData(value);
|
|
|
|
// },
|
|
|
|
// onEditingComplete: () {
|
|
|
|
// FocusScope.of(context)
|
|
|
|
// .requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
// // contantShowModel.searchData(
|
|
|
|
// // contantShowModel.controller.text);
|
|
|
|
// // _searchSellerLocation();
|
|
|
|
// // _focusNode.unfocus();
|
|
|
|
// },
|
|
|
|
// )
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'1份',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
: SizedBox(),
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: widget.showList.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: controller,
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
MenuModel menuModel = widget.showList[index];
|
|
|
|
return ListView.builder(
|
|
|
|
itemCount:
|
|
|
|
menuModel.cookbooklist.length + 1,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: controller,
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
if (index == 0) {
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
//头
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
// width: w(32),
|
|
|
|
height: w(48),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(10),
|
|
|
|
right: w(20)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours
|
|
|
|
.color_DBDBDB))),
|
|
|
|
// constraints: BoxConstraints(minWidth: w(20)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment
|
|
|
|
.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
menuModel.className,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(16),
|
|
|
|
color: MyColours
|
|
|
|
.color_515151,
|
|
|
|
fontWeight:
|
|
|
|
FontWeight
|
|
|
|
.bold),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'${menuModel.allSum}道',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours
|
|
|
|
.color_515151,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
int indexReal = index - 1;
|
|
|
|
MenuSunModel menuSunModel =
|
|
|
|
menuModel.cookbooklist[indexReal];
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(20),
|
|
|
|
vertical: w(13)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours
|
|
|
|
.color_DBDBDB))),
|
|
|
|
// constraints: BoxConstraints(minWidth: w(20)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'热菜',
|
|
|
|
// Container(
|
|
|
|
// constraints: BoxConstraints(
|
|
|
|
// maxWidth: w(80)),
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
menuSunModel.name,
|
|
|
|
maxLines: 10,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(16),
|
|
|
|
fontSize: font(14),
|
|
|
|
color:
|
|
|
|
MyColours.color_515151,
|
|
|
|
fontWeight:
|
|
|
|
FontWeight.bold),
|
|
|
|
),
|
|
|
|
MyColours.color_515151),
|
|
|
|
)),
|
|
|
|
// HEmptyView(8),
|
|
|
|
// _laduWidget(),
|
|
|
|
Spacer(),
|
|
|
|
Text(
|
|
|
|
'6道',
|
|
|
|
'${menuSunModel.price}元/${menuSunModel.unit}',
|
|
|
|
maxLines: 2,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
),
|
|
|
|
fontSize: font(12),
|
|
|
|
color:
|
|
|
|
MyColours.color_515151),
|
|
|
|
),
|
|
|
|
// HEmptyView(108),
|
|
|
|
// Text(
|
|
|
|
// '38元/份',
|
|
|
|
// maxLines: 2,
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: font(10),
|
|
|
|
// color: MyColours.color_8EBBBE),
|
|
|
|
// ),
|
|
|
|
Container(
|
|
|
|
width: w(79),
|
|
|
|
alignment:
|
|
|
|
Alignment.centerRight,
|
|
|
|
child: Text(
|
|
|
|
'${menuSunModel.amount}份',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours
|
|
|
|
.color_515151),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
int indexReal = index - 1;
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(20), vertical: w(13)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
),
|
|
|
|
);
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
widget.remark != null && widget.remark != ''
|
|
|
|
? Container(
|
|
|
|
width: double.infinity,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(15), vertical: w(7)),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: w(7),
|
|
|
|
bottom: w(13),
|
|
|
|
left: w(20),
|
|
|
|
right: w(20)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(r(5)),
|
|
|
|
border: Border.all(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours.color_DBDBDB)),
|
|
|
|
child: Text(
|
|
|
|
"${widget.remark}",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
)
|
|
|
|
// child: TextField(
|
|
|
|
// maxLines: 4,
|
|
|
|
// // controller:
|
|
|
|
// // focusNode: _focusNode,
|
|
|
|
// // autofocus: true,
|
|
|
|
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_515151, fontSize: font(12)),
|
|
|
|
// textAlign: TextAlign.left,
|
|
|
|
// // textAlignVertical: TextAlignVertical.center,
|
|
|
|
// decoration: InputDecoration(
|
|
|
|
// hintText: "请输入整单备注",
|
|
|
|
// hintStyle: TextStyle(
|
|
|
|
// color: MyColours.color_999999,
|
|
|
|
// fontSize: font(12),
|
|
|
|
// ),
|
|
|
|
// // isCollapsed:
|
|
|
|
// // true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
|
|
|
|
// border:
|
|
|
|
// OutlineInputBorder(borderSide: BorderSide.none),
|
|
|
|
// contentPadding: EdgeInsets.zero,
|
|
|
|
// ),
|
|
|
|
// keyboardType: TextInputType.number,
|
|
|
|
// textInputAction: TextInputAction.done,
|
|
|
|
|
|
|
|
// onChanged: (value) {
|
|
|
|
// // setState(() {});
|
|
|
|
// // _searchSellerLocation();
|
|
|
|
// // customerProvider.searchData(value);
|
|
|
|
// },
|
|
|
|
// onEditingComplete: () {
|
|
|
|
// FocusScope.of(context)
|
|
|
|
// .requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
// // contantShowModel.searchData(
|
|
|
|
// // contantShowModel.controller.text);
|
|
|
|
// // _searchSellerLocation();
|
|
|
|
// // _focusNode.unfocus();
|
|
|
|
// },
|
|
|
|
// ),
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
top: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours.color_DBDBDB))),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(10), vertical: w(15)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceAround,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
constraints:
|
|
|
|
BoxConstraints(maxWidth: w(80)),
|
|
|
|
child: Text(
|
|
|
|
'山城辣子鸡',
|
|
|
|
maxLines: 10,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
)),
|
|
|
|
HEmptyView(8),
|
|
|
|
_laduWidget(),
|
|
|
|
Spacer(),
|
|
|
|
Text(
|
|
|
|
'38元/份',
|
|
|
|
maxLines: 2,
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
'总计',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
HEmptyView(108),
|
|
|
|
// Text(
|
|
|
|
// '38元/份',
|
|
|
|
// maxLines: 2,
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: font(10),
|
|
|
|
// color: MyColours.color_8EBBBE),
|
|
|
|
// ),
|
|
|
|
Text(
|
|
|
|
'1份',
|
|
|
|
'菜单价:${widget.priceSum}元',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(15), vertical: w(7)),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: w(7), bottom: w(13), left: w(20), right: w(20)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(5)),
|
|
|
|
border: Border.all(
|
|
|
|
width: w(1), color: MyColours.color_DBDBDB)),
|
|
|
|
child: TextField(
|
|
|
|
maxLines: 4,
|
|
|
|
// controller:
|
|
|
|
// focusNode: _focusNode,
|
|
|
|
// autofocus: true,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(12)),
|
|
|
|
textAlign: TextAlign.left,
|
|
|
|
// textAlignVertical: TextAlignVertical.center,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "请输入整单备注",
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: font(12),
|
|
|
|
),
|
|
|
|
// isCollapsed:
|
|
|
|
// true, //重点,相当于高度包裹的意思,必须设置为true,不然有默认奇妙的最小高度
|
|
|
|
border:
|
|
|
|
OutlineInputBorder(borderSide: BorderSide.none),
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
),
|
|
|
|
keyboardType: TextInputType.number,
|
|
|
|
textInputAction: TextInputAction.done,
|
|
|
|
|
|
|
|
onChanged: (value) {
|
|
|
|
// setState(() {});
|
|
|
|
// _searchSellerLocation();
|
|
|
|
// customerProvider.searchData(value);
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
// contantShowModel.searchData(
|
|
|
|
// contantShowModel.controller.text);
|
|
|
|
// _searchSellerLocation();
|
|
|
|
// _focusNode.unfocus();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
]))),
|
|
|
|
Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
top: BorderSide(
|
|
|
|
width: w(1), color: MyColours.color_DBDBDB))),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(10), vertical: w(15)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'总计',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12), color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'菜单价:1164元',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12), color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'会员价:1125元',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12), color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'排菜价:1100元',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12), color: MyColours.color_515151),
|
|
|
|
)
|
|
|
|
])),
|
|
|
|
Text(
|
|
|
|
'周到安排技术支持 400-000-9690',
|
|
|
|
style: TextStyle(fontSize: font(12), color: MyColours.color_999999),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'会员价:${widget.memberPriceSum}元',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'排菜价:${widget.planDishText}元',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
)
|
|
|
|
])),
|
|
|
|
Text(
|
|
|
|
'周到安排技术支持 400-000-9690',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(12),
|
|
|
|
color: MyColours.color_999999),
|
|
|
|
),
|
|
|
|
]))))),
|
|
|
|
Container(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
padding: EdgeInsets.only(
|
|
...
|
...
|
@@ -414,6 +509,8 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> { |
|
|
|
fontSize: 36,
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () {
|
|
|
|
ShareHelper.onShareWx(context,
|
|
|
|
boundaryKey: boundaryKey);
|
|
|
|
// NavigatorUtil.goOrderPreviewPage(context);
|
|
|
|
},
|
|
|
|
),
|
...
|
...
|
|