完成合同截止模块

hmxc
张萌 3 years ago
parent 93219dd166
commit cacbc52377

@ -1,12 +1,24 @@
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/ui/profile/house/contract_stop/refund_bond_page.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/others/finish_result_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
class PayResultPage extends StatefulWidget {
PayResultPage({Key? key}) : super(key: key);
final String name;
final double bond;
final String date;
final int id;
PayResultPage(
{Key? key,
required this.name,
required this.bond,
required this.date,
required this.id})
: super(key: key);
@override
_PayResultPageState createState() => _PayResultPageState();
@ -35,7 +47,11 @@ class _PayResultPageState extends State<PayResultPage> {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.w)),
onPressed: () async {
Get.to(() => RefundBondPage(
name: widget.name,
bond: widget.bond,
date: widget.date,
id: widget.id));
},
child: '申请保证金退还'.text.color(ktextPrimary).size(36.sp).make(),
),

@ -77,7 +77,8 @@ class _PaySuerplusRentPageState extends State<PaySuerplusRentPage> {
bool result =
await PayUtil().callAliPay(code, API.pay.leaseRentCheck);
if (result) {
Get.to(() => PayFinishPage());
Get.back();
Get.off(() => PayFinishPage());
}
} catch (e) {
LoggerData.addData(e);

@ -4,6 +4,7 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/bottom_button.dart';
import 'package:aku_community/widget/others/bee_input_row.dart';
import 'package:aku_community/widget/others/house_head_card.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
@ -30,6 +31,7 @@ class _RefundBondPageState extends State<RefundBondPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
bgColor: Colors.white,
title: '保证金信息',
body: ListView(
children: [
@ -50,11 +52,13 @@ class _RefundBondPageState extends State<RefundBondPage> {
),
bottomNavi: BottomButton(
onPressed: () async {
Function cancel = BotToast.showLoading();
bool result = await HouseFunc().refundBond(widget.id);
if (result) {
Get.back();
Get.back();
}
cancel();
},
child: '提交退款申请'.text.size(32.sp).color(ktextPrimary).bold.make()),
);

@ -1,12 +1,27 @@
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/ui/profile/house/contract_stop/refund_bond_page.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/others/finish_result_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
class RefundBondResultPage extends StatefulWidget {
///```UserTool.appProveider.selectedHouse```
final int status;
RefundBondResultPage({Key? key, required this.status}) : super(key: key);
final String name;
final double bond;
final String date;
final int id;
RefundBondResultPage(
{Key? key,
required this.status,
required this.name,
required this.bond,
required this.date,
required this.id})
: super(key: key);
@override
_RefundBondResultPageState createState() => _RefundBondResultPageState();
@ -42,6 +57,25 @@ class _RefundBondResultPageState extends State<RefundBondResultPage> {
48.w.heightBox,
statusString.text.black.size(36.sp).make(),
96.w.heightBox,
widget.status == 16
? MaterialButton(
elevation: 0,
minWidth: 702.w,
height: 98.w,
color: kPrimaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.w)),
onPressed: () async {
Get.to(() => RefundBondPage(
name: widget.name,
bond: widget.bond,
date: widget.date,
id: widget.id));
},
child:
'申请保证金退还'.text.color(ktextPrimary).size(36.sp).make(),
)
: SizedBox(),
],
),
),

@ -1,5 +1,6 @@
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/models/house/lease_detail_model.dart';
import 'package:aku_community/ui/profile/house/contract_stop/contract_stop_page.dart';
import 'package:aku_community/ui/profile/house/house_func.dart';
import 'package:aku_community/ui/profile/house/contract_stop/pay_surplus_rent_page.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
@ -32,7 +33,8 @@ class _SubmitFinishPageState extends State<SubmitFinishPage> {
return '未知';
}
}
String get contentString {
String get contentString {
switch (widget.status) {
case 11:
return '您提交的申请正在人工审核中,请耐心等待';
@ -61,31 +63,55 @@ class _SubmitFinishPageState extends State<SubmitFinishPage> {
48.w.heightBox,
contentString.text.black.size(28.sp).make(),
96.w.heightBox,
widget.status != 13
? SizedBox()
: MaterialButton(
elevation: 0,
minWidth: 702.w,
height: 98.w,
color: kPrimaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.w)),
onPressed: () async {
LeaseDetailModel? model =
await HouseFunc().leaseDetail(widget.leaseId);
if (model != null) {
Get.to(() => PaySuerplusRentPage(
id:widget.leaseId,
time: model.notMeterRentDate ?? '',
amount: model.requiredRent ?? 0,
));
}
},
child: '去支付'.text.color(ktextPrimary).size(36.sp).make(),
),
butttons(),
],
),
),
);
}
Widget butttons() {
switch (widget.status) {
case 11:
return SizedBox();
case 12:
return MaterialButton(
elevation: 0,
minWidth: 702.w,
height: 98.w,
color: kPrimaryColor,
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.w)),
onPressed: () async {
Get.to(() => ContractStopPage());
},
child: '重新申请'.text.color(ktextPrimary).size(36.sp).make(),
);
case 13:
return MaterialButton(
elevation: 0,
minWidth: 702.w,
height: 98.w,
color: kPrimaryColor,
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.w)),
onPressed: () async {
LeaseDetailModel? model =
await HouseFunc().leaseDetail(widget.leaseId);
if (model != null) {
Get.to(() => PaySuerplusRentPage(
id: widget.leaseId,
time: model.notMeterRentDate ?? '',
amount: model.requiredRent ?? 0,
));
}
},
child: '结清剩余租金'.text.color(ktextPrimary).size(36.sp).make(),
);
default:
return SizedBox();
}
}
}

@ -236,12 +236,23 @@ class _HouseOwnersPageState extends State<HouseOwnersPage> {
() => SubmitFinishPage(status: model.status, leaseId: model.id));
break;
case 14:
Get.to(() => PayResultPage());
Get.to(() => PayResultPage(
name: model.name,
bond: model.margin.toDouble(),
date: DateTime.now().toString(),
id: model.id,
));
break;
case 15:
case 16:
case 17:
Get.to(() => RefundBondResultPage(status: model.status));
Get.to(() => RefundBondResultPage(
status: model.status,
name: model.name,
bond: model.margin.toDouble(),
date: DateTime.now().toString(),
id: model.id,
));
break;
default:
}

Loading…
Cancel
Save