Skip to content

Commit b363997

Browse files
author
puhui999
committed
完善订单详情
1 parent f44688d commit b363997

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/views/mall/trade/order/detail/index.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ import OrderDeliveryForm from '@/views/mall/trade/order/form/OrderDeliveryForm.v
195195
import OrderUpdateAddressForm from '@/views/mall/trade/order/form/OrderUpdateAddressForm.vue'
196196
import OrderUpdatePriceForm from '@/views/mall/trade/order/form/OrderUpdatePriceForm.vue'
197197
import * as DeliveryExpressApi from '@/api/mall/trade/delivery/express'
198+
import { useTagsViewStore } from '@/store/modules/tagsView'
198199
199200
defineOptions({ name: 'TradeOrderDetail' })
200201
@@ -242,10 +243,20 @@ const getDetail = async () => {
242243
const id = params.orderId as unknown as number
243244
if (id) {
244245
const res = (await TradeOrderApi.getOrder(id)) as TradeOrderApi.OrderVO
246+
// 没有表单信息则关闭页面返回
247+
if (res === null) {
248+
close()
249+
}
245250
formData.value = res
246251
}
247252
}
248-
253+
const { delView } = useTagsViewStore() // 视图操作
254+
const { push, currentRoute } = useRouter() // 路由
255+
/** 关闭 tag */
256+
const close = () => {
257+
delView(unref(currentRoute))
258+
push({ name: 'TradeAfterSale' })
259+
}
249260
/** 复制 */
250261
const clipboardSuccess = () => {
251262
message.success('复制成功')

0 commit comments

Comments
 (0)