|
@ -119,6 +119,7 @@ import * as StdcostpriceApi from '@/api/wms/stdcostprice' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as BomDismantleApi from "@/api/wms/bomDismantle" |
|
|
import * as BomDismantleApi from "@/api/wms/bomDismantle" |
|
|
import * as BomApi from "@/api/wms/bom"; |
|
|
import * as BomApi from "@/api/wms/bom"; |
|
|
|
|
|
import * as BalanceApi from "@/api/wms/balance"; |
|
|
|
|
|
|
|
|
// 制品报废申请 |
|
|
// 制品报废申请 |
|
|
defineOptions({ name: 'ProductscrapRequestMain' }) |
|
|
defineOptions({ name: 'ProductscrapRequestMain' }) |
|
@ -211,6 +212,22 @@ const buttonBaseClickBom = (val) => { |
|
|
detailBomRef.value.dialogVisible = false |
|
|
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 按钮 |
|
|
// 新增 tableform 按钮 |
|
|
const buttonOperationClick = async (row, label, index)=> { |
|
|
const buttonOperationClick = async (row, label, index)=> { |
|
|
if (row.itemCode == '') { |
|
|
if (row.itemCode == '') { |
|
@ -227,7 +244,8 @@ const buttonOperationClick = async (row, label, index)=> { |
|
|
bomModelVisible.value = true |
|
|
bomModelVisible.value = true |
|
|
await getDetailListBom() |
|
|
await getDetailListBom() |
|
|
console.log(row.fromLocationCode); |
|
|
console.log(row.fromLocationCode); |
|
|
detatableDataBom.tableList.forEach(item => { |
|
|
detatableDataBom.tableList.forEach(async item => { |
|
|
|
|
|
console.log(333,item) |
|
|
ProdcutscrapBomScrap.allSchemas.tableFormColumns.map((bomItem) => { |
|
|
ProdcutscrapBomScrap.allSchemas.tableFormColumns.map((bomItem) => { |
|
|
if (bomItem.field == 'batch') { |
|
|
if (bomItem.field == 'batch') { |
|
|
let condition = [{ |
|
|
let condition = [{ |
|
@ -256,6 +274,8 @@ const buttonOperationClick = async (row, label, index)=> { |
|
|
}else { |
|
|
}else { |
|
|
item.qty = item.bomQty * row.qty |
|
|
item.qty = item.bomQty * row.qty |
|
|
} |
|
|
} |
|
|
|
|
|
const obj = await banchBomPage(row.fromLocationCode, item) |
|
|
|
|
|
item.batch = obj.batch |
|
|
}) |
|
|
}) |
|
|
detailBomRef.value.open('create', row, null,'viewDetail')//查看明细数据 |
|
|
detailBomRef.value.open('create', row, null,'viewDetail')//查看明细数据 |
|
|
} |
|
|
} |
|
|