Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-baoshen-excel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何远江
topsun-baoshen-excel
Commits
5ea0d8dc
Commit
5ea0d8dc
authored
Mar 19, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改客户查询和产品查询条件为模糊查询
parent
1d57f3ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
CustomerModal.vue
src/components/CustomerModal/CustomerModal.vue
+4
-3
ProductModal.vue
src/components/ProductModal/ProductModal.vue
+9
-7
No files found.
src/components/CustomerModal/CustomerModal.vue
View file @
5ea0d8dc
...
...
@@ -12,7 +12,7 @@
<template
#
default
>
<el-form
:model=
"formState"
size=
"small"
inline
>
<el-form-item
label=
"客户名称"
>
<el-input
v-model=
"formState.customerName"
></el-input>
<el-input
v-model=
"formState.customerName"
clearable
></el-input>
</el-form-item>
<el-form-item>
...
...
@@ -47,10 +47,11 @@
</template>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
onMounted
,
reactive
,
watch
}
from
'vue'
import
{
defineComponent
,
ref
,
onMounted
,
reactive
,
watch
,
unref
}
from
'vue'
import
{
getCustomerPage
}
from
'@/api/customer'
import
type
{
VxeTableInstance
}
from
'vxe-table'
import
{
ElMessage
}
from
'element-plus'
import
{
queryParamsFilter
}
from
'@/utils/query'
export
default
defineComponent
({
name
:
'CustomerModal'
,
...
...
@@ -90,7 +91,7 @@ export default defineComponent({
const
queryCustomer
=
async
()
=>
{
loading
.
value
=
true
try
{
const
{
data
}
=
await
getCustomerPage
(
formState
)
const
{
data
}
=
await
getCustomerPage
(
queryParamsFilter
(
unref
(
formState
))
)
tableData
.
value
=
data
.
result
.
records
formState
.
total
=
+
data
.
result
.
total
}
catch
{}
...
...
src/components/ProductModal/ProductModal.vue
View file @
5ea0d8dc
...
...
@@ -3,10 +3,10 @@
<template
#
default
>
<el-form
:model=
"formState"
size=
"small"
inline
>
<el-form-item
label=
"产品名称"
>
<el-input
v-model=
"formState.productName"
></el-input>
<el-input
v-model=
"formState.productName"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"产品
品牌
"
>
<el-
select
v-model=
"formState.brandName"
>
</el-selec
t>
<el-form-item
label=
"产品
编码
"
>
<el-
input
v-model=
"formState.productCode"
clearable
></el-inpu
t>
</el-form-item>
<el-form-item>
<el-button
@
click=
"resetForm"
>
重置
</el-button>
...
...
@@ -40,10 +40,11 @@
</template>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
onMounted
,
reactive
,
watch
}
from
'vue'
import
{
defineComponent
,
ref
,
onMounted
,
reactive
,
watch
,
unref
}
from
'vue'
import
{
getProductList
}
from
'@/api/product'
import
type
{
VxeTableInstance
}
from
'vxe-table'
import
{
ElMessage
}
from
'element-plus'
import
{
queryParamsFilter
}
from
'@/utils/query'
export
default
defineComponent
({
name
:
'ProductModal'
,
...
...
@@ -61,7 +62,7 @@ import { ElMessage } from 'element-plus'
const
tableData
=
ref
([])
const
formState
=
reactive
({
productName
:
''
,
brandNam
e
:
''
,
productCod
e
:
''
,
currentPage
:
1
,
pageSize
:
10
,
total
:
0
...
...
@@ -74,13 +75,14 @@ import { ElMessage } from 'element-plus'
const
resetForm
=
()
=>
{
Object
.
assign
(
formState
,
{
productName
:
''
,
brandNam
e
:
''
productCod
e
:
''
})
}
const
queryCustomer
=
async
()
=>
{
loading
.
value
=
true
try
{
const
{
data
}
=
await
getProductList
(
formState
)
const
params
=
queryParamsFilter
(
unref
(
formState
))
const
{
data
}
=
await
getProductList
(
params
)
tableData
.
value
=
data
.
result
.
records
formState
.
total
=
+
data
.
result
.
total
}
catch
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment