Commit f05ed725 authored by jingnan's avatar jingnan 👀

库房bug修改

parent 994ccf5e
...@@ -357,7 +357,7 @@ export default { ...@@ -357,7 +357,7 @@ export default {
this.$api.recursion('JobResponseInTest', params).then(res => { this.$api.recursion('JobResponseInTest', params).then(res => {
this.$utils.showMessageSuccess('保存成功!') this.$utils.showMessageSuccess('保存成功!')
const subTypeName = this.basicData && this.basicData.subTypeName || '' const subTypeName = this.basicData && this.basicData.subTypeName || ''
if (subTypeName === 'InStorageUseBackItem' || subTypeName === 'InStorageOutBackItem' || subTypeName === 'InStorageMatchBackItem' || subTypeName === 'InStoragePurchaseItem') { if (subTypeName === 'InStorageUseBackItem' || subTypeName === 'InStorageOutBackItem' || subTypeName === 'InStorageMatchBackItem' || subTypeName === 'InStoragePurchaseItem' || subTypeName === 'InStorageRecallItem') {
this.$bus.$emit('refreshBackItem') this.$bus.$emit('refreshBackItem')
} }
resolve(true) resolve(true)
......
...@@ -942,7 +942,7 @@ export default { ...@@ -942,7 +942,7 @@ export default {
this.$api.recursion('JobResponseInTest', params).then(res => { this.$api.recursion('JobResponseInTest', params).then(res => {
this.$utils.showMessageSuccess('保存成功!') this.$utils.showMessageSuccess('保存成功!')
const subTypeName = this.basicData && this.basicData.subTypeName || '' const subTypeName = this.basicData && this.basicData.subTypeName || ''
if (subTypeName === 'InStorageUseBackItem' || subTypeName === 'InStorageOutBackItem' || subTypeName === 'InStorageMatchBackItem' || subTypeName === 'InStoragePurchaseItem') { if (subTypeName === 'InStorageUseBackItem' || subTypeName === 'InStorageOutBackItem' || subTypeName === 'InStorageMatchBackItem' || subTypeName === 'InStoragePurchaseItem' || subTypeName === 'InStorageRecallItem') {
this.$bus.$emit('refreshBackItem') this.$bus.$emit('refreshBackItem')
} }
resolve(true) resolve(true)
......
...@@ -327,7 +327,7 @@ export default { ...@@ -327,7 +327,7 @@ export default {
this.$api.recursion('JobResponseInTest', params).then(res => { this.$api.recursion('JobResponseInTest', params).then(res => {
this.$utils.showMessageSuccess('保存成功!') this.$utils.showMessageSuccess('保存成功!')
const subTypeName = this.basicData && this.basicData.subTypeName || '' const subTypeName = this.basicData && this.basicData.subTypeName || ''
if (subTypeName === 'InStorageUseBackItem' || subTypeName === 'InStorageOutBackItem' || subTypeName === 'InStorageMatchBackItem' || subTypeName === 'InStoragePurchaseItem') { if (subTypeName === 'InStorageUseBackItem' || subTypeName === 'InStorageOutBackItem' || subTypeName === 'InStorageMatchBackItem' || subTypeName === 'InStoragePurchaseItem' || subTypeName === 'InStorageRecallItem') {
this.$bus.$emit('refreshBackItem') this.$bus.$emit('refreshBackItem')
} }
resolve(true) resolve(true)
......
...@@ -72,17 +72,20 @@ export default { ...@@ -72,17 +72,20 @@ export default {
}, },
icon: '/icons/b-inspection.png', icon: '/icons/b-inspection.png',
showFun: (row) => { showFun: (row) => {
return row.subTypeName === 'InStoragePurchaseItem' && row.state === 'Check_Result_Maintain' return (row.subTypeName === 'InStoragePurchaseItem' || row.subTypeName === 'InStorageRecallItem') && row.state === 'Check_Result_Maintain'
} }
}, },
{ {
operation: '检验编辑', operation: '检验编辑',
handleClick: (row, index) => { handleClick: (row, index) => {
if (row.state === 'In_Confirm') {
row.allDisabled = true
}
this.$refs.editDrawer.onShow(row, { typeName: 'InStorageRequestItem', layKey: '8341c909-b6b9-444f-b57f-d312c52fd783' }) this.$refs.editDrawer.onShow(row, { typeName: 'InStorageRequestItem', layKey: '8341c909-b6b9-444f-b57f-d312c52fd783' })
}, },
icon: '/icons/b-inspection.png', icon: '/icons/b-inspection.png',
showFun: (row) => { showFun: (row) => {
return row.subTypeName === 'InStoragePurchaseItem' && row.state === 'Material_Check' return (row.subTypeName === 'InStoragePurchaseItem' || row.subTypeName === 'InStorageRecallItem') && (row.state === 'Check_Result_Maintain' || row.state === 'In_Confirm')
} }
} }
] ]
......
...@@ -7,11 +7,12 @@ ...@@ -7,11 +7,12 @@
<template> <template>
<div class="warehouse-select"> <div class="warehouse-select">
<el-select <el-select
v-if="basicData||scope.row.jobOrder&&scope.row.jobOrder.storageZoneId" v-if="basicData||scope.row.storageZoneId"
v-model="selectVal" v-model="selectVal"
:loading="tableColumnSelect" :loading="tableColumnSelect"
size="small" size="small"
placeholder="请选择库位" placeholder="请选择库位"
:disabled="!scope.row.isRoot&&scope.row.subTypeName==='InStoragePurchaseItem'"
filterable filterable
remote remote
loading-text="数据正在加载中..." loading-text="数据正在加载中..."
...@@ -61,13 +62,12 @@ export default { ...@@ -61,13 +62,12 @@ export default {
immediate: true, immediate: true,
deep: true, deep: true,
handler: function(val) { handler: function(val) {
if (val.inventoryJobResponses && val.inventoryJobResponses[0].extWorkUnit) { const targetInventory = this.$utils.getTargetJobResponses(val, 'JobResponseInEntry')
this.selectVal = val.inventoryJobResponses[0].extWorkUnit.extcode if (targetInventory && targetInventory.extWorkUnit) {
} else if (val.extWorkUnit && val.extWorkUnit.extcode) { this.selectVal = targetInventory.extWorkUnit.extcode
this.selectVal = val.extWorkUnit.extcode
} }
if (!this.basicData && val.jobOrder.storageZoneId) { if (!this.basicData && val.storageZoneId) {
this.storageZoneId = val.jobOrder.storageZoneId this.storageZoneId = val.storageZoneId
} }
} }
} }
...@@ -131,22 +131,33 @@ export default { ...@@ -131,22 +131,33 @@ export default {
if (!this.selectVal) this.$utils.showMessageWarning('请选择库位') if (!this.selectVal) this.$utils.showMessageWarning('请选择库位')
this.$emit('save', this.selectVal) this.$emit('save', this.selectVal)
// 适配验收入库确认批量签审 // 适配验收入库确认批量签审
if (this.scope.row.subTypeName === 'JobResponseInEntry') { if (this.scope.row.subTypeName === 'InStorageRecallItem' || this.scope.row.subTypeName === 'InStoragePurchaseItem') {
const resValue = this.selectVal.split('+')[0] const resValue = this.selectVal
this.$emit('input', resValue) this.$emit('input', resValue)
this.saveExtWorkUnit(resValue) this.setParams(resValue, this.scope.row)
} }
}, },
saveExtWorkUnit(resValue) { setParams(extWorkUnitId, currentRow) {
if (!resValue) return this.$utils.showMessageWarning('请选择库位') if (currentRow.inventoryJobResponses && currentRow.inventoryJobResponses.length) {
const params = { const targetInventory = this.$utils.getTargetJobResponses(currentRow, 'JobResponseInEntry')
id: this.scope.row.id, if (!targetInventory) return this.$utils.showMessageWarning('该数据下不存在入库确认响应!')
operator: 'MODIFY', if (!extWorkUnitId.split('+')[0]) return this.$utils.showMessageWarning('请选择库位')
extWorkUnitId: resValue, const params = {
extWorkUnitIdType: 'ExtDxProductWorkUnit' id: targetInventory.id,
operator: 'MODIFY',
extWorkUnitId: extWorkUnitId.split('+')[0],
extWorkUnitIdType: 'ExtDxProductWorkUnit'
}
this.saveWorkUnit(params)
if (currentRow.children && currentRow.children.length) {
currentRow.children.map(child => {
this.setParams(extWorkUnitId, child)
})
}
} }
},
saveWorkUnit(params) {
this.$api.recursion('JobResponseInStorage', params).then(res => { this.$api.recursion('JobResponseInStorage', params).then(res => {
this.$utils.showMessageSuccess('保存成功')
this.$bus.$emit('reloadModuleList') this.$bus.$emit('reloadModuleList')
}) })
} }
......
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