|
...
|
...
|
@@ -151,11 +151,11 @@ class _CreateMarketingPlanPageState extends State<CreateMarketingPlanPage> { |
|
|
|
|
|
|
|
if (_giftType == 1 && _selectedCouponIndex != null) {
|
|
|
|
final coupon = customerProvider.couponListSelect![_selectedCouponIndex!];
|
|
|
|
final requirement = coupon.desc?.trim();
|
|
|
|
final requirement = _buildCouponRequirement(coupon);
|
|
|
|
final validity = _buildCouponValidity(coupon);
|
|
|
|
final couponContent = <String>[
|
|
|
|
_giftText,
|
|
|
|
if (requirement != null && requirement.isNotEmpty) requirement,
|
|
|
|
if (requirement.isNotEmpty) requirement,
|
|
|
|
'凭手机号核销',
|
|
|
|
if (validity.isNotEmpty) validity,
|
|
|
|
].join(',');
|
|
...
|
...
|
@@ -167,6 +167,17 @@ class _CreateMarketingPlanPageState extends State<CreateMarketingPlanPage> { |
|
|
|
'$_giftText,到店凭手机号核销。 欢迎提前预订,拒收请回复R';
|
|
|
|
}
|
|
|
|
|
|
|
|
String _buildCouponRequirement(CouponSunModel coupon) {
|
|
|
|
final desc = coupon.desc?.trim() ?? '';
|
|
|
|
if (desc.isEmpty) {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
if (coupon.isType == '1' || coupon.isType == '2') {
|
|
|
|
return desc;
|
|
|
|
}
|
|
|
|
return '消费满$desc元可用';
|
|
|
|
}
|
|
|
|
|
|
|
|
String _buildCouponValidity(CouponSunModel coupon) {
|
|
|
|
String? validForever;
|
|
|
|
String? stime;
|
...
|
...
|
|