Commit c915de63 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 569f81ed 01d80ebc
......@@ -221,5 +221,15 @@ module.exports = {
},
{ returnAll: true }
)
},
/** 评估单简单详情 */
evalOrderSimpleDetail(data) {
return gscPost(
`/evalOrder/simpleDetail`,
{
...data
},
{ returnAll: true }
)
}
}

2.79 MB | W: | H:

2.79 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin

736 Bytes | W: | H:

1.26 KB | W: | H:

assets/spritesmith/seeIcon.png
assets/spritesmith/seeIcon.png
assets/spritesmith/seeIcon.png
assets/spritesmith/seeIcon.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -49,7 +49,7 @@ const domain = {
}[target[index]]
const djDomain = {
ip: 'http://192.168.1.221:5003',
ip: 'https://dj.test.glsx.com.cn',
// ip: 'http://192.168.2.80:8558',
dev: 'http://dj.dev.glsx.com.cn',
beta: 'https://dj.beta.glsx.com.cn', //预发布 appid: wx9f91c1ec493eb425
......
......@@ -87,7 +87,7 @@
<uni-calendar class="calendar" :showMonth="false" @change="calendarChange" />
</template>
</GeneralPopup>
<GeneralPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" @confirm="confirmTips" :noTitle="true">
<GeneralPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" :noTitle="true">
<template #content>
<view>
<image class="tipsPopupBg" :src="bg" />
......@@ -99,7 +99,7 @@
</template>
</GeneralPopup>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
<GeneralPopup ref="editTipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" @confirm="confirmTips" :noTitle="true">
<GeneralPopup ref="editTipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" :noTitle="true">
<template #content>
<view>
<image class="tipsPopupBg" :src="bg" />
......@@ -122,6 +122,7 @@ import { uploadFile } from '@/utils/ossUploadFile/uploadFile.js'
import SelectCity from './components/SelectCity.vue'
import UploadMedia from './components/uploadMedia.vue'
import NoticePopup from '@/components/NoticePopup.vue'
import { debounce } from 'lodash'
export default {
name: 'AddEvaluationFrom',
components: {
......@@ -192,7 +193,7 @@ export default {
exteriorColor: '',
productionDate: '',
guidePrice: 0,
buyNewCar: '',
buyNewCar: 0,
hasAccident: 0,
overallRating: '',
conditionDescription: ''
......@@ -387,12 +388,12 @@ export default {
showText: 'shopMerchantName',
radioList: [
{
value: '0',
name: '售前'
value: '1',
name: '是'
},
{
value: '1',
name: '售后'
value: '0',
name: '否'
}
]
},
......@@ -410,12 +411,12 @@ export default {
showText: 'shopMerchantName',
radioList: [
{
value: '0',
name: '售前'
value: '1',
name: '是'
},
{
value: '1',
name: '售后'
value: '0',
name: '否'
}
]
},
......@@ -459,7 +460,7 @@ export default {
{ 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: '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}$' },
{ key: 'previousOwnerPhone', label: '原车主电话', required: true, fullWidth: true, targetKey: 'previousOwnerPhone', targetObj: 'carLicenseReqDTO', type: 'input', inputType: 'number', pattern: '^[0-9]{11}$', maxlength: 17 },
{
key: 'previousOwnerAddress',
label: '原车主住址',
......@@ -602,8 +603,11 @@ export default {
let selectedItem
// 为颜色字段添加特殊处理,使用name匹配
if (field.key === 'exteriorColor' || field.key === 'interiorColor') {
console.log(that.formData)
console.log('targetValue', targetValue)
// 查找name匹配的选项
selectedItem = field.fieldPickerArray.find(item => item.name === targetValue)
console.log('selectedItem', selectedItem)
} else {
// 其他字段继续使用value匹配
selectedItem = field.fieldPickerArray.find(item => item.value === targetValue.toString())
......@@ -1067,7 +1071,7 @@ export default {
},
// 提交表单逻辑
async submitForm() {
submitForm: debounce(async function () {
// 表单提交验证
if (this.currentStep === 3) {
const leftFront45Image = this.formImagesData['11'] // key为11的是左前45度图片
......@@ -1142,7 +1146,7 @@ export default {
}
}
}
},
}, 500),
// 处理媒体数据的辅助方法
processMediaData(mediaData, fileType) {
......
......@@ -139,9 +139,9 @@ export default {
handleCell(field) {
this.$emit('handleCell', field)
},
radioChange(e) {
radioChange(e, field) {
const value = e.detail.value
this.$emit('radioChange', value)
this.$emit('radioChange', value, field)
},
bindPickerChange(e, field) {
console.log('picker发送选择改变,携带值为', e)
......@@ -173,7 +173,7 @@ export default {
},
handleBlur(e, field) {
console.log('handleBlur', e, field)
let value = e.target._value.trim() || e.detail.value.trim()
let value = e.target?._value?.trim() || e.target?.value?.trim()
if (field.targetObj) {
if (this.formData[field.targetObj]) {
this.formData[field.targetObj][field.targetKey] = value
......
<!--针对弹窗穿透滚动,统一封装的popup-->
<template>
<page-meta :page-style="'overflow:' + (show ? 'hidden' : 'visible')"></page-meta>
<uni-popup :class="['customPopup', popupClass, noTitle ? 'noTitle' : '']" ref="publishPopup" :type="type" @change="change" :safe-area="safeArea" :showClose="showClose">
<uni-popup :class="['customPopup', popupClass, noTitle ? 'noTitle' : '']" ref="publishPopup" :type="type" @change="change" :safe-area="safeArea" :is-mask-click="isMaskClick" :showClose="showClose">
<!-- 顶部标题栏插槽 -->
<slot name="header">
<view class="popup-top-box flex align-center" v-if="showTitle">
......@@ -36,7 +36,7 @@ export default {
},
isMaskClick: {
type: Boolean,
default: true
default: false
},
safeArea: {
type: Boolean,
......
......@@ -123,7 +123,8 @@ export default {
const url = await uploadFile(tempFilePath)
console.log('上传图片成功', url)
uni.hideLoading()
const fileExtension = res.tempFiles[0].name.split('.').pop().toLowerCase()
console.log(res, '上传所有选择的图片')
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 })
}
} catch (error) {
......@@ -153,10 +154,11 @@ export default {
uni.showLoading({ title: '上传中...' })
// 上传所有选择的图片
for (const tempFilePath of res.tempFilePaths) {
console.log(res, '上传所有选择的图片')
const url = await uploadFile(tempFilePath)
console.log('上传图片成功', url)
uni.hideLoading()
const fileExtension = res.tempFiles[0].name.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', fileFormat: fileExtension, name: field.label })
}
} catch (error) {
......@@ -181,11 +183,12 @@ export default {
maxDuration: field.maxDuration || 60,
camera: 'back',
success: async res => {
console.log('拍摄视频成功', res)
try {
uni.showLoading({ title: '上传中...' })
const url = await uploadFile(res.tempFilePath)
console.log('上传视频成功', url)
const fileExtension = res.name.split('.').pop().toLowerCase()
const fileExtension = res.name ? res.name.split('.').pop().toLowerCase() : res.tempFilePath.split('.').pop().toLowerCase()
this.addMedia(field, {
url,
type: 'video',
......@@ -222,7 +225,7 @@ export default {
uni.showLoading({ title: '上传中...' })
const url = await uploadFile(res.tempFilePath)
console.log('上传视频成功', url)
const fileExtension = res.name.split('.').pop().toLowerCase()
const fileExtension = res.name ? res.name.split('.').pop().toLowerCase() : res.tempFilePath.split('.').pop().toLowerCase()
this.addMedia(field, {
url,
type: 'video',
......
......@@ -20,7 +20,7 @@
</view>
<view>
<view class="flex align-center inputBox" :class="{ fullInput: field.fullInput }" v-if="field.key === 'carKeyUrl' || field.key === 'otherUrl'">
<input type="text" v-model="formData[field.inputKey]" placeholder="请输入" />
<input type="number" v-model="formData[field.inputKey]" placeholder="请输入" maxlength="1" />
<text>套</text>
</view>
<view class="upload-images-wrapper">
......@@ -110,6 +110,7 @@ import GeneralPopup from './components/GeneralPopup.vue'
import OrderPopup from '@/components/OrderPopup/index.vue'
import dayjs from 'dayjs'
import NoticePopup from '@/components/NoticePopup.vue'
import { debounce } from 'lodash'
export default {
components: {
FormCell,
......@@ -148,7 +149,8 @@ export default {
sourceNameKey: 'staffName',
sourceKey: 'uuid',
targetKey: 'handoverAddress',
type: 'input'
type: 'input',
maxlength: 100
},
{
key: 'sellerUserId',
......@@ -171,7 +173,7 @@ export default {
purchaseInvoiceUrl: '',
trafficScreenshotUrl: '',
carKeyUrl: '',
carKeyCount: 0,
carKeyCount: '',
trafficInsuranceUrl: '',
insuranceCardUrl: '',
transferPhotoUrl: '',
......@@ -217,6 +219,7 @@ export default {
methods: {
init(options) {
this.query = options
this.getEvalOrderSimpleDetail()
},
backPage() {
this.$refs.notice.buttonsList = [
......@@ -240,6 +243,21 @@ export default {
]
this.$refs.notice.open()
},
async getEvalOrderSimpleDetail() {
const res = await uni.$api.evaluationApi.evalOrderSimpleDetail({
evalOrderNo: this.query.evalOrderNo
})
if (res.data.code == 0) {
this.$set(this.formData, 'handoverAddress', res.data.data.evalCarBase.carProvinceName + '-' + res.data.data.evalCarBase.carCityName)
// this.evalOrderSimpleDetail = res.data.data
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
},
handleCell(field) {
console.log('handleCell', field)
this.currentField = field
......@@ -275,7 +293,7 @@ export default {
this.$refs.openDate.open()
}
},
confirmDelivery() {
confirmDelivery: debounce(function (e) {
if (!this.formData.handoverTime) {
uni.showToast({ title: '请选择交车时间', icon: 'none' })
return
......@@ -285,26 +303,36 @@ export default {
uni.showToast({ title: '请输入交车地点', icon: 'none' })
return
}
if (this.formData.carKeyCount <= 0) {
uni.showToast({ title: '请输入车钥匙数量', icon: 'none' })
return
}
const requiredUploadFields = this.uploadFields.filter(field => field.required)
for (const field of requiredUploadFields) {
const images = this.getImages(field, 'upload')
if ((field.key === 'carKeyUrl' && !images) || images.length === 0) {
uni.showToast({ title: '请上车车钥匙图片', icon: 'none' })
return
}
if (!images || images.length === 0) {
uni.showToast({ title: `请上传${field.label}`, icon: 'none' })
return
}
}
this.$refs.tipsPopup.open()
},
}, 500),
async confirmTips() {
// this.uploadedImages
Object.keys(this.uploadedImages).forEach(key => {
console.log(this.uploadedImages)
if (Array.isArray(this.uploadedImages[key])) {
// 将图片URL数组转换为逗号分隔的字符串
const imagesStr = this.uploadedImages[key].join(',')
// 更新formData中对应的字段
this.formData[key] = imagesStr
console.log('this.uploadedImages', this.formData)
}
})
const res = await uni.$api.evaluationApi.confirmDelivery({
......@@ -468,7 +496,7 @@ export default {
// Popup样式
::v-deep .tipsPopup .uni-popup__wrapper {
width: toRpx(848);
height: toRpx(744);
height: toRpx(664);
border-radius: toRpx(42);
background: rgb(255, 255, 255) !important;
.tipsPopupBg {
......
......@@ -17,7 +17,7 @@
<view>暂无客户工单</view>
</view>
</template>
<EvaluationCard @button-click="handleButtonClick" v-for="(item, index) in dataList" :key="index" :carInfo="item" @toggle-goods-list="handleToggleGoodsList" @jump="jump" @refresh="search()" :class="{ 'mb-40': index < dataList.length - 1 }"></EvaluationCard>
<EvaluationCard @button-click="handleButtonClick" v-for="(item, index) in dataList" :key="index" :carInfo="item" @refresh="search()" :class="{ 'mb-40': index < dataList.length - 1 }"></EvaluationCard>
</z-paging>
</view>
</view>
......@@ -443,7 +443,7 @@ export default {
this.requoteObj.evalOrderNo = e.evalOrderNo
this.$refs.requotePopup.open()
},
confirmRequote() {
async confirmRequote() {
const that = this
console.log('that.requoteObj:', that.requoteObj)
if (that.requoteObj.customerTargetPriceFeedback.length == 0) {
......@@ -460,7 +460,7 @@ export default {
})
return
}
const res = uni.$api.evaluationApi.evalOrderOwnerReQuote(this.requoteObj)
const res = await uni.$api.evaluationApi.evalOrderOwnerReQuote(this.requoteObj)
if (res.data.code == 0) {
uni.showToast({
title: '重新报价成功',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!