chore(api): 更新OpenAPI生成代码并优化导入格式
- 添加 /* eslint-disable */ 注释以忽略ESLint警告 - 优化导入语句格式,将多行导入合并为单行 - 重新生成DefaultApi相关接口代码 - 清理无用的空行和注释块 - 保留核心功能逻辑不变
This commit is contained in:
@@ -4,13 +4,17 @@
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ---------------- | ---------- | ----------------------- | --------------------------------- |
|
||||
| **id** | **number** | 主键ID | [optional] [default to undefined] |
|
||||
| **cookieId** | **string** | Cookie ID | [optional] [default to undefined] |
|
||||
| **cookieValue** | **string** | Cookie内容 | [optional] [default to undefined] |
|
||||
| **accountName** | **string** | 账户名称 | [optional] [default to undefined] |
|
||||
| **status** | **number** | 状态:1正常 2暂停 3失效 | [optional] [default to undefined] |
|
||||
| **failureCount** | **number** | 连续失败次数 | [optional] [default to undefined] |
|
||||
| **lastUsedAt** | **string** | 最后使用时间 | [optional] [default to undefined] |
|
||||
| **suspendUntil** | **string** | 暂停解除时间 | [optional] [default to undefined] |
|
||||
| **createdAt** | **string** | 创建时间 | [optional] [default to undefined] |
|
||||
| **updatedAt** | **string** | 更新时间 | [optional] [default to undefined] |
|
||||
| **deletedAt** | **string** | 删除时间 | [optional] [default to undefined] |
|
||||
| **remark** | **string** | 备注信息 | [optional] [default to undefined] |
|
||||
|
||||
## Example
|
||||
@@ -19,13 +23,17 @@
|
||||
import { KamiApiJdCookieV1CookieAccountInfo } from './api';
|
||||
|
||||
const instance: KamiApiJdCookieV1CookieAccountInfo = {
|
||||
id,
|
||||
cookieId,
|
||||
cookieValue,
|
||||
accountName,
|
||||
status,
|
||||
failureCount,
|
||||
lastUsedAt,
|
||||
suspendUntil,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
deletedAt,
|
||||
remark
|
||||
};
|
||||
```
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------ | ---------- | ----------- | ---------------------- |
|
||||
| **orderId** | **string** | 订单号 | [default to undefined] |
|
||||
| **amount** | **number** | 订单金额 | [default to undefined] |
|
||||
| **category** | **string** | 商品品类 | [default to undefined] |
|
||||
| Name | Type | Description | Notes |
|
||||
| --------------- | ---------- | ----------- | ---------------------- |
|
||||
| **userOrderId** | **string** | 用户订单号 | [default to undefined] |
|
||||
| **amount** | **number** | 订单金额 | [default to undefined] |
|
||||
| **category** | **string** | 商品品类 | [default to undefined] |
|
||||
|
||||
## Example
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
import { KamiApiJdCookieV1CreateOrderReq } from './api';
|
||||
|
||||
const instance: KamiApiJdCookieV1CreateOrderReq = {
|
||||
orderId,
|
||||
userOrderId,
|
||||
amount,
|
||||
category
|
||||
};
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
| ------------- | ---------- | ------------ | --------------------------------- |
|
||||
| **wxPayUrl** | **string** | 微信支付链接 | [optional] [default to undefined] |
|
||||
| **jdOrderId** | **string** | 京东订单号 | [optional] [default to undefined] |
|
||||
| **orderId** | **string** | 内部订单号 | [optional] [default to undefined] |
|
||||
|
||||
## Example
|
||||
|
||||
@@ -14,7 +15,8 @@ import { KamiApiJdCookieV1CreateOrderRes } from './api';
|
||||
|
||||
const instance: KamiApiJdCookieV1CreateOrderRes = {
|
||||
wxPayUrl,
|
||||
jdOrderId
|
||||
jdOrderId,
|
||||
orderId
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------ | ---------- | ------------ | --------------------------------- |
|
||||
| **wxPayUrl** | **string** | 微信支付链接 | [optional] [default to undefined] |
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ---------- | ------------ | --------------------------------- |
|
||||
| **wxPayUrl** | **string** | 微信支付链接 | [optional] [default to undefined] |
|
||||
| **jdOrderId** | **string** | 京东订单号 | [optional] [default to undefined] |
|
||||
| **orderId** | **string** | 内部订单号 | [optional] [default to undefined] |
|
||||
|
||||
## Example
|
||||
|
||||
@@ -12,7 +14,9 @@
|
||||
import { KamiApiJdCookieV1GetPaymentUrlRes } from './api';
|
||||
|
||||
const instance: KamiApiJdCookieV1GetPaymentUrlRes = {
|
||||
wxPayUrl
|
||||
wxPayUrl,
|
||||
jdOrderId,
|
||||
orderId
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -2,16 +2,27 @@
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ---------- | ------------------------------------- | --------------------------------- |
|
||||
| **jdOrderId** | **string** | 京东订单号 | [optional] [default to undefined] |
|
||||
| **orderId** | **string** | 关联的内部订单号 | [optional] [default to undefined] |
|
||||
| **amount** | **number** | 订单金额 | [optional] [default to undefined] |
|
||||
| **category** | **string** | 商品品类 | [optional] [default to undefined] |
|
||||
| **status** | **number** | 状态:1待支付 2已支付 3已过期 4已取消 | [optional] [default to undefined] |
|
||||
| **paidAt** | **string** | 支付时间 | [optional] [default to undefined] |
|
||||
| **createdAt** | **string** | 创建时间 | [optional] [default to undefined] |
|
||||
| **updatedAt** | **string** | 更新时间 | [optional] [default to undefined] |
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------------- | ---------- | ------------------------------------- | --------------------------------- |
|
||||
| **id** | **number** | 主键ID | [optional] [default to undefined] |
|
||||
| **jdOrderId** | **string** | 京东订单号 | [optional] [default to undefined] |
|
||||
| **payId** | **string** | 支付ID | [optional] [default to undefined] |
|
||||
| **amount** | **number** | 订单金额 | [optional] [default to undefined] |
|
||||
| **category** | **string** | 商品品类 | [optional] [default to undefined] |
|
||||
| **cookieId** | **string** | 使用的Cookie ID | [optional] [default to undefined] |
|
||||
| **status** | **number** | 状态:1待支付 2已支付 3已过期 4已取消 | [optional] [default to undefined] |
|
||||
| **wxPayUrl** | **string** | 微信支付链接 | [optional] [default to undefined] |
|
||||
| **wxPayExpireAt** | **string** | 微信支付链接过期时间 | [optional] [default to undefined] |
|
||||
| **orderExpireAt** | **string** | 订单过期时间(默认24小时) | [optional] [default to undefined] |
|
||||
| **currentOrderId** | **number** | 当前关联的订单ID | [optional] [default to undefined] |
|
||||
| **paidAt** | **string** | 支付完成时间 | [optional] [default to undefined] |
|
||||
| **cardNo** | **string** | 卡号 | [optional] [default to undefined] |
|
||||
| **cardPassword** | **string** | 卡密 | [optional] [default to undefined] |
|
||||
| **cardExtractedAt** | **string** | 卡密提取时间 | [optional] [default to undefined] |
|
||||
| **createdAt** | **string** | 创建时间 | [optional] [default to undefined] |
|
||||
| **updatedAt** | **string** | 更新时间 | [optional] [default to undefined] |
|
||||
| **deletedAt** | **string** | 删除时间 | [optional] [default to undefined] |
|
||||
| **orderId** | **string** | 关联的用户订单号 | [optional] [default to undefined] |
|
||||
|
||||
## Example
|
||||
|
||||
@@ -19,14 +30,25 @@
|
||||
import { KamiApiJdCookieV1JdOrderInfo } from './api';
|
||||
|
||||
const instance: KamiApiJdCookieV1JdOrderInfo = {
|
||||
id,
|
||||
jdOrderId,
|
||||
orderId,
|
||||
payId,
|
||||
amount,
|
||||
category,
|
||||
cookieId,
|
||||
status,
|
||||
wxPayUrl,
|
||||
wxPayExpireAt,
|
||||
orderExpireAt,
|
||||
currentOrderId,
|
||||
paidAt,
|
||||
cardNo,
|
||||
cardPassword,
|
||||
cardExtractedAt,
|
||||
createdAt,
|
||||
updatedAt
|
||||
updatedAt,
|
||||
deletedAt,
|
||||
orderId
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
@@ -13,10 +13,18 @@
|
||||
*/
|
||||
|
||||
export interface KamiApiJdCookieV1CookieAccountInfo {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* Cookie ID
|
||||
*/
|
||||
cookieId?: string;
|
||||
/**
|
||||
* Cookie内容
|
||||
*/
|
||||
cookieValue?: string;
|
||||
/**
|
||||
* 账户名称
|
||||
*/
|
||||
@@ -41,6 +49,14 @@ export interface KamiApiJdCookieV1CookieAccountInfo {
|
||||
* 创建时间
|
||||
*/
|
||||
createdAt?: string;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updatedAt?: string;
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
deletedAt?: string;
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
|
||||
export interface KamiApiJdCookieV1CreateOrderReq {
|
||||
/**
|
||||
* 订单号
|
||||
* 用户订单号
|
||||
*/
|
||||
orderId: string;
|
||||
userOrderId: string;
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
|
||||
@@ -21,4 +21,8 @@ export interface KamiApiJdCookieV1CreateOrderRes {
|
||||
* 京东订单号
|
||||
*/
|
||||
jdOrderId?: string;
|
||||
/**
|
||||
* 内部订单号
|
||||
*/
|
||||
orderId?: string;
|
||||
}
|
||||
|
||||
@@ -17,4 +17,12 @@ export interface KamiApiJdCookieV1GetPaymentUrlRes {
|
||||
* 微信支付链接
|
||||
*/
|
||||
wxPayUrl?: string;
|
||||
/**
|
||||
* 京东订单号
|
||||
*/
|
||||
jdOrderId?: string;
|
||||
/**
|
||||
* 内部订单号
|
||||
*/
|
||||
orderId?: string;
|
||||
}
|
||||
|
||||
@@ -13,14 +13,18 @@
|
||||
*/
|
||||
|
||||
export interface KamiApiJdCookieV1JdOrderInfo {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* 京东订单号
|
||||
*/
|
||||
jdOrderId?: string;
|
||||
/**
|
||||
* 关联的内部订单号
|
||||
* 支付ID
|
||||
*/
|
||||
orderId?: string;
|
||||
payId?: string;
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
@@ -29,14 +33,46 @@ export interface KamiApiJdCookieV1JdOrderInfo {
|
||||
* 商品品类
|
||||
*/
|
||||
category?: string;
|
||||
/**
|
||||
* 使用的Cookie ID
|
||||
*/
|
||||
cookieId?: string;
|
||||
/**
|
||||
* 状态:1待支付 2已支付 3已过期 4已取消
|
||||
*/
|
||||
status?: KamiApiJdCookieV1JdOrderInfoStatusEnum;
|
||||
/**
|
||||
* 支付时间
|
||||
* 微信支付链接
|
||||
*/
|
||||
wxPayUrl?: string;
|
||||
/**
|
||||
* 微信支付链接过期时间
|
||||
*/
|
||||
wxPayExpireAt?: string;
|
||||
/**
|
||||
* 订单过期时间(默认24小时)
|
||||
*/
|
||||
orderExpireAt?: string;
|
||||
/**
|
||||
* 当前关联的订单ID
|
||||
*/
|
||||
currentOrderId?: number;
|
||||
/**
|
||||
* 支付完成时间
|
||||
*/
|
||||
paidAt?: string;
|
||||
/**
|
||||
* 卡号
|
||||
*/
|
||||
cardNo?: string;
|
||||
/**
|
||||
* 卡密
|
||||
*/
|
||||
cardPassword?: string;
|
||||
/**
|
||||
* 卡密提取时间
|
||||
*/
|
||||
cardExtractedAt?: string;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@@ -45,6 +81,14 @@ export interface KamiApiJdCookieV1JdOrderInfo {
|
||||
* 更新时间
|
||||
*/
|
||||
updatedAt?: string;
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
deletedAt?: string;
|
||||
/**
|
||||
* 关联的用户订单号
|
||||
*/
|
||||
orderId?: string;
|
||||
}
|
||||
|
||||
export enum KamiApiJdCookieV1JdOrderInfoStatusEnum {
|
||||
|
||||
290
src/views/jd-order/components/order-history-drawer.vue
Normal file
290
src/views/jd-order/components/order-history-drawer.vue
Normal file
@@ -0,0 +1,290 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
v-model:visible="visible"
|
||||
:title="drawerTitle"
|
||||
width="600px"
|
||||
:footer="false"
|
||||
unmount-on-close
|
||||
>
|
||||
<div v-loading="loading" class="order-history-drawer">
|
||||
<div v-if="!loading && historyList.length === 0" class="empty-state">
|
||||
<a-empty description="暂无变更记录" />
|
||||
</div>
|
||||
|
||||
<a-timeline v-else class="history-timeline">
|
||||
<a-timeline-item
|
||||
v-for="(item, index) in historyList"
|
||||
:key="item.historyUuid"
|
||||
:dot-color="getTimelineDotColor(item.changeType)"
|
||||
:line-type="index === historyList.length - 1 ? 'dashed' : 'solid'"
|
||||
>
|
||||
<template #dot>
|
||||
<icon-history
|
||||
v-if="item.changeType === 'create'"
|
||||
:style="{ color: '#00b42a', fontSize: '16px' }"
|
||||
/>
|
||||
<icon-pay
|
||||
v-else-if="item.changeType === 'pay'"
|
||||
:style="{ color: '#165dff', fontSize: '16px' }"
|
||||
/>
|
||||
<icon-clock-circle
|
||||
v-else-if="item.changeType === 'expire'"
|
||||
:style="{ color: '#f53f3f', fontSize: '16px' }"
|
||||
/>
|
||||
<icon-refresh
|
||||
v-else-if="item.changeType === 'rebind'"
|
||||
:style="{ color: '#ff7d00', fontSize: '16px' }"
|
||||
/>
|
||||
<icon-more v-else :style="{ color: '#86909c', fontSize: '16px' }" />
|
||||
</template>
|
||||
|
||||
<div class="timeline-content">
|
||||
<div class="timeline-header">
|
||||
<a-tag :color="getChangeTypeColor(item.changeType)" size="small">
|
||||
{{ getChangeTypeText(item.changeType) }}
|
||||
</a-tag>
|
||||
<span class="timeline-time">
|
||||
{{ formatTime(item.createdAt) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="timeline-details">
|
||||
<div v-if="item.orderId" class="detail-item">
|
||||
<span class="detail-label">订单号:</span>
|
||||
<a-typography-text copyable>
|
||||
{{ item.orderId }}
|
||||
</a-typography-text>
|
||||
</div>
|
||||
|
||||
<div v-if="item.jdOrderId" class="detail-item">
|
||||
<span class="detail-label">京东订单号:</span>
|
||||
<a-typography-text copyable>
|
||||
{{ item.jdOrderId }}
|
||||
</a-typography-text>
|
||||
</div>
|
||||
|
||||
<div v-if="item.wxPayUrl" class="detail-item">
|
||||
<span class="detail-label">支付链接:</span>
|
||||
<a-link :href="item.wxPayUrl" target="_blank" type="primary">
|
||||
<template #icon>
|
||||
<icon-link />
|
||||
</template>
|
||||
查看支付链接
|
||||
</a-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-timeline-item>
|
||||
</a-timeline>
|
||||
|
||||
<!-- 分页 -->
|
||||
<div v-if="total > pageSize" class="pagination-wrapper">
|
||||
<a-pagination
|
||||
:current="currentPage"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
:show-total="true"
|
||||
:show-jumper="true"
|
||||
:show-page-size="true"
|
||||
@change="onPageChange"
|
||||
@page-size-change="onPageSizeChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { jdHistoryClient } from '@/api';
|
||||
import type {
|
||||
KamiApiJdCookieV1OrderHistoryInfo,
|
||||
ApiJdCookieHistoryOrderGetOrderTypeEnum
|
||||
} from '@/api/generated';
|
||||
|
||||
interface Props {
|
||||
visible: boolean;
|
||||
orderId?: string;
|
||||
orderType?: ApiJdCookieHistoryOrderGetOrderTypeEnum;
|
||||
}
|
||||
|
||||
interface Emits {
|
||||
(e: 'update:visible', value: boolean): void;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
visible: false,
|
||||
orderType: ApiJdCookieHistoryOrderGetOrderTypeEnum.User
|
||||
});
|
||||
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
// 数据状态
|
||||
const loading = ref(false);
|
||||
const historyList = ref<KamiApiJdCookieV1OrderHistoryInfo[]>([]);
|
||||
const total = ref(0);
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(20);
|
||||
|
||||
// 计算属性
|
||||
const visible = computed({
|
||||
get: () => props.visible,
|
||||
set: (value: boolean) => emit('update:visible', value)
|
||||
});
|
||||
|
||||
const drawerTitle = computed(() => {
|
||||
return props.orderId ? `订单变更记录 - ${props.orderId}` : '订单变更记录';
|
||||
});
|
||||
|
||||
// 获取变更记录
|
||||
const fetchHistory = async () => {
|
||||
if (!props.orderId) return;
|
||||
|
||||
loading.value = true;
|
||||
try {
|
||||
const response = await jdHistoryClient.apiJdCookieHistoryOrderGet({
|
||||
orderId: props.orderId,
|
||||
orderType: props.orderType!,
|
||||
page: currentPage.value,
|
||||
size: pageSize.value
|
||||
});
|
||||
|
||||
historyList.value = response.data.list || [];
|
||||
total.value = response.data.total || 0;
|
||||
} catch (error) {
|
||||
Message.error('获取变更记录失败');
|
||||
historyList.value = [];
|
||||
total.value = 0;
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 分页处理
|
||||
const onPageChange = (page: number) => {
|
||||
currentPage.value = page;
|
||||
fetchHistory();
|
||||
};
|
||||
|
||||
const onPageSizeChange = (size: number) => {
|
||||
pageSize.value = size;
|
||||
currentPage.value = 1;
|
||||
fetchHistory();
|
||||
};
|
||||
|
||||
// 获取变更类型颜色
|
||||
const getChangeTypeColor = (type?: string): string => {
|
||||
const colorMap: Record<string, string> = {
|
||||
create: 'green',
|
||||
pay: 'blue',
|
||||
expire: 'red',
|
||||
rebind: 'orange'
|
||||
};
|
||||
return colorMap[type || ''] || 'gray';
|
||||
};
|
||||
|
||||
// 获取变更类型文本
|
||||
const getChangeTypeText = (type?: string): string => {
|
||||
const textMap: Record<string, string> = {
|
||||
create: '创建订单',
|
||||
pay: '支付完成',
|
||||
expire: '订单过期',
|
||||
rebind: '重新绑定'
|
||||
};
|
||||
return textMap[type || ''] || '未知操作';
|
||||
};
|
||||
|
||||
// 获取时间线点颜色
|
||||
const getTimelineDotColor = (type?: string): string => {
|
||||
const colorMap: Record<string, string> = {
|
||||
create: '#00b42a',
|
||||
pay: '#165dff',
|
||||
expire: '#f53f3f',
|
||||
rebind: '#ff7d00'
|
||||
};
|
||||
return colorMap[type || ''] || '#86909c';
|
||||
};
|
||||
|
||||
// 格式化时间
|
||||
const formatTime = (time?: string): string => {
|
||||
if (!time) return '-';
|
||||
return new Date(time).toLocaleString('zh-CN', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
second: '2-digit'
|
||||
});
|
||||
};
|
||||
|
||||
// 监听visible变化,自动重置分页并获取数据
|
||||
watch(
|
||||
() => props.visible,
|
||||
newVal => {
|
||||
if (newVal && props.orderId) {
|
||||
currentPage.value = 1;
|
||||
pageSize.value = 20;
|
||||
fetchHistory();
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.order-history-drawer {
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.history-timeline {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.timeline-content {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.timeline-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.timeline-time {
|
||||
font-size: 12px;
|
||||
color: var(--color-text-3);
|
||||
}
|
||||
|
||||
.timeline-details {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
color: var(--color-text-3);
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
.pagination-wrapper {
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
@@ -101,6 +101,13 @@
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip content="变更记录">
|
||||
<a-button size="small" @click="showHistory(record)">
|
||||
<template #icon>
|
||||
<icon-history />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-table>
|
||||
@@ -146,6 +153,13 @@
|
||||
</a-descriptions>
|
||||
</div>
|
||||
</a-modal>
|
||||
|
||||
<!-- 变更记录侧边栏 -->
|
||||
<order-history-drawer
|
||||
v-model:visible="historyVisible"
|
||||
:order-id="currentOrderId"
|
||||
order-type="jd"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -157,6 +171,7 @@ import useLoading from '@/hooks/loading';
|
||||
import { Pagination } from '@/types/global';
|
||||
import { jdOrderClient } from '@/api';
|
||||
import type { KamiApiJdCookieV1JdOrderInfo } from '@/api/generated';
|
||||
import OrderHistoryDrawer from '../components/order-history-drawer.vue';
|
||||
|
||||
const { loading, setLoading } = useLoading(true);
|
||||
|
||||
@@ -280,6 +295,8 @@ const formModel = reactive<FormModel>({
|
||||
// 弹窗状态
|
||||
const detailVisible = ref(false);
|
||||
const currentOrder = ref<KamiApiJdCookieV1JdOrderInfo | null>(null);
|
||||
const historyVisible = ref(false);
|
||||
const currentOrderId = ref<string>('');
|
||||
|
||||
// 获取订单列表
|
||||
const fetchData = async (params: QueryParams = {}) => {
|
||||
@@ -387,6 +404,12 @@ const showDetail = (record: KamiApiJdCookieV1JdOrderInfo): void => {
|
||||
detailVisible.value = true;
|
||||
};
|
||||
|
||||
// 显示变更记录
|
||||
const showHistory = (record: KamiApiJdCookieV1JdOrderInfo): void => {
|
||||
currentOrderId.value = record.jdOrderId;
|
||||
historyVisible.value = true;
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
search();
|
||||
});
|
||||
|
||||
@@ -128,6 +128,13 @@
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip content="变更记录">
|
||||
<a-button size="small" @click="showHistory(record)">
|
||||
<template #icon>
|
||||
<icon-history />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-table>
|
||||
@@ -135,6 +142,13 @@
|
||||
|
||||
<!-- 订单详情弹窗 -->
|
||||
<order-detail v-model:visible="detailVisible" :order-data="currentOrder" />
|
||||
|
||||
<!-- 变更记录侧边栏 -->
|
||||
<order-history-drawer
|
||||
v-model:visible="historyVisible"
|
||||
:order-id="currentOrderId"
|
||||
order-type="user"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -150,6 +164,7 @@ import type {
|
||||
KamiApiJdCookieV1OrderInfo
|
||||
} from '@/api/generated';
|
||||
import OrderDetail from './components/order-detail.vue';
|
||||
import OrderHistoryDrawer from '../components/order-history-drawer.vue';
|
||||
|
||||
const { loading, setLoading } = useLoading(true);
|
||||
|
||||
@@ -283,6 +298,8 @@ const formModel = reactive<FormModel>({
|
||||
const detailVisible = ref(false);
|
||||
const currentOrder = ref<KamiApiJdCookieV1OrderInfo | null>(null);
|
||||
const paymentUrlLoading = ref<string[]>([]);
|
||||
const historyVisible = ref(false);
|
||||
const currentOrderId = ref<string>('');
|
||||
|
||||
// 获取订单列表
|
||||
const fetchData = async (params: QueryParams = {}) => {
|
||||
@@ -393,6 +410,12 @@ const showDetail = (record: KamiApiJdCookieV1OrderInfo): void => {
|
||||
detailVisible.value = true;
|
||||
};
|
||||
|
||||
// 显示变更记录
|
||||
const showHistory = (record: KamiApiJdCookieV1OrderInfo): void => {
|
||||
currentOrderId.value = record.orderId;
|
||||
historyVisible.value = true;
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
search();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user