|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="stock-overview">
|
|
|
|
|
<div class="stock-overview" :class="{ 'is-fullscreen': isFullscreenLayout }">
|
|
|
|
|
<ContentWrap>
|
|
|
|
|
<el-form ref="queryFormRef" :inline="true" :model="queryParams" class="-mb-15px stock-overview__query"
|
|
|
|
|
label-width="auto">
|
|
|
|
|
@ -175,6 +175,7 @@ import { StockApi, type StockStatisticsCardsRespVO, type StockVO } from '@/api/e
|
|
|
|
|
import { StockRecordApi, StockRecordVO } from '@/api/erp/stock/record'
|
|
|
|
|
import { WarehouseApi, WarehouseVO } from '@/api/erp/stock/warehouse'
|
|
|
|
|
import { useDictStoreWithOut } from '@/store/modules/dict'
|
|
|
|
|
import {useRoute} from "vue-router";
|
|
|
|
|
|
|
|
|
|
defineOptions({ name: 'ErpStockOverview' })
|
|
|
|
|
|
|
|
|
|
@ -195,7 +196,7 @@ const queryParams = reactive<{
|
|
|
|
|
warehouseId: undefined,
|
|
|
|
|
areaId: undefined
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
const cardsLoading = ref(false)
|
|
|
|
|
const stockLoading = ref(false)
|
|
|
|
|
const recordLoading = ref(false)
|
|
|
|
|
@ -211,7 +212,14 @@ const recordQuery = reactive({
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: 9
|
|
|
|
|
})
|
|
|
|
|
const isEnabledQueryValue = (value: unknown) => {
|
|
|
|
|
const rawValue = Array.isArray(value) ? value[0] : value
|
|
|
|
|
return ['1', 'true', 'yes', 'on'].includes(String(rawValue ?? '').toLowerCase())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const isFullscreenLayout = computed(() =>
|
|
|
|
|
isEnabledQueryValue(route.query.fullscreen ?? route.query.full)
|
|
|
|
|
)
|
|
|
|
|
const displayValue = (value: unknown) => {
|
|
|
|
|
return value === undefined || value === null || value === '' ? '-' : value
|
|
|
|
|
}
|
|
|
|
|
@ -476,6 +484,16 @@ onMounted(async () => {
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.stock-overview {
|
|
|
|
|
&.is-fullscreen {
|
|
|
|
|
position: fixed;
|
|
|
|
|
inset: 0;
|
|
|
|
|
z-index: 2000;
|
|
|
|
|
width: 100vw;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
padding: 16px;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
background: #f5f7fa;
|
|
|
|
|
}
|
|
|
|
|
.stock-overview__query {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|