feat(jd-order): 更新订单状态及历史记录展示逻辑
- 修改cookie历史记录中“替换”为“换绑” - 新增订单历史中的“待支付”状态图标与样式 - 更新订单详情和列表中状态标签的颜色和文案 - 在订单历史抽屉中增加库存问题状态的图标和颜色配置 - 调整订单状态筛选选项,新增“下单京东订单失败”和“库存问题”两项 - 替换订单历史中“重新绑定”为“绑定”,并更新相关显示逻辑
This commit is contained in:
@@ -216,7 +216,7 @@ const getChangeTypeText = (
|
|||||||
case KamiApiJdCookieV1CookieHistoryInfoChangeTypeEnum.Delete:
|
case KamiApiJdCookieV1CookieHistoryInfoChangeTypeEnum.Delete:
|
||||||
return '删除';
|
return '删除';
|
||||||
case KamiApiJdCookieV1CookieHistoryInfoChangeTypeEnum.Replaced:
|
case KamiApiJdCookieV1CookieHistoryInfoChangeTypeEnum.Replaced:
|
||||||
return '替换';
|
return '换绑';
|
||||||
default:
|
default:
|
||||||
return changeType || '未知';
|
return changeType || '未知';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,10 @@
|
|||||||
v-else-if="item.changeType === 'unbind'"
|
v-else-if="item.changeType === 'unbind'"
|
||||||
:style="{ color: '#ff7d00', fontSize: '16px' }"
|
:style="{ color: '#ff7d00', fontSize: '16px' }"
|
||||||
/>
|
/>
|
||||||
|
<icon-clock-circle
|
||||||
|
v-else-if="item.changeType === 'pendPay'"
|
||||||
|
:style="{ color: '#ff7d00', fontSize: '16px' }"
|
||||||
|
/>
|
||||||
<icon-check-circle
|
<icon-check-circle
|
||||||
v-else-if="item.changeType === 'pay'"
|
v-else-if="item.changeType === 'pay'"
|
||||||
:style="{ color: '#00b42a', fontSize: '16px' }"
|
:style="{ color: '#00b42a', fontSize: '16px' }"
|
||||||
@@ -201,6 +205,7 @@ const getStatusColor = (changeType?: string): string => {
|
|||||||
create: 'green', // 创建
|
create: 'green', // 创建
|
||||||
bind: 'blue', // 绑定
|
bind: 'blue', // 绑定
|
||||||
unbind: 'orange', // 解绑
|
unbind: 'orange', // 解绑
|
||||||
|
pendPay: 'orange', // 待支付
|
||||||
pay: 'green', // 支付
|
pay: 'green', // 支付
|
||||||
expire: 'red', // 过期
|
expire: 'red', // 过期
|
||||||
invalid: 'gray', // 失效
|
invalid: 'gray', // 失效
|
||||||
@@ -216,6 +221,7 @@ const getStatusText = (changeType?: string): string => {
|
|||||||
create: '创建',
|
create: '创建',
|
||||||
bind: '绑定',
|
bind: '绑定',
|
||||||
unbind: '解绑',
|
unbind: '解绑',
|
||||||
|
pendPay: '待支付',
|
||||||
pay: '支付',
|
pay: '支付',
|
||||||
expire: '过期',
|
expire: '过期',
|
||||||
invalid: '失效',
|
invalid: '失效',
|
||||||
@@ -231,6 +237,7 @@ const getTimelineDotColor = (changeType?: string): string => {
|
|||||||
create: '#00b42a', // 创建
|
create: '#00b42a', // 创建
|
||||||
bind: '#165dff', // 绑定
|
bind: '#165dff', // 绑定
|
||||||
unbind: '#ff7d00', // 解绑
|
unbind: '#ff7d00', // 解绑
|
||||||
|
pendPay: '#ff7d00', // 待支付
|
||||||
pay: '#00b42a', // 支付
|
pay: '#00b42a', // 支付
|
||||||
expire: '#f53f3f', // 过期
|
expire: '#f53f3f', // 过期
|
||||||
invalid: '#86909c', // 失效
|
invalid: '#86909c', // 失效
|
||||||
|
|||||||
@@ -32,9 +32,13 @@
|
|||||||
<a-tag v-else-if="orderData.status === 2" color="green">已支付</a-tag>
|
<a-tag v-else-if="orderData.status === 2" color="green">已支付</a-tag>
|
||||||
<a-tag v-else-if="orderData.status === 3" color="red">已过期</a-tag>
|
<a-tag v-else-if="orderData.status === 3" color="red">已过期</a-tag>
|
||||||
<a-tag v-else-if="orderData.status === 4" color="gray">已取消</a-tag>
|
<a-tag v-else-if="orderData.status === 4" color="gray">已取消</a-tag>
|
||||||
<a-tag v-else-if="orderData.status === 5" color="purple">
|
<a-tag v-else-if="orderData.status === 5" color="orange">
|
||||||
Cookie账号Ck失败
|
cookie失效
|
||||||
</a-tag>
|
</a-tag>
|
||||||
|
<a-tag v-else-if="orderData.status === 6" color="red">
|
||||||
|
下单京东订单失败
|
||||||
|
</a-tag>
|
||||||
|
<a-tag v-else-if="orderData.status === 7" color="red">库存问题</a-tag>
|
||||||
<a-tag v-else color="gray">未知</a-tag>
|
<a-tag v-else color="gray">未知</a-tag>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="最后请求时间">
|
<a-descriptions-item label="最后请求时间">
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
:style="{ color: '#00b42a', fontSize: '16px' }"
|
:style="{ color: '#00b42a', fontSize: '16px' }"
|
||||||
/>
|
/>
|
||||||
<icon-link
|
<icon-link
|
||||||
v-else-if="item.changeType === 'rebind'"
|
v-else-if="item.changeType === 'bind'"
|
||||||
:style="{ color: '#165dff', fontSize: '16px' }"
|
:style="{ color: '#165dff', fontSize: '16px' }"
|
||||||
/>
|
/>
|
||||||
<icon-check-circle
|
<icon-check-circle
|
||||||
@@ -43,6 +43,10 @@
|
|||||||
v-else-if="item.changeType === 'jd_order_failed'"
|
v-else-if="item.changeType === 'jd_order_failed'"
|
||||||
:style="{ color: '#f53f3f', fontSize: '16px' }"
|
:style="{ color: '#f53f3f', fontSize: '16px' }"
|
||||||
/>
|
/>
|
||||||
|
<icon-minus-circle
|
||||||
|
v-else-if="item.changeType === 'stock_failed'"
|
||||||
|
:style="{ color: '#f53f3f', fontSize: '16px' }"
|
||||||
|
/>
|
||||||
<icon-more v-else :style="{ color: '#86909c', fontSize: '16px' }" />
|
<icon-more v-else :style="{ color: '#86909c', fontSize: '16px' }" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -110,6 +114,7 @@ import {
|
|||||||
IconClockCircle,
|
IconClockCircle,
|
||||||
IconCloseCircle,
|
IconCloseCircle,
|
||||||
IconExclamationCircle,
|
IconExclamationCircle,
|
||||||
|
IconMinusCircle,
|
||||||
IconSync,
|
IconSync,
|
||||||
IconMore
|
IconMore
|
||||||
} from '@arco-design/web-vue/es/icon';
|
} from '@arco-design/web-vue/es/icon';
|
||||||
@@ -188,11 +193,12 @@ const onPageSizeChange = (size: number) => {
|
|||||||
const getStatusColor = (changeType?: string): string => {
|
const getStatusColor = (changeType?: string): string => {
|
||||||
const colorMap: Record<string, string> = {
|
const colorMap: Record<string, string> = {
|
||||||
create: 'green', // 创建
|
create: 'green', // 创建
|
||||||
rebind: 'blue', // 重新绑定
|
|
||||||
pay: 'green', // 支付
|
pay: 'green', // 支付
|
||||||
expire: 'red', // 过期
|
expire: 'red', // 过期
|
||||||
ck_failed: 'orange', // cookie失效
|
bind: 'blue', // 绑定
|
||||||
jd_order_failed: 'red' // 下单京东订单失败
|
ck_failed: 'orange', // Ck失败
|
||||||
|
jd_order_failed: 'red', // 下单京东订单失败
|
||||||
|
stock_failed: 'red' // 库存问题
|
||||||
};
|
};
|
||||||
return colorMap[changeType || ''] || 'gray';
|
return colorMap[changeType || ''] || 'gray';
|
||||||
};
|
};
|
||||||
@@ -201,11 +207,12 @@ const getStatusColor = (changeType?: string): string => {
|
|||||||
const getStatusText = (changeType?: string): string => {
|
const getStatusText = (changeType?: string): string => {
|
||||||
const textMap: Record<string, string> = {
|
const textMap: Record<string, string> = {
|
||||||
create: '创建',
|
create: '创建',
|
||||||
rebind: '重新绑定',
|
|
||||||
pay: '支付',
|
pay: '支付',
|
||||||
expire: '过期',
|
expire: '过期',
|
||||||
ck_failed: 'cookie失效',
|
bind: '绑定',
|
||||||
jd_order_failed: '下单京东订单失败'
|
ck_failed: 'Ck失败',
|
||||||
|
jd_order_failed: '下单京东订单失败',
|
||||||
|
stock_failed: '库存问题'
|
||||||
};
|
};
|
||||||
return textMap[changeType || ''] || '未知状态';
|
return textMap[changeType || ''] || '未知状态';
|
||||||
};
|
};
|
||||||
@@ -214,11 +221,12 @@ const getStatusText = (changeType?: string): string => {
|
|||||||
const getTimelineDotColor = (changeType?: string): string => {
|
const getTimelineDotColor = (changeType?: string): string => {
|
||||||
const colorMap: Record<string, string> = {
|
const colorMap: Record<string, string> = {
|
||||||
create: '#00b42a', // 创建
|
create: '#00b42a', // 创建
|
||||||
rebind: '#165dff', // 重新绑定
|
|
||||||
pay: '#00b42a', // 支付
|
pay: '#00b42a', // 支付
|
||||||
expire: '#f53f3f', // 过期
|
expire: '#f53f3f', // 过期
|
||||||
ck_failed: '#ff7d00', // cookie失效
|
bind: '#165dff', // 绑定
|
||||||
jd_order_failed: '#f53f3f' // 下单京东订单失败
|
ck_failed: '#ff7d00', // Ck失败
|
||||||
|
jd_order_failed: '#f53f3f', // 下单京东订单失败
|
||||||
|
stock_failed: '#f53f3f' // 库存问题
|
||||||
};
|
};
|
||||||
return colorMap[changeType || ''] || '#86909c';
|
return colorMap[changeType || ''] || '#86909c';
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,7 +30,9 @@
|
|||||||
<a-option :value="2">已支付</a-option>
|
<a-option :value="2">已支付</a-option>
|
||||||
<a-option :value="3">已过期</a-option>
|
<a-option :value="3">已过期</a-option>
|
||||||
<a-option :value="4">已取消</a-option>
|
<a-option :value="4">已取消</a-option>
|
||||||
<a-option :value="5">Cookie账号Ck失败</a-option>
|
<a-option :value="5">cookie失效</a-option>
|
||||||
|
<a-option :value="6">下单京东订单失败</a-option>
|
||||||
|
<a-option :value="7">库存问题</a-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -85,9 +87,13 @@
|
|||||||
<a-tag v-else-if="record.status === 2" color="green">已支付</a-tag>
|
<a-tag v-else-if="record.status === 2" color="green">已支付</a-tag>
|
||||||
<a-tag v-else-if="record.status === 3" color="red">已过期</a-tag>
|
<a-tag v-else-if="record.status === 3" color="red">已过期</a-tag>
|
||||||
<a-tag v-else-if="record.status === 4" color="gray">已取消</a-tag>
|
<a-tag v-else-if="record.status === 4" color="gray">已取消</a-tag>
|
||||||
<a-tag v-else-if="record.status === 5" color="purple">
|
<a-tag v-else-if="record.status === 5" color="orange">
|
||||||
Cookie账号Ck失败
|
cookie失效
|
||||||
</a-tag>
|
</a-tag>
|
||||||
|
<a-tag v-else-if="record.status === 6" color="red">
|
||||||
|
下单京东订单失败
|
||||||
|
</a-tag>
|
||||||
|
<a-tag v-else-if="record.status === 7" color="red">库存问题</a-tag>
|
||||||
<a-tag v-else color="gray">未知</a-tag>
|
<a-tag v-else color="gray">未知</a-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #amount="{ record }">
|
<template #amount="{ record }">
|
||||||
|
|||||||
Reference in New Issue
Block a user