Commit 825abd7a by cen

fix: 兼容问题

1 parent d4f1d3f2

50.8 KB | W: | H:

23.1 KB | W: | H:

assets/images/common/sign-no-data.png
assets/images/common/sign-no-data.png
assets/images/common/sign-no-data.png
assets/images/common/sign-no-data.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -55,7 +55,8 @@
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"targetSdkVersion" : 30
"targetSdkVersion" : 30,
"minSdkVersion" : 21
},
/* ios打包配置 */
"ios" : {
......
......@@ -16,6 +16,7 @@
</template>
<script>
import { throttle } from 'lodash'
export default {
name: 'ButtonModule',
props: {
......@@ -38,7 +39,7 @@ export default {
}
},
methods: {
handleClick(buttonType, eventCode) {
handleClick: throttle(function (buttonType, eventCode) {
this.$emit('button-click', {
type: buttonType
})
......@@ -46,7 +47,7 @@ export default {
uni.$track.add({
eventCode
}) //点击埋点
}
}, 1000)
}
}
</script>
......
......@@ -6,8 +6,8 @@
<text class="requiredLabel" v-if="field.required">*</text>
</view>
<template v-if="field.type === 'input'" class="flex align-center">
<input class="formInput" :class="field.disabled ? 'formInputDisabled' : ''" :min="field.min" :max="field.max" v-if="field.targetObj" :type="field.inputType || 'text'" :disabled="field.disabled" :placeholder="field.placeholder || '请输入'" :maxlength="field.maxlength || 100" v-model="formData[field.targetObj][field.targetKey]" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" @blur="e => handleBlur(e, field)" />
<input class="formInput" :class="field.disabled ? 'formInputDisabled' : ''" :min="field.min" :max="field.max" v-else type="text" :type="field.inputType || 'text'" :disabled="field.disabled" :placeholder="field.placeholder || '请输入'" v-model="formData[field.targetKey]" :maxlength="field.maxlength || 100" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" @blur="e => handleBlur(e, field)" />
<input class="formInput" :class="{ formInputDisabled: field.disabled, autolabel: field.placeholder == '自动计算' }" :min="field.min" :max="field.max" v-if="field.targetObj" :type="field.inputType || 'text'" :disabled="field.disabled" :placeholder="field.placeholder || '请输入'" :maxlength="field.maxlength || 100" v-model="formData[field.targetObj][field.targetKey]" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" @blur="e => handleBlur(e, field)" />
<input class="formInput" :class="{ formInputDisabled: field.disabled, autolabel: field.placeholder == '自动计算' }" :min="field.min" :max="field.max" v-else type="text" :type="field.inputType || 'text'" :disabled="field.disabled" :placeholder="field.placeholder || '请输入'" v-model="formData[field.targetKey]" :maxlength="field.maxlength || 100" :pattern="field.pattern || ''" @input="e => handleInput(e, field)" @blur="e => handleBlur(e, field)" />
<view v-if="field.isScan" class="flex align-center scanBtn justify-center" @click.stop="scan('vinOcr')">
<view class="sprite-icon icon-scanIconX"></view>
</view>
......@@ -345,6 +345,9 @@ export default {
.formInputDisabled {
color: #999999;
}
.autolabel {
color: #cccccc;
}
.cellLabel {
color: #333333;
font-size: toRpx(28);
......
......@@ -6,7 +6,7 @@
<slot name="header">
<view class="popup-top-box flex align-center" v-if="showTitle">
<text class="popup-top-box-title">{{ title }}</text>
<text style="font-size: 0;">{{ otherText }}</text>
<text style="font-size: 0">{{ otherText }}</text>
<view @click.stop="closePopup">
<view class="sprite-icon icon-evaluationClose"></view>
</view>
......@@ -98,12 +98,8 @@ export default {
return new Promise((resolve, reject) => {
this.resolve = resolve
this.reject = reject
this.$nextTick(() => {
console.log(this.$refs.publishPopup)
if (this.$refs.publishPopup) {
this.$refs.publishPopup.open()
}
})
this.$refs.publishPopup.open()
})
},
change(e) {
......@@ -117,7 +113,6 @@ export default {
this.$emit('close')
},
confirm() {
console.log('confirm', this.autoClose)
if (this.resolve) {
if (this.autoClose) {
this.$refs.publishPopup.close()
......
......@@ -94,7 +94,7 @@
</view>
</view>
</view>
<GeneralPopup ref="addAgreementPopup" popupClass="addAgreementPopup" type="center" :otherText="formData.supplementaryClauseText" title="补充协议条款">
<GeneralPopup ref="addAgreementPopup" popupClass="addAgreementPopup" type="center" :otherText="formData.supplementaryClauseText" title="补充协议条款" :autoClose="false" @confirm="confirmAddAgreement">
<template v-slot:content>
<textarea placeholder="请输入 (200字以内)" v-model="formData.supplementaryClauseText" maxlength="200" />
</template>
......@@ -292,64 +292,45 @@ export default {
}
},
confirmAddAgreement() {
uni.showLoading()
uni.$api.evaluationApi
.salesAgreementPreview({
evalOrderNo: this.query.evalOrderNo,
supplementaryClauseText: this.formData.supplementaryClauseText
})
.then(res => {
if (res.data.code == 0) {
uni.hideLoading()
this.$refs.addAgreementPopup.closePopup()
this.formFields.forEach(item => {
if (item.key === this.currentField.key) {
item.isShowPreview = true
}
})
this.pdfUrl = res.data.data.fileDownloadUrl
console.log('this.pdfUrl', this.pdfUrl)
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
if (this.formData.supplementaryClauseText) {
uni.showLoading()
uni.$api.evaluationApi
.salesAgreementPreview({
evalOrderNo: this.query.evalOrderNo,
supplementaryClauseText: this.formData.supplementaryClauseText
})
.then(res => {
if (res.data.code == 0) {
uni.hideLoading()
this.$refs.addAgreementPopup.closePopup()
this.formFields.forEach(item => {
if (item.key === this.currentField.key) {
item.isShowPreview = true
}
})
this.pdfUrl = res.data.data.fileDownloadUrl
console.log('this.pdfUrl', this.pdfUrl)
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
} else {
uni.showToast({
title: '请填写补充条款',
icon: 'none'
})
}
},
handleCell(field) {
const that = this
console.log('handleCell', field)
that.currentField = field
if (field.type === 'pdf') {
this.$refs.addAgreementPopup.open().then(() => {
uni.showLoading()
uni.$api.evaluationApi
.salesAgreementPreview({
evalOrderNo: this.query.evalOrderNo,
supplementaryClauseText: this.formData.supplementaryClauseText
})
.then(res => {
if (res.data.code == 0) {
uni.hideLoading()
this.$refs.addAgreementPopup.closePopup()
this.formFields.forEach(item => {
if (item.key === field.key) {
item.isShowPreview = true
}
})
this.pdfUrl = res.data.data.fileDownloadUrl
console.log('this.pdfUrl', this.pdfUrl)
} else {
uni.hideLoading()
uni.showToast({
title: res.data.msg || '请求失败',
icon: 'none'
})
}
})
})
this.$refs.addAgreementPopup.open()
} else if (field.type === 'calendar') {
that.show = true
}
......@@ -373,6 +354,11 @@ export default {
uni.showToast({ title: '请输入其他图片', icon: 'none' })
return
}
console.log('this.formData', this.getImages({ key: 'handoverPhotoFrontFourFive' }, 'confirm'))
if (!this.getImages({ key: 'handoverPhotoFrontFourFive' }, 'confirm') || this.getImages({ key: 'handoverPhotoFrontFourFive' }, 'confirm').length == 0) {
uni.showToast({ title: '请上传正面45度图片', icon: 'none' })
return
}
const requiredUploadFields = this.uploadFields.filter(field => field.required)
......
......@@ -35,7 +35,7 @@
<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="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-start', { 'full-width': item.fullWidth }]">
<view class="title-label-see mr-16">{{ item.label }}</view>
<view class="flex-1 break-word">
{{ formatValue(item, detailsInfo) }}
......@@ -44,9 +44,9 @@
</view>
</view>
<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-start', { 'full-width': item.fullWidth }]">
<view class="title-label-see mr-16">{{ item.label }}</view>
<view class="flex-1">{{ formatValue(item, detailsInfo) }}</view>
<view class="flex-1 break-word">{{ formatValue(item, detailsInfo) }}</view>
</view>
</view>
<view v-else-if="activeTabKey == 'images'">
......@@ -54,16 +54,18 @@
<view class="tab-panel-title">车辆图片</view>
<view class="upload-grid">
<!-- 车辆外观图片 -->
<view class="flex upload-item-container" v-for="field in uploadFields" :key="field.key">
<view class="upload-label" v-if="getImageBySubtype(field.key)">
{{ field.label }}
</view>
<view class="upload-images-wrapper" v-if="getImageBySubtype(field.key)">
<view class="uploaded-media-container">
<image :src="getImageBySubtype(field.key).fileUrl" mode="aspectFill" class="uploaded-media" @click.stop="previewMedia(getImageBySubtype(field.key).fileUrl, 1)"></image>
<template v-for="field in uploadFields">
<view v-if="getImageBySubtype(field.key)" class="flex upload-item-container" :key="field.key">
<view class="upload-label">
{{ field.label }}
</view>
<view class="upload-images-wrapper" v-if="getImageBySubtype(field.key)">
<view class="uploaded-media-container">
<image :src="getImageBySubtype(field.key).fileUrl" mode="aspectFill" class="uploaded-media" @click.stop="previewMedia(getImageBySubtype(field.key).fileUrl, 1)"></image>
</view>
</view>
</view>
</view>
</template>
</view>
</view>
......@@ -145,7 +147,7 @@
<view class="gridBox mb-48 padBox">
<view v-for="(item, index) in priceItems" :key="index" :class="['flex align-center', { 'full-width': item.fullWidth }]">
<view class="title-label-see mr-16">{{ item.label }}</view>
<view class="flex-1">{{ detailsInfo.priceHistory[indexContent][item.key] || '-' }} {{ item.cell || '' }}</view>
<view class="flex-1 break-word">{{ detailsInfo.priceHistory[indexContent][item.key] || '-' }} {{ item.cell || '' }}</view>
</view>
</view>
</template>
......@@ -256,7 +258,7 @@
</view>
</view>
</view>
<view class="mb-32 upload-box">
<view class="mb-32 upload-box" v-if="hasCarHandoverInfoImage">
<view class="tab-panel-title">车辆图片</view>
<view class="gridBoxNoPadding">
<template v-for="(item, index) in uploadFieldsItems">
......@@ -288,9 +290,10 @@
<view class="gridBoxNoPadding">
<template v-for="(item, index) in documentationItems">
<view v-if="formatValue(item, detailsInfo)" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]">
<view class="title-label-see mr-16">{{ item.label }}</view>
<view class="title-label-see mr-16">{{ item.label == '自定义字段名称' ? detailsInfo.carHandoverInfo.otherText || '自定义字段名称' : item.label }}</view>
<view v-if="item.type == 'image'">
<image :src="formatValue(item, detailsInfo)" @click.stop="previewMedia(formatValue(item, detailsInfo), 1)"></image>
<image v-if="formatValue(item, detailsInfo).includes('mp4')" :src="formatValue(item, detailsInfo) + videoProcess" @click.stop="previewMedia(formatValue(item, detailsInfo), 2)"></image>
<image v-else :src="formatValue(item, detailsInfo)" @click.stop="previewMedia(formatValue(item, detailsInfo), 1)"></image>
</view>
<view v-else-if="item.type == 'link'" class="flex-1">
<view class="pdf-box flex align-center justify-between">
......@@ -568,7 +571,7 @@ export default {
{ label: '车钥匙', key: 'carHandoverInfo.carKeyUrl', type: 'image' },
{ label: '过户授权委托书', key: 'carHandoverInfo.transferPhotoUrl', type: 'image' },
{ label: '保险单商业保险单或卡', key: 'carHandoverInfo.insuranceCardUrl', type: 'image' },
{ label: '自定义字段名称', key: 'carHandoverInfo.centerConsole', type: 'image' }
{ label: '自定义字段名称', key: 'carHandoverInfo.otherUrl', type: 'image' }
],
uploadFields: [
{
......@@ -617,9 +620,14 @@ export default {
hasCertificateImage() {
return this.uploadCertificateFields.some(field => {
const image = this.getImageBySubtype(field.key)
console.log('image', image)
return image && (Array.isArray(image) ? image.length > 0 : image.fileUrl)
})
},
hasCarHandoverInfoImage() {
return this.uploadFieldsItems.some(field => {
const image = this.formatValue(field, this.detailsInfo)
return image && (Array.isArray(image) ? image.length > 0 : image)
})
}
},
mounted() {},
......@@ -724,9 +732,6 @@ export default {
return obj
},
getImageByKey(subtype) {
if (subtype === 41 || subtype === 22) {
return this.detailsInfo.images.filter(img => img.fileSubtype === subtype)
}
const obj = this.detailsInfo.images.find(img => img.fileSubtype === subtype) || null
return obj
},
......
......@@ -602,7 +602,7 @@ export default {
})
.catch(() => {
this.cancelSignObj.cancelReason = ''
this.$refs.cancleSignPopup.closePopup()
// this.$refs.cancleSignPopup.closePopup()
})
},
cancelSign(e) {
......
......@@ -628,6 +628,7 @@ export default {
targetObj: '',
disabled: true,
type: 'input',
placeholder: '自动计算',
cell: '元',
isCell: true,
pattern: '^\\d*$' // 只允许数字输入
......@@ -1257,7 +1258,7 @@ export default {
background: #ffffff;
.no-data-bg {
width: toRpx(344);
height: toRpx(208);
height: toRpx(236);
}
color: #999999;
font-size: toRpx(24);
......@@ -1394,7 +1395,7 @@ export default {
}
}
.no-footerBtn {
height: calc(100% - #{toRpx(264)});
height: calc(100% - #{toRpx(234)});
}
.footerBtn {
position: absolute;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!