|
|
@@ -23,13 +23,13 @@
|
|
|
<div class='flex-child-average full-width flex flex-center'>
|
|
|
<span style='width: 320px'>{{ item.year }}年度计划投资(万元)</span>
|
|
|
<el-input v-model='item.value' @change='change(item)'></el-input>
|
|
|
- <div class='btnSub pointer'>月填报</div>
|
|
|
+ <div class='btnSub pointer' @click='showMonth(item,1)'>月填报</div>
|
|
|
</div>
|
|
|
<div style='width: 20px'></div>
|
|
|
<div class='flex-child-average full-width flex flex-center'>
|
|
|
<span style='width: 380px'>{{ item.year }}年度累计投资(万元)</span>
|
|
|
<div class='disable-input' @change='change(item)'>{{ item.value2 }}</div>
|
|
|
- <div class='btnSub pointer' @click='showMonth(item)'>月填报</div>
|
|
|
+ <div class='btnSub pointer' @click='showMonth(item,2)'>月填报</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -59,7 +59,7 @@
|
|
|
<div class='flex-child-average full-width flex flex-center'>
|
|
|
<span style='width: 440px'>{{ item.year }}年度累计纳统投资(万元)</span>
|
|
|
<div class='disable-input' @change='change(item)'>{{ item.value2 }}</div>
|
|
|
- <div class='btnSub pointer' @click='showMonth(item)'>月填报</div>
|
|
|
+ <div class='btnSub pointer' @click='showMonth(item,2)'>月填报</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -69,9 +69,10 @@
|
|
|
|
|
|
<el-dialog v-model='show' :title='current ? current.year + "年度" : ""'>
|
|
|
<div class='flex flex-center flex-wrap'>
|
|
|
- <div v-for='item in current.months' :key='item'>
|
|
|
+ <div v-for='item in current.editType === 1 ? current.planMonths : current.months' :key='item'>
|
|
|
<div class='bold mb-10 mt-10'>{{ item.name }}月</div>
|
|
|
- <input :disabled='!detail.can_update' class='input flex flex-center' v-model="item.value" :min="1" @change='changeMonth(item)'/>
|
|
|
+ <input :disabled='!detail.can_update' class='input flex flex-center' v-model="item.value" :min="1"
|
|
|
+ @change='changeMonth(item)'/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class='mt-20 full-width flex text-left red'>* 请按月份进行填报,单位:万元</div>
|
|
|
@@ -137,6 +138,7 @@ export default {
|
|
|
code2: lastYear + '_total_complete_amount',
|
|
|
value: '',
|
|
|
value1: '',
|
|
|
+ planMonths: months,
|
|
|
months
|
|
|
}
|
|
|
this.list1.push(item)
|
|
|
@@ -159,6 +161,7 @@ export default {
|
|
|
code2: lastYear + '_total_investment_amount',
|
|
|
value: '',
|
|
|
value1: '',
|
|
|
+ planMonths: months,
|
|
|
months
|
|
|
}
|
|
|
this.list2.push(item)
|
|
|
@@ -170,8 +173,10 @@ export default {
|
|
|
keys.forEach(sub => {
|
|
|
const tmp = Number.parseInt(sub.substring(0, 4))
|
|
|
const months = []
|
|
|
+ const planMonths = []
|
|
|
for (let i = 1; i <= 12; i++) {
|
|
|
months.push({ index: i, name: i, value: this.form[tmp + '_' + i + '_month_complete_amount'] })
|
|
|
+ planMonths.push({ index: i, name: i, value: this.form[tmp + '_' + i + '_month_plan_complete_amount'] })
|
|
|
}
|
|
|
|
|
|
const item = {
|
|
|
@@ -181,6 +186,7 @@ export default {
|
|
|
year: tmp,
|
|
|
value: this.detail[tmp + '_plan_complete_amount'],
|
|
|
value2: this.detail[tmp + '_total_complete_amount'],
|
|
|
+ planMonths,
|
|
|
months
|
|
|
}
|
|
|
this.list1.push(item)
|
|
|
@@ -192,8 +198,10 @@ export default {
|
|
|
keysInvestment.forEach(sub => {
|
|
|
const tmp = Number.parseInt(sub.substring(0, 4))
|
|
|
const months = []
|
|
|
+ const planMonths = []
|
|
|
for (let i = 1; i <= 12; i++) {
|
|
|
months.push({ index: i, name: i, value: this.form[tmp + '_' + i + '_month_investment_amount'] })
|
|
|
+ planMonths.push({ index: i, name: i, value: this.form[tmp + '_' + i + '_month_plan_investment_amount'] })
|
|
|
}
|
|
|
const item = {
|
|
|
type: 2,
|
|
|
@@ -201,7 +209,9 @@ export default {
|
|
|
code2: tmp + '_total_investment_amount',
|
|
|
year: tmp,
|
|
|
value: this.detail[tmp + '_plan_investment_amount'],
|
|
|
- value2: this.detail[tmp + '_total_investment_amount']
|
|
|
+ value2: this.detail[tmp + '_total_investment_amount'],
|
|
|
+ planMonths,
|
|
|
+ months
|
|
|
}
|
|
|
this.list2.push(item)
|
|
|
})
|
|
|
@@ -225,18 +235,25 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- showMonth (item) {
|
|
|
- this.show = !this.show
|
|
|
+ showMonth (item, type) {
|
|
|
this.current = item
|
|
|
+ this.current.editType = type
|
|
|
+ this.show = !this.show
|
|
|
},
|
|
|
changeMonth (res) {
|
|
|
- const code = this.current.year + '_' + res.name + (this.current.type === 1 ? '_month_complete_amount' : '_month_investment_amount')
|
|
|
+ let code = this.current.year + '_' + res.name + (this.current.type === 1 ? '_month_complete_amount' : '_month_investment_amount')
|
|
|
+ if (this.current.editType === 1) {
|
|
|
+ code = this.current.year + '_' + res.name + (this.current.type === 1 ? '_month_plan_complete_amount' : '_month_pla_investment_amount')
|
|
|
+ }
|
|
|
this.form[code] = res.value
|
|
|
const tmp = this.current.months.map(sub => Number.parseInt(sub.value))
|
|
|
const sum = tmp.reduce((accumulator, value) => {
|
|
|
return accumulator + (value || 0)
|
|
|
}, 0)
|
|
|
- const codeParent = this.current.year + (this.current.type === 1 ? '_total_complete_amount' : '_total_investment_amount')
|
|
|
+ let codeParent = this.current.year + (this.current.type === 1 ? '_total_complete_amount' : '_total_investment_amount')
|
|
|
+ if (this.current.editType === 1) {
|
|
|
+ codeParent = this.current.year + (this.current.type === 1 ? '_total_plan_complete_amount' : '_total_plan_investment_amount')
|
|
|
+ }
|
|
|
console.log(sum)
|
|
|
this.form[codeParent] = sum
|
|
|
this.current.value2 = sum
|