|
|
|
@ -51,14 +51,7 @@ |
|
|
|
|
|
|
|
<div class="info-row"> |
|
|
|
<span class="info-label">所在库位</span> |
|
|
|
<div class="input-wrapper"> |
|
|
|
<el-input |
|
|
|
v-model="newLocationId" |
|
|
|
placeholder="请扫描/输入库位" |
|
|
|
class="location-input" |
|
|
|
@keyup.enter.native="focusNextInput" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<span class="info-value">{{ stockInfo.locationId || '' }}</span> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="info-row"> |
|
|
|
@ -103,6 +96,11 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="info-row"> |
|
|
|
<span class="info-label">单据来源</span> |
|
|
|
<span class="info-value">{{ stockInfo.orderref0 || '-' }}</span> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="info-row"> |
|
|
|
<span class="info-label">关联单号1</span> |
|
|
|
<span class="info-value">{{ stockInfo.orderref1 || '-' }}</span> |
|
|
|
@ -141,7 +139,6 @@ export default { |
|
|
|
return { |
|
|
|
scanCode: '', |
|
|
|
stockInfo: {}, |
|
|
|
newLocationId: '', |
|
|
|
newStatus: '', |
|
|
|
newProductionDate: '', |
|
|
|
newExpiryDate: '' |
|
|
|
@ -168,7 +165,6 @@ export default { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.stockInfo = data.data; |
|
|
|
// 初始化输入值为当前值 |
|
|
|
this.newLocationId = this.stockInfo.locationId || ''; |
|
|
|
this.newStatus = this.stockInfo.status || ''; |
|
|
|
this.newProductionDate = this.stockInfo.productionDate ? moment(this.stockInfo.productionDate).format('YYYY-MM-DD') : ''; |
|
|
|
this.newExpiryDate = this.stockInfo.expiryDate ? moment(this.stockInfo.expiryDate).format('YYYY-MM-DD') : ''; |
|
|
|
@ -210,11 +206,10 @@ export default { |
|
|
|
const oldProductionDate = this.stockInfo.productionDate ? moment(this.stockInfo.productionDate).format('YYYY-MM-DD') : ''; |
|
|
|
const oldExpiryDate = this.stockInfo.expiryDate ? moment(this.stockInfo.expiryDate).format('YYYY-MM-DD') : ''; |
|
|
|
|
|
|
|
const hasLocationChange = this.newLocationId !== oldLocationId; |
|
|
|
const hasProductionDateChange = this.newProductionDate !== oldProductionDate; |
|
|
|
const hasExpiryDateChange = this.newExpiryDate !== oldExpiryDate; |
|
|
|
|
|
|
|
if (!hasLocationChange && !hasProductionDateChange && !hasExpiryDateChange && !hasStatusChange) { |
|
|
|
if (!hasProductionDateChange && !hasExpiryDateChange && !hasStatusChange) { |
|
|
|
this.$message.warning('没有检测到属性变动,请修改后再提交'); |
|
|
|
return; |
|
|
|
} |
|
|
|
@ -229,7 +224,7 @@ export default { |
|
|
|
batchNo: this.stockInfo.batchNo, |
|
|
|
quantity: this.stockInfo.qtyOnHand, |
|
|
|
oldLocationId: oldLocationId, |
|
|
|
newLocationId: this.newLocationId, |
|
|
|
newLocationId: oldLocationId, |
|
|
|
oldStatus: oldStatus, |
|
|
|
newStatus: this.newStatus, |
|
|
|
oldProductionDate: oldProductionDate, |
|
|
|
@ -240,9 +235,6 @@ export default { |
|
|
|
|
|
|
|
// 确认对话框 |
|
|
|
let changeMsg = '确认进行以下属性变动?\n'; |
|
|
|
if (hasLocationChange) { |
|
|
|
changeMsg += `库位: ${oldLocationId} → ${this.newLocationId}\n`; |
|
|
|
} |
|
|
|
if (hasStatusChange) { |
|
|
|
changeMsg += `状态: ${oldStatus} → ${this.newStatus}\n`; |
|
|
|
} |
|
|
|
@ -301,7 +293,6 @@ export default { |
|
|
|
// 重置表单 |
|
|
|
resetForm() { |
|
|
|
this.stockInfo = {}; |
|
|
|
this.newLocationId = ''; |
|
|
|
this.newStatus = ''; |
|
|
|
this.newProductionDate = ''; |
|
|
|
this.newExpiryDate = ''; |
|
|
|
|