From f6f7ba29214e9670679be5cd9d12428ff0a8b5b3 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Thu, 28 Aug 2025 13:20:39 +0800
Subject: [PATCH] =?UTF-8?q?2025-08-28=20pc=E7=94=9F=E4=BA=A7=E9=A2=86?=
=?UTF-8?q?=E6=96=99=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/other-inout/other-inout.vue | 2 +-
.../other-inout/otherInboundDetail.vue | 97 +++++++++++++++----
.../property-change/propertyChange.vue | 24 +++--
3 files changed, 92 insertions(+), 31 deletions(-)
diff --git a/src/views/modules/other-inout/other-inout.vue b/src/views/modules/other-inout/other-inout.vue
index 160b530..81e3087 100644
--- a/src/views/modules/other-inout/other-inout.vue
+++ b/src/views/modules/other-inout/other-inout.vue
@@ -33,8 +33,8 @@ export default {
data() {
return {
buttons: [
- { icon: 'revoke', label: '其他出库', iconClass: 'purchase', to: 'otherOutboundList', disabled: false },
{ icon: 'down', label: '其它入库', iconClass: 'qualified', to: 'otherInboundList', disabled: false },
+ { icon: 'revoke', label: '其他出库', iconClass: 'purchase', to: 'otherOutboundList', disabled: false },
]
}
},
diff --git a/src/views/modules/other-inout/otherInboundDetail.vue b/src/views/modules/other-inout/otherInboundDetail.vue
index 95ff602..4c89886 100644
--- a/src/views/modules/other-inout/otherInboundDetail.vue
+++ b/src/views/modules/other-inout/otherInboundDetail.vue
@@ -66,16 +66,16 @@
@@ -109,6 +112,7 @@
NO.
标签条码
物料编码
+ 批次号
标签数量
@@ -121,6 +125,7 @@
{{ materialList.length - index }}
{{ item.labelCode || item.materialCode }}
{{ item.materialCode }}
+ {{ item.batchNo || '-' }}
{{ item.actualQty }}
@@ -234,6 +239,7 @@ export default {
return {
materialCode: '',
actualQty: '',
+ batchNo: '*',
inboundInfo: {},
materialList: [],
originalMaterialList: [],
@@ -298,10 +304,19 @@ export default {
return;
}
- // 检查是否已经添加过该物料
- const exists = this.materialList.find(item => item.materialCode === this.materialCode.trim());
+ if (!this.batchNo.trim()) {
+ this.$message.warning('请输入批次号');
+ this.$refs.batchInput.focus();
+ return;
+ }
+
+ // 检查是否已经添加过该物料和批次号组合
+ const exists = this.materialList.find(item =>
+ item.materialCode === this.materialCode.trim() &&
+ item.batchNo === this.batchNo.trim()
+ );
if (exists) {
- this.$message.warning('该物料已添加,请勿重复添加');
+ this.$message.warning('该物料和批次号组合已添加,请勿重复添加');
return;
}
@@ -312,6 +327,7 @@ export default {
inboundNo: this.inboundNo,
materialCode: this.materialCode.trim(),
actualQty: parseFloat(this.actualQty),
+ batchNo: this.batchNo.trim(),
warehouseId: getCurrentWarehouse()
};
@@ -326,12 +342,14 @@ export default {
materialName: materialData.materialName,
unit: materialData.unit,
actualQty: materialData.actualQty,
+ batchNo: this.batchNo.trim(),
labelCode: materialData.labelCode
});
// 清空输入
this.materialCode = '';
this.actualQty = '';
+ this.batchNo = '*';
this.currentMaterial = {};
// 聚焦到物料编码输入框
@@ -378,20 +396,18 @@ export default {
this.$message.warning('请输入库位号');
return;
}
-
const params = {
site: this.inboundInfo.site,
buNo: this.inboundInfo.buNo,
inboundNo: this.inboundNo,
- warehouseId: getCurrentWarehouse(),
locationCode: this.locationCode.trim(),
materials: this.materialList.map(material => ({
materialCode: material.materialCode,
actualQty: material.actualQty,
+ batchNo: material.batchNo,
labelCode: material.labelCode
}))
- };
-
+ }
confirmOtherInbound(params).then(({ data }) => {
if (data && data.code === 0) {
this.$message.success('入库成功');
@@ -496,6 +512,11 @@ export default {
return;
}
+ // 初始化字段
+ this.materialCode = '';
+ this.actualQty = '';
+ this.batchNo = '*';
+
// 聚焦物料编码输入框
this.$nextTick(() => {
if (this.$refs.materialInput) {
@@ -681,6 +702,16 @@ export default {
flex: 1;
}
+.batch-item {
+ flex: 1;
+}
+
+.input-row {
+ display: flex;
+ gap: 8px;
+ margin-bottom: 0;
+}
+
.input-label {
font-size: 14px;
color: #666;
@@ -899,6 +930,11 @@ export default {
text-align: center;
}
+.col-batch {
+ flex: 1.5;
+ text-align: center;
+}
+
.col-qty {
width: 60px;
text-align: center;
@@ -1328,5 +1364,32 @@ export default {
.col-label, .col-part {
flex: 1.5;
}
+
+ .col-batch {
+ flex: 1;
+ }
+}
+.material-list-link {
+ color: #17B3A3;
+ font-size: 14px;
+ font-weight: 500;
+ cursor: pointer;
+ text-decoration: underline;
+ transition: color 0.2s ease;
+}
+
+.material-list-link:hover {
+ color: #0d8f7f;
+}
+
+/deep/ .inlineNumber input::-webkit-outer-spin-button,
+/deep/ .inlineNumber input::-webkit-inner-spin-button {
+ -webkit-appearance: none;
+
+}
+/deep/ .inlineNumber input[type="number"]{
+ -moz-appearance: textfield;
+ padding-right: 5px !important;
}
+
diff --git a/src/views/modules/property-change/propertyChange.vue b/src/views/modules/property-change/propertyChange.vue
index d101a33..57742ee 100644
--- a/src/views/modules/property-change/propertyChange.vue
+++ b/src/views/modules/property-change/propertyChange.vue
@@ -133,7 +133,6 @@ export default {
if (!this.scanCode.trim()) {
return;
}
-
this.getStockInfo(this.scanCode.trim());
this.scanCode = '';
},
@@ -145,16 +144,13 @@ export default {
site: localStorage.getItem('site'),
warehouseId: getCurrentWarehouse()
};
-
getStockInfoByLabelCode(params).then(({ data }) => {
if (data && data.code === 0) {
this.stockInfo = data.data;
-
// 初始化输入值为当前值
this.newLocationId = this.stockInfo.locationId || '';
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') : '';
-
this.$message.success('获取标签信息成功');
} else {
this.$message.error(data.msg || '未找到该标签的库存信息');
@@ -222,15 +218,17 @@ export default {
changeMsg += `有效期: ${oldExpiryDate} → ${this.newExpiryDate}\n`;
}
- this.$confirm(changeMsg, '确认变动', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.saveChange(params);
- }).catch(() => {
- // 用户取消
- });
+ this.saveChange(params);
+
+ // this.$confirm(changeMsg, '确认变动', {
+ // confirmButtonText: '确定',
+ // cancelButtonText: '取消',
+ // type: 'warning'
+ // }).then(() => {
+ //
+ // }).catch(() => {
+ // // 用户取消
+ // });
},
// 保存变动