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
728d689d
Commit
728d689d
authored
Sep 24, 2023
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工序印刷,切换tab,切换之前什么样,切换之后就什么样
parent
560d03b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
52 deletions
+74
-52
index.vue
src/views/production/barcodegeneration/index.vue
+5
-10
index.vue
src/views/production/gfual/index.vue
+69
-42
No files found.
src/views/production/barcodegeneration/index.vue
View file @
728d689d
...
...
@@ -45,15 +45,13 @@
icon=
"el-icon-search"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button
>
>
查询
</el-button>
<el-button
style=
"padding: 8px 7px"
icon=
"el-icon-refresh"
size=
"small"
@
click=
"resetQuery"
>
重置
</el-button
>
>
重置
</el-button>
</el-form-item>
<div
style=
"float: right"
>
<el-form-item>
...
...
@@ -63,16 +61,14 @@
size=
"small"
icon=
"el-icon-plus"
@
click=
"handleAdd"
>
新增
</el-button
>
>
新增
</el-button>
<el-button
style=
"padding: 8px 7px"
type=
"success"
size=
"small"
icon=
"el-icon-download"
@
click=
"handleExport"
>
导出
</el-button
>
>
导出
</el-button>
</el-form-item>
</div>
</el-form>
...
...
@@ -139,8 +135,7 @@
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
>
删除
<
/el-butto
n
>
>
删除
<
/el-button
>
<
/template
>
<
/el-table-column
>
<!--
<
el
-
table
-
column
label
=
"操作"
>-->
...
...
src/views/production/gfual/index.vue
View file @
728d689d
...
...
@@ -83,7 +83,7 @@
</el-col>
</el-row>
<hr
style=
"margin: 0 0 20px 0; width: 81%"
/
>
<hr
style=
"margin: 0 0 20px 0; width: 81%"
>
<!-- wjb 输入框 -->
<el-row
:gutter=
"40"
>
...
...
@@ -424,10 +424,10 @@ export default {
wjb
:
[
{
validator
:
(
rule
,
value
,
callback
)
=>
{
this
.
validateWjb
(
value
,
callback
)
;
this
.
validateWjb
(
value
,
callback
)
},
trigger
:
'blur'
,
}
,
trigger
:
'blur'
}
],
wbcode
:
[
{
...
...
@@ -448,11 +448,11 @@ export default {
jlcod
:
[
{
validator
:
(
rule
,
value
,
callback
)
=>
{
this
.
validateJlcod
(
value
,
callback
)
;
this
.
validateJlcod
(
value
,
callback
)
},
trigger
:
'blur'
,
}
,
]
,
trigger
:
'blur'
}
]
},
pissbList
:
[],
...
...
@@ -511,11 +511,40 @@ export default {
},
// 路由跳转,是存储页面的值
beforeRouteLeave
(
to
,
from
,
next
)
{
console
.
log
(
'form'
)
console
.
log
(
'form'
,
this
.
form
)
sessionStorage
.
setItem
(
'applicationForm'
,
JSON
.
stringify
(
this
.
form
))
const
obj
=
{
wjbEnabled
:
this
.
wjbEnabled
,
wbcodeEnabled
:
this
.
wbcodeEnabled
,
wblotEnabled
:
this
.
wblotEnabled
,
jlcodEnabled
:
this
.
jlcodEnabled
,
lockUserEnabled
:
this
.
lockUserEnabled
,
isRequired
:
this
.
isRequired
,
unlockButtonVisible
:
this
.
unlockButtonVisible
,
queryInputsEnabled
:
this
.
queryInputsEnabled
,
queryButtonVisible
:
this
.
queryButtonVisible
}
// 把当前按钮的状态存入缓存中
sessionStorage
.
setItem
(
'buttonStatus'
,
JSON
.
stringify
(
obj
))
next
()
},
created
()
{
let
buttonExist
=
false
console
.
log
(
'buttonStatus'
,
sessionStorage
.
getItem
(
'buttonStatus'
))
sessionStorage
.
getItem
(
'buttonStatus'
)
?
buttonExist
=
true
:
buttonExist
=
false
if
(
buttonExist
)
{
const
buttonStatus
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'buttonStatus'
))
console
.
log
(
'buttonStatus'
,
buttonStatus
)
this
.
wjbEnabled
=
buttonStatus
.
wjbEnabled
this
.
wbcodeEnabled
=
buttonStatus
.
wbcodeEnabled
this
.
wblotEnabled
=
buttonStatus
.
wblotEnabled
this
.
jlcodEnabled
=
buttonStatus
.
jlcodEnabled
this
.
lockUserEnabled
=
buttonStatus
.
lockUserEnabled
this
.
isRequired
=
buttonStatus
.
isRequired
this
.
unlockButtonVisible
=
buttonStatus
.
unlockButtonVisible
this
.
queryInputsEnabled
=
buttonStatus
.
queryInputsEnabled
this
.
queryButtonVisible
=
buttonStatus
.
queryButtonVisible
}
sessionStorage
.
getItem
(
'applicationForm'
)
?
(
this
.
exist
=
true
)
:
(
this
.
exist
=
false
)
...
...
@@ -530,21 +559,21 @@ export default {
// 检查是否开启验证
if
(
value
)
{
// 检查是否为空或未定义
const
parts
=
value
.
split
(
','
)
;
const
jbcode
=
parts
[
0
]
;
const
jbrank
=
parts
[
1
]
;
const
jblot
=
parts
[
2
]
;
const
parts
=
value
.
split
(
','
)
const
jbcode
=
parts
[
0
]
const
jbrank
=
parts
[
1
]
const
jblot
=
parts
[
2
]
if
(
!
jbcode
||
!
jbrank
||
!
jblot
)
{
callback
(
new
Error
(
'jbtype、jbrank、jblot不能为空'
))
;
callback
(
new
Error
(
'jbtype、jbrank、jblot不能为空'
))
}
else
{
callback
()
;
callback
()
}
}
else
{
callback
(
new
Error
(
'jbcode不能为空'
))
;
callback
(
new
Error
(
'jbcode不能为空'
))
}
}
else
{
callback
()
;
// 如果验证未开启,直接通过
callback
()
// 如果验证未开启,直接通过
}
},
...
...
@@ -553,26 +582,24 @@ export default {
// 检查是否开启验证
if
(
value
)
{
// 检查是否为空或未定义
const
parts
=
value
.
split
(
','
)
;
const
jlname
=
parts
[
0
]
;
const
jllot
=
parts
[
1
]
;
const
jlvalidDate
=
parts
[
2
]
;
const
parts
=
value
.
split
(
','
)
const
jlname
=
parts
[
0
]
const
jllot
=
parts
[
1
]
const
jlvalidDate
=
parts
[
2
]
if
(
!
jlname
||
!
jllot
||
!
jlvalidDate
)
{
callback
(
new
Error
(
'jltype、jllot、jlvalidDate不能为空'
))
;
callback
(
new
Error
(
'jltype、jllot、jlvalidDate不能为空'
))
}
else
{
callback
()
;
callback
()
}
}
else
{
callback
(
new
Error
(
'jlcod不能为空'
))
;
callback
(
new
Error
(
'jlcod不能为空'
))
}
}
else
{
callback
()
;
// 如果验证未开启,直接通过
callback
()
// 如果验证未开启,直接通过
}
},
validateField
(
value
,
callback
,
fieldName
)
{
if
(
this
[
fieldName
+
'Enabled'
])
{
// 检查是否开启验证
...
...
@@ -597,7 +624,7 @@ export default {
}
},
/** 查询按钮操作 */
handleQuery
:
function
()
{
handleQuery
:
function
()
{
// 先触发表单验证
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
...
...
@@ -615,19 +642,19 @@ export default {
console
.
log
(
'data'
,
response
.
data
)
if
(
response
.
data
.
jbcode
!==
''
)
{
this
.
wjbEnabled
=
true
}
else
{
}
else
{
this
.
wjbEnabled
=
false
}
if
(
response
.
data
.
wb
!==
''
)
{
this
.
wbcodeEnabled
=
true
this
.
wblotEnabled
=
true
}
else
{
}
else
{
this
.
wbcodeEnabled
=
false
this
.
wblotEnabled
=
false
}
if
(
response
.
data
.
jl
!==
''
)
{
this
.
jlcodEnabled
=
true
}
else
{
}
else
{
this
.
jlcodEnabled
=
false
}
if
(
...
...
@@ -701,29 +728,29 @@ export default {
if
(
response
.
code
===
200
)
{
// 解锁成功,恢复页面状态
if
(
!
this
.
form
.
wjb
)
{
this
.
wjbEnabled
=
false
;
this
.
wjbEnabled
=
false
}
else
{
this
.
wjbEnabled
=
true
;
this
.
wjbEnabled
=
true
}
if
(
!
this
.
form
.
wbcode
&&
!
this
.
form
.
wblot
)
{
this
.
wbcodeEnabled
=
false
;
this
.
wblotEnabled
=
false
;
this
.
wbcodeEnabled
=
false
this
.
wblotEnabled
=
false
}
else
{
this
.
wbcodeEnabled
=
true
;
this
.
wblotEnabled
=
true
;
this
.
wbcodeEnabled
=
true
this
.
wblotEnabled
=
true
}
if
(
!
this
.
form
.
jlcod
)
{
this
.
jlcodEnabled
=
false
;
this
.
jlcodEnabled
=
false
}
else
{
this
.
jlcodEnabled
=
true
;
this
.
jlcodEnabled
=
true
}
this
.
lockUserEnabled
=
false
if
(
this
.
form
.
wjb
||
this
.
form
.
wbcode
||
this
.
form
.
wblot
||
this
.
form
.
jlcod
){
if
(
this
.
form
.
wjb
||
this
.
form
.
wbcode
||
this
.
form
.
wblot
||
this
.
form
.
jlcod
)
{
this
.
queryInputsEnabled
=
true
this
.
queryButtonVisible
=
false
}
else
{
}
else
{
this
.
queryInputsEnabled
=
false
this
.
queryButtonVisible
=
true
}
...
...
@@ -781,7 +808,7 @@ export default {
this
.
jlcodEnabled
=
false
this
.
lockUserEnabled
=
false
this
.
queryButtonVisible
=
true
sessionStorage
.
setItem
(
'applicationForm'
,
JSON
.
stringify
(
this
.
form
))
},
...
...
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