yin 60a7db4085 refactor(frontend): 业务弹窗统一为 task-panel 面板,统一确认框样式
新增统一弹窗外壳与样式:
- 新增 TaskPanelDialog.vue(自绘标题+副标题 / 可滚动内容区 / 底部提示+操作区),
  默认点遮罩不关闭,内容区 max-height 内部滚动
- 新增 styles/task-panel.css 并在 main.ts 引入:section 分组、栅格字段行
  (88px 标签 + 控件)、提示条、表格区、底部按钮区(small / gap 6)
- 新增 ReasonPromptDialog.vue:替换 ElMessageBox.prompt,用于作废 / 取消 /
  手工标记推送失败等需填原因的操作,支持必填校验、多行、按钮类型与提示

页面改造(el-dialog / el-drawer → TaskPanelDialog + task-panel 栅格):
- 订单、发货单、状态面板、订单同步、入库单(列表/新建)、出库单(列表/新建)、
  库存单据、导出任务、导出按钮、商品查询、单据选择、商品(新增/编辑/批量导入,
  抽屉改弹窗)、店铺、店铺商品、组合商品、自定义快递、外接 API、
  外接打印平台/快递接口、组织(集团设置/下属公司)、权限角色组、主体、主体用户、
  商品属性、用户资料

交互与样式统一:
- ElMessageBox.confirm 统一挂 customClass="app-confirm-box"(App.vue 中定义按钮
  高度/内边距/间距),状态面板封装 ElMessageBox 别名统一注入
- 侧边栏 BasicLayout:加 contain: layout、菜单内部 overflow 滚动、
  关闭子菜单折叠过渡,避免展开时逐帧重排扩散到主内容区
2026-11-19 18:00:54 +08:00

