Merge branch 'dev' of https://gitea.lihaink.cn/mkm/OfficeApp
This commit is contained in:
commit
edab952d33
@ -59,15 +59,13 @@
|
||||
<view class="car_info" v-if="dataList.type==0">
|
||||
<view class="car_type">
|
||||
<text v-if="true">租赁车辆</text>
|
||||
<text v-else>自有车辆</text>
|
||||
</view>
|
||||
<view class="car_li" v-for="item,index in carList">
|
||||
车牌号:{{item.car_license}}
|
||||
<view class="" style="float: right;display: flex;">
|
||||
<text style="margin-right: 10rpx;">租赁车辆</text>
|
||||
<u-checkbox-group v-model="checked">
|
||||
<u-checkbox active-color="#0122C7" :label="id" :name="item" shape="square"
|
||||
label=""></u-checkbox>
|
||||
<u-checkbox active-color="#0122C7" :name="item.car_id" shape="square" label=""></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
@ -142,6 +140,9 @@
|
||||
title="请输入驳回理由">
|
||||
<view class="slot-content">
|
||||
<u--textarea v-model="overruleValue" placeholder="请输入内容" class="textarea_cls"></u--textarea>
|
||||
<view style="color: red;font-size: 20rpx;" v-show="noValue">
|
||||
驳回理由不能为空
|
||||
</view>
|
||||
</view>
|
||||
</u-modal>
|
||||
</view>
|
||||
@ -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')
|
||||
})
|
||||
|
@ -8,22 +8,15 @@
|
||||
<view class="noCar" v-if='company_type==18'>
|
||||
<!-- 申请 -->
|
||||
<view class="" v-if="step==-2">
|
||||
<!-- <view class="">
|
||||
你还没有所属车辆哦,请向镇公司申请用车或使用自有车辆并绑定系统
|
||||
</view> -->
|
||||
|
||||
<u-empty text="你还没有所属车辆哦,请向镇公司申请用车或使用自有车辆并绑定系统~" icon="../../static/img/empty/data.png">
|
||||
</u-empty>
|
||||
<view>
|
||||
<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 class="">
|
||||
<!-- <u-button @tap="show=true" type="primary" style="background-color: #0122C7;border: none;"
|
||||
class="btn">
|
||||
上传自有车辆</u-button> -->
|
||||
|
||||
<mytn text='上传自有车辆' @click="show=true"></mytn>
|
||||
</view>
|
||||
<u-modal :show="show" @close="show=false" :showCancelButton="true" @confirm="upCarFn"
|
||||
@ -210,6 +203,15 @@
|
||||
:title="`请输入您需要租赁的车辆数量(上限为${datas.can_rent_num})`">
|
||||
<view class="slot-content">
|
||||
<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>
|
||||
</u-modal>
|
||||
<u-modal :show="showpopp" title="提示" @confirm="confirmFn" @close="showpopp=false"
|
||||
@ -249,6 +251,7 @@
|
||||
name: "vehicle",
|
||||
data() {
|
||||
return {
|
||||
novalue: false,
|
||||
noInfo: false,
|
||||
aaa: 0,
|
||||
showLoading: true,
|
||||
@ -344,8 +347,11 @@
|
||||
},
|
||||
// 申请车辆
|
||||
applycarFn() {
|
||||
Toast("操作成功")
|
||||
this.step = -1
|
||||
return
|
||||
upVehicleApi().then(res => {
|
||||
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
|
||||
})
|
||||
},
|
||||
|
@ -21,12 +21,10 @@
|
||||
uni.redirectTo({
|
||||
url: '/subpkg/property/index'
|
||||
})
|
||||
}, 3000)
|
||||
|
||||
}, 2000)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
|
||||
|
@ -21,8 +21,8 @@ function baseRequestTwo(url, method, data, {
|
||||
noAuth = false,
|
||||
noVerify = false
|
||||
}) {
|
||||
let Url = "https://logistics.lihaink.cn", //正式环境
|
||||
// let Url = "https://ceshi-logistics.lihaink.cn", //测试环境
|
||||
// let Url = "https://logistics.lihaink.cn", //正式环境
|
||||
let Url = "https://ceshi-logistics.lihaink.cn", //测试环境
|
||||
header = HEADER;
|
||||
if (!noAuth) {
|
||||
// 已经未登录了,禁止请求
|
||||
|
Loading…
x
Reference in New Issue
Block a user