|
|
|
@ -103,8 +103,8 @@ |
|
|
|
<el-form label-position="top" class="form-section" style="margin: 5px;"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="12"><el-form-item label="商品编码"><el-input v-model="recvItem.partNo" disabled /></el-form-item></el-col> |
|
|
|
<el-col :span="12"><el-form-item label="计量单位"><el-input v-model="recvItem.unit" disabled /></el-form-item></el-col> |
|
|
|
<el-col :span="24"><el-form-item label="商品名称"><el-input v-model="recvItem.desc" disabled /></el-form-item></el-col> |
|
|
|
<el-col :span="12"><el-form-item label="计量单位"><el-input v-model="recvItem.purchaseUOM" disabled /></el-form-item></el-col> |
|
|
|
<el-col :span="24"><el-form-item label="商品名称"><el-input v-model="recvItem.description" disabled /></el-form-item></el-col> |
|
|
|
<el-col :span="8"><el-form-item label="单包装数量"><el-input v-model="hanlingItem.perQty" /></el-form-item></el-col> |
|
|
|
<el-col :span="8"><el-form-item label="包装数"><el-input v-model="hanlingItem.packageQty" /></el-form-item></el-col> |
|
|
|
<el-col :span="8" style="margin-top: 24px"><el-form-item> |
|
|
|
@ -203,7 +203,7 @@ export default { |
|
|
|
...row, |
|
|
|
poNo: row.poNumber || this.scanCode, |
|
|
|
dueinQty: row.qtyToReceive || row.invQtyToReceive, |
|
|
|
transQty: row.invQtyToReceive || 0, |
|
|
|
transQty: row.needHandlingUnit==='Y'?0:row.invQtyToReceive || 0, |
|
|
|
batchNo: row.partNo+'-'+row.lineNo+'-'+row.releaseNo+'-'+1, |
|
|
|
deliveryDate: row.plannedDeliveryDate || '', |
|
|
|
arrivalDate: this.getCurrentDate(), |
|
|
|
@ -241,6 +241,16 @@ export default { |
|
|
|
this.handlingUnit.splice(index, 1); |
|
|
|
localStorage.setItem(this.huKey, JSON.stringify(this.handlingUnit)); |
|
|
|
}, |
|
|
|
// 清除所有handlingUnit缓存 |
|
|
|
clearAllHandlingUnitCache() { |
|
|
|
this.hanlingItem = { code: '', qty: '', perQty: '', packageQty: '' }; |
|
|
|
const keys = Object.keys(localStorage); |
|
|
|
keys.forEach(key => { |
|
|
|
if (key.startsWith('hu_')) { |
|
|
|
localStorage.removeItem(key); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
receivePo() { |
|
|
|
if (this.fullscreenLoading) return; // 防止重复点 |
|
|
|
this.fullscreenLoading = true; |
|
|
|
@ -285,14 +295,14 @@ export default { |
|
|
|
manufactureDate: item.manufactureDate, |
|
|
|
// 处理单元列表 |
|
|
|
handlingUnitList: item.needHandlingUnit === 'Y' ? this.handlingUnit.map(hu => ({ |
|
|
|
perQty: hu.qty, |
|
|
|
packageQty: 1 |
|
|
|
perQty: hu.perQty, |
|
|
|
packageQty: hu.packageQty |
|
|
|
})) : [] |
|
|
|
}; |
|
|
|
receivePo(receiveData).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message.success("操作成功"); |
|
|
|
localStorage.removeItem(this.huKey); |
|
|
|
this.clearAllHandlingUnitCache(); |
|
|
|
this.processFlag = 1; |
|
|
|
this.scanCode = ''; |
|
|
|
this.poList = []; |
|
|
|
|