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
333f06bb
Commit
333f06bb
authored
Aug 02, 2023
by
刘宇扬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入库
parent
b13137b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
21 deletions
+31
-21
income.vue
src/views/equipment/income.vue
+31
-21
No files found.
src/views/equipment/income.vue
View file @
333f06bb
...
@@ -21,15 +21,15 @@
...
@@ -21,15 +21,15 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
style=
"flex-basis: 50%;"
>
<el-form-item
style=
"flex-basis: 50%;"
>
<el-button
ref=
"input4"
type=
"primary"
@
click=
"handleConfirm"
>
确认
</el-button>
<el-button
ref=
"input4"
type=
"primary"
@
click=
"handleConfirm"
>
确认
</el-button>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
<div
style=
"width: 82%; margin-left: 80px; padding-left: 8.6%;"
>
<div
style=
"width: 82%; margin-left: 80px; padding-left: 8.6%;"
>
<el-table
border
:data=
"tableData"
:gutter=
"40"
>
<el-table
border
:data=
"tableData"
:gutter=
"40"
>
<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"
>
{{
scope
.
row
.
pn
||
'-'
}}
{{
scope
.
row
.
pn
||
'-'
}}
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
<el-form
label-width=
"80px"
>
<el-form
label-width=
"80px"
>
<el-row
style=
"padding-left: 8.6%; padding-top: 1%"
>
<el-row
style=
"padding-left: 8.6%; padding-top: 1%"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
style=
"flex-basis: 50%;"
>
<el-form-item
style=
"flex-basis: 50%;"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
提交
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
提交
</el-button>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -121,8 +121,7 @@ export default {
...
@@ -121,8 +121,7 @@ export default {
{
required
:
true
,
message
:
'请输入位置'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入位置'
,
trigger
:
'blur'
},
{
pattern
:
/^
[^
[
\u
D800-
\u
DFFF
]
+$/
,
message
:
'不能包含表情符号'
,
trigger
:
'change'
},
{
pattern
:
/^
[^
[
\u
D800-
\u
DFFF
]
+$/
,
message
:
'不能包含表情符号'
,
trigger
:
'change'
},
{
max
:
100
,
message
:
'输入长度不能超过100个字符'
,
trigger
:
'change'
}
{
max
:
100
,
message
:
'输入长度不能超过100个字符'
,
trigger
:
'change'
}
],
]
phd
:
[{
pattern
:
/^
\d
+$/
,
message
:
'仅能输入整数'
,
trigger
:
'change'
}]
}
}
}
}
},
},
...
@@ -178,11 +177,10 @@ export default {
...
@@ -178,11 +177,10 @@ export default {
lot
,
lot
,
phd
phd
}
}
if
(
this
.
form
.
index
===
undefined
)
{
if
(
this
.
form
.
index
===
undefined
)
{
if
(
this
.
tableData
.
length
)
{
if
(
this
.
tableData
.
length
)
{
this
.
tableData
.
forEach
((
item
,
index
)
=>
{
this
.
tableData
.
forEach
((
item
,
index
)
=>
{
console
.
log
(
'item'
,
item
)
console
.
log
(
'pn'
,
this
.
form
.
pn
)
if
(
item
.
pn
===
this
.
form
.
pn
)
{
if
(
item
.
pn
===
this
.
form
.
pn
)
{
this
.
flag
=
true
this
.
flag
=
true
this
.
index
=
index
+
1
this
.
index
=
index
+
1
...
@@ -190,6 +188,20 @@ export default {
...
@@ -190,6 +188,20 @@ export default {
})
})
if
(
this
.
flag
)
{
if
(
this
.
flag
)
{
this
.
$message
.
warning
(
'与第'
+
this
.
index
+
'条pn值重复'
)
this
.
$message
.
warning
(
'与第'
+
this
.
index
+
'条pn值重复'
)
}
else
{
if
(
this
.
form
.
phd
%
1
!==
0
)
{
this
.
$message
.
warning
(
'厚度要为整数'
)
}
else
{
this
.
tableData
.
push
(
newRow
)
// 清空输入框
this
.
form
.
pn
=
''
this
.
form
.
lot
=
''
this
.
form
.
phd
=
''
}
}
}
else
{
if
(
this
.
form
.
phd
%
1
!==
0
)
{
this
.
$message
.
warning
(
'厚度为整数'
)
}
else
{
}
else
{
this
.
tableData
.
push
(
newRow
)
this
.
tableData
.
push
(
newRow
)
// 清空输入框
// 清空输入框
...
@@ -197,12 +209,6 @@ export default {
...
@@ -197,12 +209,6 @@ export default {
this
.
form
.
lot
=
''
this
.
form
.
lot
=
''
this
.
form
.
phd
=
''
this
.
form
.
phd
=
''
}
}
}
else
{
this
.
tableData
.
push
(
newRow
)
// 清空输入框
this
.
form
.
pn
=
''
this
.
form
.
lot
=
''
this
.
form
.
phd
=
''
}
}
}
else
{
}
else
{
let
number
=
0
let
number
=
0
...
@@ -217,13 +223,17 @@ export default {
...
@@ -217,13 +223,17 @@ export default {
if
(
flag
)
{
if
(
flag
)
{
this
.
$message
.
warning
(
'与第'
+
number
+
'条pn值重复'
)
this
.
$message
.
warning
(
'与第'
+
number
+
'条pn值重复'
)
}
else
{
}
else
{
this
.
tableData
[
this
.
form
.
index
].
pn
=
this
.
form
.
pn
if
(
this
.
form
.
phd
%
1
!==
0
)
{
this
.
tableData
[
this
.
form
.
index
].
lot
=
this
.
form
.
lot
this
.
$message
.
warning
(
'厚度要为整数'
)
this
.
tableData
[
this
.
form
.
index
].
phd
=
this
.
form
.
phd
}
else
{
this
.
form
.
pn
=
''
this
.
tableData
[
this
.
form
.
index
].
pn
=
this
.
form
.
pn
this
.
form
.
lot
=
''
this
.
tableData
[
this
.
form
.
index
].
lot
=
this
.
form
.
lot
this
.
form
.
phd
=
''
this
.
tableData
[
this
.
form
.
index
].
phd
=
this
.
form
.
phd
this
.
form
.
index
=
undefined
this
.
form
.
pn
=
''
this
.
form
.
lot
=
''
this
.
form
.
phd
=
''
this
.
form
.
index
=
undefined
}
}
}
}
}
}
}
...
...
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