订单列表:列表重构 ④ 移除测试数据

(cherry picked from commit ebcbe63d9b)
This commit is contained in:
puhui999 2023-08-22 11:01:20 +08:00 committed by shizhong
parent c01a8f9e99
commit 8a7b6e2be1
4 changed files with 3 additions and 194 deletions

View File

@ -148,8 +148,6 @@ import { ElLoading } from 'element-plus'
import LoginFormTitle from './LoginFormTitle.vue' import LoginFormTitle from './LoginFormTitle.vue'
import type { RouteLocationNormalizedLoaded } from 'vue-router' import type { RouteLocationNormalizedLoaded } from 'vue-router'
// import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
// const { wsCache } = useCache()
import { useIcon } from '@/hooks/web/useIcon' import { useIcon } from '@/hooks/web/useIcon'
import * as authUtil from '@/utils/auth' import * as authUtil from '@/utils/auth'
@ -245,7 +243,6 @@ const handleLogin = async (params) => {
if (!res) { if (!res) {
return return
} }
// wsCache.delete(CACHE_KEY.USER) //
ElLoading.service({ ElLoading.service({
lock: true, lock: true,
text: '正在加载系统中...', text: '正在加载系统中...',

View File

@ -46,9 +46,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label-class-name="no-colon"> <el-descriptions-item label-class-name="no-colon">
<el-button size="small" type="primary">调整价格</el-button> <el-button size="small" type="primary">调整价格</el-button>
<!-- TODO 芋艿待实现 -->
<el-button size="small" type="primary" @click="openForm('remark')">备注</el-button> <el-button size="small" type="primary" @click="openForm('remark')">备注</el-button>
<!-- TODO 芋艿待实现 -->
<el-button size="small" type="primary" @click="openForm('delivery')">发货</el-button> <el-button size="small" type="primary" @click="openForm('delivery')">发货</el-button>
<!-- TODO 芋艿待实现 --> <!-- TODO 芋艿待实现 -->
<el-button size="small" type="primary">修改地址</el-button> <el-button size="small" type="primary">修改地址</el-button>
@ -354,11 +352,6 @@ const getDetail = async () => {
const id = params.orderId as unknown as number const id = params.orderId as unknown as number
if (id) { if (id) {
const res = (await TradeOrderApi.getOrder(id)) as TradeOrderApi.OrderVO const res = (await TradeOrderApi.getOrder(id)) as TradeOrderApi.OrderVO
// TODO 使
res.user = {
id: 247,
nickname: '小妮子'
}
orderInfo.value = res orderInfo.value = res
} }
} }

View File

@ -268,8 +268,6 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { formatToFraction } from '@/utils' import { formatToFraction } from '@/utils'
import { createImageViewer } from '@/components/ImageViewer' import { createImageViewer } from '@/components/ImageViewer'
// const message = useMessage() //
// const { t } = useI18n() //
const { currentRoute, push } = useRouter() // const { currentRoute, push } = useRouter() //
const loading = ref(true) // const loading = ref(true) //
@ -362,16 +360,7 @@ const getList = async () => {
loading.value = true loading.value = true
try { try {
const data = await TradeOrderApi.getOrderPage(queryParams) const data = await TradeOrderApi.getOrderPage(queryParams)
const list_ = data.list as OrderVO[] list.value = data.list
// TODO 使
list_.forEach((item) => {
item.user = {
id: 247,
nickname: '小妮子'
}
})
list.value = list_
total.value = data.total total.value = data.total
} finally { } finally {
loading.value = false loading.value = false
@ -399,8 +388,7 @@ watch(
) )
/** 初始化 **/ /** 初始化 **/
onMounted(() => { onMounted(async () => {
// list.value = testData await getList()
getList()
}) })
</script> </script>

View File

@ -1,169 +0,0 @@
import { OrderVO } from '@/api/mall/trade/order'
export const testData: OrderVO = [
{
id: 2,
no: '20230817002',
createTime: new Date('2023-08-17T11:30:00'),
type: 2,
terminal: 10,
userId: 1002,
userIp: '192.168.1.2',
userRemark: 'Urgent delivery required',
status: 20,
productCount: 2,
finishTime: null,
cancelTime: null,
cancelType: null,
remark: '',
payOrderId: 10002,
payed: false,
payTime: new Date('2023-08-17T12:30:00'),
payChannelCode: 'wx_app',
originalPrice: 80,
orderPrice: 80,
discountPrice: 0,
deliveryPrice: 5,
adjustPrice: 0,
payPrice: 85,
deliveryTemplateId: 2002,
logisticsId: null,
logisticsNo: '',
deliveryStatus: 0,
deliveryTime: null,
receiveTime: null,
receiverName: '李四',
receiverMobile: '19855568989',
receiverAreaId: 4002,
receiverPostCode: 54321,
receiverDetailAddress: '翻斗花园',
afterSaleStatus: 0,
refundPrice: 0,
couponId: null,
couponPrice: 0,
pointPrice: 0,
receiverAreaName: '北京市朝阳区',
items: [
{
id: 103,
userId: 1002,
orderId: 2,
spuId: 5003,
spuName: '毛绒鸭子',
skuId: 6003,
picUrl:
'http://127.0.0.1:48080/admin-api/infra/file/5/get/20220723041544165856414464011_BIG.jpg',
count: 1,
originalPrice: 40,
originalUnitPrice: 40,
discountPrice: 0,
payPrice: 40,
orderPartPrice: 40,
orderDividePrice: 40,
afterSaleStatus: 0,
properties: [
{ propertyId: 7001, propertyName: '颜色', valueId: 8004, valueName: '黄色' },
{ propertyId: 7002, propertyName: '尺寸', valueId: 8002, valueName: '小鸭子' }
]
},
{
id: 104,
userId: 1002,
orderId: 2,
spuId: 5004,
spuName: '毛绒鸭子',
skuId: 6004,
picUrl:
'http://127.0.0.1:48080/admin-api/infra/file/5/get/20220723041544165856414464011_BIG.jpg',
count: 1,
originalPrice: 40,
originalUnitPrice: 40,
discountPrice: 0,
payPrice: 40,
orderPartPrice: 40,
orderDividePrice: 40,
afterSaleStatus: 0,
properties: [
{ propertyId: 7001, propertyName: '颜色', valueId: 8004, valueName: '黄色' },
{ propertyId: 7002, propertyName: '尺寸', valueId: 8002, valueName: '大鸭子' }
]
}
],
user: {
id: 1002,
nickname: '小妮子',
avatar: 'https://example.com/images/avatar.jpg'
}
},
{
id: 3,
no: '20230817003',
createTime: new Date('2023-08-17T12:00:00'),
type: 1,
terminal: 10,
userId: 1003,
userIp: '192.168.1.3',
userRemark: '',
status: 10,
productCount: 1,
finishTime: new Date('2023-08-18T09:15:00'),
cancelTime: null,
cancelType: null,
remark: '',
payOrderId: 10003,
payed: true,
payTime: new Date('2023-08-17T12:30:00'),
payChannelCode: 'alipay_app',
originalPrice: 25,
orderPrice: 20,
discountPrice: 5,
deliveryPrice: 5,
adjustPrice: 0,
payPrice: 20,
deliveryTemplateId: 2001,
logisticsId: 3002,
logisticsNo: 'DEF987654',
deliveryStatus: 2,
deliveryTime: new Date('2023-08-18T10:30:00'),
receiveTime: new Date('2023-08-19T11:30:00'),
receiverName: '张三',
receiverMobile: '13988886656',
receiverAreaId: 4003,
receiverPostCode: 67890,
receiverDetailAddress: '成华大道',
afterSaleStatus: 0,
refundPrice: 0,
couponId: 2001,
couponPrice: 5,
pointPrice: 0,
receiverAreaName: '四川省成都市',
items: [
{
id: 105,
userId: 1003,
orderId: 3,
spuId: 5005,
spuName: '华为',
skuId: 6005,
picUrl: 'http://127.0.0.1:48080/admin-api/infra/file/5/get/sj.jpg',
count: 1,
originalPrice: 20,
originalUnitPrice: 20,
discountPrice: 5,
payPrice: 15,
orderPartPrice: 15,
orderDividePrice: 15,
afterSaleStatus: 0,
properties: [
{ propertyId: 7001, propertyName: '颜色', valueId: 8006, valueName: '紫色' },
{ propertyId: 7002, propertyName: '选配', valueId: 8002, valueName: '标配' }
]
}
],
user: {
id: 1003,
nickname: '无敌最俊朗',
avatar: 'https://example.com/images/avatar.jpg'
}
}
]