create:钱包开卡完成

This commit is contained in:
dzc committed 2025-01-02 15:48:07 +08:00
1 parent 360602eaf8
commit 1c6e1ff748
10 files changed
+492 -45

No files matched your search

+11 -1
View File
@@ -43,7 +43,7 @@ async function getOptions() {
...queryForm
}
const { data } = await deptApi.deptTree()
state.options = data ?? []
state.options = filterTreeData(data ?? [])
} finally {
setTimeout(() => state.loading = false, 500);
}
@@ -56,6 +56,16 @@ function remoteSearch(params: string) {
}
}
function filterTreeData(treeData: Array<any>) {
return treeData.filter(item => {
if (item.children && item.children.length) {
item.disabled = true;
item.children = filterTreeData(item.children)
}
return item
})
}
function clear() {
state.selectId = null
getOptions()
@@ -17,7 +17,7 @@
<script setup lang="ts" name="select-merchant">
import { reactive, computed, defineModel, withDefaults, defineProps } from 'vue'
import * as merchantApi from '/@/api/canteen/merchantInfo'
import * as mchApi from '/@/api/wallet/mch-manage'
const selectId = defineModel()
@@ -52,7 +52,7 @@ async function getOptions() {
const _pa = {
...queryForm
}
const { data } = await merchantApi.fetchList(_pa)
const { data } = await mchApi.pageJoin(_pa)
state.options = data.records ?? []
} finally {
setTimeout(() => state.loading = false, 500);
+2 -2
View File
@@ -16,7 +16,7 @@ import PreviewImage from "/@/components/PreviewImage/index.vue"
// 业务组件
import SelectUser from '/@/components/Select/SelectUser.vue'
import SelectWalletType from '/@/components/Select/SelectWalletType.vue'
import SelectMerchant from '/@/components/Select/SelectMerchant.vue'
import SelectMch from '/@/components/Select/SelectMch.vue'
import SelectDept from '/@/components/Select/SelectDept.vue'
@@ -56,7 +56,7 @@ export default {
app.component('PreviewImage', PreviewImage)
app.component('SelectUser', SelectUser)
app.component('SelectWalletType', SelectWalletType)
app.component('SelectMerchant', SelectMerchant)
app.component('SelectMch', SelectMch)
app.component('SelectDept', SelectDept)
// 导入全部的elmenet-plus的图标