|
...
|
...
|
@@ -198,6 +198,8 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
TextEditingController moneyControl = TextEditingController();
|
|
|
|
FocusNode moneyFocusNode = FocusNode();
|
|
|
|
bool cancelCan = true;
|
|
|
|
List<dynamic> couponTypes = ['仅预订人', '所有人', '被请客人', '不赠送']; //赠券对象
|
|
|
|
String couponType = '所有人';
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
...
|
...
|
@@ -346,7 +348,8 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
getDzSellerConf() async {
|
|
|
|
MarketingCenterProvider marketingCenterProvider =
|
|
|
|
Provider.of<MarketingCenterProvider>(context, listen: false);
|
|
|
|
bool success = await marketingCenterProvider.getDzSellerConf(context,showLoading: false);
|
|
|
|
bool success = await marketingCenterProvider.getDzSellerConf(context,
|
|
|
|
showLoading: false);
|
|
|
|
if (success && marketingCenterProvider.dzSellerConfModel != null) {
|
|
|
|
String? cancelDay = marketingCenterProvider.dzSellerConfModel!.cancelDay;
|
|
|
|
bool cancelShopowner =
|
|
...
|
...
|
@@ -855,7 +858,8 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
"sid": Provider.of<UserModel>(context, listen: false).user!.sellerid,
|
|
|
|
'phone': phone
|
|
|
|
};
|
|
|
|
Map? temp = await customerProvider.getIsMemberByPhone(context, params,isShowLoading: false);
|
|
|
|
Map? temp = await customerProvider.getIsMemberByPhone(context, params,
|
|
|
|
isShowLoading: false);
|
|
|
|
if (temp == null) {
|
|
|
|
//会员状态未知
|
|
|
|
isMember = '会员状态未知';
|
|
...
|
...
|
@@ -3025,80 +3029,124 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
maxLines: 1,
|
|
|
|
enabled: false,
|
|
|
|
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
// controller: _baseIndoProvider.nameController,
|
|
|
|
// focusNode: _nameNode,
|
|
|
|
// textAlignVertical: TextAlignVertical.top,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: "用餐类型:",
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
// contentPadding:
|
|
|
|
// EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
|
|
|
|
// border: InputBorder.none,
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide.none),
|
|
|
|
),
|
|
|
|
onChanged: (value) {},
|
|
|
|
onTap: () {},
|
|
|
|
onEditingComplete: () {},
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
// 存储
|
|
|
|
|
|
|
|
DialogUtil.openDishTypeSelectModalBottomSheet(
|
|
|
|
context,
|
|
|
|
detailModel.reserveTypes!,
|
|
|
|
reserveType, rCallback: (value) async {
|
|
|
|
if (value != null) {
|
|
|
|
reserveType = value;
|
|
|
|
setState(() {});
|
|
|
|
bool sucess = await detailModel
|
|
|
|
.upReserveInfo(context, widget.rid,
|
|
|
|
reserveType: reserveType,
|
|
|
|
needToast: false);
|
|
|
|
if (sucess) {
|
|
|
|
EventBus()
|
|
|
|
.emit("refresh_tablemanager"); //刷新桌位
|
|
|
|
bus.emit("refresh_book_list"); //刷新已预订列表
|
|
|
|
bus.emit("refresh_detail");
|
|
|
|
// await _getReserveDetail(
|
|
|
|
// showCicle: false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Row(children: [
|
|
|
|
Text(
|
|
|
|
reserveType!,
|
|
|
|
style: TextStyle(
|
|
|
|
color: reserveType == '请选择'
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
HEmptyView(4),
|
|
|
|
Image.asset(Utils.getImgPath('quan_down_f'),
|
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28)),
|
|
|
|
]),
|
|
|
|
)
|
|
|
|
child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text("用餐类型:",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28))),
|
|
|
|
Expanded(
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
// 存储
|
|
|
|
|
|
|
|
DialogUtil
|
|
|
|
.openDishTypeSelectModalBottomSheet(
|
|
|
|
context,
|
|
|
|
detailModel.reserveTypes!,
|
|
|
|
reserveType,
|
|
|
|
rCallback: (value) async {
|
|
|
|
if (value != null) {
|
|
|
|
reserveType = value;
|
|
|
|
setState(() {});
|
|
|
|
bool sucess = await detailModel
|
|
|
|
.upReserveInfo(context, widget.rid,
|
|
|
|
reserveType: reserveType,
|
|
|
|
needToast: false);
|
|
|
|
if (sucess) {
|
|
|
|
EventBus().emit(
|
|
|
|
"refresh_tablemanager"); //刷新桌位
|
|
|
|
bus.emit(
|
|
|
|
"refresh_book_list"); //刷新已预订列表
|
|
|
|
bus.emit("refresh_detail");
|
|
|
|
// await _getReserveDetail(
|
|
|
|
// showCicle: false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Row(children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
reserveType!,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
color: reserveType == '请选择'
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
HEmptyView(10),
|
|
|
|
Image.asset(Utils.getImgPath('quan_down_f'),
|
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28)),
|
|
|
|
]),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
HEmptyView(20),
|
|
|
|
Expanded(
|
|
|
|
child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text("赠券对象:",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28))),
|
|
|
|
Expanded(
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //隐藏键盘
|
|
|
|
// 存储
|
|
|
|
|
|
|
|
DialogUtil.showSelectCusmanDialog(
|
|
|
|
context, couponTypes,
|
|
|
|
title: '赠送优惠券给', (value) async {
|
|
|
|
if (value != null) {
|
|
|
|
int couponSelectIndex = value.first;
|
|
|
|
couponType =
|
|
|
|
couponTypes[couponSelectIndex];
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selecteds: couponTypes
|
|
|
|
.indexOf(couponType) ==
|
|
|
|
-1
|
|
|
|
? []
|
|
|
|
: [
|
|
|
|
couponTypes
|
|
|
|
.indexOf(couponType)
|
|
|
|
])
|
|
|
|
.then((value) {});
|
|
|
|
},
|
|
|
|
child: Row(children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
couponType,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
color: couponType == '请选择'
|
|
|
|
? MyColours.color_999999
|
|
|
|
: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
HEmptyView(10),
|
|
|
|
Image.asset(Utils.getImgPath('quan_down_f'),
|
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28)),
|
|
|
|
]),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
if (detailModel.isShowNoticeDeposit == '1')
|
|
...
|
...
|
@@ -5348,8 +5396,8 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
return;
|
|
|
|
} else if (ObjectUtil.isEmpty(
|
|
|
|
detailModel.baseInfoSunModel) ||
|
|
|
|
ObjectUtil.isEmpty( detailModel
|
|
|
|
.baseInfoSunModel!.phone)) {
|
|
|
|
ObjectUtil.isEmpty(
|
|
|
|
detailModel.baseInfoSunModel!.phone)) {
|
|
|
|
// Utils.showToast('请填写经理的联系电话');
|
|
|
|
DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
title: "填写个人信息",
|
|
...
|
...
|
@@ -5609,8 +5657,8 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
callback: () async {
|
|
|
|
if (ObjectUtil.isEmpty(
|
|
|
|
detailModel.baseInfoSunModel) ||
|
|
|
|
ObjectUtil.isEmpty( detailModel
|
|
|
|
.baseInfoSunModel!.phone)) {
|
|
|
|
ObjectUtil.isEmpty(
|
|
|
|
detailModel.baseInfoSunModel!.phone)) {
|
|
|
|
// Utils.showToast('请填写经理的联系电话');
|
|
|
|
DialogUtil.cupertinoAlertDialog(context,
|
|
|
|
title: "填写个人信息",
|
...
|
...
|
|