feat:超市商品页面

This commit is contained in:
dzc committed 2025-03-17 21:20:10 +08:00
1 parent e7c2fcd733
commit de2f5e14b6
14 files changed
+218 -85

No files matched your search

+5 -1
View File
@@ -126,7 +126,7 @@ class _$AppDatabase extends AppDatabase {
await database.execute(
'CREATE TABLE IF NOT EXISTS `supermarket_code` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `serviceUniqueCode` TEXT NOT NULL, `spuId` TEXT NOT NULL, `unitId` TEXT NOT NULL, `barCode` TEXT NOT NULL)');
await database.execute(
'CREATE TABLE IF NOT EXISTS `shop_card` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `orderId` INTEGER NOT NULL, `productServiceUniqueCode` TEXT NOT NULL, `productName` TEXT NOT NULL, `productPic` TEXT NOT NULL, `productPrice` INTEGER NOT NULL, `productNumber` INTEGER NOT NULL, `productWidget` REAL NOT NULL, `totalPrice` INTEGER NOT NULL)');
'CREATE TABLE IF NOT EXISTS `shop_card` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `orderId` INTEGER NOT NULL, `productServiceUniqueCode` TEXT NOT NULL, `productName` TEXT NOT NULL, `productPic` TEXT NOT NULL, `productPrice` INTEGER NOT NULL, `nature` TEXT NOT NULL, `productNumber` INTEGER NOT NULL, `productWidget` REAL NOT NULL, `totalPrice` INTEGER NOT NULL)');
await database.execute(
'CREATE TABLE IF NOT EXISTS `classify` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `serviceUniqueCode` TEXT NOT NULL, `sysType` TEXT NOT NULL, `name` TEXT NOT NULL, `categoryType` TEXT NOT NULL, `sort` INTEGER NOT NULL, `createTime` TEXT NOT NULL, `updateTime` TEXT NOT NULL, `delFlag` INTEGER NOT NULL)');
await database.execute(
@@ -853,6 +853,7 @@ class _$ShopCardDao extends ShopCardDao {
'productName': item.productName,
'productPic': item.productPic,
'productPrice': item.productPrice,
'nature': _supermarketNatureConverter.encode(item.nature),
'productNumber': item.productNumber,
'productWidget': item.productWidget,
'totalPrice': item.totalPrice
@@ -868,6 +869,7 @@ class _$ShopCardDao extends ShopCardDao {
'productName': item.productName,
'productPic': item.productPic,
'productPrice': item.productPrice,
'nature': _supermarketNatureConverter.encode(item.nature),
'productNumber': item.productNumber,
'productWidget': item.productWidget,
'totalPrice': item.totalPrice
@@ -883,6 +885,7 @@ class _$ShopCardDao extends ShopCardDao {
'productName': item.productName,
'productPic': item.productPic,
'productPrice': item.productPrice,
'nature': _supermarketNatureConverter.encode(item.nature),
'productNumber': item.productNumber,
'productWidget': item.productWidget,
'totalPrice': item.totalPrice
@@ -911,6 +914,7 @@ class _$ShopCardDao extends ShopCardDao {
productName: row['productName'] as String,
productPic: row['productPic'] as String,
productPrice: row['productPrice'] as int,
nature: _supermarketNatureConverter.decode(row['nature'] as String),
productNumber: row['productNumber'] as int,
productWidget: row['productWidget'] as double,
totalPrice: row['totalPrice'] as int),