Browse Source

新增会员页面数据接口对接调试完成;

会员充值页面数据bug更改;
我的页面新增门店二维码,店员管理板块;
新增image_gallery_saver依赖用于保存二维码,IOS info文件需增加获取相册权限;
邀请好友ui适配更改;
新增充值支付成功页面;
新增收银页面(待绘制);
新增消费排名/会员余额统计页面,接口数据已对接(该页面金额,会员余额统计查询板块为完善,待接口更改;)
新增门店二维码页面(缺接口,保存二维码图片有bug待更改;)
新增店员管理页面,接口数据流程已对接;
新增店员新增/编辑页面,接口数据已对接;
在售商品接口优化;
扫一扫页面新增充值扫码付功能;
新增会员充值页面,接口数据流程已对接;
app福利中心页面,领取优惠券提示更改;

新增根据手机号查询会员信息,会员充值列表,会员充值支付,充值订单查询,新增会员,店员列表,添加新店员,店员信息编辑,删除会员,修改用户信息,会员余额统计/消费排名接口;
wr_2023_new_business
wurong 1 year ago
parent
commit
4723c789fa
  1. BIN
      assets/image/2x/bs_mine_clerk.webp
  2. BIN
      assets/image/2x/bs_mine_code.webp
  3. BIN
      assets/image/2x/bs_secure.webp
  4. BIN
      assets/image/2x/bs_shop_logo.webp
  5. BIN
      assets/image/2x/bus_code_save.webp
  6. BIN
      assets/image/2x/bus_home_bhy.webp
  7. BIN
      assets/image/2x/bus_home_cz.webp
  8. BIN
      assets/image/2x/bus_home_czjl.webp
  9. BIN
      assets/image/2x/bus_home_goods.webp
  10. BIN
      assets/image/2x/bus_home_goods_ssfx.webp
  11. BIN
      assets/image/2x/bus_home_hygl.webp
  12. BIN
      assets/image/2x/bus_home_hyyetj.webp
  13. BIN
      assets/image/2x/bus_home_jrls.webp
  14. BIN
      assets/image/2x/bus_home_rxbd.webp
  15. BIN
      assets/image/2x/bus_home_syt.webp
  16. BIN
      assets/image/2x/bus_home_syzl.webp
  17. BIN
      assets/image/2x/bus_home_xfjl.webp
  18. BIN
      assets/image/2x/bus_home_xfpm.webp
  19. BIN
      assets/image/2x/bus_home_yytj.webp
  20. BIN
      assets/image/2x/bus_pay_success_logo.png
  21. BIN
      assets/image/3x/bs_mine_clerk.webp
  22. BIN
      assets/image/3x/bs_mine_code.webp
  23. BIN
      assets/image/3x/bs_secure.webp
  24. BIN
      assets/image/3x/bs_shop_logo.webp
  25. BIN
      assets/image/3x/bs_store_info_logo.webp
  26. BIN
      assets/image/3x/bus_code_save.webp
  27. BIN
      assets/image/3x/bus_home_bhy.webp
  28. BIN
      assets/image/3x/bus_home_cz.webp
  29. BIN
      assets/image/3x/bus_home_czjl.webp
  30. BIN
      assets/image/3x/bus_home_goods.webp
  31. BIN
      assets/image/3x/bus_home_goods_ssfx.webp
  32. BIN
      assets/image/3x/bus_home_hygl.webp
  33. BIN
      assets/image/3x/bus_home_hyyetj.webp
  34. BIN
      assets/image/3x/bus_home_jrls.webp
  35. BIN
      assets/image/3x/bus_home_rxbd.webp
  36. BIN
      assets/image/3x/bus_home_syt.webp
  37. BIN
      assets/image/3x/bus_home_syzl.webp
  38. BIN
      assets/image/3x/bus_home_xfjl.webp
  39. BIN
      assets/image/3x/bus_home_xfpm.webp
  40. BIN
      assets/image/3x/bus_home_yytj.webp
  41. BIN
      assets/image/3x/bus_pay_success_logo.png
  42. BIN
      assets/image/bs_mine_clerk.webp
  43. BIN
      assets/image/bs_mine_code.webp
  44. BIN
      assets/image/bs_secure.webp
  45. BIN
      assets/image/bs_shop_logo.webp
  46. BIN
      assets/image/bus_code_save.webp
  47. BIN
      assets/image/bus_home_bhy.webp
  48. BIN
      assets/image/bus_home_cz.webp
  49. BIN
      assets/image/bus_home_czjl.webp
  50. BIN
      assets/image/bus_home_goods.webp
  51. BIN
      assets/image/bus_home_goods_ssfx.webp
  52. BIN
      assets/image/bus_home_hygl.webp
  53. BIN
      assets/image/bus_home_hyyetj.webp
  54. BIN
      assets/image/bus_home_jrls.webp
  55. BIN
      assets/image/bus_home_rxbd.webp
  56. BIN
      assets/image/bus_home_syt.webp
  57. BIN
      assets/image/bus_home_syzl.webp
  58. BIN
      assets/image/bus_home_xfjl.webp
  59. BIN
      assets/image/bus_home_xfpm.webp
  60. BIN
      assets/image/bus_home_yytj.webp
  61. BIN
      assets/image/bus_pay_success_logo.png
  62. 2
      ios/Runner/Info.plist
  63. 2
      lib/business_system/goods/off_shelf/off_shelf_page.dart
  64. 60
      lib/business_system/home/cashier/cashier_page.dart
  65. 579
      lib/business_system/home/consumer_ranking_page.dart
  66. 104
      lib/business_system/home/vip/add_vip.dart
  67. 2
      lib/business_system/home/vip/bus_vip_list.dart
  68. 180
      lib/business_system/home/vip/pay_success_page.dart
  69. 1521
      lib/business_system/home/vip/vip_recharge_page.dart
  70. 65
      lib/business_system/mine/business_mine_page.dart
  71. 546
      lib/business_system/mine/clerk_manage/add_new_clerk_page.dart
  72. 512
      lib/business_system/mine/clerk_manage/clerk_manage_page.dart
  73. 208
      lib/business_system/mine/shop_reservation_code.dart
  74. 46
      lib/business_system/scan_code_page.dart
  75. 9
      lib/home/welfare_page.dart
  76. 18
      lib/main.dart
  77. 89
      lib/qr/invite_friends.dart
  78. 49
      lib/retrofit/business_api.dart
  79. 225
      lib/retrofit/business_api.g.dart
  80. 303
      lib/retrofit/data/add_vip_info.dart
  81. 187
      lib/retrofit/data/balance_consumption_ranking_list.dart
  82. 304
      lib/retrofit/data/bus_recharge_list.dart
  83. 511
      lib/retrofit/data/clerk_manage_list.dart
  84. 132
      lib/retrofit/data/phone_query_member_info.dart
  85. 267
      lib/retrofit/data/user_info_edit.dart
  86. 30
      pubspec.lock
  87. 4
      pubspec.yaml

BIN
assets/image/2x/bs_mine_clerk.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

BIN
assets/image/bs_store_info_logo.webp → assets/image/2x/bs_mine_code.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 572 B

BIN
assets/image/2x/bs_secure.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 922 B

After

Width:  |  Height:  |  Size: 858 B

BIN
assets/image/2x/bs_shop_logo.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 740 B

After

Width:  |  Height:  |  Size: 692 B

BIN
assets/image/2x/bus_code_save.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

BIN
assets/image/2x/bus_home_bhy.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/2x/bus_home_cz.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

BIN
assets/image/2x/bus_home_czjl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

BIN
assets/image/2x/bus_home_goods.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/2x/bus_home_goods_ssfx.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/bus_home_hygl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
assets/image/2x/bus_home_hyyetj.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/2x/bus_home_jrls.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/2x/bus_home_rxbd.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/2x/bus_home_syt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/image/2x/bus_home_syzl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/bus_home_xfjl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

BIN
assets/image/2x/bus_home_xfpm.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/2x/bus_home_yytj.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/bus_pay_success_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
assets/image/3x/bs_mine_clerk.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/bs_store_info_logo.webp → assets/image/3x/bs_mine_code.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 B

After

Width:  |  Height:  |  Size: 590 B

BIN
assets/image/3x/bs_secure.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/3x/bs_shop_logo.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 818 B

BIN
assets/image/3x/bs_store_info_logo.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 896 B

BIN
assets/image/3x/bus_code_save.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1012 B

BIN
assets/image/3x/bus_home_bhy.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/image/3x/bus_home_cz.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/3x/bus_home_czjl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

BIN
assets/image/3x/bus_home_goods.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
assets/image/3x/bus_home_goods_ssfx.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
assets/image/3x/bus_home_hygl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
assets/image/3x/bus_home_hyyetj.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
assets/image/3x/bus_home_jrls.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
assets/image/3x/bus_home_rxbd.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
assets/image/3x/bus_home_syt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
assets/image/3x/bus_home_syzl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/image/3x/bus_home_xfjl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/image/3x/bus_home_xfpm.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/image/3x/bus_home_yytj.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
assets/image/3x/bus_pay_success_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
assets/image/bs_mine_clerk.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

BIN
assets/image/bs_mine_code.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

BIN
assets/image/bs_secure.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 688 B

BIN
assets/image/bs_shop_logo.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 590 B

BIN
assets/image/bus_code_save.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

BIN
assets/image/bus_home_bhy.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

BIN
assets/image/bus_home_cz.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 B

BIN
assets/image/bus_home_czjl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

BIN
assets/image/bus_home_goods.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

BIN
assets/image/bus_home_goods_ssfx.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 B

BIN
assets/image/bus_home_hygl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

BIN
assets/image/bus_home_hyyetj.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

BIN
assets/image/bus_home_jrls.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

BIN
assets/image/bus_home_rxbd.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 B

BIN
assets/image/bus_home_syt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

BIN
assets/image/bus_home_syzl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

BIN
assets/image/bus_home_xfjl.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

BIN
assets/image/bus_home_xfpm.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

BIN
assets/image/bus_home_yytj.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

BIN
assets/image/bus_pay_success_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

2
ios/Runner/Info.plist

@ -140,6 +140,8 @@
<string>打开相册</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>是否允许语音识别</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>请允许App保存图片到相册</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>

2
lib/business_system/goods/off_shelf/off_shelf_page.dart

@ -130,6 +130,7 @@ class _OffShelfPage extends State<OffShelfPage> {
checkStatus = false;
SmartDialog.showToast("商品上架成功", alignment: Alignment.center);
} else {
EasyLoading.dismiss();
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
@ -155,6 +156,7 @@ class _OffShelfPage extends State<OffShelfPage> {
EasyLoading.dismiss();
SmartDialog.showToast("商品删除成功", alignment: Alignment.center);
} else {
EasyLoading.dismiss();
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}

60
lib/business_system/home/cashier/cashier_page.dart

@ -0,0 +1,60 @@
import 'package:flutter/material.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:intl/intl.dart';
class CashierPage extends StatefulWidget {
final Map<String, dynamic> arguments;
CashierPage({this.arguments});
@override
State<StatefulWidget> createState() {
return _CashierPage();
}
}
class _CashierPage extends State<CashierPage> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title: "收银",
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
brightness: Brightness.dark,
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: double.infinity,
margin: EdgeInsets.only(top:8.h, left: 16.w, right: 16.w),
padding: EdgeInsets.only(top:19.h,bottom: 36.h),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(8),
),
)
],
),
);
}
}

579
lib/business_system/home/consumer_ranking_page.dart

