Browse Source

bom默认版本

hella_online_20240829
zhang_li 5 months ago
parent
commit
20a42cb609
  1. 16
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue
  2. 16
      src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue

16
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

@ -111,6 +111,7 @@ import * as ProductdismantleRequestDetailApi from '@/api/wms/productdismantleReq
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BomDismantleApi from '@/api/wms/bomDismantle'
import * as dismantleRequestDetailbApi from '@/api/wms/dismantleRequestDetailb'
import * as BomApi from "@/api/wms/bom";
//
@ -270,6 +271,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['expireDate'] = val[0]['expireDate']
row['bomVersion'] = ''
row['childList'] = []
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
} else {
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))

16
src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue

@ -116,6 +116,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BomDismantleApi from '@/api/wms/bomDismantle'
import * as dismantleRequestDetailbApi from "@/api/wms/dismantleRequestDetailb";
import {updateProductscrapDetailRequestBom} from "@/api/wms/productrepairRequestMain";
import * as BomApi from "@/api/wms/bom";
//
@ -246,6 +247,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['fgFromLocationCode'] = val[0]['locationCode']
row['bomVersion'] = ''
row['childList'] = []
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
} else if(formField == 'productionLineCode'){
row['productionLineCode'] = val[0]['code']
} else if(formField == 'workStationCode'){

Loading…
Cancel
Save