Explorar el Código

车辆信息接口、样式调整

yxb
zengyuehua hace 2 años
padre
commit
5ac89e9d8e

+ 60
- 31
after-sale/rescind-carId/rescind-carId-select.vue Ver fichero

@@ -110,7 +110,7 @@
<image v-else class="icon" :src="state.form.vehNegImgUrl"></image>
</view>
</view>
<view class="picture-wrapper" @click="cardFileImageUpdate()">
<view class="picture-wrapper" @click="cardFileImageUpdate(1)">
<view class="bg">
<view class="">
<view class="name"> 人车合影 </view>
@@ -124,6 +124,20 @@
<image v-else class="icon" :src="state.FormData.peopleVehicleImgUrl"></image>
</view>
</view>
<view class="picture-wrapper" @click="cardFileImageUpdate(2)">
<view class="bg">
<view class="">
<view class="name"> 承诺书 </view>
<view class="value"> 上传承诺书照片 </view>
<view class="tip">
<view class="tip-value"> 拍摄规范 </view>
</view>
</view>
<image v-if="!state.FormData.commitmentUrl" class="icon" :src="`${$imgUrl}applyCard/weituoshu.png`">
</image>
<image v-else class="icon" :src="state.FormData.commitmentUrl"></image>
</view>
</view>
<view class="shibie-wrapper">
<view class="title"> 识别内容如下 </view>
<u-form label-width="200" :model="state.form" ref="uForm">
@@ -190,7 +204,8 @@
pathToBase64
} from "@/utils/image-tools/index.js";
import {
reactive
reactive,
ref
} from "vue";
import {
onLoad,
@@ -214,35 +229,12 @@
} from "@/utils/network/encryption";
import navBar from "../../components/nav-bar/nav-bar2.vue";

// ##################

import {
ref
} from "vue";
import {
navTo
} from "../../utils/utils";
// const list = reactive([{
// name: "A12345",
// },
// {
// name: "B12345",
// },
// {
// name: "C12345",
// },
// ]);
// const flag = ref("0");

// const choose = (i, item) => {
// flag.value = i;
// console.log("选择得数据", item);
// navTo("/after-sale/rescind-carId/base-change-people");
// };

// ######################


// ########
const show1 = ref(false)
const state = reactive({
ocrData: {
@@ -306,7 +298,7 @@
},
actionSheetList: [{
label: "蓝色",
value: 0,
value: '0',
}, {
label: "黄色",
value: 1,
@@ -359,8 +351,40 @@
}
});
const savaHandle = () => {
let data = JSON.stringify(state.FormData)
navTo(`/after-sale/rescind-carId/verification?fromData=${data}`);
if (state.FormData.idcardFrontImgUrl && state.FormData.idcardBacktImgUrl) {
if (state.FormData.vehPosImgUrl && state.FormData.vehNegImgUrl) {
if (state.FormData.peopleVehicleImgUrl) {
if (state.FormData.vehiclePlate && state.FormData.vehiclePlatecolor) {
state.FormData.vehiclePlatecolor=Number(state.FormData.vehiclePlatecolor)
let data = JSON.stringify(state.FormData)
navTo(`/after-sale/rescind-carId/verification?fromData=${data}`);
} else {
uni.showToast({
title: "请填写车牌号和车牌颜色",
icon: "none"
})
}
} else {
uni.showToast({
title: "请上传人车合影",
icon: "none"
})
}
} else {
uni.showToast({
title: "请上传行驶证正反图片",
icon: "none"
})
}
} else {
uni.showToast({
title: "请上传身份证正反图片",
icon: "none"
})
}





console.log(JSON.stringify(state.FormData));
@@ -383,7 +407,7 @@
state.form.caridCorlor = item[0].label
};

const cardFileImageUpdate = () => {
const cardFileImageUpdate = (val) => {
uni.chooseImage({
count: 1, //只能选取一张照片
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
@@ -404,7 +428,12 @@
request(fileUpload, options).then((res) => {
const data = stringToJson(res.bizContent);
console.log(data, "didid");
state.FormData.peopleVehicleImgUrl = data.data.url;
if (val == 1) {
state.FormData.peopleVehicleImgUrl = data.data.url;
} else {
state.FormData.commitmentUrl = data.data.url;
}

});
})
.catch((error) => {});

+ 10
- 1
personal-center/setting/car-information/car-change.vue Ver fichero

@@ -303,7 +303,8 @@ let cacachCarid=''
testRecord: '', //检验记录
fileNum: '', //档案编号
useCharacter: '', //车辆使用性质
registerDate: '' //注册日期
registerDate: '' ,//注册日期
status:""//车辆信息状态
},
orderId: "",
isMyPeopple: true,
@@ -328,6 +329,14 @@ let cacachCarid=''
state.form.maintenaceMass=data.maintenaceMass
state.form.vehicleDimensions=data.vehicleDimensions
state.form.totalMass=data.totalMass
state.form.status=data.status
if(data.status=='使用'){
state.form.status=1
}else if(data.status=='未使用'){
state.form.status=2
}else{
state.form.status=3
}
});
//orc接口调用
const cardImageOcr = (val: any) => {

Cargando…
Cancelar
Guardar