|
...
|
...
|
@@ -293,14 +293,25 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
}
|
|
|
|
|
|
|
|
handlePostFrame(_) {
|
|
|
|
if (_scrollController.hasClients) {
|
|
|
|
_scrollController.jumpTo(_scrollController.position.maxScrollExtent +
|
|
|
|
ScreenUtil().setWidth(140));
|
|
|
|
}
|
|
|
|
// if (_scrollController.hasClients) {
|
|
|
|
// _scrollController.jumpTo(_scrollController.position.maxScrollExtent -
|
|
|
|
// ScreenUtil().setWidth(350));
|
|
|
|
// }
|
|
|
|
setState(() {
|
|
|
|
if (MediaQuery.of(context).viewInsets.bottom == 0) {
|
|
|
|
//关闭键盘
|
|
|
|
|
|
|
|
removeOverlay();
|
|
|
|
} else {
|
|
|
|
//显示键盘
|
|
|
|
showOverlay(context);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
void dispose() {
|
|
|
|
removeOverlay();
|
|
|
|
Utils.changeStatusColor();
|
|
|
|
couponProvider.clearSelect();
|
|
|
|
bus.off("refresh_coupon_invitation");
|
|
...
|
...
|
@@ -321,9 +332,9 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
super.didChangeMetrics();
|
|
|
|
print(MediaQuery.of(context).viewInsets.bottom);
|
|
|
|
|
|
|
|
if (MediaQuery.of(context).viewInsets.bottom > 0) {
|
|
|
|
removeOverlay();
|
|
|
|
}
|
|
|
|
// if (MediaQuery.of(context).viewInsets.bottom > 0) {
|
|
|
|
// removeOverlay();
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
|
|
///获取短信余量
|
|
...
|
...
|
@@ -1642,516 +1653,498 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
// ScreenUtil().setWidth(2),
|
|
|
|
// color:
|
|
|
|
// MyColours.color_efefef),
|
|
|
|
enterMore
|
|
|
|
? Container(
|
|
|
|
height: ScreenUtil().setWidth(68),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(16)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(12)),
|
|
|
|
// color: Colors.red,
|
|
|
|
border: Border.all(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_DBDBDB)),
|
|
|
|
child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
right: ScreenUtil().setWidth(14)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'就餐人数:',
|
|
|
|
style: TextStyle(
|
|
|
|
// letterSpacing: ScreenUtil().setWidth(1.8 * 2),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
selectionControls:
|
|
|
|
_myExtendedMaterialTextSelectionControlsNum,
|
|
|
|
maxLines: 1,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
controller:
|
|
|
|
_baseIndoProvider.pnumController,
|
|
|
|
focusNode: _pnumNode,
|
|
|
|
// textAlignVertical: TextAlignVertical.top,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "选填",
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide.none),
|
|
|
|
),
|
|
|
|
onChanged: (value) async {
|
|
|
|
//操作
|
|
|
|
_baseIndoProvider.pnumController.text =
|
|
|
|
value;
|
|
|
|
//添加的代码:光标一直在文本框后面
|
|
|
|
_baseIndoProvider.pnumController.value =
|
|
|
|
TextEditingValue(
|
|
|
|
text: _baseIndoProvider
|
|
|
|
.pnumController.text,
|
|
|
|
selection:
|
|
|
|
TextSelection.fromPosition(
|
|
|
|
TextPosition(
|
|
|
|
affinity:
|
|
|
|
TextAffinity.downstream,
|
|
|
|
offset: _baseIndoProvider
|
|
|
|
.pnumController.text.length,
|
|
|
|
)));
|
|
|
|
|
|
|
|
print(value);
|
|
|
|
// if (value.trim().isEmpty) {
|
|
|
|
// //内容为空,或 超过11位
|
|
|
|
// setState(() {
|
|
|
|
// _baseIndoProvider.userHistorys
|
|
|
|
// .clear();
|
|
|
|
// });
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
if (value != null) {
|
|
|
|
detailModel.selectNum = value;
|
|
|
|
// detailModel
|
|
|
|
// .notifyListeners();
|
|
|
|
// setState(() {
|
|
|
|
// selectPnum = value.first;
|
|
|
|
// pnum = pnumlist[value.first];
|
|
|
|
// });
|
|
|
|
bool sucess = await detailModel
|
|
|
|
.upReserveInfo(context, widget.rid,
|
|
|
|
actualPum:
|
|
|
|
detailModel.selectNum,
|
|
|
|
needToast: false);
|
|
|
|
|
|
|
|
if (sucess) {
|
|
|
|
EventBus().emit(
|
|
|
|
"refresh_tablemanager"); //刷新桌位
|
|
|
|
bus.emit(
|
|
|
|
"refresh_book_list"); //刷新已预订列表
|
|
|
|
bus.emit("refresh_detail");
|
|
|
|
// await _getReserveDetail(
|
|
|
|
// showCicle: false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
_pnumNode.unfocus();
|
|
|
|
},
|
|
|
|
onTap: () {
|
|
|
|
// setState(() {
|
|
|
|
// showPhoneHistory = true;
|
|
|
|
// });
|
|
|
|
// // Future.delayed(Duration(milliseconds: 300), () {
|
|
|
|
// // _controller.jumpTo(_controller.position.maxScrollExtent);
|
|
|
|
// // });
|
|
|
|
},
|
|
|
|
keyboardType:
|
|
|
|
TextInputType.numberWithOptions(
|
|
|
|
decimal: true),
|
|
|
|
)),
|
|
|
|
// Expanded(
|
|
|
|
// child: InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// FocusScope.of(context)
|
|
|
|
// .requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
// DialogUtil.showSelectCusmanDialog(
|
|
|
|
// context, personNumList,
|
|
|
|
// (value) async {
|
|
|
|
// if (value != null) {
|
|
|
|
// detailModel.selectIndex =
|
|
|
|
// value.first;
|
|
|
|
// detailModel.selectNum =
|
|
|
|
// personNumList[value.first];
|
|
|
|
// // detailModel
|
|
|
|
// // .notifyListeners();
|
|
|
|
// // setState(() {
|
|
|
|
// // selectPnum = value.first;
|
|
|
|
// // pnum = pnumlist[value.first];
|
|
|
|
// // });
|
|
|
|
// bool sucess =
|
|
|
|
// await detailModel.upReserveInfo(
|
|
|
|
// context, widget.rid,
|
|
|
|
// actualPum:
|
|
|
|
// detailModel.selectNum,
|
|
|
|
// needToast: false);
|
|
|
|
|
|
|
|
// if (sucess) {
|
|
|
|
// EventBus().emit(
|
|
|
|
// "refresh_tablemanager"); //刷新桌位
|
|
|
|
// bus.emit(
|
|
|
|
// "refresh_book_list"); //刷新已预订列表
|
|
|
|
// bus.emit("refresh_detail");
|
|
|
|
// await _getReserveDetail(
|
|
|
|
// showCicle: false);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// selecteds: detailModel
|
|
|
|
// .selectIndex ==
|
|
|
|
// null
|
|
|
|
// ? []
|
|
|
|
// : [detailModel.selectIndex])
|
|
|
|
// .then((value) {});
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// child: Text(
|
|
|
|
// detailEntity.actual_pum == null ||
|
|
|
|
// detailEntity.actual_pum ==
|
|
|
|
// ''
|
|
|
|
// ? '选填'
|
|
|
|
// : detailEntity.actual_pum,
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil().setSp(28),
|
|
|
|
// color: detailEntity
|
|
|
|
// .actual_pum ==
|
|
|
|
// null ||
|
|
|
|
// detailEntity
|
|
|
|
// .actual_pum ==
|
|
|
|
// ''
|
|
|
|
// ? MyColours.color_999999
|
|
|
|
// : MyColours
|
|
|
|
// .color_515151))),
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// // HEmptyView(6),
|
|
|
|
// // Image.asset(
|
|
|
|
// // Utils.getImgPath(
|
|
|
|
// // false ? 'c_arrow_up' : 'c_arrow_down'),
|
|
|
|
// // width: ScreenUtil().setWidth(28),
|
|
|
|
// // // height: ScreenUtil().setWidth(10),
|
|
|
|
// // ),
|
|
|
|
// ),
|
|
|
|
]))),
|
|
|
|
MyDivider(
|
|
|
|
ScreenUtil().setWidth(2), ScreenUtil().setWidth(46),
|
|
|
|
color: MyColours.color_BFC4D4),
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(14)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'到店时间:',
|
|
|
|
style: TextStyle(
|
|
|
|
// letterSpacing: ScreenUtil().setWidth(1.8 * 2),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
//时间弹窗
|
|
|
|
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
DialogUtil.showSelectCusmanDialog(
|
|
|
|
context, dailyList,
|
|
|
|
(value) async {
|
|
|
|
if (value != null) {
|
|
|
|
ddateIndex = value.first;
|
|
|
|
ddateHm = dailyList[value.first];
|
|
|
|
setState(() {});
|
|
|
|
bool sucess =
|
|
|
|
await detailModel.upReserveInfo(
|
|
|
|
context, widget.rid,
|
|
|
|
dateStr: ddateHm,
|
|
|
|
ymd: detailEntity.ddateYMD,
|
|
|
|
needToast: false);
|
|
|
|
|
|
|
|
if (sucess) {
|
|
|
|
EventBus().emit(
|
|
|
|
"refresh_tablemanager"); //刷新桌位
|
|
|
|
bus.emit(
|
|
|
|
"refresh_book_list"); //刷新已预订列表
|
|
|
|
bus.emit("refresh_detail");
|
|
|
|
await _getReserveDetail(
|
|
|
|
showCicle: false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
title: '到店时间',
|
|
|
|
selecteds: ddateIndex == null
|
|
|
|
? []
|
|
|
|
: [ddateIndex])
|
|
|
|
.then((value) {});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
ddateHm == null || ddateHm == ''
|
|
|
|
? '选填'
|
|
|
|
: ddateHm,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(28),
|
|
|
|
color: ddateHm == null ||
|
|
|
|
ddateHm == ''
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151))),
|
|
|
|
),
|
|
|
|
|
|
|
|
// HEmptyView(6),
|
|
|
|
// Image.asset(
|
|
|
|
// Utils.getImgPath(
|
|
|
|
// false ? 'c_arrow_up' : 'c_arrow_down'),
|
|
|
|
// width: ScreenUtil().setWidth(28),
|
|
|
|
// // height: ScreenUtil().setWidth(10),
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
enterMore ? VEmptyView(40) : SizedBox(),
|
|
|
|
//电话
|
|
|
|
enterMore
|
|
|
|
? Container(
|
|
|
|
height: ScreenUtil().setWidth(68),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(16)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(12)),
|
|
|
|
// color: Colors.red,
|
|
|
|
border: Border.all(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_DBDBDB)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
selectionControls:
|
|
|
|
_myExtendedMaterialTextSelectionControls,
|
|
|
|
maxLines: 1,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
controller: _baseIndoProvider.phoneController,
|
|
|
|
focusNode: _phoneNode,
|
|
|
|
// textAlignVertical: TextAlignVertical.top,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "预留电话",
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
border: OutlineInputBorder(borderSide: BorderSide.none),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
print(value);
|
|
|
|
if (value.trim().isEmpty || value.trim().length > 11) {
|
|
|
|
//内容为空,或 超过11位
|
|
|
|
setState(() {
|
|
|
|
_baseIndoProvider.userHistorys.clear();
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Map<String, String> params = {
|
|
|
|
"keywords": value.trim(),
|
|
|
|
"sid": Provider.of<UserModel>(context, listen: false)
|
|
|
|
.user
|
|
|
|
.sellerid,
|
|
|
|
};
|
|
|
|
_baseIndoProvider.getUserHistorys(context, params);
|
|
|
|
_getIsMemberByPhone(value);
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
_phoneNode.unfocus();
|
|
|
|
},
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
showPhoneHistory = true;
|
|
|
|
});
|
|
|
|
// Future.delayed(Duration(milliseconds: 300), () {
|
|
|
|
// _controller.jumpTo(_controller.position.maxScrollExtent);
|
|
|
|
// });
|
|
|
|
},
|
|
|
|
keyboardType:
|
|
|
|
TextInputType.numberWithOptions(decimal: true),
|
|
|
|
)),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
_openAddressBook();
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
width: ScreenUtil().setWidth(74) * 2,
|
|
|
|
height: ScreenUtil().setWidth(48),
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
child: Text('一键录入',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
: SizedBox(),
|
|
|
|
Stack(
|
|
|
|
clipBehavior: Clip.none,
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
if (enterMore)
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(68),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(16)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(12)),
|
|
|
|
// color: Colors.red,
|
|
|
|
border: Border.all(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_DBDBDB)),
|
|
|
|
child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
children: [
|
|
|
|
//姓名
|
|
|
|
enterMore
|
|
|
|
? Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(40),
|
|
|
|
bottom: ScreenUtil().setWidth(40)),
|
|
|
|
height: ScreenUtil().setWidth(68),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(16)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(12)),
|
|
|
|
// color: Colors.red,
|
|
|
|
border: Border.all(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_DBDBDB)),
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(right: ScreenUtil().setWidth(14)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'就餐人数:',
|
|
|
|
style: TextStyle(
|
|
|
|
// letterSpacing: ScreenUtil().setWidth(1.8 * 2),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
selectionControls:
|
|
|
|
_myExtendedMaterialTextSelectionControlsNum,
|
|
|
|
maxLines: 1,
|
|
|
|
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
controller: _baseIndoProvider.nameController,
|
|
|
|
focusNode: _nameNode,
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
controller: _baseIndoProvider.pnumController,
|
|
|
|
focusNode: _pnumNode,
|
|
|
|
// textAlignVertical: TextAlignVertical.top,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "顾客姓名",
|
|
|
|
hintText: "选填",
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
// contentPadding:
|
|
|
|
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
|
|
|
|
// border: InputBorder.none,
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide.none),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
print('ggg');
|
|
|
|
onChanged: (value) async {
|
|
|
|
//操作
|
|
|
|
_baseIndoProvider.pnumController.text = value;
|
|
|
|
//添加的代码:光标一直在文本框后面
|
|
|
|
_baseIndoProvider.pnumController.value =
|
|
|
|
TextEditingValue(
|
|
|
|
text: _baseIndoProvider
|
|
|
|
.pnumController.text,
|
|
|
|
selection: TextSelection.fromPosition(
|
|
|
|
TextPosition(
|
|
|
|
affinity: TextAffinity.downstream,
|
|
|
|
offset: _baseIndoProvider
|
|
|
|
.pnumController.text.length,
|
|
|
|
)));
|
|
|
|
|
|
|
|
nameStr = value;
|
|
|
|
print(value);
|
|
|
|
// if (value.trim().isEmpty) {
|
|
|
|
// //内容为空,或 超过11位
|
|
|
|
// setState(() {
|
|
|
|
// _baseIndoProvider.userHistorys
|
|
|
|
// .clear();
|
|
|
|
// });
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
if (value != null) {
|
|
|
|
detailModel.selectNum = value;
|
|
|
|
// detailModel
|
|
|
|
// .notifyListeners();
|
|
|
|
// setState(() {
|
|
|
|
// selectPnum = value.first;
|
|
|
|
// pnum = pnumlist[value.first];
|
|
|
|
// });
|
|
|
|
bool sucess = await detailModel
|
|
|
|
.upReserveInfo(context, widget.rid,
|
|
|
|
actualPum: detailModel.selectNum,
|
|
|
|
needToast: false);
|
|
|
|
|
|
|
|
if (sucess) {
|
|
|
|
EventBus()
|
|
|
|
.emit("refresh_tablemanager"); //刷新桌位
|
|
|
|
bus.emit("refresh_book_list"); //刷新已预订列表
|
|
|
|
bus.emit("refresh_detail");
|
|
|
|
// await _getReserveDetail(
|
|
|
|
// showCicle: false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
print('fff');
|
|
|
|
_nameNode.unfocus();
|
|
|
|
// _homeEnterModel.nameController.text =
|
|
|
|
// nameStr + _nameSuffix();
|
|
|
|
_addNameSuffix(nameStr, sexStr);
|
|
|
|
_pnumNode.unfocus();
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
onTap: () {
|
|
|
|
// setState(() {
|
|
|
|
// showPhoneHistory = true;
|
|
|
|
// });
|
|
|
|
// // Future.delayed(Duration(milliseconds: 300), () {
|
|
|
|
// // _controller.jumpTo(_controller.position.maxScrollExtent);
|
|
|
|
// // });
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.numberWithOptions(
|
|
|
|
decimal: true),
|
|
|
|
)),
|
|
|
|
// Expanded(
|
|
|
|
// child: InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// FocusScope.of(context)
|
|
|
|
// .requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
// DialogUtil.showSelectCusmanDialog(
|
|
|
|
// context, personNumList,
|
|
|
|
// (value) async {
|
|
|
|
// if (value != null) {
|
|
|
|
// detailModel.selectIndex =
|
|
|
|
// value.first;
|
|
|
|
// detailModel.selectNum =
|
|
|
|
// personNumList[value.first];
|
|
|
|
// // detailModel
|
|
|
|
// // .notifyListeners();
|
|
|
|
// // setState(() {
|
|
|
|
// // selectPnum = value.first;
|
|
|
|
// // pnum = pnumlist[value.first];
|
|
|
|
// // });
|
|
|
|
// bool sucess =
|
|
|
|
// await detailModel.upReserveInfo(
|
|
|
|
// context, widget.rid,
|
|
|
|
// actualPum:
|
|
|
|
// detailModel.selectNum,
|
|
|
|
// needToast: false);
|
|
|
|
|
|
|
|
// if (sucess) {
|
|
|
|
// EventBus().emit(
|
|
|
|
// "refresh_tablemanager"); //刷新桌位
|
|
|
|
// bus.emit(
|
|
|
|
// "refresh_book_list"); //刷新已预订列表
|
|
|
|
// bus.emit("refresh_detail");
|
|
|
|
// await _getReserveDetail(
|
|
|
|
// showCicle: false);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// selecteds: detailModel
|
|
|
|
// .selectIndex ==
|
|
|
|
// null
|
|
|
|
// ? []
|
|
|
|
// : [detailModel.selectIndex])
|
|
|
|
// .then((value) {});
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// child: Text(
|
|
|
|
// detailEntity.actual_pum == null ||
|
|
|
|
// detailEntity.actual_pum ==
|
|
|
|
// ''
|
|
|
|
// ? '选填'
|
|
|
|
// : detailEntity.actual_pum,
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize:
|
|
|
|
// ScreenUtil().setSp(28),
|
|
|
|
// color: detailEntity
|
|
|
|
// .actual_pum ==
|
|
|
|
// null ||
|
|
|
|
// detailEntity
|
|
|
|
// .actual_pum ==
|
|
|
|
// ''
|
|
|
|
// ? MyColours.color_999999
|
|
|
|
// : MyColours
|
|
|
|
// .color_515151))),
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// // HEmptyView(6),
|
|
|
|
// // Image.asset(
|
|
|
|
// // Utils.getImgPath(
|
|
|
|
// // false ? 'c_arrow_up' : 'c_arrow_down'),
|
|
|
|
// // width: ScreenUtil().setWidth(28),
|
|
|
|
// // // height: ScreenUtil().setWidth(10),
|
|
|
|
// // ),
|
|
|
|
// ),
|
|
|
|
]))),
|
|
|
|
MyDivider(ScreenUtil().setWidth(2), ScreenUtil().setWidth(46),
|
|
|
|
color: MyColours.color_BFC4D4),
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(left: ScreenUtil().setWidth(14)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'到店时间:',
|
|
|
|
style: TextStyle(
|
|
|
|
// letterSpacing: ScreenUtil().setWidth(1.8 * 2),
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
//时间弹窗
|
|
|
|
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
DialogUtil.showSelectCusmanDialog(
|
|
|
|
context, dailyList, (value) async {
|
|
|
|
if (value != null) {
|
|
|
|
ddateIndex = value.first;
|
|
|
|
ddateHm = dailyList[value.first];
|
|
|
|
setState(() {});
|
|
|
|
bool sucess = await detailModel
|
|
|
|
.upReserveInfo(context, widget.rid,
|
|
|
|
dateStr: ddateHm,
|
|
|
|
ymd: detailEntity.ddateYMD,
|
|
|
|
needToast: false);
|
|
|
|
|
|
|
|
if (sucess) {
|
|
|
|
EventBus().emit(
|
|
|
|
"refresh_tablemanager"); //刷新桌位
|
|
|
|
bus.emit("refresh_book_list"); //刷新已预订列表
|
|
|
|
bus.emit("refresh_detail");
|
|
|
|
await _getReserveDetail(
|
|
|
|
showCicle: false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
title: '到店时间',
|
|
|
|
selecteds: ddateIndex == null
|
|
|
|
? []
|
|
|
|
: [ddateIndex])
|
|
|
|
.then((value) {});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
ddateHm == null || ddateHm == ''
|
|
|
|
? '选填'
|
|
|
|
: ddateHm,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color:
|
|
|
|
ddateHm == null || ddateHm == ''
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151))),
|
|
|
|
),
|
|
|
|
|
|
|
|
// HEmptyView(6),
|
|
|
|
// Image.asset(
|
|
|
|
// Utils.getImgPath(
|
|
|
|
// false ? 'c_arrow_up' : 'c_arrow_down'),
|
|
|
|
// width: ScreenUtil().setWidth(28),
|
|
|
|
// // height: ScreenUtil().setWidth(10),
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
],
|
|
|
|
)))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (enterMore) VEmptyView(40),
|
|
|
|
//电话
|
|
|
|
if (enterMore)
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(68),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(16)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(12)),
|
|
|
|
// color: Colors.red,
|
|
|
|
border: Border.all(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_DBDBDB)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
selectionControls: _myExtendedMaterialTextSelectionControls,
|
|
|
|
maxLines: 1,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
controller: _baseIndoProvider.phoneController,
|
|
|
|
focusNode: _phoneNode,
|
|
|
|
// textAlignVertical: TextAlignVertical.top,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "预留电话",
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
border: OutlineInputBorder(borderSide: BorderSide.none),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
print(value);
|
|
|
|
if (value.trim().isEmpty || value.trim().length > 11) {
|
|
|
|
//内容为空,或 超过11位
|
|
|
|
setState(() {
|
|
|
|
_baseIndoProvider.userHistorys.clear();
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Map<String, String> params = {
|
|
|
|
"keywords": value.trim(),
|
|
|
|
"sid": Provider.of<UserModel>(context, listen: false)
|
|
|
|
.user
|
|
|
|
.sellerid,
|
|
|
|
};
|
|
|
|
_baseIndoProvider.getUserHistorys(context, params);
|
|
|
|
_getIsMemberByPhone(value);
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
_phoneNode.unfocus();
|
|
|
|
},
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
showPhoneHistory = true;
|
|
|
|
});
|
|
|
|
// Future.delayed(Duration(milliseconds: 300), () {
|
|
|
|
// _controller.jumpTo(_controller.position.maxScrollExtent);
|
|
|
|
// });
|
|
|
|
},
|
|
|
|
keyboardType:
|
|
|
|
TextInputType.numberWithOptions(decimal: true),
|
|
|
|
)),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
_openAddressBook();
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
width: ScreenUtil().setWidth(74) * 2,
|
|
|
|
height: ScreenUtil().setWidth(48),
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
child: Text('一键录入',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
Stack(
|
|
|
|
clipBehavior: Clip.none,
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
//姓名
|
|
|
|
if (enterMore)
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(40),
|
|
|
|
bottom: ScreenUtil().setWidth(40)),
|
|
|
|
height: ScreenUtil().setWidth(68),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(16)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(12)),
|
|
|
|
// color: Colors.red,
|
|
|
|
border: Border.all(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_DBDBDB)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
maxLines: 1,
|
|
|
|
|
|
|
|
DialogUtil.showSelectCusmanDialog(
|
|
|
|
context, sexList, (value) async {
|
|
|
|
if (value != null) {
|
|
|
|
sexSelectIndex = value.first;
|
|
|
|
sexStr = sexList[sexSelectIndex];
|
|
|
|
if (nameStr != null && nameStr != '') {
|
|
|
|
_addNameSuffix(nameStr, sexStr);
|
|
|
|
_showConfirmWidget(needSex: true);
|
|
|
|
}
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}, selecteds: [sexSelectIndex])
|
|
|
|
.then((value) {});
|
|
|
|
},
|
|
|
|
child: Row(children: [
|
|
|
|
Text(
|
|
|
|
sexStr,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
controller: _baseIndoProvider.nameController,
|
|
|
|
focusNode: _nameNode,
|
|
|
|
// textAlignVertical: TextAlignVertical.top,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "顾客姓名",
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
Image.asset(Utils.getImgPath('quan_down_f'),
|
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28)),
|
|
|
|
]),
|
|
|
|
// contentPadding:
|
|
|
|
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
|
|
|
|
// border: InputBorder.none,
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide.none),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
print('ggg');
|
|
|
|
|
|
|
|
nameStr = value;
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
print('fff');
|
|
|
|
_nameNode.unfocus();
|
|
|
|
// _homeEnterModel.nameController.text =
|
|
|
|
// nameStr + _nameSuffix();
|
|
|
|
_addNameSuffix(nameStr, sexStr);
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (_baseIndoProvider.phoneController.text
|
|
|
|
.trim()
|
|
|
|
.length ==
|
|
|
|
0) {
|
|
|
|
Utils.showToast('请先输入电话,再设置会员信息!');
|
|
|
|
return;
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
|
|
|
|
DialogUtil.showSelectCusmanDialog(
|
|
|
|
context, sexList, (value) async {
|
|
|
|
if (value != null) {
|
|
|
|
sexSelectIndex = value.first;
|
|
|
|
sexStr = sexList[sexSelectIndex];
|
|
|
|
if (nameStr != null && nameStr != '') {
|
|
|
|
_addNameSuffix(nameStr, sexStr);
|
|
|
|
_showConfirmWidget(needSex: true);
|
|
|
|
}
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
}, selecteds: [sexSelectIndex]).then((value) {});
|
|
|
|
},
|
|
|
|
child: Row(children: [
|
|
|
|
Text(
|
|
|
|
sexStr,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Image.asset(Utils.getImgPath('quan_down_f'),
|
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28)),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
if (_baseIndoProvider.phoneController.text
|
|
|
|
.trim()
|
|
|
|
.length ==
|
|
|
|
0) {
|
|
|
|
Utils.showToast('请先输入电话,再设置会员信息!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
|
|
|
|
DialogUtil.showSelectCusmanDialog(
|
|
|
|
context, memberList, (value) async {
|
|
|
|
if (value != null) {
|
|
|
|
memberIndex = value.first;
|
|
|
|
isMember = memberList[memberIndex];
|
|
|
|
DialogUtil.showSelectCusmanDialog(
|
|
|
|
context, memberList, (value) async {
|
|
|
|
if (value != null) {
|
|
|
|
memberIndex = value.first;
|
|
|
|
isMember = memberList[memberIndex];
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
_setInsGuest();
|
|
|
|
}
|
|
|
|
}, selecteds: [memberIndex ?? 0])
|
|
|
|
.then((value) {});
|
|
|
|
},
|
|
|
|
child: Row(children: [
|
|
|
|
Text(
|
|
|
|
isMember,
|
|
|
|
style: TextStyle(
|
|
|
|
color: isMember == '会员状态未知'
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
setState(() {});
|
|
|
|
_setInsGuest();
|
|
|
|
}
|
|
|
|
}, selecteds: [memberIndex ?? 0])
|
|
|
|
.then((value) {});
|
|
|
|
},
|
|
|
|
child: Row(children: [
|
|
|
|
Text(
|
|
|
|
isMember,
|
|
|
|
style: TextStyle(
|
|
|
|
color: isMember == '会员状态未知'
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
Image.asset(Utils.getImgPath('quan_down_f'),
|
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28)),
|
|
|
|
]),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
))
|
|
|
|
: SizedBox(),
|
|
|
|
),
|
|
|
|
Image.asset(Utils.getImgPath('quan_down_f'),
|
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28)),
|
|
|
|
]),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
//餐单类型
|
|
|
|
// enterMore
|
|
|
|
// ? Container(
|
|
...
|
...
|
@@ -2312,167 +2305,160 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
),
|
|
|
|
// 选择优惠
|
|
|
|
// _couponWidget(),
|
|
|
|
showErroInfo
|
|
|
|
? Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(40),
|
|
|
|
bottom: ScreenUtil().setWidth(24)),
|
|
|
|
height: ScreenUtil().setWidth(46 * 2),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(34)),
|
|
|
|
if (showErroInfo)
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(40),
|
|
|
|
bottom: ScreenUtil().setWidth(24)),
|
|
|
|
height: ScreenUtil().setWidth(46 * 2),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(34)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(8)),
|
|
|
|
boxShadow: [
|
|
|
|
BoxShadow(
|
|
|
|
color: Color.fromRGBO(0, 0, 0, 0.2),
|
|
|
|
blurRadius: ScreenUtil().setWidth(8),
|
|
|
|
spreadRadius: ScreenUtil().setWidth(2),
|
|
|
|
offset: Offset(0, ScreenUtil().setWidth(2)))
|
|
|
|
]),
|
|
|
|
child: Row(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(erroInfo == '1分钟内只能发送一条短信'
|
|
|
|
? 'error_circle_yellow'
|
|
|
|
: 'error_circle_red'),
|
|
|
|
width: ScreenUtil().setWidth(40)),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(erroInfo,
|
|
|
|
style: TextStyle(
|
|
|
|
color: erroInfo == '1分钟内只能发送一条短信'
|
|
|
|
? MyColours.color_ED7B2F
|
|
|
|
: MyColours.color_E34D59,
|
|
|
|
fontSize: ScreenUtil().setSp(28))),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
if (enterMore)
|
|
|
|
Positioned(
|
|
|
|
top: 0,
|
|
|
|
left: 0,
|
|
|
|
child: Offstage(
|
|
|
|
offstage: !(showPhoneHistory &&
|
|
|
|
_baseIndoProvider.userHistorys.length > 0),
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
border: Border.all(color: Colors.white),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(8)),
|
|
|
|
// color: Colors.red,
|
|
|
|
boxShadow: [
|
|
|
|
BoxShadow(
|
|
|
|
color: Color.fromRGBO(0, 0, 0, 0.2),
|
|
|
|
blurRadius: ScreenUtil().setWidth(8),
|
|
|
|
spreadRadius: ScreenUtil().setWidth(2),
|
|
|
|
offset: Offset(0, ScreenUtil().setWidth(2)))
|
|
|
|
color: MyColours.color_e5e5e5,
|
|
|
|
blurRadius: ScreenUtil().setWidth(20))
|
|
|
|
]),
|
|
|
|
child: Row(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(erroInfo == '1分钟内只能发送一条短信'
|
|
|
|
? 'error_circle_yellow'
|
|
|
|
: 'error_circle_red'),
|
|
|
|
width: ScreenUtil().setWidth(40)),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(erroInfo,
|
|
|
|
style: TextStyle(
|
|
|
|
color: erroInfo == '1分钟内只能发送一条短信'
|
|
|
|
? MyColours.color_ED7B2F
|
|
|
|
: MyColours.color_E34D59,
|
|
|
|
fontSize: ScreenUtil().setSp(28))),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: SizedBox()
|
|
|
|
],
|
|
|
|
),
|
|
|
|
enterMore
|
|
|
|
? Positioned(
|
|
|
|
top: 0,
|
|
|
|
left: 0,
|
|
|
|
child: Offstage(
|
|
|
|
offstage: !(showPhoneHistory &&
|
|
|
|
_baseIndoProvider.userHistorys.length > 0),
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
border: Border.all(color: Colors.white),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
// color: Colors.red,
|
|
|
|
boxShadow: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_e5e5e5,
|
|
|
|
blurRadius: ScreenUtil().setWidth(20))
|
|
|
|
]),
|
|
|
|
// width: ScreenUtil().setWidth(440),
|
|
|
|
// height: _baseIndoProvider.userHistorys.length > 1
|
|
|
|
// ? ScreenUtil().setWidth(140)
|
|
|
|
// : ScreenUtil().setWidth(104),
|
|
|
|
width: ScreenUtil().screenWidth - w(60),
|
|
|
|
// width: ScreenUtil().setWidth(350),
|
|
|
|
constraints: BoxConstraints(maxHeight: w(270)),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(30)),
|
|
|
|
child: Align(
|
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
child: MediaQuery.removePadding(
|
|
|
|
context: context,
|
|
|
|
removeTop: true,
|
|
|
|
child: Scrollbar(
|
|
|
|
isAlwaysShown: true, //设置滚动条常亮
|
|
|
|
controller: _scrollCrl, //必须设置一个controller
|
|
|
|
|
|
|
|
///添加进度条
|
|
|
|
child: ListView.builder(
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollCrl,
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
return GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
_getIsMemberByPhone(
|
|
|
|
// width: ScreenUtil().setWidth(440),
|
|
|
|
// height: _baseIndoProvider.userHistorys.length > 1
|
|
|
|
// ? ScreenUtil().setWidth(140)
|
|
|
|
// : ScreenUtil().setWidth(104),
|
|
|
|
width: ScreenUtil().screenWidth - w(60),
|
|
|
|
// width: ScreenUtil().setWidth(350),
|
|
|
|
constraints: BoxConstraints(maxHeight: w(270)),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(30)),
|
|
|
|
child: Align(
|
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
child: MediaQuery.removePadding(
|
|
|
|
context: context,
|
|
|
|
removeTop: true,
|
|
|
|
child: Scrollbar(
|
|
|
|
isAlwaysShown: true, //设置滚动条常亮
|
|
|
|
controller: _scrollCrl, //必须设置一个controller
|
|
|
|
|
|
|
|
///添加进度条
|
|
|
|
child: ListView.builder(
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: _scrollCrl,
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
return GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
_getIsMemberByPhone(_baseIndoProvider
|
|
|
|
.userHistorys[index].phone);
|
|
|
|
needHistory = true;
|
|
|
|
_showConfirmWidget(
|
|
|
|
needHistory: true, index: index);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setWidth(102),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: (index !=
|
|
|
|
(_baseIndoProvider
|
|
|
|
.userHistorys
|
|
|
|
.length -
|
|
|
|
1) &&
|
|
|
|
_baseIndoProvider
|
|
|
|
.userHistorys
|
|
|
|
.length >
|
|
|
|
1)
|
|
|
|
? BorderSide(
|
|
|
|
color: MyColours
|
|
|
|
.color_e5e5e5,
|
|
|
|
width: ScreenUtil()
|
|
|
|
.setWidth(2))
|
|
|
|
: BorderSide.none)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
_baseIndoProvider
|
|
|
|
.userHistorys[index].phone);
|
|
|
|
needHistory = true;
|
|
|
|
_showConfirmWidget(
|
|
|
|
needHistory: true,
|
|
|
|
index: index);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setWidth(102),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: (index !=
|
|
|
|
(_baseIndoProvider
|
|
|
|
.userHistorys
|
|
|
|
.length -
|
|
|
|
1) &&
|
|
|
|
_baseIndoProvider
|
|
|
|
.userHistorys
|
|
|
|
.length >
|
|
|
|
1)
|
|
|
|
? BorderSide(
|
|
|
|
color: MyColours
|
|
|
|
.color_e5e5e5,
|
|
|
|
width: ScreenUtil()
|
|
|
|
.setWidth(2))
|
|
|
|
: BorderSide.none)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment
|
|
|
|
.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
_baseIndoProvider
|
|
|
|
.userHistorys[
|
|
|
|
index]
|
|
|
|
.phone ==
|
|
|
|
null
|
|
|
|
? ''
|
|
|
|
: _baseIndoProvider
|
|
|
|
.userHistorys[index]
|
|
|
|
.phone,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_333333,
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(32)),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
_baseIndoProvider
|
|
|
|
.userHistorys[
|
|
|
|
index]
|
|
|
|
.rname ==
|
|
|
|
null
|
|
|
|
? ''
|
|
|
|
: _baseIndoProvider
|
|
|
|
.userHistorys[index]
|
|
|
|
.rname,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_333333,
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(32)),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
.userHistorys[index]
|
|
|
|
.phone ==
|
|
|
|
null
|
|
|
|
? ''
|
|
|
|
: _baseIndoProvider
|
|
|
|
.userHistorys[index]
|
|
|
|
.phone,
|
|
|
|
style: TextStyle(
|
|
|
|
color:
|
|
|
|
MyColours.color_333333,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32)),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
_baseIndoProvider
|
|
|
|
.userHistorys[index]
|
|
|
|
.rname ==
|
|
|
|
null
|
|
|
|
? ''
|
|
|
|
: _baseIndoProvider
|
|
|
|
.userHistorys[index]
|
|
|
|
.rname,
|
|
|
|
style: TextStyle(
|
|
|
|
color:
|
|
|
|
MyColours.color_333333,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32)),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
},
|
|
|
|
itemExtent: ScreenUtil().setWidth(104),
|
|
|
|
itemCount:
|
|
|
|
_baseIndoProvider.userHistorys.length,
|
|
|
|
))),
|
|
|
|
),
|
|
|
|
)))
|
|
|
|
: SizedBox()
|
|
|
|
),
|
|
|
|
);
|
|
|
|
},
|
|
|
|
itemExtent: ScreenUtil().setWidth(104),
|
|
|
|
itemCount:
|
|
|
|
_baseIndoProvider.userHistorys.length,
|
|
|
|
))),
|
|
|
|
),
|
|
|
|
)))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
...
|
...
|
@@ -3677,12 +3663,14 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
}
|
|
|
|
|
|
|
|
showOverlay(BuildContext context) {
|
|
|
|
if (overlayEntry != null) return;
|
|
|
|
if (overlayEntry != null || MediaQuery.of(context).viewInsets.bottom == 0)
|
|
|
|
return SizedBox();
|
|
|
|
OverlayState overlayState = Overlay.of(context);
|
|
|
|
overlayEntry = OverlayEntry(builder: (context) {
|
|
|
|
// setState(() {
|
|
|
|
_showOverlay = true;
|
|
|
|
// });
|
|
|
|
|
|
|
|
return Positioned(
|
|
|
|
bottom: MediaQuery.of(context).viewInsets.bottom,
|
|
|
|
right: 0.0,
|
|
...
|
...
|
@@ -4683,33 +4671,31 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
} else {
|
|
|
|
return Column(children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
controller: _scrollController,
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
//true 滑动到底部
|
|
|
|
padding: EdgeInsets.all(0.0),
|
|
|
|
// reverse: _phoneNode.hasFocus ? true : false,
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
VEmptyView(38),
|
|
|
|
_reverseTimeWidget(),
|
|
|
|
VEmptyView(24),
|
|
|
|
_tableInfoWidget(),
|
|
|
|
VEmptyView(34),
|
|
|
|
_enterMoreWidget(),
|
|
|
|
// VEmptyView(40),
|
|
|
|
// _managerWidget(),
|
|
|
|
// VEmptyView(50),
|
|
|
|
// _orderInfoWidget(),
|
|
|
|
// VEmptyView(30),
|
|
|
|
// _couponWidget(),
|
|
|
|
// VEmptyView(20),
|
|
|
|
Container(
|
|
|
|
key: botGlobalKey,
|
|
|
|
height: ScreenUtil().setWidth(20)),
|
|
|
|
],
|
|
|
|
))),
|
|
|
|
child: ListView(
|
|
|
|
controller: _scrollController,
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
//true 滑动到底部
|
|
|
|
padding: EdgeInsets.all(0.0),
|
|
|
|
// reverse: _phoneNode.hasFocus ? true : false,
|
|
|
|
children: [
|
|
|
|
VEmptyView(38),
|
|
|
|
_reverseTimeWidget(),
|
|
|
|
VEmptyView(24),
|
|
|
|
_tableInfoWidget(),
|
|
|
|
VEmptyView(34),
|
|
|
|
_enterMoreWidget(),
|
|
|
|
// VEmptyView(40),
|
|
|
|
// _managerWidget(),
|
|
|
|
// VEmptyView(50),
|
|
|
|
// _orderInfoWidget(),
|
|
|
|
// VEmptyView(30),
|
|
|
|
// _couponWidget(),
|
|
|
|
// VEmptyView(20),
|
|
|
|
Container(
|
|
|
|
key: botGlobalKey,
|
|
|
|
height: ScreenUtil().setWidth(20)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(48)),
|
...
|
...
|
|