feat:部门交易记录样式
This commit is contained in:
1 parent
ceef83f5c9
commit
52c1c30658
5 files changed
+35
-3
No files matched your search
@@ -16,7 +16,17 @@ Widget appWalletSelector(
|
||||
if (ObjectUtil.isEmpty(list)) {
|
||||
return const SizedBox();
|
||||
}
|
||||
ServiceWallet currentSelector = list[0];
|
||||
ServiceWallet? currentSelector = selector;
|
||||
// 判断是为为自己的钱包
|
||||
if (currentSelector != null) {
|
||||
final target = list.firstWhereOrNull(
|
||||
(item) => item.userId == currentSelector!.userId,
|
||||
);
|
||||
if (target == null) {
|
||||
currentSelector = null;
|
||||
}
|
||||
}
|
||||
currentSelector ??= list[0];
|
||||
onChange(currentSelector);
|
||||
final theme = FTheme.of(context);
|
||||
return list
|
||||
|
||||
@@ -455,17 +455,26 @@ mixin OrderMixin {
|
||||
|
||||
void putOffSendSubScreen({int seconds = 5}) {
|
||||
if (putOffSendSubScreenDelayed != null) {
|
||||
sendSubScreen();
|
||||
sendSubScreenBack();
|
||||
putOffSendSubScreenDelayed = null;
|
||||
return;
|
||||
}
|
||||
putOffSendSubScreenDelayed = Future.delayed(Duration(seconds: seconds), () {
|
||||
sendSubScreen();
|
||||
sendSubScreenBack();
|
||||
putOffSendSubScreenDelayed = null;
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> sendSubScreenBack() async {
|
||||
await SubScreenPlugin.sendMsgToViceScreen(
|
||||
SubScreenAction.jumpSubBack.name,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> sendSubScreen() async {
|
||||
await SubScreenPlugin.sendMsgToViceScreen(
|
||||
SubScreenAction.jumpSubPage.name,
|
||||
);
|
||||
final json = SubScreenProductEvent(
|
||||
shopList: shopCardList.map((e) => e.toJson()).toList(),
|
||||
sysType: _sysType,
|
||||
|
||||
@@ -138,6 +138,7 @@ class SelectPayTypeDialogController extends GetxController {
|
||||
_closeStatus() {
|
||||
payUser.value = null;
|
||||
userWalletList.value = [];
|
||||
currentWallet.value = null;
|
||||
isRecognition.value = false;
|
||||
globalQrCode = null;
|
||||
_faceCallbackLock = false;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
import '../routers/index.dart';
|
||||
|
||||
abstract class SubNavigatorKey {
|
||||
static GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
|
||||
static String currentRouteName = SubRouteNames.root;
|
||||
}
|
||||
@@ -5,18 +5,27 @@ import 'package:pj_supermarket_cloud/sub_screen/common/index.dart';
|
||||
|
||||
class SubPageToool {
|
||||
static void switchJump(SubScreenAction type) {
|
||||
// 判断是否要跳转的页面就是当前页面
|
||||
switch (type) {
|
||||
case SubScreenAction.jumpSubPage:
|
||||
if (SubNavigatorKey.currentRouteName == SubRouteNames.subProduct) {
|
||||
return;
|
||||
}
|
||||
SubNavigatorKey.navigatorKey.currentState?.pushNamedAndRemoveUntil(
|
||||
SubRouteNames.subProduct,
|
||||
(Route<dynamic> route) => false,
|
||||
);
|
||||
SubNavigatorKey.currentRouteName = SubRouteNames.subProduct;
|
||||
break;
|
||||
case SubScreenAction.jumpSubBack:
|
||||
if (SubNavigatorKey.currentRouteName == SubRouteNames.root) {
|
||||
return;
|
||||
}
|
||||
SubNavigatorKey.navigatorKey.currentState?.pushNamedAndRemoveUntil(
|
||||
SubRouteNames.root,
|
||||
(Route<dynamic> route) => false,
|
||||
);
|
||||
SubNavigatorKey.currentRouteName = SubRouteNames.root;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user