feat(shopOrder): 添加订单商品明细展开功能并优化订单状态显示
- 在订单列表中增加商品明细的展开/收起功能,默认显示2条商品信息 - 支持点击“展开全部 N 件”切换显示全部或折叠商品明细 - 优化订单状态栏支付状态、发货状态、开票状态及操作按钮中的分隔线统一风格 - 将shop/dashboard运行天数改为基于租户创建时间,而非订阅生效时间,保证准确性 - 调整订单列表表格列宽及显示顺序,改善界面布局和信息展示 - 注释和代码格式微调,删除无用的组件显示及注释代码,提升代码整洁度 - 修复了部分变量定义和模板标签排版,完善代码可维护性
This commit is contained in:
@@ -4,3 +4,21 @@
|
|||||||
- 文件:`src/views/shop/shopOrder/index.vue` 的 `column.key === 'action'` 操作列模板。
|
- 文件:`src/views/shop/shopOrder/index.vue` 的 `column.key === 'action'` 操作列模板。
|
||||||
- 改动:原本操作列按钮只用 `<a-space>` 包裹、无分隔线;现按 `shop/shopGoods` 的写法,在「详情」与各条件块之间、以及块内多个按钮之间加入 `<a-divider type="vertical" />`。
|
- 改动:原本操作列按钮只用 `<a-space>` 包裹、无分隔线;现按 `shop/shopGoods` 的写法,在「详情」与各条件块之间、以及块内多个按钮之间加入 `<a-divider type="vertical" />`。
|
||||||
- 分隔线放在各 `<template v-if>` 条件块内部,仅当对应操作出现时才渲染,避免多余竖线。
|
- 分隔线放在各 `<template v-if>` 条件块内部,仅当对应操作出现时才渲染,避免多余竖线。
|
||||||
|
|
||||||
|
## 订单列表商品明细展开/收起(方案一已落地)
|
||||||
|
- 文件:`src/views/shop/shopOrder/index.vue`。
|
||||||
|
- 需求:商品明细较多时列表行被撑高,加「展开/收起」。采用方案一(单元格内展开),已确认执行。
|
||||||
|
- 实现:
|
||||||
|
- 新增 `expandedOrderIds: ref<Set<string>>`(用 `String(record.orderId)` 作 key,因 orderId 为 number|undefined)。
|
||||||
|
- 新增 `collapsedGoodsCount = 2`、`isOrderGoodsExpanded(record)`、`toggleOrderGoodsExpanded(record)`。
|
||||||
|
- 改写 `column.key === 'orderGoods'` 模板:默认 `record.orderGoods.slice(0, 2)`,超过 2 件显示「展开全部 N 件」,点击切换,展开后文案变「收起」。
|
||||||
|
- 类型检查:`vue-tsc --noEmit` 仅有的 3 处报错(line 2 `$router`/page-header、line 696/734 未用变量)均为项目既有,与本次改动无关。
|
||||||
|
|
||||||
|
## shop/dashboard 运行天数改为取租户创建时间
|
||||||
|
- 文件:`src/views/shop/dashboard/index.vue`。
|
||||||
|
- 需求:/dashboard 的"运行天数"要改用「租户创建时间」而不是订阅生效时间。
|
||||||
|
- 现状调查:
|
||||||
|
- `cms/dashboard`(站点控制台,标题"系统运行天数")已在提交 894592c 改为 `getTenantInfo().createTime`(租户创建时间),已是目标行为。
|
||||||
|
- `shop/dashboard`(商城后台,标签"运行天数")原用 `currentSubscription.startTime`(订阅生效时间)。
|
||||||
|
- 改动:将 shop/dashboard 的 `runDays` computed 改为取 `tenantStore.company?.createTime`(loadData 已 `tenantStore.fetchTenantInfo()` 写入 company)。同步更新顶部数据来源注释。
|
||||||
|
- 数据源说明:`getTenantInfo()` 返回 `Company`,其 `createTime` 字段即租户创建时间(`src/api/system/company/model/index.ts` line 164);`site.ts` 的 `runDays` getter 仍用 `siteInfo.createTime`(站点创建时间),目前 cms/dashboard 已不依赖它。
|
||||||
|
|||||||
@@ -344,10 +344,10 @@ const { loading: statisticsLoading } = storeToRefs(statisticsStore);
|
|||||||
// ============================================================
|
// ============================================================
|
||||||
// 基本信息:数据来源拆分
|
// 基本信息:数据来源拆分
|
||||||
// - 身份信息(系统名称/版本号/运行状态)来自 app_product (productId=65)
|
// - 身份信息(系统名称/版本号/运行状态)来自 app_product (productId=65)
|
||||||
// - 时间线(创建时间/到期时间/系统运行天数)来自 app_subscription
|
// - 时间线(开通时间/到期时间)来自 app_subscription
|
||||||
// · 创建时间 = subscription.startTime(订阅生效时间)
|
// · 开通时间 = subscription.startTime(订阅生效时间)
|
||||||
// · 到期时间 = subscription.expireTime
|
// · 到期时间 = subscription.expireTime
|
||||||
// · 系统运行天数 = 自 subscription.createTime 起累计
|
// - 系统运行天数 = 自租户创建时间起累计(tenantStore.company.createTime)
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// 当前应用产品(按固定 productId=65 查询)
|
// 当前应用产品(按固定 productId=65 查询)
|
||||||
const currentProduct = ref<AppProduct | null>(null);
|
const currentProduct = ref<AppProduct | null>(null);
|
||||||
@@ -643,15 +643,13 @@ const onPayModalClose = () => {
|
|||||||
// 计算属性
|
// 计算属性
|
||||||
const now = ref(Date.now());
|
const now = ref(Date.now());
|
||||||
let runDaysTimer: ReturnType<typeof setInterval>;
|
let runDaysTimer: ReturnType<typeof setInterval>;
|
||||||
// 系统运行天数:自订阅生效时间起累计
|
// 系统运行天数:自租户创建时间起累计
|
||||||
// 锚定 currentSubscription.startTime(与"创建时间"行同源,语义统一)。
|
// 锚定 tenantStore.company.createTime(租户建档时间),与后台租户创建时间一致。
|
||||||
// 注意:若后端续费为新增订阅记录,此处取的是 expireTime 最新的 active 订阅,
|
// 数据来源:loadData 中已调用 tenantStore.fetchTenantInfo() 写入 tenantStore.company。
|
||||||
// startTime 可能是续费生效日,runDays 会从续费日重新计数。
|
|
||||||
// 如需"累计运行天数",应改用最早的 active 订阅 startTime 或后端额外提供字段。
|
|
||||||
const runDays = computed(() => {
|
const runDays = computed(() => {
|
||||||
const startTime = currentSubscription.value?.startTime;
|
const createTime = tenantStore.company?.createTime;
|
||||||
if (!startTime) return 0;
|
if (!createTime) return 0;
|
||||||
return Math.floor((now.value - new Date(startTime).getTime()) / (24 * 60 * 60 * 1000));
|
return Math.floor((now.value - new Date(createTime).getTime()) / (24 * 60 * 60 * 1000));
|
||||||
});
|
});
|
||||||
const userCount = computed(() => statisticsStore.userCount);
|
const userCount = computed(() => statisticsStore.userCount);
|
||||||
const orderCount = computed(() => statisticsStore.orderCount);
|
const orderCount = computed(() => statisticsStore.orderCount);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
allow-clear
|
allow-clear
|
||||||
v-model:value="where.orderNo"
|
v-model:value="where.orderNo"
|
||||||
placeholder="订单编号"
|
placeholder="订单编号"
|
||||||
style="width: 260px"
|
style="width: 240px"
|
||||||
@search="reload"
|
@search="reload"
|
||||||
@pressEnter="reload"
|
@pressEnter="reload"
|
||||||
/>
|
/>
|
||||||
@@ -31,39 +31,37 @@
|
|||||||
<!-- <a-select-option :value="1">普通订单</a-select-option>-->
|
<!-- <a-select-option :value="1">普通订单</a-select-option>-->
|
||||||
<!-- <a-select-option :value="2">秒杀订单</a-select-option>-->
|
<!-- <a-select-option :value="2">秒杀订单</a-select-option>-->
|
||||||
<!-- <a-select-option :value="3">拼团订单</a-select-option>-->
|
<!-- <a-select-option :value="3">拼团订单</a-select-option>-->
|
||||||
<!-- </a-select>-->
|
|
||||||
<!-- <a-select-->
|
|
||||||
<!-- v-model:value="where.payStatus"-->
|
|
||||||
<!-- style="width: 150px"-->
|
|
||||||
<!-- placeholder="付款状态"-->
|
|
||||||
<!-- @change="search"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <a-select-option value="">全部</a-select-option>-->
|
|
||||||
<!-- <a-select-option :value="1">已付款</a-select-option>-->
|
|
||||||
<!-- <a-select-option :value="0">未付款</a-select-option>-->
|
|
||||||
<!-- </a-select>-->
|
<!-- </a-select>-->
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="where.orderStatus"
|
v-model:value="where.payStatus"
|
||||||
style="width: 150px"
|
style="width: 150px"
|
||||||
placeholder="订单状态"
|
placeholder="付款状态"
|
||||||
@change="search"
|
@change="search"
|
||||||
>
|
>
|
||||||
<a-select-option value="">全部</a-select-option>
|
<a-select-option value="">全部</a-select-option>
|
||||||
<a-select-option :value="1">已完成</a-select-option>
|
<a-select-option :value="1">已付款</a-select-option>
|
||||||
<!-- <a-select-option :value="0">未完成</a-select-option>-->
|
<a-select-option :value="0">未付款</a-select-option>
|
||||||
<!-- <a-select-option :value="2">未使用</a-select-option>-->
|
|
||||||
<a-select-option :value="3">已取消</a-select-option>
|
|
||||||
<a-select-option :value="4">退款中</a-select-option>
|
|
||||||
<a-select-option :value="5">退款被拒</a-select-option>
|
|
||||||
<a-select-option :value="6">退款成功</a-select-option>
|
|
||||||
</a-select>
|
</a-select>
|
||||||
<!-- <a-select-->
|
<!-- <a-select-->
|
||||||
<!-- :options="getPayType()"-->
|
<!-- v-model:value="where.orderStatus"-->
|
||||||
<!-- v-model:value="where.payType"-->
|
|
||||||
<!-- style="width: 150px"-->
|
<!-- style="width: 150px"-->
|
||||||
<!-- placeholder="付款方式"-->
|
<!-- placeholder="订单状态"-->
|
||||||
<!-- @change="search"-->
|
<!-- @change="search"-->
|
||||||
<!-- />-->
|
<!-- >-->
|
||||||
|
<!-- <a-select-option value="">全部</a-select-option>-->
|
||||||
|
<!-- <a-select-option :value="1">已完成</a-select-option>-->
|
||||||
|
<!-- <a-select-option :value="3">已取消</a-select-option>-->
|
||||||
|
<!-- <a-select-option :value="4">退款中</a-select-option>-->
|
||||||
|
<!-- <a-select-option :value="5">退款被拒</a-select-option>-->
|
||||||
|
<!-- <a-select-option :value="6">退款成功</a-select-option>-->
|
||||||
|
<!-- </a-select>-->
|
||||||
|
<a-select
|
||||||
|
:options="getPayType()"
|
||||||
|
v-model:value="where.payType"
|
||||||
|
style="width: 150px"
|
||||||
|
placeholder="付款方式"
|
||||||
|
@change="search"
|
||||||
|
/>
|
||||||
|
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
v-model:value="dateRange"
|
v-model:value="dateRange"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-page-header :title="getPageTitle()" @back="() => $router.go(-1)">
|
<a-page-header :title="getPageTitle()" @back="() => $router.go(-1)">
|
||||||
<a-card style="margin-bottom: 20px">
|
<div class="p-3 mb-2 bg-white">
|
||||||
<search
|
<search
|
||||||
@search="reload"
|
@search="reload"
|
||||||
:selection="selection"
|
:selection="selection"
|
||||||
@@ -9,32 +9,32 @@
|
|||||||
@remove="removeBatch"
|
@remove="removeBatch"
|
||||||
@batchMove="openMove"
|
@batchMove="openMove"
|
||||||
/>
|
/>
|
||||||
</a-card>
|
|
||||||
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
|
||||||
<div class="order-notify-bar">
|
|
||||||
<a-space>
|
|
||||||
<span class="order-notify-label">新订单提醒</span>
|
|
||||||
<a-switch
|
|
||||||
v-model:checked="notifyEnabled"
|
|
||||||
checked-children="开"
|
|
||||||
un-checked-children="关"
|
|
||||||
@change="onNotifyToggle"
|
|
||||||
/>
|
|
||||||
<a-tooltip
|
|
||||||
title="开启后每60秒自动检测新订单,检测到后播放叮声并语音播报"
|
|
||||||
>
|
|
||||||
<InfoCircleOutlined class="order-notify-tip" />
|
|
||||||
</a-tooltip>
|
|
||||||
<a-button
|
|
||||||
type="link"
|
|
||||||
size="small"
|
|
||||||
:disabled="!notifyEnabled"
|
|
||||||
@click="onTestNotify"
|
|
||||||
>
|
|
||||||
测试提醒
|
|
||||||
</a-button>
|
|
||||||
</a-space>
|
|
||||||
</div>
|
</div>
|
||||||
|
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
||||||
|
<!-- <div class="order-notify-bar">-->
|
||||||
|
<!-- <a-space>-->
|
||||||
|
<!-- <span class="order-notify-label">新订单提醒</span>-->
|
||||||
|
<!-- <a-switch-->
|
||||||
|
<!-- v-model:checked="notifyEnabled"-->
|
||||||
|
<!-- checked-children="开"-->
|
||||||
|
<!-- un-checked-children="关"-->
|
||||||
|
<!-- @change="onNotifyToggle"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- <a-tooltip-->
|
||||||
|
<!-- title="开启后每60秒自动检测新订单,检测到后播放叮声并语音播报"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <InfoCircleOutlined class="order-notify-tip" />-->
|
||||||
|
<!-- </a-tooltip>-->
|
||||||
|
<!-- <a-button-->
|
||||||
|
<!-- type="link"-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- :disabled="!notifyEnabled"-->
|
||||||
|
<!-- @click="onTestNotify"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- 测试提醒-->
|
||||||
|
<!-- </a-button>-->
|
||||||
|
<!-- </a-space>-->
|
||||||
|
<!-- </div>-->
|
||||||
<a-tabs type="card" v-model:activeKey="activeKey" @change="onTabs">
|
<a-tabs type="card" v-model:activeKey="activeKey" @change="onTabs">
|
||||||
<a-tab-pane key="all" tab="全部"/>
|
<a-tab-pane key="all" tab="全部"/>
|
||||||
<a-tab-pane key="unpaid" tab="待付款"/>
|
<a-tab-pane key="unpaid" tab="待付款"/>
|
||||||
@@ -50,7 +50,8 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
:datasource="datasource"
|
:datasource="datasource"
|
||||||
:customRow="customRow"
|
:customRow="customRow"
|
||||||
:scroll="{ x: 1800 }"
|
v-model:selection="selection"
|
||||||
|
:scroll="{ x: 1600 }"
|
||||||
size="small"
|
size="small"
|
||||||
cache-key="proShopOrderTable"
|
cache-key="proShopOrderTable"
|
||||||
:toolbar="false"
|
:toolbar="false"
|
||||||
@@ -70,10 +71,7 @@
|
|||||||
<div class="leading-tight">
|
<div class="leading-tight">
|
||||||
<div class="cursor-pointer" @click.stop="onSearch(record)">
|
<div class="cursor-pointer" @click.stop="onSearch(record)">
|
||||||
{{
|
{{
|
||||||
record.nickname ||
|
record.realName
|
||||||
record.realName ||
|
|
||||||
record.name ||
|
|
||||||
'匿名'
|
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -91,16 +89,6 @@
|
|||||||
<template v-if="column.key === 'statusInfo'">
|
<template v-if="column.key === 'statusInfo'">
|
||||||
<div class="py-1">
|
<div class="py-1">
|
||||||
<a-space :size="6" wrap>
|
<a-space :size="6" wrap>
|
||||||
<!-- 货到付款标识 -->
|
|
||||||
<a-tag
|
|
||||||
v-if="record.payType === 8"
|
|
||||||
color="blue"
|
|
||||||
>货到付款</a-tag>
|
|
||||||
<!-- 线下付款标识 -->
|
|
||||||
<a-tag
|
|
||||||
v-if="record.payType === 9"
|
|
||||||
color="orange"
|
|
||||||
>线下付款</a-tag>
|
|
||||||
|
|
||||||
<!-- 支付状态 -->
|
<!-- 支付状态 -->
|
||||||
<a-tag
|
<a-tag
|
||||||
@@ -108,54 +96,63 @@
|
|||||||
color="green"
|
color="green"
|
||||||
@click.stop="updatePayStatus(record)"
|
@click.stop="updatePayStatus(record)"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
>已付款</a-tag
|
>已付款
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<a-tag
|
<a-tag
|
||||||
v-else-if="record.payStatus == 1 && record.payType === 8"
|
v-else-if="record.payStatus == 1 && record.payType === 8"
|
||||||
color="green"
|
color="green"
|
||||||
@click.stop="updatePayStatus(record)"
|
@click.stop="updatePayStatus(record)"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
>待收货付款</a-tag
|
>待收货付款
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<a-tag
|
<a-tag
|
||||||
v-else-if="record.payStatus == 1 && record.payType === 9"
|
v-else-if="record.payStatus == 1 && record.payType === 9"
|
||||||
color="green"
|
color="green"
|
||||||
@click.stop="updatePayStatus(record)"
|
@click.stop="updatePayStatus(record)"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
>已确认收款</a-tag
|
>已确认收款
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<a-tag
|
<a-tag
|
||||||
v-else-if="record.payStatus == 0 && record.payType === 9"
|
v-else-if="record.payStatus == 0 && record.payType === 9"
|
||||||
color="orange"
|
color="orange"
|
||||||
@click.stop="updatePayStatus(record)"
|
@click.stop="updatePayStatus(record)"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
>待确认收款</a-tag
|
>待确认收款
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<a-tag
|
<a-tag
|
||||||
v-else-if="record.payStatus == 0 || record.payStatus == null"
|
v-else-if="record.payStatus == 0 || record.payStatus == null"
|
||||||
@click.stop="updatePayStatus(record)"
|
@click.stop="updatePayStatus(record)"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
>未付款</a-tag
|
>未付款
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<a-tag
|
<a-tag
|
||||||
v-else-if="record.payStatus == 3"
|
v-else-if="record.payStatus == 3"
|
||||||
color="orange"
|
color="orange"
|
||||||
@click.stop="updatePayStatus(record)"
|
@click.stop="updatePayStatus(record)"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
>占场中</a-tag
|
>占场中
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- 发货状态 -->
|
<!-- 发货状态 -->
|
||||||
<a-tag
|
<a-tag
|
||||||
v-if="record.deliveryStatus == 10"
|
v-if="record.deliveryStatus == 10"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
>未发货</a-tag
|
>未发货
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<a-tag v-if="record.deliveryStatus == 20" color="green"
|
<a-tag v-if="record.deliveryStatus == 20" color="green"
|
||||||
>已发货</a-tag
|
>已发货
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<a-tag v-if="record.deliveryStatus == 30" color="blue"
|
<a-tag v-if="record.deliveryStatus == 30" color="blue"
|
||||||
>部分发货</a-tag
|
>部分发货
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- 开票状态 -->
|
<!-- 开票状态 -->
|
||||||
@@ -166,23 +163,29 @@
|
|||||||
<!-- 订单状态 -->
|
<!-- 订单状态 -->
|
||||||
<a-tag v-if="record.orderStatus === 0">未完成</a-tag>
|
<a-tag v-if="record.orderStatus === 0">未完成</a-tag>
|
||||||
<a-tag v-if="record.orderStatus === 1" color="green"
|
<a-tag v-if="record.orderStatus === 1" color="green"
|
||||||
>已完成</a-tag
|
>已完成
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<a-tag v-if="record.orderStatus === 2">已关闭</a-tag>
|
<a-tag v-if="record.orderStatus === 2">已关闭</a-tag>
|
||||||
<a-tag v-if="record.orderStatus === 3" color="red"
|
<a-tag v-if="record.orderStatus === 3" color="red"
|
||||||
>关闭中</a-tag
|
>关闭中
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<a-tag v-if="record.orderStatus === 4" color="red"
|
<a-tag v-if="record.orderStatus === 4" color="red"
|
||||||
>退款申请中</a-tag
|
>退款申请中
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<a-tag v-if="record.orderStatus === 5" color="red"
|
<a-tag v-if="record.orderStatus === 5" color="red"
|
||||||
>退款被拒绝</a-tag
|
>退款被拒绝
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<a-tag v-if="record.orderStatus === 6" color="orange"
|
<a-tag v-if="record.orderStatus === 6" color="orange"
|
||||||
>已退款</a-tag
|
>已退款
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<a-tag v-if="record.orderStatus === 7" color="pink"
|
<a-tag v-if="record.orderStatus === 7" color="pink"
|
||||||
>客户端申请退款</a-tag
|
>客户端申请退款
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
<!-- 结算状态 -->
|
<!-- 结算状态 -->
|
||||||
<!-- <a-tag v-if="record.isSettled === 0">未结算</a-tag>-->
|
<!-- <a-tag v-if="record.isSettled === 0">未结算</a-tag>-->
|
||||||
@@ -193,24 +196,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'orderGoods'">
|
<template v-if="column.key === 'orderGoods'">
|
||||||
<template
|
<a-space
|
||||||
v-for="(item, index) in isOrderGoodsExpanded(record)
|
v-for="(item, index) in isOrderGoodsExpanded(record)
|
||||||
? record.orderGoods
|
? record.orderGoods
|
||||||
: (record.orderGoods || []).slice(0, collapsedGoodsCount)"
|
: (record.orderGoods || []).slice(0, collapsedGoodsCount)"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<div class="item py-1">
|
|
||||||
<a-space :id="`g-${index}`">
|
|
||||||
<a-avatar :src="getCompressedImageUrl(item.image,{ width: 100 })" shape="square" :size="50"/>
|
<a-avatar :src="getCompressedImageUrl(item.image,{ width: 100 })" shape="square" :size="50"/>
|
||||||
|
<div class="flex flex-col">
|
||||||
<span>{{ item.goodsName }}</span>
|
<span>{{ item.goodsName }}</span>
|
||||||
</a-space>
|
<span class="text-gray-400 text-xs"> x {{ item.totalNum }} </span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</a-space>
|
||||||
<div
|
<div
|
||||||
v-if="record.orderGoods && record.orderGoods.length > collapsedGoodsCount"
|
v-if="record.orderGoods && record.orderGoods.length > collapsedGoodsCount"
|
||||||
class="mt-1"
|
class="mt-1"
|
||||||
>
|
>
|
||||||
<a @click.stop="toggleOrderGoodsExpanded(record)">
|
<a @click.stop="toggleOrderGoodsExpanded(record)" class="text-xs">
|
||||||
<template v-if="isOrderGoodsExpanded(record)">收起</template>
|
<template v-if="isOrderGoodsExpanded(record)">收起</template>
|
||||||
<template v-else>展开全部 {{ record.orderGoods.length }} 件</template>
|
<template v-else>展开全部 {{ record.orderGoods.length }} 件</template>
|
||||||
</a>
|
</a>
|
||||||
@@ -219,11 +221,11 @@
|
|||||||
<template v-if="column.key === 'payType'">
|
<template v-if="column.key === 'payType'">
|
||||||
<!-- 货到付款特殊标识 -->
|
<!-- 货到付款特殊标识 -->
|
||||||
<template v-if="record.payType === 8">
|
<template v-if="record.payType === 8">
|
||||||
<a-tag color="blue">货到付款</a-tag>
|
<span>货到付款</span>
|
||||||
</template>
|
</template>
|
||||||
<!-- 线下付款特殊标识 -->
|
<!-- 线下付款特殊标识 -->
|
||||||
<template v-else-if="record.payType === 9">
|
<template v-else-if="record.payType === 9">
|
||||||
<a-tag color="orange">线下付款</a-tag>
|
<span class="text-sm">线下付款</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<template v-for="item in getPayType()">
|
<template v-for="item in getPayType()">
|
||||||
@@ -283,7 +285,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 线下付款·待确认收款状态的操作(支持先发货后结款) -->
|
<!-- 线下付款·待确认收款状态的操作(支持先发货后结款) -->
|
||||||
<template v-if="!record.payStatus && record.orderStatus === 0 && record.payType === 9 && record.deliveryStatus === 10">
|
<template
|
||||||
|
v-if="!record.payStatus && record.orderStatus === 0 && record.payType === 9 && record.deliveryStatus === 10">
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a @click.stop="handleConfirmOfflinePayment(record)" class="ele-text-success">
|
<a @click.stop="handleConfirmOfflinePayment(record)" class="ele-text-success">
|
||||||
确认收款
|
确认收款
|
||||||
@@ -299,7 +302,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 线下付款·已发货未收款状态的操作(先发货后结款) -->
|
<!-- 线下付款·已发货未收款状态的操作(先发货后结款) -->
|
||||||
<template v-if="!record.payStatus && record.orderStatus === 0 && record.payType === 9 && record.deliveryStatus === 20">
|
<template
|
||||||
|
v-if="!record.payStatus && record.orderStatus === 0 && record.payType === 9 && record.deliveryStatus === 20">
|
||||||
<a-divider type="vertical"/>
|
<a-divider type="vertical"/>
|
||||||
<a @click.stop="handleConfirmOfflinePayment(record)" class="ele-text-success">
|
<a @click.stop="handleConfirmOfflinePayment(record)" class="ele-text-success">
|
||||||
确认收款
|
确认收款
|
||||||
@@ -431,7 +435,6 @@
|
|||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import {
|
import {
|
||||||
ExclamationCircleOutlined,
|
ExclamationCircleOutlined,
|
||||||
InfoCircleOutlined
|
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import Search from './components/search.vue';
|
import Search from './components/search.vue';
|
||||||
import {getPageTitle} from '@/utils/common';
|
import {getPageTitle} from '@/utils/common';
|
||||||
@@ -562,52 +565,45 @@
|
|||||||
title: '订单编号',
|
title: '订单编号',
|
||||||
dataIndex: 'orderNo',
|
dataIndex: 'orderNo',
|
||||||
key: 'orderNo',
|
key: 'orderNo',
|
||||||
width: 200,
|
width: 150
|
||||||
align: 'center'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '用户信息',
|
title: '买家信息',
|
||||||
dataIndex: 'userId',
|
dataIndex: 'userId',
|
||||||
key: 'userInfo'
|
key: 'userInfo',
|
||||||
|
width: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '商品信息',
|
title: '商品信息',
|
||||||
dataIndex: 'orderGoods',
|
dataIndex: 'orderGoods',
|
||||||
key: 'orderGoods'
|
key: 'orderGoods',
|
||||||
|
width: 300,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实付金额',
|
title: '实付金额',
|
||||||
dataIndex: 'payPrice',
|
dataIndex: 'payPrice',
|
||||||
key: 'payPrice',
|
key: 'payPrice',
|
||||||
align: 'center',
|
|
||||||
width: 120,
|
|
||||||
customRender: ({text}) => '¥' + text
|
customRender: ({text}) => '¥' + text
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// title: '支付方式',
|
title: '支付方式',
|
||||||
// dataIndex: 'payType',
|
dataIndex: 'payType',
|
||||||
// key: 'payType',
|
key: 'payType'
|
||||||
// align: 'center',
|
},
|
||||||
// width: 120,
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
dataIndex: 'orderStatus',
|
dataIndex: 'orderStatus',
|
||||||
key: 'statusInfo',
|
key: 'statusInfo',
|
||||||
align: 'center'
|
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: '备注',
|
// title: '备注',
|
||||||
// dataIndex: 'comments',
|
// dataIndex: 'comments',
|
||||||
// key: 'comments',
|
// key: 'comments',
|
||||||
// align: 'center',
|
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
key: 'createTime',
|
key: 'createTime',
|
||||||
width: 180,
|
|
||||||
align: 'center',
|
|
||||||
sorter: true,
|
sorter: true,
|
||||||
customRender: ({text}) => toDateString(text)
|
customRender: ({text}) => toDateString(text)
|
||||||
},
|
},
|
||||||
@@ -663,7 +659,8 @@
|
|||||||
updateUser({
|
updateUser({
|
||||||
userId: record.userId,
|
userId: record.userId,
|
||||||
realName: record.realName
|
realName: record.realName
|
||||||
}).then(() => {});
|
}).then(() => {
|
||||||
|
});
|
||||||
}
|
}
|
||||||
reload();
|
reload();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<a-page-header :title="getPageTitle()" @back="() => $router.go(-1)">
|
<a-page-header :title="getPageTitle()" @back="() => $router.go(-1)">
|
||||||
<!-- 高级筛选 -->
|
<!-- 高级筛选 -->
|
||||||
<a-form layout="inline" class="ele-form-inline" style="margin-bottom: 16px">
|
<a-form layout="inline" class="ele-form-inline" style="margin-bottom: 16px">
|
||||||
<a-form-item label="角色">
|
<a-form-item>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="searchWhere.roleId"
|
v-model:value="searchWhere.roleId"
|
||||||
placeholder="全部角色"
|
placeholder="全部角色"
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
>
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="注册来源">
|
<a-form-item>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="searchWhere.platform"
|
v-model:value="searchWhere.platform"
|
||||||
placeholder="全部来源"
|
placeholder="全部来源"
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<a-select-option value="WEB">Web</a-select-option>
|
<a-select-option value="WEB">Web</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="类型">
|
<a-form-item>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="searchWhere.isAdmin"
|
v-model:value="searchWhere.isAdmin"
|
||||||
placeholder="全部"
|
placeholder="全部"
|
||||||
|
|||||||
Reference in New Issue
Block a user