增加激活码列表页面,修复进件部分问题

This commit is contained in:
2026-01-16 13:42:58 +08:00
parent 6bbe3b2d09
commit 6535b6f580
29 changed files with 3583 additions and 128 deletions

View File

@@ -7,7 +7,7 @@
<view class="icon">
<up-icon name="arrow-down" size="14" color="#999"></up-icon>
</view>
</view>
<up-popup :show="show" placement="bottom" round="18rpx" closeOnClickOverlay @close="close">
<view class="u-p-30">
@@ -19,13 +19,13 @@
<scroll-view scroll-with-animation :scroll-into-view="selid" class="scroll-view u-m-t-30"
scroll-y="true" style="max-height :60vh;">
<template v-if="list.length">
<view class="u-m-b-10 u-flex item" v-for="item in list" :key="item.bankCode"
@click="itemClick(item)" :id="'shop_'+item.bankCode"
:class="{active:selItem&&selItem.bankCode==item.bankCode}">
<view class="u-m-b-10 u-flex item" v-for="item in list" :key="item.bank_branch_id"
@click="itemClick(item)" :id="'shop_'+item.bank_branch_id"
:class="{active:selItem&&selItem.bank_branch_id==item.bank_branch_id}">
<view class="checkbox">
<up-icon name="checkbox-mark" color="#fff"></up-icon>
</view>
<view class="u-flex-1">{{item.branchName}}</view>
<view class="u-flex-1">{{item.bank_branch_name}}</view>
</view>
<view class="u-p-20 u-flex u-row-center">
<up-loadmore status="nomore"></up-loadmore>
@@ -33,11 +33,11 @@
</template>
<template v-else>
<template v-if="keywords">
<up-empty text="未搜索到相关支行"></up-empty>
<up-empty text="未搜索到相关支行"></up-empty>
</template>
<up-empty v-else text="暂无支行"></up-empty>
</template>
</scroll-view>
@@ -71,15 +71,15 @@
const show = ref(false);
const modelValue = defineModel();
const bankBranchName = defineModel('bankBranchName', {
const bankbank_branch_name = defineModel('bankbank_branch_name', {
default: '',
});
const selid = ref('')
function returnLabel() {
const findShop = list.value.find(v => v.bankCode == modelValue.value)
return findShop ? findShop.branchName : ''
const findShop = list.value.find(v => v.bank_branch_id == modelValue.value)
return findShop ? findShop.bank_branch_name : ''
}
const selItem = ref(null)
@@ -87,9 +87,9 @@
selItem.value = data
}
function returnbranchName(bankCode) {
const item = list.value.find((v) => v.bankCode == bankCode);
return item?.branchName || '';
function returnbank_branch_name(bank_branch_id) {
const item = list.value.find((v) => v.bank_branch_id == bank_branch_id);
return item?.bank_branch_name || '';
}
function close() {
@@ -97,8 +97,8 @@
}
function submit() {
modelValue.value = selItem.value.bankCode
bankBranchName.value = selItem.value.branchName
modelValue.value = selItem.value.bank_branch_id
bankbank_branch_name.value = selItem.value.bank_branch_name
show.value = false;
}
@@ -165,10 +165,12 @@
const list = ref([]);
function openPopup() {
async function openPopup() {
await init()
selid.value = 'shop_' + modelValue.value
const findShop = list.value.find(v => v.bankCode == modelValue.value)
selItem.value=findShop?findShop:null
console.log('list.value',list.value);
const findShop = list.value.find(v => v.bank_branch_id == modelValue.value)
selItem.value = findShop ? findShop : null
show.value = true;
}
@@ -208,23 +210,20 @@
query: {
type: Object,
default: () => ({
province: '',
city: '',
instId: '',
bankAliceCode: '',
cityCode: ''
})
}
})
watch(() => show.value, (newval) => {
init()
})
let allList = []
async function init() {
const res = await bankBranchList(props.query);
list.value = res
allList = res
list.value = res.data
allList = res.data
}
</script>
<style lang="scss">