fix(wms): 修复复制信息时未保留itemId的问题

feat(report): 为zha报表添加按createTime降序排序功能
refactor(home): 优化统计组件查询条件,添加status参数
This commit is contained in:
砂糖
2026-01-10 18:19:55 +08:00
parent e7e4d8c1c5
commit 2f2e1bbaff
3 changed files with 8 additions and 4 deletions

View File

@@ -100,7 +100,7 @@ export default {
// 顺序请求:前一个请求完成后,再执行下一个
const productRes = await listProduct({ pageSize: 10, pageNum: 1 });
const rawMaterialRes = await listRawMaterial({ pageSize: 10, pageNum: 1 });
const materialCoilRes = await listMaterialCoil({ pageSize: 10, pageNum: 1, dataType: 1 });
const materialCoilRes = await listMaterialCoil({ pageSize: 10, pageNum: 1, dataType: 1, status: 1 });
const equipmentRes = await listEquipmentManagement({ pageSize: 1, pageNum: 1, status: 'in_service' });
const orderRes = await listOrder({ pageSize: 1, pageNum: 1 });
const customerRes = await listCustomer({ pageSize: 1, pageNum: 1 });

View File

@@ -629,7 +629,7 @@ export default {
materialType: this.currentInfo.materialType,
// 不复制 itemType 和 itemId让它们由 materialType 自动决定
itemType,
itemId: null,
itemId: this.currentInfo.itemId,
grossWeight: parseFloat(this.currentInfo.grossWeight) || null,
netWeight: parseFloat(this.currentInfo.netWeight) || null,
warehouseId: this.currentInfo.warehouseId,
@@ -638,7 +638,7 @@ export default {
};
// materialType 会触发 watch自动设置 itemType 并加载物品列表
this.$message.success('已复制当前信息');
this.$message.success('已复制当前信息,包含' + this.currentInfo.materialType + '的相关信息, 请根据需要修改');
},
// 保存更新

View File

@@ -201,7 +201,11 @@ export default {
}),
]).then(([res1, res2, res3, res4]) => {
console.log(res1, res2, res3, res4)
this.list = [...res1.rows, ...res2.rows, ...res3.rows, ...res4.rows]
const list = [...res1.rows, ...res2.rows, ...res3.rows, ...res4.rows]
// 按照createTime 降序排序
this.list = list.sort(
(a, b) => new Date(b.createTime) - new Date(a.createTime)
)
this.loading = false
})
// listPendingAction({