This commit is contained in:
xiaozhiyong
2023-06-14 10:14:22 +08:00
parent d32d9687f0
commit b49578295d
3 changed files with 119 additions and 116 deletions

View File

@@ -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="foreground" :pdground="foreground" :icon="iconUrl" iconSize="40" onval
:usingComponents="usingComponents" showLoading />
<tki-qrcode ref="qrcode" cid="2" loadMake :val="val" :size="250" unit="upx" background="#fff"
:foreground="foreground" :pdground="foreground" :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>壳牌 {{test}} {{tsets}}</text>
</view>
<view class="text-center padding-top text-sm margin-bottom">
@@ -43,113 +44,109 @@
</view>
</view>
<view class="cu-list menu solid-bottom">
<!-- <view class="cu-list menu solid-bottom">
<view class="cu-item arrow" @tap="toDetail(order)">
油站
<text class="fr">{{order.siteName?order.siteName:''}}</text>
</view>
</view>
</view> -->
<view class="padding-tb-xs text-left">
油品油枪
<!-- <view class="cu-item arrow" @tap="toDetail(order)">
</view> -->
油站
<text class="fr nowrap">{{order.siteName?order.siteName:''}}</text>
</view>
<view class="padding-tb-xs text-left">
油品油枪
<text class="fr nowrap">
{{order.oilsCode?order.oilsCode+' ':'' }} {{ order.gunName?order.gunName+'号枪': order.oilsBar?order.oilsBar+'号枪':'未选择油枪'}} </text>
{{order.oilsCode?order.oilsCode+' ':'' }}{{ order.gunName?order.gunName+'号枪': order.oilsBar?order.oilsBar+'号枪':'未选择油枪'}} </text>
</view>
<view class="padding-tb-xs text-left">
{{order.oilProductType=='GAS'?'加气重量:':'加油升数:'}}
<text class="fr">{{order.volume?order.volume:'未输入' |moneyFormath}} {{order.oilProductType=='GAS'?'L':'L'}}</text>
<text
class="fr nowrap">{{order.volume?'约':''}}{{order.volume?order.volume:'未输入' |moneyFormath}}{{order.oilProductType=='GAS'?'L':'L'}}</text>
</view>
<view class="padding-tb-xs text-left">
油站价格
<text class="fr">{{order.sitePrice?order.sitePrice+'¥/' +( order.oilProductType=='GAS'?'L':'L') :'暂无'}}</text>
油站价格
<text
class="fr">{{order.sitePrice?order.sitePrice+'¥/' +( order.oilProductType=='GAS'?'L':'L') :'暂无'}}</text>
</view>
<view class="padding-tb-xs text-left">
优惠价格
<text class="fr">{{moneyIntercept(order.realPrice) }}/ {{order.oilProductType=='GAS'?'L':'L'}}</text>
优惠价格
<text class="fr">{{moneyIntercept(order.realPrice) }}/{{order.oilProductType=='GAS'?'L':'L'}}</text>
</view>
<view class="padding-tb-xs text-left">
加油员
加油员
<text class="fr">{{order.siteUser}}</text>
</view>
<view class="padding-tb-xs text-left">
加油渠道
加油渠道
<text class="fr">{{order.channelCode|channelCodeFamt}}</text>
</view>
<view class="dashed-top margin-top-xs padding-top-sm">
<view class="padding-tb-xs text-left">
加油机金额 <text class="fr">{{order.sitePriceAmount |moneyFormat}}</text>
<!-- <text
class="fr">{{order.xoilDiscountAmount>0?order.realAmount+order.xoilDiscountAmount:order.realAmount|moneyFormat}}</text> -->
</view>
</view>
<view class="padding-tb-xs text-left">
星油优惠
星油优惠
<!-- order.xoilDiscountAmount>0?order.xoilDiscountAmount:'xxx.x'|moneyFormat -->
<text
class="text-red fr">{{ moneyIntercept(order.xoilDiscountAmount)}}</text>
<text class="text-red fr">{{ moneyIntercept(order.xoilDiscountAmount)}}</text>
</view>
<view class="padding-tb-xs text-left">
优惠券
优惠券
<text class="text-red fr">{{order.couponMark==1?order.couponDiscountAmount:'未使用优惠券'}}</text>
</view>
<view class="padding-tb-xs text-left">
合计
合计
<text
class="text-red text-bold text-lg fr">{{order.payRealAmount>0?order.payRealAmount:'xxx.x'|moneyFormat}}</text>
</view>
<view class="padding-tb-xs text-left">
支付方式
支付方式
<text class=" fr">{{order.payAccountType==0?'星油豆':'企业账户支付'}}</text>
</view>
<view class="padding-tb-xs text-left" v-if="order.payTime">
订单支付时间
订单支付时间
<text class=" fr">{{order.payTime}}</text>
</view>
</view>
<view class="padding-tb-xs text-left">
{{order.suppleMark==0 ? '订单创建时间' : '补单订单创建时间'}}
<text class=" fr">{{order.orderTime||`&nbsp;${order.createTime}`}}</text>
</view>
<view class="dashed-top margin-top-xs padding-top-sm">
<view class="padding-tb-xs text-left">
加油车牌
加油车牌
<text class=" fr">{{order.plateNumber}}</text>
</view>
</view>
<view class="padding-tb-xs text-left">
加油司机
加油司机
<text class=" fr">{{order.customerName}} {{order.customerCode}}</text>
</view>
<view class="padding-tb-xs text-left" v-if="order.oilCardNature">
油卡性质
油卡性质
<text class=" fr">{{order.oilCardNature|oilCardNatureF}}</text>
</view>
</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>
<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>
<view class="cu-btn bg-white oil-main-color block flex-sub lg" @click="makeCall">
<text class="cuIcon-service padding-right-sm">联系客服</text>
</view>
</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> -->
<!-- <button class="cu-btn block lg margin-top " @tap="delOrder">删除订单</button> -->
</view>
<view class="padding placeholder-hidden">
<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 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>
<view class="cu-btn bg-white oil-main-color block flex-sub lg" @click="makeCall">
<text class="cuIcon-service padding-right-sm">联系客服</text>
</view>
</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> -->
<!-- <button class="cu-btn block lg margin-top " @tap="delOrder">删除订单</button> -->
</view>
@@ -159,17 +156,17 @@
<script>
import orderApi from '@/api/oil-order.js'
import tkiQrcode from "../pages/components/tki-qrcode/tki-qrcode.vue" //二维码生成器
import oilSiteApi from '@/api/oil-site.js'
export default {
data() {
return {
foreground:'#000',
showQr:false,
val:'',
foreground: '#000',
showQr: false,
val: '',
id: '',
test:null,
tsets:'',
test: null,
tsets: '',
order: {}
}
},
@@ -192,9 +189,9 @@
})
}
}
},
components:{
tkiQrcode
},
components: {
tkiQrcode
},
methods: {
// 拨打电话
@@ -206,18 +203,18 @@
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.foreground = this.val.indexOf('SHLFC/V1')==-1?'#000':'#1A487E';
this.val = res.data.codeStr;
this.foreground = this.val.indexOf('SHLFC/V1') == -1 ? '#000' : '#1A487E';
}
} )
})
},
onCopy(id) {
uni.setClipboardData({
@@ -301,7 +298,7 @@
},
onLoad(option) {
console.log('++++++++++++++++++',option)
console.log('++++++++++++++++++', option)
this.test = option.id
this.id = option.id
this.tsets = option.name
@@ -314,19 +311,19 @@
}, 1000 * 60 * 3);
},
filters: {
moneyIntercept(value){
if (value){
moneyIntercept(value) {
if (value) {
console.log(value)
let valus = (parseInt(value * 100) / 100).toFixed(2)+'¥/'
let valus = (parseInt(value * 100) / 100).toFixed(2) + '¥/'
console.log(valus)
return valus
return valus
} else {
return '暂无'
}
},
moneyFormath(value) {
console.log(value)
if (value != 'xxx.x') {
console.log(value)
if (value != 'xxx.x') {
let number = value.toFixed(2)
return number
} else {
@@ -334,8 +331,8 @@
}
},
moneyFormat(value) {
if (value != 'xxx.x') {
return "¥" +(Math.round(value * 100) / 100).toFixed(2)
if (value != 'xxx.x') {
return "¥" + (Math.round(value * 100) / 100).toFixed(2)
} else {
return value
}
@@ -386,7 +383,7 @@
case 'WJY':
return '万金油'
case 'LV':
return '其他'
return '其他'
case 'TY':
return '团油'
case 'YDJY':
@@ -398,19 +395,23 @@
}
</script>
<style scoped>.move-tops{
transform: translateY(-17px);
}
.bg-red{
background-color: #FF6700;
}
.text-centers {
text-align: center;
width: 90%;
margin: 0 auto;
border-radius: 7px;
overflow: hidden;
}
<style scoped>
.move-tops {
transform: translateY(-17px);
}
.bg-red {
background-color: #FF6700;
}
.text-centers {
text-align: center;
width: 90%;
margin: 0 auto;
border-radius: 7px;
overflow: hidden;
}
.move-top {
margin-top: -2rem;
}