订单和详情页面优化

This commit is contained in:
geng.tang@qq.com
2024-01-30 09:06:00 +08:00
parent 4a2f46cb2c
commit 4a2eff7d3d
2 changed files with 104 additions and 22 deletions

View File

@@ -103,7 +103,7 @@
<view class="btn-item" @click="handleRentingOut(item)"
v-if="item.equipmentGoods.equipmentCategory != '10' && item.receiptStatus != 21 && item.receiptStatus != 30">我要退租</view>
<view class="btn-item" @click="handleRentingOut(item)"
<view class="btn-item" @click="handleRentingOutCancel(item)"
v-if="item.equipmentGoods.equipmentCategory != '10' && item.receiptStatus == 21 && !orderEnd">取消退租</view>
<view class="btn-item" @click="handleHireEquipment(item.orderId)"
@@ -524,7 +524,7 @@
}
});
},
// 绑定设备
// 绑定设备页面
onBind(item) {
const app = this
const {
@@ -552,7 +552,6 @@
}).catch(err => {
app.$error(err.message)
})
console.log("this.bindValue: ", this.bindValue);
},
// 获取核销二维码
@@ -571,16 +570,12 @@
const app = this
uni.showModal({
title: '提示',
content: '是否退租',
content: "是否退租",
success: (result) => {
if (result.confirm) {
const {
orderId,
equipmentId
} = order
EquipmentApi.rentingOut({
orderId,
equipmentId
orderId: order.orderId,
isRefund: 1
}).then(res => {
this.$success(res.message)
setTimeout(() => {
@@ -593,7 +588,30 @@
}
}
})
},
handleRentingOutCancel(order) {
const app = this
uni.showModal({
title: '提示',
content: "是否取消退租",
success: (result) => {
if (result.confirm) {
EquipmentApi.rentingOut({
orderId: order.orderId,
isRefund: 2
}).then(res => {
this.$success(res.message)
setTimeout(() => {
// 刷新当前订单数据
app.onRefreshList()
}, 1000)
}).catch(err => {
this.$success(err.message)
})
}
}
})
},
// 点击去支付