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
89576c5b
Commit
89576c5b
authored
Oct 23, 2023
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改出库,再利用逻辑
parent
8475e486
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
465 additions
and
431 deletions
+465
-431
outbound.js
src/api/outbound.js
+10
-10
InventoryRecord.js
src/api/processMangement/InventoryRecord.js
+9
-1
index.vue
src/views/processManagement/deviceReuse/index.vue
+35
-8
index.vue
src/views/processManagement/equipmentOut/index.vue
+411
-412
No files found.
src/api/outbound.js
View file @
89576c5b
...
@@ -36,13 +36,13 @@ export function add(data) {
...
@@ -36,13 +36,13 @@ export function add(data) {
}
}
// 出库操作接口
// 出库操作接口
export
function
performOutbound
(
params
)
{
export
function
performOutbound
(
params
)
{
return
request
({
return
request
({
url
:
'/wbwarehouse/Outbound'
,
url
:
'/wbwarehouse/Outbound'
,
method
:
'post'
,
method
:
'post'
,
params
,
params
,
headers
:
{
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
,
'Content-Type'
:
'application/json;charset=UTF-8'
},
}
});
})
}
}
src/api/processMangement/InventoryRecord.js
View file @
89576c5b
...
@@ -35,10 +35,18 @@ export function exportInventoryRecord(params) {
...
@@ -35,10 +35,18 @@ export function exportInventoryRecord(params) {
})
})
}
}
// 测试导出数据
// 测试导出数据
export
function
exportTest
(){
export
function
exportTest
()
{
return
request
({
return
request
({
url
:
'/wbapply/exportTest'
,
url
:
'/wbapply/exportTest'
,
method
:
'get'
,
method
:
'get'
,
responseType
:
'blob'
responseType
:
'blob'
})
})
}
}
// WbWarehouseByLot
export
function
getWbWarehouseByLot
(
params
)
{
return
request
({
url
:
'/wbwarehouse/selectWbWarehouseByLot'
,
method
:
'get'
,
params
})
}
src/views/processManagement/deviceReuse/index.vue
View file @
89576c5b
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<!-- 表单区域-->
<!-- 表单区域-->
<el-form
ref=
"form"
:model=
"form"
:rules=
"rule"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rule"
label-width=
"80px"
:inline=
"true"
>
<!-- 标题-->
<!-- 标题-->
<div
class=
"info"
><span
class=
"title"
>
再利用
</span></div>
<div
class=
"info"
><span
class=
"title"
>
再利用
</span></div>
<el-row
:gutter=
"40"
>
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
style=
"padding-left: 10%;"
>
<el-col
:span=
"12"
style=
"padding-left: 10%;"
>
<el-form-item
label=
"
pn:"
style=
"flex-basis: 50%;"
prop=
"pn
"
>
<el-form-item
label=
"
lot:"
style=
"flex-basis: 50%;"
prop=
"lot
"
>
<el-input
ref=
"input
1"
v-model=
"form.pn"
placeholder=
"请输入pn"
clearable
style=
"width: 400px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"handelTab(1
,$event)"
/>
<el-input
ref=
"input
2"
v-model=
"form.lot"
placeholder=
"请输入lot"
clearable
style=
"width: 400px"
:maxlength=
"100"
@
blur=
"handleBlur"
@
keyup
.
enter
.
native=
"handelTab(2
,$event)"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"lot:"
style=
"flex-basis: 50%;"
prop=
"lot"
>
<el-form-item
label=
"pn:"
style=
"flex-basis: 50%;"
prop=
"pn"
>
<el-input
ref=
"input2"
v-model=
"form.lot"
placeholder=
"请输入lot"
clearable
style=
"width: 400px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"handelTab(2,$event)"
/>
<span>
{{
form
.
pn
}}
</span>
<!--
<el-input
ref=
"input1"
v-model=
"form.pn"
placeholder=
"请输入pn"
clearable
style=
"width: 400px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"handelTab(1,$event)"
/>
-->
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -34,10 +35,20 @@
...
@@ -34,10 +35,20 @@
<el-input
ref=
"input5"
v-model=
"form.psm"
placeholder=
"请输入psm"
clearable
style=
"width: 400px"
:maxlength=
"8"
@
keyup
.
enter
.
native=
"handelTab(5,$event)"
/>
<el-input
ref=
"input5"
v-model=
"form.psm"
placeholder=
"请输入psm"
clearable
style=
"width: 400px"
:maxlength=
"8"
@
keyup
.
enter
.
native=
"handelTab(5,$event)"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<!--
<el-col
:span=
"12"
>
-->
<!--
<el-form-item
label=
"pzl:"
style=
"flex-basis: 50%;"
prop=
"pzl"
>
-->
<!--
<el-input
ref=
"input6"
v-model=
"form.pzl"
placeholder=
"请输入pzl"
clearable
style=
"width: 400px"
:maxlength=
"8"
@
keyup
.
enter
.
native=
"handelTab(6,$event)"
/>
-->
<!--
</el-form-item>
-->
<!--
</el-col>
-->
</el-row>
<el-row>
<el-col
:span=
"24"
style=
"padding-left: 9%;"
>
<el-form-item
label=
"pzl:"
style=
"flex-basis: 50%;"
prop=
"pzl"
>
<el-form-item
label=
"pzl:"
style=
"flex-basis: 50%;"
prop=
"pzl"
>
<el-input
ref=
"input6"
v-model=
"form.pzl"
placeholder=
"请输入pzl"
clearable
style=
"width: 400px"
:maxlength=
"8"
@
keyup
.
enter
.
native=
"handelTab(6,$event)"
/>
<el-input
ref=
"input6"
v-model=
"form.pzl"
placeholder=
"请输入pzl"
clearable
style=
"width: 400px"
:maxlength=
"8"
@
keyup
.
enter
.
native=
"handelTab(6,$event)"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"当前pzl:"
>
<span>
{{
form
.
currentPzl
}}
</span>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
:gutter=
"40"
>
<el-row
:gutter=
"40"
>
...
@@ -68,6 +79,7 @@
...
@@ -68,6 +79,7 @@
<
script
>
<
script
>
import
{
recycle
}
from
'@/api/magnagement'
import
{
recycle
}
from
'@/api/magnagement'
import
{
getWbWarehouseByLot
}
from
'@/api/processMangement/InventoryRecord'
export
default
{
export
default
{
name
:
'Role'
,
name
:
'Role'
,
...
@@ -78,10 +90,11 @@ export default {
...
@@ -78,10 +90,11 @@ export default {
form
:
{
form
:
{
pn
:
''
,
pn
:
''
,
lot
:
''
,
lot
:
''
,
plocation
:
''
,
plocation
:
'
工序网板库
'
,
phd
:
''
,
phd
:
''
,
psm
:
''
,
psm
:
''
,
pzl
:
''
,
pzl
:
''
,
currentPzl
:
''
,
prank
:
''
,
prank
:
''
,
fq_ys
:
''
,
fq_ys
:
''
,
flag
:
1
,
flag
:
1
,
...
@@ -135,17 +148,31 @@ export default {
...
@@ -135,17 +148,31 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
handleBlur
()
{
if
(
this
.
form
.
lot
!==
null
&&
this
.
form
.
lot
!==
''
&&
this
.
form
.
lot
!==
undefined
)
{
const
obj
=
{
lot
:
this
.
form
.
lot
}
getWbWarehouseByLot
(
obj
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
this
.
form
.
pn
=
res
.
data
.
pn
this
.
form
.
plocation
=
'工序网板库'
this
.
form
.
currentPzl
=
res
.
data
.
pzl
})
}
},
resetQuery
()
{
resetQuery
()
{
this
.
form
=
{
this
.
form
=
{
pn
:
''
,
pn
:
''
,
lot
:
''
,
lot
:
''
,
plocation
:
''
,
plocation
:
'
工序网板库
'
,
phd
:
''
,
phd
:
''
,
psm
:
''
,
psm
:
''
,
pzl
:
''
,
pzl
:
''
,
prank
:
''
,
prank
:
''
,
flag
:
1
,
flag
:
1
,
ptype
:
''
,
ptype
:
''
,
currentPzl
:
''
,
pstatus
:
0
pstatus
:
0
}
}
sessionStorage
.
setItem
(
'recycleform'
,
JSON
.
stringify
(
this
.
form
))
sessionStorage
.
setItem
(
'recycleform'
,
JSON
.
stringify
(
this
.
form
))
...
...
src/views/processManagement/equipmentOut/index.vue
View file @
89576c5b
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
ref=
"queryForm"
style=
"padding: 0 0 0 10px"
:model=
"queryParams"
:inline=
"true"
>
<el-form
ref=
"queryForm"
style=
"padding: 0 0 0 10px"
:model=
"queryParams"
:inline=
"true"
>
<el-form-item
label=
"pn"
prop=
"pn"
>
<el-form-item
label=
"pn"
prop=
"pn"
>
<el-input
<el-input
v-model=
"queryParams.pn"
v-model=
"queryParams.pn"
placeholder=
"请输入pn"
placeholder=
"请输入pn"
clearable
clearable
:maxlength=
"30"
:maxlength=
"30"
size=
"small"
size=
"small"
style=
"width: 150px"
style=
"width: 150px"
@
keyup
.
enter
.
native=
"handleQuery"
@
keyup
.
enter
.
native=
"handleQuery"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"lot"
prop=
"lot"
>
<el-form-item
label=
"lot"
prop=
"lot"
>
<el-input
<el-input
v-model=
"queryParams.lot"
v-model=
"queryParams.lot"
placeholder=
"请输入lot"
placeholder=
"请输入lot"
clearable
clearable
:maxlength=
"30"
:maxlength=
"30"
size=
"small"
size=
"small"
style=
"width: 150px"
style=
"width: 150px"
@
keyup
.
enter
.
native=
"handleQuery"
@
keyup
.
enter
.
native=
"handleQuery"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"plocation"
prop=
"plocation"
>
<el-form-item
label=
"plocation"
prop=
"plocation"
>
<el-input
<el-input
v-model=
"queryParams.plocation"
v-model=
"queryParams.plocation"
placeholder=
"请输入plocation"
placeholder=
"请输入plocation"
clearable
clearable
:maxlength=
"30"
:maxlength=
"30"
size=
"small"
size=
"small"
style=
"width: 150px"
style=
"width: 150px"
@
keyup
.
enter
.
native=
"handleQuery"
@
keyup
.
enter
.
native=
"handleQuery"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"primary"
style=
"padding: 8px 7px;"
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"placeholder"
/>
<div
class=
"placeholder"
/>
<div
style=
"padding:5px 10px"
>
<div
style=
"padding:5px 10px"
>
<div
class=
"mb12 font-small-bold"
>
设备出库列表
</div>
<div
class=
"mb12 font-small-bold"
>
设备出库列表
</div>
<el-table
v-loading=
"loading"
border
:data=
"equipmentList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
border
:data=
"equipmentList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"80"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"80"
/>
<el-table-column
label=
"pn"
prop=
"businessId"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"pn"
prop=
"businessId"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
pn
||
'-'
}}
{{
scope
.
row
.
pn
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"lot"
prop=
"lot"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"lot"
prop=
"lot"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
lot
||
'-'
}}
{{
scope
.
row
.
lot
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"plocation"
prop=
"plocation"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"plocation"
prop=
"plocation"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
plocation
||
'-'
}}
{{
scope
.
row
.
plocation
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"fqYs"
prop=
"fqYs"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"fqYs"
prop=
"fqYs"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
fqYs
||
'-'
}}
{{
scope
.
row
.
fqYs
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作员"
prop=
"createName"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"操作员"
prop=
"createName"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
createName
||
'-'
}}
{{
scope
.
row
.
createName
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作时间"
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"updateDate"
>
<el-table-column
label=
"操作时间"
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"updateDate"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
updateDate
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm'
)
}}
</span>
<span>
{{
scope
.
row
.
updateDate
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm'
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"110px"
>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"110px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
:type=
"typeParent"
:size=
"size"
@
click=
"handleDetail(scope.row)"
>
<el-button
:type=
"typeParent"
:size=
"size"
@
click=
"handleDetail(scope.row)"
>
详情
详情
</el-button>
</el-button>
<el-button
<el-button
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
style=
"color: #49cec9"
style=
"color: #49cec9"
@
click=
"handleDelete(scope.row)"
@
click=
"handleDelete(scope.row)"
>
出库
</el-button>
>
出库
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</div>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.page"
:limit
.
sync=
"queryParams.rows"
@
pagination=
"getList"
/>
<!-- TODO: 单项详情信息表单配置 -->
<el-dialog
class=
"aboutSingleDetails"
:title=
"title"
:visible
.
sync=
"openDetails"
width=
"700px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"formDetails"
:model=
"singleDetails"
size=
"small"
label-width=
"90px"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"pn:"
prop=
"pn"
>
<el-input
v-model
.
trim=
"singleDetails.pn"
:readonly=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"lot:"
prop=
"workshop"
>
<el-input
v-model
.
trim=
"singleDetails.lot"
:readonly=
"true"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"plocation:"
prop=
"plocation"
>
<el-input
v-model
.
trim=
"singleDetails.plocation"
:readonly=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"fqYs:"
prop=
"fqYs"
>
<el-input
v-model
.
trim=
"singleDetails.fqYs"
:readonly=
"true"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"操作员:"
prop=
"createName"
>
<el-input
v-model
.
trim=
"singleDetails.createName"
:readonly=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
" 操作时间:"
prop=
"updateDate"
>
<el-input
v-model
.
trim=
"singleDetails.updateDate"
:readonly=
"true"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</div>
</div>
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.page"
:limit
.
sync=
"queryParams.rows"
@
pagination=
"getList"
/>
<!-- TODO: 单项详情信息表单配置 -->
<el-dialog
class=
"aboutSingleDetails"
:title=
"title"
:visible
.
sync=
"openDetails"
width=
"700px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"formDetails"
:model=
"singleDetails"
size=
"small"
label-width=
"90px"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"pn:"
prop=
"pn"
>
<el-input
v-model
.
trim=
"singleDetails.pn"
:readonly=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"lot:"
prop=
"workshop"
>
<el-input
v-model
.
trim=
"singleDetails.lot"
:readonly=
"true"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"plocation:"
prop=
"plocation"
>
<el-input
v-model
.
trim=
"singleDetails.plocation"
:readonly=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"fqYs:"
prop=
"fqYs"
>
<el-input
v-model
.
trim=
"singleDetails.fqYs"
:readonly=
"true"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"操作员:"
prop=
"createName"
>
<el-input
v-model
.
trim=
"singleDetails.createName"
:readonly=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
" 操作时间:"
prop=
"updateDate"
>
<el-input
v-model
.
trim=
"singleDetails.updateDate"
:readonly=
"true"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
listdevice
,
performOutbound
}
from
'@/api/outbound'
import
{
listdevice
,
performOutbound
}
from
'@/api/outbound'
import
{
listLog
}
from
'@/api/sample/inventoryRecord'
import
{
listLog
}
from
'@/api/sample/inventoryRecord'
export
default
{
export
default
{
name
:
'Role'
,
name
:
'Role'
,
data
()
{
data
()
{
return
{
return
{
// TODO: 表单里的单项详情参数
// TODO: 表单里的单项详情参数
equipmentList
:
[],
equipmentList
:
[],
handleSelectionChange
:
''
,
handleSelectionChange
:
''
,
singleDetails
:
{
singleDetails
:
{
equipmentName
:
''
,
equipmentName
:
''
,
equipmentCode
:
''
,
equipmentCode
:
''
,
lot
:
''
,
lot
:
''
,
location
:
''
,
location
:
''
,
thickness
:
''
,
thickness
:
''
,
createName
:
''
,
createName
:
''
,
createTime
:
''
createTime
:
''
},
// 是否显示弹出层(数据详情)
openDetails
:
false
,
// // TODO: 模拟测试数据
typeParent
:
'text'
,
typePrimary
:
'primary'
,
typeSuccess
:
'success'
,
nameParent
:
'删除'
,
resetName
:
'重置'
,
addName
:
'新增'
,
exportName
:
'导出'
,
updataName
:
'修改'
,
size
:
'mini'
,
smallSize
:
'small'
,
delicon
:
'el-icon-delete'
,
addIcon
:
'el-icon-plus'
,
exportIcon
:
'el-icon-download'
,
resetIcon
:
''
,
haspermi
:
[
'sys:user:delete'
],
resetHaspermi
:
[
'sys:user:resetPwd'
],
updateHaspermi
:
[
'sys:role:update'
],
addHaspermi
:
[
'sys:role:add'
],
exportHaspermi
:
[
'sys:role:export'
],
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 总条数
total
:
0
,
// 角色表格数据
roleList
:
[],
// 弹出层标题
title
:
''
,
// 是否显示弹出层
open
:
false
,
// 是否显示弹出层(数据权限)
openDataScope
:
false
,
// 日期范围
// dateRange: [],
// 菜单表格数据
menuList
:
[],
menuExpand
:
false
,
menuNodeAll
:
false
,
deptExpand
:
true
,
deptNodeAll
:
false
,
// 状态数据字典
statusOptions
:
[
{
dictLabel
:
'启用'
,
dictValue
:
'1'
},
},
// 是否显示弹出层(数据详情)
{
openDetails
:
false
,
dictLabel
:
'停用'
,
// // TODO: 模拟测试数据
dictValue
:
'0'
typeParent
:
'text'
,
}
typePrimary
:
'primary'
,
],
typeSuccess
:
'success'
,
// 数据范围选项
nameParent
:
'删除'
,
dataScopeOptions
:
[
resetName
:
'重置'
,
{
addName
:
'新增'
,
value
:
'1'
,
exportName
:
'导出'
,
label
:
'全部数据权限'
updataName
:
'修改'
,
size
:
'mini'
,
smallSize
:
'small'
,
delicon
:
'el-icon-delete'
,
addIcon
:
'el-icon-plus'
,
exportIcon
:
'el-icon-download'
,
resetIcon
:
''
,
haspermi
:
[
'sys:user:delete'
],
resetHaspermi
:
[
'sys:user:resetPwd'
],
updateHaspermi
:
[
'sys:role:update'
],
addHaspermi
:
[
'sys:role:add'
],
exportHaspermi
:
[
'sys:role:export'
],
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 总条数
total
:
0
,
// 角色表格数据
roleList
:
[],
// 弹出层标题
title
:
''
,
// 是否显示弹出层
open
:
false
,
// 是否显示弹出层(数据权限)
openDataScope
:
false
,
// 日期范围
// dateRange: [],
// 菜单表格数据
menuList
:
[],
menuExpand
:
false
,
menuNodeAll
:
false
,
deptExpand
:
true
,
deptNodeAll
:
false
,
// 状态数据字典
statusOptions
:
[
{
dictLabel
:
'启用'
,
dictValue
:
'1'
},
{
dictLabel
:
'停用'
,
dictValue
:
'0'
}
],
// 数据范围选项
dataScopeOptions
:
[
{
value
:
'1'
,
label
:
'全部数据权限'
},
{
value
:
'2'
,
label
:
'自定数据权限'
},
{
value
:
'3'
,
label
:
'本部门数据权限'
},
{
value
:
'4'
,
label
:
'本部门及以下数据权限'
},
{
value
:
'5'
,
label
:
'仅本人数据权限'
}
],
// 菜单列表
menuOptions
:
[],
// 部门列表
tOptions
:
[],
// 查询参数
queryParams
:
{
page
:
1
,
rows
:
10
,
pn
:
undefined
,
lot
:
undefined
,
plocation
:
undefined
,
ptype
:
1
,
pstatus
:
0
,
delFlag
:
0
},
},
// 表单参数
{
form
:
{
value
:
'2'
,
pn
:
''
,
label
:
'自定数据权限'
lot
:
''
,
plocation
:
''
,
fqYs
:
''
},
},
defaultProps
:
{
{
children
:
'children
'
,
value
:
'3
'
,
label
:
'
label
'
label
:
'
本部门数据权限
'
},
},
// 表单校验
{
rules
:
{
value
:
'4'
,
pn
:
[
label
:
'本部门及以下数据权限'
{
required
:
true
,
message
:
'请输入pn'
,
trigger
:
'change'
},
{
pattern
:
/^
[^
[
\u
D800-
\u
DFFF
]
+$/
,
message
:
'不能包含表情符号'
,
trigger
:
'change'
}
],
lot
:
[
{
required
:
true
,
message
:
'请输入lot'
,
trigger
:
'blur'
},
{
pattern
:
/^
[^
[
\u
D800-
\u
DFFF
]
+$/
,
message
:
'不能包含表情符号'
,
trigger
:
'change'
}
],
plocation
:
[
{
required
:
true
,
message
:
'请输入plocation'
,
trigger
:
'blur'
},
{
pattern
:
/^
[^
[
\u
D800-
\u
DFFF
]
+$/
,
message
:
'不能包含表情符号'
,
trigger
:
'change'
}
],
fqYs
:
[{
pattern
:
/^
[
1-9
]\d{0,8}
$/
,
message
:
'仅能输入整数'
,
trigger
:
'change'
}]
},
},
deptOptions
:
[],
{
formData
:
{}
value
:
'5'
,
label
:
'仅本人数据权限'
}
],
// 菜单列表
menuOptions
:
[],
// 部门列表
tOptions
:
[],
// 查询参数
queryParams
:
{
page
:
1
,
rows
:
10
,
pn
:
undefined
,
lot
:
undefined
,
plocation
:
undefined
,
ptype
:
1
,
pstatus
:
0
,
delFlag
:
0
},
// 表单参数
form
:
{
pn
:
''
,
lot
:
''
,
plocation
:
''
,
fqYs
:
''
},
defaultProps
:
{
children
:
'children'
,
label
:
'label'
},
// 表单校验
rules
:
{
pn
:
[
{
required
:
true
,
message
:
'请输入pn'
,
trigger
:
'change'
},
{
pattern
:
/^
[^
[
\u
D800-
\u
DFFF
]
+$/
,
message
:
'不能包含表情符号'
,
trigger
:
'change'
}
],
lot
:
[
{
required
:
true
,
message
:
'请输入lot'
,
trigger
:
'blur'
},
{
pattern
:
/^
[^
[
\u
D800-
\u
DFFF
]
+$/
,
message
:
'不能包含表情符号'
,
trigger
:
'change'
}
],
plocation
:
[
{
required
:
true
,
message
:
'请输入plocation'
,
trigger
:
'blur'
},
{
pattern
:
/^
[^
[
\u
D800-
\u
DFFF
]
+$/
,
message
:
'不能包含表情符号'
,
trigger
:
'change'
}
],
fqYs
:
[{
pattern
:
/^
[
1-9
]\d{0,8}
$/
,
message
:
'仅能输入整数'
,
trigger
:
'change'
}]
},
deptOptions
:
[],
formData
:
{}
}
},
mounted
()
{
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
path
:
this
.
$route
.
path
,
param
:
{
...
this
.
queryParams
}
}
})
next
()
},
created
()
{
if
(
this
.
$store
.
getters
.
searchParams
[
this
.
$route
.
path
])
{
const
{
searchParams
}
=
this
.
$store
.
getters
;
const
{
path
}
=
this
.
$route
const
param
=
JSON
.
parse
(
searchParams
[
path
])
// 保留着的查询条件
this
.
queryParams
=
{
...
param
}
}
this
.
getList
()
},
methods
:
{
handelTab
(
i
,
e
)
{
const
that
=
this
if
(
!
that
.
$refs
[
'input'
+
i
])
{
return
}
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
})
},
},
mounted
()
{
// TODO: 获取所选行详情信息操作
handleDetail
(
row
)
{
this
.
singleDetails
=
this
.
formReset
this
.
singleDetails
=
row
this
.
title
=
'详情信息'
this
.
openDetails
=
!
this
.
openDetails
},
},
/** 路由离开前存储筛选条件*/
/** 查询角色列表 */
beforeRouteLeave
(
to
,
from
,
next
)
{
getList
()
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
this
.
loading
=
true
path
:
this
.
$route
.
path
,
listdevice
(
this
.
queryParams
).
then
(
param
:
{
response
=>
{
...
this
.
queryParams
this
.
equipmentList
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
}
}
})
)
next
()
},
resetQuery
()
{
this
.
queryParams
=
{
page
:
1
,
rows
:
10
,
pn
:
undefined
,
lot
:
undefined
,
plocation
:
undefined
,
pstatus
:
0
,
ptype
:
1
,
delFlag
:
0
}
this
.
resetForm
(
'queryForm'
)
this
.
handleQuery
()
},
},
created
()
{
// 取消按钮
if
(
this
.
$store
.
getters
.
searchParams
[
this
.
$route
.
path
])
{
cancel
()
{
const
{
searchParams
}
=
this
.
$store
.
getters
;
const
{
path
}
=
this
.
$route
this
.
open
=
false
const
param
=
JSON
.
parse
(
searchParams
[
path
])
// 保留着的查询条件
this
.
reset
()
this
.
queryParams
=
{
...
param
}
},
// 取消按钮(数据权限)
cancelDataScope
()
{
this
.
openDataScope
=
false
this
.
reset
()
},
// 表单重置
reset
()
{
if
(
this
.
$refs
.
menu
!==
undefined
)
{
this
.
$refs
.
menu
.
setCheckedKeys
([])
}
this
.
menuExpand
=
false
this
.
menuNodeAll
=
false
this
.
deptExpand
=
true
this
.
deptNodeAll
=
false
this
.
form
=
{
roleId
:
undefined
,
businessId
:
undefined
,
roleName
:
undefined
,
roleKey
:
undefined
,
roleSort
:
0
,
flag
:
'1'
,
menuIds
:
[],
menuName
:
undefined
,
deptIds
:
[],
menuCheckStrictly
:
false
,
deptCheckStrictly
:
false
,
remark
:
undefined
}
}
this
.
resetForm
(
'form'
)
},
/** 查询按钮操作 */
handleQuery
()
{
this
.
queryParams
.
page
=
1
this
.
getList
()
this
.
getList
()
},
},
methods
:
{
/** 新增按钮操作 */
handelTab
(
i
,
e
)
{
handleAdd
()
{
const
that
=
this
this
.
reset
()
if
(
!
that
.
$refs
[
'input'
+
i
])
{
this
.
getMenuTreeselect
()
return
this
.
open
=
true
}
this
.
title
=
'添加角色'
that
.
$nextTick
(()
=>
{
},
e
.
target
.
blur
()
/** 出库按钮操作 */
const
index
=
i
+
1
handleDelete
(
row
)
{
that
.
$refs
[
'input'
+
index
].
focus
()
console
.
log
(
'row'
,
row
)
})
const
obj
=
{
},
id
:
row
.
businessId
// TODO: 获取所选行详情信息操作
handleDetail
(
row
)
{
this
.
singleDetails
=
this
.
formReset
this
.
singleDetails
=
row
this
.
title
=
'详情信息'
this
.
openDetails
=
!
this
.
openDetails
},
/** 查询角色列表 */
getList
()
{
this
.
loading
=
true
listdevice
(
this
.
queryParams
).
then
(
response
=>
{
this
.
equipmentList
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
}
)
},
resetQuery
()
{
this
.
queryParams
=
{
page
:
1
,
rows
:
10
,
pn
:
undefined
,
lot
:
undefined
,
plocation
:
undefined
,
pstatus
:
0
,
ptype
:
1
,
delFlag
:
0
}
this
.
resetForm
(
'queryForm'
)
this
.
handleQuery
()
},
// 取消按钮
cancel
()
{
this
.
open
=
false
this
.
reset
()
},
// 取消按钮(数据权限)
cancelDataScope
()
{
this
.
openDataScope
=
false
this
.
reset
()
},
// 表单重置
reset
()
{
if
(
this
.
$refs
.
menu
!==
undefined
)
{
this
.
$refs
.
menu
.
setCheckedKeys
([])
}
this
.
menuExpand
=
false
this
.
menuNodeAll
=
false
this
.
deptExpand
=
true
this
.
deptNodeAll
=
false
this
.
form
=
{
roleId
:
undefined
,
businessId
:
undefined
,
roleName
:
undefined
,
roleKey
:
undefined
,
roleSort
:
0
,
flag
:
'1'
,
menuIds
:
[],
menuName
:
undefined
,
deptIds
:
[],
menuCheckStrictly
:
false
,
deptCheckStrictly
:
false
,
remark
:
undefined
}
this
.
resetForm
(
'form'
)
},
/** 查询按钮操作 */
handleQuery
()
{
this
.
queryParams
.
page
=
1
this
.
getList
()
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
()
this
.
getMenuTreeselect
()
this
.
open
=
true
this
.
title
=
'添加角色'
},
/** 出库按钮操作 */
handleDelete
(
row
)
{
console
.
log
(
'row'
,
row
);
const
obj
=
{
id
:
row
.
businessId
}
// 弹出确认框
this
.
$confirm
(
'是否确认操作?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}).
then
(()
=>
{
// 调用 performOutbound 函数执行出库操作
performOutbound
(
obj
)
.
then
(
response
=>
{
console
.
log
(
'response'
,
response
);
if
(
response
.
code
===
200
)
{
this
.
$message
.
success
(
'操作成功'
);
this
.
getList
()
}
else
{
this
.
$message
.
error
(
'操作失败'
);
}
})
.
catch
(
error
=>
{
console
.
error
(
'请求出错'
,
error
);
this
.
$message
.
error
(
'操作失败'
);
});
}).
catch
(()
=>
{
this
.
$message
.
info
(
'已取消操作'
);
});
}
}
// 弹出确认框
this
.
$confirm
(
'是否确认操作?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
// 调用 performOutbound 函数执行出库操作
performOutbound
(
obj
)
.
then
(
response
=>
{
console
.
log
(
'response'
,
response
)
if
(
response
.
code
===
200
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
}
else
{
this
.
$message
.
error
(
'操作失败'
)
}
})
.
catch
(
error
=>
{
console
.
error
(
'请求出错'
,
error
)
this
.
$message
.
error
(
'操作失败'
)
})
}).
catch
(()
=>
{
this
.
$message
.
info
(
'已取消操作'
)
})
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -449,27 +449,26 @@ export default {
...
@@ -449,27 +449,26 @@ export default {
.app-container
{
.app-container
{
font-size
:
18px
;
font-size
:
18px
;
padding
:
0
;
padding
:
0
;
.placeholder
{
.placeholder
{
height
:
1
.3vh
;
height
:
1
.3vh
;
background-color
:
#F4F4F4
;
background-color
:
#F4F4F4
;
margin-bottom
:
10px
margin-bottom
:
10px
}
}
.table-drop
{
.table-drop
{
vertical-align
:
2px
;
vertical-align
:
2px
;
line-height
:
20px
;
line-height
:
20px
;
margin-left
:
15px
margin-left
:
15px
}
}
.el-switch
{
.el-switch
{
margin-left
:
15px
;
margin-left
:
15px
;
}
}
}
}
.el-divider--vertical
{
.el-divider--vertical
{
height
:
12em
;
height
:
12em
;
width
:
4px
;
width
:
4px
;
}
}
</
style
>
</
style
>
\ No newline at end of file
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