对接生成合同

hmxc
张萌 3 years ago
parent 9d920e246b
commit 20678c59ca

@ -469,4 +469,8 @@ class _House {
///
String get submitLeaseInfo => '/user/myHouse/submitPersonalLeaseInfo';
///
String get generateContract => '/user/myHouse/generateValidContract';
}

@ -18,7 +18,9 @@ import 'package:velocity_x/velocity_x.dart';
class ContractPreviewPage extends StatefulWidget {
final String url;
ContractPreviewPage({Key? key, required this.url}) : super(key: key);
final int id;
ContractPreviewPage({Key? key, required this.url, required this.id})
: super(key: key);
@override
_ContractPreviewPageState createState() => _ContractPreviewPageState();
@ -75,8 +77,10 @@ class _ContractPreviewPageState extends State<ContractPreviewPage> {
if (_signFile != null) {
Function cancel = BotToast.showLoading();
String result = await HouseFunc().uploadSignName(_signFile!);
String path = await HouseFunc()
.generateContract(widget.id, widget.url, result);
Get.off(() => DownLoadContractPage(
path: result,
path: path,
));
cancel();
} else {

@ -126,6 +126,22 @@ class HouseFunc {
}
}
///
Future<String> generateContract(int id, String pUrl, String url) async {
BaseModel baseModel =
await NetUtil().post(API.house.generateContract, params: {
"id": id,
"ContractPreviewImgUrl": pUrl,
"contractSignatureImgUrl": url,
});
if (baseModel.status ?? false) {
return baseModel.data;
} else {
return '';
}
}
static Map<String, int> getSex = {
'': 1,
'': 2,

@ -65,6 +65,7 @@ class _HouseInformationCheckPageState extends State<HouseInformationCheckPage> {
if (result.isNotEmpty) {
Get.back();
Get.off(() => ContractPreviewPage(
id: widget.detailModel.id,
url: result,
));
}

Loading…
Cancel
Save