Commit 200f23df by cen

fix: 车型bug修复

1 parent fe6a8a7d
...@@ -109,6 +109,8 @@ ...@@ -109,6 +109,8 @@
background-position: calc(100vmin * (1173 / 768) * -0.578005115089514) calc(100vmin * (1173 / 768) * -0.5400682011935208);} background-position: calc(100vmin * (1173 / 768) * -0.578005115089514) calc(100vmin * (1173 / 768) * -0.5400682011935208);}
.icon-feedback { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646); .icon-feedback { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.6547314578005116) calc(100vmin * (1173 / 768) * -0.526001705029838);} background-position: calc(100vmin * (1173 / 768) * -0.6547314578005116) calc(100vmin * (1173 / 768) * -0.526001705029838);}
.icon-feedbackIcon { width: calc(100vmin * (1173 / 768) * 0.011082693947144074); height: calc(100vmin * (1173 / 768) * 0.011082693947144074);
background-position: calc(100vmin * (1173 / 768) * -0.5473145780051151) calc(100vmin * (1173 / 768) * -0.4113384484228474);}
.icon-ffdyj-icon { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655); .icon-ffdyj-icon { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.6952259164535379) calc(100vmin * (1173 / 768) * -0.3034953111679454);} background-position: calc(100vmin * (1173 / 768) * -0.6952259164535379) calc(100vmin * (1173 / 768) * -0.3034953111679454);}
.icon-filter { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323); .icon-filter { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
...@@ -394,6 +396,4 @@ ...@@ -394,6 +396,4 @@
.icon-yw-icon { width: calc(100vmin * (1173 / 768) * 0.015345268542199489); height: calc(100vmin * (1173 / 768) * 0.015345268542199489); .icon-yw-icon { width: calc(100vmin * (1173 / 768) * 0.015345268542199489); height: calc(100vmin * (1173 / 768) * 0.015345268542199489);
background-position: calc(100vmin * (1173 / 768) * -0.5221653878942881) calc(100vmin * (1173 / 768) * -0.45865302642796246);} background-position: calc(100vmin * (1173 / 768) * -0.5221653878942881) calc(100vmin * (1173 / 768) * -0.45865302642796246);}
.icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323); .icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.44075021312872975) calc(100vmin * (1173 / 768) * -0.6717817561807332);}
.icon-feedbackIcon { width: calc(100vmin * (1173 / 768) * 0.011082693947144074); height: calc(100vmin * (1173 / 768) * 0.011082693947144074);
background-position: calc(100vmin * (1173 / 768) * -0.5473145780051151) calc(100vmin * (1173 / 768) * -0.4113384484228474);}
\ No newline at end of file \ No newline at end of file
background-position: calc(100vmin * (1173 / 768) * -0.44075021312872975) calc(100vmin * (1173 / 768) * -0.6717817561807332);}
\ No newline at end of file \ No newline at end of file
...@@ -155,8 +155,10 @@ export default { ...@@ -155,8 +155,10 @@ export default {
index: 0, index: 0,
carList: [], carList: [],
selectDate: '', selectDate: '',
currentIdentifiedBrandName: null,
popupTypeEnum, popupTypeEnum,
title: '新增评估单', title: '新增评估单',
selectedCarInfo: null,
endDate: dayjs().format('YYYY-MM-DD'), endDate: dayjs().format('YYYY-MM-DD'),
isExistSamePlate: false, isExistSamePlate: false,
formData: { formData: {
...@@ -234,7 +236,7 @@ export default { ...@@ -234,7 +236,7 @@ export default {
{ key: 'registrationCity', label: '上牌城市', required: true, fullWidth: false, targetNameKey: 'cityName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'registrationCityName', targetObj: 'carBaseReqDTO', type: 'select', showText: 'shopMerchantName', isCity: true }, { key: 'registrationCity', label: '上牌城市', required: true, fullWidth: false, targetNameKey: 'cityName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'registrationCityName', targetObj: 'carBaseReqDTO', type: 'select', showText: 'shopMerchantName', isCity: true },
{ key: 'registrationDate', label: '上牌时间', required: true, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'registrationDate', targetObj: 'carBaseReqDTO', type: 'calendar', showText: 'shopMerchantName', endDate: true }, { key: 'registrationDate', label: '上牌时间', required: true, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'registrationDate', targetObj: 'carBaseReqDTO', type: 'calendar', showText: 'shopMerchantName', endDate: true },
{ key: 'carCity', label: '车辆所在地', required: true, fullWidth: false, targetNameKey: 'carCityName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'carCityName', targetObj: 'carBaseReqDTO', type: 'select', isCarCity: true }, { key: 'carCity', label: '车辆所在地', required: true, fullWidth: false, targetNameKey: 'carCityName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'carCityName', targetObj: 'carBaseReqDTO', type: 'select', isCarCity: true },
{ key: 'mileage', label: '表显里程', inputType: 'number', min: 0, max: 999999, required: true, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'mileage', targetObj: 'carBaseReqDTO', type: 'input', showText: 'shopMerchantName', pattern: '^[0-9]{0,6}$', cell: '公里', isCell: true }, { key: 'mileage', label: '表显里程', inputType: 'number', min: 0, max: 999999, maxlength: 6, required: true, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'mileage', targetObj: 'carBaseReqDTO', type: 'input', showText: 'shopMerchantName', pattern: '^[0-9]{0,6}$', cell: '公里', isCell: true },
{ {
key: 'usageType', key: 'usageType',
label: '使用性质', label: '使用性质',
...@@ -383,7 +385,7 @@ export default { ...@@ -383,7 +385,7 @@ export default {
] ]
}, },
{ key: 'productionDate', label: '生产日期', required: true, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'productionDate', targetObj: 'carBaseReqDTO', type: 'calendar', endDate: true }, { key: 'productionDate', label: '生产日期', required: true, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'productionDate', targetObj: 'carBaseReqDTO', type: 'calendar', endDate: true },
{ key: 'guidePrice', label: '指导价', inputType: 'number', min: 0, max: 999999.99, required: true, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'guidePrice', targetObj: 'carBaseReqDTO', type: 'input', showText: 'shopMerchantName', pattern: '^[0-9]{0,6}$', cell: '元', isCell: true }, { key: 'guidePrice', label: '指导价', inputType: 'number', min: 0, max: 9999999.99, maxlength: 10, required: true, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'guidePrice', targetObj: 'carBaseReqDTO', type: 'input', showText: 'shopMerchantName', pattern: '/^\d+(\.\d{1,2})?$/', cell: '元', isCell: true },
{ {
key: 'buyNewCar', key: 'buyNewCar',
label: '是否购买新车', label: '是否购买新车',
...@@ -464,8 +466,8 @@ export default { ...@@ -464,8 +466,8 @@ export default {
} }
], ],
licenseFormFields: [ licenseFormFields: [
{ key: 'keyCount', label: '钥匙数', required: true, fullWidth: false, targetKey: 'keyCount', targetObj: 'carLicenseReqDTO', type: 'input', inputType: 'number', min: 0, max: 9, pattern: '^[0-9]{1}$' }, { key: 'keyCount', label: '钥匙数', required: true, fullWidth: false, targetKey: 'keyCount', targetObj: 'carLicenseReqDTO', type: 'input', inputType: 'number', min: 0, max: 9, pattern: '^[0-9]{1}$', maxlength: 1 },
{ key: 'transferCount', label: '过户次数', required: true, fullWidth: false, targetKey: 'transferCount', targetObj: 'carLicenseReqDTO', type: 'input', inputType: 'number', min: 0, max: 9, pattern: '^[0-9]{1}$' }, { key: 'transferCount', label: '过户次数', required: true, fullWidth: false, targetKey: 'transferCount', targetObj: 'carLicenseReqDTO', type: 'input', inputType: 'number', min: 0, max: 9, pattern: '^[0-9]{1}$', maxlength: 1 },
{ key: 'compulsoryInsuranceExpiry', label: '交强险到期', required: true, fullWidth: false, type: 'calendar', targetKey: 'compulsoryInsuranceExpiry', targetObj: 'carLicenseReqDTO', endDate: false }, { key: 'compulsoryInsuranceExpiry', label: '交强险到期', required: true, fullWidth: false, type: 'calendar', targetKey: 'compulsoryInsuranceExpiry', targetObj: 'carLicenseReqDTO', endDate: false },
{ key: 'annualInspectionExpiry', label: '年审到期', required: true, fullWidth: false, type: 'calendar', targetKey: 'annualInspectionExpiry', targetObj: 'carLicenseReqDTO', endDate: false }, { key: 'annualInspectionExpiry', label: '年审到期', required: true, fullWidth: false, type: 'calendar', targetKey: 'annualInspectionExpiry', targetObj: 'carLicenseReqDTO', endDate: false },
{ key: 'commercialInsuranceExpiry', label: '商业险到期', required: true, fullWidth: false, type: 'calendar', targetKey: 'commercialInsuranceExpiry', targetObj: 'carLicenseReqDTO', endDate: false }, { key: 'commercialInsuranceExpiry', label: '商业险到期', required: true, fullWidth: false, type: 'calendar', targetKey: 'commercialInsuranceExpiry', targetObj: 'carLicenseReqDTO', endDate: false },
...@@ -586,7 +588,24 @@ export default { ...@@ -586,7 +588,24 @@ export default {
that.formData.carLicenseReqDTO = { ...carLicense } that.formData.carLicenseReqDTO = { ...carLicense }
that.formData.imageList = [...images] that.formData.imageList = [...images]
that.formData.evalOrderNo = evalOrderNo that.formData.evalOrderNo = evalOrderNo
that.selectedCarInfo = {
brand: {
id: that.formData.carBaseReqDTO.carBrandId,
name: that.formData.carBaseReqDTO.carBrand
},
series: {
id: that.formData.carBaseReqDTO.carChildsBrandId,
name: that.formData.carBaseReqDTO.carChildsBrandName
},
model: {
id: that.formData.carBaseReqDTO.carSeriesId,
name: that.formData.carBaseReqDTO.carSeriesName
},
year: {
id: that.formData.carBaseReqDTO.carTypeId,
name: that.formData.carBaseReqDTO.carTypeName
}
}
that.formImagesData = {} that.formImagesData = {}
that.certificateImagesData = {} that.certificateImagesData = {}
that.carVideoData = {} that.carVideoData = {}
...@@ -706,10 +725,10 @@ export default { ...@@ -706,10 +725,10 @@ export default {
// 指导价验证 - 数字,0-999999 // 指导价验证 - 数字,0-999999
const guidePrice = this.formData.carBaseReqDTO.guidePrice const guidePrice = this.formData.carBaseReqDTO.guidePrice
const priceRegex = /^[0-9]{1,6}$/ const priceRegex = /^\d+(\.\d{1,2})?$/
if (!priceRegex.test(guidePrice) || guidePrice < 0 || guidePrice > 999999.99) { if (!priceRegex.test(guidePrice) || guidePrice < 0 || guidePrice > 9999999.99) {
uni.showToast({ uni.showToast({
title: '指导价必须为0-999999.99之间的数字', title: '指导价必须为0-9999999.99之间的数字',
icon: 'none' icon: 'none'
}) })
return return
...@@ -783,17 +802,23 @@ export default { ...@@ -783,17 +802,23 @@ export default {
}, },
handleCell(field) { handleCell(field) {
const that = this const that = this
console.log('handleCell', field) if (field.isCar) {
this.currentField = field // 处理车型选择
if (field.key === 'brandModel') { if (this.currentIdentifiedBrandName) {
this.$refs.selectCar.open() // 识别场景:传入品牌名称
} else if (field.key === 'sellerUserId' && field.type == 'select') { this.$refs.selectCar.open(this.currentIdentifiedBrandName)
this.$refs.orderPopup.open() this.currentIdentifiedBrandName = null
} else if (field.key === 'registrationCity') { } else {
// 新增/编辑场景:传入完整车型信息或null
this.$refs.selectCar.open(this.selectedCarInfo || null)
}
} else if (field.isCity) {
// 处理城市选择
this.$refs.selectCity.open() this.$refs.selectCity.open()
} else if (field.key === 'carCity') { } else if (field.isCarCity) {
this.$refs.selectCarCity.open() this.$refs.selectCarCity.open()
} else if (field.type === 'calendar') { } else if (field.type === 'calendar') {
this.currentField = field
if (field.endDate) { if (field.endDate) {
this.endDate = dayjs().format('YYYY-MM-DD') this.endDate = dayjs().format('YYYY-MM-DD')
} else { } else {
...@@ -808,10 +833,14 @@ export default { ...@@ -808,10 +833,14 @@ export default {
.catch(() => { .catch(() => {
console.log('日期取消') console.log('日期取消')
}) })
} else if (field.type === 'select' && field.targetObj === 'evalOrderBasicReqDTO' && field.targetKey === 'sellerUserId') {
this.currentField = field
this.$refs.orderPopup.open()
} }
}, },
handleCarSelected(date) { handleCarSelected(date) {
console.log('handleCarSelected', date) console.log('handleCarSelected', date)
this.selectedCarInfo = date
this.$set(this.formData.carBaseReqDTO, 'carBrandId', date.brand.id) this.$set(this.formData.carBaseReqDTO, 'carBrandId', date.brand.id)
this.$set(this.formData.carBaseReqDTO, 'carBrand', date.brand.name) this.$set(this.formData.carBaseReqDTO, 'carBrand', date.brand.name)
this.$set(this.formData.carBaseReqDTO, 'carChildsBrandId', date.series.id) this.$set(this.formData.carBaseReqDTO, 'carChildsBrandId', date.series.id)
......
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
methods: { methods: {
open() { open() {
this.$nextTick(() => { this.$nextTick(() => {
console.log(this.$refs) console.log(this.$refs.publishPopup)
if (this.$refs.publishPopup) { if (this.$refs.publishPopup) {
this.$refs.publishPopup.open() this.$refs.publishPopup.open()
} }
...@@ -112,6 +112,7 @@ export default { ...@@ -112,6 +112,7 @@ export default {
this.$emit('close') this.$emit('close')
}, },
confirm() { confirm() {
console.log('confirm', this.autoClose)
if (this.resolve) { if (this.resolve) {
if (this.autoClose) { if (this.autoClose) {
this.$refs.publishPopup.close() this.$refs.publishPopup.close()
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
</view> </view>
<view v-else-if="activeTabKey == 'contract'"> <view v-else-if="activeTabKey == 'contract'">
<view class="mb-32 upload-box" v-if="detailsInfo.signingInfo.saleContract"> <view class="mb-32 upload-box" v-if="detailsInfo.signingInfo.saleContract">
<view class="tab-panel-title">车辆买卖协议</view> <view class="tab-panel-title">二手车转让协议</view>
<view class="gridBoxNoPadding"> <view class="gridBoxNoPadding">
<view v-for="(item, index) in vehicleItems" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]"> <view v-for="(item, index) in vehicleItems" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]">
<view class="title-label-see mr-16">{{ item.label }}</view> <view class="title-label-see mr-16">{{ item.label }}</view>
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
</view> </view>
</view> </view>
<view class="mb-32 upload-box" v-if="detailsInfo.signingInfo.custodyContract"> <view class="mb-32 upload-box" v-if="detailsInfo.signingInfo.custodyContract">
<view class="tab-panel-title">车辆代管协议</view> <view class="tab-panel-title">车辆代保管协议</view>
<view class="gridBoxNoPadding"> <view class="gridBoxNoPadding">
<template v-for="(item, index) in vehicleManagementItems"> <template v-for="(item, index) in vehicleManagementItems">
<view v-if="formatValue(item, detailsInfo)" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]"> <view v-if="formatValue(item, detailsInfo)" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]">
...@@ -685,9 +685,9 @@ export default { ...@@ -685,9 +685,9 @@ export default {
if (item.map && this[item.map]) { if (item.map && this[item.map]) {
return this[item.map][rawValue] || rawValue return this[item.map][rawValue] || rawValue
} }
console.log('rawValue:', rawValue, item.key) console.log('rawValue:', rawValue, rawValue == 0, item.key)
return rawValue == 0 ? 0 : rawValue || '' return rawValue === 0 ? 0 : rawValue || '-'
}, },
getImageBySubtype(subtype) { getImageBySubtype(subtype) {
if (!this.detailsInfo.images) return [] if (!this.detailsInfo.images) return []
......
...@@ -628,6 +628,7 @@ export default { ...@@ -628,6 +628,7 @@ export default {
font-weight: 400; font-weight: 400;
padding: toRpx(16) toRpx(64); padding: toRpx(16) toRpx(64);
line-height: toRpx(48); line-height: toRpx(48);
text-align: center;
text { text {
color: #347bff; color: #347bff;
} }
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
</view> </view>
<view class="checkbox-name">{{ item.name }}</view> <view class="checkbox-name">{{ item.name }}</view>
<input class="checkbox-input" v-if="item.isShowInput && item.key != 'other'" v-model="formData[item.inputValue]" placeholder="请输入" type="number" maxlength="1" /> <input class="checkbox-input" v-if="item.isShowInput && item.key != 'other'" v-model="formData[item.inputValue]" placeholder="请输入" type="number" maxlength="1" />
<input class="checkbox-input" v-if="item.isShowInput && item.key == 'other'" v-model="formData[item.inputValue]" placeholder="请输入" maxlength="100" /> <input class="checkbox-input" @click.stop="" v-if="item.isShowInput && item.key == 'other'" v-model="formData[item.inputValue]" placeholder="请输入" maxlength="100" />
</label> </label>
</checkbox-group> </checkbox-group>
</template> </template>
...@@ -259,11 +259,6 @@ ...@@ -259,11 +259,6 @@
</view> </view>
</view> </view>
<order-popup ref="openDate" popupType="13" @onConfirm="confirmDate" /> <order-popup ref="openDate" popupType="13" @onConfirm="confirmDate" />
<GeneralPopup ref="calendarGeneralPopup" popupClass="calendarGeneralPopup" :showClose="false" :showTitle="false" @confirm="confirmCalendar">
<template #content>
<uni-calendar class="calendar" :showMonth="false" :endDate="endDate" @change="calendarChange" />
</template>
</GeneralPopup>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup> <NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
</view> </view>
</template> </template>
...@@ -363,7 +358,8 @@ export default { ...@@ -363,7 +358,8 @@ export default {
value: 'transferPhoto', value: 'transferPhoto',
name: '过户授权委托书照片', name: '过户授权委托书照片',
key: 'transferPhoto', key: 'transferPhoto',
checked: false checked: true,
disabled: true
}, },
{ {
value: 'other', value: 'other',
...@@ -598,6 +594,8 @@ export default { ...@@ -598,6 +594,8 @@ export default {
targetObj: '', targetObj: '',
type: 'input', type: 'input',
cell: '元', cell: '元',
inputType: 'number',
disabled: false,
isCell: true, isCell: true,
pattern: '^\\d*$' // 只允许数字输入 pattern: '^\\d*$' // 只允许数字输入
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!