create:钱包开卡完成
This commit is contained in:
1 parent
360602eaf8
commit
1c6e1ff748
10 files changed
+492
-45
No files matched your search
@@ -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);
|
||||
Reference in new issue
Block a user