Commit 9c0e4863 by Kyle_Li

update: 日指标

parent 24dadec6
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<li v-for="(item, i) in zerofill" :key="i"></li> <li v-for="(item, i) in zerofill" :key="i"></li>
<li v-for="(item, i) in tableData" :key="i"> <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> <el-input-number v-model="item.performanceValue" :precision="2" :controls="false" style="width: 80px;margin-left:40px;margin-top:5px"></el-input-number>
</li> </li>
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
// import errMsg from '@/common/js/error'; // import errMsg from '@/common/js/error';
// import showMsg from '@/common/js/showmsg'; // import showMsg from '@/common/js/showmsg';
import fetch from '@/api/target-manage-app.js'; import fetch from '@/api/target-manage-app.js';
const { changeStorePerformanceDay, getStorePerformanceDay } = fetch; const { changeStorePerformanceDay, getStorePerformanceDay, changeStorePerformanceMonth } = fetch;
export default { export default {
name: 'PerfectDayTarget', name: 'PerfectDayTarget',
components: {}, components: {},
...@@ -167,7 +167,7 @@ export default { ...@@ -167,7 +167,7 @@ export default {
this.zerofill = new Array(week).fill(null); // 补空白 this.zerofill = new Array(week).fill(null); // 补空白
this.tableData = new Array(days).fill(null).map((item, i) => { this.tableData = new Array(days).fill(null).map((item, i) => {
return { return {
perfromanceDay: i + 1, performanceDay: i + 1,
performanceValue: 0 performanceValue: 0
}; };
}); });
...@@ -188,16 +188,30 @@ export default { ...@@ -188,16 +188,30 @@ export default {
}; };
getStorePerformanceDay(par, { headers: { sign: this.brandId } }) getStorePerformanceDay(par, { headers: { sign: this.brandId } })
.then(res => { .then(res => {
console.lo9g(res.perfromanceValue); console.log(res.performanceValue);
}); });
} }
}, },
// 修改月指标
confirmMonthTarget() { confirmMonthTarget() {
this.$refs.targetForm.validate(valid => { this.$refs.targetForm.validate(valid => {
if (!valid) return; 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() { confirm() {
this.loading = true; this.loading = true;
let params = { let params = {
...@@ -224,7 +238,7 @@ export default { ...@@ -224,7 +238,7 @@ export default {
return { return {
performanceValue, performanceValue,
performanceSubType: this.form.performanceSubType, 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