|
|
|
@ -16,6 +16,10 @@ |
|
|
|
<el-button type="primary" @click="openReviewDialog" |
|
|
|
v-if="headerData && headerData.status === 'CHECKING' && headerData.checkedPalletCount >= headerData.totalPalletCount && headerData.totalPalletCount > 0" |
|
|
|
:disabled="headerLoading || reviewLoading">复 核</el-button> |
|
|
|
<!-- 处理异常按钮 - 已审批状态显示 - rqrq --> |
|
|
|
<el-button type="danger" @click="openHandleExceptionDialog" |
|
|
|
v-if="headerData && headerData.status === 'APPROVED'" |
|
|
|
:disabled="headerLoading || handleExceptionLoading">处理异常</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- Header信息展示区域 - 一行6个input框 --> |
|
|
|
@ -191,6 +195,17 @@ |
|
|
|
<span v-else>{{ scope.row[item.columnProp] }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="100" |
|
|
|
:label="'操作'"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" v-if="scope.row.handleFlag==='N'&&scope.row.handleType==='MANUAL'" @click="addOrUpdateHandle(scope.row.id)">{{'人工处理完成'}}</a> |
|
|
|
|
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> |
|
|
|
<!-- 任务单页签 - rqrq --> |
|
|
|
@ -267,11 +282,48 @@ |
|
|
|
<el-button @click="reviewDialogVisible = false" :disabled="reviewLoading">取消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 处理异常弹框 - rqrq --> |
|
|
|
<el-dialog title="处理异常" :visible.sync="handleExceptionDialogVisible" :close-on-click-modal="false" v-drag width="85%"> |
|
|
|
<div class="rq"> |
|
|
|
<el-table :data="exceptionResultList" height="400" border v-loading="handleExceptionLoading" > |
|
|
|
<el-table-column prop="unitId" label="标签号" min-width="150" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="partNo" label="物料号" min-width="120" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="partDesc" label="物料名称" min-width="180" header-align="center" align="left"></el-table-column> |
|
|
|
<el-table-column prop="diffQty" label="差异数量" min-width="80" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span :style="{color: scope.row.diffQty != 0 ? '#F56C6C' : '#67C23A'}">{{ scope.row.diffQty }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="countResultDesc" label="盘点结果" min-width="80" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span :style="{color: getResultColor(scope.row.countResult)}">{{ scope.row.countResultDesc }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="remark" label="备注" min-width="200" header-align="center" align="left" show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column label="处理方式" min-width="100" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.handleType" placeholder="请选择处理方式" size="small" style="width: 100%;height: 11px;padding: 0px"> |
|
|
|
<!-- 盘盈(SURPLUS)只能选择手工处理 - rqrq --> |
|
|
|
<el-option v-if="scope.row.countResult !== 'SURPLUS'" label="系统处理" value="SYSTEM"></el-option> |
|
|
|
<el-option label="手工处理" value="MANUAL"></el-option> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="saveExceptionHandle" :disabled="saveExceptionLoading"> |
|
|
|
{{ saveExceptionLoading ? '保存中...' : '保 存' }} |
|
|
|
</el-button> |
|
|
|
<el-button @click="handleExceptionDialogVisible = false" :disabled="saveExceptionLoading">取 消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getCurrentActiveCount, releaseCount, pushCountToWcs, continuePushCount, approveCount, completeCount, cancelCount, searchCountLabelList, searchCountPalletList, searchCountResultList, searchMaterialSummary, searchOrderTaskByCountNo, searchOrderTaskDetail, hasUncompletedTask, createReviewTask } from '@/api/check/physicalInventory' |
|
|
|
import { getCurrentActiveCount, releaseCount, pushCountToWcs, continuePushCount, approveCount, completeCount, cancelCount, searchCountLabelList, searchCountPalletList, searchCountResultList, searchMaterialSummary, searchOrderTaskByCountNo, searchOrderTaskDetail, hasUncompletedTask, createReviewTask, searchUnhandledExceptionList, saveExceptionHandle } from '@/api/check/physicalInventory' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'currentPhysicalInventory', |
|
|
|
@ -388,7 +440,13 @@ export default { |
|
|
|
filteredReviewResultList: [], // 过滤后的盘点结果 |
|
|
|
onlyShowAbnormal: true, // 只看异常,默认勾选 |
|
|
|
reviewType: 'CYCLE', // 复核类型:MANUAL=人工复核,CYCLE=循环复核 |
|
|
|
selectedReviewLabels: [] // 选中的复核标签 |
|
|
|
selectedReviewLabels: [], // 选中的复核标签 |
|
|
|
|
|
|
|
// 处理异常弹框相关 - rqrq |
|
|
|
handleExceptionDialogVisible: false, |
|
|
|
handleExceptionLoading: false, |
|
|
|
saveExceptionLoading: false, |
|
|
|
exceptionResultList: [] // 异常盘点结果列表 |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
@ -864,6 +922,81 @@ export default { |
|
|
|
this.reviewLoading = false |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 打开处理异常弹框 - rqrq |
|
|
|
openHandleExceptionDialog() { |
|
|
|
if (!this.headerData) return |
|
|
|
|
|
|
|
this.handleExceptionLoading = true |
|
|
|
const params = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
countNo: this.headerData.countNo |
|
|
|
} |
|
|
|
searchUnhandledExceptionList(params).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
// 给每条记录设置默认处理方式:盘盈默认手工处理,其他默认系统处理 - rqrq |
|
|
|
this.exceptionResultList = (data.rows || []).map(item => { |
|
|
|
return { |
|
|
|
...item, |
|
|
|
handleType: item.handleType!=null?item.handleType: item.countResult === 'SURPLUS' ? 'MANUAL' : 'SYSTEM' |
|
|
|
} |
|
|
|
}) |
|
|
|
if (this.exceptionResultList.length === 0) { |
|
|
|
this.$message.error('没有需要处理的异常结果') |
|
|
|
return |
|
|
|
} |
|
|
|
this.handleExceptionDialogVisible = true |
|
|
|
} else { |
|
|
|
this.$message.error('没有需要处理的异常结果') |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('没有需要处理的异常结果') |
|
|
|
}).finally(() => { |
|
|
|
this.handleExceptionLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 保存异常处理结果 - rqrq |
|
|
|
saveExceptionHandle() { |
|
|
|
// 检查是否所有记录都选择了处理方式 - rqrq |
|
|
|
const unhandledList = this.exceptionResultList.filter(item => !item.handleType) |
|
|
|
if (unhandledList.length > 0) { |
|
|
|
this.$message.warning('请为所有异常结果选择处理方式') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.saveExceptionLoading = true |
|
|
|
const params = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
countNo: this.headerData.countNo, |
|
|
|
username: this.$store.state.user.name, |
|
|
|
exceptionList: this.exceptionResultList.map(item => ({ |
|
|
|
id: item.id, |
|
|
|
unitId: item.unitId, |
|
|
|
palletId: item.palletId, |
|
|
|
handleType: item.handleType |
|
|
|
})) |
|
|
|
} |
|
|
|
saveExceptionHandle(params).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success('保存成功') |
|
|
|
this.handleExceptionDialogVisible = false |
|
|
|
// 刷新盘点结果差异页签 - rqrq |
|
|
|
if (this.activeName === 'resultDiff') { |
|
|
|
this.loadResultDiffList({ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
countNo: this.headerData.countNo |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$alert(data.msg || '保存失败', '提示', { type: 'error' }) |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('网络错误') |
|
|
|
}).finally(() => { |
|
|
|
this.saveExceptionLoading = false |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -895,5 +1028,8 @@ export default { |
|
|
|
/deep/ .el-table a:hover { |
|
|
|
text-decoration: underline; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
|