805 lines
27 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script setup lang="ts">
import { computed, onMounted, reactive, ref } from 'vue'
import { ElMessage, ElMessageBox, type FormInstance, type FormRules } from 'element-plus'
import {
createStockOrderApi,
type StockBillType,
type StockItemLine,
type StockOrder,
type StockOrderPayload,
type StockItemPayload,
} from '@/api/stockOrder'
import { getWarehouseOptions, type WarehouseOption } from '@/api/warehouse'
import { searchProducts, type ProductSearchItem } from '@/api/product'
import SplitLayout from '@/components/SplitLayout.vue'
import DataTable from '@/components/DataTable.vue'
import ListPager from '@/components/ListPager.vue'
import { DEFAULT_PAGE_SIZE, useListPage } from '@/composables/useListPage'
import VirtualTable from '@/components/VirtualTable.vue'
import TaskPanelDialog from '@/components/TaskPanelDialog.vue'
import { formatDateTime } from '@/utils/datetime'
import VirtualSelect from '@/components/VirtualSelect.vue'
import type { VirtualColumn } from '@/components/virtualTable'
const props = defineProps<{
billType: number
billTypeName: string
partyField: 'supplier' | 'customer'
partyLabel: string
}>()
const api = createStockOrderApi(props.billType as StockBillType)
const STATUS_LABELS = computed<Record<number, string>>(() => {
const done = props.billType === 1 ? '完成入库' : '完成出库'
return { 1: '已创建', 2: '已审核', 3: '已推送', 4: done, 9: '已取消' }
})
const STATUS_TAGS: Record<number, string> = { 1: 'info', 2: 'warning', 3: 'primary', 4: 'success', 9: 'danger' }
const TYPE_OPTIONS = computed(() =>
props.billType === 1
? [
{ label: '采购入库', value: 1 },
{ label: '退货入库', value: 2 },
{ label: '其他', value: 9 },
]
: [
{ label: '销售出库', value: 1 },
{ label: '退货出库', value: 2 },
{ label: '其他', value: 9 },
],
)
const warehouses = ref<WarehouseOption[]>([])
/** 仓库下拉(全量仓库,虚拟滚动) */
const warehouseSelectOptions = computed(() =>
warehouses.value.map((w) => ({ label: `${w.code} ${w.name}`, value: w.id })),
)
const query = reactive({
page: 1,
pageSize: DEFAULT_PAGE_SIZE,
bill_no: '',
status: '' as string | number,
type: '' as string | number,
warehouse_id: '' as string | number,
})
const { loading, list, total, elapsed, fetchList, search, handlePageChange, handleSizeChange } = useListPage({
query,
fetcher: () => {
const params: Record<string, unknown> = { ...query }
if (!params.bill_no) delete params.bill_no
if (params.status === '') delete params.status
if (params.type === '') delete params.type
if (params.warehouse_id === '') delete params.warehouse_id
return api.getList(params)
},
})
async function fetchWarehouses() {
try {
const res = await getWarehouseOptions()
warehouses.value = res
} catch {
warehouses.value = []
}
}
function reset() {
query.bill_no = ''
query.status = ''
query.type = ''
query.warehouse_id = ''
search()
}
function typeLabel(row: StockOrder): string {
const t = (props.billType === 1 ? row.inbound_type : row.outbound_type) as number
return TYPE_OPTIONS.value.find((o) => o.value === t)?.label || String(t)
}
function partyValue(row: StockOrder): string {
return (row[props.partyField] as string) || '-'
}
/* -------------------- 新增 / 编辑 -------------------- */
const dialogVisible = ref(false)
const submitting = ref(false)
const formRef = ref<FormInstance>()
const editId = ref<number | null>(null)
const form = reactive({
warehouse_id: null as number | null,
type: 1,
status: 1,
party: '',
operator: '',
total_amount: 0,
remark: '',
})
const rules: FormRules = {
warehouse_id: [{ required: true, message: '请选择仓库', trigger: 'change' }],
}
function openCreate() {
editId.value = null
Object.assign(form, {
warehouse_id: null,
type: 1,
status: 1,
party: '',
operator: '',
total_amount: 0,
remark: '',
})
dialogVisible.value = true
}
function openEdit(row: StockOrder) {
editId.value = row.id
form.warehouse_id = row.warehouse_id ?? null
form.type = (props.billType === 1 ? row.inbound_type : row.outbound_type) || 1
form.status = row.status
form.party = (row[props.partyField] as string) || ''
form.operator = row.operator || ''
form.total_amount = Number(row.total_amount) || 0
form.remark = row.remark || ''
dialogVisible.value = true
}
async function submitForm() {
if (!formRef.value) return
await formRef.value.validate(async (valid) => {
if (!valid) return
submitting.value = true
try {
const payload: StockOrderPayload = {
warehouse_id: form.warehouse_id,
status: form.status,
operator: form.operator || null,
total_amount: form.total_amount,
remark: form.remark || undefined,
}
if (props.billType === 1) payload.inbound_type = form.type
else payload.outbound_type = form.type
payload[props.partyField] = form.party || null
if (editId.value == null) {
await api.create(payload)
ElMessage.success('新增成功')
} else {
await api.update(editId.value, payload)
ElMessage.success('保存成功')
}
dialogVisible.value = false
await fetchList()
} catch {
// 拦截器已提示
} finally {
submitting.value = false
}
})
}
/* -------------------- 状态流转(审核 / 推送 / 完成 / 取消 / 恢复) -------------------- */
const transiting = ref(false)
async function transit(action: 'audit' | 'push' | 'complete' | 'cancel' | 'restore') {
if (!currentOrder.value) return
transiting.value = true
try {
const id = currentOrder.value.id
if (action === 'audit') await api.audit(id)
else if (action === 'push') await api.push(id)
else if (action === 'complete') await api.complete(id)
else if (action === 'cancel') await api.cancel(id)
else if (action === 'restore') await api.restore(id)
ElMessage.success('操作成功')
const map: Record<string, number> = { audit: 2, push: 3, complete: 4, cancel: 9, restore: 1 }
currentOrder.value.status = map[action]
await fetchList()
} catch {
// 拦截器已提示
} finally {
transiting.value = false
}
}
async function handleDelete(row: StockOrder) {
try {
await ElMessageBox.confirm(`确认删除${props.billTypeName}「${row.bill_no}」?`, '删除确认', {
type: 'warning',
confirmButtonText: '删除',
cancelButtonText: '取消',
customClass: 'app-confirm-box',
})
} catch {
return
}
try {
await api.remove(row.id)
ElMessage.success('已删除')
if (currentOrder.value && currentOrder.value.id === row.id) {
currentOrder.value = null
items.value = []
}
await fetchList()
} catch {
// 拦截器已提示
}
}
/* -------------------- 明细 -------------------- */
const itemsLoading = ref(false)
const currentOrder = ref<StockOrder | null>(null)
const activeDetailTab = ref('detail')
const items = ref<StockItemLine[]>([])
const productOptions = ref<ProductSearchItem[]>([])
/** 明细列(虚拟滚动,明细行可能有几百条) */
const itemColumns: VirtualColumn[] = [
{ key: 'name', title: '商品名称', minWidth: 140, slot: 'name' },
{ key: 'code', title: '商品编码', width: 120, slot: 'code' },
{ key: 'spec', title: '规格', width: 120, slot: 'spec' },
{ key: 'unit', title: '单位', width: 80, slot: 'unit' },
{ key: 'quantity', title: '数量', width: 90, align: 'right' },
{ key: 'price', title: '单价', width: 100, align: 'right', slot: 'price' },
{ key: 'total_amount', title: '金额', width: 110, align: 'right' },
{ key: 'actions', title: '操作', width: 140, slot: 'actions', fixed: true },
]
const productSearching = ref(false)
/** 商品快速搜索(聚合:商品编码/货品编码/条码/商品名称),仅返回启用商品 */
async function remoteSearchProduct(keyword: string) {
productSearching.value = true
try {
productOptions.value = await searchProducts(keyword || '')
} catch {
productOptions.value = []
} finally {
productSearching.value = false
}
}
async function fetchItems() {
if (!currentOrder.value) return
itemsLoading.value = true
try {
const res = await api.getItems(currentOrder.value.id, { pageSize: 200 })
items.value = res.list
} catch {
// 拦截器已提示
} finally {
itemsLoading.value = false
}
}
function handleRowClick(row: StockOrder) {
currentOrder.value = row
fetchItems()
}
const itemDialogVisible = ref(false)
const itemSubmitting = ref(false)
const itemEditId = ref<number | null>(null)
const itemForm = reactive({
product_id: null as number | null,
name: '',
code: '',
spec: '',
unit: '',
quantity: 1,
price: 0,
remark: '',
})
function onProductChange(pid: number | null) {
const p = productOptions.value.find((x) => x.id === pid)
if (p) {
itemForm.name = p.item_name || ''
itemForm.code = p.item_code || ''
itemForm.spec = p.sku_property || ''
itemForm.unit = p.stock_unit || ''
}
}
function openItemCreate() {
itemEditId.value = null
Object.assign(itemForm, {
product_id: null,
name: '',
code: '',
spec: '',
unit: '',
quantity: 1,
price: 0,
remark: '',
})
itemDialogVisible.value = true
}
function openItemEdit(row: StockItemLine) {
itemEditId.value = row.id
// 编辑时回显已关联商品,便于下拉展示(搜索接口仅返回启用商品)
productOptions.value = row.product
? [{ id: row.product.id, item_code: row.product.item_code, item_name: row.product.item_name, sku_property: row.product.sku_property, goods_code: null, barcode: null, stock_unit: row.unit || null, status: 1 }]
: []
Object.assign(itemForm, {
product_id: row.product_id,
name: row.name || '',
code: row.code || '',
spec: row.spec || '',
unit: row.unit || '',
quantity: Number(row.quantity) || 0,
price: Number(row.price) || 0,
remark: row.remark || '',
})
itemDialogVisible.value = true
}
async function submitItem() {
if (!currentOrder.value) return
itemSubmitting.value = true
try {
const payload: StockItemPayload = {
bill_id: currentOrder.value.id,
product_id: itemForm.product_id,
name: itemForm.name || null,
code: itemForm.code || null,
spec: itemForm.spec || null,
unit: itemForm.unit || null,
quantity: itemForm.quantity,
price: itemForm.price,
remark: itemForm.remark || null,
}
if (itemEditId.value == null) {
await api.createItem(payload)
ElMessage.success('已新增明细')
} else {
await api.updateItem(itemEditId.value, payload)
ElMessage.success('已保存明细')
}
itemDialogVisible.value = false
await fetchItems()
} catch {
// 拦截器已提示
} finally {
itemSubmitting.value = false
}
}
async function handleDeleteItem(row: StockItemLine) {
try {
await ElMessageBox.confirm(`确认删除明细「${row.name || row.code || row.id}」?`, '删除确认', {
type: 'warning',
confirmButtonText: '删除',
cancelButtonText: '取消',
customClass: 'app-confirm-box',
})
} catch {
return
}
try {
await api.removeItem(row.id)
ElMessage.success('已删除')
await fetchItems()
} catch {
// 拦截器已提示
}
}
onMounted(async () => {
await fetchWarehouses()
await fetchList()
})
</script>
<template>
<el-card class="stock-card">
<template #header>
<div class="page-header">
<span>{{ billTypeName }}</span>
<el-button type="primary" @click="openCreate">新增{{ billTypeName }}</el-button>
</div>
</template>
<SplitLayout :first-size="360" storage-key="stock-order-split" :show-second="!!currentOrder">
<template #first>
<el-form :inline="true" class="search-bar">
<el-form-item label="单号">
<el-input v-model="query.bill_no" placeholder="支持模糊匹配" clearable @keyup.enter="search" />
</el-form-item>
<el-form-item label="状态">
<el-select v-model="query.status" placeholder="全部" clearable style="width: 130px">
<el-option v-for="(label, val) in STATUS_LABELS" :key="val" :label="label" :value="Number(val)" />
</el-select>
</el-form-item>
<el-form-item :label="billTypeName + '类型'">
<el-select v-model="query.type" placeholder="全部" clearable style="width: 140px">
<el-option v-for="o in TYPE_OPTIONS" :key="o.value" :label="o.label" :value="o.value" />
</el-select>
</el-form-item>
<el-form-item label="店铺/仓库">
<VirtualSelect
v-model="query.warehouse_id"
:options="warehouseSelectOptions"
placeholder="全部仓库"
clearable
style="width: 160px"
/>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="search">查询</el-button>
<el-button size="small" @click="reset">重置</el-button>
</el-form-item>
</el-form>
<div class="top-table-wrap">
<DataTable
:loading="loading"
:data="list"
highlight-current-row
height="100%"
@row-click="handleRowClick"
>
<el-table-column prop="bill_no" label="单号" min-width="160" />
<el-table-column label="仓库" width="150">
<template #default="{ row }">{{ row.warehouse?.name || '-' }}</template>
</el-table-column>
<el-table-column label="类型" width="120">
<template #default="{ row }">{{ typeLabel(row) }}</template>
</el-table-column>
<el-table-column label="状态" width="100">
<template #default="{ row }">
<el-tag :type="STATUS_TAGS[row.status]">{{ STATUS_LABELS[row.status] || row.status }}</el-tag>
</template>
</el-table-column>
<el-table-column :label="partyLabel" width="140">
<template #default="{ row }">{{ partyValue(row) }}</template>
</el-table-column>
<el-table-column label="操作人" width="100">
<template #default="{ row }">{{ row.operator || '-' }}</template>
</el-table-column>
<el-table-column label="创建人" width="100">
<template #default="{ row }">{{ row.creator?.nickname || row.creator?.username || '-' }}</template>
</el-table-column>
<el-table-column label="金额" width="120" align="right">
<template #default="{ row }">{{ row.total_amount }}</template>
</el-table-column>
<el-table-column label="商品总数" width="100" align="right">
<template #default="{ row }">{{ row.item_total ?? 0 }}</template>
</el-table-column>
<el-table-column label="商品种类" width="100" align="right">
<template #default="{ row }">{{ row.item_kind ?? 0 }}</template>
</el-table-column>
<el-table-column prop="created_at" label="创建时间" width="180">
<template #default="{ row }">{{ formatDateTime(row.created_at) }}</template>
</el-table-column>
<el-table-column label="操作" width="200" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="openEdit(row)">编辑</el-button>
<el-button link type="danger" @click="handleDelete(row)">删除</el-button>
</template>
</el-table-column>
</DataTable>
</div>
<ListPager
:total="total"
:elapsed="elapsed"
:page="query.page"
:page-size="query.pageSize"
@page-change="handlePageChange"
@size-change="handleSizeChange"
/>
</template>
<template #second>
<el-tabs v-model="activeDetailTab" type="border-card" class="detail-tabs">
<el-tab-pane label="明细" name="detail">
<div class="items-toolbar">
<span class="items-title">
{{ billTypeName }}明细<template v-if="currentOrder"> · {{ currentOrder.bill_no }}</template>
</span>
<div class="status-actions" v-if="currentOrder">
<el-tag :type="STATUS_TAGS[currentOrder.status]">{{ STATUS_LABELS[currentOrder.status] || currentOrder.status }}</el-tag>
<el-button size="small" :disabled="transiting" v-if="currentOrder.status === 1" @click="transit('audit')">审核</el-button>
<el-button size="small" :disabled="transiting" v-if="currentOrder.status === 2" @click="transit('push')">推送</el-button>
<el-button size="small" :disabled="transiting" v-if="currentOrder.status === 3" @click="transit('complete')">完成</el-button>
<el-button size="small" :disabled="transiting" v-if="currentOrder.status === 9" @click="transit('restore')">恢复</el-button>
<el-button size="small" type="danger" plain :disabled="transiting" v-if="currentOrder.status !== 4 && currentOrder.status !== 9" @click="transit('cancel')">取消</el-button>
</div>
<el-button type="primary" :disabled="!currentOrder" @click="openItemCreate">新增明细</el-button>
</div>
<div class="bottom-table-wrap">
<template v-if="currentOrder">
<VirtualTable
:loading="itemsLoading"
:data="items"
:columns="itemColumns"
class="fill-table"
>
<template #name="{ row }">{{ row.name || (row.product ? row.product.item_name : '-') }}</template>
<template #code="{ row }">{{ row.code || (row.product ? row.product.item_code : '-') }}</template>
<template #spec="{ row }">{{ row.spec || '-' }}</template>
<template #unit="{ row }">{{ row.unit || '-' }}</template>
<template #price="{ row }">{{ row.price ?? '-' }}</template>
<template #actions="{ row }">
<el-button link type="primary" @click="openItemEdit(row)">编辑</el-button>
<el-button link type="danger" @click="handleDeleteItem(row)">删除</el-button>
</template>
</VirtualTable>
</template>
<el-empty v-else description="请点击上方单据查看明细" />
</div>
</el-tab-pane>
</el-tabs>
</template>
</SplitLayout>
<TaskPanelDialog
v-model="dialogVisible"
:title="editId == null ? '新增' + billTypeName : '编辑' + billTypeName"
subtitle="单据头信息;保存后在下方明细区维护商品行"
width="min(580px, 92vw)"
body-max-height="62vh"
>
<el-form
ref="formRef"
:model="form"
:rules="rules"
class="task-panel__form"
scroll-to-error
@submit.prevent
>
<div class="task-panel__grid task-panel__grid--single">
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label is-required">仓库</span>
<div class="task-panel__field-form">
<el-form-item prop="warehouse_id">
<VirtualSelect
v-model="form.warehouse_id"
:options="warehouseSelectOptions"
placeholder="请选择仓库"
clearable
style="width: 100%"
/>
</el-form-item>
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label is-required">{{ billTypeName }}类型</span>
<div class="task-panel__field-form">
<el-form-item prop="type">
<el-select v-model="form.type" style="width: 100%">
<el-option v-for="o in TYPE_OPTIONS" :key="o.value" :label="o.label" :value="o.value" />
</el-select>
</el-form-item>
</div>
</div>
<div v-if="editId != null" class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">状态</span>
<div class="task-panel__field-form">
<el-form-item prop="status">
<el-select v-model="form.status" style="width: 100%">
<el-option
v-for="(label, val) in STATUS_LABELS"
:key="val"
:label="label"
:value="Number(val)"
/>
</el-select>
</el-form-item>
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">{{ partyLabel }}</span>
<div class="task-panel__field-form">
<el-form-item prop="party">
<el-input v-model="form.party" placeholder="选填" />
</el-form-item>
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">操作人</span>
<div class="task-panel__field-form">
<el-form-item prop="operator">
<el-input v-model="form.operator" placeholder="选填" />
</el-form-item>
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">单据金额</span>
<div class="task-panel__field-form">
<el-form-item prop="total_amount">
<el-input-number v-model="form.total_amount" :min="0" :precision="2" style="width: 100%" />
</el-form-item>
</div>
</div>
<div class="task-panel__field task-panel__field--input task-panel__field--textarea">
<span class="task-panel__field-label">备注</span>
<div class="task-panel__field-form">
<el-form-item prop="remark">
<el-input v-model="form.remark" type="textarea" :rows="2" placeholder="选填" />
</el-form-item>
</div>
</div>
</div>
</el-form>
<template #hint>单号由系统生成(前缀视单据类型而定)</template>
<template #actions>
<el-button size="small" @click="dialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="submitting" @click="submitForm">保存</el-button>
</template>
</TaskPanelDialog>
<TaskPanelDialog
v-model="itemDialogVisible"
:title="itemEditId == null ? '新增明细' : '编辑明细'"
subtitle="可先选系统商品自动带出名称/编码/规格,也可手工填写"
width="min(560px, 92vw)"
body-max-height="62vh"
>
<el-form :model="itemForm" class="task-panel__form" @submit.prevent>
<div class="task-panel__grid task-panel__grid--single">
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">系统商品</span>
<div class="task-panel__field-form">
<el-select
v-model="itemForm.product_id"
filterable
remote
clearable
:remote-method="remoteSearchProduct"
:loading="productSearching"
placeholder="输入编码/货物编码/条码/名称搜索(仅启用商品)"
style="width: 100%"
@change="onProductChange"
>
<el-option
v-for="p in productOptions"
:key="p.id"
:label="`${p.item_code} ${p.item_name}`"
:value="p.id"
/>
</el-select>
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">商品名称</span>
<div class="task-panel__field-form">
<el-input v-model="itemForm.name" placeholder="商品名称" />
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">商品编码</span>
<div class="task-panel__field-form">
<el-input v-model="itemForm.code" placeholder="选填" />
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">规格</span>
<div class="task-panel__field-form">
<el-input v-model="itemForm.spec" placeholder="选填" />
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">单位</span>
<div class="task-panel__field-form">
<el-input v-model="itemForm.unit" placeholder="选填,如 件/箱" />
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">数量</span>
<div class="task-panel__field-form">
<el-input-number v-model="itemForm.quantity" :min="0" :precision="0" style="width: 100%" />
</div>
</div>
<div class="task-panel__field task-panel__field--input">
<span class="task-panel__field-label">单价</span>
<div class="task-panel__field-form">
<el-input-number v-model="itemForm.price" :min="0" :precision="2" style="width: 100%" />
</div>
</div>
<div class="task-panel__field task-panel__field--input task-panel__field--textarea">
<span class="task-panel__field-label">备注</span>
<div class="task-panel__field-form">
<el-input v-model="itemForm.remark" type="textarea" :rows="2" placeholder="选填" />
</div>
</div>
</div>
</el-form>
<template #hint>数量与单价影响单据金额合计</template>
<template #actions>
<el-button size="small" @click="itemDialogVisible = false">取消</el-button>
<el-button size="small" type="primary" :loading="itemSubmitting" @click="submitItem">保存</el-button>
</template>
</TaskPanelDialog>
</el-card>
</template>
<style scoped>
.stock-card {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
}
.stock-card :deep(.el-card__body) {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
padding: 10px 12px;
}
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 600;
}
.search-bar {
margin-bottom: 12px;
}
.top-table-wrap {
flex: 1;
min-height: 0;
overflow: hidden;
}
.items-toolbar {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 12px;
}
.status-actions {
display: flex;
align-items: center;
gap: 8px;
margin-left: auto;
}
.items-title {
font-weight: 600;
}
.bottom-table-wrap {
flex: 1;
min-height: 0;
overflow: hidden;
}
.detail-tabs {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
}
.detail-tabs :deep(.el-tabs__content) {
flex: 1;
min-height: 0;
overflow: hidden;
}
.detail-tabs :deep(.el-tab-pane) {
height: 100%;
display: flex;
flex-direction: column;
min-height: 0;
}
.fill-table {
height: 100%;
}
</style>