|
|
@ -42,6 +42,8 @@ |
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm |
|
|
|
ref="formRef" |
|
|
|
:isOpenSearchTable="true" |
|
|
|
fieldTableColumn="productionLineCode" |
|
|
|
@success="getList" |
|
|
|
:rules="ProductreceiptRequestMainRules" |
|
|
|
:formAllSchemas="ProductreceiptRequestMain.allSchemas" |
|
|
@ -140,6 +142,7 @@ import { |
|
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
|
|
|
|
|
// 制品收货申请 |
|
|
|
// 隔离报工申请 |
|
|
|
defineOptions({ name: 'ProductreceiptRequestMain' }) |
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
@ -187,21 +190,31 @@ const updataTableColumns = (val) => { |
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = async (formField, searchField, val, formRef, type, row ) => { |
|
|
|
console.log(formField, searchField, val, formRef, type, row) |
|
|
|
nextTick(async () => { |
|
|
|
if (type == 'tableForm') { |
|
|
|
if (formField == 'secondPackUnit') { |
|
|
|
row['secondPackUnit'] = val[0]['packUnit'] |
|
|
|
row['secondPackQty'] = val[0]['packQty'] |
|
|
|
}else if(formField == 'itemCode'){ |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
|
|
|
|
}else if(formField == 'itemCode'){ |
|
|
|
let res = await ItembasicApi.getQueryItemCodeInfo({itemCodes:val.map(item=>item.itemCode).join(',')}) |
|
|
|
if(res.length>0){ |
|
|
|
row['uom'] = res[0]['uom'] |
|
|
|
} |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
|
|
|
|
console.log('获取计量单位',res) |
|
|
|
}else{ |
|
|
|
//添加明细 |
|
|
|
val.forEach(item=>{ |
|
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
|
newRow.batch = formatTime(new Date(), 'yyyyMMdd') |
|
|
|
newRow[formField] = item[searchField] |
|
|
|
tableData.value.push(newRow) |
|
|
|
}) |
|
|
|
} |
|
|
|
// 明细查询页赋值 |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|