parent
55e56c47bc
commit
99dbfd911f
@ -1,5 +1,5 @@
|
|||||||
import 'package:aku_community/base/base_style.dart';
|
import 'package:aku_community/base/base_style.dart';
|
||||||
import 'package:aku_community/ui/profile/house/upload_empty_list_page.dart';
|
import 'package:aku_community/ui/profile/house/contract_stop/upload_empty_list_page.dart';
|
||||||
import 'package:aku_community/utils/headers.dart';
|
import 'package:aku_community/utils/headers.dart';
|
||||||
import 'package:aku_community/widget/buttons/bottom_button.dart';
|
import 'package:aku_community/widget/buttons/bottom_button.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
@ -0,0 +1,84 @@
|
|||||||
|
import 'package:aku_community/base/base_style.dart';
|
||||||
|
import 'package:aku_community/constants/api.dart';
|
||||||
|
import 'package:aku_community/pages/life_pay/pay_finish_page.dart';
|
||||||
|
import 'package:aku_community/pages/life_pay/pay_util.dart';
|
||||||
|
import 'package:aku_community/ui/profile/house/house_func.dart';
|
||||||
|
import 'package:aku_community/widget/bottom_sheets/pay_mothod_bottom_sheet.dart';
|
||||||
|
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:flustars/flustars.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
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';
|
||||||
|
|
||||||
|
class PaySuerplusRentPage extends StatefulWidget {
|
||||||
|
///不再计租时间
|
||||||
|
final String time;
|
||||||
|
|
||||||
|
///剩余需结清房租
|
||||||
|
final num amount;
|
||||||
|
|
||||||
|
final int id;
|
||||||
|
PaySuerplusRentPage(
|
||||||
|
{Key? key, required this.time, required this.amount, required this.id})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_PaySuerplusRentPageState createState() => _PaySuerplusRentPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PaySuerplusRentPageState extends State<PaySuerplusRentPage> {
|
||||||
|
String _payMethod = '支付宝';
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BeeScaffold(
|
||||||
|
title: '核对信息',
|
||||||
|
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(() {});
|
||||||
|
}));
|
||||||
|
})
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bottomNavi: BottomButton(
|
||||||
|
onPressed: () async {
|
||||||
|
Function cancel = BotToast.showLoading();
|
||||||
|
try {
|
||||||
|
String code = await HouseFunc()
|
||||||
|
.leaseRentOrder(widget.id, 1, widget.amount.toDouble());
|
||||||
|
bool result =
|
||||||
|
await PayUtil().callAliPay(code, API.pay.leaseRentCheck);
|
||||||
|
if (result) {
|
||||||
|
Get.to(() => PayFinishPage());
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
LoggerData.addData(e);
|
||||||
|
}
|
||||||
|
cancel();
|
||||||
|
},
|
||||||
|
child: '点击支付'.text.size(32.sp).color(ktextPrimary).bold.make()),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
import 'package:flutter/cupertino.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';
|
||||||
|
|
||||||
|
import 'package:aku_community/const/resource.dart';
|
||||||
|
import 'package:aku_community/extensions/widget_list_ext.dart';
|
||||||
|
import 'package:aku_community/ui/profile/house/my_house_list.dart';
|
||||||
|
import 'package:aku_community/ui/profile/house/lease_relevation/user_identify_page.dart';
|
||||||
|
import 'package:aku_community/widget/bee_scaffold.dart';
|
||||||
|
|
||||||
|
class IdentifySelectionPage extends StatelessWidget {
|
||||||
|
const IdentifySelectionPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BeeScaffold(
|
||||||
|
title: '身份选择',
|
||||||
|
body: ListView(
|
||||||
|
children: [
|
||||||
|
20.w.heightBox,
|
||||||
|
_buidTile(R.ASSETS_ICONS_HOUSE_PNG, '业主', true),
|
||||||
|
_buidTile(R.ASSETS_ICONS_HOUSE_PNG, '租户', false)
|
||||||
|
].sepWidget(separate: 20.w.heightBox),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buidTile(String iconPath, String text, bool isOwner) {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 32.w,
|
||||||
|
height: 32.w,
|
||||||
|
child: Image.asset(iconPath),
|
||||||
|
),
|
||||||
|
28.w.widthBox,
|
||||||
|
text.text.black.size(30.sp).make(),
|
||||||
|
Spacer(),
|
||||||
|
Icon(
|
||||||
|
CupertinoIcons.chevron_forward,
|
||||||
|
size: 32.w,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
.box
|
||||||
|
.padding(EdgeInsets.symmetric(vertical: 40.w, horizontal: 32.w))
|
||||||
|
.make()
|
||||||
|
.onInkTap(() {
|
||||||
|
Get.off(() => isOwner ? MyHouseList() : UserIdentifyPage());
|
||||||
|
}).material(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(8.w),
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
import 'package:aku_community/base/base_style.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:velocity_x/velocity_x.dart';
|
||||||
|
|
||||||
|
class PayMethodBottomSheet extends StatelessWidget {
|
||||||
|
final Function(String value) onChoose;
|
||||||
|
const PayMethodBottomSheet({Key? key, required this.onChoose})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CupertinoActionSheet(
|
||||||
|
title:
|
||||||
|
'支付方式'.text.size(32.sp).bold.color(ktextPrimary).isIntrinsic.make(),
|
||||||
|
actions: [
|
||||||
|
CupertinoActionSheetAction(
|
||||||
|
onPressed: onChoose('支付宝'),
|
||||||
|
child:
|
||||||
|
'支付宝'.text.size(32.sp).color(ktextPrimary).isIntrinsic.make())
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
import 'package:aku_community/base/base_style.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:velocity_x/velocity_x.dart';
|
||||||
|
|
||||||
|
class SexBottomSheet extends StatelessWidget {
|
||||||
|
final Function(String value) onChoose;
|
||||||
|
const SexBottomSheet({Key? key, required this.onChoose}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CupertinoActionSheet(
|
||||||
|
title:
|
||||||
|
'选择性别'.text.size(32.sp).bold.color(ktextPrimary).isIntrinsic.make(),
|
||||||
|
cancelButton: TextButton(
|
||||||
|
onPressed: () => Get.back(),
|
||||||
|
child: '取消'.text.size(28.sp).color(ktextSubColor).isIntrinsic.make()),
|
||||||
|
actions: [
|
||||||
|
CupertinoActionSheetAction(
|
||||||
|
onPressed: onChoose('男'),
|
||||||
|
child: '男'.text.size(30.sp).color(ktextPrimary).isIntrinsic.make()),
|
||||||
|
CupertinoActionSheetAction(
|
||||||
|
onPressed: onChoose('女'),
|
||||||
|
child: '女'.text.size(30.sp).color(ktextPrimary).isIntrinsic.make())
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue