|
|
|
@ -190,19 +190,19 @@ |
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
<label class="form-label">库位<span class="required">*</span></label> |
|
|
|
<el-input v-model="newLabelForm.locationId" placeholder="请输入库位" class="form-input" clearable /> |
|
|
|
<el-input v-model="newLabelForm.locationId" placeholder="请输入库位" class="form-input" clearable @keyup.enter.native="confirmNewLabel"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
<label class="form-label">高度(单位毫米)<span class="required">*</span></label> |
|
|
|
<el-input-number v-model="newLabelForm.height" :min="0" :controls="false" placeholder="请输入高度" |
|
|
|
class="form-input" style="width: 100%;" /> |
|
|
|
class="form-input" style="width: 100%;" @keyup.enter.native="confirmNewLabel"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
<label class="form-label">退料数量 <span class="required">*</span></label> |
|
|
|
<el-input-number v-model="newLabelForm.quantity" :min="0" :controls="false" placeholder="请输入数量" |
|
|
|
class="form-input" style="width: 100%;" /> |
|
|
|
class="form-input" style="width: 100%;" @keyup.enter.native="confirmNewLabel"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -558,6 +558,7 @@ export default { |
|
|
|
height: 0, |
|
|
|
quantity: 0, |
|
|
|
} |
|
|
|
this.newLabelForm.height = this.parseHeightFromPartNo(this.newLabelForm.partNo); |
|
|
|
this.showNewLabelDialog = true |
|
|
|
}, |
|
|
|
|
|
|
|
@ -882,6 +883,26 @@ export default { |
|
|
|
this.printData.materialCode2 = 0 |
|
|
|
this.printData.unit = '' |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 从物料编码中解析高度 |
|
|
|
* 如果物料编码格式是 70004479-0030,则高度为30 |
|
|
|
* 如果物料编码格式是 70004479,则高度为空 |
|
|
|
*/ |
|
|
|
parseHeightFromPartNo(partNo) { |
|
|
|
if (!partNo) return ''; |
|
|
|
|
|
|
|
// 检查是否包含横杠 |
|
|
|
const parts = partNo.split('-'); |
|
|
|
if (parts.length >= 2) { |
|
|
|
// 取横杠后面的数字部分 |
|
|
|
const heightStr = parts[1]; |
|
|
|
// 转换为数字,去掉前导0 |
|
|
|
const height = parseInt(heightStr, 10); |
|
|
|
return isNaN(height) ? '' : height; |
|
|
|
} |
|
|
|
|
|
|
|
return ''; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
|