fix
This commit is contained in:
@@ -111,7 +111,8 @@
|
||||
<u-input v-model="dealerPhone" :disabled="disabled" placeholder="请输入推荐人手机号" />
|
||||
</view>
|
||||
<view class="submit">
|
||||
<image style="width: 7rem;margin: 0 auto;" @click="onBuy" src="@/static/zhimamianya.png" mode="widthFix"></image>
|
||||
<image style="width: 7rem;margin: 0 auto;" @click="onBuy" src="@/static/zhimamianya.png" mode="widthFix">
|
||||
</image>
|
||||
<!-- <u-button type="primary" :disabled="!agree" @click="onBuy">立即下单</u-button> -->
|
||||
</view>
|
||||
<!-- <view class="submit">
|
||||
@@ -258,7 +259,7 @@
|
||||
},
|
||||
async onBuy() {
|
||||
const app = this
|
||||
if(!this.agree){
|
||||
if (!this.agree) {
|
||||
app.$error("请先同意租赁合同和隐私协议!")
|
||||
return
|
||||
}
|
||||
@@ -267,8 +268,7 @@
|
||||
dealerPhone
|
||||
} = this
|
||||
let total = 0.0
|
||||
uni.showLoading({
|
||||
})
|
||||
uni.showLoading({})
|
||||
// 未登录状态
|
||||
if (!uni.getStorageSync('userId')) {
|
||||
app.$error('请先登录', function() {
|
||||
@@ -278,13 +278,18 @@
|
||||
}
|
||||
const userRes = await getUser()
|
||||
const user = userRes.data
|
||||
if(user.phone==dealerPhone&&dealerPhone!=''){
|
||||
app.$error('不可以填写自己的手机号')
|
||||
uni.hideLoading({})
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(record.equipmentCategory == 10) {
|
||||
if (record.equipmentCategory == 10) {
|
||||
total = record.batteryPrice
|
||||
}else if(record.equipmentCategory == 20) {
|
||||
} else if (record.equipmentCategory == 20) {
|
||||
total = record.downPayment + record.serviceCharges
|
||||
}else if(record.equipmentCategory == 30 || record.equipmentCategory == 40){
|
||||
} else if (record.equipmentCategory == 30 || record.equipmentCategory == 40) {
|
||||
total = record.batteryRent
|
||||
}
|
||||
total = total.toFixed(2)
|
||||
@@ -293,7 +298,7 @@
|
||||
var time = new Date().getTime() + 60 * 60 * 1000 * 24
|
||||
const expirationTime = dateFormat('YYYY-mm-dd HH:MM:SS', new Date(time))
|
||||
app.expirationTime = expirationTime
|
||||
|
||||
|
||||
addOrder({
|
||||
orderNo: createOrderNo(),
|
||||
merchantCode: record.merchantCode,
|
||||
@@ -325,20 +330,17 @@
|
||||
complete: () => {
|
||||
checkFreeze(orderId).then((res) => {
|
||||
console.log(record.equipmentCategory + ": " + res)
|
||||
if(res.code == 0){
|
||||
if (res.code == 0) {
|
||||
app.$success("下单成功")
|
||||
setTimeout(() => {
|
||||
uni.hideLoading({
|
||||
})
|
||||
uni.hideLoading({})
|
||||
uni.redirectTo({
|
||||
url: '/pages/order/index'
|
||||
})
|
||||
}, 100)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
app.$error(res.errMsg)
|
||||
uni.hideLoading({
|
||||
})
|
||||
uni.hideLoading({})
|
||||
}
|
||||
})
|
||||
|
||||
@@ -346,19 +348,16 @@
|
||||
});
|
||||
} else {
|
||||
checkFreeze(orderId).then((res) => {
|
||||
if(res.code == 0){
|
||||
if (res.code == 0) {
|
||||
app.$success("下单成功")
|
||||
setTimeout(() => {
|
||||
uni.hideLoading({
|
||||
})
|
||||
uni.hideLoading({})
|
||||
uni.redirectTo({
|
||||
url: '/pages/order/index'
|
||||
})
|
||||
}, 100)
|
||||
}
|
||||
else {
|
||||
uni.hideLoading({
|
||||
})
|
||||
} else {
|
||||
uni.hideLoading({})
|
||||
app.$error(res.errMsg)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1041,8 +1041,7 @@
|
||||
}).then(res => {
|
||||
this.$success(res.message)
|
||||
setTimeout(() => {
|
||||
// 刷新当前订单数据
|
||||
app.onRefreshList()
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}).catch(err => {
|
||||
this.$success(err.message)
|
||||
@@ -1133,12 +1132,14 @@
|
||||
} = this
|
||||
EquipmentApi.bindEquipment({
|
||||
equipmentCode: bindValue,
|
||||
orderId: equipment.orderId
|
||||
orderId: orderId
|
||||
}).then(result => {
|
||||
app.$success(result.message)
|
||||
app.showQRCodeBind = false
|
||||
// 刷新订单列表
|
||||
app.onRefreshList()
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}).catch(err => {
|
||||
app.$error(err.message)
|
||||
})
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
<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" v-if="item.refuseDesc">退租被拒绝:{{ item.refuseDesc }}</text>
|
||||
<text class="twoline-hide yuqi-text"
|
||||
v-if="item.payStatus == 10 && item.expirationDay < 0">逾期状态:
|
||||
(已逾期{{ Math.abs(item.expirationDay) }}天)</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>
|
||||
|
||||
Reference in New Issue
Block a user