成品库显示图号,精简历史记录map
This commit is contained in:
parent
3cba19da98
commit
13d3a96f0c
@ -68,9 +68,9 @@ namespace HHWMS.Web.Controllers
|
||||
Id = x.ID,
|
||||
ContainerCode = x.ContainerCode,
|
||||
MaterialCode = x.MaterialCode,
|
||||
MaterialName = x.MaterialName,
|
||||
MaterialName = x.MaterialType,
|
||||
MaterialSpec = x.MaterialSpec,
|
||||
Company = x.CompanyCode,
|
||||
CompanyCode = x.CompanyCode,
|
||||
Batch = x.Batch,
|
||||
Qty = (int)x.Qty
|
||||
})
|
||||
|
||||
@ -160,14 +160,17 @@
|
||||
{
|
||||
title: '容器编码',
|
||||
dataIndex: 'ContainerCode',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '物料编码',
|
||||
dataIndex: 'MaterialCode',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
title: '图号',
|
||||
dataIndex: 'MaterialName',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '物料型号',
|
||||
@ -240,7 +243,7 @@
|
||||
getFilteredTips(type, inputVal) {
|
||||
if (!inputVal) {
|
||||
// 没有输入时显示所有历史记录
|
||||
console.log(1)
|
||||
|
||||
return this.history[type].map(item => ({ value: item }));
|
||||
}
|
||||
// 输入时过滤匹配的记录(不区分大小写)
|
||||
@ -262,7 +265,7 @@
|
||||
// 添加到最前面(最新的在最上面)
|
||||
history.unshift(value);
|
||||
// 限制最多保存10条
|
||||
if (history.length > 10) {
|
||||
if (history.length > 20) {
|
||||
history.pop();
|
||||
}
|
||||
// 保存到本地存储
|
||||
@ -477,7 +480,12 @@
|
||||
},
|
||||
|
||||
handleDelete(record) {
|
||||
const index = this.bindList.findIndex(item => item.id === record.id);
|
||||
if (!record || !record.Id) {
|
||||
this.$message.error("无效的记录");
|
||||
return;
|
||||
}
|
||||
|
||||
const index = this.bindList.findIndex(item => item.Id === record.Id);
|
||||
|
||||
if (index > -1) {
|
||||
// 调用后端删除库存
|
||||
@ -502,7 +510,13 @@
|
||||
},
|
||||
|
||||
handleEdit(record) {
|
||||
this.editForm.index = this.bindList.findIndex(item => item.id === record.id);
|
||||
if (!record || !record.Id) {
|
||||
this.$message.error("无效的记录");
|
||||
return;
|
||||
}
|
||||
|
||||
this.editForm.index = this.bindList.findIndex(item => item.Id === record.Id);
|
||||
|
||||
this.editForm.qty = Math.floor(record.Qty);
|
||||
this.editModalVisible = true;
|
||||
},
|
||||
@ -548,7 +562,12 @@
|
||||
},
|
||||
|
||||
handleDeduct(record) {
|
||||
this.deductForm.index = this.bindList.findIndex(item => item.id === record.id);
|
||||
if (!record || !record.Id) {
|
||||
this.$message.error("无效的记录");
|
||||
return;
|
||||
}
|
||||
|
||||
this.deductForm.index = this.bindList.findIndex(item => item.Id === record.Id);
|
||||
this.deductForm.qty = null;
|
||||
this.deductForm.maxQty = Math.floor(record.Qty);
|
||||
this.deductModalVisible = true;
|
||||
@ -573,7 +592,7 @@
|
||||
this.$notification.error("扣除数量不能大于当前数量");
|
||||
return;
|
||||
}
|
||||
console.log(1);
|
||||
|
||||
const newQty = record.Qty - this.deductForm.qty;
|
||||
|
||||
if (newQty === 0) {
|
||||
|
||||
@ -27,6 +27,7 @@ namespace HHWMS.Web.Support.Profiles
|
||||
.ForMember(
|
||||
dest => dest.CreateTime,
|
||||
src => src.MapFrom(x => DateTime.Now))
|
||||
.ForMember(x => x.ID, opt => opt.Ignore())
|
||||
;
|
||||
|
||||
// 任务明细 --> 库存交易
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user