feat: separate container fee workbenches

This commit is contained in:
2026-09-08 22:03:03 +08:00
parent 9570e0fd18
commit 653ce1c511
11 changed files with 325 additions and 48 deletions
@@ -11,12 +11,13 @@ import StatusBadge from '@/shared/components/StatusBadge.vue'
import { getApiErrorDetails, type ApiErrorDetails } from '@/shared/api/http'
import { adjustContainerFee, adjustContainerFeeAllocationGroup, approveContainerFee, approveContainerFeeAllocationGroup, createContainerFee, createContainerFeeAllocationGroup, getContainerSettlementDetails, listApplicableFeeItems, listContainerFeeSupplierOptions, listContainerFees, rejectContainerFee, rejectContainerFeeAllocationGroup, uploadContainerFeePaymentVoucher, voidContainerFee, voidContainerFeeAllocationGroup, type ApplicableFeeItem, type ContainerCostDetail, type ContainerFeeAllocation, type ContainerFeeSupplierOption, type ContainerFeeResource, type ContainerFeeSaveRequest } from '../api/containerFees'
const props = defineProps<{
const props = withDefaults(defineProps<{
title?: string
planId: string
containerBookingId: string
customers: Array<{ accountId: string; customerName: string | null }>
businessReferences: Array<{ accountId: string; customerName: string | null; orderId: string; orderNo: string; inboundId: string | null; inboundCode: string | null }>
}>()
}>(), { title: '柜次费用' })
const access = useAccessPreviewStore()
const accountId = ref('')
const fees = ref<ContainerFeeResource[]>([])
@@ -350,7 +351,7 @@ onMounted(() => void load())
<template>
<section class="fees-panel" aria-label="柜次费用维护">
<header class="fees-header">
<div><h2>柜次费用</h2><p>费用与财务分摊均来自服务端真实记录</p></div>
<div><h2>{{ title }}</h2><p>费用与财务分摊均来自服务端真实记录</p></div>
<div class="fees-header__actions">
<label v-if="customerOptions.length > 1" class="customer-context"><span>客户</span><el-select v-model="accountId" placeholder="请选择费用归属客户"><el-option v-for="item in customerOptions" :key="item.value" :label="item.label" :value="item.value" /></el-select></label>
<el-button v-if="canEdit && canViewFeeItems && accountId" type="primary" @click="openCreate"><Plus :size="16" />新增费用</el-button>