This commit is contained in:
tzw
2024-02-22 17:16:45 +06:30
5 changed files with 205 additions and 6 deletions

View File

@@ -358,6 +358,12 @@
"box.delete.btn":"Delete carton", "box.delete.btn":"Delete carton",
"box.update_title":"Edit carton", "box.update_title":"Edit carton",
"box.update.btn":"Update carton", "box.update.btn":"Update carton",
"box.ship.btn":"Ship this Carton",
"box.arrive.btn":"Arrive this Carton",
"box.invoice.btn":"Invoice this Carton",
"box.ship.confirm":"Confirm ship?",
"box.arrive.confirm":"Confirm arrive?",
"box.invoice.confirm":"Confirm invoice?",
"Boxes End ================================================================":"", "Boxes End ================================================================":"",
"Delivery Start ================================================================":"", "Delivery Start ================================================================":"",
@@ -400,6 +406,9 @@
"FCSshipment.cancel.confirm":"Cancel this shipment?", "FCSshipment.cancel.confirm":"Cancel this shipment?",
"FCSshipment.carton":"Cartons", "FCSshipment.carton":"Cartons",
"FCSshipment.package":"Packages", "FCSshipment.package":"Packages",
"FCSshipment.process.confirm":"Confirm process?",
"FCSshipment.arrive.confirm":"Confirm arrive?",
"FCSshipment.invoice.confirm":"Confirm invoice?",
"FCS Shipment End ================================================================":"", "FCS Shipment End ================================================================":"",
"Shipment Start ================================================================":"", "Shipment Start ================================================================":"",
@@ -458,6 +467,7 @@
"shipment.confirm.complete.confirm":"Complete confirm?", "shipment.confirm.complete.confirm":"Complete confirm?",
"shipment.receive.complete.btn":"Complete receive", "shipment.receive.complete.btn":"Complete receive",
"shipment.receive.complete.confirm":"Complete receive?", "shipment.receive.complete.confirm":"Complete receive?",
"Shipment End ================================================================":"", "Shipment End ================================================================":"",
"Rate Start ================================================================":"", "Rate Start ================================================================":"",

View File

@@ -358,6 +358,12 @@
"box.delete.btn":"Delete carton", "box.delete.btn":"Delete carton",
"box.update_title":"Edit carton", "box.update_title":"Edit carton",
"box.update.btn":"Update carton", "box.update.btn":"Update carton",
"box.ship.btn":"Ship this Carton",
"box.arrive.btn":"Arrive this Carton",
"box.invoice.btn":"Invoice this Carton",
"box.ship.confirm":"ပို့ဆောင်မှုကို အတည်ပြုပါ ?",
"box.arrive.confirm":"ရောက်ရှိကြောင်း အတည်ပြုပါ ?",
"box.invoice.confirm":"ပြေစာ အတည်ပြုပါ ?",
"Boxes End ================================================================":"", "Boxes End ================================================================":"",
"Delivery Start ================================================================":"", "Delivery Start ================================================================":"",
@@ -403,6 +409,9 @@
"FCSshipment.popupmenu.shipped":"Shipped shipments", "FCSshipment.popupmenu.shipped":"Shipped shipments",
"FCSshipment.carton":"FCS ပုံးများ", "FCSshipment.carton":"FCS ပုံးများ",
"FCSshipment.package":"FCS အထုပ်", "FCSshipment.package":"FCS အထုပ်",
"FCSshipment.process.confirm":"လုပ်ငန်းစဉ်ကို အတည်ပြုပါ ?",
"FCSshipment.arrive.confirm":"ရောက်ရှိကြောင်း အတည်ပြုပါ ?",
"FCSshipment.invoice.confirm":"ပြေစာအတည်ပြုပါ ?",
"FCS Shipment End ================================================================":"", "FCS Shipment End ================================================================":"",
"Shipment Start ================================================================":"", "Shipment Start ================================================================":"",
@@ -461,6 +470,7 @@
"shipment.confirm.complete.confirm":"Complete confirm?", "shipment.confirm.complete.confirm":"Complete confirm?",
"shipment.receive.complete.btn":"Complete receive", "shipment.receive.complete.btn":"Complete receive",
"shipment.receive.complete.confirm":"Complete receive?", "shipment.receive.complete.confirm":"Complete receive?",
"Shipment End ================================================================":"", "Shipment End ================================================================":"",
"Rate Start ================================================================":"", "Rate Start ================================================================":"",

View File

