6.15(优化
This commit is contained in:
@@ -16,6 +16,15 @@ export function allBrandModelList() {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
//获取购车方案列表 /api/front/car/buy/way/all/list
|
||||
export function allCarBuyWayList() {
|
||||
return request({
|
||||
'url': '/api/front/car/buy/way/all/list',
|
||||
'method': 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//根据品牌,车型,动力获取车辆信息/api/front/car/getInfo
|
||||
export function getCarInfo(params) {
|
||||
return request({
|
||||
|
||||
@@ -10,6 +10,13 @@ export function getProductList(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
//获取订车须知 api/front/agreement/car/buy/notice
|
||||
export function getCarBuyNotice(id) {
|
||||
return request({
|
||||
'url': `/api/front/agreement/car/buy/notice `,
|
||||
'method': 'get',
|
||||
})
|
||||
}
|
||||
// 租车列表 /api/front/car/information/user/list
|
||||
export function getInformationList(params) {
|
||||
return request({
|
||||
|
||||
@@ -10,6 +10,16 @@ export function dutyCategory() {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取购车方案详情
|
||||
*/
|
||||
export function getCarBuyWayInfo(id) {
|
||||
return request({
|
||||
'url': `/api/front/car/buy/way/info/${id}`,
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取邀请规则
|
||||
*/
|
||||
@@ -40,6 +50,16 @@ export function getRentalRule() {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租车用户协议 /api/front/agreement/user/rental/rule
|
||||
*/
|
||||
export function getAgreementApplication() {
|
||||
return request({
|
||||
'url': '/api/front/agreement/application',
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户协议
|
||||
*/
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "滴友之家",
|
||||
"appid" : "__UNI__F2BE74F",
|
||||
"description" : "",
|
||||
"versionName" : "1.3.9",
|
||||
"versionCode" : 139,
|
||||
"versionName" : "1.4.0",
|
||||
"versionCode" : 140,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item label="发布类型" borderBottom labelWidth="140rpx">
|
||||
<u-radio-group v-model="carData.isHelp" placement="row" @change="carDataWatchFn" :disabled="carIdflag">
|
||||
<u-radio-group v-model="carData.isHelp" placement="row" @change="carDataWatchFn"
|
||||
:disabled="carIdflag">
|
||||
<view class="flex justify-around" style="width: 100%;">
|
||||
<u-radio activeColor="#13AFA8" label="商品" name="1">商品</u-radio>
|
||||
<u-radio activeColor="#13AFA8" style="margin-left: 18rpx;" label="助力" name="2">助力</u-radio>
|
||||
@@ -40,6 +41,18 @@
|
||||
<image v-else :src="carInfo.image" mode=""></image>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item v-if="type==1" borderBottom label="轮播图" prop="userInfo.sex" ref="item1" labelWidth="140rpx">
|
||||
<view class="form-item">
|
||||
<view class="image-box" v-for="(item,index) in imageList" :key="index">
|
||||
<image class="upload-bg" :src="item" mode=""></image>
|
||||
<image class="reduce abs" src="@/static/images/app/serve/realname_clea.png" mode=""
|
||||
@click="DelPic(index)"></image>
|
||||
|
||||
</view>
|
||||
<image class="upload-bg" src="@/static/images/icon/plus_box.png" mode="" @click="uploadImage()">
|
||||
</image>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item label="标题" borderBottom ref="item1" labelWidth="140rpx">
|
||||
<u--input v-model="carInfo.title" disabled inputAlign="right" border="none"></u--input>
|
||||
</u-form-item>
|
||||
@@ -51,10 +64,16 @@
|
||||
<u-radio-group v-model="carInfo.type" :disabled="carIdflag">
|
||||
<view class="flex justify-around" style="width: 100%;">
|
||||
<u-radio activeColor="#13AFA8" label="1" name="1">全款</u-radio>
|
||||
<u-radio activeColor="#13AFA8" label="2" name="2">租卖灵活</u-radio>
|
||||
<u-radio activeColor="#13AFA8" label="2" name="2">租买灵活</u-radio>
|
||||
</view>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
<u-form-item v-if="type!=1" label="购车方案" prop="userInfo.powerName" borderBottom
|
||||
@click="carBuyWayShow=true" ref="item1" labelWidth="140rpx">
|
||||
<u--input v-model="carInfo.carBuyWayName" disabled disabledColor="#ffffff" placeholder="请选择"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" color="#999" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item v-if="carInfo.type==1&&type!=1">
|
||||
<view class="flex justify-between" style="width: 100%;">
|
||||
<view>全款</view>
|
||||
@@ -121,7 +140,7 @@
|
||||
<u-line v-if="type==1" color="#c6c6c6" margin="16rpx 0 16rpx 0"></u-line>
|
||||
|
||||
<!-- <u-line v-if="type==1" color="#c6c6c6" margin="16rpx 0 16rpx 0"></u-line> -->
|
||||
<u-form-item v-if="type==1" label="在租期" prop="userInfo.rentalQuantity" borderBottom @click=""
|
||||
<u-form-item v-if="type==1" label="库存" prop="userInfo.rentalQuantity" borderBottom @click=""
|
||||
ref="item1" labelWidth="140rpx">
|
||||
<u--input v-model="model1.userInfo.rentalQuantity" placeholder="请输入在租车辆数" inputAlign="right"
|
||||
border="none"></u--input>
|
||||
@@ -178,6 +197,21 @@
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- 选择购车方案 -->
|
||||
<u-popup :show="carBuyWayShow" closeable closeIconPos="top-right" @close="carBuyWayClose" @open="carBuyWayOpen">
|
||||
<view class="popup-buy-way">
|
||||
<text class="popup-buy-way-title f-32 c000">选择购车方案</text>
|
||||
<scroll-view class="popup-buy-way-list flex flex-wrap">
|
||||
<view class="buy-way-list flex justify-between align-center" v-for="(item,index) in carBuyList" :key="index"
|
||||
@click="actBuyWayFn(item)">
|
||||
<view>{{item.name}}</view>
|
||||
<image @click.stop="navBuyWayFn(item)" style="width: 16rpx;height: 28rpx;" src="@/static/images/icon/arrow-right.png" mode="">
|
||||
</image>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<view class="bott-butt">
|
||||
<u-button shape="circle" :customStyle="{width: '702rpx', height: '80rpx', fontSize: '24rpx'}"
|
||||
color="#13AFA8" @click="submitFn">提交</u-button>
|
||||
@@ -199,7 +233,8 @@
|
||||
addInformationCreate,
|
||||
getInformationInfo,
|
||||
getTagAllList,
|
||||
addInformationEdit
|
||||
addInformationEdit,
|
||||
allCarBuyWayList
|
||||
} from "@/api/carShop/car/car.js"
|
||||
import {
|
||||
autoAgeList
|
||||
@@ -207,6 +242,12 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
//购车方案
|
||||
carBuyWayShow: false,
|
||||
//购车方案列表
|
||||
carBuyList: [],
|
||||
//轮播图
|
||||
imageList: [],
|
||||
//租期
|
||||
leaseTermShow: false,
|
||||
monthRentName: '',
|
||||
@@ -257,12 +298,38 @@
|
||||
},
|
||||
// 汽车信息
|
||||
carInfo: {
|
||||
type: '1'
|
||||
type: '1',
|
||||
carBuyWayName:''
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
//去查看购车方案
|
||||
navBuyWayFn(item){
|
||||
uni.navigateTo({
|
||||
url:`/pages/common/textview/index?title=购车方案&carBuyWayId=${item.id}`
|
||||
})
|
||||
},
|
||||
//选择购车方案
|
||||
actBuyWayFn(item){
|
||||
this.carInfo.carBuyWayName = item.name
|
||||
this.carInfo.carBuyWayId = item.id
|
||||
this.carBuyWayShow = false
|
||||
},
|
||||
//购车方案
|
||||
carBuyWayClose(e) {
|
||||
console.log(e);
|
||||
this.carBuyWayShow = false
|
||||
},
|
||||
//购车方案打开
|
||||
carBuyWayOpen(e) {
|
||||
console.log(e);
|
||||
allCarBuyWayList().then(res => {
|
||||
console.log(res);
|
||||
this.carBuyList = res.data.list
|
||||
})
|
||||
},
|
||||
//点击完成
|
||||
confirmFn(e) {
|
||||
e.preventDefault();
|
||||
@@ -289,7 +356,8 @@
|
||||
rentalPrice: this.model1.userInfo.rentalPrice,
|
||||
tagId: arr.join(','),
|
||||
event: this.model1.userInfo.event,
|
||||
depositMoney: this.model1.userInfo.depositMoney
|
||||
depositMoney: this.model1.userInfo.depositMoney,
|
||||
productImage: this.imageList.join(',')
|
||||
}).then(res => {
|
||||
uni.redirectTo({
|
||||
url: `/pages/carShop/mine/car_info_list/particulars?type=2`
|
||||
@@ -299,7 +367,8 @@
|
||||
let obj = {
|
||||
id: this.carInfo.id,
|
||||
stock: this.carInfo.stock,
|
||||
depositPrice: this.carInfo.depositPrice
|
||||
depositPrice: this.carInfo.depositPrice,
|
||||
carBuyWayId: this.carInfo.carBuyWayId
|
||||
}
|
||||
console.log(obj);
|
||||
addcarEdit(obj).then(res => {
|
||||
@@ -327,7 +396,8 @@
|
||||
tagId: arr.join(','),
|
||||
carAge: this.carData.carAge,
|
||||
event: this.model1.userInfo.event,
|
||||
depositMoney: this.model1.userInfo.depositMoney
|
||||
depositMoney: this.model1.userInfo.depositMoney,
|
||||
productImage: this.imageList.join(',')
|
||||
}
|
||||
addInformationCreate(obj).then(res => {
|
||||
uni.redirectTo({
|
||||
@@ -339,7 +409,8 @@
|
||||
carSellerProductId: this.carInfo.id,
|
||||
stock: this.carInfo.stock,
|
||||
type: this.carInfo.type == 1 ? 0 : 1,
|
||||
depositPrice: this.carInfo.depositPrice
|
||||
depositPrice: this.carInfo.depositPrice,
|
||||
carBuyWayId:this.carInfo.carBuyWayId
|
||||
}
|
||||
console.log(obj);
|
||||
addcarPulish(obj).then(res => {
|
||||
@@ -379,13 +450,13 @@
|
||||
},
|
||||
//监听是否选择品牌,车型,动力
|
||||
carDataWatchFn() {
|
||||
let isFieldsEmpty1 = this.carData.brandId !== '' && this.carData.modelId !== ''
|
||||
let isFieldsEmpty1 = this.carData.brandId !== '' && this.carData.modelId !== ''
|
||||
let isFieldsEmpty2 = this.carData.powerType !== '' && this.carData.isHelp !== ''
|
||||
console.log(isFieldsEmpty1,isFieldsEmpty2);
|
||||
if (isFieldsEmpty1&&isFieldsEmpty2) {
|
||||
console.log(isFieldsEmpty1, isFieldsEmpty2);
|
||||
if (isFieldsEmpty1 && isFieldsEmpty2) {
|
||||
if (this.type == 1) {
|
||||
informationCarInfo(this.carData).then(res => {
|
||||
console.log('租车模版',res.data);
|
||||
console.log('租车模版', res.data);
|
||||
if (res.data) {
|
||||
this.carInfo = res.data
|
||||
} else {
|
||||
@@ -457,7 +528,24 @@
|
||||
})
|
||||
//获取标签列表
|
||||
this.getTagAllListFn()
|
||||
}
|
||||
},
|
||||
//传图片
|
||||
uploadImage() {
|
||||
this.$util.uploadImageOne({
|
||||
count: 9,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
dir: 'crmebimage/public/product/'
|
||||
}, null, res => {
|
||||
console.log(res);
|
||||
this.imageList.push(res.data)
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
/**删除图片*/
|
||||
DelPic(index) {
|
||||
this.imageList.splice(index, 1)
|
||||
},
|
||||
},
|
||||
onReady() {
|
||||
//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
|
||||
@@ -472,6 +560,8 @@
|
||||
if (this.type == 1) {
|
||||
getInformationInfo(options.id).then(res => {
|
||||
console.log(res.data);
|
||||
this.imageList=res.data.productImage.split(',')
|
||||
this.endLabelList=res.data.tags
|
||||
this.model1.userInfo = res.data
|
||||
this.model1.userInfo.powerName = res.data.powerType == 0 ? '纯电' : res.data
|
||||
.powerType == 1 ? '油电' : '油'
|
||||
@@ -493,6 +583,7 @@
|
||||
this.carInfo.type = String(res.data.type == 1 ? 2 : 1)
|
||||
this.carInfo.stock = res.data.stock
|
||||
this.carInfo.id = res.data.id
|
||||
this.carInfo.carBuyWayName=res.data.carBuyWayName
|
||||
})
|
||||
}
|
||||
|
||||
@@ -508,6 +599,53 @@
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.popup-buy-way {
|
||||
height: 1000rpx;
|
||||
padding: 32rpx 0;
|
||||
.popup-buy-way-title {
|
||||
margin-left: 32rpx;
|
||||
}
|
||||
|
||||
.popup-buy-way-list {
|
||||
height: 800rpx;
|
||||
|
||||
.buy-way-list {
|
||||
width: 750rpx;
|
||||
padding: 32rpx 24rpx;
|
||||
border-bottom: 1rpx solid rgba(0, 0, 0, 0.09);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-item {
|
||||
// border: 1px solid red;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.upload-bg {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.image-box {
|
||||
position: relative;
|
||||
margin-right: 24rpx;
|
||||
margin-bottom: 24rpx;
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
}
|
||||
|
||||
.reduce {
|
||||
position: absolute;
|
||||
top: -20rpx;
|
||||
right: -20rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.car-box {
|
||||
padding-bottom: 160rpx;
|
||||
}
|
||||
@@ -543,7 +681,7 @@
|
||||
.uoload-image {
|
||||
width: 100%;
|
||||
text-align: flex-end;
|
||||
|
||||
|
||||
image {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<view class="f-32 c111 fw-5">¥{{item.rentalPrice}} <text class="f-24 c666">/月</text></view>
|
||||
</view>
|
||||
<view v-else class="flex flex-column justify-around car-list-cont-r">
|
||||
<view class="f-32 c111">{{item.carSellerProduct?item.carSellerProduct.title:'-'}}</view>
|
||||
<view class="f-32 c111 title-one">{{item.carSellerProduct?item.carSellerProduct.title:'-'}}</view>
|
||||
<view class="f-24 c666 ">全款价格: <text
|
||||
class="f-32 red fw-5">{{item.carSellerProduct?item.carSellerProduct.minGuidePrice:'0'}}元</text>
|
||||
</view>
|
||||
@@ -236,12 +236,12 @@
|
||||
this.isShow = this.carRentalValue ? true : false
|
||||
obj.isShow = this.isShow
|
||||
getAttrList(obj).then(res => {
|
||||
console.log(res.data);
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
})
|
||||
} else {
|
||||
obj.activityType = this.carRentalValue
|
||||
getInformationList(obj).then(res => {
|
||||
console.log(res.data);
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
})
|
||||
}
|
||||
@@ -254,7 +254,13 @@
|
||||
page {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.title-one{
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1; /* 控制显示的行数 */
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.car-info-search {
|
||||
position: relative;
|
||||
height: 104rpx;
|
||||
|
||||
@@ -74,17 +74,14 @@
|
||||
</u-form-item>
|
||||
<u-form-item label="上传合同" border-bottom='true'>
|
||||
<view class="form-item">
|
||||
<view class="image-box rel">
|
||||
<image class="upload-bg" v-show="formData.contractUrl" :src="formData.contractUrl"
|
||||
mode=""></image>
|
||||
|
||||
<image v-show="formData.contractUrl" class="reduce abs"
|
||||
src="@/static/images/app/serve/realname_clea.png" mode=""
|
||||
@click="DelPic('contractUrl')"></image>
|
||||
<image class="upload-bg"
|
||||
src="@/static/images/icon/plus_box.png" mode=""
|
||||
@click="upload('image', 'contractUrl')"></image>
|
||||
<view class="image-box" v-for="(item,index) in imageList" :key="index">
|
||||
<image class="upload-bg" :src="item" mode=""></image>
|
||||
<image class="reduce abs" src="@/static/images/app/serve/realname_clea.png" mode=""
|
||||
@click="DelPic(index)"></image>
|
||||
|
||||
</view>
|
||||
<image class="upload-bg" src="@/static/images/icon/plus_box.png" mode=""
|
||||
@click="upload('image')"></image>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
@@ -121,7 +118,9 @@
|
||||
carNo: "",
|
||||
unbindTime: ''
|
||||
},
|
||||
carInfo: {}
|
||||
carInfo: {},
|
||||
//合同列表
|
||||
imageList: [],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
@@ -156,15 +155,15 @@
|
||||
methods: {
|
||||
// 提交
|
||||
submit() {
|
||||
let obj={
|
||||
id:this.formData.id,
|
||||
contractUrl:this.formData.contractUrl,
|
||||
carNo:this.formData.carNo,
|
||||
vinId:this.formData.vinId
|
||||
let obj = {
|
||||
id: this.formData.id,
|
||||
contractUrl: this.imageList.join(','),
|
||||
carNo: this.formData.carNo,
|
||||
vinId: this.formData.vinId
|
||||
}
|
||||
getProductOrderCar(obj).then(res=>{
|
||||
getProductOrderCar(obj).then(res => {
|
||||
uni.redirectTo({
|
||||
url:`/pages/carShop/order/car_rental/rental_particulars?id=${this.formData.id}`
|
||||
url: `/pages/carShop/order/car_rental/rental_particulars?id=${this.formData.id}`
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -264,10 +263,10 @@
|
||||
},
|
||||
|
||||
// 上传
|
||||
upload(name, key, type) {
|
||||
upload(name) {
|
||||
if (name === 'image') {
|
||||
this.formData.type = 1
|
||||
this.getImage(key);
|
||||
this.getImage();
|
||||
} else if (name == 'all') {
|
||||
|
||||
} else {
|
||||
@@ -276,7 +275,7 @@
|
||||
}
|
||||
},
|
||||
//传图片
|
||||
getImage(key) {
|
||||
getImage() {
|
||||
this.$util.uploadImageOne({
|
||||
count: 9,
|
||||
sizeType: ['compressed'],
|
||||
@@ -284,7 +283,7 @@
|
||||
dir: 'crmebimage/public/product/'
|
||||
}, null, res => {
|
||||
console.log(res);
|
||||
this.formData[key] = res.data
|
||||
this.imageList.push(res.data)
|
||||
this.videoOrImage = false
|
||||
uni.hideLoading();
|
||||
});
|
||||
@@ -318,8 +317,8 @@
|
||||
});
|
||||
},
|
||||
/**删除图片*/
|
||||
DelPic(key) {
|
||||
this.formData[key] = ''
|
||||
DelPic(index) {
|
||||
this.imageList.splice(index,1)
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -340,8 +339,13 @@
|
||||
// border: 1px solid red;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.upload-bg {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.image-box {
|
||||
@@ -351,11 +355,7 @@
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
|
||||
.upload-bg {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
|
||||
.reduce {
|
||||
position: absolute;
|
||||
|
||||
@@ -50,17 +50,15 @@
|
||||
</u-form-item>
|
||||
<u-form-item label="上传合同" border-bottom='true'>
|
||||
<view class="form-item">
|
||||
<view class="image-box rel">
|
||||
<image class="upload-bg" v-show="formData.contractUrl" :src="formData.contractUrl"
|
||||
mode=""></image>
|
||||
<image v-show="!formData.contractUrl" class="upload-bg"
|
||||
src="@/static/images/icon/plus_box.png" mode=""
|
||||
@click="upload('image', 'contractUrl')"></image>
|
||||
<image v-show="formData.contractUrl" class="reduce abs"
|
||||
src="@/static/images/app/serve/realname_clea.png" mode=""
|
||||
@click="DelPic('contractUrl')"></image>
|
||||
<view class="image-box" v-for="(item,index) in imageList" :key="index">
|
||||
<image class="upload-bg" :src="item" mode=""></image>
|
||||
<image class="reduce abs" src="@/static/images/app/serve/realname_clea.png" mode=""
|
||||
@click="DelPic(index)"></image>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<image class="upload-bg" src="@/static/images/icon/plus_box.png" mode=""
|
||||
@click="upload('image')"></image>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
</view>
|
||||
@@ -78,7 +76,9 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData: {}
|
||||
formData: {},
|
||||
//合同列表
|
||||
imageList:[]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -88,7 +88,7 @@
|
||||
//提交
|
||||
submit(){
|
||||
let obj={
|
||||
contractUrl:this.formData.contractUrl,
|
||||
contractUrl:this.imageList.join(','),
|
||||
orderNo:this.formData.orderNo,
|
||||
vinId:this.formData.vinId
|
||||
}
|
||||
@@ -106,19 +106,19 @@
|
||||
//传图片
|
||||
getImage(key) {
|
||||
this.$util.uploadImageOne({
|
||||
count: 1,
|
||||
count: 9,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
dir: 'crmebimage/public/product/'
|
||||
}, null, res => {
|
||||
this.formData[key] = res.data
|
||||
this.imageList.push(res.data)
|
||||
this.videoOrImage = false
|
||||
uni.hideLoading();
|
||||
});
|
||||
},
|
||||
/**删除图片*/
|
||||
DelPic(key) {
|
||||
this.formData[key] = ''
|
||||
DelPic(index) {
|
||||
this.imageList.splice(index,1)
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -141,11 +141,15 @@
|
||||
}
|
||||
|
||||
.form-item {
|
||||
// border: 1px solid red;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.upload-bg {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.image-box {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<image v-if="formData.contractUrl" class="contract-image" :src="formData.contractUrl" mode="widthFix"></image>
|
||||
<image v-if="imgaeList.length" v-for="(item,index) in imgaeList" class="contract-image" :src="item" mode="widthFix"></image>
|
||||
<view v-else class="contract-view">暂无合同</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -16,21 +16,27 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData: {}
|
||||
formData: {},
|
||||
//合同列表
|
||||
imgaeList:[]
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
//type 1:用户租车订单 2:车商买车订单
|
||||
console.log('optionsoptionsoptionsoptionsoptions',options);
|
||||
//type 1:用户租车订单 2:买车订单 3:车商租车订单
|
||||
if (options.type == 1) {
|
||||
getInformationOrderDealer(options.id).then(res => {
|
||||
this.imgaeList=res.data.contractUrl.split(',')
|
||||
this.formData = res.data
|
||||
})
|
||||
} else if (options.type == 2) {
|
||||
getProductOrderDetail(options.id).then(res => {
|
||||
this.imgaeList=res.data.contractUrl.split(',')
|
||||
this.formData = res.data
|
||||
})
|
||||
} else {
|
||||
getProductOrderInfo(options.id).then(res => {
|
||||
this.imgaeList=res.data.contractUrl.split(',')
|
||||
this.formData = res.data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
getInviteRule,
|
||||
getAboutusinfo,
|
||||
getClockRule,
|
||||
getRentalRule
|
||||
getRentalRule,
|
||||
getCarBuyWayInfo,
|
||||
getAgreementApplication
|
||||
} from '@/api/system/config.js'
|
||||
import {
|
||||
articleInfo
|
||||
@@ -33,16 +35,34 @@
|
||||
if (options.title == '隐私政策') this.getPrivacyPolicy()
|
||||
//天天打卡
|
||||
if (options.title == '规则详情') this.getClockRuleFn()
|
||||
if (options.title == '租车协议') this.getRentalRuleFn()
|
||||
if (options.title == '租卖协议') this.getRentalRuleFn()
|
||||
if (options.title == '应用介绍') this.getAgreementApplicationFn()
|
||||
if (options.title == '购车方案') {
|
||||
this.getCarBuyWayInfoFn(options.carBuyWayId)
|
||||
}
|
||||
if (options.id) {
|
||||
articleInfo(options.id).then(res => {
|
||||
console.log(res);
|
||||
this.title = res.data.title
|
||||
this.content = res.data.content
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//获取应用介绍
|
||||
getAgreementApplicationFn(){
|
||||
getAgreementApplication().then(res => {
|
||||
console.log(res);
|
||||
this.content = JSON.parse(res.data).agreement
|
||||
})
|
||||
},
|
||||
//获取购车方案详情
|
||||
getCarBuyWayInfoFn(id){
|
||||
getCarBuyWayInfo(id).then(res=>{
|
||||
console.log(res);
|
||||
this.title= res.data.name
|
||||
this.content = res.data.content
|
||||
})
|
||||
},
|
||||
//获取租车协议
|
||||
getRentalRuleFn(){
|
||||
getRentalRule().then(res => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="about-us">
|
||||
<view class="logo">
|
||||
<image src="@/static/images/app/mine/gold.png" mode=""></image>
|
||||
<image src="@/static/logo.png" mode=""></image>
|
||||
</view>
|
||||
<view class="operation-list">
|
||||
<view class="f-jcsb f-a-i operation-list-cont">
|
||||
<view class="f-jcsb f-a-i operation-list-cont" @click="navCommonFn('应用介绍')">
|
||||
<view>应用介绍</view>
|
||||
<u-icon name="arrow-right" color="#999" size="16"></u-icon>
|
||||
</view>
|
||||
|
||||
@@ -169,15 +169,19 @@
|
||||
},
|
||||
//传图片
|
||||
getImage(type) {
|
||||
this.type=type
|
||||
this.$util.uploadImageOne({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
dir: 'crmebimage/public/product/'
|
||||
}, null, res => {
|
||||
console.log(this.type);
|
||||
if (this.type == 'avatar') {
|
||||
console.log('更换头像');
|
||||
this.userInfo.avatar = res.data
|
||||
} else {
|
||||
console.log('更换背景');
|
||||
this.userInfo.backGround = res.data
|
||||
}
|
||||
this.updataUser()
|
||||
@@ -250,10 +254,10 @@
|
||||
this.$toast({
|
||||
title: '修改成功'
|
||||
})
|
||||
this.getUserInfo()
|
||||
// this.getUserInfo()
|
||||
this.$store.dispatch('GetInfo')
|
||||
}).catch(err => {
|
||||
// console.log('修改失败', err);
|
||||
console.log('修改失败', err);
|
||||
}).finally(() => {
|
||||
this.close()
|
||||
uni.hideLoading()
|
||||
|
||||
@@ -409,9 +409,7 @@
|
||||
if(res.data.sliderImage){
|
||||
this.branner = res.data.sliderImage.split(',')
|
||||
}
|
||||
if(res.data.subplotImage){
|
||||
this.brannerTwo=res.data.subplotImage.split(',')
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
//确认订单 pages/driver/showroom/confirmOrder/confirmOrder
|
||||
@@ -441,6 +439,10 @@
|
||||
if (res.data.replyResponse.pics) {
|
||||
this.carDealerData.replyResponse.pics = this.carDealerData.replyResponse.pics.split(',')
|
||||
}
|
||||
//弹出层轮播图
|
||||
if(res.data.productImage){
|
||||
this.brannerTwo=res.data.productImage.split(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
//拨打电话
|
||||
|
||||
@@ -116,31 +116,6 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-else>
|
||||
<view class="title" v-if="orderType == 0">
|
||||
购车方案
|
||||
</view>
|
||||
<view class="title flex align-center justify-between" v-else>
|
||||
<view class="">
|
||||
购车方案
|
||||
</view>
|
||||
<view class="flex align-center f-24 c999">
|
||||
租买灵活方案
|
||||
<u-icon name="arrow-right" size="12" color="#999"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="finance-btn flex align-center">
|
||||
<view class="btn-item flex-center" :class="[purchaseType==0?'active-btn-item':'']"
|
||||
@click="purchaseType=0" v-if="orderType == 0">
|
||||
全款
|
||||
</view>
|
||||
<view class="btn-item flex-center" :class="[purchaseType==1?'active-btn-item':'']"
|
||||
@click="purchaseType=1" v-if="orderType == 0">
|
||||
金融
|
||||
</view>
|
||||
<view class="btn-item active-btn-item flex-center" v-else>
|
||||
租买灵活
|
||||
</view>
|
||||
</view>
|
||||
<view class="title">
|
||||
购买信息
|
||||
</view>
|
||||
@@ -167,6 +142,31 @@
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="title" v-if="orderType == 0">
|
||||
购车方案
|
||||
</view>
|
||||
<view class="title flex align-center justify-between" v-else>
|
||||
<view class="">
|
||||
购车方案
|
||||
</view>
|
||||
<view class="flex align-center f-24 c999">
|
||||
租买灵活方案
|
||||
<u-icon name="arrow-right" size="12" color="#999"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="finance-btn flex align-center">
|
||||
<view class="btn-item flex-center" :class="[purchaseType==0?'active-btn-item':'']"
|
||||
@click="purchaseType=0" v-if="orderType == 0">
|
||||
全款
|
||||
</view>
|
||||
<view class="btn-item flex-center" :class="[purchaseType==1?'active-btn-item':'']"
|
||||
@click="purchaseType=1" v-if="orderType == 0">
|
||||
金融
|
||||
</view>
|
||||
<view class="btn-item active-btn-item flex-center" v-else>
|
||||
租买灵活
|
||||
</view>
|
||||
</view>
|
||||
<view class="title">
|
||||
车主(车辆所有人)信息
|
||||
</view>
|
||||
@@ -251,7 +251,7 @@
|
||||
<text style="margin-left: 12rpx;">定车须知</text>
|
||||
</view>
|
||||
<view class="f-22 c444 mt-16">
|
||||
这里是订车须知详情内容,后台可编辑这里是订车须知详情内容,后台可编辑
|
||||
{{carBuyNoticeTitle}}
|
||||
</view>
|
||||
</view>
|
||||
</u-form>
|
||||
@@ -263,7 +263,7 @@
|
||||
<image v-else @click="isAgreement=true" src="@/static/images/accessory/no_end.png" mode=""></image>
|
||||
|
||||
<text class="text-agree">请仔细阅读并勾选租车</text><text @click="navCommonFn"
|
||||
class="text-agree color-primary">《用户协议》</text>
|
||||
class="text-agree color-primary">《租卖协议》</text>
|
||||
</view>
|
||||
<view class="btn" v-if="orderType == 2">
|
||||
<u-button shape="circle" color="#13AFA8" @click="submistOrderFn"
|
||||
@@ -389,7 +389,8 @@
|
||||
postOrderCreate,
|
||||
frontPayCarSell,
|
||||
informationCreate,
|
||||
frontPayPayrental
|
||||
frontPayPayrental,
|
||||
getCarBuyNotice
|
||||
} from "@/api/showroom/showroom.js"
|
||||
import {
|
||||
getCouponListAPI,
|
||||
@@ -401,6 +402,8 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//订车须知
|
||||
carBuyNoticeTitle:'',
|
||||
//选择日期弹出层
|
||||
leaseTermShow: false,
|
||||
//协议选中
|
||||
@@ -474,7 +477,7 @@
|
||||
//租车协议
|
||||
navCommonFn(type) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/textview/index?title=租车协议`
|
||||
url: `/pages/common/textview/index?title=租卖协议`
|
||||
})
|
||||
},
|
||||
// 取优惠券个数
|
||||
@@ -690,7 +693,6 @@
|
||||
|
||||
const userInfo = uni.getStorageSync('userInfo')
|
||||
if(userInfo){
|
||||
console.log(userInfo);
|
||||
//租车
|
||||
this.formProductData.realName=userInfo.realName
|
||||
this.formProductData.idCard=userInfo.identityCardNo
|
||||
@@ -700,6 +702,11 @@
|
||||
this.form.idNumber=userInfo.identityCardNo
|
||||
}
|
||||
})
|
||||
//获取订车须知
|
||||
getCarBuyNotice().then(res=>{
|
||||
this.carBuyNoticeTitle=res.data
|
||||
console.log('订车须知',res.data);
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user