暂存商户信息
This commit is contained in:
@@ -33,6 +33,7 @@ Component({
|
||||
columns: [],
|
||||
searchText: "",
|
||||
payWays,
|
||||
feeType,
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
@@ -84,6 +85,17 @@ Component({
|
||||
})
|
||||
this.triggerEvent("confirm", { data: item, way: index, type } );
|
||||
},
|
||||
onFeeTypeConfirm(event) {
|
||||
const { index } = event.detail;
|
||||
const { feeType = [], type } = this.data;
|
||||
const item = feeType[index];
|
||||
this.setData({
|
||||
columns: [],
|
||||
list: [],
|
||||
searchText: ""
|
||||
})
|
||||
this.triggerEvent("confirm", { data: item, way: index, type } );
|
||||
},
|
||||
onSearch() {
|
||||
const { type } = this.data;
|
||||
switch(type) {
|
||||
|
@@ -5,7 +5,27 @@
|
||||
position="bottom"
|
||||
z-index="100000"
|
||||
>
|
||||
<view wx:if="{{type !== 'pay'}}">
|
||||
<view wx:if="{{type === 'pay'}}">
|
||||
<van-picker
|
||||
custom-style="width: 100%;"
|
||||
columns="{{ payWays }}"
|
||||
title="{{title}}"
|
||||
show-toolbar="{{true}}"
|
||||
bind:cancel="onCancel"
|
||||
bind:confirm="onPayConfirm"
|
||||
/>
|
||||
</view>
|
||||
<view wx:elif="{{type === 'feeType'}}">
|
||||
<van-picker
|
||||
custom-style="width: 100%;"
|
||||
columns="{{ feeType }}"
|
||||
title="{{title}}"
|
||||
show-toolbar="{{true}}"
|
||||
bind:cancel="onCancel"
|
||||
bind:confirm="onFeeTypeConfirm"
|
||||
/>
|
||||
</view>
|
||||
<view wx:elif="{{type !== 'pay'}}">
|
||||
<van-search
|
||||
value="{{ value }}"
|
||||
placeholder="{{type === 'tenement' ? '请输入关键词搜索后选择' : '请输入搜索关键词'}}"
|
||||
@@ -27,26 +47,7 @@
|
||||
bind:confirm="onConfirm"
|
||||
/>
|
||||
</view>
|
||||
<view wx:elif="{{type === 'pay'}}">
|
||||
<van-picker
|
||||
custom-style="width: 100%;"
|
||||
columns="{{ payWays }}"
|
||||
title="{{title}}"
|
||||
show-toolbar="{{true}}"
|
||||
bind:cancel="onCancel"
|
||||
bind:confirm="onPayConfirm"
|
||||
/>
|
||||
</view>
|
||||
<view wx:elif="{{type === 'feeType'}}">
|
||||
<van-picker
|
||||
custom-style="width: 100%;"
|
||||
columns="{{ feeType }}"
|
||||
title="{{title}}"
|
||||
show-toolbar="{{true}}"
|
||||
bind:cancel="onCancel"
|
||||
bind:confirm="onPayConfirm"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view wx:else>
|
||||
<van-picker
|
||||
custom-style="width: 100%;"
|
||||
|
Reference in New Issue
Block a user