This commit is contained in:
caolc
2023-03-22 09:23:04 +08:00
parent 84613456a7
commit 7247973c63
14 changed files with 475 additions and 197 deletions

View File

@@ -76,7 +76,7 @@
var date = new Date();
var seperator1 = "-";
var year = date.getFullYear();
var month = date.getMonth() + 1;
var month = date.getMonth() ;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;

View File

@@ -229,7 +229,8 @@
currentPage: 1,
pageSize: 10,
params: {
platenumOrVinnum: ''
platenumOrVinnum: '',
createSource:'XOIL-COMPANY'
}
}
}

View File

@@ -93,6 +93,7 @@
},
data() {
return {
counter:0,
ReconfirmData: [{
label: '车牌号码',
value: 'platenumOrVinnum',
@@ -173,7 +174,8 @@
lastQueryDate: seniorPage.lastQueryDate,
appId: 'wx7a939c19b270cc3d',
openId: uni.getStorageSync('openid'),
unionId: uni.getStorageSync('unionid')
unionId: uni.getStorageSync('unionid'),
createSource:'XOIL-COMPANY'
}
this.$refs.Reconfirm.open()
} catch (e) {
@@ -202,29 +204,54 @@
}
})
},
goEstimate() {
goEstimate(payRecordId) {
let that = this
let user = uni.getStorageSync('user');
console.log(user, 'user')
Financial.findHomePageReport({
customerId: user.id
}).then(res => {
if (res.data) {
console.log(res.data, 'res.data')
uni.redirectTo({
url: `/Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}`,
fail(e) {
console.log(e)
},
})
let data = {
customerId: user.id,
payRecordId
}
console.log(data,'datadatadatadata')
Financial.findHomePageReport(data).then(res => {
if (Boolean(Number(res.data?.isThereIsNewData))) {
this.toEstimate(res.data)
} else {
uni.showToast({
title:'更新评估报告错误',
icon:'error'
})
console.log('更新评估报告错误')
if(this.counter>=3){
uni.hideLoading();
setTimeout(()=>{
uni.showModal({
title: '提示',
content: '很抱歉您的车辆可能因非重载货车或长时间未在公路行驶所以无法查询到您的车辆数据您所支付的款项将在48小时内原路退回',
success: function (res) {
that.counter = 0
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},1000)
return
}else{
this.counter++;
setTimeout(()=>{
this.goEstimate(payRecordId)
},3000)
}
}
});
},
toEstimate(data){
uni.hideLoading();
uni.redirectTo({
url: `/Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(data))}`,
success() {},
fail(e) {
console.log(e)
},
})
},
submit(e) {
let that = this
Financial.weiXinPay(this.palayData).then(res => {
@@ -237,7 +264,13 @@
success() {
that.$refs.Reconfirm.close();
setTimeout(()=>{
that.goEstimate()
uni.showLoading({
title: '报告获取中',
mask:true
});
},1000)
setTimeout(()=>{
that.goEstimate(res.data.outTradeNo)
},2000)
},
complete() {