Merge branch 'master' of sma/fcs into master
This commit is contained in:
@@ -61,15 +61,19 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
bool isSmallBag = false;
|
||||
bool isFromCartons = false;
|
||||
bool isEdiable = false;
|
||||
bool isCutomDuty=false;
|
||||
final List<CargoType> cargoTypes = [];
|
||||
final List<CargoType> surchareItems = [];
|
||||
final List<Carton> cartons = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_box = widget.box;
|
||||
_box?.billToValue = "Bill to sender";
|
||||
_cartonSubmit = widget.cartonSubmit;
|
||||
|
||||
|
||||
|
||||
|
||||
//initPackage(widget.package!);
|
||||
//for shipment weight
|
||||
@@ -206,6 +210,9 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
final packageBox = DisplayText(
|
||||
labelTextKey: "box.package",
|
||||
);
|
||||
final cartonBox = DisplayText(
|
||||
labelTextKey: "box.shipment.boxes",
|
||||
);
|
||||
final cargosBox = Padding(
|
||||
padding: const EdgeInsets.only(top: 10),
|
||||
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
@@ -330,43 +337,7 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
controller: multiImgController,
|
||||
title: "Receipt File",
|
||||
);
|
||||
final displayMixBox = 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(
|
||||
final consigneeBox=Container(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 0),
|
||||
child: Row(
|
||||
@@ -397,15 +368,39 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
: const SizedBox()
|
||||
],
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
packageBox,
|
||||
Row(
|
||||
children: getPackageList(_box!.packages),
|
||||
)
|
||||
],
|
||||
));
|
||||
));
|
||||
final customerBox= Container(
|
||||
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()
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
final billWidget = Expanded(
|
||||
child: Padding(
|
||||
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()
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// 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(
|
||||
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(
|
||||
// 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,
|
||||
surchargeItemBox,
|
||||
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 200.0, right: 8.0),
|
||||
child: ElevatedButton(
|
||||
@@ -603,6 +622,17 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
));
|
||||
}).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) {
|
||||
return _c.map((c) {
|
||||
|
||||
Reference in New Issue
Block a user