Browse Source

feat(check): 新增盘点审批流程及差异展示功能

- 新增审批按钮,支持盘点中状态进入审批状态
- 修改完成按钮逻辑,仅在已审批状态可用
- 更新取消按钮状态控制,已审批状态下不可取消
- 调整复核按钮显示条件,已审批状态不显示
- 新增盘点结果差异页签,展示非OK结果数据
- 物料汇总页签位置调整并优化列配置
- 新增差异数量和处理标识的颜色区分显示
- 增加盘点结果颜色映射,支持QTY_DIFF类型
- 复核弹窗根据盘点类型默认选择复核方式
- 新增审批接口调用及状态转换逻辑
- 更新状态颜色标识,已审批状态使用蓝色显示
master
常熟吴彦祖 3 weeks ago
parent
commit
db97f18e78
  1. 5
      src/api/check/physicalInventory.js
  2. 124
      src/views/modules/check/currentPhysicalInventory.vue
  3. 78
      src/views/modules/check/searchPhysicalInventory.vue

5
src/api/check/physicalInventory.js

@ -32,7 +32,10 @@ export const pushCountToWcs = data => createAPI(`/check/physicalInventory/pushCo
// 继续推送盘点单到WCS(推后续10个栈板,由其他交互调用)- rqrq
export const continuePushCount = data => createAPI(`/check/physicalInventory/continuePushCount`, 'post', data)
// 完成盘点单
// 审批盘点单(盘点中 -> 已审批)- rqrq
export const approveCount = data => createAPI(`/check/physicalInventory/approveCount`, 'post', data)
// 完成盘点单(已审批 -> 已完成)
export const completeCount = data => createAPI(`/check/physicalInventory/completeCount`, 'post', data)
// 取消盘点单

124
src/views/modules/check/currentPhysicalInventory.vue

@ -7,9 +7,12 @@
<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>
<!-- <el-button type="info" @click="handleContinuePush" v-if="headerData && headerData.status === 'CHECKING'" :disabled="headerLoading">继续推送</el-button> 自动触发-->
<el-button type="success" @click="handleComplete" v-if="headerData && headerData.status === 'CHECKING'" :disabled="headerLoading"> </el-button>
<el-button type="danger" @click="handleCancel" v-if="headerData && headerData.status !== 'COMPLETED' && headerData.status !== 'CANCELLED'" :disabled="headerLoading"> </el-button>
<!-- 复核按钮 - 当栈板盘点进度满了后显示 - rqrq -->
<!-- 审批按钮 - 盘点中状态显示 - rqrq -->
<el-button type="warning" @click="handleApprove" v-if="headerData && headerData.status === 'CHECKING'" :disabled="headerLoading"> </el-button>
<!-- 完成按钮 - 已审批状态显示 - rqrq -->
<el-button type="success" @click="handleComplete" v-if="headerData && headerData.status === 'APPROVED'" :disabled="headerLoading"> </el-button>
<el-button type="danger" @click="handleCancel" v-if="headerData && headerData.status !== 'COMPLETED' && headerData.status !== 'CANCELLED' && headerData.status !== 'APPROVED'" :disabled="headerLoading"> </el-button>
<!-- 复核按钮 - 盘点中状态且栈板盘点进度满了后显示已审批状态不显示- rqrq -->
<el-button type="primary" @click="openReviewDialog"
v-if="headerData && headerData.status === 'CHECKING' && headerData.checkedPalletCount >= headerData.totalPalletCount && headerData.totalPalletCount > 0"
:disabled="headerLoading || reviewLoading"> </el-button>
@ -104,6 +107,25 @@
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="物料汇总" name="summary">
<!-- 物料汇总表格 - rqrq -->
<el-table :data="summaryList" :height="height" border v-loading="summaryListLoading" style="width: 100%;">
<el-table-column
v-for="(item,index) in summaryColumnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span>{{ scope.row[item.columnProp] }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="栈板明细" name="pallet">
<!-- 栈板明细表格 - rqrq -->
<el-table :data="palletList" :height="height" border v-loading="palletListLoading" style="width: 100%;">
@ -140,17 +162,19 @@
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="item.columnProp === 'countResultDesc'" :style="{color: getResultColor(scope.row.countResult)}">{{ scope.row.countResultDesc }}</span>
<span v-else-if="item.columnProp === 'diffQty'" :style="{color: scope.row.diffQty != 0 ? '#F56C6C' : '#67C23A'}">{{ scope.row.diffQty }}</span>
<span v-else-if="item.columnProp === 'handleFlagDesc'" :style="{color: scope.row.handleFlag === 'Y' ? '#67C23A' : '#F56C6C'}">{{ scope.row.handleFlagDesc }}</span>
<span v-else-if="item.columnProp === 'countDate'">{{ formatDateTime(scope.row.countDate) }}</span>
<span v-else>{{ scope.row[item.columnProp] }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="物料汇总" name="summary">
<!-- 物料汇总表格 - rqrq -->
<el-table :data="summaryList" :height="height" border v-loading="summaryListLoading" style="width: 100%;">
<!-- 盘点结果差异页签 - rqrq -->
<el-tab-pane label="盘点结果差异" name="resultDiff">
<el-table :data="resultDiffList" :height="height" border v-loading="resultDiffListLoading" style="width: 100%;">
<el-table-column
v-for="(item,index) in summaryColumnList" :key="index"
v-for="(item,index) in resultColumnList2" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
@ -160,7 +184,11 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span>{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnProp === 'countResultDesc'" :style="{color: getResultColor(scope.row.countResult)}">{{ scope.row.countResultDesc }}</span>
<span v-else-if="item.columnProp === 'diffQty'" :style="{color: scope.row.diffQty != 0 ? '#F56C6C' : '#67C23A'}">{{ scope.row.diffQty }}</span>
<span v-else-if="item.columnProp === 'handleFlagDesc'" :style="{color: scope.row.handleFlag === 'Y' ? '#67C23A' : '#F56C6C'}">{{ scope.row.handleFlagDesc }}</span>
<span v-else-if="item.columnProp === 'countDate'">{{ formatDateTime(scope.row.countDate) }}</span>
<span v-else>{{ scope.row[item.columnProp] }}</span>
</template>
</el-table-column>
</el-table>
@ -243,7 +271,7 @@
</template>
<script>
import { getCurrentActiveCount, releaseCount, pushCountToWcs, continuePushCount, 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 } from '@/api/check/physicalInventory'
export default {
name: 'currentPhysicalInventory',
@ -262,6 +290,8 @@ export default {
palletListLoading: false,
resultList: [],
resultListLoading: false,
resultDiffList: [], // OK- rqrq
resultDiffListLoading: false,
summaryList: [],
summaryListLoading: false,
@ -303,14 +333,32 @@ export default {
{ columnProp: "partNo", headerAlign: "center", align: "center", columnLabel: "物料号", columnWidth: 120, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "partDesc", headerAlign: "center", align: "left", columnLabel: "物料描述", columnWidth: 180, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "qty", headerAlign: "center", align: "center", columnLabel: "数量", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "diffQty", headerAlign: "center", align: "center", columnLabel: "差异数量", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "batchNo", headerAlign: "center", align: "center", columnLabel: "批号", columnWidth: 100, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "palletId", headerAlign: "center", align: "center", columnLabel: "栈板号", columnWidth: 120, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "countResultDesc", headerAlign: "center", align: "center", columnLabel: "盘点结果", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
// { columnProp: "handleFlagDesc", headerAlign: "center", align: "center", columnLabel: "", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "handleTypeDesc", headerAlign: "center", align: "center", columnLabel: "处理方式", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "countUser", headerAlign: "center", align: "center", columnLabel: "盘点人", columnWidth: 100, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "countDate", headerAlign: "center", align: "center", columnLabel: "盘点时间", columnWidth: 140, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "remark", headerAlign: "center", align: "left", columnLabel: "备注", columnWidth: 150, columnSortable: false, showOverflowTooltip: true, fixed: "" }
{ columnProp: "remark", headerAlign: "center", align: "left", columnLabel: "备注", columnWidth: 300, columnSortable: false, showOverflowTooltip: true, fixed: "" }
],
// - rqrq
resultColumnList2: [
{ columnProp: "unitId", headerAlign: "center", align: "center", columnLabel: "标签号", columnWidth: 150, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "partNo", headerAlign: "center", align: "center", columnLabel: "物料号", columnWidth: 120, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "partDesc", headerAlign: "center", align: "left", columnLabel: "物料描述", columnWidth: 180, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "qty", headerAlign: "center", align: "center", columnLabel: "数量", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "diffQty", headerAlign: "center", align: "center", columnLabel: "差异数量", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "batchNo", headerAlign: "center", align: "center", columnLabel: "批号", columnWidth: 100, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "palletId", headerAlign: "center", align: "center", columnLabel: "栈板号", columnWidth: 120, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "countResultDesc", headerAlign: "center", align: "center", columnLabel: "盘点结果", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "handleFlagDesc", headerAlign: "center", align: "center", columnLabel: "是否处理", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "handleTypeDesc", headerAlign: "center", align: "center", columnLabel: "处理方式", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "countUser", headerAlign: "center", align: "center", columnLabel: "盘点人", columnWidth: 100, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "countDate", headerAlign: "center", align: "center", columnLabel: "盘点时间", columnWidth: 140, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "remark", headerAlign: "center", align: "left", columnLabel: "备注", columnWidth: 300, columnSortable: false, showOverflowTooltip: true, fixed: "" }
],
// - rqrq
summaryColumnList: [
{ columnProp: "partNo", headerAlign: "center", align: "center", columnLabel: "物料号", columnWidth: 120, columnSortable: false, showOverflowTooltip: true, fixed: "" },
@ -367,6 +415,7 @@ export default {
this.labelList = []
this.palletList = []
this.resultList = []
this.resultDiffList = []
this.summaryList = []
}
} else {
@ -398,6 +447,8 @@ export default {
this.loadPalletList(params)
} else if (this.activeName === 'result') {
this.loadResultList(params)
} else if (this.activeName === 'resultDiff') {
this.loadResultDiffList(params)
} else if (this.activeName === 'summary') {
this.loadSummaryList(params)
} else if (this.activeName === 'task') {
@ -441,6 +492,19 @@ export default {
})
},
// OK- rqrq
loadResultDiffList(params) {
this.resultDiffListLoading = true
searchCountResultList(params).then(({ data }) => {
if (data && data.code === 0) {
// OK - rqrq
this.resultDiffList = (data.rows || []).filter(item => item.countResult !== 'OK')
}
}).finally(() => {
this.resultDiffListLoading = false
})
},
// - rqrq
loadSummaryList(params) {
this.summaryListLoading = true
@ -577,7 +641,33 @@ export default {
}).catch(() => {})
},
// - rqrq
// -> - rqrq
handleApprove() {
if (!this.headerData) return
this.$confirm('审批后将进入异常处理阶段,无法再创建复核任务。确认审批盘点单 ' + this.headerData.countNo + '?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const params = {
site: this.$store.state.user.site,
countNo: this.headerData.countNo,
username: this.$store.state.user.name
}
approveCount(params).then(({ data }) => {
if (data && data.code === 0) {
this.$message.success('审批成功')
this.loadCurrentCount()
} else {
this.$alert(data.msg || '审批失败', '提示', { type: 'error' })
}
}).catch(() => {
this.$message.error('网络错误')
})
}).catch(() => {})
},
// -> - rqrq
handleComplete() {
if (!this.headerData) return
this.$confirm('确认完成盘点单 ' + this.headerData.countNo + '?', '提示', {
@ -647,6 +737,7 @@ export default {
'DRAFT': '#909399',
'RELEASED': '#409EFF',
'CHECKING': '#E6A23C',
'APPROVED': '#409EFF', // - - rqrq
'COMPLETED': '#67C23A',
'CANCELLED': '#F56C6C'
}
@ -658,7 +749,8 @@ export default {
const colorMap = {
'OK': '#67C23A',
'MISSING': '#F56C6C',
'SURPLUS': '#E6A23C'
'SURPLUS': '#E6A23C',
'QTY_DIFF': '#F56C6C'
}
return colorMap[result] || '#909399'
},
@ -698,6 +790,12 @@ export default {
if (data && data.code === 0) {
this.reviewResultList = data.rows || []
this.filterReviewResult()
// ->-> - rqrq
if (this.headerData.countType === 'MANUAL') {
this.reviewType = 'MANUAL'
} else if (this.headerData.countType === 'CYCLE') {
this.reviewType = 'CYCLE'
}
this.reviewDialogVisible = true
} else {
this.$message.error('加载盘点结果失败')

78
src/views/modules/check/searchPhysicalInventory.vue

@ -96,6 +96,25 @@
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="物料汇总" name="summary">
<!-- 物料汇总表格 - rqrq -->
<el-table :data="summaryList" :height="height" border v-loading="summaryListLoading" style="width: 100%;">
<el-table-column
v-for="(item,index) in summaryColumnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span>{{ scope.row[item.columnProp] }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="栈板明细" name="pallet">
<!-- 栈板明细表格 - rqrq -->
<el-table :data="palletList" :height="height" border v-loading="palletListLoading" style="width: 100%;">
@ -132,17 +151,19 @@
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="item.columnProp === 'countResultDesc'" :style="{color: getResultColor(scope.row.countResult)}">{{ scope.row.countResultDesc }}</span>
<span v-else-if="item.columnProp === 'diffQty'" :style="{color: scope.row.diffQty != 0 ? '#F56C6C' : '#67C23A'}">{{ scope.row.diffQty }}</span>
<span v-else-if="item.columnProp === 'handleFlagDesc'" :style="{color: scope.row.handleFlag === 'Y' ? '#67C23A' : '#F56C6C'}">{{ scope.row.handleFlagDesc }}</span>
<span v-else-if="item.columnProp === 'countDate'">{{ formatDateTime(scope.row.countDate) }}</span>
<span v-else>{{ scope.row[item.columnProp] }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="物料汇总" name="summary">
<!-- 物料汇总表格 - rqrq -->
<el-table :data="summaryList" :height="height" border v-loading="summaryListLoading" style="width: 100%;">
<!-- 盘点结果差异页签 - rqrq -->
<el-tab-pane label="盘点结果差异" name="resultDiff">
<el-table :data="resultDiffList" :height="height" border v-loading="resultDiffListLoading" style="width: 100%;">
<el-table-column
v-for="(item,index) in summaryColumnList" :key="index"
v-for="(item,index) in resultColumnList2" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
@ -152,7 +173,11 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span>{{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnProp === 'countResultDesc'" :style="{color: getResultColor(scope.row.countResult)}">{{ scope.row.countResultDesc }}</span>
<span v-else-if="item.columnProp === 'diffQty'" :style="{color: scope.row.diffQty != 0 ? '#F56C6C' : '#67C23A'}">{{ scope.row.diffQty }}</span>
<span v-else-if="item.columnProp === 'handleFlagDesc'" :style="{color: scope.row.handleFlag === 'Y' ? '#67C23A' : '#F56C6C'}">{{ scope.row.handleFlagDesc }}</span>
<span v-else-if="item.columnProp === 'countDate'">{{ formatDateTime(scope.row.countDate) }}</span>
<span v-else>{{ scope.row[item.columnProp] }}</span>
</template>
</el-table-column>
</el-table>
@ -330,6 +355,8 @@ export default {
palletListLoading: false,
resultList: [],
resultListLoading: false,
resultDiffList: [], // OK- rqrq
resultDiffListLoading: false,
summaryList: [],
summaryListLoading: false,
@ -371,14 +398,32 @@ export default {
{ columnProp: "partNo", headerAlign: "center", align: "center", columnLabel: "物料号", columnWidth: 120, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "partDesc", headerAlign: "center", align: "left", columnLabel: "物料描述", columnWidth: 180, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "qty", headerAlign: "center", align: "center", columnLabel: "数量", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "diffQty", headerAlign: "center", align: "center", columnLabel: "差异数量", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "batchNo", headerAlign: "center", align: "center", columnLabel: "批号", columnWidth: 100, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "palletId", headerAlign: "center", align: "center", columnLabel: "栈板号", columnWidth: 120, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "countResultDesc", headerAlign: "center", align: "center", columnLabel: "盘点结果", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
// { columnProp: "handleFlagDesc", headerAlign: "center", align: "center", columnLabel: "", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "handleTypeDesc", headerAlign: "center", align: "center", columnLabel: "处理方式", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "countUser", headerAlign: "center", align: "center", columnLabel: "盘点人", columnWidth: 100, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "countDate", headerAlign: "center", align: "center", columnLabel: "盘点时间", columnWidth: 140, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "remark", headerAlign: "center", align: "left", columnLabel: "备注", columnWidth: 150, columnSortable: false, showOverflowTooltip: true, fixed: "" }
{ columnProp: "remark", headerAlign: "center", align: "left", columnLabel: "备注", columnWidth: 300, columnSortable: false, showOverflowTooltip: true, fixed: "" }
],
// - rqrq
resultColumnList2: [
{ columnProp: "unitId", headerAlign: "center", align: "center", columnLabel: "标签号", columnWidth: 150, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "partNo", headerAlign: "center", align: "center", columnLabel: "物料号", columnWidth: 120, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "partDesc", headerAlign: "center", align: "left", columnLabel: "物料描述", columnWidth: 180, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "qty", headerAlign: "center", align: "center", columnLabel: "数量", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "diffQty", headerAlign: "center", align: "center", columnLabel: "差异数量", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "batchNo", headerAlign: "center", align: "center", columnLabel: "批号", columnWidth: 100, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "palletId", headerAlign: "center", align: "center", columnLabel: "栈板号", columnWidth: 120, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "countResultDesc", headerAlign: "center", align: "center", columnLabel: "盘点结果", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "handleFlagDesc", headerAlign: "center", align: "center", columnLabel: "是否处理", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "handleTypeDesc", headerAlign: "center", align: "center", columnLabel: "处理方式", columnWidth: 80, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "countUser", headerAlign: "center", align: "center", columnLabel: "盘点人", columnWidth: 100, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "countDate", headerAlign: "center", align: "center", columnLabel: "盘点时间", columnWidth: 140, columnSortable: false, showOverflowTooltip: true, fixed: "" },
{ columnProp: "remark", headerAlign: "center", align: "left", columnLabel: "备注", columnWidth: 300, columnSortable: false, showOverflowTooltip: true, fixed: "" }
],
// - rqrq
summaryColumnList: [
{ columnProp: "partNo", headerAlign: "center", align: "center", columnLabel: "物料号", columnWidth: 120, columnSortable: false, showOverflowTooltip: true, fixed: "" },
@ -503,6 +548,7 @@ export default {
this.labelList = []
this.palletList = []
this.resultList = []
this.resultDiffList = []
this.summaryList = []
}
} else {
@ -540,6 +586,8 @@ export default {
this.loadPalletList(params)
} else if (this.activeName === 'result') {
this.loadResultList(params)
} else if (this.activeName === 'resultDiff') {
this.loadResultDiffList(params)
} else if (this.activeName === 'summary') {
this.loadSummaryList(params)
} else if (this.activeName === 'task') {
@ -583,6 +631,19 @@ export default {
})
},
// OK- rqrq
loadResultDiffList(params) {
this.resultDiffListLoading = true
searchCountResultList(params).then(({ data }) => {
if (data && data.code === 0) {
// OK - rqrq
this.resultDiffList = (data.rows || []).filter(item => item.countResult !== 'OK')
}
}).finally(() => {
this.resultDiffListLoading = false
})
},
// - rqrq
loadSummaryList(params) {
this.summaryListLoading = true
@ -970,7 +1031,8 @@ export default {
const colorMap = {
'OK': '#67C23A',
'MISSING': '#F56C6C',
'SURPLUS': '#E6A23C'
'SURPLUS': '#E6A23C',
'QTY_DIFF': '#F56C6C'
}
return colorMap[result] || '#909399'
}

Loading…
Cancel
Save