Browse Source

调整WMS系统中所有BOM版本字段默认值

hella_online_20240829
zhang_li 5 months ago
parent
commit
cedf5e20bb
  1. 44
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

44
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -42,8 +42,6 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList" @success="getList"
:rules="ProductscrapRequestMainRules" :rules="ProductscrapRequestMainRules"
:formAllSchemas="ProductscrapRequestMain.allSchemas" :formAllSchemas="ProductscrapRequestMain.allSchemas"
@ -85,7 +83,6 @@
<!-- BOM弹窗列表 --> <!-- BOM弹窗列表 -->
<BasicForm <BasicForm
ref="detailBomRef" ref="detailBomRef"
@success="getList" @success="getList"
:tableAllSchemas="ProdcutscrapBomScrap.allSchemas" :tableAllSchemas="ProdcutscrapBomScrap.allSchemas"
:tableFormRules="ProdcutscrapBomScrapRules" :tableFormRules="ProdcutscrapBomScrapRules"
@ -121,7 +118,7 @@ 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";
// //
defineOptions({ name: 'ProductscrapRequestMain' }) defineOptions({ name: 'ProductscrapRequestMain' })
const message = useMessage() // const message = useMessage() //
@ -303,13 +300,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(formField == 'productionLineCode'){ if(formField == 'productionLineCode'){
row['productionLineCode'] = val[0]['code'] row['productionLineCode'] = val[0]['code']
}else if(formField == 'workStationCode'){ }else if(formField == 'workStationCode'){
val.forEach(item=>{ row['workStationCode'] = val[0]['code']
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) row['fromLocationCode'] = val[0]['rawLocationCode']
newRow['workStationCode'] = item['code']
newRow['fromLocationCode'] = item['rawLocationCode']
tableData.value.push(newRow)
})
}else if(formField == 'processCode'){ }else if(formField == 'processCode'){
row['processCode'] = val[0]['code'] row['processCode'] = val[0]['code']
}else if(formField == 'itemCode'){ }else if(formField == 'itemCode'){
@ -318,30 +310,26 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['bomVersion'] = '' row['bomVersion'] = ''
row['childList'] = [] row['childList'] = []
// //
let param = {'itemCodes':val[0]['itemCode'] as string} let param = {'itemCode':val[0]['itemCode'] as string}
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => { StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => {
if(res&&res.length>0){ console.log(res)
row['uom'] = res.uom row['uom'] = res.uom
row['singlePrice'] = res.price row['singlePrice'] = res.price
} })
})
// BOM // BOM
console.log(formRef.formModel) const param1 = {
const param1 = { productItemCode: val[0]['itemCode'],
productItemCode: val[0]['itemCode'], available: 'TRUE',
available: 'TRUE', pageSize: 20,
pageSize: 20, pageNo: 1,
pageNo: 1, sort: '',
sort: '', by: 'ASC',
by: 'ASC', }
}
BomApi.getBomPage(param1).then(res => { BomApi.getBomPage(param1).then(res => {
console.log(res) console.log(res)
if(res?.list?.length>0){ if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version row['bomVersion'] = res.list[0].version
} }
// row['singlePrice'] = res.price
}) })
}else if(formField == 'bomVersion'){ }else if(formField == 'bomVersion'){
row['bomVersion'] = val[0]['version'] row['bomVersion'] = val[0]['version']

Loading…
Cancel
Save