|
|
@@ -10,9 +10,9 @@
|
|
|
<el-tabs v-model="activeTab">
|
|
|
<!-- 库存流水 -->
|
|
|
<el-tab-pane label="库存流水" name="transactions">
|
|
|
- <div class="filter-bar" style="margin-bottom:12px;">
|
|
|
- <el-input v-model="txFilters.productName" placeholder="商品名称" clearable style="width:160px;margin-right:8px;" />
|
|
|
- <el-select v-model="txFilters.type" placeholder="类型" clearable style="width:120px;margin-right:8px;">
|
|
|
+ <div class="filter-bar mb-12">
|
|
|
+ <el-input v-model="txFilters.productName" placeholder="商品名称" clearable class="w-160 mr-8" />
|
|
|
+ <el-select v-model="txFilters.type" placeholder="类型" clearable class="w-120 mr-8">
|
|
|
<el-option label="全部" value="" />
|
|
|
<el-option label="入库" value="inbound" />
|
|
|
<el-option label="出库" value="outbound" />
|
|
|
@@ -20,7 +20,7 @@
|
|
|
<el-option label="盘点" value="counting" />
|
|
|
<el-option label="退款入库" value="refund" />
|
|
|
</el-select>
|
|
|
- <el-date-picker v-model="txFilters.dateRange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" style="width:260px;margin-right:8px;" />
|
|
|
+ <el-date-picker v-model="txFilters.dateRange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" class="w-260 mr-8" />
|
|
|
<el-button type="primary" size="mini" @click="loadTransactions">查询</el-button>
|
|
|
</div>
|
|
|
<div class="adm-table-wrap">
|
|
|
@@ -115,7 +115,7 @@
|
|
|
|
|
|
<!-- 库存预警 -->
|
|
|
<el-tab-pane label="库存预警" name="alerts">
|
|
|
- <el-button type="primary" size="mini" @click="loadAlerts" style="margin-bottom:12px;">刷新</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="loadAlerts" class="mb-12">刷新</el-button>
|
|
|
<div class="adm-table-wrap">
|
|
|
<el-table :data="alertList" v-loading="alertLoading" border stripe height="100%">
|
|
|
<el-table-column prop="productName" label="商品名称" min-width="200" />
|
|
|
@@ -123,7 +123,7 @@
|
|
|
<template slot-scope="{ row }">{{ row.specs || '-' }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="currentStock" label="当前库存" width="80">
|
|
|
- <template slot-scope="{ row }"><span style="color:var(--adm-error-text);font-weight:bold;">{{ row.currentStock }}</span></template>
|
|
|
+ <template slot-scope="{ row }"><span class="text-error-bold">{{ row.currentStock }}</span></template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="minStockAlert" label="预警下限" width="80" />
|
|
|
|
|
|
@@ -134,7 +134,7 @@
|
|
|
|
|
|
<!-- 出库单 -->
|
|
|
<el-tab-pane label="出库单" name="outbound">
|
|
|
- <el-button type="primary" size="mini" @click="showCreateOutbound = true" style="margin-bottom:12px;">新建出库单</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="showCreateOutbound = true" class="mb-12">新建出库单</el-button>
|
|
|
<div class="adm-table-wrap">
|
|
|
<el-table :data="outboundList" v-loading="outboundLoading" border stripe height="100%">
|
|
|
<el-table-column prop="id" label="ID" width="60">
|
|
|
@@ -146,7 +146,7 @@
|
|
|
<template slot-scope="{ row }">{{ row.productName || 'ID:' + row.productId }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="数量" width="70">
|
|
|
- <template slot-scope="{ row }"><span style="color:var(--adm-error-text);">-{{ row.quantity }}</span></template>
|
|
|
+ <template slot-scope="{ row }"><span class="text-error">-{{ row.quantity }}</span></template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="remark" label="出库原因" min-width="200" show-overflow-tooltip>
|
|
|
<template slot="header">
|
|
|
@@ -167,7 +167,7 @@
|
|
|
|
|
|
<!-- 盘点记录 -->
|
|
|
<el-tab-pane label="盘点记录" name="counting">
|
|
|
- <el-button type="primary" size="mini" @click="showCreateCounting = true" style="margin-bottom:12px;">新建盘点</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="showCreateCounting = true" class="mb-12">新建盘点</el-button>
|
|
|
<div class="adm-table-wrap">
|
|
|
<el-table :data="countingList" v-loading="countingLoading" border stripe height="100%">
|
|
|
<el-table-column prop="id" label="ID" width="60">
|
|
|
@@ -223,7 +223,7 @@
|
|
|
<el-descriptions-item label="状态">{{ inboundDetail.order.status }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="备注">{{ inboundDetail.order.remark || '-' }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
- <el-table :data="inboundDetail.items" border stripe style="margin-top:12px;" v-if="inboundDetail">
|
|
|
+ <el-table :data="inboundDetail.items" border stripe class="mt-12" v-if="inboundDetail">
|
|
|
<el-table-column prop="productId" label="商品ID" width="70" />
|
|
|
<el-table-column prop="skuId" label="SKU ID" width="70" />
|
|
|
<el-table-column prop="quantity" label="数量" width="70" />
|
|
|
@@ -233,12 +233,12 @@
|
|
|
<el-dialog title="新建出库单" :visible.sync="showCreateOutbound" width="500px">
|
|
|
<el-form label-width="100px">
|
|
|
<el-form-item label="商品">
|
|
|
- <el-select v-model="outboundForm.productId" filterable remote placeholder="搜索商品" :remote-method="searchOutboundProduct" style="width:300px;">
|
|
|
+ <el-select v-model="outboundForm.productId" filterable remote placeholder="搜索商品" :remote-method="searchOutboundProduct" class="w-300">
|
|
|
<el-option v-for="p in outboundProductOptions" :key="p.id" :label="p.name + ' (库存:' + (p.stock || 0) + ')'" :value="p.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="SKU" v-if="outboundSkuOptions.length">
|
|
|
- <el-select v-model="outboundForm.skuId" placeholder="选择规格" clearable style="width:200px;">
|
|
|
+ <el-select v-model="outboundForm.skuId" placeholder="选择规格" clearable class="w-200">
|
|
|
<el-option v-for="s in outboundSkuOptions" :key="s.id" :label="s.specs || '默认' + ' (库存:' + (s.stock || 0) + ')'" :value="s.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
@@ -246,7 +246,7 @@
|
|
|
<el-input v-model.number="outboundForm.quantity" type="number" min="1" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="出库原因">
|
|
|
- <el-select v-model="outboundForm.reason" placeholder="选择原因" style="width:200px;">
|
|
|
+ <el-select v-model="outboundForm.reason" placeholder="选择原因" class="w-200">
|
|
|
<el-option label="赠品" value="赠品" />
|
|
|
<el-option label="损耗" value="损耗" />
|
|
|
<el-option label="样品" value="样品" />
|
|
|
@@ -455,4 +455,15 @@ export default {
|
|
|
.inventory-manage { padding: 20px; }
|
|
|
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
|
|
|
.pagination-wrap { margin-top: 12px; text-align: right; }
|
|
|
+/* == C 批内联清理工具类 == */
|
|
|
+.mb-12 { margin-bottom: 12px; }
|
|
|
+.mt-12 { margin-top: 12px; }
|
|
|
+.mr-8 { margin-right: 8px; }
|
|
|
+.w-160 { width: 160px; }
|
|
|
+.w-120 { width: 120px; }
|
|
|
+.w-260 { width: 260px; }
|
|
|
+.w-300 { width: 300px; }
|
|
|
+.w-200 { width: 200px; }
|
|
|
+.text-error { color: var(--adm-error-text); }
|
|
|
+.text-error-bold { color: var(--adm-error-text); font-weight: bold; }
|
|
|
</style>
|