|
...
|
...
|
@@ -2675,6 +2675,7 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
textAlignVertical:
|
|
|
|
TextAlignVertical.bottom,
|
|
|
|
maxLines: 1,
|
|
|
|
enabled: detailModel.depositId == null ? true:false,
|
|
|
|
inputFormatters: [
|
|
|
|
FilteringTextInputFormatter(
|
|
|
|
RegExp("[0-9.]"),
|
|
...
|
...
|
@@ -4673,45 +4674,57 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
_createReserveDeposit() async {
|
|
|
|
if (marketingCenterProvider.dzSellerConfModel.isShowNoticeDeposit == '1') {
|
|
|
|
//页面有预订定金选项
|
|
|
|
// if( detailModel.depositId == null){
|
|
|
|
// //新建
|
|
|
|
// }else{
|
|
|
|
// // 修改或者不可编辑
|
|
|
|
// }
|
|
|
|
if (moneyControl.text != '选填,未填写表示无需支付订金' && moneyControl.text.trim().length > 0) {
|
|
|
|
Map<String, String> pramas = {
|
|
|
|
'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
'rid': widget.rid,
|
|
|
|
'price': moneyControl.text,
|
|
|
|
// 'rname': paymentC.text,
|
|
|
|
'uid': Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
// 'pay_time': paymentTime == '请选择'
|
|
|
|
// ? null
|
|
|
|
// : (DateUtil.getDateTime(paymentTime).millisecondsSinceEpoch / 1000)
|
|
|
|
// .floor()
|
|
|
|
// .toString(),
|
|
|
|
// 'pay_type': payTypeIndex == null ? null : payType[payTypeIndex],
|
|
|
|
|
|
|
|
// 'pay_no':
|
|
|
|
// receiptNumberC.text.trim().length == 0 ? null : receiptNumberC.text,
|
|
|
|
'insert_uid':
|
|
|
|
Provider.of<UserModel>(context, listen: false).user.openid
|
|
|
|
};
|
|
|
|
|
|
|
|
bool success = await detailModel.createReserveDeposit(context, pramas);
|
|
|
|
if (success) {
|
|
|
|
bus.emit('refresh_detail_deposit');
|
|
|
|
bool isSuccess = await Utils.goShareInvicationToWeChat(
|
|
|
|
context,
|
|
|
|
widget.rid,
|
|
|
|
Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
depositId: detailModel.depositId);
|
|
|
|
print(isSuccess);
|
|
|
|
if (isSuccess) {
|
|
|
|
_addForward();
|
|
|
|
if (detailModel.depositId == null) {
|
|
|
|
//新建
|
|
|
|
if (moneyControl.text != '选填,未填写表示无需支付订金' &&
|
|
|
|
moneyControl.text.trim().length > 0) {
|
|
|
|
Map<String, String> pramas = {
|
|
|
|
'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
'rid': widget.rid,
|
|
|
|
'price': moneyControl.text,
|
|
|
|
// 'rname': paymentC.text,
|
|
|
|
'uid': Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
// 'pay_time': paymentTime == '请选择'
|
|
|
|
// ? null
|
|
|
|
// : (DateUtil.getDateTime(paymentTime).millisecondsSinceEpoch / 1000)
|
|
|
|
// .floor()
|
|
|
|
// .toString(),
|
|
|
|
// 'pay_type': payTypeIndex == null ? null : payType[payTypeIndex],
|
|
|
|
|
|
|
|
// 'pay_no':
|
|
|
|
// receiptNumberC.text.trim().length == 0 ? null : receiptNumberC.text,
|
|
|
|
'insert_uid':
|
|
|
|
Provider.of<UserModel>(context, listen: false).user.openid
|
|
|
|
};
|
|
|
|
|
|
|
|
bool success =
|
|
|
|
await detailModel.createReserveDeposit(context, pramas);
|
|
|
|
if (success) {
|
|
|
|
bus.emit('refresh_detail_deposit');
|
|
|
|
bool isSuccess = await Utils.goShareInvicationToWeChat(
|
|
|
|
context,
|
|
|
|
widget.rid,
|
|
|
|
Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
depositId: detailModel.depositId);
|
|
|
|
print(isSuccess);
|
|
|
|
if (isSuccess) {
|
|
|
|
_addForward();
|
|
|
|
}
|
|
|
|
// bus.emit('refresh_invication_deposit');
|
|
|
|
}
|
|
|
|
// bus.emit('refresh_invication_deposit');
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
// 不可编辑
|
|
|
|
//页面无预订定金选项
|
|
|
|
bool isSuccess = await Utils.goShareInvicationToWeChat(
|
|
|
|
context,
|
|
|
|
widget.rid,
|
|
|
|
Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
depositId: detailModel.depositId);
|
|
|
|
print(isSuccess);
|
|
|
|
if (isSuccess) {
|
|
|
|
_addForward();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
//页面无预订定金选项
|
...
|
...
|
|