update fcs-shipmentinfo,cartoninfo and pinlogin
This commit is contained in:
@@ -135,21 +135,21 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30),
|
||||
child: LocalButton(
|
||||
textKey: "FCSshipment.process.btn",
|
||||
callBack: () {},
|
||||
callBack: _process,
|
||||
),
|
||||
);
|
||||
final arriveBtn = Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30),
|
||||
child: LocalButton(
|
||||
textKey: "FCSshipment.arrive.btn",
|
||||
callBack: () {},
|
||||
callBack: _arrive,
|
||||
),
|
||||
);
|
||||
final invoiceBtn = Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30),
|
||||
child: LocalButton(
|
||||
textKey: "FCSshipment.invoice.btn",
|
||||
callBack: () {},
|
||||
callBack: _invoice,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -281,6 +281,30 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
});
|
||||
}
|
||||
|
||||
_process() {
|
||||
showConfirmDialog(context, "FCSshipment.process.confirm", () {
|
||||
_processFcsShipment();
|
||||
});
|
||||
}
|
||||
|
||||
_processFcsShipment() async {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
try {
|
||||
FcsShipmentModel fcsShipmentModel =
|
||||
Provider.of<FcsShipmentModel>(context, listen: false);
|
||||
await fcsShipmentModel.process(_fcsShipment!.id!);
|
||||
Navigator.pop(context, true);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString());
|
||||
} finally {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
_ship() {
|
||||
showConfirmDialog(context, "FCSshipment.ship.confirm", () {
|
||||
_shipFcsShipment();
|
||||
@@ -305,6 +329,54 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
}
|
||||
}
|
||||
|
||||
_arrive() {
|
||||
showConfirmDialog(context, "FCSshipment.arrive.confirm", () {
|
||||
_arriveFcsShipment();
|
||||
});
|
||||
}
|
||||
|
||||
_arriveFcsShipment() async {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
try {
|
||||
FcsShipmentModel fcsShipmentModel =
|
||||
Provider.of<FcsShipmentModel>(context, listen: false);
|
||||
await fcsShipmentModel.arrive(_fcsShipment!.id!);
|
||||
Navigator.pop(context, true);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString());
|
||||
} finally {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
_invoice() {
|
||||
showConfirmDialog(context, "FCSshipment.invoice.confirm", () {
|
||||
_invoiceFcsShipment();
|
||||
});
|
||||
}
|
||||
|
||||
_invoiceFcsShipment() async {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
try {
|
||||
FcsShipmentModel fcsShipmentModel =
|
||||
Provider.of<FcsShipmentModel>(context, listen: false);
|
||||
await fcsShipmentModel.invoice(_fcsShipment!.id!);
|
||||
Navigator.pop(context, true);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString());
|
||||
} finally {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
_showPDF(int id) async {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
|
||||
Reference in New Issue
Block a user