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