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
e1634e19
Commit
e1634e19
authored
Aug 02, 2023
by
刘宇扬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改输入bug
parent
6da18ce7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
19 deletions
+14
-19
income.vue
src/views/equipment/income.vue
+14
-19
No files found.
src/views/equipment/income.vue
View file @
e1634e19
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<el-row
:gutter=
"40"
style=
"padding-left: 8.6%;"
>
<el-row
:gutter=
"40"
style=
"padding-left: 8.6%;"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"厚度:"
style=
"flex-basis: 50%;"
prop=
"phd"
>
<el-form-item
label=
"厚度:"
style=
"flex-basis: 50%;"
prop=
"phd"
>
<el-input
ref=
"input3"
v-model=
"form.phd"
placeholder=
"请输入厚度"
:style=
"
{ width: '400px', height: '30px' }" :maxlength="10
0
" @keyup.enter.native="handelTab(3,$event)" />
<el-input
ref=
"input3"
v-model=
"form.phd"
placeholder=
"请输入厚度"
:style=
"
{ width: '400px', height: '30px' }" :maxlength="10" @keyup.enter.native="handelTab(3,$event)" />
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
<el-table
border
:data=
"tableData"
style=
"width:
1250px; padding-left: 8
.6%;"
>
<el-table
border
:data=
"tableData"
style=
"width:
86.4%; padding-left: 13
.6%;"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"50px"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"50px"
/>
<el-table-column
label=
"pn"
prop=
"businessId"
>
<el-table-column
label=
"pn"
prop=
"businessId"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -106,17 +106,17 @@ export default {
...
@@ -106,17 +106,17 @@ export default {
rule
:
{
rule
:
{
pn
:
[
pn
:
[
{
required
:
true
,
message
:
'请输入pn'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入pn'
,
trigger
:
'blur'
},
{
max
:
100
,
message
:
'输入长度不能超过100个字符'
,
trigger
:
'
blur
'
}
{
max
:
100
,
message
:
'输入长度不能超过100个字符'
,
trigger
:
'
change
'
}
],
],
lot
:
[
lot
:
[
{
required
:
true
,
message
:
'请输入lot'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入lot'
,
trigger
:
'blur'
},
{
max
:
100
,
message
:
'输入长度不能超过100个字符'
,
trigger
:
'
blur
'
}
{
max
:
100
,
message
:
'输入长度不能超过100个字符'
,
trigger
:
'
change
'
}
],
],
plocation
:
[
plocation
:
[
{
required
:
true
,
message
:
'请输入位置'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入位置'
,
trigger
:
'blur'
},
{
max
:
100
,
message
:
'输入长度不能超过100个字符'
,
trigger
:
'
blur
'
}
{
max
:
100
,
message
:
'输入长度不能超过100个字符'
,
trigger
:
'
change
'
}
],
],
phd
:
[{
pattern
:
/^
\d
+$/
,
message
:
'仅能输入
数字
'
,
trigger
:
'change'
}]
phd
:
[{
pattern
:
/^
\d
+$/
,
message
:
'仅能输入
整数
'
,
trigger
:
'change'
}]
}
}
}
}
},
},
...
@@ -217,7 +217,6 @@ export default {
...
@@ -217,7 +217,6 @@ export default {
this
.
form
.
pn
=
''
this
.
form
.
pn
=
''
this
.
form
.
lot
=
''
this
.
form
.
lot
=
''
this
.
form
.
phd
=
''
this
.
form
.
phd
=
''
this
.
form
.
plocation
=
''
this
.
form
.
index
=
undefined
this
.
form
.
index
=
undefined
}
}
}
}
...
@@ -259,9 +258,6 @@ export default {
...
@@ -259,9 +258,6 @@ export default {
// 提交时要调的接口
// 提交时要调的接口
submitForm
()
{
submitForm
()
{
const
{
const
{
pn
,
lot
,
phd
,
plocation
plocation
}
=
this
.
form
}
=
this
.
form
if
(
this
.
tableData
.
length
===
0
)
{
if
(
this
.
tableData
.
length
===
0
)
{
...
@@ -274,9 +270,6 @@ export default {
...
@@ -274,9 +270,6 @@ export default {
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
const
newRow
=
{
const
newRow
=
{
pn
,
lot
,
phd
,
plocation
plocation
}
}
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
...
@@ -289,17 +282,19 @@ export default {
...
@@ -289,17 +282,19 @@ export default {
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
open
=
false
this
.
open
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
$message
.
success
(
'操作成功'
)
this
.
tableData
.
push
(
newRow
)
this
.
tableData
=
[]
// 清空输入框
this
.
form
.
plocation
=
''
this
.
form
.
pn
=
''
this
.
form
.
lot
=
''
this
.
form
.
phd
=
''
this
.
from
.
plocation
=
''
}
else
if
(
res
.
code
===
null
)
{
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
this
.
$message
.
error
(
res
.
message
)
this
.
tableData
=
[]
this
.
form
.
plocation
=
''
}
}
})
})
}
else
{
}
else
{
this
.
tableData
=
[]
this
.
tableData
.
push
(
newRow
)
// 清空输入框
this
.
from
.
plocation
=
''
// 校验失败,显示错误信息或进行其他操作
// 校验失败,显示错误信息或进行其他操作
}
}
})
})
...
...
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