预算填报按钮规则调整

master
weizong song 6 days ago
parent cbfeb239d8
commit e7c0541ee1

@ -335,7 +335,7 @@ export default {
canWrite(packageItem) { canWrite(packageItem) {
const year = packageItem.budget_year || {} const year = packageItem.budget_year || {}
return year.status === 'ACTIVE' && year.current_phase === 'UP' return year.status === 'ACTIVE'
}, },
formatDate(dateStr) { formatDate(dateStr) {

@ -438,13 +438,12 @@ export default {
canAllocate(row) { canAllocate(row) {
const year = row.budget_year || {} const year = row.budget_year || {}
return year.status === 'ACTIVE' && year.current_phase === 'DOWN' return year.status === 'ACTIVE'
}, },
canOpenSummary(row) { canOpenSummary(row) {
const year = row.budget_year || {} const year = row.budget_year || {}
return Boolean(this.getLeadSubmission(row)) || return Boolean(this.getLeadSubmission(row)) || year.status === 'ACTIVE'
(year.status === 'ACTIVE' && year.current_phase === 'UP')
}, },
openSplitDialog(row) { openSplitDialog(row) {
@ -465,7 +464,10 @@ export default {
this.currentSummaryPackage = { ...row } this.currentSummaryPackage = { ...row }
// //
const submission = this.getLeadSubmission(row) const submission = this.getLeadSubmission(row)
this.summaryMode = !submission ? 'create' : submission.status === 'draft' ? 'edit' : 'view' const isActiveYear = row.budget_year && row.budget_year.status === 'ACTIVE'
this.summaryMode = !isActiveYear
? 'view'
: !submission ? 'create' : submission.status === 'draft' ? 'edit' : 'view'
this.summarySubmitVisible = true this.summarySubmitVisible = true
}, },

Loading…
Cancel
Save