Browse Source

新版首页更改;

我的页面新增门店二维码保存,店员管理功能;(门店二维码接口暂未无,该功能暂未开放)
首页商品跳转更改;
会员页面,指定tab跳转;
新增收银台页面;
收银台页面整体接口数据流程对接;
店员管理页面/会员余额统计页面接口数据流程对接;
app权限通知图片bug更改;(文件名错误)
扫一扫页面新增收银台扫码支付流程及接口对接;
总览页面,指定tab跳转更改;
vip充值页面选择充值套餐显示隐藏流程更改;
wr_2023_new_business
wurong 1 year ago
parent
commit
77eccd6f34
  1. BIN
      assets/image/2x/bs_query_logo.webp
  2. BIN
      assets/image/2x/bs_trophy_one.webp
  3. BIN
      assets/image/2x/bs_trophy_three.webp
  4. BIN
      assets/image/2x/bs_trophy_two.webp
  5. BIN
      assets/image/2x/bus_calculator_enter.webp
  6. BIN
      assets/image/2x/bus_calculator_plus.webp
  7. BIN
      assets/image/2x/bus_cashier_balance.webp
  8. BIN
      assets/image/2x/bus_cashier_pt.webp
  9. BIN
      assets/image/2x/bus_cashier_scan_code.webp
  10. BIN
      assets/image/2x/bus_cashier_xj.webp
  11. BIN
      assets/image/2x/bus_coupon.webp
  12. BIN
      assets/image/2x/bus_integral.webp
  13. BIN
      assets/image/2x/bus_vip_balance.webp
  14. BIN
      assets/image/2x/icon_new_vip.webp
  15. BIN
      assets/image/2x/icon_vip_recharge.webp
  16. BIN
      assets/image/2x/icon_vip_total.webp
  17. BIN
      assets/image/3x/bs_query_logo.webp
  18. BIN
      assets/image/3x/bs_trophy_one.webp
  19. BIN
      assets/image/3x/bs_trophy_three.webp
  20. BIN
      assets/image/3x/bs_trophy_two.webp
  21. BIN
      assets/image/3x/bus_calculator_enter.webp
  22. BIN
      assets/image/3x/bus_calculator_plus.webp
  23. BIN
      assets/image/3x/bus_cashier_balance.webp
  24. BIN
      assets/image/3x/bus_cashier_pt.webp
  25. BIN
      assets/image/3x/bus_cashier_scan_code.webp
  26. BIN
      assets/image/3x/bus_cashier_xj.webp
  27. BIN
      assets/image/3x/bus_coupon.webp
  28. BIN
      assets/image/3x/bus_integral.webp
  29. BIN
      assets/image/3x/bus_vip_balance.webp
  30. BIN
      assets/image/3x/icon_new_vip.webp
  31. BIN
      assets/image/3x/icon_vip_recharge.webp
  32. BIN
      assets/image/3x/icon_vip_total.webp
  33. BIN
      assets/image/bs_trophy_one.webp
  34. BIN
      assets/image/bs_trophy_three.webp
  35. BIN
      assets/image/bs_trophy_two.webp
  36. BIN
      assets/image/bus_calculator_enter.webp
  37. BIN
      assets/image/bus_calculator_plus.webp
  38. BIN
      assets/image/bus_cashier_balance.webp
  39. BIN
      assets/image/bus_cashier_pt.webp
  40. BIN
      assets/image/bus_cashier_scan_code.webp
  41. BIN
      assets/image/bus_cashier_xj.webp
  42. BIN
      assets/image/bus_coupon.webp
  43. BIN
      assets/image/bus_integral.webp
  44. BIN
      assets/image/bus_vip_balance.webp
  45. 4
      lib/business_system/business_page.dart
  46. 1436
      lib/business_system/home/business_home_page.dart
  47. 1289
      lib/business_system/home/cashier/cashier_page.dart
  48. 105
      lib/business_system/home/consumer_ranking_page.dart
  49. 5
      lib/business_system/home/overview/trade_overview_page.dart
  50. 2
      lib/business_system/home/vip/business_vip_page.dart
  51. 6
      lib/business_system/home/vip/vip_recharge_page.dart
  52. 5
      lib/business_system/mine/business_mine_page.dart
  53. 39
      lib/business_system/scan_code_page.dart
  54. 19
      lib/retrofit/business_api.dart
  55. 87
      lib/retrofit/business_api.g.dart
  56. 417
      lib/retrofit/data/phone_query_member_info.dart
  57. 51
      lib/retrofit/data/store_total_money_info.dart
  58. 2
      lib/setting/permission_setting_page.dart

