Commit aeb3d648 by 李伟康

feat(components): 添加车架号复核弹窗组件并优化样式单位转换

- 新增 `EquityVinCheck.vue` 组件,用于车架号校验提示与输入
- 在 `CreateEquity.vue` 中引入并注册新组件(暂未启用)
- 统一将多个组件中的 rpx 单位通过 `toRpx()` 函数进行规范化处理
- 为 CarBrand 组件添加展开收起图标,并限制点击行为
- 调整部分样式细节以提升视觉一致性与用户体验
1 parent 679cedec
...@@ -29,9 +29,15 @@ ...@@ -29,9 +29,15 @@
:class="['sub-brand-name']" :class="['sub-brand-name']"
> >
<view <view
class="subtitle subtitle-one" class="subtitle subtitle-one flex"
@click.stop="chooseSubBrand(j, c , jindex, cindex, index)" @click.stop="chooseSubBrand(j, c , jindex, cindex, index)"
> {{j.name}}</view> >
{{j.name}}
<uni-icons
:type="`${j.children && j.children.length?'down':'right'}`"
size="18"
></uni-icons>
</view>
</view> </view>
<template v-for="(k,kindex) in j.children"> <template v-for="(k,kindex) in j.children">
...@@ -40,9 +46,15 @@ ...@@ -40,9 +46,15 @@
:key="`${k.id}_${kindex}`" :key="`${k.id}_${kindex}`"
> >
<view <view
class="subtitle subtitle-two" class="subtitle subtitle-two flex"
@click.stop="chooseSeries(k,jindex, cindex, index ,kindex)" @click.stop="chooseSeries(k,jindex, cindex, index ,kindex)"
>{{k.name}}</view> >
{{k.name}}
<uni-icons
:type="`${k.children && k.children.length?'down':'right'}`"
size="18"
></uni-icons>
</view>
<template v-for="(s,sindex) in k.children"> <template v-for="(s,sindex) in k.children">
<view <view
:class="['item flex',{active: checkActive(s)}]" :class="['item flex',{active: checkActive(s)}]"
...@@ -184,6 +196,7 @@ export default { ...@@ -184,6 +196,7 @@ export default {
this.viewKey = Date.now() this.viewKey = Date.now()
}, },
async chooseSeries (k, jindex, cindex, index, kindex) { async chooseSeries (k, jindex, cindex, index, kindex) {
if (k.children && k.children.length) return
uni.showLoading({ uni.showLoading({
mask: true mask: true
}) })
...@@ -260,6 +273,7 @@ export default { ...@@ -260,6 +273,7 @@ export default {
line-height: toRpx(40); line-height: toRpx(40);
width: 100%; width: 100%;
flex-shrink: 0; flex-shrink: 0;
border-bottom: toRpx(2) solid #888;
} }
} }
} }
...@@ -275,11 +289,11 @@ export default { ...@@ -275,11 +289,11 @@ export default {
flex-shrink: 0; flex-shrink: 0;
} }
.subtitle-one { .subtitle-one {
margin-bottom: 10rpx; margin: toRpx(10) 0;
} }
.subtitle-two { .subtitle-two {
color: #000; color: #000;
font-size: 36rpx; font-size: toRpx(36);
font-weight: 500; font-weight: 500;
} }
.sub-item { .sub-item {
...@@ -291,7 +305,7 @@ export default { ...@@ -291,7 +305,7 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: toRpx(32); gap: toRpx(32);
margin-bottom: 20rpx; margin-top: toRpx(20);
align-items: stretch; align-items: stretch;
} }
.item { .item {
...@@ -304,7 +318,7 @@ export default { ...@@ -304,7 +318,7 @@ export default {
position: relative; position: relative;
color: #333333; color: #333333;
font-size: toRpx(32); font-size: toRpx(32);
padding: 10rpx; padding: toRpx(10);
.sprite-icon { .sprite-icon {
display: none; display: none;
position: absolute; position: absolute;
...@@ -324,6 +338,6 @@ export default { ...@@ -324,6 +338,6 @@ export default {
} }
.block { .block {
width: 100%; width: 100%;
height: 24rpx; height: toRpx(24);
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -282,17 +282,17 @@ export default { ...@@ -282,17 +282,17 @@ export default {
.step-box { .step-box {
height: toRpx(64); height: toRpx(64);
justify-content: center; justify-content: center;
gap: 0 96rpx; gap: 0 toRpx(96);
position: relative; position: relative;
margin-bottom: 16rpx; margin-bottom: toRpx(16);
.step { .step {
height: 64rpx; height: toRpx(64);
border-radius: 12rpx; border-radius: toRpx(12);
background: #f2f2f2; background: #f2f2f2;
justify-content: center; justify-content: center;
padding: 0 32rpx; padding: 0 toRpx(32);
color: #666666; color: #666666;
font-size: 28rpx; font-size: toRpx(28);
} }
.step-active { .step-active {
background: #dee7ff; background: #dee7ff;
...@@ -304,8 +304,8 @@ export default { ...@@ -304,8 +304,8 @@ export default {
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
content: ''; content: '';
width: 16rpx; width: toRpx(16);
height: 2rpx; height: toRpx(2);
background: #cccccc; background: #cccccc;
} }
} }
......
...@@ -96,6 +96,7 @@ ...@@ -96,6 +96,7 @@
:type="noticeObj.type || 'success'" :type="noticeObj.type || 'success'"
:buttons="noticeObj.buttons" :buttons="noticeObj.buttons"
></NoticePopup> ></NoticePopup>
<EquityVinCheck ref="vinCheckRef" />
</view> </view>
</template> </template>
...@@ -121,6 +122,8 @@ import EquityUpload from './EquityForm/EquityUpload.vue' ...@@ -121,6 +122,8 @@ import EquityUpload from './EquityForm/EquityUpload.vue'
import EquityConversion from './EquityForm/EquityConversion.vue' import EquityConversion from './EquityForm/EquityConversion.vue'
import NP from 'number-precision' import NP from 'number-precision'
import NoticePopup from '@/components/NoticePopup.vue' import NoticePopup from '@/components/NoticePopup.vue'
import EquityVinCheck from './EquityForm/EquityVinCheck.vue'
const codeToAttr = { const codeToAttr = {
YB0001: 'invoice', YB0001: 'invoice',
YB0003: 'driveFront', YB0003: 'driveFront',
...@@ -159,7 +162,8 @@ export default { ...@@ -159,7 +162,8 @@ export default {
EquityTire, EquityTire,
EquityUpload, EquityUpload,
EquityConversion, EquityConversion,
NoticePopup NoticePopup,
EquityVinCheck
}, },
props: { props: {
transmissionOfData: { transmissionOfData: {
...@@ -199,6 +203,7 @@ export default { ...@@ -199,6 +203,7 @@ export default {
} }
}, },
mounted () { mounted () {
// this.$refs.vinCheckRef.open()
}, },
methods: { methods: {
......
...@@ -160,30 +160,30 @@ export default { ...@@ -160,30 +160,30 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
.upload-content { .upload-content {
padding: 32rpx 32rpx 0; padding: toRpx(32) toRpx(32) 0;
.upload-box { .upload-box {
display: flex; display: flex;
margin-bottom: 32rpx; margin-bottom: toRpx(32);
.label { .label {
width: 168rpx; width: toRpx(168);
flex-shrink: 0; flex-shrink: 0;
margin-right: 32rpx; margin-right: toRpx(32);
} }
.value { .value {
gap: 16rpx; gap: toRpx(16);
flex-wrap: wrap; flex-wrap: wrap;
} }
.upload-item { .upload-item {
width: 192rpx; width: toRpx(192);
height: 192rpx; height: toRpx(192);
border-radius: 12rpx; border-radius: toRpx(12);
background: #f5f8ff; background: #f5f8ff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #999999; color: #999999;
font-size: 20rpx; font-size: toRpx(20);
position: relative; position: relative;
.del { .del {
position: absolute; position: absolute;
......
...@@ -280,44 +280,44 @@ export default { ...@@ -280,44 +280,44 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
.equity-goods-box { .equity-goods-box {
padding: 0 32rpx; padding: 0 toRpx(32);
.goods-item { .goods-item {
margin-bottom: 8rpx; margin-bottom: toRpx(8);
.goods-head { .goods-head {
padding: 16rpx 0; padding: toRpx(16) 0;
.goods-name { .goods-name {
color: #333333; color: #333333;
font-size: 28rpx; font-size: toRpx(28);
line-height: 40rpx; line-height: toRpx(40);
} }
.goods-pervice { .goods-pervice {
color: #999999; color: #999999;
font-size: 26rpx; font-size: toRpx(26);
line-height: 36rpx; line-height: toRpx(36);
} }
} }
.goods-list { .goods-list {
background: #f5f7fa; background: #f5f7fa;
border-radius: 16rpx; border-radius: toRpx(16);
} }
} }
.displacement-power { .displacement-power {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 0 32rpx; padding: 0 toRpx(32);
.switch-box { .switch-box {
width: 208rpx; width: toRpx(208);
height: 52rpx; height: toRpx(52);
border-radius: 64rpx; border-radius: toRpx(64);
background: #ffffff; background: #ffffff;
box-sizing: border-box; box-sizing: border-box;
padding: 0 4rpx; padding: 0 toRpx(4);
.switch-item { .switch-item {
width: 50%; width: 50%;
height: 44rpx; height: toRpx(44);
border-radius: 40rpx; border-radius: toRpx(40);
color: #333333; color: #333333;
font-size: 26rpx; font-size: toRpx(26);
justify-content: center; justify-content: center;
transition: all 0.15s; transition: all 0.15s;
} }
...@@ -330,12 +330,12 @@ export default { ...@@ -330,12 +330,12 @@ export default {
.warranty { .warranty {
margin-left: auto; margin-left: auto;
&-input { &-input {
width: 84rpx; width: toRpx(84);
font-size: 28rpx; font-size: toRpx(28);
margin-left: 16rpx; margin-left: toRpx(16);
} }
&-suffix { &-suffix {
margin-left: 16rpx; margin-left: toRpx(16);
} }
.placeholder { .placeholder {
color: #999999; color: #999999;
......
...@@ -96,21 +96,21 @@ export default { ...@@ -96,21 +96,21 @@ export default {
.tire-box { .tire-box {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
padding: 0 32rpx; padding: 0 toRpx(32);
gap: 16rpx 32rpx; gap: toRpx(16) toRpx(32);
.tire-item { .tire-item {
.label { .label {
height: 68rpx; height: toRpx(68);
color: #999999; color: #999999;
font-size: 26rpx; font-size: toRpx(26);
.tips { .tips {
color: #4673ff; color: #4673ff;
font-size: 24rpx; font-size: toRpx(24);
margin-left: 8rpx; margin-left: toRpx(8);
} }
} }
.content { .content {
border-radius: 16rpx; border-radius: toRpx(16);
} }
} }
} }
......
...@@ -274,30 +274,30 @@ export default { ...@@ -274,30 +274,30 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
.upload-content { .upload-content {
padding: 0 32rpx; padding: 0 toRpx(32);
.upload-box { .upload-box {
display: flex; display: flex;
margin-bottom: 32rpx; margin-bottom: toRpx(32);
.label { .label {
width: 168rpx; width: toRpx(168);
flex-shrink: 0; flex-shrink: 0;
margin-right: 32rpx; margin-right: toRpx(32);
} }
.value { .value {
gap: 16rpx; gap: toRpx(16);
flex-wrap: wrap; flex-wrap: wrap;
} }
.upload-item { .upload-item {
width: 192rpx; width: toRpx(192);
height: 192rpx; height: toRpx(192);
border-radius: 12rpx; border-radius: toRpx(12);
background: #f5f8ff; background: #f5f8ff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #999999; color: #999999;
font-size: 20rpx; font-size: toRpx(20);
position: relative; position: relative;
.del { .del {
position: absolute; position: absolute;
......
<template>
<uni-popup
ref="centerPopupRef"
type="center"
:is-mask-click="false"
animation
class="center-popup"
>
<view class="box">
<view class="title flex">
<view class="text">车架号复核</view>
<view
class="icon-close-box flex"
@click="close"
>
<uni-icons
class="icon-close"
type="closeempty"
:size="20"
color="#1A1A1A"
></uni-icons>
</view>
</view>
<view class="content flex">
<view class="tips">请核对车架号是否正确,如信息有误后期将无法申请补偿服务!</view>
<view class="input-box flex">
<view class="input">
<view class="label">车架号</view>
<input type="text" maxlength="17" v-model="obj.vin" />
</view>
<view class="edit"></view>
</view>
<view class="footer-box">
</view>
</view>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'CenterPopup',
props: {
list: Array,
title: String,
tag: String,
id: [Number, String],
isLine: Boolean
},
data () {
return {
}
},
mounted () {
},
methods: {
open () {
this.$refs.centerPopupRef.open();
},
close () {
this.$refs.centerPopupRef.close();
this.$emit('cancel')
},
choose: uni.$throttle(function (index) {
this.$emit('choose', index)
this.$refs.centerPopupRef.close();
}, 200)
}
}
</script>
<style scoped lang='scss'>
.center-popup {
z-index: 99 !important;
}
.box {
width: 848rpx;
height: 608rpx;
border-radius: 32rpx;
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%);
.title {
width: 100%;
height: toRpx(160);
// background: url('@/assets/images/boutique/customer-type-bg.webp') no-repeat;
background-size: 100% 100%;
position: relative;
.text {
font-weight: 500;
font-size: toRpx(40);
color: #1a1a1a;
position: absolute;
left: 64rpx;
top: 50%;
transform: translateY(-50%);
}
.icon-close-box {
height: 100%;
margin-left: auto;
padding: 0 toRpx(48);
font-weight: 700;
}
}
.content {
padding: 0 toRpx(64);
width: 100%;
.tips {
color: #666666;
font-size: 32rpx;
line-height: 48rpx;
}
.input-box {
margin: 48rpx 0 16rpx;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!