添加基础表维护
This commit is contained in:
@@ -127,8 +127,16 @@
|
||||
prop="planningContent"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column align="center" label="归属类型" prop="ownershipType" width="100" />
|
||||
<el-table-column align="center" label="计算方式" prop="calculationMethod" width="110" />
|
||||
<el-table-column align="center" label="归属类型" width="100">
|
||||
<template #default="scope">
|
||||
{{ getOwnershipTypeLabel(scope.row.ownershipType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="计算方式" width="110">
|
||||
<template #default="scope">
|
||||
{{ getCalculationMethodLabel(scope.row.calculationMethod) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="规划金额(元)" width="120">
|
||||
<template #default="scope">
|
||||
{{ formatAmountText(scope.row.planningAmount) }}
|
||||
@@ -154,7 +162,8 @@
|
||||
<div>
|
||||
<div class="text-16px font-600">{{ currentPlanning.planningContent }}</div>
|
||||
<div class="mt-4px text-13px text-[var(--el-text-color-secondary)]">
|
||||
{{ currentPlanning.ownershipType }} / {{ currentPlanning.calculationMethod }}
|
||||
{{ getOwnershipTypeLabel(currentPlanning.ownershipType) }} /
|
||||
{{ getCalculationMethodLabel(currentPlanning.calculationMethod) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-12px">
|
||||
@@ -177,10 +186,6 @@
|
||||
<Icon class="mr-5px" icon="ep:edit-pen" />
|
||||
编辑季度分配
|
||||
</el-button>
|
||||
<el-button v-if="false" @click="refreshCurrentPlanning">
|
||||
<Icon class="mr-5px" icon="ep:refresh" />
|
||||
刷新结果
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -207,7 +212,7 @@
|
||||
{{ formatAmountText(currentPlanning.contractUnitPrice) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="设计阶段">
|
||||
{{ currentPlanning.designStage || '-' }}
|
||||
{{ getDesignStageLabel(currentPlanning.designStage) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="本次设计阶段比例">
|
||||
{{ formatPercentText(currentPlanning.currentDesignStageRatio) }}
|
||||
@@ -249,17 +254,17 @@
|
||||
v-if="currentPlanning.virtualCalculationMethod"
|
||||
label="虚拟产值计算方式"
|
||||
>
|
||||
{{ currentPlanning.virtualCalculationMethod }}
|
||||
{{ getVirtualCalculationMethodLabel(currentPlanning.virtualCalculationMethod) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="currentPlanning.guidanceUnitPrice" label="指导单价(元)">
|
||||
<el-descriptions-item
|
||||
v-if="currentPlanning.guidanceUnitPrice"
|
||||
label="指导单价(元/㎡)"
|
||||
>
|
||||
{{ formatAmountText(currentPlanning.guidanceUnitPrice) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="currentPlanning.guidanceTotalPrice" label="指导总价(元)">
|
||||
{{ formatAmountText(currentPlanning.guidanceTotalPrice) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="currentPlanning.virtualTotalPrice" label="虚拟总价(元)">
|
||||
{{ formatAmountText(currentPlanning.virtualTotalPrice) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="currentPlanning.workingDayCount" label="工日">
|
||||
{{ formatAmountText(currentPlanning.workingDayCount) }}
|
||||
</el-descriptions-item>
|
||||
@@ -382,7 +387,11 @@ import {
|
||||
formatAmountText,
|
||||
formatAreaText,
|
||||
formatPercentText,
|
||||
getCalculationMethodLabel,
|
||||
getCalculationRatioLabel,
|
||||
getDesignStageLabel,
|
||||
getOwnershipTypeLabel,
|
||||
getVirtualCalculationMethodLabel,
|
||||
isComprehensiveOwnership,
|
||||
isContractPriceMethod,
|
||||
isGuidancePriceMethod,
|
||||
@@ -449,8 +458,12 @@ const formatFactorText = (value?: number, digits = 4) => {
|
||||
return Number(value).toFixed(digits)
|
||||
}
|
||||
|
||||
const getQuarterCell = (row: QuarterYearRow, quarterNo: number) => {
|
||||
return row.quarters.find((item) => Number(item.quarterNo) === Number(quarterNo))
|
||||
}
|
||||
|
||||
const formatQuarterRatio = (row: QuarterYearRow, quarterNo: number) => {
|
||||
return formatPercentText(row.quarters[quarterNo - 1]?.distributionRatio)
|
||||
return formatPercentText(getQuarterCell(row, quarterNo)?.distributionRatio)
|
||||
}
|
||||
|
||||
const buildQuarterRows = (
|
||||
@@ -461,7 +474,12 @@ const buildQuarterRows = (
|
||||
if (planning.planningStartYear) {
|
||||
yearSet.add(planning.planningStartYear)
|
||||
}
|
||||
quarters.forEach((item) => yearSet.add(item.distributionYear))
|
||||
quarters.forEach((item) => {
|
||||
const distributionYear = Number(item.distributionYear)
|
||||
if (!Number.isNaN(distributionYear)) {
|
||||
yearSet.add(distributionYear)
|
||||
}
|
||||
})
|
||||
if (yearSet.size === 0) {
|
||||
yearSet.add(new Date().getFullYear())
|
||||
}
|
||||
@@ -470,15 +488,17 @@ const buildQuarterRows = (
|
||||
.map((distributionYear) => ({
|
||||
distributionYear,
|
||||
quarters: QUARTER_OPTIONS.map((option) => {
|
||||
const quarterNo = Number(option.value)
|
||||
const match = quarters.find(
|
||||
(item) =>
|
||||
item.distributionYear === distributionYear && item.quarterNo === option.value
|
||||
Number(item.distributionYear) === distributionYear &&
|
||||
Number(item.quarterNo) === quarterNo
|
||||
)
|
||||
return (
|
||||
match || {
|
||||
planningId: planning.id!,
|
||||
distributionYear,
|
||||
quarterNo: option.value,
|
||||
quarterNo,
|
||||
distributionRatio: undefined,
|
||||
distributionAmount: undefined
|
||||
}
|
||||
@@ -571,14 +591,6 @@ const handleCurrentPlanningChange = async (row?: PlanningApi.ProjectPlanningVO)
|
||||
await loadPlanningDetail(row.id)
|
||||
}
|
||||
|
||||
const refreshCurrentPlanning = async () => {
|
||||
if (!currentPlanning.value?.id) {
|
||||
return
|
||||
}
|
||||
await loadPlanningDetail(currentPlanning.value.id)
|
||||
await getPlanningList()
|
||||
}
|
||||
|
||||
const planningOutputFormRef = ref()
|
||||
const quarterDistributionFormRef = ref()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user