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