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
9fd7a8fe
Commit
9fd7a8fe
authored
Jul 29, 2023
by
kzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备库中的开始盘点和结束盘点成功
parent
0949ba1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
28 deletions
+104
-28
check.js
src/api/equipment/check.js
+25
-0
check.vue
src/views/equipment/check.vue
+44
-11
checkProcess.vue
src/views/equipment/checkProcess.vue
+35
-17
No files found.
src/api/equipment/check.js
View file @
9fd7a8fe
...
...
@@ -20,3 +20,28 @@ export function abandon(data) {
}
})
}
export
function
checkType
(
data
){
return
request
({
url
:
'/wbwarehouseinventorytemp/checkType/'
+
data
,
method
:
'get'
})
}
export
function
addList
(
data
){
return
request
({
url
:
'/wbwarehouseinventorytemp/addList'
,
method
:
'post'
,
data
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
}
})
}
export
function
deleteByType
(
data
){
return
request
({
url
:
'/wbwarehouseinventorytemp/deleteByType/'
+
data
,
method
:
'delete'
})
}
\ No newline at end of file
src/views/equipment/check.vue
View file @
9fd7a8fe
...
...
@@ -38,19 +38,13 @@
</el-form-item>
<div
style=
"float: right"
>
<el-form-item>
<el-button
style=
"padding: 8px 7px;"
:type=
"typePrimary"
:size=
"smallSize"
:icon=
"addIcon"
@
click=
"
handleAdd
"
>
开始盘点
{{
check
}}
</el-button>
<el-button
style=
"padding: 8px 7px;"
:type=
"typePrimary"
:size=
"smallSize"
:icon=
"addIcon"
@
click=
"
checkType
"
>
开始盘点
{{
check
}}
</el-button>
</el-form-item>
<!-- 这俩都没写接口以及方法 -->
<el-form-item>
<el-button
style=
"padding: 8px 7px;"
type=
"danger"
:size=
"smallSize"
icon=
"el-icon-minus"
>
结束盘点
{{
check
}}
</el-button>
<el-button
style=
"padding: 8px 7px;"
type=
"danger"
:size=
"smallSize"
@
click=
"deleteByType"
icon=
"el-icon-minus"
>
结束盘点
{{
check
}}
</el-button>
</el-form-item>
</div>
</el-form>
<div
class=
"placeholder"
/>
...
...
@@ -229,7 +223,7 @@ import {
getRole
,
updateRole
}
from
'@/api/system/role'
import
{
listCheck
}
from
'@/api/equipment/check'
import
{
checkType
,
listCheck
,
addList
,
deleteByType
}
from
'@/api/equipment/check'
import
{
roleMenuTreeselect
,
roleMenuTreeselectMC
,
treeselect
as
menuTreeselect
}
from
'@/api/system/menu'
import
{
roleDeptTreeselect
,
treeselect
as
deptTreeselect
}
from
'@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template'
...
...
@@ -237,6 +231,13 @@ export default {
name
:
'Role'
,
data
()
{
return
{
// 需要盘点的list
checkFrom
:
{
Ptype
:
''
,
checkList
:
[],
},
// 选中的列表
selectList
:[],
// TODO: 表单里的单项详情参数
singleDetails
:
{
equipmentName
:
''
,
...
...
@@ -400,6 +401,37 @@ export default {
this
.
title
=
'详情信息'
this
.
openDetails
=
!
this
.
openDetails
},
deleteByType
(){
deleteByType
(
1
).
then
(
flag
=>
{
if
(
flag
.
data
>
0
){
this
.
$message
.
success
(
"结束盘点成功"
)
}
else
{
this
.
$message
.
error
(
"结束盘点失败"
)
}
})
},
checkType
(){
checkType
(
1
).
then
(
total
=>
{
if
(
total
.
data
!==
0
){
this
.
$message
.
error
(
"请先结束盘点"
)
}
else
{
let
data
=
[]
if
(
this
.
selectList
.
length
===
0
){
data
=
this
.
equipmentList
}
else
{
data
=
this
.
selectList
}
addList
(
data
).
then
(
flag
=>
{
if
(
flag
.
data
.
influence
>
0
){
this
.
$message
.
success
(
"盘点成功"
)
}
else
{
this
.
$message
.
error
(
"盘点失败"
)
}
})
}
})
},
handelTab
(
i
,
e
)
{
const
that
=
this
if
(
!
that
.
$refs
[
'input'
+
i
])
{
...
...
@@ -565,6 +597,7 @@ export default {
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
roleId
)
this
.
selectList
=
selection
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
...
...
src/views/equipment/checkProcess.vue
View file @
9fd7a8fe
...
...
@@ -38,24 +38,11 @@
</el-form-item>
<div
style=
"float: right"
>
<el-form-item>
<el-button
style=
"padding: 8px 7px;"
:type=
"typePrimary"
:size=
"smallSize"
:icon=
"addIcon"
>
开始盘点
{{
check
}}
</el-button>
<el-button
style=
"padding: 8px 7px;"
:type=
"typePrimary"
:size=
"smallSize"
:icon=
"addIcon"
@
click=
"checkType"
>
开始盘点
{{
check
}}
</el-button>
</el-form-item>
<el-form-item>
<el-button
style=
"padding: 8px 7px;"
type=
"danger"
:size=
"smallSize"
icon=
"el-icon-minus"
>
结束盘点
{{
check
}}
</el-button>
<el-button
style=
"padding: 8px 7px;"
type=
"danger"
:size=
"smallSize"
@
click=
"deleteByType"
icon=
"el-icon-minus"
>
结束盘点
{{
check
}}
</el-button>
</el-form-item>
</div>
</el-form>
...
...
@@ -236,7 +223,8 @@ import {
listRole
,
updateRole
}
from
'@/api/system/role'
import
{
listCheck
}
from
'@/api/equipment/check'
import
{
listCheck
}
from
'@/api/equipment/checkProcess'
import
{
checkType
,
addList
,
deleteByType
}
from
'@/api/equipment/check'
import
{
roleMenuTreeselect
,
roleMenuTreeselectMC
,
treeselect
as
menuTreeselect
}
from
'@/api/system/menu'
import
{
roleDeptTreeselect
,
treeselect
as
deptTreeselect
}
from
'@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template'
...
...
@@ -403,6 +391,36 @@ export default {
this
.
title
=
'详情信息'
this
.
openDetails
=
!
this
.
openDetails
},
deleteByType
(){
deleteByType
(
2
).
then
(
flag
=>
{
if
(
flag
.
data
>
0
){
this
.
$message
.
success
(
"结束盘点成功"
)
}
else
{
this
.
$message
.
error
(
"结束盘点失败"
)
}
})
},
checkType
(){
checkType
(
2
).
then
(
total
=>
{
if
(
total
.
data
!==
0
){
this
.
$message
.
error
(
"请先结束盘点"
)
}
else
{
let
data
=
[]
if
(
this
.
selectList
.
length
===
0
){
data
=
this
.
equipmentList
}
else
{
data
=
this
.
selectList
}
addList
(
data
).
then
(
flag
=>
{
if
(
flag
.
data
.
influence
>
0
){
this
.
$message
.
success
(
"盘点成功"
)
}
else
{
this
.
$message
.
error
(
"盘点失败"
)
}
})
}
})
},
handelTab
(
i
,
e
)
{
const
that
=
this
if
(
!
that
.
$refs
[
'input'
+
i
])
{
...
...
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