@ -0,0 +1,579 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:intl/intl.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shimmer/shimmer.dart';
import '../../generated/l10n.dart';
import '../../retrofit/business_api.dart';
import '../../retrofit/data/balance_consumption_ranking_list.dart';
import '../../retrofit/data/base_data.dart';
import '../../utils/business_instance.dart';
import '../../utils/flutter_utils.dart';
import '../../view_widget/classic_header.dart';
import '../../view_widget/my_footer.dart';
import '../../view_widget/no_data_view.dart';
class ConsumerRankingPage extends StatefulWidget {
final Map<String, dynamic> arguments;
ConsumerRankingPage({this.arguments});
@override
State<StatefulWidget> createState() {
return _ConsumerRankingPage();
}
}
class _ConsumerRankingPage extends State<ConsumerRankingPage> {
String titleName;
String selectTimeDate = "";
String selectTimeDateNum =
"${DateFormat("yyyy-MM-dd HH:mm:ss").format(DateTime.now().subtract(Duration(days: 2)))}"
"${DateFormat("yyyy-MM-dd HH:mm:ss").format(DateTime.now())}";
final TextEditingController editingController = TextEditingController();
FocusNode _focusNode = FocusNode();
bool isKeyBoardShow = false;
final RefreshController refreshController = RefreshController();
BusinessApiService businessService;
String networkError = "";
int networkStatus = 0;
List<Records> records = [];
int _pageNum = 1;
String total = "0";
@override
void initState() {
super.initState();
titleName = widget?.arguments["titleName"] ?? "";
_onRefresh();
}
///
@override
void dispose() {
super.dispose();
refreshController.dispose();
_focusNode.unfocus();
}
_onRefresh({bool isShowLoad = true}) async {
if (isShowLoad)
EasyLoading.show(
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
await queryStoreMoney();
EasyLoading.dismiss();
if (refreshController.isRefresh) refreshController.refreshCompleted();
if (mounted) setState(() {});
}
////
queryStoreMoney({nickName,isShow = true}) async {
try {
if (businessService == null) {
businessService = BusinessApiService(Dio(),
context: context,
token: BusinessInstance.instance.businessToken,
tenant: BusinessInstance.instance.businessTenant,
storeId: widget.arguments["storeId"]);
}
BaseData<BalanceConsumptionRankingList> baseData = await businessService.storeMoney({
"startTime": titleName == "消费排名" ? selectTimeDateNum.substring(0,19):"",
"endTime": titleName == "消费排名" ? selectTimeDateNum.substring(24,43):"",
"nickName": titleName == "消费排名" ? "" : nickName,
"type":titleName == "消费排名" ? 1:0,
"pageNum": _pageNum,
"pageSize": 10,
}).catchError((error) {
networkError = AppUtils.dioErrorTypeToString(error.type);
networkStatus = -1;
setState(() {});
refreshController.refreshFailed();
refreshController.loadFailed();
});
if (!mounted) return;
if (baseData != null && baseData.isSuccess) {
records.addAll(baseData?.data?.records ?? []);
total = baseData?.data?.total ?? "0";
if ((baseData?.data?.records ?? []).isEmpty ||
records.length.toString() == baseData.data.pages)
refreshController.loadNoData();
else
refreshController.loadComplete();
networkStatus = 1;
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
} finally {
if (isShow) setState(() {});
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title: titleName,
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
brightness: Brightness.dark,
),
body: networkStatus == -1
? noNetwork()
: Container(
child: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: records.length == 0 ? false : true,
header: MyHeader(
color: Color(0xFF30415B),
),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
_pageNum = 1;
records.clear();
_onRefresh(isShowLoad: false);
},
onLoading: () {
_pageNum++;
_onRefresh(isShowLoad: false);
},
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: Column(
children: [
Container(
width: double.infinity,
padding: EdgeInsets.only(bottom: 16.h),
decoration: BoxDecoration(
color: Colors.white,
),
child: Column(
children: [
titleName == "消费排名"
? timeSelect()
: vipBalanceStatisticsSearch(),
titleName == "消费排名"
? Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Column(
children: [
Padding(
padding: EdgeInsets.only(bottom: 15.h),
child: Text(
"消费会员数量",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF0D0D0D),
),
),
),
Text(
total,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF0D0D0D),
),
),
],
)),
Expanded(
child: Column(
children: [
Padding(
padding: EdgeInsets.only(bottom: 15.h),
child: Text(
"销售金额",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF0D0D0D),
),
),
),
Text(
"12334.00",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF0D0D0D),
),
),
],
)),
],
)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Column(
children: [
Padding(
padding: EdgeInsets.only(bottom: 15.h),
child: Text(
"总会员数",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF0D0D0D),
),
),
),
Text(
total,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF0D0D0D),
),
),
],
)),
Expanded(
child: Column(
children: [
Padding(
padding: EdgeInsets.only(bottom: 15.h),
child: Text(
"总余额数",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF0D0D0D),
),
),
),
Text(
"12334.00",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF0D0D0D),
),
),
],
)),
],
)
],
),
),
Expanded(child: networkStatus == 0
? Container(
margin: EdgeInsets.only(bottom: 35.h,top:6.h),
child: ListView.builder(
itemCount: 10,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {},
child: consumerRankingItemSm(),
);
},
))
: ((records == null || records.length == 0)
? NoDataView(
src: "assets/image/bs_no data_logo.webp",
isShowBtn: false,
text: "暂无商品分类",
fontSize: 16.sp,
margin: EdgeInsets.all(20.h),
)
: Container(
margin: EdgeInsets.only(bottom: 35.h,top:6.h),
child: ListView.builder(
itemCount: records?.length ?? 0,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {},
child: consumerRankingItem(
records[position]),
);
},
),
)),)
],
),
),
),
);
}
///
Widget timeSelect() {
return Container(
color: Colors.white,
child: GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/custom_page',
arguments: {"beyondDateRange": "0"}).then((value) {
selectTimeDate = value;
setState((){});
});
},
child: Container(
decoration: BoxDecoration(
color: Color(0xFFF7F8FA),
borderRadius: BorderRadius.circular(2),
),
margin:
EdgeInsets.only(left: 18.w, right: 18.w, top: 11.h, bottom: 17.h),
padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 12.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
(selectTimeDate == "" || selectTimeDate == null)
? "${selectTimeDateNum.substring(0,16)}${selectTimeDateNum.substring(24,40)}"
: "${selectTimeDate.replaceAll("", "-").replaceAll("", "-").replaceAll("", "").substring(0,16)}"
" ${selectTimeDate.replaceAll("", "-").replaceAll("", "-").replaceAll("", "").substring(22,38)} ",
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF30415B),
fontWeight: MyFontWeight.regular),
),
],
),
),
),
);
}
///
Widget vipBalanceStatisticsSearch() {
return Container(
color: Colors.white,
child: Container(
height: 40.h,
margin:
EdgeInsets.only(left: 18.w, right: 18.w, top: 12.h, bottom: 12.h),
decoration: BoxDecoration(
color: Color(0xFFF7F8FA),
borderRadius: BorderRadius.circular(2),
),
child: TextField(
focusNode: _focusNode,
textInputAction: TextInputAction.search,
onEditingComplete: () {
FocusScope.of(context).requestFocus(FocusNode());
queryStoreMoney(nickName: editingController?.text ?? "");
},
style: TextStyle(
fontSize: 15.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF808080),
),
controller: editingController,
decoration: InputDecoration(
hintText: "会员手机号或姓名",
hintStyle: TextStyle(
color: Color(0xFF808080),
fontSize: 15.sp,
fontWeight: MyFontWeight.regular),
contentPadding: EdgeInsets.symmetric(
vertical: 12.h,
),
prefixIcon: Image.asset(
"assets/image/bs_goods_search.webp",
width: 20,
height: 20,
),
border: InputBorder.none,
),
),
),
);
}
///list
Widget consumerRankingItem(Records records) {
return Container(
padding: EdgeInsets.only(top: 12.h, bottom: 12.h, left: 16.w),
margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(8),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(bottom: 16.h),
child: Text(
"${records?.name ?? ""}(${records?.phone}",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF0D0D0D),
),
),
),
Text.rich(
TextSpan(
children: [
TextSpan(
text: "消费:",
style: TextStyle(
color: Color(0xFF666666),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
TextSpan(
text: "${records?.money ?? ""}",
style: TextStyle(
color: Color(0xFFFA5151),
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
),
),
],
),
),
],
),
);
}
Widget consumerRankingItemSm() {
return Container(
padding: EdgeInsets.only(top: 12.h, bottom: 12.h, left: 16.w),
margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(8),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(bottom: 16.h),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 149.w,
height: 20.h,
),
),
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right:10.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 42.w,
height: 20.h,
),
), Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 60.w,
height: 20.h,
),
),
],
)
],
),
);
}
Widget noNetwork() {
return Container(
color: Colors.white,
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
networkError.substring(0, networkError.indexOf(",")),
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF0D0D0D),
fontWeight: MyFontWeight.bold),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 10.h),
child: Text(
"请检查网络设置或稍后重试",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF7A797F),
fontWeight: MyFontWeight.regular),
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
_onRefresh();
},
child: Container(
decoration: BoxDecoration(
color: Color(0xFF30415B),
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h),
child: Text(
"重试",
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: MyFontWeight.regular),
)),
)
],
),
);
}
}

104
lib/business_system/home/vip/add_vip.dart

@ -1,10 +1,18 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../../generated/l10n.dart';
import '../../../retrofit/business_api.dart';
import '../../../retrofit/data/add_vip_info.dart';
import '../../../retrofit/data/base_data.dart';
import '../../../utils/business_instance.dart';
import '../../../utils/flutter_utils.dart';
import '../../../view_widget/settlement_tips_dialog.dart';
class AddVip extends StatefulWidget {
final Map<String, dynamic> arguments;
@ -23,6 +31,9 @@ class _AddVip extends State<AddVip> {
bool isKeyBoardShow = false;
FocusNode _focusNode = FocusNode();
BusinessApiService businessService;
AddVipInfo addVipInfo;
String networkError = "";
int networkStatus = 0;
@override
void initState() {
@ -50,6 +61,48 @@ class _AddVip extends State<AddVip> {
super.dispose();
}
///
addMember(String mobile,String nickName) 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.arguments["storeId"]);
}
BaseData<AddVipInfo> baseData = await businessService.createMemberSourceByMobile(mobile,nickName).catchError((error) {
networkError = AppUtils.dioErrorTypeToString(error.type);
networkStatus = -1;
setState(() {});});
if (baseData != null && baseData.isSuccess) {
addVipInfo = baseData.data;
Navigator.of(context).pop();
SmartDialog.show(
widget: SettlementTips(
() {},
text: "会员新增成功,请前往会员管理查询会员新增情况",
color: Color(0xFF30415B),
));
networkStatus = 1;
}else{
SmartDialog.show(
widget: SettlementTips(
() {},
text: baseData.msg,
color: Color(0xFF30415B),
));
networkStatus = 1;
}
} finally {
EasyLoading.dismiss();
setState(() {});
}
}
@override
Widget build(BuildContext context) {
return GestureDetector(
@ -67,7 +120,7 @@ class _AddVip extends State<AddVip> {
leadingColor: Colors.black,
brightness: Brightness.dark,
),
body: Container(
body:networkStatus == -1?noNetwork():Container(
margin: EdgeInsets.only(top: 24.h, left: 16.w, right: 16.w),
child: Column(
children: [
@ -194,7 +247,7 @@ class _AddVip extends State<AddVip> {
alignment: Alignment.center);
return;
} else {
print("新增成功");
addMember(vipPhoneController?.text ?? "",vipNameController?.text ?? "");
}
},
child: Container(
@ -222,4 +275,51 @@ class _AddVip extends State<AddVip> {
),
);
}
Widget noNetwork() {
return Container(
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
networkError.substring(0, networkError.indexOf(",")),
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF0D0D0D),
fontWeight: MyFontWeight.bold),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 10.h),
child: Text(
"请检查网络设置或稍后重试",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF7A797F),
fontWeight: MyFontWeight.regular),
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
addMember(vipPhoneController?.text ?? "",vipNameController?.text ?? "");
},
child: Container(
decoration: BoxDecoration(
color: Color(0xFF30415B),
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h),
child: Text(
"重试",
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: MyFontWeight.regular),
)),
)
],
),
);
}
}

2
lib/business_system/home/vip/bus_vip_list.dart

