|
@@ -163,7 +163,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="单据日期" prop="documentDate">
|
|
<el-form-item label="单据日期" prop="documentDate">
|
|
- <el-date-picker clearable v-model="form.documentDate" type="date" value-format="yyyy-MM-dd"
|
|
|
|
|
|
+ <el-date-picker clearable v-model="form.documentDate" type="date" value-format="yyyy-MM-dd" @change="setItemMonthly"
|
|
placeholder="请选择单据日期">
|
|
placeholder="请选择单据日期">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -852,8 +852,7 @@
|
|
material: null,
|
|
material: null,
|
|
department: null,
|
|
department: null,
|
|
num: null,
|
|
num: null,
|
|
- monthly: new Date().getFullYear().toString() + '-' + (new Date().getMonth() + 1).toString().padStart(2,
|
|
|
|
- '0'),
|
|
|
|
|
|
+ monthly: this.form.documentDate.substring(0, 7),
|
|
goalValue: 0,
|
|
goalValue: 0,
|
|
profitTargetValue: 0
|
|
profitTargetValue: 0
|
|
}
|
|
}
|
|
@@ -1327,8 +1326,7 @@
|
|
item.custom = this.form.custom;
|
|
item.custom = this.form.custom;
|
|
item.dept = this.form.dept;
|
|
item.dept = this.form.dept;
|
|
item.creator = this.form.creator;
|
|
item.creator = this.form.creator;
|
|
- item.monthly = new Date().getFullYear().toString() + '-' + (new Date().getMonth() + 1).toString()
|
|
|
|
- .padStart(2, '0');
|
|
|
|
|
|
+ item.monthly = this.form.documentDate.substring(0, 7);
|
|
}
|
|
}
|
|
}).catch((e) => {
|
|
}).catch((e) => {
|
|
this.$message.error(e.message)
|
|
this.$message.error(e.message)
|
|
@@ -1381,6 +1379,12 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 当单据日期改变时改变明细月份
|
|
|
|
+ setItemMonthly() {
|
|
|
|
+ for (let i = 0; i < this.monthSaleGoalDetailsList.length; i++) {
|
|
|
|
+ this.monthSaleGoalDetailsList[i].monthly = this.form.documentDate.substring(0, 7);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|