优化合同费用bug

This commit is contained in:
wuxw 2024-09-02 10:03:52 +08:00
parent 917cf312a0
commit e85e62520b
2 changed files with 20 additions and 67 deletions

View File

@ -18,10 +18,10 @@ const baseUrl = '/';
const baseUrl = 'http://127.0.0.1:8008/'; const baseUrl = 'http://127.0.0.1:8008/';
// #endif // #endif
let commonBaseUrl = 'http://demo.homecommunity.cn/'; let commonBaseUrl = 'http://service.xinyejiawangtb.ltd/';
//商城的url //商城的url
let mallUrl = 'http://mallapp.homecommunity.cn/'; let mallUrl = 'http://mallapp.xinyejiawangtb.ltd/';
//商城小程序ID //商城小程序ID
let mallMinAppId = "xxx"; let mallMinAppId = "xxx";

View File

@ -125,7 +125,7 @@
// #endif // #endif
import {addMonth,formatDate,date2String} from '../../lib/java110/utils/DateUtil.js' import {addMonth,formatDate,date2String} from '../../lib/java110/utils/DateUtil.js'
import {getUserId} from '../../api/user/userApi.js';
import {getCurContract} from '../../api/contract/contractApi.js' import {getCurContract} from '../../api/contract/contractApi.js'
export default { export default {
components:{ components:{
@ -163,6 +163,12 @@
feeFlag:'', feeFlag:'',
paymentCycle:1, paymentCycle:1,
squarePrice: 0, squarePrice: 0,
selectUserAccount: [], //
accountAmount: 0.0, //
deductionAmount: 0.0, //
couponAmount: 0.0,
amountCount: 0.0,
couponList: [],
}; };
}, },
@ -332,80 +338,27 @@
}, },
onPayFee: function() { onPayFee: function() {
let _receivedAmount = this.receivableAmount; let _receivedAmount = this.receivableAmount;
wx.showLoading({
title: '支付中'
});
let _tradeType = 'JSAPI'; let _tradeType = 'JSAPI';
let _objData = { let _objData = {
business: "payFee",
cycles: this.feeMonth, cycles: this.feeMonth,
communityId: this.communityId, communityId: this.communityId,
feeId: this.feeId, feeId: this.feeId,
feeName: '物业费', feeName: '物业费',
receivedAmount: _receivedAmount, receivedAmount: _receivedAmount,
tradeType: _tradeType, tradeType: _tradeType,
appId: this.appId,
payerObjId: this.contractId, payerObjId: this.contractId,
payerObjType: 3333, payerObjType: 7777,
endTime: this.formatEndTime endTime: this.formatEndTime,
selectUserAccount: this.selectUserAccount, //
accountAmount: this.accountAmount, //
deductionAmount: this.deductionAmount, //
couponList: this.couponList
}; };
context.request({ uni.setStorageSync('doing_cashier',_objData);
url: constant.url.preOrder, uni.navigateTo({
header: context.getHeaders(), url:'/pages/fee/cashier?money='+_receivedAmount+"&business=payFee&communityId="+this.communityId+"&cashierUserId="+getUserId()
method: "POST", })
data: _objData,
//
success: function(res) {
if (res.statusCode == 200 && res.data.code == '0') {
let data = res.data; //
// #ifdef MP-WEIXIN
uni.requestPayment({
'timeStamp': data.timeStamp,
'nonceStr': data.nonceStr,
'package': data.package,
'signType': data.signType,
'paySign': data.sign,
'success': function(res) {
uni.showToast({
title: "支付成功",
duration: 2000
});
uni.navigateBack({});
},
'fail': function(res) {
console.log('fail:' + JSON.stringify(res));
}
});
// #endif
// #ifdef H5
WexinPayFactory.wexinPay(data,function(){
uni.showToast({
title: "支付成功",
duration: 2000
});
uni.navigateBack({});
});
// #endif
wx.hideLoading();
return;
}
wx.hideLoading();
wx.showToast({
title: "缴费失败",
icon: 'none',
duration: 2000
});
},
fail: function(e) {
wx.hideLoading();
wx.showToast({
title: "服务器异常了",
icon: 'none',
duration: 2000
});
}
});
}, },
_loadCurContract:function(_contractId){ _loadCurContract:function(_contractId){
let _that =this; let _that =this;