Browse Source

增加堂食,打包外带功能;

结算页各间距更改(22);
如果改店可选择堂食还是外带,下单传改值;不然还是正常值;
结算详情优化,如果是外带(3),堂食(4)类型显示跟普通自取商品一样;
订单列表更改,优化同上述一样;
语言更改,本地新增英文;
new_revision_app
wurong 2 years ago
parent
commit
4e16524bef
  1. BIN
      assets/image/2x/dining_w.webp
  2. BIN
      assets/image/3x/dining_w.webp
  3. BIN
      assets/image/dining_w.webp
  4. 2
      lib/generated/intl/messages_en.dart
  5. 2
      lib/generated/intl/messages_en_US.dart
  6. 2
      lib/generated/intl/messages_zh_CN.dart
  7. 2
      lib/generated/intl/messages_zh_Hans_CN.dart
  8. 2
      lib/generated/intl/messages_zh_Hant_CN.dart
  9. 2
      lib/generated/intl/messages_zh_TW.dart
  10. 20
      lib/generated/l10n.dart
  11. 1
      lib/l10n/intl_en.arb
  12. 1
      lib/l10n/intl_en_US.arb
  13. 1
      lib/l10n/intl_zh_CN.arb
  14. 1
      lib/l10n/intl_zh_Hans_CN.arb
  15. 1
      lib/l10n/intl_zh_Hant_CN.arb
  16. 1
      lib/l10n/intl_zh_TW.arb
  17. 2
      lib/main.dart
  18. 2
      lib/mine/recharge_page.dart
  19. 2
      lib/order/order_detail_page.dart
  20. 2
      lib/order/order_view/order_address.dart
  21. 2
      lib/order/order_view/order_commodity.dart
  22. 2
      lib/order/order_view/order_info.dart
  23. 6
      lib/order/order_view/order_status.dart
  24. 6
      lib/retrofit/data/delivery_info.dart
  25. 16
      lib/setting/setting_page.dart
  26. 143
      lib/settlement/settlement.dart
  27. 10
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  28. 7
      lib/settlement/settlement_view/distribution.dart
  29. 2
      lib/settlement/settlement_view/pay_method.dart
  30. 4
      lib/utils/status_utils.dart

BIN
assets/image/2x/dining_w.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 B

BIN
assets/image/3x/dining_w.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/image/dining_w.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

2
lib/generated/intl/messages_en.dart

@ -684,6 +684,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"), "xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"), "xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"), "xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"), "xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"),
@ -712,6 +713,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集团联盟店会员点餐"), "yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集团联盟店会员点餐"),
"yindaoye3" : MessageLookupByLibrary.simpleMessage("会员活动专区"), "yindaoye3" : MessageLookupByLibrary.simpleMessage("会员活动专区"),
"yindaoye4" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), "yindaoye4" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"yingwen" : MessageLookupByLibrary.simpleMessage("英文"),
"yingyeshijian" : m37, "yingyeshijian" : m37,
"yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"), "yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"),
"yinshi" : MessageLookupByLibrary.simpleMessage("饮食"), "yinshi" : MessageLookupByLibrary.simpleMessage("饮食"),

2
lib/generated/intl/messages_en_US.dart

