prepare carton info
This commit is contained in:
@@ -61,15 +61,19 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
bool isSmallBag = false;
|
bool isSmallBag = false;
|
||||||
bool isFromCartons = false;
|
bool isFromCartons = false;
|
||||||
bool isEdiable = false;
|
bool isEdiable = false;
|
||||||
|
bool isCutomDuty=false;
|
||||||
final List<CargoType> cargoTypes = [];
|
final List<CargoType> cargoTypes = [];
|
||||||
final List<CargoType> surchareItems = [];
|
final List<CargoType> surchareItems = [];
|
||||||
|
final List<Carton> cartons = [];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_box = widget.box;
|
_box = widget.box;
|
||||||
_box?.billToValue = "Bill to sender";
|
_box?.billToValue = "Bill to sender";
|
||||||
_cartonSubmit = widget.cartonSubmit;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//initPackage(widget.package!);
|
//initPackage(widget.package!);
|
||||||
//for shipment weight
|
//for shipment weight
|
||||||
@@ -206,6 +210,9 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
final packageBox = DisplayText(
|
final packageBox = DisplayText(
|
||||||
labelTextKey: "box.package",
|
labelTextKey: "box.package",
|
||||||
);
|
);
|
||||||
|
final cartonBox = DisplayText(
|
||||||
|
labelTextKey: "box.shipment.boxes",
|
||||||
|
);
|
||||||
final cargosBox = Padding(
|
final cargosBox = Padding(
|
||||||
padding: const EdgeInsets.only(top: 10),
|
padding: const EdgeInsets.only(top: 10),
|
||||||
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||||
@@ -330,43 +337,7 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
controller: multiImgController,
|
controller: multiImgController,
|
||||||
title: "Receipt File",
|
title: "Receipt File",
|
||||||
);
|
);
|
||||||
final displayMixBox = Container(
|
final consigneeBox=Container(
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Row(
|
|
||||||
//crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
customerNameBox,
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
_box?.billToValue == billToSender
|
|
||||||
? Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(left: 0, top: 15),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Icon(Ionicons.document_text_outline,
|
|
||||||
color: primaryColor, size: 20),
|
|
||||||
Text("Bill to",
|
|
||||||
style: TextStyle(
|
|
||||||
color: primaryColor, fontSize: 15))
|
|
||||||
],
|
|
||||||
)))
|
|
||||||
: const SizedBox()
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(left: 0),
|
padding: const EdgeInsets.only(left: 0),
|
||||||
child: Row(
|
child: Row(
|
||||||
@@ -397,15 +368,39 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
: const SizedBox()
|
: const SizedBox()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
))
|
));
|
||||||
|
final customerBox= Container(
|
||||||
|
child: Row(
|
||||||
|
//crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
customerNameBox,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
packageBox,
|
),
|
||||||
Row(
|
_box?.billToValue == billToSender
|
||||||
children: getPackageList(_box!.packages),
|
? Expanded(
|
||||||
)
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(left: 0, top: 15),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Icon(Ionicons.document_text_outline,
|
||||||
|
color: primaryColor, size: 20),
|
||||||
|
Text("Bill to",
|
||||||
|
style: TextStyle(
|
||||||
|
color: primaryColor, fontSize: 15))
|
||||||
],
|
],
|
||||||
));
|
)))
|
||||||
|
: const SizedBox()
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
final billWidget = Expanded(
|
final billWidget = Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(left: 0, top: 15),
|
padding: EdgeInsets.only(left: 0, top: 15),
|
||||||
@@ -460,58 +455,82 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
// isMixBox
|
||||||
|
// ?
|
||||||
|
// displayMixBox:Container(),
|
||||||
|
|
||||||
|
isMixBox?
|
||||||
|
|
||||||
|
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Row(
|
||||||
|
//crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
customerNameBox,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
_box?.billToValue == billToSender
|
||||||
|
? billWidget
|
||||||
|
: const SizedBox( height: 300.0,)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 0),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
consigneeNameBox,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
_cartonSubmit?.billToValue == billToSender
|
||||||
|
? billWidget
|
||||||
|
: const SizedBox()
|
||||||
|
],
|
||||||
|
),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
)
|
||||||
|
// ,
|
||||||
|
|
||||||
// Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// Expanded(
|
|
||||||
// child: Row(
|
|
||||||
// //crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// Expanded(
|
|
||||||
// child: Column(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// customerNameBox,
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// _box?.billToValue == billToSender
|
|
||||||
// ? billWidget
|
|
||||||
// : const SizedBox()
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Expanded(
|
|
||||||
// child: Padding(
|
|
||||||
// padding: const EdgeInsets.only(left: 0),
|
|
||||||
// child: Row(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// Expanded(
|
|
||||||
// child: Column(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// consigneeNameBox,
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// _cartonSubmit?.billToValue == billToSender
|
|
||||||
// ? billWidget
|
|
||||||
// : const SizedBox()
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ))
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// packageBox,
|
|
||||||
// Row(
|
// Row(
|
||||||
// children: getPackageList(_box!.packages),
|
// children: getPackageList(_box!.packages),
|
||||||
// ),
|
// ),
|
||||||
// ]):Container(),
|
// ])
|
||||||
|
:Container(),
|
||||||
|
isMixBox ?
|
||||||
|
Column(children: [
|
||||||
|
packageBox,
|
||||||
|
Row(
|
||||||
|
children: getPackageList(_box!.packages),
|
||||||
|
),
|
||||||
|
],):Column(
|
||||||
|
children: [
|
||||||
|
cartonBox,
|
||||||
|
Row(
|
||||||
|
children: getCartonList(_box!.mixCartons),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
isCutomDuty
|
||||||
|
?
|
||||||
|
surchargeItemBox:
|
||||||
cargosBox,
|
cargosBox,
|
||||||
surchargeItemBox,
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: 200.0, right: 8.0),
|
padding: EdgeInsets.only(left: 200.0, right: 8.0),
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
@@ -603,6 +622,17 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
));
|
));
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
List<Widget> getCartonList(List<Carton> _c) {
|
||||||
|
return _c.map((c) {
|
||||||
|
return Container(
|
||||||
|
padding: EdgeInsets.only(top: 0),
|
||||||
|
child: Container(
|
||||||
|
//padding:
|
||||||
|
//EdgeInsets.only(top: 0.0),
|
||||||
|
child: Row(children: <Widget>[new Text(c.cartonNumber ?? '')]),
|
||||||
|
));
|
||||||
|
}).toList();
|
||||||
|
}
|
||||||
|
|
||||||
List<Widget> getCargoList(List<CargoType> _c) {
|
List<Widget> getCargoList(List<CargoType> _c) {
|
||||||
return _c.map((c) {
|
return _c.map((c) {
|
||||||
|
|||||||
Reference in New Issue
Block a user