|
...
|
...
|
@@ -199,7 +199,7 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
FocusNode moneyFocusNode = FocusNode();
|
|
|
|
bool cancelCan = true;
|
|
|
|
List<dynamic> couponTypes = ['仅预订人', '所有人', '被请客人', '不赠送']; //赠券对象
|
|
|
|
String couponType = '所有人';
|
|
|
|
String couponType = '';
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
...
|
...
|
@@ -549,6 +549,8 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
},
|
|
|
|
showCircle: showCicle);
|
|
|
|
|
|
|
|
couponType = couponTypes[int.parse(detailModel.giveUser) - 1];
|
|
|
|
|
|
|
|
noticeSms = detailModel.isNotice;
|
|
|
|
if (detailModel.baseInfoSunModel != null) {
|
|
|
|
name = detailModel.baseInfoSunModel!.name;
|
|
...
|
...
|
@@ -3095,64 +3097,70 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
))
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
// 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)),
|
|
|
|
// ]),
|
|
|
|
// ))
|
|
|
|
// ],
|
|
|
|
// ))
|
|
|
|
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(() {});
|
|
|
|
|
|
|
|
await detailModel.upReserveInfo(
|
|
|
|
context, widget.rid,
|
|
|
|
giveUser:
|
|
|
|
'${couponSelectIndex + 1}');
|
|
|
|
bus.emit("refresh_detail_relations");
|
|
|
|
}
|
|
|
|
},
|
|
|
|
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')
|
...
|
...
|
|