feat(wms/coil): 新增镀铬卷号字段与分条校验规则优化
1. 在CoilCard中将长度标签改为参考长度 2. 新增镀铬卷号列到钢卷选择器表格与可选列配置 3. 在钢卷更新和分条页面添加净重、厚度校验规则,区分镀锌/酸轧/镀铬产线豁免情况 4. 优化分条页面的代码格式与组件注册顺序,新增镀铬操作类型判断 5. 分条表单新增镀铬卷号输入项,支持从源卷复制镀铬卷号信息
This commit is contained in:
@@ -60,14 +60,20 @@
|
||||
</div>
|
||||
<!-- 右侧:更新表单 -->
|
||||
<div>
|
||||
<el-card class="form-card">
|
||||
<div slot="header" class="card-header">
|
||||
<span><i class="el-icon-edit-outline"></i> {{ '更新信息' }}</span>
|
||||
<div>
|
||||
<el-button size="small" @click="saveTemp" :loading="loading">暂存内容</el-button>
|
||||
<el-button type="primary" size="small" @click="handleSave" :loading="loading">保存更新</el-button>
|
||||
<el-card class="form-card">
|
||||
<div slot="header" class="card-header">
|
||||
<span><i class="el-icon-edit-outline"></i> {{ '更新信息' }}</span>
|
||||
<div>
|
||||
<el-button size="small" @click="saveTemp" :loading="loading">暂存内容</el-button>
|
||||
<el-button type="primary" size="small" @click="handleSave" :loading="loading">保存更新</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-alert v-if="!isExemptFromValidation" type="warning" :closable="false" show-icon style="margin-bottom:12px">
|
||||
<template slot="title">
|
||||
更新后的<b>净重</b>和<b>实测厚度</b>均不能超过源卷的对应值
|
||||
</template>
|
||||
</el-alert>
|
||||
|
||||
<div v-if="matchedSpec" style="margin-bottom:10px">
|
||||
<el-tag type="success" size="small">
|
||||
@@ -530,6 +536,10 @@ export default {
|
||||
isDrAction() {
|
||||
return this.actionType === 504 || this.actionType === 524
|
||||
},
|
||||
/** 镀锌/酸轧产线免验净重和厚度范围 */
|
||||
isExemptFromValidation() {
|
||||
return [11, 120, 200, 201, 520, 202, 501, 521].includes(Number(this.actionType))
|
||||
},
|
||||
// 动态显示标签
|
||||
getItemLabel() {
|
||||
if (this.updateForm.materialType === '成品') {
|
||||
@@ -814,6 +824,22 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
// 校验净重和实测厚度不超过源卷(镀锌/酸轧除外)
|
||||
if (!this.isExemptFromValidation) {
|
||||
const parentNetWeight = parseFloat(this.currentInfo.netWeight) || 0
|
||||
const parentThickness = parseFloat(this.currentInfo.actualThickness) || 0
|
||||
const updateNetWeight = parseFloat(this.updateForm.netWeight) || 0
|
||||
const updateThickness = parseFloat(this.updateForm.actualThickness) || 0
|
||||
if (updateNetWeight > 0 && parentNetWeight > 0 && updateNetWeight > parentNetWeight) {
|
||||
this.$message.error(`更新后净重(${updateNetWeight}T)不能超过源卷净重(${parentNetWeight}T)`)
|
||||
return false
|
||||
}
|
||||
if (updateThickness > 0 && parentThickness > 0 && updateThickness > parentThickness) {
|
||||
this.$message.error(`更新后实测厚度(${updateThickness}mm)不能超过源卷实测厚度(${parentThickness}mm)`)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
const loadingInstance = this.$loading({
|
||||
lock: true,
|
||||
text: '正在更新钢卷信息,请稍后...',
|
||||
|
||||
Reference in New Issue
Block a user