From 4b77d67dc232df1afd033eae61567482854efde7 Mon Sep 17 00:00:00 2001 From: Sisyphus Date: Tue, 7 Jul 2026 16:54:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(F006-W17.3.7):=20list=20=E9=A1=B5=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E8=A7=84=E8=8C=83=20(:borderless=20+=20:page-sizes)?= =?UTF-8?q?=20+=20product/shop=20redirect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 33 个 ListView.vue 加 :borderless=true + :page-sizes=[10,20,50,100] 覆盖: order/inquiry/finance/operateguide/sys/Dept|Menu|File|Notice| Params|User|Role|Post|DictType|DictData|Product|Schedule|RoleGroup user/Enterprise|enterpriselevel|enterprisescore|enterpriserating supplier/promoter|couponscope|historylog|logistics|ordercomment|Activity other/goodunit|label|textconfig api/feedback|help|lunbo openapi/AuditLog|CompanyAccount - OrderListView: columns 抽到 script setup (computed) + :borderless + :page-sizes + sub 动态显示选中数 - router/index.ts: /product/shop → redirect /supplier/good (删 src/modules/product/shop/ShopListView.vue 旧占位, 后端 404 无意义) - 沿用 W17 设计规范 v2 (PageHeader+SearchBar+DataTable+ListTabs) --- src/modules/api/feedback/FeedbackListView.vue | 2 +- src/modules/api/help/HelpListView.vue | 2 +- src/modules/api/lunbo/LunboListView.vue | 2 +- src/modules/inquiry/InquiryListView.vue | 77 +++---------- src/modules/openapi/AuditLogListView.vue | 2 +- .../openapi/CompanyAccountListView.vue | 4 +- src/modules/order/OrderListView.vue | 104 ++++++++++-------- .../other/goodunit/GoodunitListView.vue | 2 +- src/modules/other/label/LabelListView.vue | 2 +- .../operateguide/OperateguideListView.vue | 5 +- .../other/textconfig/TextconfigListView.vue | 2 +- src/modules/product/shop/ShopListView.vue | 86 --------------- src/modules/supplier/ActivityListView.vue | 4 +- .../couponscope/CouponScopeListView.vue | 3 +- .../historylog/HistorylogListView.vue | 3 +- .../supplier/logistics/LogisticsListView.vue | 3 +- .../ordercomment/OrderCommentListView.vue | 3 +- .../supplier/promoter/PromoterListView.vue | 3 +- src/modules/sys/DeptListView.vue | 1 + src/modules/sys/DictDataListView.vue | 2 +- src/modules/sys/DictTypeListView.vue | 2 +- src/modules/sys/FileListView.vue | 1 + src/modules/sys/MenuListView.vue | 1 + src/modules/sys/NoticeListView.vue | 2 +- src/modules/sys/ParamsListView.vue | 4 +- src/modules/sys/PostListView.vue | 2 +- src/modules/sys/ProductListView.vue | 2 +- src/modules/sys/RoleGroupListView.vue | 2 +- src/modules/sys/RoleListView.vue | 4 +- src/modules/sys/ScheduleListView.vue | 2 +- src/modules/sys/UserListView.vue | 4 +- src/modules/user/EnterpriseListView.vue | 4 +- src/modules/user/FinanceListView.vue | 11 +- src/modules/user/UserListView.vue | 2 +- .../EnterpriselevelListView.vue | 3 +- .../EnterpriseratingListView.vue | 3 +- .../EnterprisescoreListView.vue | 3 +- src/router/index.ts | 5 +- 38 files changed, 130 insertions(+), 239 deletions(-) delete mode 100644 src/modules/product/shop/ShopListView.vue 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) -