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
30971675
Commit
30971675
authored
Jan 24, 2024
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024/01/24 需求变更
parent
52c40b8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
37 deletions
+15
-37
index.vue
src/views/production/gfual/index.vue
+15
-37
No files found.
src/views/production/gfual/index.vue
View file @
30971675
...
@@ -559,19 +559,14 @@ export default {
...
@@ -559,19 +559,14 @@ export default {
// 新增的初始化 unlockUsername 的逻辑
// 新增的初始化 unlockUsername 的逻辑
if
(
this
.
unlockButtonVisible
)
{
if
(
this
.
unlockButtonVisible
)
{
// 如果 unlockButtonVisible 为 true,从 sessionStorage 中恢复 unlockUsername 的值
// 如果 unlockButtonVisible 为 true,从 sessionStorage 中恢复 unlockUsername 的值
this
.
unlockUsername
=
sessionStorage
.
getItem
(
'unlockUsername'
)
||
""
;
this
.
unlockUsername
=
sessionStorage
.
getItem
(
'unlockUsername'
)
||
''
}
else
{
}
else
{
// 否则将 unlockUsername 初始化为空字符串
// 否则将 unlockUsername 初始化为空字符串
this
.
unlockUsername
=
""
;
this
.
unlockUsername
=
''
}
}
},
},
methods
:
{
methods
:
{
validateWjb
(
value
,
callback
)
{
validateWjb
(
value
,
callback
)
{
if
(
this
.
form
.
wjb
===
''
||
this
.
form
.
wjb
.
wjb
===
undefined
||
this
.
form
.
wjb
===
null
)
{
this
.
wjbEnabled
=
false
}
else
{
this
.
wjbEnabled
=
true
}
if
(
this
.
wjbEnabled
)
{
if
(
this
.
wjbEnabled
)
{
// 检查是否开启验证
// 检查是否开启验证
if
(
value
)
{
if
(
value
)
{
...
@@ -595,11 +590,6 @@ export default {
...
@@ -595,11 +590,6 @@ export default {
},
},
validateJlcod
(
value
,
callback
)
{
validateJlcod
(
value
,
callback
)
{
if
(
value
===
null
||
value
===
undefined
||
value
===
''
)
{
this
.
jlcodEnabled
=
false
}
else
{
this
.
jlcodEnabled
=
false
}
if
(
this
.
jlcodEnabled
)
{
if
(
this
.
jlcodEnabled
)
{
// 检查是否开启验证
// 检查是否开启验证
if
(
value
)
{
if
(
value
)
{
...
@@ -623,11 +613,6 @@ export default {
...
@@ -623,11 +613,6 @@ export default {
},
},
validateField
(
value
,
callback
,
fieldName
)
{
validateField
(
value
,
callback
,
fieldName
)
{
if
(
value
===
null
||
value
===
undefined
||
value
===
''
)
{
this
[
fieldName
+
'Enabled'
]
=
false
}
else
{
this
[
fieldName
+
'Enabled'
]
=
true
}
if
(
this
[
fieldName
+
'Enabled'
])
{
if
(
this
[
fieldName
+
'Enabled'
])
{
// 检查是否开启验证
// 检查是否开启验证
if
(
value
)
{
if
(
value
)
{
...
@@ -653,10 +638,10 @@ export default {
...
@@ -653,10 +638,10 @@ export default {
/** 查询按钮操作 */
/** 查询按钮操作 */
handleQuery
:
function
()
{
handleQuery
:
function
()
{
// 先触发表单验证
// 先触发表单验证
console
.
log
(
'111'
,
this
.
form
)
console
.
log
(
'111'
,
this
.
form
)
this
.
$refs
.
form
.
validate
(
valid
=>
{
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
console
.
log
(
'222'
,
this
.
form
)
console
.
log
(
'222'
,
this
.
form
)
// 表单验证通过,执行查询操作
// 表单验证通过,执行查询操作
queryList
({
queryList
({
pn
:
this
.
form
.
pn
,
pn
:
this
.
form
.
pn
,
...
@@ -666,53 +651,46 @@ export default {
...
@@ -666,53 +651,46 @@ export default {
})
})
.
then
(
response
=>
{
.
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
if
(
response
.
code
===
200
)
{
this
.
form
.
remarks
=
response
.
data
.
remarks
this
.
form
.
remarks
=
response
.
data
.
remarks
// 如果后端返回成功信息,显示成功提示
// 如果后端返回成功信息,显示成功提示
this
.
queryInputsEnabled
=
true
this
.
queryInputsEnabled
=
true
console
.
log
(
'data'
,
response
.
data
)
console
.
log
(
'data'
,
response
.
data
)
if
(
response
.
data
.
jbcode
!==
''
)
{
if
(
response
.
data
.
jbcode
!==
''
&&
response
.
data
.
jbcode
!==
null
)
{
this
.
wjbEnabled
=
true
this
.
wjbEnabled
=
true
}
else
{
}
else
{
this
.
wjbEnabled
=
false
this
.
wjbEnabled
=
false
}
}
if
(
response
.
data
.
wb
!==
''
)
{
if
(
response
.
data
.
wb
!==
''
&&
response
.
data
.
wb
!==
null
)
{
this
.
wbcodeEnabled
=
true
this
.
wbcodeEnabled
=
true
this
.
wblotEnabled
=
true
this
.
wblotEnabled
=
true
}
else
{
}
else
{
this
.
wbcodeEnabled
=
false
this
.
wbcodeEnabled
=
false
this
.
wblotEnabled
=
false
this
.
wblotEnabled
=
false
}
}
if
(
response
.
data
.
jl
!==
''
)
{
if
(
response
.
data
.
jl
!==
''
&&
response
.
data
.
jl
!==
null
)
{
this
.
jlcodEnabled
=
true
this
.
jlcodEnabled
=
true
}
else
{
}
else
{
this
.
jlcodEnabled
=
false
this
.
jlcodEnabled
=
false
}
}
if
(
if
(
response
.
data
.
jbcode
===
''
&&
(
response
.
data
.
jbcode
===
null
||
response
.
data
.
jbcode
===
''
)
&&
response
.
data
.
wb
===
''
&&
(
response
.
data
.
wb
===
''
||
response
.
data
.
wb
===
null
)
&&
response
.
data
.
jl
===
''
(
response
.
data
.
jl
===
''
||
response
.
data
.
jl
===
null
)
)
{
)
{
// 所有输入框都锁定,报错
// 所有输入框都锁定,报错
this
.
wjbEnabled
=
false
this
.
wjbEnabled
=
false
this
.
wbcodeEnabled
=
false
this
.
wbcodeEnabled
=
false
this
.
wblotEnabled
=
false
this
.
wblotEnabled
=
false
this
.
jlcodEnabled
=
false
this
.
jlcodEnabled
=
false
this
.
queryInputsEnabled
=
tru
e
this
.
queryInputsEnabled
=
fals
e
this
.
lockUserEnabled
=
tru
e
this
.
lockUserEnabled
=
fals
e
this
.
unlockButtonVisible
=
tru
e
this
.
unlockButtonVisible
=
fals
e
this
.
saveButtonVisible
=
false
this
.
saveButtonVisible
=
false
this
.
form
.
wjb
=
''
this
.
form
.
wjb
=
''
this
.
form
.
wbcode
=
''
this
.
form
.
wbcode
=
''
this
.
form
.
wblot
=
''
this
.
form
.
wblot
=
''
this
.
form
.
jlcod
=
''
this
.
form
.
jlcod
=
''
MessageBox
.
alert
(
this
.
$message
.
error
(
'jbcode,wb,jl内容均为空,查询无效,请解锁后重新查询'
)
'jbcode,wb,jl内容均为空,查询无效,请解锁后重新查询'
,
'错误'
,
{
confirmButtonText
:
'确定'
,
type
:
'error'
}
)
}
}
this
.
queryButtonVisible
=
false
this
.
queryButtonVisible
=
false
this
.
saveButtonVisible
=
true
this
.
saveButtonVisible
=
true
...
...
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