乱七八糟
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
</block>
|
||||
</block>
|
||||
<!-- 已完成 -->
|
||||
<block v-if="order.orderStatus == OrderStatusEnum.COMPLETED.value">
|
||||
<block v-if="order.orderStatus == 40">
|
||||
<image class="image" src="/static/order/status/received.png" mode="aspectFit"></image>
|
||||
</block>
|
||||
<!-- 已取消/待取消 -->
|
||||
@@ -31,7 +31,8 @@
|
||||
</block>
|
||||
</view>
|
||||
<view class="status-text">
|
||||
<text class="state-text" v-if="order.payStatus == 20 && (order.receiptStatus == 30 || order.currPeriods >= order.periods)">已完成</text>
|
||||
<text class="state-text"
|
||||
v-if="order.payStatus == 20 && (order.receiptStatus == 30 || ( order.equipmentGoods.equipmentCategory != 10 && order.currPeriods >= order.periods))">已完成</text>
|
||||
<text class="state-text" v-else-if="order.payStatus == 10">待支付</text>
|
||||
<text class="state-text" v-else-if="order.payStatus == 20 && order.receiptStatus == 10">待绑定</text>
|
||||
<text class="state-text" v-else-if="order.orderStatus == 30 && order.receiptStatus == 20">进行中</text>
|
||||
@@ -199,36 +200,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="equipmentGoods.equipmentCategory == '20'">
|
||||
<view class="info-item">
|
||||
<view class="item-lable">下单方式</view>
|
||||
<view class="item-content">
|
||||
<text>分期</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="equipmentGoods.equipmentCategory == '30'">
|
||||
<view class="info-item">
|
||||
<view class="item-lable">下单方式</view>
|
||||
<view class="item-content">
|
||||
<text>已租代购</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">可用天数</view>
|
||||
<view class="item-content">
|
||||
<text>{{ Math.abs(order.expirationDay) }}天</text>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="equipmentGoods.equipmentCategory == '40'">
|
||||
<view class="info-item">
|
||||
<view class="item-lable">下单方式</view>
|
||||
<view class="item-content">
|
||||
<text>租赁</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">所属门店</view>
|
||||
<view class="item-content">
|
||||
@@ -247,25 +218,19 @@
|
||||
<text>{{ equipment.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="item-lable">商品编号</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">设备押金</view>
|
||||
<view class="item-content">
|
||||
<text>{{ equipmentGoods.goodsId }}</text>
|
||||
<text>+¥{{ equipmentGoods.batteryDeposit }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="info-item" v-if="order.orderStatus == OrderStatusEnum.COMPLETED.value">
|
||||
<view class="item-lable">到期时间</view>
|
||||
<view class="item-content">
|
||||
<text>{{ order.expirationTime }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
<block v-if="equipmentGoods.equipmentCategory == '20'">
|
||||
<view class="info-item">
|
||||
<view class="item-lable">销售价格</view>
|
||||
@@ -373,83 +338,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 续费订单 -->
|
||||
<view class="trade-info i-card">
|
||||
<view class="info-item" v-if="order.orderSource != 10">
|
||||
<view class="item-lable">当前期数</view>
|
||||
<view class="item-content">
|
||||
<text v-if="order.orderSource == 20">首期</text>
|
||||
<text v-else>第 1 期</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">订单金额</view>
|
||||
<view class="item-content">
|
||||
<text>¥{{ orderPrice }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="order.couponMoney > 0" class="info-item">
|
||||
<view class="item-lable">优惠券抵扣</view>
|
||||
<view class="item-content">
|
||||
<text>-¥{{ order.couponMoney }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="order.pointsMoney > 0" class="info-item">
|
||||
<view class="item-lable">{{ setting.pointsName }}抵扣</view>
|
||||
<view class="item-content">
|
||||
<text>-¥{{ order.pointsMoney }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item" v-if="priceTitle1">
|
||||
<view class="item-lable">{{ priceTitle1 }}</view>
|
||||
<view class="item-content">
|
||||
<text>+¥{{ orderPrice1 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item" v-if="priceTitle2">
|
||||
<view class="item-lable">{{ priceTitle2 }}</view>
|
||||
<view class="item-content">
|
||||
<text>+¥{{ orderPrice2 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item" v-if="priceTitle3">
|
||||
<view class="item-lable">{{ priceTitle3 }}</view>
|
||||
<view class="item-content">
|
||||
<text>+¥{{ orderPrice3 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">付款时间</view>
|
||||
<view class="item-content">{{ order.payTime }}</view>
|
||||
</view>
|
||||
<view class="info-item"
|
||||
v-if="order.orderStatus == OrderStatusEnum.COMPLETED.value && equipmentGoods.equipmentCategory != '10'">
|
||||
<view class="item-lable">到期时间</view>
|
||||
<view class="item-content">
|
||||
<text>{{ order.expirationTime }}</text>
|
||||
<text class="yuqi-text" v-if="order.expirationDay < 0">(已逾期
|
||||
{{ Math.abs(order.expirationDay) }}天)</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <view v-if="order.updatePrice.value != '0.00'" class="info-item">
|
||||
<view class="item-lable">后台改价</view>
|
||||
<view class="item-content">
|
||||
<text>{{ order.updatePrice.symbol }}</text>
|
||||
<text>¥{{ order.updatePrice.value }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="divider"></view>
|
||||
<view class="trade-total">
|
||||
<text class="lable" alt="续费金额">{{ freeTitle }}</text>
|
||||
<view class="goods-price">
|
||||
<text class="unit">¥</text>
|
||||
<text class="value">{{ orderPrice }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="renew-divider">-- 续费订单 --</view>
|
||||
|
||||
<view v-if="equipmentGoods.equipmentCategory != '10'" class="renew-divider">-- 缴费记录 --</view>
|
||||
<view class="renew-order" v-if="renewOrderList.length > 0 && equipmentGoods.equipmentCategory != '10' ">
|
||||
<!-- 首付 -->
|
||||
<!-- <view class="trade-info i-card " v-for="(item,index) in renewOrderList" :key="index" v-if="index == 0">
|
||||
@@ -494,8 +384,9 @@
|
||||
<view class="info-item" v-if="order.orderSource != 10">
|
||||
<view class="item-lable">当前期数</view>
|
||||
<view class="item-content">
|
||||
<text v-if="order.orderSource == 20">第 {{ index + 1}} 期</text>
|
||||
<text v-else>第 {{ index + 2}} 期</text>
|
||||
<text v-if="order.orderSource == 20 && index == 0">首期</text>
|
||||
<text v-if="order.orderSource == 20 && index != 0">第 {{index}} 期</text>
|
||||
<text v-if="order.orderSource == 30 || order.orderSource == 40">第 {{ index + 1}} 期</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
@@ -534,6 +425,10 @@
|
||||
<text>+¥{{ orderPrice3 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">付款状态</view>
|
||||
<view class="item-content">{{ item.payStatus == 20 ? '已支付': '未支付' }}</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="item-lable">付款时间</view>
|
||||
<view class="item-content">{{ item.payTime }}</view>
|
||||
@@ -547,9 +442,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item" v-if="item.expirationDay < 0">
|
||||
<view class="info-item" v-if="item.expirationDay > 0">
|
||||
<view class="item-lable">逾期天数</view>
|
||||
<view class="item-content"><text class="yuqi-text">{{ Math.abs(item.expirationDay) }}天</text>
|
||||
<view class="item-content"><text class="yuqi-text">{{ item.expirationDay }}天</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -588,10 +483,10 @@
|
||||
<view class="btn-item active" @click="onPay(order.orderId)">去支付</view>
|
||||
</block>
|
||||
<!-- 确认收货 -->
|
||||
<block
|
||||
v-if="order.deliveryStatus == DeliveryStatusEnum.DELIVERED.value && order.receiptStatus == ReceiptStatusEnum.NOT_RECEIVED.value">
|
||||
<view class="btn-item active" @click="onReceipt(order.orderId)">确认收货</view>
|
||||
</block>
|
||||
<!-- <block
|
||||
v-if="order.payStatus == 20 && order.receiptStatus == 10">
|
||||
<view class="btn-item active" @click="onReceipt(order.orderId)">绑定设备</view>
|
||||
</block> -->
|
||||
<!-- 订单评价 -->
|
||||
<block
|
||||
v-if="order.orderStatus == OrderStatusEnum.COMPLETED.value && order.isComment == 0 && order.receiptStatus != 30">
|
||||
@@ -810,14 +705,14 @@
|
||||
const {
|
||||
orderId
|
||||
} = app.order
|
||||
listOrder({
|
||||
OrderApi.getOrderPayList({
|
||||
rentOrderId: orderId,
|
||||
payStatus: 20
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
res.data.sort((a,b) => {
|
||||
return new Date(a.createTime.replace(/-/gi, '/')) - new Date(b.createTime.replace(/-/gi, '/'))
|
||||
res.data.sort((a, b) => {
|
||||
return new Date(a.createTime.replace(/-/gi, '/')) - new Date(b.createTime.replace(
|
||||
/-/gi, '/'))
|
||||
})
|
||||
app.renewOrderList = res.data;
|
||||
if (res.data.length >= app.equipmentGoods.periods && (this.order.orderSource == 20 || this
|
||||
@@ -943,9 +838,12 @@
|
||||
|
||||
// 点击去支付
|
||||
onPay(orderId) {
|
||||
this.$navTo('pages/checkout/cashier/index', {
|
||||
orderId
|
||||
OrderApi.getOrderPayByOrderId(orderId).then(res => {
|
||||
this.$navTo('pages/checkout/cashier/index', {
|
||||
orderId: res.data.id
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 跳转到订单评价页
|
||||
@@ -960,7 +858,7 @@
|
||||
title: '提示',
|
||||
content: '是否退租',
|
||||
success: (result) => {
|
||||
if(result.confirm) {
|
||||
if (result.confirm) {
|
||||
const {
|
||||
orderId,
|
||||
equipmentId
|
||||
@@ -980,7 +878,7 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
|
||||
// 跳转到设备详情页
|
||||
@@ -990,51 +888,12 @@
|
||||
})
|
||||
},
|
||||
handleHireEquipment(orderId) {
|
||||
const app = this
|
||||
const {
|
||||
order
|
||||
} = this
|
||||
const orderNo = createOrderNo()
|
||||
var time = new Date().getTime() + 60 * 60 * 1000 * 24
|
||||
const expirationTime = dateFormat('YYYY-mm-dd HH:MM:SS', new Date(time))
|
||||
addOrder({
|
||||
orderNo: createOrderNo(),
|
||||
merchantCode: order.merchantCode,
|
||||
goodsId: app.goodsId,
|
||||
totalPrice: app.orderPrice,
|
||||
orderPrice: app.orderPrice,
|
||||
payPrice: app.orderPrice,
|
||||
month: app.month,
|
||||
expirationTime,
|
||||
isRenew: 1,
|
||||
rentOrderId: orderId,
|
||||
batteryRent: order.batteryRent,
|
||||
batteryDeposit: order.batteryDeposit,
|
||||
batteryInsurance: order.batteryInsurance,
|
||||
orderSource: order.orderSource,
|
||||
orderSourceId: order.goodsId,
|
||||
equipmentId: order.equipmentId,
|
||||
dealerPhone: order.dealerPhone,
|
||||
comments: '续租订单' + order.orderNo
|
||||
}).then(res => {
|
||||
const {
|
||||
orderId
|
||||
} = res.data
|
||||
app.$success("下单成功")
|
||||
setTimeout(() => {
|
||||
this.$navTo('pages/checkout/cashier/index', {
|
||||
orderId
|
||||
})
|
||||
}, 100)
|
||||
OrderApi.getOrderPayByOrderId(orderId).then(res => {
|
||||
this.$navTo('pages/checkout/cashier/index', {
|
||||
orderId: res.data.id
|
||||
})
|
||||
})
|
||||
// alipayReLet({
|
||||
// orderId,
|
||||
// orderNo,
|
||||
// tenantId,
|
||||
// payPrice: 0.01,
|
||||
// merchantName: app.order.merchantName,
|
||||
// userId: app.order.userId
|
||||
// }).then(result => app.onSubmitCallback(result)).catch(err => app.$error(err.message))
|
||||
|
||||
},
|
||||
// 订单提交成功后回调
|
||||
onSubmitCallback(result) {
|
||||
|
||||
Reference in New Issue
Block a user