feat(报表): 新增综合报表模板及M卷统计功能
新增综合报表模板,支持按不同仓库类型展示统计信息。添加M卷处理功能,在统计中自动过滤并计算M卷数据。优化报表展示顺序,默认显示产出钢卷。修复异常率计算问题,完善统计信息展示。 新增仓库特定报表页面,包括镀铬、拉矫、脱脂、双机架、镀锌和酸连轧成品库报表。调整KLPTable组件支持高度设置,优化基础面板显示逻辑。 修复API请求超时问题,统一设置超时时间为10分钟。调整标签显示文本,优化用户体验。
This commit is contained in:
@@ -190,7 +190,8 @@ export function listCoilWithIds(data) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/wms/materialCoil/listByPost',
|
url: '/wms/materialCoil/listByPost',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data,
|
||||||
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ export function listPendingAction(query) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/wms/coilPendingAction/list',
|
url: '/wms/coilPendingAction/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query,
|
||||||
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<div class="el-table-container" ref="elTableWrapper" @mouseleave="handleTableLeave">
|
<div class="el-table-container" ref="elTableWrapper" @mouseleave="handleTableLeave">
|
||||||
<!-- 原生 Table 核心:透传 props/事件/插槽 -->
|
<!-- 原生 Table 核心:透传 props/事件/插槽 -->
|
||||||
<el-table :ref="tableRef" v-bind="$attrs" v-on="$listeners" :class="['my-table', customClass]"
|
<el-table :ref="tableRef" v-bind="$attrs" v-on="$listeners" :class="['my-table', customClass]"
|
||||||
@cell-mouse-enter="handleCellEnter" @row-mouseleave="handleRowLeave">
|
@cell-mouse-enter="handleCellEnter" @row-mouseleave="handleRowLeave" :height="height">
|
||||||
<!-- 2. 透传原生内置插槽(如 empty 空数据插槽、append 底部插槽等) -->
|
<!-- 2. 透传原生内置插槽(如 empty 空数据插槽、append 底部插槽等) -->
|
||||||
<template v-slot:empty="scope">
|
<template v-slot:empty="scope">
|
||||||
<slot name="empty" v-bind="scope"></slot>
|
<slot name="empty" v-bind="scope"></slot>
|
||||||
@@ -80,6 +80,10 @@ export default {
|
|||||||
columns: [],
|
columns: [],
|
||||||
title: '详细信息'
|
title: '详细信息'
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export default {
|
|||||||
},
|
},
|
||||||
showNowButton: {
|
showNowButton: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
querys: {
|
querys: {
|
||||||
dataType: 1,
|
dataType: 1,
|
||||||
|
orderByAbnormal: true,
|
||||||
// 筛选异常数量大于等于1的
|
// 筛选异常数量大于等于1的
|
||||||
// minAbnormalCount: 1
|
// minAbnormalCount: 1
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<div class="info-grid-item value-cell">
|
<div class="info-grid-item value-cell">
|
||||||
<input type="text" class="nob" :value="content.zincLayer || ''" />
|
<input type="text" class="nob" :value="content.zincLayer || ''" />
|
||||||
</div>
|
</div>
|
||||||
<div class="info-grid-item label-cell">表面质量</div>
|
<div class="info-grid-item label-cell">质量状态</div>
|
||||||
<div class="info-grid-item value-cell">
|
<div class="info-grid-item value-cell">
|
||||||
<input type="text" class="nob" :value="content.qualityStatus || ''" />
|
<input type="text" class="nob" :value="content.qualityStatus || ''" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -59,10 +59,10 @@
|
|||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
|
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
|
||||||
@click="handleCheck">修正</el-button>
|
@click="handleCheck">修正</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
|
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
|
||||||
@click="handleDelete">删除</el-button>
|
@click="handleDelete">删除</el-button>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<KLPTable v-loading="loading" :data="materialCoilList" @selection-change="handleSelectionChange" :floatLayer="true"
|
<KLPTable v-loading="loading" :data="materialCoilList" @selection-change="handleSelectionChange" :floatLayer="true"
|
||||||
:floatLayerConfig="floatLayerConfig" @row-click="handleRowClick">
|
:floatLayerConfig="floatLayerConfig" @row-click="handleRowClick" :height="showAbnormal ? 'calc(100vh - 400px)' : ''">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo">
|
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -281,8 +281,8 @@
|
|||||||
@click="handleReturnCoil(scope.row)">
|
@click="handleReturnCoil(scope.row)">
|
||||||
退货钢卷
|
退货钢卷
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleCheck(scope.row)"
|
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleCheck(scope.row)"
|
||||||
v-if="showControl">修正</el-button>
|
v-if="showControl">修正</el-button> -->
|
||||||
<el-button size="mini" type="text" icon="el-icon-search" @click="handleTrace(scope.row)">追溯</el-button>
|
<el-button size="mini" type="text" icon="el-icon-search" @click="handleTrace(scope.row)">追溯</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
37
klp-ui/src/views/wms/report/duge/comprehensive.vue
Normal file
37
klp-ui/src/views/wms/report/duge/comprehensive.vue
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<ComprehensiveTemplate
|
||||||
|
:actionTypes="actionTypes"
|
||||||
|
:actionQueryParams="actionQueryParams"
|
||||||
|
:baseQueryParams="baseQueryParams"
|
||||||
|
:warehouseOptions="warehouseOptions"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ComprehensiveReport',
|
||||||
|
components: {
|
||||||
|
ComprehensiveTemplate,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
actionTypes: [505, 120],
|
||||||
|
actionQueryParams: {
|
||||||
|
updateBy: 'dugekuguan'
|
||||||
|
},
|
||||||
|
baseQueryParams: {
|
||||||
|
createBy: 'dugekuguan',
|
||||||
|
},
|
||||||
|
warehouseOptions: [
|
||||||
|
{value: '1988151132361519105', label: '镀铬成品库'},
|
||||||
|
{ label: '技术部', value: '2019583656787259393' },
|
||||||
|
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||||
|
{ label: '废品库', value: '2019583429955104769' },
|
||||||
|
{ label: '退货库', value: '2019583137616310273' },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -14,7 +14,7 @@ const calcSummary = (list, lossList) => {
|
|||||||
const totalAvgWeight = totalCount > 0 ? (totalWeight / totalCount)?.toFixed(2) : 0
|
const totalAvgWeight = totalCount > 0 ? (totalWeight / totalCount)?.toFixed(2) : 0
|
||||||
|
|
||||||
// 成品比率
|
// 成品比率
|
||||||
const passRate = outCount > 0 ? (outTotalWeight / lossTotalWeight) : 0
|
const passRate = outCount > 0 && lossTotalWeight > 0 ? (outTotalWeight / lossTotalWeight) : 0
|
||||||
// 损失比率
|
// 损失比率
|
||||||
const lossRate = totalCount > 0 ? (1 - passRate) : 0
|
const lossRate = totalCount > 0 ? (1 - passRate) : 0
|
||||||
// 异常率,成品在warehouseId在'2019583656787259393',
|
// 异常率,成品在warehouseId在'2019583656787259393',
|
||||||
@@ -26,7 +26,7 @@ const calcSummary = (list, lossList) => {
|
|||||||
}).length / totalCount : 0
|
}).length / totalCount : 0
|
||||||
|
|
||||||
// 正品率(1-异常率)
|
// 正品率(1-异常率)
|
||||||
const passRate2 = totalCount != 0 ? (1 - abRate * totalCount) : 0
|
const passRate2 = totalCount != 0 ? (1 - abRate) : 0
|
||||||
|
|
||||||
return {
|
return {
|
||||||
outCount,
|
outCount,
|
||||||
@@ -102,15 +102,15 @@ const calcAbSummary = (list) => {
|
|||||||
{ label: '废品库钢卷数', value: o['rubbishCount'] },
|
{ label: '废品库钢卷数', value: o['rubbishCount'] },
|
||||||
{ label: '退货库钢卷数', value: o['returnCount'] },
|
{ label: '退货库钢卷数', value: o['returnCount'] },
|
||||||
|
|
||||||
{ label: '技术部钢卷重量', value: o['jishuWeight'] },
|
{ label: '技术部钢卷重量', value: o['jishuWeight'].toFixed(2) },
|
||||||
{ label: '小钢卷库钢卷重量', value: o['miniWeight'] },
|
{ label: '小钢卷库钢卷重量', value: o['miniWeight'].toFixed(2) },
|
||||||
{ label: '废品库钢卷重量', value: o['rubbishWeight'] },
|
{ label: '废品库钢卷重量', value: o['rubbishWeight'].toFixed(2) },
|
||||||
{ label: '退货库钢卷重量', value: o['returnWeight'] },
|
{ label: '退货库钢卷重量', value: o['returnWeight'].toFixed(2) },
|
||||||
|
|
||||||
{ label: '技术部占比', value: (o['jishuCount'] / totalCount * 100).toFixed(2) + '%' },
|
{ label: '技术部占比', value: totalCount > 0 ? (o['jishuCount'] / totalCount * 100).toFixed(2) + '%' : '0.00%' },
|
||||||
{ label: '小钢卷库占比', value: (o['miniCount'] / totalCount * 100).toFixed(2) + '%' },
|
{ label: '小钢卷库占比', value: totalCount > 0 ? (o['miniCount'] / totalCount * 100).toFixed(2) + '%' : '0.00%' },
|
||||||
{ label: '废品库占比', value: (o['rubbishCount'] / totalCount * 100).toFixed(2) + '%' },
|
{ label: '废品库占比', value: totalCount > 0 ? (o['rubbishCount'] / totalCount * 100).toFixed(2) + '%' : '0.00%' },
|
||||||
{ label: '退货库占比', value: (o['returnCount'] / totalCount * 100).toFixed(2) + '%' },
|
{ label: '退货库占比', value: totalCount > 0 ? (o['returnCount'] / totalCount * 100).toFixed(2) + '%' : '0.00%' },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,8 +131,68 @@ const calcTeamSummary = (list) => {
|
|||||||
return teamSummary
|
return teamSummary
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const calcMSummary = (list, lossList) => {
|
||||||
|
// 统计,需要二外处理M卷,也就是钢卷的currentCoilNo中带有M的钢卷,在统计产出钢卷的数量和重量时需要忽略并记录,并且在统计消耗钢卷的总重量时也需要移除
|
||||||
|
|
||||||
|
// 筛选出 M 卷
|
||||||
|
const mCoils = list.filter(item => item.currentCoilNo && item.currentCoilNo.includes('M'))
|
||||||
|
// 非 M 卷
|
||||||
|
const nonMCoils = list.filter(item => !item.currentCoilNo || !item.currentCoilNo.includes('M'))
|
||||||
|
|
||||||
|
// 非 M 卷作为产出统计
|
||||||
|
const outCount = nonMCoils.length
|
||||||
|
const outTotalWeight = nonMCoils.reduce((acc, cur) => acc + (parseFloat(cur.netWeight) || 0), 0)
|
||||||
|
const outAvgWeight = outCount > 0 ? (outTotalWeight / outCount)?.toFixed(2) : 0
|
||||||
|
|
||||||
|
// 计算产出的 M 卷总重量
|
||||||
|
const mOutTotalWeight = mCoils.reduce((acc, cur) => acc + (parseFloat(cur.netWeight) || 0), 0)
|
||||||
|
|
||||||
|
// 消耗钢卷统计(数量包括所有卷,但总重量减去产出的 M 卷重量)
|
||||||
|
const lossCount = lossList.length
|
||||||
|
const lossTotalWeight = lossList.reduce((acc, cur) => acc + (parseFloat(cur.netWeight) || 0), 0) - mOutTotalWeight
|
||||||
|
const lossAvgWeight = lossCount > 0 ? (lossTotalWeight / lossCount)?.toFixed(2) : 0
|
||||||
|
|
||||||
|
// 合计
|
||||||
|
const totalCount = outCount + lossCount
|
||||||
|
const totalWeight = parseFloat((outTotalWeight + lossTotalWeight).toFixed(2))
|
||||||
|
const totalAvgWeight = totalCount > 0 ? (totalWeight / totalCount)?.toFixed(2) : 0
|
||||||
|
|
||||||
|
// 成品比率
|
||||||
|
const passRate = outCount > 0 && lossTotalWeight > 0 ? (outTotalWeight / lossTotalWeight) : 0
|
||||||
|
// 损失比率
|
||||||
|
const lossRate = totalCount > 0 ? (1 - passRate) : 0
|
||||||
|
|
||||||
|
// 异常率,成品在warehouseId在'2019583656787259393',
|
||||||
|
// '2019583325311414274',
|
||||||
|
// '2019583429955104769',
|
||||||
|
// '2019583137616310273',这四个库中的占比
|
||||||
|
const abRate = totalCount != 0 ? nonMCoils.filter(item => {
|
||||||
|
return item.warehouseId == '2019583656787259393' || item.warehouseId == '2019583325311414274' || item.warehouseId == '2019583429955104769' || item.warehouseId == '2019583137616310273'
|
||||||
|
}).length / totalCount : 0
|
||||||
|
|
||||||
|
// 正品率(1-异常率)
|
||||||
|
const passRate2 = totalCount != 0 ? (1 - abRate) : 0
|
||||||
|
|
||||||
|
return {
|
||||||
|
outCount,
|
||||||
|
outTotalWeight: outTotalWeight.toFixed(2),
|
||||||
|
outAvgWeight,
|
||||||
|
lossCount,
|
||||||
|
lossTotalWeight: lossTotalWeight.toFixed(2),
|
||||||
|
lossAvgWeight,
|
||||||
|
totalCount,
|
||||||
|
totalWeight: totalWeight.toFixed(2),
|
||||||
|
totalAvgWeight,
|
||||||
|
passRate: (passRate * 100)?.toFixed(2) + '%',
|
||||||
|
lossRate: (lossRate * 100)?.toFixed(2) + '%',
|
||||||
|
abRate: (abRate * 100)?.toFixed(2) || 0,
|
||||||
|
passRate2: (passRate2 * 100)?.toFixed(2) || 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
calcSummary,
|
calcSummary,
|
||||||
calcAbSummary,
|
calcAbSummary,
|
||||||
calcTeamSummary,
|
calcTeamSummary,
|
||||||
|
calcMSummary,
|
||||||
}
|
}
|
||||||
37
klp-ui/src/views/wms/report/lajiao/comprehensive.vue
Normal file
37
klp-ui/src/views/wms/report/lajiao/comprehensive.vue
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<ComprehensiveTemplate
|
||||||
|
:actionTypes="actionTypes"
|
||||||
|
:actionQueryParams="actionQueryParams"
|
||||||
|
:baseQueryParams="baseQueryParams"
|
||||||
|
:warehouseOptions="warehouseOptions"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ComprehensiveReport',
|
||||||
|
components: {
|
||||||
|
ComprehensiveTemplate,
|
||||||
|
},
|
||||||
|
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' },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -61,6 +61,31 @@
|
|||||||
<el-descriptions-item label="损耗率">{{ summary.lossRate }}</el-descriptions-item>
|
<el-descriptions-item label="损耗率">{{ summary.lossRate }}</el-descriptions-item>
|
||||||
<!-- 异常率 -->
|
<!-- 异常率 -->
|
||||||
<el-descriptions-item label="异常率">{{ summary.abRate }}</el-descriptions-item>
|
<el-descriptions-item label="异常率">{{ summary.abRate }}</el-descriptions-item>
|
||||||
|
<!-- 正品率 -->
|
||||||
|
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<!-- 已处理M统计信息 -->
|
||||||
|
<el-descriptions title="已处理M统计信息" :column="3" border>
|
||||||
|
<el-descriptions-item label="产出数量">{{ mSummary.outCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出总重">{{ mSummary.outTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出均重">{{ mSummary.outAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="消耗数量">{{ mSummary.lossCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗总重">{{ mSummary.lossTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗均重">{{ mSummary.lossAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="合计数量">{{ mSummary.totalCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计总重">{{ mSummary.totalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计均重">{{ mSummary.totalAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<!-- 成品率 -->
|
||||||
|
<el-descriptions-item label="成品率">{{ mSummary.passRate }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="损耗率">{{ mSummary.lossRate }}</el-descriptions-item>
|
||||||
|
<!-- 异常率 -->
|
||||||
|
<el-descriptions-item label="异常率">{{ mSummary.abRate }}</el-descriptions-item>
|
||||||
|
<!-- 正品率 -->
|
||||||
|
<el-descriptions-item label="正品率">{{ mSummary.passRate2 }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
<el-descriptions title="明细信息" :column="3" border>
|
<el-descriptions title="明细信息" :column="3" border>
|
||||||
@@ -94,7 +119,7 @@ import MutiSelect from "@/components/MutiSelect";
|
|||||||
import ProductInfo from "@/components/KLPService/Renderer/ProductInfo";
|
import ProductInfo from "@/components/KLPService/Renderer/ProductInfo";
|
||||||
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
||||||
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
||||||
import { calcSummary } from "@/views/wms/report/js/calc";
|
import { calcSummary, calcMSummary } from "@/views/wms/report/js/calc";
|
||||||
import CoilTable from "@/views/wms/report/components/coilTable";
|
import CoilTable from "@/views/wms/report/components/coilTable";
|
||||||
import ColumnsSetting from "@/views/wms/report/components/setting/columns";
|
import ColumnsSetting from "@/views/wms/report/components/setting/columns";
|
||||||
|
|
||||||
@@ -191,6 +216,9 @@ export default {
|
|||||||
summary() {
|
summary() {
|
||||||
return calcSummary(this.outList, this.lossList)
|
return calcSummary(this.outList, this.lossList)
|
||||||
},
|
},
|
||||||
|
mSummary() {
|
||||||
|
return calcMSummary(this.outList, this.lossList)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
|
|||||||
37
klp-ui/src/views/wms/report/shuang/comprehensive.vue
Normal file
37
klp-ui/src/views/wms/report/shuang/comprehensive.vue
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<ComprehensiveTemplate
|
||||||
|
:actionTypes="actionTypes"
|
||||||
|
:actionQueryParams="actionQueryParams"
|
||||||
|
:baseQueryParams="baseQueryParams"
|
||||||
|
:warehouseOptions="warehouseOptions"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ShuangComprehensiveReport',
|
||||||
|
components: {
|
||||||
|
ComprehensiveTemplate,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
actionTypes: [504, 120],
|
||||||
|
actionQueryParams: {
|
||||||
|
updateBy: 'shuangkuguan'
|
||||||
|
},
|
||||||
|
baseQueryParams: {
|
||||||
|
createBy: 'shuangkuguan',
|
||||||
|
},
|
||||||
|
warehouseOptions: [
|
||||||
|
{value: '1992873437713080322', label: '双机架成品库'},
|
||||||
|
{ label: '技术部', value: '2019583656787259393' },
|
||||||
|
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||||
|
{ label: '废品库', value: '2019583429955104769' },
|
||||||
|
{ label: '退货库', value: '2019583137616310273' },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
402
klp-ui/src/views/wms/report/template/comprehensive.vue
Normal file
402
klp-ui/src/views/wms/report/template/comprehensive.vue
Normal file
@@ -0,0 +1,402 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container" v-loading="loading">
|
||||||
|
<el-row>
|
||||||
|
<el-form label-width="80px" inline>
|
||||||
|
<el-form-item label="开始时间" prop="startDate">
|
||||||
|
<el-date-picker style="width: 200px;" v-model="queryParams.startDate" type="date" value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择开始日期" @change="handleDateChange"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="结束时间" prop="endDate">
|
||||||
|
<el-date-picker style="width: 200px;" v-model="queryParams.endDate" type="date" value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择结束日期" @change="handleDateChange"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="入场钢卷号" prop="enterCoilNo">
|
||||||
|
<el-input style="width: 200px; display: inline-block;" v-model="queryParams.enterCoilNo"
|
||||||
|
placeholder="请输入入场钢卷号" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="当前钢卷号" prop="currentCoilNo">
|
||||||
|
<el-input style="width: 200px;" v-model="queryParams.currentCoilNo" placeholder="请输入当前钢卷号" clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="逻辑库位" prop="warehouseIds">
|
||||||
|
<el-select v-model="warehouseIds" collapse-tags multiple placeholder="请选择逻辑库位" style="width: 200px;">
|
||||||
|
<el-option v-for="item in warehouseOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品名称" prop="itemName">
|
||||||
|
<el-input style="width: 200px;" v-model="queryParams.itemName" placeholder="请输入产品名称" clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格" prop="itemSpecification">
|
||||||
|
<memo-input style="width: 200px;" v-model="queryParams.itemSpecification" storageKey="coilSpec"
|
||||||
|
placeholder="请选择规格" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="材质" prop="itemMaterial">
|
||||||
|
<muti-select style="width: 200px;" v-model="queryParams.itemMaterial" :options="dict.type.coil_material"
|
||||||
|
placeholder="请选择材质" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="厂家" prop="itemManufacturer">
|
||||||
|
<muti-select style="width: 200px;" v-model="queryParams.itemManufacturer"
|
||||||
|
:options="dict.type.coil_manufacturer" placeholder="请选择厂家" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||||
|
<el-button type="primary" @click="exportData">导出产出钢卷</el-button>
|
||||||
|
<el-button type="primary" @click="exportLossData">导出消耗钢卷</el-button>
|
||||||
|
<el-button type="primary" @click="settingVisible = true">列设置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-descriptions title="统计信息" :column="3" border>
|
||||||
|
<el-descriptions-item label="产出数量">{{ summary.outCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出总重">{{ summary.outTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出均重">{{ summary.outAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="消耗数量">{{ summary.lossCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗总重">{{ summary.lossTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗均重">{{ summary.lossAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="合计数量">{{ summary.totalCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计总重">{{ summary.totalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计均重">{{ summary.totalAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<!-- 成品率 -->
|
||||||
|
<el-descriptions-item label="成品率">{{ summary.passRate }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="损耗率">{{ summary.lossRate }}</el-descriptions-item>
|
||||||
|
<!-- 异常率 -->
|
||||||
|
<el-descriptions-item label="异常率">{{ summary.abRate }}</el-descriptions-item>
|
||||||
|
<!-- 正品率 -->
|
||||||
|
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<!-- 已处理M统计信息 -->
|
||||||
|
<el-descriptions title="已处理M统计信息" :column="3" border>
|
||||||
|
<el-descriptions-item label="产出数量">{{ mSummary.outCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出总重">{{ mSummary.outTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出均重">{{ mSummary.outAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="消耗数量">{{ mSummary.lossCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗总重">{{ mSummary.lossTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗均重">{{ mSummary.lossAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="合计数量">{{ mSummary.totalCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计总重">{{ mSummary.totalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计均重">{{ mSummary.totalAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<!-- 成品率 -->
|
||||||
|
<el-descriptions-item label="成品率">{{ mSummary.passRate }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="损耗率">{{ mSummary.lossRate }}</el-descriptions-item>
|
||||||
|
<!-- 异常率 -->
|
||||||
|
<el-descriptions-item label="异常率">{{ mSummary.abRate }}</el-descriptions-item>
|
||||||
|
<!-- 正品率 -->
|
||||||
|
<el-descriptions-item label="正品率">{{ mSummary.passRate2 }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<!-- 异常统计 -->
|
||||||
|
<el-descriptions title="异常统计" :column="4" border>
|
||||||
|
<el-descriptions-item v-for="item in abSummary" :key="item.label" :label="item.label">{{ item.value
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-descriptions title="明细信息" :column="3" border>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-tabs v-model="activeTab">
|
||||||
|
<el-tab-pane label="产出钢卷" name="output">
|
||||||
|
<coil-table :columns="outputColumns" :data="list"></coil-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="投入钢卷" name="loss">
|
||||||
|
<coil-table :columns="lossColumns" :data="lossList"></coil-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<el-dialog title="列设置" :visible.sync="settingVisible" width="50%">
|
||||||
|
<el-radio-group v-model="activeColumnConfig">
|
||||||
|
<el-radio-button label="coil-report-loss">投入明细配置</el-radio-button>
|
||||||
|
<el-radio-button label="coil-report-output">产出明细配置</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
<columns-setting :reportType="activeColumnConfig"></columns-setting>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listCoilWithIds } from "@/api/wms/coil";
|
||||||
|
import {
|
||||||
|
listPendingAction,
|
||||||
|
} from '@/api/wms/pendingAction';
|
||||||
|
import ProductInfo from "@/components/KLPService/Renderer/ProductInfo";
|
||||||
|
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
||||||
|
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
||||||
|
import MemoInput from "@/components/MemoInput";
|
||||||
|
import MutiSelect from "@/components/MutiSelect";
|
||||||
|
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||||
|
import { calcSummary, calcAbSummary, calcMSummary } from "@/views/wms/report/js/calc";
|
||||||
|
import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue";
|
||||||
|
import CoilTable from "@/views/wms/report/components/coilTable/index.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ComprehensiveTemplate',
|
||||||
|
components: {
|
||||||
|
ProductInfo,
|
||||||
|
RawMaterialInfo,
|
||||||
|
CoilNo,
|
||||||
|
MemoInput,
|
||||||
|
MutiSelect,
|
||||||
|
WarehouseSelect,
|
||||||
|
ColumnsSetting,
|
||||||
|
CoilTable,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
actionTypes: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
actionQueryParams: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { },
|
||||||
|
},
|
||||||
|
baseQueryParams: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
warehouseOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
|
||||||
|
data() {
|
||||||
|
// 工具函数:个位数补零
|
||||||
|
const addZero = (num) => num.toString().padStart(2, '0')
|
||||||
|
|
||||||
|
// 获取当前日期(默认选中当天)
|
||||||
|
const now = new Date()
|
||||||
|
const currentDate = `${now.getFullYear()}-${addZero(now.getMonth() + 1)}`
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成指定日期/月份的时间范围字符串
|
||||||
|
* @param {string} dateStr - 支持格式:yyyy-MM(月份) 或 yyyy-MM-dd(具体日期)
|
||||||
|
* @returns {object} 包含start(开始时间)和end(结束时间)的对象
|
||||||
|
*/
|
||||||
|
const getDayTimeRange = (dateStr) => {
|
||||||
|
// 先校验输入格式是否合法
|
||||||
|
const monthPattern = /^\d{4}-\d{2}$/; // yyyy-MM 正则
|
||||||
|
const dayPattern = /^\d{4}-\d{2}-\d{2}$/; // yyyy-MM-dd 正则
|
||||||
|
|
||||||
|
if (!monthPattern.test(dateStr) && !dayPattern.test(dateStr)) {
|
||||||
|
throw new Error('输入格式错误,请传入 yyyy-MM 或 yyyy-MM-dd 格式的字符串');
|
||||||
|
}
|
||||||
|
|
||||||
|
let startDate, endDate;
|
||||||
|
|
||||||
|
if (monthPattern.test(dateStr)) {
|
||||||
|
// 处理 yyyy-MM 格式:获取本月第一天和最后一天
|
||||||
|
const [year, month] = dateStr.split('-').map(Number);
|
||||||
|
// 月份是0基的(0=1月,1=2月...),所以要减1
|
||||||
|
// 第一天:yyyy-MM-01
|
||||||
|
startDate = `${dateStr}-01`;
|
||||||
|
// 最后一天:通过 new Date(year, month, 0) 计算(month是原始月份,比如2代表2月,传2则取3月0日=2月最后一天)
|
||||||
|
const lastDayOfMonth = new Date(year, month, 0).getDate();
|
||||||
|
endDate = `${dateStr}-${lastDayOfMonth.toString().padStart(2, '0')}`;
|
||||||
|
} else {
|
||||||
|
// 处理 yyyy-MM-dd 格式:直接使用传入的日期
|
||||||
|
startDate = dateStr;
|
||||||
|
endDate = dateStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 拼接时间部分
|
||||||
|
return {
|
||||||
|
start: `${startDate} 00:00:00`,
|
||||||
|
end: `${endDate} 23:59:59`
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const { start, end } = getDayTimeRange(currentDate)
|
||||||
|
|
||||||
|
return {
|
||||||
|
activeTab: 'output',
|
||||||
|
activeColumnConfig: 'coil-report-loss',
|
||||||
|
settingVisible: false,
|
||||||
|
list: [],
|
||||||
|
lossList: [],
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 9999,
|
||||||
|
date: currentDate, // 绑定日期选择器的默认值(当天)
|
||||||
|
byCreateTimeStart: start, // 默认当天0点
|
||||||
|
byCreateTimeEnd: end, // 默认当天23:59:59
|
||||||
|
selectType: 'product',
|
||||||
|
enterCoilNo: '',
|
||||||
|
currentCoilNo: '',
|
||||||
|
warehouseId: '',
|
||||||
|
itemName: '', // 修正原代码的productName为itemName(和表单绑定一致)
|
||||||
|
itemSpecification: '',
|
||||||
|
itemMaterial: '',
|
||||||
|
itemManufacturer: '',
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
warehouseIds: [
|
||||||
|
'1988150099140866050',
|
||||||
|
'1988150263284953089',
|
||||||
|
'1988150545175736322',
|
||||||
|
'1988150150521090049',
|
||||||
|
'2019583656787259393',
|
||||||
|
'2019583325311414274',
|
||||||
|
'2019583429955104769',
|
||||||
|
'2019583137616310273',
|
||||||
|
],
|
||||||
|
getDayTimeRange, // 挂载时间范围生成函数
|
||||||
|
|
||||||
|
lossColumns: [],
|
||||||
|
outputColumns: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
warehouseOptions: {
|
||||||
|
handler(newVal, oldVal) {
|
||||||
|
if (newVal !== oldVal) {
|
||||||
|
this.warehouseIds = newVal.map(item => item.value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
summary() {
|
||||||
|
return calcSummary(this.list, this.lossList)
|
||||||
|
},
|
||||||
|
abSummary() {
|
||||||
|
return calcAbSummary(this.list)
|
||||||
|
},
|
||||||
|
mSummary() {
|
||||||
|
return calcMSummary(this.list, this.lossList)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 加载列设置
|
||||||
|
loadColumns() {
|
||||||
|
this.lossColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-loss') || '[]') || []
|
||||||
|
this.outputColumns = JSON.parse(localStorage.getItem('preference-tableColumns-coil-report-output') || '[]') || []
|
||||||
|
},
|
||||||
|
// 日期变更处理:更新开始/结束时间
|
||||||
|
handleDateChange() {
|
||||||
|
if (this.queryParams.startDate && this.queryParams.endDate) {
|
||||||
|
this.queryParams.byCreateTimeStart = `${this.queryParams.startDate} 00:00:00`
|
||||||
|
this.queryParams.byCreateTimeEnd = `${this.queryParams.endDate} 23:59:59`
|
||||||
|
// 日期变更后自动查询
|
||||||
|
this.handleQuery()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 统一查询入口(兼容回车和按钮点击)
|
||||||
|
handleQuery() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
// 核心查询逻辑
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
Promise.all([
|
||||||
|
listCoilWithIds({
|
||||||
|
selectType: 'raw_material',
|
||||||
|
itemType: 'raw_material',
|
||||||
|
warehouseIds: this.warehouseIds.join(','),
|
||||||
|
...this.queryParams,
|
||||||
|
...this.baseQueryParams,
|
||||||
|
}),
|
||||||
|
listCoilWithIds({
|
||||||
|
selectType: 'product',
|
||||||
|
itemType: 'product',
|
||||||
|
warehouseIds: this.warehouseIds.join(','),
|
||||||
|
...this.queryParams,
|
||||||
|
...this.baseQueryParams,
|
||||||
|
}),
|
||||||
|
]).then((resList) => {
|
||||||
|
console.log(resList)
|
||||||
|
const list = resList.flatMap(res => res.rows)
|
||||||
|
// 按照createTime 降序排序
|
||||||
|
this.list = list.sort(
|
||||||
|
(a, b) => new Date(b.createTime) - new Date(a.createTime)
|
||||||
|
).map(item => {
|
||||||
|
// 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度
|
||||||
|
const [thickness, width] = item.specification.split('*')
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
computedThickness: parseFloat(thickness),
|
||||||
|
computedWidth: parseFloat(width),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getLossList()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getLossList() {
|
||||||
|
this.loading = true
|
||||||
|
const resultList = await Promise.all(this.actionTypes.map(actionType => {
|
||||||
|
return listPendingAction({
|
||||||
|
actionStatus: 2,
|
||||||
|
warehouseId: this.queryParams.planId,
|
||||||
|
actionType,
|
||||||
|
pageSize: 9999,
|
||||||
|
pageNum: 1,
|
||||||
|
startTime: this.queryParams.byCreateTimeStart,
|
||||||
|
endTime: this.queryParams.byCreateTimeEnd,
|
||||||
|
...this.actionQueryParams,
|
||||||
|
})
|
||||||
|
}))
|
||||||
|
const actions = resultList.flatMap(item => item.rows)
|
||||||
|
const coilIds = actions.map(item => item.coilId).join(',')
|
||||||
|
console.log(coilIds)
|
||||||
|
if (!coilIds) {
|
||||||
|
this.$message({
|
||||||
|
message: '暂无数据',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
this.lossList = []
|
||||||
|
this.loading = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
listCoilWithIds({
|
||||||
|
...this.queryParams,
|
||||||
|
byCreateTimeStart: undefined,
|
||||||
|
byCreateTimeEnd: undefined,
|
||||||
|
coilIds: coilIds,
|
||||||
|
}).then(res => {
|
||||||
|
this.lossList = res.rows.map(item => {
|
||||||
|
// 计算宽度和厚度,将规格按照*分割,*前的是厚度,*后的是宽度
|
||||||
|
const [thickness, width] = item.specification.split('*')
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
computedThickness: parseFloat(thickness),
|
||||||
|
computedWidth: parseFloat(width),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 导出
|
||||||
|
exportData() {
|
||||||
|
if (this.list.length === 0) {
|
||||||
|
this.$message.warning('暂无数据可导出')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.download('wms/materialCoil/export', {
|
||||||
|
coilIds: this.list.map(item => item.coilId).join(',')
|
||||||
|
}, `materialCoil_${this.queryParams.startDate}_${this.queryParams.endDate}_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
exportLossData() {
|
||||||
|
if (this.lossList.length === 0) {
|
||||||
|
this.$message.warning('暂无数据可导出')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.download('wms/materialCoil/export', {
|
||||||
|
coilIds: this.lossList.map(item => item.coilId).join(',')
|
||||||
|
}, `materialCoil_${this.queryParams.startDate}_${this.queryParams.endDate}_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getList()
|
||||||
|
this.loadColumns()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -66,6 +66,29 @@
|
|||||||
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
|
<!-- 已处理M统计信息 -->
|
||||||
|
<el-descriptions title="已处理M统计信息" :column="3" border>
|
||||||
|
<el-descriptions-item label="产出数量">{{ mSummary.outCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出总重">{{ mSummary.outTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出均重">{{ mSummary.outAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="消耗数量">{{ mSummary.lossCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗总重">{{ mSummary.lossTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗均重">{{ mSummary.lossAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="合计数量">{{ mSummary.totalCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计总重">{{ mSummary.totalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计均重">{{ mSummary.totalAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<!-- 成品率 -->
|
||||||
|
<el-descriptions-item label="成品率">{{ mSummary.passRate }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="损耗率">{{ mSummary.lossRate }}</el-descriptions-item>
|
||||||
|
<!-- 异常率 -->
|
||||||
|
<el-descriptions-item label="异常率">{{ mSummary.abRate }}</el-descriptions-item>
|
||||||
|
<!-- 正品率 -->
|
||||||
|
<el-descriptions-item label="正品率">{{ mSummary.passRate2 }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
<!-- 异常统计 -->
|
<!-- 异常统计 -->
|
||||||
<el-descriptions title="异常统计" :column="4" border>
|
<el-descriptions title="异常统计" :column="4" border>
|
||||||
<el-descriptions-item v-for="item in abSummary" :key="item.label" :label="item.label">{{ item.value
|
<el-descriptions-item v-for="item in abSummary" :key="item.label" :label="item.label">{{ item.value
|
||||||
@@ -75,12 +98,12 @@
|
|||||||
<el-descriptions title="明细信息" :column="3" border>
|
<el-descriptions title="明细信息" :column="3" border>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-tabs v-model="activeTab">
|
<el-tabs v-model="activeTab">
|
||||||
<el-tab-pane label="投入钢卷" name="loss">
|
|
||||||
<coil-table :columns="lossColumns" :data="lossList"></coil-table>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="产出钢卷" name="output">
|
<el-tab-pane label="产出钢卷" name="output">
|
||||||
<coil-table :columns="outputColumns" :data="list"></coil-table>
|
<coil-table :columns="outputColumns" :data="list"></coil-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="投入钢卷" name="loss">
|
||||||
|
<coil-table :columns="lossColumns" :data="lossList"></coil-table>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<el-dialog title="列设置" :visible.sync="settingVisible" width="50%">
|
<el-dialog title="列设置" :visible.sync="settingVisible" width="50%">
|
||||||
@@ -104,7 +127,7 @@ import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
|||||||
import MemoInput from "@/components/MemoInput";
|
import MemoInput from "@/components/MemoInput";
|
||||||
import MutiSelect from "@/components/MutiSelect";
|
import MutiSelect from "@/components/MutiSelect";
|
||||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||||
import { calcSummary, calcAbSummary } from "@/views/wms/report/js/calc";
|
import { calcSummary, calcAbSummary, calcMSummary } from "@/views/wms/report/js/calc";
|
||||||
import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue";
|
import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue";
|
||||||
import CoilTable from "@/views/wms/report/components/coilTable/index.vue";
|
import CoilTable from "@/views/wms/report/components/coilTable/index.vue";
|
||||||
|
|
||||||
@@ -158,7 +181,7 @@ export default {
|
|||||||
const { start, end } = getDayTimeRange(currentDate)
|
const { start, end } = getDayTimeRange(currentDate)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
activeTab: 'loss',
|
activeTab: 'output',
|
||||||
activeColumnConfig: 'coil-report-loss',
|
activeColumnConfig: 'coil-report-loss',
|
||||||
settingVisible: false,
|
settingVisible: false,
|
||||||
list: [],
|
list: [],
|
||||||
@@ -211,6 +234,9 @@ export default {
|
|||||||
},
|
},
|
||||||
abSummary() {
|
abSummary() {
|
||||||
return calcAbSummary(this.list)
|
return calcAbSummary(this.list)
|
||||||
|
},
|
||||||
|
mSummary() {
|
||||||
|
return calcMSummary(this.list, this.lossList)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -266,7 +292,7 @@ export default {
|
|||||||
computedWidth: parseFloat(width),
|
computedWidth: parseFloat(width),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.getLossList()
|
this.getLossList()
|
||||||
// this.loading = false
|
// this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -66,6 +66,29 @@
|
|||||||
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
|
<!-- 已处理M统计信息 -->
|
||||||
|
<el-descriptions title="已处理M统计信息" :column="3" border>
|
||||||
|
<el-descriptions-item label="产出数量">{{ mSummary.outCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出总重">{{ mSummary.outTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出均重">{{ mSummary.outAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="消耗数量">{{ mSummary.lossCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗总重">{{ mSummary.lossTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗均重">{{ mSummary.lossAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="合计数量">{{ mSummary.totalCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计总重">{{ mSummary.totalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计均重">{{ mSummary.totalAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<!-- 成品率 -->
|
||||||
|
<el-descriptions-item label="成品率">{{ mSummary.passRate }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="损耗率">{{ mSummary.lossRate }}</el-descriptions-item>
|
||||||
|
<!-- 异常率 -->
|
||||||
|
<el-descriptions-item label="异常率">{{ mSummary.abRate }}</el-descriptions-item>
|
||||||
|
<!-- 正品率 -->
|
||||||
|
<el-descriptions-item label="正品率">{{ mSummary.passRate2 }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
<!-- 异常统计 -->
|
<!-- 异常统计 -->
|
||||||
<el-descriptions title="异常统计" :column="4" border>
|
<el-descriptions title="异常统计" :column="4" border>
|
||||||
<el-descriptions-item v-for="item in abSummary" :key="item.label" :label="item.label">{{ item.value
|
<el-descriptions-item v-for="item in abSummary" :key="item.label" :label="item.label">{{ item.value
|
||||||
@@ -75,12 +98,12 @@
|
|||||||
<el-descriptions title="明细信息" :column="3" border>
|
<el-descriptions title="明细信息" :column="3" border>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-tabs v-model="activeTab">
|
<el-tabs v-model="activeTab">
|
||||||
<el-tab-pane label="投入钢卷" name="loss">
|
|
||||||
<coil-table :columns="lossColumns" :data="lossList"></coil-table>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="产出钢卷" name="output">
|
<el-tab-pane label="产出钢卷" name="output">
|
||||||
<coil-table :columns="outputColumns" :data="list"></coil-table>
|
<coil-table :columns="outputColumns" :data="list"></coil-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="投入钢卷" name="loss">
|
||||||
|
<coil-table :columns="lossColumns" :data="lossList"></coil-table>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<el-dialog title="列设置" :visible.sync="settingVisible" width="50%">
|
<el-dialog title="列设置" :visible.sync="settingVisible" width="50%">
|
||||||
@@ -104,7 +127,7 @@ import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
|||||||
import MemoInput from "@/components/MemoInput";
|
import MemoInput from "@/components/MemoInput";
|
||||||
import MutiSelect from "@/components/MutiSelect";
|
import MutiSelect from "@/components/MutiSelect";
|
||||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||||
import { calcSummary, calcAbSummary } from "@/views/wms/report/js/calc";
|
import { calcSummary, calcAbSummary, calcMSummary } from "@/views/wms/report/js/calc";
|
||||||
import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue";
|
import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue";
|
||||||
import CoilTable from "@/views/wms/report/components/coilTable/index.vue";
|
import CoilTable from "@/views/wms/report/components/coilTable/index.vue";
|
||||||
|
|
||||||
@@ -188,7 +211,7 @@ export default {
|
|||||||
const { start, end } = getDayTimeRange(currentDate)
|
const { start, end } = getDayTimeRange(currentDate)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
activeTab: 'loss',
|
activeTab: 'output',
|
||||||
activeColumnConfig: 'coil-report-loss',
|
activeColumnConfig: 'coil-report-loss',
|
||||||
settingVisible: false,
|
settingVisible: false,
|
||||||
list: [],
|
list: [],
|
||||||
@@ -241,6 +264,9 @@ export default {
|
|||||||
},
|
},
|
||||||
abSummary() {
|
abSummary() {
|
||||||
return calcAbSummary(this.list)
|
return calcAbSummary(this.list)
|
||||||
|
},
|
||||||
|
mSummary() {
|
||||||
|
return calcMSummary(this.list, this.lossList)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
168
klp-ui/src/views/wms/report/template/shuang.vue
Normal file
168
klp-ui/src/views/wms/report/template/shuang.vue
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container" v-loading="loading">
|
||||||
|
<el-row>
|
||||||
|
<el-form label-width="80px" inline>
|
||||||
|
<el-form-item label="开始时间" prop="startDate">
|
||||||
|
<el-date-picker style="width: 200px;" v-model="queryParams.startDate" type="date" value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择开始日期" @change="handleDateChange"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="结束时间" prop="endDate">
|
||||||
|
<el-date-picker style="width: 200px;" v-model="queryParams.endDate" type="date" value-format="yyyy-MM-dd"
|
||||||
|
placeholder="选择结束日期" @change="handleDateChange"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="入场钢卷号" prop="enterCoilNo">
|
||||||
|
<el-input style="width: 200px; display: inline-block;" v-model="queryParams.enterCoilNo"
|
||||||
|
placeholder="请输入入场钢卷号" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="当前钢卷号" prop="currentCoilNo">
|
||||||
|
<el-input style="width: 200px;" v-model="queryParams.currentCoilNo" placeholder="请输入当前钢卷号" clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="逻辑库位" prop="warehouseIds">
|
||||||
|
<el-select v-model="warehouseIds" collapse-tags multiple placeholder="请选择逻辑库位" style="width: 200px;">
|
||||||
|
<el-option v-for="item in warehouseOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品名称" prop="itemName">
|
||||||
|
<el-input style="width: 200px;" v-model="queryParams.itemName" placeholder="请输入产品名称" clearable
|
||||||
|
@keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格" prop="itemSpecification">
|
||||||
|
<memo-input style="width: 200px;" v-model="queryParams.itemSpecification" storageKey="coilSpec"
|
||||||
|
placeholder="请选择规格" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="材质" prop="itemMaterial">
|
||||||
|
<muti-select style="width: 200px;" v-model="queryParams.itemMaterial" :options="dict.type.coil_material"
|
||||||
|
placeholder="请选择材质" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="厂家" prop="itemManufacturer">
|
||||||
|
<muti-select style="width: 200px;" v-model="queryParams.itemManufacturer"
|
||||||
|
:options="dict.type.coil_manufacturer" placeholder="请选择厂家" clearable @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||||
|
<el-button type="primary" @click="exportData">导出产出钢卷</el-button>
|
||||||
|
<el-button type="primary" @click="exportLossData">导出消耗钢卷</el-button>
|
||||||
|
<el-button type="primary" @click="settingVisible = true">列设置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-descriptions title="统计信息" :column="3" border>
|
||||||
|
<el-descriptions-item label="产出数量">{{ summary.outCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出总重">{{ summary.outTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出均重">{{ summary.outAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="消耗数量">{{ summary.lossCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗总重">{{ summary.lossTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗均重">{{ summary.lossAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="合计数量">{{ summary.totalCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计总重">{{ summary.totalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计均重">{{ summary.totalAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<!-- 成品率 -->
|
||||||
|
<el-descriptions-item label="成品率">{{ summary.passRate }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="损耗率">{{ summary.lossRate }}</el-descriptions-item>
|
||||||
|
<!-- 异常率 -->
|
||||||
|
<el-descriptions-item label="异常率">{{ summary.abRate }}</el-descriptions-item>
|
||||||
|
<!-- 正品率 -->
|
||||||
|
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<!-- 异常统计 -->
|
||||||
|
<el-descriptions title="异常统计" :column="4" border>
|
||||||
|
<el-descriptions-item v-for="item in abSummary" :key="item.label" :label="item.label">{{ item.value
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-descriptions title="明细信息" :column="3" border>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-tabs v-model="activeTab">
|
||||||
|
<el-tab-pane label="产出钢卷" name="output">
|
||||||
|
<coil-table :columns="outputColumns" :data="list"></coil-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="投入钢卷" name="loss">
|
||||||
|
<coil-table :columns="lossColumns" :data="lossList"></coil-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<el-dialog title="列设置" :visible.sync="settingVisible" width="50%">
|
||||||
|
<el-radio-group v-model="activeColumnConfig">
|
||||||
|
<el-radio-button label="coil-report-loss">投入明细配置</el-radio-button>
|
||||||
|
<el-radio-button label="coil-report-output">产出明细配置</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
<columns-setting :reportType="activeColumnConfig"></columns-setting>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listCoilWithIds } from "@/api/wms/coil";
|
||||||
|
import {
|
||||||
|
listPendingAction,
|
||||||
|
} from '@/api/wms/pendingAction';
|
||||||
|
import ProductInfo from "@/components/KLPService/Renderer/ProductInfo";
|
||||||
|
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
||||||
|
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
||||||
|
import MemoInput from "@/components/MemoInput";
|
||||||
|
import MutiSelect from "@/components/MutiSelect";
|
||||||
|
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||||
|
import { calcSummary, calcAbSummary } from "@/views/wms/report/js/calc";
|
||||||
|
import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue";
|
||||||
|
import CoilTable from "@/views/wms/report/components/coilTable/index.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ShuangTemplate',
|
||||||
|
components: {
|
||||||
|
ProductInfo,
|
||||||
|
RawMaterialInfo,
|
||||||
|
CoilNo,
|
||||||
|
MemoInput,
|
||||||
|
MutiSelect,
|
||||||
|
WarehouseSelect,
|
||||||
|
ColumnsSetting,
|
||||||
|
CoilTable,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
actionTypes: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
actionQueryParams: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { },
|
||||||
|
},
|
||||||
|
baseQueryParams: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({})
|
||||||
|
},
|
||||||
|
warehouseOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
|
||||||
|
data() {
|
||||||
|
// 工具函数:个位数补零
|
||||||
|
const addZero = (num) => num.toString().padStart(2, '0')
|
||||||
|
|
||||||
|
// 获取当前日期(默认选中当天)
|
||||||
|
const now = new Date()
|
||||||
|
const currentDate = `${now.getFullYear()}-${addZero(now.getMonth() + 1)}-${addZero(now.getDate())}`
|
||||||
|
|
||||||
|
return {
|
||||||
|
activeTab: 'output',
|
||||||
|
activeColumnConfig: 'coil-report-loss',
|
||||||
|
settingVisible: false,
|
||||||
|
list: [],
|
||||||
|
lossList: [],
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 9999,
|
||||||
|
startDate: currentDate, // 绑定开始日期选择器的默认值
|
||||||
|
endDate: currentDate, // 绑定结束日期选择器的默认值
|
||||||
|
byCreateTimeStart: `${currentDate} 00:00:00`, // 默认当天0点
|
||||||
|
byCreateTimeEnd: `${currentDate} 23:59:59`, // 默认当天23:59:59
|
||||||
|
selectType: 'product',
|
||||||
|
enterCoilNo: '',
|
||||||
@@ -71,6 +71,24 @@
|
|||||||
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
|
<!-- 已处理M统计信息 -->
|
||||||
|
<el-descriptions title="已处理M统计信息" :column="3" border>
|
||||||
|
<el-descriptions-item label="产出数量">{{ mSummary.outCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出总重">{{ mSummary.outTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出均重">{{ mSummary.outAvgWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗数量">{{ mSummary.lossCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗总重">{{ mSummary.lossTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗均重">{{ mSummary.lossAvgWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计数量">{{ mSummary.totalCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计总重">{{ mSummary.totalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计均重">{{ mSummary.totalAvgWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="成品率">{{ mSummary.passRate }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="损耗率">{{ mSummary.lossRate }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="异常率">{{ mSummary.abRate }}</el-descriptions-item>
|
||||||
|
<!-- 正品率 -->
|
||||||
|
<el-descriptions-item label="正品率">{{ mSummary.passRate2 }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
<el-descriptions title="异常统计" :column="4" border>
|
<el-descriptions title="异常统计" :column="4" border>
|
||||||
<el-descriptions-item v-for="item in abSummary" :key="item.label" :label="item.label">{{ item.value
|
<el-descriptions-item v-for="item in abSummary" :key="item.label" :label="item.label">{{ item.value
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
@@ -87,12 +105,12 @@
|
|||||||
<el-descriptions title="明细信息" :column="3" border>
|
<el-descriptions title="明细信息" :column="3" border>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-tabs v-model="activeTab">
|
<el-tabs v-model="activeTab">
|
||||||
<el-tab-pane label="投入钢卷" name="loss">
|
|
||||||
<coil-table :columns="lossColumns" :data="lossList"></coil-table>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="产出钢卷" name="output">
|
<el-tab-pane label="产出钢卷" name="output">
|
||||||
<coil-table :columns="outputColumns" :data="list"></coil-table>
|
<coil-table :columns="outputColumns" :data="list"></coil-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="投入钢卷" name="loss">
|
||||||
|
<coil-table :columns="lossColumns" :data="lossList"></coil-table>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<el-dialog title="列设置" :visible.sync="settingVisible" width="50%">
|
<el-dialog title="列设置" :visible.sync="settingVisible" width="50%">
|
||||||
@@ -114,7 +132,7 @@ import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
|||||||
import MemoInput from "@/components/MemoInput";
|
import MemoInput from "@/components/MemoInput";
|
||||||
import MutiSelect from "@/components/MutiSelect";
|
import MutiSelect from "@/components/MutiSelect";
|
||||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||||
import { calcSummary, calcAbSummary, calcTeamSummary } from "@/views/wms/report/js/calc";
|
import { calcSummary, calcAbSummary, calcTeamSummary, calcMSummary } from "@/views/wms/report/js/calc";
|
||||||
import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue";
|
import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue";
|
||||||
import CoilTable from "@/views/wms/report/components/coilTable/index.vue";
|
import CoilTable from "@/views/wms/report/components/coilTable/index.vue";
|
||||||
|
|
||||||
@@ -164,7 +182,7 @@ export default {
|
|||||||
const { start, end } = getDayTimeRange(currentDate);
|
const { start, end } = getDayTimeRange(currentDate);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
activeTab: 'loss',
|
activeTab: 'output',
|
||||||
activeColumnConfig: 'coil-report-loss',
|
activeColumnConfig: 'coil-report-loss',
|
||||||
settingVisible: false,
|
settingVisible: false,
|
||||||
list: [],
|
list: [],
|
||||||
@@ -219,6 +237,9 @@ export default {
|
|||||||
abSummary() {
|
abSummary() {
|
||||||
return calcAbSummary(this.list);
|
return calcAbSummary(this.list);
|
||||||
},
|
},
|
||||||
|
mSummary() {
|
||||||
|
return calcMSummary(this.list, this.lossList);
|
||||||
|
},
|
||||||
teamSummary() {
|
teamSummary() {
|
||||||
const teamOutSummary = calcTeamSummary(this.list);
|
const teamOutSummary = calcTeamSummary(this.list);
|
||||||
const allTeams = [...new Set(Object.keys(teamOutSummary))];
|
const allTeams = [...new Set(Object.keys(teamOutSummary))];
|
||||||
|
|||||||
@@ -66,6 +66,29 @@
|
|||||||
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
<el-descriptions-item label="正品率">{{ summary.passRate2 }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
|
<!-- 已处理M统计信息 -->
|
||||||
|
<el-descriptions title="已处理M统计信息" :column="3" border>
|
||||||
|
<el-descriptions-item label="产出数量">{{ mSummary.outCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出总重">{{ mSummary.outTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="产出均重">{{ mSummary.outAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="消耗数量">{{ mSummary.lossCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗总重">{{ mSummary.lossTotalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消耗均重">{{ mSummary.lossAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="合计数量">{{ mSummary.totalCount }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计总重">{{ mSummary.totalWeight }}t</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合计均重">{{ mSummary.totalAvgWeight }}t</el-descriptions-item>
|
||||||
|
|
||||||
|
<!-- 成品率 -->
|
||||||
|
<el-descriptions-item label="成品率">{{ mSummary.passRate }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="损耗率">{{ mSummary.lossRate }}</el-descriptions-item>
|
||||||
|
<!-- 异常率 -->
|
||||||
|
<el-descriptions-item label="异常率">{{ mSummary.abRate }}</el-descriptions-item>
|
||||||
|
<!-- 正品率 -->
|
||||||
|
<el-descriptions-item label="正品率">{{ mSummary.passRate2 }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
<!-- 异常统计 -->
|
<!-- 异常统计 -->
|
||||||
<el-descriptions title="异常统计" :column="4" border>
|
<el-descriptions title="异常统计" :column="4" border>
|
||||||
<el-descriptions-item v-for="item in abSummary" :key="item.label" :label="item.label">{{ item.value
|
<el-descriptions-item v-for="item in abSummary" :key="item.label" :label="item.label">{{ item.value
|
||||||
@@ -75,12 +98,12 @@
|
|||||||
<el-descriptions title="明细信息" :column="3" border>
|
<el-descriptions title="明细信息" :column="3" border>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-tabs v-model="activeTab">
|
<el-tabs v-model="activeTab">
|
||||||
<el-tab-pane label="投入钢卷" name="loss">
|
|
||||||
<coil-table :columns="lossColumns" :data="lossList"></coil-table>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="产出钢卷" name="output">
|
<el-tab-pane label="产出钢卷" name="output">
|
||||||
<coil-table :columns="outputColumns" :data="list"></coil-table>
|
<coil-table :columns="outputColumns" :data="list"></coil-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="投入钢卷" name="loss">
|
||||||
|
<coil-table :columns="lossColumns" :data="lossList"></coil-table>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<el-dialog title="列设置" :visible.sync="settingVisible" width="50%">
|
<el-dialog title="列设置" :visible.sync="settingVisible" width="50%">
|
||||||
@@ -104,7 +127,7 @@ import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
|||||||
import MemoInput from "@/components/MemoInput";
|
import MemoInput from "@/components/MemoInput";
|
||||||
import MutiSelect from "@/components/MutiSelect";
|
import MutiSelect from "@/components/MutiSelect";
|
||||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||||
import { calcSummary, calcAbSummary } from "@/views/wms/report/js/calc";
|
import { calcSummary, calcAbSummary, calcMSummary } from "@/views/wms/report/js/calc";
|
||||||
import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue";
|
import ColumnsSetting from "@/views/wms/report/components/setting/columns.vue";
|
||||||
import CoilTable from "@/views/wms/report/components/coilTable/index.vue";
|
import CoilTable from "@/views/wms/report/components/coilTable/index.vue";
|
||||||
|
|
||||||
@@ -167,7 +190,7 @@ export default {
|
|||||||
const { start, end } = getDayTimeRange(currentDate)
|
const { start, end } = getDayTimeRange(currentDate)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
activeTab: 'loss',
|
activeTab: 'output',
|
||||||
activeColumnConfig: 'coil-report-loss',
|
activeColumnConfig: 'coil-report-loss',
|
||||||
settingVisible: false,
|
settingVisible: false,
|
||||||
list: [],
|
list: [],
|
||||||
@@ -220,6 +243,9 @@ export default {
|
|||||||
},
|
},
|
||||||
abSummary() {
|
abSummary() {
|
||||||
return calcAbSummary(this.list)
|
return calcAbSummary(this.list)
|
||||||
|
},
|
||||||
|
mSummary() {
|
||||||
|
return calcMSummary(this.list, this.lossList)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
37
klp-ui/src/views/wms/report/tuozhi/comprehensive.vue
Normal file
37
klp-ui/src/views/wms/report/tuozhi/comprehensive.vue
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<ComprehensiveTemplate
|
||||||
|
:actionTypes="actionTypes"
|
||||||
|
:actionQueryParams="actionQueryParams"
|
||||||
|
:baseQueryParams="baseQueryParams"
|
||||||
|
:warehouseOptions="warehouseOptions"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ComprehensiveReport',
|
||||||
|
components: {
|
||||||
|
ComprehensiveTemplate,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
actionTypes: [502, 120],
|
||||||
|
actionQueryParams: {
|
||||||
|
updateBy: 'tuozhikuguan'
|
||||||
|
},
|
||||||
|
baseQueryParams: {
|
||||||
|
createBy: 'tuozhikuguan',
|
||||||
|
},
|
||||||
|
warehouseOptions: [
|
||||||
|
{value: '1988150586938421250', label: '脱脂成品库'},
|
||||||
|
{ label: '技术部', value: '2019583656787259393' },
|
||||||
|
{ label: '小钢卷库', value: '2019583325311414274' },
|
||||||
|
{ label: '废品库', value: '2019583429955104769' },
|
||||||
|
{ label: '退货库', value: '2019583137616310273' },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
40
klp-ui/src/views/wms/report/zha/comprehensive.vue
Normal file
40
klp-ui/src/views/wms/report/zha/comprehensive.vue
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<template>
|
||||||
|
<ComprehensiveTemplate
|
||||||
|
:actionTypes="actionTypes"
|
||||||
|
:actionQueryParams="actionQueryParams"
|
||||||
|
:baseQueryParams="baseQueryParams"
|
||||||
|
:warehouseOptions="warehouseOptions"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ComprehensiveReport',
|
||||||
|
components: {
|
||||||
|
ComprehensiveTemplate,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
actionTypes: [11, 120],
|
||||||
|
actionQueryParams: {
|
||||||
|
updateBy: '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' },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
38
klp-ui/src/views/wms/report/zinc/comprehensive.vue
Normal file
38
klp-ui/src/views/wms/report/zinc/comprehensive.vue
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<template>
|
||||||
|
<ComprehensiveTemplate
|
||||||
|
:actionTypes="actionTypes"
|
||||||
|
:actionQueryParams="actionQueryParams"
|
||||||
|
:baseQueryParams="baseQueryParams"
|
||||||
|
:warehouseOptions="warehouseOptions"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ComprehensiveReport',
|
||||||
|
components: {
|
||||||
|
ComprehensiveTemplate,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
actionTypes: [501, 120],
|
||||||
|
actionQueryParams: {
|
||||||
|
updateBy: 'duxinkuguan'
|
||||||
|
},
|
||||||
|
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