|
@@ -101,14 +101,22 @@ class ContractTemplateController extends FControllerBase {
|
|
|
}
|
|
|
|
|
|
Future<void> submitContract() async {
|
|
|
- if (!kIsOnline) {
|
|
|
- // 不支持离线签约
|
|
|
- PromptBox.toast("请检查网络连接");
|
|
|
- return;
|
|
|
+ Store.app.busy = true;
|
|
|
+ try {
|
|
|
+ if (!kIsOnline) {
|
|
|
+ // 不支持离线签约
|
|
|
+ PromptBox.toast("请检查网络连接");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ logger.i(
|
|
|
+ "ContractTemplateController submitContract,patient.code:${patient.code}");
|
|
|
+ await createContractRecord();
|
|
|
+ } catch (e) {
|
|
|
+ logger.i(
|
|
|
+ "ContractTemplateController submitContract fail,patient.code:${patient.code}");
|
|
|
}
|
|
|
- logger.i(
|
|
|
- "ContractTemplateController submitContract,patient.code:${patient.code}");
|
|
|
- await createContractRecord();
|
|
|
+
|
|
|
+ Store.app.busy = false;
|
|
|
Get.back();
|
|
|
await Future.delayed(const Duration(milliseconds: 100));
|
|
|
Get.back();
|