Commit 94bc42f6 by cen

fix: 详情

1 parent ef4004ee
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="back" @click.stop="backPage"> <view class="back" @click.stop="backPage">
<uni-icons type="left" :size="20" color="#000"></uni-icons> <uni-icons type="left" :size="20" color="#000"></uni-icons>
</view> </view>
<view class="title">新增评估单</view> <view class="title">{{ title }}</view>
</view> </view>
<view class="detail-content"> <view class="detail-content">
<view class="flex align-center"> <view class="flex align-center">
...@@ -156,6 +156,7 @@ export default { ...@@ -156,6 +156,7 @@ export default {
carList: [], carList: [],
selectDate: '', selectDate: '',
popupTypeEnum, popupTypeEnum,
title: '新增评估单',
endDate: dayjs().format('YYYY-MM-DD'), endDate: dayjs().format('YYYY-MM-DD'),
isExistSamePlate: false, isExistSamePlate: false,
formData: { formData: {
...@@ -513,6 +514,7 @@ export default { ...@@ -513,6 +514,7 @@ export default {
mounted() { mounted() {
console.log(this.query) console.log(this.query)
if (this.query.type == 'edit') { if (this.query.type == 'edit') {
this.title = '编辑评估单'
this.getDetail(this.query.evalOrderNo) this.getDetail(this.query.evalOrderNo)
} }
this.userInfo = uni.$storage.get('userInfo') || {} this.userInfo = uni.$storage.get('userInfo') || {}
...@@ -1033,7 +1035,52 @@ export default { ...@@ -1033,7 +1035,52 @@ export default {
if (res.data.code == 0) { if (res.data.code == 0) {
if (res.data.data.status == 1) { if (res.data.data.status == 1) {
this.formData.carBaseReqDTO.engineNumber = res.data.data.engineNumber this.formData.carBaseReqDTO.engineNumber = res.data.data.engineNumber
if (this.title == '新增评估单') {
this.formData.carBaseReqDTO.licensePlate = res.data.data.licensePlate this.formData.carBaseReqDTO.licensePlate = res.data.data.licensePlate
if (res.data.data.licensePlate) {
uni.$api.evaluationApi
.checkRepeat({
licensePlate: res.data.data.licensePlate
})
.then(res => {
console.log('res:', res)
if (res.data.code == 0) {
if (res.data.data.result == 1) {
this.isExistSamePlate = true
this.$refs.tipsPopup
.open()
.then(() => {
uni.navigateTo({
url: '/pages/evaluationForm/addEvaluationFrom?type=edit' + '&evalOrderNo=' + res.data.data.evalOrderNo
})
})
.catch(() => {
console.log('用户点击了取消')
})
} else if (res.data.data.result == 2) {
this.isExistSamePlate = false
this.$refs.tipsPopup
.open()
.then(() => {
uni.navigateTo({
url: '/pages/evaluationForm/evaluationFormDetails?evalOrderNo=' + res.data.data.evalOrderNo
})
})
.catch(() => {
console.log('用户点击了取消')
})
}
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
}
}
this.formData.carBaseReqDTO.vin = res.data.data.vin this.formData.carBaseReqDTO.vin = res.data.data.vin
this.formData.carBaseReqDTO.registrationDate = res.data.data.registrationDate this.formData.carBaseReqDTO.registrationDate = res.data.data.registrationDate
this.formData.carLicenseReqDTO.previousOwnerAddress = res.data.data.previousOwnerAddress this.formData.carLicenseReqDTO.previousOwnerAddress = res.data.data.previousOwnerAddress
......
...@@ -301,10 +301,10 @@ export default { ...@@ -301,10 +301,10 @@ export default {
} }
// 添加新媒体 // 添加新媒体
this.$set(this.mediaData[field.key], this.mediaData[field.key].length, media) this.mediaData[field.key].push(media)
// 触发父组件更新 // 触发父组件更新
console.log('this.mediaData', this.mediaData) console.log('this.mediaData', this.mediaData)
this.$emit('update:mediaData', this.mediaData) this.$emit('update:mediaData', { ...this.mediaData })
}, },
// 删除媒体 // 删除媒体
......
...@@ -146,14 +146,15 @@ ...@@ -146,14 +146,15 @@
</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 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">
<view v-for="(item, index) in payeeItems" :key="index" :class="['flex align-center', { 'full-width': item.fullWidth }]"> <template v-for="(item, index) in payeeItems">
<view v-if="formatValue(item, detailsInfo)" :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 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>
...@@ -168,12 +169,14 @@ ...@@ -168,12 +169,14 @@
</view> </view>
<view v-else>{{ formatValue(item, detailsInfo) || '-' }}</view> <view v-else>{{ formatValue(item, detailsInfo) || '-' }}</view>
</view> </view>
</template>
</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">
<view v-for="(item, index) in vehicleManagementItems" :key="index" :class="['flex align-center', { 'full-width': item.fullWidth }]"> <template v-for="(item, index) in vehicleManagementItems">
<view v-if="formatValue(item, detailsInfo)" :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 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>
...@@ -188,6 +191,7 @@ ...@@ -188,6 +191,7 @@
</view> </view>
<view v-else>{{ formatValue(item, detailsInfo) || '-' }}</view> <view v-else>{{ formatValue(item, detailsInfo) || '-' }}</view>
</view> </view>
</template>
</view> </view>
</view> </view>
</view> </view>
...@@ -312,10 +316,10 @@ ...@@ -312,10 +316,10 @@
{{ item.fieldBeforeValue || '-' }} {{ item.fieldBeforeValue || '-' }}
</view> </view>
<view v-else-if="item.fieldType == 'image'"> <view v-else-if="item.fieldType == 'image'">
<image v-for="(url, idx) in splitMediaUrls(item.fieldBeforeValue)" :key="idx" :src="url" mode="aspectFill" style="margin-right: 10px; width: 80px; height: 80px"></image> <image @click.stop="previewMedia(url, 1)" v-for="(url, idx) in splitMediaUrls(item.fieldBeforeValue)" :key="idx" :src="url" mode="aspectFill" style="margin-right: 10px; width: 80px; height: 80px"></image>
</view> </view>
<view v-else-if="item.fieldType == 'video'"> <view v-else-if="item.fieldType == 'video'">
<image v-for="(url, idx) in splitMediaUrls(item.fieldBeforeValue)" :key="idx" :src="url" mode="aspectFill" style="margin-right: 10px; width: 80px; height: 80px"></image> <image @click.stop="previewMedia(url, 2)" v-for="(url, idx) in splitMediaUrls(item.fieldBeforeValue)" :key="idx" :src="url" mode="aspectFill" style="margin-right: 10px; width: 80px; height: 80px"></image>
</view> </view>
</view> </view>
...@@ -324,10 +328,10 @@ ...@@ -324,10 +328,10 @@
{{ item.fieldAfterValue || '-' }} {{ item.fieldAfterValue || '-' }}
</view> </view>
<view v-else-if="item.fieldType == 'image'"> <view v-else-if="item.fieldType == 'image'">
<image v-for="(url, idx) in splitMediaUrls(item.fieldAfterValue)" :key="idx" :src="url" mode="aspectFill" style="margin-right: 10px; width: 80px; height: 80px"></image> <image @click.stop="previewMedia(url, 1)" v-for="(url, idx) in splitMediaUrls(item.fieldAfterValue)" :key="idx" :src="url" mode="aspectFill" style="margin-right: 10px; width: 80px; height: 80px"></image>
</view> </view>
<view v-else-if="item.fieldType == 'video'"> <view v-else-if="item.fieldType == 'video'">
<image v-for="(url, idx) in splitMediaUrls(item.fieldAfterValue)" :key="idx" :src="url" mode="aspectFill" style="margin-right: 10px; width: 80px; height: 80px"></image> <image @click.stop="previewMedia(url, 2)" v-for="(url, idx) in splitMediaUrls(item.fieldAfterValue)" :key="idx" :src="url" mode="aspectFill" style="margin-right: 10px; width: 80px; height: 80px"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -457,11 +461,11 @@ export default { ...@@ -457,11 +461,11 @@ export default {
], ],
vehicleItems: [ vehicleItems: [
{ label: '合同编号', key: 'signingInfo.saleContract.contractNo' }, { label: '合同编号', key: 'signingInfo.saleContract.contractNo' },
{ label: '签约时间', key: 'signingInfo.saleContract.signingTime' }, { label: '签约时间', key: 'signingInfo.saleContract.signTime' },
{ label: '定金金额', key: 'signingInfo.saleContract.depositPrice' }, { label: '定金金额', key: 'signingInfo.saleContract.depositPrice' },
{ label: '尾款金额', key: 'signingInfo.saleContract.finalPrice' }, { label: '尾款金额', key: 'signingInfo.saleContract.finalPrice' },
{ label: '签约车主', key: 'signingInfo.saleContract.partAName' }, { label: '签约车主', key: 'signingInfo.saleContract.partAName' },
{ label: '手机号码', key: 'signingInfo.saleContract.partAPhone' }, { label: '手机号码', key: 'signingInfo.saleContract.phone' },
{ label: '身份证号', key: 'signingInfo.saleContract.idCard' }, { label: '身份证号', key: 'signingInfo.saleContract.idCard' },
{ label: '合同模版名称', key: 'signingInfo.saleContract.docTemplateName' }, { label: '合同模版名称', key: 'signingInfo.saleContract.docTemplateName' },
{ label: '交车时间', key: 'signingInfo.saleContract.handoverTime' }, { label: '交车时间', key: 'signingInfo.saleContract.handoverTime' },
...@@ -659,6 +663,7 @@ export default { ...@@ -659,6 +663,7 @@ export default {
return this.fileSuibtype[fileSubtype]?.name || `未知类型(${fileSubtype})` return this.fileSuibtype[fileSubtype]?.name || `未知类型(${fileSubtype})`
}, },
previewMedia(media, type) { previewMedia(media, type) {
console.log('media:', media)
const url = `/pages/boutique/preview?tabName=预览&sourceType=${type}&detailUrl=${media.url || media}` const url = `/pages/boutique/preview?tabName=预览&sourceType=${type}&detailUrl=${media.url || media}`
uni.navigateTo({ uni.navigateTo({
url: `${url}` url: `${url}`
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<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" @refresherrefresh="getStatByStatus()" :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" :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 class="noDataImg" :src="noData" /> <image class="noDataImg" :src="noData" />
...@@ -261,6 +261,9 @@ export default { ...@@ -261,6 +261,9 @@ export default {
this.search() this.search()
}, },
async queryList(pageNo, pageSize) { async queryList(pageNo, pageSize) {
if (pageNo == 1) {
this.getStatByStatus()
}
const res = await uni.$api.evaluationApi.evalOrderList({ const res = await uni.$api.evaluationApi.evalOrderList({
t: { ...this.searchValue, status: this.typeList[this.tabIndex].key }, t: { ...this.searchValue, status: this.typeList[this.tabIndex].key },
currentPage: pageNo, currentPage: pageNo,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!