|
@@ -415,7 +415,7 @@ async function updateItems(updateDatas) {
|
|
|
|
|
|
// 获取清单材料数据
|
|
// 获取清单材料数据
|
|
async function getBillMaterials(libID, billID) {
|
|
async function getBillMaterials(libID, billID) {
|
|
- // 指引下已有定额人材机
|
|
|
|
|
|
+ // 指引下已有定额人材机(材料大类)
|
|
let allGljList = [];
|
|
let allGljList = [];
|
|
const rationItems = await billsGuideItemsModel.find({ libID, billsID: billID, rationID: { $ne: null } }, '-_id rationID').lean();
|
|
const rationItems = await billsGuideItemsModel.find({ libID, billsID: billID, rationID: { $ne: null } }, '-_id rationID').lean();
|
|
if (rationItems.length) {
|
|
if (rationItems.length) {
|
|
@@ -428,7 +428,8 @@ async function getBillMaterials(libID, billID) {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
if (gljIDs.length) {
|
|
if (gljIDs.length) {
|
|
- allGljList = await gljModel.find({ ID: { $in: [...new Set(gljIDs)] } }, '-_id ID code name specs').lean();
|
|
|
|
|
|
+ allGljList = await gljModel.find({ ID: { $in: [...new Set(gljIDs)] } }, '-_id ID code name specs gljType').lean();
|
|
|
|
+ allGljList = allGljList.filter(glj => /^2/.test(glj.gljType) || [4, 5].includes(glj.gljType));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 清单材料
|
|
// 清单材料
|