|
@@ -151,11 +151,11 @@ class _CreateMarketingPlanPageState extends State<CreateMarketingPlanPage> { |
|
@@ -151,11 +151,11 @@ class _CreateMarketingPlanPageState extends State<CreateMarketingPlanPage> { |
|
151
|
|
151
|
|
|
152
|
if (_giftType == 1 && _selectedCouponIndex != null) {
|
152
|
if (_giftType == 1 && _selectedCouponIndex != null) {
|
|
153
|
final coupon = customerProvider.couponListSelect![_selectedCouponIndex!];
|
153
|
final coupon = customerProvider.couponListSelect![_selectedCouponIndex!];
|
|
154
|
- final requirement = coupon.desc?.trim();
|
154
|
+ final requirement = _buildCouponRequirement(coupon);
|
|
155
|
final validity = _buildCouponValidity(coupon);
|
155
|
final validity = _buildCouponValidity(coupon);
|
|
156
|
final couponContent = <String>[
|
156
|
final couponContent = <String>[
|
|
157
|
_giftText,
|
157
|
_giftText,
|
|
158
|
- if (requirement != null && requirement.isNotEmpty) requirement,
|
158
|
+ if (requirement.isNotEmpty) requirement,
|
|
159
|
'凭手机号核销',
|
159
|
'凭手机号核销',
|
|
160
|
if (validity.isNotEmpty) validity,
|
160
|
if (validity.isNotEmpty) validity,
|
|
161
|
].join(',');
|
161
|
].join(',');
|
|
@@ -167,6 +167,17 @@ class _CreateMarketingPlanPageState extends State<CreateMarketingPlanPage> { |
|
@@ -167,6 +167,17 @@ class _CreateMarketingPlanPageState extends State<CreateMarketingPlanPage> { |
|
167
|
'$_giftText,到店凭手机号核销。 欢迎提前预订,拒收请回复R';
|
167
|
'$_giftText,到店凭手机号核销。 欢迎提前预订,拒收请回复R';
|
|
168
|
}
|
168
|
}
|
|
169
|
|
169
|
|
|
|
|
170
|
+ String _buildCouponRequirement(CouponSunModel coupon) {
|
|
|
|
171
|
+ final desc = coupon.desc?.trim() ?? '';
|
|
|
|
172
|
+ if (desc.isEmpty) {
|
|
|
|
173
|
+ return '';
|
|
|
|
174
|
+ }
|
|
|
|
175
|
+ if (coupon.isType == '1' || coupon.isType == '2') {
|
|
|
|
176
|
+ return desc;
|
|
|
|
177
|
+ }
|
|
|
|
178
|
+ return '消费满$desc元可用';
|
|
|
|
179
|
+ }
|
|
|
|
180
|
+
|
|
170
|
String _buildCouponValidity(CouponSunModel coupon) {
|
181
|
String _buildCouponValidity(CouponSunModel coupon) {
|
|
171
|
String? validForever;
|
182
|
String? validForever;
|
|
172
|
String? stime;
|
183
|
String? stime;
|