remove customer package
This commit is contained in:
@@ -52,7 +52,19 @@
|
||||
v-entrance-transition="210"
|
||||
@edit="openTagSelector"
|
||||
/>
|
||||
<t-cell-group theme="card" v-entrance-transition="280">
|
||||
<t-cell-group v-if="canReadSalesOrder" title="销售订单" theme="card" v-entrance-transition="280">
|
||||
<t-cell title="产品订单列表" arrow @click="toProductOrderList">
|
||||
<template #left-icon>
|
||||
<t-icon name="order" />
|
||||
</template>
|
||||
</t-cell>
|
||||
<t-cell title="套餐订单列表" arrow @click="toPackageOrderList">
|
||||
<template #left-icon>
|
||||
<t-icon name="layers" />
|
||||
</template>
|
||||
</t-cell>
|
||||
</t-cell-group>
|
||||
<t-cell-group theme="card" v-entrance-transition="350">
|
||||
<t-cell v-if="canReadEventRecord" title="最近登记事件" arrow @click="toEventRecordList">
|
||||
<template #left-icon>
|
||||
<t-icon name="history" />
|
||||
@@ -79,7 +91,7 @@
|
||||
v-if="inviter"
|
||||
:title="`由 ${inviter.name} 邀请`"
|
||||
theme="card"
|
||||
v-entrance-transition="350"
|
||||
v-entrance-transition="420"
|
||||
>
|
||||
<customer-profile-card :customer="inviter" @click="toCustomerDetail(inviter)"/>
|
||||
</t-cell-group>
|
||||
@@ -137,6 +149,7 @@ import { useNavBarStore } from "@/store/navBarStore";
|
||||
import type { BodyAreaValue, Customer } from "@/types/Customer";
|
||||
import type { PointAccount } from "@/types/Point";
|
||||
import type { PhotoItem } from "@/types/Photo";
|
||||
import type { GaoSalesOrderType } from "@/types/SalesOrder";
|
||||
import type { Tag } from "@/types/Tag";
|
||||
import { bodyAreaLabelMap } from "@/utils/bodyArea";
|
||||
import { getAttachmentReadURL } from "@/utils/attachment";
|
||||
@@ -160,6 +173,7 @@ const removeTarget = ref<Customer>();
|
||||
const canReadStat = computed(() => userStore.hasPermissions(permissionCodes.stat.read));
|
||||
const canReadEventRecord = computed(() => userStore.hasPermissions(permissionCodes.eventRecord.read));
|
||||
const canReadPointAccount = computed(() => userStore.hasPermissions(permissionCodes.point.accountRead));
|
||||
const canReadSalesOrder = computed(() => userStore.hasPermissions(permissionCodes.salesOrder.read));
|
||||
const canReadTag = computed(() => userStore.hasPermissions(corePermissionCodes.tag.read));
|
||||
const canApplyTag = computed(() => userStore.hasPermissions(corePermissionCodes.tag.apply));
|
||||
const canUpdateCustomer = computed(() => userStore.hasPermissions(permissionCodes.customer.update));
|
||||
@@ -390,6 +404,28 @@ async function toEventRecordList(): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
async function toSalesOrderList(orderType: GaoSalesOrderType): Promise<void> {
|
||||
if (!customer.value?.id || !canReadSalesOrder.value) {
|
||||
return;
|
||||
}
|
||||
await router.push({
|
||||
name: "SalesOrderList",
|
||||
query: {
|
||||
customerId: customer.value.id,
|
||||
orderType,
|
||||
transitionDepth: String(Number(route.meta.depth ?? 0) + 1)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function toProductOrderList(): Promise<void> {
|
||||
await toSalesOrderList("DIRECT_PRODUCT");
|
||||
}
|
||||
|
||||
async function toPackageOrderList(): Promise<void> {
|
||||
await toSalesOrderList("PACKAGE");
|
||||
}
|
||||
|
||||
async function toEdit(): Promise<void> {
|
||||
if (!customer.value?.id) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user