|
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
|
|
import 'package:dotted_border/dotted_border.dart';
|
|
|
|
import 'package:flutter/gestures.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:one_key/models/cookbook_one_model.dart';
|
|
|
|
import 'package:one_key/route/navigator_util.dart';
|
|
|
|
import 'package:one_key/widgets/MyDivider.dart';
|
|
|
|
import 'package:one_key/widgets/round_button.dart';
|
|
...
|
...
|
@@ -991,6 +993,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
isBold: false,
|
|
|
|
gradientStart: MyColours.color_438E93,
|
|
|
|
gradientEnd: MyColours.color_438E93,
|
|
|
|
onPressed: () {
|
|
|
|
NavigatorUtil.goFeastSetmealPage(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
VEmptyView(52),
|
|
|
|
Text(
|
|
...
|
...
|
@@ -1049,6 +1054,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
isBold: false,
|
|
|
|
gradientStart: MyColours.color_438E93,
|
|
|
|
gradientEnd: MyColours.color_438E93,
|
|
|
|
onPressed: () {
|
|
|
|
NavigatorUtil.goFeastWinePage(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
VEmptyView(52),
|
|
|
|
Text(
|
|
...
|
...
|
@@ -1107,6 +1115,9 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
isBold: false,
|
|
|
|
gradientStart: MyColours.color_438E93,
|
|
|
|
gradientEnd: MyColours.color_438E93,
|
|
|
|
onPressed: () {
|
|
|
|
NavigatorUtil.goFeastSetPage(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
...
|
...
|
@@ -1242,10 +1253,22 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
//弹框确认是否删除
|
|
|
|
DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
title: "",
|
|
|
|
content: "是否确定删除?",
|
|
|
|
isBoldContent: true,
|
|
|
|
contentColor: MyColours.color_E6000000,
|
|
|
|
rTitle: "删除", rCallback: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
// _delGuestInfocDay(model.cday[index].id);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath('f_dj_delete'),
|
|
|
|
width: w(20),
|
|
|
|
))
|
|
|
|
Utils.getImgPath('f_dj_delete'),
|
|
|
|
width: w(20),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
...
|
...
|
@@ -1408,9 +1431,10 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {
|
|
|
|
selectMenu = '选台';
|
|
|
|
menuSet.add('意向');
|
|
|
|
menuSet.add('选台');
|
|
|
|
selectMenu = '签约';
|
|
|
|
|
|
|
|
menuSet.add('定金');
|
|
|
|
menuSet.add('签约');
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
content: '保存并下一步',
|
|
...
|
...
|
@@ -1421,6 +1445,400 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
/***********签约widget */
|
|
|
|
|
|
|
|
///基本信息item
|
|
|
|
Widget baseInfoItem(String title, String content) {
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: w(80),
|
|
|
|
child: Text(title,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999, fontSize: font(12))),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: Text(content,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(12))))
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
//基本信息板块
|
|
|
|
Widget baseInfoWidget() {
|
|
|
|
return Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(6)),
|
|
|
|
border: Border.all(width: w(1), color: MyColours.color_438E93)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
// height: h(31),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(12), vertical: h(6)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(r(5)),
|
|
|
|
topRight: Radius.circular(r(5)))),
|
|
|
|
child: Text(
|
|
|
|
'基本信息',
|
|
|
|
style:
|
|
|
|
TextStyle(color: MyColours.color_F6F6F6, fontSize: font(14)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(12), right: w(12), top: w(8), bottom: w(11)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
baseInfoItem('宴会日期:', '2022-08-02 (周二 七月初五)'),
|
|
|
|
baseInfoItem('宴会类型:', '婚宴'),
|
|
|
|
baseInfoItem('预订人:', '方 先生'),
|
|
|
|
baseInfoItem('场次数量:', '共 1 场'),
|
|
|
|
baseInfoItem('电话:', '15833517582'),
|
|
|
|
baseInfoItem('服务经理:', '刘经理'),
|
|
|
|
baseInfoItem('备注:', '无'),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///第一场 。第二场。。。。
|
|
|
|
Widget sessionsWidget(
|
|
|
|
String title,
|
|
|
|
) {
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.only(bottom: h(26)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(6)),
|
|
|
|
border: Border.all(width: w(1), color: MyColours.color_438E93)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
// height: h(31),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(12), vertical: h(6)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(r(5)),
|
|
|
|
topRight: Radius.circular(r(5)))),
|
|
|
|
child: Text(
|
|
|
|
title,
|
|
|
|
style:
|
|
|
|
TextStyle(color: MyColours.color_F6F6F6, fontSize: font(14)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(12), right: w(12), top: w(8), bottom: w(11)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
baseInfoItem('场次时间:', '2022-08-02 午餐 12:00至14:00'),
|
|
|
|
baseInfoItem('桌位数量:', '共 32 桌'),
|
|
|
|
baseInfoItem('桌位信息:', '凤凰厅 (30桌)、包间1 (1桌)、包间2 (1桌)'),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: w(80),
|
|
|
|
child: Text('套餐安排',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: font(12))),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: ListView.builder(
|
|
|
|
itemCount: 3,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext context, int index) {
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.only(bottom: w(8)),
|
|
|
|
margin: EdgeInsets.only(bottom: w(12)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours
|
|
|
|
.color_DBDBDB))),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Text('1299套餐',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_515151,
|
|
|
|
fontSize: font(12))),
|
|
|
|
Spacer(),
|
|
|
|
RoundButton(
|
|
|
|
text: '查看菜单',
|
|
|
|
radius: r(7),
|
|
|
|
width: w(48),
|
|
|
|
height: h(18),
|
|
|
|
fontSize: 20,
|
|
|
|
textColor:
|
|
|
|
MyColours.color_F6F6F6,
|
|
|
|
isBold: false,
|
|
|
|
gradientStart:
|
|
|
|
MyColours.color_438E93,
|
|
|
|
gradientEnd:
|
|
|
|
MyColours.color_438E93,
|
|
|
|
onPressed: () {
|
|
|
|
// NavigatorUtil.goFeastSetmealPage(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(16),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Text('10 人/桌',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: font(12))),
|
|
|
|
HEmptyView(24),
|
|
|
|
Text('保证 30 桌',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: font(12))),
|
|
|
|
HEmptyView(24),
|
|
|
|
Text('备用 2 桌',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: font(12))),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}))
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
sessionsItem('酒水安排:'),
|
|
|
|
sessionsItem('其他配置:'),
|
|
|
|
remarkItem('备注:')
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///备注----照片
|
|
|
|
Widget remarkItem(String title) {
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: w(80),
|
|
|
|
child: Text(title,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999, fontSize: font(12))),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'剑南春52度剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml剑南春52度500ml500ml',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(12))),
|
|
|
|
VEmptyView(16),
|
|
|
|
_getGridImg(['fff', '', 'fff', '', 'fff', '', 'fff', ''])
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
///三组 左---中----右
|
|
|
|
Widget sessionsItem(String title) {
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: h(6)),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: w(80),
|
|
|
|
child: Text(title,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999, fontSize: font(12))),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: ListView.builder(
|
|
|
|
itemCount: 3,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.only(bottom: w(8)),
|
|
|
|
margin: EdgeInsets.only(bottom: w(12)),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// border: Border(
|
|
|
|
// bottom: BorderSide(
|
|
|
|
// width: w(1),
|
|
|
|
// color: MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text('剑南春52度500ml',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)))),
|
|
|
|
Text('60 份',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)))
|
|
|
|
],
|
|
|
|
));
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// 九宫格
|
|
|
|
Widget _getGridImg(List<String> data) {
|
|
|
|
return GridView.builder(
|
|
|
|
controller: _scrollController,
|
|
|
|
// padding: EdgeInsets.only(top: ScreenUtil().getAdapterSize(10)),
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemCount: data.length,
|
|
|
|
|
|
|
|
//SliverGridDelegateWithFixedCrossAxisCount 构建一个横轴固定数量Widget
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
//横轴元素个数
|
|
|
|
crossAxisCount: 4,
|
|
|
|
//纵轴间距
|
|
|
|
mainAxisSpacing: ScreenUtil().setWidth(52),
|
|
|
|
//横轴间距
|
|
|
|
crossAxisSpacing: ScreenUtil().setWidth(60),
|
|
|
|
//子组件宽高长度比例
|
|
|
|
childAspectRatio: 1.0),
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
// _showPhotoView(
|
|
|
|
// context, index, widget.model.imageQiniuUrlList);
|
|
|
|
},
|
|
|
|
child: Stack(
|
|
|
|
// alignment: Alignment.topRight,
|
|
|
|
children: [
|
|
|
|
ClipRRect(
|
|
|
|
borderRadius: BorderRadius.circular(r(5)),
|
|
|
|
child: CachedNetworkImage(
|
|
|
|
// imageUrl: data[index].qiniuUrl,
|
|
|
|
imageUrl:
|
|
|
|
'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F4k%2Fs%2F02%2F2109242332225H9-0-lp.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662806063&t=d576b5247e04ce721c266f098625f145',
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
width: ScreenUtil().setWidth(38 * 2),
|
|
|
|
height: ScreenUtil().setWidth(38 * 2),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
top: 0,
|
|
|
|
right: 0,
|
|
|
|
child: GestureDetector(
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath("f_delete"),
|
|
|
|
width: ScreenUtil().setWidth(24),
|
|
|
|
height: ScreenUtil().setWidth(24),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
//已经传到服务器,弹提醒窗口,是否删除
|
|
|
|
//修改之前有内容,则弹框
|
|
|
|
DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
title: "确认删除",
|
|
|
|
content: "是否确定删除该照片,删除操作不可逆转,请谨慎操作",
|
|
|
|
lCallback: () {
|
|
|
|
print("取消");
|
|
|
|
}, rCallback: () {
|
|
|
|
print("确定");
|
|
|
|
// widget.deleteCallback(index);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
// else {
|
|
|
|
// //点击删除按钮
|
|
|
|
// setState(() {
|
|
|
|
// temp.removeWhere((element) =>
|
|
|
|
// element == temp[index]);
|
|
|
|
// widget.model.imageQiniuUrlList
|
|
|
|
// .removeWhere((element) =>
|
|
|
|
// element ==
|
|
|
|
// widget.model
|
|
|
|
// .imageQiniuUrlList[index]);
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
///签约
|
|
|
|
Widget qyWidget() {
|
|
|
|
return Column(children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(children: <Widget>[
|
|
|
|
menu(),
|
|
|
|
MyDivider(double.infinity, h(1), color: MyColours.color_DBDBDB),
|
|
|
|
VEmptyView(26),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(12)),
|
|
|
|
child: Column(children: [
|
|
|
|
baseInfoWidget(),
|
|
|
|
VEmptyView(52),
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: 3,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return sessionsWidget('第${index + 1}场');
|
|
|
|
}),
|
|
|
|
VEmptyView(52),
|
|
|
|
]))
|
|
|
|
]))),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {},
|
|
|
|
content: '分享宴会单',
|
|
|
|
hasLeftBorder: true,
|
|
|
|
isSelect: false)),
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {
|
|
|
|
selectMenu = '签约';
|
|
|
|
|
|
|
|
menuSet.add('定金');
|
|
|
|
menuSet.add('签约');
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
content: '保存',
|
|
|
|
hasLeftBorder: true,
|
|
|
|
isSelect: true))
|
|
|
|
],
|
|
|
|
)
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget taocanTextType(String per1, String title, String per) {
|
|
|
|
return RichText(
|
|
...
|
...
|
@@ -1555,6 +1973,6 @@ class _FeastCreatePageState extends State<FeastCreatePage> { |
|
|
|
? xtWidget()
|
|
|
|
: selectMenu == '定金'
|
|
|
|
? djWidget()
|
|
|
|
: SizedBox());
|
|
|
|
: qyWidget());
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|