|
|
@ -1,18 +1,18 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="paymentl"> |
|
|
|
<div class="paymentl"> |
|
|
|
<detailsCardHeader :countTimer='countTimer' :codeTpe="codeTpe" ></detailsCardHeader> |
|
|
|
<detailsCardHeader :countTimer="countTimer" :codeTpe="codeTpe"></detailsCardHeader> |
|
|
|
<detailsCard :detailsList="detailsList"></detailsCard> |
|
|
|
<detailsCard :detailsList="detailsList"></detailsCard> |
|
|
|
<div @click="goHome" class="paymentl-footer flex ac jc">返回首页</div> |
|
|
|
<div @click="goHome" class="paymentl-footer flex ac jc">返回首页</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import vueQr from 'vue-qr' |
|
|
|
import vueQr from 'vue-qr' |
|
|
|
import detailsCard from "./components/detailsCard.vue"; |
|
|
|
import detailsCard from './components/detailsCard.vue' |
|
|
|
import detailsCardHeader from "./components/detailsCardHeader.vue"; |
|
|
|
import detailsCardHeader from './components/detailsCardHeader.vue' |
|
|
|
import oilSiteApi from '@/api/oil-site.js'; |
|
|
|
import oilSiteApi from '@/api/oil-site.js' |
|
|
|
import useStore from '@/store/piniaIndex'; |
|
|
|
import useStore from '@/store/piniaIndex' |
|
|
|
let store = useStore(); |
|
|
|
let store = useStore() |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
detailsCard, |
|
|
|
detailsCard, |
|
|
@ -21,13 +21,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
user:store.user, |
|
|
|
user: store.user, |
|
|
|
countTimer:180, |
|
|
|
countTimer: 180, |
|
|
|
timer:null, |
|
|
|
timer: null, |
|
|
|
codeTpe:{ |
|
|
|
codeTpe: { |
|
|
|
switch:false, |
|
|
|
switch: false, |
|
|
|
codeValue:'', |
|
|
|
codeValue: '', |
|
|
|
imgType:true |
|
|
|
imgType: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
detailsCardTitle: {}, |
|
|
|
detailsCardTitle: {}, |
|
|
|
detailsList: [ |
|
|
|
detailsList: [ |
|
|
@ -38,7 +38,7 @@ export default { |
|
|
|
valueStyle: { |
|
|
|
valueStyle: { |
|
|
|
color: '' |
|
|
|
color: '' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
], |
|
|
|
], |
|
|
|
[ |
|
|
|
[ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -56,7 +56,7 @@ export default { |
|
|
|
{ |
|
|
|
{ |
|
|
|
lable: '加油员:', |
|
|
|
lable: '加油员:', |
|
|
|
value: '李某' |
|
|
|
value: '李某' |
|
|
|
}, |
|
|
|
} |
|
|
|
// { |
|
|
|
// { |
|
|
|
// lable: '加油渠道:', |
|
|
|
// lable: '加油渠道:', |
|
|
|
// value: '星油 查看三方支付凭证' |
|
|
|
// value: '星油 查看三方支付凭证' |
|
|
@ -81,7 +81,7 @@ export default { |
|
|
|
valueStyle: { |
|
|
|
valueStyle: { |
|
|
|
color: '#FF0000' |
|
|
|
color: '#FF0000' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
], |
|
|
|
], |
|
|
|
[ |
|
|
|
[ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -90,73 +90,71 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
lable: '加油司机:', |
|
|
|
lable: '加油司机:', |
|
|
|
value: (store.user&&store.user.name)||'---', |
|
|
|
value: (store.user && store.user.name) || '---' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
lable: '油卡性质:', |
|
|
|
lable: '油卡性质:', |
|
|
|
value: '企业油卡', |
|
|
|
value: '企业油卡' |
|
|
|
}, |
|
|
|
} |
|
|
|
], |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
] |
|
|
|
] |
|
|
|
}; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
created(){ |
|
|
|
created() { |
|
|
|
console.log(this.user,'user') |
|
|
|
// console.log(this.user,'user') |
|
|
|
this.init() |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch:{ |
|
|
|
watch: { |
|
|
|
countTimer:function(n){ |
|
|
|
countTimer: function (n) {} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
methods: { |
|
|
|
init(){ |
|
|
|
init() { |
|
|
|
this.orderData = JSON.parse(this.$route.query.orderData) |
|
|
|
this.orderData = JSON.parse(this.$route.query.orderData) |
|
|
|
this.codeTpe.imgType = JSON.parse(this.$route.query.type) |
|
|
|
this.codeTpe.imgType = JSON.parse(this.$route.query.type) |
|
|
|
console.log(this.codeTpe.imgType) |
|
|
|
console.log(this.codeTpe) |
|
|
|
this.getCode(); |
|
|
|
this.getCode() |
|
|
|
this.updateDetails(); |
|
|
|
this.updateDetails() |
|
|
|
}, |
|
|
|
}, |
|
|
|
Timekeeping(){ |
|
|
|
Timekeeping() { |
|
|
|
this.countTimer = 180000 |
|
|
|
this.countTimer = 180000 |
|
|
|
this.timer = setInterval(()=>{ |
|
|
|
this.timer = setInterval(() => { |
|
|
|
if(this.countTimer==0){ |
|
|
|
if (this.countTimer == 0) { |
|
|
|
clearInterval(this.timer); |
|
|
|
clearInterval(this.timer) |
|
|
|
this.getCode() |
|
|
|
this.getCode() |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.countTimer-=10; |
|
|
|
this.countTimer -= 10 |
|
|
|
},10) |
|
|
|
}, 10) |
|
|
|
}, |
|
|
|
}, |
|
|
|
goHome(){ |
|
|
|
goHome() { |
|
|
|
this.$router.push('/') |
|
|
|
this.$router.push('/') |
|
|
|
}, |
|
|
|
}, |
|
|
|
updateDetails(){ |
|
|
|
updateDetails() { |
|
|
|
this.detailsList[0][0].value = this.orderData.orderSerialNumber; |
|
|
|
this.detailsList[0][0].value = this.orderData.orderSerialNumber |
|
|
|
this.detailsList[1][0].value = this.orderData.siteName ; |
|
|
|
this.detailsList[1][0].value = this.orderData.siteName |
|
|
|
this.detailsList[1][1].value = `${this.orderData.oilsCode} ${this.orderData.oilsBar}号枪`; |
|
|
|
this.detailsList[1][1].value = `${this.orderData.oilsCode} ${this.orderData.oilsBar}号枪` |
|
|
|
this.detailsList[1][2].value = `${Number(this.orderData.volume).toFixed(2)}L`; |
|
|
|
this.detailsList[1][2].value = `${Number(this.orderData.volume).toFixed(2)}L` |
|
|
|
this.detailsList[1][3].value = this.orderData.siteUserName ; |
|
|
|
this.detailsList[1][3].value = this.orderData.siteUserName |
|
|
|
this.detailsList[2][0].value = '¥'+this.orderData.realAmount ; |
|
|
|
this.detailsList[2][0].value = '¥' + this.orderData.realAmount |
|
|
|
this.detailsList[2][1].value = '¥'+ Number(this.orderData.oilDiscountAmount).toFixed(2) ; |
|
|
|
this.detailsList[2][1].value = '¥' + Number(this.orderData.oilDiscountAmount).toFixed(2) |
|
|
|
this.detailsList[3][0].value = this.orderData.plateNumber ; |
|
|
|
this.detailsList[3][0].value = this.orderData.plateNumber |
|
|
|
// this.detailsList[3][2].value = '¥'+this.orderData.plateNumber ; |
|
|
|
// this.detailsList[3][2].value = '¥'+this.orderData.plateNumber ; |
|
|
|
}, |
|
|
|
}, |
|
|
|
getCode(){ |
|
|
|
getCode() { |
|
|
|
console.log( this.orderData) |
|
|
|
// console.log(this.orderData) |
|
|
|
oilSiteApi.getOrderQrCode(this.orderData.orderSerialNumber).then(res=>{ |
|
|
|
oilSiteApi.getOrderQrCode(this.orderData.orderSerialNumber).then(res => { |
|
|
|
if(res.code==20000){ |
|
|
|
if (res.code == 20000) { |
|
|
|
this.codeTpe.codeValue = '' |
|
|
|
this.codeTpe.codeValue = '' |
|
|
|
this.$nextTick(function(){ |
|
|
|
this.$nextTick(function () { |
|
|
|
this.codeTpe.switch = true; |
|
|
|
this.codeTpe.switch = true |
|
|
|
this.codeTpe.codeValue = res.data.codeStr; |
|
|
|
this.codeTpe.codeValue = res.data.codeStr |
|
|
|
this.Timekeeping() |
|
|
|
this.Timekeeping() |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
<style scoped> |
|
|
@ -188,4 +186,4 @@ export default { |
|
|
|
color: #333333; |
|
|
|
color: #333333; |
|
|
|
margin: 50px auto; |
|
|
|
margin: 50px auto; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|