|
@@ -3,7 +3,7 @@
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
|
|
<el-form-item label="公司名" prop="companyId">
|
|
|
- <el-select filterable v-model="queryParams.companyId" placeholder="请选择公司名" @change="companyChange" clearable size="small">
|
|
|
+ <el-select multiple filterable v-model="companyIdArr" placeholder="请选择公司名" clearable size="small">
|
|
|
<el-option
|
|
|
v-for="item in companys"
|
|
|
:key="item.companyId"
|
|
@@ -17,7 +17,7 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="所属档期" prop="scheduleId">
|
|
|
- <el-select style="width:205.4px" v-model="queryParams.scheduleId" placeholder="请选择档期" clearable size="small" >
|
|
|
+ <el-select multiple style="width:205.4px" v-model="scheduleIdArr" placeholder="请选择档期" clearable size="small" >
|
|
|
<el-option
|
|
|
v-for="item in scheduleList"
|
|
|
:key="item.id"
|
|
@@ -50,7 +50,7 @@
|
|
|
|
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
|
<el-date-picker
|
|
|
- style="width:205.4px"
|
|
|
+ style="width:225.4px"
|
|
|
clearable size="small"
|
|
|
v-model="dateRange"
|
|
|
type="daterange"
|
|
@@ -66,6 +66,18 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="handleExport"
|
|
|
+ v-hasPermi="['company:tcmScheduleReport:export']"
|
|
|
+ >导出</el-button>
|
|
|
+ </el-col>
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ </el-row>
|
|
|
|
|
|
<el-table v-loading="loading" :data="tcmScheduleReportList" @selection-change="handleSelectionChange">
|
|
|
<!-- <el-table-column type="expand" >
|
|
@@ -169,8 +181,8 @@ import { listTcmScheduleReport, exportTcmScheduleReport,listAllSchedule } from "
|
|
|
import { getCompanyList } from "@/api/company/company";
|
|
|
export default {
|
|
|
watch: {
|
|
|
- // 监听deptId
|
|
|
- 'deptId': 'currDeptChange'
|
|
|
+ // 监听companyIdArr
|
|
|
+ 'companyIdArr':'companyChange'
|
|
|
},
|
|
|
name: "TcmScheduleReport",
|
|
|
components: { Treeselect },
|
|
@@ -192,6 +204,8 @@ export default {
|
|
|
// 中医档期业绩报表表格数据
|
|
|
tcmScheduleReportList: [],
|
|
|
scheduleList:[],
|
|
|
+ companyIdArr:[],
|
|
|
+ scheduleIdArr:[],
|
|
|
companys:[],
|
|
|
roundArr:["一轮","二轮","三轮","四轮","五轮","六轮","七轮","八轮","九轮"],
|
|
|
// 弹出层标题
|
|
@@ -310,8 +324,12 @@ export default {
|
|
|
else if(index==2){ //完课率=完课数/注册数
|
|
|
value=(row["finishNum"]/row["registerNum"]*100.0).toFixed(3)+"%";
|
|
|
}
|
|
|
- else if(index==3){ //目标完成率=累计业绩/目标业绩
|
|
|
- value=(row["totalMoney"]/row["targetMoney"]*100.0).toFixed(3)+"%";
|
|
|
+ else if(index==3){ //目标完成率=累计业绩/目标业绩
|
|
|
+ if(row.targetMoney>0){
|
|
|
+ value=(row.totalMoney/row.targetMoney*100.0).toFixed(3)+"%";
|
|
|
+ }else{
|
|
|
+ value="0%";
|
|
|
+ }
|
|
|
}
|
|
|
else if(index==4){ //人均业绩=总业绩/当期部门人数
|
|
|
value=(row["totalMoney"]/row["cuCount"]*1.0).toFixed(3);
|
|
@@ -329,6 +347,14 @@ export default {
|
|
|
},
|
|
|
/** 查询中医档期业绩报表列表 */
|
|
|
getList() {
|
|
|
+ this.queryParams.scheduleId="";
|
|
|
+ this.queryParams.companyId="";
|
|
|
+ if(this.scheduleIdArr.length>0){
|
|
|
+ this.queryParams.scheduleId=this.scheduleIdArr.toString();
|
|
|
+ }
|
|
|
+ if(this.companyIdArr.length>0){
|
|
|
+ this.queryParams.companyId=this.companyIdArr.toString();
|
|
|
+ }
|
|
|
this.loading = true;
|
|
|
listTcmScheduleReport(this.addDateRange(this.queryParams,this.dateRange)).then(response => {
|
|
|
this.tcmScheduleReportList = response.rows;
|
|
@@ -474,7 +500,7 @@ export default {
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|
|
|
- this.$confirm('是否确认导出所有中医档期业绩报表数据项?', "警告", {
|
|
|
+ this.$confirm('是否确认导出公司档期报表数据项?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
@@ -484,7 +510,7 @@ export default {
|
|
|
this.download(response.msg);
|
|
|
}).catch(function() {});
|
|
|
},
|
|
|
- getTreeselect() {
|
|
|
+ getTreeselect() {
|
|
|
var that=this;
|
|
|
var param={companyId:this.companyId}
|
|
|
treeselect(param).then((response) => {
|
|
@@ -492,15 +518,24 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
companyChange(val){
|
|
|
- console.log(val);
|
|
|
- this.companyId=val;
|
|
|
+ //this.companyId=val;
|
|
|
+ //console.log("qxj companyChange:"+val);
|
|
|
+ var companyIdArr=this.companyIdArr;
|
|
|
+ if(companyIdArr.length>0){
|
|
|
+ this.companyId=companyIdArr[companyIdArr.length-1];
|
|
|
+
|
|
|
+ }else{
|
|
|
+ delete this.queryParams.deptId;
|
|
|
+ this.companyId=this.companys[0].companyId;
|
|
|
+ }
|
|
|
this.getTreeselect();
|
|
|
},
|
|
|
currDeptChange(val){
|
|
|
console.log(val)
|
|
|
this.queryParams.deptId=val;
|
|
|
this.getList();
|
|
|
- },
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|