资产管理

This commit is contained in:
THK3121 2023-09-02 13:18:15 +08:00
parent caa99433f1
commit 36084196a5
3 changed files with 87 additions and 62 deletions

View File

@ -2,12 +2,12 @@
<view class="">
<view class="date" v-if="dataList.type !=2">
<!-- 2022年12月12日提出申请 -->
{{dataList.create_time.slice(0,10)}} 提出申请
{{dataList.create_time}} 提出申请
</view>
<view class="date" v-else>
<!-- 2022年12月12日提出申请 -->
{{dataList.create_time.slice(0,10)}} 提出解除申请
{{dataList.create_time}} 提出解除申请
</view>
<!-- 公司信息 -->
@ -80,9 +80,9 @@
<u--image :showLoading="true" src="../../static/img/contract/pdf.png" width="80px"
height="80px"></u--image>
<view class="text">
<view class="name">租赁合同</view>
<view class="name">解除合同</view>
<view>
<text>{{'2023-03-03'}}</text>
<text>{{dataList.create_time}}</text>
</view>
</view>
</view>
@ -94,15 +94,13 @@
</view>
</view>
{{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>
<u-button :disabled="flag1" type="primary" text="生成合同" @tap="contractFn" color="#0122C7"></u-button>
</view>
<!-- 审核中 -->
<view class="" v-if="dataList.status==0">
@ -117,7 +115,8 @@
<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 class="name">{{typeFn( dataList.type) }}
</view>
<view>
<text>{{'2023-03-03'}}</text>
</view>
@ -130,18 +129,17 @@
</view>
</view>
</view>
<u-button v-if="flag" :disabled="false" type="primary" text="发送合同" @tap="sendcontractFn"
<u-button v-if="dataList.status==1" :disabled="false" type="primary" text="发送合同" @tap="sendFn"
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>
<u-button v-else :disabled="times" type="primary" :text="`重新发送${times?times+'s':''}`" @tap="sendAgainFn"
color="#0122C7"></u-button>
</view>
</view>
<!--uview 组件 -->
<view class="">
<u-modal :show="showPop" @close="showPop=false" @confirm="confirm" :closeOnClickOverlay="true"
title="请输入驳回理由">
@ -170,7 +168,8 @@
export default {
data() {
return {
times: 5,
flag1: true,
times: 0,
dataList: {},
overruleValue: "",
showPop: false,
@ -181,32 +180,62 @@
}
},
onLoad(options) {
// console.log(this.$route.query)
// console.log(6565)
console.log(options)
getAgencyDetailApi({
id: options.id
}).then(res => {
// 13043214321
this.dataList = res.data.vehicleContract
this.carList = res.data.vehicleRentCars
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) {
uni.navigateBack()
}
console.log(this.dataList.cars_info)
if (this.carList.length >= 0 || this.dataList.cars_info) {
this.flag1 = false
}
// console.log(this.dataList)
})
// console.log(this.dataList.cars_info)
},
methods: {
sendAgainFn() {
let that = this
sendMsgApi({
id: this.dataList.id
id: this.dataList.id,
}).then(res => {
Toast("发送成功")
that.times = 10
that.timer()
// that.num = 10
})
},
sendFn() {
let that = this
sendcontractApi({
id: this.dataList.id
}).then(res => {
Toast("操作成功")
that.times = 10
that.timer()
that.dataList.status = 2
})
},
typeFn(status) {
if (status == 0) {
return "租赁合同"
}
if (status == 1) {
return "自有车两"
}
if (status == 2) {
"解除合同"
}
},
confirm() {
// console.log(this.overruleValue)
overruleApi({
@ -225,23 +254,16 @@
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}`
})
uni.navigateTo({
url: `/subpkg/pdfView/pdfView?url=${contract_no}`
})
},
contractFn() {
console.log(this.checked)
@ -253,14 +275,14 @@
})
this.navTo('/subpkg/property/success')
},
sendcontractFn() {
this.lg ? this.sendAgainFn() : this.sendFn()
Toast("操作成功")
this.flag = false
this.times = 10
this.timer()
this.lg = true
},
// sendcontractFn() {
// // this.sendFn()
// Toast("")
// this.times = 10
// this.timer()
// },
navTo(url) {
uni.navigateTo({
url

View File

@ -1,5 +1,5 @@
<template>
<view class="">
<view v-if="flag">
<view v-if='showLoading'>
<u-loading-page :loading="showLoading"></u-loading-page>
</view>
@ -7,7 +7,7 @@
<!-- 小组公司 -->
<view class="noCar" v-if='company_type==18'>
<!-- 申请 -->
<view class="" v-if="step==999">
<view class="" v-if="step==-2">
<view class="">
你还没有所属车辆哦,请向镇公司申请用车或使用自有车辆并绑定系统
</view>
@ -30,9 +30,15 @@
</view>
<!-- 等待 -->
<view class="" v-if='[-1,0,1,2].includes(step)'>
<view class="" v-if='[-3,-1,0,1,2].includes(step)'>
<view class="loading" v-if='step==-3'>
<span>你已提交解除申请,等待签约</span>
<span class="dots">...</span>
</view>
<!-- 上传自有车辆 -->
<view v-if="0">
<view v-if="datas.type==1">
<view class="loading">
<span>您已上传自用车辆,系统正在审核中,请耐心等待</span>
<span class="dots">...</span>
@ -40,14 +46,10 @@
</view>
<!-- 申请用车 -->
<view v-else>
<view class="loading" v-if="datas.type !=2">
<view class="loading" v-if="datas.type ==0">
<span>你已提交用车申请后台正在加快处理中请耐心等待哦</span>
<span class="dots">...</span>
</view>
<view class="loading" v-else>
<span>你已提交解除申请</span>
<span class="dots">...</span>
</view>
</view>
</view>
<!-- 审核结束 -->
@ -201,7 +203,6 @@
</u-modal>
</view>
</view>
<mytn text='合同列表' v-if="datas.rent_num" @click="navgo('/subpkg/property/contractList')"></mytn>
</view>
</template>
@ -242,6 +243,7 @@
dataList: [],
newCarNum: "",
newcarTit: "",
flag: false
@ -255,17 +257,9 @@
if (type == 18) {
// getvehicleDetailApi().then(res => {})
villageCompanyApi().then(res => {
if (!res.data?.id) {
this.showLoading = false
this.step = 999
return
}
this.showLoading = false
this.datas = res.data
this.step = res.data.status
switch (this.step) {
case 3:
uni.redirectTo({
@ -284,7 +278,6 @@
else {
getvehicleListApi().then(res => {
this.datas = res.data
res.data.apply.length >= 2 ? this.applicationList = res.data.apply : this.applicationList = res
.data.apply.slice(0, 2)
// this.applicationList = res.data.apply
@ -308,6 +301,9 @@
// // this.applicationList=res
// })
setTimeout(() => {
this.flag = true
})
},
@ -317,7 +313,7 @@
applycarFn() {
upVehicleApi().then(res => {
Toast(res.msg)
this.step = 2
this.step = -1
})
},
//
@ -325,7 +321,6 @@
upVehicleApi({
license: this.carLicense
}).then(res => {
// this.show = false
this.step = 2
})
// upVehicleApi({

View File

@ -52,15 +52,15 @@
</view>
</view>
</view>
<u-button v-if="datas.type" type="primary" class='poline_btn' color="#FF7C32"
@tap="cancelContractFn" text="解除合同"></u-button>
<u-button v-if="datas.type==1&&company_type==16" type="primary" class='poline_btn'
color="#FF7C32" @tap="cancelContractFn" text="解除合同"></u-button>
</view>
</view>
</view>
<!-- 合同 -->
<!-- {{datas.contract}} -->
<view class="card">
<view class="card" v-if="showCont">
<view class="contract">
<view class="left">
<u--image :showLoading="true" src="../../static/img/contract/pdf.png" width="80px"
@ -68,12 +68,12 @@
<view class="text">
<view class="name">租赁合同</view>
<view>
<text>{{ datas.contract.create_time}}</text>
<text>{{ datas.create_time}}</text>
</view>
</view>
</view>
<!-- <view class="right" @click="navToContract(dataList.file)"> -->
<view class="right" @click="showContractFn( datas.contract.file)">
<view class="right" @click="showContractFn(datas.contract.file)">
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
<view>查看</view>
</view>
@ -102,12 +102,14 @@
import {
Toast
} from "../../libs/uniApi";
import Cache from '@/utils/cache';
export default {
components: {
mybtn
},
data() {
return {
company_type: 0,
showMap: true,
pdfUrl: "",
showPDF: false,
@ -120,6 +122,7 @@
queryData: "请选择时间",
mapClass: 'custom-map',
scale: 17,
showCont: false,
markers: [{
id: 2,
latitude: 28.8733,
@ -130,6 +133,7 @@
}
},
onLoad(options) {
this.company_type = (JSON.parse(Cache.get("USER_INFO")).company.company_type)
// console.log(this.$route.query.id)
// if (this.$route.query.type) {
// villageCompanyApi().then(res => {
@ -146,11 +150,15 @@
})
this.minDateFn()
if (this.datas.contract) {
this.showCont = true
}
// console.log(date - 7)
},
methods: {
showContractFn(url) {
console.log(url)
uni.navigateTo({
url: `/subpkg/pdfView/pdfView?url=${url}`
})