refactor(wms/report/split): 统一拆分报表页面模板组件
将所有分条相关报表页面替换为通用ActionTemplate组件,移除冗余的单独模板导入,统一配置报表参数,减少重复代码
This commit is contained in:
@@ -1,26 +1,28 @@
|
||||
<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 { splitConfig } 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 {
|
||||
...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>
|
||||
<DayTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
:productionLine="productionLine"
|
||||
/>
|
||||
<ActionTemplate :actionType="actionType" :reportType="reportType" :productionLine="productionLine" :warehouseOptions="warehouseOptions" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DayTemplate from '@/views/wms/report/template/day.vue'
|
||||
import { splitConfig } 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 {
|
||||
...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>
|
||||
<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 { splitConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'LossReport',
|
||||
components: {
|
||||
LossTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
...splitConfig,
|
||||
}
|
||||
export default {
|
||||
name: 'LossReport',
|
||||
components: {
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
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>
|
||||
<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 { splitConfig } 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 {
|
||||
...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>
|
||||
<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 { splitConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'ZhaTemplate',
|
||||
name: 'OutReport',
|
||||
components: {
|
||||
OutTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
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>
|
||||
<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 { splitConfig } from '@/views/wms/report/js/config.js'
|
||||
import ActionTemplate from '@/views/wms/report/template/action.vue'
|
||||
|
||||
export default {
|
||||
name: 'TeamReport',
|
||||
components: {
|
||||
TeamTemplate,
|
||||
ActionTemplate,
|
||||
},
|
||||
data() {
|
||||
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>
|
||||
<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 { splitConfig } 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 {
|
||||
...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