diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 55a76f671..8f48623fe 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -119,6 +119,7 @@ import * as StdcostpriceApi from '@/api/wms/stdcostprice' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as BomDismantleApi from "@/api/wms/bomDismantle" import * as BomApi from "@/api/wms/bom"; +import * as BalanceApi from "@/api/wms/balance"; // 制品报废申请 defineOptions({ name: 'ProductscrapRequestMain' }) @@ -211,6 +212,22 @@ const buttonBaseClickBom = (val) => { detailBomRef.value.dialogVisible = false } } +const banchBomPage = async (fromLocationCode,item) => { + const params = { + location_code:fromLocationCode, + itemCode:item.itemCode, + pageSize: 20, + pageNo: 1, + sort:'' , + by: 'ASC', + } + const list = await BalanceApi.getBanchBomPage(params) + const obj =list[0] + console.log(list); + return obj + +} + // 新增 tableform 按钮 const buttonOperationClick = async (row, label, index)=> { if (row.itemCode == '') { @@ -227,7 +244,8 @@ const buttonOperationClick = async (row, label, index)=> { bomModelVisible.value = true await getDetailListBom() console.log(row.fromLocationCode); - detatableDataBom.tableList.forEach(item => { + detatableDataBom.tableList.forEach(async item => { + console.log(333,item) ProdcutscrapBomScrap.allSchemas.tableFormColumns.map((bomItem) => { if (bomItem.field == 'batch') { let condition = [{ @@ -256,6 +274,8 @@ const buttonOperationClick = async (row, label, index)=> { }else { item.qty = item.bomQty * row.qty } + const obj = await banchBomPage(row.fromLocationCode, item) + item.batch = obj.batch }) detailBomRef.value.open('create', row, null,'viewDetail')//查看明细数据 }