|
|
@@ -23,7 +23,6 @@
|
|
|
<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' @click='showMonth(item,1)'>月填报</div>
|
|
|
</div>
|
|
|
<div style='width: 20px'></div>
|
|
|
<div class='flex-child-average full-width flex flex-center'>
|
|
|
@@ -53,13 +52,12 @@
|
|
|
<div class='flex-child-average full-width flex flex-center'>
|
|
|
<span style='width: 400px'>{{ item.year }}年度计划纳统投资(万元)</span>
|
|
|
<el-input v-model='item.value' @change='change(item)'></el-input>
|
|
|
- <div class='btnSub pointer'>月填报</div>
|
|
|
</div>
|
|
|
<div style='width: 20px'></div>
|
|
|
<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,2)'>月填报</div>
|
|
|
+ <div class='btnSub pointer' @click='showMonth(item)'>月填报</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -68,16 +66,28 @@
|
|
|
</div>
|
|
|
|
|
|
<el-dialog v-model='show' :title='current ? current.year + "年度" : ""' width='1260px'>
|
|
|
- <div class='flex flex-center flex-wrap'>
|
|
|
- <div class='flex flex-center'>
|
|
|
- <div>
|
|
|
- <span style='margin-top: 40px;margin-right: 20px' class='bold'>计划投资:</span>
|
|
|
- <span style='margin-top: 40px;margin-right: 20px' class='bold'>计划投资:</span>
|
|
|
+ <div class='flex flex-center flex-align-start'>
|
|
|
+ <div>
|
|
|
+ <div class='padding-top'></div>
|
|
|
+ <div class='padding-top mt-20 mr-10 bold'>计划投资:</div>
|
|
|
+ <div class='padding-top mt-10 mr-10 bold'>累计投资:</div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div class='mr-5 flex flex-center '>
|
|
|
+ <div v-for='item in current.months' :key='item.name' class='title'>
|
|
|
+ {{ item.name }}月
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class='mr-5 flex flex-center'>
|
|
|
+ <div v-for='item in current.planMonths' :key='item.name'>
|
|
|
+ <input class='input' v-model="item.value" @change='changeMonth(item,1)'>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class='flex flex-center flex-col' 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)'/>
|
|
|
+
|
|
|
+ <div class='mr-5 flex flex-center'>
|
|
|
+ <div v-for='item in current.months' :key='item.name'>
|
|
|
+ <input class='input' v-model="item.value" @change='changeMonth(item,2)'>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -241,29 +251,35 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- showMonth (item, type) {
|
|
|
+ showMonth (item) {
|
|
|
this.current = item
|
|
|
- this.current.editType = type
|
|
|
this.show = !this.show
|
|
|
},
|
|
|
- changeMonth (res) {
|
|
|
- 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 ? '_plan_month_complete_amount' : '_plan_month_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)
|
|
|
- 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 ? '_plan_total_complete_amount' : '_plan_total_investment_amount')
|
|
|
- }
|
|
|
- this.form[codeParent] = sum
|
|
|
- this.current.value2 = sum
|
|
|
- console.log(this.current)
|
|
|
- this.update(false)
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @param res
|
|
|
+ * @param type 1 计划 2 累计
|
|
|
+ */
|
|
|
+ changeMonth (res, type) {
|
|
|
+ setTimeout(() => {
|
|
|
+ let code = this.current.year + '_' + res.name + (this.current.type === 1 ? '_month_complete_amount' : '_month_investment_amount')
|
|
|
+ if (type === 1) {
|
|
|
+ code = this.current.year + '_' + res.name + (this.current.type === 1 ? '_plan_month_complete_amount' : '_plan_month_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)
|
|
|
+ let codeParent = this.current.year + (this.current.type === 1 ? '_total_complete_amount' : '_total_investment_amount')
|
|
|
+ if (type === 1) {
|
|
|
+ codeParent = this.current.year + (this.current.type === 1 ? '_plan_total_complete_amount' : '_plan_total_investment_amount')
|
|
|
+ }
|
|
|
+ this.form[codeParent] = sum
|
|
|
+ this.current.value2 = sum
|
|
|
+ console.log(this.form)
|
|
|
+ this.update(false)
|
|
|
+ }, 500)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -289,6 +305,13 @@ export default {
|
|
|
grid-column-gap: 20px;
|
|
|
}
|
|
|
|
|
|
+.title {
|
|
|
+ width: 60px;
|
|
|
+ padding: 0 11px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+
|
|
|
.input {
|
|
|
width: 60px;
|
|
|
height: 30px;
|
|
|
@@ -300,7 +323,7 @@ export default {
|
|
|
.input:last-child {
|
|
|
width: 60px;
|
|
|
height: 40px;
|
|
|
- padding:0 10px;
|
|
|
+ padding: 0 10px;
|
|
|
border-right: #e7e7e7 solid 1px;
|
|
|
}
|
|
|
|