diff --git a/src/views/Order/components/ShowMaterial.vue b/src/views/Order/components/ShowMaterial.vue index d7b43f7..0ce2260 100644 --- a/src/views/Order/components/ShowMaterial.vue +++ b/src/views/Order/components/ShowMaterial.vue @@ -142,16 +142,51 @@ export default { this.dataColumn = dataColumn; let result2 = await getPageList({ FPageSize: 99, - FDataId: this.objInfoObj.FID - }, "View") || {}; - - console.log('result2', result2); + FMaterialID: this.objInfoObj.FID + }, "View2") || {}; + let infosResult = await getPageList({ + FPageSize: 99, + FDataID: this.objInfoObj.FID + }, "View") || {}; + let infos = infosResult.Data.List + let views = result2.Data.List + console.log('infos', infos); + + if (views && views.length > 0) { + views.forEach(v => { + v["FTypeID1"] = infos[0].FTypeID1 + v["FTypeID2"] = infos[0].FTypeID2 + v["FK3Code"] = infos[0].FK3Code + v["FK3Name"] = infos[0].FK3Name + v["FK3ShortCode"] = infos[0].FK3ShortCode + v["FTestCode"] = infos[0].FTestCode + v["FSAPCode"] = infos[0].FSAPCode + v["FSAPDescription"] = infos[0].FSAPDescription + v["FMaterialGroup"] = infos[0].FMaterialGroup + v["FMaterialType"] = infos[0].FMaterialType + v["FCustomerCode"] = infos[0].FCustomerCode + v["FStoreHouse"] = infos[0].FStoreHouse + v["FBomEntry"] = infos[0].FBomEntry + v["FLineHouse"] = infos[0].FLineHouse + v["FProductDesc"] = infos[0].FProductDesc + v["FWorkCenter"] = infos[0].FWorkCenter + v["FCraftExplain"] = infos[0].FCraftExplain + v["FIidentifier"] = infos[0].FIidentifier + v["FGuaranteePeriod"] = infos[0].FGuaranteePeriod + v["FStorageConditions"] = infos[0].FStorageConditions + v["FSafetyStock"] = infos[0].FSafetyStock + v["FTriggerRatio"] = infos[0].FTriggerRatio + v["FMinAmount"] = infos[0].FMinAmount + v["FMaxAmount"] = infos[0].FMaxAmount + v["FYield"] = infos[0].FYield + v["FFixedLoss"] = infos[0].FFixedLoss + v["FTheoryYield"] = infos[0].FTheoryYield + }) + } - - - this.dataList = result2.Data.List.map(function(item){ + this.dataList = views.map(function(item){ item["FTypeName1"]=materialType.Data.List.find(m=>m.FID==item.FTypeID1)?materialType.Data.List.find(m=>m.FID==item.FTypeID1).FName:""; item["FTypeName2"]=materialType.Data.List.find(m=>m.FID==item.FTypeID2)?materialType.Data.List.find(m=>m.FID==item.FTypeID2).FName:"";