Merge branch 'master' of https://git.mokkon.com/tzw/fcs
This commit is contained in:
@@ -315,27 +315,6 @@ 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),
|
||||||
@@ -421,19 +400,7 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
const SizedBox(height: 30),
|
const SizedBox(height: 30),
|
||||||
img,
|
img,
|
||||||
const SizedBox(height: 40),
|
const SizedBox(height: 40),
|
||||||
_carton.status == carton_processing_status
|
deleteBtn,
|
||||||
? 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)
|
||||||
]))));
|
]))));
|
||||||
}
|
}
|
||||||
@@ -479,79 +446,6 @@ class _CartonInfoState extends State<CartonInfo> {
|
|||||||
_init();
|
_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() {
|
_delete() {
|
||||||
showConfirmDialog(context, "box.delete.confirm", () {
|
showConfirmDialog(context, "box.delete.confirm", () {
|
||||||
_deleteCarton();
|
_deleteCarton();
|
||||||
|
|||||||
Reference in New Issue
Block a user