Commit 37c62cdf authored by huyf's avatar huyf

部门业绩

parent 0ab4078e
......@@ -49,7 +49,7 @@
</el-table-column>
<el-table-column label="时间范围" align="center" prop="targetPeriodName">
<template slot-scope="scope">
<span>{{scope.row.startTime}}~{{scope.row.endTime}}</span>
<span>{{dateFormat(scope.row.startTime)}}~{{dateFormat(scope.row.endTime)}}</span>
</template>
</el-table-column>
<el-table-column label="部门人数" align="center" prop="deptEmpCount"/>
......@@ -126,6 +126,7 @@
import { createDeptTarget, updateDeptTarget, deleteDeptTarget, getDeptTarget, getDeptTargetPage, exportDeptTargetExcel,getCreateInitData } from "@/api/ecw/deptTarget";
import { listSimpleDepts } from "@/api/system/dept";
import { getChannelList } from '@/api/ecw/channel';
import dayjs from "dayjs";
export default {
name: "DeptTarget",
......@@ -210,6 +211,11 @@ export default {
})
});
getCreateInitData().then(res=>{
this.monthList = res.data.month;
this.quarterList = res.data.quarter;
this.yearList = res.data.year;
});
this.getChannelList();
this.getList();
},
......@@ -217,6 +223,9 @@ export default {
getChannelList(){
getChannelList().then(res => this.channelList = res.data)
},
dateFormat(val){
return dayjs(val).format("YYYY-MM-DD");
},
changeList(val){
if(val===1){
this.form.targetPeriodName=undefined;
......@@ -287,11 +296,6 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
getCreateInitData().then(res=>{
this.monthList = res.data.month;
this.quarterList = res.data.quarter;
this.yearList = res.data.year;
})
this.targetPeriod = this.monthList;
this.reset();
this.open = true;
......@@ -303,6 +307,13 @@ export default {
const id = row.id;
getDeptTarget(id).then(response => {
this.form = response.data;
if(response.data.targetType===1){
this.targetPeriod = this.monthList;
} else if (response.data.targetType ===2 ){
this.targetPeriod = this.quarterList;
} else{
this.targetPeriod = this.yearList;
}
this.open = true;
this.title = "修改部门业绩目标设置";
});
......
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