Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
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
胡宝山
template_vue
Commits
f3ead098
Commit
f3ead098
authored
Aug 05, 2023
by
wdy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回车监听
parent
212080b3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
27 deletions
+90
-27
basicInfo.vue
src/views/equipment/basicInfo.vue
+0
-6
index.vue
src/views/sample/basicInformation/index.vue
+23
-6
index.vue
src/views/sample/correctionLibrary/index.vue
+23
-6
index.vue
src/views/sample/inventoryRecord/index.vue
+24
-6
index.vue
src/views/sample/sampleType/index.vue
+20
-3
No files found.
src/views/equipment/basicInfo.vue
View file @
f3ead098
...
...
@@ -311,12 +311,6 @@ export default {
})
next
()
},
// 监听回车
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
input1
.
$refs
.
input
.
focus
()
})
},
created
()
{
if
(
this
.
$store
.
getters
.
searchParams
[
this
.
$route
.
path
])
{
const
{
searchParams
}
=
this
.
$store
.
getters
;
const
{
path
}
=
this
.
$route
...
...
src/views/sample/basicInformation/index.vue
View file @
f3ead098
...
...
@@ -130,22 +130,22 @@
<
el
-
dialog
title
=
"样品库信息"
:
visible
.
sync
=
"open"
width
=
"500px"
append
-
to
-
body
:
close
-
on
-
click
-
modal
=
"false"
@
close
=
"cancel"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
size
=
"small"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
"pn"
prop
=
"pn"
>
<
el
-
input
v
-
model
.
trim
=
"form.pn"
:
maxlength
=
"30"
placeholder
=
"请输入pn
"
/>
<
el
-
input
ref
=
"input1"
v
-
model
.
trim
=
"form.pn"
:
maxlength
=
"30"
placeholder
=
"请输入pn"
@
keyup
.
enter
.
native
=
"handelTab(1,$event)
"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"name"
prop
=
"name"
>
<
el
-
input
v
-
model
.
trim
=
"form.name"
:
maxlength
=
"30"
placeholder
=
"请输入name
"
/>
<
el
-
input
ref
=
"input2"
v
-
model
.
trim
=
"form.name"
:
maxlength
=
"30"
placeholder
=
"请输入name"
@
keyup
.
enter
.
native
=
"handelTab(2,$event)
"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"qty"
prop
=
"qty"
>
<
el
-
input
v
-
model
.
trim
=
"form.qty"
:
maxlength
=
"30"
placeholder
=
"请输入qty
"
/>
<
el
-
input
ref
=
"input3"
v
-
model
.
trim
=
"form.qty"
:
maxlength
=
"30"
placeholder
=
"请输入qty"
@
keyup
.
enter
.
native
=
"handelTab(3,$event)
"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"maxQty"
prop
=
"maxQty"
>
<
el
-
input
v
-
model
.
trim
=
"form.maxQty"
:
maxlength
=
"30"
placeholder
=
"请输入max_qty
"
/>
<
el
-
input
ref
=
"input4"
v
-
model
.
trim
=
"form.maxQty"
:
maxlength
=
"30"
placeholder
=
"请输入max_qty"
@
keyup
.
enter
.
native
=
"handelTab(4,$event)
"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"minQty"
prop
=
"minQty"
>
<
el
-
input
v
-
model
.
trim
=
"form.minQty"
:
maxlength
=
"30"
placeholder
=
"请输入min_qty
"
/>
<
el
-
input
ref
=
"input5"
v
-
model
.
trim
=
"form.minQty"
:
maxlength
=
"30"
placeholder
=
"请输入min_qty"
@
keyup
.
enter
.
native
=
"handelTab(5,$event)
"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"unit"
prop
=
"unit"
>
<
el
-
input
v
-
model
.
trim
=
"form.unit"
:
maxlength
=
"30"
placeholder
=
"请输入unit
"
/>
<
el
-
input
ref
=
"input6"
v
-
model
.
trim
=
"form.unit"
:
maxlength
=
"30"
placeholder
=
"请输入unit"
@
keyup
.
enter
.
native
=
"handelTab(6,$event)
"
/>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
...
...
@@ -192,6 +192,23 @@ export default {
this
.
getList
()
}
,
methods
:
{
// 回车跳转下一个输入框
focusNextInput
(
form
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
form
].
$refs
.
input
.
focus
()
}
)
}
,
// 回车到下一个输入框方法
handelTab
(
i
,
e
)
{
const
that
=
this
if
(
that
.
$refs
[
'input'
+
i
])
{
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
}
)
}
}
,
// 清空表单
reFrom
()
{
this
.
form
=
{
...
...
src/views/sample/correctionLibrary/index.vue
View file @
f3ead098
...
...
@@ -112,22 +112,22 @@
<
el
-
dialog
title
=
"库存修正信息"
:
visible
.
sync
=
"open"
width
=
"500px"
append
-
to
-
body
:
close
-
on
-
click
-
modal
=
"false"
@
close
=
"cancel"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
size
=
"small"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
"pn"
prop
=
"pn"
>
<
el
-
input
v
-
model
.
trim
=
"form.pn"
:
maxlength
=
"30"
placeholder
=
"请输入pn"
/>
<
el
-
input
v
-
model
.
trim
=
"form.pn"
:
maxlength
=
"30"
placeholder
=
"请输入pn"
ref
=
"input1"
@
keyup
.
enter
.
native
=
"handelTab(1,$event)"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"name"
prop
=
"name"
>
<
el
-
input
v
-
model
.
trim
=
"form.name"
:
maxlength
=
"30"
placeholder
=
"请输入name"
/>
<
el
-
input
v
-
model
.
trim
=
"form.name"
:
maxlength
=
"30"
placeholder
=
"请输入name"
ref
=
"input2"
@
keyup
.
enter
.
native
=
"handelTab(2,$event)"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"qty"
prop
=
"qty"
>
<
el
-
input
v
-
model
.
trim
=
"form.qty"
:
maxlength
=
"30"
placeholder
=
"请输入qty"
/>
<
el
-
input
v
-
model
.
trim
=
"form.qty"
:
maxlength
=
"30"
placeholder
=
"请输入qty"
ref
=
"input3"
@
keyup
.
enter
.
native
=
"handelTab(3,$event)"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"maxQty"
prop
=
"maxQty"
>
<
el
-
input
v
-
model
.
trim
=
"form.maxQty"
:
maxlength
=
"30"
placeholder
=
"请输入max_qty"
/>
<
el
-
input
v
-
model
.
trim
=
"form.maxQty"
:
maxlength
=
"30"
placeholder
=
"请输入max_qty"
ref
=
"input4"
@
keyup
.
enter
.
native
=
"handelTab(4,$event)"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"minQty"
prop
=
"minQty"
>
<
el
-
input
v
-
model
.
trim
=
"form.minQty"
:
maxlength
=
"30"
placeholder
=
"请输入min_qty"
/>
<
el
-
input
v
-
model
.
trim
=
"form.minQty"
:
maxlength
=
"30"
placeholder
=
"请输入min_qty"
ref
=
"input5"
@
keyup
.
enter
.
native
=
"handelTab(5,$event)"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"unit"
prop
=
"unit"
>
<
el
-
input
v
-
model
.
trim
=
"form.unit"
:
maxlength
=
"30"
placeholder
=
"请输入unit"
/>
<
el
-
input
v
-
model
.
trim
=
"form.unit"
:
maxlength
=
"30"
placeholder
=
"请输入unit"
ref
=
"input6"
@
keyup
.
enter
.
native
=
"handelTab(6,$event)"
/>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
...
...
@@ -174,6 +174,23 @@ export default {
this
.
getList
()
}
,
methods
:
{
// 回车跳转下一个输入框
focusNextInput
(
form
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
form
].
$refs
.
input
.
focus
()
}
)
}
,
// 回车到下一个输入框方法
handelTab
(
i
,
e
)
{
const
that
=
this
if
(
that
.
$refs
[
'input'
+
i
])
{
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
}
)
}
}
,
// 清空表单
reFrom
()
{
this
.
form
=
{
...
...
src/views/sample/inventoryRecord/index.vue
View file @
f3ead098
...
...
@@ -115,13 +115,13 @@
<el-row
:gutter=
"10"
justify=
"start"
align=
"middle"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"pn:"
prop=
"pn"
>
<el-input
v-model
.
trim=
"singleDetails.pn"
:readonly=
"isReadOnly"
/>
<el-input
v-model
.
trim=
"singleDetails.pn"
:readonly=
"isReadOnly"
ref=
"input1"
@
keyup
.
enter
.
native=
"handelTab(1,$event)"
/>
</el-form-item>
<el-form-item
label=
"lot:"
prop=
"lot"
>
<el-input
v-model
.
trim=
"singleDetails.lot"
:readonly=
"isReadOnly"
/>
<el-input
v-model
.
trim=
"singleDetails.lot"
:readonly=
"isReadOnly"
ref=
"input2"
@
keyup
.
enter
.
native=
"handelTab(2,$event)"
/>
</el-form-item>
<el-form-item
label=
"unit:"
prop=
"unit"
>
<el-input
v-model
.
trim=
"singleDetails.unit"
:readonly=
"isReadOnly"
/>
<el-input
v-model
.
trim=
"singleDetails.unit"
:readonly=
"isReadOnly"
ref=
"input3"
@
keyup
.
enter
.
native=
"handelTab(3,$event)"
/>
</el-form-item>
</el-col>
...
...
@@ -133,7 +133,7 @@
{{
singleDetails
.
qty
}}
</el-form-item>
<el-form-item
label=
"memo:"
prop=
"memo"
>
<el-input
v-model
.
trim=
"singleDetails.memo"
:readonly=
"isReadOnly"
/>
<el-input
v-model
.
trim=
"singleDetails.memo"
:readonly=
"isReadOnly"
ref=
"input4"
@
keyup
.
enter
.
native=
"handelTab(4,$event)"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -141,13 +141,13 @@
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"操作员:"
prop=
"userName"
>
<el-input
v-model
.
trim=
"singleDetails.userName"
:readonly=
"isReadOnly"
/>
<el-input
v-model
.
trim=
"singleDetails.userName"
:readonly=
"isReadOnly"
ref=
"input5"
@
keyup
.
enter
.
native=
"handelTab(5,$event)"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"操作时间:"
prop=
"createDate"
>
<el-input
v-model
.
trim=
"singleDetails.createDate"
:readonly=
"isReadOnly"
/>
<el-input
v-model
.
trim=
"singleDetails.createDate"
:readonly=
"isReadOnly"
ref=
"input6"
@
keyup
.
enter
.
native=
"handelTab(6,$event)"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -354,10 +354,28 @@ export default {
created
()
{
this
.
getList
()
},
// 监听回车
mounted
()
{
this
.
$refs
.
autoGetFocusInput
.
focus
()
},
methods
:
{
// 回车跳转下一个输入框
focusNextInput
(
form
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
form
].
$refs
.
input
.
focus
()
})
},
// 回车到下一个输入框方法
handelTab
(
i
,
e
)
{
const
that
=
this
if
(
that
.
$refs
[
'input'
+
i
])
{
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
})
}
},
/** TODO:查询工序库的出入库记录列表 */
getList
()
{
this
.
loading
=
true
...
...
src/views/sample/sampleType/index.vue
View file @
f3ead098
...
...
@@ -130,13 +130,13 @@
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"500px"
append
-
to
-
body
:
close
-
on
-
click
-
modal
=
"false"
@
close
=
"cancel"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
size
=
"small"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
"pn"
prop
=
"pn"
>
<
el
-
input
v
-
model
.
trim
=
"form.pn"
clearable
:
maxlength
=
"100"
placeholder
=
"请输入pn"
/>
<
el
-
input
v
-
model
.
trim
=
"form.pn"
clearable
:
maxlength
=
"100"
placeholder
=
"请输入pn"
ref
=
"input1"
@
keyup
.
enter
.
native
=
"handelTab(1,$event)"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"dname"
prop
=
"dname"
>
<
el
-
input
v
-
model
.
trim
=
"form.dname"
clearable
:
maxlength
=
"100"
placeholder
=
"请输入dname"
/>
<
el
-
input
v
-
model
.
trim
=
"form.dname"
clearable
:
maxlength
=
"100"
placeholder
=
"请输入dname"
ref
=
"input2"
@
keyup
.
enter
.
native
=
"handelTab(2,$event)"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"dno"
prop
=
"dno"
>
<
el
-
input
v
-
model
.
trim
=
"form.dno"
clearable
:
maxlength
=
"100"
placeholder
=
"请输入dno"
/>
<
el
-
input
v
-
model
.
trim
=
"form.dno"
clearable
:
maxlength
=
"100"
placeholder
=
"请输入dno"
ref
=
"input3"
@
keyup
.
enter
.
native
=
"handelTab(3,$event)"
/>
<
/el-form-item
>
<!--
<
el
-
form
-
item
label
=
"remarks"
prop
=
"remarks"
>-->
<!--
<
el
-
input
v
-
model
.
trim
=
"form.remarks"
:
maxlength
=
"30"
placeholder
=
"请输入remarks"
/>-->
...
...
@@ -203,6 +203,23 @@ export default {
this
.
getList
()
}
,
methods
:
{
// 回车跳转下一个输入框
focusNextInput
(
form
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
form
].
$refs
.
input
.
focus
()
}
)
}
,
// 回车到下一个输入框方法
handelTab
(
i
,
e
)
{
const
that
=
this
if
(
that
.
$refs
[
'input'
+
i
])
{
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
}
)
}
}
,
// 删除
handleDelete
(
row
)
{
const
id
=
row
.
businessId
...
...
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