Commit 4489c0ab by cen

fix: 样式

1 parent 2f225944
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<SelectCity ref="selectCarCity" title="选择城市" @city-selected="handleCarCitySelected" /> <SelectCity ref="selectCarCity" title="选择城市" @city-selected="handleCarCitySelected" />
<GeneralPopup ref="calendarGeneralPopup" popupClass="calendarGeneralPopup" :showClose="false" :showTitle="false" @confirm="confirmCalendar"> <GeneralPopup ref="calendarGeneralPopup" popupClass="calendarGeneralPopup" :showClose="false" :showTitle="false" @confirm="confirmCalendar">
<template #content> <template #content>
<uni-calendar class="calendar" :showMonth="false" @change="calendarChange" /> <uni-calendar class="calendar" :showMonth="false" :endDate="endDate" @change="calendarChange" />
</template> </template>
</GeneralPopup> </GeneralPopup>
<GeneralPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" :noTitle="true"> <GeneralPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" :noTitle="true">
...@@ -123,6 +123,8 @@ import SelectCity from './components/SelectCity.vue' ...@@ -123,6 +123,8 @@ import SelectCity from './components/SelectCity.vue'
import UploadMedia from './components/uploadMedia.vue' import UploadMedia from './components/uploadMedia.vue'
import NoticePopup from '@/components/NoticePopup.vue' import NoticePopup from '@/components/NoticePopup.vue'
import { debounce } from 'lodash' import { debounce } from 'lodash'
import dayjs from 'dayjs'
import { max } from 'lodash'
export default { export default {
name: 'AddEvaluationFrom', name: 'AddEvaluationFrom',
components: { components: {
...@@ -154,6 +156,7 @@ export default { ...@@ -154,6 +156,7 @@ export default {
carList: [], carList: [],
selectDate: '', selectDate: '',
popupTypeEnum, popupTypeEnum,
endDate: dayjs().format('YYYY-MM-DD'),
isExistSamePlate: false, isExistSamePlate: false,
formData: { formData: {
evalOrderBasicReqDTO: { evalOrderBasicReqDTO: {
...@@ -195,7 +198,7 @@ export default { ...@@ -195,7 +198,7 @@ export default {
guidePrice: 0, guidePrice: 0,
buyNewCar: 0, buyNewCar: 0,
hasAccident: 0, hasAccident: 0,
overallRating: '', overallRating: 0,
conditionDescription: '' conditionDescription: ''
}, },
carLicenseReqDTO: { carLicenseReqDTO: {
...@@ -433,10 +436,10 @@ export default { ...@@ -433,10 +436,10 @@ export default {
type: 'pricek', type: 'pricek',
showText: 'shopMerchantName', showText: 'shopMerchantName',
fieldPickerArray: [ fieldPickerArray: [
{ name: '优', value: '1' }, { name: '优', value: 1 },
{ name: '良', value: '2' }, { name: '良', value: 2 },
{ name: '中', value: '3' }, { name: '中', value: 3 },
{ name: '差', value: '4' } { name: '差', value: 4 }
] ]
}, },
{ {
...@@ -460,7 +463,7 @@ export default { ...@@ -460,7 +463,7 @@ export default {
{ key: 'annualInspectionExpiry', label: '年审到期', required: true, fullWidth: false, type: 'calendar', targetKey: 'annualInspectionExpiry', targetObj: 'carLicenseReqDTO' }, { key: 'annualInspectionExpiry', label: '年审到期', required: true, fullWidth: false, type: 'calendar', targetKey: 'annualInspectionExpiry', targetObj: 'carLicenseReqDTO' },
{ key: 'commercialInsuranceExpiry', label: '商业险到期', required: true, fullWidth: false, type: 'calendar', targetKey: 'commercialInsuranceExpiry', targetObj: 'carLicenseReqDTO' }, { key: 'commercialInsuranceExpiry', label: '商业险到期', required: true, fullWidth: false, type: 'calendar', targetKey: 'commercialInsuranceExpiry', targetObj: 'carLicenseReqDTO' },
{ key: 'previousOwnerName', label: '原车主名称', required: true, fullWidth: false, targetKey: 'previousOwnerName', targetObj: 'carLicenseReqDTO', type: 'input' }, { key: 'previousOwnerName', label: '原车主名称', required: true, fullWidth: false, targetKey: 'previousOwnerName', targetObj: 'carLicenseReqDTO', type: 'input' },
{ key: 'previousOwnerPhone', label: '原车主电话', required: true, fullWidth: true, targetKey: 'previousOwnerPhone', targetObj: 'carLicenseReqDTO', type: 'input', inputType: 'number', pattern: '^[0-9]{11}$', maxlength: 17 }, { key: 'previousOwnerPhone', label: '原车主电话', required: true, fullWidth: true, targetKey: 'previousOwnerPhone', targetObj: 'carLicenseReqDTO', type: 'input', inputType: 'number', pattern: '^[0-9]{11}$', maxlength: 11 },
{ {
key: 'previousOwnerAddress', key: 'previousOwnerAddress',
label: '原车主住址', label: '原车主住址',
...@@ -499,7 +502,7 @@ export default { ...@@ -499,7 +502,7 @@ export default {
{ key: 31, label: '发动机工况', required: false, accept: 'video' }, { key: 31, label: '发动机工况', required: false, accept: 'video' },
{ key: 32, label: '车况解说', required: false, accept: 'video' } { key: 32, label: '车况解说', required: false, accept: 'video' }
], ],
uploadOtherFields: [{ key: 41, label: '其他图片', required: false, accept: 'image' }], uploadOtherFields: [{ key: 41, label: '其他图片', required: false, accept: 'image', maxCount: 30 }],
currentField: null, currentField: null,
query: {} query: {}
} }
...@@ -601,26 +604,20 @@ export default { ...@@ -601,26 +604,20 @@ export default {
const targetValue = that.formData[field.targetObj][field.targetKey] const targetValue = that.formData[field.targetObj][field.targetKey]
if (targetValue !== undefined && targetValue !== null && targetValue !== '') { if (targetValue !== undefined && targetValue !== null && targetValue !== '') {
let selectedItem let selectedItem
// 为颜色字段添加特殊处理,使用name匹配
if (field.key === 'exteriorColor' || field.key === 'interiorColor') { if (field.key === 'exteriorColor' || field.key === 'interiorColor') {
console.log(that.formData) that.$set(that.formData[field.targetObj], field.targetNameKey, targetValue)
console.log('targetValue', targetValue)
// 查找name匹配的选项
selectedItem = field.fieldPickerArray.find(item => item.name === targetValue) selectedItem = field.fieldPickerArray.find(item => item.name === targetValue)
console.log('selectedItem', selectedItem) if (selectedItem) {
} else {
// 其他字段继续使用value匹配
selectedItem = field.fieldPickerArray.find(item => item.value === targetValue.toString())
} }
} else {
selectedItem = field.fieldPickerArray.find(item => Number(item.value) === Number(targetValue))
if (selectedItem) { if (selectedItem) {
// 设置显示名称
that.$set(that.formData[field.targetObj], field.targetNameKey, selectedItem.name) that.$set(that.formData[field.targetObj], field.targetNameKey, selectedItem.name)
// 同时确保值也正确设置,以便表单提交时使用正确的值
that.$set(that.formData[field.targetObj], field.targetKey, selectedItem.value) that.$set(that.formData[field.targetObj], field.targetKey, selectedItem.value)
} }
} }
} }
}
}) })
const licensePlateField = that.formFields.find(field => field.key === 'licensePlate') const licensePlateField = that.formFields.find(field => field.key === 'licensePlate')
if (licensePlateField) { if (licensePlateField) {
...@@ -1083,6 +1080,15 @@ export default { ...@@ -1083,6 +1080,15 @@ export default {
return return
} }
} }
const exteriorColorField = this.formFields.find(field => field.key === 'exteriorColor')
const interiorColorField = this.formFields.find(field => field.key === 'interiorColor')
if (exteriorColorField && this.formData.carBaseReqDTO.exteriorColorName) {
this.$set(this.formData.carBaseReqDTO, 'exteriorColor', this.formData.carBaseReqDTO.exteriorColorName)
}
if (interiorColorField && this.formData.carBaseReqDTO.interiorColorName) {
this.$set(this.formData.carBaseReqDTO, 'interiorColor', this.formData.carBaseReqDTO.interiorColorName)
}
this.formData.imageList = [] this.formData.imageList = []
// 处理车辆图片 - fileType: 1 // 处理车辆图片 - fileType: 1
this.processMediaData(this.formImagesData, 1) this.processMediaData(this.formImagesData, 1)
...@@ -1138,7 +1144,12 @@ export default { ...@@ -1138,7 +1144,12 @@ export default {
}, 300) }, 300)
} else { } else {
if (res.data.code == 3004) { if (res.data.code == 3004) {
this.$refs.editTipsPopup.open() uni.hideLoading()
this.$refs.editTipsPopup.open().then(() => {
uni.navigateBack({
delta: 1
})
})
} else { } else {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
...@@ -1150,34 +1161,25 @@ export default { ...@@ -1150,34 +1161,25 @@ export default {
} }
}, 500), }, 500),
// 处理媒体数据的辅助方法
processMediaData(mediaData, fileType) { processMediaData(mediaData, fileType) {
// this.formData.imageList = []
if (!mediaData || typeof mediaData !== 'object') { if (!mediaData || typeof mediaData !== 'object') {
return return
} }
// 遍历媒体数据对象中的每个key
Object.keys(mediaData).forEach(fileSubtype => { Object.keys(mediaData).forEach(fileSubtype => {
const mediaItems = mediaData[fileSubtype] const mediaItems = mediaData[fileSubtype]
// 确保mediaItems是数组
if (!Array.isArray(mediaItems)) { if (!Array.isArray(mediaItems)) {
return return
} }
// 遍历每个媒体项
mediaItems.forEach(item => { mediaItems.forEach(item => {
// 确保item是对象且包含url属性
if (!item || typeof item !== 'object' || !item.url) { if (!item || typeof item !== 'object' || !item.url) {
return return
} }
// 从URL中提取文件名和格式
const fileName = item.name const fileName = item.name
const fileFormat = item.fileFormat const fileFormat = item.fileFormat
// 创建新的图片对象并添加到imageList
this.formData.imageList.push({ this.formData.imageList.push({
fileType: fileType, fileType: fileType,
fileSubtype: parseInt(fileSubtype, 10), // 确保是数字类型 fileSubtype: parseInt(fileSubtype, 10), // 确保是数字类型
...@@ -1266,7 +1268,7 @@ export default { ...@@ -1266,7 +1268,7 @@ export default {
// Popup样式 // Popup样式
::v-deep .tipsPopup .uni-popup__wrapper { ::v-deep .tipsPopup .uni-popup__wrapper {
width: toRpx(848); width: toRpx(848);
height: toRpx(744); height: toRpx(644);
border-radius: toRpx(42); border-radius: toRpx(42);
background: rgb(255, 255, 255) !important; background: rgb(255, 255, 255) !important;
.tipsPopupBg { .tipsPopupBg {
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</radio-group> </radio-group>
</template> </template>
<template v-if="field.type === 'pricek'"> <template v-if="field.type === 'pricek'">
<picker @change="e => bindPickerChange(e, field)" range-key="name" :value="field.index" :range="field.fieldPickerArray"> <picker @change="e => bindPickerChange(e, field)" range-key="name" :value="field.value" :range="field.fieldPickerArray">
<view class="flex align-center from-value"> <view class="flex align-center from-value">
<template v-if="field.targetObj ? formData[field.targetObj][field.targetNameKey] : formData[field.targetKey]"> <template v-if="field.targetObj ? formData[field.targetObj][field.targetNameKey] : formData[field.targetKey]">
{{ field.targetObj ? formData[field.targetObj][field.targetNameKey] : formData[field.targetNameKey] }} {{ field.targetObj ? formData[field.targetObj][field.targetNameKey] : formData[field.targetNameKey] }}
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
</view> </view>
{{ title }} {{ title }}
</view> </view>
<!-- <web-view :src="url"></web-view> --> <web-view v-if="fileUrltype === 'html'" :src="url"></web-view>
<view> <view v-else>
<lk-preview-office :url="url" :fileType="fileType"></lk-preview-office> <lk-preview-office :url="url" :fileType="fileType"></lk-preview-office>
</view> </view>
</view> </view>
...@@ -23,11 +23,13 @@ export default { ...@@ -23,11 +23,13 @@ export default {
url: '', url: '',
title: '', title: '',
fileType: 'pdf', fileType: 'pdf',
Signature: true Signature: true,
fileUrltype:'pdf'
} }
}, },
onLoad (options) { onLoad (options) {
console.log(options) console.log(options)
this.fileUrltype = options.fileUrltype || 'pdf'
this.fileType = options.fileType || 'pdf' this.fileType = options.fileType || 'pdf'
this.Signature = options.Signature === 'false' ? false : (options.Signature || true); this.Signature = options.Signature === 'false' ? false : (options.Signature || true);
if(this.fileType === 'docx') { if(this.fileType === 'docx') {
......
...@@ -121,9 +121,9 @@ export default { ...@@ -121,9 +121,9 @@ export default {
// 上传所有选择的图片 // 上传所有选择的图片
for (const tempFilePath of res.tempFilePaths) { for (const tempFilePath of res.tempFilePaths) {
const url = await uploadFile(tempFilePath) const url = await uploadFile(tempFilePath)
console.log('上传图片成功', url)
uni.hideLoading() uni.hideLoading()
console.log(res, '上传所有选择的图片')
const fileExtension = res.tempFiles[0]?.name ? res.tempFiles[0]?.name.split('.').pop().toLowerCase() : res.tempFiles[0]?.path.split('.').pop().toLowerCase() const fileExtension = res.tempFiles[0]?.name ? res.tempFiles[0]?.name.split('.').pop().toLowerCase() : res.tempFiles[0]?.path.split('.').pop().toLowerCase()
this.addMedia(field, { url, fileFormat: fileExtension, type: 'image', name: field.label }) this.addMedia(field, { url, fileFormat: fileExtension, type: 'image', name: field.label })
} }
...@@ -149,7 +149,6 @@ export default { ...@@ -149,7 +149,6 @@ export default {
sizeType: ['compressed'], sizeType: ['compressed'],
sourceType: ['album'], sourceType: ['album'],
success: async res => { success: async res => {
console.log('选择图片成功', res)
try { try {
uni.showLoading({ title: '上传中...' }) uni.showLoading({ title: '上传中...' })
// 上传所有选择的图片 // 上传所有选择的图片
...@@ -253,8 +252,6 @@ export default { ...@@ -253,8 +252,6 @@ export default {
// 获取指定字段的媒体数组 // 获取指定字段的媒体数组
getMedia(field) { getMedia(field) {
console.log('this.mediaData', this.mediaData)
console.log('this.mediaData[field.key]', field)
// 确保返回的是数组 // 确保返回的是数组
return Array.isArray(this.mediaData[field.key]) ? this.mediaData[field.key] : [] return Array.isArray(this.mediaData[field.key]) ? this.mediaData[field.key] : []
}, },
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<searchBox @search="search" @reset="reset" :searchValue.sync="searchValue" /> <searchBox @search="search" @reset="reset" :searchValue.sync="searchValue" />
<view class="box-class mt-32"> <view class="box-class mt-32">
<type-tab-component :typeList="typeList" :isShowCount="true" :tabIndex.sync="tabIndex" @tabClick="search"></type-tab-component> <type-tab-component :typeList="typeList" :isShowCount="true" :tabIndex.sync="tabIndex" @tabClick="search"></type-tab-component>
<z-paging ref="paging" :fixed="false" paging-class="paging-class" :class="tabIndex == 0 ? 'no-br' : ''" :loading-full-fixed="false" :auto-show-system-loading="true" :show-scrollbar="false" v-model="dataList" @query="queryList" :default-page-size="10"> <z-paging ref="paging" :fixed="false" paging-class="paging-class" :class="tabIndex == 0 ? 'no-br' : ''" :loading-full-fixed="false" :auto-show-system-loading="true" @refresherrefresh="getStatByStatus()" :show-scrollbar="false" v-model="dataList" @query="queryList" :default-page-size="10">
<template #empty> <template #empty>
<view class="mask-box flex flex-col justify-center align-center"> <view class="mask-box flex flex-col justify-center align-center">
<image :src="noData" /> <image class="noDataImg" :src="noData" />
<view>暂无客户工单</view> <view>暂无客户工单</view>
</view> </view>
</template> </template>
...@@ -347,8 +347,9 @@ export default { ...@@ -347,8 +347,9 @@ export default {
if (res.data.code == 0) { if (res.data.code == 0) {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
title: '重新提交成功', title: res.data.data || '请求成功',
icon: 'none' icon: 'none',
duration: 3000
}) })
this.currentPage = 1 this.currentPage = 1
this.search() this.search()
...@@ -478,7 +479,8 @@ export default { ...@@ -478,7 +479,8 @@ export default {
if (res.data.code == 0) { if (res.data.code == 0) {
uni.showToast({ uni.showToast({
title: '重新报价成功', title: '重新报价成功',
icon: 'none' icon: 'none',
duration: 3000
}) })
this.$refs.requotePopup.closePopup() this.$refs.requotePopup.closePopup()
this.currentPage = 1 this.currentPage = 1
...@@ -640,8 +642,12 @@ export default { ...@@ -640,8 +642,12 @@ export default {
height: calc(100% - #{toRpx(96)}); height: calc(100% - #{toRpx(96)});
width: 100%; width: 100%;
background: #fff; background: #fff;
border-radius: toRpx(48); border-radius: toRpx(48);
color: #808291;
.noDataImg {
width: toRpx(480);
height: toRpx(240);
}
} }
} }
} }
......
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
<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"> <GeneralPopup ref="calendarGeneralPopup" popupClass="calendarGeneralPopup" :showClose="false" :showTitle="false" @confirm="confirmCalendar">
<template #content> <template #content>
<uni-calendar class="calendar" :showMonth="false" @change="calendarChange" /> <uni-calendar class="calendar" :showMonth="false" :endDate="endDate" @change="calendarChange" />
</template> </template>
</GeneralPopup> </GeneralPopup>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup> <NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
...@@ -278,6 +278,7 @@ export default { ...@@ -278,6 +278,7 @@ export default {
signInfo: {}, signInfo: {},
selectDate: '', selectDate: '',
current: null, current: null,
endDate: dayjs().format('YYYY-MM-DD'),
selectedItemsText: '机动车登记本, 机动车行驶证, 交管12123截图, 交强险, 车钥匙', selectedItemsText: '机动车登记本, 机动车行驶证, 交管12123截图, 交强险, 车钥匙',
noDataBg: require('@/assets/images/common/sign-no-data.png'), noDataBg: require('@/assets/images/common/sign-no-data.png'),
radioList: [ radioList: [
...@@ -634,7 +635,8 @@ export default { ...@@ -634,7 +635,8 @@ export default {
sourceNameKey: 'staffName', sourceNameKey: 'staffName',
sourceKey: 'uuid', sourceKey: 'uuid',
targetKey: 'idCard', targetKey: 'idCard',
type: 'input' type: 'input',
maxlength: 18
}, },
{ {
key: 'address', key: 'address',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!