Browse Source

pda新标签添加默认获取高度

master
shenzhouyu 2 days ago
parent
commit
a2afc1d84a
  1. 27
      src/views/modules/production-return/productionReturnPDAIssueList.vue
  2. 29
      src/views/modules/production-return/productionReturnPickingDetail.vue

27
src/views/modules/production-return/productionReturnPDAIssueList.vue

@ -361,19 +361,19 @@
<div class="form-group"> <div class="form-group">
<label class="form-label">库位<span class="required">*</span></label> <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>
<div class="form-group"> <div class="form-group">
<label class="form-label">高度(单位毫米)<span class="required">*</span></label> <label class="form-label">高度(单位毫米)<span class="required">*</span></label>
<el-input-number v-model="newLabelForm.height" :min="0" :controls="false" placeholder="请输入高度" class="form-input" <el-input-number v-model="newLabelForm.height" :min="0" :controls="false" placeholder="请输入高度" class="form-input"
style="width: 100%;" />
style="width: 100%;" @keyup.enter.native="confirmNewLabel"/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="form-label">退料数量 <span class="required">*</span></label> <label class="form-label">退料数量 <span class="required">*</span></label>
<el-input-number v-model="newLabelForm.quantity" :min="0" :controls="false" placeholder="请输入数量" <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>
</div> </div>
@ -601,6 +601,7 @@ export default {
height: 0, height: 0,
quantity: 0, quantity: 0,
} }
this.newLabelForm.height = this.parseHeightFromPartNo(this.newLabelForm.partNo);
this.showNewLabelDialog = true this.showNewLabelDialog = true
}, },
@ -1047,6 +1048,26 @@ export default {
this.printData.materialCode2 = 0 this.printData.materialCode2 = 0
this.printData.unit = '' 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() { mounted() {

29
src/views/modules/production-return/productionReturnPickingDetail.vue

@ -149,7 +149,7 @@
<div class="form-group"> <div class="form-group">
<label class="form-label">高度(单位毫米)</label> <label class="form-label">高度(单位毫米)</label>
<el-input v-model="editForm.height" type="number" :min="0" placeholder="请输入高度(单位毫米)" class="form-input" <el-input v-model="editForm.height" type="number" :min="0" placeholder="请输入高度(单位毫米)" class="form-input"
clearable />
clearable/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="form-label">退料数量 <span class="required">*</span></label> <label class="form-label">退料数量 <span class="required">*</span></label>
@ -190,19 +190,19 @@
<div class="form-group"> <div class="form-group">
<label class="form-label">库位<span class="required">*</span></label> <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>
<div class="form-group"> <div class="form-group">
<label class="form-label">高度(单位毫米)<span class="required">*</span></label> <label class="form-label">高度(单位毫米)<span class="required">*</span></label>
<el-input-number v-model="newLabelForm.height" :min="0" :controls="false" placeholder="请输入高度" <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>
<div class="form-group"> <div class="form-group">
<label class="form-label">退料数量 <span class="required">*</span></label> <label class="form-label">退料数量 <span class="required">*</span></label>
<el-input-number v-model="newLabelForm.quantity" :min="0" :controls="false" placeholder="请输入数量" <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>
</div> </div>
@ -558,6 +558,7 @@ export default {
height: 0, height: 0,
quantity: 0, quantity: 0,
} }
this.newLabelForm.height = this.parseHeightFromPartNo(this.newLabelForm.partNo);
this.showNewLabelDialog = true this.showNewLabelDialog = true
}, },
@ -882,6 +883,26 @@ export default {
this.printData.materialCode2 = 0 this.printData.materialCode2 = 0
this.printData.unit = '' 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() { mounted() {

Loading…
Cancel
Save