update carton form ,info and filter
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user