feat:辅助条码
This commit is contained in:
1 parent
6b3ee0e8d1
commit
93f9ec7cfd
10 files changed
+130
-52
No files matched your search
@@ -70,7 +70,7 @@ mixin OrderMixin {
|
||||
|
||||
RxInt currentPage = RxInt(1);
|
||||
RxInt totalPage = RxInt(0);
|
||||
RxInt pageSize = RxInt(10);
|
||||
RxInt pageSize = RxInt(15);
|
||||
|
||||
Future? putOffSendSubScreenDelayed;
|
||||
|
||||
@@ -92,8 +92,7 @@ mixin OrderMixin {
|
||||
);
|
||||
currentTabIndex = i;
|
||||
if (i <= classifyList.length - 1) {
|
||||
final current = classifyList[i];
|
||||
await getProduct(classifyCode: current.serviceUniqueCode);
|
||||
await getProduct();
|
||||
}
|
||||
EasyLoading.dismiss();
|
||||
}
|
||||
@@ -122,13 +121,18 @@ mixin OrderMixin {
|
||||
}
|
||||
|
||||
// 获取商品
|
||||
Future<void> getProduct({String classifyCode = "-1"}) async {
|
||||
Future<void> getProduct() async {
|
||||
String classifyCode = classifyList[currentTabIndex].serviceUniqueCode;
|
||||
if (_sysType == SysType.SUPERMARKET) {
|
||||
final supermarketSkuDao = appC.dataBase.getSupermarketSkuDao;
|
||||
final total = await supermarketSkuDao.getCount();
|
||||
String currentBarCode = ObjectUtil.isEmpty(barCode) ? "-1" : barCode;
|
||||
final total = await supermarketSkuDao.getCount(
|
||||
currentBarCode,
|
||||
classifyCode,
|
||||
);
|
||||
totalPage.value = total ?? 0;
|
||||
final list = await supermarketSkuDao.getAllPage(
|
||||
ObjectUtil.isEmpty(barCode) ? "-1" : barCode,
|
||||
currentBarCode,
|
||||
classifyCode,
|
||||
pageSize.value,
|
||||
(currentPage.value - 1) * pageSize.value,
|
||||
@@ -331,10 +335,8 @@ mixin OrderMixin {
|
||||
final price = AppriceTool.fenToYuan(sqlOrderDetail.payPrice);
|
||||
await TtsManage.speak("购买成功总金额$price元");
|
||||
}
|
||||
EasyLoading.dismiss();
|
||||
Toast.success(msg: "购买成功");
|
||||
} catch (e, stack) {
|
||||
EasyLoading.dismiss();
|
||||
Toast.error(msg: "结算订单失败");
|
||||
logger.e("|$_tag|创建api订单,下单失败error:|$e|stack:|$stack|");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user