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
83ed0627
Commit
83ed0627
authored
Jul 30, 2023
by
刘宇扬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入库
parent
e3427136
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
9 deletions
+32
-9
income.vue
src/views/equipment/income.vue
+32
-9
No files found.
src/views/equipment/income.vue
View file @
83ed0627
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getDictData
,
addIncome
}
from
'@/api/income
'
import
{
add
,
updatadevice
}
from
'@/api/magnagement
'
export
default
{
export
default
{
name
:
'Role'
,
name
:
'Role'
,
...
@@ -102,17 +102,40 @@ export default {
...
@@ -102,17 +102,40 @@ export default {
},
},
// 提交时要调的接口
// 提交时要调的接口
submitForm
()
{
submitForm
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
console
.
log
(
'form'
,
this
.
form
)
// 校验通过,提交表单或进行其他操作
if
(
this
.
form
.
businessId
!==
undefined
)
{
updatadevice
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
open
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
this
.
reFrom
()
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
}
})
}
else
{
add
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
open
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
this
.
reFrom
()
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
}
})
}
}
else
{
// 校验失败,显示错误信息或进行其他操作
}
})
},
},
// 调数据字典查询
// 调数据字典查询
getDict
()
{
getDict
()
{
const
obj
=
{
key
:
'GX_CODE'
}
getDictData
(
obj
).
then
(
res
=>
{
if
(
res
.
code
===
200
&&
res
.
data
!==
null
)
{
this
.
pissbList
=
res
.
data
}
})
}
}
}
}
}
}
...
...
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