feat:辅助条码

This commit is contained in:
dzc committed 2025-03-20 14:32:07 +08:00
1 parent 6b3ee0e8d1
commit 93f9ec7cfd
10 files changed
+130 -52

No files matched your search

@@ -194,6 +194,7 @@ class CanteenProductController extends GetxController with OrderMixin {
await createApiOrder();
_clearShopCard();
putOffSendSubScreen();
EasyLoading.dismiss();
};
// |支付方式|点击|取消|
payTypeSelect.onCancel = () {};
@@ -100,7 +100,7 @@ class ProductManageController extends GetxController {
if (sysType == SysType.SUPERMARKET) {
// 超市
final supermarketSpuDao = appC.dataBase.getSupermarketSkuDao;
final findCount = await supermarketSpuDao.getCount();
final findCount = await supermarketSpuDao.getCount("-1", "-1");
totalPage.value = findCount ?? 0;
final list = await supermarketSpuDao.getAllPage(
"-1",
+8 -3
View File
@@ -101,7 +101,7 @@ class SupermarketOrderController extends GetxController with OrderMixin {
barCode = codeText;
}
// 收起键盘
FocusScope.of(Get.context!).unfocus();
FocusManager.instance.primaryFocus?.unfocus();
await getProduct();
EasyLoading.dismiss();
}
@@ -116,7 +116,7 @@ class SupermarketOrderController extends GetxController with OrderMixin {
selfCodeC.clear();
barCode = "";
// 收起键盘
FocusScope.of(Get.context!).unfocus();
FocusManager.instance.primaryFocus?.unfocus();
await getProduct();
EasyLoading.dismiss();
}
@@ -247,6 +247,7 @@ class SupermarketOrderController extends GetxController with OrderMixin {
await createApiOrder();
_clearShopCard();
putOffSendSubScreen();
EasyLoading.dismiss();
};
// |支付方式|点击|取消|
payTypeSelect.onCancel = () {};
@@ -302,7 +303,11 @@ class SupermarketOrderController extends GetxController with OrderMixin {
if (event.length >= 30) return;
// 根据条码查询商品
final skuDao = appC.dataBase.getSupermarketSkuDao;
final scanProduct = await skuDao.getByBarCode(event);
SupermarketSpuEntity? scanProduct = await skuDao.getByBarCode(event);
if (scanProduct == null) {
final codeDao = appC.dataBase.getSupermarketCodeDao;
scanProduct = await codeDao.getByBarCode(event);
}
if (scanProduct == null) {
TtsManage.speak("扫码商品未知");
return;