Commit dcb8c9af by 李伟康

Merge branch 'SAAS+V5.0.0-1014' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.0.0-1014

2 parents a5939341 806687b2
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
{ key: 'engineNumber', label: '发动机号', required: true, maxlength: 20, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'engineNumber', targetObj: 'carBaseReqDTO', type: 'input', showText: 'shopMerchantName' }, { key: 'engineNumber', label: '发动机号', required: true, maxlength: 20, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'engineNumber', targetObj: 'carBaseReqDTO', type: 'input', showText: 'shopMerchantName' },
{ key: 'registrationCity', label: '上牌城市', required: true, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'registrationCityId', targetObj: 'carBaseReqDTO', type: 'select', showText: 'shopMerchantName', isCity: true }, { key: 'registrationCity', label: '上牌城市', required: true, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'registrationCityId', 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' }, { key: 'registrationDate', label: '上牌时间', required: true, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'registrationDate', targetObj: 'carBaseReqDTO', type: 'calendar', showText: 'shopMerchantName' },
{ key: 'carCity', label: '车辆所在地', required: true, fullWidth: false, targetNameKey: 'sellerName', sourceNameKey: 'staffName', sourceKey: 'uuid', targetKey: 'carCityId', 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}$' }, { 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}$' },
{ {
key: 'usageType', key: 'usageType',
...@@ -533,6 +533,58 @@ export default { ...@@ -533,6 +533,58 @@ 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.formImagesData = {}
that.certificateImagesData = {}
that.carVideoData = {}
that.otherImagesData = {}
// 根据 fileType 和 fileSubtype 分类存放图片
images.forEach(image => {
const { fileType, fileSubtype, fileUrl } = image
const imageItem = { url: fileUrl }
// 根据 fileType 决定存放到哪个数据结构
let targetData = null
switch (fileType) {
case 1: // 车辆图片
targetData = that.formImagesData
break
case 2: // 证件资料
targetData = that.certificateImagesData
break
case 3: // 车辆视频
targetData = that.carVideoData
break
case 4: // 其他图片
targetData = that.otherImagesData
break
default:
return
}
// 根据 fileSubtype 组织数据
if (!targetData[fileSubtype]) {
targetData[fileSubtype] = []
}
targetData[fileSubtype].push(imageItem)
})
that.formFields.forEach(field => {
if (field.fieldPickerArray && field.targetObj && field.targetKey && field.targetNameKey) {
const targetValue = that.formData[field.targetObj][field.targetKey]
console.log('targetValue:', targetValue)
if (targetValue !== undefined && targetValue !== null && targetValue !== '') {
// 查找fieldPickerArray中对应的值
const selectedItem = field.fieldPickerArray.find(item => item.value === targetValue.toString())
console.log('selectedItem:', selectedItem)
if (selectedItem) {
// 设置显示名称
that.$set(that.formData[field.targetObj], field.targetNameKey, selectedItem.name)
}
}
}
})
}) })
}, },
...@@ -965,19 +1017,28 @@ export default { ...@@ -965,19 +1017,28 @@ export default {
}) })
console.log('提交的表单数据:', this.formData) console.log('提交的表单数据:', this.formData)
if (this.query.type === 'add') { if (this.query.type === 'add') {
await uni.$api.evaluationApi.evalOrderCreate(this.formData) const res = uni.$api.evaluationApi.evalOrderCreate(this.formData).then(res => {
uni.hideLoading() console.log('res:', res)
uni.showToast({
title: '新增成功',
icon: 'success'
}) })
if (res.code == 0) {
uni.hideLoading()
uni.showToast({
title: '新增成功',
icon: 'none'
})
this.backPage()
}
} else if (this.query.type === 'edit') { } else if (this.query.type === 'edit') {
await uni.$api.evaluationApi.evalOrderUpdate(this.formData) const res = await uni.$api.evaluationApi.evalOrderUpdate(this.formData)
uni.hideLoading() console.log('res:', res)
uni.showToast({ if (res.code == 0) {
title: '编辑成功', uni.hideLoading()
icon: 'success' uni.showToast({
}) title: '编辑成功',
icon: 'none'
})
this.backPage()
}
} }
}, },
...@@ -1005,15 +1066,16 @@ export default { ...@@ -1005,15 +1066,16 @@ export default {
} }
// 从URL中提取文件名和格式 // 从URL中提取文件名和格式
const urlParts = item.url.split('/') const fileName = item.name
const fileName = urlParts[urlParts.length - 1] const fileFormat = item.fileFormat
const fileFormat = fileName.split('.').pop().toLowerCase()
// 创建新的图片对象并添加到imageList // 创建新的图片对象并添加到imageList
this.formData.imageList.push({ this.formData.imageList.push({
fileType: fileType, fileType: fileType,
fileSubtype: parseInt(fileSubtype, 10), // 确保是数字类型 fileSubtype: parseInt(fileSubtype, 10), // 确保是数字类型
fileUrl: item.url fileUrl: item.url,
fileFormat: fileFormat,
fileName: fileName
}) })
}) })
}) })
......
<template> <template>
<div class="button-module flex"> <div class="button-module flex">
<view class="common-btn" @click="handleClick('details')">详情</view> <view class="common-btn" @click="handleClick('details')">详情</view>
<view v-if="subStatus == '' && status != 100" class="common-btn ml-24" @click="handleClick('edit')">编辑</view> <view v-if="!subStatus && status != 100" class="common-btn ml-24" @click="handleClick('edit')">编辑</view>
<view v-if="status == 20 && !subStatus" class="common-btn ml-24" @click="handleClick('requote')">重新报价</view> <view v-if="status == 20 && !subStatus" class="common-btn ml-24" @click="handleClick('requote')">重新报价</view>
<view v-if="status == 20 && !subStatus" class="common-btn blue-btn ml-24" @click="handleClick('sign')">客户签约</view> <view v-if="status == 20 && !subStatus" class="common-btn blue-btn ml-24" @click="handleClick('sign')">客户签约</view>
<view v-if="status == 20 && subStatus == 1" class="common-btn gray-btn ml-24" @click="handleClick('signing')">签约中</view> <view v-if="status == 20 && subStatus == 1" class="common-btn gray-btn ml-24" @click="handleClick('signing')">签约中</view>
...@@ -20,8 +20,8 @@ export default { ...@@ -20,8 +20,8 @@ export default {
name: 'ButtonModule', name: 'ButtonModule',
props: { props: {
status: { status: {
type: String, type: Number,
default: '10' default: 10
}, },
subStatus: { subStatus: {
type: String, type: String,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<template v-slot:content> <template v-slot:content>
<StepTab :steps="steps" :currentStep="currentStep" :clickable="true" @step-change="onStepChange" :isShowStepNumber="false"></StepTab> <StepTab :steps="steps" :currentStep="currentStep" :clickable="true" @step-change="onStepChange" :isShowStepNumber="false"></StepTab>
<view class="list-component"> <view class="list-component">
<SortByNameList :items="currentStepData" :activeValue="currentSelectedId" :activeField="'id'" :itemNameField="'name'" :groupKeyField="'letter'" :itemsPerRow="3" :itemSpacing="32" @item-click="handleItemClick" /> <SortByNameList :items="currentStepData" :activeValue="currentSelectedId" :activeField="'name'" :itemNameField="'name'" :groupKeyField="'letter'" :itemsPerRow="3" :itemSpacing="32" @item-click="handleItemClick" />
</view> </view>
</template> </template>
</GeneralPopup> </GeneralPopup>
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
// 处理项目点击事件 // 处理项目点击事件
handleItemClick(item) { handleItemClick(item) {
console.log('Item clicked:', item) console.log('Item clicked:', item)
this.currentSelectedId = item.id this.currentSelectedId = item.id || item.name
if (this.currentStep === 0) { if (this.currentStep === 0) {
this.selectedBrand = item this.selectedBrand = item
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</view> </view>
<!-- <web-view :src="url"></web-view> --> <!-- <web-view :src="url"></web-view> -->
<view> <view>
<lk-preview-office :url="url" fileType="pdf"></lk-preview-office> <lk-preview-office :url="url" :fileType="fileType"></lk-preview-office>
</view> </view>
</view> </view>
</template> </template>
...@@ -21,13 +21,19 @@ export default { ...@@ -21,13 +21,19 @@ export default {
data () { data () {
return { return {
url: '', url: '',
title: '' title: '',
fileType: 'pdf'
} }
}, },
onLoad (options) { onLoad (options) {
console.log(options) console.log(options)
this.fileType = options.fileType || 'pdf'
if(this.fileType === 'docx') {
this.url = options.fileUrl
}else {
this.url = options.fileUrl + '&OSSAccessKeyId='+ options.OSSAccessKeyId + '&Signature=' + options.Signature this.url = options.fileUrl + '&OSSAccessKeyId='+ options.OSSAccessKeyId + '&Signature=' + options.Signature
}
this.title = options.fileName this.title = options.fileName
console.log(this.url) console.log(this.url)
// else this.setWv() // else this.setWv()
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
<!-- 视频显示 --> <!-- 视频显示 -->
<view v-else class="video-container" @click.stop="previewMedia(media, 2)"> <view v-else class="video-container" @click.stop="previewMedia(media, 2)">
<!-- <video :src="media.url || media" mode="aspectFill" controls class="uploaded-media"></video> --> <!-- <video :src="media.url || media" mode="aspectFill" controls class="uploaded-media"></video> -->
<image src="https://jinrong-huidan-test.oss-cn-shenzhen.aliyuncs.com/vcpfile/jiashizheng20250822113512001.png " mode="aspectFill" class="uploaded-media" @click.stop="previewMedia(media, 1)"></image> <image :src="media.url + videoProcess" mode="aspectFill" @click.stop="previewMedia(media, 1)"></image>
<!-- <cover-view class="video-play-icon"> <view class="video-play-icon">
<uni-icons type="play" size="24" color="#fff"></uni-icons> <view class="sprites-icon icon-play"></view>
</cover-view> --> </view>
</view> </view>
<cover-view class="delete-icon" @click.stop="deleteMedia(field.key, index)"> <cover-view class="delete-icon" @click.stop="deleteMedia(field.key, index)">
<uni-icons type="clear" size="16" color="#fff"></uni-icons> <uni-icons type="clear" size="16" color="#fff"></uni-icons>
...@@ -64,6 +64,11 @@ export default { ...@@ -64,6 +64,11 @@ export default {
} }
} }
}, },
data() {
return {
videoProcess: '?x-oss-process=video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'
}
},
methods: { methods: {
// 处理媒体上传 // 处理媒体上传
handleMediaUpload(field) { handleMediaUpload(field) {
...@@ -115,7 +120,8 @@ export default { ...@@ -115,7 +120,8 @@ 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) console.log('上传图片成功', url)
this.addMedia(field, { url, type: 'image' }) const fileExtension = res.tempFiles[0].name.split('.').pop().toLowerCase()
this.addMedia(field, { url, fileFormat: fileExtension, type: 'image', name: field.label })
} }
} catch (error) { } catch (error) {
console.log('上传图片失败', error) console.log('上传图片失败', error)
...@@ -138,12 +144,14 @@ export default { ...@@ -138,12 +144,14 @@ export default {
sizeType: ['compressed'], sizeType: ['compressed'],
sourceType: ['album'], sourceType: ['album'],
success: async res => { success: async res => {
console.log('选择图片成功', res)
try { try {
// 上传所有选择的图片 // 上传所有选择的图片
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) console.log('上传图片成功', url)
this.addMedia(field, { url, type: 'image' }) const fileExtension = res.tempFiles[0].name.split('.').pop().toLowerCase()
this.addMedia(field, { url, fileFormat: fileExtension, type: 'image', fileFormat: fileExtension, name: field.label })
} }
} catch (error) { } catch (error) {
console.log('上传图片失败', error) console.log('上传图片失败', error)
...@@ -169,9 +177,12 @@ export default { ...@@ -169,9 +177,12 @@ export default {
try { try {
const url = await uploadFile(res.tempFilePath) const url = await uploadFile(res.tempFilePath)
console.log('上传视频成功', url) console.log('上传视频成功', url)
const fileExtension = res.name.split('.').pop().toLowerCase()
this.addMedia(field, { this.addMedia(field, {
url, url,
type: 'video', type: 'video',
fileFormat: fileExtension,
name: field.label,
duration: res.duration, duration: res.duration,
size: res.size size: res.size
}) })
...@@ -195,14 +206,18 @@ export default { ...@@ -195,14 +206,18 @@ export default {
sourceType: ['album'], sourceType: ['album'],
maxDuration: field.maxDuration || 60, maxDuration: field.maxDuration || 60,
success: async res => { success: async res => {
console.log('选择视频成功', res)
try { try {
const url = await uploadFile(res.tempFilePath) const url = await uploadFile(res.tempFilePath)
console.log('上传视频成功', url) console.log('上传视频成功', url)
const fileExtension = res.name.split('.').pop().toLowerCase()
this.addMedia(field, { this.addMedia(field, {
url, url,
type: 'video', type: 'video',
name: field.label,
duration: res.duration, duration: res.duration,
size: res.size size: res.size,
fileFormat: fileExtension
}) })
} catch (error) { } catch (error) {
console.log('上传视频失败', error) console.log('上传视频失败', error)
......
...@@ -203,11 +203,18 @@ export default { ...@@ -203,11 +203,18 @@ export default {
{ key: 'handoverPhotoBack', label: '后面', required: false, maxCount: 1 }, { key: 'handoverPhotoBack', label: '后面', required: false, maxCount: 1 },
{ key: 'handoverPhotoRightSide', label: '右侧面', required: false, maxCount: 1 }, { key: 'handoverPhotoRightSide', label: '右侧面', required: false, maxCount: 1 },
{ key: 'handoverPhotoMore', label: '其他', required: false, maxCount: 5, fullwidth: true } { key: 'handoverPhotoMore', label: '其他', required: false, maxCount: 5, fullwidth: true }
] ],
query: null
} }
}, },
computed: {}, computed: {},
onLoad(options) {
this.init(options)
},
methods: { methods: {
init(options) {
this.query = options
},
backPage() { backPage() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
...@@ -222,7 +229,7 @@ export default { ...@@ -222,7 +229,7 @@ export default {
uni.$api.evaluationApi uni.$api.evaluationApi
.salesAgreementPreview({ .salesAgreementPreview({
evalOrderNo: this.$route.query.evalOrderNo, evalOrderNo: this.query.evalOrderNo,
supplementaryClauseText: this.formData.supplementaryClauseText supplementaryClauseText: this.formData.supplementaryClauseText
}) })
.then(res => { .then(res => {
...@@ -255,7 +262,7 @@ export default { ...@@ -255,7 +262,7 @@ export default {
}) })
uni.$api.evaluationApi uni.$api.evaluationApi
.confirmDelivery({ .confirmDelivery({
evalOrderNo: this.$route.query.evalOrderNo, evalOrderNo: this.query.evalOrderNo,
...this.formData ...this.formData
}) })
.then(res => { .then(res => {
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="mb-32 upload-box"> <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 }]"> <view v-for="(item, index) in vehicleManagementItems" :key="index" :class="['flex align-center', { 'full-width': item.fullWidth }]">
......
...@@ -78,22 +78,22 @@ ...@@ -78,22 +78,22 @@
签约保管人 签约保管人
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
<input class="intention-input mb-48" type="idcard" placeholder="请输入" v-model="addSignAgreementObj.custodianName" /> <input class="intention-input mb-48" placeholder="请输入" v-model="addSignAgreementObj.custodianName" />
<view class="requote-label mb-24"> <view class="requote-label mb-24">
身份证号 身份证号
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
<input class="intention-input mb-48" type="idcard" placeholder="请输入" v-model="addSignAgreementObj.custodianIdentityCode" /> <input class="intention-input mb-48" placeholder="请输入" v-model="addSignAgreementObj.custodianIdentityCode" />
<view class="requote-label mb-24"> <view class="requote-label mb-24">
手机号 手机号
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
<input class="intention-input mb-48" type="idcard" placeholder="请输入" v-model="addSignAgreementObj.custodianPhone" /> <input class="intention-input mb-48" type="number" placeholder="请输入" v-model="addSignAgreementObj.custodianPhone" />
<view class="requote-label mb-24"> <view class="requote-label mb-24">
地址 地址
<text class="requiredLabel">*</text> <text class="requiredLabel">*</text>
</view> </view>
<input class="intention-input mb-48" type="idcard" placeholder="请输入" v-model="addSignAgreementObj.custodianAddress" /> <input class="intention-input mb-48" placeholder="请输入" v-model="addSignAgreementObj.custodianAddress" />
</view> </view>
</template> </template>
</GeneralPopup> </GeneralPopup>
...@@ -239,7 +239,6 @@ export default { ...@@ -239,7 +239,6 @@ export default {
this.search() this.search()
}, },
async queryList(pageNo, pageSize) { async queryList(pageNo, pageSize) {
console.log('queryList出大两侧')
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!