Merge branch 'master' of https://git.mokkon.com/tzw/fcs
This commit is contained in:
@@ -292,6 +292,7 @@
|
|||||||
"box.package":"Packages",
|
"box.package":"Packages",
|
||||||
"box.mix.desc":"Description",
|
"box.mix.desc":"Description",
|
||||||
"box.info.title":"Carton Info",
|
"box.info.title":"Carton Info",
|
||||||
|
"box.imageupload.title":"Upload images",
|
||||||
"box.popupmenu.active":"Active Cartons",
|
"box.popupmenu.active":"Active Cartons",
|
||||||
"box.popupmenu.delivered":"Delivered Cartons",
|
"box.popupmenu.delivered":"Delivered Cartons",
|
||||||
"box.cargo.total":"Total Weight",
|
"box.cargo.total":"Total Weight",
|
||||||
@@ -338,6 +339,7 @@
|
|||||||
"box.input_cargo_weight":"Input cargo weight (lb)",
|
"box.input_cargo_weight":"Input cargo weight (lb)",
|
||||||
"box.input_surcharge_item":"Input surcharge items",
|
"box.input_surcharge_item":"Input surcharge items",
|
||||||
"box.select.cargo_type":"Select surcharge item",
|
"box.select.cargo_type":"Select surcharge item",
|
||||||
|
"box.surcharge.item":"Surcharge items",
|
||||||
"box.package.count":"Packages ({0})",
|
"box.package.count":"Packages ({0})",
|
||||||
|
|
||||||
"Boxes End ================================================================":"",
|
"Boxes End ================================================================":"",
|
||||||
|
|||||||
@@ -292,6 +292,7 @@
|
|||||||
"box.mix.number":"သေတ္တာ နံပါတ်",
|
"box.mix.number":"သေတ္တာ နံပါတ်",
|
||||||
"box.mix.desc":"ဖော်ပြချက်",
|
"box.mix.desc":"ဖော်ပြချက်",
|
||||||
"box.info.title":"သေတ္တာ",
|
"box.info.title":"သေတ္တာ",
|
||||||
|
"box.imageupload.title":"ပုံများထည့်ခြင်း",
|
||||||
"box.popupmenu.active":"လာမည့် သေတ္တာများ",
|
"box.popupmenu.active":"လာမည့် သေတ္တာများ",
|
||||||
"box.popupmenu.delivered":"ပို့ပြီးသော သေတ္တာများ",
|
"box.popupmenu.delivered":"ပို့ပြီးသော သေတ္တာများ",
|
||||||
"box.cargo.total":"စုစုပေါင်း အလေးချိန်",
|
"box.cargo.total":"စုစုပေါင်း အလေးချိန်",
|
||||||
@@ -337,6 +338,7 @@
|
|||||||
"box.input_cargo_weight":"Input cargo weight (lb)",
|
"box.input_cargo_weight":"Input cargo weight (lb)",
|
||||||
"box.input_surcharge_item":"Input surcharge items",
|
"box.input_surcharge_item":"Input surcharge items",
|
||||||
"box.select.cargo_type":"Select surcharge item",
|
"box.select.cargo_type":"Select surcharge item",
|
||||||
|
"box.surcharge.item":"Surcharge items",
|
||||||
"box.package.count":"Packages ({0})",
|
"box.package.count":"Packages ({0})",
|
||||||
"Boxes End ================================================================":"",
|
"Boxes End ================================================================":"",
|
||||||
|
|
||||||
|
|||||||
80
lib/pages/carton/carton_image_upload.dart
Normal file
80
lib/pages/carton/carton_image_upload.dart
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
import 'package:fcs/domain/entities/carton.dart';
|
||||||
|
import 'package:fcs/domain/entities/package.dart';
|
||||||
|
import 'package:fcs/domain/entities/user.dart';
|
||||||
|
import 'package:fcs/helpers/theme.dart';
|
||||||
|
import 'package:fcs/pages/main/util.dart';
|
||||||
|
import 'package:fcs/pages/package/model/package_model.dart';
|
||||||
|
import 'package:fcs/pages/user_search/user_serach.dart';
|
||||||
|
import 'package:fcs/pages/widgets/barcode_scanner.dart';
|
||||||
|
import 'package:fcs/pages/widgets/display_text.dart';
|
||||||
|
import 'package:fcs/pages/widgets/fcs_id_icon.dart';
|
||||||
|
import 'package:fcs/pages/widgets/input_text.dart';
|
||||||
|
import 'package:fcs/pages/widgets/local_app_bar.dart';
|
||||||
|
import 'package:fcs/pages/widgets/multi_img_controller.dart';
|
||||||
|
import 'package:fcs/pages/widgets/multi_img_file.dart';
|
||||||
|
import 'package:fcs/pages/widgets/progress.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
|
||||||
|
typedef void FindCallBack();
|
||||||
|
|
||||||
|
class CartonImageUpload extends StatefulWidget {
|
||||||
|
final Carton? box;
|
||||||
|
const CartonImageUpload({this.box});
|
||||||
|
@override
|
||||||
|
_CartonImageUploaState createState() => _CartonImageUploaState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CartonImageUploaState extends State<CartonImageUpload> {
|
||||||
|
bool _isLoading = false;
|
||||||
|
Carton? _box;
|
||||||
|
late bool _isNew;
|
||||||
|
MultiImgController multiImgController = MultiImgController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
multiImgController.setImageUrls = _box!.photos;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return LocalProgress(
|
||||||
|
inAsyncCall: _isLoading,
|
||||||
|
child: Scaffold(
|
||||||
|
appBar: LocalAppBar(
|
||||||
|
labelKey: "box.imageupload.title",
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
labelColor: primaryColor,
|
||||||
|
arrowColor: primaryColor,
|
||||||
|
actions: []
|
||||||
|
// isEdiable
|
||||||
|
// ? <Widget>[
|
||||||
|
// IconButton(
|
||||||
|
// icon: Icon(Icons.edit, color: primaryColor),
|
||||||
|
// onPressed: _gotoEditor,
|
||||||
|
// ),
|
||||||
|
// IconButton(
|
||||||
|
// icon: Icon(Icons.delete, color: primaryColor),
|
||||||
|
// onPressed: _delete,
|
||||||
|
// ),
|
||||||
|
// ]
|
||||||
|
// : [],
|
||||||
|
),
|
||||||
|
body: ListView(
|
||||||
|
children: [
|
||||||
|
|
||||||
|
//img
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// final img = MultiImageFile(
|
||||||
|
// enabled: true,
|
||||||
|
// controller:multiImgController,
|
||||||
|
// title: "Receipt File",
|
||||||
|
// );
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import 'package:fcs/domain/entities/package.dart';
|
|||||||
import 'package:fcs/domain/entities/pickup.dart';
|
import 'package:fcs/domain/entities/pickup.dart';
|
||||||
import 'package:fcs/domain/vo/delivery_address.dart';
|
import 'package:fcs/domain/vo/delivery_address.dart';
|
||||||
import 'package:fcs/helpers/theme.dart';
|
import 'package:fcs/helpers/theme.dart';
|
||||||
|
import 'package:fcs/pages/carton/carton_image_upload.dart';
|
||||||
import 'package:fcs/pages/carton_size/model/carton_size_model.dart';
|
import 'package:fcs/pages/carton_size/model/carton_size_model.dart';
|
||||||
import 'package:fcs/pages/main/util.dart';
|
import 'package:fcs/pages/main/util.dart';
|
||||||
import 'package:fcs/pages/package/model/package_model.dart';
|
import 'package:fcs/pages/package/model/package_model.dart';
|
||||||
@@ -24,6 +25,7 @@ import 'package:fcs/pages/widgets/status_tree.dart';
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||||
|
import 'package:image_picker/image_picker.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
@@ -35,6 +37,7 @@ import 'model/carton_model.dart';
|
|||||||
import 'widgets.dart';
|
import 'widgets.dart';
|
||||||
|
|
||||||
final DateFormat dateFormat = DateFormat("d MMM yyyy");
|
final DateFormat dateFormat = DateFormat("d MMM yyyy");
|
||||||
|
final NumberFormat numberFormatter = NumberFormat("#,###");
|
||||||
|
|
||||||
class CartonInfo extends StatefulWidget {
|
class CartonInfo extends StatefulWidget {
|
||||||
final Package? package;
|
final Package? package;
|
||||||
@@ -51,7 +54,7 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
Carton? _box;
|
Carton? _box;
|
||||||
|
|
||||||
|
|
||||||
List<CargoType>? cargoTypes;
|
|
||||||
DeliveryAddress? _deliveryAddress = new DeliveryAddress();
|
DeliveryAddress? _deliveryAddress = new DeliveryAddress();
|
||||||
MultiImgController multiImgController = MultiImgController();
|
MultiImgController multiImgController = MultiImgController();
|
||||||
TextEditingController _widthController = new TextEditingController();
|
TextEditingController _widthController = new TextEditingController();
|
||||||
@@ -67,17 +70,9 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
bool isFromPackages = false;
|
bool isFromPackages = false;
|
||||||
bool isSmallBag = false;
|
bool isSmallBag = false;
|
||||||
bool isFromCartons = false;
|
bool isFromCartons = false;
|
||||||
bool isEdiable = false;
|
bool isEdiable = false;
|
||||||
Package? _package;
|
final List<CargoType> cargoTypes=[];
|
||||||
final List<Package> packages=[Package(packageType: "2303HH"),
|
final List<CargoType> surchareItems=[];
|
||||||
Package(packageType: "540FH"),
|
|
||||||
Package(packageType: "440WFH"),
|
|
||||||
];
|
|
||||||
final List<CargoType> cargos=[CargoType(name: "Electronics"),
|
|
||||||
CargoType(name: "General"),
|
|
||||||
CargoType(name: "Dangerous"),
|
|
||||||
];
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
@@ -90,7 +85,7 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
_lengthController.addListener(_calShipmentWeight);
|
_lengthController.addListener(_calShipmentWeight);
|
||||||
_widthController.addListener(_calShipmentWeight);
|
_widthController.addListener(_calShipmentWeight);
|
||||||
_heightController.addListener(_calShipmentWeight);
|
_heightController.addListener(_calShipmentWeight);
|
||||||
//multiImgController.setImageUrls = _box.photoUrls;
|
multiImgController.setImageUrls = _box!.photos;
|
||||||
_updateBoxData();
|
_updateBoxData();
|
||||||
_loadPackages();
|
_loadPackages();
|
||||||
_loadMixCartons();
|
_loadMixCartons();
|
||||||
@@ -185,7 +180,8 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var cartonModel = Provider.of<CartonModel>(context);
|
var cartonModel = Provider.of<CartonModel>(context);
|
||||||
|
double totalWeight = _box!.cargoTypes.fold(0, (sum, value) => sum + value.weight);
|
||||||
|
double totalPieces = surchareItems.fold(0, (sum, value) => sum + value.qty);
|
||||||
// final cartonTypeBox = LocalRadioButtons(
|
// final cartonTypeBox = LocalRadioButtons(
|
||||||
// readOnly: true,
|
// readOnly: true,
|
||||||
// values: cartonModel.cartonTypesInfo,
|
// values: cartonModel.cartonTypesInfo,
|
||||||
@@ -213,11 +209,11 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
//icon: FcsIDIcon(),
|
//icon: FcsIDIcon(),
|
||||||
);
|
);
|
||||||
|
|
||||||
final fcsIDBox = DisplayText(
|
// final fcsIDBox = DisplayText(
|
||||||
text: _box!.fcsID == null ? "" : _box!.fcsID,
|
// text: _box!.fcsID == null ? "" : _box!.fcsID,
|
||||||
labelTextKey: "box.fcs.id",
|
// labelTextKey: "box.fcs.id",
|
||||||
//icon: FcsIDIcon(),
|
// //icon: FcsIDIcon(),
|
||||||
);
|
// );
|
||||||
|
|
||||||
final customerNameBox = DisplayText(
|
final customerNameBox = DisplayText(
|
||||||
text: _box!.userName == null ? "" : _box!.userName,
|
text: _box!.userName == null ? "" : _box!.userName,
|
||||||
@@ -227,11 +223,11 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
//iconData: Icons.person,
|
//iconData: Icons.person,
|
||||||
);
|
);
|
||||||
|
|
||||||
final consigneefcsIDBox = DisplayText(
|
// final consigneefcsIDBox = DisplayText(
|
||||||
text: _box!.fcsID != null ? _box!.fcsID : "",
|
// text: _box!.fcsID != null ? _box!.fcsID : "",
|
||||||
labelTextKey: "processing.fcs.id",
|
// labelTextKey: "processing.fcs.id",
|
||||||
icon: FcsIDIcon(),
|
// icon: FcsIDIcon(),
|
||||||
);
|
// );
|
||||||
|
|
||||||
final consigneeNameBox = DisplayText(
|
final consigneeNameBox = DisplayText(
|
||||||
text: _box!.senderName != null ? _box!.senderName : "",
|
text: _box!.senderName != null ? _box!.senderName : "",
|
||||||
@@ -242,44 +238,44 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
// iconData: Ionicons.document_text_outline,
|
// iconData: Ionicons.document_text_outline,
|
||||||
);
|
);
|
||||||
|
|
||||||
final consigneeBox = Container(
|
// final consigneeBox = Container(
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: [
|
// children: [
|
||||||
consigneeNameBox,
|
// consigneeNameBox,
|
||||||
IconButton(icon:Icon(Ionicons.document_text_outline),
|
// IconButton(icon:Icon(Ionicons.document_text_outline),
|
||||||
onPressed:() {},),
|
// onPressed:() {},),
|
||||||
Text("Bill to",style:TextStyle(color:Color.fromARGB(255, 57, 80, 233)))
|
// Text("Bill to",style:TextStyle(color:Color.fromARGB(255, 57, 80, 233)))
|
||||||
|
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
|
|
||||||
final shipperIDBox = Row(
|
// final shipperIDBox = Row(
|
||||||
children: <Widget>[
|
// children: <Widget>[
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: DisplayText(
|
// child: DisplayText(
|
||||||
text: _box!.senderFCSID,
|
// text: _box!.senderFCSID,
|
||||||
labelTextKey: "processing.fcs.id",
|
// labelTextKey: "processing.fcs.id",
|
||||||
icon: FcsIDIcon(),
|
// icon: FcsIDIcon(),
|
||||||
)),
|
// )),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
|
|
||||||
final shipperNamebox = DisplayText(
|
// final shipperNamebox = DisplayText(
|
||||||
text: _box!.senderName,
|
// text: _box!.senderName,
|
||||||
labelTextKey: "processing.shipper.name",
|
// labelTextKey: "processing.shipper.name",
|
||||||
maxLines: 2,
|
// maxLines: 2,
|
||||||
iconData: Icons.person,
|
// iconData: Icons.person,
|
||||||
);
|
// );
|
||||||
|
|
||||||
final shipperBox = Container(
|
// final shipperBox = Container(
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: [
|
// children: [
|
||||||
shipperIDBox,
|
// shipperIDBox,
|
||||||
shipperNamebox,
|
// shipperNamebox,
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
|
|
||||||
final lengthBox = LengthPicker(
|
final lengthBox = LengthPicker(
|
||||||
controller: _lengthController,
|
controller: _lengthController,
|
||||||
@@ -314,16 +310,154 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
labelTextKey: "box.package",
|
labelTextKey: "box.package",
|
||||||
|
|
||||||
);
|
);
|
||||||
final subPackageBox=ListView(children: packages.map((pack)=>
|
final cargosBox = Padding(
|
||||||
Card(child: Row(children: [
|
padding: const EdgeInsets.only(top: 10),
|
||||||
Container(child:Text((pack.packageType).toString()))
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||||
]),)
|
// Padding(
|
||||||
).toList(),);
|
// padding: const EdgeInsets.only(left: 5, bottom: 5, right: 20),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
LocalText(context, 'box.cargo.type',
|
||||||
|
color: Colors.black54,
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.normal),
|
||||||
|
Padding(padding: EdgeInsets.only(right: 100),
|
||||||
|
child:
|
||||||
|
Text("${removeTrailingZeros(totalWeight)} lb",
|
||||||
|
style: TextStyle(color: Colors.black54, fontSize: 15)))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
//),
|
||||||
|
Container(
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// border: Border.all(color: primaryColor),
|
||||||
|
// borderRadius: BorderRadius.circular(5),
|
||||||
|
// ),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 100),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _box!.cargoTypes.map((e) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 3),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
e.name ?? "",
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.black, fontSize: 15),
|
||||||
|
),
|
||||||
|
Text("${removeTrailingZeros(e.weight)} lb",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black, fontSize: 15))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList()),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
);
|
||||||
|
final surchargeItemBox = Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 10),
|
||||||
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||||
|
// Padding(
|
||||||
|
// padding: const EdgeInsets.only(left: 5, bottom: 5, right: 20),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
LocalText(context, 'box.surcharge.item',
|
||||||
|
color: Colors.black54,
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.normal),
|
||||||
|
Padding(padding: EdgeInsets.only(right: 100),
|
||||||
|
child:
|
||||||
|
Text("${removeTrailingZeros(totalPieces)} pcs",
|
||||||
|
style: TextStyle(color: Colors.black54, fontSize: 15)))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
//),
|
||||||
|
Container(
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// border: Border.all(color: primaryColor),
|
||||||
|
// borderRadius: BorderRadius.circular(5),
|
||||||
|
// ),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 100),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: surchareItems.map((e) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 3),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
e.name ?? "",
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.black, fontSize: 15),
|
||||||
|
),
|
||||||
|
Text("${removeTrailingZeros((e.qty).toDouble())} pc",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black, fontSize: 15))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList()),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: surchareItems.map((e) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 3),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
e.name ?? "",
|
||||||
|
style: TextStyle(color: labelColor, fontSize: 15),
|
||||||
|
),
|
||||||
|
Text("${numberFormatter.format(e.qty)} pc",
|
||||||
|
style:
|
||||||
|
TextStyle(color: labelColor, fontSize: 15))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList()),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
);
|
||||||
|
|
||||||
final img = MultiImageFile(
|
final img = MultiImageFile(
|
||||||
enabled: false,
|
enabled: false,
|
||||||
controller: multiImgController,
|
controller: multiImgController,
|
||||||
title: "Receipt File",
|
title: "Receipt File",
|
||||||
);
|
);
|
||||||
|
final billWidget
|
||||||
|
= 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))
|
||||||
|
],
|
||||||
|
)));
|
||||||
|
|
||||||
final cargoBox = DisplayText(
|
final cargoBox = DisplayText(
|
||||||
//text: "203FVH",
|
//text: "203FVH",
|
||||||
labelTextKey: "box.cargo.type",
|
labelTextKey: "box.cargo.type",
|
||||||
@@ -336,9 +470,9 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
labelTextKey: "box.carton_size",
|
labelTextKey: "box.carton_size",
|
||||||
iconData: AntDesign.CodeSandbox,
|
iconData: AntDesign.CodeSandbox,
|
||||||
);
|
);
|
||||||
final cargoTableBox = CargoTable(
|
// final cargoTableBox = CargoTable(
|
||||||
cargoTypes: _box!.cargoTypes,
|
// cargoTypes: _box!.cargoTypes,
|
||||||
);
|
// );
|
||||||
// final mixCartonNumberBox = DisplayText(
|
// final mixCartonNumberBox = DisplayText(
|
||||||
// text: _box!.mixCartonNumber,
|
// text: _box!.mixCartonNumber,
|
||||||
// labelTextKey: "box.mix.carton",
|
// labelTextKey: "box.mix.carton",
|
||||||
@@ -396,10 +530,11 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
]
|
]
|
||||||
: [],
|
: [],
|
||||||
),
|
),
|
||||||
body: Container(
|
body:
|
||||||
|
Container(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: const EdgeInsets.all(10.0),
|
||||||
child: Column( children: <Widget>[
|
child:
|
||||||
|
Column(children: [
|
||||||
|
|
||||||
Row(children:[
|
Row(children:[
|
||||||
Flexible(child:
|
Flexible(child:
|
||||||
@@ -416,104 +551,58 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
|
|
||||||
|
|
||||||
],),
|
],),
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
||||||
children: [
|
children: [
|
||||||
Flexible(child: customerNameBox,),
|
Expanded(
|
||||||
Flexible(child: consigneeNameBox),
|
child: Row(
|
||||||
|
//crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
]),
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
customerNameBox,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
CargoType().isCutomDuty == false
|
||||||
|
? 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,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
CargoType().isCutomDuty == true
|
||||||
|
? billWidget
|
||||||
|
: const SizedBox()
|
||||||
|
],
|
||||||
|
),
|
||||||
|
))
|
||||||
|
|
||||||
|
],),
|
||||||
|
|
||||||
packageBox,
|
packageBox,
|
||||||
Column(children:
|
Column(children:
|
||||||
getPackageList(packages),
|
getPackageList(_box!.packages),
|
||||||
),
|
),
|
||||||
Column(children: getCargoList(cargos),),
|
cargosBox,
|
||||||
//subPackageBox,
|
surchargeItemBox,
|
||||||
|
|
||||||
|
|
||||||
// packages.map((pack)=>
|
|
||||||
// Card(child: Row(children: [
|
|
||||||
// Container(child:Text(pack.packageType,))
|
|
||||||
// ]),)
|
|
||||||
// ).toList(),
|
|
||||||
|
|
||||||
// flex: 1,
|
|
||||||
// ),
|
|
||||||
// Expanded(
|
|
||||||
// child: IconButton(
|
|
||||||
// alignment: Alignment.centerLeft,
|
|
||||||
// iconSize: 30,
|
|
||||||
// icon: const Icon( AntDesign.qrcode),
|
|
||||||
// onPressed: () {
|
|
||||||
// // ...
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
|
|
||||||
// ],
|
|
||||||
// )),
|
|
||||||
|
|
||||||
// Padding(
|
|
||||||
// padding: EdgeInsets.only(left: 10),
|
|
||||||
// child: Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
// children: [
|
|
||||||
// Expanded(
|
|
||||||
// child: shipmentBox,
|
|
||||||
// flex: 1,
|
|
||||||
// ),
|
|
||||||
// Flexible(
|
|
||||||
// child: deliveryBox,
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// )),
|
|
||||||
// Padding(
|
|
||||||
// padding: EdgeInsets.only(left: 10),
|
|
||||||
// child: Row(
|
|
||||||
// children: [
|
|
||||||
// Flexible(
|
|
||||||
// child: customerNameBox,
|
|
||||||
// ),
|
|
||||||
// Column(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
// children: [
|
|
||||||
// Row(
|
|
||||||
// children: [consigneeNameBox,Flexible(
|
|
||||||
// child: Column(children: [
|
|
||||||
// Icon(Ionicons.document_text_outline),
|
|
||||||
// Text("Bill to", style: TextStyle(color: Colors.blue))
|
|
||||||
// ])),],
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// // child: consigneeNameBox,
|
|
||||||
// ),
|
|
||||||
// // Flexible(
|
|
||||||
// // child: Column(children: [
|
|
||||||
// // Icon(Ionicons.document_text_outline),
|
|
||||||
// // Text("Bill to", style: TextStyle(color: Colors.blue))
|
|
||||||
// // ])),
|
|
||||||
// ],
|
|
||||||
// )),
|
|
||||||
// Padding(padding: EdgeInsets.only(left:10),
|
|
||||||
// child: Flexible(child: packageBox)),
|
|
||||||
//for(int pack=0;pack<pickups.length;pack++)
|
|
||||||
|
|
||||||
// Padding(padding: EdgeInsets.only(left: 10.0),
|
|
||||||
// child:
|
|
||||||
// Text(pickups[pack],style:TextStyle(fontSize: 15,color: Colors.black))
|
|
||||||
// ),
|
|
||||||
// Padding(padding: EdgeInsets.only(left: 10),
|
|
||||||
// child: cargoBox,),
|
|
||||||
// ListView.builder(
|
|
||||||
// itemCount: cargos.length,
|
|
||||||
// itemBuilder: (BuildContext context, int index) {
|
|
||||||
// return ListTile(
|
|
||||||
// title: Text(cargos[index].key));
|
|
||||||
|
|
||||||
// }),
|
|
||||||
|
|
||||||
Flexible(child:
|
Flexible(child:
|
||||||
Padding(padding: EdgeInsets.only(left: 200.0,right: 8.0),
|
Padding(padding: EdgeInsets.only(left: 200.0,right: 8.0),
|
||||||
@@ -526,7 +615,12 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
borderRadius: BorderRadius.circular(5.0)),
|
borderRadius: BorderRadius.circular(5.0)),
|
||||||
minimumSize: Size(10, 35), //////// HERE
|
minimumSize: Size(10, 35), //////// HERE
|
||||||
),
|
),
|
||||||
onPressed: (){},
|
onPressed: (){
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
CupertinoPageRoute(builder: (context) => CartonImageUpload()),
|
||||||
|
);
|
||||||
|
},
|
||||||
child: const Text('Upload Images'),
|
child: const Text('Upload Images'),
|
||||||
),)),
|
),)),
|
||||||
img,
|
img,
|
||||||
@@ -541,18 +635,11 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
onPressed: (){},
|
onPressed: (){},
|
||||||
child: const Text('Delete Carton',style:TextStyle(fontSize: 20)),
|
child: const Text('Delete Carton',style:TextStyle(fontSize: 20)),
|
||||||
),),
|
),),
|
||||||
|
|
||||||
//_package!.photoUrls.length == 0 || _package!.photoUrls.isEmpty ? Container() : img,
|
//_package!.photoUrls.length == 0 || _package!.photoUrls.isEmpty ? Container() : img,
|
||||||
|
|
||||||
// Padding(padding: EdgeInsets.only(left: 10.0),
|
|
||||||
// child: Column(children: [
|
|
||||||
// cargos.isEmpty?Container():
|
|
||||||
// Text(cargos[cargo].key),
|
|
||||||
// Text(cargos[cargo].value),
|
|
||||||
// ]),),
|
|
||||||
|
|
||||||
//_packageList,
|
|
||||||
|
|
||||||
//LocalTitle(textKey: "box.shipment_info"),
|
//LocalTitle(textKey: "box.shipment_info"),
|
||||||
// shipmentBox,
|
// shipmentBox,
|
||||||
// isSmallBag ? mixCartonNumberBox : Container(),
|
// isSmallBag ? mixCartonNumberBox : Container(),
|
||||||
@@ -584,7 +671,7 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
// title: Text(pickups[index]),
|
// title: Text(pickups[index]),
|
||||||
// );
|
// );
|
||||||
// },)
|
// },)
|
||||||
|
|
||||||
// ])),
|
// ])),
|
||||||
// // isMixBox ? mixTypeBox : Container(),
|
// // isMixBox ? mixTypeBox : Container(),
|
||||||
// isMixBox ? LocalTitle(textKey: "box.mix_caton_title") : Container(),
|
// isMixBox ? LocalTitle(textKey: "box.mix_caton_title") : Container(),
|
||||||
@@ -620,6 +707,7 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
])
|
])
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
// ])
|
// ])
|
||||||
// )
|
// )
|
||||||
// )
|
// )
|
||||||
|
|||||||
Reference in New Issue
Block a user