From 778aa6da81ebc10bbfdca7fedd7c58df1dc151b2 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Wed, 16 Jun 2021 11:14:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E4=BA=8B=E6=8A=A5=E4=BF=AE=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9C=8D=E5=8A=A1=E7=B1=BB=E5=9E=8B=E5=88=A4=E6=96=AD?= =?UTF-8?q?=EF=BC=88=E6=97=A0=E5=81=BF=E6=9C=8D=E5=8A=A1=E6=97=A0=E9=9C=80?= =?UTF-8?q?=E4=BB=98=E6=AC=BE=E5=8D=B3=E5=8F=AF=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../things_page/widget/fixed_detail_page.dart | 25 +++++++++++++++++-- .../market/goods/goods_order_detail_page.dart | 2 +- lib/ui/market/market_page.dart | 2 +- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/lib/pages/things_page/widget/fixed_detail_page.dart b/lib/pages/things_page/widget/fixed_detail_page.dart index 16a75fe4..ff2757af 100644 --- a/lib/pages/things_page/widget/fixed_detail_page.dart +++ b/lib/pages/things_page/widget/fixed_detail_page.dart @@ -411,6 +411,20 @@ class _FixedDetailPageState extends State { cancel(); } + Future _comPleteWithoutPay() async { + Function cancel = BotToast.showLoading(); + BaseModel baseModel = + await ManagerFunc.reportRepairComplete(_model.appReportRepairVo.id); + if ((baseModel.status ?? false)) { + Get.back(); + Get.back(); + } else { + Get.back(); + BotToast.showText(text: baseModel.message!); + } + cancel(); + } + Widget _showBottomSheet(FixDetailModel model) { return BottomSheet( builder: (BuildContext context) { @@ -495,10 +509,17 @@ class _FixedDetailPageState extends State { minWidth: 375.w, onPressed: _canComplete(_model.appReportRepairVo.status) ? () async { - await _payOnAliy(); + _model.appDispatchListVo!.type == 1 + ? await _comPleteWithoutPay() + : await _payOnAliy(); } : null, - child: '立即付款'.text.size(32.sp).bold.make(), + child: + (_model.appDispatchListVo!.type == 1 ? '确认完成' : '立即付款') + .text + .size(32.sp) + .bold + .make(), padding: EdgeInsets.symmetric(vertical: 26.w), materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, elevation: 0, diff --git a/lib/ui/market/goods/goods_order_detail_page.dart b/lib/ui/market/goods/goods_order_detail_page.dart index f947c8f5..cbf0bddb 100644 --- a/lib/ui/market/goods/goods_order_detail_page.dart +++ b/lib/ui/market/goods/goods_order_detail_page.dart @@ -103,7 +103,7 @@ class _GoodsOrderDetailPageState extends State { Get.off(PayFinishPage()); } } else { - BotToast.showText(text: '未能生成订单'); + BotToast.showText(text: baseModel.message!); } cancel(); }, diff --git a/lib/ui/market/market_page.dart b/lib/ui/market/market_page.dart index 90f47a99..260e68cf 100644 --- a/lib/ui/market/market_page.dart +++ b/lib/ui/market/market_page.dart @@ -272,7 +272,7 @@ class _MarketPageState extends State _pageNum++; await loadMarketInfo(); if (_pageCount <= _pageNum) { - _refreshController.finishLoad(noMore: true); + _refreshController.finishLoad(noMore: false); } setState(() {}); },