|
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
import '../../constant/state.dart';
|
|
|
|
import '../../models/get_banquet_by_id_new_model.dart';
|
|
|
|
import '../../provider/feast_model.dart';
|
|
|
|
import '../../res/colors.dart';
|
|
|
|
import '../../route/navigator_util.dart';
|
|
|
|
import '../../utils/ConvertNumberToChineseMoneyWords.dart';
|
|
|
|
import '../../utils/screen_util.dart';
|
|
|
|
import '../../utils/utils.dart';
|
|
|
|
import '../../widgets/h_empty_view.dart';
|
|
|
|
import '../../widgets/page_exception.dart';
|
|
|
|
import '../../widgets/round_button.dart';
|
|
|
|
import '../../widgets/system_app_bar.dart';
|
|
|
|
import '../../widgets/v_empty_view.dart';
|
|
|
|
|
|
|
|
class FeastDetailPage extends StatefulWidget {
|
|
|
|
final String rid;
|
|
|
|
FeastDetailPage({Key key, this.rid}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
_FeastDetailPageState createState() => _FeastDetailPageState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _FeastDetailPageState extends State<FeastDetailPage> {
|
|
|
|
FeastModel feastModel;
|
|
|
|
ScrollController _scrollController = ScrollController();
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
// TODO: implement initState
|
|
|
|
super.initState();
|
|
|
|
Utils.changeStatusColor(color: MyColours.color_438E93);
|
|
|
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
_getBanquetById();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
///获取宴会详情
|
|
|
|
_getBanquetById() async {
|
|
|
|
Map<String, String> pramas = {'rid': widget.rid}; //
|
|
|
|
bool success = await feastModel.getBanquetById(context, pramas);
|
|
|
|
if (success) {
|
|
|
|
// _uploadImageProvider.feastRemarkContractImageList = [];
|
|
|
|
// feastModel.banquetDetail.contractInfo.contractImages.forEach((element) {
|
|
|
|
// UploadImgModel uploadImgModel = UploadImgModel();
|
|
|
|
// uploadImgModel.process = 1;
|
|
|
|
// uploadImgModel.qiniuUrl = element.url;
|
|
|
|
// _uploadImageProvider.feastRemarkContractImageList.add(uploadImgModel);
|
|
|
|
// });
|
|
|
|
// setState(() {});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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))))
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
//生成日期文本
|
|
|
|
createDateText(BuildContext context, DateTime day) {
|
|
|
|
// if (Utils.isOneDay(day, dateTime)) return; //日期没变
|
|
|
|
String ymd = "${day.year}-" +
|
|
|
|
Utils.addZeroNumber(day.month) +
|
|
|
|
"-" +
|
|
|
|
Utils.addZeroNumber(day.day);
|
|
|
|
ymd += " (周${Utils.formatWeekDayNum(day.weekday)} ";
|
|
|
|
ymd += Utils.lunarCalendarHolidays(day);
|
|
|
|
ymd += ')';
|
|
|
|
return ymd;
|
|
|
|
}
|
|
|
|
|
|
|
|
//基本信息板块
|
|
|
|
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(
|
|
|
|
'宴会日期:',
|
|
|
|
createDateText(
|
|
|
|
context,
|
|
|
|
DateTime.fromMillisecondsSinceEpoch(int.parse(
|
|
|
|
feastModel.banquetDetail.basicInfo.ddate) *
|
|
|
|
1000))),
|
|
|
|
baseInfoItem(
|
|
|
|
'宴会类型:', feastModel.banquetDetail.basicInfo.classify),
|
|
|
|
baseInfoItem('预订人:',
|
|
|
|
'${feastModel.banquetDetail.basicInfo.rname} ${feastModel.banquetDetail.basicInfo.sex}'),
|
|
|
|
baseInfoItem('场次数量:',
|
|
|
|
'共 ${feastModel.banquetDetail.sessionsInfo.length} 场'),
|
|
|
|
baseInfoItem('电话:', feastModel.banquetDetail.basicInfo.phone),
|
|
|
|
baseInfoItem(
|
|
|
|
'服务经理:',
|
|
|
|
feastModel.banquetDetail.basicInfo.jiedan.nickName ??
|
|
|
|
feastModel.banquetDetail.basicInfo.jiedan.account),
|
|
|
|
baseInfoItem(
|
|
|
|
'备注:', feastModel.banquetDetail.basicInfo.remark ?? '无'),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///三组 左---中----右
|
|
|
|
Widget sessionsItem(String title, SessionsInfo sessionsInfo) {
|
|
|
|
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: title == '酒水安排:'
|
|
|
|
? sessionsInfo.wine.length
|
|
|
|
: sessionsInfo.other.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
String name = title == '酒水安排:'
|
|
|
|
? sessionsInfo.wine[index].wineName
|
|
|
|
: sessionsInfo.other[index].otherName;
|
|
|
|
String numStr = title == '酒水安排:'
|
|
|
|
? sessionsInfo.wine[index].wineNum
|
|
|
|
: sessionsInfo.other[index].otherNum;
|
|
|
|
String spec = title == '酒水安排:'
|
|
|
|
? sessionsInfo.wine[index].spec
|
|
|
|
: sessionsInfo.other[index].spec;
|
|
|
|
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(name,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)))),
|
|
|
|
Text('${numStr} ${spec}',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)))
|
|
|
|
],
|
|
|
|
));
|
|
|
|
})),
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
///第一场 。第二场。。。。
|
|
|
|
Widget sessionsWidget(String title, SessionsInfo sessionsInfo) {
|
|
|
|
// int tableNum = 0;
|
|
|
|
// List<String> temp = sessionsInfo.tableInfo.split('、');
|
|
|
|
// temp.forEach((element) {
|
|
|
|
// int start = element.indexOf('(');
|
|
|
|
// int end = element.length - 2;
|
|
|
|
// String numstr = element.substring(start + 1, end);
|
|
|
|
// tableNum += int.parse(numstr);
|
|
|
|
// });
|
|
|
|
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('场次时间:', sessionsInfo.rdate),
|
|
|
|
baseInfoItem('桌位数量:', '共 ${sessionsInfo.tableNum ?? 0} 桌'),
|
|
|
|
baseInfoItem('桌位信息:', sessionsInfo.tableInfo),
|
|
|
|
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: sessionsInfo.setmeal.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext context, int index) {
|
|
|
|
SetmealDetail setmealDetail =
|
|
|
|
sessionsInfo.setmeal[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(setmealDetail.mealName,
|
|
|
|
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: () {
|
|
|
|
// String tableData = '';
|
|
|
|
// if (data.pnumC.text
|
|
|
|
// .trim()
|
|
|
|
// .length >
|
|
|
|
// 0) {
|
|
|
|
// tableData +=
|
|
|
|
// '${data.pnumC.text}人/桌';
|
|
|
|
// }
|
|
|
|
// if (data.minC.text
|
|
|
|
// .trim()
|
|
|
|
// .length >
|
|
|
|
// 0) {
|
|
|
|
// tableData +=
|
|
|
|
// ' 保证 ${data.minC.text} 桌';
|
|
|
|
// }
|
|
|
|
// if (data.spareC.text
|
|
|
|
// .trim()
|
|
|
|
// .length >
|
|
|
|
// 0) {
|
|
|
|
// tableData +=
|
|
|
|
// ' 备用 ${data.spareC.text} 桌';
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (data.dataMenu != null &&
|
|
|
|
// data.dataMenu.length >
|
|
|
|
// 0) {
|
|
|
|
// await NavigatorUtil
|
|
|
|
// .goFeastMenuShowPage(
|
|
|
|
// context,
|
|
|
|
// data.setmealId,
|
|
|
|
// data.name,
|
|
|
|
// widget.dateData,
|
|
|
|
// tableData,
|
|
|
|
// justSelData: {
|
|
|
|
// 'object':
|
|
|
|
// data.dataMenu
|
|
|
|
// });
|
|
|
|
// } else {
|
|
|
|
// await NavigatorUtil
|
|
|
|
// .goFeastMenuShowPage(
|
|
|
|
// context,
|
|
|
|
// data.setmealId,
|
|
|
|
// data.name,
|
|
|
|
// widget.dateData,
|
|
|
|
// tableData);
|
|
|
|
// }
|
|
|
|
|
|
|
|
NavigatorUtil
|
|
|
|
.goFeastMenuQYShowPage(
|
|
|
|
context,
|
|
|
|
object: {
|
|
|
|
'object':
|
|
|
|
setmealDetail
|
|
|
|
.cooklist
|
|
|
|
});
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(16),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'${setmealDetail.pnum} 人/桌',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: font(12))),
|
|
|
|
HEmptyView(24),
|
|
|
|
Text(
|
|
|
|
'保证 ${setmealDetail.min} 桌',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: font(12))),
|
|
|
|
HEmptyView(24),
|
|
|
|
Text(
|
|
|
|
'备用 ${setmealDetail.spare} 桌',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: font(12))),
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}))
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
sessionsItem('酒水安排:', sessionsInfo),
|
|
|
|
sessionsItem('其他配置:', sessionsInfo),
|
|
|
|
remarkItem('备注:', sessionsInfo)
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///备注----照片
|
|
|
|
Widget remarkItem(String title, SessionsInfo sessionsInfo) {
|
|
|
|
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: [
|
|
|
|
sessionsInfo.remark == null || sessionsInfo.remark == ''
|
|
|
|
? SizedBox()
|
|
|
|
: Text(sessionsInfo.remark,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(12))),
|
|
|
|
sessionsInfo.remark == null || sessionsInfo.remark == ''
|
|
|
|
? SizedBox()
|
|
|
|
: VEmptyView(16),
|
|
|
|
_getGridImg(sessionsInfo.images.map((e) {
|
|
|
|
return e.url;
|
|
|
|
}).toList())
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// 九宫格
|
|
|
|
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],
|
|
|
|
// 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 costWidget() {
|
|
|
|
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(crossAxisAlignment: CrossAxisAlignment.start, 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)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(34),
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: feastModel.banquetDetail.costInfo.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
CostInfoModel costInfoModel =
|
|
|
|
feastModel.banquetDetail.costInfo[index];
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(12), right: w(12), bottom: w(27)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'${costInfoModel.title}:',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
VEmptyView(8),
|
|
|
|
costItem('名称', '单价', '数量', '金额', isTitle: true),
|
|
|
|
ListView.builder(
|
|
|
|
itemCount: costInfoModel.data.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
CostInfoSunModel costInfoSunModel =
|
|
|
|
costInfoModel.data[index];
|
|
|
|
String name = '';
|
|
|
|
if (costInfoSunModel.cname != null) {
|
|
|
|
name = costInfoSunModel.cname;
|
|
|
|
}
|
|
|
|
if (costInfoSunModel.otherName != null) {
|
|
|
|
name = costInfoSunModel.otherName;
|
|
|
|
}
|
|
|
|
if (costInfoSunModel.wineName != null) {
|
|
|
|
name = costInfoSunModel.wineName;
|
|
|
|
}
|
|
|
|
return costItem(
|
|
|
|
name,
|
|
|
|
costInfoSunModel.unitPrice,
|
|
|
|
costInfoSunModel.numStr,
|
|
|
|
costInfoSunModel.price.toString(),
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
//服务费
|
|
|
|
Container(
|
|
|
|
height: h(32),
|
|
|
|
margin: EdgeInsets.only(bottom: h(8)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: w(80),
|
|
|
|
child: Text(
|
|
|
|
'服务费:',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (costInfoModel.service) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setState(() {
|
|
|
|
costInfoModel.service =
|
|
|
|
!costInfoModel.service;
|
|
|
|
});
|
|
|
|
if (costInfoModel.serviceC.text != '') {
|
|
|
|
// _calculatePrice(
|
|
|
|
// costInfoModel,
|
|
|
|
// );
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(costInfoModel.service
|
|
|
|
? 'f_radio_sel'
|
|
|
|
: 'f_radio_un'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Text(
|
|
|
|
'固定金额',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
HEmptyView(16),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (!costInfoModel.service) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setState(() {
|
|
|
|
costInfoModel.service =
|
|
|
|
!costInfoModel.service;
|
|
|
|
});
|
|
|
|
if (costInfoModel.serviceC.text != '') {
|
|
|
|
// _calculatePrice(
|
|
|
|
// costInfoModel,
|
|
|
|
// );
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(!costInfoModel.service
|
|
|
|
? 'f_radio_sel'
|
|
|
|
: 'f_radio_un'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Container(
|
|
|
|
width: w(40),
|
|
|
|
child: Text(
|
|
|
|
'百分比',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
HEmptyView(12),
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
|
|
height: h(17),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color:
|
|
|
|
MyColours.color_DBDBDB))),
|
|
|
|
child: TextField(
|
|
|
|
maxLines: 1,
|
|
|
|
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
controller: costInfoModel.serviceC,
|
|
|
|
// focusNode: node,
|
|
|
|
// textAlignVertical: TextAlignVertical.top,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: '请输入',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: true
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
),
|
|
|
|
// contentPadding:
|
|
|
|
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
|
|
|
|
// border: InputBorder.none,
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide.none),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
print('ggg');
|
|
|
|
|
|
|
|
// _calculatePrice(
|
|
|
|
// costInfoModel,
|
|
|
|
// );
|
|
|
|
|
|
|
|
// nameStr = value;
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
// print('fff');
|
|
|
|
// node.unfocus();
|
|
|
|
// _homeEnterModel.nameController.text =
|
|
|
|
// nameStr + _nameSuffix();
|
|
|
|
// _addNameSuffix(nameStr, sexStr);
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType
|
|
|
|
.numberWithOptions())),
|
|
|
|
),
|
|
|
|
HEmptyView(4),
|
|
|
|
Text(
|
|
|
|
costInfoModel.service ? '元' : '%',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
//优惠金额
|
|
|
|
Container(
|
|
|
|
height: h(32),
|
|
|
|
margin: EdgeInsets.only(bottom: h(8)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: w(80),
|
|
|
|
child: Text(
|
|
|
|
'优惠金额:',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_E34D59,
|
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (costInfoModel.discount) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setState(() {
|
|
|
|
costInfoModel.discount =
|
|
|
|
!costInfoModel.discount;
|
|
|
|
});
|
|
|
|
if (costInfoModel.discountC.text != '') {
|
|
|
|
// _calculatePrice(
|
|
|
|
// costInfoModel,
|
|
|
|
// );
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Row(children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(costInfoModel.discount
|
|
|
|
? 'f_radio_sel'
|
|
|
|
: 'f_radio_un'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Text(
|
|
|
|
'固定金额',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
])),
|
|
|
|
HEmptyView(16),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (!costInfoModel.discount) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setState(() {
|
|
|
|
costInfoModel.discount =
|
|
|
|
!costInfoModel.discount;
|
|
|
|
});
|
|
|
|
if (costInfoModel.discountC.text != '') {
|
|
|
|
// _calculatePrice(
|
|
|
|
// costInfoModel,
|
|
|
|
// );
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Row(children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(!costInfoModel.discount
|
|
|
|
? 'f_radio_sel'
|
|
|
|
: 'f_radio_un'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(8),
|
|
|
|
Container(
|
|
|
|
width: w(40),
|
|
|
|
child: Text(
|
|
|
|
'折扣',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: font(12)),
|
|
|
|
))
|
|
|
|
])),
|
|
|
|
HEmptyView(12),
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
|
|
height: h(17),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color:
|
|
|
|
MyColours.color_DBDBDB))),
|
|
|
|
child: TextField(
|
|
|
|
maxLines: 1,
|
|
|
|
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
controller: costInfoModel.discountC,
|
|
|
|
// focusNode: node,
|
|
|
|
// textAlignVertical: TextAlignVertical.top,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: '请输入',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: true
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_E34D59,
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
),
|
|
|
|
// contentPadding:
|
|
|
|
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
|
|
|
|
// border: InputBorder.none,
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide.none),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
print('ggg');
|
|
|
|
|
|
|
|
// _calculatePrice(
|
|
|
|
// costInfoModel,
|
|
|
|
// );
|
|
|
|
|
|
|
|
// nameStr = value;
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
// print('fff');
|
|
|
|
// node.unfocus();
|
|
|
|
// _homeEnterModel.nameController.text =
|
|
|
|
// nameStr + _nameSuffix();
|
|
|
|
// _addNameSuffix(nameStr, sexStr);
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType
|
|
|
|
.numberWithOptions())),
|
|
|
|
),
|
|
|
|
HEmptyView(4),
|
|
|
|
Text(
|
|
|
|
costInfoModel.discount ? '元' : '%',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
fontSize: font(12)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
//合计
|
|
|
|
Container(
|
|
|
|
height: h(24),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours.color_DBDBDB))),
|
|
|
|
child: Row(children: [
|
|
|
|
Text(
|
|
|
|
'合计',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(14)),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Text(
|
|
|
|
'${costInfoModel.totalPrice} 元',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: font(14)),
|
|
|
|
),
|
|
|
|
HEmptyView(48)
|
|
|
|
]))
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}),
|
|
|
|
]));
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _callButton(
|
|
|
|
{GestureTapCallback onPress,
|
|
|
|
content,
|
|
|
|
hasLeftBorder = true,
|
|
|
|
Color textColor = MyColours.color_438E93,
|
|
|
|
isSelect = false}) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: onPress,
|
|
|
|
child: Container(
|
|
|
|
height: h(48),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: isSelect ? MyColours.color_438E93 : MyColours.color_ffffff,
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
width: ScreenUtil().setWidth(2)),
|
|
|
|
top: BorderSide(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
width: ScreenUtil().setWidth(2)),
|
|
|
|
left: hasLeftBorder
|
|
|
|
? BorderSide(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
width: ScreenUtil().setWidth(2))
|
|
|
|
: BorderSide.none,
|
|
|
|
right: BorderSide(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
width: ScreenUtil().setWidth(2)))),
|
|
|
|
child: Align(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
content,
|
|
|
|
style: TextStyle(
|
|
|
|
color: isSelect ? MyColours.color_F6F6F6 : textColor,
|
|
|
|
fontSize: ScreenUtil().setSp(36)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///费用item
|
|
|
|
Widget costItem(
|
|
|
|
String name,
|
|
|
|
String unitprice,
|
|
|
|
String amount,
|
|
|
|
String money, {
|
|
|
|
bool isTitle = false,
|
|
|
|
}) {
|
|
|
|
Color color = isTitle ? MyColours.color_438E93 : MyColours.color_515151;
|
|
|
|
return Container(
|
|
|
|
height: h(25),
|
|
|
|
margin: EdgeInsets.only(bottom: isTitle ? 0 : h(8)),
|
|
|
|
decoration: !isTitle
|
|
|
|
? BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom:
|
|
|
|
BorderSide(width: w(1), color: MyColours.color_DBDBDB)))
|
|
|
|
: BoxDecoration(),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
name,
|
|
|
|
style: TextStyle(color: color, fontSize: font(12)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
width: w(62),
|
|
|
|
child: Text(
|
|
|
|
unitprice,
|
|
|
|
style: TextStyle(color: color, fontSize: font(12)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
width: w(62),
|
|
|
|
child: Text(
|
|
|
|
amount,
|
|
|
|
style: TextStyle(color: color, fontSize: font(12)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
width: w(62),
|
|
|
|
child: Text(
|
|
|
|
money,
|
|
|
|
style: TextStyle(color: color, fontSize: font(12)),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// 发票
|
|
|
|
Widget invoiceWidget() {
|
|
|
|
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(crossAxisAlignment: CrossAxisAlignment.start, 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)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(16),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: w(12), right: w(12), top: w(11), bottom: w(35)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
feastModel.banquetDetail.invoice == null ||
|
|
|
|
feastModel.banquetDetail.invoice.unitName == null
|
|
|
|
? SizedBox()
|
|
|
|
: Container(
|
|
|
|
// margin: EdgeInsets.only(top: w(31)),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: w(8),
|
|
|
|
bottom: w(8),
|
|
|
|
),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: w(1),
|
|
|
|
color: MyColours.color_DBDBDB))),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
feastModel.banquetDetail.invoice.unitName,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
),
|
|
|
|
VEmptyView(16),
|
|
|
|
Text(
|
|
|
|
feastModel.banquetDetail.invoice
|
|
|
|
.invoiceType ==
|
|
|
|
'1'
|
|
|
|
? '增值税普通发票'
|
|
|
|
: '增值税专用发票',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(24)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// //弹框确认是否删除
|
|
|
|
// DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
// title: "",
|
|
|
|
// content: "是否确定删除?",
|
|
|
|
// isBoldContent: true,
|
|
|
|
// contentColor: MyColours.color_E6000000,
|
|
|
|
// rTitle: "删除", rCallback: () {
|
|
|
|
// feastModel.banquetDetail.invoice = null;
|
|
|
|
// setState(() {});
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// child: Image.asset(
|
|
|
|
// Utils.getImgPath('f_delete_red'),
|
|
|
|
// width: w(20))),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// VEmptyView(48),
|
|
|
|
// Consumer<UploadImageProvider>(builder: (context, model, _) {
|
|
|
|
// return ImgPickerFWidget(
|
|
|
|
// model: model,
|
|
|
|
// scrollController: _scrollController,
|
|
|
|
// uploadType: UploadType.FeastRemarkInvoiceType,
|
|
|
|
// bgColor: MyColours.color_DBDBDB,
|
|
|
|
// size: 64,
|
|
|
|
// crossAxisCount: 4,
|
|
|
|
// maxImageNumber: 8,
|
|
|
|
// mainAxisSpacing: 72,
|
|
|
|
// crossAxisSpacing: 56,
|
|
|
|
// );
|
|
|
|
// }),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
]));
|
|
|
|
}
|
|
|
|
|
|
|
|
///签约
|
|
|
|
Widget qyWidget() {
|
|
|
|
return Column(children: <Widget>[
|
|
|
|
Expanded(child: Consumer<FeastModel>(builder: (context, model, _) {
|
|
|
|
if (model.pageStateBanquet != PageState.Success) {
|
|
|
|
return ExceptionPage(
|
|
|
|
pageState: model.pageStateDeposit,
|
|
|
|
callback: () {
|
|
|
|
_getBanquetById();
|
|
|
|
},
|
|
|
|
emptyMsg: "暂时没有宴会详情哦",
|
|
|
|
emptyImg: "empty_search",
|
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(12)),
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: _scrollController,
|
|
|
|
child: Column(children: [
|
|
|
|
VEmptyView(32),
|
|
|
|
baseInfoWidget(), //基本信息
|
|
|
|
VEmptyView(52),
|
|
|
|
//场次
|
|
|
|
ListView.builder(
|
|
|
|
itemCount:
|
|
|
|
feastModel.banquetDetail.sessionsInfo.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollController,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
SessionsInfo sessionsInfo = feastModel
|
|
|
|
.banquetDetail.sessionsInfo[index];
|
|
|
|
String numStr =
|
|
|
|
ConvertNumberToChineseMoneyWords.toChinese(
|
|
|
|
index);
|
|
|
|
return sessionsWidget(
|
|
|
|
'第${numStr}场', sessionsInfo);
|
|
|
|
}),
|
|
|
|
//费用详情
|
|
|
|
costWidget(),
|
|
|
|
//合同
|
|
|
|
// contractWidget(),
|
|
|
|
|
|
|
|
invoiceWidget()
|
|
|
|
]))),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () {},
|
|
|
|
content: '丢单',
|
|
|
|
hasLeftBorder: true,
|
|
|
|
textColor: MyColours.color_E34D59,
|
|
|
|
isSelect: false)),
|
|
|
|
Expanded(
|
|
|
|
child: _callButton(
|
|
|
|
onPress: () async {
|
|
|
|
// selectMenu = '签约';
|
|
|
|
// menuSet.add('定金');
|
|
|
|
// menuSet.add('签约');
|
|
|
|
// setState(() {});
|
|
|
|
// for (UploadImgModel item in _uploadImageProvider
|
|
|
|
// .feastRemarkContractImageList) {
|
|
|
|
// if (item.process < 1) {
|
|
|
|
// Utils.showToast('正在上传图片,请稍等');
|
|
|
|
// return false;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// for (UploadImgModel item in _uploadImageProvider
|
|
|
|
// .feastRemarkInvoiceImageList) {
|
|
|
|
// if (item.process < 1) {
|
|
|
|
// Utils.showToast('正在上传图片,请稍等');
|
|
|
|
// return false;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// _setData();
|
|
|
|
},
|
|
|
|
content: '编辑宴会',
|
|
|
|
hasLeftBorder: true,
|
|
|
|
isSelect: true))
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}))
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
feastModel = Provider.of<FeastModel>(context, listen: true);
|
|
|
|
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: MyColours.color_ffffff,
|
|
|
|
appBar: SystemAppBar(
|
|
|
|
'宴会详情',
|
|
|
|
needWhite: true,
|
|
|
|
bgColor: MyColours.color_438E93,
|
|
|
|
titleColor: MyColours.color_F6F6F6,
|
|
|
|
onTap: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
body: qyWidget());
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|