@ -196,7 +196,7 @@ class _BusVipList extends State<BusVipList> {
color: Color(0xFF30415B),
borderRadius: BorderRadius.circular(4),
),
padding: EdgeInsets.symmetric(horizontal: 14.w,vertical: 5..h),
padding: EdgeInsets.symmetric(horizontal: 14.w,vertical: 5.h),
margin: EdgeInsets.only(right: 8.w),
child:Text(
"会员充值",

180
lib/business_system/home/vip/pay_success_page.dart

@ -0,0 +1,180 @@
import 'package:flutter/material.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:intl/intl.dart';
class PaySuccessPage extends StatefulWidget {
final Map<String, dynamic> arguments;
PaySuccessPage({this.arguments});
@override
State<StatefulWidget> createState() {
return _PaySuccessPage();
}
}
class _PaySuccessPage extends State<PaySuccessPage> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title: "收银成功",
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
brightness: Brightness.dark,
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: double.infinity,
margin: EdgeInsets.only(top:8.h, left: 16.w, right: 16.w),
padding: EdgeInsets.only(top:19.h,bottom: 36.h),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(8),
),
child: Column(
children: [
Image.asset(
"assets/image/bus_pay_success_logo.png",
width: 76.h,
height: 76.h,
),
Padding(padding: EdgeInsets.only(top:16.h,),
child:Text(
"收银成功",
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 18.sp,
fontWeight: MyFontWeight.bold,
),
)),
Container(
width: double.infinity,
margin: EdgeInsets.only(left:17.w,right: 16.w,top:11.h,bottom:17.h),
child: Flex(
children: List.generate(70, (_) {
return SizedBox(
width: 2.w,
height: 1.h,
child: DecoratedBox(
decoration:
BoxDecoration(color: Color(0xFFEBECEF)),
),
);
}),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
direction: Axis.horizontal,
),
),
Padding(padding:EdgeInsets.only(left: 24.w,right: 24.w,bottom: 20.h),
child:Row(
children: [
Expanded(child:Text(
"订单编号",
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
)),
Text(
widget?.arguments["rechargeId"] ?? "",
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
)
],
)),
Padding(padding:EdgeInsets.only(left: 24.w,right: 24.w,bottom: 20.h),
child:Row(
children: [
Expanded(child:Text(
"支付金额",
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
)),
Text(
"${widget?.arguments["rechargeMoney"] ?? ""}",
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
)
],
)),
Padding(padding:EdgeInsets.only(left: 24.w,right: 24.w,bottom: 20.h),
child:Row(
children: [
Expanded(child:Text(
"支付时间",
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
)),
Text(
DateFormat("yyyy-MM-dd HH:mm:ss").format(DateTime.now()),
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
)
],
)),
Padding(padding:EdgeInsets.only(left: 24.w,right: 24.w),
child:Row(
children: [
Expanded(child:Text(
"支付方式",
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
)),
Text(
widget.arguments["payIndex"] == 1 ? "现金":(widget.arguments["payIndex"] == 2?"微信支付":"支付宝支付"),
style: TextStyle(
color: Color(0xFF0D0D0D),
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
)
],
)),
],
),
)
],
),
);
}
}

1521
lib/business_system/home/vip/vip_recharge_page.dart

File diff suppressed because it is too large Load Diff

65
lib/business_system/mine/business_mine_page.dart

@ -246,22 +246,6 @@ class _BusinessMinePage extends State<BusinessMinePage>
SizedBox(
height: 20.h,
),
// GestureDetector(
// behavior: HitTestBehavior.opaque,
// onTap: (){
// Navigator.of(context).pushNamed('/router/merchant_info',arguments:{
// "storeId":widget.storeId,
// });
// },
// child:
// commonFunctionsItem("assets/image/bs_store_info_logo.webp", "商户信息", widget?.businessLoginInfo?.name ?? ""),
// ),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xFFEBECEF),
margin: EdgeInsets.only(left: 32.w, bottom: 12.h),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
@ -282,7 +266,22 @@ class _BusinessMinePage extends State<BusinessMinePage>
}
},
child: commonFunctionsItem(
"assets/image/bs_shop_logo.webp", "门店设置", ""),
"assets/image/bs_shop_logo.webp", "门店设置", "",20,20),
),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xFFEBECEF),
margin: EdgeInsets.only(left: 32.w, bottom: 12.h),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed('/router/shop_reservation_code',
arguments: {"storeId": widget.storeId,});
},
child: commonFunctionsItem(
"assets/image/bs_mine_code.webp", "门店预约二维码", "",18,18),
),
Container(
width: double.infinity,
@ -300,25 +299,43 @@ class _BusinessMinePage extends State<BusinessMinePage>
});
},
child: commonFunctionsItem(
"assets/image/bs_secure.webp", "安全设置", "登录手机号/密码")),
"assets/image/bs_secure.webp", "安全设置", "登录手机号/密码",18,22)),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xFFEBECEF),
margin: EdgeInsets.only(left: 32.w, bottom: 12.h),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context)
.pushNamed('/router/clerk_manage_page', arguments: {
"storeId": widget.storeId,
});
},
child: commonFunctionsItem(
"assets/image/bs_mine_clerk.webp", "店员管理", "",18,20),
),
],
),
);
}
Widget commonFunctionsItem(icon, leftText, rightText) {
Widget commonFunctionsItem(icon, leftText, rightText,double width,double height) {
return Container(
margin: EdgeInsets.only(bottom: 14.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
icon,
width: 24,
height: 24,
width: width.w,
height: height.h,
fit: BoxFit.fill,
),
SizedBox(
width: 8.w,
width:11.w,
),
Expanded(
child: Text(
@ -326,7 +343,7 @@ class _BusinessMinePage extends State<BusinessMinePage>
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF30415B),
fontWeight: MyFontWeight.medium),
fontWeight: MyFontWeight.bold),
)),
Text(
rightText,
@ -380,7 +397,7 @@ class _BusinessMinePage extends State<BusinessMinePage>
Navigator.of(context).pushNamed('/router/user_service_page');
},
child:
commonFunctionsItem("assets/image/bs_user.webp", "关于我们", ""))
commonFunctionsItem("assets/image/bs_user.webp", "关于我们", "",24,24))
],
),
);

546
lib/business_system/mine/clerk_manage/add_new_clerk_page.dart

@ -0,0 +1,546 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import '../../../generated/l10n.dart';
import '../../../retrofit/business_api.dart';
import '../../../retrofit/data/base_data.dart';
import '../../../retrofit/data/user_info_edit.dart';
import '../../../utils/business_instance.dart';
import '../../../utils/font_weight.dart';
import '../../../view_widget/my_appbar.dart';
class AddNewClerkPage extends StatefulWidget {
final Map<String, dynamic> arguments;
AddNewClerkPage({this.arguments});
@override
State<StatefulWidget> createState() {
return _AddNewClerkPage();
}
}
class _AddNewClerkPage extends State<AddNewClerkPage> {
String titleName;
final TextEditingController editingPhoneController = TextEditingController();
final TextEditingController editingNameController = TextEditingController();
bool isKeyBoardShow = false;
FocusNode _focusNode = FocusNode();
BusinessApiService businessService;
String selectSexIndex = "N";
String clerkAccount;
String clerkName;
String clerkSex;
String sexCode;
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() {
print("object: ${MediaQuery.of(context).viewInsets.bottom}");
if (MediaQuery.of(context).viewInsets.bottom == 0) {
if (isKeyBoardShow) {
isKeyBoardShow = false;
//
FocusScope.of(context).requestFocus(FocusNode());
}
} else {
isKeyBoardShow = true;
}
});
});
titleName = widget?.arguments["titleName"] ??"";
clerkAccount = widget?.arguments["clerkAccount"] ?? "";
clerkName = widget?.arguments["clerkName"] ?? "";
clerkSex = widget?.arguments["sex"] ?? "";
sexCode = widget?.arguments["sexCode"] ?? "";
}
///
@override
void dispose() {
_focusNode.unfocus();
super.dispose();
}
////
editUser(account,name,sex) 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.arguments["storeId"]);
}
BaseData<UserInfoEdit> baseData = await businessService.userEdit({
"account":account,
"name":name,
"sex":sex,
"password": "123456",
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
Navigator.of(context).pop(1);
SmartDialog.showToast(titleName == "编辑店员资料" ? "店员资料编辑成功" : "新增店员成功",
alignment: Alignment.center);
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}}finally{
EasyLoading.dismiss();
}
}
///
modifyUser(account,name,sex) 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.arguments["storeId"]);
}
BaseData<UserInfoEdit> baseData = await businessService.userModify({
"account": account == ""?clerkAccount:account,
"name": name == "" ? clerkName :name,
"sex": sex == ""?sexCode:sex,
"password": "123456",
"id":widget?.arguments["id"]??""
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
Navigator.of(context).pop(1);
SmartDialog.showToast("修改店员信息成功",
alignment: Alignment.center);
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}}finally{
EasyLoading.dismiss();
}
}
@override
Widget build(BuildContext context) {
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).unfocus();
},
child: Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Colors.white,
appBar: MyAppBar(
title: titleName,
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
brightness: Brightness.dark,
),
body: Container(
margin: EdgeInsets.only(top: 24.h, left: 16.w, right: 16.w),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Text.rich(
TextSpan(
children: [
TextSpan(
text: "*",
style: TextStyle(
color: Color(0xFFE02020),
fontSize: 16.sp,
fontWeight: FontWeight.w500,
),
),
TextSpan(
text: "员工姓名",
style: TextStyle(
color: Color(0xFF30415B),
fontSize: 16.sp,
fontWeight: FontWeight.w500,
),
),
],
),
),
),
Expanded(
child: TextField(
controller: editingNameController,
decoration: InputDecoration(
hintText: clerkName != ""?clerkName:"请输入员工姓名",
hintTextDirection: TextDirection.rtl,
hintStyle: TextStyle(
color: Color(0xFF7A797F),
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold),
border: InputBorder.none,
contentPadding: EdgeInsets.only(left: 16.w),
),
textAlign: TextAlign.right,
style: TextStyle(
color: Color(0xFF7A797F),
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold),
),
),
],
),
Container(
height: 1.h,
width: double.infinity,
color: Color(0xFFEBEBEB),
margin: EdgeInsets.only(bottom: 16.h),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Text.rich(
TextSpan(
children: [
TextSpan(
text: "*",
style: TextStyle(
color: Color(0xFFE02020),
fontSize: 16.sp,
fontWeight: FontWeight.w500,
),
),
TextSpan(
text: "员工性别",
style: TextStyle(
color: Color(0xFF30415B),
fontSize: 16.sp,
fontWeight: FontWeight.w500,
),
),
],
),
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
showSexSelect(selectSexIndex);
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
clerkSex != "" ? clerkSex:(selectSexIndex == "" ? "请选择员工性别":(selectSexIndex == "N"?"未知":(selectSexIndex == "M" ? "":""))),
style: TextStyle(
color: Color(0xFF7A797F),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
),
Image.asset(
"assets/image/bs_right.webp",
width: 14.h,
height: 14.h,
color: Color(0xFF353535),
)
],
)
)
],
),
Container(
height: 1.h,
width: double.infinity,
color: Color(0xFFEBEBEB),
margin: EdgeInsets.only(top: 16.h),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Text.rich(
TextSpan(
children: [
TextSpan(
text: "*",
style: TextStyle(
color: Color(0xFFE02020),
fontSize: 16.sp,
fontWeight: FontWeight.w500,
),
),
TextSpan(
text: "手机号",
style: TextStyle(
color: Color(0xFF30415B),
fontSize: 16.sp,
fontWeight: FontWeight.w500,
),
),
],
),
),
),
Expanded(
child: TextField(
controller: editingPhoneController,
keyboardType: TextInputType.phone,
decoration: InputDecoration(
hintText: clerkAccount != ""?clerkAccount:"请输入手机号",
hintTextDirection: TextDirection.rtl,
hintStyle: TextStyle(
color: Color(0xFF7A797F),
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold),
border: InputBorder.none,
contentPadding: EdgeInsets.only(left: 16.w),
),
inputFormatters: [
LengthLimitingTextInputFormatter(11)
],
textAlign: TextAlign.right,
style: TextStyle(
color: Color(0xFF7A797F),
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold),
),
),
],
),
Container(
height: 1.h,
width: double.infinity,
color: Color(0xFFEBEBEB),
margin: EdgeInsets.only(bottom: 16.h),
),
Spacer(),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (editingNameController.text == "" && clerkName == "") {
SmartDialog.showToast("请输入员工姓名",
alignment: Alignment.center);
return;
} else if (selectSexIndex == "" && clerkSex == "") {
SmartDialog.showToast("请选择员工性别",
alignment: Alignment.center);
return;
} else if (editingPhoneController.text == "" && clerkAccount == "") {
SmartDialog.showToast("请输入手机号",
alignment: Alignment.center);
return;
} {
if(clerkName != "" || clerkAccount != "" || clerkSex != ""){
modifyUser(editingPhoneController.text,editingNameController.text,selectSexIndex);
}else
editUser(editingPhoneController.text,editingNameController.text,selectSexIndex);
}
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(27),
color: Color(0xFF30415B),
),
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 16.h),
margin: EdgeInsets.only(bottom: 34.h),
child: Text(
S.of(context).baocun,
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
),
),
);
}
showSexSelect(index) {
showModalBottomSheet(
context: context,
isDismissible: false,
builder: (context) {
return StatefulBuilder(builder: (
context,
state,
) {
return Container(
width: double.infinity,
height: 290.h,
padding: EdgeInsets.only(top: 12.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topRight: Radius.circular(6),
topLeft: Radius.circular(6),
)),
child: Column(
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 14.w),
child: Row(
children: [
Expanded(
child:GestureDetector(
behavior:HitTestBehavior.opaque,
onTap: (){
state((){
selectSexIndex = "";
Navigator.of(context).pop();
});
},
child: Text(
S.of(context).quxiao,
style: TextStyle(
color: Colors.black,
fontSize: 16.sp,
fontWeight: MyFontWeight.black,
),
),
)),
Expanded(child:GestureDetector(
behavior:HitTestBehavior.opaque,
onTap: (){
selectSexIndex == "N"? "未知" :(selectSexIndex == "M" ? "" : "" );
Navigator.of(context).pop();
setState((){});},
child: Container(
alignment: Alignment.centerRight,
child: Text(
S.of(context).queding,
style: TextStyle(
color: Color(0xFF30415B),
fontSize: 16.sp,
fontWeight: MyFontWeight.black,
),
),
),
))
],
),
),
Container(
margin: EdgeInsets.only(top: 12.h, bottom: 13.h),
height: 1.h,
color: Color(0xFFF2F2F2)),
GestureDetector(
behavior:HitTestBehavior.opaque,
onTap: () {
state((){
selectSexIndex = "M";
});
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
padding:
EdgeInsets.only(top:12.h, bottom:12.h, left: 12.w),
margin: EdgeInsets.symmetric(horizontal: 14.w),
decoration: BoxDecoration(
borderRadius:BorderRadius.circular(6),
border: Border.all(
color: selectSexIndex == "M" ? Color(0xFF30415B):Color(0xFFF7F7F7),
width: selectSexIndex == "M" ? 1 :0,
),
color: selectSexIndex == "M" ? Color(0xFFEFF5FF) :Color(0xFFF7F7F7),
),
child: Text(
"",
style: TextStyle(
color: selectSexIndex == "M"? Color(0xFF30415B):Color(0xFF4D4D4D),
fontSize: 18.sp,
fontWeight: MyFontWeight.regular,
),
),
),
),
SizedBox(
height: 13.h,
),
GestureDetector(
behavior:HitTestBehavior.opaque,
onTap: () {
state((){
selectSexIndex = "W";
});
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
padding:
EdgeInsets.only(top: 12.h, bottom: 12.h, left: 12.w),
margin: EdgeInsets.symmetric(horizontal: 14.w),
decoration: BoxDecoration(
borderRadius:BorderRadius.circular(6),
border: Border.all(
color: selectSexIndex == "W" ? Color(0xFF30415B):Color(0xFFF7F7F7),
width: selectSexIndex == "W" ? 1 :0,
),
color: selectSexIndex == "W" ? Color(0xFFEFF5FF) :Color(0xFFF7F7F7),
),
child: Text(
"",
style: TextStyle(
color: selectSexIndex == "W" ?Color(0xFF30415B):Color(0xFF4D4D4D),
fontSize: 18.sp,
fontWeight: MyFontWeight.regular,
),
)),
),
SizedBox(
height: 13.h,
),
GestureDetector(
behavior:HitTestBehavior.opaque,
onTap: () {
state((){
selectSexIndex = "N";
});
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
padding:
EdgeInsets.only(top: 12.h, bottom: 12.h, left: 12.w),
margin: EdgeInsets.symmetric(horizontal: 14.w),
decoration: BoxDecoration(
borderRadius:BorderRadius.circular(6),
border: Border.all(
color: selectSexIndex == "N" ? Color(0xFF30415B):Color(0xFFF7F7F7),
width: selectSexIndex == "N" ? 1 :0,
),
color: selectSexIndex == "N" ? Color(0xFFEFF5FF) :Color(0xFFF7F7F7),
),
child: Text(
"未知",
style: TextStyle(
color: selectSexIndex == "N" ?Color(0xFF30415B):Color(0xFF4D4D4D),
fontSize: 18.sp,
fontWeight: MyFontWeight.regular,
),
)),
)
],
),
);
});
},
);
}
}

