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