Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
c0e67ee3
Commit
c0e67ee3
authored
Jan 24, 2022
by
季圣华
Browse files
优化商品选择界面的查询逻辑
parent
2d040065
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue
View file @
c0e67ee3
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
</a-col>
</a-col>
<span
style=
"float: left;overflow: hidden;"
class=
"table-page-search-submitButtons"
>
<span
style=
"float: left;overflow: hidden;"
class=
"table-page-search-submitButtons"
>
<a-col
:md=
"6"
:sm=
"24"
>
<a-col
:md=
"6"
:sm=
"24"
>
<a-button
type=
"primary"
@
click=
"loadData(1)"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"load
Material
Data(1)"
>
查询
</a-button>
<a-button
style=
"margin-left: 8px"
@
click=
"searchReset(1)"
>
重置
</a-button>
<a-button
style=
"margin-left: 8px"
@
click=
"searchReset(1)"
>
重置
</a-button>
</a-col>
</a-col>
</span>
</span>
...
@@ -164,8 +164,6 @@
...
@@ -164,8 +164,6 @@
created
()
{
created
()
{
// 该方法触发屏幕自适应
// 该方法触发屏幕自适应
this
.
resetScreenSize
()
this
.
resetScreenSize
()
this
.
loadTreeData
()
this
.
getDepotList
()
},
},
methods
:
{
methods
:
{
initBarCode
()
{
initBarCode
()
{
...
@@ -176,13 +174,13 @@
...
@@ -176,13 +174,13 @@
this
.
$emit
(
'
initComp
'
,
''
)
this
.
$emit
(
'
initComp
'
,
''
)
}
}
},
},
async
load
Data
(
arg
)
{
loadMaterial
Data
(
arg
)
{
if
(
arg
===
1
)
{
if
(
arg
===
1
)
{
this
.
ipagination
.
current
=
1
;
this
.
ipagination
.
current
=
1
;
}
}
this
.
loading
=
true
this
.
loading
=
true
let
params
=
this
.
getQueryParams
()
//查询条件
let
params
=
this
.
getQueryParams
()
//查询条件
await
getMaterialBySelect
(
params
).
then
((
res
)
=>
{
getMaterialBySelect
(
params
).
then
((
res
)
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
dataSource
=
res
.
rows
this
.
dataSource
=
res
.
rows
this
.
ipagination
.
total
=
res
.
total
this
.
ipagination
.
total
=
res
.
total
...
@@ -225,8 +223,10 @@
...
@@ -225,8 +223,10 @@
this
.
title
=
'
选择商品
'
this
.
title
=
'
选择商品
'
this
.
queryParam
.
q
=
barCode
this
.
queryParam
.
q
=
barCode
this
.
$nextTick
(()
=>
this
.
$refs
.
material
.
focus
());
this
.
$nextTick
(()
=>
this
.
$refs
.
material
.
focus
());
this
.
loadTreeData
()
this
.
getDepotList
()
this
.
initDepotSelect
()
this
.
initDepotSelect
()
this
.
loadData
();
this
.
load
Material
Data
();
this
.
form
.
resetFields
();
this
.
form
.
resetFields
();
},
},
getQueryParams
()
{
getQueryParams
()
{
...
@@ -247,7 +247,7 @@
...
@@ -247,7 +247,7 @@
let
that
=
this
;
let
that
=
this
;
if
(
num
!==
0
)
{
if
(
num
!==
0
)
{
that
.
queryParam
=
{};
that
.
queryParam
=
{};
that
.
loadData
(
1
);
that
.
load
Material
Data
(
1
);
}
}
that
.
selectedRowKeys
=
[];
that
.
selectedRowKeys
=
[];
that
.
selectMaterialIds
=
[];
that
.
selectMaterialIds
=
[];
...
@@ -262,7 +262,7 @@
...
@@ -262,7 +262,7 @@
this
.
isorter
.
order
=
'
ascend
'
===
sorter
.
order
?
'
asc
'
:
'
desc
'
;
this
.
isorter
.
order
=
'
ascend
'
===
sorter
.
order
?
'
asc
'
:
'
desc
'
;
}
}
this
.
ipagination
=
pagination
;
this
.
ipagination
=
pagination
;
this
.
loadData
();
this
.
load
Material
Data
();
},
},
handleSubmit
()
{
handleSubmit
()
{
let
that
=
this
;
let
that
=
this
;
...
@@ -317,14 +317,14 @@
...
@@ -317,14 +317,14 @@
this
.
selectedRowKeys
=
arr
this
.
selectedRowKeys
=
arr
this
.
handleSubmit
()
this
.
handleSubmit
()
}
else
{
}
else
{
this
.
loadData
(
1
)
this
.
load
Material
Data
(
1
)
}
}
}
else
{
}
else
{
this
.
loadData
(
1
)
this
.
load
Material
Data
(
1
)
}
}
},
},
modalFormOk
()
{
modalFormOk
()
{
this
.
loadData
()
this
.
load
Material
Data
()
},
},
rowAction
(
record
,
index
)
{
rowAction
(
record
,
index
)
{
return
{
return
{
...
...
Write
Preview
Supports
Markdown
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