512
lib/business_system/mine/clerk_manage/clerk_manage_page.dart

@ -0,0 +1,512 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shimmer/shimmer.dart';
import '../../../generated/l10n.dart';
import '../../../retrofit/business_api.dart';
import '../../../retrofit/data/base_data.dart';
import '../../../retrofit/data/clerk_manage_list.dart';
import '../../../utils/business_instance.dart';
import '../../../utils/flutter_utils.dart';
import '../../../view_widget/border_text.dart';
import '../../../view_widget/classic_header.dart';
import '../../../view_widget/my_footer.dart';
import '../../../view_widget/no_data_view.dart';
import '../../../view_widget/round_button.dart';
class ClerkManagePage extends StatefulWidget {
final Map<String, dynamic> arguments;
ClerkManagePage({this.arguments});
@override
State<StatefulWidget> createState() {
return _ClerkManagePage();
}
}
class _ClerkManagePage extends State<ClerkManagePage> {
final RefreshController refreshController = RefreshController();
BusinessApiService businessService;
String networkError = "";
int networkStatus = 0;
List<Records> records = [];
int _current = 1;
@override
void initState() {
super.initState();
_onRefresh();
}
_onRefresh({bool isShowLoad = true}) async {
if (isShowLoad)
EasyLoading.show(
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
await queryClerkList();
EasyLoading.dismiss();
if (refreshController.isRefresh) refreshController.refreshCompleted();
if (mounted) setState(() {});
}
///
queryClerkList({isShow = true}) async {
try {
if (businessService == null) {
businessService = BusinessApiService(Dio(),
context: context,
token: BusinessInstance.instance.businessToken,
tenant: BusinessInstance.instance.businessTenant,
storeId: widget.arguments["storeId"]);
}
BaseData<ClerkManageList> baseData = await businessService.clerkList({
"size": 20,
"pageSize": 20,
"current": _current,
"currentPage": 1,
"sort": "id",
"order": "descending",
}).catchError((error) {
networkError = AppUtils.dioErrorTypeToString(error.type);
networkStatus = -1;
setState(() {});
refreshController.refreshFailed();
refreshController.loadFailed();
});
if (!mounted) return;
if (baseData != null && baseData.isSuccess) {
records.addAll(baseData?.data?.records ?? []);
if ((baseData?.data?.records ?? []).isEmpty ||
records.length.toString() == baseData.data.total)
refreshController.loadNoData();
else
refreshController.loadComplete();
networkStatus = 1;
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
} finally {
if (isShow) setState(() {});
}
}
///
queryDelUser(ids) 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.arguments["storeId"]);
}
BaseData baseData =
await businessService.delUser(ids).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
await editOnRefresh();
SmartDialog.showToast("删除店员成功", alignment: Alignment.center);
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
} finally {
EasyLoading.dismiss();
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: MyAppBar(
title: "店员管理",
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
brightness: Brightness.dark,
),
body: networkStatus == -1
? noNetwork()
: Container(
margin: EdgeInsets.only(top: 24.h, left: 16.w, right: 16.w),
child: Column(
children: [
Expanded(
child: Container(
child: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: records.length == 0 ? false : true,
header: MyHeader(
color: Color(0xFF30415B),
),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
_current = 1;
records.clear();
_onRefresh(isShowLoad: false);
},
onLoading: () {
_current++;
_onRefresh(isShowLoad: false);
},
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: Container(
child: networkStatus == 0
? ListView.builder(
itemCount: 10,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {},
child: clerkManageItemSm(),
);
},
)
: ((records == null || records.length == 0)
? NoDataView(
src: "assets/image/bs_no data_logo.webp",
isShowBtn: false,
text: "暂无商品分类",
fontSize: 16.sp,
margin: EdgeInsets.all(20.h),
)
: ListView.builder(
itemCount: records?.length ?? 0,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {},
child: clerkManageItem(
records[position]),
);
},
)),
),
),
)),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed(
'/router/add_new_clerk_page',
arguments: {
"storeId": widget.arguments["storeId"],
"titleName": "添加新店员"
}).then((value) {
if (value == 1) {
_current = 1;
records.clear();
_onRefresh(isShowLoad: false);
}
});
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(27),
color: Color(0xFF30415B),
),
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 16.h),
margin: EdgeInsets.only(bottom: 34.h),
child: Text(
"添加店员",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.bold,
),
),
)),
],
),
));
}
editOnRefresh() {
_current = 1;
records.clear();
_onRefresh(isShowLoad: false);
}
///
Widget clerkManageItem(Records records) {
return Container(
child: Column(
children: [
Row(
children: [
Expanded(
child: Text(
records?.name ?? "",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
)),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context)
.pushNamed('/router/add_new_clerk_page', arguments: {
"storeId": widget.arguments["storeId"],
"titleName": "编辑店员资料",
"clerkAccount": (records?.mobile == "")
? (records?.account ?? "")
: (records?.mobile ?? ""),
"clerkName": records?.name ?? "",
"sex": records?.sex?.desc ?? "",
"sexCode": records?.sex?.code ?? "",
"id": records?.id ?? ""
}).then((value) {
if(value == 1)
editOnRefresh();
});
},
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 17.w),
child: Text(
"编辑",
style: TextStyle(
color: Color(0xFF30415B),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
),
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
showDelGroupDialog(records?.id);
},
child: Padding(
padding: EdgeInsets.only(right: 16.w, left: 17.w),
child: Text(
S.of(context).shanchu,
style: TextStyle(
color: Color(0xFFF4524D),
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
),
),
)
],
),
Container(
margin: EdgeInsets.symmetric(vertical: 16.h),
color: Color(0xFFEBEBEB),
height: 1.h,
width: double.infinity,
)
],
),
);
}
Widget clerkManageItemSm() {
return Container(
child: Column(
children: [
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 112.w,
height: 20.h,
),
),
Spacer(),
Padding(
padding: EdgeInsets.symmetric(horizontal: 17.w),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 28.w,
height: 20.h,
),
),
),
Padding(
padding: EdgeInsets.only(right: 16.w, left: 17.w),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 28.w,
height: 20.h,
),
),
),
],
),
Container(
margin: EdgeInsets.symmetric(vertical: 16.h),
color: Color(0xFFEBEBEB),
height: 1.h,
width: double.infinity,
)
],
),
);
}
///
showDelGroupDialog(id) {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
content: Container(
width: MediaQuery.of(context).size.width - 84,
height: 139.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"选中数据将被永久删除, 是否继续?",
style: TextStyle(
color: Color(0xFFF4524D),
fontSize: 16.sp,
fontWeight: MyFontWeight.regular,
),
),
SizedBox(
height: 35.h,
),
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,
),
onTap: () {
Navigator.of(context).pop();
},
),
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,
),
onTap: () {
Navigator.of(context).pop();
queryDelUser(id);
},
),
flex: 1,
),
],
)
],
),
),
);
},
);
}
Widget noNetwork() {
return Container(
color: Colors.white,
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
networkError.substring(0, networkError.indexOf(",")),
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF0D0D0D),
fontWeight: MyFontWeight.bold),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 10.h),
child: Text(
"请检查网络设置或稍后重试",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF7A797F),
fontWeight: MyFontWeight.regular),
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
_onRefresh();
},
child: Container(
decoration: BoxDecoration(
color: Color(0xFF30415B),
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h),
child: Text(
"重试",
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: MyFontWeight.regular),
)),
)
],
),
);
}
}

208
lib/business_system/mine/shop_reservation_code.dart

@ -0,0 +1,208 @@
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:image_gallery_saver/image_gallery_saver.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:qr_flutter/qr_flutter.dart';
import '../../view_widget/classic_header.dart';
import '../../view_widget/my_footer.dart';
class ShopReservationCode extends StatefulWidget {
final Map<String, dynamic> arguments;
ShopReservationCode({this.arguments});
@override
State<StatefulWidget> createState() {
return _ShopReservationCode();
}
}
class _ShopReservationCode extends State<ShopReservationCode> {
final RefreshController refreshController = RefreshController();
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title: "门店预约二维码",
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
brightness: Brightness.dark,
),
body:
// networkStatus == -1
// ? noNetwork() :
SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(
color: Color(0xFF30415B),
),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
// _onRefresh(isShowLoad: false);
},
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: Container(
padding: EdgeInsets.only(top:16.h,bottom:45.h),
child:
// ListView.builder(
// itemCount: 10,
// physics: BouncingScrollPhysics(),
// shrinkWrap: true,
// itemBuilder: (context, position) {
// return GestureDetector(
// behavior: HitTestBehavior.opaque,
// onTap: () {},
// child: assortItemSm(),
// );
// },
// )
// : ((productGroupList == null ||
// productGroupList.records.length == 0)
// ? NoDataView(
// src: "assets/image/bs_no data_logo.webp",
// isShowBtn: false,
// text: "暂无商品分类",
// fontSize: 16.sp,
// margin: EdgeInsets.all(20.h),
// ) :
ListView.builder(
itemCount:6,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {},
child: reservationCodeItem(),
);
},
)),
));
}
void saveQrImg(String qrImgData) async{
try {
EasyLoading.show(status: "正在保存...", maskType: EasyLoadingMaskType.clear);
//
if (await Permission.storage.request().isGranted) {
final painter = QrPainter(
data: qrImgData,
version: QrVersions.auto,
gapless: true,
errorCorrectionLevel: QrErrorCorrectLevel.L,
);
ByteData imageData = await painter.toImageData(600.0);
final data = imageData.buffer.asUint8List();
if (data != null) {
var result = await
ImageGallerySaver.saveImage(data,
isReturnImagePathOfIOS: true);
if (result["isSuccess"] == true) {
SmartDialog.showToast("保存成功!", alignment: Alignment.center);
} else
SmartDialog.showToast("保存失败!${result["errorMessage"] ?? ""}",
alignment: Alignment.center);
} else
SmartDialog.showToast("获取图片失败!", alignment: Alignment.center);
} else {
//
await Permission.storage.request();
SmartDialog.showToast("请在授予应用储存权限后再试!", alignment: Alignment.center);
}
} catch (e, s) {
SmartDialog.showToast("22222", alignment: Alignment.center);
SmartDialog.showToast(e.toString(), alignment: Alignment.center);
SmartDialog.showToast(s.toString(), alignment: Alignment.center);
} finally {
EasyLoading.dismiss();
}
}
Widget reservationCodeItem() {
return Container(
width: double.infinity,
margin: EdgeInsets.only(left: 16.w, right: 16.w,bottom:12.h),
padding: EdgeInsets.only(top:12.h, bottom: 12.h,left:20.w,),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(8),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
QrImage(
data: "555562332356564512",
version: QrVersions.auto,
size: 104.h,
gapless: true,
padding: EdgeInsets.all(0),
),
SizedBox(width: 10.w,),
Expanded(child:Container(
height: 104.h,
child: Column(
children: [
Expanded(child:Padding(padding: EdgeInsets.only(right: 22.w),
child: Text(
"海峡姐妹理发彭和会所",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
color: Color(0xD9000000),
fontSize: 18.sp,
fontWeight: MyFontWeight.bold,
),
),)),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
saveQrImg("555562332356564512");
},
child: Container(
padding: EdgeInsets.only(top:15.h,right: 22.w),
alignment: Alignment.bottomRight,
child: Image.asset(
"assets/image/bus_code_save.webp",
width: 20.w,
height: 18.h,
),
),
)
],
),
)),
],
),
);
}
}

46
lib/business_system/scan_code_page.dart

@ -1,6 +1,7 @@
import 'dart:ui';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:image_pickers/image_pickers.dart';
@ -9,6 +10,8 @@ import '../../retrofit/business_api.dart';
import '../../retrofit/data/base_data.dart';
import '../../retrofit/data/ticket_details.dart';
import '../../utils/business_instance.dart';
import '../generated/l10n.dart';
import '../utils/font_weight.dart';
import '../view_widget/settlement_tips_dialog.dart';
class ScanCodePage extends StatefulWidget {
@ -65,6 +68,40 @@ class _ScanCodePage extends State<ScanCodePage> {
}
}
///
rechargePay(authCode) 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.arguments["storeId"]);
}
BaseData baseData = await businessService.posMemberRecharge({
"rechargePreferentialId": widget?.arguments["rechargePreferentialId"] ?? "",
"memberSourceId": widget?.arguments["memberSourceId"] ?? "",
"source": widget?.arguments["source"] ?? 1,
"authCode": authCode ?? null
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
Navigator.of(context).pop(1);
Navigator.of(context).popAndPushNamed('/router/pay_success_page',arguments: {
"rechargeId":baseData.data,
"rechargeMoney":widget?.arguments["rechargeMoney"],
"payIndex":int.tryParse(widget?.arguments["source"]),
});
} else {
Navigator.of(context).pop([baseData.msg,baseData.data]);
}}finally{
EasyLoading.dismiss();
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
@ -79,8 +116,12 @@ class _ScanCodePage extends State<ScanCodePage> {
scanAreaScale: 0.7,
scanLineColor: Colors.green.shade400,
onCapture: (data) {
if (data != null && data != "") {
if (data != null &&
data != "" &&
widget.arguments["scanCodeType"] == null) {
queryTicketDetails(data);
} else {
rechargePay(data);
}
},
),
@ -172,8 +213,7 @@ class _ScanCodePage extends State<ScanCodePage> {
} else {
SmartDialog.show(
widget: SettlementTips(
() {
},
() {},
text: "照片中未识别到二维码/条码",
color: Color(0xFF30415B),
));

9
lib/home/welfare_page.dart

@ -26,6 +26,8 @@ import 'package:huixiang/view_widget/selector_store_dialog.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../view_widget/settlement_tips_dialog.dart';
class WelfarePage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
@ -689,7 +691,12 @@ class _WelfarePage extends State<WelfarePage> {
queryCoupon();
showAlertDialog();
} else {
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center);
SmartDialog.show(
clickBgDismissTemp: false,
widget: SettlementTips(
() {},
text: baseData.msg,
));
}
}

18
lib/main.dart

@ -96,18 +96,24 @@ import 'business_system/goods/on_sale/batch_shelf.dart';
import 'business_system/goods/on_sale/goods_assort.dart';
import 'business_system/goods/on_sale/goods_sort.dart';
import 'business_system/goods/reservation_ page.dart';
import 'business_system/home/cashier/cashier_page.dart';
import 'business_system/home/consumer_ranking_page.dart';
import 'business_system/home/flow_page.dart';
import 'business_system/home/hot _selling_page.dart';
import 'business_system/home/select_shop.dart';
import 'business_system/home/overview/trade_overview_page.dart';
import 'business_system/home/vip/add_vip.dart';
import 'business_system/home/vip/business_vip_page.dart';
import 'business_system/home/vip/pay_success_page.dart';
import 'business_system/home/vip/vip_recharge_page.dart';
import 'business_system/login/business_login_page.dart';
import 'business_system/mine/account_information.dart';
import 'business_system/mine/clerk_manage/add_new_clerk_page.dart';
import 'business_system/mine/clerk_manage/clerk_manage_page.dart';
import 'business_system/mine/merchant_info.dart';
import 'business_system/mine/security_setting.dart';
import 'business_system/mine/shop_image_info.dart';
import 'business_system/mine/shop_reservation_code.dart';
import 'business_system/order/business_order_detail.dart';
import 'business_system/order/order_write_off.dart';
import 'business_system/order/request_refund.dart';
@ -527,4 +533,16 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
HotSellingPage(arguments:arguments),
'/router/vip_recharge_page': (context, {arguments}) =>
VipRechargePage(arguments:arguments),
'/router/pay_success_page': (context, {arguments}) =>
PaySuccessPage(arguments:arguments),
'/router/cashier_page': (context, {arguments}) =>
CashierPage(arguments:arguments),
'/router/consumer_ranking_page': (context, {arguments}) =>
ConsumerRankingPage(arguments:arguments),
'/router/shop_reservation_code': (context, {arguments}) =>
ShopReservationCode(arguments:arguments),
'/router/clerk_manage_page': (context, {arguments}) =>
ClerkManagePage(arguments:arguments),
'/router/add_new_clerk_page': (context, {arguments}) =>
AddNewClerkPage(arguments:arguments),
};

89
lib/qr/invite_friends.dart

