|
|
@ -1,14 +1,12 @@ |
|
|
|
import 'dart:convert'; |
|
|
|
import 'dart:convert'; |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
|
|
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
import 'package:huixiang/utils/font_weight.dart'; |
|
|
|
import 'package:huixiang/utils/font_weight.dart'; |
|
|
|
import 'package:shared_preferences/shared_preferences.dart'; |
|
|
|
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'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PayMethod extends StatefulWidget { |
|
|
|
class PayMethod extends StatefulWidget { |
|
|
|
final Function(int payChannel) payChannelCheck; |
|
|
|
final Function(int payChannel) payChannelCheck; |
|
|
@ -92,240 +90,276 @@ class _PayMethod extends State<PayMethod> { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) |
|
|
|
if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
setState(() { |
|
|
|
double m = double.parse(money); |
|
|
|
checkIndex = 1; |
|
|
|
if (m == null) { |
|
|
|
}); |
|
|
|
m = 0; |
|
|
|
widget.payChannelCheck(4); |
|
|
|
} |
|
|
|
}, |
|
|
|
double orderSum = double.parse(widget.settleOrderInfo?.orderSum ?? '0'); |
|
|
|
child: Row( |
|
|
|
if (orderSum == null) { |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
orderSum = 0; |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
} |
|
|
|
children: [ |
|
|
|
if (orderSum > m) { |
|
|
|
checkView(1), |
|
|
|
return; |
|
|
|
Expanded( |
|
|
|
} |
|
|
|
child: Container(), |
|
|
|
setState(() { |
|
|
|
flex: 1, |
|
|
|
checkIndex = 1; |
|
|
|
), |
|
|
|
}); |
|
|
|
Text( |
|
|
|
widget.payChannelCheck(4); |
|
|
|
"¥$money", |
|
|
|
}, |
|
|
|
style: TextStyle( |
|
|
|
child: Row( |
|
|
|
fontSize: 14.sp, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
fontFamily: 'JDZhengHT', |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
color: Color(0xff353535), |
|
|
|
children: [ |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
checkView(1, isHide: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(money) ?? 0)), |
|
|
|
|
|
|
|
Expanded( |
|
|
|
|
|
|
|
child: Container(), |
|
|
|
|
|
|
|
flex: 1, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
SizedBox( |
|
|
|
"¥$money", |
|
|
|
width: 10, |
|
|
|
style: TextStyle( |
|
|
|
), |
|
|
|
fontSize: 14.sp, |
|
|
|
Text( |
|
|
|
fontFamily: 'JDZhengHT', |
|
|
|
S.of(context).huixiangqianbao, |
|
|
|
color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(money) ?? 0) ? Color(0x66353535) : Color(0xff353535), |
|
|
|
style: TextStyle( |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
fontSize: 14.sp, |
|
|
|
), |
|
|
|
color: Color(0xff353535), |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
], |
|
|
|
width: 10, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
S.of(context).huixiangqianbao, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
|
|
|
color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(money) ?? 0) ? Color(0x66353535) : Color(0xff353535), |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) |
|
|
|
if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) |
|
|
|
SizedBox( |
|
|
|
SizedBox( |
|
|
|
height: 10, |
|
|
|
height: 10, |
|
|
|
), |
|
|
|
), |
|
|
|
if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) |
|
|
|
if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
setState(() { |
|
|
|
double balanceMoney = double.parse(balance); |
|
|
|
checkIndex = 2; |
|
|
|
if (balanceMoney == null) { |
|
|
|
}); |
|
|
|
balanceMoney = 0; |
|
|
|
widget.payChannelCheck(3); |
|
|
|
} |
|
|
|
}, |
|
|
|
double orderSum = double.parse(widget.settleOrderInfo?.orderSum ?? '0'); |
|
|
|
child: Row( |
|
|
|
if (orderSum == null) { |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
orderSum = 0; |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
} |
|
|
|
children: [ |
|
|
|
if (orderSum > balanceMoney) { |
|
|
|
checkView(2), |
|
|
|
return; |
|
|
|
Expanded( |
|
|
|
} |
|
|
|
child: Container(), |
|
|
|
setState(() { |
|
|
|
flex: 1, |
|
|
|
checkIndex = 2; |
|
|
|
), |
|
|
|
}); |
|
|
|
Text( |
|
|
|
widget.payChannelCheck(3); |
|
|
|
"¥$balance", |
|
|
|
}, |
|
|
|
style: TextStyle( |
|
|
|
child: Row( |
|
|
|
fontSize: 14.sp, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
fontFamily: 'JDZhengHT', |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
color: Color(0xff353535), |
|
|
|
children: [ |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
checkView(2, isHide: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(balance) ?? 0)), |
|
|
|
|
|
|
|
Expanded( |
|
|
|
|
|
|
|
child: Container(), |
|
|
|
|
|
|
|
flex: 1, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
"¥$balance", |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
|
|
|
fontFamily: 'JDZhengHT', |
|
|
|
|
|
|
|
color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(balance) ?? 0) ? Color(0x66353535) : Color(0xff353535), |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
SizedBox( |
|
|
|
width: 10, |
|
|
|
width: 10, |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
S.of(context).mendianyue, |
|
|
|
S.of(context).mendianyue, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.sp, |
|
|
|
fontSize: 14.sp, |
|
|
|
color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(balance) ?? 0) ? Color(0x66353535) : Color(0xff353535), |
|
|
|
color: Color(0xff353535), |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) |
|
|
|
if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) |
|
|
|
SizedBox( |
|
|
|
SizedBox( |
|
|
|
height: 10, |
|
|
|
height: 10, |
|
|
|
), |
|
|
|
), |
|
|
|
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))) |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
double greenMoney = double.parse(mGreenMoney); |
|
|
|
double greenMoney = double.parse(mGreenMoney); |
|
|
|
if (greenMoney == null) { |
|
|
|
if (greenMoney == null) { |
|
|
|
greenMoney = 0; |
|
|
|
greenMoney = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
if (widget.settleOrderInfo.orderNum > greenMoney) { |
|
|
|
double orderSum = double.parse(widget.settleOrderInfo?.orderSum ?? '0'); |
|
|
|
return; |
|
|
|
if (orderSum == null) { |
|
|
|
} |
|
|
|
orderSum = 0; |
|
|
|
setState(() { |
|
|
|
} |
|
|
|
checkIndex = 3; |
|
|
|
if (orderSum > greenMoney) { |
|
|
|
// if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){ |
|
|
|
return; |
|
|
|
// print("discount-promotions: ${widget.promotions}"); |
|
|
|
} |
|
|
|
// print("discount-coupons: ${widget.coupons}"); |
|
|
|
setState(() { |
|
|
|
// print("discount-useVipPriceSelect: ${widget.useVipPriceSelect}"); |
|
|
|
checkIndex = 3; |
|
|
|
// print("discount-useBenefitSelect: ${widget.useBenefitSelect}"); |
|
|
|
// if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){ |
|
|
|
// SmartDialog.show( |
|
|
|
// print("discount-promotions: ${widget.promotions}"); |
|
|
|
// widget: SettlementTips( |
|
|
|
// print("discount-coupons: ${widget.coupons}"); |
|
|
|
// () { |
|
|
|
// print("discount-useVipPriceSelect: ${widget.useVipPriceSelect}"); |
|
|
|
// }, |
|
|
|
// print("discount-useBenefitSelect: ${widget.useBenefitSelect}"); |
|
|
|
// text: "绿币支付不参与任何活动优惠,请重新选择支付方式", |
|
|
|
// SmartDialog.show( |
|
|
|
// )); |
|
|
|
// widget: SettlementTips( |
|
|
|
// return; |
|
|
|
// () { |
|
|
|
// } |
|
|
|
// }, |
|
|
|
}); |
|
|
|
// text: "绿币支付不参与任何活动优惠,请重新选择支付方式", |
|
|
|
print("discount-payChannelCheck: 5"); |
|
|
|
// )); |
|
|
|
widget.payChannelCheck(5); |
|
|
|
// return; |
|
|
|
}, |
|
|
|
// } |
|
|
|
child: Row( |
|
|
|
}); |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
print("discount-payChannelCheck: 5"); |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
widget.payChannelCheck(5); |
|
|
|
children: [ |
|
|
|
}, |
|
|
|
checkView(3), |
|
|
|
child: Row( |
|
|
|
Spacer(flex: 1,), |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
Text( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
"¥$mGreenMoney", |
|
|
|
children: [ |
|
|
|
style: TextStyle( |
|
|
|
checkView(3, isHide: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(mGreenMoney) ?? 0)), |
|
|
|
fontSize: 14.sp, |
|
|
|
Spacer(flex: 1,), |
|
|
|
fontFamily: 'JDZhengHT', |
|
|
|
Text( |
|
|
|
color: Color(0xff353535), |
|
|
|
"¥$mGreenMoney", |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
|
|
|
fontFamily: 'JDZhengHT', |
|
|
|
|
|
|
|
color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(mGreenMoney) ?? 0) ? Color(0x66353535) : Color(0xff353535), |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
SizedBox( |
|
|
|
width: 10, |
|
|
|
width: 10, |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
S.of(context).lvbizhifu, |
|
|
|
S.of(context).lvbizhifu, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.sp, |
|
|
|
fontSize: 14.sp, |
|
|
|
color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(mGreenMoney) ?? 0) ? Color(0x66353535) : 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: () { |
|
|
|
setState(() { |
|
|
|
double raiseMoney = double.parse(mRaiseMoney); |
|
|
|
checkIndex = 4; |
|
|
|
if (raiseMoney == null) { |
|
|
|
if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){ |
|
|
|
raiseMoney = 0; |
|
|
|
SmartDialog.show( |
|
|
|
} |
|
|
|
widget: SettlementTips( |
|
|
|
double orderSum = double.parse(widget.settleOrderInfo?.orderSum ?? '0'); |
|
|
|
() {}, |
|
|
|
if (orderSum == null) { |
|
|
|
text: "助农积分不参与任何活动优惠,请重新选择支付方式", |
|
|
|
orderSum = 0; |
|
|
|
), |
|
|
|
} |
|
|
|
); |
|
|
|
if (orderSum > raiseMoney) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
setState(() { |
|
|
|
widget.payChannelCheck(7); |
|
|
|
checkIndex = 4; |
|
|
|
}, |
|
|
|
// if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){ |
|
|
|
child: Row( |
|
|
|
// SmartDialog.show( |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
// widget: SettlementTips( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
// () {}, |
|
|
|
children: [ |
|
|
|
// text: "助农积分不参与任何活动优惠,请重新选择支付方式", |
|
|
|
checkView(4), |
|
|
|
// ), |
|
|
|
Expanded( |
|
|
|
// ); |
|
|
|
child: Container(), |
|
|
|
// return; |
|
|
|
flex: 1, |
|
|
|
// } |
|
|
|
), |
|
|
|
}); |
|
|
|
Text( |
|
|
|
widget.payChannelCheck(7); |
|
|
|
"¥$mRaiseMoney", |
|
|
|
}, |
|
|
|
style: TextStyle( |
|
|
|
child: Row( |
|
|
|
fontSize: 14.sp, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
fontFamily: 'JDZhengHT', |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
color: Color(0xff353535), |
|
|
|
children: [ |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
checkView(4, isHide: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(mRaiseMoney) ?? 0)), |
|
|
|
|
|
|
|
Spacer( |
|
|
|
|
|
|
|
flex: 1, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
"¥$mRaiseMoney", |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
|
|
|
fontFamily: 'JDZhengHT', |
|
|
|
|
|
|
|
color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(mRaiseMoney) ?? 0) ? Color(0x66353535) : Color(0xff353535), |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
SizedBox( |
|
|
|
width: 10, |
|
|
|
width: 10, |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
S.of(context).zhunongjifen, |
|
|
|
S.of(context).zhunongjifen, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.sp, |
|
|
|
fontSize: 14.sp, |
|
|
|
color: (double.parse(widget.settleOrderInfo?.orderSum ?? '0') ?? 0) > (double.parse(mRaiseMoney) ?? 0) ? Color(0x66353535) : Color(0xff353535), |
|
|
|
color: Color(0xff353535), |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
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))) |
|
|
|
|
|
|
|
|
|
|
|
if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) |
|
|
|
if(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|
checkIndex = 5; |
|
|
|
checkIndex = 5; |
|
|
|
widget.payChannelCheck(1); |
|
|
|
widget.payChannelCheck(1); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
child: Row( |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
checkView(5), |
|
|
|
checkView(5), |
|
|
|
Spacer(), |
|
|
|
Spacer(), |
|
|
|
Image.asset("assets/image/icon_we_chat.webp"), |
|
|
|
Image.asset("assets/image/icon_we_chat.webp"), |
|
|
|
Padding( |
|
|
|
Padding( |
|
|
|
padding: EdgeInsets.only(left: 8.w), |
|
|
|
padding: EdgeInsets.only(left: 8.w), |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
S.of(context).weixinzhifu, |
|
|
|
S.of(context).weixinzhifu, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.sp, |
|
|
|
fontSize: 14.sp, |
|
|
|
color: Color(0xff353535), |
|
|
|
color: Color(0xff353535), |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
@ -333,7 +367,15 @@ class _PayMethod extends State<PayMethod> { |
|
|
|
|
|
|
|
|
|
|
|
var checkIndex = 5; |
|
|
|
var checkIndex = 5; |
|
|
|
|
|
|
|
|
|
|
|
Widget checkView(var index) { |
|
|
|
Widget checkView(var index, {bool isHide = false}) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isHide) { |
|
|
|
|
|
|
|
return Container( |
|
|
|
|
|
|
|
padding: EdgeInsets.only(right:36.w), |
|
|
|
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return Container( |
|
|
|
return Container( |
|
|
|
padding: EdgeInsets.only(right:36.w), |
|
|
|
padding: EdgeInsets.only(right:36.w), |
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|