|
...
|
...
|
@@ -130,6 +130,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
String ddateSoltSelect = '';
|
|
|
|
bool isAddOver = true;
|
|
|
|
bool isRealAddOver = true;
|
|
|
|
bool isReservePhoneApp = false; //手机端预订是必须输入手机号
|
|
|
|
// int
|
|
|
|
|
|
|
|
ScrollController _scrollCrl = ScrollController();
|
|
...
|
...
|
@@ -620,6 +621,11 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
isAddOver = marketingCenterProvider.dzSellerConfModel!.isAddOver == '1'
|
|
|
|
? true
|
|
|
|
: false;
|
|
|
|
|
|
|
|
isReservePhoneApp =
|
|
|
|
marketingCenterProvider.dzSellerConfModel!.appPhoneSwitch == '1'
|
|
|
|
? true
|
|
|
|
: false;
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -1394,7 +1400,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
/**
|
|
|
|
|
|
|
|
_customerInfoWidget() {
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
...
|
...
|
@@ -1469,11 +1475,11 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
setState(() {
|
|
|
|
showPhoneHistory = true;
|
|
|
|
});
|
|
|
|
Map<String, String> params = {
|
|
|
|
Map<String, String?> params = {
|
|
|
|
"keywords": value,
|
|
|
|
"sid":
|
|
|
|
Provider.of<UserModel>(context, listen: false)
|
|
|
|
.user
|
|
|
|
.user!
|
|
|
|
.sellerid,
|
|
|
|
};
|
|
|
|
JhCommonUtils.debounce(() => _baseIndoProvider
|
|
...
|
...
|
@@ -1549,9 +1555,10 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
//电话
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(top: ScreenUtil().setWidth(40)),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(40),
|
|
|
|
bottom: ScreenUtil().setWidth(40)),
|
|
|
|
height: ScreenUtil().setWidth(68),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(16)),
|
|
...
|
...
|
@@ -1572,7 +1579,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_353535),
|
|
|
|
controller: _baseIndoProvider.nameController,
|
|
|
|
focusNode: _nameNode,
|
|
...
|
...
|
@@ -1599,28 +1606,36 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
.phoneController.text.length ==
|
|
|
|
0 &&
|
|
|
|
value.length > 0) {
|
|
|
|
_baseIndoProvider.userHistorys = [];
|
|
|
|
// if (detailModel.nameSwich) {
|
|
|
|
setState(() {
|
|
|
|
showPhoneHistory = true;
|
|
|
|
});
|
|
|
|
Map<String, String> params = {
|
|
|
|
"keywords": value,
|
|
|
|
Map<String, String?> params = {
|
|
|
|
"keywords": value.trim(),
|
|
|
|
"sid": Provider.of<UserModel>(context,
|
|
|
|
listen: false)
|
|
|
|
.user
|
|
|
|
.user!
|
|
|
|
.sellerid,
|
|
|
|
};
|
|
|
|
// _baseIndoProvider.getUserHistorys(
|
|
|
|
// context, params);
|
|
|
|
|
|
|
|
JhCommonUtils.debounce(() =>
|
|
|
|
_baseIndoProvider.getUserHistorys(
|
|
|
|
context, params));
|
|
|
|
// }
|
|
|
|
} else {
|
|
|
|
setState(() {
|
|
|
|
showPhoneHistory = false;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onTap: () {
|
|
|
|
// setState(() {
|
|
|
|
// showPhoneHistory = true;
|
|
|
|
// });
|
|
|
|
// Future.delayed(Duration(milliseconds: 300), () {
|
|
|
|
// _controller.jumpTo(_controller.position.maxScrollExtent);
|
|
|
|
// });
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
print('fff');
|
|
|
|
_nameNode.unfocus();
|
|
...
|
...
|
@@ -1665,263 +1680,276 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28)),
|
|
|
|
]),
|
|
|
|
// Row(
|
|
|
|
// children: _baseIndoProvider.sexList.map((value) {
|
|
|
|
// return _callButton(
|
|
|
|
// onPress: () {
|
|
|
|
// for (var item in _baseIndoProvider.sexList) {
|
|
|
|
// item['select'] = false;
|
|
|
|
// if (item['title'] == value['title']) {
|
|
|
|
// item['select'] = true;
|
|
|
|
// if (oldSex != item['code']) {
|
|
|
|
// if (nameStr != null && nameStr != '') {
|
|
|
|
// _addNameSuffix(nameStr, item['title']);
|
|
|
|
// }
|
|
|
|
// if (nameStr != null && nameStr != '') {
|
|
|
|
// _showConfirmWidget(needSex: true);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// _baseIndoProvider.notifyListeners();
|
|
|
|
// },
|
|
|
|
// content: value['title'],
|
|
|
|
// hasLeftBorder: value['hasLeftBorder'],
|
|
|
|
// isSelect: value['select']);
|
|
|
|
// }).toList()),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(top: 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.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: 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 {
|
|
|
|
//操作
|
|
|
|
pnumController.text = value;
|
|
|
|
//添加的代码:光标一直在文本框后面
|
|
|
|
pnumController.value =
|
|
|
|
TextEditingValue(
|
|
|
|
text: pnumController.text,
|
|
|
|
selection: TextSelection
|
|
|
|
.fromPosition(
|
|
|
|
TextPosition(
|
|
|
|
affinity: TextAffinity
|
|
|
|
.downstream,
|
|
|
|
offset: pnumController
|
|
|
|
.text.length,
|
|
|
|
)));
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
_pnumNode.unfocus();
|
|
|
|
},
|
|
|
|
onTap: () {},
|
|
|
|
keyboardType:
|
|
|
|
TextInputType.numberWithOptions(
|
|
|
|
decimal: true),
|
|
|
|
)),
|
|
|
|
// Expanded(
|
|
|
|
// child: InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// FocusScope.of(context)
|
|
|
|
// .requestFocus(
|
|
|
|
// FocusNode()); //隐藏键盘
|
|
|
|
// DialogUtil.showSelectCusmanDialog(
|
|
|
|
// context, personNumList,
|
|
|
|
// (value) async {
|
|
|
|
// if (value != null) {
|
|
|
|
// actualPnumIndex = value.first;
|
|
|
|
// actualPnum = personNumList[
|
|
|
|
// value.first];
|
|
|
|
// setState(() {});
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// title: '人数',
|
|
|
|
// selecteds:
|
|
|
|
// actualPnumIndex ==
|
|
|
|
// null
|
|
|
|
// ? []
|
|
|
|
// : [
|
|
|
|
// actualPnumIndex
|
|
|
|
// ])
|
|
|
|
// .then((value) {});
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// child: Text(actualPnum,
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil()
|
|
|
|
// .setSp(28),
|
|
|
|
// color: actualPnum ==
|
|
|
|
// '选填'
|
|
|
|
// ? 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,
|
|
|
|
tableManagerModel.dailyList,
|
|
|
|
(value) async {
|
|
|
|
if (value != null) {
|
|
|
|
ddateIndex = value.first;
|
|
|
|
ddateHm = tableManagerModel
|
|
|
|
.dailyList[value.first];
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
title: '到店时间',
|
|
|
|
selecteds:
|
|
|
|
ddateIndex == null
|
|
|
|
? []
|
|
|
|
: [ddateIndex])
|
|
|
|
.then((value) {});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(ddateHm,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(28),
|
|
|
|
color: ddateHm == '选填'
|
|
|
|
? MyColours
|
|
|
|
.color_999999
|
|
|
|
: MyColours
|
|
|
|
.color_515151))),
|
|
|
|
),
|
|
|
|
//电话
|
|
|
|
// Container(
|
|
|
|
// margin: EdgeInsets.only(top: 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,
|
|
|
|
|
|
|
|
// //输入文本的样式
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(30),
|
|
|
|
// 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),
|
|
|
|
// ),
|
|
|
|
// // contentPadding:
|
|
|
|
// // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
|
|
|
|
// // border: InputBorder.none,
|
|
|
|
// contentPadding: EdgeInsets.zero,
|
|
|
|
// border: OutlineInputBorder(
|
|
|
|
// borderSide: BorderSide.none),
|
|
|
|
// ),
|
|
|
|
// onChanged: (value) {
|
|
|
|
// print('ggg');
|
|
|
|
|
|
|
|
// nameStr = value;
|
|
|
|
|
|
|
|
// if (_baseIndoProvider
|
|
|
|
// .phoneController.text.length ==
|
|
|
|
// 0 &&
|
|
|
|
// value.length > 0) {
|
|
|
|
// _baseIndoProvider.userHistorys = [];
|
|
|
|
// setState(() {
|
|
|
|
// showPhoneHistory = true;
|
|
|
|
// });
|
|
|
|
// Map<String, String?> params = {
|
|
|
|
// "keywords": value,
|
|
|
|
// "sid": Provider.of<UserModel>(context,
|
|
|
|
// listen: false)
|
|
|
|
// .user!
|
|
|
|
// .sellerid,
|
|
|
|
// };
|
|
|
|
// // _baseIndoProvider.getUserHistorys(
|
|
|
|
// // context, params);
|
|
|
|
// JhCommonUtils.debounce(() =>
|
|
|
|
// _baseIndoProvider.getUserHistorys(
|
|
|
|
// context, params));
|
|
|
|
// } else {
|
|
|
|
// setState(() {
|
|
|
|
// showPhoneHistory = false;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// onEditingComplete: () {
|
|
|
|
// print('fff');
|
|
|
|
// _nameNode.unfocus();
|
|
|
|
// // _homeEnterModel.nameController.text =
|
|
|
|
// // nameStr + _nameSuffix();
|
|
|
|
// _addNameSuffix(nameStr, sexStr);
|
|
|
|
// },
|
|
|
|
// keyboardType: TextInputType.text,
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// HEmptyView(40),
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// FocusScope.of(context)
|
|
|
|
// .requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
// List<String> list = [];
|
|
|
|
// for (Map item in _baseIndoProvider.sexList) {
|
|
|
|
// list.add(item['title']);
|
|
|
|
// }
|
|
|
|
// DialogUtil.showSelectCusmanDialog(context, list,
|
|
|
|
// (value) async {
|
|
|
|
// if (value != null) {
|
|
|
|
// sexSelectIndex = value.first;
|
|
|
|
// sexStr = list[sexSelectIndex];
|
|
|
|
// if (nameStr != null && nameStr != '') {
|
|
|
|
// _addNameSuffix(nameStr, sexStr);
|
|
|
|
// }
|
|
|
|
// setState(() {});
|
|
|
|
// }
|
|
|
|
// }, 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)),
|
|
|
|
// ]),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// )),
|
|
|
|
VEmptyView(50),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(36)),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: RoundButton(
|
|
|
|
text: '录入预订',
|
|
|
|
height: ScreenUtil().setWidth(96),
|
|
|
|
fontSize: 32,
|
|
|
|
gradientStart: MyColours.color_438E93,
|
|
|
|
gradientEnd: MyColours.color_438E93,
|
|
|
|
radius: ScreenUtil().setWidth(8),
|
|
|
|
isBold: false,
|
|
|
|
onPressed: () async {
|
|
|
|
if (currTimeIndex == null) {
|
|
|
|
Utils.showToast('请选择餐段或检查您的网络!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ((_baseIndoProvider.phoneController.text
|
|
|
|
.replaceAll(' ', '')
|
|
|
|
.isEmpty ||
|
|
|
|
!Utils.phoneRegExp(_baseIndoProvider
|
|
|
|
.phoneController.text
|
|
|
|
.replaceAll(' ', '')))) {
|
|
|
|
setState(() {
|
|
|
|
showErro = '请输入正确的11位手机号码';
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
setState(() {
|
|
|
|
showErro = '';
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// HEmptyView(6),
|
|
|
|
// Image.asset(
|
|
|
|
// Utils.getImgPath(
|
|
|
|
// false ? 'c_arrow_up' : 'c_arrow_down'),
|
|
|
|
// width: ScreenUtil().setWidth(28),
|
|
|
|
// // height: ScreenUtil().setWidth(10),
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
)))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(44),
|
|
|
|
_remarkWidget()
|
|
|
|
Guest? guest = Guest(
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
null);
|
|
|
|
if (widget.guest == null) {
|
|
|
|
guest.phone = _baseIndoProvider
|
|
|
|
.phoneController.text
|
|
|
|
.replaceAll(' ', ''); //预订人电话
|
|
|
|
|
|
|
|
if (nameStr != null &&
|
|
|
|
nameStr!.trim().length > 0) {
|
|
|
|
String sex = '1';
|
|
|
|
if (sexStr == '女士') {
|
|
|
|
sex = '2';
|
|
|
|
} else if (sexStr == '公司') {
|
|
|
|
sex = '3';
|
|
|
|
}
|
|
|
|
guest.rname = nameStr; //预订人姓名
|
|
|
|
guest.sex = sex; //预订人性别:1:男 2:女
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
guest = widget.guest;
|
|
|
|
}
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
|
|
|
|
Loading.showLoading(
|
|
|
|
context,
|
|
|
|
);
|
|
|
|
JhCommonUtils.debounce(
|
|
|
|
() => _wechatReserve(true, guest), 500);
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
|
|
|
|
showErro == ''
|
|
|
|
? VEmptyView(62)
|
|
|
|
: Container(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(36),
|
|
|
|
top: ScreenUtil().setWidth(12),
|
|
|
|
right: ScreenUtil().setWidth(36),
|
|
|
|
bottom: ScreenUtil().setWidth(18),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('error_circle_red'),
|
|
|
|
width: ScreenUtil().setWidth(44)),
|
|
|
|
HEmptyView(16),
|
|
|
|
Text(
|
|
|
|
showErro,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_E34D59,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
top: _nameNode.hasFocus ? w(60) : 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: double.infinity,
|
|
|
|
width: ScreenUtil().screenWidth - w(60),
|
|
|
|
// width: ScreenUtil().setWidth(350),
|
|
|
|
constraints: BoxConstraints(maxHeight: w(170)),
|
|
|
|
// height: _baseIndoProvider.userHistorys.length > 1
|
|
|
|
// ? ScreenUtil().setWidth(140)
|
|
|
|
// : ScreenUtil().setWidth(104),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(30)),
|
|
|
|
child: Align(
|
|
|
|
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(220)),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(30)),
|
|
|
|
child: Align(
|
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
child: MediaQuery.removePadding(
|
|
|
|
context: context,
|
|
|
|
removeTop: true,
|
|
|
|
child: Scrollbar(
|
|
|
|
isAlwaysShown: true, //设置滚动条常亮
|
|
|
|
thumbVisibility: true, //设置滚动条常亮
|
|
|
|
controller: _scrollCrl, //必须设置一个controller
|
|
|
|
|
|
|
|
///添加进度条
|
|
...
|
...
|
@@ -1932,80 +1960,28 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
return GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
_byValueToReqeust(index);
|
|
|
|
// setState(() {
|
|
|
|
// sexStr = '先生';
|
|
|
|
// showPhoneHistory = false;
|
|
|
|
// _baseIndoProvider.phoneController
|
|
|
|
// .text = _baseIndoProvider
|
|
|
|
// .userHistorys[index]
|
|
|
|
// .phone !=
|
|
|
|
// null
|
|
|
|
// ? _baseIndoProvider
|
|
|
|
// .userHistorys[index].phone
|
|
|
|
// : '';
|
|
|
|
// // _homeEnterModel.nameController.text =
|
|
|
|
// // _homeEnterModel
|
|
|
|
// // .userHistorys[index].rname +
|
|
|
|
// // _nameSuffix();
|
|
|
|
// for (var item in _baseIndoProvider
|
|
|
|
// .sexList) {
|
|
|
|
// item['select'] = false;
|
|
|
|
// if (item['title'] ==
|
|
|
|
// _baseIndoProvider
|
|
|
|
// .userHistorys[index]
|
|
|
|
// .sexStr) {
|
|
|
|
// item['select'] = true;
|
|
|
|
// sexSelectIndex =
|
|
|
|
// int.parse(item['code']) -
|
|
|
|
// 1;
|
|
|
|
// sexStr = _baseIndoProvider
|
|
|
|
// .userHistorys[index]
|
|
|
|
// .sexStr;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _addNameSuffix(
|
|
|
|
// _baseIndoProvider
|
|
|
|
// .userHistorys[index]
|
|
|
|
// .rname,
|
|
|
|
// sexStr);
|
|
|
|
// if (_baseIndoProvider
|
|
|
|
// .userHistorys[index]
|
|
|
|
// .rname ==
|
|
|
|
// null ||
|
|
|
|
// _baseIndoProvider
|
|
|
|
// .userHistorys[index]
|
|
|
|
// .rname ==
|
|
|
|
// '') {
|
|
|
|
// nameStr = _baseIndoProvider
|
|
|
|
// .nameController.text;
|
|
|
|
|
|
|
|
// if (nameStr.endsWith('女士')) {
|
|
|
|
// nameStr = nameStr.replaceAll(
|
|
|
|
// '女士', '');
|
|
|
|
// }
|
|
|
|
// if (nameStr.endsWith('先生')) {
|
|
|
|
// nameStr = nameStr.replaceAll(
|
|
|
|
// '先生', '');
|
|
|
|
// }
|
|
|
|
// if (nameStr.endsWith('公司')) {
|
|
|
|
// nameStr = nameStr.replaceAll(
|
|
|
|
// '公司', '');
|
|
|
|
// }
|
|
|
|
// } else {
|
|
|
|
// nameStr = _baseIndoProvider
|
|
|
|
// .userHistorys[index].rname;
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _phoneNode.unfocus();
|
|
|
|
// _baseIndoProvider.userHistorys
|
|
|
|
// .clear();
|
|
|
|
// });
|
|
|
|
// UserHistoryEntity userHistoryEntity =
|
|
|
|
// _baseIndoProvider
|
|
|
|
// .userHistorys[index];
|
|
|
|
// if (userHistoryEntity.sex == null ||
|
|
|
|
// userHistoryEntity.sex == '') {
|
|
|
|
// userHistoryEntity.sex = '1';
|
|
|
|
// }
|
|
|
|
// sexStr = userHistoryEntity.sexStr;
|
|
|
|
|
|
|
|
// sexSelectIndex =
|
|
|
|
// sexList.indexOf(sexStr);
|
|
|
|
|
|
|
|
// _getIsMemberByPhone(
|
|
|
|
// userHistoryEntity.phone);
|
|
|
|
// needHistory = true;
|
|
|
|
// _showConfirmWidget(
|
|
|
|
// needHistorytemp: true, index: index);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height:
|
|
|
|
ScreenUtil().setWidth(102),
|
|
|
|
ScreenUtil().setWidth(100),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
bottom: (index !=
|
|
...
|
...
|
@@ -2049,7 +2025,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
: _baseIndoProvider
|
|
|
|
.userHistorys[
|
|
|
|
index]
|
|
|
|
.phone)) +
|
|
|
|
.phone))! +
|
|
|
|
' ' +
|
|
|
|
(_nameNode.hasFocus
|
|
|
|
? (_baseIndoProvider
|
|
...
|
...
|
@@ -2061,7 +2037,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
: _baseIndoProvider
|
|
|
|
.userHistorys[
|
|
|
|
index]
|
|
|
|
.phone)
|
|
|
|
.phone!)
|
|
|
|
: (_baseIndoProvider
|
|
|
|
.userHistorys[
|
|
|
|
index]
|
|
...
|
...
|
@@ -2087,15 +2063,219 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
itemExtent: ScreenUtil().setWidth(104),
|
|
|
|
itemCount:
|
|
|
|
_baseIndoProvider.userHistorys.length,
|
|
|
|
)))),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
))),
|
|
|
|
),
|
|
|
|
))),
|
|
|
|
// Positioned(
|
|
|
|
// top: _nameNode.hasFocus ? w(60) : 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: double.infinity,
|
|
|
|
// width: ScreenUtil().screenWidth - w(60),
|
|
|
|
// // width: ScreenUtil().setWidth(350),
|
|
|
|
// constraints: BoxConstraints(maxHeight: w(170)),
|
|
|
|
// // height: _baseIndoProvider.userHistorys.length > 1
|
|
|
|
// // ? ScreenUtil().setWidth(140)
|
|
|
|
// // : ScreenUtil().setWidth(104),
|
|
|
|
// padding: EdgeInsets.symmetric(
|
|
|
|
// horizontal: ScreenUtil().setWidth(30)),
|
|
|
|
// child: Align(
|
|
|
|
// alignment: Alignment.topCenter,
|
|
|
|
// child: MediaQuery.removePadding(
|
|
|
|
// context: context,
|
|
|
|
// removeTop: true,
|
|
|
|
// child: Scrollbar(
|
|
|
|
// thumbVisibility: true, //设置滚动条常亮
|
|
|
|
// controller: _scrollCrl, //必须设置一个controller
|
|
|
|
|
|
|
|
// ///添加进度条
|
|
|
|
// child: ListView.builder(
|
|
|
|
// shrinkWrap: true,
|
|
|
|
// controller: _scrollCrl,
|
|
|
|
// itemBuilder: (context, index) {
|
|
|
|
// return GestureDetector(
|
|
|
|
// onTap: () {
|
|
|
|
// _byValueToReqeust(index);
|
|
|
|
// // setState(() {
|
|
|
|
// // sexStr = '先生';
|
|
|
|
// // showPhoneHistory = false;
|
|
|
|
// // _baseIndoProvider.phoneController
|
|
|
|
// // .text = _baseIndoProvider
|
|
|
|
// // .userHistorys[index]
|
|
|
|
// // .phone !=
|
|
|
|
// // null
|
|
|
|
// // ? _baseIndoProvider
|
|
|
|
// // .userHistorys[index].phone
|
|
|
|
// // : '';
|
|
|
|
// // // _homeEnterModel.nameController.text =
|
|
|
|
// // // _homeEnterModel
|
|
|
|
// // // .userHistorys[index].rname +
|
|
|
|
// // // _nameSuffix();
|
|
|
|
// // for (var item in _baseIndoProvider
|
|
|
|
// // .sexList) {
|
|
|
|
// // item['select'] = false;
|
|
|
|
// // if (item['title'] ==
|
|
|
|
// // _baseIndoProvider
|
|
|
|
// // .userHistorys[index]
|
|
|
|
// // .sexStr) {
|
|
|
|
// // item['select'] = true;
|
|
|
|
// // sexSelectIndex =
|
|
|
|
// // int.parse(item['code']) -
|
|
|
|
// // 1;
|
|
|
|
// // sexStr = _baseIndoProvider
|
|
|
|
// // .userHistorys[index]
|
|
|
|
// // .sexStr;
|
|
|
|
// // }
|
|
|
|
// // }
|
|
|
|
|
|
|
|
// // _addNameSuffix(
|
|
|
|
// // _baseIndoProvider
|
|
|
|
// // .userHistorys[index]
|
|
|
|
// // .rname,
|
|
|
|
// // sexStr);
|
|
|
|
// // if (_baseIndoProvider
|
|
|
|
// // .userHistorys[index]
|
|
|
|
// // .rname ==
|
|
|
|
// // null ||
|
|
|
|
// // _baseIndoProvider
|
|
|
|
// // .userHistorys[index]
|
|
|
|
// // .rname ==
|
|
|
|
// // '') {
|
|
|
|
// // nameStr = _baseIndoProvider
|
|
|
|
// // .nameController.text;
|
|
|
|
|
|
|
|
// // if (nameStr.endsWith('女士')) {
|
|
|
|
// // nameStr = nameStr.replaceAll(
|
|
|
|
// // '女士', '');
|
|
|
|
// // }
|
|
|
|
// // if (nameStr.endsWith('先生')) {
|
|
|
|
// // nameStr = nameStr.replaceAll(
|
|
|
|
// // '先生', '');
|
|
|
|
// // }
|
|
|
|
// // if (nameStr.endsWith('公司')) {
|
|
|
|
// // nameStr = nameStr.replaceAll(
|
|
|
|
// // '公司', '');
|
|
|
|
// // }
|
|
|
|
// // } else {
|
|
|
|
// // nameStr = _baseIndoProvider
|
|
|
|
// // .userHistorys[index].rname;
|
|
|
|
// // }
|
|
|
|
|
|
|
|
// // _phoneNode.unfocus();
|
|
|
|
// // _baseIndoProvider.userHistorys
|
|
|
|
// // .clear();
|
|
|
|
// // });
|
|
|
|
// },
|
|
|
|
// 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: Align(
|
|
|
|
// alignment:
|
|
|
|
// Alignment.centerLeft,
|
|
|
|
// child: Text(
|
|
|
|
// (_nameNode.hasFocus
|
|
|
|
// ? (_baseIndoProvider
|
|
|
|
// .userHistorys[
|
|
|
|
// index]
|
|
|
|
// .rnameStr ==
|
|
|
|
// null
|
|
|
|
// ? ''
|
|
|
|
// : _baseIndoProvider
|
|
|
|
// .userHistorys[
|
|
|
|
// index]
|
|
|
|
// .rnameStr)
|
|
|
|
// : (_baseIndoProvider
|
|
|
|
// .userHistorys[
|
|
|
|
// index]
|
|
|
|
// .phone ==
|
|
|
|
// null
|
|
|
|
// ? ''
|
|
|
|
// : _baseIndoProvider
|
|
|
|
// .userHistorys[
|
|
|
|
// index]
|
|
|
|
// .phone)) ??
|
|
|
|
// '' +
|
|
|
|
// ' ' +
|
|
|
|
// (_nameNode.hasFocus
|
|
|
|
// ? (_baseIndoProvider
|
|
|
|
// .userHistorys[
|
|
|
|
// index]
|
|
|
|
// .phone ==
|
|
|
|
// null
|
|
|
|
// ? ''
|
|
|
|
// : _baseIndoProvider
|
|
|
|
// .userHistorys[
|
|
|
|
// index]
|
|
|
|
// .phone ??
|
|
|
|
// '')
|
|
|
|
// : (_baseIndoProvider
|
|
|
|
// .userHistorys[
|
|
|
|
// index]
|
|
|
|
// .rnameStr ==
|
|
|
|
// null
|
|
|
|
// ? ''
|
|
|
|
// : _baseIndoProvider
|
|
|
|
// .userHistorys[
|
|
|
|
// index]
|
|
|
|
// .rnameStr)) +
|
|
|
|
// ' ' +
|
|
|
|
// _baseIndoProvider
|
|
|
|
// .userHistorys[
|
|
|
|
// index]
|
|
|
|
// .nickName,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours
|
|
|
|
// .color_333333,
|
|
|
|
// fontSize: ScreenUtil()
|
|
|
|
// .setSp(32)),
|
|
|
|
// ))),
|
|
|
|
// );
|
|
|
|
// },
|
|
|
|
// itemExtent: ScreenUtil().setWidth(104),
|
|
|
|
// itemCount:
|
|
|
|
// _baseIndoProvider.userHistorys.length,
|
|
|
|
// )))),
|
|
|
|
// ),
|
|
|
|
// )),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
));
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
// 客户经理转发记录
|
|
|
|
_addForward(String rid) async {
|
|
|
|
UserModel userModel = Provider.of<UserModel>(context, listen: false);
|
|
...
|
...
|
@@ -2429,6 +2609,225 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
///选中的桌子widget
|
|
|
|
Widget _selectTableWidgetSms() {
|
|
|
|
return Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
// 点击弹窗空白处联系人历史记录弹框消失
|
|
|
|
setState(() {
|
|
|
|
showPhoneHistory = false; //显示客户历史记录
|
|
|
|
_baseIndoProvider.userHistorys.clear();
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
// constraints: BoxConstraints(maxHeight: ScreenUtil().setWidth(760)),
|
|
|
|
// height: ScreenUtil().setWidth(400),
|
|
|
|
width: double.infinity,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
boxShadow: [
|
|
|
|
BoxShadow(
|
|
|
|
color: MyColours.color_333333,
|
|
|
|
blurRadius: ScreenUtil().setWidth(14))
|
|
|
|
],
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
topRight: Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
)),
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Stack(alignment: Alignment.centerRight, children: [
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40),
|
|
|
|
vertical: ScreenUtil().setSp(16),
|
|
|
|
),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_f3f3f3,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft:
|
|
|
|
Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
topRight:
|
|
|
|
Radius.circular(ScreenUtil().setWidth(24)),
|
|
|
|
)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
selectDateStr + ' ' + doltStr!,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
VEmptyView(8),
|
|
|
|
Text(
|
|
|
|
selectWeekAndLunarCalendar,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(20)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
right: 0,
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
_clearData();
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setWidth(30),
|
|
|
|
horizontal: ScreenUtil().setWidth(40)),
|
|
|
|
// color: Colors.red,
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath('close'),
|
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28),
|
|
|
|
)))),
|
|
|
|
Positioned(
|
|
|
|
left: 0,
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
_clearData();
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setWidth(30),
|
|
|
|
horizontal: ScreenUtil().setWidth(40)),
|
|
|
|
// color: Colors.red,
|
|
|
|
child: Text(
|
|
|
|
'清空',
|
|
|
|
style: TextStyle(
|
|
|
|
decoration: TextDecoration.underline,
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(20)),
|
|
|
|
),
|
|
|
|
)))
|
|
|
|
]),
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(top: ScreenUtil().setWidth(44)),
|
|
|
|
height: ScreenUtil().setWidth(60),
|
|
|
|
child: ListView.builder(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(48)),
|
|
|
|
itemCount:
|
|
|
|
tableManagerModel!.selectTablesOrReserve.length,
|
|
|
|
shrinkWrap: true,
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
itemBuilder: (BuildContext contxt, int index) {
|
|
|
|
TableListReserve table = tableManagerModel!
|
|
|
|
.selectTablesOrReserve[index];
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
right: ScreenUtil().setWidth(20)),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(16),
|
|
|
|
// right: ScreenUtil().setWidth(4),
|
|
|
|
// top: ScreenUtil().setWidth(14),
|
|
|
|
// bottom: ScreenUtil().setWidth(14)
|
|
|
|
),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_438E93),
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
ScreenUtil().setWidth(8))),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
table.name!,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(28)),
|
|
|
|
),
|
|
|
|
HEmptyView(14),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
//删除已经选择的桌位
|
|
|
|
tableManagerModel!
|
|
|
|
.selectTablesOrReserve
|
|
|
|
.removeWhere(
|
|
|
|
(t) => t.id == table.id);
|
|
|
|
if (tableManagerModel!
|
|
|
|
.selectTablesOrReserve
|
|
|
|
.length ==
|
|
|
|
0) {
|
|
|
|
// wechatNotification = true;
|
|
|
|
_clearData();
|
|
|
|
}
|
|
|
|
|
|
|
|
tableManagerModel!
|
|
|
|
.tablesOrReserveDataShow!
|
|
|
|
.forEach((element) {
|
|
|
|
element.tableList!
|
|
|
|
.forEach((elementn) {
|
|
|
|
if (elementn.id == table.id) {
|
|
|
|
elementn.selected = false;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
setState(() {});
|
|
|
|
|
|
|
|
// for (t.Table item
|
|
|
|
// in tableManagerModel.tablesShow) {
|
|
|
|
// if (item.id == table.id) {
|
|
|
|
// item.selected = false;
|
|
|
|
// setState(() {});
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// if (tableManagerModel.selectNumber != null) {
|
|
|
|
// for (t.Table item in tableManagerModel
|
|
|
|
// .areaTableMapShow[
|
|
|
|
// tableManagerModel
|
|
|
|
// .areas[
|
|
|
|
// tableManagerModel.selectNumber]
|
|
|
|
// .name]) {
|
|
|
|
// if (item.id == table.id) {
|
|
|
|
// item.selected = false;
|
|
|
|
// setState(() {});
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
// color: Colors.red,
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(14),
|
|
|
|
bottom:
|
|
|
|
ScreenUtil().setWidth(14),
|
|
|
|
left: ScreenUtil().setWidth(14),
|
|
|
|
right:
|
|
|
|
ScreenUtil().setWidth(4)),
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath(
|
|
|
|
'table_m_close'),
|
|
|
|
width: ScreenUtil()
|
|
|
|
.setWidth(32)))),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
),
|
|
|
|
// VEmptyView(50),
|
|
|
|
|
|
|
|
// Column(children: [
|
|
|
|
_customerInfoWidget(),
|
|
|
|
// VEmptyView(44),
|
|
|
|
// _couponWidget(),
|
|
|
|
// ]),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
))));
|
|
|
|
}
|
|
|
|
|
|
|
|
_onlyReserve() async {
|
|
|
|
bool isShow = true; //是否需要弹窗 “预订失败!”
|
|
|
|
SunReserveInfoModel? _model = await tableManagerModel!
|
|
...
|
...
|
@@ -2798,7 +3197,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
context,
|
|
|
|
);
|
|
|
|
JhCommonUtils.debounce(
|
|
|
|
() => _wechatReserve(true), 500);
|
|
|
|
() => _wechatReserve(true, widget.guest), 500);
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
],
|
|
...
|
...
|
@@ -2809,7 +3208,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
_wechatReserve(bool isWechat) async {
|
|
|
|
_wechatReserve(bool isWechat, Guest? guest) async {
|
|
|
|
bool isShow = true; //是否需要弹窗 “预订失败!”
|
|
|
|
SunReserveInfoModel? _model = await tableManagerModel!
|
|
|
|
.setReserveInfoOrReseve(context, (v) {
|
|
...
|
...
|
@@ -2819,7 +3218,7 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
isShow = false;
|
|
|
|
}
|
|
|
|
}, dateTime, currTimeIndex, morning, noon, night, meal1, meal2,
|
|
|
|
needKeep: true, guest: widget.guest);
|
|
|
|
needKeep: true, guest: guest);
|
|
|
|
if (_model != null &&
|
|
|
|
ObjectUtil.isNotEmpty(_model.row) &&
|
|
|
|
ObjectUtil.isNotEmpty(_model.row!.id)) {
|
|
...
|
...
|
@@ -4470,7 +4869,9 @@ class TableManagerPageState extends State<TableManagerPage> { |
|
|
|
?
|
|
|
|
// wechatNotification
|
|
|
|
// ?
|
|
|
|
_selectTableWidgetWechat()
|
|
|
|
!isReservePhoneApp
|
|
|
|
? _selectTableWidgetWechat()
|
|
|
|
: _selectTableWidgetSms()
|
|
|
|
// : Expanded(
|
|
|
|
// flex: 5, child: _selectTableWidgetSms())
|
|
|
|
: SizedBox()
|
...
|
...
|
|