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