页面修改
This commit is contained in:
parent
4171abc1fe
commit
a3f460f02a
@ -38,6 +38,8 @@ 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 upLoadImage = (data) => oahttp.post('/upload/image', data)
|
||||
// 资产详情
|
||||
// export const getpropertyDetil = (data) => oahttp.get('/lstDetail', data)
|
||||
|
||||
|
@ -43,7 +43,8 @@
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="身份证号" required prop="id_card" borderBottom>
|
||||
<u--input v-model="formData.id_card" placeholder="请输入身份证号" @input="c_idcard" type="idcard"></u--input>
|
||||
<u--input v-model="formData.id_card" placeholder="请输入身份证号" @input="c_idcard"
|
||||
type="idcard"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item labelWidth="auto" label="是否为小队长" required prop="is_captain" borderBottom>
|
||||
<u-radio-group v-model="formData.is_captain" style="margin: 16rpx;">
|
||||
@ -286,7 +287,8 @@
|
||||
</u-upload>
|
||||
</u-form-item> -->
|
||||
</u--form>
|
||||
<button @click="$u.throttle(addAcountNum, 2000)" type="primary" class="btn" style="margin: 28rpx;">创建</button>
|
||||
<button @click="$u.throttle(addAcountNum, 2000)" type="primary" class="btn"
|
||||
style="margin: 28rpx;">创建</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -300,7 +302,9 @@
|
||||
} from "@/api/oaUser.js"
|
||||
import districtSelector from "@/components/districtSelector/districtSelector.vue" //地区选择器
|
||||
import districtSelectorTow from "@/components/districtSelector/districtSelectorTow.vue" //地区选择器
|
||||
import { Toast } from "../../libs/uniApi"
|
||||
import {
|
||||
Toast
|
||||
} from "../../libs/uniApi"
|
||||
export default {
|
||||
components: {
|
||||
districtSelector,
|
||||
@ -399,11 +403,11 @@ import { Toast } from "../../libs/uniApi"
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
c_idcard(e){
|
||||
this.$nextTick(()=>{
|
||||
this.formData.id_card = e.replace(/[^0-9X]/g, '')
|
||||
})
|
||||
},
|
||||
c_idcard(e) {
|
||||
this.$nextTick(() => {
|
||||
this.formData.id_card = e.replace(/[^0-9X]/g, '')
|
||||
})
|
||||
},
|
||||
// 上传头像
|
||||
async afterReadAvatar(event) {
|
||||
upLoadImage({
|
||||
@ -428,10 +432,11 @@ import { Toast } from "../../libs/uniApi"
|
||||
},
|
||||
// 创建账号
|
||||
addAcountNum() {
|
||||
if(!this.formData.avatar)return Toast('头像未上传');
|
||||
if (!this.formData.avatar) return Toast('头像未上传');
|
||||
let flag = this.$refs.districtSelectorRef.validate();
|
||||
if(!this.formData.qualification.id_card||!this.formData.qualification.id_card_b)return Toast('身份证未上传');
|
||||
if(!this.formData.qualification.bank_account||!this.formData.qualification.bank_account_b)return Toast('银行卡未上传');
|
||||
if (!this.formData.qualification.id_card || !this.formData.qualification.id_card_b) return Toast('身份证未上传');
|
||||
if (!this.formData.qualification.bank_account || !this.formData.qualification.bank_account_b) return Toast(
|
||||
'银行卡未上传');
|
||||
this.$refs.uForm.validate().then(async (e) => {
|
||||
if (e && flag) {
|
||||
uni.showLoading()
|
||||
@ -530,6 +535,9 @@ import { Toast } from "../../libs/uniApi"
|
||||
color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.title {
|
||||
|
@ -47,13 +47,29 @@
|
||||
<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 class="" style="display: flex;justify-content: space-between;align-items: center;">
|
||||
<view class="" style="display: flex;align-items: center;">
|
||||
<u--image :src="dataList.cars_info.pic" width="100rpx" height="100rpx"></u--image>
|
||||
<view class="" style="margin-left: 10rpx;">
|
||||
车牌号:1111111
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
|
||||
<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 class="">
|
||||
车辆图片:
|
||||
<view style="display: flex;justify-content: space-around;">
|
||||
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="car_info" v-if="dataList.type==0">
|
||||
@ -185,14 +201,13 @@
|
||||
// 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) {
|
||||
uni.navigateBack()
|
||||
}
|
||||
this.checked = [this.carList[0]?.car_id] || ''
|
||||
this.dataList.cars_info = JSON.parse(this.dataList.cars_info) || ""
|
||||
// if (this.dataList.status == 3) {
|
||||
// uni.navigateBack()
|
||||
// }
|
||||
console.log(this.dataList.cars_info.pic)
|
||||
if (this.carList.length > 0 || this.dataList.cars_info) {
|
||||
console.log(this.dataList.cars_info)
|
||||
this.flag1 = false
|
||||
}
|
||||
// console.log(this.dataList)
|
||||
|
@ -19,12 +19,49 @@
|
||||
|
||||
<mytn text='上传自有车辆' @click="show=true"></mytn>
|
||||
</view>
|
||||
|
||||
|
||||
<u-modal :show="show" @close="show=false" :showCancelButton="true" @confirm="upCarFn"
|
||||
:closeOnClickOverlay="true" @cancel="show=false" title="车辆上传">
|
||||
<view class="slot-content">
|
||||
<u--input placeholder="请输入车牌号" v-model="carLicense"></u--input>
|
||||
<view class="">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<text>车牌号</text> <u--input placeholder="请输入车牌号" v-model="carLicense"></u--input>
|
||||
</view>
|
||||
<view style="color: red;font-size: 20rpx;" v-if="noInfo">
|
||||
车牌号不能为空
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<text>车辆图片</text>
|
||||
<view class="">
|
||||
<view class="" v-if="imgUrl">
|
||||
<!-- {{formData.avatar}} -->
|
||||
<image :src="imgUrl" alt=""
|
||||
style="width:150rpx;height:150rpx;margin-left: 30rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view class="uplode" v-else>
|
||||
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||
上传头像
|
||||
<view class="up" style="opacity: 0;">
|
||||
<u-upload :fileList="imgUrl?[{url:imgUrl}]:[]"
|
||||
@afterRead="afterReadAvatar" :maxCount="1">
|
||||
</u-upload>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view style="color: red;font-size: 20rpx;" v-if="noInfo">
|
||||
请上传车辆图片
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-modal>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 等待 -->
|
||||
@ -43,8 +80,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 申请用车 -->
|
||||
<view v-else>
|
||||
<view class="loading" v-if="datas.type ==0">
|
||||
<view v-if="datas.type ==0">
|
||||
<view class="loading">
|
||||
<span>你已提交用车申请,后台正在加快处理中,请耐心等待哦</span>
|
||||
<span class="dots">...</span>
|
||||
</view>
|
||||
@ -74,15 +111,46 @@
|
||||
|
||||
<mytn text='申请用车' :position="false" class="upCar" @click="applycarFn"></mytn>
|
||||
</view>
|
||||
<u-modal :show="show" @close="show=false" @confirm="upCarFn" :closeOnClickOverlay="true"
|
||||
title="车辆上传">
|
||||
<u-modal :show="show" @close="show=false" :showCancelButton="true" @confirm="upCarFn"
|
||||
:closeOnClickOverlay="true" @cancel="show=false" title="车辆上传">
|
||||
<view class="slot-content">
|
||||
<u--input placeholder="请输入您的车牌号" v-model="carLicense"></u--input>
|
||||
<view style="color: red;font-size: 20rpx;" v-if="noInfo">
|
||||
车牌号不能为空
|
||||
<view class="">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<text>车牌号</text> <u--input placeholder="请输入车牌号" v-model="carLicense"></u--input>
|
||||
</view>
|
||||
<view style="color: red;font-size: 20rpx;" v-if="noInfo">
|
||||
车牌号不能为空
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<text>车辆图片</text>
|
||||
<view class="">
|
||||
<view class="" v-if="imgUrl">
|
||||
<!-- {{formData.avatar}} -->
|
||||
<image :src="imgUrl" alt=""
|
||||
style="width:150rpx;height:150rpx;margin-left: 30rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view class="uplode" v-else>
|
||||
<u-icon name="plus-circle-fill" color="#0022C7" size="28"></u-icon>
|
||||
上传头像
|
||||
<view class="up" style="opacity: 0;">
|
||||
<u-upload :fileList="imgUrl?[{url:imgUrl}]:[]"
|
||||
@afterRead="afterReadAvatar" :maxCount="1">
|
||||
</u-upload>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view style="color: red;font-size: 20rpx;" v-if="noInfo">
|
||||
请上传车辆图片
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-modal>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -235,8 +303,12 @@
|
||||
upVehicleApi,
|
||||
getAgencyDetailApi,
|
||||
getvehicleDetailApi,
|
||||
villageCompanyApi
|
||||
villageCompanyApi,
|
||||
|
||||
} from "@/api/property.js"
|
||||
import {
|
||||
upLoadImage
|
||||
} from "@/api/file.js"
|
||||
import Cache from '@/utils/cache';
|
||||
// import mybtn from "@/components/mybtn/mybtn.vue"
|
||||
import {
|
||||
@ -261,6 +333,7 @@
|
||||
applicationList: [1],
|
||||
show: false,
|
||||
carLicense: "",
|
||||
imgUrl: "",
|
||||
showPop: false,
|
||||
datas: {},
|
||||
dataList: [],
|
||||
@ -333,26 +406,32 @@
|
||||
|
||||
|
||||
methods: {
|
||||
async afterReadAvatar(event) {
|
||||
upLoadImage({
|
||||
filePath: event.file.url,
|
||||
|
||||
}).then(res => {
|
||||
this.imgUrl = res.data.uri
|
||||
// this.formData.avatar = res.data.uri
|
||||
})
|
||||
},
|
||||
confirmFn() {
|
||||
uni.reLaunch({
|
||||
url: '/subpkg/property/index' // 替换为需要刷新的页面路径
|
||||
});
|
||||
},
|
||||
test() {
|
||||
this.aaa = 1;
|
||||
this.showpopp = true;
|
||||
// uni.reLaunch({
|
||||
// url: '/subpkg/property/index' // 替换为需要刷新的页面路径
|
||||
// });
|
||||
},
|
||||
|
||||
// 申请车辆
|
||||
applycarFn() {
|
||||
Toast("操作成功")
|
||||
this.step = -1
|
||||
return
|
||||
upVehicleApi().then(res => {
|
||||
upVehicleApi({
|
||||
type: 0
|
||||
}).then(res => {
|
||||
Toast("操作成功")
|
||||
this.step = -1
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: '/subpkg/property/index'
|
||||
})
|
||||
}, 1000)
|
||||
})
|
||||
},
|
||||
// 自有车辆
|
||||
@ -362,10 +441,16 @@
|
||||
return
|
||||
}
|
||||
upVehicleApi({
|
||||
license: this.carLicense
|
||||
license: this.carLicense,
|
||||
pic: this.imgUrl,
|
||||
type: 1
|
||||
}).then(res => {
|
||||
this.step = 2
|
||||
Toast("上传成功")
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: '/subpkg/property/index'
|
||||
})
|
||||
}, 2000)
|
||||
})
|
||||
|
||||
this.show = false
|
||||
@ -427,6 +512,28 @@
|
||||
}
|
||||
}
|
||||
|
||||
.uplode {
|
||||
width: 243.57rpx;
|
||||
height: 173.48rpx;
|
||||
box-sizing: border-box;
|
||||
padding-top: 30rpx;
|
||||
border-radius: 15rpx;
|
||||
border: 1px solid $theme-oa-color;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
color: $theme-oa-color;
|
||||
position: relative;
|
||||
margin-left: 20rpx;
|
||||
|
||||
.up {
|
||||
position: absolute;
|
||||
color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.noCar {
|
||||
padding: 100rpx;
|
||||
margin-top: 10vh;
|
||||
|
@ -57,7 +57,9 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="">
|
||||
<!-- <u--image width="100rpx" height="100rpx" style="margin-right:20rpx"></u--image> -->
|
||||
</view>
|
||||
<!-- 合同 -->
|
||||
<!-- {{datas.contract}} -->
|
||||
<view class="card" v-if="showCont">
|
||||
|
Loading…
x
Reference in New Issue
Block a user