chore: release client-v1.0.71
Deploy Client / build-client-web (push) Successful in 47s
Deploy Client / build-macos (push) Successful in 2m11s
Deploy Client / build-android (push) Successful in 1m11s
Deploy Client / build-ios (push) Successful in 2m29s
Deploy Client / build-windows (push) Successful in 2m27s
Deploy Client / release-deploy-client (push) Successful in 1m27s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YZ4DskSRKsSiheQonFtQvx
This commit is contained in:
wangjia
2026-06-21 22:17:50 +08:00
parent 20f9e3a410
commit 51acee2705
11 changed files with 650 additions and 4 deletions
+12
View File
@@ -1,11 +1,16 @@
class StockInItem {
final int? id;
final int? orderId;
final int productId;
final double quantity;
final double unitPrice;
final double totalPrice;
final double returnedQuantity; // 0=未退;>=quantity 表示整行已退单
final String? batchNo;
final String? productionDate;
/// 该明细是否已退单(整行已退)。
bool get isReturned => returnedQuantity >= quantity && quantity > 0;
// Denormalized for display
final String? productName;
final String? productCode;
@@ -17,11 +22,13 @@ class StockInItem {
final String? productStorage;
const StockInItem({
this.id,
this.orderId,
required this.productId,
required this.quantity,
required this.unitPrice,
required this.totalPrice,
this.returnedQuantity = 0,
this.batchNo,
this.productionDate,
this.productName,
@@ -45,6 +52,7 @@ class StockInItem {
}
return StockInItem(
id: json['id'] != null ? (json['id'] as num).toInt() : null,
orderId: json['order_id'] != null
? (json['order_id'] as num).toInt()
: null,
@@ -52,6 +60,7 @@ class StockInItem {
quantity: (json['quantity'] as num).toDouble(),
unitPrice: (json['unit_price'] as num).toDouble(),
totalPrice: (json['total_price'] as num).toDouble(),
returnedQuantity: (json['returned_quantity'] as num?)?.toDouble() ?? 0,
batchNo: json['batch_no'] as String?,
productionDate: json['production_date'] as String?,
productName: lineOrProduct('product_name', 'name'),
@@ -91,6 +100,7 @@ class StockInOrder {
final int? reviewerId;
final String? reviewerName;
final String status; // draft | pending | approved | rejected
final String returnState; // none | partial | full(退单状态)
final String? orderDate;
final String? reviewedAt;
final double? totalAmount;
@@ -110,6 +120,7 @@ class StockInOrder {
this.reviewerId,
this.reviewerName,
required this.status,
this.returnState = 'none',
this.orderDate,
this.reviewedAt,
this.totalAmount,
@@ -136,6 +147,7 @@ class StockInOrder {
: null,
reviewerName: (json['reviewer'] as Map<String, dynamic>?)?['real_name'] as String?,
status: json['status'] as String,
returnState: json['return_state'] as String? ?? 'none',
orderDate: json['order_date'] as String?,
reviewedAt: json['reviewed_at'] as String?,
totalAmount: json['total_amount'] != null
+11
View File
@@ -1,21 +1,27 @@
class StockOutItem {
final int? id;
final int? orderId;
final int productId;
final double quantity;
final double unitPrice;
final double totalPrice;
final double returnedQuantity;
final String? productName;
final String? productCode;
final String? productSeries;
final String? productSpec;
final String? productUnit;
bool get isReturned => returnedQuantity >= quantity && quantity > 0;
const StockOutItem({
this.id,
this.orderId,
required this.productId,
required this.quantity,
required this.unitPrice,
required this.totalPrice,
this.returnedQuantity = 0,
this.productName,
this.productCode,
this.productSeries,
@@ -34,6 +40,7 @@ class StockOutItem {
}
return StockOutItem(
id: json['id'] != null ? (json['id'] as num).toInt() : null,
orderId: json['order_id'] != null
? (json['order_id'] as num).toInt()
: null,
@@ -41,6 +48,7 @@ class StockOutItem {
quantity: (json['quantity'] as num).toDouble(),
unitPrice: (json['unit_price'] as num).toDouble(),
totalPrice: (json['total_price'] as num).toDouble(),
returnedQuantity: (json['returned_quantity'] as num?)?.toDouble() ?? 0,
productName: lineOrProduct('product_name', 'name'),
productCode: lineOrProduct('product_code', 'code'),
productSeries: lineOrProduct('series', 'series'),
@@ -63,6 +71,7 @@ class StockOutOrder {
final int? reviewerId;
final String? reviewerName;
final String status; // draft | pending | approved | rejected
final String returnState; // none | partial | full
final String? orderDate;
final String? reviewedAt;
final String? createdAt;
@@ -83,6 +92,7 @@ class StockOutOrder {
this.reviewerId,
this.reviewerName,
required this.status,
this.returnState = 'none',
this.orderDate,
this.reviewedAt,
this.createdAt,
@@ -110,6 +120,7 @@ class StockOutOrder {
: null,
reviewerName: (json['reviewer'] as Map<String, dynamic>?)?['real_name'] as String?,
status: json['status'] as String,
returnState: json['return_state'] as String? ?? 'none',
orderDate: json['order_date'] as String?,
reviewedAt: json['reviewed_at'] as String?,
createdAt: json['created_at'] as String?,