fix(wms/coil/label-render): 调整标签字号计算逻辑并更新原料库判断

1. 统一修正四个标签组件的订单单位字号计算规则,将判断阈值从<10改为<=9,同时调整字号计算基数
2. 更新脱脂原料标签的适用仓库,新增退火原料库和罩式退火纵剪分条原料库
This commit is contained in:
2026-06-23 13:28:11 +08:00
parent 41557c606b
commit 1f16c984a8
4 changed files with 8 additions and 8 deletions

View File

@@ -186,8 +186,8 @@ export default {
},
orderUnitFontSize() {
const len = this.orderUnitDisplay.length
if (len < 10) return '1.2em'
const size = Math.max(0.55, 12 / len).toFixed(2)
if (len <= 9) return '1.2em'
const size = (1.2 * 9 / len).toFixed(2)
return size + 'em'
}
},

View File

@@ -187,8 +187,8 @@ export default {
},
orderUnitFontSize() {
const len = this.orderUnitDisplay.length
if (len < 10) return '1.2em'
const size = Math.max(0.55, 12 / len).toFixed(2)
if (len <= 9) return '1.2em'
const size = (1.2 * 9 / len).toFixed(2)
return size + 'em'
}
},

View File

@@ -193,8 +193,8 @@ export default {
},
orderUnitFontSize() {
const len = this.orderUnitDisplay.length
if (len < 10) return '1.2em'
const size = Math.max(0.55, 12 / len).toFixed(2)
if (len <= 9) return '1.2em'
const size = (1.2 * 9 / len).toFixed(2)
return size + 'em'
}
},

View File

@@ -173,8 +173,8 @@ export default {
if (itemType == 'raw_material' && (warehouseId == '1988150263284953089' || warehouseId == '1988150487185289217')) {
this.labelType = '5';
}
// 在脱脂原料库的卷使用脱脂原料标签
else if (itemType == 'raw_material' && (warehouseId == '1988150545175736322')) {
// 在脱脂原料库或者退火原料库或者罩式退火纵剪分条原料库的卷使用脱脂原料标签
else if (itemType == 'raw_material' && (warehouseId == '1988150545175736322' || warehouseId == '1988150648993148929' || warehouseId == '1988150750390448129')) {
this.labelType = '6';
}
// 否则使用普通的原料标签