机构筛选

This commit is contained in:
唐明明
2023-03-28 15:56:36 +08:00
parent 7a25361249
commit 59dc853cdf
4 changed files with 141 additions and 36 deletions

View File

@@ -110,13 +110,6 @@
</view>
</view>
</u-popup>
<!-- 机构选择 -->
<button @click="onOpen">弹出层</button>
<oct-mechanism-picker
ref="MecanisPicker"
title="选择办理机构"
:columns="jgArr"
/>
</view>
</template>
@@ -126,18 +119,6 @@
export default {
data() {
return {
jgArr : [
{ name: '中信' },
{ name: '哈尔滨' },
{ name: '广州' },
{ name: '发展银行' },
{ name: '其他机构' },
{ name: '中信' },
{ name: '哈尔滨' },
{ name: '广州' },
{ name: '发展银行' },
{ name: '其他机构' }
],
theTabs : [
{ category_id: '', title: '全部' }
],
@@ -165,9 +146,6 @@
this.getZf()
},
methods: {
onOpen(){
this.$refs.MecanisPicker.open()
},
// 获取金法列表
getJf(){
let params = {

View File

@@ -11,12 +11,16 @@
<!-- 机构 -->
<view class="block-item">
<label class="block-item-label"><text>*</text>机构</label>
<picker :range="item.institution" range-key="title" :value="item.institutionIndex" @change="institutionChange($event, item, index)">
<!-- <picker :range="item.institution" range-key="title" :value="item.institutionIndex" @change="institutionChange($event, item, index)">
<view class="institution-picker">
<view class="institution-picker-text nowrap">{{item.institution[item.institutionIndex].title}}</view>
<u-icon size="12" color="#999" name="arrow-down-fill"></u-icon>
</view>
</picker>
</picker> -->
<view class="institution-picker" @click="onShowInstitution(item.institution, item, index)">
<view class="institution-picker-text nowrap">{{item.institution[item.institutionIndex].title}}</view>
<u-icon size="12" color="#999" name="arrow-down-fill"></u-icon>
</view>
</view>
<!-- 业务类型 -->
<view class="block-item">
@@ -103,6 +107,13 @@
<button @click="onSubmit">提交</button>
</view>
</view>
<!-- 机构弹出层 -->
<oct-mechanism-picker
ref="institutionPicker"
title="选择办理机构"
:columns="columns"
@choose="institutionChange"
/>
</view>
</template>
@@ -113,9 +124,12 @@
components: { octpicker },
data() {
return {
columns : [],
businessArr: [],
serviceUser: '',
serviceArr : [],
old : {},
cIndex : 0
};
},
created() {
@@ -125,6 +139,13 @@
this.serviceUser = serviceUser
},
methods: {
// 显示选择机构
onShowInstitution(e, item, index){
this.columns = e
this.old = item
this.cIndex = index
this.$refs.institutionPicker.open()
},
// 移出选项
onRemove(index){
this.serviceArr.splice(index, 1)
@@ -202,10 +223,12 @@
})
},
// 机构变更更新业务
institutionChange(e, old, index){
let { value } = e.detail;
institutionChange(e){
let index = this.cIndex
let old = this.old
let value = old.institution.findIndex(val => val.institution_id === e.val.institution_id);
let businessId = old.subVal.business_id
// 获取机构的子业务类型
let forms = this.getForms(old.institution[value].institution_id)
forms.then(institutionVal => {