commit
0d0017eac7
|
|
@ -115,7 +115,7 @@
|
||||||
>
|
>
|
||||||
<uni-easyinput
|
<uni-easyinput
|
||||||
:inputBorder="false"
|
:inputBorder="false"
|
||||||
:value="state.accountInfo.bankName"
|
:value="bankNameLabel"
|
||||||
placeholder="请选择银行"
|
placeholder="请选择银行"
|
||||||
suffixIcon="right"
|
suffixIcon="right"
|
||||||
disabled
|
disabled
|
||||||
|
|
@ -164,7 +164,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onBeforeMount, reactive } from 'vue';
|
import { onBeforeMount, reactive, computed } from 'vue';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import accountTypeSelect from './components/account-type-select.vue';
|
import accountTypeSelect from './components/account-type-select.vue';
|
||||||
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
||||||
|
|
@ -199,6 +199,14 @@
|
||||||
bankListSelectedIndex: '', // 选中银行 bankList 的 index
|
bankListSelectedIndex: '', // 选中银行 bankList 的 index
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const bankNameLabel = computed(() => {
|
||||||
|
if (!state.accountInfo.bankName || !state.bankList || state.bankList.length === 0) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
const item = state.bankList.find((it) => it.value === state.accountInfo.bankName);
|
||||||
|
return item ? item.label : '';
|
||||||
|
});
|
||||||
|
|
||||||
// 打开提现方式的弹窗
|
// 打开提现方式的弹窗
|
||||||
const onAccountSelect = (e) => {
|
const onAccountSelect = (e) => {
|
||||||
state.accountSelect = e;
|
state.accountSelect = e;
|
||||||
|
|
@ -300,7 +308,8 @@
|
||||||
function bankChange(e) {
|
function bankChange(e) {
|
||||||
const value = e.detail.value;
|
const value = e.detail.value;
|
||||||
state.bankListSelectedIndex = value;
|
state.bankListSelectedIndex = value;
|
||||||
state.accountInfo.bankName = state.bankList[value].label;
|
const item = state.bankList[value];
|
||||||
|
state.accountInfo.bankName = item ? item.value : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue