Browse Source

2025-08-28 pc生产领料优化

master
fengyuan_yang 5 months ago
parent
commit
f6f7ba2921
  1. 2
      src/views/modules/other-inout/other-inout.vue
  2. 97
      src/views/modules/other-inout/otherInboundDetail.vue
  3. 24
      src/views/modules/property-change/propertyChange.vue

2
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 },
]
}
},

97
src/views/modules/other-inout/otherInboundDetail.vue

@ -66,16 +66,16 @@
<!-- 右列入库数量和单位 -->
<div class="material-column quantity-column">
<!-- 入库数量 -->
<div class="input-item">
<span class="input-label">入库数量</span>
<el-input
v-model="actualQty"
placeholder="入库数量"
type="number"
@keyup.enter.native="handleAddMaterial"
class="input-field" clearable
/>
<!-- 入库数量和批次号 -->
<div class="input-row">
<div class="input-item quantity-item">
<span class="input-label">入库数量</span>
<el-input class="inlineNumber numInput" v-model="actualQty" placeholder="入库数量" type="number" @keyup.enter.native="handleAddMaterial" clearable/>
</div>
<div class="input-item batch-item">
<span class="input-label">批次号</span>
<el-input class="inlineNumber numInput" v-model="batchNo" placeholder="*" @keyup.enter.native="handleAddMaterial" ref="batchInput" clearable/>
</div>
</div>
<!-- 单位 -->
@ -101,6 +101,9 @@
<i class="el-icon-circle-check"></i>
<span>入库信息确认</span>
</div>
<div class="title-right">
<span class="material-list-link" @click="showMaterialListDialog">物料清单</span>
</div>
</div>
<!-- 物料列表 -->
@ -109,6 +112,7 @@
<div class="col-no">NO.</div>
<div class="col-label">标签条码</div>
<div class="col-part">物料编码</div>
<div class="col-batch">批次号</div>
<div class="col-qty">标签数量</div>
</div>
@ -121,6 +125,7 @@
<div class="col-no">{{ materialList.length - index }}</div>
<div class="col-label">{{ item.labelCode || item.materialCode }}</div>
<div class="col-part">{{ item.materialCode }}</div>
<div class="col-batch">{{ item.batchNo || '-' }}</div>
<div class="col-qty">{{ item.actualQty }}</div>
</div>
@ -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;
}
</style>

24
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(() => {
// //
// });
},
//

Loading…
Cancel
Save