@ -684,6 +684,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xuanguige" : MessageLookupByLibrary.simpleMessage("Select specs"), "xuanguige" : MessageLookupByLibrary.simpleMessage("Select specs"),
"xuanji" : MessageLookupByLibrary.simpleMessage("Selection"), "xuanji" : MessageLookupByLibrary.simpleMessage("Selection"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("Please select the picking method of goods"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("Please select the picking method of goods"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("select recommended store"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("Renewal member"), "xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("Renewal member"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("Learning Health"), "xuexijiankang" : MessageLookupByLibrary.simpleMessage("Learning Health"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("Renewal Home VIP"), "xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("Renewal Home VIP"),
@ -712,6 +713,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yindaoye2" : MessageLookupByLibrary.simpleMessage("New Group Alliance Store Members Order Meals"), "yindaoye2" : MessageLookupByLibrary.simpleMessage("New Group Alliance Store Members Order Meals"),
"yindaoye3" : MessageLookupByLibrary.simpleMessage("Member activity zone"), "yindaoye3" : MessageLookupByLibrary.simpleMessage("Member activity zone"),
"yindaoye4" : MessageLookupByLibrary.simpleMessage("Live a healthy and organic life"), "yindaoye4" : MessageLookupByLibrary.simpleMessage("Live a healthy and organic life"),
"yingwen" : MessageLookupByLibrary.simpleMessage("United States"),
"yingyeshijian" : m37, "yingyeshijian" : m37,
"yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("Silver card member"), "yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("Silver card member"),
"yinshi" : MessageLookupByLibrary.simpleMessage("diet"), "yinshi" : MessageLookupByLibrary.simpleMessage("diet"),

2
lib/generated/intl/messages_zh_CN.dart

@ -684,6 +684,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"), "xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"), "xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"), "xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"), "xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"),
@ -712,6 +713,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集团联盟店会员点餐"), "yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集团联盟店会员点餐"),
"yindaoye3" : MessageLookupByLibrary.simpleMessage("会员活动专区"), "yindaoye3" : MessageLookupByLibrary.simpleMessage("会员活动专区"),
"yindaoye4" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), "yindaoye4" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"yingwen" : MessageLookupByLibrary.simpleMessage("英文"),
"yingyeshijian" : m37, "yingyeshijian" : m37,
"yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"), "yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"),
"yinshi" : MessageLookupByLibrary.simpleMessage("饮食"), "yinshi" : MessageLookupByLibrary.simpleMessage("饮食"),

2
lib/generated/intl/messages_zh_Hans_CN.dart

@ -684,6 +684,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"), "xuanguige" : MessageLookupByLibrary.simpleMessage("选规格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("选集"), "xuanji" : MessageLookupByLibrary.simpleMessage("选集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("请选择商品的领取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("选择推荐门店"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"), "xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("续费会员"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"), "xuexijiankang" : MessageLookupByLibrary.simpleMessage("学习健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"), "xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("续费回乡VIP"),
@ -712,6 +713,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集团联盟店会员点餐"), "yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集团联盟店会员点餐"),
"yindaoye3" : MessageLookupByLibrary.simpleMessage("会员活动专区"), "yindaoye3" : MessageLookupByLibrary.simpleMessage("会员活动专区"),
"yindaoye4" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), "yindaoye4" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"yingwen" : MessageLookupByLibrary.simpleMessage("英文"),
"yingyeshijian" : m37, "yingyeshijian" : m37,
"yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"), "yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"),
"yinshi" : MessageLookupByLibrary.simpleMessage("饮食"), "yinshi" : MessageLookupByLibrary.simpleMessage("饮食"),

2
lib/generated/intl/messages_zh_Hant_CN.dart

@ -678,6 +678,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"), "xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("選集"), "xuanji" : MessageLookupByLibrary.simpleMessage("選集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("選擇推薦門店"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("續費會員"), "xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("續費會員"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("學習健康"), "xuexijiankang" : MessageLookupByLibrary.simpleMessage("學習健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("續費回鄉VIP"), "xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("續費回鄉VIP"),
@ -706,6 +707,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集團聯盟店會員點餐"), "yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集團聯盟店會員點餐"),
"yindaoye3" : MessageLookupByLibrary.simpleMessage("會員活動專區"), "yindaoye3" : MessageLookupByLibrary.simpleMessage("會員活動專區"),
"yindaoye4" : MessageLookupByLibrary.simpleMessage("過健康有機生活"), "yindaoye4" : MessageLookupByLibrary.simpleMessage("過健康有機生活"),
"yingwen" : MessageLookupByLibrary.simpleMessage("英文"),
"yingyeshijian" : m37, "yingyeshijian" : m37,
"yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"), "yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"),
"yinshi" : MessageLookupByLibrary.simpleMessage("飲食"), "yinshi" : MessageLookupByLibrary.simpleMessage("飲食"),

2
lib/generated/intl/messages_zh_TW.dart

@ -681,6 +681,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"), "xuanguige" : MessageLookupByLibrary.simpleMessage("選規格"),
"xuanji" : MessageLookupByLibrary.simpleMessage("選集"), "xuanji" : MessageLookupByLibrary.simpleMessage("選集"),
"xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"), "xuanzeshangpinlingqufangshi" : MessageLookupByLibrary.simpleMessage("請選擇商品的領取方式"),
"xuanzetuijianmendian" : MessageLookupByLibrary.simpleMessage("選擇推薦門店"),
"xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("續費會員"), "xuefeihuiyuan" : MessageLookupByLibrary.simpleMessage("續費會員"),
"xuexijiankang" : MessageLookupByLibrary.simpleMessage("學習健康"), "xuexijiankang" : MessageLookupByLibrary.simpleMessage("學習健康"),
"xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("續費回鄉VIP"), "xufeihuixiangVIP" : MessageLookupByLibrary.simpleMessage("續費回鄉VIP"),
@ -709,6 +710,7 @@ class MessageLookup extends MessageLookupByLibrary {
"yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集團聯盟店會員點餐"), "yindaoye2" : MessageLookupByLibrary.simpleMessage("全新集團聯盟店會員點餐"),
"yindaoye3" : MessageLookupByLibrary.simpleMessage("會員活動專區"), "yindaoye3" : MessageLookupByLibrary.simpleMessage("會員活動專區"),
"yindaoye4" : MessageLookupByLibrary.simpleMessage("過健康有機生活"), "yindaoye4" : MessageLookupByLibrary.simpleMessage("過健康有機生活"),
"yingwen" : MessageLookupByLibrary.simpleMessage("英文"),
"yingyeshijian" : m37, "yingyeshijian" : m37,
"yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"), "yinkahuiyuan" : MessageLookupByLibrary.simpleMessage("银卡会员"),
"yinshi" : MessageLookupByLibrary.simpleMessage("飲食"), "yinshi" : MessageLookupByLibrary.simpleMessage("飲食"),

