update widgets
This commit is contained in:
@@ -500,14 +500,12 @@ class _BoxEditorState extends State<BoxEditor> {
|
|||||||
widget.box == null
|
widget.box == null
|
||||||
? Container()
|
? Container()
|
||||||
: Center(child: nameWidget(_box.packageNumber)),
|
: Center(child: nameWidget(_box.packageNumber)),
|
||||||
Container(
|
SizedBox(
|
||||||
padding: EdgeInsets.only(top: 10),
|
height: 10,
|
||||||
child: TitleWithAddButton(
|
),
|
||||||
|
TitleWithAddButton(
|
||||||
titleKey: "box.shipment_info",
|
titleKey: "box.shipment_info",
|
||||||
),
|
),
|
||||||
),
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
shipmentBox,
|
shipmentBox,
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
@@ -519,8 +517,6 @@ class _BoxEditorState extends State<BoxEditor> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
Divider(),
|
Divider(),
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.only(top: 10, left: 10),
|
padding: EdgeInsets.only(top: 10, left: 10),
|
||||||
@@ -582,15 +578,11 @@ class _BoxEditorState extends State<BoxEditor> {
|
|||||||
TitleWithAddButton(
|
TitleWithAddButton(
|
||||||
titleKey: "box.dimension",
|
titleKey: "box.dimension",
|
||||||
),
|
),
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
shipmentWeightBox,
|
shipmentWeightBox,
|
||||||
widthBox,
|
widthBox,
|
||||||
heightBox,
|
heightBox,
|
||||||
lengthBox,
|
lengthBox,
|
||||||
SizedBox(height: 25),
|
SizedBox(height: 25),
|
||||||
],
|
|
||||||
),
|
|
||||||
Divider(),
|
Divider(),
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.only(left: 10, right: 10),
|
padding: EdgeInsets.only(left: 10, right: 10),
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import 'package:fcs/pages/widgets/display_text.dart';
|
|||||||
import 'package:fcs/pages/widgets/input_text.dart';
|
import 'package:fcs/pages/widgets/input_text.dart';
|
||||||
import 'package:fcs/pages/widgets/local_dropdown.dart';
|
import 'package:fcs/pages/widgets/local_dropdown.dart';
|
||||||
import 'package:fcs/pages/widgets/local_text.dart';
|
import 'package:fcs/pages/widgets/local_text.dart';
|
||||||
|
import 'package:fcs/pages/widgets/local_title.dart';
|
||||||
import 'package:fcs/pages/widgets/multi_img_controller.dart';
|
import 'package:fcs/pages/widgets/multi_img_controller.dart';
|
||||||
import 'package:fcs/pages/widgets/multi_img_file.dart';
|
import 'package:fcs/pages/widgets/multi_img_file.dart';
|
||||||
import 'package:fcs/pages/widgets/my_data_table.dart';
|
import 'package:fcs/pages/widgets/my_data_table.dart';
|
||||||
@@ -196,13 +197,11 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
|||||||
title: LocalText(context, 'invoice.form.title',
|
title: LocalText(context, 'invoice.form.title',
|
||||||
color: primaryColor, fontSize: 20),
|
color: primaryColor, fontSize: 20),
|
||||||
),
|
),
|
||||||
body: Card(
|
body: Padding(
|
||||||
child: Column(
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: ListView(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
LocalTitle(textKey: "package.create.name"),
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(10.0),
|
|
||||||
child: ListView(children: <Widget>[
|
|
||||||
DisplayText(
|
DisplayText(
|
||||||
labelTextKey: 'invoice.date',
|
labelTextKey: 'invoice.date',
|
||||||
iconData: Icons.date_range,
|
iconData: Icons.date_range,
|
||||||
@@ -224,8 +223,8 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
|||||||
)),
|
)),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.search, color: primaryColor),
|
icon: Icon(Icons.search, color: primaryColor),
|
||||||
onPressed: () => searchUser(context,
|
onPressed: () =>
|
||||||
callbackUserSelect: (u) {
|
searchUser(context, callbackUserSelect: (u) {
|
||||||
setState(() {
|
setState(() {
|
||||||
this.user = u;
|
this.user = u;
|
||||||
});
|
});
|
||||||
@@ -249,29 +248,12 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
|||||||
iconData: Icons.av_timer,
|
iconData: Icons.av_timer,
|
||||||
labelTextKey: 'invoice.status'),
|
labelTextKey: 'invoice.status'),
|
||||||
SizedBox(height: 30),
|
SizedBox(height: 30),
|
||||||
Container(
|
LocalTitle(textKey: "invoice.box_info"),
|
||||||
child: Row(
|
SingleChildScrollView(
|
||||||
children: [
|
|
||||||
Icon(MaterialCommunityIcons.package,
|
|
||||||
color: primaryColor),
|
|
||||||
SizedBox(width: 10),
|
|
||||||
LocalText(
|
|
||||||
context,
|
|
||||||
"invoice.box_info",
|
|
||||||
color: Colors.grey,
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
padding: const EdgeInsets.only(top: 15),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
child: MyDataTable(
|
child: MyDataTable(
|
||||||
headingRowHeight: 40,
|
headingRowHeight: 40,
|
||||||
columnSpacing: 20,
|
// columnSpacing: 20,
|
||||||
columns: [
|
columns: [
|
||||||
MyDataColumn(
|
MyDataColumn(
|
||||||
label: Text(''),
|
label: Text(''),
|
||||||
@@ -296,28 +278,9 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
|||||||
rows: getBoxRow(context),
|
rows: getBoxRow(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
SizedBox(height: 40),
|
SizedBox(height: 40),
|
||||||
Container(
|
LocalTitle(textKey: "invoice.cargo_type"),
|
||||||
child: Row(
|
Column(children: getCargoTableByBox(context)),
|
||||||
children: [
|
|
||||||
Icon(MaterialCommunityIcons.briefcase_check,
|
|
||||||
color: primaryColor),
|
|
||||||
SizedBox(width: 10),
|
|
||||||
LocalText(
|
|
||||||
context,
|
|
||||||
"invoice.cargo_type",
|
|
||||||
color: Colors.grey,
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
padding: const EdgeInsets.only(top: 10),
|
|
||||||
child: Column(children: getCargoTableByBox(context)),
|
|
||||||
),
|
|
||||||
SizedBox(height: 20),
|
SizedBox(height: 20),
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.only(top: 5, left: 18),
|
padding: EdgeInsets.only(top: 5, left: 18),
|
||||||
@@ -368,9 +331,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
|
|||||||
Icon(Icons.add, color: primaryColor),
|
Icon(Icons.add, color: primaryColor),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: Container()
|
: Container(),
|
||||||
]),
|
|
||||||
)),
|
|
||||||
widget.invoice == null
|
widget.invoice == null
|
||||||
? fcsButton(
|
? fcsButton(
|
||||||
context, getLocalString(context, 'invoice.btn_create'))
|
context, getLocalString(context, 'invoice.btn_create'))
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ class _ShipmentBoxEditorState extends State<ShipmentBoxEditor> {
|
|||||||
double l = double.parse(_lengthCtl.text, (s) => 0);
|
double l = double.parse(_lengthCtl.text, (s) => 0);
|
||||||
double w = double.parse(_widthCtl.text, (s) => 0);
|
double w = double.parse(_widthCtl.text, (s) => 0);
|
||||||
double h = double.parse(_heightCtl.text, (s) => 0);
|
double h = double.parse(_heightCtl.text, (s) => 0);
|
||||||
print("$l $w $h");
|
|
||||||
setState(() {
|
setState(() {
|
||||||
shipmentWeight = l * w * h / volumetricRatio;
|
shipmentWeight = l * w * h / volumetricRatio;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -239,7 +239,6 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
children: getBoxList(context, boxModel.boxes),
|
children: getBoxList(context, boxModel.boxes),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user