fix: 统一钢卷尺寸单位显示为毫米(mm)

修改多个组件中钢卷尺寸的单位显示,将"米(m)"统一改为"毫米(mm)",包括实测长度、宽度和厚度的标签及数值显示。同时调整了酸轧工序的标签名称从"酸轧工序"改为"酸连轧工序"以保持一致性。

在表格、表单、描述组件等多个地方进行了单位统一修改,确保整个系统中钢卷尺寸单位显示一致。添加了钢卷状态的行样式显示功能,根据不同类型显示不同背景色。
This commit is contained in:
2026-04-25 15:28:47 +08:00
parent 133817883d
commit 511d5b7385
16 changed files with 828 additions and 504 deletions

View File

@@ -50,7 +50,12 @@
<i class="el-icon-box"></i>
<p>暂无待领物料</p>
</div> -->
<KLPTable :data="materialCoilList" height="calc(100vh - 340px)" :floatLayer="true" :floatLayerConfig="floatLayerConfig">
<KLPTable :data="materialCoilList" height="calc(100vh - 340px)" :floatLayer="true" :floatLayerConfig="floatLayerConfig" :row-style="getRowStyle">
<el-table-column prop="status" label="钢卷状态" width="100" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag size="small" :style="getBorderStyle(scope.row)">{{ getTypeLabel(scope.row) }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="currentCoilNo" label="当前钢卷号">
<template slot-scope="scope">
<current-coil-no :current-coil-no="scope.row.currentCoilNo" />
@@ -256,15 +261,15 @@
<el-form-item label="长度" prop="length">
<el-input v-model="form.length" placeholder="请输入长度" />
</el-form-item>
<el-form-item label="实测长度(m)" prop="actualLength">
<el-form-item label="实测长度(mm)" prop="actualLength">
<el-input-number :controls="false" v-model="form.actualLength" placeholder="请输入实测长度" type="number"
:step="0.01" />
</el-form-item>
<el-form-item label="实测宽度(m)" prop="actualWidth">
<el-form-item label="实测宽度(mm)" prop="actualWidth">
<el-input-number :controls="false" v-model="form.actualWidth" placeholder="请输入实测宽度" type="number"
:step="0.01" />
</el-form-item>
<el-form-item label="实测厚度(m)" prop="actualThickness">
<el-form-item label="实测厚度(mm)" prop="actualThickness">
<el-input-number :controls="false" v-model="form.actualThickness" placeholder="请输入实测厚度" type="number"
:step="0.01" />
</el-form-item>
@@ -512,9 +517,9 @@ export default {
{ label: '厂家', prop: 'manufacturer' },
{ label: '调制度', prop: 'temperGrade' },
{ label: '镀层种类', prop: 'coatingType' },
{ label: '实测长度(m)', prop: 'actualLength' },
{ label: '实测宽度(m)', prop: 'actualWidth' },
{ label: '实测厚度(m)', prop: 'actualThickness' },
{ label: '实测长度(mm)', prop: 'actualLength' },
{ label: '实测宽度(mm)', prop: 'actualWidth' },
{ label: '实测厚度(mm)', prop: 'actualThickness' },
{ label: '钢卷表面处理', prop: 'coilSurfaceTreatment' },
],
title: '详细信息'
@@ -688,6 +693,28 @@ export default {
}
return '未知'
},
getRowStyle(row) {
console.log('getRowStyle called with row:', row);
// 先尝试给所有行设置一个简单的背景色测试是否生效
if (row.status == 1) {
console.log('returning blue');
return { backgroundColor: '#e6f7ff' }
}
if (row.dataType == 0 || row.dataType == 2) {
console.log('returning gray');
return { backgroundColor: '#f4f4f5' }
}
if (row.dataType == 1) {
console.log('returning green');
return { backgroundColor: '#f0fdf4' }
}
if (row.dataType == 10) {
console.log('returning yellow');
return { backgroundColor: '#fffbe6' }
}
console.log('returning default');
return {}
},
/** 查询用户列表 */
getUsers() {
listUser({ pageNum: 1, pageSize: 1000 }).then(response => {

View File

@@ -38,7 +38,12 @@
<!-- 钢卷信息卡片 -->
<div v-loading="materialLoading">
<KLPTable :data="materialCoilList" height="calc(100vh - 340px)" :floatLayer="true"
:floatLayerConfig="floatLayerConfig">
:floatLayerConfig="floatLayerConfig" :row-style="getRowStyle">
<el-table-column prop="status" label="钢卷状态" width="100" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag size="small" :style="getBorderStyle(scope.row)">{{ getTypeLabel(scope.row) }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="currentCoilNo" label="当前钢卷号">
<template slot-scope="scope">
<current-coil-no :current-coil-no="scope.row.currentCoilNo" />
@@ -49,6 +54,7 @@
<el-table-column prop="warehouseName" label="逻辑库区" show-overflow-tooltip></el-table-column>
<el-table-column prop="specification" label="规格" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="netWeight" label="净重" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="action" label="操作" width="400">
<template slot-scope="scope">
<el-button v-loading="buttonLoading" style="margin-left: 0px; padding: 4px !important;" type="default"
@@ -334,18 +340,18 @@
<el-form-item label="净重" prop="netWeight">
<el-input v-model="form.netWeight" placeholder="请输入净重" />
</el-form-item>
<el-form-item label="长度" prop="length">
<el-form-item label="长度(mm)" prop="length">
<el-input v-model="form.length" placeholder="请输入长度" />
</el-form-item>
<el-form-item label="实测长度(m)" prop="actualLength">
<el-form-item label="实测长度(mm)" prop="actualLength">
<el-input-number :controls="false" v-model="form.actualLength" placeholder="请输入实测长度" type="number"
:step="0.01" />
</el-form-item>
<el-form-item label="实测宽度(m)" prop="actualWidth">
<el-form-item label="实测宽度(mm)" prop="actualWidth">
<el-input-number :controls="false" v-model="form.actualWidth" placeholder="请输入实测宽度" type="number"
:step="0.01" />
</el-form-item>
<el-form-item label="实测厚度(m)" prop="actualThickness">
<el-form-item label="实测厚度(mm)" prop="actualThickness">
<el-input-number :controls="false" v-model="form.actualThickness" placeholder="请输入实测厚度" type="number"
:step="0.01" />
</el-form-item>
@@ -487,9 +493,9 @@ export default {
{ label: '厂家', prop: 'manufacturer' },
{ label: '调制度', prop: 'temperGrade' },
{ label: '镀层种类', prop: 'coatingType' },
{ label: '实测长度(m)', prop: 'actualLength' },
{ label: '实测宽度(m)', prop: 'actualWidth' },
{ label: '实测厚度(m)', prop: 'actualThickness' },
{ label: '实测长度(mm)', prop: 'actualLength' },
{ label: '实测宽度(mm)', prop: 'actualWidth' },
{ label: '实测厚度(mm)', prop: 'actualThickness' },
{ label: '钢卷表面处理', prop: 'coilSurfaceTreatment' },
],
title: '详细信息'
@@ -1012,6 +1018,26 @@ export default {
return '未知'
},
getRowStyle(row) {
// 已发货
if (row.status == 1) {
return { backgroundColor: '#e6f7ff' }
}
// 历史钢卷
if (row.dataType == 0 || row.dataType == 2) {
return { backgroundColor: '#f4f4f5' }
}
// 当前钢卷
if (row.dataType == 1) {
return { backgroundColor: '#f0fdf4' }
}
// 还未入库的钢卷
if (row.dataType == 10) {
return { backgroundColor: '#fffbe6' }
}
return {}
},
/** 根据操作类型获取图标 */
getActionIcon(actionType) {
const value = parseInt(actionType);