Browse Source

火锅更改

zyh
w-R 3 years ago
parent
commit
f03e0d1309
  1. 2
      lib/mine/mine_shop_details.dart
  2. 3
      lib/order/order_view/order_address.dart
  3. 4
      lib/setting/account_security_page.dart
  4. 5
      lib/setting/platform_code_page.dart
  5. 27
      lib/settlement/settlement.dart
  6. 3
      lib/settlement/settlement_view/settlement_order_commodity.dart
  7. 17
      lib/store/store_order.dart
  8. 2
      pubspec.yaml

2
lib/mine/mine_shop_details.dart

@ -150,7 +150,7 @@ class _MineShopDetails extends State<MineShopDetails> {
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title: "会员卡详情",
title: S.of(context).huiyuankaxiangqing,
titleColor: Colors.black,
background: Colors.white,
brightness: Brightness.dark,

3
lib/order/order_view/order_address.dart

@ -62,6 +62,7 @@ class _OrderAddress extends State<OrderAddress> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if(widget?.orderInfo?.addressExt != null)
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
@ -105,6 +106,7 @@ class _OrderAddress extends State<OrderAddress> {
),
],
),
if(widget?.orderInfo?.addressExt != null)
Container(
margin: EdgeInsets.only(left: 26.w),
child: Text(
@ -120,6 +122,7 @@ class _OrderAddress extends State<OrderAddress> {
),
),
),
if(widget?.orderInfo?.addressExt != null)
Visibility(
visible: widget.orderStatus < 5 && widget.refundStatus == 0,
child: Container(

4
lib/setting/account_security_page.dart

@ -39,6 +39,7 @@ class _AccountSecurityPage extends State<AccountSecurityPage> {
});
if (baseDate != null && baseDate.isSuccess) {
userInfo = baseDate.data;
setState(() {});
SharedPreferences.getInstance().then(
(value) => {
value.setString('user', jsonEncode(baseDate.data)),
@ -105,8 +106,9 @@ class _AccountSecurityPage extends State<AccountSecurityPage> {
),
flex: 1,
),
if(userInfo?.hasPayPassword != null)
Text(
"修改",
(userInfo?.hasPayPassword ?? true)? "修改" :"设置",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,

5
lib/setting/platform_code_page.dart

@ -62,7 +62,9 @@ class _PlatformCodePage extends State<PlatformCodePage> {
"smsCode": code,
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
codeType=4;
setState(() {
codeType=4;
});
SmartDialog.showToast(baseData.data, alignment: Alignment.center);
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
@ -230,6 +232,7 @@ class _PlatformCodePage extends State<PlatformCodePage> {
color: Color(0xFF353535),
),
radius: Radius.circular(4.r)),
keyboardType: TextInputType.text,
),
),
GestureDetector(

27
lib/settlement/settlement.dart

@ -1,3 +1,4 @@
import 'dart:convert';
import 'dart:io';
import 'package:dio/dio.dart';
@ -213,17 +214,16 @@ class _Settlement extends State<Settlement> {
///
queryOrderDetails(id) async {
print("ididididididid: $id");
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({
"id":pageType != null ? widget.arguments["orderId"] : parentId,
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
minOrderInfo = baseData.data;
});
} else {
SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center);
}
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({
"id": pageType != null ? widget.arguments["orderId"] : id??parentId,
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
minOrderInfo = baseData.data;
});
} else {
SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center);
}
}
queryAddress(int selectedBtn) async {
@ -452,6 +452,7 @@ class _Settlement extends State<Settlement> {
if (placeOrder) {
//
querySettlement();
return;
} else {
if (parentId == "") {
//
@ -473,8 +474,8 @@ class _Settlement extends State<Settlement> {
if (baseData != null && baseData.isSuccess) {
placeOrder = true;
this.downOrder = DownOrder.fromJson(baseData.data);
queryOrderDetails(
(parentId == null || parentId == "") ? baseData.data.id : parentId);
parentId = this.downOrder.id??this.downOrder.parentId;
queryOrderDetails(parentId);
setState(() {});
} else {
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center);

3
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -5,6 +5,7 @@ import 'package:huixiang/retrofit/data/activity_details.dart';
import 'package:huixiang/retrofit/data/min_order_info.dart';
import 'package:huixiang/retrofit/data/order_product_vo.dart';
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/separator.dart';
@ -397,7 +398,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
String discountPrice(){
if(widget.minOrderInfo != null){
return (widget.minOrderInfo.discountAmount ?? "0") + (widget.settleOrderInfo.benefitDiscountAmount ?? "0");
return AppUtils.calculateDouble(double.tryParse(widget.minOrderInfo?.discountAmount ?? "0") + double.tryParse(widget.settleOrderInfo?.benefitDiscountAmount ?? "0"));
}else if(widget.tableId < 0){
return "0";
}else {

17
lib/store/store_order.dart

@ -207,7 +207,17 @@ class _StoreOrderPage extends State<StoreOrderPage>
@override
Widget build(BuildContext context) {
return Container(
return WillPopScope(
onWillPop: () async {
if (dialogShowing) {
debugPrint("ssssasdadsasdadasd");
SmartDialog.dismiss();
return false;
} else {
return true;
}
},
child:Container(
color: Colors.white,
child: Stack(
children: [
@ -423,7 +433,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
],
controller: tabcontroller,
),
), /*SmartRefresher(
),
/*SmartRefresher(
controller: refreshController =
RefreshController(initialRefresh: false),
enablePullDown: true,
@ -534,7 +545,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
),
),
],
));
)));
}
///

2
pubspec.yaml

@ -3,7 +3,7 @@ description: 一心回乡.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 2.0.22+11
version: 2.0.24+12
environment:
sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save