Commit fc6142dc authored by jingnan's avatar jingnan 👀

入库检验新增履历本信息查看

parent fddd23bb
......@@ -7,13 +7,14 @@
<template>
<div class="className">
<dee-drawer
v-if="config"
width="70%"
:title="title"
:dialog-visible="visibile"
@handleClose="onClose"
>
<dee-as-com
v-if="config"
style="display:block"
:lay-config="config"
:basic-data="rowData"
/>
......
......@@ -90,7 +90,7 @@ export default {
columns() {
const tableConlumn = [
{ title: '序号', key: 'parentIndex', align: 'center', headerAlign: 'center' },
{ title: '操作', key: 'operate', align: 'center', component: {
{ title: '操作', key: 'operate', width: '140px', align: 'center', component: {
show: true,
name: 'EditTableRow',
props: {
......@@ -118,6 +118,19 @@ export default {
return (row.subTypeName === 'InStoragePurchaseItem' || row.subTypeName === 'InStorageRecallItem' || row.subTypeName === 'InStorageExpireItem') && (row.state === 'Material_Check' || row.state === 'In_Confirm')
}
},
{ // 物料检验及入库确认节点展示
operation: `履历单信息`,
handleClick: (row, index) => {
// 查看履历单之前需完成检验单的填写
const responseInTest = this.$utils.getTargetJobResponses(row, 'JobResponseInTest')
if (!responseInTest || !responseInTest.testNo) return this.$utils.showMessageWarning('检验单号不能为空!')
this.getBiographicData(responseInTest, row) // 查询履历本信息 如有则查看没有则新建
},
icon: '/icons/o-doc.png',
showFun: (row) => {
return (row.subTypeName === 'InStoragePurchaseItem' || row.subTypeName === 'InStorageRecallItem' || row.subTypeName === 'InStorageExpireItem') && (row.state === 'Material_Check')
}
},
{ // 物料检验阶段及入库确认阶段展示
operation: '理化查看',
handleClick: (row, index) => {
......@@ -269,6 +282,23 @@ export default {
})
},
methods: {
getBiographicData(responseInTest, row) {
const params = {
searchItems: {
items: [{ 'fieldName': 'responseInTestId', operator: 'EQ', value: responseInTest.id }],
operator: 'AND'
}
}
this.$api.searchApi('BiographicData', params).then(res => {
if (res.items && res.items.content && res.items.content.length) {
this.$refs.editDrawer.onShow(row, { typeName: 'BiographicData', layKey: 'defaultInfo' })
} else {
this.$refs.editDrawer.onShow(row, { typeName: 'BiographicData', layKey: 'addBiographicData' })
}
}).catch(err => {
console.log(err)
})
},
setParams(extWorkUnitId, currentRow) {
if (currentRow.inventoryJobResponses && currentRow.inventoryJobResponses.length) {
const targetInventory = this.$utils.getTargetJobResponses(currentRow, 'JobResponseInEntry')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment