|
@@ -96,12 +96,14 @@
|
|
|
<view class="order-center" v-if="typeCurrent.value === 'park'">
|
|
|
<view class="order-center-item">订单编号:{{ orderItem.orderId }}</view>
|
|
|
<view class="order-center-item">
|
|
|
- 入场通道:{{ orderItem.inTime }}</view>
|
|
|
+ 入场通道:{{orderItem.roadwayName}}</view>
|
|
|
<view class="order-center-item">
|
|
|
入场时间:{{ orderItem.inTime }}</view>
|
|
|
- <view class="order-center-item">
|
|
|
- 出场通道:{{ orderItem.inTime }}</view>
|
|
|
- <view class="order-center-item">
|
|
|
+ <view class="order-center-item" v-if="orderItem.orderStatus == 1 && orderItem.outTime">
|
|
|
+ 出场通道:{{`未出场`}}</view>
|
|
|
+ <view class="order-center-item" v-if="orderItem.orderStatus !== 1">
|
|
|
+ 出场通道:{{orderItem.outParkingName}}</view>
|
|
|
+ <view class="order-center-item" v-if="orderItem.orderStatus !== 1">
|
|
|
出场时间:{{ orderItem.inTime }}</view>
|
|
|
<view class="order-center-item">
|
|
|
免费时长:{{ orderItem.freeDuration || 0 }}</view>
|
|
@@ -110,10 +112,11 @@
|
|
|
<view class="order-center-item">
|
|
|
累计停车时长:{{ orderItem.duration || 0 }}</view>
|
|
|
<view class="order-center-item">
|
|
|
- 应付金额:
|
|
|
+ 应缴金额:
|
|
|
<span class="pay-amount">{{ orderItem.payAmount || 0 }}</span>
|
|
|
</view>
|
|
|
- <view class="order-center-item">
|
|
|
+ <view class="order-center-item"
|
|
|
+ v-if="(orderItem.actualAmount || orderItem.actualAmount === 0) && orderItem.orderStatus !== 2 && orderItem.orderStatus !== 1">
|
|
|
实缴金额:
|
|
|
<span class="pay-amount">{{ orderItem.actualAmount || 0 }}</span>
|
|
|
</view>
|
|
@@ -210,7 +213,7 @@
|
|
|
[],
|
|
|
[]
|
|
|
]
|
|
|
- this.getOrderList(this.list[this.current])
|
|
|
+ this.getOrderList(this.list[this.current],this.typeCurrent)
|
|
|
},
|
|
|
computed: {
|
|
|
// 价格小数
|
|
@@ -243,41 +246,71 @@
|
|
|
return
|
|
|
};
|
|
|
this.loadStatus.splice(this.list[this.current].index, 1, 'loading')
|
|
|
- this.getOrderList(this.list[this.current])
|
|
|
+ this.getOrderList(this.list[this.current],this.typeCurrent)
|
|
|
},
|
|
|
// 页面数据
|
|
|
|
|
|
- getOrderList(orderType) {
|
|
|
+ getOrderList(orderType,typeCurrent) {
|
|
|
+ //初始化订单列表
|
|
|
const param = {
|
|
|
pageNum: orderType.pageNum,
|
|
|
orderStatus: orderType.orderStatus
|
|
|
}
|
|
|
+
|
|
|
// 未出场: orderStatus = 1-停放中
|
|
|
// 缴费中: orderStatus = 2-出场中 && payStatus = 2-支付中
|
|
|
// 完成: orderStatus = 4-完成
|
|
|
- this.$u.api.getOrderList(param)
|
|
|
- .then(res => {
|
|
|
- for (const item of res.data.pageInfo.rows) {
|
|
|
- this.orderList[orderType.index].push(item)
|
|
|
- }
|
|
|
- this.list[this.current].total = res.data.pageInfo.total
|
|
|
- this.list[orderType.index].pageNum++
|
|
|
- if (this.orderList[this.current].length >= this.list[this.current].total) {
|
|
|
- this.loadStatus.splice(this.list[orderType.index].index, 1, 'nomore')
|
|
|
- };
|
|
|
- }).catch(err => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- title: err.msg,
|
|
|
- type: 'error'
|
|
|
+ if(typeCurrent.value == 'road'){
|
|
|
+ this.$u.api.getOrderList(param)
|
|
|
+ .then(res => {
|
|
|
+ for (const item of res.data.pageInfo.rows) {
|
|
|
+ this.orderList[orderType.index].push(item)
|
|
|
+ }
|
|
|
+ this.list[this.current].total = res.data.pageInfo.total
|
|
|
+ this.list[orderType.index].pageNum++
|
|
|
+ if (this.orderList[this.current].length >= this.list[this.current].total) {
|
|
|
+ this.loadStatus.splice(this.list[orderType.index].index, 1, 'nomore')
|
|
|
+ };
|
|
|
+ }).catch(err => {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: err.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
-
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.$u.api.getRoomParkingApi(param)
|
|
|
+ .then(res => {
|
|
|
+ for (const item of res.data.pageInfo.rows) {
|
|
|
+ this.orderList[orderType.index].push(item)
|
|
|
+ }
|
|
|
+ this.list[this.current].total = res.data.pageInfo.total
|
|
|
+ this.list[orderType.index].pageNum++
|
|
|
+ if (this.orderList[this.current].length >= this.list[this.current].total) {
|
|
|
+ this.loadStatus.splice(this.list[orderType.index].index, 1, 'nomore')
|
|
|
+ };
|
|
|
+ }).catch(err => {
|
|
|
+ this.$refs.uToast.show({
|
|
|
+ title: err.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
this.loadStatus.splice(this.current, 1, 'loadmore')
|
|
|
},
|
|
|
// tab栏切换
|
|
|
change(index) {
|
|
|
this.swiperCurrent = index
|
|
|
- this.getOrderList(this.list[index])
|
|
|
+ //重新初始化
|
|
|
+ this.orderList = [
|
|
|
+ [],
|
|
|
+ [],
|
|
|
+ [],
|
|
|
+ []
|
|
|
+ ]
|
|
|
+ this.list[index].pageNum = 1
|
|
|
+ this.getOrderList(this.list[index],this.typeCurrent)
|
|
|
},
|
|
|
transition({
|
|
|
detail: {
|
|
@@ -344,7 +377,16 @@
|
|
|
* @param {Object} item
|
|
|
*/
|
|
|
typeTabClick(item) {
|
|
|
- // this.typeCurrent = item
|
|
|
+ this.typeCurrent = item
|
|
|
+ //重新初始化
|
|
|
+ this.orderList = [
|
|
|
+ [],
|
|
|
+ [],
|
|
|
+ [],
|
|
|
+ []
|
|
|
+ ]
|
|
|
+ this.list[this.current].pageNum = 1
|
|
|
+ this.getOrderList(this.list[this.current],this.typeCurrent)
|
|
|
}
|
|
|
},
|
|
|
filters: {
|