|
@@ -38,6 +38,10 @@
|
|
|
class="dict-table"
|
|
class="dict-table"
|
|
|
:key="tableKey"
|
|
:key="tableKey"
|
|
|
:cache-key="tableKey"
|
|
:cache-key="tableKey"
|
|
|
|
|
+ :row-style="rowStyle"
|
|
|
|
|
+ rowClickChecked
|
|
|
|
|
+ :rowClickCheckedIntelligent="false"
|
|
|
|
|
+ @update:selection="handleSelectionChange"
|
|
|
>
|
|
>
|
|
|
<template v-slot:code="{ row }">
|
|
<template v-slot:code="{ row }">
|
|
|
{{ row.rootCategoryLevelId == 4 ? row.codeNumber : row.code }}
|
|
{{ row.rootCategoryLevelId == 4 ? row.codeNumber : row.code }}
|
|
@@ -56,19 +60,17 @@
|
|
|
<span :style="{ color: row.status == 0 ? '#157A2C' : '#FFA929' }"
|
|
<span :style="{ color: row.status == 0 ? '#157A2C' : '#FFA929' }"
|
|
|
>状态{{
|
|
>状态{{
|
|
|
row.status == 0 ? '空闲' : row.status == 1 ? '占用' : ''
|
|
row.status == 0 ? '空闲' : row.status == 1 ? '占用' : ''
|
|
|
- }}</span>
|
|
|
|
|
|
|
+ }}</span
|
|
|
|
|
+ >
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template v-slot:packingCountBase="{ row }">
|
|
<template v-slot:packingCountBase="{ row }">
|
|
|
- {{ row.packingCountBase }} {{row.minUnit}}
|
|
|
|
|
|
|
+ {{ row.packingCountBase }} {{ row.minUnit }}
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template v-slot:availableCountBase="{ row }">
|
|
<template v-slot:availableCountBase="{ row }">
|
|
|
- {{ row.availableCountBase }} {{row.measuringUnit}}
|
|
|
|
|
|
|
+ {{ row.availableCountBase }} {{ row.measuringUnit }}
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
</template>
|
|
</template>
|
|
|
</ele-split-layout>
|
|
</ele-split-layout>
|
|
@@ -87,12 +89,18 @@
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: { AssetTree, pickingListSearch },
|
|
components: { AssetTree, pickingListSearch },
|
|
|
- props: {},
|
|
|
|
|
|
|
+ props: {
|
|
|
|
|
+ isType: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ default: '',
|
|
|
|
|
+ required: true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
visible: false,
|
|
visible: false,
|
|
|
|
|
|
|
|
- treeIds: '1, 5, 7, 8, 10, 13, 14, 23, 26, 9, 28',
|
|
|
|
|
|
|
+ treeIds: null,
|
|
|
categoryLevelId: null,
|
|
categoryLevelId: null,
|
|
|
rootCategoryLevelId: null,
|
|
rootCategoryLevelId: null,
|
|
|
isCategory: true,
|
|
isCategory: true,
|
|
@@ -108,7 +116,8 @@
|
|
|
'占用'
|
|
'占用'
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
- selection: []
|
|
|
|
|
|
|
+ selection: [],
|
|
|
|
|
+ allSelection: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -124,15 +133,18 @@
|
|
|
width: 45,
|
|
width: 45,
|
|
|
type: 'selection',
|
|
type: 'selection',
|
|
|
columnKey: 'selection',
|
|
columnKey: 'selection',
|
|
|
- align: 'center'
|
|
|
|
|
|
|
+ selectable: (row, index) => {
|
|
|
|
|
+ return !this.allSelection.some((it) => it.id == row.id);
|
|
|
|
|
+ },
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ reserveSelection: true
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
columnKey: 'index',
|
|
columnKey: 'index',
|
|
|
label: '序号',
|
|
label: '序号',
|
|
|
type: 'index',
|
|
type: 'index',
|
|
|
width: 50,
|
|
width: 50,
|
|
|
- align: 'center',
|
|
|
|
|
- reserveSelection: true
|
|
|
|
|
|
|
+ align: 'center'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'code',
|
|
prop: 'code',
|
|
@@ -238,7 +250,7 @@
|
|
|
]
|
|
]
|
|
|
: []),
|
|
: []),
|
|
|
|
|
|
|
|
- ...([1, 23, 8].includes(Number(this.rootCategoryLevelId))
|
|
|
|
|
|
|
+ ...([1, 23, 8].includes(Number(this.rootCategoryLevelId))
|
|
|
? [
|
|
? [
|
|
|
{
|
|
{
|
|
|
prop: 'packingCountBase',
|
|
prop: 'packingCountBase',
|
|
@@ -249,8 +261,7 @@
|
|
|
]
|
|
]
|
|
|
: []),
|
|
: []),
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- ...([1, 23].includes(Number(this.rootCategoryLevelId))
|
|
|
|
|
|
|
+ ...([1, 23].includes(Number(this.rootCategoryLevelId))
|
|
|
? [
|
|
? [
|
|
|
{
|
|
{
|
|
|
prop: 'availableCountBase',
|
|
prop: 'availableCountBase',
|
|
@@ -260,7 +271,6 @@
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
: [])
|
|
: [])
|
|
|
-
|
|
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -288,12 +298,20 @@
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ handleSelectionChange(data) {
|
|
|
|
|
+ this.allSelection = [...this.allSelection, ...data];
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ rowStyle({ row }) {
|
|
|
|
|
+ return this.selection.includes(row) ? { background: '#e6f7ff' } : null;
|
|
|
|
|
+ },
|
|
|
handleNodeClick(data) {
|
|
handleNodeClick(data) {
|
|
|
this.isCategory = true;
|
|
this.isCategory = true;
|
|
|
this.categoryLevelId = data.id;
|
|
this.categoryLevelId = data.id;
|
|
|
this.rootCategoryLevelId = data.rootCategoryLevelId;
|
|
this.rootCategoryLevelId = data.rootCategoryLevelId;
|
|
|
this.reload();
|
|
this.reload();
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
setRootId(data) {
|
|
setRootId(data) {
|
|
|
this.categoryLevelId = data.id;
|
|
this.categoryLevelId = data.id;
|
|
|
this.rootCategoryLevelId = data.rootCategoryLevelId;
|
|
this.rootCategoryLevelId = data.rootCategoryLevelId;
|
|
@@ -317,12 +335,16 @@
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
|
},
|
|
},
|
|
|
selected() {
|
|
selected() {
|
|
|
- if (!this.current) {
|
|
|
|
|
- return this.$message.warning('请选择');
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ console.log(this.selection);
|
|
|
|
|
|
|
|
this.handleClose();
|
|
this.handleClose();
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ created() {
|
|
|
|
|
+ if (this.isType == 'pick') {
|
|
|
|
|
+ this.treeIds = '1, 5, 7, 8, 10, 13, 14, 23, 26, 9, 28';
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
@@ -357,4 +379,8 @@
|
|
|
.topsearch {
|
|
.topsearch {
|
|
|
margin-bottom: 15px;
|
|
margin-bottom: 15px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ ::v-deep .is-checked {
|
|
|
|
|
+ background: #e6f7ff;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|