|
|
|
@ -4,8 +4,9 @@ |
|
|
|
<!-- 顶部操作区域 --> |
|
|
|
<div style="margin-bottom: 10px;"> |
|
|
|
<el-button type="primary" @click="loadCurrentCount" :loading="headerLoading">刷 新</el-button> |
|
|
|
<el-button type="success" @click="handleRelease" v-if="headerData && headerData.status === 'DRAFT'" :disabled="headerLoading">下 达</el-button> |
|
|
|
<el-button type="warning" @click="handlePush" v-if="headerData && headerData.status === 'RELEASED'" :disabled="headerLoading">推 送</el-button> |
|
|
|
<!-- 循环盘点停用时隐藏历史循环单的下达和推送,保留手工盘点及历史收尾入口。- rqrq --> |
|
|
|
<el-button type="success" @click="handleRelease" v-if="countActionsEnabled && headerData.status === 'DRAFT'" :disabled="headerLoading">下 达</el-button> |
|
|
|
<el-button type="warning" @click="handlePush" v-if="countActionsEnabled && headerData.status === 'RELEASED'" :disabled="headerLoading">推 送</el-button> |
|
|
|
<!-- 审批按钮 - 盘点中状态显示 - rqrq --> |
|
|
|
<el-button type="warning" @click="handleApprove" v-if="headerData && headerData.status === 'CHECKING'" :disabled="headerLoading">审 批</el-button> |
|
|
|
<!-- 完成按钮 - 已审批状态显示 - rqrq --> |
|
|
|
@ -24,7 +25,7 @@ |
|
|
|
<!-- v-if="headerData && headerData.status === 'APPROVED'"--> |
|
|
|
<!-- :disabled="headerLoading || autoAdjustLoading">{{ autoAdjustLoading ? '处理中...' : '自动处理盈亏' }}</el-button>--> |
|
|
|
<!-- 继续盘点按钮 - 盘点中状态显示,手工触发继续下达任务 - rqrq --> |
|
|
|
<el-button type="info" @click="handleContinuePush" v-if="headerData && headerData.status === 'CHECKING'" :disabled="headerLoading || continuePushLoading">{{ continuePushLoading ? '推送中...' : '手工继续推送' }}</el-button> |
|
|
|
<el-button type="info" @click="handleContinuePush" v-if="countActionsEnabled && headerData.status === 'CHECKING'" :disabled="headerLoading || continuePushLoading">{{ continuePushLoading ? '推送中...' : '手工继续推送' }}</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
@ -32,7 +33,8 @@ |
|
|
|
<div class="header-info" v-loading="headerLoading"> |
|
|
|
<el-form label-position="top" :inline="true" v-if="headerData"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="4"> |
|
|
|
<!-- 隐藏循环比例时扩展单号宽度,恢复开关后还原原有六列布局。- rqrq --> |
|
|
|
<el-col :span="cycleCountEnabled ? 4 : 8"> |
|
|
|
<el-form-item label="盘点单号"> |
|
|
|
<el-input v-model="headerData.countNo" readonly style="width: 100%;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -47,7 +49,7 @@ |
|
|
|
<el-input v-model="headerData.statusDesc" readonly :style="{width: '100%', color: getStatusColor(headerData.status)}"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col v-if="cycleCountEnabled" :span="4"> |
|
|
|
<el-form-item label="循环比例"> |
|
|
|
<el-input :value="headerData.countPercent ? headerData.countPercent + '%' : '-'" readonly style="width: 100%;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -416,7 +418,8 @@ |
|
|
|
<span style="margin-left: 20px;">复核类型:</span> |
|
|
|
<el-radio-group v-model="reviewType"> |
|
|
|
<el-radio label="MANUAL">人工复核</el-radio> |
|
|
|
<el-radio label="CYCLE">循环复核</el-radio> |
|
|
|
<!-- 仅隐藏循环选项;默认值和实际提交参数同步切到人工复核,防止隐式提交CYCLE。- rqrq --> |
|
|
|
<el-radio v-if="cycleCountEnabled" label="CYCLE">循环复核</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -485,11 +488,14 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import {scanAndCallPalletForPandian, getCountHeaderByNo, getCurrentActiveCount, releaseCount, pushCountToWcs, continuePushCount, approveCount, completeCount, cancelCount, searchCountLabelList, searchCountPalletList, searchCountResultList, searchMaterialSummary, searchOrderTaskByCountNo, searchOrderTaskDetail, hasUncompletedTask, createReviewTask, searchUnhandledExceptionList, saveExceptionHandle, checkSystemHandleCount, executeSystemAdjustment, queryAdjustmentTransList, queryAdjustmentTransSubList, manualHandleCount} from '@/api/haianWarehouse/check/physicalInventory' |
|
|
|
import { HAIAN_CYCLE_COUNT_ENABLED } from './haianCountFeature' // 海安循环盘点统一恢复开关。- rqrq |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'currentPhysicalInventory54', |
|
|
|
data() { |
|
|
|
return { |
|
|
|
// 与盘点查询页共用开关,恢复说明见同目录CYCLE_COUNT_RESTORE.md。- rqrq |
|
|
|
cycleCountEnabled: HAIAN_CYCLE_COUNT_ENABLED, |
|
|
|
// Header信息 - rqrq |
|
|
|
headerData: null, |
|
|
|
headerLoading: false, |
|
|
|
@ -602,7 +608,8 @@ export default { |
|
|
|
reviewResultList: [], // 全部盘点结果 |
|
|
|
filteredReviewResultList: [], // 过滤后的盘点结果 |
|
|
|
onlyShowAbnormal: true, // 只看异常,默认勾选 |
|
|
|
reviewType: 'CYCLE', // 复核类型:MANUAL=人工复核,CYCLE=循环复核 |
|
|
|
// 停用时初始化为人工复核,恢复开关后保留原循环默认值。- rqrq |
|
|
|
reviewType: HAIAN_CYCLE_COUNT_ENABLED ? 'CYCLE' : 'MANUAL', |
|
|
|
selectedReviewLabels: [], // 选中的复核标签 |
|
|
|
|
|
|
|
// 处理异常弹框相关 - rqrq |
|
|
|
@ -635,6 +642,12 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
// 仅阻止历史循环单继续下达、推送,空单返回false;人工复核与收尾操作独立保留。- rqrq |
|
|
|
countActionsEnabled () { |
|
|
|
return !!this.headerData && (this.cycleCountEnabled || this.headerData.countType !== 'CYCLE') |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
// 计算表格高度 - rqrq |
|
|
|
this.$nextTick(() => { |
|
|
|
@ -980,7 +993,8 @@ export default { |
|
|
|
|
|
|
|
// 下达盘点单 - rqrq |
|
|
|
handleRelease() { |
|
|
|
if (!this.headerData) return |
|
|
|
// 与按钮可见性统一,停用期间历史循环单事件不再下达。- rqrq |
|
|
|
if (!this.countActionsEnabled) return |
|
|
|
this.$confirm('确认下达盘点单 ' + this.headerData.countNo + '?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
@ -1006,7 +1020,8 @@ export default { |
|
|
|
|
|
|
|
// 推送盘点单到WCS - rqrq |
|
|
|
handlePush() { |
|
|
|
if (!this.headerData) return |
|
|
|
// 与按钮可见性统一,停用期间历史循环单事件不再推送。- rqrq |
|
|
|
if (!this.countActionsEnabled) return |
|
|
|
this.$confirm('确认推送盘点单 ' + this.headerData.countNo + ' 到WCS?将开始出库前10个栈板。', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
@ -1032,7 +1047,8 @@ export default { |
|
|
|
|
|
|
|
// 继续推送(手工触发继续下达任务,防止自动推送异常中断)- rqrq |
|
|
|
handleContinuePush() { |
|
|
|
if (!this.headerData) return |
|
|
|
// 手工盘点保留继续推送;循环单必须恢复开关后才能执行。- rqrq |
|
|
|
if (!this.countActionsEnabled) return |
|
|
|
this.$confirm('确认继续推送盘点单 ' + this.headerData.countNo + ' 的后续栈板到WCS?\n\n注:如果存在未完成的任务单,将无法继续推送。', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
@ -1209,8 +1225,8 @@ export default { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.reviewResultList = data.rows || [] |
|
|
|
this.filterReviewResult() |
|
|
|
// 根据单据的盘点类型设置复核类型默认值:人工盘点->人工复核,循环盘点->循环复核 - rqrq |
|
|
|
if (this.headerData.countType === 'MANUAL') { |
|
|
|
// 停用期间所有单据只允许人工复核;启用后按原单据类型恢复默认选择。- rqrq |
|
|
|
if (!this.cycleCountEnabled || this.headerData.countType === 'MANUAL') { |
|
|
|
this.reviewType = 'MANUAL' |
|
|
|
} else if (this.headerData.countType === 'CYCLE') { |
|
|
|
this.reviewType = 'CYCLE' |
|
|
|
@ -1259,7 +1275,8 @@ export default { |
|
|
|
const params = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
countNo: this.headerData.countNo, |
|
|
|
reviewType: this.reviewType, |
|
|
|
// 提交时再次按开关收敛,防止残留CYCLE状态在隐藏选项后仍发给后台。- rqrq |
|
|
|
reviewType: this.cycleCountEnabled ? this.reviewType : 'MANUAL', |
|
|
|
palletIds: palletIds, |
|
|
|
username: this.$store.state.user.name |
|
|
|
} |
|
|
|
@ -1515,4 +1532,3 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
|