mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-24 05:46:04 +08:00
优化合同费用bug
This commit is contained in:
parent
917cf312a0
commit
e85e62520b
@ -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";
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user