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
41ae2365
Commit
41ae2365
authored
Sep 20, 2023
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作日志加导出
parent
eacd89ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
265 additions
and
298 deletions
+265
-298
index.vue
src/views/production/gfual/index.vue
+265
-298
No files found.
src/views/production/gfual/index.vue
View file @
41ae2365
...
@@ -3,14 +3,14 @@
...
@@ -3,14 +3,14 @@
<div
style=
"width: 80%; margin-left: 80px; padding-left: 8.6%"
>
<div
style=
"width: 80%; margin-left: 80px; padding-left: 8.6%"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-row
:gutter=
"40"
>
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"pn:"
style=
"flex-basis: 50%;"
prop=
"pn"
>
<el-form-item
label=
"pn:"
style=
"flex-basis: 50%;"
prop=
"pn"
>
<el-input
ref=
"input1"
v-model=
"form.pn"
placeholder=
"请输入pn"
:minlength=
"3"
style=
"width: 400px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"handleQuery"
/>
<el-input
ref=
"input1"
v-model=
"form.pn"
placeholder=
"请输入pn"
:minlength=
"3"
style=
"width: 400px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
:gutter=
"40"
>
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"lot:"
style=
"flex-basis: 50%;"
prop=
"lot"
>
<el-form-item
label=
"lot:"
style=
"flex-basis: 50%;"
prop=
"lot"
>
<el-input
ref=
"input2"
v-model=
"form.lot"
placeholder=
"请输入lot"
style=
"width: 400px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"handleQuery"
/>
<el-input
ref=
"input2"
v-model=
"form.lot"
placeholder=
"请输入lot"
style=
"width: 400px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
<!-- 提取 jbtype、jbrank 和 jbLot -->
<!-- 提取 jbtype、jbrank 和 jbLot -->
<el-row
:gutter=
"0"
style=
"display: flex; width: 81%;"
>
<el-row
:gutter=
"0"
style=
"display: flex; width: 81%;"
>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form
:model=
"form"
ref
=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model
=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"jbtype:"
prop=
"jbtype"
>
<el-form-item
label=
"jbtype:"
prop=
"jbtype"
>
<template
v-if=
"form.jbtype && form.jbtype.length > 21"
>
<template
v-if=
"form.jbtype && form.jbtype.length > 21"
>
<el-tooltip
:content=
"form.jbtype"
effect=
"dark"
>
<el-tooltip
:content=
"form.jbtype"
effect=
"dark"
>
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form
:model=
"form"
ref
=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model
=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"jbrank:"
prop=
"jbrank"
>
<el-form-item
label=
"jbrank:"
prop=
"jbrank"
>
<
template
v-if=
"form.jbrank && form.jbrank.length > 21"
>
<
template
v-if=
"form.jbrank && form.jbrank.length > 21"
>
<el-tooltip
:content=
"form.jbrank"
effect=
"dark"
>
<el-tooltip
:content=
"form.jbrank"
effect=
"dark"
>
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form
:model=
"form"
ref
=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model
=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"jbLot:"
prop=
"jbLot"
>
<el-form-item
label=
"jbLot:"
prop=
"jbLot"
>
<
template
v-if=
"form.jbLot && form.jbLot.length > 21"
>
<
template
v-if=
"form.jbLot && form.jbLot.length > 21"
>
<el-tooltip
:content=
"form.jbLot"
effect=
"dark"
>
<el-tooltip
:content=
"form.jbLot"
effect=
"dark"
>
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
<!-- 提取 jltype、jllot 和 jlbzq -->
<!-- 提取 jltype、jllot 和 jlbzq -->
<el-row
:gutter=
"0"
style=
"display: flex; width: 81%;"
>
<el-row
:gutter=
"0"
style=
"display: flex; width: 81%;"
>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form
:model=
"form"
ref
=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model
=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"jltype:"
prop=
"jltype"
>
<el-form-item
label=
"jltype:"
prop=
"jltype"
>
<
template
v-if=
"form.jltype && form.jltype.length > 21"
>
<
template
v-if=
"form.jltype && form.jltype.length > 21"
>
<el-tooltip
:content=
"form.jltype"
effect=
"dark"
>
<el-tooltip
:content=
"form.jltype"
effect=
"dark"
>
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form
:model=
"form"
ref
=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model
=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"jllot:"
prop=
"jllot"
>
<el-form-item
label=
"jllot:"
prop=
"jllot"
>
<
template
v-if=
"form.jllot && form.jllot.length > 21"
>
<
template
v-if=
"form.jllot && form.jllot.length > 21"
>
<el-tooltip
:content=
"form.jllot"
effect=
"dark"
>
<el-tooltip
:content=
"form.jllot"
effect=
"dark"
>
...
@@ -168,7 +168,7 @@
...
@@ -168,7 +168,7 @@
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form
:model=
"form"
ref
=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model
=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"jlbzq:"
prop=
"jlbzq"
>
<el-form-item
label=
"jlbzq:"
prop=
"jlbzq"
>
<
template
v-if=
"form.jlbzq && form.jlbzq.length > 21"
>
<
template
v-if=
"form.jlbzq && form.jlbzq.length > 21"
>
<el-tooltip
:content=
"form.jlbzq"
effect=
"dark"
>
<el-tooltip
:content=
"form.jlbzq"
effect=
"dark"
>
...
@@ -192,7 +192,6 @@
...
@@ -192,7 +192,6 @@
</el-col>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
<el-form
label-width=
"80px"
>
<el-form
label-width=
"80px"
>
<el-row
style=
"padding-left; padding-top: 1%"
>
<el-row
style=
"padding-left; padding-top: 1%"
>
...
@@ -206,16 +205,21 @@
...
@@ -206,16 +205,21 @@
</el-form>
</el-form>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getDictData
,
addApplication
,
queryList
}
from
'@/api/production/gfual'
import
{
getDictData
,
addApplication
,
queryList
}
from
'@/api/production/gfual'
import
{
MessageBox
}
from
'element-ui'
;
import
{
MessageBox
}
from
'element-ui'
export
default
{
export
default
{
name
:
'Role'
,
name
:
'Role'
,
data
()
{
data
()
{
return
{
return
{
jbcodeEnabled
:
false
,
wbcodeEnabled
:
false
,
wblotEnabled
:
false
,
jlcodEnabled
:
false
,
lockUserEnabled
:
false
,
isRequired
:
false
,
isRequired
:
false
,
// 对应后端配置文件cy.init.pgxList的的内容
// 对应后端配置文件cy.init.pgxList的的内容
phdList
:
[
'003'
],
phdList
:
[
'003'
],
...
@@ -256,6 +260,28 @@ export default {
...
@@ -256,6 +260,28 @@ export default {
]
]
}
}
},
},
watch
:
{
'form.jbcode'
:
{
handler
(
newJbcode
)
{
// 当 jbcode 字段发生变化时,解析它并更新相关字段的值
const
parts
=
newJbcode
.
split
(
','
)
this
.
form
.
jbtype
=
parts
[
0
]
||
''
this
.
form
.
jbrank
=
parts
[
1
]
||
''
this
.
form
.
jbLot
=
parts
[
2
]
||
''
},
immediate
:
true
// 立即执行一次以处理初始值
},
'form.jlcod'
:
{
handler
(
newJlcod
)
{
// 当 jlcod 字段发生变化时,解析它并更新相关字段的值
const
parts
=
newJlcod
.
split
(
','
)
this
.
form
.
jltype
=
parts
[
0
]
||
''
this
.
form
.
jllot
=
parts
[
1
]
||
''
this
.
form
.
jlbzq
=
parts
[
2
]
||
''
},
immediate
:
true
// 立即执行一次以处理初始值
}
},
mounted
()
{
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
input1
.
$refs
.
input
.
focus
()
this
.
$refs
.
input1
.
$refs
.
input
.
focus
()
...
@@ -276,10 +302,10 @@ export default {
...
@@ -276,10 +302,10 @@ export default {
},
},
methods
:
{
methods
:
{
handlePgxChange
()
{
handlePgxChange
()
{
if
(
this
.
phdList
.
includes
(
this
.
form
.
pgx
)){
if
(
this
.
phdList
.
includes
(
this
.
form
.
pgx
))
{
this
.
isRequired
=
true
;
this
.
isRequired
=
true
}
else
{
}
else
{
this
.
isRequired
=
false
;
this
.
isRequired
=
false
}
}
},
},
/** 查询按钮操作 */
/** 查询按钮操作 */
...
@@ -292,103 +318,67 @@ export default {
...
@@ -292,103 +318,67 @@ export default {
pn
:
this
.
form
.
pn
,
pn
:
this
.
form
.
pn
,
lot
:
this
.
form
.
lot
,
lot
:
this
.
form
.
lot
,
gx
:
this
.
form
.
gx
,
gx
:
this
.
form
.
gx
,
machine
:
this
.
form
.
machine
,
machine
:
this
.
form
.
machine
})
})
.
then
(
response
=>
{
.
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
if
(
response
.
code
===
200
)
{
// 如果后端返回成功信息,显示成功提示
// 如果后端返回成功信息,显示成功提示
MessageBox
.
alert
(
'查询成功'
,
'成功'
,
{
MessageBox
.
alert
(
'查询成功'
,
'成功'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
type
:
'success'
,
type
:
'success'
});
})
// 根据后端返回的数据来决定哪些输入框启用
console
.
log
(
'data'
,
response
.
data
)
if
(
response
.
data
.
jbcode
)
{
if
(
response
.
data
.
jbcode
!==
null
)
{
this
.
jbcodeEnabled
=
true
;
this
.
jbcodeEnabled
=
true
this
.
wbcodeEnabled
=
false
;
this
.
form
.
jbcode
=
''
this
.
wblotEnabled
=
false
;
this
.
form
.
wbcode
=
''
this
.
jlcodEnabled
=
false
;
this
.
form
.
wblot
=
''
this
.
lockUserEnabled
=
false
;
this
.
form
.
jlcod
=
''
this
.
form
.
jbcode
=
''
;
this
.
form
.
lockUser
=
''
this
.
form
.
wbcode
=
''
;
}
this
.
form
.
wblot
=
''
;
if
(
response
.
data
.
wb
!==
null
)
{
this
.
form
.
jlcod
=
''
;
this
.
wbcodeEnabled
=
true
this
.
form
.
lockUser
=
''
;
this
.
wblotEnabled
=
true
}
else
if
(
response
.
data
.
wb
)
{
this
.
form
.
jbcode
=
''
// 当后端返回 'wbcode' 时
this
.
form
.
wbcode
=
''
this
.
jbcodeEnabled
=
false
;
this
.
form
.
wblot
=
''
this
.
wbcodeEnabled
=
true
;
this
.
form
.
jlcod
=
''
this
.
wblotEnabled
=
true
;
this
.
form
.
lockUser
=
''
this
.
jlcodEnabled
=
false
;
}
this
.
lockUserEnabled
=
false
;
if
(
response
.
data
.
jl
!==
null
)
{
this
.
form
.
jbcode
=
''
;
this
.
jlcodEnabled
=
true
this
.
form
.
wbcode
=
''
;
this
.
form
.
jbcode
=
''
this
.
form
.
wblot
=
''
;
this
.
form
.
wbcode
=
''
this
.
form
.
jlcod
=
''
;
this
.
form
.
wblot
=
''
this
.
form
.
lockUser
=
''
;
this
.
form
.
jlcod
=
''
this
.
form
.
lockUser
=
''
// 这里可以根据需要执行其他操作
}
}
else
if
(
response
.
data
.
jl
)
{
if
(
response
.
data
.
jbcode
===
null
&&
response
.
data
.
wb
===
null
&&
response
.
data
.
jl
===
null
)
{
// 当后端返回 'jl' 时
this
.
jbcodeEnabled
=
false
;
this
.
wbcodeEnabled
=
false
;
this
.
wblotEnabled
=
false
;
this
.
jlcodEnabled
=
true
;
this
.
lockUserEnabled
=
false
;
this
.
form
.
jbcode
=
''
;
this
.
form
.
wbcode
=
''
;
this
.
form
.
wblot
=
''
;
this
.
form
.
jlcod
=
''
;
this
.
form
.
lockUser
=
''
;
}
else
{
// 所有输入框都锁定,报错
// 所有输入框都锁定,报错
this
.
jbcodeEnabled
=
false
;
this
.
jbcodeEnabled
=
false
this
.
wbcodeEnabled
=
false
;
this
.
wbcodeEnabled
=
false
this
.
wblotEnabled
=
false
;
this
.
wblotEnabled
=
false
this
.
jlcodEnabled
=
false
;
this
.
jlcodEnabled
=
false
this
.
lockUserEnabled
=
true
;
this
.
lockUserEnabled
=
true
this
.
form
.
jbcode
=
''
;
this
.
form
.
jbcode
=
''
this
.
form
.
wbcode
=
''
;
this
.
form
.
wbcode
=
''
this
.
form
.
wblot
=
''
;
this
.
form
.
wblot
=
''
this
.
form
.
jlcod
=
''
;
this
.
form
.
jlcod
=
''
this
.
form
.
lockUser
=
''
;
this
.
form
.
lockUser
=
''
MessageBox
.
alert
(
'jbcode,wb,jl内容均为空,查询无效,请重新查询'
,
'错误'
,
{
MessageBox
.
alert
(
'jbcode,wb,jl内容均为空,查询无效,请重新查询'
,
'错误'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
type
:
'error'
,
type
:
'error'
})
;
})
}
}
// 执行下一步操作
this
.
doNextAction
();
}
else
{
this
.
jbcodeEnabled
=
false
;
this
.
wbcodeEnabled
=
false
;
this
.
wblotEnabled
=
false
;
this
.
jlcodEnabled
=
false
;
this
.
lockUserEnabled
=
true
;
this
.
form
.
jbcode
=
''
;
this
.
form
.
wbcode
=
''
;
this
.
form
.
wblot
=
''
;
this
.
form
.
jlcod
=
''
;
this
.
form
.
lockUser
=
''
;
// 如果后端返回错误信息,显示错误提示
MessageBox
.
alert
(
response
.
data
.
message
,
'错误'
,
{
confirmButtonText
:
'确定'
,
type
:
'error'
,
});
}
}
})
})
.
catch
(
error
=>
{
// 处理请求错误
console
.
error
(
error
);
});
}
}
})
;
})
},
},
doNextAction
()
{
doNextAction
()
{
// 执行下一步操作的逻辑
// 执行下一步操作的逻辑
},
},
/** 查询基础信息列表 */
/** 查询基础信息列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
...
@@ -488,30 +478,8 @@ export default {
...
@@ -488,30 +478,8 @@ export default {
}
}
})
})
}
}
},
}
watch
:
{
}
'form.jbcode'
:
{
handler
(
newJbcode
)
{
// 当 jbcode 字段发生变化时,解析它并更新相关字段的值
const
parts
=
newJbcode
.
split
(
','
);
this
.
form
.
jbtype
=
parts
[
0
]
||
''
;
this
.
form
.
jbrank
=
parts
[
1
]
||
''
;
this
.
form
.
jbLot
=
parts
[
2
]
||
''
;
},
immediate
:
true
,
// 立即执行一次以处理初始值
},
'form.jlcod'
:
{
handler
(
newJlcod
)
{
// 当 jlcod 字段发生变化时,解析它并更新相关字段的值
const
parts
=
newJlcod
.
split
(
','
);
this
.
form
.
jltype
=
parts
[
0
]
||
''
;
this
.
form
.
jllot
=
parts
[
1
]
||
''
;
this
.
form
.
jlbzq
=
parts
[
2
]
||
''
;
},
immediate
:
true
,
// 立即执行一次以处理初始值
},
},
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -539,4 +507,3 @@ export default {
...
@@ -539,4 +507,3 @@ export default {
</
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