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
ede52623
Commit
ede52623
authored
Sep 19, 2023
by
shifangwuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bangding
parent
1737683a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
442 additions
and
10 deletions
+442
-10
index.vue
src/views/production/craftsmanship/index.vue
+5
-5
index copy.vue
src/views/production/gfual/index copy.vue
+414
-0
index.vue
src/views/production/gfual/index.vue
+23
-5
No files found.
src/views/production/craftsmanship/index.vue
View file @
ede52623
...
...
@@ -80,6 +80,11 @@
{{
scope
.
row
.
jxpn
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"gx"
prop=
"gx"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
replace
(
scope
.
row
.
gx
)
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"jbcode"
prop=
"jbcode"
...
...
@@ -108,11 +113,6 @@
{{
scope
.
row
.
jl
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"gx"
prop=
"gx"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
replace
(
scope
.
row
.
gx
)
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作人"
prop=
"createName"
...
...
src/views/production/gfual/index copy.vue
0 → 100644
View file @
ede52623
<
template
>
<div
class=
"app-container"
>
<div
style=
"width: 80%; margin-left: 80px; padding-left: 8.6%"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rule"
label-width=
"80px"
>
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
>
<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-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
>
<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-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"40"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"gx:"
prop=
"gx"
>
<el-select
v-model=
"queryParams.gx"
clearable
placeholder=
"请选择gx"
:style=
"
{ width: '300px', height: '30px' }"
>
<el-option
v-for=
"(dict,index) in pgxList"
:key=
"index"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"machine:"
prop=
"machine"
>
<el-input
ref=
"input4"
v-model=
"form.machine"
placeholder=
"请输入machine"
style=
"width: 100%; max-width: 400px;"
:maxlength=
"10"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item>
<el-button
type=
"primary"
style=
"padding: 8px 16px;"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
</el-form-item>
</el-col>
</el-row>
<hr
style=
"margin: 0 0 20px 0; width: 81%;"
>
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"jbcode:"
style=
"flex-basis: 50%;"
prop=
"jbcode"
>
<el-input
ref=
"input5"
v-model=
"form.jbcode"
placeholder=
"请输入jbcode"
:minlength=
"3"
style=
"width: 868px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"handleTab(4, $event)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"0"
style=
"display: flex; width: 81%;"
>
<el-col
:span=
"8"
>
<el-form
:model=
"form"
ref=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"jbtype:"
prop=
"jbtype"
>
<el-input
v-model=
"form.jbtype"
placeholder=
"jbtype"
:disabled=
"true"
style=
"width: 100%;"
/>
</el-form-item>
</el-form>
</el-col>
<el-col
:span=
"8"
>
<el-form
:model=
"form"
ref=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"jbrank:"
prop=
"jbrank"
>
<el-input
v-model=
"form.jbrank"
placeholder=
"jbrank"
:disabled=
"true"
style=
"width: 100%;"
/>
</el-form-item>
</el-form>
</el-col>
<el-col
:span=
"8"
>
<el-form
:model=
"form"
ref=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"jbLot:"
prop=
"jbLot"
>
<el-input
v-model=
"form.jbLot"
placeholder=
"jbLot"
:disabled=
"true"
style=
"width: 100%;"
/>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"wbcode:"
style=
"flex-basis: 50%;"
prop=
"wbcode"
>
<el-input
ref=
"input6"
v-model=
"form.wbcode"
placeholder=
"请输入wbcode"
:minlength=
"3"
style=
"width: 300px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"handleTab(5, $event)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"wblot:"
style=
"flex-basis: 50%;"
prop=
"wblot"
>
<el-input
ref=
"input7"
v-model=
"form.wblot"
placeholder=
"请输入wblot"
:minlength=
"3"
style=
"width: 300px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"handleTab(6, $event)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"jlcod:"
style=
"flex-basis: 50%;"
prop=
"jlcod"
>
<el-input
ref=
"input8"
v-model=
"form.jlbcod"
placeholder=
"请输入jlbcod"
:minlength=
"3"
style=
"width: 868px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"handleTab(7, $event)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"0"
style=
"display: flex; width: 81%;"
>
<el-col
:span=
"8"
>
<el-form
:model=
"form"
ref=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"jltype:"
prop=
"jltype"
>
<el-input
v-model=
"form.jbtype"
placeholder=
"jltype"
:disabled=
"true"
style=
"width: 100%;"
/>
</el-form-item>
</el-form>
</el-col>
<el-col
:span=
"8"
>
<el-form
:model=
"form"
ref=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"jllot:"
prop=
"jllot"
>
<el-input
v-model=
"form.jbrank"
placeholder=
"jllot"
:disabled=
"true"
style=
"width: 100%;"
/>
</el-form-item>
</el-form>
</el-col>
<el-col
:span=
"8"
>
<el-form
:model=
"form"
ref=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"jlbzq:"
prop=
"jlbzq"
>
<el-input
v-model=
"form.jbLot"
placeholder=
"jlbzq"
:disabled=
"true"
style=
"width: 100%;"
/>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"lockUser:"
style=
"flex-basis: 50%;"
prop=
"lockUser"
>
<el-input
ref=
"input9"
v-model=
"form.lockUser"
placeholder=
"请输入lockUser"
:minlength=
"3"
style=
"width: 300px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"handleTab(8, $event)"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-form
label-width=
"80px"
>
<el-row
style=
"padding-left; padding-top: 1%"
>
<el-col
:span=
"12"
>
<el-form-item
style=
"flex-basis: 50%;"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
保存
</el-button>
<el-button
@
click=
"resetQuery"
>
清空
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</
template
>
<
script
>
import
{
getDictData
,
addApplication
}
from
'@/api/production/gfual'
export
default
{
name
:
'Role'
,
data
()
{
return
{
form
:
{
jbcode
:
''
,
// 输入的jbcode
jbtype
:
''
,
// 从jbcode中提取的jbtype
jbrank
:
''
,
// 从jbcode中提取的jbrank
jbLot
:
''
,
// 从jbcode中提取的jbLot
},
// 数据字典
pgxList
:
[],
// 查询参数
queryParams
:
{
page
:
1
,
rows
:
10
,
pn
:
undefined
,
ptype
:
undefined
,
pgx
:
undefined
,
delFlag
:
0
},
// 表单参数
form
:
{},
defaultProps
:
{
children
:
'children'
,
label
:
'label'
},
isRequired
:
false
,
// 对应后端配置文件cy.init.pgxList的的内容
phdList
:
[
'003'
],
// 判断是否存在缓存
exist
:
false
,
form
:
{
pn
:
''
,
lot
:
''
,
gx
:
''
,
machine
:
''
,
jbcode
:
''
,
jbtype
:
''
,
jbrank
:
''
,
jbLot
:
''
},
rule
:
{
pn
:
[{
required
:
true
,
message
:
'请输入pn'
,
trigger
:
'blur'
}],
lot
:
[{
required
:
true
,
message
:
'请输入lot'
,
trigger
:
'blur'
}],
gx
:
[{
required
:
true
,
message
:
'请选择gx'
,
trigger
:
'blur'
}],
machine
:
[{
required
:
true
,
message
:
'请输入machine'
,
trigger
:
'blur'
}]
},
pissbList
:
[],
pgxList
:
[
{
label
:
'否'
,
value
:
'0'
},
{
label
:
'是'
,
value
:
'1'
}
]
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
input1
.
$refs
.
input
.
focus
()
})
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
$store
.
dispatch
(
'searchSave/searchParamsSet'
,
{
path
:
this
.
$route
.
path
,
param
:
{
...
this
.
queryParams
}
})
next
()
},
created
()
{
this
.
init
()
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
:
{
replace
(
value
)
{
console
.
log
(
'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
}
})
},
// 回车跳转下一个输入框
focusNextInput
(
form
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
form
].
$refs
.
input
.
focus
()
})
},
// 回车到下一个输入框方法
handelTab
(
i
,
e
)
{
const
that
=
this
if
(
that
.
$refs
[
'input'
+
i
])
{
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
})
}
},
// 初始化要调的接口
init
()
{
this
.
getCodeDict
()
this
.
getDict
()
},
/** 查询基础信息列表 */
getList
()
{
this
.
loading
=
true
listBasicInfo
(
this
.
queryParams
).
then
(
res
=>
{
res
.
rows
.
createDate
=
parseTime
(
res
.
rows
.
createDate
,
'{y}-{m}-{d}'
)
this
.
total
=
res
.
total
this
.
basicInfoList
=
res
.
rows
this
.
loading
=
false
})
},
/** 查询按钮操作 */
handleQuery
()
{
this
.
form
.
page
=
1
this
.
getList
()
},
resetQuery
()
{
this
.
form
=
{
pn
:
''
,
lot
:
''
,
gx
:
''
,
machine
:
''
}
sessionStorage
.
setItem
(
'applicationForm'
,
JSON
.
stringify
(
this
.
form
))
},
// 重置
resetFrom
()
{
this
.
form
=
{
pn
:
''
,
lot
:
''
,
gx
:
''
,
machine
:
''
}
this
.
$refs
.
form
.
clearValidate
()
},
// 初始化要调的接口
init
()
{
this
.
getDict
()
},
// 保存时要调的接口
submitForm
()
{
this
.
$confirm
(
'是否确认保存?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
addApplication
(
this
.
form
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
if
(
res
.
code
===
200
)
{
if
(
res
.
data
!==
null
)
{
if
(
res
.
data
.
ptype
===
'1'
)
{
this
.
$message
({
showClose
:
true
,
message
:
'保存成功'
,
type
:
'success'
,
duration
:
5000
})
}
else
if
(
res
.
data
.
ptype
===
'2'
)
{
this
.
$message
({
showClose
:
true
,
message
:
'保存成功'
,
type
:
'success'
,
duration
:
5000
})
}
}
this
.
resetFrom
()
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
({
showClose
:
true
,
message
:
res
.
message
,
type
:
'error'
,
duration
:
10000
})
}
})
}
})
})
},
// 调数据字典查询
getDict
()
{
const
obj
=
{
key
:
'GX_CODE'
}
getDictData
(
obj
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
if
(
res
.
code
===
200
&&
res
.
data
!==
null
)
{
this
.
pgxList
=
res
.
data
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.app-container
{
font-size
:
18px
;
padding
:
0
;
.info
{
height
:
100px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.title
{
font-size
:
16px
;
color
:
#333
;
font-weight
:
700
;
}
}
.button
{
margin-top
:
7%
;
margin-left
:
20%
;
}
}
</
style
>
\ No newline at end of file
src/views/production/gfual/index.vue
View file @
ede52623
...
...
@@ -5,14 +5,14 @@
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
>
<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=
"hand
elTab(1,$event)
"
/>
<el-input
ref=
"input1"
v-model=
"form.pn"
placeholder=
"请输入pn"
:minlength=
"3"
style=
"width: 400px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"hand
leQuery
"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"40"
>
<el-col
:span=
"12"
>
<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=
"hand
elTab(2,$event)
"
/>
<el-input
ref=
"input2"
v-model=
"form.lot"
placeholder=
"请输入lot"
style=
"width: 400px"
:maxlength=
"100"
@
keyup
.
enter
.
native=
"hand
leQuery
"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -38,7 +38,7 @@
<el-col
:span=
"8"
>
<el-form-item
label=
"machine:"
prop=
"machine"
>
<el-input
ref=
"input4"
v-model=
"form.machine"
placeholder=
"请输入machine"
style=
"width: 100%; max-width: 400px;"
:maxlength=
"10"
@
keyup
.
enter
.
native=
"hand
elTab(3,$event)
"
/>
<el-input
ref=
"input4"
v-model=
"form.machine"
placeholder=
"请输入machine"
style=
"width: 100%; max-width: 400px;"
:maxlength=
"10"
@
keyup
.
enter
.
native=
"hand
leQuery
"
/>
</el-form-item>
</el-col>
...
...
@@ -166,6 +166,12 @@ export default {
name
:
'Role'
,
data
()
{
return
{
form
:
{
jbcode
:
''
,
// 输入的jbcode
jbtype
:
''
,
// 从jbcode中提取的jbtype
jbrank
:
''
,
// 从jbcode中提取的jbrank
jbLot
:
''
,
// 从jbcode中提取的jbLot
},
isRequired
:
false
,
// 对应后端配置文件cy.init.pgxList的的内容
phdList
:
[
'003'
],
...
...
@@ -330,8 +336,20 @@ 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
,
// 立即执行一次以处理初始值
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
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