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
28b71f97
Commit
28b71f97
authored
Dec 04, 2023
by
cat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
印刷页面
parent
58677f9f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1149 additions
and
0 deletions
+1149
-0
index.js
src/api/equipment/printingCheck/index.js
+0
-0
index.vue
src/views/equipment/printingCheck/index.vue
+1149
-0
No files found.
src/api/equipment/printingCheck/index.js
0 → 100644
View file @
28b71f97
src/views/equipment/printingCheck/index.vue
0 → 100644
View file @
28b71f97
<
template
>
<div
class=
"app-container"
>
<el-form
ref=
"queryForm"
style=
"padding: 0 0 0 10px"
:model=
"queryParams"
:inline=
"true"
>
<el-form-item
label=
"pn"
prop=
"pn"
>
<el-input
v-model=
"queryParams.pn"
placeholder=
"请输入pn"
clearable
:maxlength=
"30"
size=
"small"
style=
"width: 150px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"phd"
prop=
"phdStr"
>
<el-input
v-model=
"queryParams.phdStr"
placeholder=
"请输入phd"
clearable
size=
"small"
style=
"width: 150px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"prank"
prop=
"prankStr"
>
<el-input
v-model=
"queryParams.prankStr"
placeholder=
"请输入prank"
clearable
:maxlength=
"100"
size=
"small"
style=
"width: 150px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"pstatus"
>
<el-select
v-model=
"queryParams.pstatus"
placeholder=
"请选择状态"
clearable
size=
"small"
style=
"width: 150px"
>
<el-option
v-for=
"dict in statusOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</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
style=
"padding: 8px 7px;"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
<el-form-item
style=
"float: right"
>
<el-button
style=
"padding: 8px 7px;"
type=
"primary"
size=
"small"
icon=
"el-icon-plus"
@
click=
"handleAdd"
>
印刷
</el-button>
</el-form-item>
</el-form>
<div
class=
"placeholder"
/>
<div
style=
"padding:5px 10px"
>
<div
class=
"mb12 font-small-bold"
>
设备领用
</div>
<el-table
v-loading=
"loading"
border
:data=
"equipmentapplyList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<el-table-column
label=
"pn"
prop=
"pn"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
pn
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"phd"
prop=
"phd"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
phd
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"prank"
prop=
"prank"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
prank
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"pgx"
prop=
"pgx"
>
<
template
slot-scope=
"scope"
>
<span>
{{
replace
(
scope
.
row
.
pgx
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"pnumber"
prop=
"pnumber"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pnumber
}}
</
template
>
</el-table-column>
<el-table-column
label=
"状态"
prop=
"pstatus"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.pstatus === '0'"
style=
"color: red"
>
未完成
</span>
<span
v-else
style=
"color: green"
>
已完成
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"解锁时间"
prop=
"pnumber"
>
<
template
slot-scope=
"scope"
>
{{
parseTime
(
scope
.
row
.
unlockDate
,
'{y
}
-{m
}
-{d
}
{h
}
:{i
}
'
)
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"申请时间"
:
show
-
overflow
-
tooltip
=
"true"
align
=
"center"
prop
=
"updateDate"
width
=
"200px"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
scope
.
row
.
updateDate
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
class
-
name
=
"small-padding fixed-width"
width
=
"200px"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
v
-
if
=
"scope.row.pstatus === '0'"
size
=
"mini"
type
=
"text"
style
=
"color: #49cec9"
@
click
=
"handle(scope.row)"
>
处理
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
@
click
=
"handleDetail(scope.row)"
>
详情
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
>
删除
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/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
=
"1200px"
append
-
to
-
body
>
<
el
-
form
ref
=
"formDetails"
:
model
=
"singleDetails"
size
=
"small"
label
-
width
=
"90px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"pn:"
prop
=
"pn"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.pn"
:
readonly
=
"true"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"phd:"
prop
=
"phd"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.phd"
:
readonly
=
"true"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"prank:"
prop
=
"prank"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.prank"
:
readonly
=
"true"
:
maxlength
=
"100"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"pgx:"
prop
=
"pgx"
>
{{
replaced
(
singleDetails
.
pgx
)
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"pissb:"
prop
=
"pissb"
>
{{
selectedPissb
(
singleDetails
.
pissb
)
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"pnumber:"
prop
=
"pnumber"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.pnumber"
:
readonly
=
"true"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"解锁人:"
prop
=
"unlockUsername"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.unlockUsername"
:
readonly
=
"true"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"解锁时间:"
prop
=
"unlockDate"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.unlockDate"
:
readonly
=
"true"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"申请人:"
prop
=
"createName"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.createName"
:
readonly
=
"true"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
" 申请时间:"
prop
=
"createDate"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.createDate"
:
readonly
=
"true"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
/el-form
>
<!--
apply
详情
-->
<
el
-
table
v
-
if
=
"applyStatus === '1'"
v
-
loading
=
"loadingDetail"
border
:
data
=
"applyList"
@
selection
-
change
=
"handleSelectionChange"
>
<
el
-
table
-
column
type
=
"index"
label
=
"序号"
width
=
"50"
/>
<
el
-
table
-
column
label
=
"pn"
prop
=
"pn"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
pn
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"lot"
prop
=
"lot"
:
show
-
overflow
-
tooltip
=
"true"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
lot
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"plocation"
prop
=
"plocation"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
plocation
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"prank"
prop
=
"prank"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
prank
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"pzl"
prop
=
"pzl"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
pzl
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"phd"
prop
=
"phd"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
phd
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"psm"
prop
=
"psm"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
psm
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
/el-dialog
>
<!--
TODO
:
处理
-->
<
el
-
dialog
title
=
"设备领用"
:
visible
.
sync
=
"openHandle"
width
=
"1200px"
append
-
to
-
body
:
close
-
on
-
click
-
modal
=
"false"
@
close
=
"handlecanceClose"
>
<
el
-
form
ref
=
"formDetails"
class
=
"aboutSingleDetails"
:
model
=
"singleDetails"
size
=
"small"
label
-
width
=
"90px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"pn:"
prop
=
"pn"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.pn"
:
readonly
=
"true"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"phd:"
prop
=
"phd"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.phd"
:
readonly
=
"true"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"prank:"
prop
=
"prank"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.prank"
:
readonly
=
"true"
:
maxlength
=
"100"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"pgx:"
prop
=
"pgx"
>
{{
replaced
(
singleDetails
.
pgx
)
}}
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"pissb:"
prop
=
"pissb"
>
<
template
>
<
span
v
-
if
=
"singleDetails.pissb === '0'"
>
否
<
/span
>
<
span
v
-
else
>
是
<
/span
>
<
/template
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"pnumber:"
prop
=
"pnumber"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.pnumber"
:
readonly
=
"true"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"申请人:"
prop
=
"createName"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.createName"
:
readonly
=
"true"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
" 申请时间:"
prop
=
"createDate"
>
<
el
-
input
v
-
model
.
trim
=
"singleDetails.createDate"
:
readonly
=
"true"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
/el-form
>
<!--
分割线
-->
<
el
-
divider
/>
<
el
-
table
v
-
loading
=
"loadingDetail"
border
:
data
=
"detailApplyList"
@
selection
-
change
=
"handleSelectionChange"
>
<
el
-
table
-
column
type
=
"selection"
width
=
"55"
/>
<
el
-
table
-
column
type
=
"index"
label
=
"序号"
width
=
"50"
/>
<
el
-
table
-
column
label
=
"pn"
prop
=
"pn"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
pn
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"lot"
prop
=
"lot"
:
show
-
overflow
-
tooltip
=
"true"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
lot
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"plocation"
prop
=
"plocation"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
plocation
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"prank"
prop
=
"prank"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
prank
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"pzl"
prop
=
"pzl"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
pzl
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"phd"
prop
=
"phd"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
phd
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"psm"
prop
=
"psm"
>
<
template
slot
-
scope
=
"scope"
>
{{
scope
.
row
.
psm
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"入库日期"
prop
=
"createDate"
>
<
template
slot
-
scope
=
"scope"
>
{{
parseTime
(
scope
.
row
.
createDate
,
'{y
}
-{m
}
-{d
}
'
)
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
div
style
=
"float: right;padding:3px 15px;"
>
<
el
-
button
type
=
"primary"
size
=
"small"
@
click
=
"handleCance"
>
确定
<
/el-button
>
<
/div
>
<
/el-dialog
>
<!--
权限验证
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"openLogin"
width
=
"500px"
append
-
to
-
body
:
close
-
on
-
click
-
modal
=
"false"
@
close
=
"handleClose"
>
<
div
style
=
"text-align: center"
>
<
span
style
=
"font-size: 15px"
>
您选择的设备入库时间较早,需要权限验证
<
/span
>
<
/div
>
<
el
-
form
ref
=
"form"
:
model
=
"loginform"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
"用户名"
>
<
el
-
input
v
-
model
=
"loginform.password"
placeholder
=
"请输入用户名"
/>
<
/el-form-item
>
<
el
-
form
-
item
>
<
el
-
button
type
=
"primary"
@
click
=
"handleConfirm"
>
确定
<
/el-button
>
<
/el-form-item
>
<
/el-form
>
<
/el-dialog
>
<!--
印刷模态框
-->
<!--
添加或修改参数配置对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"600px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"pn"
prop
=
"pn"
>
<
el
-
input
v
-
model
=
"form.pn"
placeholder
=
"请输入pn"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"phd"
prop
=
"phd"
>
<
el
-
input
v
-
model
=
"form.phd"
placeholder
=
"请输入phd"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"prank"
prop
=
"prank"
>
<
el
-
input
v
-
model
=
"form.prank"
placeholder
=
"请输入prank"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"pgx"
prop
=
"pgx"
>
<
el
-
input
v
-
model
=
"form.pgx"
placeholder
=
"请输入pgx"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
-
width
=
"82px"
label
=
"pnumber"
prop
=
"pnumber"
>
<
el
-
input
v
-
model
=
"form.pnumber"
placeholder
=
"请输入pnumber"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"状态"
prop
=
"flag"
>
<
el
-
radio
-
group
v
-
model
=
"form.flag"
>
<
el
-
radio
v
-
for
=
"dict in statusOptions"
:
key
=
"dict.dictValue"
:
label
=
"dict.dictValue"
>
{{
dict
.
dictLabel
}}
<
/el-radio
>
<
/el-radio-group
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
listWbApply
,
deleteLogical
,
batchAddition
,
detail
,
canceListByType
,
checkPermission
}
from
'@/api/equipment/draw'
import
{
parseTime
}
from
'@/utils'
import
{
getDictData
,
getEquipment
}
from
'@/api/equipment/application'
import
{
addUser
,
updateUser
}
from
'@/api/system/user'
export
default
{
name
:
'Draw'
,
data
()
{
return
{
// 表单校验
rules
:
{
pn
:
[
{
required
:
true
,
message
:
'请输入pn'
,
trigger
:
'blur'
}
],
phd
:
[
{
required
:
true
,
message
:
'请输入phd'
,
trigger
:
'blur'
}
],
prank
:
[
{
required
:
true
,
message
:
'请输入prank'
,
trigger
:
'blur'
}
],
pgx
:
[
{
required
:
true
,
message
:
'请输入pgx'
,
trigger
:
'blur'
}
],
pnumber
:
[
{
required
:
true
,
message
:
'请输入pnumber'
,
trigger
:
'blur'
}
],
flag
:
[
{
required
:
true
,
message
:
'请输入状态'
,
trigger
:
'change'
}
],
}
,
twoerrorPassword
:
false
,
// 字典数据
dictList
:
[],
number
:
''
,
monthDate
:
false
,
// 是否切换库
isCheck
:
false
,
loginform
:
{
password
:
''
}
,
// 打开登录验证界面
openLogin
:
false
,
radio1
:
'1'
,
ptype
:
''
,
pgx
:
''
,
prank
:
''
,
pissb
:
''
,
rkDate
:
''
,
totalApplyDetail
:
0
,
applyList
:
[],
canceList
:
[],
applyId
:
''
,
multipleSelection
:
[],
detailApplyList
:
[],
deviceList
:
[],
// 表单里的单项详情参数
singleDetails
:
{
pn
:
''
,
phd
:
''
,
prank
:
''
,
pgx
:
''
,
pissb
:
''
,
pnumber
:
''
,
pstatus
:
''
,
createName
:
''
,
createTime
:
''
}
,
// 是否显示弹出层(申请处理)
openHandle
:
false
,
// 是否显示弹出层(数据详情)
openDetails
:
false
,
loadingDetail
:
false
,
// 遮罩层
loading
:
true
,
// 总条数
total
:
0
,
// apply_detail的总条数
totalDetail
:
0
,
// 设备申请表格数据
equipmentapplyList
:
[],
// 弹出层标题
title
:
''
,
// 是否显示弹出层
open
:
false
,
// 状态数据字典
statusOptions
:
[
{
dictLabel
:
'已完成'
,
dictValue
:
'1'
}
,
{
dictLabel
:
'未完成'
,
dictValue
:
'0'
}
],
// pissb数据字典
pissbOptions
:
[
{
dictLabel
:
'是'
,
dictValue
:
'1'
}
,
{
dictLabel
:
'否'
,
dictValue
:
'0'
}
],
// 查询参数
queryParams
:
{
page
:
1
,
rows
:
10
,
pn
:
''
,
lot
:
''
,
plocation
:
''
,
ptype
:
1
,
delFlag
:
0
}
,
// 查询warehouse的参数
queryParamsDetail
:
{
page
:
1
,
rows
:
10
,
pn
:
''
,
lot
:
''
,
plocation
:
''
,
ptype
:
1
,
delFlag
:
0
}
,
// 表单参数
form
:
{
}
,
// 判断状态显示表单
applyStatus
:
''
}
}
,
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
path
:
this
.
$route
.
path
,
param
:
{
...
this
.
queryParams
}
}
)
next
()
}
,
created
()
{
this
.
getDict
()
this
.
getList
()
this
.
getCodeDict
()
}
,
methods
:
{
/** 印刷按钮操作 */
handleAdd
()
{
this
.
reset
()
this
.
open
=
true
this
.
title
=
'印刷'
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
this
.
reset
()
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
// if (this.form.businessId !== undefined)
{
// updateUser(this.form).then(response =>
{
// this.$message(
{
// message: '修改成功',
// type: 'success'
//
}
)
// this.open = false
// this.getList()
//
}
)
//
}
else
{
// addUser(this.form).then(response =>
{
// this.$message(
{
// message: '新增成功', type: 'success'
//
}
)
// this.open = false
// this.getList()
//
}
)
//
}
this
.
$message
({
message
:
'提交成功'
,
type
:
'success'
}
)
this
.
open
=
false
this
.
getList
()
}
}
)
}
,
// 1
// 1
// 1
// 1
parseTime
,
// 判断是否跟列表中的第一个是否相同
isSameMonths
(
dateArray
,
data
)
{
for
(
let
i
=
0
;
i
<
dateArray
.
length
;
i
++
)
{
if
(
dateArray
[
i
].
getMonth
()
!==
data
.
getMonth
())
{
return
false
}
}
return
true
}
,
// 判断日期是否相同
isSameMonthDates
(
datesArray
)
{
console
.
log
(
'datesArray'
,
datesArray
)
// 如果数组中只有一个元素,返回日期相同
if
(
datesArray
.
length
===
1
)
{
return
true
}
// 获取第一个日期的月份
const
firstMonth
=
datesArray
[
0
].
getMonth
()
// 遍历数组中的日期,检查月份是否都相同
for
(
let
i
=
1
;
i
<
datesArray
.
length
;
i
++
)
{
console
.
log
(
'222'
)
console
.
log
(
'getMonth'
,
datesArray
[
i
].
getMonth
())
console
.
log
(
'firstMonth'
,
firstMonth
)
if
(
datesArray
[
i
].
getMonth
()
!==
firstMonth
)
{
console
.
log
(
'111'
)
return
false
}
}
return
true
}
,
// 符合弹出权限菜单时返回 true,不符合false
condition
(
list1
,
list2
,
number
)
{
// 所有数据的id的集合
var
idList
=
[]
// 前选中的数量id的集合
var
checkIdList
=
[]
// 选中的list日期的集合
var
checkTimeList
=
[]
idList
=
list2
.
map
(
item
=>
item
.
businessId
)
checkIdList
=
idList
.
splice
(
0
,
number
)
var
i
=
0
list1
.
forEach
(
item
=>
{
checkIdList
.
forEach
(
Litem
=>
{
if
(
item
.
tempId
===
Litem
)
{
i
=
i
+
1
}
}
)
}
)
console
.
log
(
'i'
,
i
)
console
.
log
(
'number'
,
number
)
// 如果选中一个的话,校验是否跟列表中的第一个时间是否相同
if
(
number
===
1
)
{
var
oneCheckTimeList
=
[]
list1
.
forEach
(
item
=>
{
oneCheckTimeList
.
push
(
new
Date
(
item
.
rkDate
))
}
)
if
(
this
.
isSameMonths
(
oneCheckTimeList
,
new
Date
(
list2
[
0
].
createDate
)))
{
return
false
}
else
{
return
true
}
}
if
(
i
===
number
)
{
console
.
log
(
'1false'
)
return
false
}
else
{
list1
.
forEach
(
item
=>
{
checkTimeList
.
push
(
new
Date
(
item
.
rkDate
))
}
)
if
(
this
.
isSameMonths
(
checkTimeList
,
new
Date
(
list2
[
0
].
createDate
)))
{
console
.
log
(
'2false'
)
return
false
}
else
{
console
.
log
(
'3true'
)
return
true
}
}
}
,
replace
(
value
)
{
if
(
this
.
dictList
.
find
(
item
=>
item
.
dictValue
===
value
))
{
return
this
.
dictList
.
find
(
item
=>
item
.
dictValue
===
value
).
dictLabel
}
else
{
return
value
}
}
,
getCodeDict
()
{
const
obj
=
{
key
:
'GX_CODE'
}
getDictData
(
obj
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
if
(
res
.
code
===
200
&&
res
.
data
!==
null
)
{
this
.
dictList
=
res
.
data
}
}
)
}
,
handleClose
()
{
this
.
openLogin
=
false
this
.
openHandle
=
true
this
.
twoerrorPassword
=
false
this
.
loginform
.
password
=
''
this
.
loadingDetail
=
false
}
,
// 判断时间范围 是否是一个月以内的的时间
isWithinLastMonth
(
dateToCheck
)
{
// 获取当前日期
const
currentDate
=
new
Date
()
// 获取当前日期的年份和月份
const
currentYear
=
currentDate
.
getFullYear
()
const
currentMonth
=
currentDate
.
getMonth
()
// 获取要比较日期的年份和月份
const
compareYear
=
dateToCheck
.
getFullYear
()
const
compareMonth
=
dateToCheck
.
getMonth
()
// 比较年份和月份是否相等
return
currentYear
===
compareYear
&&
currentMonth
===
compareMonth
}
,
handlecanceClose
()
{
this
.
loadingDetail
=
false
this
.
openHandle
=
false
this
.
isCheck
=
false
}
,
handcheckPermissionQuery
()
{
const
obj
=
{
pn
:
this
.
pn
,
type
:
this
.
radio1
,
pgx
:
this
.
pgx
,
prank
:
this
.
prank
,
pissb
:
this
.
pissb
,
page
:
this
.
queryParamsDetail
.
page
,
rows
:
this
.
queryParamsDetail
.
rows
,
tempPn
:
this
.
queryParamsDetail
.
pn
,
lot
:
this
.
queryParamsDetail
.
lot
,
plocation
:
this
.
queryParamsDetail
.
plocation
}
canceListByType
(
obj
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
data
.
createDate
!==
null
)
{
res
.
data
.
createDate
=
parseTime
(
res
.
data
.
createDate
,
'{y
}
-{m
}
-{d
}
'
)
}
this
.
detailApplyList
=
res
.
data
this
.
loadingDetail
=
false
this
.
openHandle
=
true
}
}
)
}
,
// 菜单权限验证确定
handleConfirm
()
{
this
.
twoerrorPassword
=
false
const
obj
=
{
unlockType
:
'time'
,
unlockUsername
:
this
.
loginform
.
password
}
// 校验密码
checkPermission
(
obj
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
openLogin
=
false
this
.
openHandle
=
false
this
.
loadingDetail
=
false
this
.
canceList
.
forEach
(
item
=>
{
item
.
unlockUsername
=
res
.
data
.
unlockUsername
item
.
unlockDate
=
res
.
data
.
unlockDate
}
)
// 提交选择中的数组
batchAddition
(
this
.
canceList
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
openHandle
=
false
this
.
twoerrorPassword
=
false
this
.
loadingDetail
=
false
this
.
isCheck
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
queryParams
.
page
=
1
this
.
getList
()
this
.
loginform
.
password
=
''
}
}
)
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
}
}
)
}
,
// 处理弹窗里的勾选确定
handleCance
()
{
this
.
loadingDetail
=
true
this
.
monthDate
=
false
this
.
title
=
'权限验证'
if
(
this
.
multipleSelection
.
length
===
0
)
{
this
.
loadingDetail
=
false
this
.
$message
.
warning
(
'请至少选择一个要处理的设备'
)
}
else
{
this
.
canceList
=
[]
this
.
multipleSelection
.
forEach
(
item
=>
{
console
.
log
(
'item'
,
item
)
const
obj
=
{
tempId
:
item
.
businessId
,
applyId
:
this
.
applyId
,
pn
:
item
.
pn
,
pzl
:
item
.
pzl
,
lot
:
item
.
lot
,
plocation
:
item
.
plocation
,
phd
:
item
.
phd
,
psm
:
item
.
psm
,
prank
:
item
.
prank
,
rkDate
:
item
.
createDate
,
unlockUsername
:
null
,
unlockDate
:
null
}
this
.
canceList
.
push
(
obj
)
}
)
if
(
this
.
canceList
.
length
!==
this
.
number
)
{
this
.
openHandle
=
true
this
.
loadingDetail
=
false
return
this
.
$message
.
warning
(
'您选择的设备数据不符合您申请设备的数量'
)
}
console
.
log
(
'是否打开弹框'
,
this
.
condition
(
this
.
canceList
,
this
.
detailApplyList
,
this
.
singleDetails
.
pnumber
))
if
(
this
.
condition
(
this
.
canceList
,
this
.
detailApplyList
,
this
.
singleDetails
.
pnumber
))
{
this
.
monthDate
=
true
this
.
openHandle
=
false
}
console
.
log
(
'monthDate'
,
this
.
monthDate
)
if
(
this
.
monthDate
)
{
this
.
openLogin
=
true
}
if
(
!
this
.
monthDate
)
{
batchAddition
(
this
.
canceList
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
loadingDetail
=
false
this
.
openHandle
=
false
this
.
isCheck
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
queryParams
.
page
=
1
this
.
getList
()
}
}
)
}
}
}
,
/** 查询warehouse列表 */
getDeviceList
()
{
this
.
loadingDetail
=
true
if
(
!
this
.
isCheck
)
{
const
obj
=
{
sort
:
'1'
,
type
:
this
.
radio1
,
phd
:
this
.
phd
,
pn
:
this
.
pn
,
ptype
:
this
.
ptype
,
pgx
:
this
.
pgx
,
prank
:
this
.
prank
,
pissb
:
this
.
pissb
,
page
:
this
.
queryParamsDetail
.
page
,
rows
:
this
.
queryParamsDetail
.
rows
,
tempPn
:
this
.
queryParamsDetail
.
pn
,
lot
:
this
.
queryParamsDetail
.
lot
,
plocation
:
this
.
queryParamsDetail
.
plocation
}
getEquipment
(
obj
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
data
.
createDate
!==
null
)
{
res
.
data
.
createDate
=
parseTime
(
res
.
data
.
createDate
,
'{y
}
-{m
}
-{d
}
'
)
}
this
.
detailApplyList
=
res
.
data
this
.
loadingDetail
=
false
this
.
openHandle
=
true
}
}
)
}
else
{
this
.
handcheckPermissionQuery
()
}
}
,
// 处理点击
handle
(
row
)
{
const
id
=
row
.
businessId
this
.
singleDetails
=
row
this
.
monthDate
=
false
this
.
number
=
row
.
pnumber
this
.
openHandle
=
true
this
.
applyId
=
row
.
businessId
this
.
phd
=
row
.
phd
this
.
pn
=
row
.
pn
this
.
pgx
=
row
.
pgx
this
.
prank
=
row
.
prank
this
.
pissb
=
row
.
pissb
const
obj
=
{
sort
:
'1'
,
type
:
this
.
radio1
,
phd
:
row
.
phd
,
pn
:
row
.
pn
,
pgx
:
row
.
pgx
,
prank
:
row
.
prank
,
pissb
:
row
.
pissb
,
page
:
this
.
queryParamsDetail
.
page
,
rows
:
this
.
queryParamsDetail
.
rows
}
detail
(
id
).
then
(
res
=>
{
res
.
data
.
createDate
=
parseTime
(
res
.
data
.
createDate
,
'{y
}
-{m
}
-{d
}
'
)
this
.
applyList
=
res
.
data
.
wbApplyDetailList
this
.
applyStatus
=
res
.
data
.
pstatus
this
.
loadingDetail
=
false
}
)
// 调warehouse分页查询接口
getEquipment
(
obj
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
data
.
createDate
!==
null
)
{
res
.
data
.
createDate
=
parseTime
(
res
.
data
.
createDate
,
'{y
}
-{m
}
-{d
}
'
)
}
this
.
detailApplyList
=
res
.
data
this
.
loadingDetail
=
false
this
.
openHandle
=
true
}
}
)
this
.
title
=
'处理'
this
.
loadingDetail
=
true
}
,
// 获取所选行详情信息
handleDetail
(
row
)
{
const
id
=
row
.
businessId
this
.
openDetails
=
true
this
.
singleDetails
=
row
this
.
title
=
'详情'
detail
(
id
).
then
(
res
=>
{
res
.
data
.
createDate
=
parseTime
(
res
.
data
.
createDate
,
'{y
}
-{m
}
-{d
}
'
)
this
.
applyList
=
res
.
data
.
wbApplyDetailList
this
.
applyStatus
=
res
.
data
.
pstatus
this
.
loadingDetail
=
false
}
)
}
,
// 查询apply表单
getList
()
{
this
.
isCheck
=
false
this
.
radio1
=
'1'
this
.
loading
=
true
listWbApply
(
this
.
queryParams
).
then
(
response
=>
{
this
.
equipmentapplyList
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
}
)
}
,
// 表单重置
reset
()
{
this
.
form
=
{
pn
:
undefined
,
ptype
:
undefined
,
pgx
:
undefined
,
flag
:
undefined
,
menuIds
:
[],
menuName
:
undefined
,
deptIds
:
[],
menuCheckStrictly
:
true
,
deptCheckStrictly
:
true
,
remark
:
undefined
}
this
.
resetForm
(
'form'
)
}
,
// warehouse查询
handleQueryWarehouse
()
{
this
.
queryParamsDetail
.
page
=
1
this
.
getDeviceList
()
}
,
/** 查询按钮操作 */
handleQuery
()
{
this
.
queryParams
.
page
=
1
this
.
getList
()
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
=
{
page
:
1
,
rows
:
10
,
pn
:
''
,
phd
:
''
,
prank
:
''
,
pstatus
:
''
,
ptype
:
'1'
,
delFlag
:
'0'
}
this
.
handleQuery
()
}
,
// warehouse的重置按钮
resetQueryWarehouse
()
{
this
.
queryParamsDetail
.
pn
=
null
this
.
queryParamsDetail
.
lot
=
null
this
.
queryParamsDetail
.
plocation
=
null
this
.
queryParamsDetail
.
page
=
1
this
.
handleQueryWarehouse
()
}
,
// 多选框选中数据
handleSelectionChange
:
function
(
selection
)
{
this
.
multipleSelection
=
selection
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
businessId
this
.
$confirm
(
'是否确认操作?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(
res
=>
{
deleteLogical
(
id
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
queryParams
.
page
=
1
this
.
getList
()
}
}
)
}
)
}
,
/* TODO: pissb 类型判断的公用方法 */
selectedPissb
(
pissb
)
{
switch
(
pissb
)
{
case
'0'
:
return
'否'
case
'1'
:
return
'是'
default
:
return
''
}
}
,
replaced
(
value
)
{
let
label
=
''
if
(
this
.
dictList
.
length
>
0
)
{
this
.
dictList
.
forEach
(
item
=>
{
if
(
item
.
dictValue
===
value
)
{
label
=
item
.
dictLabel
}
}
)
}
return
label
}
,
getDict
()
{
const
obj
=
{
key
:
'GX_CODE'
}
getDictData
(
obj
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
if
(
res
.
code
===
200
&&
res
.
data
!==
null
)
{
this
.
dictList
=
res
.
data
console
.
log
(
this
.
dictList
)
}
}
)
}
}
}
<
/script
>
<
style
lang
=
"scss"
scoped
>
.
aboutSingleDetails
{
.
el
-
form
-
item
{
.
el
-
input
>
>
>
.
el
-
input__inner
{
-
webkit
-
appearance
:
none
;
background
-
color
:
#
FFF
;
background
-
image
:
none
;
border
-
radius
:
4
px
;
border
:
0
;
width
:
100
%
;
}
}
}
.
app
-
container
{
font
-
size
:
18
px
;
padding
:
0
;
.
placeholder
{
height
:
1.3
vh
;
background
-
color
:
#
F4F4F4
;
margin
-
bottom
:
10
px
}
.
table
-
drop
{
vertical
-
align
:
2
px
;
line
-
height
:
20
px
;
margin
-
left
:
15
px
}
.
el
-
switch
{
margin
-
left
:
15
px
;
}
}
.
el
-
divider
--
vertical
{
height
:
12
em
;
width
:
4
px
;
}
.
premissVerificationTitle
{
/
deep
/
.
el
-
form
-
item__content
{
text
-
align
:
center
;
margin
-
right
:
80
px
;
font
-
weight
:
600
;
}
}
<
/style
>
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