|
@@ -289,10 +289,10 @@ export default {
|
|
|
this.form.month_investment_amount[this.current.index].sum = this.getSum(this.form.month_investment_amount[this.current.index].monthlyData)
|
|
this.form.month_investment_amount[this.current.index].sum = this.getSum(this.form.month_investment_amount[this.current.index].monthlyData)
|
|
|
}
|
|
}
|
|
|
// 生成年月字段
|
|
// 生成年月字段
|
|
|
- this.initYearMonth(this.form.month_plan_complete_amount, '_month_plan_complete_amount')
|
|
|
|
|
- this.initYearMonth(this.form.month_complete_amount, '_month_complete_amount')
|
|
|
|
|
- this.initYearMonth(this.form.month_plan_investment, '_month_plan_investment')
|
|
|
|
|
- this.initYearMonth(this.form.month_investment_amount, '_month_investment_amount')
|
|
|
|
|
|
|
+ this.initYearMonth(this.form.month_plan_complete_amount, '_month_plan_complete_amount', '_yearly_plan_complete_amount')
|
|
|
|
|
+ this.initYearMonth(this.form.month_complete_amount, '_month_complete_amount', '_yearly_complete_amount')
|
|
|
|
|
+ this.initYearMonth(this.form.month_plan_investment, '_month_plan_investment', '_yearly_plan_investment')
|
|
|
|
|
+ this.initYearMonth(this.form.month_investment_amount, '_month_investment_amount', '_yearly_complete_investment')
|
|
|
delete this.form._id
|
|
delete this.form._id
|
|
|
this.$api.project.proUpdate(this.detail).then(res => {
|
|
this.$api.project.proUpdate(this.detail).then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -310,12 +310,13 @@ export default {
|
|
|
/**
|
|
/**
|
|
|
* 组合字段
|
|
* 组合字段
|
|
|
* @param list
|
|
* @param list
|
|
|
- * @param key
|
|
|
|
|
|
|
+ * @param key 月度关键词
|
|
|
|
|
+ * @param key1 年度关键词
|
|
|
*/
|
|
*/
|
|
|
- initYearMonth (list, key) {
|
|
|
|
|
|
|
+ initYearMonth (list, key, key1) {
|
|
|
if (list.length > 0) {
|
|
if (list.length > 0) {
|
|
|
list.forEach(sub => {
|
|
list.forEach(sub => {
|
|
|
- let tmp = this.kv(sub.year + '_yearly_' + key, sub.sum)
|
|
|
|
|
|
|
+ let tmp = this.kv(sub.year + key1, sub.sum)
|
|
|
sub.monthlyData.forEach(res => {
|
|
sub.monthlyData.forEach(res => {
|
|
|
const month = this.kv(res.year + '_' + res.month + key, res.data)
|
|
const month = this.kv(res.year + '_' + res.month + key, res.data)
|
|
|
tmp = Object.assign(tmp, month)
|
|
tmp = Object.assign(tmp, month)
|