Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
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
ximai
mes-ui
Commits
0736dec0
Commit
0736dec0
authored
Jan 20, 2025
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产报表导出
parent
480f34b2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
145 additions
and
28 deletions
+145
-28
index.vue
src/views/mes/proTable/abnormalAnaly/index.vue
+32
-9
index.vue
src/views/mes/proTable/dayStatist/index.vue
+25
-2
index.vue
src/views/mes/proTable/monthStatist/index.vue
+24
-1
index.vue
src/views/mes/proTable/productProcess/index.vue
+11
-7
index.vue
src/views/mes/proTable/statistAnaly/index.vue
+29
-8
index.vue
src/views/mes/proTable/weekStatist/index.vue
+24
-1
No files found.
src/views/mes/proTable/abnormalAnaly/index.vue
View file @
0736dec0
...
@@ -35,6 +35,9 @@
...
@@ -35,6 +35,9 @@
<el-tabs
type=
"border-card"
@
tab-click=
"tabClick"
>
<el-tabs
type=
"border-card"
@
tab-click=
"tabClick"
>
<el-tab-pane
:label=
"$t('明细')"
>
<el-tab-pane
:label=
"$t('明细')"
>
<el-row
style=
"margin-bottom: 10px;"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleExport"
>
{{
$t
(
'导出'
)
}}
</el-button>
</el-row>
<el-table
v-loading=
"loading"
:data=
"tbodys"
:max-height=
"tableHeight"
>
<el-table
v-loading=
"loading"
:data=
"tbodys"
:max-height=
"tableHeight"
>
<el-table-column
:label=
"item.label"
:width=
"item.width"
align=
"center"
:prop=
"item.value"
v-for=
"(item, index) in theaders"
:key=
"index"
>
<el-table-column
:label=
"item.label"
:width=
"item.width"
align=
"center"
:prop=
"item.value"
v-for=
"(item, index) in theaders"
:key=
"index"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -63,8 +66,9 @@
...
@@ -63,8 +66,9 @@
</el-option>
</el-option>
</el-select>
</el-select>
</el-col>
</el-col>
<el-col
:span=
"
1
"
>
<el-col
:span=
"
3
"
>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
{{$t('查询')}}
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
{{$t('查询')}}
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleExport"
:disabled=
"Number(tabIndex) !== 0 && !statisisType"
>
{{$t('导出')}}
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
<el-table
v-loading=
"loading"
:data=
"tbodys1"
:max-height=
"tableHeight"
>
<el-table
v-loading=
"loading"
:data=
"tbodys1"
:max-height=
"tableHeight"
>
...
@@ -348,6 +352,33 @@ export default {
...
@@ -348,6 +352,33 @@ export default {
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
},
},
handleExport
(){
let
apiName
=
''
if
(
Number
(
this
.
tabIndex
)
===
0
)
{
apiName
=
'report/pro/feedback/getList/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'车间'
)){
apiName
=
'report/pro/feedback/getListByWorkshop/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工作中心'
)){
apiName
=
'report/pro/feedback/getListByWorkstation/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工作单元'
)){
apiName
=
'report/pro/feedback/getListByWorkunit/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工序'
)){
apiName
=
'report/pro/feedback/getListByProcess/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'人员'
)){
apiName
=
'report/pro/feedback/getListByUser/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工单'
))
{
apiName
=
'report/pro/feedback/getListByWorkOrder/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'不合格原因'
))
{
apiName
=
'report/pro/feedback/getListByDefect/export'
}
this
.
download
(
apiName
,
{
...
this
.
queryParams
,
},
`abnormalAnaly_
${
new
Date
().
getTime
()}
.xlsx`
);
},
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
if
(
Number
(
this
.
tabIndex
)
===
1
&&
!
this
.
statisisType
)
this
.
$modal
.
msgWarnning
(
this
.
$t
(
i18n
.
t
(
'请选择统计方式'
)));
if
(
Number
(
this
.
tabIndex
)
===
1
&&
!
this
.
statisisType
)
this
.
$modal
.
msgWarnning
(
this
.
$t
(
i18n
.
t
(
'请选择统计方式'
)));
...
@@ -376,14 +407,6 @@ export default {
...
@@ -376,14 +407,6 @@ export default {
this
.
ids
=
selection
.
map
(
item
=>
item
.
ruleId
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
ruleId
)
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
},
/** 导出按钮操作 */
handleExport
()
{
const
row
=
this
.
selectedRows
[
0
]
this
.
download
(
'pro/serial/lpn/record/export'
,
{
salesVoucher
:
row
.
salesVoucher
,
salesVoucherItem
:
row
.
salesVoucherItem
,
},
`dta_
${
new
Date
().
getTime
()}
.xlsx`
)
}
}
}
}
};
};
...
...
src/views/mes/proTable/dayStatist/index.vue
View file @
0736dec0
...
@@ -66,7 +66,9 @@
...
@@ -66,7 +66,9 @@
</el-form>
</el-form>
<el-row
style=
"margin-bottom: 10px;"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleExport"
>
{{
$t
(
'导出'
)
}}
</el-button>
</el-row>
<div
class=
"table-box"
style=
"width: 100%"
>
<div
class=
"table-box"
style=
"width: 100%"
>
<el-table
v-loading=
"loading"
:data=
"tbodys"
show-summary
class=
'tableHei'
:max-height=
"tableHeight"
:summary-method=
"getSummaries"
>
<el-table
v-loading=
"loading"
:data=
"tbodys"
show-summary
class=
'tableHei'
:max-height=
"tableHeight"
:summary-method=
"getSummaries"
>
<el-table-column
:label=
"item.label"
align=
"center"
:prop=
"item.value"
v-for=
"(item, index) in theaders.slice(0, 2)"
:key=
"index + 'key'"
fixed=
"left"
width=
"150"
/>
<el-table-column
:label=
"item.label"
align=
"center"
:prop=
"item.value"
v-for=
"(item, index) in theaders.slice(0, 2)"
:key=
"index + 'key'"
fixed=
"left"
width=
"150"
/>
...
@@ -194,7 +196,7 @@ export default {
...
@@ -194,7 +196,7 @@ export default {
this
.
_resizeHandler
()
this
.
_resizeHandler
()
})
})
this
.
_resizeHandler
=
()
=>
{
this
.
_resizeHandler
=
()
=>
{
this
.
tableHeight
=
window
.
innerHeight
-
3
2
0
this
.
tableHeight
=
window
.
innerHeight
-
3
7
0
}
}
window
.
addEventListener
(
'resize'
,
this
.
_resizeHandler
)
window
.
addEventListener
(
'resize'
,
this
.
_resizeHandler
)
},
},
...
@@ -207,6 +209,27 @@ export default {
...
@@ -207,6 +209,27 @@ export default {
watch
:
{
watch
:
{
},
},
methods
:
{
methods
:
{
handleExport
(){
let
apiName
=
''
if
(
this
.
statisisType
===
i18n
.
t
(
'车间'
)){
apiName
=
'dailyProductionReport/getListByWorkshop/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工作中心'
)){
apiName
=
'dailyProductionReport/getListByWorkstation/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工作单元'
)){
apiName
=
'dailyProductionReport/getListByWorkunit/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工序'
)){
apiName
=
'dailyProductionReport/getListByProcess/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'人员'
)){
apiName
=
'dailyProductionReport/getListByUser/export'
}
this
.
download
(
apiName
,
{
...
this
.
queryParams
,
},
`dailyProductionReport_
${
new
Date
().
getTime
()}
.xlsx`
);
},
getSummaries
(
param
){
getSummaries
(
param
){
const
{
columns
,
data
}
=
param
const
{
columns
,
data
}
=
param
const
sums
=
[]
const
sums
=
[]
...
...
src/views/mes/proTable/monthStatist/index.vue
View file @
0736dec0
...
@@ -63,7 +63,9 @@
...
@@ -63,7 +63,9 @@
</el-form>
</el-form>
<el-row
style=
"margin-bottom: 10px;"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleExport"
>
{{
$t
(
'导出'
)
}}
</el-button>
</el-row>
<div
class=
"table-box"
style=
"width: 100%"
>
<div
class=
"table-box"
style=
"width: 100%"
>
<el-table
v-loading=
"loading"
:data=
"tbodys"
show-summary
class=
'tableHei'
:max-height=
"tableHeight"
:summary-method=
"getSummaries"
>
<el-table
v-loading=
"loading"
:data=
"tbodys"
show-summary
class=
'tableHei'
:max-height=
"tableHeight"
:summary-method=
"getSummaries"
>
<el-table-column
:label=
"item.label"
align=
"center"
:prop=
"item.value"
v-for=
"(item, index) in theaders.slice(0, 2)"
:key=
"index + 'key'"
fixed=
"left"
width=
"150"
/>
<el-table-column
:label=
"item.label"
align=
"center"
:prop=
"item.value"
v-for=
"(item, index) in theaders.slice(0, 2)"
:key=
"index + 'key'"
fixed=
"left"
width=
"150"
/>
...
@@ -203,6 +205,27 @@ export default {
...
@@ -203,6 +205,27 @@ export default {
watch
:
{
watch
:
{
},
},
methods
:
{
methods
:
{
handleExport
(){
let
apiName
=
''
if
(
this
.
statisisType
===
i18n
.
t
(
'车间'
)){
apiName
=
'monthlyProductionReport/getListByWorkshop/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工作中心'
)){
apiName
=
'monthlyProductionReport/getListByWorkstation/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工作单元'
)){
apiName
=
'monthlyProductionReport/getListByWorkunit/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工序'
)){
apiName
=
'monthlyProductionReport/getListByProcess/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'人员'
)){
apiName
=
'monthlyProductionReport/getListByUser/export'
}
this
.
download
(
apiName
,
{
...
this
.
queryParams
,
},
`monthlyProductionReport_
${
new
Date
().
getTime
()}
.xlsx`
);
},
getSummaries
(
param
){
getSummaries
(
param
){
const
{
columns
,
data
}
=
param
const
{
columns
,
data
}
=
param
const
sums
=
[]
const
sums
=
[]
...
...
src/views/mes/proTable/productProcess/index.vue
View file @
0736dec0
...
@@ -33,6 +33,9 @@
...
@@ -33,6 +33,9 @@
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
{{
$t
(
'重置'
)
}}
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
{{
$t
(
'重置'
)
}}
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-row
style=
"margin-bottom: 10px;"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleExport"
>
{{
$t
(
'导出'
)
}}
</el-button>
</el-row>
<el-table
v-loading=
"loading"
:data=
"tbodys"
@
row-click=
"mainTableClick"
:height=
"tableHeight"
:row-class-name=
"tableRowClassName"
>
<el-table
v-loading=
"loading"
:data=
"tbodys"
@
row-click=
"mainTableClick"
:height=
"tableHeight"
:row-class-name=
"tableRowClassName"
>
<el-table-column
:label=
"$t('项目号')"
align=
"center"
prop=
"customerProjectNo"
></el-table-column>
<el-table-column
:label=
"$t('项目号')"
align=
"center"
prop=
"customerProjectNo"
></el-table-column>
<el-table-column
:label=
"$t('订单号')"
align=
"center"
prop=
"orderCode"
></el-table-column>
<el-table-column
:label=
"$t('订单号')"
align=
"center"
prop=
"orderCode"
></el-table-column>
...
@@ -294,13 +297,14 @@ export default {
...
@@ -294,13 +297,14 @@ export default {
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
}
,
}
,
/** 导出按钮操作 */
handleExport
(){
handleExport
()
{
this
.
download
(
const
row
=
this
.
selectedRows
[
0
]
'report/pro/workOrderProgress/getList/export'
,
this
.
download
(
'pro/serial/lpn/record/export'
,
{
{
salesVoucher
:
row
.
salesVoucher
,
...
this
.
queryParams
,
salesVoucherItem
:
row
.
salesVoucherItem
,
}
,
}
,
`dta_${new Date().getTime()
}
.xlsx`
)
`productProcess_${new Date().getTime()
}
.xlsx`
);
}
}
}
}
}
;
}
;
...
...
src/views/mes/proTable/statistAnaly/index.vue
View file @
0736dec0
...
@@ -81,6 +81,9 @@
...
@@ -81,6 +81,9 @@
<el-tabs
type=
"border-card"
@
tab-click=
"tabClick"
>
<el-tabs
type=
"border-card"
@
tab-click=
"tabClick"
>
<el-tab-pane
:label=
"$t('明细')"
>
<el-tab-pane
:label=
"$t('明细')"
>
<el-row
style=
"margin-bottom: 10px;"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleExport"
>
{{
$t
(
'导出'
)
}}
</el-button>
</el-row>
<el-table
v-loading=
"loading"
:max-height=
"tableHeight"
:data=
"tbodys"
>
<el-table
v-loading=
"loading"
:max-height=
"tableHeight"
:data=
"tbodys"
>
<el-table-column
:label=
"item.label"
align=
"center"
:prop=
"item.value"
:width=
"item.width"
v-for=
"(item, index) in theaders"
:key=
"index"
>
<el-table-column
:label=
"item.label"
align=
"center"
:prop=
"item.value"
:width=
"item.width"
v-for=
"(item, index) in theaders"
:key=
"index"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -109,8 +112,9 @@
...
@@ -109,8 +112,9 @@
</el-option>
</el-option>
</el-select>
</el-select>
</el-col>
</el-col>
<el-col
:span=
"
1
"
>
<el-col
:span=
"
3
"
>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
{{$t('查询')}}
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
{{$t('查询')}}
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleExport"
>
{{$t('导出')}}
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
<el-table
v-loading=
"loading"
:max-height=
"tableHeight"
:data=
"tbodys1"
>
<el-table
v-loading=
"loading"
:max-height=
"tableHeight"
:data=
"tbodys1"
>
...
@@ -437,13 +441,30 @@ import dayjs from 'dayjs'
...
@@ -437,13 +441,30 @@ import dayjs from 'dayjs'
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
},
},
/** 导出按钮操作 */
handleExport
(){
handleExport
()
{
let
apiName
=
''
const
row
=
this
.
selectedRows
[
0
]
if
(
Number
(
this
.
tabIndex
)
===
0
)
{
this
.
download
(
'pro/serial/lpn/record/export'
,
{
apiName
=
'report/pro/feedback/getList/export'
salesVoucher
:
row
.
salesVoucher
,
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'车间'
)){
salesVoucherItem
:
row
.
salesVoucherItem
,
apiName
=
'report/pro/feedback/getListByWorkshop/export'
},
`dta_
${
new
Date
().
getTime
()}
.xlsx`
)
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工作中心'
)){
apiName
=
'report/pro/feedback/getListByWorkstation/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工作单元'
)){
apiName
=
'report/pro/feedback/getListByWorkunit/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工序'
)){
apiName
=
'report/pro/feedback/getListByProcess/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'人员'
)){
apiName
=
'report/pro/feedback/getListByUser/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工单'
))
{
apiName
=
'report/pro/feedback/getListByWorkOrder/export'
}
this
.
download
(
apiName
,
{
...
this
.
queryParams
,
},
`statistAnaly_
${
new
Date
().
getTime
()}
.xlsx`
);
}
}
}
}
};
};
...
...
src/views/mes/proTable/weekStatist/index.vue
View file @
0736dec0
...
@@ -63,7 +63,9 @@
...
@@ -63,7 +63,9 @@
</el-form>
</el-form>
<el-row
style=
"margin-bottom: 10px;"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleExport"
>
{{
$t
(
'导出'
)
}}
</el-button>
</el-row>
<div
class=
"table-box"
style=
"width: 100%"
>
<div
class=
"table-box"
style=
"width: 100%"
>
<el-table
v-loading=
"loading"
:data=
"tbodys"
show-summary
class=
'tableHei'
:max-height=
"tableHeight"
:summary-method=
"getSummaries"
>
<el-table
v-loading=
"loading"
:data=
"tbodys"
show-summary
class=
'tableHei'
:max-height=
"tableHeight"
:summary-method=
"getSummaries"
>
<el-table-column
:label=
"item.label"
align=
"center"
:prop=
"item.value"
v-for=
"(item, index) in theaders.slice(0, 2)"
:key=
"index + 'key'"
fixed=
"left"
width=
"150"
/>
<el-table-column
:label=
"item.label"
align=
"center"
:prop=
"item.value"
v-for=
"(item, index) in theaders.slice(0, 2)"
:key=
"index + 'key'"
fixed=
"left"
width=
"150"
/>
...
@@ -203,6 +205,27 @@ export default {
...
@@ -203,6 +205,27 @@ export default {
watch
:
{
watch
:
{
},
},
methods
:
{
methods
:
{
handleExport
(){
let
apiName
=
''
if
(
this
.
statisisType
===
i18n
.
t
(
'车间'
)){
apiName
=
'weeklyProductionReport/getListByWorkshop/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工作中心'
)){
apiName
=
'weeklyProductionReport/getListByWorkstation/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工作单元'
)){
apiName
=
'weeklyProductionReport/getListByWorkunit/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'工序'
)){
apiName
=
'weeklyProductionReport/getListByProcess/export'
}
else
if
(
this
.
statisisType
===
i18n
.
t
(
'人员'
)){
apiName
=
'weeklyProductionReport/getListByUser/export'
}
this
.
download
(
apiName
,
{
...
this
.
queryParams
,
},
`weeklyProductionReport_
${
new
Date
().
getTime
()}
.xlsx`
);
},
getSummaries
(
param
){
getSummaries
(
param
){
const
{
columns
,
data
}
=
param
const
{
columns
,
data
}
=
param
const
sums
=
[]
const
sums
=
[]
...
...
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