20
lib/generated/l10n.dart

@ -6955,6 +6955,26 @@ class S {
); );
} }
/// ``
String get xuanzetuijianmendian {
return Intl.message(
'选择推荐门店',
name: 'xuanzetuijianmendian',
desc: '',
args: [],
);
}
/// ``
String get yingwen {
return Intl.message(
'英文',
name: 'yingwen',
desc: '',
args: [],
);
}
/// `使` /// `使`
String get privacy_policy4 { String get privacy_policy4 {
return Intl.message( return Intl.message(

1
lib/l10n/intl_en.arb

@ -724,6 +724,7 @@
"mendianyue":"门店余额", "mendianyue":"门店余额",
"lvbizhifu":"绿币支付", "lvbizhifu":"绿币支付",
"xuanzetuijianmendian":"选择推荐门店", "xuanzetuijianmendian":"选择推荐门店",
"yingwen":"英文",

1
lib/l10n/intl_en_US.arb

@ -725,6 +725,7 @@
"mendianyue":"store balance", "mendianyue":"store balance",
"lvbizhifu":"green payment", "lvbizhifu":"green payment",
"xuanzetuijianmendian":"select recommended store", "xuanzetuijianmendian":"select recommended store",
"yingwen":"United States",

1
lib/l10n/intl_zh_CN.arb

@ -725,6 +725,7 @@
"mendianyue":"门店余额", "mendianyue":"门店余额",
"lvbizhifu":"绿币支付", "lvbizhifu":"绿币支付",
"xuanzetuijianmendian":"选择推荐门店", "xuanzetuijianmendian":"选择推荐门店",
"yingwen":"英文",

1
lib/l10n/intl_zh_Hans_CN.arb

@ -725,6 +725,7 @@
"mendianyue":"门店余额", "mendianyue":"门店余额",
"lvbizhifu":"绿币支付", "lvbizhifu":"绿币支付",
"xuanzetuijianmendian":"选择推荐门店", "xuanzetuijianmendian":"选择推荐门店",
"yingwen":"英文",

1
lib/l10n/intl_zh_Hant_CN.arb

@ -716,6 +716,7 @@
"mendianyue":"門店餘額", "mendianyue":"門店餘額",
"lvbizhifu":"綠幣支付", "lvbizhifu":"綠幣支付",
"xuanzetuijianmendian":"選擇推薦門店", "xuanzetuijianmendian":"選擇推薦門店",
"yingwen":"英文",

1
lib/l10n/intl_zh_TW.arb

@ -718,6 +718,7 @@
"mendianyue":"門店餘額", "mendianyue":"門店餘額",
"lvbizhifu":"綠幣支付", "lvbizhifu":"綠幣支付",
"xuanzetuijianmendian":"選擇推薦門店", "xuanzetuijianmendian":"選擇推薦門店",
"yingwen":"英文",

2
lib/main.dart

@ -202,7 +202,7 @@ class MyApp extends StatelessWidget {
} else if (locales[0].countryCode == "CN"){ } else if (locales[0].countryCode == "CN"){
locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH'); locale = Locale.fromSubtags(languageCode: 'zh', countryCode: 'CH');
} else{ } else{
locale = Locale.fromSubtags(languageCode: 'en', countryCode: 'CH'); locale = Locale.fromSubtags(languageCode: 'en', countryCode: 'US');
} }
return appLocale ?? locale; return appLocale ?? locale;
}, },

2
lib/mine/recharge_page.dart

@ -734,7 +734,7 @@ class _RechargePage extends State<RechargePage> {
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.symmetric(vertical: 12), margin: EdgeInsets.symmetric(vertical: 12),
child: Text( child: Text(
"选择推荐门店", S.of(context).xuanzetuijianmendian,
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.bold, fontWeight: MyFontWeight.bold,
fontSize: 15.sp, fontSize: 15.sp,

2
lib/order/order_detail_page.dart

@ -259,7 +259,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
} }
statusTitle() { statusTitle() {
if (isTakeOut == 0) { if (isTakeOut == 0 || isTakeOut == 3 || isTakeOut == 4) {
if (payStatus == 0 && orderStatus != -1) { if (payStatus == 0 && orderStatus != -1) {
title = S.of(context).dingdandaizhifu; title = S.of(context).dingdandaizhifu;
} else { } else {

2
lib/order/order_view/order_address.dart

@ -77,7 +77,7 @@ class _OrderAddress extends State<OrderAddress> {
Text( Text(
(widget.orderInfo != null && (widget.orderInfo != null &&
widget.orderInfo.addressExt != null) widget.orderInfo.addressExt != null)
? ((widget.isTakeOut == 0 ? ((widget.isTakeOut == 0 || widget.isTakeOut == 3 || widget.isTakeOut == 4
? widget.orderInfo.storeName ? widget.orderInfo.storeName
: widget.orderInfo.addressExt.recName) ?? : widget.orderInfo.addressExt.recName) ??
"") "")

2
lib/order/order_view/order_commodity.dart

@ -73,7 +73,7 @@ class _OrderCommodity extends State<OrderCommodity> {
} }
widgets.add(SizedBox(height: 20.h)); widgets.add(SizedBox(height: 20.h));
if (widget.orderInfo.isTakeOut != 0) { if (widget.orderInfo.isTakeOut != 0 && widget.orderInfo.isTakeOut != 3 && widget.orderInfo.isTakeOut != 4) {
// //
widgets.add( widgets.add(
discountItem( discountItem(

2
lib/order/order_view/order_info.dart

@ -46,7 +46,7 @@ class _OrderInfoView extends State<OrderInfoView> {
orderInfoItem(S.of(context).xiadanshijian, orderInfoItem(S.of(context).xiadanshijian,
widget.orderInfo != null ? widget.orderInfo.createTime : ""), widget.orderInfo != null ? widget.orderInfo.createTime : ""),
orderInfoItem(S.of(context).peisongfangshi, widget.isTakeOut == 0 orderInfoItem(S.of(context).peisongfangshi, widget.isTakeOut == 0
? S.of(context).ziqu :(widget.orderInfo != null && widget.orderInfo.logisticsName != "") ? widget.orderInfo.logisticsName : "美团配送"), ? S.of(context).ziqu : widget.isTakeOut == 3 ? "打包":widget.isTakeOut == 4?"堂食":((widget.orderInfo != null && widget.orderInfo.logisticsName != "") ? widget.orderInfo.logisticsName : "美团配送")),
// orderInfoItem(S.of(context).peisongfangshi,"美团配送"), // orderInfoItem(S.of(context).peisongfangshi,"美团配送"),
if(widget?.orderInfo?.subcribeTime != null && widget?.orderInfo?.subcribeTime != "") if(widget?.orderInfo?.subcribeTime != null && widget?.orderInfo?.subcribeTime != "")
orderInfoItem("预约时间", orderInfoItem("预约时间",

6
lib/order/order_view/order_status.dart

@ -66,9 +66,11 @@ class _OrderStatus extends State<OrderStatus> {
RoundButton( RoundButton(
text: widget.isTakeOut == 0 text: widget.isTakeOut == 0
? S.of(context).ziqu ? S.of(context).ziqu
: widget.isTakeOut == 1 : widget.isTakeOut == 4 ? "堂食"
:widget.isTakeOut == 3 ? "打包"
:(widget.isTakeOut == 1
? S.of(context).waimai ? S.of(context).waimai
: "物流", : "物流"),
width: 46.w * AppUtils.textScale(context), width: 46.w * AppUtils.textScale(context),
height: 20.h * AppUtils.textScale(context), height: 20.h * AppUtils.textScale(context),
textColor: Color(0xFF32A060), textColor: Color(0xFF32A060),

6
lib/retrofit/data/delivery_info.dart

@ -7,8 +7,9 @@ class DeliveryInfo {
bool dianwodaStatus; bool dianwodaStatus;
bool meituanRegStatus; bool meituanRegStatus;
bool meituanStatus; bool meituanStatus;
bool dineInTakeStatus;
DeliveryInfo({this.dadaRegStatus, this.dadaSourceId, this.dadaStatus, this.dianwodaRegStatus, this.dianwodaStatus, this.meituanRegStatus, this.meituanStatus}); DeliveryInfo({this.dadaRegStatus, this.dadaSourceId, this.dadaStatus, this.dianwodaRegStatus, this.dianwodaStatus, this.meituanRegStatus, this.meituanStatus,this.dineInTakeStatus});
factory DeliveryInfo.fromJson(Map<String, dynamic> json) => DeliveryInfo( factory DeliveryInfo.fromJson(Map<String, dynamic> json) => DeliveryInfo(
dadaRegStatus: json['dadaRegStatus'] as bool, dadaRegStatus: json['dadaRegStatus'] as bool,
@ -18,6 +19,8 @@ class DeliveryInfo {
dianwodaStatus: json['dianwodaStatus'] as bool, dianwodaStatus: json['dianwodaStatus'] as bool,
meituanRegStatus: json['meituanRegStatus'] as bool, meituanRegStatus: json['meituanRegStatus'] as bool,
meituanStatus: json['meituanStatus'] as bool, meituanStatus: json['meituanStatus'] as bool,
dineInTakeStatus: json['dineInTakeStatus'] as bool,
); );
Map<String, dynamic> toJson() => <String, dynamic>{ Map<String, dynamic> toJson() => <String, dynamic>{
@ -28,6 +31,7 @@ class DeliveryInfo {
'dianwodaStatus': this.dianwodaStatus, 'dianwodaStatus': this.dianwodaStatus,
'meituanRegStatus': this.meituanRegStatus, 'meituanRegStatus': this.meituanRegStatus,
'meituanStatus': this.meituanStatus, 'meituanStatus': this.meituanStatus,
'dineInTakeStatus': this.dineInTakeStatus,
}; };
} }

16
lib/setting/setting_page.dart

@ -130,6 +130,14 @@ class _SettingPage extends State<SettingPage> {
isDefaultAction: true, isDefaultAction: true,
isDestructiveAction: false, isDestructiveAction: false,
), ),
CupertinoActionSheetAction(
child: Text('英文'),
onPressed: () {
changeLanguage("en");
},
isDefaultAction: true,
isDestructiveAction: false,
),
], ],
cancelButton: CupertinoActionSheetAction( cancelButton: CupertinoActionSheetAction(
onPressed: () { onPressed: () {
@ -146,7 +154,7 @@ class _SettingPage extends State<SettingPage> {
S.of(context).yuyan, S.of(context).yuyan,
locale == "tw" locale == "tw"
? S.of(context).fantizhongwen ? S.of(context).fantizhongwen
: S.of(context).zhongwenjianti), : (locale == "en" ?S.of(context).yingwen:S.of(context).zhongwenjianti)),
), ),
GestureDetector( GestureDetector(
child: settingSingleItem(S.of(context).quanxian), child: settingSingleItem(S.of(context).quanxian),
@ -260,10 +268,14 @@ class _SettingPage extends State<SettingPage> {
S.load(Locale.fromSubtags(languageCode: 'zh', countryCode: 'CN')); S.load(Locale.fromSubtags(languageCode: 'zh', countryCode: 'CN'));
locale = "zh"; locale = "zh";
eventBus.fire(EventType(0)); eventBus.fire(EventType(0));
} else { } else if(language == "tw"){
S.load(Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW')); S.load(Locale.fromSubtags(languageCode: 'zh', countryCode: 'TW'));
locale = "tw"; locale = "tw";
eventBus.fire(EventType(1)); eventBus.fire(EventType(1));
}else {
S.load(Locale.fromSubtags(languageCode: 'en', countryCode: 'US'));
locale = "en";
eventBus.fire(EventType(2));
} }
SharedPreferences.getInstance().then((value) => { SharedPreferences.getInstance().then((value) => {
value.setString("language", language), value.setString("language", language),

143
lib/settlement/settlement.dart

@ -95,6 +95,7 @@ class _Settlement extends State<Settlement> {
String subTime; String subTime;
int storesIndex = 0; int storesIndex = 0;
String discountType; String discountType;
int diningStatus = 4;
@override @override
void initState() { void initState() {
@ -529,7 +530,7 @@ class _Settlement extends State<Settlement> {
((subscribeParam?.isEnableSubscribe ?? false) == true) ((subscribeParam?.isEnableSubscribe ?? false) == true)
? true ? true
: false; // : false; //
placeOrderFirst.isTakeOut = selectedBtn; placeOrderFirst.isTakeOut = ((storeInfo?.deliveryInfo?.dineInTakeStatus ?? false) == true) ? diningStatus : selectedBtn;
placeOrderFirst.notes = remakers + placeOrderFirst.notes = remakers +
(reservationTime ?? "") + (reservationTime ?? "") +
((subscribeParam?.isEnableSubscribe ?? false) == true ((subscribeParam?.isEnableSubscribe ?? false) == true
@ -828,12 +829,15 @@ class _Settlement extends State<Settlement> {
address, address,
selectedAddress, selectedAddress,
pageType, pageType,
widget.arguments["distance"]), widget.arguments["distance"],),
SizedBox( SizedBox(
height: 16, height: 16,
), ),
if((storeInfo?.deliveryInfo?.dineInTakeStatus?? false) ==true && settleOrderInfo !=null)
takeStatus(),
/// ///
// EditPhoneWidget( // EditPhoneWidget(
// storeInfo, // storeInfo,
@ -1000,6 +1004,141 @@ class _Settlement extends State<Settlement> {
); );
} }
////
Widget takeStatus(){
return Container(
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0D000000),
offset: Offset(0, 1),
blurRadius: 8,
spreadRadius: 0,
),
],
borderRadius: BorderRadius.circular(8),
),
margin: EdgeInsets.only(left: 16.w, right: 16.w,top:6.h,bottom:6.h),
padding: EdgeInsets.symmetric(horizontal: 12.w,vertical:10.h),
child:
Row(children: [
Expanded(child:GestureDetector(
onTap: (){
setState((){
diningStatus = 4;
});
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
border: Border.all(
width: diningStatus == 4? 2.w:1.w,
color: diningStatus == 4? Color(0xFF32A060):Color(0xFFDEDEDE),
style: BorderStyle.solid,
),
color: diningStatus == 4?Color(0xFFEEFFF5):Color(0xFFFFFFFF),
),
padding: EdgeInsets.only(top:11.h,bottom: 14.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/home_he.webp",
fit: BoxFit.fill,
width: 21.w,
height: 31.h,
),
SizedBox(width:10.w,),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"堂食",
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 6.h,),
Text(
"店内用餐",
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
),
),
],
)
],
),
),
)),
SizedBox(width: 12.w,),
Expanded(child: GestureDetector(
onTap: (){
setState((){
diningStatus = 3;
});
},
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6)),
border: Border.all(
width: diningStatus == 3? 2.w : 1.w,
color: diningStatus == 3?Color(0xFF32A060):Color(0xFFDEDEDE),
style: BorderStyle.solid,
),
color: diningStatus == 3 ?Color(0xFFEEFFF5):Color(0xFFFFFFFF),
),
padding: EdgeInsets.only(top:11.h,bottom: 14.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
"assets/image/dining_w.webp",
fit: BoxFit.fill,
width: 24.w,
height: 26.h,
),
SizedBox(width:9.w,),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"外带",
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 6.h,),
Text(
"打包到店取",
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
),
),
],
)
],
),
),
)),
],),
);
}
payChannelCheck(int payChannel) { payChannelCheck(int payChannel) {
this.payChannel = payChannel; this.payChannel = payChannel;
if (tableId > 0) { if (tableId > 0) {

10
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -87,12 +87,12 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
// height: 122.h / (!widget.placeOrder ? 2 : 1), // height: 122.h / (!widget.placeOrder ? 2 : 1),
margin: EdgeInsets.only(left: 16, right: 16, top: 15, bottom: 14), margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 14.h, bottom: 14.h),
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 16, left: 16.w,
right: 16, right: 16.w,
top: 14, top: 14.h,
bottom: 14, bottom: 14.h,
), ),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,

7
lib/settlement/settlement_view/distribution.dart

@ -83,9 +83,9 @@ class _DistributionMode extends State<DistributionMode> {
return Container( return Container(
height: 165.h, height: 165.h,
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 16, left: 16.w,
right: 16, right: 16.w,
top: 10, top: 10.h,
), ),
child: Stack( child: Stack(
children: [ children: [
@ -112,7 +112,6 @@ class _DistributionMode extends State<DistributionMode> {
Column( Column(
children: [ children: [
Container( Container(
// height: 50.h,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,

2
lib/settlement/settlement_view/pay_method.dart

@ -57,7 +57,7 @@ class _PayMethod extends State<PayMethod> {
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 16.w, left: 16.w,
right: 16.w, right: 16.w,
top: 12.h, top: 8.h,
bottom: 16.h, bottom: 16.h,
), ),
padding: EdgeInsets.only( padding: EdgeInsets.only(

4
lib/utils/status_utils.dart

@ -8,7 +8,7 @@ class StatusUtils {
static String statusText( static String statusText(
context, refundStatus, orderStatus, payStatus, sendStatus, isTakeOut) { context, refundStatus, orderStatus, payStatus, sendStatus, isTakeOut) {
String statusText = ""; String statusText = "";
if (isTakeOut == 0) { if (isTakeOut == 0 || isTakeOut == 3 || isTakeOut == 4) {
if (payStatus == 0 && orderStatus != -1) { if (payStatus == 0 && orderStatus != -1) {
statusText = S.of(context).daizhifu; statusText = S.of(context).daizhifu;
} else { } else {
@ -169,7 +169,7 @@ class StatusUtils {
]; ];
} else { } else {
if (orderStatus < 4) { if (orderStatus < 4) {
if (isTakeOut == 0) { if (isTakeOut == 0 || isTakeOut == 3 || isTakeOut == 4) {
return [ return [
Expanded( Expanded(
flex: 1, flex: 1,

Loading…
Cancel
Save