2023-12-01 15:47:01 +08:00
|
|
|
|
<template>
|
|
|
|
|
<!-- 订单详情页 -->
|
|
|
|
|
<view class="content">
|
|
|
|
|
<view class="container">
|
|
|
|
|
<view class="my-header">
|
|
|
|
|
<view class="my-icons" @click="goBack"> <uni-icons type="left" size="16"></uni-icons> </view>
|
|
|
|
|
<view class="my-text">支付订单</view>
|
|
|
|
|
<view class="my-icons"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 顶部区域 -->
|
|
|
|
|
<view style="background-color: white;width: 94%;margin: 15px auto;">
|
2023-12-01 16:40:20 +08:00
|
|
|
|
<view style="font-weight: bold;height: 40px;line-height: 40px;margin-left: 10px;margin-top: 20px;">订单详情
|
|
|
|
|
</view>
|
2023-12-01 15:47:01 +08:00
|
|
|
|
<view class="desc">
|
|
|
|
|
<view>油站名称</view>
|
|
|
|
|
<view>{{store.name}}{{store.description ? "("+store.description+")" : ""}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="desc">
|
|
|
|
|
<view>油号油枪</view>
|
|
|
|
|
<view>{{oilName}}/{{oilOrder.oilGunNum}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="desc">
|
|
|
|
|
<view>加油金额</view>
|
|
|
|
|
<view>{{oilOrder.orderAmount}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="desc">
|
|
|
|
|
<view>加油数量</view>
|
|
|
|
|
<view>{{oilOrder.oilNum}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="desc">
|
|
|
|
|
<view>油品单价</view>
|
|
|
|
|
<view>{{oilPrice}}/元</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="desc">
|
|
|
|
|
<view>加油员工</view>
|
|
|
|
|
<view>{{staff.realName}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-12-01 16:40:20 +08:00
|
|
|
|
|
2023-12-01 15:47:01 +08:00
|
|
|
|
<view style="background-color: white;width: 94%;margin: 15px auto;">
|
|
|
|
|
<view class="desc">
|
|
|
|
|
<view>优惠券</view>
|
|
|
|
|
<view>未选择优惠券</view>
|
|
|
|
|
<view class="my-icons"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="desc">
|
|
|
|
|
<view style="display: flex;">
|
|
|
|
|
加油金
|
2023-12-01 16:40:20 +08:00
|
|
|
|
<span style="color: red;display: flex;">(余额:0.00)<u-icon name="question-circle"
|
|
|
|
|
color="red"></u-icon></span>
|
2023-12-01 15:47:01 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view>未选择优惠券</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-12-01 16:40:20 +08:00
|
|
|
|
|
2023-12-01 15:47:01 +08:00
|
|
|
|
<view style="background-color: white;width: 94%;margin: 15px auto;">
|
2023-12-01 16:40:20 +08:00
|
|
|
|
<view style="font-weight: bold;height: 40px;line-height: 40px;margin-left: 10px;margin-top: 20px;">支付方式
|
|
|
|
|
</view>
|
2023-12-01 15:47:01 +08:00
|
|
|
|
<view class="desc">
|
|
|
|
|
<view>微信支付</view>
|
|
|
|
|
<u-radio-group v-model="value">
|
|
|
|
|
<u-radio name="wx"></u-radio>
|
|
|
|
|
</u-radio-group>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 支付信息 -->
|
|
|
|
|
<view class="bar">
|
|
|
|
|
<view style="margin-left: 20px;">
|
|
|
|
|
<view>
|
|
|
|
|
¥<span style="font-size: 22px;font-weight: bold;">0.01</span>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="color: red;font-size: 12px;">应付金额</view>
|
|
|
|
|
</view>
|
2023-12-01 16:40:20 +08:00
|
|
|
|
<view
|
|
|
|
|
style="margin-right: 20px;width: 30%;border-radius:30px;background-color: #1879ff;height: 40px;line-height: 40px;text-align: center;color: white">
|
2023-12-01 15:47:01 +08:00
|
|
|
|
确认支付
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import request from '../../utils/request'
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
title: '',
|
2023-12-01 16:40:20 +08:00
|
|
|
|
value: '',
|
|
|
|
|
orderNo: "",
|
2023-12-01 15:47:01 +08:00
|
|
|
|
// 油品订单信息
|
2023-12-01 16:40:20 +08:00
|
|
|
|
oilOrder: {},
|
2023-12-01 15:47:01 +08:00
|
|
|
|
// 员工列表信息
|
|
|
|
|
staff: {},
|
|
|
|
|
// 店铺信息
|
2023-12-01 16:40:20 +08:00
|
|
|
|
store: {},
|
|
|
|
|
oilPrice: 0,
|
2023-12-01 15:47:01 +08:00
|
|
|
|
// 油品名称
|
2023-12-01 16:40:20 +08:00
|
|
|
|
oilName: "",
|
2023-12-01 15:47:01 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(e) {
|
|
|
|
|
this.orderNo = e.orderNo
|
|
|
|
|
// this.orderNo = "20231201114800ebe24b"
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
this.getOilOrder();
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 获取油品订单
|
2023-12-01 16:40:20 +08:00
|
|
|
|
getOilOrder() {
|
2023-12-01 15:47:01 +08:00
|
|
|
|
let _this = this;
|
|
|
|
|
request({
|
|
|
|
|
url: "business/oilOrder/orderNo",
|
|
|
|
|
method: 'post',
|
2023-12-01 16:40:20 +08:00
|
|
|
|
data: {
|
|
|
|
|
orderNo: _this.orderNo
|
|
|
|
|
},
|
|
|
|
|
}).then((res) => {
|
2023-12-01 15:47:01 +08:00
|
|
|
|
_this.oilOrder = res.data
|
|
|
|
|
_this.getStaffList(res.data.staffId)
|
|
|
|
|
_this.getStore(res.data.storeId)
|
|
|
|
|
_this.getOilNumber(res.data.storeId)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 获取门店信息
|
2023-12-01 16:40:20 +08:00
|
|
|
|
getStore(id) {
|
2023-12-01 15:47:01 +08:00
|
|
|
|
let _this = this;
|
|
|
|
|
request({
|
|
|
|
|
url: "business/storeInformation/store/queryStoreById",
|
|
|
|
|
method: 'post',
|
2023-12-01 16:40:20 +08:00
|
|
|
|
data: {
|
|
|
|
|
"storeId": id
|
|
|
|
|
},
|
|
|
|
|
}).then((res) => {
|
2023-12-01 15:47:01 +08:00
|
|
|
|
_this.store = res.data;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 根据员工id获取员工信息
|
2023-12-01 16:40:20 +08:00
|
|
|
|
getStaffList(staffId) {
|
2023-12-01 15:47:01 +08:00
|
|
|
|
let _this = this;
|
|
|
|
|
request({
|
|
|
|
|
url: "business/member/staff/" + staffId,
|
|
|
|
|
method: 'get',
|
2023-12-01 16:40:20 +08:00
|
|
|
|
}).then((res) => {
|
2023-12-01 15:47:01 +08:00
|
|
|
|
_this.staff = res.data
|
2023-12-01 16:40:20 +08:00
|
|
|
|
console.log(res, 1)
|
2023-12-01 15:47:01 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 获取当前店铺油号信息
|
2023-12-01 16:40:20 +08:00
|
|
|
|
getOilNumber(storeId) {
|
2023-12-01 15:47:01 +08:00
|
|
|
|
let _this = this;
|
|
|
|
|
request({
|
|
|
|
|
url: "business/petrolStationManagement/oilNumber/getOilNumberName/" + storeId,
|
|
|
|
|
method: 'get',
|
2023-12-01 16:40:20 +08:00
|
|
|
|
}).then((res) => {
|
2023-12-01 15:47:01 +08:00
|
|
|
|
res.data.forEach(item => {
|
2023-12-01 16:40:20 +08:00
|
|
|
|
if (item.oilName == _this.oilOrder.oils) {
|
2023-12-01 15:47:01 +08:00
|
|
|
|
_this.oilPrice = item.gbPrice;
|
|
|
|
|
_this.oilName = item.oilNames;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
goBack() {
|
|
|
|
|
uni.navigateBack()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
2023-12-01 16:40:20 +08:00
|
|
|
|
.desc {
|
2023-12-01 15:47:01 +08:00
|
|
|
|
height: 35px;
|
|
|
|
|
line-height: 35px;
|
|
|
|
|
margin-left: 20px;
|
|
|
|
|
margin-right: 20px;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
color: rgba(0, 0, 0, 0.65);
|
|
|
|
|
}
|
2023-12-01 16:40:20 +08:00
|
|
|
|
|
2023-12-01 15:47:01 +08:00
|
|
|
|
.bar {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 70px;
|
|
|
|
|
background-color: white;
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 0px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
}
|
2023-12-01 16:40:20 +08:00
|
|
|
|
|
2023-12-01 15:47:01 +08:00
|
|
|
|
.content {
|
|
|
|
|
background: #f4f5f6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.container {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding-top: 88px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.my-header {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 88px;
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
color: #000;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 0px 15px;
|
|
|
|
|
padding-top: 40px;
|
|
|
|
|
|
|
|
|
|
.my-icons {
|
|
|
|
|
width: 20px;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|