|
|
@ -9,7 +9,6 @@ import 'package:shared_preferences/shared_preferences.dart'; |
|
|
|
import '../../retrofit/data/min_order_info.dart'; |
|
|
|
import '../../retrofit/data/min_order_info.dart'; |
|
|
|
import '../../retrofit/data/settleOrderInfo.dart'; |
|
|
|
import '../../retrofit/data/settleOrderInfo.dart'; |
|
|
|
import '../../view_widget/settlement_tips_dialog.dart'; |
|
|
|
import '../../view_widget/settlement_tips_dialog.dart'; |
|
|
|
import '../../view_widget/tips_dialog.dart'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PayMethod extends StatefulWidget { |
|
|
|
class PayMethod extends StatefulWidget { |
|
|
|
final Function(int payChannel) payChannelCheck; |
|
|
|
final Function(int payChannel) payChannelCheck; |
|
|
@ -186,6 +185,13 @@ class _PayMethod extends State<PayMethod> { |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
|
|
|
|
double greenMoney = double.parse(mGreenMoney); |
|
|
|
|
|
|
|
if (greenMoney == null) { |
|
|
|
|
|
|
|
greenMoney = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (widget.settleOrderInfo.orderNum > greenMoney) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|
checkIndex = 3; |
|
|
|
checkIndex = 3; |
|
|
|
// if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){ |
|
|
|
// if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){ |
|
|
@ -210,10 +216,7 @@ class _PayMethod extends State<PayMethod> { |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
checkView(3), |
|
|
|
checkView(3), |
|
|
|
Expanded( |
|
|
|
Spacer(flex: 1,), |
|
|
|
child: Container(), |
|
|
|
|
|
|
|
flex: 1, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Text( |
|
|
|
Text( |
|
|
|
"¥$mGreenMoney", |
|
|
|
"¥$mGreenMoney", |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
@ -230,18 +233,18 @@ class _PayMethod extends State<PayMethod> { |
|
|
|
S.of(context).lvbizhifu, |
|
|
|
S.of(context).lvbizhifu, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.sp, |
|
|
|
fontSize: 14.sp, |
|
|
|
color: Color(0xff353535), |
|
|
|
color: widget.settleOrderInfo.orderNum > (double.parse(mGreenMoney) ?? 0) ? Color(0x66353535) : Color(0xff353535), |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
if(mGreenMoney!="0.00" && (widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false))) |
|
|
|
if(mGreenMoney != "0.00" && (widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false))) |
|
|
|
SizedBox( |
|
|
|
SizedBox( |
|
|
|
height: 10, |
|
|
|
height: 10, |
|
|
|
), |
|
|
|
), |
|
|
|
if(mRaiseMoney!="0" && (widget.tableId > 0? (widget?.minOrderInfo?.isRaise ?? false) : (widget?.settleOrderInfo?.isRaise ?? false))) |
|
|
|
if(mRaiseMoney != "0" && (widget.tableId > 0 ? (widget?.minOrderInfo?.isRaise ?? false) : (widget?.settleOrderInfo?.isRaise ?? false))) |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
@ -249,11 +252,11 @@ class _PayMethod extends State<PayMethod> { |
|
|
|
checkIndex = 4; |
|
|
|
checkIndex = 4; |
|
|
|
if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){ |
|
|
|
if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){ |
|
|
|
SmartDialog.show( |
|
|
|
SmartDialog.show( |
|
|
|
widget: SettlementTips( |
|
|
|
widget: SettlementTips( |
|
|
|
() { |
|
|
|
() {}, |
|
|
|
}, |
|
|
|
text: "助农积分不参与任何活动优惠,请重新选择支付方式", |
|
|
|
text: "助农积分不参与任何活动优惠,请重新选择支付方式", |
|
|
|
), |
|
|
|
)); |
|
|
|
); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|