update cargo type input, add package count and carton count for shipment info

This commit is contained in:
tzw
2025-03-26 15:51:47 +06:30
parent db3e290546
commit 17ca3e2a3f
11 changed files with 156 additions and 53 deletions

View File

@@ -50,6 +50,7 @@ class _CartonPackageFormState extends State<CartonPackageForm> {
List<CargoType> _cargoTypes = [];
List<CargoType> _surchareItems = [];
double _totalWeight = 0;
int currentStep = 0;
double _length = 0;
@@ -188,6 +189,7 @@ class _CartonPackageFormState extends State<CartonPackageForm> {
consignee: widget.consignee,
cargoTypes: _cargoTypes,
surchargeItems: _surchareItems,
totalWeight: _totalWeight,
onContinue: (cargoTypes, customDuties) {
setState(() {
_cargoTypes = List.from(cargoTypes);
@@ -195,8 +197,9 @@ class _CartonPackageFormState extends State<CartonPackageForm> {
currentStep += 1;
});
},
onPrevious: (cargoTypes, customDuties) {
onPrevious: (cargoTypes, customDuties, totalWeight) {
setState(() {
_totalWeight = totalWeight;
_cargoTypes = List.from(cargoTypes);
_surchareItems = List.from(customDuties);
currentStep -= 1;