@@ -315,6 +315,27 @@ class _CartonInfoState extends State<CartonInfo> {
child: LocalText(context, "box.imageupload.title", child: LocalText(context, "box.imageupload.title",
color: Colors.white, fontSize: 14)), color: Colors.white, fontSize: 14)),
); );
final shipBtn = Padding(
padding: const EdgeInsets.symmetric(horizontal: 30),
child: LocalButton(
color: primaryColor,
textKey: "box.ship.btn",
callBack: _ship,
));
final arriveBtn = Padding(
padding: const EdgeInsets.symmetric(horizontal: 30),
child: LocalButton(
color: primaryColor,
textKey: "box.arrive.btn",
callBack: _arrive,
));
final invoiceBtn = Padding(
padding: const EdgeInsets.symmetric(horizontal: 30),
child: LocalButton(
color: primaryColor,
textKey: "box.invoice.btn",
callBack: _invoice,
));
final deleteBtn = Padding( final deleteBtn = Padding(
padding: const EdgeInsets.symmetric(horizontal: 30), padding: const EdgeInsets.symmetric(horizontal: 30),
@@ -397,9 +418,22 @@ class _CartonInfoState extends State<CartonInfo> {
_cargoTypes.isEmpty ? const SizedBox() : cargosBox, _cargoTypes.isEmpty ? const SizedBox() : cargosBox,
_surchareItems.isEmpty ? const SizedBox() : surchargeItemBox, _surchareItems.isEmpty ? const SizedBox() : surchargeItemBox,
uploadImageBtn, uploadImageBtn,
const SizedBox(height: 30),
img, img,
const SizedBox(height: 15), const SizedBox(height: 40),
deleteBtn, _carton.status == carton_processing_status
? shipBtn
: Container(),
const SizedBox(height: 40),
_carton.status == carton_processing_status
? deleteBtn
: Container(),
_carton.status == carton_arrived_status
? arriveBtn
: Container(),
_carton.status == carton_arrived_status
? invoiceBtn
: Container(),
const SizedBox(height: 20) const SizedBox(height: 20)
])))); ]))));
} }
@@ -446,6 +480,78 @@ class _CartonInfoState extends State<CartonInfo> {
} }
} }
_ship() {
showConfirmDialog(context, "box.ship.confirm", () {
_shipCarton();
});
}
_shipCarton() async {
setState(() {
_isLoading = true;
});
try {
// CartonModel cartonModel =
// Provider.of<CartonModel>(context, listen: false);
//await cartonModel.ship(_carton.id!);
Navigator.pop(context, true);
} catch (e) {
showMsgDialog(context, "Error", e.toString());
} finally {
setState(() {
_isLoading = false;
});
}
}
_arrive() {
showConfirmDialog(context, "box.arrive.confirm", () {
_arriveCarton();
});
}
_arriveCarton() async {
setState(() {
_isLoading = true;
});
try {
// CartonModel cartonModel =
// Provider.of<CartonModel>(context, listen: false);
//await cartonModel.ship(_carton.id!);
Navigator.pop(context, true);
} catch (e) {
showMsgDialog(context, "Error", e.toString());
} finally {
setState(() {
_isLoading = false;
});
}
}
_invoice() {
showConfirmDialog(context, "box.invoice.confirm", () {
_invoiceCarton();
});
}
_invoiceCarton() async {
setState(() {
_isLoading = true;
});
try {
// CartonModel cartonModel =
// Provider.of<CartonModel>(context, listen: false);
//await cartonModel.ship(_carton.id!);
Navigator.pop(context, true);
} catch (e) {
showMsgDialog(context, "Error", e.toString());
} finally {
setState(() {
_isLoading = false;
});
}
}
_delete() { _delete() {
showConfirmDialog(context, "box.delete.confirm", () { showConfirmDialog(context, "box.delete.confirm", () {
_deleteCarton(); _deleteCarton();

View File

@@ -135,21 +135,21 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
padding: const EdgeInsets.symmetric(horizontal: 30), padding: const EdgeInsets.symmetric(horizontal: 30),
child: LocalButton( child: LocalButton(
textKey: "FCSshipment.process.btn", textKey: "FCSshipment.process.btn",
callBack: () {}, callBack: _process,
), ),
); );
final arriveBtn = Padding( final arriveBtn = Padding(
padding: const EdgeInsets.symmetric(horizontal: 30), padding: const EdgeInsets.symmetric(horizontal: 30),
child: LocalButton( child: LocalButton(
textKey: "FCSshipment.arrive.btn", textKey: "FCSshipment.arrive.btn",
callBack: () {}, callBack: _arrive,
), ),
); );
final invoiceBtn = Padding( final invoiceBtn = Padding(
padding: const EdgeInsets.symmetric(horizontal: 30), padding: const EdgeInsets.symmetric(horizontal: 30),
child: LocalButton( child: LocalButton(
textKey: "FCSshipment.invoice.btn", 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() { _ship() {
showConfirmDialog(context, "FCSshipment.ship.confirm", () { showConfirmDialog(context, "FCSshipment.ship.confirm", () {
_shipFcsShipment(); _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 { _showPDF(int id) async {
setState(() { setState(() {
_isLoading = true; _isLoading = true;

View File

@@ -44,10 +44,11 @@ class _PinLoginPageState extends State<PinLoginPage> {
cursorColor: primaryColor, cursorColor: primaryColor,
keyboardType: TextInputType.text, keyboardType: TextInputType.text,
decoration: new InputDecoration( decoration: new InputDecoration(
prefix: Text( prefixIcon: Text(
prefixText, prefixText,
style: TextStyle(color: Colors.black), style: TextStyle(color: Colors.black),
), ),
prefixIconConstraints: BoxConstraints(minWidth: 0, minHeight: 0),
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
labelStyle: newLabelStyle(color: Colors.black54, fontSize: 17), labelStyle: newLabelStyle(color: Colors.black54, fontSize: 17),
enabledBorder: UnderlineInputBorder( enabledBorder: UnderlineInputBorder(