|
@@ -15,7 +15,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"
|
|
@@ -26,7 +26,7 @@
|
|
|
</el-form-item>
|
|
|
<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"
|
|
@@ -42,6 +42,19 @@
|
|
|
</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 label="档期" align="center" prop="scheduleName" />
|
|
@@ -63,6 +76,11 @@
|
|
|
<template slot-scope="scope">
|
|
|
{{ renderTotalVal(scope.row,2) }}
|
|
|
</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="消费金额" width="90" align="center" prop="money" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{!scope.row.money?0:(scope.row.money).toFixed(2)}}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="累计总业绩" width="90" align="center" prop="totalMoney" >
|
|
|
<template slot-scope="scope">
|
|
@@ -111,7 +129,7 @@
|
|
|
import { treeselect } from "@/api/company/companyDept";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
-import { listSchedule, getTcmScheduleReport, exportTcmScheduleReport,statisticsReportList } from "@/api/company/tcmScheduleReport";
|
|
|
+import { listAllSchedule, getTcmScheduleReport, exportCompanyScheduleReport,statisticsReportList } from "@/api/company/tcmScheduleReport";
|
|
|
|
|
|
export default {
|
|
|
name: "TcmScheduleReport",
|
|
@@ -134,6 +152,7 @@ export default {
|
|
|
// 中医档期业绩报表表格数据
|
|
|
tcmScheduleReportList: [],
|
|
|
scheduleList:[],
|
|
|
+ scheduleIdArr:[],
|
|
|
roundArr:["一轮","二轮","三轮","四轮","五轮","六轮","七轮","八轮","九轮"],
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
@@ -246,7 +265,11 @@ export default {
|
|
|
value=(row["finishNum"]/row["registerNum"]*100.0).toFixed(3)+"%";
|
|
|
}
|
|
|
else if(index==3){ //目标完成率=累计业绩/目标业绩
|
|
|
- value=(row["totalMoney"]/row["targetMoney"]*100.0).toFixed(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);
|
|
@@ -263,12 +286,15 @@ export default {
|
|
|
},
|
|
|
getListSchedule() {
|
|
|
this.loading = true;
|
|
|
- listSchedule().then(response => {
|
|
|
+ listAllSchedule().then(response => {
|
|
|
this.scheduleList = response.rows;
|
|
|
});
|
|
|
},
|
|
|
/** 查询中医档期业绩报表列表 */
|
|
|
getList() {
|
|
|
+ if(this.scheduleIdArr.length>0){
|
|
|
+ this.queryParams.scheduleId=this.scheduleIdArr.toString();
|
|
|
+ }
|
|
|
this.loading = true;
|
|
|
statisticsReportList(this.addDateRange(this.queryParams,this.dateRange)).then(response => {
|
|
|
this.tcmScheduleReportList = response.rows;
|
|
@@ -394,32 +420,18 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- /** 删除按钮操作 */
|
|
|
- handleDelete(row) {
|
|
|
- const ids = row.id || this.ids;
|
|
|
- this.$confirm('是否确认删除中医档期业绩报表编号为"' + ids + '"的数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return delTcmScheduleReport(ids);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.msgSuccess("删除成功");
|
|
|
- }).catch(function() {});
|
|
|
- },
|
|
|
handleDetails(row){
|
|
|
this.$router.push({path:'/schedule/report/add',query:{"scheduleId":row.scheduleId,"reportId":row.id}});
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|
|
|
- this.$confirm('是否确认导出所有中医档期业绩报表数据项?', "警告", {
|
|
|
+ this.$confirm('是否确认导出中医档期业绩报表数据项?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(function() {
|
|
|
- return exportTcmScheduleReport(queryParams);
|
|
|
+ return exportCompanyScheduleReport(queryParams);
|
|
|
}).then(response => {
|
|
|
this.download(response.msg);
|
|
|
}).catch(function() {});
|