diff --git a/subpkg/property/chosseCompany.vue b/subpkg/property/chosseCompany.vue
index 9dbb008..c5335ae 100644
--- a/subpkg/property/chosseCompany.vue
+++ b/subpkg/property/chosseCompany.vue
@@ -59,15 +59,13 @@
租赁车辆
- 自有车辆
车牌号:{{item.car_license}}
租赁车辆
-
+
@@ -142,6 +140,9 @@
title="请输入驳回理由">
+
+ 驳回理由不能为空
+
@@ -165,6 +166,7 @@
export default {
data() {
return {
+ noValue: false,
flag1: true,
times: 0,
dataList: {},
@@ -183,6 +185,7 @@
// 13043214321
this.dataList = res.data.vehicleContract
this.carList = res.data.vehicleRentCars
+ this.checked = [this.carList[0].car_id] || ''
this.dataList.cars_info ? this.dataList.cars_info = JSON.parse(this.dataList.cars_info).license :
""
if (this.dataList.status == 3) {
@@ -233,16 +236,23 @@
}
},
confirm() {
+ if (!this.overruleValue) {
+ this.noValue = true
+ return
+ }
// console.log(this.overruleValue)
overruleApi({
id: this.dataList.id,
content: this.overruleValue,
}).then(res => {
this.showPop = false
+ this.noValue = false
Toast("操作成功")
setTimeout(() => {
- uni.navigateBack()
- }, 2000)
+ uni.redirectTo({
+ url: "/subpkg/property/index"
+ })
+ }, 1000)
})
},
timer() {
@@ -262,10 +272,10 @@
},
contractFn() {
- console.log(this.checked)
+
contractApi({
id: this.dataList.id,
- car_id: this.checked[0]?.car_id ? this.checked[0].car_id : ""
+ car_id: this.checked[0] || ""
}).then(res => {
this.navTo('/subpkg/property/success')
})
@@ -274,7 +284,7 @@
// sendcontractFn() {
// // this.sendFn()
- // Toast("操作成功")
+ // Toast("操作成功")
// this.times = 10
// this.timer()
diff --git a/subpkg/property/index.vue b/subpkg/property/index.vue
index 556387d..9ffd495 100644
--- a/subpkg/property/index.vue
+++ b/subpkg/property/index.vue
@@ -8,22 +8,15 @@
-
+
-
-
+
+
+
+
+ 数量超过上限
+
+
+ 数量不能为空
+
+
{
- Toast(res.msg)
+ Toast("操作成功")
this.step = -1
})
},
@@ -370,13 +376,16 @@
this.toDetail("/subpkg/property/chosseCompany")
},
confirm() {
- if (!this.newCarNum) return
+ if (!this.newCarNum || this.newCarNum > this.datas.can_rent_num) {
+ this.novalue = true
+ return
+ }
this.showPop = false
leaseApi({
num: Number(this.newCarNum)
}).then(res => {
this.newCarNum = ""
- // Toast(res.msg)
+ // Toast("操作成功")
this.showpopp = true
})
},
diff --git a/subpkg/property/success.vue b/subpkg/property/success.vue
index e99f81c..a634f19 100644
--- a/subpkg/property/success.vue
+++ b/subpkg/property/success.vue
@@ -21,12 +21,10 @@
uni.redirectTo({
url: '/subpkg/property/index'
})
- }, 3000)
-
+ }, 2000)
}
}
-