更新 #9

Merged
xiaozhiyong merged 1 commits from xiaozy into master 1 year ago
  1. 168
      BagStation/orderDetail/orderDetail.vue

@ -1,5 +1,5 @@
<template>
<view @tap.stop='showMiniBtn = false' >
<view @tap.stop='showMiniBtn = false'>
<cu-custom class="main-totextbar bg-main-oil" :isBack="true" bgColor="bg-main-oil">
<block slot="backText">返回</block>
<block slot="content">订单支付结果</block>
@ -13,14 +13,15 @@
<view class="qr-container ">
<view class="qrimg">
<view class="qrimg" @tap="newQrString">
<tki-qrcode ref="qrcode" cid="2" loadMake :val="val" :size="250" unit="upx"
background="#fff" foreground="#000" pdground="#000" :icon="iconUrl" iconSize="40" onval
:usingComponents="usingComponents" showLoading />
<tki-qrcode ref="qrcode" cid="2" loadMake :val="val" :size="250" unit="upx" background="#fff"
foreground="#000" pdground="#000" :icon="iconUrl" iconSize="40" onval
:usingComponents="usingComponents" showLoading />
</view>
</view>
</view>
<view class="text-center text-sm justify-center align-center flex">
<image src="../static/img/YDJY.png" mode="" style="width: 60upx;height:60upx;" class="margin-right-sm"></image>
<image src="../static/img/YDJY.png" mode="" style="width: 60upx;height:60upx;" class="margin-right-sm">
</image>
<text>壳牌</text>
</view>
<view class="text-center padding-top text-sm margin-bottom">
@ -38,7 +39,8 @@
<view class="padding-bottom-xs margin-bottom-xs dashed-bottom">
<view class="padding-tb-xs text-left" @tap="onCopy(order.orderSerialNumber)">
订单编号
<text class="fr">{{order.orderSerialNumber?order.orderSerialNumber:''}} <text class="cuIcon-copy padding-left-xs"></text></text>
<text class="fr">{{order.orderSerialNumber?order.orderSerialNumber:''}} <text
class="cuIcon-copy padding-left-xs"></text></text>
</view>
</view>
@ -87,7 +89,8 @@
</view>
<view class="padding-tb-xs text-left">
星油优惠
<text class="text-red fr">{{order.xoilDiscountAmount>0?order.xoilDiscountAmount:'xxx.x'|moneyFormat}}</text>
<text
class="text-red fr">{{order.xoilDiscountAmount>0?order.xoilDiscountAmount:'xxx.x'|moneyFormat}}</text>
</view>
<view class="padding-tb-xs text-left">
优惠券
@ -96,12 +99,13 @@
<view class="padding-tb-xs text-left">
合计
<text class="text-red text-bold text-lg fr">{{order.payRealAmount>0?order.payRealAmount:'xxx.x' }}</text>
<text
class="text-red text-bold text-lg fr">{{order.payRealAmount>0?order.payRealAmount:'xxx.x' }}</text>
</view>
<view class="padding-tb-xs text-left">
支付方式
<text class=" fr" v-if='order.orderSource == "SXF_WECHAT_MINIAPPS" '>随行付支付</text>
<text class=" fr" v-else>{{order.payAccountType==0?'个人账户支付':'企业账户支付'}}</text>
</view>
<view class="padding-tb-xs text-left">
@ -128,28 +132,31 @@
</view>
</view>
</view>
<view class="padding-md padding-right padding-left-xl text-right position-re" @tap.stop="showMiniBtn=true"
<view class="padding-md padding-right padding-left-xl text-right position-re" @tap.stop="showMiniBtn=true"
v-if="order.orderStatus == 1 ">
<view class="radius shadow mini-btn bg-white padding-xs flex-wrap position-ab ab-rihgt-bootm"
v-if="showMiniBtn">
v-if="showMiniBtn">
<!-- <view class="margin-bottom-sm ">
<button class="cu-btn nowrap bg-white" @tap="deleteOrder(item.orderSerialNumber)">删除</button>
</view> -->
<!-- <view class=" ">
<button class="cu-btn nowrap " @tap="showMiniBtn=false">收起</button>
</view> -->
<view class="margin-bottom-sm">
<button class="cu-btn nowrap bg-white" @tap="gotoInvoicing()">查看开票信息</button>
<view class="more-frame">
<button class="more-item nowrap bg-white " @tap="goDiscount()">优惠油站</button>
<button class="more-item nowrap bg-white " @tap="toRiskControl()">中交风控</button>
<button class="more-item nowrap bg-white " @tap="gotoInvoicing()">查看开票信息</button>
</view>
</view>
<text class="text-lg">更多</text>
</view>
</view>
<view class="padding bg-white fixed-bottom">
<view class="flex margin-bottom" v-if="order.orderStatus==0">
<button class="cu-btn block flex-sub lg bg-main-oil " @tap="makePay">立即支付</button>
<button class="cu-btn block flex-sub lg margin-left" @tap="cancelOrder">取消订单</button>
</view>
<button class=" cu-btn bg-white oil-main-color block flex-sub lg " open-type="contact"><text class="cuIcon-service padding-right-sm"></text>
<button class=" cu-btn bg-white oil-main-color block flex-sub lg " open-type="contact"><text
class="cuIcon-service padding-right-sm"></text>
在线客服</button>
<!-- <button class="cu-btn block lg margin-top " @tap="delOrder">删除订单</button> -->
</view>
@ -158,7 +165,8 @@
<button class="cu-btn block flex-sub lg bg-main-oil " @tap="makePay">立即支付</button>
<button class="cu-btn block flex-sub lg margin-left" @tap="cancelOrder">取消订单</button>
</view>
<button class=" cu-btn bg-white oil-main-color block flex-sub lg " open-type="contact"><text class="cuIcon-service padding-right-sm"></text>
<button class=" cu-btn bg-white oil-main-color block flex-sub lg " open-type="contact"><text
class="cuIcon-service padding-right-sm"></text>
在线客服</button>
<!-- <button class="cu-btn block lg margin-top " @tap="delOrder">删除订单</button> -->
</view>
@ -172,6 +180,7 @@
import oilSiteApi from '@/api/oil-site.js'
import tkiQrcode from "../pages/components/tki-qrcode/tki-qrcode.vue" //
import financelApi from '@/api/oil-finance.js'
import Financial from '@/api/Financial.js'
export default {
components: {
ThirdPartyVoucher,
@ -180,8 +189,8 @@
data() {
return {
showMiniBtn: false,
showQr:false,
val:'',
showQr: false,
val: '',
showThirdResult: false,
id: '',
order: {},
@ -212,31 +221,54 @@
}
}
},
watch:{
showMiniBtn:function(){
watch: {
showMiniBtn: function() {
// setTimeout(()=>{
// this.showMiniBtn = false
// },1000)
}
},
methods: {
goDiscount() {
uni.navigateTo({
url: '/Activity/pages/index/index'
})
},
toRiskControl() {
const user = uni.getStorageSync('user');
if (user) {
Financial.findHomePageReport({
customerId: user.id
}).then(res => {
if (res.data) {
uni.navigateTo({
url: `/Financial/pages/estimate/index?data=${encodeURIComponent(JSON.stringify(res.data))}`
})
} else {
uni.navigateTo({
url: '/Financial/pages/index?guide=1'
})
}
});
}
},
newQrString() {
this.getOrderQrCode()
},
getOrderQrCode(){
oilSiteApi.getOrderQrCode(this.order.orderSerialNumber).then( (res)=>{
getOrderQrCode() {
oilSiteApi.getOrderQrCode(this.order.orderSerialNumber).then((res) => {
console.log(res)
this.val = res.data
if(res.code == 40000){
this.showQr = false
}else if(res.code == 20000){
if (res.code == 40000) {
this.showQr = false
} else if (res.code == 20000) {
this.showQr = true
this.val =res.data.codeStr
this.val = res.data.codeStr
}
} )
})
},
gotoInvoicing() { //
console.log(this.order,'+++++++++++++')
console.log(this.order, '+++++++++++++')
financelApi.checkStatus(this.order.orderSerialNumber).then((res) => {
console.log('这里是check是否开发票')
console.log(res)
@ -250,7 +282,8 @@
} else {
uni.navigateTo({
url: '/BagStation/orderInvoicing/orderInvoicing?orderId=' + this.order
.orderSerialNumber + '&&customerId=' + this.order.customerId + '&&payRealAmount=' + this.order.payRealAmount +
.orderSerialNumber + '&&customerId=' + this.order.customerId +
'&&payRealAmount=' + this.order.payRealAmount +
'&&realAmount=' + this.order.realAmount + '&&code=' + 1
})
}
@ -285,7 +318,7 @@
// }
// })
// },
//
onCopy(id) {
uni.setClipboardData({
@ -303,7 +336,7 @@
if (res.code == 20000) {
this.order = res.data
uni.setStorageSync('oilItem', res.data)
this.getOrderQrCode()
this.getOrderQrCode()
if (res.data.payMethod == 2) {
this.tyPayMethod = res.data.payMethod
// this.queryOrderStatusSq()
@ -311,12 +344,12 @@
}
})
},
toDetail(item) {
if(item.zpDisable === 'DISABLE') return
var itemS = JSON.stringify(item)
uni.setStorageSync('siteInfo',itemS)
uni.navigateTo({
url: `/BagStation/pages/stationDetail/stationDetail`,
toDetail(item) {
if (item.zpDisable === 'DISABLE') return
var itemS = JSON.stringify(item)
uni.setStorageSync('siteInfo', itemS)
uni.navigateTo({
url: `/BagStation/pages/stationDetail/stationDetail`,
fail: (err) => {
// console.log(err)
},
@ -326,7 +359,7 @@
})
},
cancelOrder() {
orderApi.cancelOrder(this.id).then(res => {
if (res.code == 20000) {
uni.showToast({
@ -369,7 +402,7 @@
}
},
onLoad(option) {
onLoad(option) {
this.id = option.id
this.getOrderInfo()
uni.showShareMenu()
@ -383,7 +416,7 @@
moneyFormat(value) {
if (value != 'xxx.x') {
console.log(value)
return (parseInt(value * 100) / 100).toFixed(2)
return (parseInt(value * 100) / 100).toFixed(2)
} else {
return value
}
@ -407,9 +440,9 @@
}
},
moneyFormath(value) {
console.log(value)
if (value != 'xxx.x') {
let number = parseFloat(value).toFixed(2)
console.log(value)
if (value != 'xxx.x') {
let number = parseFloat(value).toFixed(2)
return number
} else {
return value
@ -451,19 +484,41 @@
}
</script>
<style scoped>.move-tops{
transform: translateY(-17px);
}
.bg-blue{
background-color: red;
}
.text-centers {
text-align: center;
width: 90%;
margin: 0 auto;
border-radius: 7px;
overflow: hidden;
}
<style scoped lang="scss">
.more-frame {
height: 158rpx;
overflow-y: auto;
.more-item {
margin: 10rpx 0;
padding: 0 30rpx;
font-size: 28rpx;
height: 64rpx;
line-height: 64rpx;
text-align: center;
&::after {
border: none;
}
}
}
.move-tops {
transform: translateY(-17px);
}
.bg-blue {
background-color: red;
}
.text-centers {
text-align: center;
width: 90%;
margin: 0 auto;
border-radius: 7px;
overflow: hidden;
}
.move-top {
margin-top: -2rem;
}
@ -472,6 +527,7 @@
right: 110upx;
bottom: 10upx;
}
.move-top {
margin-top: -2rem;
}

Loading…
Cancel
Save