|
|
@ -102,8 +102,7 @@ |
|
|
<template #footer> |
|
|
<template #footer> |
|
|
<a-space> |
|
|
<a-space> |
|
|
<a-button @click="onClose">取消</a-button> |
|
|
<a-button @click="onClose">取消</a-button> |
|
|
<a-button @click="saveAsDraft" type="default" v-if="!form.id">保存草稿</a-button> |
|
|
<a-button @click="saveAsDraft" type="default" v-if="!form.id || form.approvalStatus === 0">保存草稿</a-button> |
|
|
<a-button type="primary" @click="submitForReview">提交</a-button> |
|
|
|
|
|
</a-space> |
|
|
</a-space> |
|
|
</template> |
|
|
</template> |
|
|
</a-modal> |
|
|
</a-modal> |
|
|
@ -198,6 +197,18 @@ |
|
|
if (rowData && typeof rowData === 'object' && rowData.id) { |
|
|
if (rowData && typeof rowData === 'object' && rowData.id) { |
|
|
console.log('编辑模式,使用现有数据'); |
|
|
console.log('编辑模式,使用现有数据'); |
|
|
Object.assign(form, rowData); |
|
|
Object.assign(form, rowData); |
|
|
|
|
|
|
|
|
|
|
|
// 确保declareQuarter字段格式与字典系统匹配 |
|
|
|
|
|
if (form.declareQuarter && typeof form.declareQuarter === 'number') { |
|
|
|
|
|
// 如果后端返回的是数字格式,转换为字典期望的字符串格式 |
|
|
|
|
|
form.declareQuarter = 'Q' + form.declareQuarter; |
|
|
|
|
|
} else if (form.declareQuarter && form.declareQuarter.includes('(')) { |
|
|
|
|
|
// 如果返回的是显示名称格式(如"第一季度 (Q1)"),提取字典值 |
|
|
|
|
|
const match = form.declareQuarter.match(/\(([^)]+)\)/); |
|
|
|
|
|
if (match && match[1]) { |
|
|
|
|
|
form.declareQuarter = match[1]; // 提取Q1这样的字典值 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
console.log('新建模式,等待用户选择季度后获取公益成本'); |
|
|
console.log('新建模式,等待用户选择季度后获取公益成本'); |
|
|
// 新建时不立即获取公益成本,等待用户选择季度 |
|
|
// 新建时不立即获取公益成本,等待用户选择季度 |
|
|
@ -227,7 +238,7 @@ |
|
|
declareYear: new Date().getFullYear(), // 报表年份 |
|
|
declareYear: new Date().getFullYear(), // 报表年份 |
|
|
declareQuarter: undefined, // 季度ID (1,2,3,4) |
|
|
declareQuarter: undefined, // 季度ID (1,2,3,4) |
|
|
revenue: undefined, // 营业收入(万元) |
|
|
revenue: undefined, // 营业收入(万元) |
|
|
totalCost: 0, // 总成本支出(万元) |
|
|
//totalCost: 0, // 总成本支出(万元) |
|
|
publicWelfareCost: undefined, // 公益成本支出(万元) |
|
|
publicWelfareCost: undefined, // 公益成本支出(万元) |
|
|
costIncomeRatio: '0.00', // 成本收入比(%) |
|
|
costIncomeRatio: '0.00', // 成本收入比(%) |
|
|
}; |
|
|
}; |
|
|
|