refactor(wms): 重构物料信息展示逻辑,移除冗余组件
重构物料信息展示逻辑,统一使用itemName等字段替代原有的product和rawMaterial嵌套结构 删除不再使用的BomInfo、CategoryRenderer等冗余组件 新增report模块配置集中管理 优化代码结构,提升可维护性
This commit is contained in:
@@ -38,8 +38,8 @@
|
||||
<current-coil-no :current-coil-no="scope.row.currentCoilNo"></current-coil-no>
|
||||
</template>
|
||||
<template v-else-if="column.prop === 'itemId'">
|
||||
<ProductInfo v-if="scope.row.itemType == 'product'" :product="scope.row.product" />
|
||||
<RawMaterialInfo v-else-if="scope.row.itemType === 'raw_material'" :material="scope.row.rawMaterial" />
|
||||
<ProductInfo v-if="scope.row.itemType == 'product'" :product="scope.row" />
|
||||
<RawMaterialInfo v-else-if="scope.row.itemType === 'raw_material'" :material="scope.row" />
|
||||
</template>
|
||||
<template v-else-if="column.prop === 'status'">
|
||||
{{ scope.row.status === 0 ? '在库' : '已出库' }}
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCoilWithIds } from "@/api/wms/coil";
|
||||
import { listCoilWithIds, listWithBindInfoCoil } from "@/api/wms/coil";
|
||||
import ProductInfo from "@/components/KLPService/Renderer/ProductInfo";
|
||||
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
||||
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
||||
@@ -160,7 +160,7 @@ export default {
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
listCoilWithIds({
|
||||
listWithBindInfoCoil({
|
||||
...this.queryParams
|
||||
}).then(res => {
|
||||
this.list = res.rows.map(item => {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
<script>
|
||||
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||
import { dugeConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
export default {
|
||||
name: 'ComprehensiveReport',
|
||||
@@ -17,20 +18,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
actionTypes: [505, 120],
|
||||
actionQueryParams: {
|
||||
createBy: 'dugekuguan'
|
||||
},
|
||||
baseQueryParams: {
|
||||
createBy: 'dugekuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{value: '1988151132361519105', label: '镀铬成品库'},
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
...dugeConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
105
klp-ui/src/views/wms/report/js/config.js
Normal file
105
klp-ui/src/views/wms/report/js/config.js
Normal file
@@ -0,0 +1,105 @@
|
||||
export const dugeConfig = {
|
||||
actionTypes: [505, 120],
|
||||
actionQueryParams: {
|
||||
createBy: 'dugekuguan'
|
||||
},
|
||||
baseQueryParams: {
|
||||
createBy: 'dugekuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{ value: '1988151132361519105', label: '镀铬成品库' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
|
||||
export const lajiaoConfig = {
|
||||
actionTypes: [503, 120],
|
||||
actionQueryParams: {
|
||||
updateBy: 'lajiaokuguan'
|
||||
},
|
||||
baseQueryParams: {
|
||||
createBy: 'lajiaokuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{ value: '1988150915591499777', label: '拉矫成品库' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
|
||||
export const shuangConfig = {
|
||||
actionTypes: [504, 120],
|
||||
actionQueryParams: {
|
||||
createBy: 'shuangkuguan'
|
||||
},
|
||||
baseQueryParams: {
|
||||
createBy: 'shuangkuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{ value: '1992873437713080322', label: '双机架成品库' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
|
||||
export const tuozhiConfig = {
|
||||
actionTypes: [502, 120],
|
||||
actionQueryParams: {
|
||||
createBy: 'tuozhikuguan'
|
||||
},
|
||||
baseQueryParams: {
|
||||
createBy: 'tuozhikuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{ value: '1988150586938421250', label: '脱脂成品库' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
|
||||
export const suanzhaConfig = {
|
||||
actionTypes: [11, 120],
|
||||
actionQueryParams: {
|
||||
createBy: 'suanzhakuguan'
|
||||
},
|
||||
baseQueryParams: {
|
||||
createBy: 'suanzhakuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{ label: '酸连轧成品库', value: '1988150099140866050' },
|
||||
{ label: '镀锌原料库', value: '1988150263284953089' },
|
||||
{ label: '脱脂原料库', value: '1988150545175736322' },
|
||||
{ label: '酸连轧纵剪分条原料库', value: '1988150150521090049' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
|
||||
export const zincConfig = {
|
||||
actionTypes: [501, 120],
|
||||
actionQueryParams: {
|
||||
createBy: 'duxinkuguan'
|
||||
},
|
||||
baseQueryParams: {
|
||||
createBy: 'duxinkuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{ value: '1988150323162836993', label: '镀锌成品库' },
|
||||
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
|
||||
{ value: '2019583656787259393', label: '技术部' },
|
||||
{ value: '2019583325311414274', label: '小钢卷库' },
|
||||
{ value: '2019583429955104769', label: '废品库' },
|
||||
{ value: '2019583137616310273', label: '退货库' },
|
||||
],
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
<script>
|
||||
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||
import { lajiaoConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
export default {
|
||||
name: 'ComprehensiveReport',
|
||||
@@ -17,20 +18,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
actionTypes: [503, 120],
|
||||
actionQueryParams: {
|
||||
updateBy: 'lajiaokuguan'
|
||||
},
|
||||
baseQueryParams: {
|
||||
createBy: 'lajiaokuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{value: '1988150915591499777', label: '拉矫成品库'},
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
...lajiaoConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
<script>
|
||||
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||
import { shuangConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
export default {
|
||||
name: 'ShuangComprehensiveReport',
|
||||
@@ -17,20 +18,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
actionTypes: [504, 120],
|
||||
actionQueryParams: {
|
||||
createBy: 'shuangkuguan'
|
||||
},
|
||||
baseQueryParams: {
|
||||
createBy: 'shuangkuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{value: '1992873437713080322', label: '双机架成品库'},
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
...shuangConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
<script>
|
||||
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||
import { tuozhiConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
export default {
|
||||
name: 'ComprehensiveReport',
|
||||
@@ -17,20 +18,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
actionTypes: [502, 120],
|
||||
actionQueryParams: {
|
||||
createBy: 'tuozhikuguan'
|
||||
},
|
||||
baseQueryParams: {
|
||||
createBy: 'tuozhikuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{value: '1988150586938421250', label: '脱脂成品库'},
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
...tuozhiConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
<script>
|
||||
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||
import { suanzhaConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
export default {
|
||||
name: 'ComprehensiveReport',
|
||||
@@ -17,23 +18,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
actionTypes: [11, 120],
|
||||
actionQueryParams: {
|
||||
createBy: 'suanzhakuguan'
|
||||
},
|
||||
baseQueryParams: {
|
||||
createBy: 'suanzhakuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{ label: '酸连轧成品库', value: '1988150099140866050' },
|
||||
{ label: '镀锌原料库', value: '1988150263284953089' },
|
||||
{ label: '脱脂原料库', value: '1988150545175736322' },
|
||||
{ label: '酸连轧纵剪分条原料库', value: '1988150150521090049' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
...suanzhaConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
25
klp-ui/src/views/wms/report/zha/loss.vue
Normal file
25
klp-ui/src/views/wms/report/zha/loss.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<LossTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
></LossTemplate>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LossTemplate from '@/views/wms/report/template/loss.vue'
|
||||
|
||||
export default {
|
||||
name: 'LossReport',
|
||||
components: {
|
||||
LossTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
actionTypes: [11, 120],
|
||||
actionQueryParams: {
|
||||
updateBy: 'suanzhakuguan'
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
34
klp-ui/src/views/wms/report/zha/out.vue
Normal file
34
klp-ui/src/views/wms/report/zha/out.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<OutTemplate
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OutTemplate from "@/views/wms/report/template/out.vue";
|
||||
|
||||
export default {
|
||||
name: 'ZhaTemplate',
|
||||
components: {
|
||||
OutTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseQueryParams: {
|
||||
createBy: 'suanzhakuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{ label: '酸连轧成品库', value: '1988150099140866050' },
|
||||
{ label: '镀锌原料库', value: '1988150263284953089' },
|
||||
{ label: '脱脂原料库', value: '1988150545175736322' },
|
||||
{ label: '酸连轧纵剪分条原料库', value: '1988150150521090049' },
|
||||
{ label: '技术部', value: '2019583656787259393' },
|
||||
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||
{ label: '废品库', value: '2019583429955104769' },
|
||||
{ label: '退货库', value: '2019583137616310273' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
<script>
|
||||
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||
import { zincConfig } from '@/views/wms/report/js/config.js'
|
||||
|
||||
export default {
|
||||
name: 'ComprehensiveReport',
|
||||
@@ -17,21 +18,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
actionTypes: [501, 120],
|
||||
actionQueryParams: {
|
||||
createBy: 'duxinkuguan'
|
||||
},
|
||||
baseQueryParams: {
|
||||
createBy: 'duxinkuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{ value: '1988150323162836993', label: '镀锌成品库' },
|
||||
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
|
||||
{ value: '2019583656787259393', label: '技术部' },
|
||||
{ value: '2019583325311414274', label: '小钢卷库' },
|
||||
{ value: '2019583429955104769', label: '废品库' },
|
||||
{ value: '2019583137616310273', label: '退货库' },
|
||||
],
|
||||
...zincConfig,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
25
klp-ui/src/views/wms/report/zinc/loss.vue
Normal file
25
klp-ui/src/views/wms/report/zinc/loss.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<LossTemplate
|
||||
:actionTypes="actionTypes"
|
||||
:actionQueryParams="actionQueryParams"
|
||||
></LossTemplate>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LossTemplate from '@/views/wms/report/template/loss.vue'
|
||||
|
||||
export default {
|
||||
name: 'LossReport',
|
||||
components: {
|
||||
LossTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
actionTypes: [501, 120],
|
||||
actionQueryParams: {
|
||||
createBy: 'duxinkuguan'
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
32
klp-ui/src/views/wms/report/zinc/out.vue
Normal file
32
klp-ui/src/views/wms/report/zinc/out.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<OutTemplate
|
||||
:baseQueryParams="baseQueryParams"
|
||||
:warehouseOptions="warehouseOptions"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OutTemplate from "@/views/wms/report/template/out.vue";
|
||||
|
||||
export default {
|
||||
name: 'ZhaTemplate',
|
||||
components: {
|
||||
OutTemplate,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseQueryParams: {
|
||||
createBy: 'duxinkuguan',
|
||||
},
|
||||
warehouseOptions: [
|
||||
{ value: '1988150323162836993', label: '镀锌成品库' },
|
||||
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
|
||||
{ value: '2019583656787259393', label: '技术部' },
|
||||
{ value: '2019583325311414274', label: '小钢卷库' },
|
||||
{ value: '2019583429955104769', label: '废品库' },
|
||||
{ value: '2019583137616310273', label: '退货库' },
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user