|
@@ -10,7 +10,12 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
</thead>
|
|
</thead>
|
|
|
<tbody>
|
|
<tbody>
|
|
|
- <tr v-for="(item, index) in props.locationList" :key="index" v-if="props.locationList.length>0">
|
|
|
|
|
|
|
+ <tr
|
|
|
|
|
+ v-for="(item, index) in props.locationList"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ v-if="props.locationList.length>0"
|
|
|
|
|
+ :class="item.displayType && `display-type--${item.displayType.toLowerCase()}`"
|
|
|
|
|
+ >
|
|
|
<td>{{ legacy ? item.location : item.locationId }}</td>
|
|
<td>{{ legacy ? item.location : item.locationId }}</td>
|
|
|
<td>{{ legacy ? (locationType[item.type] || item.type) : (locationType[item.locationUsage] || item.locationUsage) }}</td>
|
|
<td>{{ legacy ? (locationType[item.type] || item.type) : (locationType[item.locationUsage] || item.locationUsage) }}</td>
|
|
|
<td>{{ legacy ? (item.quantity || 0) : (item.qty || 0) }}</td>
|
|
<td>{{ legacy ? (item.quantity || 0) : (item.qty || 0) }}</td>
|
|
@@ -23,6 +28,11 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
</tbody>
|
|
</tbody>
|
|
|
</table>
|
|
</table>
|
|
|
|
|
+ <div v-if="!legacy" class="display-type-legend">
|
|
|
|
|
+ <span v-for="item in displayTypeLegend" :key="item.type" class="legend-item">
|
|
|
|
|
+ <i :class="['legend-color', `display-type--${item.type}`]"></i>{{ item.label }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
@@ -47,6 +57,13 @@ const props = defineProps({
|
|
|
locationList: Array,
|
|
locationList: Array,
|
|
|
legacy: { type: Boolean, default: false },
|
|
legacy: { type: Boolean, default: false },
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+// 展示类型:FORCE 强制、OPTIONAL 可选、INVENTORY 在库
|
|
|
|
|
+const displayTypeLegend = [
|
|
|
|
|
+ { type: 'force', label: '强制' },
|
|
|
|
|
+ { type: 'optional', label: '可选' },
|
|
|
|
|
+ { type: 'inventory', label: '在库' },
|
|
|
|
|
+]
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped lang="sass">
|
|
<style scoped lang="sass">
|
|
|
.move-stock-list
|
|
.move-stock-list
|
|
@@ -82,4 +99,36 @@ const props = defineProps({
|
|
|
.task-table-bin tbody
|
|
.task-table-bin tbody
|
|
|
background: #cde7ff
|
|
background: #cde7ff
|
|
|
|
|
|
|
|
|
|
+ .display-type--force
|
|
|
|
|
+ background-color: #81c784
|
|
|
|
|
+
|
|
|
|
|
+ .display-type--optional
|
|
|
|
|
+ background-color: #fff
|
|
|
|
|
+
|
|
|
|
|
+ .display-type--inventory
|
|
|
|
|
+ background-color: #d8d8d8
|
|
|
|
|
+
|
|
|
|
|
+ .display-type-legend
|
|
|
|
|
+ display: flex
|
|
|
|
|
+ justify-content: flex-end
|
|
|
|
|
+ align-items: center
|
|
|
|
|
+ gap: 10px
|
|
|
|
|
+ margin-top: 4px
|
|
|
|
|
+ padding-right: 2px
|
|
|
|
|
+ font-size: 11px
|
|
|
|
|
+ color: #999
|
|
|
|
|
+ line-height: 1
|
|
|
|
|
+
|
|
|
|
|
+ .legend-item
|
|
|
|
|
+ display: inline-flex
|
|
|
|
|
+ align-items: center
|
|
|
|
|
+ gap: 3px
|
|
|
|
|
+
|
|
|
|
|
+ .legend-color
|
|
|
|
|
+ display: inline-block
|
|
|
|
|
+ width: 10px
|
|
|
|
|
+ height: 10px
|
|
|
|
|
+ border: 1px solid #ccc
|
|
|
|
|
+ flex-shrink: 0
|
|
|
|
|
+
|
|
|
</style>
|
|
</style>
|