diff --git a/src/modules/api/feedback/FeedbackListView.vue b/src/modules/api/feedback/FeedbackListView.vue index b838d80..1f8813b 100644 --- a/src/modules/api/feedback/FeedbackListView.vue +++ b/src/modules/api/feedback/FeedbackListView.vue @@ -116,7 +116,7 @@ onMounted(load) :total="total" :page="page" :limit="limit" - :show-pagination="total > 10" + :show-pagination="total > 10" :page-sizes="[10, 20, 50, 100]" :error="error" empty-text="暂无反馈" borderless diff --git a/src/modules/api/help/HelpListView.vue b/src/modules/api/help/HelpListView.vue index c166bd3..06e55ec 100644 --- a/src/modules/api/help/HelpListView.vue +++ b/src/modules/api/help/HelpListView.vue @@ -115,7 +115,7 @@ onMounted(load) :total="total" :page="page" :limit="limit" - :show-pagination="total > 10" + :show-pagination="total > 10" :page-sizes="[10, 20, 50, 100]" :error="error" empty-text="暂无帮助文档" borderless diff --git a/src/modules/api/lunbo/LunboListView.vue b/src/modules/api/lunbo/LunboListView.vue index 083a867..63906f6 100644 --- a/src/modules/api/lunbo/LunboListView.vue +++ b/src/modules/api/lunbo/LunboListView.vue @@ -137,7 +137,7 @@ onMounted(load) :total="total" :page="page" :limit="limit" - :show-pagination="total > 10" + :show-pagination="total > 10" :page-sizes="[10, 20, 50, 100]" :error="error" empty-text="暂无轮播图" borderless diff --git a/src/modules/inquiry/InquiryListView.vue b/src/modules/inquiry/InquiryListView.vue index e2bcdf0..c8f62a2 100644 --- a/src/modules/inquiry/InquiryListView.vue +++ b/src/modules/inquiry/InquiryListView.vue @@ -7,12 +7,13 @@ * * 设计规范:§16 列表页完整模板 + §17.7 紧凑弹窗 + §17.8 主题色弹窗 + §17.9 列优化 */ -import { onMounted, computed, ref } from 'vue' +import { onMounted, computed, reactive, ref } from 'vue' import { useRouter } from 'vue-router' import { ElMessage } from 'element-plus' import DataTable from '@/components/DataTable/DataTable.vue' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' +import ListTabs from '@/components/ListTabs/ListTabs.vue' import { useInquiryStore, STATUS_OPTIONS } from '@/stores/inquiry' import { httpGet } from '@/utils/request' @@ -29,7 +30,10 @@ interface InquiryRow { const router = useRouter() const store = useInquiryStore() -const STATUS_TABS = STATUS_OPTIONS.map(o => ({ value: o.value, label: o.label })) +const STATUS_TABS = STATUS_OPTIONS.map(o => ({ value: o.value, label: o.label, key: o.value, count: 0 })) + +// 各 status 计数 (在当前结果中累加) +const stats = reactive>({ pending: 0, quoting: 0, done: 0, cancelled: 0, all: 0 }) const STATUS_LABEL: Record = { pending: '待报价', @@ -86,6 +90,9 @@ async function load() { raw: it })) total.value = arr.length + (page.value - 1) * limit.value + // 各状态计数 (基于当前页结果) + stats.all = list.value.length + list.value.forEach(r => { stats[r.status] = (stats[r.status] || 0) + 1 }) } catch (e: any) { error.value = e?.msg || e?.message || '后端接口异常(详见 console)' list.value = [] @@ -96,6 +103,12 @@ async function load() { } function onSearch() { page.value = 1; load() } + +const tabItems = computed(() => STATUS_TABS.map(t => ({ + key: t.value, + label: t.label, + count: t.value === '' ? stats.all : (stats[t.value] || 0) +}))) function onReset() { filters.value.status = ''; filters.value.customer = ''; filters.value.searchKey = ''; page.value = 1; load() } function onPageChange(p: number) { page.value = p; load() } function onLimitChange(l: number) { limit.value = l; page.value = 1; load() } @@ -126,17 +139,7 @@ onMounted(() => { load() }) 重置 -
-
-
{{ t.label }}
-
-
+ { load() }) :total="total" :page="page" :limit="limit" - :show-pagination="true" + :show-pagination="true" :page-sizes="[10, 20, 50, 100]" :error="error" empty-text="暂无询价" borderless @@ -181,52 +184,6 @@ onMounted(() => { load() }) padding: 16px; } -.rr-tabs-row { - display: flex; - align-items: center; - justify-content: flex-start; - margin-bottom: 12px; - gap: 16px; -} - -.rr-tabs { - display: flex; - gap: 24px; - flex: 1; -} - -.rr-tab { - position: relative; - padding: 6px 0; - font-size: 13px; - font-weight: 500; - color: var(--el-text-color-secondary); - cursor: pointer; - user-select: none; - transition: color 0.15s ease; -} -.rr-tab:hover { color: var(--el-text-color-primary); } -.rr-tab.active { - color: var(--el-color-primary); - font-weight: 600; -} -.rr-tab.active::after { - content: ''; - position: absolute; - bottom: 0; - left: 0; - right: 0; - height: 2px; - background: var(--el-color-primary); - border-radius: 1px; -} - -.rr-list-card { - background: var(--el-bg-color); - border-radius: 12px; - padding: 4px; -} - .rr-time { font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace; font-size: 12px; diff --git a/src/modules/openapi/AuditLogListView.vue b/src/modules/openapi/AuditLogListView.vue index 181be57..dfe4f3b 100644 --- a/src/modules/openapi/AuditLogListView.vue +++ b/src/modules/openapi/AuditLogListView.vue @@ -345,7 +345,7 @@ onMounted(() => { :total="total" :page="page" :limit="limit" - :show-pagination="true" + :show-pagination="true" :page-sizes="[10, 20, 50, 100]" :error="loadError" empty-text="暂无审计记录" borderless diff --git a/src/modules/openapi/CompanyAccountListView.vue b/src/modules/openapi/CompanyAccountListView.vue index 9a8534f..8d53eaf 100644 --- a/src/modules/openapi/CompanyAccountListView.vue +++ b/src/modules/openapi/CompanyAccountListView.vue @@ -268,12 +268,12 @@ onMounted(() => { load(); loadCustomers() }) { prop: 'createDate', label: '创建时间', width: 170, slot: 'createDate' }, { label: '操作', width: 280, slot: 'action' } ]" - :data="list" + :data="list" :borderless="true" :loading="loading" :total="total" :page="page" :limit="limit" - :show-pagination="true" + :show-pagination="true" :page-sizes="[10, 20, 50, 100]" :error="loadError" empty-text="暂无公司账号数据" row-key="id" diff --git a/src/modules/order/OrderListView.vue b/src/modules/order/OrderListView.vue index 70e61b6..6f5f716 100644 --- a/src/modules/order/OrderListView.vue +++ b/src/modules/order/OrderListView.vue @@ -17,10 +17,11 @@ */ import { ref, onMounted, reactive, computed } from 'vue' import { useRouter, useRoute } from 'vue-router' -import { ElMessage } from 'element-plus' +import { ElMessage, ElMessageBox } from 'element-plus' import { httpGet } from '@/utils/request' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' +import ListTabs from '@/components/ListTabs/ListTabs.vue' import DataTable from '@/components/DataTable/DataTable.vue' interface Order { @@ -82,6 +83,25 @@ const filters = reactive({ endDate: '' }) const selection = ref([]) +const columns: any = computed(() => [ + { type: 'selection', label: '', width: 50 }, + { prop: 'orderNo', label: '订单号', width: 180 }, + { prop: 'contractCode', label: '合同号', width: 160, slot: 'contractCode' }, + { prop: 'enterpriseName', label: '供应商', minWidth: 180, slot: 'enterpriseName' }, + { prop: 'orderUserName', label: '采购方', minWidth: 160, slot: 'orderUserName' }, + { prop: 'totalAmount', label: '金额', width: 130, align: 'right', slot: 'amount' }, + { prop: 'totalNum', label: '数量', width: 80, align: 'center' }, + { prop: 'shippedNum', label: '已发', width: 80, align: 'center' }, + { prop: 'status', label: '状态', width: 110, align: 'center', slot: 'status' }, + { prop: 'createDate', label: '下单时间', width: 170, slot: 'time' }, + { label: '操作', width: 280, align: 'center', slot: 'action' } +]) +const tabItems = computed(() => STATUS_TABS.map(t => ({ + key: t.value, + label: t.label, + count: t.value === '' ? stats.all : (stats[Number(t.value)] || 0) +}))) +const stats = reactive>({ 0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, all: 0 }) const router = useRouter() const route = useRoute() @@ -127,6 +147,10 @@ async function load() { // 后端 total 是字符串 "1356", parseInt 兜底 const t = r?.total total.value = typeof t === 'string' ? parseInt(t, 10) : (Number(t) || 0) + // 各 status 计数 + Object.keys(stats).forEach(k => (stats as any)[k] = 0) + stats.all = rows.length + rows.forEach(r => { stats[r.status] = ((stats[r.status] as number) || 0) + 1 }) } catch (e: any) { error.value = e?.msg || e?.message || '加载失败' list.value = FALLBACK @@ -183,26 +207,13 @@ onMounted(load) - diff --git a/src/modules/other/goodunit/GoodunitListView.vue b/src/modules/other/goodunit/GoodunitListView.vue index b7df71c..634c01e 100644 --- a/src/modules/other/goodunit/GoodunitListView.vue +++ b/src/modules/other/goodunit/GoodunitListView.vue @@ -98,7 +98,7 @@ onMounted(load) :total="filtered.length" :page="1" :limit="filtered.length || 1" - :show-pagination="list.length > 20" + :show-pagination="list.length > 20" :page-sizes="[10, 20, 50, 100]" :error="error" empty-text="暂无单位" borderless diff --git a/src/modules/other/label/LabelListView.vue b/src/modules/other/label/LabelListView.vue index a83dbb8..862a21c 100644 --- a/src/modules/other/label/LabelListView.vue +++ b/src/modules/other/label/LabelListView.vue @@ -133,7 +133,7 @@ onMounted(load) :total="total" :page="page" :limit="limit" - :show-pagination="total > 10" + :show-pagination="total > 10" :page-sizes="[10, 20, 50, 100]" :error="error" empty-text="暂无标签" borderless diff --git a/src/modules/other/operateguide/OperateguideListView.vue b/src/modules/other/operateguide/OperateguideListView.vue index 5c25ad8..96620a9 100644 --- a/src/modules/other/operateguide/OperateguideListView.vue +++ b/src/modules/other/operateguide/OperateguideListView.vue @@ -23,7 +23,7 @@ interface Guide { const list = ref([]) const total = ref(0) const loading = ref(false) -const query = reactive({ page: 1, limit: 20 }) +const query = reactive({ page: 1, limit: 10 }) const columns = [ { prop: 'id', label: 'ID', width: 80 }, @@ -49,7 +49,8 @@ onMounted(load)
-
diff --git a/src/modules/other/textconfig/TextconfigListView.vue b/src/modules/other/textconfig/TextconfigListView.vue index 1dd98cf..6a0cf57 100644 --- a/src/modules/other/textconfig/TextconfigListView.vue +++ b/src/modules/other/textconfig/TextconfigListView.vue @@ -129,7 +129,7 @@ onMounted(load) :total="total" :page="page" :limit="limit" - :show-pagination="total > 10" + :show-pagination="total > 10" :page-sizes="[10, 20, 50, 100]" :error="error" empty-text="暂无常量" borderless diff --git a/src/modules/product/shop/ShopListView.vue b/src/modules/product/shop/ShopListView.vue deleted file mode 100644 index 7f05519..0000000 --- a/src/modules/product/shop/ShopListView.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - - - diff --git a/src/modules/supplier/ActivityListView.vue b/src/modules/supplier/ActivityListView.vue index ba9dc83..8d7824a 100644 --- a/src/modules/supplier/ActivityListView.vue +++ b/src/modules/supplier/ActivityListView.vue @@ -128,12 +128,12 @@ onMounted(() => { load() }) { prop: 'endTime', label: '结束时间', width: 170, slot: 'endTime' }, { label: '操作', width: 100, slot: 'action' } ]" - :data="list" + :data="list" :borderless="true" :loading="loading" :total="total" :page="page" :limit="limit" - :show-pagination="true" + :show-pagination="true" :page-sizes="[10, 20, 50, 100]" :error="loadError" empty-text="暂无活动" row-key="id" diff --git a/src/modules/supplier/couponscope/CouponScopeListView.vue b/src/modules/supplier/couponscope/CouponScopeListView.vue index a151c81..e26e8bd 100644 --- a/src/modules/supplier/couponscope/CouponScopeListView.vue +++ b/src/modules/supplier/couponscope/CouponScopeListView.vue @@ -90,7 +90,8 @@ onMounted(load) -