Commit f05ed725 authored by jingnan's avatar jingnan 👀

库房bug修改

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