Merge branch 'master' of sma/fcs into master
This commit is contained in:
@@ -315,27 +315,6 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
child: LocalText(context, "box.imageupload.title",
|
||||
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(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30),
|
||||
@@ -421,19 +400,7 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
const SizedBox(height: 30),
|
||||
img,
|
||||
const SizedBox(height: 40),
|
||||
_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(),
|
||||
deleteBtn,
|
||||
const SizedBox(height: 20)
|
||||
]))));
|
||||
}
|
||||
@@ -479,79 +446,6 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
_init();
|
||||
}
|
||||
}
|
||||
|
||||
_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() {
|
||||
showConfirmDialog(context, "box.delete.confirm", () {
|
||||
_deleteCarton();
|
||||
|
||||
Reference in New Issue
Block a user