对接口
This commit is contained in:
parent
eae3be3381
commit
caa99433f1
@ -14,6 +14,9 @@ export const upVehicleApi = (data) => oahttp.post('/vehicle/rentApply', data)
|
|||||||
export const applycarApi = (data) => oahttp.post('/vehicle/rentApply', data)
|
export const applycarApi = (data) => oahttp.post('/vehicle/rentApply', data)
|
||||||
// 显示轨迹
|
// 显示轨迹
|
||||||
export const locusApi = (data) => oahttp.post('/vehicle/vehicleTrack', data)
|
export const locusApi = (data) => oahttp.post('/vehicle/vehicleTrack', data)
|
||||||
|
// 当前车辆位置信息
|
||||||
|
// export const locusApi = (data) => oahttp.post('/vehicle/vehicleTrack', data)
|
||||||
|
// api / getCarLocal
|
||||||
// 签约列表
|
// 签约列表
|
||||||
export const getAgencyListApi = (data) => oahttp.get('/vehicle/rentApplyList', data)
|
export const getAgencyListApi = (data) => oahttp.get('/vehicle/rentApplyList', data)
|
||||||
// 签约公司详情
|
// 签约公司详情
|
||||||
@ -28,6 +31,13 @@ export const sendcontractApi = (data) => oahttp.post('/vehicle/initiatingRentCar
|
|||||||
export const overruleApi = (data) => oahttp.post('/vehicle/rejectRentApply', data)
|
export const overruleApi = (data) => oahttp.post('/vehicle/rejectRentApply', data)
|
||||||
// 小组公司详情
|
// 小组公司详情
|
||||||
export const villageCompanyApi = (data) => oahttp.get('/vehicle/villageCompanyIndex', data)
|
export const villageCompanyApi = (data) => oahttp.get('/vehicle/villageCompanyIndex', data)
|
||||||
|
|
||||||
|
// 重新发送短信
|
||||||
|
export const sendMsgApi = (data) => oahttp.post('/vehicle/sendSmsAgain', data)
|
||||||
|
// 解约
|
||||||
|
export const cancelContractApi = (data) => oahttp.post('/vehicle/cancelContract', data)
|
||||||
|
// 镇街公司合同列表
|
||||||
|
export const ContractListApi = (data) => oahttp.get('/vehicle/townCompanyContractList', data)
|
||||||
// 资产详情
|
// 资产详情
|
||||||
// export const getpropertyDetil = (data) => oahttp.get('/lstDetail', data)
|
// export const getpropertyDetil = (data) => oahttp.get('/lstDetail', data)
|
||||||
|
|
||||||
|
@ -562,6 +562,15 @@
|
|||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}, {
|
||||||
|
"path": "property/contractList",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "合同列表",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#0122C7",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
"path": "buyShare/buyShare",
|
"path": "buyShare/buyShare",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
<view class="contract_list">
|
<view class="contract_list">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="personnel_list">
|
<view class="personnel_list">
|
||||||
<view class="cards" v-for="(item,index) in list" :key="item.id" @click="navTo('/subpkg/contractDetail/contractDetail?id='+item.id)">
|
<view class="cards" v-for="(item,index) in list" :key="item.id"
|
||||||
|
@click="navTo('/subpkg/contractDetail/contractDetail?id='+item.id)">
|
||||||
<view class="cards_head">
|
<view class="cards_head">
|
||||||
<text style="font-size: 32rpx">电子合同</text>
|
<text style="font-size: 32rpx">电子合同</text>
|
||||||
</view>
|
</view>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="margin-top: 20rpx;">
|
<view class="" style="margin-top: 20rpx;">
|
||||||
{{item.village_company_name}}提出租赁车辆一辆
|
{{item.company_b_name}}提出租赁车辆一辆
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -1,42 +1,62 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="date">
|
<view class="date" v-if="dataList.type !=2">
|
||||||
<!-- 2022年12月12日提出申请 -->
|
<!-- 2022年12月12日提出申请 -->
|
||||||
{{dataList.create_time.slice(0,10)}} 提出申请
|
{{dataList.create_time.slice(0,10)}} 提出申请
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="date" v-else>
|
||||||
|
<!-- 2022年12月12日提出申请 -->
|
||||||
|
{{dataList.create_time.slice(0,10)}} 提出解除申请
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<!-- 公司信息 -->
|
||||||
<view class="cards">
|
<view class="cards">
|
||||||
<view class="cards_head">
|
<view class="cards_head">
|
||||||
<view class="cards_head_top">
|
<view class="cards_head_top">
|
||||||
<text><u--image src="../../static/img/company/company.png" width="33.29rpx" height="33.29rpx"
|
<text><u--image src="../../static/img/company/company.png" width="33.29rpx" height="33.29rpx"
|
||||||
style="margin-right:20rpx"></u--image></text>
|
style="margin-right:20rpx"></u--image></text>
|
||||||
<text>{{dataList.village_company_name}}</text>
|
<text>{{dataList.company_b_name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<text @click="navTo('/subpkg/companySign/companySign?id=')">详情 <uni-icons type="forward"
|
<text @click="navTo(`/subpkg/companySign/companySign?id=${dataList.company_b_id}`)">详情 <uni-icons
|
||||||
style="margin-left: 10rpx;" color="white"></uni-icons></text>
|
type="forward" style="margin-left: 10rpx;" color="white"></uni-icons></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="cards_content">
|
<view class="cards_content">
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="is_contract">
|
<view class="is_contract">
|
||||||
<view>
|
<view>
|
||||||
<text>法人姓名 :</text>
|
<text>法人姓名 :</text>
|
||||||
<text>{{dataList.village_company_user}}</text>
|
<text>{{dataList.company_b_user}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<text style="color: green;" v-if="true">已签约</text>
|
<text style="color: green;" v-if="true">已签约</text>
|
||||||
<!-- <text style="color: red;" v-else>未签约</text> -->
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="" @click="copyPhone()">
|
<view class="" @click="copyPhone()">
|
||||||
<text>联系电话 :</text>
|
<text>联系电话 :</text>
|
||||||
<text>{{dataList.village_company_phone}}</text>
|
<text>{{dataList.company_b_phone}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="car_info">
|
|
||||||
|
<!-- 车辆列表 -->
|
||||||
|
<view class="car_info" v-if="dataList.cars_info">
|
||||||
|
<view class="car_type">
|
||||||
|
<text>自有车辆</text>
|
||||||
|
</view>
|
||||||
|
<view class="car_li">
|
||||||
|
车牌号:{{dataList.cars_info}}
|
||||||
|
<view class="" style="float: right;display: flex;">
|
||||||
|
<text style="margin-right: 10rpx;">自有车辆</text>
|
||||||
|
<u-radio-group v-model="dataList.cars_info">
|
||||||
|
<u-radio active-color="#0122C7" shape="square" :name="dataList.cars_info" label=""></u-radio>
|
||||||
|
</u-radio-group>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="car_info" v-if="carList.length">
|
||||||
<view class="car_type">
|
<view class="car_type">
|
||||||
<text v-if="true">空闲车辆</text>
|
<text v-if="true">空闲车辆</text>
|
||||||
<text v-else>自有车辆</text>
|
<text v-else>自有车辆</text>
|
||||||
@ -53,42 +73,75 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="btns">
|
<!-- 合同 -->
|
||||||
<!-- 生成合同 -->
|
<view class="card" v-if="dataList.type==2">
|
||||||
<view class="" v-if="1">
|
|
||||||
<u-button :disabled="false" type="primary" @click="showPop=true"
|
|
||||||
style="margin-bottom: 20rpx;width: 100%;" color="#FF7C32" text="申请驳回"></u-button>
|
|
||||||
<u-button :disabled="false" type="primary" text="生成合同" @tap="contractFn" color="#0122C7"></u-button>
|
|
||||||
</view>
|
|
||||||
<!-- 审核中 -->
|
|
||||||
<view class="" v-if="0">
|
|
||||||
<u-button :disabled="true" type="primary" text="合同已上传,等待审核" @tap="contractFn" color="grey"></u-button>
|
|
||||||
</view>
|
|
||||||
<!-- 审核通过 -->
|
|
||||||
<view class="" v-if="0">
|
|
||||||
|
|
||||||
<view class="card">
|
|
||||||
<view class="contract">
|
<view class="contract">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
|
<u--image :showLoading="true" src="../../static/img/contract/pdf.png" width="80px"
|
||||||
|
height="80px"></u--image>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<view class="name">《入股合同》</view>
|
<view class="name">《租赁合同》</view>
|
||||||
<view>
|
<view>
|
||||||
<text>{{'2023-03-03'}}</text>
|
<text>{{'2023-03-03'}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right" @click="navToContract('fdsf')">
|
<!-- <view class="right" @click="navToContract(dataList.file)"> -->
|
||||||
|
<view class="right">
|
||||||
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
|
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
|
||||||
<view>查看</view>
|
<view @click="navToContract(dataList.old_file)">查看</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-button :disabled="false" type="primary" text="发送合同" @tap="sendcontractFn" color="#0122C7"></u-button>
|
{{dataList.status}}
|
||||||
|
<!-- 按钮 -->
|
||||||
|
<view class="btns">
|
||||||
|
<!-- 生成合同 -->
|
||||||
|
<view class="" v-if="dataList.status==-1">
|
||||||
|
<u-button :disabled="false" type="primary" @click="showPop=true"
|
||||||
|
style="margin-bottom: 20rpx;width: 100%;" color="#FF7C32" text="申请驳回"></u-button>
|
||||||
|
<u-button :disabled="carList.length<=0 &&!dataList.cars_info.length" type="primary" text="生成合同"
|
||||||
|
@tap="contractFn" color="#0122C7"></u-button>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 审核中 -->
|
||||||
|
<view class="" v-if="dataList.status==0">
|
||||||
|
<u-button :disabled="true" type="primary" text="合同已上传,等待审核" @tap="contractFn" color="grey"></u-button>
|
||||||
|
</view>
|
||||||
|
<!-- 审核通过 -->
|
||||||
|
<view class="" v-if="dataList.status==1||dataList.status==2">
|
||||||
|
<!-- <view class="" v-if="true"> -->
|
||||||
|
<view class="card">
|
||||||
|
<view class="contract">
|
||||||
|
<view class="left">
|
||||||
|
<u--image :showLoading="true" src="../../static/img/contract/pdf.png" width="80px"
|
||||||
|
height="80px"></u--image>
|
||||||
|
<view class="text">
|
||||||
|
<view class="name">{{ dataList.type!=2? "《租赁合同》":"解除合同" }} </view>
|
||||||
|
<view>
|
||||||
|
<text>{{'2023-03-03'}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="right" @click="navToContract(dataList.file)"> -->
|
||||||
|
<view class="right">
|
||||||
|
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
|
||||||
|
<view @click="navToContract(dataList.file)">查看</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-button v-if="flag" :disabled="false" type="primary" text="发送合同" @tap="sendcontractFn"
|
||||||
|
color="#0122C7"></u-button>
|
||||||
|
<!-- <u-button v-if="flag" :disabled="false" type="primary" text="发送合同" @tap="sendMsgFn"
|
||||||
|
color="#0122C7"></u-button> -->
|
||||||
|
<u-button v-else :disabled="false" type="primary" :text="`重新发送${times}s`" @tap="sendMsgFn"
|
||||||
|
color="grey"></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!--uview 组件 -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<view class="">
|
<view class="">
|
||||||
<u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true"
|
<u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true"
|
||||||
title="请输入驳回理由">
|
title="请输入驳回理由">
|
||||||
@ -105,57 +158,108 @@
|
|||||||
getAgencyDetailApi,
|
getAgencyDetailApi,
|
||||||
contractApi,
|
contractApi,
|
||||||
overruleApi,
|
overruleApi,
|
||||||
sendcontractApi
|
sendcontractApi,
|
||||||
|
sendMsgApi
|
||||||
} from "@/api/property.js"
|
} from "@/api/property.js"
|
||||||
|
import {
|
||||||
|
download_file
|
||||||
|
} from "@/api/junziqian.js"
|
||||||
import {
|
import {
|
||||||
Toast
|
Toast
|
||||||
} from "../../libs/uniApi"
|
} from "../../libs/uniApi"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
times: 5,
|
||||||
dataList: {},
|
dataList: {},
|
||||||
overruleValue: "",
|
overruleValue: "",
|
||||||
showPop: false,
|
showPop: false,
|
||||||
checked: [],
|
checked: [],
|
||||||
carList: [1, 2]
|
carList: [],
|
||||||
|
flag: true,
|
||||||
|
lg: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(options) {
|
||||||
console.log(this.$route.query)
|
// console.log(this.$route.query)
|
||||||
// console.log(6565)
|
// console.log(6565)
|
||||||
getAgencyDetailApi({
|
getAgencyDetailApi({
|
||||||
id: this.$route.query.id
|
id: options.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
// 13043214321
|
// 13043214321
|
||||||
this.dataList = res.data.apply
|
this.dataList = res.data.vehicleContract
|
||||||
this.carList = res.data.cars
|
this.carList = res.data.vehicleRentCars
|
||||||
|
this.dataList.cars_info = JSON.parse(this.dataList.cars_info).license
|
||||||
|
if (this.dataList.status == 3) {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
sendAgainFn() {
|
||||||
|
sendMsgApi({
|
||||||
|
id: this.dataList.id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
sendFn() {
|
||||||
|
sendcontractApi({
|
||||||
|
id: this.dataList.id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
confirm() {
|
confirm() {
|
||||||
// console.log(this.overruleValue)
|
// console.log(this.overruleValue)
|
||||||
overruleApi({
|
overruleApi({
|
||||||
apply_id: this.dataList.id,
|
id: this.dataList.id,
|
||||||
content: this.overruleValue,
|
content: this.overruleValue,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
Toast("操作成功")
|
|
||||||
this.showPop = false
|
this.showPop = false
|
||||||
|
Toast("操作成功")
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 2000)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
timer() {
|
||||||
|
let that = this
|
||||||
|
let timers = setInterval(() => {
|
||||||
|
that.times--
|
||||||
|
if (that.times <= 0) {
|
||||||
|
this.flag = true
|
||||||
|
clearInterval(timers)
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
|
||||||
|
},
|
||||||
|
navToContract(contract_no) {
|
||||||
|
download_file({
|
||||||
|
applyNo: contract_no
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code != 1) {
|
||||||
|
Toast(res.msg || '合同未签订')
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/subpkg/pdfView/pdfView?url=${res.data.url}`
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
contractFn() {
|
contractFn() {
|
||||||
console.log(this.checked)
|
console.log(this.checked)
|
||||||
contractApi({
|
contractApi({
|
||||||
apply_id: this.dataList.id,
|
id: this.dataList.id,
|
||||||
car_id: this.checked[0].car_id
|
car_id: this.checked[0]?.car_id ? this.checked[0].car_id : ""
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.navTo('/subpkg/property/success')
|
this.navTo('/subpkg/property/success')
|
||||||
})
|
})
|
||||||
this.navTo('/subpkg/property/success')
|
this.navTo('/subpkg/property/success')
|
||||||
},
|
},
|
||||||
sendcontractFn() {
|
sendcontractFn() {
|
||||||
// sendcontractApi({
|
this.lg ? this.sendAgainFn() : this.sendFn()
|
||||||
// id:
|
Toast("操作成功")
|
||||||
// })
|
this.flag = false
|
||||||
|
this.times = 10
|
||||||
|
this.timer()
|
||||||
|
this.lg = true
|
||||||
},
|
},
|
||||||
navTo(url) {
|
navTo(url) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -173,78 +277,39 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
margin: 28rpx;
|
background-color: white;
|
||||||
width: 694rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
|
||||||
.c_title {
|
.contract {
|
||||||
color: #0022C7;
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
padding: 28rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.c_body {
|
|
||||||
margin: 28rpx;
|
|
||||||
padding-bottom: 28rpx;
|
|
||||||
display: flex;
|
|
||||||
border-bottom: 1px solid #F3F4F8;
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
width: 77rpx;
|
|
||||||
height: 77rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
margin-right: 12rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.body_text {
|
|
||||||
flex: 1;
|
|
||||||
font-size: 25rpx;
|
|
||||||
|
|
||||||
.b_title {
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.b_text {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 16rpx 0;
|
|
||||||
font-size: 28rpx;
|
|
||||||
|
|
||||||
.b_avatar {
|
.left {
|
||||||
width: 52rpx;
|
display: flex;
|
||||||
height: 52rpx;
|
align-items: center;
|
||||||
margin-right: 8rpx;
|
|
||||||
|
.text {
|
||||||
|
// background-color: red;
|
||||||
|
height: 80px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin-left: 15rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&_left {
|
.right {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
&_right {
|
|
||||||
color: #F02828;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 35rpx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.b_time {
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.cards {
|
.cards {
|
||||||
margin: 28rpx;
|
margin: 28rpx;
|
||||||
width: 694rpx;
|
width: 694rpx;
|
||||||
|
90
subpkg/property/contractList.vue
Normal file
90
subpkg/property/contractList.vue
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
<template>
|
||||||
|
<view class="">
|
||||||
|
<view class="card" v-for="item,index in datasList " :key="index">
|
||||||
|
<view class="contract">
|
||||||
|
<view class="left">
|
||||||
|
<u--image :showLoading="true" src="../../static/img/contract/pdf.png" width="80px"
|
||||||
|
height="80px"></u--image>
|
||||||
|
<view class="text">
|
||||||
|
<view class="name">《租赁合同》</view>
|
||||||
|
<view>
|
||||||
|
<text>{{item.create_time}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="right" @click="navToContract(dataList.file)"> -->
|
||||||
|
<view class="right" @click="showContractFn(item.file)">
|
||||||
|
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
|
||||||
|
<view>查看</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
ContractListApi
|
||||||
|
} from "@/api/property.js"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
datasList: [1, 2, 3],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
// return
|
||||||
|
ContractListApi().then(res => {
|
||||||
|
this.datasList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showContractFn(url) {
|
||||||
|
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/subpkg/pdfView/pdfView?url=${url}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.card {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
margin: 20rpx;
|
||||||
|
|
||||||
|
.contract {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
// background-color: red;
|
||||||
|
height: 80px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin-left: 15rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="" style="position: relative;">
|
<view class="">
|
||||||
<view v-if='true'>
|
<view v-if='showLoading'>
|
||||||
<u-loading-page :loading="showLoading"></u-loading-page>
|
<u-loading-page :loading="showLoading"></u-loading-page>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-else>
|
<view class="" v-else>
|
||||||
@ -28,8 +28,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-modal>
|
</u-modal>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 等待 -->
|
<!-- 等待 -->
|
||||||
<view class="" v-if='step==-1'>
|
<view class="" v-if='[-1,0,1,2].includes(step)'>
|
||||||
<!-- 上传自有车辆 -->
|
<!-- 上传自有车辆 -->
|
||||||
<view v-if="0">
|
<view v-if="0">
|
||||||
<view class="loading">
|
<view class="loading">
|
||||||
@ -39,19 +40,23 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 申请用车 -->
|
<!-- 申请用车 -->
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<view class="loading">
|
<view class="loading" v-if="datas.type !=2">
|
||||||
<span>你已提交用车申请,后台正在加快处理中,请耐心等待哦</span>
|
<span>你已提交用车申请,后台正在加快处理中,请耐心等待哦</span>
|
||||||
<span class="dots">...</span>
|
<span class="dots">...</span>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="loading" v-else>
|
||||||
|
<span>你已提交解除申请</span>
|
||||||
|
<span class="dots">...</span>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 审核结束 -->
|
<!-- 审核结束 -->
|
||||||
<view class="" v-if="step==4">
|
<view class="" v-if="step==4">
|
||||||
<view class="">
|
<view class="">
|
||||||
你的申请于2022年12月12日被驳回
|
你的申请于{{datas.update_time}}被驳回
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
驳回理由:xxxxxxxxxx
|
驳回理由: {{datas.reject_message}}
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
请修改相应内容重新提交哦
|
请修改相应内容重新提交哦
|
||||||
@ -75,6 +80,20 @@
|
|||||||
</u-modal>
|
</u-modal>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 车辆到期 -->
|
||||||
|
<!-- 申请 -->
|
||||||
|
<view class="" v-if="0">
|
||||||
|
<view class="">
|
||||||
|
你的车辆已到期,请重新签约
|
||||||
|
</view>
|
||||||
|
<view class="" style="margin: 20rpx 0;">
|
||||||
|
<u-button @tap="applycarFn" type="primary" style="background-color: #0122C7;border: none;"
|
||||||
|
class="btn">
|
||||||
|
申请用车</u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 镇街公司 -->
|
<!-- 镇街公司 -->
|
||||||
<view v-if='company_type==16'>
|
<view v-if='company_type==16'>
|
||||||
@ -82,7 +101,7 @@
|
|||||||
<text>可监管车辆数量 {{datas.monitor_num}}</text>
|
<text>可监管车辆数量 {{datas.monitor_num}}</text>
|
||||||
<view @click="showPop=true" class="not_leased">
|
<view @click="showPop=true" class="not_leased">
|
||||||
<view class="">
|
<view class="">
|
||||||
租赁 {{datas.rent_num}}
|
租赁 {{datas.rent_num}}<text v-if="datas.apply_num">(待审核:{{datas.apply_num}})</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="triangle-up" v-if="datas.can_rent_num">
|
<view class="triangle-up" v-if="datas.can_rent_num">
|
||||||
</view>
|
</view>
|
||||||
@ -90,17 +109,17 @@
|
|||||||
可再租赁车辆:{{datas.can_rent_num}}辆
|
可再租赁车辆:{{datas.can_rent_num}}辆
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text>自有车辆 {{datas.self_num}}</text>
|
<text v-if="datas.self_num">自有车辆 {{datas.self_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 公告栏 -->
|
<!-- 公告栏 -->
|
||||||
<view class="application_tit">
|
<view class="application_tit" v-if="applicationList.length">
|
||||||
|
<!-- <view class="application_tit" v-if="1"> -->
|
||||||
<view class="head" @click="navgo('/subpkg/property/agencyList')">
|
<view class="head" @click="navgo('/subpkg/property/agencyList')">
|
||||||
<text>签约申请</text>
|
<text>签约申请</text>
|
||||||
<view style="display: flex;">
|
<view style="display: flex;" v-if="applicationList.length>3">
|
||||||
<text>更多 </text>
|
<text>更多 </text>
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="li" @click="navgo(`/subpkg/property/chosseCompany?id=${item.id}`)"
|
<view class="li" @click="navgo(`/subpkg/property/chosseCompany?id=${item.id}`)"
|
||||||
@ -109,7 +128,7 @@
|
|||||||
{{item.create_time.slice(0, 10)}}
|
{{item.create_time.slice(0, 10)}}
|
||||||
</view>
|
</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
{{item.village_company_name}}提出租赁车辆一台
|
{{item.company_b_name}}提出租赁车辆一台
|
||||||
</view>
|
</view>
|
||||||
<view class="detail">
|
<view class="detail">
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
@ -120,18 +139,18 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="personnel_list">
|
<view class="personnel_list">
|
||||||
<view>
|
<view>
|
||||||
<view class="cards" v-for="item,index in dataList" :key="index"
|
<view class="cards" v-for="item,index in dataList" :key="index">
|
||||||
@click="navgo(`/subpkg/property/vehicle_a?id=${item.car_id}`)">
|
|
||||||
<view class="cards_head">
|
<view class="cards_head">
|
||||||
<text>{{item.car_license}}</text>
|
<text>{{item.car_license}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="cards_content">
|
<view class="cards_content">
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<!-- 已出租 -->
|
<!-- 已出租 -->
|
||||||
<view v-if="item.status==1">
|
<view v-if="item.status==2"
|
||||||
|
@click="navgo(`/subpkg/property/vehicle_a?id=${item.car_id}`)">
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<text>使用人: </text>
|
<text>使用人: </text>
|
||||||
<text> {{item.rent_company.master_name}}</text>
|
<text> {{item.rent_user.user_name}}</text>
|
||||||
<view style="float: right;">
|
<view style="float: right;">
|
||||||
<text style="color: green;" v-if="item.type==1">自有车辆</text>
|
<text style="color: green;" v-if="item.type==1">自有车辆</text>
|
||||||
<text style="color: orange;" v-else>租赁车辆</text>
|
<text style="color: orange;" v-else>租赁车辆</text>
|
||||||
@ -139,18 +158,16 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<text>联系方式: </text>
|
<text>联系方式: </text>
|
||||||
<text>{{item.rent_company.master_phone}}</text>
|
<text>{{item.rent_user.user_phone}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<text>所属公司: </text>
|
<text>所属公司: </text>
|
||||||
<text> {{item.rent_company.company_name}} </text>
|
<text> {{item.rent_user.company_name}} </text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<text>签约时间: </text>
|
<text>签约时间: </text>
|
||||||
<text> {{item.rent_time}} </text>
|
<text> {{item.rent_time}} </text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 未出租 -->
|
<!-- 未出租 -->
|
||||||
<view class="" v-else>
|
<view class="" v-else>
|
||||||
@ -162,14 +179,19 @@
|
|||||||
<text style="color: orange;" v-else>租赁车辆</text>
|
<text style="color: orange;" v-else>租赁车辆</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
|
||||||
暂未出租,快去选择承租对象吧!
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view style="text-align: center;" v-if="!dataList.length">
|
||||||
|
<u-empty v-if="!datas.monitor_num" text="你还没有可监管的车辆哦~" icon="../../static/img/empty/data.png">
|
||||||
|
</u-empty>
|
||||||
|
<u-empty v-else text="你还没有车辆哦,快去向平台申请用车吧" icon="../../static/img/empty/data.png"> </u-empty>
|
||||||
|
<!-- 你还没有车辆哦,快去向平台申请用车吧 -->
|
||||||
</view>
|
</view>
|
||||||
<u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true"
|
<u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true"
|
||||||
:title="`请输入您需要租赁的车辆数量(上限为${datas.can_rent_num})`">
|
:title="`请输入您需要租赁的车辆数量(上限为${datas.can_rent_num})`">
|
||||||
@ -178,8 +200,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-modal>
|
</u-modal>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<mytn text='合同列表' v-if="datas.rent_num" @click="navgo('/subpkg/property/contractList')"></mytn>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -198,10 +221,11 @@
|
|||||||
import {
|
import {
|
||||||
Toast
|
Toast
|
||||||
} from "../../libs/uniApi";
|
} from "../../libs/uniApi";
|
||||||
|
import mytn from "@/components/mybtn/mybtn.vue"
|
||||||
// Toast("请至少选择一辆车")
|
// Toast("请至少选择一辆车")
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
// mybtn
|
mytn
|
||||||
},
|
},
|
||||||
name: "vehicle",
|
name: "vehicle",
|
||||||
data() {
|
data() {
|
||||||
@ -217,11 +241,13 @@
|
|||||||
datas: {},
|
datas: {},
|
||||||
dataList: [],
|
dataList: [],
|
||||||
newCarNum: "",
|
newCarNum: "",
|
||||||
newcarTit: ""
|
newcarTit: "",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad() {
|
onLoad() {
|
||||||
let type = (JSON.parse(Cache.get("USER_INFO")).company.company_type)
|
let type = (JSON.parse(Cache.get("USER_INFO")).company.company_type)
|
||||||
this.company_type = type
|
this.company_type = type
|
||||||
@ -229,13 +255,21 @@
|
|||||||
if (type == 18) {
|
if (type == 18) {
|
||||||
// getvehicleDetailApi().then(res => {})
|
// getvehicleDetailApi().then(res => {})
|
||||||
villageCompanyApi().then(res => {
|
villageCompanyApi().then(res => {
|
||||||
|
if (!res.data?.id) {
|
||||||
|
|
||||||
this.showLoading = false
|
this.showLoading = false
|
||||||
this.step = res.data.status || 999
|
this.step = 999
|
||||||
console.log(res.data.cars_info.id)
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.showLoading = false
|
||||||
|
this.datas = res.data
|
||||||
|
this.step = res.data.status
|
||||||
|
|
||||||
switch (this.step) {
|
switch (this.step) {
|
||||||
case 3:
|
case 3:
|
||||||
uni.navigateTo({
|
uni.redirectTo({
|
||||||
url: `/subpkg/property/vehicle_a?type=2`
|
url: `/subpkg/property/vehicle_a?id=${res.data.cars_info.id}`
|
||||||
})
|
})
|
||||||
// this.step =
|
// this.step =
|
||||||
break;
|
break;
|
||||||
@ -250,9 +284,10 @@
|
|||||||
else {
|
else {
|
||||||
getvehicleListApi().then(res => {
|
getvehicleListApi().then(res => {
|
||||||
this.datas = res.data
|
this.datas = res.data
|
||||||
|
|
||||||
res.data.apply.length >= 2 ? this.applicationList = res.data.apply : this.applicationList = res
|
res.data.apply.length >= 2 ? this.applicationList = res.data.apply : this.applicationList = res
|
||||||
.data.apply.slice(0, 2)
|
.data.apply.slice(0, 2)
|
||||||
this.applicationList = res.data.apply
|
// this.applicationList = res.data.apply
|
||||||
this.dataList = res.data.car_list
|
this.dataList = res.data.car_list
|
||||||
this.showLoading = false
|
this.showLoading = false
|
||||||
})
|
})
|
||||||
@ -282,15 +317,15 @@
|
|||||||
applycarFn() {
|
applycarFn() {
|
||||||
upVehicleApi().then(res => {
|
upVehicleApi().then(res => {
|
||||||
Toast(res.msg)
|
Toast(res.msg)
|
||||||
})
|
|
||||||
this.step = 2
|
this.step = 2
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 自有车辆
|
// 自有车辆
|
||||||
upCarFn() {
|
upCarFn() {
|
||||||
upVehicleApi({
|
upVehicleApi({
|
||||||
license: this.carLicense
|
license: this.carLicense
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.show = false
|
// this.show = false
|
||||||
this.step = 2
|
this.step = 2
|
||||||
})
|
})
|
||||||
// upVehicleApi({
|
// upVehicleApi({
|
||||||
@ -299,7 +334,8 @@
|
|||||||
// }).then(res => {
|
// }).then(res => {
|
||||||
// this.show = false
|
// this.show = false
|
||||||
// })
|
// })
|
||||||
console.log(this.carLicense)
|
this.show = false
|
||||||
|
|
||||||
},
|
},
|
||||||
signFn() {
|
signFn() {
|
||||||
this.toDetail("/subpkg/property/chosseCompany")
|
this.toDetail("/subpkg/property/chosseCompany")
|
||||||
@ -353,8 +389,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.noCar {
|
.noCar {
|
||||||
padding: 50rpx;
|
padding: 100rpx;
|
||||||
margin-top: 30vh;
|
margin-top: 30vh;
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow-wrap: break-word;
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// width: 80vw;
|
// width: 80vw;
|
||||||
// height: auto;
|
// height: auto;
|
||||||
|
@ -12,13 +12,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
export default {
|
||||||
|
onLoad() {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/subpkg/property/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view :class="allMap?'map1':'map2'" style="position: relative;">
|
<view :class="allMap?'map1':'map2'" style="position: relative;" v-if="showMap">
|
||||||
<map :class="mapClass" id="map" :enable-zoom="true" :polyline="polyline" :markers='markers'
|
<map :class="mapClass" id="map" :enable-zoom="true" :polyline="polyline" :markers='markers'
|
||||||
:scale="scale" style="width:100%;height: 100%;" :latitude="markers[0].latitude"
|
:scale="scale" style="width:100%;height: 100%;" :latitude="markers[0].latitude"
|
||||||
:enable-scroll="true" :longitude="markers[0].longitude" @tap="allMap=!allMap">
|
:enable-scroll="true" :longitude="markers[0].longitude" @tap="allMap=!allMap">
|
||||||
@ -20,11 +20,11 @@
|
|||||||
<view class="cards_head">
|
<view class="cards_head">
|
||||||
<text>{{datas.car_license}}</text>
|
<text>{{datas.car_license}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="cards_content">
|
<view class="cards_content" v-if="datas.company">
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="li">
|
<view class="li" style="display: flex;justify-content: space-between;">
|
||||||
<text>行驶总里程: {{datas.mileage}}</text>
|
<text>行驶总里程: {{datas.mileage}}</text>
|
||||||
|
<text v-if="datas.type" style="color: green;">自有车辆</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<text>承租公司: </text>
|
<text>承租公司: </text>
|
||||||
@ -32,11 +32,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<text>负责人: </text>
|
<text>负责人: </text>
|
||||||
<text>{{datas.company.master_name}} </text>
|
<text>{{datas.company.user_name}} </text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<text>联系方式: </text>
|
<text>联系方式: </text>
|
||||||
<text> {{datas.company.master_phone}} </text>
|
<text> {{datas.company.user_phone}} </text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<text>所属区域: </text>
|
<text>所属区域: </text>
|
||||||
@ -46,43 +46,73 @@
|
|||||||
<text>签约时间: </text>
|
<text>签约时间: </text>
|
||||||
<text>{{datas.rent_time}} </text>
|
<text>{{datas.rent_time}} </text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li" v-if="datas.type">
|
||||||
<text>到期时间: </text>
|
<text>到期时间: </text>
|
||||||
<text> {{datas.rent_time}} </text>
|
<text> {{datas.rent_time}} </text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<u-button v-if="datas.type" type="primary" class='poline_btn' color="#FF7C32"
|
||||||
|
@tap="cancelContractFn" text="解除合同"></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 合同 -->
|
||||||
|
<!-- {{datas.contract}} -->
|
||||||
|
<view class="card">
|
||||||
|
<view class="contract">
|
||||||
|
<view class="left">
|
||||||
|
<u--image :showLoading="true" src="../../static/img/contract/pdf.png" width="80px"
|
||||||
|
height="80px"></u--image>
|
||||||
|
<view class="text">
|
||||||
|
<view class="name">《租赁合同》</view>
|
||||||
|
<view>
|
||||||
|
<text>{{ datas.contract.create_time}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="right" @click="navToContract(dataList.file)"> -->
|
||||||
|
<view class="right" @click="showContractFn( datas.contract.file)">
|
||||||
|
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
|
||||||
|
<view>查看</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<web-view style="height: 100vh;" :src="pdfUrl" v-if="showPDF"></web-view>
|
||||||
|
|
||||||
|
<!-- u_view组件 -->
|
||||||
|
<view class="">
|
||||||
<u-calendar @close='showDate=false' :minDate="minDate" :maxDate="maxDate" color="#0122C7" :show="showDate"
|
<u-calendar @close='showDate=false' :minDate="minDate" :maxDate="maxDate" color="#0122C7" :show="showDate"
|
||||||
@confirm="dateFn"></u-calendar>
|
@confirm="dateFn"></u-calendar>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import mybtn from "@/components/mybtn/mybtn.vue"
|
import mybtn from "@/components/mybtn/mybtn.vue"
|
||||||
import {
|
import {
|
||||||
getvehicleDetailApi,
|
getvehicleDetailApi,
|
||||||
locusApi,
|
locusApi,
|
||||||
villageCompanyApi
|
villageCompanyApi,
|
||||||
|
cancelContractApi
|
||||||
} from "@/api/property.js"
|
} from "@/api/property.js"
|
||||||
import {
|
import {
|
||||||
Toast
|
Toast
|
||||||
} from "../../libs/uniApi";
|
} from "../../libs/uniApi";
|
||||||
const d = new Date()
|
|
||||||
const year = d.getFullYear()
|
|
||||||
let month = d.getMonth() + 1
|
|
||||||
month = month < 10 ? `0${month}` : month
|
|
||||||
const date = d.getDate()
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
mybtn
|
mybtn
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
minDate: `${year}-${month}-${date -30}`,
|
showMap: true,
|
||||||
maxDate: `${year}-${month}-${date }`,
|
pdfUrl: "",
|
||||||
|
showPDF: false,
|
||||||
|
minDate: '',
|
||||||
|
maxDate: '',
|
||||||
allMap: false,
|
allMap: false,
|
||||||
showDate: false,
|
showDate: false,
|
||||||
showPop: false,
|
showPop: false,
|
||||||
@ -100,59 +130,87 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
if (this.$route.query.type) {
|
// console.log(this.$route.query.id)
|
||||||
villageCompanyApi().then(res => {
|
// if (this.$route.query.type) {
|
||||||
this.datas = res.data
|
// villageCompanyApi().then(res => {
|
||||||
})
|
// this.datas = res.data
|
||||||
return
|
// })
|
||||||
}
|
// return
|
||||||
|
// }
|
||||||
// console.log(this.$route.query.id)
|
// console.log(this.$route.query.id)
|
||||||
getvehicleDetailApi({
|
getvehicleDetailApi({
|
||||||
car_id: this.$route.query.id
|
// car_id: this.$route.query.id
|
||||||
|
car_id: options.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.datas = res.data
|
this.datas = res.data
|
||||||
console.log()
|
|
||||||
})
|
})
|
||||||
|
this.minDateFn()
|
||||||
|
// console.log(date - 7)
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showContractFn(url) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/subpkg/pdfView/pdfView?url=${url}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cancelContractFn() {
|
||||||
|
cancelContractApi({
|
||||||
|
car_id: this.datas.car_id
|
||||||
|
}).then(res => {
|
||||||
|
Toast("解除成功")
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 2000)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
minDateFn() {
|
||||||
|
const today = new Date();
|
||||||
|
const sevenDaysAgo = new Date(today.getTime() - 7 * 24 * 60 * 60 * 1000);
|
||||||
|
const nowDate = new Date()
|
||||||
|
const year = sevenDaysAgo.getFullYear();
|
||||||
|
const month = String(sevenDaysAgo.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(sevenDaysAgo.getDate()).padStart(2, '0');
|
||||||
|
this.minDate = `${year}-${month}-${day}`
|
||||||
|
this.maxDate = `${nowDate.getFullYear()}-${nowDate.getMonth() + 1}-${nowDate.getDate()}`
|
||||||
|
},
|
||||||
dateFn(e) {
|
dateFn(e) {
|
||||||
// console.log(e)
|
|
||||||
this.queryData = e[0]
|
this.queryData = e[0]
|
||||||
this.showDate = false
|
this.showDate = false
|
||||||
},
|
},
|
||||||
showPloyline() {
|
showPloyline() {
|
||||||
console.log(this.queryData)
|
|
||||||
return
|
|
||||||
// this.queryData
|
|
||||||
locusApi({
|
|
||||||
// car_id: 7,
|
|
||||||
// start_time: `${this.queryData} 00:00:00`,
|
|
||||||
// end_time: `${this.queryData} 23:59:59`,
|
|
||||||
car_id: 7,
|
|
||||||
end_time: '2023-08-29 23:59:59',
|
|
||||||
start_time: '2023-08-29 00:00:00',
|
|
||||||
}).then(res => {
|
|
||||||
console.log(res)
|
|
||||||
})
|
|
||||||
let points = [{
|
let points = [{
|
||||||
latitude: 28.916722,
|
latitude: 28.916722,
|
||||||
longitude: 105.443274,
|
longitude: 105.443274,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
latitude: 28.916762,
|
latitude: 28.936762,
|
||||||
longitude: 105.443132,
|
longitude: 105.443132,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
locusApi({
|
||||||
|
car_id: 7,
|
||||||
|
end_time: `${this.queryData} 23:59:59`,
|
||||||
|
start_time: `${this.queryData} 00:00:00`,
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res.data)
|
||||||
|
this.markers[0].latitude = res.data[0].latitude
|
||||||
|
this.markers[0].longitude = res.data[0].longitude
|
||||||
|
this.polyline = [{
|
||||||
|
points: res.data,
|
||||||
|
color: "#0091ff",
|
||||||
|
dottedLine: true,
|
||||||
|
width: 10,
|
||||||
|
}]
|
||||||
|
})
|
||||||
|
|
||||||
// locusApi().then(res => {
|
// locusApi().then(res => {
|
||||||
// points=res
|
// points=res
|
||||||
// })
|
// })
|
||||||
|
|
||||||
this.polyline = [{
|
|
||||||
points: points,
|
// console.log(this.polyline)
|
||||||
color: "#0091ff",
|
|
||||||
dottedLine: true,
|
|
||||||
width: 30,
|
|
||||||
}]
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@ -199,12 +257,13 @@
|
|||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
background-color: $theme-oa-color;
|
background-color: $theme-oa-color;
|
||||||
border: none;
|
border: none;
|
||||||
|
/* color: black; */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.personnel_list {
|
.personnel_list {
|
||||||
padding: 28rpx 0;
|
padding: 28rpx 0;
|
||||||
margin-bottom: 130rpx;
|
|
||||||
|
|
||||||
.empty {
|
.empty {
|
||||||
padding-top: 200rpx;
|
padding-top: 200rpx;
|
||||||
@ -249,7 +308,7 @@
|
|||||||
|
|
||||||
.left {
|
.left {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
// padding: 15rpx 25rpx;
|
|
||||||
padding-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
|
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
@ -276,20 +335,13 @@
|
|||||||
margin: 10rpx 0;
|
margin: 10rpx 0;
|
||||||
width: 85vw;
|
width: 85vw;
|
||||||
|
|
||||||
.check_box {
|
|
||||||
// background-color: #ff0000;
|
|
||||||
// color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
// background-color: red;
|
|
||||||
text:nth-child(1) {
|
text:nth-child(1) {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,8 +364,40 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.map2 {
|
.map2 {
|
||||||
height: 30vh;
|
height: 20vh;
|
||||||
border-radius: 2vw;
|
border-radius: 2vw;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
|
||||||
|
.contract {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
// background-color: red;
|
||||||
|
height: 80px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-around;
|
||||||
|
margin-left: 15rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -51,10 +51,8 @@ function baseRequestTwo(url, method, data, {
|
|||||||
url: Url + '/api' + url,
|
url: Url + '/api' + url,
|
||||||
method: method || 'GET',
|
method: method || 'GET',
|
||||||
header: {
|
header: {
|
||||||
...header,
|
...header
|
||||||
...{
|
|
||||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data: method != 'GET' ? data || {} : {},
|
data: method != 'GET' ? data || {} : {},
|
||||||
params: method == 'GET' ? data : {},
|
params: method == 'GET' ? data : {},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user