Commit 0f20a370 by cen

feat: 新增修改

1 parent 0ffe837c
......@@ -238,5 +238,15 @@ module.exports = {
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(data[key])}`)
.join('&')
return gscPost(`/evalOrder/apiRegion/search${queryString ? '?' + queryString : ''}`, { ...data }, { returnAll: true })
},
/** 撤销合同 */
revokeSaleContract(data) {
return gscPost(
`/evalOrder/revokeSaleContract`,
{
...data
},
{ returnAll: true }
)
}
}
......@@ -3,22 +3,19 @@ module.exports = {
gscPost: (url, data, _config = {}) => {
return new Promise((resolve, reject) => {
uni.getNetworkType({
success (res) {
success(res) {
if (['none'].includes(res.networkType)) {
uni.hideLoading();
uni.hideLoading()
uni.showToast({
title: '网络异常',
icon: "none",
});
return;
icon: 'none'
})
return
}
if (!uni.$signHttp) uni.$signHttp = new Request(uni.signHttpConfig)
data.source = 1
resolve(uni.$signHttp.post(url, data, _config))
}
})
})
}
}

2.94 MB | W: | H:

2.94 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 3
const index = 2
/**
*
0本地
......
......@@ -556,7 +556,7 @@ export default {
uploadOtherFields: [{ key: 41, label: '其他图片', required: false, accept: 'image', maxCount: 30, fullwidth: true }],
currentField: null,
query: {},
validateState:true
validateState: true
}
},
onLoad(options) {
......@@ -886,7 +886,7 @@ export default {
// 车架号验证 - 长度17且只能包含数字和大写字母
// const vin = this.formData.carBaseReqDTO.vin
// const vinRegex = /^[A-Z0-9]+$/
// if (!vinRegex.test(vin)) {
// uni.showToast({
// title: '车架号只能包含数字和大写字母',
......@@ -901,22 +901,22 @@ export default {
// })
// return
// }
// VIN车架号-动态校验
const carVin = this.formData.carBaseReqDTO.vin
console.log("validateState",this.validateState);
if (carVin) {
// 前置判断
if (carVin.length !== 17) {
uni.showToast({title:'请输入 17 位有效字符(支持大写 A-H/J-N/P-Z、0-9)',icon:'none'})
return false
}
// 根据接口校验结果判断
if (carVin.length === 17 && !this.validateState) {
uni.showToast({title:'车架号校验不匹配,请核对后重新输入',icon:'none'})
return false
}
}
console.log('validateState', this.validateState)
if (carVin) {
// 前置判断
if (carVin.length !== 17) {
uni.showToast({ title: '请输入 17 位有效字符(支持大写 A-H/J-N/P-Z、0-9)', icon: 'none' })
return false
}
// 根据接口校验结果判断
if (carVin.length === 17 && !this.validateState) {
uni.showToast({ title: '车架号校验不匹配,请核对后重新输入', icon: 'none' })
return false
}
}
const engineNumber = this.formData.carBaseReqDTO.engineNumber
const engineNumberRegex = /^[A-Za-z0-9]+$/
if (!engineNumberRegex.test(engineNumber)) {
......@@ -1018,7 +1018,7 @@ export default {
},
handleCell(field) {
const that = this
console.log("handleCellAAAAA");
console.log('handleCellAAAAA')
if (field.isCar) {
this.openSelectCar()
} else if (field.isCity) {
......@@ -1138,17 +1138,19 @@ export default {
if (upperValue !== value) {
this.$set(this.formData.carBaseReqDTO, 'vin', upperValue)
}
// VIN车架号动态校验:车架号字段,动态转换为大写
validateVin(upperValue).then(result => {
console.log("validateVin",result);
let { valid } = result.data;
this.validateState = valid
// 校验成功,所有提示已在公共方法中处理
console.log('车架号校验成功:', result)
}).catch(err => {
console.log("validateVinErr",result);
})
// VIN车架号动态校验:车架号字段,动态转换为大写
validateVin(upperValue)
.then(result => {
console.log('validateVin', result)
let { valid } = result.data
this.validateState = valid
// 校验成功,所有提示已在公共方法中处理
console.log('车架号校验成功:', result)
})
.catch(err => {
console.log('validateVinErr', result)
})
}
if (field.key === 'mileage') {
let numValue = Number(value)
......@@ -1324,15 +1326,17 @@ export default {
if (res.data.code == 0) {
if (res.data.data.status == 1) {
this.formData.carBaseReqDTO.vin = res.data.data.vin
validateVin(this.formData.carBaseReqDTO.vin).then(result => {
console.log("validateVin",result);
let { valid } = result.data;
this.validateState = valid
// 校验成功,所有提示已在公共方法中处理
console.log('车架号校验成功:', result)
}).catch(err => {
console.log("validateVinErr",result);
})
validateVin(this.formData.carBaseReqDTO.vin)
.then(result => {
console.log('validateVin', result)
let { valid } = result.data
this.validateState = valid
// 校验成功,所有提示已在公共方法中处理
console.log('车架号校验成功:', result)
})
.catch(err => {
console.log('validateVinErr', result)
})
uni.showToast({ title: '车架号识别完成并已自动填写到表单中', icon: 'none' })
uni.hideLoading()
} else {
......@@ -1412,7 +1416,44 @@ export default {
this.formData.carBaseReqDTO.vin = res.data.data.vin
this.formData.carBaseReqDTO.registrationDate = res.data.data.registrationDate
this.formData.carLicenseReqDTO.previousOwnerAddress = res.data.data.previousOwnerAddress
// 处理 previousOwnerAddress,提取省市并回显到上牌城市
const previousOwnerAddress = res.data.data.previousOwnerAddress
this.formData.carLicenseReqDTO.previousOwnerAddress = previousOwnerAddress
if (previousOwnerAddress) {
// 解析地址,提取省和市(到市级)
let provinceName = ''
let cityName = ''
// 处理直辖市(北京市、上海市、天津市、重庆市)
const municipalities = ['北京市', '上海市', '天津市', '重庆市']
const municipalityMatch = municipalities.find(city => previousOwnerAddress.startsWith(city))
if (municipalityMatch) {
// 直辖市:省和市都是同一个名称
provinceName = municipalityMatch
cityName = municipalityMatch
} else {
// 普通省份:例如:"山东省济南市历下区" -> 省:"山东省",市:"济南市"
const provinceMatch = previousOwnerAddress.match(/^(.+?省)/)
const cityMatch = previousOwnerAddress.match(/省(.+?市)/)
if (provinceMatch && cityMatch) {
provinceName = provinceMatch[1]
cityName = cityMatch[1]
}
}
if (provinceName && cityName) {
// 清空上牌城市的ID,只保留名称
this.formData.carBaseReqDTO.registrationProvinceId = 0
this.formData.carBaseReqDTO.registrationCityId = 0
this.formData.carBaseReqDTO.registrationProvinceName = provinceName
this.formData.carBaseReqDTO.registrationCityName = cityName
}
}
this.formData.carLicenseReqDTO.previousOwnerName = res.data.data.previousOwnerName
this.formData.carLicenseReqDTO.carSeriesName = res.data.data.carSeriesName
this.formData.carLicenseReqDTO.carTypeName = res.data.data.carTypeName
......
......@@ -5,6 +5,7 @@
<view v-if="status == 20 && !subStatus" class="common-btn ml-24" @click.stop="handleClick('requote', 'app_evaluate_requote')">重新报价</view>
<view v-if="status == 20 && !subStatus" class="common-btn blue-btn ml-24" @click.stop="handleClick('sign', 'app_evaluate_sign')">客户签约</view>
<view v-if="subStatus == 1" class="common-btn gray-btn ml-24" @click.stop="handleClick('signing')">签约中</view>
<view v-if="subStatus == 1 && status == 20" class="common-btn ml-24" @click.stop="handleClick('withdrawal', 'app_evaluate_withdrawal')">撤回合同</view>
<view v-if="subStatus == 2 || subStatus == 3" class="common-btn gray-btn ml-24" @click.stop="handleClick('paying')">支付中</view>
<view v-if="status == 30 && !subStatus" class="common-btn ml-24" @click.stop="handleClick('cancelSign', 'app_evaluate_cancel_sign')">取消签约</view>
<view v-if="status == 31 && !subStatus" class="common-btn blue-btn ml-24" @click.stop="handleClick('signAgreement', 'app_evaluate_cancel_sign')">确认代保管</view>
......
......@@ -11,6 +11,9 @@
<view v-if="field.isScan" class="flex align-center scanBtn justify-center" @click.stop="scan('vinOcr')">
<view class="sprite-icon icon-scanIconX"></view>
</view>
<view v-if="field.isLocation" class="flex align-center scanBtn justify-center" @click.stop="location">
<view class="sprite-icon icon-location"></view>
</view>
<text v-if="field.isCell" class="ml-12 cellLabel" :class="{ disabled: field.disabled }">{{ field.cell }}</text>
</template>
<template v-if="field.type === 'select'">
......@@ -275,6 +278,9 @@ export default {
scan(type) {
this.$emit('scan', type)
},
location() {
this.$emit('location')
},
previewPdf(field) {
this.$emit('previewPdf', field)
},
......
......@@ -136,6 +136,12 @@ export default {
sourceType: ['camera'],
success: async res => {
console.log('选择图片成功', res)
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePaths[0],
success: function () {
console.log('图片保存成功')
}
})
try {
const MAX_IMAGE_SIZE = 10 * 1024 * 1024 // 10MB
for (const file of res.tempFiles) {
......@@ -218,6 +224,12 @@ export default {
compressed: false,
success: async res => {
console.log('拍摄视频成功', res)
uni.saveVideoToPhotosAlbum({
filePath: res.tempFilePath,
success: function () {
console.log('save success')
}
})
try {
const MAX_VIDEO_SIZE = 100 * 1024 * 1024 // 100MB
if (res.size > MAX_VIDEO_SIZE) {
......
......@@ -83,7 +83,7 @@
</view>
</view>
<view class="fromBox">
<FormCell :formFields="formFields" :formData="formData" @handleCell="handleCell" @previewPdf="previewPdf" @deletePdf="deletePdf" />
<FormCell :formFields="formFields" :formData="formData" @handleCell="handleCell" @previewPdf="previewPdf" @deletePdf="deletePdf" @location="location" />
</view>
</view>
<view class="button-module flex justify-center align-center">
......@@ -171,7 +171,8 @@ export default {
sourceKey: 'uuid',
targetKey: 'handoverAddress',
type: 'input',
maxlength: 43
maxlength: 43,
isLocation: true
},
{
key: 'buyerAgreementUrl',
......@@ -279,10 +280,28 @@ export default {
evalOrderNo: this.query.evalOrderNo
})
if (res.data.code == 0) {
// this.$set(this.formData, 'handoverAddress', res.data.data.evalCarBase.carProvinceName + '-' + res.data.data.evalCarBase.carCityName)
console.log('res.data.data', JSON.parse(res.data.data.custodyContract.electronicContractField))
// this.custodianName = JSON.parse(res.data.data.custodyContract.electronicContractField).custodianName || ''
const data = res.data.data
// 设置交车时间
this.formData.handoverTime = dayjs().format('YYYY-MM-DD HH:mm:00')
// 处理图片回显
if (data.imageListDTO && data.imageListDTO.length > 0) {
// 行驶证图片 (fileSubtype: 21)
const drivingLicenseImages = data.imageListDTO.filter(img => img.fileSubtype === 21).map(img => img.fileUrl)
if (drivingLicenseImages.length > 0) {
this.$set(this.uploadedImages, 'motorRegistrationCertificateUrl', drivingLicenseImages)
this.formData.motorRegistrationCertificateUrl = drivingLicenseImages.join(',')
}
// 登记证图片 (fileSubtype: 22)
const registrationImages = data.imageListDTO.filter(img => img.fileSubtype === 22).map(img => img.fileUrl)
if (registrationImages.length > 0) {
this.$set(this.uploadedImages, 'motorBookUrl', registrationImages)
this.formData.motorBookUrl = registrationImages.join(',')
}
}
// this.evalOrderSimpleDetail = res.data.data
} else {
uni.hideLoading()
......@@ -473,6 +492,12 @@ export default {
sizeType: ['original'],
sourceType: ['camera'],
success: async res => {
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePaths[0],
success: function () {
console.log('图片保存成功')
}
})
try {
const MAX_IMAGE_SIZE = 10 * 1024 * 1024 // 10MB
for (const file of res.tempFiles) {
......@@ -542,6 +567,12 @@ export default {
compressed: false,
success: async res => {
console.log('拍摄视频成功', res)
uni.saveVideoToPhotosAlbum({
filePath: res.tempFilePath,
success: function () {
console.log('save success')
}
})
try {
const MAX_VIDEO_SIZE = 100 * 1024 * 1024 // 100MB
if (res.size > MAX_VIDEO_SIZE) {
......@@ -679,6 +710,22 @@ export default {
console.log(successDate)
this.$set(this.formData, 'handoverTime', successDate)
this.show = false
},
location() {
const that = this
uni.showLoading({ title: '定位中...' })
uni.getLocation({
type: 'gcj02',
geocode: true,
success: function (res) {
uni.hideLoading()
that.$set(that.formData, 'handoverAddress', res.address.province + res.address.city)
},
fail: function (err) {
uni.hideLoading()
uni.showToast({ title: '定位失败', icon: 'none' })
}
})
}
},
watch: {},
......
......@@ -153,6 +153,7 @@
</view>
</template>
</GeneralPopup>
<NoticePopup ref="notice" title="重要提示" text="确定要撤回合同吗?" type="warning"></NoticePopup>
<OrderPopup ref="orderPopup" :data="custodyAgreementObj" :isDefeatOrder="true" :externalData="[]" @onConfirm="onConfirm" :popupType="14" idKey="id" />
</view>
</template>
......@@ -165,7 +166,7 @@ import EvaluationCard from './components/evaluationCard.vue'
import ZPMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin'
import GeneralPopup from './components/GeneralPopup.vue'
import OrderPopup from '@/components/OrderPopup/index.vue'
import { set } from 'lodash'
import NoticePopup from '@/components/NoticePopup.vue'
export default {
name: 'EvaluationFormList',
mixins: [ZPMixin],
......@@ -175,7 +176,8 @@ export default {
TypeTabComponent,
EvaluationCard,
GeneralPopup,
OrderPopup
OrderPopup,
NoticePopup
},
data() {
return {
......@@ -391,8 +393,55 @@ export default {
this.reSubmit(e)
} else if (e.type === 'signAgreement') {
this.signAgreement(e)
} else if (e.type === 'withdrawal') {
this.withdrawal(e)
}
},
async withdrawal(e) {
this.$refs.notice.buttonsList = [
{
text: '取消',
type: 'default',
callback: () => {
this.$refs.notice.close()
}
},
{
text: '确定',
type: 'primary',
callback: async () => {
uni.showLoading()
const res = await uni.$api.evaluationApi.revokeSaleContract({
saleContractNo: e.saleContractNo
})
console.log('res:', res)
if (res.data.code == 0) {
this.$refs.notice.close()
uni.hideLoading()
uni.showToast({
title: '撤回合同成功',
icon: 'none'
})
setTimeout(() => {
this.currentPage = 1
this.search()
}, 1000)
} else {
this.$refs.notice.close()
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
}
}
]
// 打开弹窗
this.$refs.notice.open()
},
async reSubmit(e) {
uni.showLoading()
const res = await uni.$api.evaluationApi.evalOrderConfirmVehicleDelivery({
......@@ -734,11 +783,13 @@ export default {
border-radius: toRpx(42);
background: rgb(255, 255, 255) !important;
.tipsPopupBg {
border-radius: toRpx(42) toRpx(42) 0 0;
width: 100%;
height: toRpx(244);
}
.title {
color: #333333;
font-size: toRpx(40);
......@@ -746,6 +797,7 @@ export default {
text-align: center;
margin-top: toRpx(48);
}
.tipsConent {
color: #666666;
font-size: toRpx(32);
......@@ -753,14 +805,17 @@ export default {
padding: toRpx(16) toRpx(64);
line-height: toRpx(48);
text-align: center;
text {
color: #347bff;
}
}
.footer-box {
height: toRpx(154);
}
}
.evaluation-form-list {
position: relative;
width: 100vw;
......@@ -775,6 +830,7 @@ export default {
height: 100%;
box-sizing: border-box;
overflow: hidden;
.box-class {
height: calc(100% - #{toRpx(110)});
background: #ffffff59;
......@@ -782,24 +838,29 @@ export default {
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border-radius: toRpx(48);
overflow: hidden;
.paging-class {
background-color: #fff;
height: calc(100% - #{toRpx(96)});
box-sizing: border-box;
border-radius: toRpx(32);
}
.no-br {
border-radius: 0 toRpx(32) toRpx(32) toRpx(32);
}
.no-br1 {
border-radius: toRpx(32) 0 toRpx(32) toRpx(32);
}
.mask-box {
height: calc(100% - #{toRpx(96)});
width: 100%;
background: #fff;
border-radius: toRpx(48);
color: #808291;
.noDataImg {
width: toRpx(480);
height: toRpx(240);
......@@ -807,9 +868,11 @@ export default {
}
}
}
.signAgreement-content {
width: 100%;
height: 100%;
.signAgreement-label {
color: #999999;
font-size: toRpx(28);
......@@ -817,12 +880,14 @@ export default {
display: flex;
align-items: flex-start;
}
.requiredLabel {
color: #f24724;
font-size: toRpx(28);
font-weight: 400;
margin-left: toRpx(8);
}
.from-value {
display: flex;
justify-content: space-between;
......@@ -832,16 +897,19 @@ export default {
background: #f4f5f7;
padding: toRpx(28) toRpx(24);
flex: 1;
.sprite-icon {
margin-bottom: toRpx(2);
}
}
.btn {
color: #3b73ff;
font-size: toRpx(28);
font-weight: 400;
margin-left: toRpx(24);
}
.placeholder {
color: #999;
font-size: toRpx(28);
......@@ -861,6 +929,7 @@ export default {
.requote-content {
width: 100%;
height: 100%;
.requote-label {
color: #333333;
font-size: toRpx(32);
......@@ -868,12 +937,14 @@ export default {
display: flex;
align-items: flex-start;
}
.requiredLabel {
color: #f24724;
font-size: toRpx(28);
font-weight: 400;
margin-left: toRpx(8);
}
::v-deep .intention-input {
height: toRpx(96);
border-radius: toRpx(16);
......@@ -882,11 +953,13 @@ export default {
background: #f4f5f7;
padding: toRpx(24);
box-sizing: border-box;
.uni-input-placeholder {
margin-left: toRpx(24);
}
}
}
.intention-input-cell {
height: toRpx(96);
border-radius: toRpx(16);
......@@ -894,6 +967,7 @@ export default {
padding: toRpx(24);
box-sizing: border-box;
}
::v-deep .feedback-textarea {
height: toRpx(288);
border-radius: toRpx(16);
......@@ -901,6 +975,7 @@ export default {
width: 100%;
padding: toRpx(24);
box-sizing: border-box;
.uni-input-wrapper {
background: #f4f5f7;
}
......@@ -915,6 +990,7 @@ export default {
background: #f1f7fe;
padding-left: toRpx(32);
box-sizing: border-box;
.amount-title {
color: #333333;
font-size: toRpx(32);
......@@ -922,12 +998,14 @@ export default {
margin-right: toRpx(16);
width: toRpx(168);
}
.amount-value {
color: #3b73ff;
font-size: toRpx(36);
font-weight: 700;
}
}
.popup-cell-title {
color: #999;
font-size: toRpx(28);
......@@ -935,14 +1013,17 @@ export default {
margin-right: toRpx(16);
width: toRpx(168);
}
.popup-cell-value {
color: #222;
font-size: toRpx(28);
font-weight: 400;
}
.light-title {
color: #333333;
}
.light-value {
color: #4673ff;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!