|
|
@ -155,7 +155,7 @@ const form2 = ref({
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const rules = {
|
|
|
|
const rules = {
|
|
|
|
outerTireNumber: [
|
|
|
|
outerTireNumber: [
|
|
|
|
{required: true, message: '请输入轮胎编号',trigger: 'change'},
|
|
|
|
{required: true, message: '请输入轮胎编号', trigger: 'change'},
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const outerTireNumberOption = ref([
|
|
|
|
const outerTireNumberOption = ref([
|
|
|
@ -202,6 +202,7 @@ const tyreClick = (e, location) => {
|
|
|
|
nowClick.value = e
|
|
|
|
nowClick.value = e
|
|
|
|
let data = tireList.value.filter(res => res.tyrePositionVal === e)?.[0] || {}
|
|
|
|
let data = tireList.value.filter(res => res.tyrePositionVal === e)?.[0] || {}
|
|
|
|
form2.value = {...data, location}
|
|
|
|
form2.value = {...data, location}
|
|
|
|
|
|
|
|
console.log(data)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const getList = async () => {
|
|
|
|
const getList = async () => {
|
|
|
@ -268,8 +269,17 @@ const outerTireNumberSearchClick = async () => {
|
|
|
|
const {data} = await getTyreInfo({outerTireNumber: form2.value.outerTireNumber})
|
|
|
|
const {data} = await getTyreInfo({outerTireNumber: form2.value.outerTireNumber})
|
|
|
|
let list = nowClick.value?.split('-').map(e => parseFloat(e))
|
|
|
|
let list = nowClick.value?.split('-').map(e => parseFloat(e))
|
|
|
|
let num = 0
|
|
|
|
let num = 0
|
|
|
|
for (let i = 0; i < list?.[0] - 1; i++) {
|
|
|
|
if (list[0] === 1) {
|
|
|
|
num += (tireArrangement.value[i] * 4)
|
|
|
|
if (list[1] === 1 && list[2] === 1) {
|
|
|
|
|
|
|
|
num += 2
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (list[1] === 2 && list[2] === 1) {
|
|
|
|
|
|
|
|
num += 1
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
num += 2
|
|
|
|
|
|
|
|
for (let i = 1; i < list?.[0] - 1; i++) {
|
|
|
|
|
|
|
|
num += (tireArrangement.value[i - 1] * 4)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (list[1] === 1 && list[2] === 1) {
|
|
|
|
if (list[1] === 1 && list[2] === 1) {
|
|
|
|
num += 4
|
|
|
|
num += 4
|
|
|
@ -283,6 +293,8 @@ const outerTireNumberSearchClick = async () => {
|
|
|
|
if (list[1] === 2 && list[2] === 1) {
|
|
|
|
if (list[1] === 2 && list[2] === 1) {
|
|
|
|
num += 1
|
|
|
|
num += 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
form2.value.brand = data.brand
|
|
|
|
form2.value.brand = data.brand
|
|
|
|
form2.value.size = data.size
|
|
|
|
form2.value.size = data.size
|
|
|
|
form2.value.sensorId = data.sensorId
|
|
|
|
form2.value.sensorId = data.sensorId
|
|
|
@ -298,6 +310,7 @@ const installClick = (e) => {
|
|
|
|
|
|
|
|
|
|
|
|
proxy.$refs["form22"].validate((valid) => {
|
|
|
|
proxy.$refs["form22"].validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
console.log(form2.value)
|
|
|
|
TyreInstall({
|
|
|
|
TyreInstall({
|
|
|
|
...form2.value,
|
|
|
|
...form2.value,
|
|
|
|
carLicense: licenseNumberOption.value.filter(e => e.value === form.value.licenseNumber)?.[0].label,
|
|
|
|
carLicense: licenseNumberOption.value.filter(e => e.value === form.value.licenseNumber)?.[0].label,
|
|
|
|