@ -293,7 +293,7 @@ class _InviteFriends extends State<InviteFriends> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
Expanded(child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
@ -301,12 +301,12 @@ class _InviteFriends extends State<InviteFriends> {
children: [
Image.asset(
"assets/image/invite_wx.webp",
width: 42,
height: 42,
width: 42.h,
height: 42.h,
fit: BoxFit.cover,
),
Container(
width: 51,
width:50.w,
child: Flex(
children: List.generate(8, (_) {
return SizedBox(
@ -330,8 +330,8 @@ class _InviteFriends extends State<InviteFriends> {
children: [
Image.asset(
"assets/image/invite_1.webp",
width: 24,
height: 24,
width: 24.h,
height: 24.h,
fit: BoxFit.cover,
),
Container(
@ -339,8 +339,8 @@ class _InviteFriends extends State<InviteFriends> {
child: Flex(
children: List.generate(0, (_) {
return SizedBox(
width: 3,
height: 1,
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration: BoxDecoration(color: Colors.white),
),
@ -371,12 +371,12 @@ class _InviteFriends extends State<InviteFriends> {
),
),
Container(
width: 43,
width: 43.w,
child: Flex(
children: List.generate(0, (_) {
return SizedBox(
width: 3,
height: 1,
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration: BoxDecoration(color: Colors.white),
),
@ -389,8 +389,8 @@ class _InviteFriends extends State<InviteFriends> {
],
),
],
),
Column(
)),
Expanded(child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
@ -398,17 +398,17 @@ class _InviteFriends extends State<InviteFriends> {
children: [
Image.asset(
"assets/image/yq_zt.webp",
width: 42,
height: 42,
width: 42.h,
height: 42.h,
fit: BoxFit.cover,
),
Container(
width: 51,
width: 50.w,
child: Flex(
children: List.generate(8, (_) {
return SizedBox(
width: 3,
height: 1,
width: 3.w,
height: 1.w,
child: DecoratedBox(
decoration:
BoxDecoration(color: Color(0xFF32A060)),
@ -427,8 +427,8 @@ class _InviteFriends extends State<InviteFriends> {
children: [
Image.asset(
"assets/image/invite_2.webp",
width: 24,
height: 24,
width: 24.h,
height: 24.h,
fit: BoxFit.cover,
),
Container(
@ -436,8 +436,8 @@ class _InviteFriends extends State<InviteFriends> {
child: Flex(
children: List.generate(0, (_) {
return SizedBox(
width: 3,
height: 1,
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration: BoxDecoration(color: Colors.white),
),
@ -472,8 +472,8 @@ class _InviteFriends extends State<InviteFriends> {
child: Flex(
children: List.generate(0, (_) {
return SizedBox(
width: 3,
height: 1,
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration: BoxDecoration(color: Colors.white),
),
@ -486,8 +486,8 @@ class _InviteFriends extends State<InviteFriends> {
],
),
],
),
Column(
)),
Expanded(child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
@ -495,17 +495,17 @@ class _InviteFriends extends State<InviteFriends> {
children: [
Image.asset(
"assets/image/zt_m.webp",
width: 42,
height: 42,
width: 42.h,
height: 42.h,
fit: BoxFit.cover,
),
Container(
width: 51,
width: 50.w,
child: Flex(
children: List.generate(8, (_) {
return SizedBox(
width: 3,
height: 1,
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration:
BoxDecoration(color: Color(0xFF32A060)),
@ -524,8 +524,8 @@ class _InviteFriends extends State<InviteFriends> {
children: [
Image.asset(
"assets/image/invite_3.webp",
width: 24,
height: 24,
width: 24.h,
height: 24.h,
fit: BoxFit.cover,
),
Container(
@ -533,8 +533,8 @@ class _InviteFriends extends State<InviteFriends> {
child: Flex(
children: List.generate(0, (_) {
return SizedBox(
width: 3,
height: 1,
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration: BoxDecoration(color: Colors.white),
),
@ -565,12 +565,12 @@ class _InviteFriends extends State<InviteFriends> {
),
),
Container(
width: 43,
width: 43.w,
child: Flex(
children: List.generate(0, (_) {
return SizedBox(
width: 3,
height: 1,
width: 3.w,
height: 1.h,
child: DecoratedBox(
decoration: BoxDecoration(color: Colors.white),
),
@ -583,19 +583,19 @@ class _InviteFriends extends State<InviteFriends> {
],
),
],
),
)),
Column(
children: [
Image.asset(
"assets/image/invite_q.webp",
width: 42,
height: 42,
width: 42.h,
height: 42.h,
fit: BoxFit.cover,
),
Image.asset(
"assets/image/invite_4.webp",
width: 24,
height: 24,
width: 24.h,
height: 24.h,
fit: BoxFit.cover,
),
SizedBox(height: 8.h),
@ -613,7 +613,8 @@ class _InviteFriends extends State<InviteFriends> {
),
)
],
),
)
,
],
),
),

49
lib/retrofit/business_api.dart

@ -12,16 +12,21 @@ import 'package:huixiang/retrofit/data/order_trend.dart';
import 'package:huixiang/retrofit/data/vip_counts_info.dart';
import 'package:retrofit/retrofit.dart';
import 'data/add_vip_info.dart';
import 'data/balance_change_list.dart';
import 'data/balance_consumption_ranking_list.dart';
import 'data/base_data.dart';
import 'data/bus_recharge_list.dart';
import 'data/business_goods.dart';
import 'data/business_order_detail_info.dart';
import 'data/business_order_list.dart';
import 'data/business_store_list.dart';
import 'data/business_vip_list.dart';
import 'data/clerk_manage_list.dart';
import 'data/day_flow_list.dart';
import 'data/goods_type_sales_list.dart';
import 'data/order_user_detail.dart';
import 'data/phone_query_member_info.dart';
import 'data/popular_sales_list.dart';
import 'data/product_group_list.dart';
import 'data/recharge_flow_list.dart';
@ -34,6 +39,7 @@ import 'data/ticket_show.dart';
import 'data/ticket_stats_list.dart';
import 'data/trade_summary_list.dart';
import 'data/upload_result.dart';
import 'data/user_info_edit.dart';
part 'business_api.g.dart';
@ -244,7 +250,7 @@ abstract class BusinessApiService {
@Path("pageIndex") String pageIndex,
@Path("pageSize") String pageSize);
///
///
@PUT("store")
Future<BaseData> saveStoreInfo(@Body() Map<String, dynamic> param);
@ -306,4 +312,45 @@ abstract class BusinessApiService {
///
@GET("order/getOrderUserDetail?orderId={orderId}")
Future<BaseData<OrderUserDetail>> getOrderUserDetail(@Path("orderId") String storeId);
///
@POST("member/queryMemberInfo")
Future<BaseData<PhoneQueryMemberInfo>> queryMemberInfo(@Body() Map<String, dynamic> param);
///
@POST("rechargePreferential/get")
Future<BaseData<BusRechargeList>> getRechargePreferential(@Body() Map<String, dynamic> param);
///
@POST("member/posMemberRecharge")
Future<BaseData> posMemberRecharge(@Body() Map<String, dynamic> param);
///
@POST("member/manualQuery")
Future<BaseData> manualQuery(@Body() Map<String, dynamic> param);
///
@GET("member/createMemberSourceByMobile?mobile={mobile}&nickName={nickName}")
Future<BaseData<AddVipInfo>> createMemberSourceByMobile(@Path("mobile") String mobile,@Path("nickName") String nickName);
///
@POST("user/userPage")
Future<BaseData<ClerkManageList>> clerkList(@Body() Map<String, dynamic> param);
///
@POST("user")
Future<BaseData<UserInfoEdit>> userEdit(@Body() Map<String, dynamic> param);
///
@DELETE("user?ids[]={ids}")
Future<BaseData> delUser(@Path("ids") String ids);
///
@PUT("user")
Future<BaseData<UserInfoEdit>> userModify(@Body() Map<String, dynamic> param);
////
@POST("dashBoard/storeMoney")
Future<BaseData<BalanceConsumptionRankingList>> storeMoney(@Body() Map<String, dynamic> param);
}

225
lib/retrofit/business_api.g.dart

@ -851,4 +851,229 @@ class _BusinessApiService implements BusinessApiService {
return value;
}
@override
Future<BaseData<PhoneQueryMemberInfo>> queryMemberInfo(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'member/queryMemberInfo',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<PhoneQueryMemberInfo>.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : PhoneQueryMemberInfo.fromJson(json),
);
return value;
}
@override
Future<BaseData<BusRechargeList>> getRechargePreferential(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'rechargePreferential/get',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<BusRechargeList>.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : BusRechargeList.fromJson(json),
);
return value;
}
@override
Future<BaseData> posMemberRecharge(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'member/posMemberRecharge',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: param);
final value = BaseData.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : json,
);
return value;
}
@override
Future<BaseData> manualQuery(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'member/manualQuery',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: param);
final value = BaseData.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : json,
);
return value;
}
@override
Future<BaseData<AddVipInfo>> createMemberSourceByMobile(mobile,nickName) async {
ArgumentError.checkNotNull(mobile, 'mobile');
ArgumentError.checkNotNull(nickName, 'nickName');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'member/createMemberSourceByMobile?mobile=$mobile&nickName=$nickName',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<AddVipInfo>.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : AddVipInfo.fromJson(json),
);
return value;
}
@override
Future<BaseData<ClerkManageList>> clerkList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'user/userPage',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<ClerkManageList>.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : ClerkManageList.fromJson(json),
);
return value;
}
@override
Future<BaseData<UserInfoEdit>> userEdit(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'user',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<UserInfoEdit>.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : UserInfoEdit.fromJson(json),
);
return value;
}
@override
Future<BaseData<dynamic>> delUser(ids) async {
ArgumentError.checkNotNull(ids, 'ids');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'user?ids[]=$ids',
queryParameters: queryParameters,
options: RequestOptions(
method: 'DELETE',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData<UserInfoEdit>> userModify(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'user',
queryParameters: queryParameters,
options: RequestOptions(
method: 'PUT',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<UserInfoEdit>.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : UserInfoEdit.fromJson(json),
);
return value;
}
@override
Future<BaseData<BalanceConsumptionRankingList>> storeMoney(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'dashBoard/storeMoney',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<BalanceConsumptionRankingList>.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : BalanceConsumptionRankingList.fromJson(json),
);
return value;
}
}

303
lib/retrofit/data/add_vip_info.dart

@ -0,0 +1,303 @@
/// id : "1737361620364951552"
/// createTime : "2023-12-20 14:37:43"
/// createUser : "1640233401329909760"
/// updateTime : "2023-12-20 14:37:43"
/// updateUser : "1640233401329909760"
/// mid : "1737361616430694400"
/// masterId : null
/// openid : ""
/// aliOpenid : null
/// douyinOpenid : null
/// nickname : null
/// headimg : null
/// rankId : null
/// rankExpireTime : null
/// balance : null
/// realRecharge : null
/// sex : null
/// status : null
/// onCredit : null
/// loginTime : "2023-12-20 14:37:43"
/// loginNum : null
/// tenantCode : null
/// source : null
/// expendAmount : null
/// buyTimes : null
/// lastBuyTime : null
/// vip_no : "001119613052919191"
/// expireTime : "2033-12-20 14:37:43"
/// integral : null
/// level : null
/// vipRegStore : null
/// certification : null
class AddVipInfo {
AddVipInfo({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String mid,
dynamic masterId,
String openid,
dynamic aliOpenid,
dynamic douyinOpenid,
dynamic nickname,
dynamic headimg,
dynamic rankId,
dynamic rankExpireTime,
dynamic balance,
dynamic realRecharge,
dynamic sex,
dynamic status,
dynamic onCredit,
String loginTime,
dynamic loginNum,
dynamic tenantCode,
dynamic source,
dynamic expendAmount,
dynamic buyTimes,
dynamic lastBuyTime,
String vipNo,
String expireTime,
dynamic integral,
dynamic level,
dynamic vipRegStore,
dynamic 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;
}
AddVipInfo.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;
dynamic _masterId;
String _openid;
dynamic _aliOpenid;
dynamic _douyinOpenid;
dynamic _nickname;
dynamic _headimg;
dynamic _rankId;
dynamic _rankExpireTime;
dynamic _balance;
dynamic _realRecharge;
dynamic _sex;
dynamic _status;
dynamic _onCredit;
String _loginTime;
dynamic _loginNum;
dynamic _tenantCode;
dynamic _source;
dynamic _expendAmount;
dynamic _buyTimes;
dynamic _lastBuyTime;
String _vipNo;
String _expireTime;
dynamic _integral;
dynamic _level;
dynamic _vipRegStore;
dynamic _certification;
AddVipInfo copyWith({ String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String mid,
dynamic masterId,
String openid,
dynamic aliOpenid,
dynamic douyinOpenid,
dynamic nickname,
dynamic headimg,
dynamic rankId,
dynamic rankExpireTime,
dynamic balance,
dynamic realRecharge,
dynamic sex,
dynamic status,
dynamic onCredit,
String loginTime,
dynamic loginNum,
dynamic tenantCode,
dynamic source,
dynamic expendAmount,
dynamic buyTimes,
dynamic lastBuyTime,
String vipNo,
String expireTime,
dynamic integral,
dynamic level,
dynamic vipRegStore,
dynamic certification,
}) => AddVipInfo( 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;
dynamic get masterId => _masterId;
String get openid => _openid;
dynamic get aliOpenid => _aliOpenid;
dynamic get douyinOpenid => _douyinOpenid;
dynamic get nickname => _nickname;
dynamic get headimg => _headimg;
dynamic get rankId => _rankId;
dynamic get rankExpireTime => _rankExpireTime;
dynamic get balance => _balance;
dynamic get realRecharge => _realRecharge;
dynamic get sex => _sex;
dynamic get status => _status;
dynamic get onCredit => _onCredit;
String get loginTime => _loginTime;
dynamic get loginNum => _loginNum;
dynamic get tenantCode => _tenantCode;
dynamic get source => _source;
dynamic get expendAmount => _expendAmount;
dynamic get buyTimes => _buyTimes;
dynamic get lastBuyTime => _lastBuyTime;
String get vipNo => _vipNo;
String get expireTime => _expireTime;
dynamic get integral => _integral;
dynamic get level => _level;
dynamic get vipRegStore => _vipRegStore;
dynamic get certification => _certification;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
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;
}
}

187
lib/retrofit/data/balance_consumption_ranking_list.dart

@ -0,0 +1,187 @@
/// records : [{"id":"1706504181134655488","name":"","phone":"13052919193","money":"4000.40"},{"id":"1699803728942465024","name":"","phone":"18638550294","money":"1502.00"},{"id":"1699032834800353280","name":"","phone":"13339999709","money":"1387.00"},{"id":"1700069353317203968","name":"","phone":"18530077112","money":"1185.00"},{"id":"1723679701001568256","name":"","phone":"13253333210","money":"1000.00"},{"id":"1700896910958657536","name":"","phone":"15093345036","money":"800.00"},{"id":"1695700464139501568","name":"","phone":"15838033785","money":"780.00"},{"id":"1697426943734972416","name":"昵称","phone":"15827991714","money":"710.11"},{"id":"1692483888078651392","name":"","phone":"15538288982","money":"647.60"},{"id":"1698868848263954432","name":"","phone":"13073719376","money":"628.10"}]
/// total : "1970"
/// size : "10"
/// current : "1"
/// orders : [{"column":"id","asc":false}]
/// hitCount : false
/// searchCount : true
/// pages : "197"
class BalanceConsumptionRankingList {
BalanceConsumptionRankingList({
List<Records> records,
String total,
String size,
String current,
List<Orders> orders,
bool hitCount,
bool searchCount,
String pages,}){
_records = records;
_total = total;
_size = size;
_current = current;
_orders = orders;
_hitCount = hitCount;
_searchCount = searchCount;
_pages = pages;
}
BalanceConsumptionRankingList.fromJson(dynamic json) {
if (json['records'] != null) {
_records = [];
json['records'].forEach((v) {
_records.add(Records.fromJson(v));
});
}
_total = json['total'];
_size = json['size'];
_current = json['current'];
if (json['orders'] != null) {
_orders = [];
json['orders'].forEach((v) {
_orders.add(Orders.fromJson(v));
});
}
_hitCount = json['hitCount'];
_searchCount = json['searchCount'];
_pages = json['pages'];
}
List<Records> _records;
String _total;
String _size;
String _current;
List<Orders> _orders;
bool _hitCount;
bool _searchCount;
String _pages;
BalanceConsumptionRankingList copyWith({ List<Records> records,
String total,
String size,
String current,
List<Orders> orders,
bool hitCount,
bool searchCount,
String pages,
}) => BalanceConsumptionRankingList( records: records ?? _records,
total: total ?? _total,
size: size ?? _size,
current: current ?? _current,
orders: orders ?? _orders,
hitCount: hitCount ?? _hitCount,
searchCount: searchCount ?? _searchCount,
pages: pages ?? _pages,
);
List<Records> get records => _records;
String get total => _total;
String get size => _size;
String get current => _current;
List<Orders> get orders => _orders;
bool get hitCount => _hitCount;
bool get searchCount => _searchCount;
String get pages => _pages;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (_records != null) {
map['records'] = _records.map((v) => v.toJson()).toList();
}
map['total'] = _total;
map['size'] = _size;
map['current'] = _current;
if (_orders != null) {
map['orders'] = _orders.map((v) => v.toJson()).toList();
}
map['hitCount'] = _hitCount;
map['searchCount'] = _searchCount;
map['pages'] = _pages;
return map;
}
}
/// column : "id"
/// asc : false
class Orders {
Orders({
String column,
bool asc,}){
_column = column;
_asc = asc;
}
Orders.fromJson(dynamic json) {
_column = json['column'];
_asc = json['asc'];
}
String _column;
bool _asc;
Orders copyWith({ String column,
bool asc,
}) => Orders( column: column ?? _column,
asc: asc ?? _asc,
);
String get column => _column;
bool get asc => _asc;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['column'] = _column;
map['asc'] = _asc;
return map;
}
}
/// id : "1706504181134655488"
/// name : ""
/// phone : "13052919193"
/// money : "4000.40"
class Records {
Records({
String id,
String name,
String phone,
String money,}){
_id = id;
_name = name;
_phone = phone;
_money = money;
}
Records.fromJson(dynamic json) {
_id = json['id'];
_name = json['name'];
_phone = json['phone'];
_money = json['money'];
}
String _id;
String _name;
String _phone;
String _money;
Records copyWith({ String id,
String name,
String phone,
String money,
}) => Records( id: id ?? _id,
name: name ?? _name,
phone: phone ?? _phone,
money: money ?? _money,
);
String get id => _id;
String get name => _name;
String get phone => _phone;
String get money => _money;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['name'] = _name;
map['phone'] = _phone;
map['money'] = _money;
return map;
}
}

304
lib/retrofit/data/bus_recharge_list.dart

@ -0,0 +1,304 @@
/// records : [{"id":"1693482520970002431","rechargeMoney":"50.00","giftdMoney":"20.00","limitNum":0,"gitfdCouponId":null,"startDate":null,"endDate":null,"startTime":null,"endTime":null,"tenantCode":"1195","createTime":"2023-10-25 17:18:40","isDeleted":0,"rechargeType":0,"remark":"充值50.00 赠送20.00","sortValue":0,"useNum":0,"mid":null}]
/// total : "0"
/// size : "999"
/// current : "1"
/// orders : [{"column":"id","asc":false}]
/// hitCount : false
/// searchCount : true
/// pages : "0"
class BusRechargeList {
BusRechargeList({
List<Records> records,
String total,
String size,
String current,
List<Orders> orders,
bool hitCount,
bool searchCount,
String pages,}){
_records = records;
_total = total;
_size = size;
_current = current;
_orders = orders;
_hitCount = hitCount;
_searchCount = searchCount;
_pages = pages;
}
BusRechargeList.fromJson(dynamic json) {
if (json['records'] != null) {
_records = [];
json['records'].forEach((v) {
_records.add(Records.fromJson(v));
});
}
_total = json['total'];
_size = json['size'];
_current = json['current'];
if (json['orders'] != null) {
_orders = [];
json['orders'].forEach((v) {
_orders.add(Orders.fromJson(v));
});
}
_hitCount = json['hitCount'];
_searchCount = json['searchCount'];
_pages = json['pages'];
}
List<Records> _records;
String _total;
String _size;
String _current;
List<Orders> _orders;
bool _hitCount;
bool _searchCount;
String _pages;
BusRechargeList copyWith({ List<Records> records,
String total,
String size,
String current,
List<Orders> orders,
bool hitCount,
bool searchCount,
String pages,
}) => BusRechargeList( records: records ?? _records,
total: total ?? _total,
size: size ?? _size,
current: current ?? _current,
orders: orders ?? _orders,
hitCount: hitCount ?? _hitCount,
searchCount: searchCount ?? _searchCount,
pages: pages ?? _pages,
);
List<Records> get records => _records;
String get total => _total;
String get size => _size;
String get current => _current;
List<Orders> get orders => _orders;
bool get hitCount => _hitCount;
bool get searchCount => _searchCount;
String get pages => _pages;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (_records != null) {
map['records'] = _records.map((v) => v.toJson()).toList();
}
map['total'] = _total;
map['size'] = _size;
map['current'] = _current;
if (_orders != null) {
map['orders'] = _orders.map((v) => v.toJson()).toList();
}
map['hitCount'] = _hitCount;
map['searchCount'] = _searchCount;
map['pages'] = _pages;
return map;
}
}
/// column : "id"
/// asc : false
class Orders {
Orders({
String column,
bool asc,}){
_column = column;
_asc = asc;
}
Orders.fromJson(dynamic json) {
_column = json['column'];
_asc = json['asc'];
}
String _column;
bool _asc;
Orders copyWith({ String column,
bool asc,
}) => Orders( column: column ?? _column,
asc: asc ?? _asc,
);
String get column => _column;
bool get asc => _asc;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['column'] = _column;
map['asc'] = _asc;
return map;
}
}
/// id : "1693482520970002431"
/// rechargeMoney : "50.00"
/// giftdMoney : "20.00"
/// limitNum : 0
/// gitfdCouponId : null
/// startDate : null
/// endDate : null
/// startTime : null
/// endTime : null
/// tenantCode : "1195"
/// createTime : "2023-10-25 17:18:40"
/// isDeleted : 0
/// rechargeType : 0
/// remark : "充值50.00 赠送20.00"
/// sortValue : 0
/// useNum : 0
/// mid : null
class Records {
Records({
String id,
String rechargeMoney,
String giftdMoney,
num limitNum,
dynamic gitfdCouponId,
dynamic startDate,
dynamic endDate,
dynamic startTime,
dynamic endTime,
String tenantCode,
String createTime,
num isDeleted,
num rechargeType,
String remark,
num sortValue,
num useNum,
dynamic mid,}){
_id = id;
_rechargeMoney = rechargeMoney;
_giftdMoney = giftdMoney;
_limitNum = limitNum;
_gitfdCouponId = gitfdCouponId;
_startDate = startDate;
_endDate = endDate;
_startTime = startTime;
_endTime = endTime;
_tenantCode = tenantCode;
_createTime = createTime;
_isDeleted = isDeleted;
_rechargeType = rechargeType;
_remark = remark;
_sortValue = sortValue;
_useNum = useNum;
_mid = mid;
}
Records.fromJson(dynamic json) {
_id = json['id'];
_rechargeMoney = json['rechargeMoney'];
_giftdMoney = json['giftdMoney'];
_limitNum = json['limitNum'];
_gitfdCouponId = json['gitfdCouponId'];
_startDate = json['startDate'];
_endDate = json['endDate'];
_startTime = json['startTime'];
_endTime = json['endTime'];
_tenantCode = json['tenantCode'];
_createTime = json['createTime'];
_isDeleted = json['isDeleted'];
_rechargeType = json['rechargeType'];
_remark = json['remark'];
_sortValue = json['sortValue'];
_useNum = json['useNum'];
_mid = json['mid'];
}
String _id;
String _rechargeMoney;
String _giftdMoney;
num _limitNum;
dynamic _gitfdCouponId;
dynamic _startDate;
dynamic _endDate;
dynamic _startTime;
dynamic _endTime;
String _tenantCode;
String _createTime;
num _isDeleted;
num _rechargeType;
String _remark;
num _sortValue;
num _useNum;
dynamic _mid;
Records copyWith({ String id,
String rechargeMoney,
String giftdMoney,
num limitNum,
dynamic gitfdCouponId,
dynamic startDate,
dynamic endDate,
dynamic startTime,
dynamic endTime,
String tenantCode,
String createTime,
num isDeleted,
num rechargeType,
String remark,
num sortValue,
num useNum,
dynamic mid,
}) => Records( id: id ?? _id,
rechargeMoney: rechargeMoney ?? _rechargeMoney,
giftdMoney: giftdMoney ?? _giftdMoney,
limitNum: limitNum ?? _limitNum,
gitfdCouponId: gitfdCouponId ?? _gitfdCouponId,
startDate: startDate ?? _startDate,
endDate: endDate ?? _endDate,
startTime: startTime ?? _startTime,
endTime: endTime ?? _endTime,
tenantCode: tenantCode ?? _tenantCode,
createTime: createTime ?? _createTime,
isDeleted: isDeleted ?? _isDeleted,
rechargeType: rechargeType ?? _rechargeType,
remark: remark ?? _remark,
sortValue: sortValue ?? _sortValue,
useNum: useNum ?? _useNum,
mid: mid ?? _mid,
);
String get id => _id;
String get rechargeMoney => _rechargeMoney;
String get giftdMoney => _giftdMoney;
num get limitNum => _limitNum;
dynamic get gitfdCouponId => _gitfdCouponId;
dynamic get startDate => _startDate;
dynamic get endDate => _endDate;
dynamic get startTime => _startTime;
dynamic get endTime => _endTime;
String get tenantCode => _tenantCode;
String get createTime => _createTime;
num get isDeleted => _isDeleted;
num get rechargeType => _rechargeType;
String get remark => _remark;
num get sortValue => _sortValue;
num get useNum => _useNum;
dynamic get mid => _mid;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['rechargeMoney'] = _rechargeMoney;
map['giftdMoney'] = _giftdMoney;
map['limitNum'] = _limitNum;
map['gitfdCouponId'] = _gitfdCouponId;
map['startDate'] = _startDate;
map['endDate'] = _endDate;
map['startTime'] = _startTime;
map['endTime'] = _endTime;
map['tenantCode'] = _tenantCode;
map['createTime'] = _createTime;
map['isDeleted'] = _isDeleted;
map['rechargeType'] = _rechargeType;
map['remark'] = _remark;
map['sortValue'] = _sortValue;
map['useNum'] = _useNum;
map['mid'] = _mid;
return map;
}
}

511
lib/retrofit/data/clerk_manage_list.dart

File diff suppressed because one or more lines are too long

132
lib/retrofit/data/phone_query_member_info.dart

@ -0,0 +1,132 @@
/// mid : "1379254113602109440"
/// sid : "1706504181134655488"
/// phoneNum : "13052919193"
/// nickName : ""
/// headimg : ""
/// sex : "0"
/// balance : "0.00"
/// memberSourceCredit : false
/// money : "1.49"
/// memberCredit : false
/// greenMoney : "0.00"
/// raiseMoney : "0.00"
/// payPassword : "222222"
class PhoneQueryMemberInfo {
PhoneQueryMemberInfo({
String mid,
String sid,
String phoneNum,
String nickName,
String headimg,
String sex,
String balance,
bool memberSourceCredit,
String money,
bool memberCredit,
String greenMoney,
String raiseMoney,
String payPassword,}){
_mid = mid;
_sid = sid;
_phoneNum = phoneNum;
_nickName = nickName;
_headimg = headimg;
_sex = sex;
_balance = balance;
_memberSourceCredit = memberSourceCredit;
_money = money;
_memberCredit = memberCredit;
_greenMoney = greenMoney;
_raiseMoney = raiseMoney;
_payPassword = payPassword;
}
PhoneQueryMemberInfo.fromJson(dynamic json) {
_mid = json['mid'];
_sid = json['sid'];
_phoneNum = json['phoneNum'];
_nickName = json['nickName'];
_headimg = json['headimg'];
_sex = json['sex'];
_balance = json['balance'];
_memberSourceCredit = json['memberSourceCredit'];
_money = json['money'];
_memberCredit = json['memberCredit'];
_greenMoney = json['greenMoney'];
_raiseMoney = json['raiseMoney'];
_payPassword = json['payPassword'];
}
String _mid;
String _sid;
String _phoneNum;
String _nickName;
String _headimg;
String _sex;
String _balance;
bool _memberSourceCredit;
String _money;
bool _memberCredit;
String _greenMoney;
String _raiseMoney;
String _payPassword;
PhoneQueryMemberInfo copyWith({ String mid,
String sid,
String phoneNum,
String nickName,
String headimg,
String sex,
String balance,
bool memberSourceCredit,
String money,
bool memberCredit,
String greenMoney,
String raiseMoney,
String payPassword,
}) => PhoneQueryMemberInfo( mid: mid ?? _mid,
sid: sid ?? _sid,
phoneNum: phoneNum ?? _phoneNum,
nickName: nickName ?? _nickName,
headimg: headimg ?? _headimg,
sex: sex ?? _sex,
balance: balance ?? _balance,
memberSourceCredit: memberSourceCredit ?? _memberSourceCredit,
money: money ?? _money,
memberCredit: memberCredit ?? _memberCredit,
greenMoney: greenMoney ?? _greenMoney,
raiseMoney: raiseMoney ?? _raiseMoney,
payPassword: payPassword ?? _payPassword,
);
String get mid => _mid;
String get sid => _sid;
String get phoneNum => _phoneNum;
String get nickName => _nickName;
String get headimg => _headimg;
String get sex => _sex;
String get balance => _balance;
bool get memberSourceCredit => _memberSourceCredit;
String get money => _money;
bool get memberCredit => _memberCredit;
String get greenMoney => _greenMoney;
String get raiseMoney => _raiseMoney;
String get payPassword => _payPassword;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['mid'] = _mid;
map['sid'] = _sid;
map['phoneNum'] = _phoneNum;
map['nickName'] = _nickName;
map['headimg'] = _headimg;
map['sex'] = _sex;
map['balance'] = _balance;
map['memberSourceCredit'] = _memberSourceCredit;
map['money'] = _money;
map['memberCredit'] = _memberCredit;
map['greenMoney'] = _greenMoney;
map['raiseMoney'] = _raiseMoney;
map['payPassword'] = _payPassword;
return map;
}
}

267
lib/retrofit/data/user_info_edit.dart

@ -0,0 +1,267 @@
/// id : "1738082396969893888"
/// createTime : "2023-12-22 14:21:50"
/// createUser : "1640233401329909760"
/// updateTime : "2023-12-22 14:21:50"
/// updateUser : "1640233401329909760"
/// account : "13052919193"
/// name : "wu"
/// org : null
/// station : null
/// type : null
/// email : null
/// mobile : null
/// sex : {"desc":"未知","code":"N"}
/// status : null
/// avatar : null
/// nation : null
/// education : null
/// positionStatus : null
/// workDescribe : null
/// passwordErrorLastTime : null
/// passwordErrorNum : 0
/// passwordExpireTime : null
/// password : "e10adc3949ba59abbe56e057f20f883e"
/// lastLoginTime : null
class UserInfoEdit {
UserInfoEdit({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String account,
String name,
dynamic org,
dynamic station,
dynamic type,
dynamic email,
dynamic mobile,
Sex sex,
dynamic status,
dynamic avatar,
dynamic nation,
dynamic education,
dynamic positionStatus,
dynamic workDescribe,
dynamic passwordErrorLastTime,
num passwordErrorNum,
dynamic passwordExpireTime,
String password,
dynamic lastLoginTime,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_account = account;
_name = name;
_org = org;
_station = station;
_type = type;
_email = email;
_mobile = mobile;
_sex = sex;
_status = status;
_avatar = avatar;
_nation = nation;
_education = education;
_positionStatus = positionStatus;
_workDescribe = workDescribe;
_passwordErrorLastTime = passwordErrorLastTime;
_passwordErrorNum = passwordErrorNum;
_passwordExpireTime = passwordExpireTime;
_password = password;
_lastLoginTime = lastLoginTime;
}
UserInfoEdit.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_account = json['account'];
_name = json['name'];
_org = json['org'];
_station = json['station'];
_type = json['type'];
_email = json['email'];
_mobile = json['mobile'];
_sex = json['sex'] != null ? Sex.fromJson(json['sex']) : null;
_status = json['status'];
_avatar = json['avatar'];
_nation = json['nation'];
_education = json['education'];
_positionStatus = json['positionStatus'];
_workDescribe = json['workDescribe'];
_passwordErrorLastTime = json['passwordErrorLastTime'];
_passwordErrorNum = json['passwordErrorNum'];
_passwordExpireTime = json['passwordExpireTime'];
_password = json['password'];
_lastLoginTime = json['lastLoginTime'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _account;
String _name;
dynamic _org;
dynamic _station;
dynamic _type;
dynamic _email;
dynamic _mobile;
Sex _sex;
dynamic _status;
dynamic _avatar;
dynamic _nation;
dynamic _education;
dynamic _positionStatus;
dynamic _workDescribe;
dynamic _passwordErrorLastTime;
num _passwordErrorNum;
dynamic _passwordExpireTime;
String _password;
dynamic _lastLoginTime;
UserInfoEdit copyWith({ String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String account,
String name,
dynamic org,
dynamic station,
dynamic type,
dynamic email,
dynamic mobile,
Sex sex,
dynamic status,
dynamic avatar,
dynamic nation,
dynamic education,
dynamic positionStatus,
dynamic workDescribe,
dynamic passwordErrorLastTime,
num passwordErrorNum,
dynamic passwordExpireTime,
String password,
dynamic lastLoginTime,
}) => UserInfoEdit( id: id ?? _id,
createTime: createTime ?? _createTime,
createUser: createUser ?? _createUser,
updateTime: updateTime ?? _updateTime,
updateUser: updateUser ?? _updateUser,
account: account ?? _account,
name: name ?? _name,
org: org ?? _org,
station: station ?? _station,
type: type ?? _type,
email: email ?? _email,
mobile: mobile ?? _mobile,
sex: sex ?? _sex,
status: status ?? _status,
avatar: avatar ?? _avatar,
nation: nation ?? _nation,
education: education ?? _education,
positionStatus: positionStatus ?? _positionStatus,
workDescribe: workDescribe ?? _workDescribe,
passwordErrorLastTime: passwordErrorLastTime ?? _passwordErrorLastTime,
passwordErrorNum: passwordErrorNum ?? _passwordErrorNum,
passwordExpireTime: passwordExpireTime ?? _passwordExpireTime,
password: password ?? _password,
lastLoginTime: lastLoginTime ?? _lastLoginTime,
);
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get account => _account;
String get name => _name;
dynamic get org => _org;
dynamic get station => _station;
dynamic get type => _type;
dynamic get email => _email;
dynamic get mobile => _mobile;
Sex get sex => _sex;
dynamic get status => _status;
dynamic get avatar => _avatar;
dynamic get nation => _nation;
dynamic get education => _education;
dynamic get positionStatus => _positionStatus;
dynamic get workDescribe => _workDescribe;
dynamic get passwordErrorLastTime => _passwordErrorLastTime;
num get passwordErrorNum => _passwordErrorNum;
dynamic get passwordExpireTime => _passwordExpireTime;
String get password => _password;
dynamic get lastLoginTime => _lastLoginTime;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['account'] = _account;
map['name'] = _name;
map['org'] = _org;
map['station'] = _station;
map['type'] = _type;
map['email'] = _email;
map['mobile'] = _mobile;
if (_sex != null) {
map['sex'] = _sex.toJson();
}
map['status'] = _status;
map['avatar'] = _avatar;
map['nation'] = _nation;
map['education'] = _education;
map['positionStatus'] = _positionStatus;
map['workDescribe'] = _workDescribe;
map['passwordErrorLastTime'] = _passwordErrorLastTime;
map['passwordErrorNum'] = _passwordErrorNum;
map['passwordExpireTime'] = _passwordExpireTime;
map['password'] = _password;
map['lastLoginTime'] = _lastLoginTime;
return map;
}
}
/// desc : "未知"
/// code : "N"
class Sex {
Sex({
String desc,
String code,}){
_desc = desc;
_code = code;
}
Sex.fromJson(dynamic json) {
_desc = json['desc'];
_code = json['code'];
}
String _desc;
String _code;
Sex copyWith({ String desc,
String code,
}) => Sex( desc: desc ?? _desc,
code: code ?? _code,
);
String get desc => _desc;
String get code => _code;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['desc'] = _desc;
map['code'] = _code;
return map;
}
}

30
pubspec.lock

@ -420,6 +420,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.4"
image_gallery_saver:
dependency: "direct main"
description:
name: image_gallery_saver
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.7.1"
image_pickers:
dependency: "direct main"
description:
@ -573,7 +580,21 @@ packages:
name: path_provider
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
version: "2.0.11"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.9"
path_provider_ios:
dependency: transitive
description:
name: path_provider_ios
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.11"
path_provider_linux:
dependency: transitive
description:
@ -581,6 +602,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.10"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.3"
path_provider_platform_interface:
dependency: transitive
description:

4
pubspec.yaml

@ -81,8 +81,9 @@ dependencies:
# qrscan: ^0.3.1
scan: ^1.5.0
path_provider: ^1.2.0
path_provider: ^2.0.4
network_to_file_image: ^4.0.1
image_gallery_saver: ^1.7.0
flutter_html: ^2.1.5 #2.1.0
chewie_audio: ^1.1.2
@ -125,7 +126,6 @@ dependencies:
syncfusion_flutter_datepicker: ^19.4.38
dev_dependencies:
flutter_test:
sdk: flutter

Loading…
Cancel
Save