refactor(wms-report): 统一报表页面模板,抽离公共逻辑
This commit is contained in:
@@ -1,26 +1,29 @@
|
||||
<template>
|
||||
<ComprehensiveTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||
import { tuozhiConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'ComprehensiveReport',
|
||||
components: {
|
||||
ComprehensiveTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...tuozhiConfig,
|
||||
actionType: 502,
|
||||
reportType: 'all',
|
||||
productionLine: '脱脂线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150586938421250', label: '脱脂成品库' },
|
||||
{ value: '1988150648993148929', label: '罩式退火原料库' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,27 +1,34 @@
|
||||
<template>
|
||||
<DayTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
<ActionTemplate
|
||||
:actionType="actionType"
|
||||
:reportType="reportType"
|
||||
:productionLine="productionLine"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DayTemplate from '@/views/wms/report/template/day.vue'
|
||||
import { tuozhiConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'LossReport',
|
||||
name: 'DayReport',
|
||||
components: {
|
||||
DayTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...tuozhiConfig,
|
||||
actionType: 502,
|
||||
reportType: 'day',
|
||||
productionLine: '脱脂线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150586938421250', label: '脱脂成品库' },
|
||||
{ value: '1988150648993148929', label: '罩式退火原料库' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,26 +1,29 @@
|
||||
<template>
|
||||
<LossTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
></LossTemplate>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LossTemplate from '@/views/wms/report/template/loss.vue'
|
||||
import { tuozhiConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'LossReport',
|
||||
components: {
|
||||
LossTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...tuozhiConfig,
|
||||
}
|
||||
export default {
|
||||
name: 'DayReport',
|
||||
components: {
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
actionType: 502,
|
||||
reportType: 'loss',
|
||||
productionLine: '脱脂线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150586938421250', label: '脱脂成品库' },
|
||||
{ value: '1988150648993148929', label: '罩式退火原料库' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,26 +1,29 @@
|
||||
<template>
|
||||
<MonthTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MonthTemplate from '@/views/wms/report/template/month.vue'
|
||||
import { tuozhiConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'MonthReport',
|
||||
components: {
|
||||
MonthTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...tuozhiConfig,
|
||||
actionType: 502,
|
||||
reportType: 'month',
|
||||
productionLine: '脱脂线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150586938421250', label: '脱脂成品库' },
|
||||
{ value: '1988150648993148929', label: '罩式退火原料库' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,24 +1,29 @@
|
||||
<template>
|
||||
<OutTemplate
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OutTemplate from "@/views/wms/report/template/out.vue";
|
||||
import { tuozhiConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'ZhaTemplate',
|
||||
name: 'DayReport',
|
||||
components: {
|
||||
OutTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...tuozhiConfig,
|
||||
actionType: 502,
|
||||
reportType: 'out',
|
||||
productionLine: '脱脂线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150586938421250', label: '脱脂成品库' },
|
||||
{ value: '1988150648993148929', label: '罩式退火原料库' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,26 +1,29 @@
|
||||
<template>
|
||||
<TeamTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TeamTemplate from '@/views/wms/report/template/team.vue'
|
||||
import { tuozhiConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'TeamReport',
|
||||
name: 'DayReport',
|
||||
components: {
|
||||
TeamTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...tuozhiConfig,
|
||||
actionType: 502,
|
||||
reportType: 'team',
|
||||
productionLine: '脱脂线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150586938421250', label: '脱脂成品库' },
|
||||
{ value: '1988150648993148929', label: '罩式退火原料库' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,26 +1,29 @@
|
||||
<template>
|
||||
<YearTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import YearTemplate from '@/views/wms/report/template/year.vue'
|
||||
import { tuozhiConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'YearReport',
|
||||
components: {
|
||||
YearTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...tuozhiConfig,
|
||||
actionType: 502,
|
||||
reportType: 'year',
|
||||
productionLine: '脱脂线',
|
||||
warehouseOptions: [
|
||||
{ value: '1988150586938421250', label: '脱脂成品库' },
|
||||
{ value: '1988150648993148929', label: '罩式退火原料库' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user