|
|
@ -42,8 +42,6 @@ |
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm |
|
|
|
ref="formRef" |
|
|
|
:isOpenSearchTable="true" |
|
|
|
fieldTableColumn="workStationCode" |
|
|
|
@success="getList" |
|
|
|
:rules="ProductscrapRequestMainRules" |
|
|
|
:formAllSchemas="ProductscrapRequestMain.allSchemas" |
|
|
@ -85,7 +83,6 @@ |
|
|
|
<!-- BOM弹窗列表 --> |
|
|
|
<BasicForm |
|
|
|
ref="detailBomRef" |
|
|
|
|
|
|
|
@success="getList" |
|
|
|
:tableAllSchemas="ProdcutscrapBomScrap.allSchemas" |
|
|
|
:tableFormRules="ProdcutscrapBomScrapRules" |
|
|
@ -121,7 +118,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import * as BomDismantleApi from "@/api/wms/bomDismantle" |
|
|
|
import * as BomApi from "@/api/wms/bom"; |
|
|
|
|
|
|
|
// 制品报废申请 制品子件报废申请 |
|
|
|
// 制品报废申请 |
|
|
|
defineOptions({ name: 'ProductscrapRequestMain' }) |
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
@ -303,13 +300,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
if(formField == 'productionLineCode'){ |
|
|
|
row['productionLineCode'] = val[0]['code'] |
|
|
|
}else if(formField == 'workStationCode'){ |
|
|
|
val.forEach(item=>{ |
|
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
|
newRow['workStationCode'] = item['code'] |
|
|
|
newRow['fromLocationCode'] = item['rawLocationCode'] |
|
|
|
tableData.value.push(newRow) |
|
|
|
}) |
|
|
|
|
|
|
|
row['workStationCode'] = val[0]['code'] |
|
|
|
row['fromLocationCode'] = val[0]['rawLocationCode'] |
|
|
|
}else if(formField == 'processCode'){ |
|
|
|
row['processCode'] = val[0]['code'] |
|
|
|
}else if(formField == 'itemCode'){ |
|
|
@ -318,30 +310,26 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
row['bomVersion'] = '' |
|
|
|
row['childList'] = [] |
|
|
|
// 查询标准价格 |
|
|
|
let param = {'itemCodes':val[0]['itemCode'] as string} |
|
|
|
let param = {'itemCode':val[0]['itemCode'] as string} |
|
|
|
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => { |
|
|
|
if(res&&res.length>0){ |
|
|
|
row['uom'] = res.uom |
|
|
|
row['singlePrice'] = res.price |
|
|
|
} |
|
|
|
console.log(res) |
|
|
|
row['uom'] = res.uom |
|
|
|
row['singlePrice'] = res.price |
|
|
|
}) |
|
|
|
// 查看BOM版本 |
|
|
|
console.log(formRef.formModel) |
|
|
|
const param1 = { |
|
|
|
productItemCode: val[0]['itemCode'], |
|
|
|
available: 'TRUE', |
|
|
|
pageSize: 20, |
|
|
|
pageNo: 1, |
|
|
|
sort: '', |
|
|
|
by: 'ASC', |
|
|
|
} |
|
|
|
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 |
|
|
|
} |
|
|
|
|
|
|
|
// row['singlePrice'] = res.price |
|
|
|
}) |
|
|
|
}else if(formField == 'bomVersion'){ |
|
|
|
row['bomVersion'] = val[0]['version'] |
|
|
|