Browse Source

工序默认显示子物料代码第一条

hella_online_20240829
zhang_li 4 months ago
parent
commit
569795a79c
  1. 17
      src/views/wms/productionManage/processproduction/processproductionRequest/index.vue

17
src/views/wms/productionManage/processproduction/processproductionRequest/index.vue

@ -98,6 +98,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as BomApi from "@/api/wms/bom";
defineOptions({ name: 'ProcessproductionRequestMain' }) defineOptions({ name: 'ProcessproductionRequestMain' })
@ -114,10 +115,24 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField === 'productionLine'){ if(formField === 'productionLine'){
val.forEach(item=>{ val.forEach(async item=>{
// if(tableData.value.find(item1=>item1['productionLine'] == item['productionLineCode'])) return // if(tableData.value.find(item1=>item1['productionLine'] == item['productionLineCode'])) return
const newRow = JSON.parse(JSON.stringify(tableFormKeys)) const newRow = JSON.parse(JSON.stringify(tableFormKeys))
newRow['productionLine'] = item['productionLineCode'] newRow['productionLine'] = item['productionLineCode']
const param1 = {
productItemCode: formRef.formModel['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['componentItemCode'] = res.list[0].componentItemCode
}
})
tableData.value.push(newRow) tableData.value.push(newRow)
}) })
} }

Loading…
Cancel
Save