|
|
|
@ -253,12 +253,12 @@ |
|
|
|
<!-- 盘盈盘亏记录页签 - rqrq --> |
|
|
|
<el-tab-pane label="盘盈盘亏记录" name="adjustment"> |
|
|
|
<div style="display: flex; gap: 10px;"> |
|
|
|
<!-- 左边:事务明细 - rqrq --> |
|
|
|
<!-- 左边:盘盈盘亏明细 - rqrq --> |
|
|
|
<div style="flex: 1;"> |
|
|
|
<div style="font-weight: bold; margin-bottom: 5px; font-size: 12px;">事务明细</div> |
|
|
|
<div style="font-weight: bold; margin-bottom: 5px; font-size: 12px;">盘盈盘亏明细</div> |
|
|
|
<el-table :data="adjustmentTransList" :height="height" border v-loading="adjustmentTransLoading" |
|
|
|
highlight-current-row @row-click="onAdjustmentTransRowClick" style="width: 100%;"> |
|
|
|
<el-table-column prop="transNo" label="事务号" min-width="120" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="transNo" label="单据号" min-width="120" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="transTypeDesc" label="事务类型" min-width="80" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span :style="{color: scope.row.transTypeDb === 'PY' ? '#67C23A' : '#F56C6C'}">{{ scope.row.transTypeDesc }}</span> |
|
|
|
@ -266,32 +266,31 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="itemNo" label="行号" min-width="60" 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="transQty" label="事务数量" min-width="100" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="transQty" label="数量" min-width="100" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="batchNo" label="批号" min-width="100" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="locationId" label="库位" min-width="100" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="directionDesc" label="方向" min-width="60" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span :style="{color: scope.row.direction === 'IN' ? '#67C23A' : '#F56C6C'}">{{ scope.row.directionDesc }}</span> |
|
|
|
<span :style="{color: scope.row.direction === '+' ? '#67C23A' : '#F56C6C'}">{{ scope.row.directionDesc }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="warehouseId" label="仓库" min-width="80" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="userName" label="操作人" min-width="80" header-align="center" align="center"></el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<!-- 右边:事务子明细 - rqrq --> |
|
|
|
<!-- 右边:标签明细 - rqrq --> |
|
|
|
<div style="flex: 1;"> |
|
|
|
<div style="font-weight: bold; margin-bottom: 5px; font-size: 12px;">事务子明细</div> |
|
|
|
<div style="font-weight: bold; margin-bottom: 5px; font-size: 12px;">标签明细</div> |
|
|
|
<el-table :data="adjustmentTransSubList" :height="height" border v-loading="adjustmentTransSubLoading" style="width: 100%;"> |
|
|
|
<el-table-column prop="subNo" label="子行号" min-width="60" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="handlingUnitId" label="标签号" min-width="150" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="subQty" label="子数量" min-width="80" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="subNo" label="标签号" min-width="150" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="subQty" label="数量" min-width="80" 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="batchNo" label="批号" min-width="100" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="locationId" label="库位" min-width="100" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="palletId" label="栈板号" min-width="120" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="directionDesc" label="方向" min-width="60" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span :style="{color: scope.row.direction === 'IN' ? '#67C23A' : '#F56C6C'}">{{ scope.row.directionDesc }}</span> |
|
|
|
<span :style="{color: scope.row.direction === '+' ? '#67C23A' : '#F56C6C'}">{{ scope.row.directionDesc }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -500,14 +499,14 @@ export default { |
|
|
|
handleExceptionLoading: false, |
|
|
|
saveExceptionLoading: false, |
|
|
|
exceptionResultList: [], // 异常盘点结果列表 |
|
|
|
|
|
|
|
|
|
|
|
// 自动盘盈盘亏处理 - rqrq |
|
|
|
autoAdjustLoading: false, |
|
|
|
|
|
|
|
|
|
|
|
// 盘盈盘亏记录相关 - rqrq |
|
|
|
adjustmentTransList: [], // 事务明细列表 |
|
|
|
adjustmentTransList: [], // 盘盈盘亏明细列表 |
|
|
|
adjustmentTransLoading: false, |
|
|
|
adjustmentTransSubList: [], // 事务子明细列表 |
|
|
|
adjustmentTransSubList: [], // 标签明细列表 |
|
|
|
adjustmentTransSubLoading: false, |
|
|
|
currentAdjustmentTrans: null // 当前选中的事务 |
|
|
|
} |
|
|
|
@ -685,7 +684,7 @@ export default { |
|
|
|
this.taskDetailListLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 加载盘盈盘亏事务记录 - rqrq |
|
|
|
loadAdjustmentTransList(params) { |
|
|
|
this.adjustmentTransLoading = true |
|
|
|
@ -705,14 +704,14 @@ export default { |
|
|
|
this.adjustmentTransLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 盘盈盘亏事务行点击 - rqrq |
|
|
|
onAdjustmentTransRowClick(row) { |
|
|
|
this.currentAdjustmentTrans = row |
|
|
|
this.loadAdjustmentTransSubList() |
|
|
|
}, |
|
|
|
|
|
|
|
// 加载盘盈盘亏事务子明细 - rqrq |
|
|
|
|
|
|
|
// 加载盘盈盘亏标签明细 - rqrq |
|
|
|
loadAdjustmentTransSubList() { |
|
|
|
if (!this.currentAdjustmentTrans) { |
|
|
|
this.adjustmentTransSubList = [] |
|
|
|
@ -1152,9 +1151,9 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// ==================== 自动盘盈盘亏处理 ==================== - rqrq |
|
|
|
|
|
|
|
|
|
|
|
// 自动处理盈亏 - rqrq |
|
|
|
handleAutoAdjustment() { |
|
|
|
// 1. 先检查是否有需要系统处理的记录 - rqrq |
|
|
|
@ -1162,7 +1161,7 @@ export default { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
countNo: this.headerData.countNo |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
checkSystemHandleCount(checkParams).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
const count = data.count || 0 |
|
|
|
@ -1170,9 +1169,9 @@ export default { |
|
|
|
this.$alert('无异常结果需要系统处理', '提示', { confirmButtonText: '确定' }) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 2. 有记录则弹框确认 - rqrq |
|
|
|
this.$confirm(`检测到${count}条异常结果需要系统处理,确定执行自动盘盈盘亏处理?\n\n处理后将:\n1. 生成盘盈/盘亏事务单据\n2. 更新库存数据\n3. 调整标签数量`, '确认自动处理', { |
|
|
|
this.$confirm(`检测到${count}条异常结果需要系统处理,确定执行自动盘盈盘亏处理?`, '确认自动处理', { |
|
|
|
confirmButtonText: '确定执行', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
@ -1186,17 +1185,17 @@ export default { |
|
|
|
this.$alert('网络错误', '错误', { confirmButtonText: '确定' }) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 执行自动盘盈盘亏处理 - rqrq |
|
|
|
executeAutoAdjustment() { |
|
|
|
this.autoAdjustLoading = true |
|
|
|
|
|
|
|
|
|
|
|
const params = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
countNo: this.headerData.countNo, |
|
|
|
username: this.$store.state.user.name |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
executeSystemAdjustment(params).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
const result = data.row |
|
|
|
@ -1209,11 +1208,11 @@ export default { |
|
|
|
if (result.profitTransNoList && result.profitTransNoList.length > 0) { |
|
|
|
msg += '\n盘盈单据:' + result.profitTransNoList.join(', ') |
|
|
|
} |
|
|
|
this.$alert(msg, '处理成功', { |
|
|
|
this.$alert(msg, '处理成功', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
type: 'success' |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 刷新页面数据 - rqrq |
|
|
|
this.loadCurrentCount() |
|
|
|
this.loadTabData() |
|
|
|
|