Commit 9c0e4863 by Kyle_Li

update: 日指标

parent 24dadec6
......@@ -45,7 +45,7 @@
<li v-for="(item, i) in zerofill" :key="i"></li>
<li v-for="(item, i) in tableData" :key="i">
<div>{{ item.perfromanceDay }}</div>
<div>{{ item.performanceDay }}</div>
<el-input-number v-model="item.performanceValue" :precision="2" :controls="false" style="width: 80px;margin-left:40px;margin-top:5px"></el-input-number>
</li>
......@@ -96,7 +96,7 @@
// import errMsg from '@/common/js/error';
// import showMsg from '@/common/js/showmsg';
import fetch from '@/api/target-manage-app.js';
const { changeStorePerformanceDay, getStorePerformanceDay } = fetch;
const { changeStorePerformanceDay, getStorePerformanceDay, changeStorePerformanceMonth } = fetch;
export default {
name: 'PerfectDayTarget',
components: {},
......@@ -167,7 +167,7 @@ export default {
this.zerofill = new Array(week).fill(null); // 补空白
this.tableData = new Array(days).fill(null).map((item, i) => {
return {
perfromanceDay: i + 1,
performanceDay: i + 1,
performanceValue: 0
};
});
......@@ -188,16 +188,30 @@ export default {
};
getStorePerformanceDay(par, { headers: { sign: this.brandId } })
.then(res => {
console.lo9g(res.perfromanceValue);
console.log(res.performanceValue);
});
}
},
// 修改月指标
confirmMonthTarget() {
this.$refs.targetForm.validate(valid => {
if (!valid) return;
const { performanceYm, performanceType, storeInfoId } = this.form;
let params = {
...this.haoban,
performanceYm,
performanceType,
storeInfoId,
performanceValue: this.targetForm.value
};
changeStorePerformanceMonth(params, { headers: { sign: this.brandId } })
.then(res => {
});
});
},
// 修改指标
// 修改指标
confirm() {
this.loading = true;
let params = {
......@@ -224,7 +238,7 @@ export default {
return {
performanceValue,
performanceSubType: this.form.performanceSubType,
performanceDay: `${this.form.performanceYm}-${performanceDay}`
performanceDay: `${this.form.performanceYm}-${performanceDay.toString().padStart(2, '0')}`
};
}));
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment