fix
This commit is contained in:
0
pages/order/comment/index.vue
Executable file → Normal file
0
pages/order/comment/index.vue
Executable file → Normal file
19
pages/order/delivery.vue
Executable file → Normal file
19
pages/order/delivery.vue
Executable file → Normal file
@@ -22,20 +22,7 @@
|
||||
<!-- 标题 -->
|
||||
<view class="page-title">其他</view>
|
||||
<!-- 表单组件 -->
|
||||
<view class="form-wrapper">
|
||||
<u-form-item label="人车合照" prop="img3">
|
||||
<image :src="orderSourceData[2]" v-if="orderSourceData[2]" mode="aspectFill" style="width: 300rpx;height: 200rpx" @click="chooseImage(3)"></image>
|
||||
<image src="../../static/not-dealer.png" v-else mode="aspectFill" style="width: 300rpx;height: 200rpx" @click="chooseImage(3)"></image>
|
||||
</u-form-item>
|
||||
<u-form-item label="车子照片" prop="img4">
|
||||
<image :src="orderSourceData[3]" v-if="orderSourceData[3]" mode="aspectFill" style="width: 300rpx;height: 200rpx" @click="chooseImage(4)"></image>
|
||||
<image src="../../static/not-dealer.png" v-else mode="aspectFill" style="width: 300rpx;height: 200rpx" @click="chooseImage(4)"></image>
|
||||
</u-form-item>
|
||||
<u-form-item label="安装照片" prop="img5">
|
||||
<image :src="orderSourceData[4]" v-if="orderSourceData[4]" mode="aspectFill" style="width: 300rpx;height: 200rpx" @click="chooseImage(5)"></image>
|
||||
<image src="../../static/not-dealer.png" v-else mode="aspectFill" style="width: 300rpx;height: 200rpx" @click="chooseImage(5)"></image>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="form-wrapper">
|
||||
<u-input type="number" v-model="receiptPhone" placeholder="请输入收货人手机号" />
|
||||
@@ -135,7 +122,7 @@
|
||||
homeAddress: '',
|
||||
// 按钮禁用
|
||||
// disabled: false,
|
||||
submitText: '证件已上传并确认收货',
|
||||
submitText: '证件已上传',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -261,7 +248,7 @@
|
||||
homeAddress: homeAddress
|
||||
}).then(result => {
|
||||
if(result.code == 0) {
|
||||
that.$success("确认收货成功!")
|
||||
that.$success("确认成功!")
|
||||
// uni.navigateBack()
|
||||
setTimeout(()=>{
|
||||
that.$navTo('pages/order/index',{}, 'redirectTo')
|
||||
|
||||
140
pages/order/detail.vue
Executable file → Normal file
140
pages/order/detail.vue
Executable file → Normal file
@@ -16,7 +16,8 @@
|
||||
<image class="image" src="/static/order/status/wait_deliver.png" mode="aspectFit"></image>
|
||||
</block> -->
|
||||
<!-- 待收货 -->
|
||||
<block v-else-if="order.payStatus == 20 && order.deliveryStatus <= 20 && order.receiptStatus == 10">
|
||||
<block
|
||||
v-else-if="order.payStatus == 20 && order.deliveryStatus <= 20 && order.receiptStatus == 10">
|
||||
<image class="image" src="/static/order/status/wait_receipt.png" mode="aspectFit"></image>
|
||||
</block>
|
||||
</block>
|
||||
@@ -34,13 +35,16 @@
|
||||
<text class="state-text" v-if="order.payStatus == 10">待支付</text>
|
||||
<block v-if="order.payStatus == 20">
|
||||
<text class="state-text" v-if="order.receiptStatus == 21">退租中</text>
|
||||
<text class="state-text" v-else-if="order.deliveryStatus <= 20 && order.receiptStatus == 10">待收货</text>
|
||||
<text class="state-text" v-else-if="order.deliveryStatus == 20 && order.receiptStatus == 20">待绑定</text>
|
||||
<text class="state-text" v-else-if="order.deliveryStatus == 40 && order.receiptStatus == 20">进行中</text>
|
||||
<text class="state-text"
|
||||
v-else-if="order.deliveryStatus <= 20 && order.receiptStatus == 10">待收货</text>
|
||||
<text class="state-text"
|
||||
v-else-if="order.deliveryStatus == 20 && order.receiptStatus == 20">待绑定</text>
|
||||
<text class="state-text"
|
||||
v-else-if="order.deliveryStatus == 40 && order.receiptStatus == 20">进行中</text>
|
||||
<text class="state-text"
|
||||
v-else-if="order.receiptStatus == 30 || ( order.equipmentGoods.equipmentCategory != 10 && order.currPeriods >= order.periods)">已完成</text>
|
||||
</block>
|
||||
|
||||
|
||||
<!-- <text>{{ order.stateText }}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
@@ -222,19 +226,25 @@
|
||||
<text>{{ equipmentGoods.batteryModel }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="info-item">
|
||||
<view class="item-lable">订单金额</view>
|
||||
<view class="item-content">
|
||||
<text>¥{{ order.totalPrice }} 元</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<!-- <view class="info-item" v-if="order.isFreeze==0">
|
||||
<view class="item-lable">设备押金</view>
|
||||
<view class="item-content">
|
||||
<text>+¥{{ equipmentGoods.batteryDeposit }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item" v-if="order.isFreeze==1">
|
||||
<view class="item-lable">设备押金</view>
|
||||
<view class="item-content">
|
||||
<text>芝麻分免押金</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<block v-if="equipmentGoods.equipmentCategory == '20'">
|
||||
<view class="info-item">
|
||||
<view class="item-lable">销售价格</view>
|
||||
@@ -280,12 +290,18 @@
|
||||
<text>{{ equipmentGoods.batteryRent }} 元</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-item" v-if="order.isFreeze==0">
|
||||
<view class="item-lable">设备押金</view>
|
||||
<view class="item-content">
|
||||
<text>{{ equipmentGoods.batteryDeposit }} 元</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item" v-else>
|
||||
<view class="item-lable">设备押金</view>
|
||||
<view class="item-content">
|
||||
<text>芝麻分免押金</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">设备保险</view>
|
||||
<view class="item-content">
|
||||
@@ -315,12 +331,18 @@
|
||||
<text>{{ equipmentGoods.batteryRent }} 元</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-item" v-if="order.isFreeze==0">
|
||||
<view class="item-lable">设备押金</view>
|
||||
<view class="item-content">
|
||||
<text>{{ equipmentGoods.batteryDeposit }} 元</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item" v-if="order.isFreeze==1">
|
||||
<view class="item-lable">设备押金</view>
|
||||
<view class="item-content">
|
||||
<text>芝麻分免押金</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">设备保险</view>
|
||||
<view class="item-content">
|
||||
@@ -342,7 +364,7 @@
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view v-if="equipmentGoods.equipmentCategory != '10'" class="renew-divider">-- 缴费记录 --</view>
|
||||
<view class="renew-order" v-if="renewOrderList.length > 0 && equipmentGoods.equipmentCategory != '10' ">
|
||||
<!-- 首付 -->
|
||||
@@ -508,26 +530,34 @@
|
||||
v-if="equipmentGoods.equipmentCategory != '10' && order.receiptStatus == 21 && !orderEnd">取消退租
|
||||
</view>
|
||||
</block> -->
|
||||
|
||||
|
||||
<block v-if="order.payStatus == PayStatusEnum.SUCCESS.value">
|
||||
<view class="btn-item" v-if="order.deliveryStatus <= 20 && order.receiptStatus == 10" @click="onReceipt(order.orderId)">确认收货</view>
|
||||
<view class="btn-item" v-else-if="order.orderStatus == 30 && order.deliveryStatus == 20 && order.receiptStatus == 20" @click="onBind(order)">绑定设备</view>
|
||||
|
||||
<view class="btn-item" v-if="order.deliveryStatus <= 20 && order.receiptStatus == 10"
|
||||
@click="onReceipt(order.orderId)">确认收货</view>
|
||||
<view class="btn-item"
|
||||
v-else-if="order.orderStatus == 30 && order.deliveryStatus == 20 && order.receiptStatus == 20"
|
||||
@click="onBind(order)">绑定设备</view>
|
||||
|
||||
<view class="btn-item" @click="handleRentingOut(order)"
|
||||
v-if="order.equipmentGoods.equipmentCategory != '10' && order.receiptStatus != 21 && order.receiptStatus != 30">我要退租</view>
|
||||
v-if="order.equipmentGoods.equipmentCategory != '10' && order.receiptStatus != 21 && order.receiptStatus != 30">
|
||||
我要退租</view>
|
||||
<view class="btn-item" @click="handleRentingOutCancel(order)"
|
||||
v-if="order.equipmentGoods.equipmentCategory != '10' && order.receiptStatus == 21 && !orderEnd">取消退租</view>
|
||||
|
||||
v-if="order.equipmentGoods.equipmentCategory != '10' && order.receiptStatus == 21 && !orderEnd">
|
||||
取消退租</view>
|
||||
|
||||
<view class="btn-item" @click="handleHireEquipment(order.orderId)"
|
||||
v-if="order.equipmentGoods.equipmentCategory != '10' && order.receiptStatus != 30 && order.receiptStatus != 21 && !orderEnd && order.orderId >= 28804 && order.deliveryStatus == 40">我要续费</view>
|
||||
|
||||
v-if="order.equipmentGoods.equipmentCategory != '10' && order.receiptStatus != 30 && order.receiptStatus != 21 && !orderEnd && order.orderId >= 28804 && order.deliveryStatus == 40">
|
||||
我要续费</view>
|
||||
|
||||
<block v-if="order.orderStatus == OrderStatusEnum.COMPLETED.value && order.isComment == 0">
|
||||
<view class="btn-item" v-if="order.equipmentGoods.equipmentCategory == '40' && order.deliveryStatus == DeliveryStatusEnum.ACCEPT.value"
|
||||
<view class="btn-item"
|
||||
v-if="order.equipmentGoods.equipmentCategory == '40' && order.deliveryStatus == DeliveryStatusEnum.ACCEPT.value"
|
||||
@click="handleChangeEquipment(order.orderId,order.equipment.equipmentId)">换电</view>
|
||||
<!-- <view class="btn-item" v-if="item.equipmentGoods.equipmentCategory == '锂电池租赁' || item.equipmentGoods.equipmentCategory == '电动车租赁'" @click="handleTargetDetail(item.orderId)">续费</view> -->
|
||||
</block>
|
||||
|
||||
</block>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -541,8 +571,9 @@
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 更换设备码 -->
|
||||
<u-popup v-model="showQRCodeChange" mode="center" border-radius="26" :closeable="true">
|
||||
<u-popup v-model="showQRCodeChange" mode="center" border-radius="10" :closeable="true">
|
||||
<view class="qrcode-bind">
|
||||
|
||||
<view class="title">请输入更换的新电池编号</view>
|
||||
<view class="bind-content">
|
||||
<input v-model="bindValue" class="input" @confirm="onSearch" focus="true" placeholder="请输入设备编号"
|
||||
@@ -551,6 +582,7 @@
|
||||
<view class="submit">
|
||||
<u-button type="error" @click="doEquipment(true)">确定更换电池</u-button>
|
||||
</view>
|
||||
<view class="scan" @click="scan"><u-icon name="scan" color="#cecece" size="28"></u-icon>扫码</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 绑定设备码 -->
|
||||
@@ -675,7 +707,21 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
scan() {
|
||||
const app = this
|
||||
|
||||
my.ap.openAlipayApp({
|
||||
appCode: 'alipayScan',
|
||||
success: res => {
|
||||
console.log('openAlipayApp success', res);
|
||||
},
|
||||
fail: err => {
|
||||
console.log('openAlipayApp fail', err);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
// 获取当前订单信息
|
||||
getOrderDetail(canReset = false) {
|
||||
const app = this
|
||||
@@ -891,44 +937,44 @@
|
||||
})
|
||||
|
||||
}, */
|
||||
|
||||
|
||||
// 点击去支付
|
||||
onPay(orderId) {
|
||||
const app = this
|
||||
OrderApi.getOrderPayByOrderId(orderId).then(res => {
|
||||
if(res.data.isRenew == 0 && res.data.hasFreeze == 0){
|
||||
if (res.data.isRenew == 0 && res.data.hasFreeze == 0) {
|
||||
if (res.data.equipmentCategory != 10 && res.data.orderStr) {
|
||||
my.tradePay({
|
||||
orderStr: res.data.orderStr, // 完整的支付参数拼接成的字符串,从服务端获取
|
||||
success: (res) => {
|
||||
|
||||
|
||||
},
|
||||
fail: (res) => {
|
||||
|
||||
|
||||
},
|
||||
complete: () => {
|
||||
OrderApi.checkFreeze(orderId).then((res) => {
|
||||
if(res.code == 0){
|
||||
if (res.code == 0) {
|
||||
// app.$success("下单成功")
|
||||
setTimeout(() => {
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/order/index'
|
||||
// })
|
||||
this.$navTo('pages/checkout/cashier/index', {
|
||||
orderId: res.data.id
|
||||
})
|
||||
this.$navTo(
|
||||
'pages/checkout/cashier/index', {
|
||||
orderId: res.data.id
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
app.$error(res.errMsg)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
OrderApi.checkFreeze(orderId).then((r) => {
|
||||
if(r.code == 0){
|
||||
if (r.code == 0) {
|
||||
app.$success("下单成功")
|
||||
setTimeout(() => {
|
||||
// uni.redirectTo({
|
||||
@@ -938,19 +984,18 @@
|
||||
orderId: r.data.id
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
app.$error(r.errMsg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
this.$navTo('pages/checkout/cashier/index', {
|
||||
orderId: res.data.id
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
@@ -1008,7 +1053,7 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 跳转到设备详情页
|
||||
handleTargetEquipment(equipmentId) {
|
||||
this.$navTo('pages/user/equipment/index', {
|
||||
@@ -1021,7 +1066,7 @@
|
||||
orderId: res.data.id
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
// 订单提交成功后回调
|
||||
onSubmitCallback(result) {
|
||||
@@ -1070,7 +1115,7 @@
|
||||
const app = this
|
||||
app.showQRCodeChange = true
|
||||
},
|
||||
|
||||
|
||||
// 绑定设备页面
|
||||
onBind(item) {
|
||||
const app = this
|
||||
@@ -1140,6 +1185,17 @@
|
||||
padding-bottom: calc(env(safe-area-inset-bottom) + 106rpx + 6rpx);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.scan {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
font-size: 24rpx;
|
||||
color: #cecece;
|
||||
}
|
||||
|
||||
// 页面顶部
|
||||
.header {
|
||||
display: flex;
|
||||
@@ -1594,7 +1650,7 @@
|
||||
// 弹出层 - 绑定设备码
|
||||
.qrcode-bind {
|
||||
width: 550rpx;
|
||||
height: 300rpx;
|
||||
|
||||
padding: 36rpx 30rpx;
|
||||
|
||||
.title {
|
||||
|
||||
0
pages/order/express/index.vue
Executable file → Normal file
0
pages/order/express/index.vue
Executable file → Normal file
0
pages/order/extract/check.vue
Executable file → Normal file
0
pages/order/extract/check.vue
Executable file → Normal file
175
pages/order/index.vue
Executable file → Normal file
175
pages/order/index.vue
Executable file → Normal file
@@ -14,12 +14,17 @@
|
||||
</view>
|
||||
<view class="item-top-right">
|
||||
<text class="state-text" v-if="item.payStatus == 10">待支付</text>
|
||||
<text class="state-text" v-if="item.payStatus == 20 && item.deliveryStatus <= 20 && item.receiptStatus == 10">待收货</text>
|
||||
<text class="state-text" v-if="item.payStatus == 20 && item.deliveryStatus == 20 && item.receiptStatus == 20">待绑定</text>
|
||||
<text class="state-text"
|
||||
v-if="item.payStatus == 20 && item.deliveryStatus <= 20 && item.receiptStatus == 10">待收货</text>
|
||||
<text class="state-text"
|
||||
v-if="item.payStatus == 20 && item.deliveryStatus == 20 && item.receiptStatus == 20">待绑定</text>
|
||||
<!-- <text class="state-text" v-else-if="item.receiptStatus == 21">进行中</text> -->
|
||||
<text class="state-text" v-if="item.payStatus == 20 && item.deliveryStatus == 40 && item.receiptStatus == 20">进行中</text>
|
||||
<text class="state-text" v-else-if="item.payStatus == 20 && item.receiptStatus == 21">退租中</text>
|
||||
<text class="state-text" v-else-if="item.payStatus == 20 && item.orderStatus == 40">已完成</text>
|
||||
<text class="state-text"
|
||||
v-if="item.payStatus == 20 && item.deliveryStatus == 40 && item.receiptStatus == 20">进行中</text>
|
||||
<text class="state-text"
|
||||
v-else-if="item.payStatus == 20 && item.receiptStatus == 21">退租中</text>
|
||||
<text class="state-text"
|
||||
v-else-if="item.payStatus == 20 && item.orderStatus == 40">已完成</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 商品列表 -->
|
||||
@@ -45,21 +50,25 @@
|
||||
<text class="twoline-hide"
|
||||
v-if="item.orderStatus == 30">到期时间:{{ item.expirationTime }}</text>
|
||||
<text class="twoline-hide" v-else>下单时间:{{ item.payTime }}</text>
|
||||
<text class="twoline-hide">设备编号:{{ item.equipment.equipmentCode ? item.equipment.equipmentCode : ''}}</text>
|
||||
<text
|
||||
class="twoline-hide">设备编号:{{ item.equipment.equipmentCode ? item.equipment.equipmentCode : ''}}</text>
|
||||
<text class="twoline-hide">设备名称:{{ item.equipmentGoods.goodsName }}</text>
|
||||
<text class="twoline-hide">设备型号:{{ item.equipmentGoods.batteryModel }}</text>
|
||||
<text class="twoline-hide">下单用户:{{ item.nickname }}</text>
|
||||
<text class="twoline-hide yuqi-text" v-if="item.payStatus == 10 && item.expirationDay < 0">逾期状态:
|
||||
<text class="twoline-hide yuqi-text"
|
||||
v-if="item.payStatus == 10 && item.expirationDay < 0">逾期状态:
|
||||
(已逾期{{ Math.abs(item.expirationDay) }}天)</text>
|
||||
<text class="twoline-hide yuqi-text"
|
||||
v-if="item.payStatus == 10 && item.expirationDay < 7 && item.expirationDay > 0">逾期状态: 即将过期</text>
|
||||
v-if="item.payStatus == 10 && item.expirationDay < 7 && item.expirationDay > 0">逾期状态:
|
||||
即将过期</text>
|
||||
<!-- <view class="order-total">
|
||||
<text>合计:</text>
|
||||
<text class="unit" style="color: #ff0000;">¥</text>
|
||||
<text class="money">{{ item.totalPrice }}</text>
|
||||
</view> -->
|
||||
<!-- <text class="twoline-hide">合计:{{ item.equipmentGoods.batteryModel }}</text> -->
|
||||
<text class="twoline-hide" style="padding-left: 52rpx;">合计:<span style="color: #ff0000;">¥{{ item.totalPrice }}</span></text>
|
||||
<text class="twoline-hide" style="padding-left: 52rpx;">合计:<span
|
||||
style="color: #ff0000;">¥{{ item.totalPrice }}</span></text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 交易信息 -->
|
||||
@@ -75,19 +84,23 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 订单合计 -->
|
||||
|
||||
|
||||
<!-- 订单操作 -->
|
||||
<view v-if="item.orderStatus != OrderStatusEnum.CANCELLED.value" class="order-handle">
|
||||
<view class="btn-group clearfix">
|
||||
<view class="btn-item active" v-if="item.receiptStatus==10" @click="onBind(item)">绑定设备</view>
|
||||
<view
|
||||
class="btn-item active" v-if="item.receiptStatus==20&&item.idCode==null" @click="onReceipt(item.orderId)">确认身份</view>
|
||||
<!-- 未支付取消订单 -->
|
||||
<block v-if="item.payStatus == PayStatusEnum.PENDING.value">
|
||||
<block v-if="item.payStatus == PayStatusEnum.PENDING.value&&item.receiptStatus==20&&item.idCode">
|
||||
<view class="btn-item active" @click="onPay(item.orderId)">去支付</view>
|
||||
<view class="btn-item" @click="onCancel(item.orderId)">取消</view>
|
||||
</block>
|
||||
<!-- 已支付进行中的订单 -->
|
||||
<block v-if="item.orderStatus != OrderStatusEnum.APPLY_CANCEL.value">
|
||||
<!-- 订单核销码 -->
|
||||
<block v-if="item.payStatus == PayStatusEnum.SUCCESS.value && item.deliveryType == DeliveryTypeEnum.EXTRACT.value && item.deliveryStatus == DeliveryStatusEnum.NOT_DELIVERED.value">
|
||||
<block
|
||||
v-if="item.payStatus == PayStatusEnum.SUCCESS.value && item.deliveryType == DeliveryTypeEnum.EXTRACT.value && item.deliveryStatus == DeliveryStatusEnum.NOT_DELIVERED.value">
|
||||
<view class="btn-item active" @click="onExtractQRCode(item.orderId)">
|
||||
<text class="iconfont icon-qr-extract"></text>
|
||||
<text class="m-l-10">核销码</text>
|
||||
@@ -98,28 +111,34 @@
|
||||
<view v-else class="f-28 col-8">取消申请中</view>
|
||||
<!-- 确认收货 -->
|
||||
<block v-if="item.payStatus == PayStatusEnum.SUCCESS.value">
|
||||
<view v-if="item.deliveryStatus <= 20 && item.receiptStatus == 10" class="btn-item active" @click="onReceipt(item.orderId)">确认收货</view>
|
||||
<view v-else-if="item.orderStatus == 30 && item.deliveryStatus == 20 && item.receiptStatus == 20" class="btn-item active" @click="onBind(item)">绑定设备</view>
|
||||
|
||||
<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="handleRentingOutCancel(item)"
|
||||
v-if="item.equipmentGoods.equipmentCategory != '10' && item.receiptStatus == 21">取消退租</view>
|
||||
|
||||
<view class="btn-item" @click="handleHireEquipment(item.orderId)"
|
||||
v-if="item.equipmentGoods.equipmentCategory != '10' && item.receiptStatus != 30 && item.receiptStatus != 21 && item.orderId >= 28804 && item.deliveryStatus == 40">我要续费</view>
|
||||
|
||||
|
||||
<block v-if="item.orderStatus == OrderStatusEnum.COMPLETED.value && item.isComment == 0">
|
||||
<view class="btn-item" v-if="item.equipmentGoods.equipmentCategory == '40' && item.deliveryStatus == DeliveryStatusEnum.ACCEPT.value"
|
||||
@click="handleChangeEquipment(item.orderId,item.equipment.equipmentId)">换电</view>
|
||||
|
||||
<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="handleRentingOutCancel(item)"
|
||||
v-if="item.equipmentGoods.equipmentCategory != '10' && item.receiptStatus == 21">
|
||||
取消退租</view>
|
||||
|
||||
<view class="btn-item" @click="handleHireEquipment(item.orderId)"
|
||||
v-if="item.equipmentGoods.equipmentCategory != '10' && item.receiptStatus != 30 && item.receiptStatus != 21 && item.orderId >= 28804 && item.deliveryStatus == 40">
|
||||
我要续费</view>
|
||||
|
||||
<block
|
||||
v-if="item.orderStatus == OrderStatusEnum.COMPLETED.value && item.isComment == 0">
|
||||
<view class="btn-item"
|
||||
v-if="item.equipmentGoods.equipmentCategory == '40' && item.deliveryStatus == DeliveryStatusEnum.ACCEPT.value"
|
||||
@click="handleChangeEquipment(item.orderId,item.equipment.equipmentId)">换电
|
||||
</view>
|
||||
<!-- <view class="btn-item" v-if="item.equipmentGoods.equipmentCategory == '锂电池租赁' || item.equipmentGoods.equipmentCategory == '电动车租赁'" @click="handleTargetDetail(item.orderId)">续费</view> -->
|
||||
</block>
|
||||
</block>
|
||||
<!-- 订单评价 -->
|
||||
|
||||
|
||||
|
||||
|
||||
<view class="btn-item" @click="handleTargetDetail(item.orderId)">详情</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -158,6 +177,7 @@
|
||||
<view class="submit">
|
||||
<u-button type="error" @click="doEquipment(true)">确定更换电池</u-button>
|
||||
</view>
|
||||
<view class="scan" @click="scan"><u-icon name="scan" color="#cecece" size="28"></u-icon>扫码</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
@@ -314,7 +334,21 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
scan() {
|
||||
const app = this
|
||||
|
||||
my.ap.openAlipayApp({
|
||||
appCode: 'alipayScan',
|
||||
success: res => {
|
||||
console.log('openAlipayApp success', res);
|
||||
},
|
||||
fail: err => {
|
||||
console.log('openAlipayApp fail', err);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
// 初始化当前选中的标签
|
||||
initCurTab(options) {
|
||||
const app = this
|
||||
@@ -456,24 +490,28 @@
|
||||
// 确认收货
|
||||
onReceipt(orderId) {
|
||||
const app = this
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
content: '确认收到商品了吗?',
|
||||
success(o) {
|
||||
if (o.confirm) {
|
||||
// OrderApi.receipt(orderId)
|
||||
// .then(result => {
|
||||
// // 显示成功信息
|
||||
// app.$success(result.message)
|
||||
// // 刷新订单列表
|
||||
// app.onRefreshList()
|
||||
// })
|
||||
app.$navTo('pages/order/delivery', {
|
||||
orderId
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
app.$navTo('pages/order/delivery', {
|
||||
orderId
|
||||
})
|
||||
// uni.showModal({
|
||||
// title: '友情提示',
|
||||
// content: '确认收到商品了吗?',
|
||||
// success(o) {
|
||||
// if (o.confirm) {
|
||||
// // OrderApi.receipt(orderId)
|
||||
// // .then(result => {
|
||||
// // // 显示成功信息
|
||||
// // app.$success(result.message)
|
||||
// // // 刷新订单列表
|
||||
// // app.onRefreshList()
|
||||
// // })
|
||||
// app.$navTo('pages/order/delivery', {
|
||||
// orderId
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
},
|
||||
// 上传图片
|
||||
chooseImage(orderId) {
|
||||
@@ -565,7 +603,7 @@
|
||||
app.showQRCodePopup = true
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
handleRentingOut(order) {
|
||||
const app = this
|
||||
uni.showModal({
|
||||
@@ -589,7 +627,7 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
handleRentingOutCancel(order) {
|
||||
const app = this
|
||||
uni.showModal({
|
||||
@@ -618,29 +656,28 @@
|
||||
onPay(orderId) {
|
||||
const app = this
|
||||
getOrderPayByOrderId(orderId).then(res => {
|
||||
if(res.data.isRenew == 0 && res.data.hasFreeze == 0){
|
||||
if (res.data.isRenew == 0 && res.data.hasFreeze == 0) {
|
||||
if (res.data.equipmentCategory != 10 && res.data.orderStr) {
|
||||
my.tradePay({
|
||||
orderStr: res.data.orderStr, // 完整的支付参数拼接成的字符串,从服务端获取
|
||||
success: (res) => {
|
||||
|
||||
},
|
||||
fail: (res) => {
|
||||
|
||||
},
|
||||
fail: (res) => {},
|
||||
complete: () => {
|
||||
checkFreeze(orderId).then((r) => {
|
||||
if(r.code == 0){
|
||||
if (r.code == 0) {
|
||||
// app.$success("押金校验成功!")
|
||||
setTimeout(() => {
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/order/index'
|
||||
// })
|
||||
this.$navTo('pages/checkout/cashier/index', {
|
||||
orderId: r.data.id
|
||||
})
|
||||
this.$navTo(
|
||||
'pages/checkout/cashier/index', {
|
||||
orderId: r.data.id
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
app.$error(r.message)
|
||||
app.onRefreshList()
|
||||
}
|
||||
@@ -649,7 +686,7 @@
|
||||
});
|
||||
} else {
|
||||
checkFreeze(orderId).then((r) => {
|
||||
if(r.code == 0){
|
||||
if (r.code == 0) {
|
||||
app.$success("押金校验成功")
|
||||
setTimeout(() => {
|
||||
// uni.redirectTo({
|
||||
@@ -660,8 +697,7 @@
|
||||
orderId: r.data.id
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
app.$error(r.message)
|
||||
app.onRefreshList()
|
||||
}
|
||||
@@ -672,7 +708,7 @@
|
||||
orderId: res.data.id
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
@@ -696,7 +732,7 @@
|
||||
app.equipmentId = equipmentId
|
||||
app.showQRCodeBindChange = true
|
||||
},
|
||||
|
||||
|
||||
// 续费
|
||||
handleHireEquipment(orderId) {
|
||||
getOrderPayByOrderId(orderId).then(res => {
|
||||
@@ -704,7 +740,7 @@
|
||||
orderId: res.data.id
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
// 换电
|
||||
doEquipment(canReset = false) {
|
||||
@@ -736,6 +772,15 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.scan {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
font-size: 24rpx;
|
||||
color: #cecece;
|
||||
}
|
||||
|
||||
// 项目内容
|
||||
.order-item {
|
||||
margin: 20rpx auto 20rpx auto;
|
||||
@@ -914,7 +959,7 @@
|
||||
// 弹出层 - 绑定设备码
|
||||
.qrcode-bind {
|
||||
width: 550rpx;
|
||||
height: 300rpx;
|
||||
|
||||
padding: 36rpx 30rpx;
|
||||
|
||||
.title {
|
||||
|
||||
Reference in New Issue
Block a user