feat:超市不弹起键盘
This commit is contained in:
1 parent
af33747281
commit
4a61bf35e0
5 files changed
+25
-9
No files matched your search
@@ -92,6 +92,7 @@ mixin OrderMixin {
|
||||
);
|
||||
currentTabIndex = i;
|
||||
if (i <= classifyList.length - 1) {
|
||||
currentPage.value = 1;
|
||||
await getProduct();
|
||||
}
|
||||
EasyLoading.dismiss();
|
||||
@@ -442,8 +443,7 @@ mixin OrderMixin {
|
||||
});
|
||||
}
|
||||
|
||||
void sendSubScreen() {
|
||||
if (shopCardList.isEmpty) return;
|
||||
Future<void> sendSubScreen() async {
|
||||
final json = SubScreenProductEvent(
|
||||
shopList: shopCardList.map((e) => e.toJson()).toList(),
|
||||
sysType: _sysType,
|
||||
@@ -451,7 +451,7 @@ mixin OrderMixin {
|
||||
totalPrice: totalPrice.value,
|
||||
amountMealPrice: amountMealPrice.value,
|
||||
).toJson();
|
||||
SubScreenPlugin.sendMsgToViceScreen(
|
||||
await SubScreenPlugin.sendMsgToViceScreen(
|
||||
SubScreenAction.updateCard.name,
|
||||
params: json,
|
||||
);
|
||||
|
||||
@@ -192,8 +192,8 @@ class CanteenProductController extends GetxController with OrderMixin {
|
||||
await _computedAmountMealPrice();
|
||||
await updateSqlOrder();
|
||||
await createApiOrder();
|
||||
_clearShopCard();
|
||||
putOffSendSubScreen();
|
||||
_clearShopCard();
|
||||
EasyLoading.dismiss();
|
||||
};
|
||||
// |支付方式|点击|取消|
|
||||
|
||||
@@ -14,6 +14,10 @@ class FaceManageController extends GetxController {
|
||||
|
||||
final appC = Get.find<AppControl>();
|
||||
|
||||
late SysSetting sysSetting;
|
||||
|
||||
Rx<SysType> sysType = SysType.CANTEEN.obs;
|
||||
|
||||
RxList<FaceEntity> faceList = RxList();
|
||||
|
||||
RxInt currentPage = RxInt(1);
|
||||
@@ -29,6 +33,8 @@ class FaceManageController extends GetxController {
|
||||
@override
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
sysSetting = await AppSettingTool.getSysSetting();
|
||||
sysType.value = sysSetting.sysType;
|
||||
getFaceList();
|
||||
_listenMqCallback();
|
||||
}
|
||||
@@ -182,10 +188,18 @@ Widget buildFaceSearch(BuildContext context) {
|
||||
final theme = FTheme.of(context);
|
||||
return <Widget>[
|
||||
const Spacer(),
|
||||
FTextField(
|
||||
controller: faceC.usernameC,
|
||||
hint: '请输入姓名',
|
||||
maxLines: 1,
|
||||
Obx(
|
||||
() => FTextField(
|
||||
textInputAction: faceC.sysType.value == SysType.SUPERMARKET
|
||||
? TextInputAction.none
|
||||
: TextInputAction.newline,
|
||||
keyboardType: faceC.sysType.value == SysType.SUPERMARKET
|
||||
? TextInputType.none
|
||||
: TextInputType.multiline,
|
||||
controller: faceC.usernameC,
|
||||
hint: '请输入姓名',
|
||||
maxLines: 1,
|
||||
),
|
||||
).width(300.w),
|
||||
FButton(
|
||||
label: Text(
|
||||
|
||||
@@ -194,6 +194,8 @@ Widget _buildSearch(BuildContext context) {
|
||||
].toRow().expanded(),
|
||||
Obx(
|
||||
() => FTextField(
|
||||
textInputAction: TextInputAction.none,
|
||||
keyboardType: TextInputType.none,
|
||||
controller: productC.selfCodeC,
|
||||
hint: '请输入自编码/商品名',
|
||||
maxLines: 1,
|
||||
|
||||
@@ -259,9 +259,9 @@ class SupermarketOrderController extends GetxController with OrderMixin {
|
||||
);
|
||||
await updateSqlOrder();
|
||||
await createApiOrder();
|
||||
EasyLoading.dismiss();
|
||||
_clearShopCard();
|
||||
putOffSendSubScreen();
|
||||
EasyLoading.dismiss();
|
||||
};
|
||||
// |支付方式|点击|取消|
|
||||
payTypeSelect.onCancel = () {};
|
||||
|
||||
Reference in new issue
Block a user