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,23 +604,17 @@ export default { ...@@ -601,23 +604,17 @@ 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 { } else {
// 其他字段继续使用value匹配 selectedItem = field.fieldPickerArray.find(item => Number(item.value) === Number(targetValue))
selectedItem = field.fieldPickerArray.find(item => item.value === targetValue.toString()) if (selectedItem) {
} that.$set(that.formData[field.targetObj], field.targetNameKey, selectedItem.name)
that.$set(that.formData[field.targetObj], field.targetKey, selectedItem.value)
if (selectedItem) { }
// 设置显示名称
that.$set(that.formData[field.targetObj], field.targetNameKey, selectedItem.name)
// 同时确保值也正确设置,以便表单提交时使用正确的值
that.$set(that.formData[field.targetObj], field.targetKey, selectedItem.value)
} }
} }
} }
...@@ -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] : []
}, },
......
...@@ -23,28 +23,28 @@ ...@@ -23,28 +23,28 @@
<view class="box-class mt-16"> <view class="box-class mt-16">
<view class="tab-container"> <view class="tab-container">
<scroll-view scroll-x enable-flex class="tab-scroll"> <scroll-view scroll-x enable-flex class="tab-scroll">
<view v-for="(tab, index) in tabs" :key="index" :class="['tab-item', { active: activeTab === index }]" @click.stop="switchTab(index)"> <view v-for="(tab, index) in tabs" :key="index" :class="['tab-item', { active: activeTabKey === tab.key }]" @click.stop="switchTabByKey(tab.key)">
{{ tab.name }} {{ tab.name }}
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view class="tab-panel" :class="{ 'no-bac': activeTab != 1 && activeTab != 0 }"> <view class="tab-panel" :class="{ 'no-bac': activeTabKey != 'carLicense' && activeTabKey != 'carInfo' }">
<!-- 动态标题 --> <!-- 动态标题 -->
<view class="tab-panel-title" v-if="activeTab == 0 || activeTab == 1">{{ tabs[activeTab].name }}</view> <view class="tab-panel-title" v-if="activeTabKey == 'carInfo' || activeTabKey == 'carLicense'">{{ tabs.find(tab => tab.key === activeTabKey) ? tabs.find(tab => tab.key === activeTabKey).name : '' }}</view>
<!-- 动态内容区域 --> <!-- 动态内容区域 -->
<view v-if="activeTab === 0" class="gridBox"> <view v-if="activeTabKey == 'carInfo'" class="gridBox">
<view v-for="(item, index) in carInfoItems" :key="index" :class="['flex align-center', { 'full-width': item.fullWidth }]"> <view v-for="(item, index) in carInfoItems" :key="index" :class="['flex align-center', { 'full-width': item.fullWidth }]">
<view class="title-label-see mr-16">{{ item.label }}</view> <view class="title-label-see mr-16">{{ item.label }}</view>
<view>{{ formatValue(item, detailsInfo) || '-' }}</view> <view>{{ formatValue(item, detailsInfo) || '-' }}</view>
</view> </view>
</view> </view>
<view v-else-if="activeTab === 1" class="gridBox mb-32"> <view v-else-if="activeTabKey == 'carLicense'" class="gridBox mb-32">
<view v-for="(item, index) in carLicenseItems" :key="index" :class="['flex align-center', { 'full-width': item.fullWidth }]"> <view v-for="(item, index) in carLicenseItems" :key="index" :class="['flex align-center', { 'full-width': item.fullWidth }]">
<view class="title-label-see mr-16">{{ item.label }}</view> <view class="title-label-see mr-16">{{ item.label }}</view>
<view>{{ formatValue(item, detailsInfo) || '-' }}</view> <view>{{ formatValue(item, detailsInfo) || '-' }}</view>
</view> </view>
</view> </view>
<view v-else-if="activeTab === 2"> <view v-else-if="activeTabKey == 'images'">
<view class="upload-box mb-32"> <view class="upload-box mb-32">
<view class="tab-panel-title">车辆图片</view> <view class="tab-panel-title">车辆图片</view>
<view class="upload-grid mb-32"> <view class="upload-grid mb-32">
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else-if="activeTab === 3"> <view v-else-if="activeTabKey == 'evaluation'">
<StepperNavigation :currentStep="currentStep" :steps="detailsInfo.priceHistory" direction="vertical"> <StepperNavigation :currentStep="currentStep" :steps="detailsInfo.priceHistory" direction="vertical">
<template v-slot="{ step, indexContent }"> <template v-slot="{ step, indexContent }">
<view class="gridBox mb-48"> <view class="gridBox mb-48">
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
</template> </template>
</StepperNavigation> </StepperNavigation>
</view> </view>
<view v-else-if="activeTab === 4"> <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">
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<view class="pdf-box flex align-center justify-between"> <view class="pdf-box flex align-center justify-between">
<view class="flex align-center"> <view class="flex align-center">
<view class="sprite-icon icon-pdf"></view> <view class="sprite-icon icon-pdf"></view>
<text>二手车买卖补充协议</text> <text>二手车转让协议</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -160,11 +160,11 @@ ...@@ -160,11 +160,11 @@
<view class="pdf-box flex align-center justify-between"> <view class="pdf-box flex align-center justify-between">
<view class="flex align-center"> <view class="flex align-center">
<view class="sprite-icon icon-icon-select"></view> <view class="sprite-icon icon-icon-select"></view>
<text>二手车买卖补充协议</text> <text>车辆代保管协议</text>
</view> </view>
</view> </view>
</view> </view>
<view v-else>{{ formatValue(item, detailsInfo) }}</view> <view v-else>{{ formatValue(item, detailsInfo) || '-' }}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -176,20 +176,20 @@ ...@@ -176,20 +176,20 @@
<view v-if="item.type == 'image'"> <view v-if="item.type == 'image'">
<image :src="formatValue(item, detailsInfo)" @click.stop="previewMedia(formatValue(item, detailsInfo), 1)"></image> <image :src="formatValue(item, detailsInfo)" @click.stop="previewMedia(formatValue(item, detailsInfo), 1)"></image>
</view> </view>
<view v-else-if="item.type == 'link'" class="flex-1"> <view v-else-if="item.type == 'link'" class="flex-1" @click.stop="pdfPreview(detailsInfo.signingInfo.custodyContract.contractNo)">
<view class="pdf-box flex align-center justify-between"> <view class="pdf-box flex align-center justify-between">
<view class="flex align-center"> <view class="flex align-center">
<view class="sprite-icon icon-pdf"></view> <view class="sprite-icon icon-pdf"></view>
<text>代管协议</text> <text>车辆代保管协议</text>
</view> </view>
</view> </view>
</view> </view>
<view v-else>{{ formatValue(item, detailsInfo) }}</view> <view v-else>{{ formatValue(item, detailsInfo) || '-' }}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view v-else-if="activeTab === 5"> <view v-else-if="activeTabKey == 'payment'">
<view class="mb-32 upload-box"> <view class="mb-32 upload-box">
<view class="tab-panel-title">支付记录</view> <view class="tab-panel-title">支付记录</view>
<view class="tableBox"> <view class="tableBox">
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
</view> </view>
<view v-for="(item, index) in detailsInfo.paymentList || []" :key="index" class="tableRow"> <view v-for="(item, index) in detailsInfo.paymentList || []" :key="index" class="tableRow">
<view class="tableCell">{{ item.paymentType == 1 ? '定金' : item.paymentType == 2 ? '尾款' : '全款' }}</view> <view class="tableCell">{{ item.paymentType == 1 ? '定金' : item.paymentType == 2 ? '尾款' : '全款' }}</view>
<view class="tableCell">{{ item.status == 1 ? '已支付' : '未支付' }}</view> <view class="tableCell">{{ item.status == 1 ? '未支付' : '已支付' }}</view>
<view class="tableCell">{{ item.payTime || '-' }}</view> <view class="tableCell">{{ item.payTime || '-' }}</view>
<view class="tableCell">{{ item.paymentAmount ? '¥' + item.paymentAmount : '-' }}</view> <view class="tableCell">{{ item.paymentAmount ? '¥' + item.paymentAmount : '-' }}</view>
</view> </view>
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else-if="activeTab === 6"> <view v-else-if="activeTabKey == 'delivery'">
<view class="mb-32 upload-box"> <view class="mb-32 upload-box">
<view class="tab-panel-title">基础信息</view> <view class="tab-panel-title">基础信息</view>
<view class="gridBoxNoPadding"> <view class="gridBoxNoPadding">
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
<view class="pdf-box flex align-center justify-between"> <view class="pdf-box flex align-center justify-between">
<view class="flex align-center"> <view class="flex align-center">
<view class="sprite-icon icon-pdf"></view> <view class="sprite-icon icon-pdf"></view>
<text>二手车买卖补充协议</text> <text>二手车转让协议</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -262,14 +262,14 @@ ...@@ -262,14 +262,14 @@
</view> </view>
</view> </view>
</view> </view>
<view class="mb-32 upload-box"> <view class="mb-32 upload-box" v-if="detailsInfo.carHandoverInfo">
<view class="tab-panel-title">合同预览</view> <view class="tab-panel-title">合同预览</view>
<view class="gridBoxNoPadding"> <view class="gridBoxNoPadding">
<view v-for="(item, index) in contractItems" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }]"> <view v-for="(item, index) in contractItems" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }]">
<view class="title-label-see mr-16">{{ item.label }}</view> <view class="title-label-see mr-16">{{ item.label }}</view>
<view class="flex-1"> <view class="flex-1">
<view class="pdf-box flex align-center justify-between"> <view class="pdf-box flex align-center justify-between" @click.stop="pdfPreview(getFieldValue(detailsInfo, item.key))">
<view class="flex align-center"> <view class="flex align-center">
<view class="sprite-icon icon-pdf"></view> <view class="sprite-icon icon-pdf"></view>
<text>{{ item.contractName }}</text> <text>{{ item.contractName }}</text>
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,7 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else-if="activeTab === 7"> <view v-else-if="activeTabKey == 'editRecords'">
<StepperNavigation :currentStep="currentStep" :steps="detailsInfo.editLogList" direction="vertical"> <StepperNavigation :currentStep="currentStep" :steps="detailsInfo.editLogList" direction="vertical">
<template v-slot="{ step, indexContent }"> <template v-slot="{ step, indexContent }">
<view class="tableContent"> <view class="tableContent">
...@@ -302,14 +302,14 @@ ...@@ -302,14 +302,14 @@
<view>原内容</view> <view>原内容</view>
<view>变更后内容</view> <view>变更后内容</view>
</view> </view>
<view v-for="(item, index) in detailsInfo.editLogList.changeList || []" :key="index" class="tableRow"> <view v-for="(item, index) in detailsInfo.editLogList[indexContent].changeList || []" :key="index" class="tableRow">
<view class="tableCell">{{ item.fieldName }}</view> <view class="tableCell">{{ item.fieldName }}</view>
<view class="tableCell">{{ item.fieldType == 'text' ? '文本' : item.fieldType == 'image' ? '图片' : '视频' }}变更</view> <view class="tableCell">{{ item.fieldType == 'text' ? '文本' : item.fieldType == 'image' ? '图片' : '视频' }}变更</view>
<view class="tableCell">{{ item.fieldBeforeValue || '-' }}</view> <view class="tableCell">{{ item.fieldBeforeValue || '-' }}</view>
<view class="tableCell">{{ item.fieldAfterValue || '-' }}</view> <view class="tableCell">{{ item.fieldAfterValue || '-' }}</view>
</view> </view>
<!-- 当没有数据时显示空状态 --> <!-- 当没有数据时显示空状态 -->
<view v-if="!detailsInfo.editLogList.changeList || detailsInfo.editLogList.changeList.length === 0" class="empty-table"> <view v-if="!detailsInfo.editLogList[indexContent].changeList || detailsInfo.editLogList[indexContent].changeList.length === 0" class="empty-table">
<text>暂无变更记录</text> <text>暂无变更记录</text>
</view> </view>
</view> </view>
...@@ -320,7 +320,7 @@ ...@@ -320,7 +320,7 @@
</view> </view>
<!-- 其他标签页可以在这里添加 --> <!-- 其他标签页可以在这里添加 -->
<view v-else class="empty-content"> <view v-else class="empty-content">
<text>暂无{{ tabs[activeTab].name }}信息</text> <text>暂无{{ tabs.find(tab => tab.key === activeTabKey) ? tabs.find(tab => tab.key === activeTabKey).name : '' }}信息</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -377,7 +377,7 @@ export default { ...@@ -377,7 +377,7 @@ export default {
hasAccidentMap, hasAccidentMap,
overallRatingMap, overallRatingMap,
emissionStandardMap, emissionStandardMap,
activeTab: 0, activeTabKey: 'carInfo',
tabs: [ tabs: [
{ name: '车辆信息', key: 'carInfo' }, { name: '车辆信息', key: 'carInfo' },
{ name: '牌证信息', key: 'carLicense' }, { name: '牌证信息', key: 'carLicense' },
...@@ -468,8 +468,8 @@ export default { ...@@ -468,8 +468,8 @@ export default {
{ label: '车钥匙数', key: 'carHandoverInfo.carKeyCount' } { label: '车钥匙数', key: 'carHandoverInfo.carKeyCount' }
], ],
contractItems: [ contractItems: [
{ label: '车辆交车单', key: 'carHandoverInfo.confirmName', contractName: '车辆交车单' }, { label: '车辆交车单', key: 'carHandoverInfo.handleOverContractNo', contractName: '车辆交车确认单' },
{ label: '补充协议', key: 'carHandoverInfo.confirmName', contractName: '二手车买卖补充协议' } { label: '补充协议', key: 'carHandoverInfo.supplementaryContractNo', contractName: '二手车补充协议' }
], ],
uploadFieldsItems: [ uploadFieldsItems: [
// { // {
...@@ -545,7 +545,6 @@ export default { ...@@ -545,7 +545,6 @@ export default {
evalOrderNo evalOrderNo
}) })
.then(res => { .then(res => {
console.log('res:', res)
if (res.data.code == 0) { if (res.data.code == 0) {
that.detailsInfo = res.data.data that.detailsInfo = res.data.data
} else { } else {
...@@ -557,13 +556,17 @@ export default { ...@@ -557,13 +556,17 @@ export default {
} }
}) })
}, },
switchTab(index) { switchTabByKey(key) {
this.activeTab = index // 确保切换的key存在于当前的tabs数组中
// 滚动到顶部 const tabExists = this.tabs.some(tab => tab.key === key)
uni.pageScrollTo({ if (tabExists) {
scrollTop: 0, this.activeTabKey = key
duration: 0 // 滚动到顶部
}) uni.pageScrollTo({
scrollTop: 0,
duration: 0
})
}
}, },
getFieldValue(obj, path) { getFieldValue(obj, path) {
if (!obj || !path) return '' if (!obj || !path) return ''
...@@ -596,10 +599,8 @@ export default { ...@@ -596,10 +599,8 @@ export default {
}, },
// 根据fileSubtype获取图片 // 根据fileSubtype获取图片
getImageBySubtype(subtype) { getImageBySubtype(subtype) {
console.log('subtype:', subtype)
if (!this.detailsInfo.images) return null if (!this.detailsInfo.images) return null
const obj = this.detailsInfo.images.find(img => img.fileSubtype === subtype) || null const obj = this.detailsInfo.images.find(img => img.fileSubtype === subtype) || null
console.log('obj:', obj)
return obj return obj
}, },
// 获取图片标签名称 // 获取图片标签名称
...@@ -614,6 +615,8 @@ export default { ...@@ -614,6 +615,8 @@ export default {
}) })
}, },
pdfPreview(contractNo) { pdfPreview(contractNo) {
console.log('contractNo:', contractNo)
uni.$api.evaluationApi uni.$api.evaluationApi
.viewOnlineContract({ .viewOnlineContract({
contractNo: contractNo contractNo: contractNo
...@@ -621,8 +624,7 @@ export default { ...@@ -621,8 +624,7 @@ export default {
.then(res => { .then(res => {
console.log('res:', res) console.log('res:', res)
if (res.data.code == 0) { if (res.data.code == 0) {
// const pdfUrl = 'https://jinrong-huidan-test.oss-cn-shenzhen.aliyuncs.com/testdev/696fdf0c-0287-4bcd-9d4e-6b423f2fe5ba%E4%BA%8C%E6%89%8B%E8%BD%A6%E8%BD%AC%E8%AE%A9%E5%8D%8F%E8%AE%AE.docx' const url = `/pages/evaluationForm/components/pdfPreView?fileUrl=${res.data.data.contractUrl}&title=pdf&fileType=pdf&Signature=false&fileUrltype=${res.data.data.format == 'html' ? 'html' : 'pdf'}`
const url = `/pages/evaluationForm/components/pdfPreView?fileUrl=${res.data.data.contractUrl}&title=pdf&fileType=pdf&Signature=false`
uni.navigateTo({ uni.navigateTo({
url: `${url}` url: `${url}`
}) })
...@@ -762,7 +764,7 @@ export default { ...@@ -762,7 +764,7 @@ export default {
gap: toRpx(28); gap: toRpx(28);
border-radius: toRpx(16); border-radius: toRpx(16);
background: #ffffff; background: #ffffff;
padding: toRpx(28) toRpx(32); padding: toRpx(28) 0;
box-sizing: border-box; box-sizing: border-box;
.title-label-see { .title-label-see {
width: toRpx(168); width: toRpx(168);
......
...@@ -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!