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
deead4b3
Commit
deead4b3
authored
Oct 28, 2021
by
季圣华
Browse files
单据中选择商品的时候支持回车快捷选中
parent
ad4945d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue
View file @
deead4b3
...
...
@@ -18,7 +18,7 @@
<a-row
:gutter=
"24"
>
<a-col
:md=
"6"
:sm=
"8"
>
<a-form-item
label=
"商品"
:labelCol=
"
{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-input
placeholder=
"条码、名称、规格、型号"
v-model=
"queryParam.q"
></a-input>
<a-input
ref=
"material"
placeholder=
"条码、名称、规格、型号"
v-model=
"queryParam.q"
></a-input>
</a-form-item>
</a-col>
<a-col
:md=
"6"
:sm=
"8"
>
...
...
@@ -187,6 +187,12 @@
if
(
res
)
{
this
.
dataSource
=
res
.
rows
this
.
ipagination
.
total
=
res
.
total
if
(
res
.
total
===
1
)
{
this
.
title
=
'
选择商品【再次回车可以直接选中】
'
this
.
$nextTick
(()
=>
this
.
$refs
.
material
.
focus
());
}
else
{
this
.
title
=
'
选择商品
'
}
}
}).
finally
(()
=>
{
this
.
loading
=
false
...
...
@@ -217,7 +223,9 @@
},
showModal
(
barCode
)
{
this
.
visible
=
true
;
this
.
title
=
'
选择商品
'
this
.
queryParam
.
q
=
barCode
this
.
$nextTick
(()
=>
this
.
$refs
.
material
.
focus
());
this
.
loadData
();
this
.
form
.
resetFields
();
},
...
...
@@ -297,10 +305,21 @@
this
.
selectionRows
=
selectionRows
;
},
onSearch
()
{
this
.
loadData
(
1
);
if
(
this
.
dataSource
&&
this
.
dataSource
.
length
===
1
)
{
if
(
this
.
queryParam
.
q
===
this
.
dataSource
[
0
].
mBarCode
)
{
let
arr
=
[]
arr
.
push
(
this
.
dataSource
[
0
].
id
)
this
.
selectedRowKeys
=
arr
this
.
handleSubmit
()
}
else
{
this
.
loadData
(
1
)
}
}
else
{
this
.
loadData
(
1
)
}
},
modalFormOk
()
{
this
.
loadData
()
;
this
.
loadData
()
},
rowAction
(
record
,
index
)
{
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