Browse Source

BOM字段中的物料批次由全部手工填写形式改为系统默认

hella_online_20240829
zhang_li 4 months ago
parent
commit
46ddccccd5
  1. 22
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

22
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 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')//
} }

Loading…
Cancel
Save