Commit 2ca7468d by 张立顺

拉取代码

1 parent fdb875c2
<popup <popup title="选择客户" show="{{show}}" bindconfirm="confirm" height="90%">
title="选择客户" <view class="car-brands-box">
show="{{show}}" <search-input bindsearch="searchCar" />
bindconfirm="confirm" <view class="car-brands">
height="90%"> <view class="label title y-center">
<view class="car-brands-box"> <span class="labelName">姓名</span>
<search-input bindsearch="searchCar" /> <span class="labelPhone">| 手机号</span>
<view class="car-brands"> </view>
<view class="label title y-center"> <scroll-view style="height: calc(100% - 44px)" scroll-y scroll-into-view="{{letter}}">
<span class="labelName">姓名</span> <block wx:if="{{customerList.length > 0}}">
<span class="labelPhone">| 手机号</span> <view class="box">
</view> <block wx:for="{{customerList}}" wx:for-item="item" wx:key="ind" wx:for-index="ind">
<scroll-view style="height: calc(100% - 44px)" scroll-y scroll-into-view="{{letter}}"> <view class="list y-center child {{item.active?'active':''}}" data-item="{{item}}" data-index="{{ind}}" catchtap="choose">
<block wx:if="{{customerList.length > 0}}"> <span class="name text-hide">{{item.customer.customerName}}</span>
<!-- <block wx:for="{{customerList}}" wx:key="index"> --> <span class="carType " wx:if="{{item.carType.length}}">
<!-- <view> --> <view>(</view>
<!-- <view cla></view> --> <view class="text-hide cartypeLabel">{{item.carType}}</view>
<view class="box"> <view>)</view>
<block </span>
wx:for="{{customerList}}" <span class="phone">{{item.customer.customerPhone}}</span>
wx:for-item="item" <!-- {{c.name}} {{c.active?'active':''}} {{c.isTitle?'title':''}} -->
wx:key="ind" <view class="icon">
wx:for-index="ind"> <image src="../images/choose.png" />
<view </view>
class="list y-center child {{item.active?'active':''}}" </view>
data-item="{{item}}" </block>
data-index="{{ind}}" </view>
catchtap="choose"> </block>
<span class="name text-hide">{{item.customer.customerName}}</span> <block wx:if="{{ brandList.length <= 0}}">
<span class="carType " wx:if="{{item.carType.length}}"> <view class="nothing">暂无数据</view>
<view>(</view> </block>
<view class="text-hide cartypeLabel">{{item.carType}}</view> </scroll-view>
<view>)</view> <view class='tips' hidden='{{!showTip}}'>{{letter}}</view>
</span> </view>
<span class="phone">{{item.customer.customerPhone}}</span>
<!-- {{c.name}} {{c.active?'active':''}} {{c.isTitle?'title':''}} -->
<view class="icon">
<image src="../images/choose.png" />
</view>
</view>
<!-- data-index="{{index}}"
data-ind="{{ind}}"
data-cind="{{cind}}"
data-item="{{i}}"
data-that="{{c}}" -->
<!-- <view
class="brands"
catchtap="showChilds"
data-index='{{index}}'
data-ind='{{ind}}'>
<view class="list y-center">{{i.name}}</view> -->
<!-- <block wx:if="{{i.active}}"> -->
<!-- <block
wx:for='{{i.childs_list}}'
wx:key="cind"
wx:for-item='c'
wx:for-index='cind'>
</block> -->
<!-- </block> -->
<!-- </view> -->
</block>
</view>
<!-- </view> -->
<!-- </block> -->
</block>
<block wx:if="{{ brandList.length <= 0}}">
<view class="nothing">暂无数据</view>
</block>
<!-- merchantId && -->
<!-- <block wx:if="{{!merchantId}}">
<view class="nothing">请先选择流量来源</view>
</block> -->
</scroll-view>
<!-- <view class="side-bar" id="side-bar">
<block wx:for="{{brandList}}" wx:key="index">
<view
data-letter="{{item.letter}}"
class="view {{item.active?'active':''}}"
capture-catch:touchstart="start"
id="letter-{{item.letter}}"
data-index="{{index}}"
capture-catch:touchmove="move"
capture-catch:touchend="end">
{{item.letter}}
</view>
</block>
</view> -->
<!-- 提示 -->
<view class='tips' hidden='{{!showTip}}'>{{letter}}</view>
</view> </view>
</view> </popup>
</popup>
\ No newline at end of file \ No newline at end of file
...@@ -38,7 +38,12 @@ Component({ ...@@ -38,7 +38,12 @@ Component({
], ],
formRule: data.formRule, formRule: data.formRule,
// 品牌车型 // 品牌车型
brandBox: false brandBox: false,
textNameObj: {
confirmName: '下一步(1/4)',
// editName: '修改',
cancelName: '取消'
}
}, },
lifetimes: { lifetimes: {
......
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"gl-form": "../../../../components//GLForm/GLForm" "gl-form": "../../../../components//GLForm/GLForm",
"Gl-Button-Group": "../../../../components/GlButtonGroup/GlButtonGroup"
} }
} }
<!-- packageEquity/pages/carEquity/components/FirstStep/FirstStep.wxml --> <!-- packageEquity/pages/carEquity/components/FirstStep/FirstStep.wxml -->
<view> <view>
<view class="box"> <view class="box">
<view class="title ">车辆信息</view>
<gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{first.carFormList}}" />
</view>
<view class="box">
<view class="title">客户信息</view> <view class="title">客户信息</view>
<gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{first.customerFormList}}" /> <gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{first.customerFormList}}" />
</view> </view>
<button class="btn" bindtap="handleConfirm">下一步(1/2)</button> <view class="box">
<button class="btn draft-btn" bindtap="handleDraft">存草稿</button> <view class="title ">车辆信息</view>
<gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{first.carFormList}}" />
</view>
<Gl-Button-Group bindbtnTap="btnTap" textNameObj="{{textNameObj}}" />
</view> </view>
\ No newline at end of file \ No newline at end of file
// components/CarBrands/CarBrands.js
import api from '../../api/api.js'
let isNum, num, y, time
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function (n) {
let { isFirst } = this.data
if (n && isFirst) {
this.init()
this.setData({
isFirst: false
})
}
}
}
},
/**
* 组件的初始数据
*/
data: {
orderInfo: {},
// storageData: null,
customerList: [],
isFirst: true
},
pageLifetimes: {
show: function () {},
hide: function () {}
},
/**
* 组件的方法列表
*/
methods: {
init(keyword) {
// console.log('getBrandList')
// console.log(storageData)
let params = {
pageSize: 999999,
pageNum: 1,
// upgradeFinishFlag: 'R',
statusList: [1],
// ...data
keyword
}
let customerList = []
api.getWorkList(params).then(res => {
// console.log(res)
// this.setCar(res.data, changeMerchantId)
// console.log(res)
let { data, code } = res
if (code == 0 && data?.list.length) {
data.list = data.list.map(item => {
if (item.customer && item.customer.carSeriesName) {
item.carType = `${item.customer.carBrand || ''}-${item.customer.carChildsBrandName || ''}-${item.customer.carSeriesName || ''}`
}
return item
})
customerList = data.list
}
this.setData({
customerList
})
})
},
searchCar(e) {
let { value } = e.detail
this.init(value)
},
choose(e) {
let { item, index } = e.currentTarget.dataset
console.log(item, index)
let { customerList } = this.data
customerList = customerList.map(item => {
item.active = false
return item
})
customerList[index].active = true
let orderInfo = item
orderInfo.orderSource = 4
// delete orderInfo.orderCode
// 去除掉错误订单对应的关联码
// delete orderInfo.associateOrderCode
// 'orderCode',
let deleteList = ['associateOrderCode', 'merchantDistributionList', 'expenseCategoryList', 'profitAllocatinList']
for (var i = 0; i < deleteList.length; i++) {
// console.log(arr[i])
delete orderInfo[deleteList[i]]
}
this.setData({
customerList,
orderInfo
})
},
confirm() {
let { orderInfo, customerList } = this.data
let flag = customerList.some(item => {
return item.active
})
if (!flag) {
return wx.$util.showToast('请选择客户')
}
this.triggerEvent('confirm', orderInfo)
this.setData({
show: false
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<popup
title="选择客户"
show="{{show}}"
bindconfirm="confirm"
height="90%">
<view class="car-brands-box">
<search-input bindsearch="searchCar" />
<view class="car-brands">
<view class="label title y-center">
<span class="labelName">姓名</span>
<span class="labelPhone">| 手机号</span>
</view>
<scroll-view style="height: calc(100% - 44px)" scroll-y scroll-into-view="{{letter}}">
<block wx:if="{{customerList.length > 0}}">
<!-- <block wx:for="{{customerList}}" wx:key="index"> -->
<!-- <view> -->
<!-- <view cla></view> -->
<view class="box">
<block
wx:for="{{customerList}}"
wx:for-item="item"
wx:key="ind"
wx:for-index="ind">
<view
class="list y-center child {{item.active?'active':''}}"
data-item="{{item}}"
data-index="{{ind}}"
catchtap="choose">
<span class="name text-hide">{{item.customer.customerName}}</span>
<span class="carType " wx:if="{{item.carType.length}}">
<view>(</view>
<view class="text-hide cartypeLabel">{{item.carType}}</view>
<view>)</view>
</span>
<span class="phone">{{item.customer.customerPhone}}</span>
<!-- {{c.name}} {{c.active?'active':''}} {{c.isTitle?'title':''}} -->
<view class="icon">
<image src="../images/choose.png" />
</view>
</view>
<!-- data-index="{{index}}"
data-ind="{{ind}}"
data-cind="{{cind}}"
data-item="{{i}}"
data-that="{{c}}" -->
<!-- <view
class="brands"
catchtap="showChilds"
data-index='{{index}}'
data-ind='{{ind}}'>
<view class="list y-center">{{i.name}}</view> -->
<!-- <block wx:if="{{i.active}}"> -->
<!-- <block
wx:for='{{i.childs_list}}'
wx:key="cind"
wx:for-item='c'
wx:for-index='cind'>
</block> -->
<!-- </block> -->
<!-- </view> -->
</block>
</view>
<!-- </view> -->
<!-- </block> -->
</block>
<block wx:if="{{ brandList.length <= 0}}">
<view class="nothing">暂无数据</view>
</block>
<!-- merchantId && -->
<!-- <block wx:if="{{!merchantId}}">
<view class="nothing">请先选择流量来源</view>
</block> -->
</scroll-view>
<!-- <view class="side-bar" id="side-bar">
<block wx:for="{{brandList}}" wx:key="index">
<view
data-letter="{{item.letter}}"
class="view {{item.active?'active':''}}"
capture-catch:touchstart="start"
id="letter-{{item.letter}}"
data-index="{{index}}"
capture-catch:touchmove="move"
capture-catch:touchend="end">
{{item.letter}}
</view>
</block>
</view> -->
<!-- 提示 -->
<view class='tips' hidden='{{!showTip}}'>{{letter}}</view>
</view>
</view>
</popup>
/* components/CarBrands/CarBrands.wxss */
.car-brands-box {
width: calc(100% + 64rpx);
height: 100%;
margin-left: -32rpx;
}
.car-brands {
height: calc(100% - 104rpx);
position: relative;
/* display: flex; */
}
.label {
padding-left: 32rpx;
line-height: 88rpx;
}
.labelName {
font-size: 16px;
color: #333333;
padding-right: 20rpx;
}
.text-hide {
/* display: inline-block; */
/* width: 200rpx; */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
/* line-height: 37rpx; */
}
.labelPhone {
font-size: 12px;
color: #999999;
}
.y-center {
display: flex;
align-items: center;
}
.list {
box-sizing: border-box;
height: 88rpx;
/* padding-left: 32rpx; */
margin: 0 32rpx 0 92rpx;
font-weight: 700;
border-top: 2rpx solid #EBEDF0;
}
.list .name {
/* flex: 4; */
max-width: 150rpx;
}
.list .carType {
/* flex: 10; */
display: flex;
align-items: center;
margin-left: 15px;
max-width: 300rpx;
}
.cartypeLabel {
flex: 1;
}
.list .phone {
/* flex: 5; */
margin-left: auto;
}
.child {
font-weight: normal;
/* padding-left: 96rpx; */
font-size: 28rpx;
/* color: #888888; */
position: relative;
color: #333333;
}
.child.active {
color: #3582ee;
}
.child.title {
color: #282829;
padding-left: 64rpx;
/* color: #3582ee; */
}
.child .icon {
display: none;
width: 32rpx;
height: 32rpx;
position: absolute;
top: 50%;
left: -46rpx;
transform: translateY(-50%);
}
.child.active .icon {
display: block;
}
@keyframes show-side-bar {
0% {
opacity: 0;
right: -100%;
}
100% {
opacity: 1;
right: 0;
}
}
.tips {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 140rpx;
height: 140rpx;
border-radius: 50%;
color: #fff;
background: rgba(153, 153, 153, 0.7);
z-index: 9999;
font-size: 60rpx;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
}
.nothing {
padding: 100rpx;
text-align: center;
color: #999;
}
\ No newline at end of file \ No newline at end of file
...@@ -2,6 +2,72 @@ ...@@ -2,6 +2,72 @@
import data from '../constant/secondStepData' import data from '../constant/secondStepData'
import fn from '../constant/ruleFn' import fn from '../constant/ruleFn'
const defaultLabelWidth = '140rpx' const defaultLabelWidth = '140rpx'
const optionsSelect = {
companyType: [
{
value: 0,
label: '中国平安'
},
{
value: 1,
label: '太平洋保险'
},
{
value: 2,
label: '中国人保'
}
],
thirdPartType: [
{
value: 1,
label: '100万'
},
{
value: 2,
label: '200万'
},
{
value: 3,
label: '300万'
},
{
value: 4,
label: '400万'
},
{
value: 5,
label: '500万'
}
],
busRideDriverType: [
{
value: 1,
label: '1万'
},
{
value: 3,
label: '3万'
},
{
value: 5,
label: '5万'
}
],
busRideFareType: [
{
value: 1,
label: '1万'
},
{
value: 3,
label: '3万'
},
{
value: 5,
label: '5万'
}
]
}
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -9,7 +75,7 @@ Component({ ...@@ -9,7 +75,7 @@ Component({
properties: { properties: {
serviceInfo: { serviceInfo: {
type: Object, type: Object,
value: () => { } value: () => {}
}, },
// 页面存放表单对象的对象名 // 页面存放表单对象的对象名
dataAttrName: { dataAttrName: {
...@@ -24,13 +90,57 @@ Component({ ...@@ -24,13 +90,57 @@ Component({
data: { data: {
defaultLabelWidth, defaultLabelWidth,
secondObj: data.secondObj, secondObj: data.secondObj,
formRule: data.formRule formRule: data.formRule,
columns: ['杭州', '宁波', '温州', '嘉兴', '湖州'],
textNameObj: {
confirmName: '下一步·生成告知书(2/4)',
// editName: '修改',
cancelName: '取消'
},
activeNames: ['1', '2', '3'],
pickerType: '',
form: {
companyTypeLabel: '太平洋保险', //保险公司类型,0-平安、1-太平洋、2-人保
companyType: '1', //保险公司类型,0-平安、1-太平洋、2-人保
carDamageAmount: '5618.72', //基础车损险,单位分
thirdPartTypeLabel: '300万',
thirdPartType: 3, //第三方责任险方案,1-100万,2-200万,3-300万,4-400万,5-500万
thirdPartAmount: '1109.76', //第三方责任险保费,单位分
busRideDriverTypeLabel: '5万',
busRideDriverType: 5, //车上人员责任险方案(司机),1-1万,3-3万,5-5万
busRideDriverAmount: '76.23', //车上人员责任险保费(司机),单位分
busRideFareTypeLabel: '5万',
busRideFareType: 5, //车上人员责任险方案(乘客),1-1万,3-3万,5-5万
busRideFareAmount: '218', //车上人员责任险保费(乘客),单位分
seatNumber: 4, //座位数
// invoiceAmount: '',//开票金额,单位分
heavyTrafficType: '20万', //交强险方案
heavyTrafficAmount: '950', //交强险保费,单位分
drivingInsuranceType: '30万+3万', //驾乘险方案
drivingInsuranceAmount: '0', //驾乘险保费,单位分
vehiclesShipsType: '2023年', //车船险方案
vehiclesShipsAmount: '330', //车船险保费,单位分
checkbox: true
},
// pattern: /\d{10}/,
// pattern: /^[0-9]{1,7}$/,
pattern: /^([0-9]{1}|^[1-9]{1}\d{1,6})(\.\d{1,2})?$/,
pattern2: /^\S{1,10}$/,
value: '',
// columns: [],
showPicker: false,
optionsSelect: Object.freeze(optionsSelect)
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
onchange() {},
getPageData() { getPageData() {
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
return thisPage?.data[this.data.dataAttrName] return thisPage?.data[this.data.dataAttrName]
......
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"gl-form": "../../../../components//GLForm/GLForm" "gl-form": "../../../../components//GLForm/GLForm",
"Gl-Button-Group": "../../../../components/GlButtonGroup/GlButtonGroup",
"van-field": "@vant/weapp/field/index",
"van-collapse": "@vant/weapp/collapse/index",
"van-collapse-item": "@vant/weapp/collapse-item/index",
"van-picker": "@vant/weapp/picker/index"
} }
} }
/* packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxss */
.draft-btn {
background: #FFFFFF;
color: #3582EE;
}
.testFormCon {
.van-cell::after {
border: none !important;
}
.van-collapse-item__content {
padding: 0;
padding-bottom: 20px;
}
.van-cell {
overflow: visible;
}
.van-field__error-message {
margin-top: 10px;
}
.van-cell__right-icon {
display: none;
}
.van-collapse-item__title {
padding: 0;
}
}
\ No newline at end of file \ No newline at end of file
<!-- packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml --> <!-- packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml -->
<view> <view class="testFormCon">
<view class="box"> <!-- validate-trigger="onChange" -->
<view class="title ">车辆信息</view> <!-- <van-form
<gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.carFormList}}" /> :scroll-to-error="true"
</view> class="form"
<view class="box"> validate-first
<view class="title">客户信息</view> @failed="onFailed"
<gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.customerFormList}}" /> ref="form"> -->
</view> <view class="title">选择保险公司</view>
<view class="box"> <van-collapse v-model="activeNames">
<view class="title">产品信息</view> <van-collapse-item name="1">
<gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.productFormList}}" /> <view slot="title">
</view> <view class="collapseBoxTitle">
<view class="box m-b-40"> <span class="sprite-icon mr10" :class="[activeNames.includes('1') ? 'icon-close' : 'icon-addIcon']" />
<view class="title">店面信息</view> <span class="label">商业险信息</span>
<gl-form formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.storeFormList}}" /> </view>
</view> </view>
<button class="btn" bindtap="handleConfirm">确认提交(2/2)</button> <view class="title">基础车损险</view>
<button class="btn draft-btn" bindtap="handleDraft">存草稿</button> <van-field type="number" class="fieldPickerItem" v-model="form.carDamageAmount" name="pattern" placeholder="请输入保费金额" :rules="[{ pattern, message: '请输入正确保费金额' }]" />
<view class="title">第三方责任险</view>
<van-picker class="fieldPickerItem" readonly clickable name="picker" :value="form.thirdPartTypeLabel" placeholder="点击择方案">
<!-- @click="setPicker('thirdPartType')" -->
<van-icon name="arrow" slot="right-icon" />
</van-picker>
<van-field type="number" class="fieldPickerItem numberInput" v-model="form.thirdPartAmount" name="pattern" placeholder="请输入保费金额" :rules="[{ pattern, message: '请输入正确保费金额' }]" />
<!-- <view class="title">车上人员责任险(司机)</view> -->
<van-picker class="fieldPickerItem" readonly clickable name="picker" :value="form.busRideDriverTypeLabel" placeholder="点击择方案">
<!-- @click="setPicker('busRideDriverType')" -->
<van-icon name="arrow" slot="right-icon" />
</van-picker>
<van-field type="number" class="fieldPickerItem numberInput" v-model="form.busRideDriverAmount" name="pattern" placeholder="请输入保费金额" :rules="[{ pattern, message: '请输入正确保费金额' }]" />
<!-- <view class="title">车上人员责任险(乘客X{{ +(form.seatNumber) - 1 }})</view> -->
<van-picker class="fieldPickerItem" readonly clickable name="picker" :value="form.busRideFareTypeLabel" placeholder="点击择方案">
<!-- @click="setPicker('busRideFareType')" -->
<van-icon name="arrow" slot="right-icon" />
</van-picker>
<van-field type="number" class="fieldPickerItem numberInput" v-model="form.busRideFareAmount" name="pattern" placeholder="请输入保费金额" :rules="[{ pattern, message: '请输入正确保费金额' }]" />
<!-- <view class="title">
驾乘险
</view>
<van-field class="fieldPickerItem " v-model="form.drivingInsuranceType" name="pattern" placeholder="请输入方案"
:rules="[{ pattern: pattern2, message: '请输入正确方案' }]" />
<van-field type="number" class="fieldPickerItem numberInput" v-model="form.drivingInsuranceAmount"
name="pattern" placeholder="请输入保费金额" :rules="[{ pattern, message: '请输入正确保费金额' }]" /> -->
</van-collapse-item>
<van-collapse-item name="2">
<view slot="title">
<view class="collapseBoxTitle">
<span class="sprite-icon mr10" :class="[activeNames.includes('2') ? 'icon-close' : 'icon-addIcon']" />
<span class="label">交强险和车船税</span>
</view>
</view>
<view class="title">机动车交通事故责任强制保险</view>
<van-field class="fieldPickerItem " v-model="form.heavyTrafficType" placeholder="请输入方案" :rules="[{ pattern: pattern2, message: '请输入正确方案' }]" />
<van-field type="number" class="fieldPickerItem numberInput" v-model="form.heavyTrafficAmount" name="pattern" placeholder="请输入保费金额" :rules="[{ pattern, message: '请输入正确保费金额' }]" />
<view class="title">车船税</view>
<van-field class="fieldPickerItem " v-model="form.vehiclesShipsType" name="pattern" placeholder="请输入方案" :rules="[{ pattern: pattern2, message: '请输入正确方案' }]" />
<van-field type="number" class="fieldPickerItem numberInput" v-model="form.vehiclesShipsAmount" name="pattern" placeholder="请输入保费金额" :rules="[{ pattern, message: '请输入正确保费金额' }]" />
</van-collapse-item>
<van-collapse-item name="3">
<view slot="title">
<view class="collapseBoxTitle">
<span class="sprite-icon mr10" :class="[activeNames.includes('3') ? 'icon-close' : 'icon-addIcon']" />
<span class="label">增值车损险</span>
</view>
</view>
<!-- <van-field name="checkbox" class="checkItem">
<view #input>
<van-checkbox v-model="form.checkbox" shape="square" class="checkBox fieldPickerItem">请勾选增值车损险服务</van-checkbox>
</view>
</van-field> -->
<view class="incrementInfo">
<view class="img" />
<view class="info">
<view class="infoTitle">尊享版</view>
<view class="content two-line-ellipsis">包含车辆置换补偿服务、轮胎更换补偿服务、维修补偿服务</view>
</view>
</view>
</van-collapse-item>
</van-collapse>
<van-picker columns="{{ columns }}" bind:change="onChange" />
<!-- @confirm="onConfirm"
@cancel="showPicker = false" -->
<!-- <van-popup v-model="showPicker" position="bottom">
<van-picker show-toolbar value-key="label" :columns="columns" />
</van-popup> -->
</view> </view>
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxss */
.box {
background: #FFFFFF;
box-shadow: 0 6rpx 16rpx 0 #cdcdd159;
border-radius: 16rpx;
margin: 20rpx;
color: #222222;
}
.m-b-40 {
margin-bottom: 40rpx;
}
.flex {
display: flex;
}
.title {
height: 96rpx;
line-height: 96rpx;
font-weight: 600;
font-size: 32rpx;
padding: 0 32rpx;
}
.picker {
display: flex;
flex-direction: row-reverse;
height: 80rpx;
line-height: 80rpx;
text-align: right;
}
.placeholder {
font-weight: 400;
font-size: 28rpx;
color: #B6B6B8;
}
.arrow {
width: 28rpx;
height: 26rpx;
margin-top: 26rpx;
flex-shrink: 0;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.input {
text-align: right;
font-size: 28rpx;
}
.placeholder-class {
color: #C3C3C3;
}
.tire-box {
padding: 0 40rpx 44rpx;
font-size: 28rpx;
color: #9B9B9E;
}
.tire-block {
width: 240rpx;
height: 240rpx;
box-sizing: border-box;
background-color: #F4F5F7;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
.tire-block:first-child {
margin-right: 20rpx;
}
.tire-tip {
height: 40rpx;
line-height: 40rpx;
background-color: #ebf2fd;
border-radius: 8rpx;
font-size: 24rpx;
color: #3582EE;
margin-top: 28rpx;
padding: 4rpx 24rpx;
border-radius: 8rpx;
}
.icon-plus {
width: 35rpx;
height: 35rpx;
margin-bottom: 20rpx;
}
.btn {
box-sizing: border-box;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 32rpx;
color: #FFFFFF;
background: #3582EE;
border-radius: 12rpx;
margin: 0 64rpx 20rpx;
}
.draft-btn {
background: #FFFFFF;
color: #3582EE;
}
\ No newline at end of file \ No newline at end of file
...@@ -26,155 +26,130 @@ const formRule = { ...@@ -26,155 +26,130 @@ const formRule = {
rearTireSpecification: [{ required: true, message: '规格型号(后轮)不能为空' }], rearTireSpecification: [{ required: true, message: '规格型号(后轮)不能为空' }],
compensationName: [{ required: true, message: '第一受益人不能为空' }], compensationName: [{ required: true, message: '第一受益人不能为空' }],
merchantPhone: [{ required: true, message: '联系电话不能为空' }], merchantPhone: [{ required: true, message: '联系电话不能为空' }],
merchantAddress: [{ required: true, message: '联系地址不能为空' }], merchantAddress: [{ required: true, message: '联系地址不能为空' }]
} }
const secondObj = { const secondObj = {
carFormList: [{ carFormList: [
label: '车架号', {
name: 'vin', label: '车架号',
type: 'input', name: 'vin',
maxlength: '17' type: 'input',
}, { maxlength: '17'
label: '车辆发票价', },
name: 'invoicePrice',
type: 'input', {
readonly: true label: '座位数',
}, { name: 'seatesNum',
label: '座位数', labelName: 'seatesNum',
name: 'seatesNum', type: 'select',
labelName: 'seatesNum', optionList: constantList.seatesList,
type: 'select', optionId: 'optionId',
optionList: constantList.seatesList, optionLabel: 'optionLabel'
optionId: 'optionId', },
optionLabel: 'optionLabel' {
}, { label: '车辆发票价',
label: '发动机号', name: 'invoicePrice',
name: 'engineNo', type: 'input',
type: 'input', readonly: true
maxlength: '30' }
}, { ],
label: '车身颜色', customerFormList: [
name: 'vehicleColor', {
type: 'input', label: '姓名',
maxlength: '5' name: 'customerName',
}, { type: 'input',
label: '购车日期', maxlength: '100',
name: 'billingDate', noCellHeight: true,
type: 'pickerTime', fieldType: 'textarea'
end: new Date() },
}, { {
label: '品牌车系', label: '联系电话',
name: 'vehicleBrandId', name: 'phone',
labelName: 'brandTxt', type: 'input',
type: 'brand', maxlength: '11'
haveArrow: true, },
placeholder: '请选择' // {
// handleChange: function (that, dataAttrName, brandObj) { // label: '证件类型',
// console.log(brandObj,'brandObj--') // name: 'cardType',
// that.setData({ // labelName: 'cardTypeName',
// [dataAttrName + '.brandTxt']: brandObj.vehicleBrandName + '/' + brandObj.vehicleSeriesName + '/' + brandObj.vehicleShapeName + '/' + brandObj.vehicleSubBrandName // type: 'select',
// }) // optionList: constantList.cardTypeList,
// optionId: 'optionId',
// optionLabel: 'optionLabel'
// },
{
label: '证件号码',
name: 'cardNo',
type: 'input'
}
// {
// label: '联系地址',
// name: 'customerAddress',
// type: 'input',
// maxlength: '100',
// noCellHeight: true,
// fieldType: 'textarea'
// }],
// productFormList: [{
// label: '服务年限',
// name: 'servicePeriod',
// type: 'input',
// disabled: true
// }, {
// label: '生效日期',
// name: 'effectiveDate',
// type: 'pickerTime',
// start: new Date(new Date().setDate(new Date(new Date()).getDate() + 1)).toLocaleDateString()
// }, {
// label: '轮胎品牌',
// name: 'tireBrand',
// type: 'input',
// maxlength: '20'
// }, {
// label: '规格型号(前轮)',
// name: 'frontTireSpecification',
// type: 'input',
// maxlength: '20'
// }, {
// label: '规格型号(后轮)',
// name: 'rearTireSpecification',
// type: 'input',
// maxlength: '20'
// }, {
// label: '购车类型',
// name: 'buyCarType',
// labelName: 'buyCarTypeName',
// type: 'select',
// optionList: constantList.buyCarTypeList,
// optionId: 'optionId',
// optionLabel: 'optionLabel'
// }, {
// label: '第一受益人',
// name: 'compensationName',
// type: 'input'
// }],
// storeFormList: [{
// label: '店面名称',
// name: 'merchantName',
// type: 'input',
// readonly: true
// }, {
// label: '联系电话',
// name: 'merchantPhone',
// type: 'input',
// maxlength: '20'
// }, {
// label: '联系地址',
// name: 'merchantAddress',
// type: 'input',
// fieldType: 'textarea',
// maxlength: '100'
// } // }
}], ]
customerFormList: [{
label: '客户类型',
name: 'customerType',
labelName: 'customerTypeName',
type: 'select',
optionList: constantList.customerTypeList,
optionId: 'optionId',
optionLabel: 'optionLabel'
}, {
label: '姓名',
name: 'customerName',
type: 'input',
maxlength: '100',
noCellHeight: true,
fieldType: 'textarea'
}, {
label: '联系电话',
name: 'phone',
type: 'input',
maxlength: '11',
}, {
label: '证件类型',
name: 'cardType',
labelName: 'cardTypeName',
type: 'select',
optionList: constantList.cardTypeList,
optionId: 'optionId',
optionLabel: 'optionLabel'
}, {
label: '证件号码',
name: 'cardNo',
type: 'input'
}, {
label: '联系地址',
name: 'customerAddress',
type: 'input',
maxlength: '100',
noCellHeight: true,
fieldType: 'textarea'
}],
productFormList: [{
label: '服务年限',
name: 'servicePeriod',
type: 'input',
disabled: true
}, {
label: '生效日期',
name: 'effectiveDate',
type: 'pickerTime',
start: new Date(new Date().setDate(new Date(new Date()).getDate() + 1)).toLocaleDateString()
}, {
label: '轮胎品牌',
name: 'tireBrand',
type: 'input',
maxlength: '20'
}, {
label: '规格型号(前轮)',
name: 'frontTireSpecification',
type: 'input',
maxlength: '20'
}, {
label: '规格型号(后轮)',
name: 'rearTireSpecification',
type: 'input',
maxlength: '20'
}, {
label: '购车类型',
name: 'buyCarType',
labelName: 'buyCarTypeName',
type: 'select',
optionList: constantList.buyCarTypeList,
optionId: 'optionId',
optionLabel: 'optionLabel'
}, {
label: '第一受益人',
name: 'compensationName',
type: 'input'
}],
storeFormList: [{
label: '店面名称',
name: 'merchantName',
type: 'input',
readonly: true
}, {
label: '联系电话',
name: 'merchantPhone',
type: 'input',
maxlength: '20'
}, {
label: '联系地址',
name: 'merchantAddress',
type: 'input',
fieldType: 'textarea',
maxlength: '100'
}]
} }
export default { export default {
formRule, formRule,
secondObj secondObj
}
\ No newline at end of file \ No newline at end of file
}
// packageEquity/pages/carEquity/serviceInfo/serviceInfo.js // packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -11,7 +10,7 @@ Page({ ...@@ -11,7 +10,7 @@ Page({
}, },
// 页面存放表单对象的对象名 // 页面存放表单对象的对象名
dataAttrName: 'serviceInfo', dataAttrName: 'serviceInfo',
step: 'first' step: 'second'
}, },
handleFirstConfirm(e) { handleFirstConfirm(e) {
...@@ -30,55 +29,40 @@ Page({ ...@@ -30,55 +29,40 @@ Page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {},
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {},
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {},
},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {},
},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
onShareAppMessage() {}
})
/* packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxss */ /* packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxss */
.layout { .layout {
background: #F4F5F7; background: #F4F5F7;
padding-bottom: 60rpx; /* padding-bottom: 60rpx; */
min-height: 100vh;
} }
\ 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!