diff --git a/assets/image/2x/bus_give_yue.webp b/assets/image/2x/bus_give_yue.webp new file mode 100644 index 00000000..56a98604 Binary files /dev/null and b/assets/image/2x/bus_give_yue.webp differ diff --git a/assets/image/2x/bus_real_recharge.webp b/assets/image/2x/bus_real_recharge.webp new file mode 100644 index 00000000..4b5f3b9e Binary files /dev/null and b/assets/image/2x/bus_real_recharge.webp differ diff --git a/assets/image/2x/bus_yue.webp b/assets/image/2x/bus_yue.webp new file mode 100644 index 00000000..5480b211 Binary files /dev/null and b/assets/image/2x/bus_yue.webp differ diff --git a/assets/image/3x/bus_give_yue.webp b/assets/image/3x/bus_give_yue.webp new file mode 100644 index 00000000..6b247923 Binary files /dev/null and b/assets/image/3x/bus_give_yue.webp differ diff --git a/assets/image/3x/bus_real_recharge.webp b/assets/image/3x/bus_real_recharge.webp new file mode 100644 index 00000000..cf83299e Binary files /dev/null and b/assets/image/3x/bus_real_recharge.webp differ diff --git a/assets/image/3x/bus_yue.webp b/assets/image/3x/bus_yue.webp new file mode 100644 index 00000000..0a945366 Binary files /dev/null and b/assets/image/3x/bus_yue.webp differ diff --git a/assets/image/bus_give_yue.webp b/assets/image/bus_give_yue.webp new file mode 100644 index 00000000..404bd718 Binary files /dev/null and b/assets/image/bus_give_yue.webp differ diff --git a/assets/image/bus_real_recharge.webp b/assets/image/bus_real_recharge.webp new file mode 100644 index 00000000..2ec20886 Binary files /dev/null and b/assets/image/bus_real_recharge.webp differ diff --git a/assets/image/bus_yue.webp b/assets/image/bus_yue.webp new file mode 100644 index 00000000..e39126e6 Binary files /dev/null and b/assets/image/bus_yue.webp differ diff --git a/lib/business_system/order/order_list.dart b/lib/business_system/order/order_list.dart index f8c4543a..3c47d1f1 100644 --- a/lib/business_system/order/order_list.dart +++ b/lib/business_system/order/order_list.dart @@ -14,6 +14,7 @@ import '../../generated/l10n.dart'; import '../../retrofit/business_api.dart'; import '../../retrofit/data/base_data.dart'; import '../../retrofit/data/business_order_list.dart'; +import '../../retrofit/data/order_user_detail.dart'; import '../../utils/business_instance.dart'; import '../../utils/flutter_utils.dart'; import '../../view_widget/border_text.dart'; @@ -47,6 +48,7 @@ class _OrderList extends State { int _pageIndex = 1; String networkError = ""; int networkStatus = 0; + OrderUserDetail orderUserDetail; @override void dispose() { @@ -153,7 +155,8 @@ class _OrderList extends State { BaseData baseData = await businessService.balancePay({ "orderId": orderId, "payMoney": payMoney, - "payChannel": 1 + "payChannel": 1, + "sid":orderUserDetail?.id ?? "", }).catchError((error) {}); if (baseData != null && baseData.isSuccess) { await queryOrderList(queryId: orderCode); @@ -173,6 +176,28 @@ class _OrderList extends State { } } + ///查询订单列表用户金额详情 + queryOrderUserDetail(String orderId) async { + try { + EasyLoading.show( + status: S.current.zhengzaijiazai, + maskType: EasyLoadingMaskType.black); + if (businessService == null) { + businessService = BusinessApiService(Dio(), + context: context, + token: BusinessInstance.instance.businessToken, + tenant: BusinessInstance.instance.businessTenant, + storeId: widget.storeId); + } + BaseData baseData = await businessService.getOrderUserDetail(orderId).catchError((error) {}); + if (baseData != null && baseData.isSuccess) { + orderUserDetail = baseData.data; + } + } finally { + EasyLoading.dismiss(); + } + } + @override Widget build(BuildContext context) { return SmartRefresher( @@ -422,7 +447,8 @@ class _OrderList extends State { adminOrderDtoList.refundStatus == 0 && adminOrderDtoList.orderType == 6) GestureDetector( behavior: HitTestBehavior.opaque, - onTap: () { + onTap: () async{ + await queryOrderUserDetail(adminOrderDtoList.id); showPayDialog(adminOrderDtoList.orderCode,adminOrderDtoList.id,adminOrderDtoList.orderSum); }, child: Container( @@ -515,66 +541,161 @@ class _OrderList extends State { context: context, builder: (context) { return AlertDialog( + contentPadding:EdgeInsets.all(0), content: Container( width: MediaQuery.of(context).size.width - 84, - height: 120.h, + padding: EdgeInsets.only(top: 24.h), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, + mainAxisSize: MainAxisSize.min, children: [ - Text( - " 确定对该订单进行扣款吗?", + Padding(padding: EdgeInsets.only(bottom: 31.h),child:Text( + "确定对该订单进行扣款吗?", style: TextStyle( - color: Color(0xFFF4524D), - fontSize: 16.sp, - fontWeight: MyFontWeight.regular, + color: Color(0xFF0D0D0D), + fontSize: 18.sp, + fontWeight: MyFontWeight.bold, ), - ), - SizedBox( - height: 35.h, - ), - Row( + )), + Padding(padding:EdgeInsets.only(bottom: 18.h), + child: Row( children: [ - Expanded( - child: InkWell( - child: BorderText( - text: S.of(context).quxiao, - textColor: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, - borderColor: Color(0xFF30415B), - radius: 4, - padding: EdgeInsets.all(12), - borderWidth: 1, + Expanded(child:Column( + children: [ + Image.asset( + "assets/image/bus_yue.webp", + width: 40.h, + height: 40.h, ), - onTap: () { - Navigator.of(context).pop(); - }, + Padding(padding:EdgeInsets.symmetric(vertical:8.h), + child: Text( + "余额", + style: TextStyle( + color: Color(0xFF252626), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + )), + Text( + orderUserDetail?.balance ?? "", + style: TextStyle( + color: Color(0xFF252626), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + ) + ], + )), + Container( + height:46.h, + width: 1.w, + color: Color(0xFFD8D8D8), + ),Expanded(child:Column( + children: [ + Image.asset( + "assets/image/bus_real_recharge.webp", + width: 40.h, + height: 40.h, + ), + Padding(padding:EdgeInsets.symmetric(vertical:8.h), + child: Text( + "实储余额", + style: TextStyle( + color: Color(0xFF252626), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + )), + Text( + orderUserDetail?.realRecharge ?? "", + style: TextStyle( + color: Color(0xFF252626), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + ) + ], + )), + Container( + height:46.h, + width: 1.w, + color: Color(0xFFD8D8D8), + ),Expanded(child:Column( + children: [ + Image.asset( + "assets/image/bus_give_yue.webp", + width: 40.h, + height: 40.h, + ), + Padding(padding:EdgeInsets.symmetric(vertical:8.h), + child: Text( + "赠送余额", + style: TextStyle( + color: Color(0xFF252626), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + )), + Text( + "${AppUtils.calculateDouble(double.tryParse(orderUserDetail?.balance ?? "0") - double.tryParse(orderUserDetail?.realRecharge ?? "0"))}", + style: TextStyle( + color: Color(0xFF252626), + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + ), + ) + ], + )), + ], + ),), + Container( + width:double.infinity, + height: 1.h, + color: Color(0xFFD8D8D8),), + Container( + height: 55.h, + child: Row( + children: [ + Expanded( + child: InkWell( + child: BorderText( + text: S.of(context).quxiao, + textColor: Colors.black, + fontSize: 16.sp, + fontWeight: FontWeight.bold, + padding: EdgeInsets.all(14), + ), + onTap: () { + Navigator.of(context).pop(); + }, + ), + flex: 1, ), - flex: 1, - ), - SizedBox( - width: 16.w, - ), - Expanded( - child: InkWell( - child: RoundButton( - text: S.of(context).queren, - textColor: Colors.white, - radius: 4, - padding: EdgeInsets.all(12), - backgroup: Color(0xFF30415B), - fontSize: 16.sp, - fontWeight: FontWeight.bold, + Container( + width: 1.w, + height:double.infinity, + color: Color(0xFFD8D8D8), + ), + Expanded( + child: InkWell( + child: RoundButton( + text: S.of(context).queren, + textColor: Color(0xFF30415B), + radius: 4, + padding: EdgeInsets.all(14), + fontSize: 16.sp, + fontWeight: FontWeight.bold, + ), + onTap: () { + Navigator.of(context).pop(); + orderBalancePay(orderCode,orderId,payMoney); + }, ), - onTap: () { - Navigator.of(context).pop(); - orderBalancePay(orderCode,orderId,payMoney); - }, + flex: 1, ), - flex: 1, - ), - ], + ], + ), ) ], ), diff --git a/lib/retrofit/business_api.dart b/lib/retrofit/business_api.dart index 5d7a6743..0a9142b2 100644 --- a/lib/retrofit/business_api.dart +++ b/lib/retrofit/business_api.dart @@ -21,6 +21,7 @@ import 'data/business_store_list.dart'; import 'data/business_vip_list.dart'; import 'data/day_flow_list.dart'; import 'data/goods_type_sales_list.dart'; +import 'data/order_user_detail.dart'; import 'data/popular_sales_list.dart'; import 'data/product_group_list.dart'; import 'data/recharge_flow_list.dart'; @@ -301,4 +302,8 @@ abstract class BusinessApiService { ///确认扣款 @POST("order/balancePay") Future balancePay(@Body() Map param); + + ///订单列表获取用户金额详情 + @GET("order/getOrderUserDetail?orderId={orderId}") + Future> getOrderUserDetail(@Path("orderId") String storeId); } diff --git a/lib/retrofit/business_api.g.dart b/lib/retrofit/business_api.g.dart index 2cfd16fe..c4f22f15 100644 --- a/lib/retrofit/business_api.g.dart +++ b/lib/retrofit/business_api.g.dart @@ -829,4 +829,26 @@ class _BusinessApiService implements BusinessApiService { return value; } + @override + Future> getOrderUserDetail(orderId) async { + ArgumentError.checkNotNull(orderId, 'orderId'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + final _result = await _dio.request>( + 'order/getOrderUserDetail?orderId=$orderId', + queryParameters: queryParameters, + options: RequestOptions( + method: 'GET', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson( + _result.data, + (json) => OrderUserDetail.fromJson(json), + ); + return value; + } + } diff --git a/lib/retrofit/data/order_user_detail.dart b/lib/retrofit/data/order_user_detail.dart new file mode 100644 index 00000000..5b9008c4 --- /dev/null +++ b/lib/retrofit/data/order_user_detail.dart @@ -0,0 +1,303 @@ +/// id : "1732280985187254272" +/// createTime : "2023-12-06 14:09:06" +/// createUser : "0" +/// updateTime : "2023-12-06 14:09:06" +/// updateUser : "0" +/// mid : "1331427732277428224" +/// masterId : "0" +/// openid : "" +/// aliOpenid : null +/// douyinOpenid : null +/// nickname : "" +/// headimg : "" +/// rankId : "0" +/// rankExpireTime : null +/// balance : "0.00" +/// realRecharge : "0.00" +/// sex : "0" +/// status : true +/// onCredit : false +/// loginTime : "2023-12-12 10:20:11" +/// loginNum : 13 +/// tenantCode : "1196" +/// source : 1 +/// expendAmount : "45.00" +/// buyTimes : 1 +/// lastBuyTime : "2023-12-06 18:07:40" +/// vip_no : null +/// expireTime : "2033-12-12 10:20:11" +/// integral : 0 +/// level : 1 +/// vipRegStore : null +/// certification : false + +class OrderUserDetail { + OrderUserDetail({ + String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String mid, + String masterId, + String openid, + dynamic aliOpenid, + dynamic douyinOpenid, + String nickname, + String headimg, + String rankId, + dynamic rankExpireTime, + String balance, + String realRecharge, + String sex, + bool status, + bool onCredit, + String loginTime, + num loginNum, + String tenantCode, + num source, + String expendAmount, + num buyTimes, + String lastBuyTime, + dynamic vipNo, + String expireTime, + num integral, + num level, + dynamic vipRegStore, + bool certification,}){ + _id = id; + _createTime = createTime; + _createUser = createUser; + _updateTime = updateTime; + _updateUser = updateUser; + _mid = mid; + _masterId = masterId; + _openid = openid; + _aliOpenid = aliOpenid; + _douyinOpenid = douyinOpenid; + _nickname = nickname; + _headimg = headimg; + _rankId = rankId; + _rankExpireTime = rankExpireTime; + _balance = balance; + _realRecharge = realRecharge; + _sex = sex; + _status = status; + _onCredit = onCredit; + _loginTime = loginTime; + _loginNum = loginNum; + _tenantCode = tenantCode; + _source = source; + _expendAmount = expendAmount; + _buyTimes = buyTimes; + _lastBuyTime = lastBuyTime; + _vipNo = vipNo; + _expireTime = expireTime; + _integral = integral; + _level = level; + _vipRegStore = vipRegStore; + _certification = certification; +} + + OrderUserDetail.fromJson(dynamic json) { + _id = json['id']; + _createTime = json['createTime']; + _createUser = json['createUser']; + _updateTime = json['updateTime']; + _updateUser = json['updateUser']; + _mid = json['mid']; + _masterId = json['masterId']; + _openid = json['openid']; + _aliOpenid = json['aliOpenid']; + _douyinOpenid = json['douyinOpenid']; + _nickname = json['nickname']; + _headimg = json['headimg']; + _rankId = json['rankId']; + _rankExpireTime = json['rankExpireTime']; + _balance = json['balance']; + _realRecharge = json['realRecharge']; + _sex = json['sex']; + _status = json['status']; + _onCredit = json['onCredit']; + _loginTime = json['loginTime']; + _loginNum = json['loginNum']; + _tenantCode = json['tenantCode']; + _source = json['source']; + _expendAmount = json['expendAmount']; + _buyTimes = json['buyTimes']; + _lastBuyTime = json['lastBuyTime']; + _vipNo = json['vip_no']; + _expireTime = json['expireTime']; + _integral = json['integral']; + _level = json['level']; + _vipRegStore = json['vipRegStore']; + _certification = json['certification']; + } + String _id; + String _createTime; + String _createUser; + String _updateTime; + String _updateUser; + String _mid; + String _masterId; + String _openid; + dynamic _aliOpenid; + dynamic _douyinOpenid; + String _nickname; + String _headimg; + String _rankId; + dynamic _rankExpireTime; + String _balance; + String _realRecharge; + String _sex; + bool _status; + bool _onCredit; + String _loginTime; + num _loginNum; + String _tenantCode; + num _source; + String _expendAmount; + num _buyTimes; + String _lastBuyTime; + dynamic _vipNo; + String _expireTime; + num _integral; + num _level; + dynamic _vipRegStore; + bool _certification; +OrderUserDetail copyWith({ String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String mid, + String masterId, + String openid, + dynamic aliOpenid, + dynamic douyinOpenid, + String nickname, + String headimg, + String rankId, + dynamic rankExpireTime, + String balance, + String realRecharge, + String sex, + bool status, + bool onCredit, + String loginTime, + num loginNum, + String tenantCode, + num source, + String expendAmount, + num buyTimes, + String lastBuyTime, + dynamic vipNo, + String expireTime, + num integral, + num level, + dynamic vipRegStore, + bool certification, +}) => OrderUserDetail( id: id ?? _id, + createTime: createTime ?? _createTime, + createUser: createUser ?? _createUser, + updateTime: updateTime ?? _updateTime, + updateUser: updateUser ?? _updateUser, + mid: mid ?? _mid, + masterId: masterId ?? _masterId, + openid: openid ?? _openid, + aliOpenid: aliOpenid ?? _aliOpenid, + douyinOpenid: douyinOpenid ?? _douyinOpenid, + nickname: nickname ?? _nickname, + headimg: headimg ?? _headimg, + rankId: rankId ?? _rankId, + rankExpireTime: rankExpireTime ?? _rankExpireTime, + balance: balance ?? _balance, + realRecharge: realRecharge ?? _realRecharge, + sex: sex ?? _sex, + status: status ?? _status, + onCredit: onCredit ?? _onCredit, + loginTime: loginTime ?? _loginTime, + loginNum: loginNum ?? _loginNum, + tenantCode: tenantCode ?? _tenantCode, + source: source ?? _source, + expendAmount: expendAmount ?? _expendAmount, + buyTimes: buyTimes ?? _buyTimes, + lastBuyTime: lastBuyTime ?? _lastBuyTime, + vipNo: vipNo ?? _vipNo, + expireTime: expireTime ?? _expireTime, + integral: integral ?? _integral, + level: level ?? _level, + vipRegStore: vipRegStore ?? _vipRegStore, + certification: certification ?? _certification, +); + String get id => _id; + String get createTime => _createTime; + String get createUser => _createUser; + String get updateTime => _updateTime; + String get updateUser => _updateUser; + String get mid => _mid; + String get masterId => _masterId; + String get openid => _openid; + dynamic get aliOpenid => _aliOpenid; + dynamic get douyinOpenid => _douyinOpenid; + String get nickname => _nickname; + String get headimg => _headimg; + String get rankId => _rankId; + dynamic get rankExpireTime => _rankExpireTime; + String get balance => _balance; + String get realRecharge => _realRecharge; + String get sex => _sex; + bool get status => _status; + bool get onCredit => _onCredit; + String get loginTime => _loginTime; + num get loginNum => _loginNum; + String get tenantCode => _tenantCode; + num get source => _source; + String get expendAmount => _expendAmount; + num get buyTimes => _buyTimes; + String get lastBuyTime => _lastBuyTime; + dynamic get vipNo => _vipNo; + String get expireTime => _expireTime; + num get integral => _integral; + num get level => _level; + dynamic get vipRegStore => _vipRegStore; + bool get certification => _certification; + + Map toJson() { + final map = {}; + map['id'] = _id; + map['createTime'] = _createTime; + map['createUser'] = _createUser; + map['updateTime'] = _updateTime; + map['updateUser'] = _updateUser; + map['mid'] = _mid; + map['masterId'] = _masterId; + map['openid'] = _openid; + map['aliOpenid'] = _aliOpenid; + map['douyinOpenid'] = _douyinOpenid; + map['nickname'] = _nickname; + map['headimg'] = _headimg; + map['rankId'] = _rankId; + map['rankExpireTime'] = _rankExpireTime; + map['balance'] = _balance; + map['realRecharge'] = _realRecharge; + map['sex'] = _sex; + map['status'] = _status; + map['onCredit'] = _onCredit; + map['loginTime'] = _loginTime; + map['loginNum'] = _loginNum; + map['tenantCode'] = _tenantCode; + map['source'] = _source; + map['expendAmount'] = _expendAmount; + map['buyTimes'] = _buyTimes; + map['lastBuyTime'] = _lastBuyTime; + map['vip_no'] = _vipNo; + map['expireTime'] = _expireTime; + map['integral'] = _integral; + map['level'] = _level; + map['vipRegStore'] = _vipRegStore; + map['certification'] = _certification; + return map; + } + +} \ No newline at end of file