BIN
assets/image/2x/bs_query_logo.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 922 B

BIN
assets/image/2x/bs_trophy_one.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/bs_trophy_three.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/2x/bs_trophy_two.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/image/2x/bus_calculator_enter.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/image/bs_query_logo.webp → assets/image/2x/bus_calculator_plus.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 592 B

BIN
assets/image/2x/bus_cashier_balance.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/2x/bus_cashier_pt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/bus_cashier_scan_code.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 B

BIN
assets/image/2x/bus_cashier_xj.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/image/icon_vip_recharge.webp → assets/image/2x/bus_coupon.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 780 B

After

Width:  |  Height:  |  Size: 776 B

BIN
assets/image/2x/bus_integral.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/2x/bus_vip_balance.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/icon_new_vip.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/2x/icon_vip_recharge.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/2x/icon_vip_total.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/3x/bs_query_logo.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/3x/bs_trophy_one.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
assets/image/3x/bs_trophy_three.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

BIN
assets/image/3x/bs_trophy_two.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

BIN
assets/image/3x/bus_calculator_enter.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/image/icon_new_vip.webp → assets/image/3x/bus_calculator_plus.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 B

After

Width:  |  Height:  |  Size: 670 B

BIN
assets/image/3x/bus_cashier_balance.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
assets/image/3x/bus_cashier_pt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
assets/image/3x/bus_cashier_scan_code.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/3x/bus_cashier_xj.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
assets/image/3x/bus_coupon.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/image/3x/bus_integral.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
assets/image/3x/bus_vip_balance.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
assets/image/3x/icon_new_vip.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

BIN
assets/image/3x/icon_vip_recharge.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

BIN
assets/image/3x/icon_vip_total.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

BIN
assets/image/bs_trophy_one.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 800 B

BIN
assets/image/bs_trophy_three.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 950 B

BIN
assets/image/bs_trophy_two.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 926 B

BIN
assets/image/icon_vip_total.webp → assets/image/bus_calculator_enter.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 760 B

After

Width:  |  Height:  |  Size: 710 B

BIN
assets/image/bus_calculator_plus.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

BIN
assets/image/bus_cashier_balance.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 B

BIN
assets/image/bus_cashier_pt.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

BIN
assets/image/bus_cashier_scan_code.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

BIN
assets/image/bus_cashier_xj.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

BIN
assets/image/bus_coupon.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

BIN
assets/image/bus_integral.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

BIN
assets/image/bus_vip_balance.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

4
lib/business_system/business_page.dart

@ -48,6 +48,10 @@ class _BusinessPage extends State<BusinessPage>
setState(() { setState(() {
selectStoreIndex = index; selectStoreIndex = index;
}); });
},(index){
setState((){
choiceIndex = 3;
});
}), }),
if (choiceIndex == 1) BusinessOrderPage(businessLoginInfo?.storeList[selectStoreIndex]?.id ?? "0"), if (choiceIndex == 1) BusinessOrderPage(businessLoginInfo?.storeList[selectStoreIndex]?.id ?? "0"),
// if (choiceIndex == 2) BusinessScanCode(businessLoginInfo?.storeList[selectStoreIndex]?.id ?? "0"), // if (choiceIndex == 2) BusinessScanCode(businessLoginInfo?.storeList[selectStoreIndex]?.id ?? "0"),

1436
lib/business_system/home/business_home_page.dart

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

105
lib/business_system/home/consumer_ranking_page.dart

