|
|
@@ -76,6 +76,7 @@
|
|
|
v-if="selectedDime == 2"
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
+ :disabled="hasUnreleasedBatch"
|
|
|
@click="handleUnlock"
|
|
|
>库存解锁</el-button
|
|
|
>
|
|
|
@@ -83,7 +84,7 @@
|
|
|
v-if="selectedDime == 2"
|
|
|
size="small"
|
|
|
icon="el-icon-s-operation"
|
|
|
- :disabled="checkRadioData.length !== 1"
|
|
|
+ :disabled="checkRadioData.length !== 1 || hasUnreleasedBatch"
|
|
|
@click="openBatchChange('split')"
|
|
|
>拆批申请</el-button
|
|
|
>
|
|
|
@@ -91,7 +92,7 @@
|
|
|
v-if="selectedDime == 2"
|
|
|
size="small"
|
|
|
icon="el-icon-connection"
|
|
|
- :disabled="checkRadioData.length < 2"
|
|
|
+ :disabled="checkRadioData.length < 2 || hasUnreleasedBatch"
|
|
|
@click="openBatchChange('merge')"
|
|
|
>合批申请</el-button
|
|
|
>
|
|
|
@@ -369,6 +370,11 @@
|
|
|
});
|
|
|
},
|
|
|
computed: {
|
|
|
+ hasUnreleasedBatch() {
|
|
|
+ return this.checkRadioData.some(
|
|
|
+ (row) => Number(row.preWarehousing) === 1
|
|
|
+ );
|
|
|
+ },
|
|
|
// 表格列配置
|
|
|
columns() {
|
|
|
// 当columnsVersion变化时会重新计算
|
|
|
@@ -418,6 +424,16 @@
|
|
|
formatter: (row) => row.systemBatchNo || '-'
|
|
|
}
|
|
|
: '',
|
|
|
+ this.selectedDime == 2
|
|
|
+ ? {
|
|
|
+ prop: 'preWarehousing',
|
|
|
+ label: '放行状态',
|
|
|
+ align: 'center',
|
|
|
+ width: 100,
|
|
|
+ formatter: (row) =>
|
|
|
+ Number(row.preWarehousing) === 1 ? '待放行' : '已放行'
|
|
|
+ }
|
|
|
+ : '',
|
|
|
{
|
|
|
prop: 'categoryCode',
|
|
|
label: '物品编码',
|
|
|
@@ -491,6 +507,7 @@
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
formatter: (row) => {
|
|
|
+ if (Number(row.preWarehousing) === 1) return 0;
|
|
|
// 入库计量数量不会随出库变化,可用数量必须使用当前批次库存余额计算
|
|
|
const inventoryBalance = Number(row.availableCountBase) || 0;
|
|
|
const lock = Number(row.lockQuantity) || 0;
|
|
|
@@ -765,6 +782,9 @@
|
|
|
if (this.checkRadioData?.length != 1) {
|
|
|
return this.$message.warning('请选择一条数据进行解锁!');
|
|
|
}
|
|
|
+ if (this.hasUnreleasedBatch) {
|
|
|
+ return this.$message.warning('待放行批次不能解锁');
|
|
|
+ }
|
|
|
this.$refs.unlockModalRef.open('add', this.checkRadioData[0]);
|
|
|
},
|
|
|
async openBatchChange(mode) {
|
|
|
@@ -772,6 +792,8 @@
|
|
|
return this.$message.warning('拆批请选择一条库存批次');
|
|
|
if (mode === 'merge' && this.checkRadioData.length < 2)
|
|
|
return this.$message.warning('合批请选择至少两条库存批次');
|
|
|
+ if (this.hasUnreleasedBatch)
|
|
|
+ return this.$message.warning('待放行批次不能拆批或合批');
|
|
|
if (
|
|
|
this.checkRadioData.some(
|
|
|
(row) =>
|
|
|
@@ -955,6 +977,7 @@
|
|
|
};
|
|
|
this.params = {
|
|
|
...params,
|
|
|
+ includePreWarehousing: true,
|
|
|
pageNum: page,
|
|
|
size: limit
|
|
|
};
|