add package order in detail
This commit is contained in:
@@ -20,6 +20,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
<t-cell-group v-if="canReadSalesOrder" theme="card" v-entrance-transition="35">
|
||||||
|
<t-cell title="套餐订单列表" arrow @click="toPackageOrderList">
|
||||||
|
<template #left-icon>
|
||||||
|
<t-icon name="gift" />
|
||||||
|
</template>
|
||||||
|
</t-cell>
|
||||||
|
</t-cell-group>
|
||||||
<t-cell-group title="基本信息" theme="card" v-entrance-transition="70">
|
<t-cell-group title="基本信息" theme="card" v-entrance-transition="70">
|
||||||
<t-cell title="标准价" :note="formatPackageAmount(config.standardAmount)" />
|
<t-cell title="标准价" :note="formatPackageAmount(config.standardAmount)" />
|
||||||
<t-cell title="起始日期" :note="config.beginAt ? Time.toDateTime(config.beginAt) : '不限'" />
|
<t-cell title="起始日期" :note="config.beginAt ? Time.toDateTime(config.beginAt) : '不限'" />
|
||||||
@@ -104,6 +111,7 @@ const config = ref<GaoPackageConfig>();
|
|||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
const canUpdate = computed(() => !!config.value && userStore.hasPermissions(permissionCodes.packageConfig.update));
|
const canUpdate = computed(() => !!config.value && userStore.hasPermissions(permissionCodes.packageConfig.update));
|
||||||
const canDelete = computed(() => !!config.value && userStore.hasPermissions(permissionCodes.packageConfig.delete));
|
const canDelete = computed(() => !!config.value && userStore.hasPermissions(permissionCodes.packageConfig.delete));
|
||||||
|
const canReadSalesOrder = computed(() => userStore.hasPermissions(permissionCodes.salesOrder.read));
|
||||||
const canPurchase = computed(() =>
|
const canPurchase = computed(() =>
|
||||||
!!config.value
|
!!config.value
|
||||||
&& config.value.status === "ACTIVE"
|
&& config.value.status === "ACTIVE"
|
||||||
@@ -150,6 +158,21 @@ async function toPurchase(): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function toPackageOrderList(): Promise<void> {
|
||||||
|
if (!config.value?.id || !canReadSalesOrder.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await router.push({
|
||||||
|
name: "SalesOrderList",
|
||||||
|
query: {
|
||||||
|
orderType: "PACKAGE",
|
||||||
|
packageConfigId: config.value.id,
|
||||||
|
packageConfigName: config.value.name || "未命名套餐",
|
||||||
|
transitionDepth: String(Number(route.meta.depth ?? 0) + 1)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function removeConfig(): void {
|
function removeConfig(): void {
|
||||||
if (!config.value?.id || !canDelete.value) {
|
if (!config.value?.id || !canDelete.value) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -680,6 +680,10 @@ onUnmounted(() => {
|
|||||||
.list-wrap {
|
.list-wrap {
|
||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
|
|
||||||
|
:deep(.t-cell-group) {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.items {
|
.items {
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user