Browse Source

2026-03-27

属性变动优化
master
fengyuan_yang 3 weeks ago
parent
commit
04c84b700b
  1. 25
      src/views/modules/property-change/propertyChange.vue

25
src/views/modules/property-change/propertyChange.vue

@ -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 = '';

Loading…
Cancel
Save