refactor(wms/report/split): 统一拆分报表页面模板组件
将所有分条相关报表页面替换为通用ActionTemplate组件,移除冗余的单独模板导入,统一配置报表参数,减少重复代码
This commit is contained in:
@@ -1,26 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<ComprehensiveTemplate
|
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||||
:actionTypes="actionTypes"
|
|
||||||
:actionQueryParams="actionQueryParams"
|
|
||||||
:baseQueryParams="baseQueryParams"
|
|
||||||
:warehouseOptions="warehouseOptions"
|
|
||||||
:productionLine="productionLine"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||||
import { splitConfig } from '@/views/wms/report/js/config.js'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ComprehensiveReport',
|
name: 'ComprehensiveReport',
|
||||||
components: {
|
components: {
|
||||||
ComprehensiveTemplate,
|
ActionTemplate,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
...splitConfig,
|
actionType: 506,
|
||||||
|
reportType: 'all',
|
||||||
|
productionLine: '分条线',
|
||||||
|
warehouseOptions: [
|
||||||
|
{ value: '1988150210872930306', label: '酸连轧分条成品' },
|
||||||
|
{ value: '1988150800092950529', label: '退火分条成品' },
|
||||||
|
{ value: '1988150380649967617', label: '镀锌分条成品' },
|
||||||
|
{ value: '1988151027466170370', label: '拉矫分条成品' },
|
||||||
|
{ value: '2027272581575487489', label: '包装用内部仓' },
|
||||||
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,27 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<DayTemplate
|
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||||
:actionTypes="actionTypes"
|
|
||||||
:actionQueryParams="actionQueryParams"
|
|
||||||
:baseQueryParams="baseQueryParams"
|
|
||||||
:warehouseOptions="warehouseOptions"
|
|
||||||
:productionLine="productionLine"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DayTemplate from '@/views/wms/report/template/day.vue'
|
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||||
import { splitConfig } from '@/views/wms/report/js/config.js'
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LossReport',
|
name: 'DayReport',
|
||||||
components: {
|
components: {
|
||||||
DayTemplate,
|
ActionTemplate,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
...splitConfig,
|
actionType: 506,
|
||||||
|
reportType: 'day',
|
||||||
|
productionLine: '分条线',
|
||||||
|
warehouseOptions: [
|
||||||
|
{ value: '1988150210872930306', label: '酸连轧分条成品' },
|
||||||
|
{ value: '1988150800092950529', label: '退火分条成品' },
|
||||||
|
{ value: '1988150380649967617', label: '镀锌分条成品' },
|
||||||
|
{ value: '1988151027466170370', label: '拉矫分条成品' },
|
||||||
|
{ value: '2027272581575487489', label: '包装用内部仓' },
|
||||||
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,26 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<LossTemplate
|
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||||
:actionTypes="actionTypes"
|
|
||||||
:actionQueryParams="actionQueryParams"
|
|
||||||
:baseQueryParams="baseQueryParams"
|
|
||||||
:warehouseOptions="warehouseOptions"
|
|
||||||
:productionLine="productionLine"
|
|
||||||
></LossTemplate>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import LossTemplate from '@/views/wms/report/template/loss.vue'
|
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||||
import { splitConfig } from '@/views/wms/report/js/config.js'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LossReport',
|
name: 'LossReport',
|
||||||
components: {
|
components: {
|
||||||
LossTemplate,
|
ActionTemplate,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
...splitConfig,
|
actionType: 506,
|
||||||
}
|
reportType: 'loss',
|
||||||
|
productionLine: '分条线',
|
||||||
|
warehouseOptions: [
|
||||||
|
{ value: '1988150210872930306', label: '酸连轧分条成品' },
|
||||||
|
{ value: '1988150800092950529', label: '退火分条成品' },
|
||||||
|
{ value: '1988150380649967617', label: '镀锌分条成品' },
|
||||||
|
{ value: '1988151027466170370', label: '拉矫分条成品' },
|
||||||
|
{ value: '2027272581575487489', label: '包装用内部仓' },
|
||||||
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
}
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -1,26 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<MonthTemplate
|
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||||
:actionTypes="actionTypes"
|
|
||||||
:actionQueryParams="actionQueryParams"
|
|
||||||
:baseQueryParams="baseQueryParams"
|
|
||||||
:warehouseOptions="warehouseOptions"
|
|
||||||
:productionLine="productionLine"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MonthTemplate from '@/views/wms/report/template/month.vue'
|
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||||
import { splitConfig } from '@/views/wms/report/js/config.js'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MonthReport',
|
name: 'MonthReport',
|
||||||
components: {
|
components: {
|
||||||
MonthTemplate,
|
ActionTemplate,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
...splitConfig,
|
actionType: 506,
|
||||||
|
reportType: 'month',
|
||||||
|
productionLine: '分条线',
|
||||||
|
warehouseOptions: [
|
||||||
|
{ value: '1988150210872930306', label: '酸连轧分条成品' },
|
||||||
|
{ value: '1988150800092950529', label: '退火分条成品' },
|
||||||
|
{ value: '1988150380649967617', label: '镀锌分条成品' },
|
||||||
|
{ value: '1988151027466170370', label: '拉矫分条成品' },
|
||||||
|
{ value: '2027272581575487489', label: '包装用内部仓' },
|
||||||
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,24 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<OutTemplate
|
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||||
:baseQueryParams="baseQueryParams"
|
|
||||||
:warehouseOptions="warehouseOptions"
|
|
||||||
:productionLine="productionLine"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import OutTemplate from "@/views/wms/report/template/out.vue";
|
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||||
import { splitConfig } from '@/views/wms/report/js/config.js'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ZhaTemplate',
|
name: 'OutReport',
|
||||||
components: {
|
components: {
|
||||||
OutTemplate,
|
ActionTemplate,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
...splitConfig,
|
actionType: 506,
|
||||||
|
reportType: 'out',
|
||||||
|
productionLine: '分条线',
|
||||||
|
warehouseOptions: [
|
||||||
|
{ value: '1988150210872930306', label: '酸连轧分条成品' },
|
||||||
|
{ value: '1988150800092950529', label: '退火分条成品' },
|
||||||
|
{ value: '1988150380649967617', label: '镀锌分条成品' },
|
||||||
|
{ value: '1988151027466170370', label: '拉矫分条成品' },
|
||||||
|
{ value: '2027272581575487489', label: '包装用内部仓' },
|
||||||
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,26 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<TeamTemplate
|
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||||
:actionTypes="actionTypes"
|
|
||||||
:actionQueryParams="actionQueryParams"
|
|
||||||
:baseQueryParams="baseQueryParams"
|
|
||||||
:warehouseOptions="warehouseOptions"
|
|
||||||
:productionLine="productionLine"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TeamTemplate from '@/views/wms/report/template/team.vue'
|
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||||
import { splitConfig } from '@/views/wms/report/js/config.js'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TeamReport',
|
name: 'TeamReport',
|
||||||
components: {
|
components: {
|
||||||
TeamTemplate,
|
ActionTemplate,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
...splitConfig,
|
actionType: 506,
|
||||||
|
reportType: 'team',
|
||||||
|
productionLine: '分条线',
|
||||||
|
warehouseOptions: [
|
||||||
|
{ value: '1988150210872930306', label: '酸连轧分条成品' },
|
||||||
|
{ value: '1988150800092950529', label: '退火分条成品' },
|
||||||
|
{ value: '1988150380649967617', label: '镀锌分条成品' },
|
||||||
|
{ value: '1988151027466170370', label: '拉矫分条成品' },
|
||||||
|
{ value: '2027272581575487489', label: '包装用内部仓' },
|
||||||
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,26 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<YearTemplate
|
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||||
:actionTypes="actionTypes"
|
|
||||||
:actionQueryParams="actionQueryParams"
|
|
||||||
:baseQueryParams="baseQueryParams"
|
|
||||||
:warehouseOptions="warehouseOptions"
|
|
||||||
:productionLine="productionLine"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import YearTemplate from '@/views/wms/report/template/year.vue'
|
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||||
import { splitConfig } from '@/views/wms/report/js/config.js'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'YearReport',
|
name: 'YearReport',
|
||||||
components: {
|
components: {
|
||||||
YearTemplate,
|
ActionTemplate,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
...splitConfig,
|
actionType: 506,
|
||||||
|
reportType: 'year',
|
||||||
|
productionLine: '分条线',
|
||||||
|
warehouseOptions: [
|
||||||
|
{ value: '1988150210872930306', label: '酸连轧分条成品' },
|
||||||
|
{ value: '1988150800092950529', label: '退火分条成品' },
|
||||||
|
{ value: '1988150380649967617', label: '镀锌分条成品' },
|
||||||
|
{ value: '1988151027466170370', label: '拉矫分条成品' },
|
||||||
|
{ value: '2027272581575487489', label: '包装用内部仓' },
|
||||||
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user