Commit eaca6e4b677653f3e263eb2d88056ed581d527c4

Authored by weixin_45529955
2 parents 298c2057 2cfdb75d

Merge branch 'V7.2.0+' into v6.1.0+

@@ -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;
@@ -212,9 +212,12 @@ class _VoiceWelcomeSettingPageState extends State<VoiceWelcomeSettingPage> { @@ -212,9 +212,12 @@ class _VoiceWelcomeSettingPageState extends State<VoiceWelcomeSettingPage> {
212 if (voiceInco != null && voiceInco.isNotEmpty) { 212 if (voiceInco != null && voiceInco.isNotEmpty) {
213 defaultVoiceText = voiceInco; 213 defaultVoiceText = voiceInco;
214 } 214 }
215 - //模板reserve字段为null时:被请人语音播报与预订人不一致默认选中、特殊用餐类型复选框默认开启;  
216 - //reserve字段有值时:被请人语音播报与预订人一致默认选中、特殊用餐类型复选框默认关闭  
217 - if (model.reserve == null) { 215 + //reserve为null,或reserve有值但voiceInco为null/空时:默认选中“不一致”、特殊用餐类型复选框默认开启;
  216 + //reserve有值且voiceInco有内容时:默认选中“一致”、特殊用餐类型复选框默认关闭
  217 + String? reserveVoiceInco = model.reserve?.voiceInco;
  218 + bool reserveVoiceIsEmpty =
  219 + reserveVoiceInco == null || reserveVoiceInco.trim().isEmpty;
  220 + if (model.reserve == null || reserveVoiceIsEmpty) {
218 guestVoiceSame = false; 221 guestVoiceSame = false;
219 specialVoiceEnabled = true; 222 specialVoiceEnabled = true;
220 } else { 223 } else {