update carton form ,info and filter

This commit is contained in:
tzw
2024-10-01 18:15:53 +06:30
parent 02e079c514
commit 41fdc3ef43
13 changed files with 123 additions and 109 deletions

View File

@@ -89,15 +89,6 @@ class _CartonPackageEditorState extends State<CartonPackageEditor> {
_cargoTypes = widget.carton.cargoTypes;
_surchareItems = widget.carton.surchareItems;
var s = await context
.read<FcsShipmentModel>()
.getFcsShipment(widget.carton.fcsShipmentID ?? "");
_shipment = s;
_packages = await context
.read<PackageModel>()
.getPackagesByIds(widget.carton.packageIDs);
// check carton size type
List<CartonSize> cartonSizes = context.read<CartonSizeModel>().cartonSizes;
@@ -120,8 +111,20 @@ class _CartonPackageEditorState extends State<CartonPackageEditor> {
_cartonSizeType = packageCarton;
} else {
_cartonSizeType = customCarton;
_length = widget.carton.length.toDouble();
_width = widget.carton.width.toDouble();
_height = widget.carton.height.toDouble();
}
var s = await context
.read<FcsShipmentModel>()
.getFcsShipment(widget.carton.fcsShipmentID ?? "");
_shipment = s;
_packages = await context
.read<PackageModel>()
.getPackagesByIds(widget.carton.packageIDs);
if (mounted) {
setState(() {});
}
@@ -328,7 +331,10 @@ class _CartonPackageEditorState extends State<CartonPackageEditor> {
}
var carton = Carton(
id: widget.carton.id,
cartonType: carton_from_packages,
senderID: widget.carton.senderID,
consigneeID: widget.carton.consigneeID,
billTo: _billToValue,
lastMile: _selectedLastMile,
fcsShipmentID: _shipment?.id,