Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -38,6 +38,10 @@
|
|||||||
<span class="label">实测长度:</span>
|
<span class="label">实测长度:</span>
|
||||||
<span class="value">{{ actualLength }}</span>
|
<span class="value">{{ actualLength }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="info-item" v-if="actualLength">
|
||||||
|
<span class="label">实测厚度:</span>
|
||||||
|
<span class="value">{{ actualThickness }}</span>
|
||||||
|
</div>
|
||||||
<div class="info-item" v-if="actualWidth">
|
<div class="info-item" v-if="actualWidth">
|
||||||
<span class="label">实测宽度:</span>
|
<span class="label">实测宽度:</span>
|
||||||
<span class="value">{{ actualWidth }}</span>
|
<span class="value">{{ actualWidth }}</span>
|
||||||
@@ -109,6 +113,9 @@ export default {
|
|||||||
actualWidth() {
|
actualWidth() {
|
||||||
return this.coilInfo.actualWidth || '-'
|
return this.coilInfo.actualWidth || '-'
|
||||||
},
|
},
|
||||||
|
actualThickness() {
|
||||||
|
return this.coilInfo.actualThickness || '-'
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCoilInfo() {
|
getCoilInfo() {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<el-tab-pane label="同比分析" name="3"></el-tab-pane>
|
<el-tab-pane label="同比分析" name="3"></el-tab-pane>
|
||||||
<el-tab-pane label="环比分析" name="4"></el-tab-pane>
|
<el-tab-pane label="环比分析" name="4"></el-tab-pane>
|
||||||
</el-tabs> -->
|
</el-tabs> -->
|
||||||
<el-tabs v-model="energyType" type="card">
|
<el-tabs v-model="energyType" type="card" @tab-click="refresh">
|
||||||
<el-tab-pane v-for="item in energyTypeList" :key="item.energyTypeId" :label="item.name" :name="item.energyTypeId"></el-tab-pane>
|
<el-tab-pane v-for="item in energyTypeList" :key="item.energyTypeId" :label="item.name" :name="item.energyTypeId"></el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,10 @@
|
|||||||
<span class="param-label">实测长度:</span>
|
<span class="param-label">实测长度:</span>
|
||||||
<span class="param-value">{{ item.actualLength }}</span>
|
<span class="param-value">{{ item.actualLength }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="param-row" v-if="item.actualThickness">
|
||||||
|
<span class="param-label">实测厚度:</span>
|
||||||
|
<span class="param-value">{{ item.actualThickness }}</span>
|
||||||
|
</div>
|
||||||
<div class="param-row" v-if="item.actualWidth">
|
<div class="param-row" v-if="item.actualWidth">
|
||||||
<span class="param-label">实测宽度:</span>
|
<span class="param-label">实测宽度:</span>
|
||||||
<span class="param-value">{{ item.actualWidth }}</span>
|
<span class="param-value">{{ item.actualWidth }}</span>
|
||||||
|
|||||||
@@ -112,6 +112,10 @@
|
|||||||
<span class="param-label">实测长度:</span>
|
<span class="param-label">实测长度:</span>
|
||||||
<span class="param-value">{{ item.actualLength }}</span>
|
<span class="param-value">{{ item.actualLength }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="param-row" v-if="item.actualThickness">
|
||||||
|
<span class="param-label">实测厚度:</span>
|
||||||
|
<span class="param-value">{{ item.actualThickness }}</span>
|
||||||
|
</div>
|
||||||
<div class="param-row" v-if="item.actualWidth">
|
<div class="param-row" v-if="item.actualWidth">
|
||||||
<span class="param-label">实测宽度:</span>
|
<span class="param-label">实测宽度:</span>
|
||||||
<span class="param-value">{{ item.actualWidth }}</span>
|
<span class="param-value">{{ item.actualWidth }}</span>
|
||||||
|
|||||||
@@ -193,6 +193,12 @@
|
|||||||
<template slot="append">米</template>
|
<template slot="append">米</template>
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="实测厚度(m)" prop="actualThickness" class="form-item-half">
|
||||||
|
<el-input-number :controls="false" v-model="targetCoil.actualThickness" placeholder="请输入实测厚度"
|
||||||
|
type="number" :step="0.01" :disabled="readonly">
|
||||||
|
<template slot="append">米</template>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|||||||
@@ -3,18 +3,19 @@
|
|||||||
<div class="material-label-grid">
|
<div class="material-label-grid">
|
||||||
<!-- 公司名称行 -->
|
<!-- 公司名称行 -->
|
||||||
<div class="grid-cell company-cell">嘉祥科伦普重工有限公司</div>
|
<div class="grid-cell company-cell">嘉祥科伦普重工有限公司</div>
|
||||||
|
|
||||||
<!-- 第一行:冷卷号、热卷号 -->
|
<!-- 第一行:冷卷号、热卷号 -->
|
||||||
<div class="grid-cell label-cell">原料号</div>
|
|
||||||
<div class="grid-cell value-cell">
|
|
||||||
<div class="nob">{{ content.enterCoilNo|| '' }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="grid-cell label-cell">钢卷号</div>
|
<div class="grid-cell label-cell">钢卷号</div>
|
||||||
<div class="grid-cell value-cell">
|
<div class="grid-cell value-cell">
|
||||||
<div class="nob">{{ content.currentCoilNo || '' }}</div>
|
<div class="nob">{{ content.currentCoilNo || '' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="grid-cell label-cell">原料号</div>
|
||||||
<!-- 第二行:规格、钢种 -->
|
<div class="grid-cell value-cell">
|
||||||
|
<div class="nob">{{ content.enterCoilNo || '' }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 第二行:规格、净重 -->
|
||||||
<div class="grid-cell label-cell">规格</div>
|
<div class="grid-cell label-cell">规格</div>
|
||||||
<div class="grid-cell value-cell">
|
<div class="grid-cell value-cell">
|
||||||
<div class="nob">{{ content.specification || '' }}</div>
|
<div class="nob">{{ content.specification || '' }}</div>
|
||||||
@@ -23,26 +24,29 @@
|
|||||||
<div class="grid-cell value-cell">
|
<div class="grid-cell value-cell">
|
||||||
<div class="nob">{{ content.netWeight || '' }}</div>
|
<div class="nob">{{ content.netWeight || '' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 第三行:净重、下工序 -->
|
<!-- 第三行开始:材质、二维码(二维码占据右侧三行两列) -->
|
||||||
<div class="grid-cell label-cell">材质</div>
|
<div class="grid-cell label-cell">材质</div>
|
||||||
<div class="grid-cell value-cell">
|
<div class="grid-cell value-cell">
|
||||||
<div class="nob">{{ content.material || '' }}</div>
|
<div class="nob">{{ content.material || '' }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="grid-cell value-cell qrcode-cell">
|
||||||
|
<QRCode :content="content.qrcodeRecordId" :width="80" :height="80" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 第四行:厂家 -->
|
||||||
<div class="grid-cell label-cell">厂家</div>
|
<div class="grid-cell label-cell">厂家</div>
|
||||||
<div class="grid-cell value-cell">
|
<div class="grid-cell value-cell">
|
||||||
<div class="nob">{{ content.manufacturer }}</div>
|
<div class="nob">{{ content.manufacturer }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 第四行:包装要求、切边要求 -->
|
<!-- 第五行:生产日期 -->
|
||||||
<div class="grid-cell label-cell">生产班组</div>
|
|
||||||
<div class="grid-cell value-cell">
|
|
||||||
<div class="nob">{{ content.team || '' }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="grid-cell label-cell">生产日期</div>
|
<div class="grid-cell label-cell">生产日期</div>
|
||||||
<div class="grid-cell value-cell">
|
<div class="grid-cell value-cell">
|
||||||
<div class="nob">{{ formatDate(content.createTime) }}</div>
|
<div class="nob">{{ formatDate(content.createTime) }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 增加一个二维码,展示两行三列的网格元素 -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -163,8 +167,8 @@ export default {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.label-container {
|
.label-container {
|
||||||
width: 45em;
|
width: 25em;
|
||||||
height: 25em;
|
height: 20em;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
font-family: "SimSun", serif;
|
font-family: "SimSun", serif;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -173,8 +177,10 @@ export default {
|
|||||||
/* 核心Grid布局 */
|
/* 核心Grid布局 */
|
||||||
.material-label-grid {
|
.material-label-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(4, 1fr); /* 4列等宽 */
|
grid-template-columns: 1fr 1.6fr 1fr 1fr;
|
||||||
grid-auto-rows: 1fr; /* 行高自适应 */
|
/* 4列等宽 */
|
||||||
|
grid-auto-rows: 1fr;
|
||||||
|
/* 行高自适应 */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border: 1px solid #333;
|
border: 1px solid #333;
|
||||||
@@ -184,7 +190,7 @@ export default {
|
|||||||
.grid-cell {
|
.grid-cell {
|
||||||
border: 1px solid #333;
|
border: 1px solid #333;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
font-size: 20px;
|
font-size: 13px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
@@ -192,12 +198,15 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
color: #000;
|
||||||
|
font-family: '黑体', serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 公司名称单元格 */
|
/* 公司名称单元格 */
|
||||||
.company-cell {
|
.company-cell {
|
||||||
grid-column: span 4; /* 跨4列 */
|
grid-column: span 4;
|
||||||
font-size: 24px;
|
/* 跨4列 */
|
||||||
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
/* background-color: #f5f5f5; */
|
/* background-color: #f5f5f5; */
|
||||||
}
|
}
|
||||||
@@ -218,9 +227,12 @@ export default {
|
|||||||
grid-column: span 2;
|
grid-column: span 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 二维码单元格(跨2列+2行) */
|
/* 二维码单元格(跨3行+2列) */
|
||||||
.qrcode-cell {
|
.qrcode-cell {
|
||||||
grid-row: span 2; /* 跨2行 */
|
grid-row: span 3;
|
||||||
|
/* 跨3行 */
|
||||||
|
grid-column: span 2;
|
||||||
|
/* 跨2列 */
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -229,7 +241,8 @@ export default {
|
|||||||
.qrcode-container {
|
.qrcode-container {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 80%;
|
height: 80%;
|
||||||
border: 1px dashed #999; /* 占位虚线 */
|
border: 1px dashed #999;
|
||||||
|
/* 占位虚线 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 内容可编辑区域 */
|
/* 内容可编辑区域 */
|
||||||
@@ -248,7 +261,7 @@ export default {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #000;
|
color: #000;
|
||||||
font-family: '黑体', serif;
|
font-family: '黑体', serif;
|
||||||
font-size: 1.2em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 打印样式 */
|
/* 打印样式 */
|
||||||
|
|||||||
@@ -47,8 +47,8 @@
|
|||||||
<SplitTag
|
<SplitTag
|
||||||
v-if="tagType === 'split'"
|
v-if="tagType === 'split'"
|
||||||
:content="content"
|
:content="content"
|
||||||
:paperWidthMm="180"
|
:paperWidthMm="100"
|
||||||
:paperHeightMm="100"
|
:paperHeightMm="80"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="action-buttons" v-if="!hideActions">
|
<div class="action-buttons" v-if="!hideActions">
|
||||||
@@ -121,8 +121,8 @@ export default {
|
|||||||
height: 100,
|
height: 100,
|
||||||
},
|
},
|
||||||
'split': {
|
'split': {
|
||||||
width: 180,
|
width: 100,
|
||||||
height: 100,
|
height: 80,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,6 +243,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="实测厚度(m)" align="center" prop="actualThickness" v-if="showWidthEdit" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.actualThickness" placeholder="请输入实测厚度"
|
||||||
|
@change="handleRowChange(scope.row)"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="预留宽度" align="center" prop="width" v-if="showWidthEdit" width="150">
|
<el-table-column label="预留宽度" align="center" prop="width" v-if="showWidthEdit" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.reservedWidth" placeholder="请输入预留宽度"
|
<el-input v-model="scope.row.reservedWidth" placeholder="请输入预留宽度"
|
||||||
@@ -373,6 +380,10 @@
|
|||||||
<el-input-number :controls="false" v-model="form.actualLength" placeholder="请输入实测长度" type="number"
|
<el-input-number :controls="false" v-model="form.actualLength" placeholder="请输入实测长度" type="number"
|
||||||
:step="0.01" />
|
:step="0.01" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="实测厚度(m)" prop="actualThickness" class="form-item-half">
|
||||||
|
<el-input-number :controls="false" v-model="form.actualThickness" placeholder="请输入实测厚度" type="number"
|
||||||
|
:step="0.01" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="实测宽度(m)" prop="actualWidth">
|
<el-form-item label="实测宽度(m)" prop="actualWidth">
|
||||||
<el-input-number :controls="false" v-model="form.actualWidth" placeholder="请输入实测宽度" type="number"
|
<el-input-number :controls="false" v-model="form.actualWidth" placeholder="请输入实测宽度" type="number"
|
||||||
:step="0.01" />
|
:step="0.01" />
|
||||||
|
|||||||
@@ -107,6 +107,10 @@
|
|||||||
<span class="param-label">实测长度:</span>
|
<span class="param-label">实测长度:</span>
|
||||||
<span class="param-value">{{ item.actualLength }}米</span>
|
<span class="param-value">{{ item.actualLength }}米</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="param-row" v-if="item.actualThickness">
|
||||||
|
<span class="param-label">实测厚度:</span>
|
||||||
|
<span class="param-value">{{ item.actualThickness }}米</span>
|
||||||
|
</div>
|
||||||
<div class="param-row" v-if="item.actualWidth">
|
<div class="param-row" v-if="item.actualWidth">
|
||||||
<span class="param-label">实测宽度:</span>
|
<span class="param-label">实测宽度:</span>
|
||||||
<span class="param-value">{{ item.actualWidth }}米</span>
|
<span class="param-value">{{ item.actualWidth }}米</span>
|
||||||
|
|||||||
@@ -67,8 +67,10 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-descriptions :column="1" border title="镀锌二级数据" v-if="actionType == 501 && showSplitForm"></el-descriptions>
|
<el-descriptions :column="1" border title="镀锌二级数据"
|
||||||
<el-table v-if="actionType == 501 && showSplitForm" v-loading="zincLoading" :data="zincList" border stripe @row-click="handleZincItemClick">
|
v-if="actionType == 501 && showSplitForm"></el-descriptions>
|
||||||
|
<el-table v-if="actionType == 501 && showSplitForm" v-loading="zincLoading" :data="zincList" border stripe
|
||||||
|
@row-click="handleZincItemClick">
|
||||||
<el-table-column prop="enterCoilNo" label="入场钢卷号" />
|
<el-table-column prop="enterCoilNo" label="入场钢卷号" />
|
||||||
<el-table-column prop="createTime" label="生产开始时间" />
|
<el-table-column prop="createTime" label="生产开始时间" />
|
||||||
<el-table-column prop="endTime" label="生产结束时间" />
|
<el-table-column prop="endTime" label="生产结束时间" />
|
||||||
@@ -147,6 +149,10 @@
|
|||||||
<el-input-number :controls="false" v-model="splitForm.actualLength" placeholder="请输入实测长度" type="number"
|
<el-input-number :controls="false" v-model="splitForm.actualLength" placeholder="请输入实测长度" type="number"
|
||||||
:step="0.01" />
|
:step="0.01" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="实测厚度(m)" prop="actualThickness">
|
||||||
|
<el-input-number :controls="false" v-model="splitForm.actualThickness" placeholder="请输入实测厚度"
|
||||||
|
type="number" :step="0.01" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="实测宽度(m)" prop="actualWidth">
|
<el-form-item label="实测宽度(m)" prop="actualWidth">
|
||||||
<el-input-number :controls="false" v-model="splitForm.actualWidth" placeholder="请输入实测宽度" type="number"
|
<el-input-number :controls="false" v-model="splitForm.actualWidth" placeholder="请输入实测宽度" type="number"
|
||||||
:step="0.01" />
|
:step="0.01" />
|
||||||
@@ -161,7 +167,8 @@
|
|||||||
<TimeInput v-model="splitForm.productionStartTime" @input="calculateProductionDuration" />
|
<TimeInput v-model="splitForm.productionStartTime" @input="calculateProductionDuration" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="生产结束时间" prop="productionEndTime">
|
<el-form-item label="生产结束时间" prop="productionEndTime">
|
||||||
<TimeInput v-model="splitForm.productionEndTime" @input="calculateProductionDuration" :show-now-button="true" />
|
<TimeInput v-model="splitForm.productionEndTime" @input="calculateProductionDuration"
|
||||||
|
:show-now-button="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="生产耗时" prop="productionDuration">
|
<el-form-item label="生产耗时" prop="productionDuration">
|
||||||
<el-input v-model="splitForm.formattedDuration" placeholder="自动计算" disabled />
|
<el-input v-model="splitForm.formattedDuration" placeholder="自动计算" disabled />
|
||||||
@@ -172,30 +179,18 @@
|
|||||||
|
|
||||||
<el-form-item label="异常信息">
|
<el-form-item label="异常信息">
|
||||||
<div class="abnormal-container">
|
<div class="abnormal-container">
|
||||||
<div
|
<div v-for="(abnormal, index) in abnormals" :key="index" class="abnormal-item"
|
||||||
v-for="(abnormal, index) in abnormals"
|
@click="editAbnormal(index)">
|
||||||
:key="index"
|
|
||||||
class="abnormal-item"
|
|
||||||
@click="editAbnormal(index)"
|
|
||||||
>
|
|
||||||
<div class="abnormal-content">
|
<div class="abnormal-content">
|
||||||
<div class="abnormal-info">
|
<div class="abnormal-info">
|
||||||
<div class="abnormal-position">{{ getAbnormalPositionText(abnormal.position) }}</div>
|
<div class="abnormal-position">{{ getAbnormalPositionText(abnormal.position) }}</div>
|
||||||
<div class="abnormal-code">{{ getAbnormalCodeText(abnormal.defectCode) }}</div>
|
<div class="abnormal-code">{{ getAbnormalCodeText(abnormal.defectCode) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button
|
<el-button type="danger" size="mini" icon="el-icon-close" class="abnormal-delete"
|
||||||
type="danger"
|
@click.stop="deleteAbnormal(index)"></el-button>
|
||||||
size="mini"
|
|
||||||
icon="el-icon-close"
|
|
||||||
class="abnormal-delete"
|
|
||||||
@click.stop="deleteAbnormal(index)"
|
|
||||||
></el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="abnormal-add" @click="addAbnormal">
|
||||||
class="abnormal-add"
|
|
||||||
@click="addAbnormal"
|
|
||||||
>
|
|
||||||
<i class="el-icon-plus"></i>
|
<i class="el-icon-plus"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -224,21 +219,39 @@
|
|||||||
<el-descriptions-item label="班组">{{ selectedSplitItem.team || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="班组">{{ selectedSplitItem.team || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="材料类型">{{ selectedSplitItem.materialType || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="材料类型">{{ selectedSplitItem.materialType || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="产品/原料">{{ selectedSplitItem.itemName || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="产品/原料">{{ selectedSplitItem.itemName || '-' }}</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="规格">{{ selectedSplitItem.specification || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="材质">{{ selectedSplitItem.material || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="厂家">{{ selectedSplitItem.manufacturer || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="镀层质量">{{ selectedSplitItem.zincLayer || '-' }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="表面处理">{{ selectedSplitItem.surfaceTreatmentDesc || '-'
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
<el-descriptions-item label="质量状态">{{ selectedSplitItem.qualityStatus || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="质量状态">{{ selectedSplitItem.qualityStatus || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="切边要求">{{ selectedSplitItem.trimmingRequirement || '-'
|
<el-descriptions-item label="切边要求">{{ selectedSplitItem.trimmingRequirement || '-'
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="打包状态">{{ selectedSplitItem.packingStatus || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="打包状态">{{ selectedSplitItem.packingStatus || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="包装要求">{{ selectedSplitItem.packagingRequirement || '-'
|
<el-descriptions-item label="包装要求">{{ selectedSplitItem.packagingRequirement || '-'
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实测厚度(m)">{{ selectedSplitItem.actualThickness || '-' }}
|
||||||
|
m</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实测宽度(m)">{{ selectedSplitItem.actualWidth || '-' }}
|
||||||
|
m</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="长度">{{ selectedSplitItem.length || '-' }}
|
||||||
|
m</el-descriptions-item>
|
||||||
<el-descriptions-item label="毛重">{{ selectedSplitItem.grossWeight || '-' }} t</el-descriptions-item>
|
<el-descriptions-item label="毛重">{{ selectedSplitItem.grossWeight || '-' }} t</el-descriptions-item>
|
||||||
<el-descriptions-item label="净重">{{ selectedSplitItem.netWeight || '-' }} t</el-descriptions-item>
|
<el-descriptions-item label="净重">{{ selectedSplitItem.netWeight || '-' }} t</el-descriptions-item>
|
||||||
<el-descriptions-item label="长度" v-if="selectedSplitItem.length">{{ selectedSplitItem.length }}
|
|
||||||
m</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="调制度">{{ selectedSplitItem.temperGrade || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="调制度">{{ selectedSplitItem.temperGrade || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="镀层种类">{{ selectedSplitItem.coatingType || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="镀层种类">{{ selectedSplitItem.coatingType || '-' }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="生产开始时间">{{ selectedSplitItem.productionStartTime || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="生产开始时间">{{ selectedSplitItem.productionStartTime || '-'
|
||||||
<el-descriptions-item label="生产结束时间">{{ selectedSplitItem.productionEndTime || '-' }}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="生产耗时">{{ selectedSplitItem.formattedDuration || (selectedSplitItem.productionDuration ? selectedSplitItem.productionDuration + ' 分钟' : '-') }}</el-descriptions-item>
|
<el-descriptions-item label="生产结束时间">{{ selectedSplitItem.productionEndTime || '-'
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="生产耗时">{{ selectedSplitItem.formattedDuration ||
|
||||||
|
(selectedSplitItem.productionDuration ? selectedSplitItem.productionDuration + ' 分钟' : '-')
|
||||||
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="备注" :span="2">{{ selectedSplitItem.remark || '-' }}</el-descriptions-item>
|
<el-descriptions-item label="备注" :span="2">{{ selectedSplitItem.remark || '-' }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -252,17 +265,9 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 异常表单弹窗 -->
|
<!-- 异常表单弹窗 -->
|
||||||
<el-dialog
|
<el-dialog :title="currentAbnormalIndex === -1 ? '新增异常' : '编辑异常'" :visible.sync="abnormalDialogVisible"
|
||||||
:title="currentAbnormalIndex === -1 ? '新增异常' : '编辑异常'"
|
width="600px" append-to-body>
|
||||||
:visible.sync="abnormalDialogVisible"
|
<abnormal-form ref="abnormalForm" v-model="abnormalForm" :show-coil-selector="false"></abnormal-form>
|
||||||
width="600px"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<abnormal-form
|
|
||||||
ref="abnormalForm"
|
|
||||||
v-model="abnormalForm"
|
|
||||||
:show-coil-selector="false"
|
|
||||||
></abnormal-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="abnormalDialogVisible = false">取 消</el-button>
|
<el-button @click="abnormalDialogVisible = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="saveAbnormal">确 定</el-button>
|
<el-button type="primary" @click="saveAbnormal">确 定</el-button>
|
||||||
@@ -627,13 +632,13 @@ export default {
|
|||||||
// 区分新增/编辑:有coilId则为编辑,否则为新增
|
// 区分新增/编辑:有coilId则为编辑,否则为新增
|
||||||
let res
|
let res
|
||||||
this.buttonLoading = true
|
this.buttonLoading = true
|
||||||
|
|
||||||
// 添加异常信息到表单数据
|
// 添加异常信息到表单数据
|
||||||
const splitData = {
|
const splitData = {
|
||||||
...this.splitForm,
|
...this.splitForm,
|
||||||
abnormals: this.abnormals
|
abnormals: this.abnormals
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.splitForm.coilId) {
|
if (this.splitForm.coilId) {
|
||||||
// 编辑分条:调用更新接口
|
// 编辑分条:调用更新接口
|
||||||
res = await updateMaterialCoilSimple(splitData)
|
res = await updateMaterialCoilSimple(splitData)
|
||||||
@@ -703,20 +708,20 @@ export default {
|
|||||||
// 格式化毫秒值为xx天xx小时xx分钟
|
// 格式化毫秒值为xx天xx小时xx分钟
|
||||||
formatDuration(milliseconds) {
|
formatDuration(milliseconds) {
|
||||||
if (!milliseconds || milliseconds < 0) return '';
|
if (!milliseconds || milliseconds < 0) return '';
|
||||||
|
|
||||||
const seconds = Math.floor(milliseconds / 1000);
|
const seconds = Math.floor(milliseconds / 1000);
|
||||||
const minutes = Math.floor(seconds / 60);
|
const minutes = Math.floor(seconds / 60);
|
||||||
const hours = Math.floor(minutes / 60);
|
const hours = Math.floor(minutes / 60);
|
||||||
const days = Math.floor(hours / 24);
|
const days = Math.floor(hours / 24);
|
||||||
|
|
||||||
const remainingHours = hours % 24;
|
const remainingHours = hours % 24;
|
||||||
const remainingMinutes = minutes % 60;
|
const remainingMinutes = minutes % 60;
|
||||||
|
|
||||||
let result = '';
|
let result = '';
|
||||||
if (days > 0) result += `${days}天`;
|
if (days > 0) result += `${days}天`;
|
||||||
if (remainingHours > 0) result += `${remainingHours}小时`;
|
if (remainingHours > 0) result += `${remainingHours}小时`;
|
||||||
if (remainingMinutes > 0) result += `${remainingMinutes}分钟`;
|
if (remainingMinutes > 0) result += `${remainingMinutes}分钟`;
|
||||||
|
|
||||||
return result || '0分钟';
|
return result || '0分钟';
|
||||||
},
|
},
|
||||||
// 计算生产耗时
|
// 计算生产耗时
|
||||||
@@ -743,7 +748,7 @@ export default {
|
|||||||
this.$set(this.splitForm, 'formattedDuration', '');
|
this.$set(this.splitForm, 'formattedDuration', '');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 新增异常
|
// 新增异常
|
||||||
addAbnormal() {
|
addAbnormal() {
|
||||||
this.currentAbnormalIndex = -1;
|
this.currentAbnormalIndex = -1;
|
||||||
@@ -759,21 +764,21 @@ export default {
|
|||||||
};
|
};
|
||||||
this.abnormalDialogVisible = true;
|
this.abnormalDialogVisible = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 编辑异常
|
// 编辑异常
|
||||||
editAbnormal(index) {
|
editAbnormal(index) {
|
||||||
this.currentAbnormalIndex = index;
|
this.currentAbnormalIndex = index;
|
||||||
this.abnormalForm = { ...this.abnormals[index] };
|
this.abnormalForm = { ...this.abnormals[index] };
|
||||||
this.abnormalDialogVisible = true;
|
this.abnormalDialogVisible = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 保存异常
|
// 保存异常
|
||||||
saveAbnormal() {
|
saveAbnormal() {
|
||||||
this.$refs.abnormalForm.validate(valid => {
|
this.$refs.abnormalForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// 计算缺陷长度
|
// 计算缺陷长度
|
||||||
this.abnormalForm.length = this.abnormalForm.endPosition - this.abnormalForm.startPosition;
|
this.abnormalForm.length = this.abnormalForm.endPosition - this.abnormalForm.startPosition;
|
||||||
|
|
||||||
if (this.currentAbnormalIndex === -1) {
|
if (this.currentAbnormalIndex === -1) {
|
||||||
// 新增异常
|
// 新增异常
|
||||||
this.abnormals.push({ ...this.abnormalForm });
|
this.abnormals.push({ ...this.abnormalForm });
|
||||||
@@ -781,12 +786,12 @@ export default {
|
|||||||
// 编辑异常
|
// 编辑异常
|
||||||
this.abnormals[this.currentAbnormalIndex] = { ...this.abnormalForm };
|
this.abnormals[this.currentAbnormalIndex] = { ...this.abnormalForm };
|
||||||
}
|
}
|
||||||
|
|
||||||
this.abnormalDialogVisible = false;
|
this.abnormalDialogVisible = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除异常
|
// 删除异常
|
||||||
deleteAbnormal(index) {
|
deleteAbnormal(index) {
|
||||||
this.$confirm('确定要删除这个异常信息吗?', '提示', {
|
this.$confirm('确定要删除这个异常信息吗?', '提示', {
|
||||||
@@ -797,7 +802,7 @@ export default {
|
|||||||
this.abnormals.splice(index, 1);
|
this.abnormals.splice(index, 1);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取异常位置文本
|
// 获取异常位置文本
|
||||||
getAbnormalPositionText(position) {
|
getAbnormalPositionText(position) {
|
||||||
if (!position) return '';
|
if (!position) return '';
|
||||||
@@ -806,7 +811,7 @@ export default {
|
|||||||
const item = dict.find(item => item.value === position);
|
const item = dict.find(item => item.value === position);
|
||||||
return item ? item.label : position;
|
return item ? item.label : position;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取异常代码文本
|
// 获取异常代码文本
|
||||||
getAbnormalCodeText(code) {
|
getAbnormalCodeText(code) {
|
||||||
if (!code) return '';
|
if (!code) return '';
|
||||||
@@ -815,12 +820,12 @@ export default {
|
|||||||
const item = dict.find(item => item.value === code);
|
const item = dict.find(item => item.value === code);
|
||||||
return item ? item.label : code;
|
return item ? item.label : code;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 复制源卷信息到分条表单
|
// 复制源卷信息到分条表单
|
||||||
copyFromSourceCoil() {
|
copyFromSourceCoil() {
|
||||||
// 复制除了指定字段之外的其他字段
|
// 复制除了指定字段之外的其他字段
|
||||||
const excludeFields = ['enterCoilNo', 'currentCoilNo', 'coilId', 'createTime', 'createBy'];
|
const excludeFields = ['enterCoilNo', 'currentCoilNo', 'coilId', 'createTime', 'createBy'];
|
||||||
|
|
||||||
// 构建要复制的字段
|
// 构建要复制的字段
|
||||||
const copiedFields = {
|
const copiedFields = {
|
||||||
supplierCoilNo: this.coilInfo.supplierCoilNo,
|
supplierCoilNo: this.coilInfo.supplierCoilNo,
|
||||||
@@ -847,7 +852,7 @@ export default {
|
|||||||
productionDuration: this.coilInfo.productionDuration,
|
productionDuration: this.coilInfo.productionDuration,
|
||||||
formattedDuration: this.coilInfo.productionDuration ? this.formatDuration(this.coilInfo.productionDuration * 60 * 1000) : ''
|
formattedDuration: this.coilInfo.productionDuration ? this.formatDuration(this.coilInfo.productionDuration * 60 * 1000) : ''
|
||||||
};
|
};
|
||||||
|
|
||||||
// 合并到分条表单
|
// 合并到分条表单
|
||||||
this.splitForm = {
|
this.splitForm = {
|
||||||
...this.splitForm,
|
...this.splitForm,
|
||||||
|
|||||||
@@ -199,6 +199,12 @@
|
|||||||
<template slot="append">米</template>
|
<template slot="append">米</template>
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="实测厚度(m)" prop="actualThickness" class="form-item-half">
|
||||||
|
<el-input-number :controls="false" v-model="item.actualThickness" placeholder="请输入实测厚度"
|
||||||
|
type="number" :step="0.01" :disabled="readonly">
|
||||||
|
<template slot="append">米</template>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="实测宽度(m)" prop="actualWidth">
|
<el-form-item label="实测宽度(m)" prop="actualWidth">
|
||||||
<el-input-number :controls="false" v-model="item.actualWidth" placeholder="请输入实测宽度" type="number"
|
<el-input-number :controls="false" v-model="item.actualWidth" placeholder="请输入实测宽度" type="number"
|
||||||
:step="0.01" :disabled="readonly">
|
:step="0.01" :disabled="readonly">
|
||||||
|
|||||||
@@ -169,6 +169,13 @@
|
|||||||
</el-input-number>
|
</el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="实测厚度(m)" prop="actualThickness" class="form-item-half">
|
||||||
|
<el-input-number :controls="false" v-model="updateForm.actualThickness" placeholder="请输入实测厚度"
|
||||||
|
type="number" :step="0.01" :disabled="readonly">
|
||||||
|
<template slot="append">米</template>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="实测宽度(m)" prop="actualWidth">
|
<el-form-item label="实测宽度(m)" prop="actualWidth">
|
||||||
<el-input-number :controls="false" v-model="updateForm.actualWidth" placeholder="请输入实测宽度" type="number"
|
<el-input-number :controls="false" v-model="updateForm.actualWidth" placeholder="请输入实测宽度" type="number"
|
||||||
:step="0.001">
|
:step="0.001">
|
||||||
|
|||||||
@@ -103,3 +103,14 @@ export const zincConfig = {
|
|||||||
{ value: '2019583137616310273', label: '退货库' },
|
{ value: '2019583137616310273', label: '退货库' },
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const splitConfig = {
|
||||||
|
actionTypes: [506],
|
||||||
|
warehouseOptions: [
|
||||||
|
{ value: '1988150210872930306', label: '酸连轧分条成品' },
|
||||||
|
{ value: '1988150800092950529', label: '退火分条成品' },
|
||||||
|
{ value: '1988150380649967617', label: '镀锌分条成品' },
|
||||||
|
{ value: '1988151027466170370', label: '拉矫分条成品' },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { listCoilWithIds } from "@/api/wms/coil";
|
|||||||
import {
|
import {
|
||||||
listPendingAction,
|
listPendingAction,
|
||||||
} from '@/api/wms/pendingAction';
|
} from '@/api/wms/pendingAction';
|
||||||
|
import { Message } from 'element-ui'
|
||||||
|
|
||||||
export async function fetchOutputList(queryParams) {
|
export async function fetchOutputList(queryParams) {
|
||||||
const resList = await Promise.all([
|
const resList = await Promise.all([
|
||||||
@@ -39,9 +40,9 @@ export async function fetchOutputList(queryParams) {
|
|||||||
export async function fetchLossList(actionTypes, queryParams) {
|
export async function fetchLossList(actionTypes, queryParams) {
|
||||||
const resultList = await Promise.all(actionTypes.map(actionType => {
|
const resultList = await Promise.all(actionTypes.map(actionType => {
|
||||||
return listPendingAction({
|
return listPendingAction({
|
||||||
...queryParams,
|
|
||||||
actionStatus: 2,
|
actionStatus: 2,
|
||||||
actionType,
|
actionType,
|
||||||
|
createBy: queryParams.createBy,
|
||||||
startTime: queryParams.byCreateTimeStart,
|
startTime: queryParams.byCreateTimeStart,
|
||||||
endTime: queryParams.byCreateTimeEnd,
|
endTime: queryParams.byCreateTimeEnd,
|
||||||
pageSize: 99999,
|
pageSize: 99999,
|
||||||
@@ -52,16 +53,17 @@ export async function fetchLossList(actionTypes, queryParams) {
|
|||||||
const actionIds = actions.map(item => item.actionId).join(',')
|
const actionIds = actions.map(item => item.actionId).join(',')
|
||||||
console.log(actionIds)
|
console.log(actionIds)
|
||||||
if (!actionIds) {
|
if (!actionIds) {
|
||||||
this.$message({
|
Message({
|
||||||
message: '暂无数据',
|
message: '暂无数据',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
})
|
})
|
||||||
throw new Error('暂无数据')
|
return []
|
||||||
}
|
}
|
||||||
const res = await listCoilWithIds({
|
const res = await listCoilWithIds({
|
||||||
...queryParams,
|
...queryParams,
|
||||||
byCreateTimeStart: undefined,
|
byCreateTimeStart: undefined,
|
||||||
byCreateTimeEnd: undefined,
|
byCreateTimeEnd: undefined,
|
||||||
|
createBy: undefined,
|
||||||
actionIds: actionIds,
|
actionIds: actionIds,
|
||||||
pageSize: 99999,
|
pageSize: 99999,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|||||||
25
klp-ui/src/views/wms/report/split/comprehensive.vue
Normal file
25
klp-ui/src/views/wms/report/split/comprehensive.vue
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<template>
|
||||||
|
<ComprehensiveTemplate
|
||||||
|
:actionTypes="actionTypes"
|
||||||
|
:actionQueryParams="actionQueryParams"
|
||||||
|
:baseQueryParams="baseQueryParams"
|
||||||
|
:warehouseOptions="warehouseOptions"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ComprehensiveTemplate from '@/views/wms/report/template/comprehensive.vue'
|
||||||
|
import { splitConfig } from '@/views/wms/report/js/config.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ComprehensiveReport',
|
||||||
|
components: {
|
||||||
|
ComprehensiveTemplate,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
...splitConfig,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
26
klp-ui/src/views/wms/report/split/day.vue
Normal file
26
klp-ui/src/views/wms/report/split/day.vue
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<template>
|
||||||
|
<DayTemplate
|
||||||
|
:actionTypes="actionTypes"
|
||||||
|
:actionQueryParams="actionQueryParams"
|
||||||
|
:baseQueryParams="baseQueryParams"
|
||||||
|
:warehouseOptions="warehouseOptions"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import DayTemplate from '@/views/wms/report/template/day.vue'
|
||||||
|
import { splitConfig } from '@/views/wms/report/js/config.js'
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'LossReport',
|
||||||
|
components: {
|
||||||
|
DayTemplate,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
...splitConfig,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
23
klp-ui/src/views/wms/report/split/loss.vue
Normal file
23
klp-ui/src/views/wms/report/split/loss.vue
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<template>
|
||||||
|
<LossTemplate
|
||||||
|
:actionTypes="actionTypes"
|
||||||
|
:actionQueryParams="actionQueryParams"
|
||||||
|
></LossTemplate>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import LossTemplate from '@/views/wms/report/template/loss.vue'
|
||||||
|
import { splitConfig } from '@/views/wms/report/js/config.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'LossReport',
|
||||||
|
components: {
|
||||||
|
LossTemplate,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
...splitConfig,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
25
klp-ui/src/views/wms/report/split/month.vue
Normal file
25
klp-ui/src/views/wms/report/split/month.vue
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<template>
|
||||||
|
<MonthTemplate
|
||||||
|
:actionTypes="actionTypes"
|
||||||
|
:actionQueryParams="actionQueryParams"
|
||||||
|
:baseQueryParams="baseQueryParams"
|
||||||
|
:warehouseOptions="warehouseOptions"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MonthTemplate from '@/views/wms/report/template/month.vue'
|
||||||
|
import { splitConfig } from '@/views/wms/report/js/config.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'MonthReport',
|
||||||
|
components: {
|
||||||
|
MonthTemplate,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
...splitConfig,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
23
klp-ui/src/views/wms/report/split/out.vue
Normal file
23
klp-ui/src/views/wms/report/split/out.vue
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<template>
|
||||||
|
<OutTemplate
|
||||||
|
:baseQueryParams="baseQueryParams"
|
||||||
|
:warehouseOptions="warehouseOptions"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import OutTemplate from "@/views/wms/report/template/out.vue";
|
||||||
|
import { splitConfig } from '@/views/wms/report/js/config.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ZhaTemplate',
|
||||||
|
components: {
|
||||||
|
OutTemplate,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
...splitConfig,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
25
klp-ui/src/views/wms/report/split/team.vue
Normal file
25
klp-ui/src/views/wms/report/split/team.vue
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<template>
|
||||||
|
<TeamTemplate
|
||||||
|
:actionTypes="actionTypes"
|
||||||
|
:actionQueryParams="actionQueryParams"
|
||||||
|
:baseQueryParams="baseQueryParams"
|
||||||
|
:warehouseOptions="warehouseOptions"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import TeamTemplate from '@/views/wms/report/template/team.vue'
|
||||||
|
import { splitConfig } from '@/views/wms/report/js/config.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TeamReport',
|
||||||
|
components: {
|
||||||
|
TeamTemplate,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
...splitConfig,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
25
klp-ui/src/views/wms/report/split/year.vue
Normal file
25
klp-ui/src/views/wms/report/split/year.vue
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<template>
|
||||||
|
<YearTemplate
|
||||||
|
:actionTypes="actionTypes"
|
||||||
|
:actionQueryParams="actionQueryParams"
|
||||||
|
:baseQueryParams="baseQueryParams"
|
||||||
|
:warehouseOptions="warehouseOptions"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import YearTemplate from '@/views/wms/report/template/year.vue'
|
||||||
|
import { splitConfig } from '@/views/wms/report/js/config.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'YearReport',
|
||||||
|
components: {
|
||||||
|
YearTemplate,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
...splitConfig,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -130,6 +130,7 @@ import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
|||||||
import { calcSummary, calcAbSummary, calcMSummary } 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";
|
||||||
|
import { fetchLossList, fetchOutputList } from "@/views/wms/report/js/fetch";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DayTemplate',
|
name: 'DayTemplate',
|
||||||
@@ -255,86 +256,20 @@ export default {
|
|||||||
},
|
},
|
||||||
// 统一查询入口(兼容回车和按钮点击)
|
// 统一查询入口(兼容回车和按钮点击)
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.getList()
|
|
||||||
// this.getLossList()
|
|
||||||
},
|
|
||||||
// 核心查询逻辑
|
|
||||||
getList() {
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
Promise.all([
|
Promise.all([
|
||||||
listCoilWithIds({
|
fetchLossList(this.actionTypes, {
|
||||||
selectType: 'raw_material',
|
...this.queryParams,
|
||||||
itemType: 'raw_material',
|
...this.actionQueryParams
|
||||||
warehouseIds: this.warehouseIds.join(','),
|
}),
|
||||||
|
fetchOutputList({
|
||||||
...this.queryParams,
|
...this.queryParams,
|
||||||
...this.baseQueryParams,
|
...this.baseQueryParams,
|
||||||
}),
|
|
||||||
listCoilWithIds({
|
|
||||||
selectType: 'product',
|
|
||||||
itemType: 'product',
|
|
||||||
warehouseIds: this.warehouseIds.join(','),
|
warehouseIds: this.warehouseIds.join(','),
|
||||||
...this.queryParams,
|
|
||||||
...this.baseQueryParams,
|
|
||||||
}),
|
}),
|
||||||
]).then((resList) => {
|
]).then(([lossList, outputList]) => {
|
||||||
console.log(resList)
|
this.lossList = lossList
|
||||||
const list = resList.flatMap(res => res.rows)
|
this.list = outputList
|
||||||
// 按照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
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -359,8 +294,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.handleQuery()
|
||||||
// this.getLossList()
|
|
||||||
this.loadColumns()
|
this.loadColumns()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user