支付信息回显

hmxc
张萌 3 years ago
parent 61b197347e
commit 2e97ab7020

@ -1,5 +1,6 @@
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/models/house/lease_detail_model.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';
@ -23,20 +24,25 @@ class ContractPayPage extends StatefulWidget {
}
class _ContractPayPageState extends State<ContractPayPage> {
late TextEditingController _contractCodeController;
late TextEditingController _payTotalController;
String _contractCode = '';
num _payTotal = 0;
LeaseDetailModel? _model;
String _payMethod = '选择支付方式';
@override
void initState() {
super.initState();
_contractCodeController = TextEditingController();
_payTotalController = TextEditingController();
Future.delayed(Duration(milliseconds: 300), () async {
_model = (await HouseFunc().leaseDetail(widget.id));
if (_model != null) {
_contractCode = _model!.code;
_payTotal = _model!.margin;
}
setState(() {});
});
}
@override
void dispose() {
_contractCodeController.dispose();
_payTotalController.dispose();
super.dispose();
}
@ -47,16 +53,16 @@ class _ContractPayPageState extends State<ContractPayPage> {
body: ListView(
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
children: [
BeeInputRow(
controller: _contractCodeController,
hintText: '请填写合同编号',
BeeInputRow.button(
onPressed: () {},
hintText: _contractCode,
title: '合同编号',
isRequire: true,
),
BeeInputRow(
BeeInputRow.button(
title: '保证金金额(元)',
controller: _payTotalController,
hintText: '填写保证金金额'),
onPressed: () {},
hintText: _payTotal.toStringAsFixed(2)),
BeeInputRow.button(
title: '支付方式',
hintText: _payMethod,

@ -14,6 +14,7 @@ import 'package:dotted_border/dotted_border.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:power_logger/power_logger.dart';
import 'package:velocity_x/velocity_x.dart';
class ContractPreviewPage extends StatefulWidget {
@ -76,6 +77,7 @@ class _ContractPreviewPageState extends State<ContractPreviewPage> {
onPressed: () async {
if (_signFile != null) {
Function cancel = BotToast.showLoading();
try {
String result = await HouseFunc().uploadSignName(_signFile!);
String path = await HouseFunc()
.generateContract(widget.id, widget.url, result);
@ -83,6 +85,9 @@ class _ContractPreviewPageState extends State<ContractPreviewPage> {
path: path,
id: widget.id,
));
} catch (e) {
LoggerData.addData(e);
}
cancel();
} else {
BotToast.showText(text: '请先签名!');

@ -101,8 +101,11 @@ class _UploadContractsPageState extends State<UploadContractsPage> {
bool result =
await HouseFunc().submitFormalContract(widget.id, _urls);
if (result) {
Get.to(() => ContractPayPage(id: widget.id,));
Get.to(() => ContractPayPage(
id: widget.id,
));
}
cancel();
},
child: '提交审核'.text.size(32.sp).color(ktextPrimary).bold.make()),
);

Loading…
Cancel
Save