|
...
|
...
|
@@ -65,12 +65,12 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { |
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
|
|
|
_couponNetworkData();
|
|
|
|
// _couponNetworkData();
|
|
|
|
_getNewRechargeList();
|
|
|
|
getSellerTemplateConf();
|
|
|
|
bus.on('refresh_marketting_page', (arg) {
|
|
|
|
_couponNetworkData();
|
|
|
|
});
|
|
|
|
// bus.on('refresh_marketting_page', (arg) {
|
|
|
|
// _couponNetworkData();
|
|
|
|
// });
|
|
|
|
bus.on('refresh_marketting_page_recharge', (arg) {
|
|
|
|
_getNewRechargeList();
|
|
|
|
});
|
|
...
|
...
|
@@ -80,7 +80,7 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { |
|
|
|
@override
|
|
|
|
void dispose() {
|
|
|
|
_uploadImageProvider.firstImage = UploadImgModel();
|
|
|
|
bus.off('refresh_marketting_page');
|
|
|
|
// bus.off('refresh_marketting_page');
|
|
|
|
bus.off('refresh_marketting_page_recharge');
|
|
|
|
|
|
|
|
super.dispose();
|
|
...
|
...
|
@@ -178,25 +178,25 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
///获取优惠券列表数据(status == 1)
|
|
|
|
// ///获取优惠券列表数据(status == 1)
|
|
|
|
|
|
|
|
_couponNetworkData({bool isShowLoading = true}) async {
|
|
|
|
Map<String, String> params = {
|
|
|
|
"uid": Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
};
|
|
|
|
params['status'] = '1';
|
|
|
|
// _couponNetworkData({bool isShowLoading = true}) async {
|
|
|
|
// Map<String, String> params = {
|
|
|
|
// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
// };
|
|
|
|
// params['status'] = '1';
|
|
|
|
|
|
|
|
await couponProvider.getCustomerSelectActivityMarking(context, params,
|
|
|
|
isShowLoading: isShowLoading);
|
|
|
|
if (couponDataList == null || couponDataList.length == 0) {
|
|
|
|
if (couponProvider.couponListSelect != null &&
|
|
|
|
couponProvider.couponListSelect.length > 0) {
|
|
|
|
couponDataList.add(couponProvider.couponListSelect[0]);
|
|
|
|
// await couponProvider.getCustomerSelectActivityMarking(context, params,
|
|
|
|
// isShowLoading: isShowLoading);
|
|
|
|
// if (couponDataList == null || couponDataList.length == 0) {
|
|
|
|
// if (couponProvider.couponListSelect != null &&
|
|
|
|
// couponProvider.couponListSelect.length > 0) {
|
|
|
|
// couponDataList.add(couponProvider.couponListSelect[0]);
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// setState(() {});
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
///客户互动及店铺推广
|
|
|
|
Widget _storeItemWidget(String title, String content,
|
|
...
|
...
|
@@ -406,155 +406,155 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { |
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
///优惠券
|
|
|
|
Widget _markingCupon({
|
|
|
|
VoidCallback onPressed,
|
|
|
|
bool select = false,
|
|
|
|
VoidCallback onPressedSelect,
|
|
|
|
}) {
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.only(left: w(21), top: w(12), right: w(21)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
InkWell(
|
|
|
|
onTap: onPressedSelect,
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(select ? 'f_select' : 'f_select_not'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'推荐店内代金券优惠',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14), color: MyColours.color_515151),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
RoundButton(
|
|
|
|
text: '选择活动',
|
|
|
|
width: w(72),
|
|
|
|
height: w(22),
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
borderColor: MyColours.color_438E93,
|
|
|
|
textColor: MyColours.color_438E93,
|
|
|
|
radius: r(11),
|
|
|
|
fontSize: 24,
|
|
|
|
isBold: true,
|
|
|
|
onPressed: onPressed,
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
VEmptyView(20),
|
|
|
|
ListView.builder(
|
|
|
|
shrinkWrap: true,
|
|
|
|
controller: controller,
|
|
|
|
itemCount: couponDataList.length,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
CouponSunModel couponData = couponDataList[index];
|
|
|
|
return _markingCuponItem(
|
|
|
|
couponData.aname,
|
|
|
|
_getCouponsDesc(couponData),
|
|
|
|
couponData.price ?? '',
|
|
|
|
couponData.use != null && couponData.use.isCash
|
|
|
|
? '${(double.parse(couponData.price) / double.parse(couponData.use.cash)) * 10}折'
|
|
|
|
: '',
|
|
|
|
'切换活动',
|
|
|
|
select: isCoupon, onPressedSelect: () {
|
|
|
|
setState(() {
|
|
|
|
isCoupon = !isCoupon;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
})
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
// ///优惠券
|
|
|
|
// Widget _markingCupon({
|
|
|
|
// VoidCallback onPressed,
|
|
|
|
// bool select = false,
|
|
|
|
// VoidCallback onPressedSelect,
|
|
|
|
// }) {
|
|
|
|
// return Container(
|
|
|
|
// margin: EdgeInsets.only(left: w(21), top: w(12), right: w(21)),
|
|
|
|
// child: Column(
|
|
|
|
// children: [
|
|
|
|
// InkWell(
|
|
|
|
// onTap: onPressedSelect,
|
|
|
|
// child: Row(
|
|
|
|
// children: [
|
|
|
|
// Image.asset(
|
|
|
|
// Utils.getImgPath(select ? 'f_select' : 'f_select_not'),
|
|
|
|
// width: w(20),
|
|
|
|
// ),
|
|
|
|
// HEmptyView(20),
|
|
|
|
// Text(
|
|
|
|
// '推荐店内代金券优惠',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: font(14), color: MyColours.color_515151),
|
|
|
|
// ),
|
|
|
|
// Spacer(),
|
|
|
|
// RoundButton(
|
|
|
|
// text: '选择活动',
|
|
|
|
// width: w(72),
|
|
|
|
// height: w(22),
|
|
|
|
// gradientStart: MyColours.color_ffffff,
|
|
|
|
// gradientEnd: MyColours.color_ffffff,
|
|
|
|
// borderColor: MyColours.color_438E93,
|
|
|
|
// textColor: MyColours.color_438E93,
|
|
|
|
// radius: r(11),
|
|
|
|
// fontSize: 24,
|
|
|
|
// isBold: true,
|
|
|
|
// onPressed: onPressed,
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// )),
|
|
|
|
// VEmptyView(20),
|
|
|
|
// ListView.builder(
|
|
|
|
// shrinkWrap: true,
|
|
|
|
// controller: controller,
|
|
|
|
// itemCount: couponDataList.length,
|
|
|
|
// itemBuilder: (BuildContext context, int index) {
|
|
|
|
// CouponSunModel couponData = couponDataList[index];
|
|
|
|
// return _markingCuponItem(
|
|
|
|
// couponData.aname,
|
|
|
|
// _getCouponsDesc(couponData),
|
|
|
|
// couponData.price ?? '',
|
|
|
|
// couponData.use != null && couponData.use.isCash
|
|
|
|
// ? '${(double.parse(couponData.price) / double.parse(couponData.use.cash)) * 10}折'
|
|
|
|
// : '',
|
|
|
|
// '切换活动',
|
|
|
|
// select: isCoupon, onPressedSelect: () {
|
|
|
|
// setState(() {
|
|
|
|
// isCoupon = !isCoupon;
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// })
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// );
|
|
|
|
// }
|
|
|
|
|
|
|
|
///优惠券
|
|
|
|
Widget _markingCuponItem(
|
|
|
|
String title,
|
|
|
|
String content,
|
|
|
|
String subtile,
|
|
|
|
String discount,
|
|
|
|
String btnTitle, {
|
|
|
|
VoidCallback onPressed,
|
|
|
|
bool select = false,
|
|
|
|
VoidCallback onPressedSelect,
|
|
|
|
}) {
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.only(left: w(21), top: w(12), right: w(21)),
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.all(w(12)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadiusDirectional.circular(r(8)),
|
|
|
|
border: Border.all(width: w(1), color: MyColours.color_DBDBDB)),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
constraints: BoxConstraints(maxWidth: w(150)),
|
|
|
|
child: Text(
|
|
|
|
title,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
)),
|
|
|
|
HEmptyView(20),
|
|
|
|
subtile != ''
|
|
|
|
? Text(
|
|
|
|
'¥${subtile}',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(7),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_E34D59),
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
HEmptyView(10),
|
|
|
|
discount != ''
|
|
|
|
? Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(3), vertical: w(2)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(3)),
|
|
|
|
border: Border.all(
|
|
|
|
width: w(0.5),
|
|
|
|
color: MyColours.color_E34D59)),
|
|
|
|
child: Text(
|
|
|
|
discount,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_E34D59,
|
|
|
|
fontSize: font(7)),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: SizedBox(),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
if (content != '') VEmptyView(20),
|
|
|
|
if (content != '')
|
|
|
|
Text(
|
|
|
|
content,
|
|
|
|
style: TextStyle(
|
|
|
|
height: 1.2,
|
|
|
|
fontSize: font(10),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_515151),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
// ///优惠券
|
|
|
|
// Widget _markingCuponItem(
|
|
|
|
// String title,
|
|
|
|
// String content,
|
|
|
|
// String subtile,
|
|
|
|
// String discount,
|
|
|
|
// String btnTitle, {
|
|
|
|
// VoidCallback onPressed,
|
|
|
|
// bool select = false,
|
|
|
|
// VoidCallback onPressedSelect,
|
|
|
|
// }) {
|
|
|
|
// return Container(
|
|
|
|
// margin: EdgeInsets.only(left: w(21), top: w(12), right: w(21)),
|
|
|
|
// child: Container(
|
|
|
|
// padding: EdgeInsets.all(w(12)),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// borderRadius: BorderRadiusDirectional.circular(r(8)),
|
|
|
|
// border: Border.all(width: w(1), color: MyColours.color_DBDBDB)),
|
|
|
|
// child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
// children: [
|
|
|
|
// Expanded(
|
|
|
|
// child: Column(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
// children: [
|
|
|
|
// Row(
|
|
|
|
// children: [
|
|
|
|
// Container(
|
|
|
|
// constraints: BoxConstraints(maxWidth: w(150)),
|
|
|
|
// child: Text(
|
|
|
|
// title,
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: font(14),
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// color: MyColours.color_515151),
|
|
|
|
// )),
|
|
|
|
// HEmptyView(20),
|
|
|
|
// subtile != ''
|
|
|
|
// ? Text(
|
|
|
|
// '¥${subtile}',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: font(7),
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// color: MyColours.color_E34D59),
|
|
|
|
// )
|
|
|
|
// : SizedBox(),
|
|
|
|
// HEmptyView(10),
|
|
|
|
// discount != ''
|
|
|
|
// ? Container(
|
|
|
|
// padding: EdgeInsets.symmetric(
|
|
|
|
// horizontal: w(3), vertical: w(2)),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// borderRadius: BorderRadius.circular(r(3)),
|
|
|
|
// border: Border.all(
|
|
|
|
// width: w(0.5),
|
|
|
|
// color: MyColours.color_E34D59)),
|
|
|
|
// child: Text(
|
|
|
|
// discount,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_E34D59,
|
|
|
|
// fontSize: font(7)),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// : SizedBox(),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// if (content != '') VEmptyView(20),
|
|
|
|
// if (content != '')
|
|
|
|
// Text(
|
|
|
|
// content,
|
|
|
|
// style: TextStyle(
|
|
|
|
// height: 1.2,
|
|
|
|
// fontSize: font(10),
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// color: MyColours.color_515151),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// )),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// );
|
|
|
|
// }
|
|
|
|
|
|
|
|
///营销推广
|
|
|
|
Widget _markingItem(
|
|
...
|
...
|
@@ -682,27 +682,27 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { |
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
margin: EdgeInsets.only(left: w(21), top: w(12), right: w(21)),
|
|
|
|
child: Column(children: [
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
isLink = !isLink;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath(isLink ? 'f_select' : 'f_select_not'),
|
|
|
|
width: w(20),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'推荐店内充值优惠活动链接',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: font(14), color: MyColours.color_515151),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
VEmptyView(24),
|
|
|
|
// InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// setState(() {
|
|
|
|
// isLink = !isLink;
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// child: Row(
|
|
|
|
// children: [
|
|
|
|
// Image.asset(
|
|
|
|
// Utils.getImgPath(isLink ? 'f_select' : 'f_select_not'),
|
|
|
|
// width: w(20),
|
|
|
|
// ),
|
|
|
|
// HEmptyView(20),
|
|
|
|
// Text(
|
|
|
|
// '推荐店内充值优惠活动链接',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: font(14), color: MyColours.color_515151),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// )),
|
|
|
|
// VEmptyView(24),
|
|
|
|
Container(
|
|
|
|
height: w(180),
|
|
|
|
child: _uploadImageProvider.firstImage.file != null ||
|
|
...
|
...
|
@@ -888,37 +888,37 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { |
|
|
|
}),
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
Container(
|
|
|
|
width: w(188),
|
|
|
|
height: w(22),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(r(11)),
|
|
|
|
gradient: LinearGradient(stops: [
|
|
|
|
-0.57,
|
|
|
|
0.55,
|
|
|
|
1.48
|
|
|
|
], colors: [
|
|
|
|
MyColours.color_4C8DAD,
|
|
|
|
MyColours.color_0143A3,
|
|
|
|
MyColours.color_42A5FF
|
|
|
|
], begin: Alignment.centerLeft, end: Alignment.centerRight)),
|
|
|
|
child: RoundButton(
|
|
|
|
width: w(186),
|
|
|
|
height: w(20),
|
|
|
|
text: '点击了解更多会员优惠政策',
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
borderColor: Colors.transparent,
|
|
|
|
// borderColor: MyColours.color_999999,
|
|
|
|
textColor: MyColours.color_999999,
|
|
|
|
radius: r(11),
|
|
|
|
fontSize: 24,
|
|
|
|
// Container(
|
|
|
|
// width: w(188),
|
|
|
|
// height: w(22),
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// borderRadius: BorderRadius.circular(r(11)),
|
|
|
|
// gradient: LinearGradient(stops: [
|
|
|
|
// -0.57,
|
|
|
|
// 0.55,
|
|
|
|
// 1.48
|
|
|
|
// ], colors: [
|
|
|
|
// MyColours.color_4C8DAD,
|
|
|
|
// MyColours.color_0143A3,
|
|
|
|
// MyColours.color_42A5FF
|
|
|
|
// ], begin: Alignment.centerLeft, end: Alignment.centerRight)),
|
|
|
|
// child: RoundButton(
|
|
|
|
// width: w(186),
|
|
|
|
// height: w(20),
|
|
|
|
// text: '点击了解更多会员优惠政策',
|
|
|
|
// gradientStart: MyColours.color_ffffff,
|
|
|
|
// gradientEnd: MyColours.color_ffffff,
|
|
|
|
// borderColor: Colors.transparent,
|
|
|
|
// // borderColor: MyColours.color_999999,
|
|
|
|
// textColor: MyColours.color_999999,
|
|
|
|
// radius: r(11),
|
|
|
|
// fontSize: 24,
|
|
|
|
|
|
|
|
isBold: true,
|
|
|
|
onPressed: () {},
|
|
|
|
)),
|
|
|
|
VEmptyView(18),
|
|
|
|
// isBold: true,
|
|
|
|
// onPressed: () {},
|
|
|
|
// )),
|
|
|
|
// VEmptyView(18),
|
|
|
|
// Container(
|
|
|
|
// height: w(28),
|
|
|
|
// alignment: Alignment.center,
|
|
...
|
...
|
@@ -932,24 +932,24 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { |
|
|
|
]));
|
|
|
|
}
|
|
|
|
|
|
|
|
String _getCouponsDesc(couponData) {
|
|
|
|
String couponsDesc = '';
|
|
|
|
if (couponData != null) {
|
|
|
|
if (couponData.expDate == null) {
|
|
|
|
couponsDesc = couponData.desc;
|
|
|
|
} else {
|
|
|
|
if (couponData.expDate.isNone) {
|
|
|
|
couponsDesc = '无限制,' + couponData.desc ?? '';
|
|
|
|
} else if (couponData.expDate.isBirthday) {
|
|
|
|
couponsDesc = '会员生日当天可用,' + couponData.desc ?? '';
|
|
|
|
} else if (couponData.expDate.isWeek) {
|
|
|
|
couponsDesc =
|
|
|
|
'${couponData.expDate.weekShow},' + couponData.desc ?? '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return couponsDesc;
|
|
|
|
}
|
|
|
|
// String _getCouponsDesc(couponData) {
|
|
|
|
// String couponsDesc = '';
|
|
|
|
// if (couponData != null) {
|
|
|
|
// if (couponData.expDate == null) {
|
|
|
|
// couponsDesc = couponData.desc;
|
|
|
|
// } else {
|
|
|
|
// if (couponData.expDate.isNone) {
|
|
|
|
// couponsDesc = '无限制,' + couponData.desc ?? '';
|
|
|
|
// } else if (couponData.expDate.isBirthday) {
|
|
|
|
// couponsDesc = '会员生日当天可用,' + couponData.desc ?? '';
|
|
|
|
// } else if (couponData.expDate.isWeek) {
|
|
|
|
// couponsDesc =
|
|
|
|
// '${couponData.expDate.weekShow},' + couponData.desc ?? '';
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// return couponsDesc;
|
|
|
|
// }
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
...
|
...
|
@@ -962,7 +962,7 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { |
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: MyColours.color_ffffff,
|
|
|
|
appBar: SystemAppBar(
|
|
|
|
'营销及客户互动',
|
|
|
|
'客户互动',
|
|
|
|
onTap: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
...
|
...
|
@@ -996,85 +996,85 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { |
|
|
|
isOnlineBook = !isOnlineBook;
|
|
|
|
});
|
|
|
|
}, select: isOnlineBook),
|
|
|
|
_storeItemWidget('向被邀请客人开放“提前点餐”功能。',
|
|
|
|
'请客人从预定安排直接预先选菜,到店后确认下单,无需服务员花费时间给客户点餐,可以为餐厅节源提效。',
|
|
|
|
onTap: () {
|
|
|
|
setState(() {
|
|
|
|
isOrder = !isOrder;
|
|
|
|
});
|
|
|
|
}, select: isOrder),
|
|
|
|
VEmptyView(24),
|
|
|
|
_headItem('预订安排中附带的营销推广'),
|
|
|
|
// _storeItemWidget('向客人开放“提前点餐”功能。',
|
|
|
|
// '请客人从预订安排直接预先选菜,到店后确认下单,无需服务员花费时间给客户点餐,可以为餐厅节源提效。',
|
|
|
|
// onTap: () {
|
|
|
|
// setState(() {
|
|
|
|
// isOrder = !isOrder;
|
|
|
|
// });
|
|
|
|
// }, select: isOrder),
|
|
|
|
// VEmptyView(24),
|
|
|
|
_headItem('预订安排底部附带的餐厅logo及欢迎语'),
|
|
|
|
VEmptyView(24),
|
|
|
|
couponProvider.couponListSelect != null &&
|
|
|
|
couponProvider.couponListSelect.length > 0
|
|
|
|
? _markingCupon(
|
|
|
|
select: isCoupon,
|
|
|
|
onPressedSelect: () {
|
|
|
|
setState(() {
|
|
|
|
isCoupon = !isCoupon;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
onPressed: () async {
|
|
|
|
//切换活动
|
|
|
|
Map temp =
|
|
|
|
await NavigatorUtil.goMarkingCouponSelectPage(
|
|
|
|
context, {'object': couponDataList});
|
|
|
|
if (temp['coupon'] != null) {
|
|
|
|
couponDataList = temp['coupon'];
|
|
|
|
// couponProvider.couponListSelect != null &&
|
|
|
|
// couponProvider.couponListSelect.length > 0
|
|
|
|
// ? _markingCupon(
|
|
|
|
// select: isCoupon,
|
|
|
|
// onPressedSelect: () {
|
|
|
|
// setState(() {
|
|
|
|
// isCoupon = !isCoupon;
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// onPressed: () async {
|
|
|
|
// //切换活动
|
|
|
|
// Map temp =
|
|
|
|
// await NavigatorUtil.goMarkingCouponSelectPage(
|
|
|
|
// context, {'object': couponDataList});
|
|
|
|
// if (temp['coupon'] != null) {
|
|
|
|
// couponDataList = temp['coupon'];
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
})
|
|
|
|
: (couponProvider.couponListSelect == null ||
|
|
|
|
couponProvider.couponListSelect.length ==
|
|
|
|
0) &&
|
|
|
|
Utils.getAuthority(context, '创建新的优惠券')
|
|
|
|
? _markingItem(
|
|
|
|
'推荐店内代金券优惠',
|
|
|
|
'当前没有代金券',
|
|
|
|
'注:代金券附加在预订安排中,可以随着预订人给被请客客人发送邀请函自动传播,吸引顾客到店。',
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'创建优惠',
|
|
|
|
select: false, onPressed: () {
|
|
|
|
//创建优惠
|
|
|
|
NavigatorUtil.goCouponPage(context);
|
|
|
|
})
|
|
|
|
: SizedBox(),
|
|
|
|
rechargeData != null
|
|
|
|
? _markingItem('推荐店内充值单一优惠活动', rechargeData.rname,
|
|
|
|
rechargeContent, '', '', '切换活动', select: isRecharge,
|
|
|
|
onPressedSelect: () {
|
|
|
|
setState(() {
|
|
|
|
isRecharge = !isRecharge;
|
|
|
|
});
|
|
|
|
}, onPressed: () async {
|
|
|
|
//切换活动
|
|
|
|
Map temp =
|
|
|
|
await NavigatorUtil.goMarkingRechargeSelectPage(
|
|
|
|
context, rechargeData.id);
|
|
|
|
if (temp != null && temp['recharge'] != null) {
|
|
|
|
rechargeData = temp['recharge'];
|
|
|
|
_getRechargeContent();
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
})
|
|
|
|
: (rechargeListCanUse == null ||
|
|
|
|
rechargeListCanUse.length == 0) &&
|
|
|
|
Utils.getAuthority(context, '新建优惠')
|
|
|
|
? _markingItem(
|
|
|
|
'推荐店内充值单一优惠活动',
|
|
|
|
'当前没有创建充值优惠活动',
|
|
|
|
'注:充值优惠活动附加在预订安排中,可以随着预订人给被请客客人发送邀请函自动传播。',
|
|
|
|
'',
|
|
|
|
'',
|
|
|
|
'创建优惠',
|
|
|
|
select: false, onPressed: () {
|
|
|
|
//创建新优惠
|
|
|
|
NavigatorUtil.goRechargeHomePage(context);
|
|
|
|
})
|
|
|
|
: SizedBox(),
|
|
|
|
// setState(() {});
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// : (couponProvider.couponListSelect == null ||
|
|
|
|
// couponProvider.couponListSelect.length ==
|
|
|
|
// 0) &&
|
|
|
|
// Utils.getAuthority(context, '创建新的优惠券')
|
|
|
|
// ? _markingItem(
|
|
|
|
// '推荐店内代金券优惠',
|
|
|
|
// '当前没有代金券',
|
|
|
|
// '注:代金券附加在预订安排中,可以随着预订人给被请客客人发送邀请函自动传播,吸引顾客到店。',
|
|
|
|
// '',
|
|
|
|
// '',
|
|
|
|
// '创建优惠',
|
|
|
|
// select: false, onPressed: () {
|
|
|
|
// //创建优惠
|
|
|
|
// NavigatorUtil.goCouponPage(context);
|
|
|
|
// })
|
|
|
|
// : SizedBox(),
|
|
|
|
// rechargeData != null
|
|
|
|
// ? _markingItem('推荐店内充值单一优惠活动', rechargeData.rname,
|
|
|
|
// rechargeContent, '', '', '切换活动', select: isRecharge,
|
|
|
|
// onPressedSelect: () {
|
|
|
|
// setState(() {
|
|
|
|
// isRecharge = !isRecharge;
|
|
|
|
// });
|
|
|
|
// }, onPressed: () async {
|
|
|
|
// //切换活动
|
|
|
|
// Map temp =
|
|
|
|
// await NavigatorUtil.goMarkingRechargeSelectPage(
|
|
|
|
// context, rechargeData.id);
|
|
|
|
// if (temp != null && temp['recharge'] != null) {
|
|
|
|
// rechargeData = temp['recharge'];
|
|
|
|
// _getRechargeContent();
|
|
|
|
// setState(() {});
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// : (rechargeListCanUse == null ||
|
|
|
|
// rechargeListCanUse.length == 0) &&
|
|
|
|
// Utils.getAuthority(context, '新建优惠')
|
|
|
|
// ? _markingItem(
|
|
|
|
// '推荐店内充值单一优惠活动',
|
|
|
|
// '当前没有创建充值优惠活动',
|
|
|
|
// '注:充值优惠活动附加在预订安排中,可以随着预订人给被请客客人发送邀请函自动传播。',
|
|
|
|
// '',
|
|
|
|
// '',
|
|
|
|
// '创建优惠',
|
|
|
|
// select: false, onPressed: () {
|
|
|
|
// //创建新优惠
|
|
|
|
// NavigatorUtil.goRechargeHomePage(context);
|
|
|
|
// })
|
|
|
|
// : SizedBox(),
|
|
|
|
_markingOtherItem()
|
|
|
|
],
|
|
|
|
),
|
...
|
...
|
|