|
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_screenutil/screenutil.dart';
|
|
|
|
import 'package:one_key/pages/online_check/img_picker_widget_f.dart';
|
|
|
|
import 'package:one_key/pages/online_check/photo_view_wiget.dart';
|
|
|
|
import 'package:one_key/provider/message_dialog_model.dart';
|
|
|
|
import 'package:one_key/provider/online_check_edit_provider.dart';
|
|
...
|
...
|
@@ -91,22 +93,23 @@ class _OnlineCheckDetailPageState extends State<OnlineCheckDetailPage> { |
|
|
|
|
|
|
|
///顾客信息
|
|
|
|
Widget _customInfoItemWidget(String title, String subTitle,
|
|
|
|
{Color textColor = MyColours.color_707070, bool isBold = false}) {
|
|
|
|
{double fontsize = 28}) {
|
|
|
|
return Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
title,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: isBold ? FontWeight.bold : FontWeight.normal,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: textColor),
|
|
|
|
fontSize: ScreenUtil().setSp(24), color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
subTitle,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: textColor,
|
|
|
|
decoration: fontsize == 20
|
|
|
|
? TextDecoration.underline
|
|
|
|
: TextDecoration.none,
|
|
|
|
fontSize: ScreenUtil().setSp(fontsize),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
)
|
|
|
|
],
|
|
...
|
...
|
@@ -263,6 +266,164 @@ class _OnlineCheckDetailPageState extends State<OnlineCheckDetailPage> { |
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///桌位信息
|
|
|
|
Widget _getTabInfoWidget() {
|
|
|
|
bool showArrow = false;
|
|
|
|
//1散座 2包间 3卡座
|
|
|
|
List<String> tableNameSunList1 = []; //单个类型包含的所有桌子名称
|
|
|
|
List<String> tableNameSunList2 = []; //单个类型包含的所有桌子名称
|
|
|
|
List<String> tableNameSunList3 = []; //单个类型包含的所有桌子名称
|
|
|
|
if (_orderFoodProvider.reserveDetailSunModel != null) {
|
|
|
|
tableNameSunList1 =
|
|
|
|
_orderFoodProvider.reserveDetailSunModel.tableNameList[0]['散座'];
|
|
|
|
tableNameSunList2 =
|
|
|
|
_orderFoodProvider.reserveDetailSunModel.tableNameList[1]['包间'];
|
|
|
|
tableNameSunList3 =
|
|
|
|
_orderFoodProvider.reserveDetailSunModel.tableNameList[2]['卡座'];
|
|
|
|
if (tableNameSunList2.length > 0) {
|
|
|
|
if (arrowStatus) {
|
|
|
|
_orderFoodProvider.showTable = '【包间】${tableNameSunList2[0]}';
|
|
|
|
} else {
|
|
|
|
_orderFoodProvider.showTable = '';
|
|
|
|
}
|
|
|
|
} else if (tableNameSunList3.length > 0) {
|
|
|
|
if (arrowStatus) {
|
|
|
|
_orderFoodProvider.showTable = '【卡座】${tableNameSunList3[0]}';
|
|
|
|
} else {
|
|
|
|
_orderFoodProvider.showTable = '';
|
|
|
|
}
|
|
|
|
} else if (tableNameSunList1.length > 0) {
|
|
|
|
if (arrowStatus) {
|
|
|
|
_orderFoodProvider.showTable = '【散座】${tableNameSunList1[0]}';
|
|
|
|
} else {
|
|
|
|
_orderFoodProvider.showTable = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (tableNameSunList1.length > 1 ||
|
|
|
|
tableNameSunList2.length > 1 ||
|
|
|
|
tableNameSunList3.length > 1) {
|
|
|
|
showArrow = true;
|
|
|
|
} else {
|
|
|
|
showArrow = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: Colors.white,
|
|
|
|
// borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (showArrow) {
|
|
|
|
//有arrow
|
|
|
|
arrowStatus = !arrowStatus;
|
|
|
|
_orderFoodProvider.notifyListeners();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
// padding: EdgeInsets.symmetric(
|
|
|
|
// horizontal: ScreenUtil().setWidth(40),
|
|
|
|
// vertical: ScreenUtil().setWidth(36)),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'桌位信息',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Text(
|
|
|
|
_orderFoodProvider.reserveDetailSunModel != null
|
|
|
|
? _orderFoodProvider.showTable
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: !showArrow,
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
HEmptyView(20),
|
|
|
|
Image.asset(
|
|
|
|
arrowStatus
|
|
|
|
? Utils.getImgPath('down')
|
|
|
|
: Utils.getImgPath('up'),
|
|
|
|
width: ScreenUtil().setWidth(24),
|
|
|
|
height: ScreenUtil().setWidth(12))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: arrowStatus,
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
tableNameSunList2.length > 0
|
|
|
|
? Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(60),
|
|
|
|
ScreenUtil().setWidth(0),
|
|
|
|
ScreenUtil().setWidth(60),
|
|
|
|
ScreenUtil().setWidth(10)),
|
|
|
|
child: Text(
|
|
|
|
'【包间】${Utils.listToString(tableNameSunList2)}',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
tableNameSunList3.length > 0
|
|
|
|
? Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(60),
|
|
|
|
ScreenUtil().setWidth(0),
|
|
|
|
ScreenUtil().setWidth(60),
|
|
|
|
ScreenUtil().setWidth(10)),
|
|
|
|
child: Text(
|
|
|
|
'【卡座】${Utils.listToString(tableNameSunList3)}',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
tableNameSunList1.length > 0
|
|
|
|
? Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(60),
|
|
|
|
ScreenUtil().setWidth(0),
|
|
|
|
ScreenUtil().setWidth(60),
|
|
|
|
ScreenUtil().setWidth(10)),
|
|
|
|
child: Text(
|
|
|
|
'【散座】${Utils.listToString(tableNameSunList1)}',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
VEmptyView(36),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///顾客信息
|
|
|
|
Widget _customerInfoWidget() {
|
|
|
|
bool showArrow = false;
|
|
...
|
...
|
@@ -497,68 +658,296 @@ class _OnlineCheckDetailPageState extends State<OnlineCheckDetailPage> { |
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///买单信息
|
|
|
|
Widget _orderInfoWidget() {
|
|
|
|
// ///买单信息
|
|
|
|
// Widget _orderInfoWidget() {
|
|
|
|
// return Container(
|
|
|
|
// width: double.infinity,
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: Colors.white, borderRadius: BorderRadius.circular(10)),
|
|
|
|
// child: Column(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
// children: <Widget>[
|
|
|
|
// Container(
|
|
|
|
// height: ScreenUtil().setWidth(58 * 2),
|
|
|
|
// width: double.infinity,
|
|
|
|
// padding: EdgeInsets.fromLTRB(
|
|
|
|
// ScreenUtil().setWidth(20),
|
|
|
|
// ScreenUtil().setWidth(36),
|
|
|
|
// ScreenUtil().setWidth(20),
|
|
|
|
// ScreenUtil().setWidth(26)),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: MyColours.color_FAFAFA,
|
|
|
|
// borderRadius: BorderRadius.only(
|
|
|
|
// topLeft: Radius.circular(10),
|
|
|
|
// topRight: Radius.circular(10)),
|
|
|
|
// ),
|
|
|
|
// child: Text(
|
|
|
|
// '买单信息',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(32),
|
|
|
|
// color: MyColours.color_353535,
|
|
|
|
// fontWeight: FontWeight.bold),
|
|
|
|
// )),
|
|
|
|
// Padding(
|
|
|
|
// padding: EdgeInsets.fromLTRB(
|
|
|
|
// ScreenUtil().setWidth(40),
|
|
|
|
// ScreenUtil().setWidth(24),
|
|
|
|
// ScreenUtil().setWidth(40),
|
|
|
|
// ScreenUtil().setWidth(36)),
|
|
|
|
// child: Column(children: [
|
|
|
|
// _customInfoItemWidget(
|
|
|
|
// '应收金额',
|
|
|
|
// _onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
// ? '¥ ${_onlineCheckEditProvider.orderInfoSunModel.shouldPrice}'
|
|
|
|
// : ''),
|
|
|
|
// VEmptyView(24),
|
|
|
|
// _customInfoItemWidget(
|
|
|
|
// '实收金额',
|
|
|
|
// _onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
// ? '¥ ${_onlineCheckEditProvider.orderInfoSunModel.price}'
|
|
|
|
// : '',
|
|
|
|
// textColor: MyColours.color_353535,
|
|
|
|
// isBold: true),
|
|
|
|
// VEmptyView(24),
|
|
|
|
// _customInfoItemWidget('支付方式', '微信支付'),
|
|
|
|
// VEmptyView(24),
|
|
|
|
// _customInfoItemWidget(
|
|
|
|
// '买单时间',
|
|
|
|
// _onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
// ? _onlineCheckEditProvider
|
|
|
|
// .orderInfoSunModel?.payTimeStr
|
|
|
|
// : ''),
|
|
|
|
// VEmptyView(24),
|
|
|
|
// ]))
|
|
|
|
// ]));
|
|
|
|
// }
|
|
|
|
|
|
|
|
Widget _customInfoWidget() {
|
|
|
|
return Container(
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white, borderRadius: BorderRadius.circular(10)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
color: Colors.white,
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(64),
|
|
|
|
ScreenUtil().setWidth(26),
|
|
|
|
ScreenUtil().setWidth(64),
|
|
|
|
ScreenUtil().setWidth(26)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
_customInfoItemWidget(
|
|
|
|
'顾客',
|
|
|
|
_orderFoodProvider.reserveDetailSunModel != null
|
|
|
|
? _orderFoodProvider.reserveDetailSunModel.rnameStr
|
|
|
|
: ''),
|
|
|
|
VEmptyView(24),
|
|
|
|
// _customInfoItemWidget(
|
|
|
|
// '顾客电话',
|
|
|
|
// _orderFoodProvider.reserveDetailSunModel != null
|
|
|
|
// ? _orderFoodProvider.reserveDetailSunModel.phone
|
|
|
|
// : ''),
|
|
|
|
_getTabInfoWidget(),
|
|
|
|
VEmptyView(24),
|
|
|
|
_customInfoItemWidget(
|
|
|
|
'到店时间',
|
|
|
|
_orderFoodProvider.reserveDetailSunModel != null
|
|
|
|
? _orderFoodProvider.reserveDetailSunModel.ddateStr
|
|
|
|
: ''),
|
|
|
|
VEmptyView(24),
|
|
|
|
_customInfoItemWidget(
|
|
|
|
'申请时间',
|
|
|
|
_orderFoodProvider.reserveDetailSunModel != null
|
|
|
|
? _orderFoodProvider.reserveDetailSunModel.cdateStr
|
|
|
|
: '')
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
// _getGridImg(1, context)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///发票信息
|
|
|
|
Widget _invoiceInfoWidget() {
|
|
|
|
return Container(
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white, borderRadius: BorderRadius.circular(10)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(58 * 2),
|
|
|
|
width: double.infinity,
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(20),
|
|
|
|
ScreenUtil().setWidth(36),
|
|
|
|
ScreenUtil().setWidth(20),
|
|
|
|
ScreenUtil().setWidth(26)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_FAFAFA,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(10),
|
|
|
|
topRight: Radius.circular(10)),
|
|
|
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <
|
|
|
|
Widget>[
|
|
|
|
// Container(
|
|
|
|
// height: ScreenUtil().setWidth(53 * 2),
|
|
|
|
// width: double.infinity,
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: MyColours.color_FAFAFA,
|
|
|
|
// borderRadius: BorderRadius.only(
|
|
|
|
// topLeft: Radius.circular(10),
|
|
|
|
// topRight: Radius.circular(10)),
|
|
|
|
// ),
|
|
|
|
// child: Padding(
|
|
|
|
// padding: EdgeInsets.fromLTRB(
|
|
|
|
// ScreenUtil().setWidth(20),
|
|
|
|
// ScreenUtil().setWidth(36),
|
|
|
|
// ScreenUtil().setWidth(20),
|
|
|
|
// ScreenUtil().setWidth(26)),
|
|
|
|
// child: Text(
|
|
|
|
// '发票信息',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(32),
|
|
|
|
// color: MyColours.color_353535,
|
|
|
|
// fontWeight: FontWeight.bold),
|
|
|
|
// ),
|
|
|
|
// )),
|
|
|
|
Container(
|
|
|
|
color: Colors.white,
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
ScreenUtil().setWidth(24),
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
ScreenUtil().setWidth(36)),
|
|
|
|
child: Column(children: [
|
|
|
|
_customInfoItemWidget(
|
|
|
|
'发票抬头',
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.invoice.title
|
|
|
|
: '',
|
|
|
|
fontsize: 20),
|
|
|
|
Offstage(
|
|
|
|
offstage: _onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.invoice.taxnumber ==
|
|
|
|
''
|
|
|
|
: true,
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.only(top: ScreenUtil().setWidth(24)),
|
|
|
|
child: _customInfoItemWidget(
|
|
|
|
'税号',
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.invoice.taxnumber
|
|
|
|
: '',
|
|
|
|
fontsize: 20),
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
'买单信息',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
)),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
ScreenUtil().setWidth(24),
|
|
|
|
ScreenUtil().setWidth(40),
|
|
|
|
ScreenUtil().setWidth(36)),
|
|
|
|
child: Column(children: [
|
|
|
|
_customInfoItemWidget(
|
|
|
|
'应收金额',
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: _onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.invoice.companyaddress ==
|
|
|
|
''
|
|
|
|
: true,
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.only(top: ScreenUtil().setWidth(24)),
|
|
|
|
child: _customInfoItemWidget(
|
|
|
|
'地址',
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? '¥ ${_onlineCheckEditProvider.orderInfoSunModel.shouldPrice}'
|
|
|
|
: ''),
|
|
|
|
VEmptyView(24),
|
|
|
|
_customInfoItemWidget(
|
|
|
|
'实收金额',
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.invoice.companyaddress
|
|
|
|
: '',
|
|
|
|
fontsize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: _onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.invoice.telephone ==
|
|
|
|
''
|
|
|
|
: true,
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.only(top: ScreenUtil().setWidth(24)),
|
|
|
|
child: _customInfoItemWidget(
|
|
|
|
'电话',
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? '¥ ${_onlineCheckEditProvider.orderInfoSunModel.price}'
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.invoice.telephone
|
|
|
|
: '',
|
|
|
|
textColor: MyColours.color_353535,
|
|
|
|
isBold: true),
|
|
|
|
VEmptyView(24),
|
|
|
|
_customInfoItemWidget('支付方式', '微信支付'),
|
|
|
|
VEmptyView(24),
|
|
|
|
_customInfoItemWidget(
|
|
|
|
'买单时间',
|
|
|
|
fontsize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: _onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.invoice.bankname ==
|
|
|
|
''
|
|
|
|
: true,
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.only(top: ScreenUtil().setWidth(24)),
|
|
|
|
child: _customInfoItemWidget(
|
|
|
|
'开户行',
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel?.payTimeStr
|
|
|
|
: ''),
|
|
|
|
VEmptyView(24),
|
|
|
|
]))
|
|
|
|
]));
|
|
|
|
.orderInfoSunModel.invoice.bankname
|
|
|
|
: '',
|
|
|
|
fontsize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Offstage(
|
|
|
|
offstage: _onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.invoice.bankaccount ==
|
|
|
|
''
|
|
|
|
: true,
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.only(top: ScreenUtil().setWidth(24)),
|
|
|
|
child: _customInfoItemWidget(
|
|
|
|
'账号',
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.invoice.bankaccount
|
|
|
|
: '',
|
|
|
|
fontsize: 20),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
]))
|
|
|
|
]));
|
|
|
|
}
|
|
|
|
|
|
|
|
///应收金额
|
|
|
|
Widget _getMoneyInfoWidget() {
|
|
|
|
return Container(
|
|
|
|
color: Colors.white,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(64),
|
|
|
|
vertical: ScreenUtil().setWidth(14)),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'消费金额',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
// HEmptyView(40),
|
|
|
|
Container(
|
|
|
|
width: ScreenUtil().setWidth(110),
|
|
|
|
height: ScreenUtil().setWidth(40),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_515151))),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? '¥ ${_onlineCheckEditProvider.orderInfoSunModel.price}'
|
|
|
|
: '',
|
|
|
|
maxLines: 1,
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
// decoration: TextDecoration.underline,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
...
|
...
|
@@ -571,7 +960,7 @@ class _OnlineCheckDetailPageState extends State<OnlineCheckDetailPage> { |
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: MyColours.color_f5f5f5,
|
|
|
|
appBar: SystemAppBar(
|
|
|
|
'买单申请详情',
|
|
|
|
'在线买单',
|
|
|
|
onTap: () {
|
|
|
|
if (widget.fromNotify) {
|
|
|
|
NavigatorUtil.goHomePage(context, initialIndex: 0);
|
|
...
|
...
|
@@ -582,26 +971,184 @@ class _OnlineCheckDetailPageState extends State<OnlineCheckDetailPage> { |
|
|
|
),
|
|
|
|
body: WillPopScope(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.all(ScreenUtil().setWidth(20)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
_consumptionInfoWidget(),
|
|
|
|
VEmptyView(20),
|
|
|
|
_customerInfoWidget(),
|
|
|
|
VEmptyView(20),
|
|
|
|
Offstage(
|
|
|
|
offstage: _onlineCheckEditProvider.orderInfoSunModel !=
|
|
|
|
null
|
|
|
|
? _onlineCheckEditProvider.orderInfoSunModel.status ==
|
|
|
|
'2'
|
|
|
|
: true,
|
|
|
|
child: _orderInfoWidget(),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.all(ScreenUtil().setWidth(20)),
|
|
|
|
child: Column(children: [
|
|
|
|
// _consumptionInfoWidget(),
|
|
|
|
// VEmptyView(20),
|
|
|
|
// _customerInfoWidget(),
|
|
|
|
VEmptyView(30),
|
|
|
|
_customInfoWidget(),
|
|
|
|
|
|
|
|
VEmptyView(72),
|
|
|
|
Stack(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
children: [
|
|
|
|
_getMoneyInfoWidget(),
|
|
|
|
//2待支付 wait_pay 3已买单 has_pay
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? Align(
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(_onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.status ==
|
|
|
|
'2'
|
|
|
|
? 'wait_pay'
|
|
|
|
: 'has_pay'),
|
|
|
|
width: ScreenUtil().setWidth(56 * 2),
|
|
|
|
height: ScreenUtil().setWidth(28 * 2),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: Container(),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
// 备注信息
|
|
|
|
Offstage(
|
|
|
|
offstage:
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.orderRemark ==
|
|
|
|
''
|
|
|
|
: true,
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(20),
|
|
|
|
right: ScreenUtil().setWidth(20),
|
|
|
|
left: ScreenUtil().setWidth(20)),
|
|
|
|
child: Text(
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? _onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.orderRemark
|
|
|
|
: '',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(24),
|
|
|
|
color: MyColours.color_FD5656),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(20),
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius.circular(10)
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
_onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.billList.length >
|
|
|
|
0
|
|
|
|
? Container(
|
|
|
|
height: ScreenUtil().setWidth(53 * 2),
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius.only(
|
|
|
|
// topLeft:
|
|
|
|
// Radius.circular(
|
|
|
|
// 10),
|
|
|
|
// topRight:
|
|
|
|
// Radius.circular(
|
|
|
|
// 10)),
|
|
|
|
),
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(32),
|
|
|
|
ScreenUtil().setWidth(24),
|
|
|
|
ScreenUtil().setWidth(20),
|
|
|
|
ScreenUtil().setWidth(24)),
|
|
|
|
child: Text(
|
|
|
|
'上传图片',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_000000,
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
))
|
|
|
|
: SizedBox(),
|
|
|
|
_onlineCheckEditProvider.orderInfoSunModel != null
|
|
|
|
? Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(32),
|
|
|
|
ScreenUtil().setWidth(0),
|
|
|
|
ScreenUtil().setWidth(20),
|
|
|
|
ScreenUtil().setWidth(24)),
|
|
|
|
child: Consumer<UploadImageProvider>(
|
|
|
|
builder: (context, model, _) {
|
|
|
|
List<String> temp = [];
|
|
|
|
for (int i = 0;
|
|
|
|
i <
|
|
|
|
_onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel
|
|
|
|
.billList
|
|
|
|
.length;
|
|
|
|
i++) {
|
|
|
|
temp.add(_onlineCheckEditProvider
|
|
|
|
.orderInfoSunModel.billList[i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
return temp.length > 0
|
|
|
|
? GridView.builder(
|
|
|
|
// controller: widget.scrollController,
|
|
|
|
// padding: EdgeInsets.only(top: ScreenUtil().getAdapterSize(10)),
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemCount: temp.length,
|
|
|
|
|
|
|
|
//SliverGridDelegateWithFixedCrossAxisCount 构建一个横轴固定数量Widget
|
|
|
|
gridDelegate:
|
|
|
|
SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
//横轴元素个数
|
|
|
|
crossAxisCount: 3,
|
|
|
|
//纵轴间距
|
|
|
|
mainAxisSpacing:
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(40),
|
|
|
|
//横轴间距
|
|
|
|
crossAxisSpacing:
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(36),
|
|
|
|
//子组件宽高长度比例
|
|
|
|
childAspectRatio: 1.0),
|
|
|
|
itemBuilder:
|
|
|
|
(BuildContext context,
|
|
|
|
int index) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
_showPhotoView(
|
|
|
|
context,
|
|
|
|
0,
|
|
|
|
temp,
|
|
|
|
);
|
|
|
|
},
|
|
|
|
child: CachedNetworkImage(
|
|
|
|
imageUrl: temp[index],
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
width: ScreenUtil()
|
|
|
|
.setWidth(80 * 2),
|
|
|
|
height: ScreenUtil()
|
|
|
|
.setWidth(80 * 2),
|
|
|
|
));
|
|
|
|
})
|
|
|
|
: SizedBox();
|
|
|
|
}))
|
|
|
|
: SizedBox(),
|
|
|
|
VEmptyView(36),
|
|
|
|
_invoiceInfoWidget(),
|
|
|
|
VEmptyView(36),
|
|
|
|
// Offstage(
|
|
|
|
// offstage: _onlineCheckEditProvider.orderInfoSunModel !=
|
|
|
|
// null
|
|
|
|
// ? _onlineCheckEditProvider.orderInfoSunModel.status ==
|
|
|
|
// '2'
|
|
|
|
// : true,
|
|
|
|
// child: _orderInfoWidget(),
|
|
|
|
// )
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
]))),
|
|
|
|
onWillPop: () async {
|
|
|
|
if (widget.fromNotify) {
|
|
|
|
NavigatorUtil.goHomePage(context, initialIndex: 0);
|
...
|
...
|
|