Browse Source

高度

master
han\hanst 4 months ago
parent
commit
0551cf878a
  1. 29
      src/views/modules/production-inbound/inboundRegister.vue
  2. 30
      src/views/modules/sales-return/sales-return-inbound.vue

29
src/views/modules/production-inbound/inboundRegister.vue

@ -87,8 +87,11 @@
<el-col :span="12"><el-form-item label="WDR"> <el-col :span="12"><el-form-item label="WDR">
<el-input v-model="inboundItem.wdr" placeholder="请输入WDR" /> <el-input v-model="inboundItem.wdr" placeholder="请输入WDR" />
</el-form-item></el-col> </el-form-item></el-col>
<el-col :span="12"><el-form-item label="高度(mm)">
<el-input v-model="inboundItem.height" type="number" placeholder="请输入高度" />
</el-form-item></el-col>
<!-- 勾选框 --> <!-- 勾选框 -->
<el-col :span="12" style="margin-top: 24px">
<el-col :span="12" style="margin-top: 0px">
<el-form-item> <el-form-item>
<el-checkbox v-model="inboundItem.ifsAutoReport">Auto Report of Operation</el-checkbox> <el-checkbox v-model="inboundItem.ifsAutoReport">Auto Report of Operation</el-checkbox>
</el-form-item> </el-form-item>
@ -353,7 +356,8 @@ export default {
wdr: '*', wdr: '*',
engChgLevel: '1', engChgLevel: '1',
ifsAutoReport: false, // Auto Report of Operation ifsAutoReport: false, // Auto Report of Operation
ifsSimplifiedMaterial: true // Simplified Material Check
ifsSimplifiedMaterial: true, // Simplified Material Check
height: this.parseHeightFromPartNo(row.partNo) //
}; };
this.processFlag = 2; this.processFlag = 2;
} catch (error) { } catch (error) {
@ -524,6 +528,7 @@ export default {
uom: item.uom, uom: item.uom,
lotSize: item.lotSize, lotSize: item.lotSize,
qtyComplete: item.qtyComplete, qtyComplete: item.qtyComplete,
height: item.height || null, // (mm)
// IFS // IFS
ifsAutoReport: item.ifsAutoReport ? 'Yes' : 'No', ifsAutoReport: item.ifsAutoReport ? 'Yes' : 'No',
ifsSimplifiedMaterial: item.ifsSimplifiedMaterial ? 'Yes' : 'No', ifsSimplifiedMaterial: item.ifsSimplifiedMaterial ? 'Yes' : 'No',
@ -593,6 +598,26 @@ export default {
this.$message.error(`打印失败: ${error.message || error}`) this.$message.error(`打印失败: ${error.message || error}`)
} }
}, },
/**
* 从物料编码中解析高度
* 如果物料编码格式是 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() {
this.$nextTick(() => this.$refs.scanCodeRef.focus()); this.$nextTick(() => this.$refs.scanCodeRef.focus());

30
src/views/modules/sales-return/sales-return-inbound.vue

@ -145,6 +145,11 @@
<el-input v-model="inboundItem.batchNo" placeholder="请输入批号" /> <el-input v-model="inboundItem.batchNo" placeholder="请输入批号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="高度(mm)">
<el-input v-model="inboundItem.height" type="number" placeholder="请输入高度" />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8" style="margin-top: 10px"> <el-col :span="8" style="margin-top: 10px">
@ -398,7 +403,8 @@ export default {
uom: row.returnUOM, uom: row.returnUOM,
locationNo: 'AS', locationNo: 'AS',
batchNo: `${this.scanRmaNo}-${row.rmaLineNo}-1`, batchNo: `${this.scanRmaNo}-${row.rmaLineNo}-1`,
site: this.site
site: this.site,
height: this.parseHeightFromPartNo(row.invPartNo) //
}; };
this.processFlag = 2; this.processFlag = 2;
@ -535,6 +541,7 @@ export default {
batchNo: item.batchNo, batchNo: item.batchNo,
locationNo: item.locationNo, locationNo: item.locationNo,
warehouseId: this.warehouseId, warehouseId: this.warehouseId,
height: item.height || null, // (mm)
rmaLineNo: item.rmaLineNo, rmaLineNo: item.rmaLineNo,
packUnitList: this.handlingUnit.map(hu => ({ packUnitList: this.handlingUnit.map(hu => ({
code: hu.code, code: hu.code,
@ -619,6 +626,27 @@ export default {
this.$refs.scanRmaRef.focus(); this.$refs.scanRmaRef.focus();
} }
}); });
},
/**
* 从物料编码中解析高度
* 如果物料编码格式是 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 '';
} }
}, },

Loading…
Cancel
Save