@ -13,6 +13,7 @@ import '../../generated/l10n.dart';
import '../../retrofit/business_api.dart'; import '../../retrofit/business_api.dart';
import '../../retrofit/data/balance_consumption_ranking_list.dart'; import '../../retrofit/data/balance_consumption_ranking_list.dart';
import '../../retrofit/data/base_data.dart'; import '../../retrofit/data/base_data.dart';
import '../../retrofit/data/store_total_money_info.dart';
import '../../utils/business_instance.dart'; import '../../utils/business_instance.dart';
import '../../utils/flutter_utils.dart'; import '../../utils/flutter_utils.dart';
import '../../view_widget/classic_header.dart'; import '../../view_widget/classic_header.dart';
@ -44,12 +45,28 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
String networkError = ""; String networkError = "";
int networkStatus = 0; int networkStatus = 0;
List<Records> records = []; List<Records> records = [];
StoreTotalMoneyInfo storeTotalMoneyInfo;
int _pageNum = 1; int _pageNum = 1;
String total = "0"; String total = "0";
int _loadCount = 0;
@override @override
void initState() { void initState() {
super.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"] ?? ""; titleName = widget?.arguments["titleName"] ?? "";
_onRefresh(); _onRefresh();
} }
@ -67,15 +84,28 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
EasyLoading.show( EasyLoading.show(
status: S.current.zhengzaijiazai, status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black); maskType: EasyLoadingMaskType.black);
await queryStoreMoney(); queryStoreMoney(isRefresh:false);
EasyLoading.dismiss(); queryStoreTotalMoney();
if (refreshController.isRefresh) refreshController.refreshCompleted(); }
if (mounted) setState(() {});
addLoadCount() {
_loadCount += 1;
if (_loadCount == 2) {
_loadCount = 0;
EasyLoading.dismiss();
if (refreshController.isRefresh) refreshController.refreshCompleted();
if (mounted) setState(() {});
}
} }
//// ////
queryStoreMoney({nickName,isShow = true}) async { queryStoreMoney({keyword,isRefresh = true}) async {
try { try {
if (isRefresh)
EasyLoading.show(
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
if (businessService == null) { if (businessService == null) {
businessService = BusinessApiService(Dio(), businessService = BusinessApiService(Dio(),
context: context, context: context,
@ -84,9 +114,9 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
storeId: widget.arguments["storeId"]); storeId: widget.arguments["storeId"]);
} }
BaseData<BalanceConsumptionRankingList> baseData = await businessService.storeMoney({ BaseData<BalanceConsumptionRankingList> baseData = await businessService.storeMoney({
"startTime": titleName == "消费排名" ? selectTimeDateNum.substring(0,19):"", "startTime": titleName == "消费排名" ? (selectTimeDate != ""?selectTimeDate.replaceAll("", "-").replaceAll("", "-").replaceAll("", "").substring(0,19):selectTimeDateNum.substring(0,19)):"",
"endTime": titleName == "消费排名" ? selectTimeDateNum.substring(24,43):"", "endTime": titleName == "消费排名" ? (selectTimeDate!=""?selectTimeDate.replaceAll("", "-").replaceAll("", "-").replaceAll("", "").substring(22,41):selectTimeDateNum.substring(24,43)):"",
"nickName": titleName == "消费排名" ? "" : nickName, "keyword": titleName == "消费排名" ? "" : (keyword ?? ""),
"type":titleName == "消费排名" ? 1:0, "type":titleName == "消费排名" ? 1:0,
"pageNum": _pageNum, "pageNum": _pageNum,
"pageSize": 10, "pageSize": 10,
@ -100,24 +130,56 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
if (!mounted) return; if (!mounted) return;
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
records.addAll(baseData?.data?.records ?? []); records.addAll(baseData?.data?.records ?? []);
total = baseData?.data?.total ?? "0";
if ((baseData?.data?.records ?? []).isEmpty || if ((baseData?.data?.records ?? []).isEmpty ||
records.length.toString() == baseData.data.pages) records.length.toString() == baseData.data.pages)
refreshController.loadNoData(); refreshController.loadNoData();
else else
refreshController.loadComplete(); refreshController.loadComplete();
networkStatus = 1; networkStatus = 1;
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} finally { } finally {
if (isShow) setState(() {}); if(isRefresh){
setState(() {});
EasyLoading.dismiss();
}else
addLoadCount();
}
}
////
queryStoreTotalMoney({keyword}) async {
try {
if (businessService == null) {
businessService = BusinessApiService(Dio(),
context: context,
token: BusinessInstance.instance.businessToken,
tenant: BusinessInstance.instance.businessTenant,
storeId: widget.arguments["storeId"]);
}
BaseData<StoreTotalMoneyInfo> baseData = await businessService.storeTotalMoney({
"startTime": titleName == "消费排名" ? selectTimeDateNum.substring(0,19):"",
"endTime": titleName == "消费排名" ? selectTimeDateNum.substring(24,43):"",
}).catchError((error) {
networkError = AppUtils.dioErrorTypeToString(error.type);
networkStatus = -1;
setState(() {});
refreshController.refreshFailed();
refreshController.loadFailed();
});
if (!mounted) return;
if (baseData != null && baseData.isSuccess) {
storeTotalMoneyInfo = baseData.data;
networkStatus = 1;
}
} finally {
addLoadCount();
} }
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false,
appBar: MyAppBar( appBar: MyAppBar(
title: titleName, title: titleName,
titleColor: Colors.black, titleColor: Colors.black,
@ -147,7 +209,7 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
}, },
onLoading: () { onLoading: () {
_pageNum++; _pageNum++;
_onRefresh(isShowLoad: false); queryStoreMoney();
}, },
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
scrollController: ScrollController(), scrollController: ScrollController(),
@ -183,7 +245,7 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
), ),
), ),
Text( Text(
total, (storeTotalMoneyInfo?.paySumCount ?? 0).toString(),
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.bold, fontWeight: MyFontWeight.bold,
@ -207,7 +269,7 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
), ),
), ),
Text( Text(
"12334.00", storeTotalMoneyInfo?.storeTotalMoney ?? "0",
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.bold, fontWeight: MyFontWeight.bold,
@ -236,7 +298,7 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
), ),
), ),
Text( Text(
total, (storeTotalMoneyInfo?.memberCount ?? 0).toString(),
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.bold, fontWeight: MyFontWeight.bold,
@ -260,7 +322,7 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
), ),
), ),
Text( Text(
"12334.00", storeTotalMoneyInfo?.memberTotalBalance ?? "0",
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.bold, fontWeight: MyFontWeight.bold,
@ -293,7 +355,7 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
? NoDataView( ? NoDataView(
src: "assets/image/bs_no data_logo.webp", src: "assets/image/bs_no data_logo.webp",
isShowBtn: false, isShowBtn: false,
text: "暂无商品分类", text: "暂无相关数据",
fontSize: 16.sp, fontSize: 16.sp,
margin: EdgeInsets.all(20.h), margin: EdgeInsets.all(20.h),
) )
@ -329,7 +391,7 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
Navigator.of(context).pushNamed('/router/custom_page', Navigator.of(context).pushNamed('/router/custom_page',
arguments: {"beyondDateRange": "0"}).then((value) { arguments: {"beyondDateRange": "0"}).then((value) {
selectTimeDate = value; selectTimeDate = value;
setState((){}); queryStoreMoney();
}); });
}, },
child: Container( child: Container(
@ -377,7 +439,8 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
textInputAction: TextInputAction.search, textInputAction: TextInputAction.search,
onEditingComplete: () { onEditingComplete: () {
FocusScope.of(context).requestFocus(FocusNode()); FocusScope.of(context).requestFocus(FocusNode());
queryStoreMoney(nickName: editingController?.text ?? ""); records.clear();
queryStoreMoney(keyword: editingController?.text ?? "");
}, },
style: TextStyle( style: TextStyle(
fontSize: 15.sp, fontSize: 15.sp,
@ -429,7 +492,7 @@ class _ConsumerRankingPage extends State<ConsumerRankingPage> {
Padding( Padding(
padding: EdgeInsets.only(bottom: 16.h), padding: EdgeInsets.only(bottom: 16.h),
child: Text( child: Text(
"${records?.name ?? ""}(${records?.phone}", "${records?.name ?? ""}(${records?.phone})",
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.bold, fontWeight: MyFontWeight.bold,

5
lib/business_system/home/overview/trade_overview_page.dart

@ -23,11 +23,14 @@ class TradeOverviewPage extends StatefulWidget {
class _TradeOverviewPage extends State<TradeOverviewPage> with SingleTickerProviderStateMixin{ class _TradeOverviewPage extends State<TradeOverviewPage> with SingleTickerProviderStateMixin{
final RefreshController refreshController = RefreshController(); final RefreshController refreshController = RefreshController();
String storeId; String storeId;
TabController tabController;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
storeId = widget?.arguments["storeId"] ??""; storeId = widget?.arguments["storeId"] ??"";
tabController = TabController(
length: 3, vsync: this, initialIndex: widget?.arguments["index"]??0);
} }
@override @override
@ -55,7 +58,7 @@ class _TradeOverviewPage extends State<TradeOverviewPage> with SingleTickerProvi
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Color(0xFF666666) color: Color(0xFF666666)
), ),
// controller: tabController, controller: tabController,
// //
unselectedLabelColor: Color(0xffA29E9E), unselectedLabelColor: Color(0xffA29E9E),
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,

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

@ -28,7 +28,7 @@ class _BusinessVipPage extends State<BusinessVipPage>
@override @override
void initState() { void initState() {
super.initState(); super.initState();
tabController = TabController(length: 3, vsync: this); tabController = TabController(length: 3, vsync: this, initialIndex: widget?.arguments["index"] ?? 0);
tabController.addListener(() { tabController.addListener(() {
if (!tabController.indexIsChanging) { if (!tabController.indexIsChanging) {
setState(() {}); setState(() {});

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

@ -410,7 +410,7 @@ class _VipRechargePage extends State<VipRechargePage> {
rechargeList(), rechargeList(),
/// ///
if (networkStatus == 1) if (networkStatus == 1 && records.length > 0)
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
@ -840,7 +840,7 @@ class _VipRechargePage extends State<VipRechargePage> {
'/router/scan_code_page', '/router/scan_code_page',
arguments: { arguments: {
"storeId": widget.arguments["storeId"], "storeId": widget.arguments["storeId"],
"scanCodeType": "支付", "scanCodeType": "充值支付",
"rechargePreferentialId": "rechargePreferentialId":
records[selectIndex]?.id ?? "", records[selectIndex]?.id ?? "",
"memberSourceId": "memberSourceId":
@ -1012,7 +1012,7 @@ class _VipRechargePage extends State<VipRechargePage> {
child: (records != null && (records?.length ?? 0) > 0) child: (records != null && (records?.length ?? 0) > 0)
? ListView.builder( ? ListView.builder(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemCount: records.length ?? 0, itemCount: records?.length ?? 0,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),

5
lib/business_system/mine/business_mine_page.dart

@ -277,8 +277,9 @@ class _BusinessMinePage extends State<BusinessMinePage>
GestureDetector( GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
Navigator.of(context).pushNamed('/router/shop_reservation_code', // Navigator.of(context).pushNamed('/router/shop_reservation_code',
arguments: {"storeId": widget.storeId,}); // arguments: {"storeId": widget.storeId,});
SmartDialog.showToast("该功能暂未开放!", alignment: Alignment.center);
}, },
child: commonFunctionsItem( child: commonFunctionsItem(
"assets/image/bs_mine_code.webp", "门店预约二维码", "",18,18), "assets/image/bs_mine_code.webp", "门店预约二维码", "",18,18),

39
lib/business_system/scan_code_page.dart

@ -101,6 +101,39 @@ class _ScanCodePage extends State<ScanCodePage> {
} }
} }
///
cashierPay(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.prePayOrder({
"orderId": widget?.arguments["orderId"] ?? "",
"payChannel": widget?.arguments["payChannel"] ?? "",
"mid":widget?.arguments["mid"] ?? "",
"authCode": authCode ?? null
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
Navigator.of(context).pop(1);
SmartDialog.show(
widget: SettlementTips(
() {},
text: baseData.data,
color: Color(0xFF30415B),
));
} else {
Navigator.of(context).pop([baseData.msg,baseData.data]);
}}finally{
EasyLoading.dismiss();
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -121,7 +154,11 @@ class _ScanCodePage extends State<ScanCodePage> {
widget.arguments["scanCodeType"] == null) { widget.arguments["scanCodeType"] == null) {
queryTicketDetails(data); queryTicketDetails(data);
} else { } else {
rechargePay(data); if(widget.arguments["scanCodeType"] == "充值支付"){
rechargePay(data);
}else{
cashierPay(data);
}
} }
}, },
), ),

19
lib/retrofit/business_api.dart

@ -33,6 +33,7 @@ import 'data/recharge_flow_list.dart';
import 'data/refund_reason_list.dart'; import 'data/refund_reason_list.dart';
import 'data/single_sales_list.dart'; import 'data/single_sales_list.dart';
import 'data/store_time_info_list.dart'; import 'data/store_time_info_list.dart';
import 'data/store_total_money_info.dart';
import 'data/ticket_details.dart'; import 'data/ticket_details.dart';
import 'data/ticket_record.dart'; import 'data/ticket_record.dart';
import 'data/ticket_show.dart'; import 'data/ticket_show.dart';
@ -325,7 +326,7 @@ abstract class BusinessApiService {
@POST("member/posMemberRecharge") @POST("member/posMemberRecharge")
Future<BaseData> posMemberRecharge(@Body() Map<String, dynamic> param); Future<BaseData> posMemberRecharge(@Body() Map<String, dynamic> param);
/// ///
@POST("member/manualQuery") @POST("member/manualQuery")
Future<BaseData> manualQuery(@Body() Map<String, dynamic> param); Future<BaseData> manualQuery(@Body() Map<String, dynamic> param);
@ -353,4 +354,20 @@ abstract class BusinessApiService {
@POST("dashBoard/storeMoney") @POST("dashBoard/storeMoney")
Future<BaseData<BalanceConsumptionRankingList>> storeMoney(@Body() Map<String, dynamic> param); Future<BaseData<BalanceConsumptionRankingList>> storeMoney(@Body() Map<String, dynamic> param);
////
@POST("dashBoard/storeTotalMoney")
Future<BaseData<StoreTotalMoneyInfo>> storeTotalMoney(@Body() Map<String, dynamic> param);
///
@POST("order/createOrder")
Future<BaseData> createOrder(@Body() Map<String, dynamic> param);
///
@POST("order/prePayOrder")
Future<BaseData> prePayOrder(@Body() Map<String, dynamic> param);
///
@POST("order/queryOrder/{orderId}?login={login}")
Future<BaseData> queryCashierOrder(@Path("orderId") String orderId,@Path("login") bool login);
} }

87
lib/retrofit/business_api.g.dart

@ -1076,4 +1076,91 @@ class _BusinessApiService implements BusinessApiService {
return value; return value;
} }
@override
Future<BaseData<StoreTotalMoneyInfo>> storeTotalMoney(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/storeTotalMoney',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<StoreTotalMoneyInfo>.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : StoreTotalMoneyInfo.fromJson(json),
);
return value;
}
@override
Future<BaseData> createOrder(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'order/createOrder',
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> prePayOrder(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'order/prePayOrder',
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<dynamic>> queryCashierOrder(orderId,login) async {
ArgumentError.checkNotNull(orderId, 'orderId');
ArgumentError.checkNotNull(login, 'login');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('order/queryOrder/$orderId?login=$login',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
} }

417
lib/retrofit/data/phone_query_member_info.dart

File diff suppressed because one or more lines are too long

51
lib/retrofit/data/store_total_money_info.dart

@ -0,0 +1,51 @@
/// storeTotalMoney : "117.00"
/// paySumCount : 2
/// memberCount : 9385
/// memberTotalBalance : "42236.77"
class StoreTotalMoneyInfo {
StoreTotalMoneyInfo({
String storeTotalMoney,
num paySumCount,
num memberCount,
String memberTotalBalance,}){
_storeTotalMoney = storeTotalMoney;
_paySumCount = paySumCount;
_memberCount = memberCount;
_memberTotalBalance = memberTotalBalance;
}
StoreTotalMoneyInfo.fromJson(dynamic json) {
_storeTotalMoney = json['storeTotalMoney'];
_paySumCount = json['paySumCount'];
_memberCount = json['memberCount'];
_memberTotalBalance = json['memberTotalBalance'];
}
String _storeTotalMoney;
num _paySumCount;
num _memberCount;
String _memberTotalBalance;
StoreTotalMoneyInfo copyWith({ String storeTotalMoney,
num paySumCount,
num memberCount,
String memberTotalBalance,
}) => StoreTotalMoneyInfo( storeTotalMoney: storeTotalMoney ?? _storeTotalMoney,
paySumCount: paySumCount ?? _paySumCount,
memberCount: memberCount ?? _memberCount,
memberTotalBalance: memberTotalBalance ?? _memberTotalBalance,
);
String get storeTotalMoney => _storeTotalMoney;
num get paySumCount => _paySumCount;
num get memberCount => _memberCount;
String get memberTotalBalance => _memberTotalBalance;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['storeTotalMoney'] = _storeTotalMoney;
map['paySumCount'] = _paySumCount;
map['memberCount'] = _memberCount;
map['memberTotalBalance'] = _memberTotalBalance;
return map;
}
}

2
lib/setting/permission_setting_page.dart

@ -46,7 +46,7 @@ class _PermissionSettingPage extends State<PermissionSettingPage> {
List<String> tipIcons = [ List<String> tipIcons = [
"assets/image/icon_location_permission_tips.webp", "assets/image/icon_location_permission_tips.webp",
"assets/image/icon_notification_permission_tips.webp", "assets/image/icon_natification_permission_tips.webp",
"assets/image/icon_camera_permission_tips.webp", "assets/image/icon_camera_permission_tips.webp",
"assets/image/icon_storage_permission_tips.webp", "assets/image/icon_storage_permission_tips.webp",
]; ];

Loading…
Cancel
Save