入库修改

This commit is contained in:
weiwei committed 2025-05-06 17:32:34 +08:00
1 parent 2046c3b7ba
commit 872cabe597
5 files changed
+24 -44

No files matched your search

+3 -13
View File
@@ -41,10 +41,7 @@ const props = withDefaults(defineProps<Props>(), {
isDisplayName: false,
})
const queryForm = reactive<any>({
current: 1,
size: 10,
})
const queryForm = reactive<any>({})
const state = reactive<any>({
loading: true,
@@ -57,6 +54,7 @@ watch(
(newVal, oldValue) => {
if (newVal == oldValue) return
state.selectId = newVal
queryForm.userId = newVal
getOptions()
},
{ immediate: true },
@@ -65,10 +63,7 @@ watch(
async function getOptions() {
try {
state.loading = true
const _pa = {
...queryForm,
}
const { data } = await getSimpleUserAll(_pa)
const { data } = await getSimpleUserAll(queryForm)
state.options = data ?? []
} finally {
setTimeout(() => (state.loading = false), 500)
@@ -81,9 +76,4 @@ function remoteSearch(params: string) {
getOptions()
}
}
function clear() {
state.selectId = null
getOptions()
}
</script>
+2 -9
View File
@@ -54,6 +54,7 @@ watch(
(newVal, oldValue) => {
if (newVal == oldValue) return
state.selectId = newVal
queryForm.supplierId = newVal
getOptions()
},
{ immediate: true },
@@ -62,10 +63,7 @@ watch(
async function getOptions() {
try {
state.loading = true
const _pa = {
...queryForm,
}
const { data } = await getSupplierSimpleAll(_pa)
const { data } = await getSupplierSimpleAll(queryForm)
state.options = data ? data.filter((item: any) => item.supplierId) : []
} finally {
setTimeout(() => (state.loading = false), 500)
@@ -78,9 +76,4 @@ function remoteSearch(params: string) {
getOptions()
}
}
function clear() {
state.selectId = null
getOptions()
}
</script>