fix
This commit is contained in:
@@ -111,7 +111,8 @@
|
|||||||
<u-input v-model="dealerPhone" :disabled="disabled" placeholder="请输入推荐人手机号" />
|
<u-input v-model="dealerPhone" :disabled="disabled" placeholder="请输入推荐人手机号" />
|
||||||
</view>
|
</view>
|
||||||
<view class="submit">
|
<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> -->
|
<!-- <u-button type="primary" :disabled="!agree" @click="onBuy">立即下单</u-button> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="submit">
|
<!-- <view class="submit">
|
||||||
@@ -258,7 +259,7 @@
|
|||||||
},
|
},
|
||||||
async onBuy() {
|
async onBuy() {
|
||||||
const app = this
|
const app = this
|
||||||
if(!this.agree){
|
if (!this.agree) {
|
||||||
app.$error("请先同意租赁合同和隐私协议!")
|
app.$error("请先同意租赁合同和隐私协议!")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -267,8 +268,7 @@
|
|||||||
dealerPhone
|
dealerPhone
|
||||||
} = this
|
} = this
|
||||||
let total = 0.0
|
let total = 0.0
|
||||||
uni.showLoading({
|
uni.showLoading({})
|
||||||
})
|
|
||||||
// 未登录状态
|
// 未登录状态
|
||||||
if (!uni.getStorageSync('userId')) {
|
if (!uni.getStorageSync('userId')) {
|
||||||
app.$error('请先登录', function() {
|
app.$error('请先登录', function() {
|
||||||
@@ -278,13 +278,18 @@
|
|||||||
}
|
}
|
||||||
const userRes = await getUser()
|
const userRes = await getUser()
|
||||||
const user = userRes.data
|
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
|
total = record.batteryPrice
|
||||||
}else if(record.equipmentCategory == 20) {
|
} else if (record.equipmentCategory == 20) {
|
||||||
total = record.downPayment + record.serviceCharges
|
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 = record.batteryRent
|
||||||
}
|
}
|
||||||
total = total.toFixed(2)
|
total = total.toFixed(2)
|
||||||
@@ -325,20 +330,17 @@
|
|||||||
complete: () => {
|
complete: () => {
|
||||||
checkFreeze(orderId).then((res) => {
|
checkFreeze(orderId).then((res) => {
|
||||||
console.log(record.equipmentCategory + ": " + res)
|
console.log(record.equipmentCategory + ": " + res)
|
||||||
if(res.code == 0){
|
if (res.code == 0) {
|
||||||
app.$success("下单成功")
|
app.$success("下单成功")
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.hideLoading({
|
uni.hideLoading({})
|
||||||
})
|
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/order/index'
|
url: '/pages/order/index'
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
app.$error(res.errMsg)
|
app.$error(res.errMsg)
|
||||||
uni.hideLoading({
|
uni.hideLoading({})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -346,19 +348,16 @@
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
checkFreeze(orderId).then((res) => {
|
checkFreeze(orderId).then((res) => {
|
||||||
if(res.code == 0){
|
if (res.code == 0) {
|
||||||
app.$success("下单成功")
|
app.$success("下单成功")
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.hideLoading({
|
uni.hideLoading({})
|
||||||
})
|
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/order/index'
|
url: '/pages/order/index'
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
} else {
|
||||||
else {
|
uni.hideLoading({})
|
||||||
uni.hideLoading({
|
|
||||||
})
|
|
||||||
app.$error(res.errMsg)
|
app.$error(res.errMsg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1041,8 +1041,7 @@
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.$success(res.message)
|
this.$success(res.message)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 刷新当前订单数据
|
uni.navigateBack()
|
||||||
app.onRefreshList()
|
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$success(err.message)
|
this.$success(err.message)
|
||||||
@@ -1133,12 +1132,14 @@
|
|||||||
} = this
|
} = this
|
||||||
EquipmentApi.bindEquipment({
|
EquipmentApi.bindEquipment({
|
||||||
equipmentCode: bindValue,
|
equipmentCode: bindValue,
|
||||||
orderId: equipment.orderId
|
orderId: orderId
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
app.$success(result.message)
|
app.$success(result.message)
|
||||||
app.showQRCodeBind = false
|
app.showQRCodeBind = false
|
||||||
// 刷新订单列表
|
// 刷新订单列表
|
||||||
app.onRefreshList()
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 1000)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
app.$error(err.message)
|
app.$error(err.message)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -55,9 +55,9 @@
|
|||||||
<text class="twoline-hide">设备名称:{{ item.equipmentGoods.goodsName }}</text>
|
<text class="twoline-hide">设备名称:{{ item.equipmentGoods.goodsName }}</text>
|
||||||
<text class="twoline-hide">设备型号:{{ item.equipmentGoods.batteryModel }}</text>
|
<text class="twoline-hide">设备型号:{{ item.equipmentGoods.batteryModel }}</text>
|
||||||
<text class="twoline-hide">下单用户:{{ item.nickname }}</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"
|
<text class="twoline-hide yuqi-text"
|
||||||
v-if="item.payStatus == 10 && item.expirationDay < 0">逾期状态:
|
v-if="item.payStatus == 10 && item.expirationDay < 0">逾期状态:(已逾期{{ Math.abs(item.expirationDay) }}天)</text>
|
||||||
(已逾期{{ Math.abs(item.expirationDay) }}天)</text>
|
|
||||||
<text class="twoline-hide yuqi-text"
|
<text class="twoline-hide yuqi-text"
|
||||||
v-if="item.payStatus == 10 && item.expirationDay < 7 && item.expirationDay > 0">逾期状态:
|
v-if="item.payStatus == 10 && item.expirationDay < 7 && item.expirationDay > 0">逾期状态:
|
||||||
即将过期</text>
|
即将过期</text>
|
||||||
|
|||||||
Reference in New Issue
Block a user