fix to customer detail
This commit is contained in:
@@ -1,7 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-can="permissionCodes.salesOrder.read" class="sales-order-detail">
|
<div v-can="permissionCodes.salesOrder.read" class="sales-order-detail">
|
||||||
<template v-if="order">
|
<template v-if="order">
|
||||||
<customer-profile-card v-if="order.customer" class="customer" :customer="order.customer" v-entrance-transition />
|
<customer-profile-card
|
||||||
|
v-if="order.customer"
|
||||||
|
class="customer"
|
||||||
|
:customer="order.customer"
|
||||||
|
v-entrance-transition
|
||||||
|
@click="toCustomerDetail"
|
||||||
|
/>
|
||||||
<section class="hero" v-entrance-transition>
|
<section class="hero" v-entrance-transition>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="eyebrow">销售订单</span>
|
<span class="eyebrow">销售订单</span>
|
||||||
@@ -432,6 +438,14 @@ async function saveEdit(): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function toCustomerDetail(): Promise<void> {
|
||||||
|
const customerId = order.value?.customer?.id;
|
||||||
|
if (!customerId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await router.push(`/management/customers/${customerId}`);
|
||||||
|
}
|
||||||
|
|
||||||
async function toEventRecord(): Promise<void> {
|
async function toEventRecord(): Promise<void> {
|
||||||
if (order.value?.sourceEventRecord?.id) await router.push(`/management/registration-event-records/${order.value.sourceEventRecord.id}`);
|
if (order.value?.sourceEventRecord?.id) await router.push(`/management/registration-event-records/${order.value.sourceEventRecord.id}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user