This commit is contained in:
zwgczx committed 2026-03-09 10:55:08 +08:00
1 parent fc26a87bee
commit 8a15587d30
8 files changed
+348 -216

No files matched your search

@@ -21,6 +21,10 @@ import {
AlertDialogOverlay,
AlertDialogPortal,
AlertDialogRoot,
NumberFieldDecrement,
NumberFieldIncrement,
NumberFieldInput,
NumberFieldRoot,
AlertDialogTitle,
AlertDialogTrigger,
} from 'reka-ui'
@@ -57,8 +61,8 @@ interface DetailRow {
benchmarkBudgetOptional: number | null
benchmarkBudgetBasicChecked: boolean
benchmarkBudgetOptionalChecked: boolean
basicFormula: string
optionalFormula: string
basicFormula: string |null
optionalFormula: string |null
consultCategoryFactor: number | null
majorFactor: number | null
workStageFactor: number | null
@@ -79,6 +83,7 @@ interface XmBaseInfoState {
}
interface ServiceLite {
mutiple?: boolean | null
onlyCostScale?: boolean | null
}
@@ -115,6 +120,11 @@ const isOnlyCostScaleService = computed(() => {
const service = getServiceDictItemById(props.serviceId) as ServiceLite | undefined
return service?.onlyCostScale === true
})
const isMutipleService = computed(() => {
const service = getServiceDictItemById(props.serviceId) as ServiceLite | undefined
return service?.mutiple === true
})
const projectCount = ref<number>(1)
const totalLabel = computed(() => {
const industryName = industryNameMap.get(activeIndustryCode.value.trim()) || ''
return industryName ? `${industryName}总投资` : '总投资'
@@ -896,8 +906,10 @@ const syncComputedValuesToDetailRows = () => {
row.benchmarkBudget = benchmarkBudgetSplit?.total ?? null
row.benchmarkBudgetBasic = benchmarkBudgetSplit?.basic ?? null
row.benchmarkBudgetOptional = benchmarkBudgetSplit?.optional ?? null
row.basicFormula = benchmarkBudgetRawSplit?.basicFormula ?? ''
row.optionalFormula = benchmarkBudgetRawSplit?.optionalFormula ?? ''
row.basicFormula =
row.benchmarkBudgetBasicChecked === false ? null : (benchmarkBudgetRawSplit?.basicFormula ?? '')
row.optionalFormula =
row.benchmarkBudgetOptionalChecked === false ? null : (benchmarkBudgetRawSplit?.optionalFormula ?? '')
row.budgetFee = budgetFeeSplit?.total ?? null
row.budgetFeeBasic = budgetFeeSplit?.basic ?? null
row.budgetFeeOptional = budgetFeeSplit?.optional ?? null
@@ -1096,7 +1108,17 @@ const processCellFromClipboard = (params: any) => {
<div class="rounded-lg border bg-card xmMx flex min-h-0 flex-1 flex-col">
<div class="flex items-center justify-between border-b px-4 py-3">
<h3 class="text-sm font-semibold text-foreground">投资规模明细</h3>
<div class="flex items-center gap-3">
<h3 class="text-sm font-semibold text-foreground">投资规模明细</h3>
<div v-if="isMutipleService" class="flex items-center gap-2">
<span class="text-xs text-muted-foreground">项目数量</span>
<NumberFieldRoot v-model="projectCount" :min="1" :step="1" class="inline-flex items-center rounded-md border bg-background">
<NumberFieldDecrement class="px-2 py-1 text-xs text-muted-foreground hover:bg-muted">-</NumberFieldDecrement>
<NumberFieldInput class="h-7 w-14 border-x bg-transparent px-2 text-center text-xs outline-none" />
<NumberFieldIncrement class="px-2 py-1 text-xs text-muted-foreground hover:bg-muted">+</NumberFieldIncrement>
</NumberFieldRoot>
</div>
</div>
<div class="flex items-center gap-2">
<AlertDialogRoot>
<AlertDialogTrigger as-child>