页面优化
This commit is contained in:
parent
b905fa7c29
commit
323bd3b551
@ -65,8 +65,7 @@
|
|||||||
<view class="" style="float: right;display: flex;">
|
<view class="" style="float: right;display: flex;">
|
||||||
<text style="margin-right: 10rpx;">租赁车辆</text>
|
<text style="margin-right: 10rpx;">租赁车辆</text>
|
||||||
<u-checkbox-group v-model="checked">
|
<u-checkbox-group v-model="checked">
|
||||||
<u-checkbox active-color="#0122C7" :label="id" :name="item" shape="square"
|
<u-checkbox active-color="#0122C7" :name="item.car_id" shape="square" label=""></u-checkbox>
|
||||||
label=""></u-checkbox>
|
|
||||||
</u-checkbox-group>
|
</u-checkbox-group>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -186,6 +185,7 @@
|
|||||||
// 13043214321
|
// 13043214321
|
||||||
this.dataList = res.data.vehicleContract
|
this.dataList = res.data.vehicleContract
|
||||||
this.carList = res.data.vehicleRentCars
|
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 :
|
this.dataList.cars_info ? this.dataList.cars_info = JSON.parse(this.dataList.cars_info).license :
|
||||||
""
|
""
|
||||||
if (this.dataList.status == 3) {
|
if (this.dataList.status == 3) {
|
||||||
@ -272,7 +272,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
contractFn() {
|
contractFn() {
|
||||||
// console.log(this.checked)
|
|
||||||
contractApi({
|
contractApi({
|
||||||
id: this.dataList.id,
|
id: this.dataList.id,
|
||||||
car_id: this.checked[0]?.car_id ? this.checked[0].car_id : ""
|
car_id: this.checked[0]?.car_id ? this.checked[0].car_id : ""
|
||||||
|
@ -8,22 +8,15 @@
|
|||||||
<view class="noCar" v-if='company_type==18'>
|
<view class="noCar" v-if='company_type==18'>
|
||||||
<!-- 申请 -->
|
<!-- 申请 -->
|
||||||
<view class="" v-if="step==-2">
|
<view class="" v-if="step==-2">
|
||||||
<!-- <view class="">
|
|
||||||
你还没有所属车辆哦,请向镇公司申请用车或使用自有车辆并绑定系统
|
|
||||||
</view> -->
|
|
||||||
<u-empty text="你还没有所属车辆哦,请向镇公司申请用车或使用自有车辆并绑定系统~" icon="../../static/img/empty/data.png">
|
<u-empty text="你还没有所属车辆哦,请向镇公司申请用车或使用自有车辆并绑定系统~" icon="../../static/img/empty/data.png">
|
||||||
</u-empty>
|
</u-empty>
|
||||||
<view>
|
<view>
|
||||||
<mytn text='申请用车' class="upCar" :position="false" @click="applycarFn"></mytn>
|
<mytn text='申请用车' class="upCar" :position="false" @click="applycarFn"></mytn>
|
||||||
|
|
||||||
<!-- <u-button @tap="applycarFn" type="primary" style="background-color: #0122C7;border: none;"
|
|
||||||
class="btn">
|
|
||||||
申请用车</u-button> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<!-- <u-button @tap="show=true" type="primary" style="background-color: #0122C7;border: none;"
|
|
||||||
class="btn">
|
|
||||||
上传自有车辆</u-button> -->
|
|
||||||
<mytn text='上传自有车辆' @click="show=true"></mytn>
|
<mytn text='上传自有车辆' @click="show=true"></mytn>
|
||||||
</view>
|
</view>
|
||||||
<u-modal :show="show" @close="show=false" :showCancelButton="true" @confirm="upCarFn"
|
<u-modal :show="show" @close="show=false" :showCancelButton="true" @confirm="upCarFn"
|
||||||
@ -210,6 +203,15 @@
|
|||||||
:title="`请输入您需要租赁的车辆数量(上限为${datas.can_rent_num})`">
|
:title="`请输入您需要租赁的车辆数量(上限为${datas.can_rent_num})`">
|
||||||
<view class="slot-content">
|
<view class="slot-content">
|
||||||
<u--input placeholder="请输入内容" type="number" v-model="newCarNum"></u--input>
|
<u--input placeholder="请输入内容" type="number" v-model="newCarNum"></u--input>
|
||||||
|
<view style="color: red;font-size: 20rpx;" v-show="novalue">
|
||||||
|
|
||||||
|
<view class="" v-if="newCarNum>datas.can_rent_num">
|
||||||
|
数量超过上限
|
||||||
|
</view>
|
||||||
|
<view class="" v-else>
|
||||||
|
数量不能为空
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-modal>
|
</u-modal>
|
||||||
<u-modal :show="showpopp" title="提示" @confirm="confirmFn" @close="showpopp=false"
|
<u-modal :show="showpopp" title="提示" @confirm="confirmFn" @close="showpopp=false"
|
||||||
@ -249,6 +251,7 @@
|
|||||||
name: "vehicle",
|
name: "vehicle",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
novalue: false,
|
||||||
noInfo: false,
|
noInfo: false,
|
||||||
aaa: 0,
|
aaa: 0,
|
||||||
showLoading: true,
|
showLoading: true,
|
||||||
@ -344,8 +347,11 @@
|
|||||||
},
|
},
|
||||||
// 申请车辆
|
// 申请车辆
|
||||||
applycarFn() {
|
applycarFn() {
|
||||||
|
Toast("操作成功")
|
||||||
|
this.step = -1
|
||||||
|
return
|
||||||
upVehicleApi().then(res => {
|
upVehicleApi().then(res => {
|
||||||
Toast(res.msg)
|
Toast("操作成功")
|
||||||
this.step = -1
|
this.step = -1
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -370,13 +376,16 @@
|
|||||||
this.toDetail("/subpkg/property/chosseCompany")
|
this.toDetail("/subpkg/property/chosseCompany")
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
if (!this.newCarNum) return
|
if (!this.newCarNum || this.newCarNum > this.datas.can_rent_num) {
|
||||||
|
this.novalue = true
|
||||||
|
return
|
||||||
|
}
|
||||||
this.showPop = false
|
this.showPop = false
|
||||||
leaseApi({
|
leaseApi({
|
||||||
num: Number(this.newCarNum)
|
num: Number(this.newCarNum)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.newCarNum = ""
|
this.newCarNum = ""
|
||||||
// Toast(res.msg)
|
// Toast("操作成功")
|
||||||
this.showpopp = true
|
this.showpopp = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user