Browse Source

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

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

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

@ -361,19 +361,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%;" />
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>
@ -601,6 +601,7 @@ export default {
height: 0,
quantity: 0,
}
this.newLabelForm.height = this.parseHeightFromPartNo(this.newLabelForm.partNo);
this.showNewLabelDialog = true
},
@ -1047,6 +1048,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() {

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

@ -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() {

Loading…
Cancel
Save