项目成本测算新增项目成本预算、核算、结算,季度分配调整可子合约规划分配
This commit is contained in:
@@ -4,7 +4,7 @@ import type { ProjectPlanningGuideDetailVO } from '@/api/tjt/planningGuideDetail
|
|||||||
export interface ProjectPlanningVO {
|
export interface ProjectPlanningVO {
|
||||||
id?: number
|
id?: number
|
||||||
projectId: number
|
projectId: number
|
||||||
sortNo?: number
|
sortNo?: string
|
||||||
ownershipType: string
|
ownershipType: string
|
||||||
calculationMethod: string
|
calculationMethod: string
|
||||||
planningContent: string
|
planningContent: string
|
||||||
@@ -55,7 +55,6 @@ export type ProjectPlanningSaveVO = Omit<
|
|||||||
| 'managementFee'
|
| 'managementFee'
|
||||||
| 'vatAmount'
|
| 'vatAmount'
|
||||||
| 'projectBudgetOutputValue'
|
| 'projectBudgetOutputValue'
|
||||||
| 'contractUnitPrice'
|
|
||||||
| 'totalAdjustmentFactor'
|
| 'totalAdjustmentFactor'
|
||||||
| 'assessmentArea'
|
| 'assessmentArea'
|
||||||
| 'virtualOutputValue'
|
| 'virtualOutputValue'
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
import type { ProjectPlanningVO } from '@/api/tjt/planning'
|
import type { ProjectPlanningVO } from '@/api/tjt/planning'
|
||||||
|
import type { ProjectPlanningGuideDetailVO } from '@/api/tjt/planningGuideDetail'
|
||||||
|
|
||||||
export interface ProjectPlanningQuarterVO {
|
export interface ProjectPlanningQuarterVO {
|
||||||
id?: number
|
id?: number
|
||||||
planningId: number
|
planningId: number
|
||||||
|
guideDetailId?: number
|
||||||
|
guideDetailSortNo?: number
|
||||||
distributionYear: number
|
distributionYear: number
|
||||||
quarterNo: number
|
quarterNo: number
|
||||||
distributionRatio?: number
|
distributionRatio?: number
|
||||||
@@ -19,6 +22,17 @@ export type ProjectPlanningQuarterSaveVO = Omit<
|
|||||||
export interface ProjectPlanningQuarterPlanningDetailVO {
|
export interface ProjectPlanningQuarterPlanningDetailVO {
|
||||||
planning: ProjectPlanningVO
|
planning: ProjectPlanningVO
|
||||||
quarters: ProjectPlanningQuarterVO[]
|
quarters: ProjectPlanningQuarterVO[]
|
||||||
|
guideDetailMode?: boolean
|
||||||
|
historyParentMode?: boolean
|
||||||
|
message?: string
|
||||||
|
parentQuarters?: ProjectPlanningQuarterVO[]
|
||||||
|
guideDetails?: ProjectPlanningQuarterGuideDetailVO[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProjectPlanningQuarterGuideDetailVO extends ProjectPlanningGuideDetailVO {
|
||||||
|
allocatedAmount?: number
|
||||||
|
pendingAmount?: number
|
||||||
|
quarters: ProjectPlanningQuarterVO[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getProjectPlanningQuarter = (id: number) => {
|
export const getProjectPlanningQuarter = (id: number) => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import request from '@/config/axios'
|
|||||||
export interface ProjectProfitVO {
|
export interface ProjectProfitVO {
|
||||||
projectId: number
|
projectId: number
|
||||||
projectName: string
|
projectName: string
|
||||||
sortNo?: number
|
sortNo?: string
|
||||||
contractSignedFlag: boolean
|
contractSignedFlag: boolean
|
||||||
contractAmount?: number
|
contractAmount?: number
|
||||||
finalSettlementAmount?: number
|
finalSettlementAmount?: number
|
||||||
@@ -22,6 +22,47 @@ export interface ProjectProfitVO {
|
|||||||
profitLossRate?: number
|
profitLossRate?: number
|
||||||
projectStartYear?: number
|
projectStartYear?: number
|
||||||
createTime?: string
|
createTime?: string
|
||||||
|
budgetSnapshot?: ProjectProfitSnapshotVO
|
||||||
|
accountingSnapshot?: ProjectProfitSnapshotVO
|
||||||
|
settlementSnapshot?: ProjectProfitSnapshotVO
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProjectProfitSnapshotVO {
|
||||||
|
id?: number
|
||||||
|
projectId: number
|
||||||
|
snapshotType: 'budget' | 'accounting' | 'settlement'
|
||||||
|
lockedFlag?: boolean
|
||||||
|
actionUserId?: number
|
||||||
|
actionUserName?: string
|
||||||
|
actionTime?: string
|
||||||
|
contractAmount?: number
|
||||||
|
finalSettlementAmount?: number
|
||||||
|
effectiveSettlementAmount?: number
|
||||||
|
comprehensivePlanningAmount?: number
|
||||||
|
subcontractPlanningAmount?: number
|
||||||
|
specialSubcontractPlanningAmount?: number
|
||||||
|
sourceCoopSubcontractPlanningAmount?: number
|
||||||
|
comprehensiveSubcontractPlanningAmount?: number
|
||||||
|
majorOutputValue?: number
|
||||||
|
majorExpectedPerformance?: number
|
||||||
|
innovationOutputRate?: number
|
||||||
|
innovationOutputValue?: number
|
||||||
|
otherCost?: number
|
||||||
|
profitLossValue?: number
|
||||||
|
profitLossRate?: number
|
||||||
|
assessmentResult?: string
|
||||||
|
assessmentCoefficient?: number
|
||||||
|
comprehensiveAccountingOutputValue?: number
|
||||||
|
comprehensiveSettlementOutputValue?: number
|
||||||
|
majorAccountingOutputValue?: number
|
||||||
|
majorSettlementOutputValue?: number
|
||||||
|
remark?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProjectProfitSettlementSaveReqVO {
|
||||||
|
projectId: number
|
||||||
|
assessmentResult?: string
|
||||||
|
remark?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProjectProfitPageReqVO extends PageParam {
|
export interface ProjectProfitPageReqVO extends PageParam {
|
||||||
@@ -38,3 +79,15 @@ export const getProjectProfitPage = (params: ProjectProfitPageReqVO) => {
|
|||||||
export const getProjectProfit = (projectId: number) => {
|
export const getProjectProfit = (projectId: number) => {
|
||||||
return request.get({ url: '/tjt/profit/get', params: { projectId } })
|
return request.get({ url: '/tjt/profit/get', params: { projectId } })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const lockBudgetSnapshot = (projectId: number) => {
|
||||||
|
return request.post({ url: '/tjt/profit/lock-budget', params: { projectId } })
|
||||||
|
}
|
||||||
|
|
||||||
|
export const lockAccountingSnapshot = (projectId: number) => {
|
||||||
|
return request.post({ url: '/tjt/profit/lock-accounting', params: { projectId } })
|
||||||
|
}
|
||||||
|
|
||||||
|
export const saveSettlementSnapshot = (data: ProjectProfitSettlementSaveReqVO) => {
|
||||||
|
return request.put({ url: '/tjt/profit/save-settlement', data })
|
||||||
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export interface ProjectRolePersonVO {
|
|||||||
export interface ProjectVO {
|
export interface ProjectVO {
|
||||||
id?: number
|
id?: number
|
||||||
projectName: string
|
projectName: string
|
||||||
sortNo?: number
|
sortNo?: string
|
||||||
contractSignedFlag: boolean
|
contractSignedFlag: boolean
|
||||||
contractAmount?: number
|
contractAmount?: number
|
||||||
totalConstructionArea?: number
|
totalConstructionArea?: number
|
||||||
|
|||||||
@@ -124,7 +124,14 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="合同单价(元/m²)">
|
<el-form-item label="合同单价(元/m²)">
|
||||||
<el-input :model-value="contractUnitPricePreview" disabled />
|
<el-input-number
|
||||||
|
v-model="formData.contractUnitPrice"
|
||||||
|
:min="0"
|
||||||
|
:precision="4"
|
||||||
|
:step="1"
|
||||||
|
class="!w-1/1"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -913,17 +920,6 @@ const guideDetailSummary = computed(() =>
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
const contractUnitPricePreview = computed(() => {
|
|
||||||
const planningAmount = Number(formData.value.planningAmount || 0)
|
|
||||||
const planningArea = showGuideDetailSection.value
|
|
||||||
? Number(guideDetailSummary.value.designArea || 0)
|
|
||||||
: Number(formData.value.planningArea || 0)
|
|
||||||
if (!planningArea) {
|
|
||||||
return formatAmountText(0)
|
|
||||||
}
|
|
||||||
return formatAmountText(planningAmount / planningArea)
|
|
||||||
})
|
|
||||||
|
|
||||||
const formatFactorText = (value?: number, digits = 4) => {
|
const formatFactorText = (value?: number, digits = 4) => {
|
||||||
if (value === undefined || value === null) {
|
if (value === undefined || value === null) {
|
||||||
return '-'
|
return '-'
|
||||||
@@ -1096,6 +1092,7 @@ const buildSavePayload = (): PlanningApi.ProjectPlanningSaveVO => ({
|
|||||||
sortNo: formData.value.sortNo,
|
sortNo: formData.value.sortNo,
|
||||||
contractValueQuantity: formData.value.contractValueQuantity,
|
contractValueQuantity: formData.value.contractValueQuantity,
|
||||||
contractValueUnitPrice: formData.value.contractValueUnitPrice,
|
contractValueUnitPrice: formData.value.contractValueUnitPrice,
|
||||||
|
contractUnitPrice: formData.value.contractUnitPrice,
|
||||||
managementFeeRate: formData.value.managementFeeRate,
|
managementFeeRate: formData.value.managementFeeRate,
|
||||||
vatRate: formData.value.vatRate,
|
vatRate: formData.value.vatRate,
|
||||||
implementationTeam: formData.value.implementationTeam,
|
implementationTeam: formData.value.implementationTeam,
|
||||||
|
|||||||
@@ -51,17 +51,37 @@
|
|||||||
|
|
||||||
<div class="mb-16px flex items-center justify-between">
|
<div class="mb-16px flex items-center justify-between">
|
||||||
<div class="text-14px font-600">季度分配明细</div>
|
<div class="text-14px font-600">季度分配明细</div>
|
||||||
<el-button plain @click="addDistributionYear">
|
<el-button v-if="!historyParentMode" plain @click="addDistributionYear">
|
||||||
<Icon class="mr-5px" icon="ep:plus" />
|
<Icon class="mr-5px" icon="ep:plus" />
|
||||||
新增年度
|
新增年度
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="quarterRows" border>
|
<el-alert
|
||||||
|
v-if="guideDetailMode && historyParentMode"
|
||||||
|
:title="historyMessage || '当前合约规划存在历史父级季度分配,请先清空历史父级分配后,再按指导价法明细维护。'"
|
||||||
|
class="mb-16px"
|
||||||
|
:closable="false"
|
||||||
|
show-icon
|
||||||
|
type="warning"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div v-if="guideDetailMode && historyParentMode" class="mb-16px flex justify-end">
|
||||||
|
<el-button plain type="danger" @click="clearHistoryParentQuarters">
|
||||||
|
清空历史父级分配
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="quarterRows"
|
||||||
|
border
|
||||||
|
>
|
||||||
<el-table-column align="center" label="分配年度" width="150">
|
<el-table-column align="center" label="分配年度" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:model-value="toYearPickerValue(scope.row.distributionYear)"
|
:model-value="toYearPickerValue(scope.row.distributionYear)"
|
||||||
|
:disabled="historyParentMode"
|
||||||
class="!w-1/1"
|
class="!w-1/1"
|
||||||
placeholder="请选择年度"
|
placeholder="请选择年度"
|
||||||
type="year"
|
type="year"
|
||||||
@@ -72,7 +92,14 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="90" fixed="right">
|
<el-table-column align="center" label="操作" width="90" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="danger" @click="removeDistributionYear(scope.row)">删除</el-button>
|
<el-button
|
||||||
|
:disabled="historyParentMode"
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
@click="removeDistributionYear(scope.row)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -85,6 +112,7 @@
|
|||||||
<div class="flex flex-col gap-8px">
|
<div class="flex flex-col gap-8px">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:model-value="toQuarterPercent(scope.row, quarter.value)"
|
:model-value="toQuarterPercent(scope.row, quarter.value)"
|
||||||
|
:disabled="historyParentMode"
|
||||||
:min="0"
|
:min="0"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
:step="0.01"
|
:step="0.01"
|
||||||
@@ -99,7 +127,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button :disabled="loading" type="primary" @click="submitForm">保存</el-button>
|
<el-button :disabled="loading || historyParentMode" type="primary" @click="submitForm">保存</el-button>
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
@@ -139,6 +167,10 @@ const formData = ref<PlanningApi.ProjectPlanningVO>({
|
|||||||
progressRemark: ''
|
progressRemark: ''
|
||||||
})
|
})
|
||||||
const quarterRows = ref<QuarterYearRow[]>([])
|
const quarterRows = ref<QuarterYearRow[]>([])
|
||||||
|
const guideDetailMode = ref(false)
|
||||||
|
const historyParentMode = ref(false)
|
||||||
|
const historyMessage = ref('')
|
||||||
|
const activeGuideDetail = ref<PlanningQuarterApi.ProjectPlanningQuarterGuideDetailVO>()
|
||||||
|
|
||||||
const totalDistributionAmountPercent = computed({
|
const totalDistributionAmountPercent = computed({
|
||||||
get: () => toPercentValue(formData.value.totalDistributionAmount),
|
get: () => toPercentValue(formData.value.totalDistributionAmount),
|
||||||
@@ -155,9 +187,12 @@ const formRules = reactive<FormRules>({
|
|||||||
const buildQuarterCell = (
|
const buildQuarterCell = (
|
||||||
currentPlanningId: number,
|
currentPlanningId: number,
|
||||||
distributionYear: number,
|
distributionYear: number,
|
||||||
quarterNo: number
|
quarterNo: number,
|
||||||
|
guideDetail?: PlanningQuarterApi.ProjectPlanningQuarterGuideDetailVO
|
||||||
): PlanningQuarterApi.ProjectPlanningQuarterVO => ({
|
): PlanningQuarterApi.ProjectPlanningQuarterVO => ({
|
||||||
planningId: currentPlanningId,
|
planningId: currentPlanningId,
|
||||||
|
guideDetailId: guideDetail?.id,
|
||||||
|
guideDetailSortNo: guideDetail?.sortNo,
|
||||||
distributionYear,
|
distributionYear,
|
||||||
quarterNo,
|
quarterNo,
|
||||||
distributionRatio: undefined,
|
distributionRatio: undefined,
|
||||||
@@ -166,7 +201,8 @@ const buildQuarterCell = (
|
|||||||
|
|
||||||
const buildQuarterRows = (
|
const buildQuarterRows = (
|
||||||
planning: PlanningApi.ProjectPlanningVO,
|
planning: PlanningApi.ProjectPlanningVO,
|
||||||
quarters: PlanningQuarterApi.ProjectPlanningQuarterVO[]
|
quarters: PlanningQuarterApi.ProjectPlanningQuarterVO[],
|
||||||
|
guideDetail?: PlanningQuarterApi.ProjectPlanningQuarterGuideDetailVO
|
||||||
) => {
|
) => {
|
||||||
const yearSet = new Set<number>()
|
const yearSet = new Set<number>()
|
||||||
if (planning.planningStartYear) {
|
if (planning.planningStartYear) {
|
||||||
@@ -190,20 +226,25 @@ const buildQuarterRows = (
|
|||||||
const match = quarters.find(
|
const match = quarters.find(
|
||||||
(item) =>
|
(item) =>
|
||||||
Number(item.distributionYear) === distributionYear &&
|
Number(item.distributionYear) === distributionYear &&
|
||||||
Number(item.quarterNo) === quarterNo
|
Number(item.quarterNo) === quarterNo &&
|
||||||
|
Number(item.guideDetailId || 0) === Number(guideDetail?.id || 0)
|
||||||
)
|
)
|
||||||
return match
|
return match
|
||||||
? { ...match }
|
? { ...match }
|
||||||
: buildQuarterCell(planning.id!, distributionYear, quarterNo)
|
: buildQuarterCell(planning.id!, distributionYear, quarterNo, guideDetail)
|
||||||
})
|
})
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
const open = async (id: number) => {
|
const open = async (id: number, guideDetailId?: number) => {
|
||||||
planningId.value = id
|
planningId.value = id
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
loading.value = true
|
loading.value = true
|
||||||
deletedQuarterIds.value = []
|
deletedQuarterIds.value = []
|
||||||
|
guideDetailMode.value = false
|
||||||
|
historyParentMode.value = false
|
||||||
|
historyMessage.value = ''
|
||||||
|
activeGuideDetail.value = undefined
|
||||||
try {
|
try {
|
||||||
const detail = await PlanningQuarterApi.getProjectPlanningQuarterPlanningDetail(id)
|
const detail = await PlanningQuarterApi.getProjectPlanningQuarterPlanningDetail(id)
|
||||||
if (!detail?.planning) {
|
if (!detail?.planning) {
|
||||||
@@ -217,6 +258,7 @@ const open = async (id: number) => {
|
|||||||
progressRemark: ''
|
progressRemark: ''
|
||||||
}
|
}
|
||||||
quarterRows.value = []
|
quarterRows.value = []
|
||||||
|
activeGuideDetail.value = undefined
|
||||||
deletedQuarterIds.value = []
|
deletedQuarterIds.value = []
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
message.warning('合约规划不存在或已被删除')
|
message.warning('合约规划不存在或已被删除')
|
||||||
@@ -231,7 +273,24 @@ const open = async (id: number) => {
|
|||||||
totalDistributionAmount: planning.totalDistributionAmount ?? 1,
|
totalDistributionAmount: planning.totalDistributionAmount ?? 1,
|
||||||
progressRemark: planning.progressRemark ?? ''
|
progressRemark: planning.progressRemark ?? ''
|
||||||
}
|
}
|
||||||
quarterRows.value = buildQuarterRows(formData.value, detail.quarters || [])
|
guideDetailMode.value = !!detail.guideDetailMode
|
||||||
|
historyParentMode.value = !!detail.historyParentMode
|
||||||
|
historyMessage.value = detail.message || ''
|
||||||
|
if (guideDetailMode.value && !historyParentMode.value) {
|
||||||
|
const targetGuideDetail = guideDetailId
|
||||||
|
? (detail.guideDetails || []).find((item) => Number(item.id) === Number(guideDetailId))
|
||||||
|
: undefined
|
||||||
|
if (!targetGuideDetail) {
|
||||||
|
quarterRows.value = []
|
||||||
|
dialogVisible.value = false
|
||||||
|
message.warning('请先在外层选择指导价法明细')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
activeGuideDetail.value = targetGuideDetail
|
||||||
|
quarterRows.value = buildQuarterRows(formData.value, targetGuideDetail.quarters || [], targetGuideDetail)
|
||||||
|
} else {
|
||||||
|
quarterRows.value = buildQuarterRows(formData.value, detail.quarters || [])
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
@@ -252,7 +311,7 @@ const addDistributionYear = () => {
|
|||||||
quarterRows.value.push({
|
quarterRows.value.push({
|
||||||
distributionYear,
|
distributionYear,
|
||||||
quarters: QUARTER_OPTIONS.map((item) =>
|
quarters: QUARTER_OPTIONS.map((item) =>
|
||||||
buildQuarterCell(planningId.value!, distributionYear, item.value)
|
buildQuarterCell(planningId.value!, distributionYear, item.value, activeGuideDetail.value)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -267,6 +326,30 @@ const removeDistributionYear = (row: QuarterYearRow) => {
|
|||||||
quarterRows.value = quarterRows.value.filter((item) => item !== row)
|
quarterRows.value = quarterRows.value.filter((item) => item !== row)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const clearHistoryParentQuarters = async () => {
|
||||||
|
if (!planningId.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const ids = quarterRows.value
|
||||||
|
.flatMap((row) => row.quarters)
|
||||||
|
.map((item) => item.id)
|
||||||
|
.filter((id): id is number => typeof id === 'number')
|
||||||
|
if (!ids.length) {
|
||||||
|
message.warning('没有可清空的历史父级分配')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await message.confirm('确认清空历史父级季度分配吗?清空后需要按指导价法明细重新录入。')
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
await PlanningQuarterApi.deleteProjectPlanningQuarterList(Array.from(new Set(ids)))
|
||||||
|
message.success('历史父级分配已清空,请在外层选择序号后重新录入')
|
||||||
|
dialogVisible.value = false
|
||||||
|
emit('success')
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const toYearPickerValue = (value?: number) => (value ? String(value) : undefined)
|
const toYearPickerValue = (value?: number) => (value ? String(value) : undefined)
|
||||||
|
|
||||||
const updateDistributionYear = (row: QuarterYearRow, value?: string) => {
|
const updateDistributionYear = (row: QuarterYearRow, value?: string) => {
|
||||||
@@ -303,6 +386,8 @@ const buildQuarterSavePayload = (
|
|||||||
): PlanningQuarterApi.ProjectPlanningQuarterSaveVO => ({
|
): PlanningQuarterApi.ProjectPlanningQuarterSaveVO => ({
|
||||||
id: quarter.id,
|
id: quarter.id,
|
||||||
planningId: planningId.value!,
|
planningId: planningId.value!,
|
||||||
|
guideDetailId: quarter.guideDetailId,
|
||||||
|
guideDetailSortNo: quarter.guideDetailSortNo,
|
||||||
distributionYear: row.distributionYear,
|
distributionYear: row.distributionYear,
|
||||||
quarterNo: quarter.quarterNo,
|
quarterNo: quarter.quarterNo,
|
||||||
distributionRatio: quarter.distributionRatio
|
distributionRatio: quarter.distributionRatio
|
||||||
|
|||||||
@@ -307,9 +307,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-button
|
<el-button
|
||||||
v-hasPermi="['tjt:planning:update', 'tjt:planning-quarter:update', 'tjt:planning-quarter:create']"
|
v-hasPermi="['tjt:planning:update', 'tjt:planning-quarter:update', 'tjt:planning-quarter:create']"
|
||||||
|
:disabled="guideDetailMode && !historyParentMode && !activeGuideDetail"
|
||||||
plain
|
plain
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openQuarterDistributionForm"
|
@click="openQuarterDistributionForm(activeGuideDetail?.id)"
|
||||||
>
|
>
|
||||||
编辑季度分配
|
编辑季度分配
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -328,7 +329,13 @@
|
|||||||
<div class="rounded-8px bg-[var(--el-fill-color-light)] px-16px py-12px">
|
<div class="rounded-8px bg-[var(--el-fill-color-light)] px-16px py-12px">
|
||||||
<div class="text-12px text-[var(--el-text-color-secondary)]">已分配</div>
|
<div class="text-12px text-[var(--el-text-color-secondary)]">已分配</div>
|
||||||
<div class="mt-6px text-18px font-600">
|
<div class="mt-6px text-18px font-600">
|
||||||
{{ formatPercentText(currentPlanning.allocatedAmount) }}
|
{{
|
||||||
|
formatPercentText(
|
||||||
|
guideDetailMode && activeGuideDetail
|
||||||
|
? activeGuideDetail.allocatedAmount
|
||||||
|
: currentPlanning.allocatedAmount
|
||||||
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -336,7 +343,13 @@
|
|||||||
<div class="rounded-8px bg-[var(--el-fill-color-light)] px-16px py-12px">
|
<div class="rounded-8px bg-[var(--el-fill-color-light)] px-16px py-12px">
|
||||||
<div class="text-12px text-[var(--el-text-color-secondary)]">待分配</div>
|
<div class="text-12px text-[var(--el-text-color-secondary)]">待分配</div>
|
||||||
<div class="mt-6px text-18px font-600">
|
<div class="mt-6px text-18px font-600">
|
||||||
{{ formatPercentText(currentPlanning.pendingAmount) }}
|
{{
|
||||||
|
formatPercentText(
|
||||||
|
guideDetailMode && activeGuideDetail
|
||||||
|
? activeGuideDetail.pendingAmount
|
||||||
|
: currentPlanning.pendingAmount
|
||||||
|
)
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -350,7 +363,63 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table :data="quarterRows" border>
|
<template v-if="guideDetailMode && !historyParentMode">
|
||||||
|
<el-empty
|
||||||
|
v-if="!guideDetailRows.length"
|
||||||
|
description="暂无指导价法明细,请先维护指导价法明细"
|
||||||
|
/>
|
||||||
|
<template v-else>
|
||||||
|
<el-tabs v-model="activeGuideDetailTab" class="mb-12px" type="card">
|
||||||
|
<el-tab-pane
|
||||||
|
v-for="detail in guideDetailRows"
|
||||||
|
:key="detail.tabKey"
|
||||||
|
:label="`序号 ${detail.sortNo || '-'}`"
|
||||||
|
:name="detail.tabKey"
|
||||||
|
/>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<el-descriptions
|
||||||
|
v-if="activeGuideDetail"
|
||||||
|
:column="4"
|
||||||
|
border
|
||||||
|
class="mb-12px"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
<el-descriptions-item label="设计部位">
|
||||||
|
{{ getDesignPartLabel(activeGuideDetail.designPart) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="设计内容/设计类型">
|
||||||
|
{{ activeGuideDetail.buildingType || '-' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="设计面积">
|
||||||
|
{{ formatAreaText(activeGuideDetail.designArea) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="考核产值小计">
|
||||||
|
{{ formatAmountText(activeGuideDetail.assessmentOutputValue) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-table :data="activeGuideDetailQuarterRows" border>
|
||||||
|
<el-table-column align="center" label="分配年度" width="150" prop="distributionYear" />
|
||||||
|
<el-table-column
|
||||||
|
v-for="quarter in QUARTER_OPTIONS"
|
||||||
|
:key="quarter.value"
|
||||||
|
:label="quarter.label"
|
||||||
|
min-width="220"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<div class="flex flex-col gap-8px">
|
||||||
|
<div class="rounded-6px bg-[var(--el-fill-color-light)] px-10px py-8px text-12px">
|
||||||
|
分配比例:{{ formatQuarterRatio(scope.row, quarter.value) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table v-else :data="quarterRows" border>
|
||||||
<el-table-column align="center" label="分配年度" width="150" prop="distributionYear" />
|
<el-table-column align="center" label="分配年度" width="150" prop="distributionYear" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="quarter in QUARTER_OPTIONS"
|
v-for="quarter in QUARTER_OPTIONS"
|
||||||
@@ -399,6 +468,7 @@ import {
|
|||||||
formatPercentText,
|
formatPercentText,
|
||||||
getCalculationMethodLabel,
|
getCalculationMethodLabel,
|
||||||
getCalculationRatioLabel,
|
getCalculationRatioLabel,
|
||||||
|
getDesignPartLabel,
|
||||||
getDesignStageLabel,
|
getDesignStageLabel,
|
||||||
getOwnershipTypeLabel,
|
getOwnershipTypeLabel,
|
||||||
getVirtualCalculationMethodLabel,
|
getVirtualCalculationMethodLabel,
|
||||||
@@ -416,6 +486,11 @@ interface QuarterYearRow {
|
|||||||
quarters: PlanningQuarterApi.ProjectPlanningQuarterVO[]
|
quarters: PlanningQuarterApi.ProjectPlanningQuarterVO[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface GuideDetailQuarterRow extends PlanningQuarterApi.ProjectPlanningQuarterGuideDetailVO {
|
||||||
|
tabKey: string
|
||||||
|
quarterRows: QuarterYearRow[]
|
||||||
|
}
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
@@ -427,6 +502,10 @@ const planningList = ref<PlanningApi.ProjectPlanningVO[]>([])
|
|||||||
const currentProject = ref<ProjectApi.ProjectVO>()
|
const currentProject = ref<ProjectApi.ProjectVO>()
|
||||||
const currentPlanning = ref<PlanningApi.ProjectPlanningVO>()
|
const currentPlanning = ref<PlanningApi.ProjectPlanningVO>()
|
||||||
const quarterRows = ref<QuarterYearRow[]>([])
|
const quarterRows = ref<QuarterYearRow[]>([])
|
||||||
|
const guideDetailMode = ref(false)
|
||||||
|
const historyParentMode = ref(false)
|
||||||
|
const guideDetailRows = ref<GuideDetailQuarterRow[]>([])
|
||||||
|
const activeGuideDetailTab = ref('')
|
||||||
const queryFormRef = ref()
|
const queryFormRef = ref()
|
||||||
const projectTableRef = ref()
|
const projectTableRef = ref()
|
||||||
const planningTableRef = ref()
|
const planningTableRef = ref()
|
||||||
@@ -479,6 +558,13 @@ const showParentInternalGuidanceUnitPrice = computed(
|
|||||||
currentPlanning.value?.internalGuidanceUnitPrice !== undefined &&
|
currentPlanning.value?.internalGuidanceUnitPrice !== undefined &&
|
||||||
currentPlanning.value?.internalGuidanceUnitPrice !== null
|
currentPlanning.value?.internalGuidanceUnitPrice !== null
|
||||||
)
|
)
|
||||||
|
const activeGuideDetail = computed(() => {
|
||||||
|
return (
|
||||||
|
guideDetailRows.value.find((item) => item.tabKey === activeGuideDetailTab.value) ||
|
||||||
|
guideDetailRows.value[0]
|
||||||
|
)
|
||||||
|
})
|
||||||
|
const activeGuideDetailQuarterRows = computed(() => activeGuideDetail.value?.quarterRows || [])
|
||||||
|
|
||||||
const formatFactorText = (value?: number, digits = 4) => {
|
const formatFactorText = (value?: number, digits = 4) => {
|
||||||
if (value === undefined || value === null) {
|
if (value === undefined || value === null) {
|
||||||
@@ -536,6 +622,14 @@ const buildQuarterRows = (
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const resetQuarterDetailState = () => {
|
||||||
|
quarterRows.value = []
|
||||||
|
guideDetailMode.value = false
|
||||||
|
historyParentMode.value = false
|
||||||
|
guideDetailRows.value = []
|
||||||
|
activeGuideDetailTab.value = ''
|
||||||
|
}
|
||||||
|
|
||||||
const getProjectList = async () => {
|
const getProjectList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
@@ -546,7 +640,7 @@ const getProjectList = async () => {
|
|||||||
currentProject.value = undefined
|
currentProject.value = undefined
|
||||||
planningList.value = []
|
planningList.value = []
|
||||||
currentPlanning.value = undefined
|
currentPlanning.value = undefined
|
||||||
quarterRows.value = []
|
resetQuarterDetailState()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const targetProjectId = currentProject.value?.id || projectList.value[0].id
|
const targetProjectId = currentProject.value?.id || projectList.value[0].id
|
||||||
@@ -563,7 +657,7 @@ const getPlanningList = async () => {
|
|||||||
if (!currentProject.value?.id) {
|
if (!currentProject.value?.id) {
|
||||||
planningList.value = []
|
planningList.value = []
|
||||||
currentPlanning.value = undefined
|
currentPlanning.value = undefined
|
||||||
quarterRows.value = []
|
resetQuarterDetailState()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
planningLoading.value = true
|
planningLoading.value = true
|
||||||
@@ -571,7 +665,7 @@ const getPlanningList = async () => {
|
|||||||
planningList.value = await PlanningApi.getProjectPlanningListByProjectId(currentProject.value.id)
|
planningList.value = await PlanningApi.getProjectPlanningListByProjectId(currentProject.value.id)
|
||||||
if (!planningList.value.length) {
|
if (!planningList.value.length) {
|
||||||
currentPlanning.value = undefined
|
currentPlanning.value = undefined
|
||||||
quarterRows.value = []
|
resetQuarterDetailState()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const targetPlanningId = currentPlanning.value?.id || planningList.value[0].id
|
const targetPlanningId = currentPlanning.value?.id || planningList.value[0].id
|
||||||
@@ -589,7 +683,23 @@ const loadPlanningDetail = async (planningId: number) => {
|
|||||||
try {
|
try {
|
||||||
const detail = await PlanningQuarterApi.getProjectPlanningQuarterPlanningDetail(planningId)
|
const detail = await PlanningQuarterApi.getProjectPlanningQuarterPlanningDetail(planningId)
|
||||||
currentPlanning.value = detail?.planning
|
currentPlanning.value = detail?.planning
|
||||||
quarterRows.value = detail?.planning ? buildQuarterRows(detail.planning, detail.quarters || []) : []
|
guideDetailMode.value = !!detail?.guideDetailMode
|
||||||
|
historyParentMode.value = !!detail?.historyParentMode
|
||||||
|
if (!detail?.planning) {
|
||||||
|
resetQuarterDetailState()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
quarterRows.value = buildQuarterRows(detail.planning, detail.quarters || [])
|
||||||
|
guideDetailRows.value = (detail.guideDetails || []).map((item, index) => ({
|
||||||
|
...item,
|
||||||
|
tabKey: String(item.id || item.sortNo || index),
|
||||||
|
quarterRows: buildQuarterRows(detail.planning!, item.quarters || [])
|
||||||
|
}))
|
||||||
|
const currentTab = activeGuideDetailTab.value
|
||||||
|
activeGuideDetailTab.value =
|
||||||
|
guideDetailRows.value.find((item) => item.tabKey === currentTab)?.tabKey ||
|
||||||
|
guideDetailRows.value[0]?.tabKey ||
|
||||||
|
''
|
||||||
} finally {
|
} finally {
|
||||||
quarterLoading.value = false
|
quarterLoading.value = false
|
||||||
}
|
}
|
||||||
@@ -613,7 +723,7 @@ const handleCurrentProjectChange = async (row?: ProjectApi.ProjectVO) => {
|
|||||||
const handleCurrentPlanningChange = async (row?: PlanningApi.ProjectPlanningVO) => {
|
const handleCurrentPlanningChange = async (row?: PlanningApi.ProjectPlanningVO) => {
|
||||||
if (!row?.id) {
|
if (!row?.id) {
|
||||||
currentPlanning.value = undefined
|
currentPlanning.value = undefined
|
||||||
quarterRows.value = []
|
resetQuarterDetailState()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
await loadPlanningDetail(row.id)
|
await loadPlanningDetail(row.id)
|
||||||
@@ -630,12 +740,15 @@ const openPlanningOutputForm = () => {
|
|||||||
planningOutputFormRef.value.open(currentPlanning.value.id)
|
planningOutputFormRef.value.open(currentPlanning.value.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
const openQuarterDistributionForm = () => {
|
const openQuarterDistributionForm = (guideDetailId?: number) => {
|
||||||
if (!currentPlanning.value?.id) {
|
if (!currentPlanning.value?.id) {
|
||||||
message.warning('请先选择合约规划')
|
message.warning('请先选择合约规划')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
quarterDistributionFormRef.value.open(currentPlanning.value.id)
|
quarterDistributionFormRef.value.open(
|
||||||
|
currentPlanning.value.id,
|
||||||
|
guideDetailMode.value && !historyParentMode.value ? guideDetailId : undefined
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlePlanningOutputFormSuccess = async () => {
|
const handlePlanningOutputFormSuccess = async () => {
|
||||||
|
|||||||
@@ -90,14 +90,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="项目预算产值总计(元)" width="160">
|
<el-table-column align="center" label="项目预算产值总计(元)" width="160">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip
|
{{ formatAmountText(scope.row.effectiveSettlementAmount) }}
|
||||||
v-if="isUsingContractAmount(scope.row)"
|
|
||||||
content="结算合同总产值未填写,当前暂按合同总产值测算"
|
|
||||||
placement="top"
|
|
||||||
>
|
|
||||||
<span>{{ formatAmountText(scope.row.effectiveSettlementAmount) }}</span>
|
|
||||||
</el-tooltip>
|
|
||||||
<span v-else>{{ formatAmountText(scope.row.effectiveSettlementAmount) }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="综合所人工成本(元)" width="150">
|
<el-table-column align="center" label="综合所人工成本(元)" width="150">
|
||||||
@@ -105,31 +98,31 @@
|
|||||||
{{ formatAmountText(scope.row.comprehensivePlanningAmount) }}
|
{{ formatAmountText(scope.row.comprehensivePlanningAmount) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="专项分包-专业所人工成本(元)" width="210">
|
<el-table-column align="center" label="专项分包(专业所成本)(元)" width="210">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatAmountText(scope.row.specialSubcontractPlanningAmount) }}
|
{{ formatAmountText(scope.row.specialSubcontractPlanningAmount) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="专项分包-源头合作分包人工成本(元)" width="250">
|
<el-table-column align="center" label="专项分包(源头合作成本)(元)" width="240">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatAmountText(scope.row.sourceCoopSubcontractPlanningAmount) }}
|
{{ formatAmountText(scope.row.sourceCoopSubcontractPlanningAmount) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="专项分包-综合所人工成本(元)" width="230">
|
<el-table-column align="center" label="专项分包(综合所成本)(元)" width="220">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatAmountText(scope.row.comprehensiveSubcontractPlanningAmount) }}
|
{{ formatAmountText(scope.row.comprehensiveSubcontractPlanningAmount) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="专业所考核产值(元)" width="150">
|
|
||||||
<template #default="scope">
|
|
||||||
{{ formatAmountText(scope.row.majorOutputValue) }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" label="专业所人工成本(元)" width="150">
|
<el-table-column align="center" label="专业所人工成本(元)" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatAmountText(scope.row.majorExpectedPerformance) }}
|
{{ formatAmountText(scope.row.majorExpectedPerformance) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="专业所考核产值(元)" width="150">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ formatAmountText(scope.row.majorOutputValue) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" label="科创产值比例" width="110">
|
<el-table-column align="center" label="科创产值比例" width="110">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ formatPercentText(scope.row.innovationOutputRate) }}
|
{{ formatPercentText(scope.row.innovationOutputRate) }}
|
||||||
@@ -180,64 +173,271 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-descriptions :column="3" border>
|
<section class="mb-28px">
|
||||||
<el-descriptions-item label="合同总产值(元)">
|
<div class="mb-12px flex items-center justify-between gap-16px">
|
||||||
{{ formatAmountText(currentProfit.contractAmount) }}
|
<div>
|
||||||
</el-descriptions-item>
|
<div class="text-15px font-600">项目成本预算测算表</div>
|
||||||
<el-descriptions-item label="结算合同总产值(元)">
|
<div class="mt-4px flex flex-wrap items-center gap-10px text-13px text-[var(--el-text-color-secondary)]">
|
||||||
{{ formatAmountText(currentProfit.finalSettlementAmount) }}
|
<el-tag :type="budgetSnapshot ? 'success' : 'info'">
|
||||||
</el-descriptions-item>
|
{{ budgetSnapshot ? '已锁定' : '动态测算' }}
|
||||||
<el-descriptions-item label="项目预算产值总计(元)">
|
</el-tag>
|
||||||
<el-tooltip
|
<span>{{ snapshotActionText(budgetSnapshot) }}</span>
|
||||||
v-if="isUsingContractAmount(currentProfit)"
|
</div>
|
||||||
content="结算合同总产值未填写,当前暂按合同总产值测算"
|
</div>
|
||||||
placement="top"
|
<el-button
|
||||||
|
:disabled="!!budgetSnapshot"
|
||||||
|
:loading="actionLoading === 'budget'"
|
||||||
|
type="primary"
|
||||||
|
@click="handleLockBudgetSnapshot"
|
||||||
>
|
>
|
||||||
<span>{{ formatAmountText(currentProfit.effectiveSettlementAmount) }}</span>
|
目标责任书下达
|
||||||
</el-tooltip>
|
</el-button>
|
||||||
<span v-else>{{ formatAmountText(currentProfit.effectiveSettlementAmount) }}</span>
|
</div>
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="项目开始年度">
|
<el-alert
|
||||||
{{ currentProfit.projectStartYear || '-' }}
|
v-if="!budgetSnapshot"
|
||||||
</el-descriptions-item>
|
class="mb-12px"
|
||||||
<el-descriptions-item label="综合所人工成本(元)">
|
:closable="false"
|
||||||
{{ formatAmountText(currentProfit.comprehensivePlanningAmount) }}
|
show-icon
|
||||||
</el-descriptions-item>
|
title="当前展示实时动态测算值。点击“目标责任书下达”后,本阶段数据会生成快照并锁定。"
|
||||||
<el-descriptions-item label="专项分包-专业所人工成本(元)">
|
type="info"
|
||||||
{{ formatAmountText(currentProfit.specialSubcontractPlanningAmount) }}
|
/>
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="专项分包-源头合作分包人工成本(元)">
|
<el-descriptions v-if="budgetDisplay" :column="3" border>
|
||||||
{{ formatAmountText(currentProfit.sourceCoopSubcontractPlanningAmount) }}
|
<el-descriptions-item label="合同总产值(元)">
|
||||||
</el-descriptions-item>
|
{{ formatAmountText(budgetDisplay.contractAmount) }}
|
||||||
<el-descriptions-item label="专项分包-综合所人工成本(元)">
|
</el-descriptions-item>
|
||||||
{{ formatAmountText(currentProfit.comprehensiveSubcontractPlanningAmount) }}
|
<el-descriptions-item label="结算合同总产值(元)">
|
||||||
</el-descriptions-item>
|
{{ formatAmountText(budgetDisplay.finalSettlementAmount) }}
|
||||||
<el-descriptions-item label="专业所考核产值(元)">
|
</el-descriptions-item>
|
||||||
{{ formatAmountText(currentProfit.majorOutputValue) }}
|
<el-descriptions-item label="项目预算产值总计(元)">
|
||||||
</el-descriptions-item>
|
{{ formatAmountText(budgetDisplay.effectiveSettlementAmount) }}
|
||||||
<el-descriptions-item label="专业所人工成本(元)">
|
</el-descriptions-item>
|
||||||
{{ formatAmountText(currentProfit.majorExpectedPerformance) }}
|
<el-descriptions-item label="项目开始年度">
|
||||||
</el-descriptions-item>
|
{{ currentProfit.projectStartYear || '-' }}
|
||||||
<el-descriptions-item label="科创产值比例">
|
</el-descriptions-item>
|
||||||
{{ formatPercentText(currentProfit.innovationOutputRate) }}
|
<el-descriptions-item label="综合所人工成本(元)">
|
||||||
</el-descriptions-item>
|
{{ formatAmountText(budgetDisplay.comprehensivePlanningAmount) }}
|
||||||
<el-descriptions-item label="科创产值(元)">
|
</el-descriptions-item>
|
||||||
{{ formatAmountText(currentProfit.innovationOutputValue) }}
|
<el-descriptions-item label="专项分包(专业所成本)(元)">
|
||||||
</el-descriptions-item>
|
{{ formatAmountText(budgetDisplay.specialSubcontractPlanningAmount) }}
|
||||||
<el-descriptions-item label="其他成本(元)">
|
</el-descriptions-item>
|
||||||
{{ formatAmountText(currentProfit.otherCost) }}
|
<el-descriptions-item label="专项分包(源头合作成本)(元)">
|
||||||
</el-descriptions-item>
|
{{ formatAmountText(budgetDisplay.sourceCoopSubcontractPlanningAmount) }}
|
||||||
<el-descriptions-item label="预算盈亏值(元)">
|
</el-descriptions-item>
|
||||||
<span :class="profitLossClass(currentProfit.profitLossValue)">
|
<el-descriptions-item label="专项分包(综合所成本)(元)">
|
||||||
{{ formatAmountText(currentProfit.profitLossValue) }}
|
{{ formatAmountText(budgetDisplay.comprehensiveSubcontractPlanningAmount) }}
|
||||||
</span>
|
</el-descriptions-item>
|
||||||
</el-descriptions-item>
|
<el-descriptions-item label="专业所人工成本(元)">
|
||||||
<el-descriptions-item label="预算盈亏百分比">
|
{{ formatAmountText(budgetDisplay.majorExpectedPerformance) }}
|
||||||
<span :class="profitLossClass(currentProfit.profitLossValue)">
|
</el-descriptions-item>
|
||||||
{{ formatPercentText(currentProfit.profitLossRate) }}
|
<el-descriptions-item label="专业所考核产值(元)">
|
||||||
</span>
|
{{ formatAmountText(budgetDisplay.majorOutputValue) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
<el-descriptions-item label="科创产值比例">
|
||||||
|
{{ formatPercentText(budgetDisplay.innovationOutputRate) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="科创产值(元)">
|
||||||
|
{{ formatAmountText(budgetDisplay.innovationOutputValue) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="其他成本(元)">
|
||||||
|
{{ formatAmountText(budgetDisplay.otherCost) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="预算盈亏值(元)">
|
||||||
|
<span :class="profitLossClass(budgetDisplay.profitLossValue)">
|
||||||
|
{{ formatAmountText(budgetDisplay.profitLossValue) }}
|
||||||
|
</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="预算盈亏百分比">
|
||||||
|
<span :class="profitLossClass(budgetDisplay.profitLossValue)">
|
||||||
|
{{ formatPercentText(budgetDisplay.profitLossRate) }}
|
||||||
|
</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="mb-28px">
|
||||||
|
<div class="mb-12px flex items-center justify-between gap-16px">
|
||||||
|
<div>
|
||||||
|
<div class="text-15px font-600">项目成本核算测算表</div>
|
||||||
|
<div class="mt-4px flex flex-wrap items-center gap-10px text-13px text-[var(--el-text-color-secondary)]">
|
||||||
|
<el-tag :type="accountingSnapshot ? 'success' : 'info'">
|
||||||
|
{{ accountingSnapshot ? '已锁定' : '动态测算' }}
|
||||||
|
</el-tag>
|
||||||
|
<span>{{ snapshotActionText(accountingSnapshot) }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-button
|
||||||
|
:disabled="!budgetSnapshot || !!accountingSnapshot"
|
||||||
|
:loading="actionLoading === 'accounting'"
|
||||||
|
type="primary"
|
||||||
|
@click="handleLockAccountingSnapshot"
|
||||||
|
>
|
||||||
|
竣工验收完成
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-alert
|
||||||
|
v-if="!budgetSnapshot"
|
||||||
|
class="mb-12px"
|
||||||
|
:closable="false"
|
||||||
|
show-icon
|
||||||
|
title="请先下达目标责任书,锁定项目成本预算测算后,才能完成竣工验收。"
|
||||||
|
type="warning"
|
||||||
|
/>
|
||||||
|
<el-alert
|
||||||
|
v-else-if="!accountingSnapshot"
|
||||||
|
class="mb-12px"
|
||||||
|
:closable="false"
|
||||||
|
show-icon
|
||||||
|
title="当前展示实时动态测算值。点击“竣工验收完成”后,本阶段数据会生成快照并锁定。"
|
||||||
|
type="info"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-descriptions v-if="accountingDisplay" :column="3" border>
|
||||||
|
<el-descriptions-item label="合同总产值(元)">
|
||||||
|
{{ formatAmountText(accountingDisplay.contractAmount) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="结算合同总产值(元)">
|
||||||
|
{{ formatAmountText(accountingDisplay.finalSettlementAmount) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="项目预算产值总计(元)">
|
||||||
|
{{ formatAmountText(accountingDisplay.effectiveSettlementAmount) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="项目开始年度">
|
||||||
|
{{ currentProfit.projectStartYear || '-' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="综合所人工成本(元)">
|
||||||
|
{{ formatAmountText(accountingDisplay.comprehensivePlanningAmount) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="专项分包(专业所成本)(元)">
|
||||||
|
{{ formatAmountText(accountingDisplay.specialSubcontractPlanningAmount) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="专项分包(源头合作成本)(元)">
|
||||||
|
{{ formatAmountText(accountingDisplay.sourceCoopSubcontractPlanningAmount) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="专项分包(综合所成本)(元)">
|
||||||
|
{{ formatAmountText(accountingDisplay.comprehensiveSubcontractPlanningAmount) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="专业所人工成本(元)">
|
||||||
|
{{ formatAmountText(accountingDisplay.majorExpectedPerformance) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="专业所考核产值(元)">
|
||||||
|
{{ formatAmountText(accountingDisplay.majorOutputValue) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="科创产值比例">
|
||||||
|
{{ formatPercentText(accountingDisplay.innovationOutputRate) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="科创产值(元)">
|
||||||
|
{{ formatAmountText(accountingDisplay.innovationOutputValue) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="其他成本(元)">
|
||||||
|
{{ formatAmountText(accountingDisplay.otherCost) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="预算盈亏值(元)">
|
||||||
|
<span :class="profitLossClass(accountingDisplay.profitLossValue)">
|
||||||
|
{{ formatAmountText(accountingDisplay.profitLossValue) }}
|
||||||
|
</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="预算盈亏百分比">
|
||||||
|
<span :class="profitLossClass(accountingDisplay.profitLossValue)">
|
||||||
|
{{ formatPercentText(accountingDisplay.profitLossRate) }}
|
||||||
|
</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<div class="mb-12px flex items-center justify-between gap-16px">
|
||||||
|
<div>
|
||||||
|
<div class="text-15px font-600">项目成本结算测算表</div>
|
||||||
|
<div class="mt-4px flex flex-wrap items-center gap-10px text-13px text-[var(--el-text-color-secondary)]">
|
||||||
|
<el-tag :type="settlementSnapshot ? 'success' : 'info'">
|
||||||
|
{{ settlementSnapshot ? '已保存' : '未保存' }}
|
||||||
|
</el-tag>
|
||||||
|
<span>{{ snapshotActionText(settlementSnapshot, '保存结算测算后会记录操作人和操作时间') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-alert
|
||||||
|
v-if="!accountingSnapshot"
|
||||||
|
class="mb-12px"
|
||||||
|
:closable="false"
|
||||||
|
show-icon
|
||||||
|
title="请先点击“竣工验收完成”锁定项目成本核算测算,再维护结算测算。"
|
||||||
|
type="warning"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item label="综合所考核产值核算值(元)">
|
||||||
|
{{ formatAmountText(settlementComprehensiveAccountingValue) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="综合所考核产值结算值(元)">
|
||||||
|
{{ formatAmountText(settlementComprehensiveSettlementValue) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="专业所考核产值核算值(元)">
|
||||||
|
{{ formatAmountText(settlementMajorAccountingValue) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="专业所考核产值结算值(元)">
|
||||||
|
{{ formatAmountText(settlementMajorSettlementValue) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-form
|
||||||
|
ref="settlementFormRef"
|
||||||
|
:disabled="!accountingSnapshot"
|
||||||
|
:model="settlementForm"
|
||||||
|
:rules="settlementRules"
|
||||||
|
class="mt-16px"
|
||||||
|
label-width="110px"
|
||||||
|
>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="考核结果" prop="assessmentResult">
|
||||||
|
<el-select
|
||||||
|
v-model="settlementForm.assessmentResult"
|
||||||
|
class="!w-1/1"
|
||||||
|
placeholder="请选择考核结果"
|
||||||
|
>
|
||||||
|
<el-option label="优秀" value="优秀" />
|
||||||
|
<el-option label="合格" value="合格" />
|
||||||
|
<el-option label="待改进" value="待改进" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="考核系数" prop="assessmentCoefficient">
|
||||||
|
<el-input :model-value="formatCoefficientText(settlementCoefficient)" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="操作" prop="action">
|
||||||
|
<el-button
|
||||||
|
:disabled="!accountingSnapshot"
|
||||||
|
:loading="actionLoading === 'settlement'"
|
||||||
|
type="primary"
|
||||||
|
@click="handleSaveSettlementSnapshot"
|
||||||
|
>
|
||||||
|
保存结算测算
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input
|
||||||
|
v-model="settlementForm.remark"
|
||||||
|
:rows="2"
|
||||||
|
maxlength="500"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
show-word-limit
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-empty v-else-if="!detailLoading" description="请选择项目后查看项目成本详情" />
|
<el-empty v-else-if="!detailLoading" description="请选择项目后查看项目成本详情" />
|
||||||
@@ -297,6 +497,7 @@ import {
|
|||||||
fromPercentValue,
|
fromPercentValue,
|
||||||
toPercentValue
|
toPercentValue
|
||||||
} from '@/views/tjt/shared/planning'
|
} from '@/views/tjt/shared/planning'
|
||||||
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
defineOptions({ name: 'TjtProfit' })
|
defineOptions({ name: 'TjtProfit' })
|
||||||
|
|
||||||
@@ -305,11 +506,21 @@ const { t } = useI18n()
|
|||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const detailLoading = ref(false)
|
const detailLoading = ref(false)
|
||||||
|
const actionLoading = ref<'budget' | 'accounting' | 'settlement' | ''>('')
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const list = ref<ProfitApi.ProjectProfitVO[]>([])
|
const list = ref<ProfitApi.ProjectProfitVO[]>([])
|
||||||
const currentProfit = ref<ProfitApi.ProjectProfitVO>()
|
const currentProfit = ref<ProfitApi.ProjectProfitVO>()
|
||||||
const queryFormRef = ref()
|
const queryFormRef = ref()
|
||||||
const profitTableRef = ref()
|
const profitTableRef = ref()
|
||||||
|
const settlementFormRef = ref()
|
||||||
|
const settlementForm = reactive<ProfitApi.ProjectProfitSettlementSaveReqVO>({
|
||||||
|
projectId: 0,
|
||||||
|
assessmentResult: '合格',
|
||||||
|
remark: ''
|
||||||
|
})
|
||||||
|
const settlementRules = {
|
||||||
|
assessmentResult: [{ required: true, message: '请选择考核结果', trigger: 'change' }]
|
||||||
|
}
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const dialogLoading = ref(false)
|
const dialogLoading = ref(false)
|
||||||
@@ -354,6 +565,29 @@ const queryProjectStartYearValue = computed({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const budgetSnapshot = computed(() => currentProfit.value?.budgetSnapshot)
|
||||||
|
const accountingSnapshot = computed(() => currentProfit.value?.accountingSnapshot)
|
||||||
|
const settlementSnapshot = computed(() => currentProfit.value?.settlementSnapshot)
|
||||||
|
const budgetDisplay = computed(() => budgetSnapshot.value || currentProfit.value)
|
||||||
|
const accountingDisplay = computed(() => accountingSnapshot.value || currentProfit.value)
|
||||||
|
const settlementCoefficient = computed(() => getAssessmentCoefficient(settlementForm.assessmentResult))
|
||||||
|
const settlementComprehensiveAccountingValue = computed(() =>
|
||||||
|
Number(
|
||||||
|
settlementSnapshot.value?.comprehensiveAccountingOutputValue ??
|
||||||
|
accountingSnapshot.value?.comprehensivePlanningAmount ??
|
||||||
|
0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
const settlementMajorAccountingValue = computed(() =>
|
||||||
|
Number(settlementSnapshot.value?.majorAccountingOutputValue ?? accountingSnapshot.value?.majorOutputValue ?? 0)
|
||||||
|
)
|
||||||
|
const settlementComprehensiveSettlementValue = computed(() =>
|
||||||
|
roundAmount(settlementComprehensiveAccountingValue.value * settlementCoefficient.value)
|
||||||
|
)
|
||||||
|
const settlementMajorSettlementValue = computed(() =>
|
||||||
|
roundAmount(settlementMajorAccountingValue.value * settlementCoefficient.value)
|
||||||
|
)
|
||||||
|
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
let targetProfit: ProfitApi.ProjectProfitVO | undefined
|
let targetProfit: ProfitApi.ProjectProfitVO | undefined
|
||||||
@@ -412,6 +646,60 @@ const refreshCurrentProfit = async () => {
|
|||||||
await getList()
|
await getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleLockBudgetSnapshot = async () => {
|
||||||
|
if (!currentProfit.value?.projectId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await message.confirm('确认下达目标责任书并锁定当前项目成本预算测算吗?锁定后不能重复操作。')
|
||||||
|
actionLoading.value = 'budget'
|
||||||
|
try {
|
||||||
|
currentProfit.value = await ProfitApi.lockBudgetSnapshot(currentProfit.value.projectId)
|
||||||
|
message.success('目标责任书已下达')
|
||||||
|
await getList()
|
||||||
|
} finally {
|
||||||
|
actionLoading.value = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleLockAccountingSnapshot = async () => {
|
||||||
|
if (!currentProfit.value?.projectId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!budgetSnapshot.value) {
|
||||||
|
message.warning('请先下达目标责任书,再完成竣工验收')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await message.confirm('确认竣工验收完成并锁定当前项目成本核算测算吗?锁定后不能重复操作。')
|
||||||
|
actionLoading.value = 'accounting'
|
||||||
|
try {
|
||||||
|
currentProfit.value = await ProfitApi.lockAccountingSnapshot(currentProfit.value.projectId)
|
||||||
|
message.success('竣工验收已完成')
|
||||||
|
await getList()
|
||||||
|
} finally {
|
||||||
|
actionLoading.value = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSaveSettlementSnapshot = async () => {
|
||||||
|
if (!currentProfit.value?.projectId || !accountingSnapshot.value) {
|
||||||
|
message.warning('请先完成竣工验收,再维护结算测算')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await settlementFormRef.value?.validate()
|
||||||
|
actionLoading.value = 'settlement'
|
||||||
|
try {
|
||||||
|
currentProfit.value = await ProfitApi.saveSettlementSnapshot({
|
||||||
|
projectId: currentProfit.value.projectId,
|
||||||
|
assessmentResult: settlementForm.assessmentResult,
|
||||||
|
remark: settlementForm.remark
|
||||||
|
})
|
||||||
|
message.success('结算测算已保存')
|
||||||
|
await getList()
|
||||||
|
} finally {
|
||||||
|
actionLoading.value = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const openProfitEditDialog = async () => {
|
const openProfitEditDialog = async () => {
|
||||||
if (!currentProfit.value?.projectId) {
|
if (!currentProfit.value?.projectId) {
|
||||||
return
|
return
|
||||||
@@ -469,8 +757,46 @@ const profitLossClass = (value?: number) => {
|
|||||||
return 'text-[var(--el-text-color-primary)]'
|
return 'text-[var(--el-text-color-primary)]'
|
||||||
}
|
}
|
||||||
|
|
||||||
const isUsingContractAmount = (row?: ProfitApi.ProjectProfitVO) =>
|
const snapshotActionText = (
|
||||||
!!row && Number(row.finalSettlementAmount || 0) <= 0 && Number(row.contractAmount || 0) > 0
|
snapshot?: ProfitApi.ProjectProfitSnapshotVO,
|
||||||
|
emptyText = '当前为实时动态测算值,尚未锁定'
|
||||||
|
) => {
|
||||||
|
if (!snapshot) {
|
||||||
|
return emptyText
|
||||||
|
}
|
||||||
|
const actionName = snapshot.actionUserName || '未知操作人'
|
||||||
|
const actionTime = snapshot.actionTime ? formatDate(snapshot.actionTime as any) : '未知时间'
|
||||||
|
return `${actionName} 于 ${actionTime} 操作`
|
||||||
|
}
|
||||||
|
|
||||||
|
const roundAmount = (value: number) => Math.round((Number(value) || 0) * 100) / 100
|
||||||
|
|
||||||
|
const getAssessmentCoefficient = (assessmentResult?: string) => {
|
||||||
|
if (assessmentResult === '优秀') {
|
||||||
|
return 1.02
|
||||||
|
}
|
||||||
|
if (assessmentResult === '待改进') {
|
||||||
|
return 0.95
|
||||||
|
}
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatCoefficientText = (value?: number) => Number(value ?? 1).toFixed(2)
|
||||||
|
|
||||||
|
const syncSettlementForm = () => {
|
||||||
|
if (!currentProfit.value?.projectId) {
|
||||||
|
settlementForm.projectId = 0
|
||||||
|
settlementForm.assessmentResult = '合格'
|
||||||
|
settlementForm.remark = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const snapshot = currentProfit.value.settlementSnapshot
|
||||||
|
settlementForm.projectId = currentProfit.value.projectId
|
||||||
|
settlementForm.assessmentResult = snapshot?.assessmentResult || '合格'
|
||||||
|
settlementForm.remark = snapshot?.remark || ''
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(currentProfit, syncSettlementForm)
|
||||||
|
|
||||||
let activatedOnce = false
|
let activatedOnce = false
|
||||||
|
|
||||||
|
|||||||
@@ -132,13 +132,11 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="排序" prop="sortNo">
|
<el-form-item label="排序" prop="sortNo">
|
||||||
<el-input-number
|
<el-input
|
||||||
v-model="formData.sortNo"
|
v-model="formData.sortNo"
|
||||||
:min="0"
|
maxlength="50"
|
||||||
:precision="0"
|
placeholder="请输入排序,如 A-01"
|
||||||
:step="1"
|
|
||||||
class="!w-1/1"
|
class="!w-1/1"
|
||||||
controls-position="right"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -174,7 +172,7 @@ const createFormData = (
|
|||||||
planningAmount?: number
|
planningAmount?: number
|
||||||
): PlanningApi.ProjectPlanningVO => ({
|
): PlanningApi.ProjectPlanningVO => ({
|
||||||
projectId: projectId || 0,
|
projectId: projectId || 0,
|
||||||
sortNo: 0,
|
sortNo: '',
|
||||||
ownershipType: ownershipTypeOptions[0].value,
|
ownershipType: ownershipTypeOptions[0].value,
|
||||||
calculationMethod: '',
|
calculationMethod: '',
|
||||||
planningContent: '',
|
planningContent: '',
|
||||||
@@ -285,7 +283,7 @@ const formRules = reactive<FormRules>({
|
|||||||
const buildSavePayload = (): PlanningApi.ProjectPlanningSaveVO => ({
|
const buildSavePayload = (): PlanningApi.ProjectPlanningSaveVO => ({
|
||||||
id: formData.value.id,
|
id: formData.value.id,
|
||||||
projectId: formData.value.projectId,
|
projectId: formData.value.projectId,
|
||||||
sortNo: formData.value.sortNo ?? 0,
|
sortNo: formData.value.sortNo?.trim() || undefined,
|
||||||
ownershipType: formData.value.ownershipType,
|
ownershipType: formData.value.ownershipType,
|
||||||
calculationMethod: formData.value.calculationMethod,
|
calculationMethod: formData.value.calculationMethod,
|
||||||
planningContent: formData.value.planningContent,
|
planningContent: formData.value.planningContent,
|
||||||
|
|||||||
@@ -155,13 +155,11 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="排序" prop="sortNo">
|
<el-form-item label="排序" prop="sortNo">
|
||||||
<el-input-number
|
<el-input
|
||||||
v-model="formData.sortNo"
|
v-model="formData.sortNo"
|
||||||
:min="0"
|
maxlength="50"
|
||||||
:precision="0"
|
placeholder="请输入排序,如 A-01"
|
||||||
:step="1"
|
|
||||||
class="!w-1/1"
|
class="!w-1/1"
|
||||||
controls-position="right"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -311,7 +309,7 @@ const createRolePerson = (
|
|||||||
|
|
||||||
const createFormData = (): ProjectApi.ProjectVO => ({
|
const createFormData = (): ProjectApi.ProjectVO => ({
|
||||||
projectName: '',
|
projectName: '',
|
||||||
sortNo: 0,
|
sortNo: '',
|
||||||
contractSignedFlag: true,
|
contractSignedFlag: true,
|
||||||
contractAmount: undefined,
|
contractAmount: undefined,
|
||||||
totalConstructionArea: undefined,
|
totalConstructionArea: undefined,
|
||||||
@@ -494,7 +492,7 @@ const emit = defineEmits(['success'])
|
|||||||
const buildSavePayload = (): ProjectApi.ProjectSaveVO => ({
|
const buildSavePayload = (): ProjectApi.ProjectSaveVO => ({
|
||||||
id: formData.value.id,
|
id: formData.value.id,
|
||||||
projectName: formData.value.projectName,
|
projectName: formData.value.projectName,
|
||||||
sortNo: formData.value.sortNo ?? 0,
|
sortNo: formData.value.sortNo?.trim() || undefined,
|
||||||
contractSignedFlag: formData.value.contractSignedFlag,
|
contractSignedFlag: formData.value.contractSignedFlag,
|
||||||
contractAmount: formData.value.contractAmount,
|
contractAmount: formData.value.contractAmount,
|
||||||
totalConstructionArea: formData.value.totalConstructionArea,
|
totalConstructionArea: formData.value.totalConstructionArea,
|
||||||
|
|||||||
Reference in New Issue
Block a user