diff --git a/lib/ui/profile/house/contract_stop/pay_result_page.dart b/lib/ui/profile/house/contract_stop/pay_result_page.dart index d25f8c86..8eb2dd6d 100644 --- a/lib/ui/profile/house/contract_stop/pay_result_page.dart +++ b/lib/ui/profile/house/contract_stop/pay_result_page.dart @@ -20,7 +20,7 @@ class _PayResultPageState extends State { body: Center( child: Column( children: [ - 76.w.heightBox, + 276.w.heightBox, FinishResultImage( status: true, ), @@ -35,7 +35,7 @@ class _PayResultPageState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8.w)), onPressed: () async { - + }, child: '申请保证金退还'.text.color(ktextPrimary).size(36.sp).make(), ), diff --git a/lib/ui/profile/house/contract_stop/pay_surplus_rent_page.dart b/lib/ui/profile/house/contract_stop/pay_surplus_rent_page.dart index 43308198..2a1bf49d 100644 --- a/lib/ui/profile/house/contract_stop/pay_surplus_rent_page.dart +++ b/lib/ui/profile/house/contract_stop/pay_surplus_rent_page.dart @@ -15,6 +15,7 @@ import 'package:get/get.dart'; import 'package:power_logger/power_logger.dart'; import 'package:velocity_x/velocity_x.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:aku_community/extensions/widget_list_ext.dart'; class PaySuerplusRentPage extends StatefulWidget { ///不再计租时间 @@ -38,28 +39,33 @@ class _PaySuerplusRentPageState extends State { Widget build(BuildContext context) { return BeeScaffold( title: '核对信息', + bodyColor: Colors.white, body: ListView( children: [ HouseHeadCard(context: context), - BeeInputRow.button( - title: '不再计租时间', - hintText: - DateUtil.formatDateStr(widget.time, format: 'yyyy-MM-dd'), - onPressed: () {}), - BeeInputRow.button( - title: '剩余需结清房租(元)', - hintText: widget.amount.toStringAsFixed(2), - onPressed: () {}), - BeeInputRow.button( - title: '支付方式', - hintText: _payMethod, - onPressed: () { - Get.bottomSheet(PayMethodBottomSheet(onChoose: (value) { - _payMethod = value; - Get.back(); - setState(() {}); - })); - }) + Column( + children: [ + BeeInputRow.button( + title: '不再计租时间', + hintText: + DateUtil.formatDateStr(widget.time, format: 'yyyy-MM-dd'), + onPressed: () {}), + BeeInputRow.button( + title: '剩余需结清房租(元)', + hintText: widget.amount.toStringAsFixed(2), + onPressed: () {}), + BeeInputRow.button( + title: '支付方式', + hintText: _payMethod, + onPressed: () { + Get.bottomSheet(PayMethodBottomSheet(onChoose: (value) { + _payMethod = value; + Get.back(); + setState(() {}); + })); + }) + ].sepWidget(separate: 24.w.heightBox), + ).paddingSymmetric(horizontal: 32.w) ], ), bottomNavi: BottomButton( diff --git a/lib/ui/profile/house/contract_stop/refund_bond_page.dart b/lib/ui/profile/house/contract_stop/refund_bond_page.dart index ad7ba24e..639efde8 100644 --- a/lib/ui/profile/house/contract_stop/refund_bond_page.dart +++ b/lib/ui/profile/house/contract_stop/refund_bond_page.dart @@ -34,14 +34,18 @@ class _RefundBondPageState extends State { body: ListView( children: [ HouseHeadCard(context: context), - BeeInputRow.button( - title: '承租人姓名', hintText: widget.name, onPressed: () {}), - BeeInputRow.button( - title: '保证金', - hintText: widget.bond.toStringAsFixed(2), - onPressed: () {}), - BeeInputRow.button( - title: '保证金缴纳时间', hintText: widget.date, onPressed: () {}), + Column( + children: [ + BeeInputRow.button( + title: '承租人姓名', hintText: widget.name, onPressed: () {}), + BeeInputRow.button( + title: '保证金', + hintText: widget.bond.toStringAsFixed(2), + onPressed: () {}), + BeeInputRow.button( + title: '保证金缴纳时间', hintText: widget.date, onPressed: () {}), + ], + ).paddingSymmetric(horizontal: 32.w) ], ), bottomNavi: BottomButton( diff --git a/lib/ui/profile/house/contract_stop/refund_bond_result_page.dart b/lib/ui/profile/house/contract_stop/refund_bond_result_page.dart index 239533b9..2b6838ba 100644 --- a/lib/ui/profile/house/contract_stop/refund_bond_result_page.dart +++ b/lib/ui/profile/house/contract_stop/refund_bond_result_page.dart @@ -34,7 +34,7 @@ class _RefundBondResultPageState extends State { body: Center( child: Column( children: [ - 76.w.heightBox, + 276.w.heightBox, FinishResultImage( status: widget.status == 16 ? false : true, haveInHandStatus: widget.status == 15 ? true : false, diff --git a/lib/ui/profile/house/contract_stop/submit_finish_page.dart b/lib/ui/profile/house/contract_stop/submit_finish_page.dart index ee2a29c7..e5094009 100644 --- a/lib/ui/profile/house/contract_stop/submit_finish_page.dart +++ b/lib/ui/profile/house/contract_stop/submit_finish_page.dart @@ -32,6 +32,18 @@ class _SubmitFinishPageState extends State { return '未知'; } } + String get contentString { + switch (widget.status) { + case 11: + return '您提交的申请正在人工审核中,请耐心等待'; + case 12: + return '您提交的申请审核未通过,详情情况请联系物业'; + case 13: + return '您的提交的申请审核成功!'; + default: + return '未知'; + } + } @override Widget build(BuildContext context) { @@ -39,13 +51,15 @@ class _SubmitFinishPageState extends State { body: Center( child: Column( children: [ - 76.w.heightBox, + 276.w.heightBox, FinishResultImage( status: widget.status == 12 ? false : true, haveInHandStatus: widget.status == 11 ? true : false, ), 48.w.heightBox, statusString.text.black.size(36.sp).make(), + 48.w.heightBox, + contentString.text.black.size(28.sp).make(), 96.w.heightBox, widget.status != 13 ? SizedBox() diff --git a/lib/ui/profile/house/contract_stop/upload_empty_list_page.dart b/lib/ui/profile/house/contract_stop/upload_empty_list_page.dart index b54d8715..11fd7df0 100644 --- a/lib/ui/profile/house/contract_stop/upload_empty_list_page.dart +++ b/lib/ui/profile/house/contract_stop/upload_empty_list_page.dart @@ -8,7 +8,9 @@ import 'package:aku_community/widget/others/bee_input_row.dart'; import 'package:aku_community/widget/others/house_head_card.dart'; import 'package:aku_community/widget/others/upload_widget.dart'; import 'package:aku_community/widget/others/user_tool.dart'; +import 'package:aku_community/widget/picker/bee_date_picker.dart'; import 'package:bot_toast/bot_toast.dart'; +import 'package:flustars/flustars.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -25,16 +27,14 @@ class _UploadEmptyListPageState extends State { File? _file; List _urls = []; int get sysLeaseId => UserTool.appProveider.selectedHouse!.sysLeaseId ?? 0; - late TextEditingController _editingController; + DateTime? _date = DateTime.now(); @override void initState() { super.initState(); - _editingController = TextEditingController(); } @override void dispose() { - _editingController.dispose(); super.dispose(); } @@ -42,30 +42,42 @@ class _UploadEmptyListPageState extends State { Widget build(BuildContext context) { return BeeScaffold( title: '提交终止申请', + bodyColor: Colors.white, body: ListView( children: [ HouseHeadCard(context: context), 40.w.heightBox, - BeeInputRow( - title: '收房时间', - controller: _editingController, - hintText: '请填写收房时间'), - 40.w.heightBox, - '上传腾空单'.text.size(28.sp).color(ktextPrimary).make(), - 24.w.heightBox, - _file != null - ? Image.file( - _file!, - width: 480.w, - height: 480.w, - fit: BoxFit.cover, - ) - : UploadWidget( - sheetTitle: '上传腾空单', - onPicked: (file) { - _file = file; - setState(() {}); - }), + Padding( + padding: EdgeInsets.symmetric(horizontal: 32.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BeeInputRow.button( + title: '收房时间', + onPressed: () async { + _date = await BeeDatePicker.pick(_date!); + setState(() {}); + }, + hintText: DateUtil.formatDate(_date, format: 'yyyy-MM-dd')), + 40.w.heightBox, + '上传腾空单'.text.size(28.sp).color(ktextPrimary).make(), + 24.w.heightBox, + _file != null + ? Image.file( + _file!, + width: 480.w, + height: 480.w, + fit: BoxFit.cover, + ) + : UploadWidget( + sheetTitle: '上传腾空单', + onPicked: (file) { + _file = file; + setState(() {}); + }), + ], + ), + ) ], ), bottomNavi: BottomButton( @@ -77,7 +89,9 @@ class _UploadEmptyListPageState extends State { BotToast.showText(text: '请先选择腾空单'); } bool result = await HouseFunc().submitTerminationApplication( - sysLeaseId, _editingController.text, _urls); + sysLeaseId, + DateUtil.formatDate(_date, format: 'yyyy-MM-dd HH:mm:ss'), + _urls); if (result) { Get.back(); } else { diff --git a/lib/ui/profile/house/house_owners_page.dart b/lib/ui/profile/house/house_owners_page.dart index 0cff5de8..1b7e724a 100644 --- a/lib/ui/profile/house/house_owners_page.dart +++ b/lib/ui/profile/house/house_owners_page.dart @@ -1,6 +1,7 @@ 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/contract_stop/pay_result_page.dart'; +import 'package:aku_community/ui/profile/house/contract_stop/refund_bond_result_page.dart'; import 'package:aku_community/ui/profile/house/contract_stop/submit_finish_page.dart'; import 'package:flutter/material.dart'; @@ -207,7 +208,9 @@ class _HouseOwnersPageState extends State { _cardBuild(R.ASSETS_ICONS_PAY_PNG, '缴费查询', '查看租金及保证金情况', () {}), _cardBuild(R.ASSETS_ICONS_CHANGE_PNG, '合同变更', '变更合同信息、重新签约', () {}), _cardBuild(R.ASSETS_ICONS_CONTRACT_PNG, '合同续签', '到期前线上办理续签手续', () {}), - _cardBuild(R.ASSETS_ICONS_FINISH_PNG, '合同终止', '线上申请终止合同', () async {}) + _cardBuild(R.ASSETS_ICONS_FINISH_PNG, '合同终止', '线上申请终止合同', () async { + await stopContract(); + }) ], ), ); @@ -235,6 +238,11 @@ class _HouseOwnersPageState extends State { case 14: Get.to(() => PayResultPage()); break; + case 15: + case 16: + case 17: + Get.to(() => RefundBondResultPage(status: model.status)); + break; default: } } @@ -252,7 +260,7 @@ class _HouseOwnersPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + assetPath, fit: BoxFit.fill, width: 88.w, height: 88.w,