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
2c442f86
Commit
2c442f86
authored
Sep 15, 2023
by
jack_liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
two
parent
a0bf6575
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
63 deletions
+103
-63
gxpn.js
src/api/production/gxpn.js
+12
-11
index.vue
src/views/production/data/index.vue
+91
-52
No files found.
src/api/production/gxpn.js
View file @
2c442f86
...
@@ -12,24 +12,25 @@ export function getlist(queryParams) {
...
@@ -12,24 +12,25 @@ export function getlist(queryParams) {
})
})
}
}
/
* TODO: 用来查询单项出入库记录的废弃详情信息 */
/
/ TODO: 用来进行工序库的出入库记录的 分页+时间+普通字段的查询
export
function
findSingleLogDetail
(
singleLogIdAndPn
)
{
export
function
getDictList
(
queryParams
)
{
return
request
({
return
request
({
url
:
'/
wbchemistrylog/detail
'
,
url
:
'/
ysgxpn/querySysDictDatas
'
,
method
:
'
pos
t'
,
method
:
'
ge
t'
,
data
:
singleLogIdAndPn
,
params
:
queryParams
,
headers
:
{
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
'Content-Type'
:
'application/json;charset=UTF-8'
}
}
})
})
}
}
/* TODO: 用来导出表单信息 */
export
function
submit
(
queryParams
)
{
export
function
exportInventoryRecord
(
params
)
{
return
request
({
return
request
({
url
:
'/wbchemistrylog/export'
,
url
:
'/ysgxpn/insert'
,
method
:
'get'
,
method
:
'post'
,
params
,
data
:
queryParams
,
responseType
:
'blob'
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
}
})
})
}
}
src/views/production/data/index.vue
View file @
2c442f86
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
style=
"padding-top: 60px;"
>
<el-form
<div
style=
"width: 60%; margin-left: 80px; padding-left: 8.6%"
>
<el-form
ref=
"queryForm"
ref=
"queryForm"
style=
"padding: 0 0 0 10px"
:model=
"queryParams"
:model=
"queryParams"
:inline=
"true"
:inline=
"true"
label-width=
"60px"
>
>
<el-form-item
label=
"
"
prop=
"ptype"
>
<el-form-item
style=
"flex-basis: 50%
"
prop=
"ptype"
>
<el-input
<el-input
v-model=
"queryParams.ptype"
v-model=
"queryParams.ptype"
placeholder=
"请输入
"
placeholder=
"请输入工序
"
clearable
clearable
:maxlength=
"3
0"
:maxlength=
"10
0"
size=
"small"
size=
"small"
style=
"width: 225
px"
style=
"width: 350
px"
@
keyup
.
enter
.
native=
"handleQuery"
@
keyup
.
enter
.
native=
"handleQuery"
/
>
>
</el-form-item
>
<template
slot=
"prepend"
>
工序
</
template
></el-input
>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
<el-button
type=
"primary"
type=
"primary"
...
@@ -28,93 +31,118 @@
...
@@ -28,93 +31,118 @@
>
>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!-- 这里是列表了,注意,这是分割线 -->
<!-- 这里是列表了,注意,这是分割线 -->
<!-- 这里是列表了,注意,这是分割线 -->
<!-- 这里是列表了,注意,这是分割线 -->
<!-- 这里是列表了,注意,这是分割线 -->
<div
class=
"placeholder"
/>
<div
style=
"padding: 5px 10px"
>
<div
class=
"mb12 font-small-bold"
>
工序对照列表
</div>
<el-table
<el-table
:gutter=
"40"
v-loading=
"loading"
v-loading=
"loading"
border
border
ref=
"multipleTable"
ref=
"dictTable"
:data=
"simulateProcessList"
row-key=
"index"
@
selection-change=
"handleSelectionChange"
:data=
"dictList"
@
selection-change=
"handleDictSelectionChange"
>
>
<el-table-column
type=
"selection"
width=
"50px"
/>
<el-table-column
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
:reserve-selection=
"true"
type=
"selection"
width=
"50px"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"100"
/>
<el-table-column
<el-table-column
label=
"工序"
label=
"工序"
prop=
"
ptype
"
prop=
"
dictLabel
"
:show-overflow-tooltip=
"true"
:show-overflow-tooltip=
"true"
>
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
ptype
||
'-'
}}
{{
scope
.
row
.
dictLabel
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
label=
"工序代码"
label=
"工序代码"
prop=
"
pgx
"
prop=
"
dictValue
"
:show-overflow-tooltip=
"true"
:show-overflow-tooltip=
"true"
>
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
pgx
||
'-'
}}
{{
scope
.
row
.
dictValue
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</div>
</div>
<el-button
style=
"float: right"
type=
"primary"
@
click=
"onSubmit"
<el-form
label-width=
"80px"
>
>
提交
</el-button
<el-row
style=
"padding-left: 8.6%; padding-top: 1%"
>
>
<el-col
:span=
"12"
>
<el-form-item
style=
"flex-basis: 50%"
>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
提交
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
get
lis
t
}
from
'@/api/production/gxpn'
import
{
get
DictList
,
submi
t
}
from
'@/api/production/gxpn'
export
default
{
export
default
{
name
:
'Role'
,
name
:
'Role'
,
data
()
{
data
()
{
return
{
return
{
// TODO: 模拟测试数据
dictList
:
[],
simulateProcessList
:
[],
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
// 选中数组
// 选中数组
multipleSelection
:
[],
multipleSelection
:
[],
dictSelection
:
[],
queryParams
:
{
queryParams
:
{
pgx
:
undefined
,
ptype
:
''
ptype
:
undefined
}
}
}
}
},
},
created
()
{
created
()
{
this
.
get
ListToGx
()
this
.
get
DictList
()
},
},
methods
:
{
methods
:
{
/** 查询列表 */
getDictList
()
{
getListToGx
()
{
getDictList
({
this
.
loading
=
true
dictLabel
:
this
.
queryParams
.
ptype
getlist
(
this
.
queryParams
).
then
(
res
=>
{
}).
then
(
res
=>
{
console
.
log
(
res
.
data
)
this
.
dictList
=
res
.
data
this
.
simulateProcessList
=
res
.
data
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
//提交按钮
//提交按钮
onSubmit
()
{
onSubmit
()
{
console
.
log
(
this
.
dictSelection
)
submit
(
this
.
dictSelection
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'提交成功'
)
this
.
$refs
.
dictTable
.
clearSelection
()
this
.
queryParams
.
ptype
=
''
}
})
},
},
//查询
//查询
handleQuery
()
{
handleQuery
()
{
this
.
getListToGx
()
this
.
$refs
.
dictTable
.
clearSelection
()
if
(
this
.
queryParams
.
ptype
==
''
)
{
return
}
getDictList
({
dictLabel
:
this
.
queryParams
.
ptype
}).
then
(
res
=>
{
const
dictList
=
res
.
data
this
.
dictList
.
forEach
(
row
=>
{
dictList
.
forEach
(
item
=>
{
if
(
row
.
businessId
===
item
.
businessId
)
{
this
.
$refs
.
dictTable
.
toggleRowSelection
(
row
,
true
)
}
})
})
})
},
handleDictSelectionChange
(
val
)
{
this
.
dictSelection
=
val
}
}
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
}
}
}
}
</
script
>
</
script
>
...
@@ -143,4 +171,15 @@ export default {
...
@@ -143,4 +171,15 @@ export default {
height
:
12em
;
height
:
12em
;
width
:
4px
;
width
:
4px
;
}
}
.info
{
height
:
100px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.title
{
color
:
#333
;
font-weight
:
700
;
font-size
:
16px
;
}
}
</
style
>
</
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