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
4d659c21
Commit
4d659c21
authored
Dec 16, 2023
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.在设备入库 位置后加个寿命 数据类型是正整数
parent
4c15678b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
18 deletions
+28
-18
income.vue
src/views/equipment/income.vue
+28
-18
No files found.
src/views/equipment/income.vue
View file @
4d659c21
...
@@ -71,6 +71,11 @@
...
@@ -71,6 +71,11 @@
<el-input
v-model=
"form.plocation"
placeholder=
"请输入位置"
:style=
"{ width: '400px', height: '30px' }"
:maxlength=
"100"
/>
<el-input
v-model=
"form.plocation"
placeholder=
"请输入位置"
:style=
"{ width: '400px', height: '30px' }"
:maxlength=
"100"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"寿命:"
style=
"flex-basis: 50%;"
prop=
"psm"
>
<el-input
v-model=
"form.psm"
placeholder=
"请输入寿命"
:style=
"{ width: '400px', height: '30px' }"
:maxlength=
"9"
/>
</el-form-item>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
<el-form
label-width=
"80px"
>
<el-form
label-width=
"80px"
>
...
@@ -78,7 +83,7 @@
...
@@ -78,7 +83,7 @@
<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-button
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -104,7 +109,8 @@ export default {
...
@@ -104,7 +109,8 @@ export default {
phd
:
''
,
phd
:
''
,
flag
:
1
,
flag
:
1
,
ptype
:
1
,
ptype
:
1
,
pstatus
:
0
pstatus
:
0
,
psm
:
undefined
},
},
tableData
:
[],
// 表格数据
tableData
:
[],
// 表格数据
selectedRows
:
[],
selectedRows
:
[],
...
@@ -125,6 +131,10 @@ export default {
...
@@ -125,6 +131,10 @@ 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'
}
],
psm
:
[
{
required
:
true
,
message
:
'请输入寿命'
,
trigger
:
'blur'
},
{
pattern
:
/^
[
1-9
]\d
*$/
,
message
:
'请输入正整数'
,
trigger
:
'blur'
}
]
]
}
}
}
}
...
@@ -161,7 +171,8 @@ export default {
...
@@ -161,7 +171,8 @@ export default {
phd
:
''
,
phd
:
''
,
flag
:
1
,
flag
:
1
,
ptype
:
1
,
ptype
:
1
,
pstatus
:
0
pstatus
:
0
,
psm
:
undefined
}
}
this
.
tableData
=
[]
this
.
tableData
=
[]
},
},
...
@@ -298,7 +309,7 @@ export default {
...
@@ -298,7 +309,7 @@ export default {
lot
:
''
,
lot
:
''
,
plocation
:
''
,
plocation
:
''
,
phd
:
''
,
phd
:
''
,
psm
:
''
,
psm
:
undefined
,
pzl
:
''
,
pzl
:
''
,
prank
:
''
prank
:
''
}
}
...
@@ -316,18 +327,16 @@ export default {
...
@@ -316,18 +327,16 @@ export default {
this
.
$message
.
warning
(
'请先确定表格数据'
)
this
.
$message
.
warning
(
'请先确定表格数据'
)
return
return
}
}
this
.
$confirm
(
'是否确认操作?'
,
'提示'
,
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
confirmButtonText
:
'确定'
,
if
(
valid
)
{
cancelButtonText
:
'取消'
,
this
.
$confirm
(
'是否确认操作?'
,
'提示'
,
{
type
:
'warning'
confirmButtonText
:
'确定'
,
}).
then
(()
=>
{
cancelButtonText
:
'取消'
,
// const newRow = {
type
:
'warning'
// plocation
}).
then
(()
=>
{
// }
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
console
.
log
(
'form'
,
this
.
form
)
console
.
log
(
'form'
,
this
.
form
)
this
.
tableData
.
forEach
(
item
=>
{
this
.
tableData
.
forEach
(
item
=>
{
item
.
psm
=
this
.
form
.
psm
item
.
plocation
=
this
.
form
.
plocation
item
.
plocation
=
this
.
form
.
plocation
})
})
add
(
this
.
tableData
).
then
(
res
=>
{
add
(
this
.
tableData
).
then
(
res
=>
{
...
@@ -336,16 +345,17 @@ export default {
...
@@ -336,16 +345,17 @@ export default {
this
.
$message
.
success
(
'操作成功'
)
this
.
$message
.
success
(
'操作成功'
)
this
.
tableData
=
[]
this
.
tableData
=
[]
this
.
form
.
plocation
=
''
this
.
form
.
plocation
=
''
this
.
form
.
psm
=
undefined
}
else
if
(
res
.
code
===
null
)
{
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
this
.
$message
.
error
(
res
.
message
)
// this.tableData = []
// this.tableData = []
// this.form.plocation = ''
// this.form.plocation = ''
}
}
})
})
}
else
{
}
)
// 校验失败,显示错误信息或进行其他操作
}
else
{
}
// 校验失败,显示错误信息或进行其他操作
}
)
}
})
})
},
},
// 调数据字典查询
// 调数据字典查询
...
...
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