snow пре 2 година
родитељ
комит
7d66e13dcc

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/app.js


+ 1 - 1
dist/runtime.js

@@ -113,7 +113,7 @@
 /******/
 /******/ 	var hotApplyOnUpdate = true;
 /******/ 	// eslint-disable-next-line no-unused-vars
-/******/ 	var hotCurrentHash = "35bf24879af456d55e33";
+/******/ 	var hotCurrentHash = "4ce822ca2e2263230bc8";
 /******/ 	var hotRequestTimeout = 10000;
 /******/ 	var hotCurrentModuleData = {};
 /******/ 	var hotCurrentChildModule;

+ 9 - 4
src/App.vue

@@ -4,7 +4,7 @@
       <div class="app-main-zhunbeixuanzhuan">
         <div class="app-main-xuanzhuan">
           <div class="search clear">
-            <div class="shengxia">
+            <!-- <div class="shengxia">
               <el-select
                 v-model="value"
                 :size="'small'"
@@ -20,7 +20,7 @@
                 >
                 </el-option>
               </el-select>
-            </div>
+            </div> -->
             <el-date-picker
               v-if="value === '1' || value === '3' || value === '4'"
               class="fr"
@@ -44,7 +44,11 @@
           </div>
 
           <ul class="myul">
-            <li class="myli" v-if="value === '10'">
+            <li style="margin-bottom:20px">
+              <WanyuPerformanceStatement />
+            </li>
+
+            <li class="myli">
               <performance-statistics-report />
             </li>
           </ul>
@@ -55,9 +59,10 @@
 </template>
 <script>
 import PerformanceStatisticsReport from "@/components/PerformanceStatisticsReport.vue";
+import WanyuPerformanceStatement from "@/components/WanyuPerformanceStatement.vue";
 
 export default {
-  components: { PerformanceStatisticsReport },
+  components: { PerformanceStatisticsReport, WanyuPerformanceStatement },
   data() {
     return {
       options: [

+ 3 - 1
src/api/report.js

@@ -5,5 +5,7 @@ const api = "admin/";
 
 export default {
   //业绩统计
-  list: (data, params) => http(reportApi + api + "stats", data, "post", params)
+  list: (data, params) => http(reportApi + api + "stats", data, "post", params),
+  departstat: (data, params) =>
+    http(reportApi + api + "departstat", data, "post", params)
 };

+ 11 - 0
src/components/PerformanceStatisticsReport.vue

@@ -2,6 +2,7 @@
   <div class="SalesReportRejectedNew">
     <!-- <div class="title">业绩达成报表(含退货)-产品确认单</div> -->
     <!-- stripe -->
+    <div class="table-header">业务公司业绩报表</div>
     <el-table
       :data="tableData"
       v-loading="loading"
@@ -161,4 +162,14 @@ export default {
 <style lang="scss" scoped>
 .SalesReportRejectedNew {
 }
+
+.table-header {
+  line-height: 40px;
+  background: #f5f7fa !important;
+  border: 1px solid #ebeef5;
+  text-align: center;
+  // color: #909399;
+  font-weight: bold;
+  border-bottom: none;
+}
 </style>

+ 175 - 0
src/components/WanyuPerformanceStatement.vue

@@ -0,0 +1,175 @@
+<template>
+  <div class="SalesReportRejectedNew">
+    <!-- <div class="title">业绩达成报表(含退货)-产品确认单</div> -->
+    <!-- stripe -->
+    <div class="table-header">万宇业绩报表</div>
+    <el-table
+      :data="tableData"
+      v-loading="loading"
+      border
+      :max-height="maxHeight"
+      :size="'mini'"
+      style="width: 100%"
+      row-key="id"
+      default-expand-all
+      :row-class-name="tableRowClassName"
+      :tree-props="{ children: 'child', hasChildren: 'hasChildren' }"
+    >
+      <el-table-column prop="p" label="业绩类型" fixed="left" min-width="120">
+      </el-table-column>
+      <el-table-column label="本日金额" min-width="120" align="center">
+        <el-table-column show-overflow-tooltip label="销售" min-width="120">
+          <template slot-scope="scope">
+            <span>{{ scope.row.dtotal | toThousandFilter }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column show-overflow-tooltip label="退款" min-width="120">
+          <template slot-scope="scope">
+            <span>{{ scope.row.thfee | toThousandFilter }}</span>
+          </template>
+        </el-table-column>
+      </el-table-column>
+
+      <el-table-column label="本周金额" min-width="120" align="center">
+        <el-table-column show-overflow-tooltip label="销售" min-width="120">
+          <template slot-scope="scope">
+            <span>{{ scope.row.wtotal | toThousandFilter }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column show-overflow-tooltip label="退款" min-width="120">
+          <template slot-scope="scope">
+            <span>{{ scope.row.wthfee | toThousandFilter }}</span>
+          </template>
+        </el-table-column>
+      </el-table-column>
+
+      <el-table-column label="本月金额" min-width="120" align="center">
+        <el-table-column show-overflow-tooltip label="销售指标" min-width="120">
+          <template slot-scope="scope">
+            <span>{{ scope.row.tips | toThousandFilter }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column show-overflow-tooltip label="销售" min-width="120">
+          <template slot-scope="scope">
+            <span>{{ scope.row.mtotal | toThousandFilter }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          show-overflow-tooltip
+          label="销售完成率"
+          min-width="95"
+        >
+          <template slot-scope="scope">
+            <span>{{ scope.row.rate ? scope.row.rate + "%" : "" }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column show-overflow-tooltip label="退款" min-width="120">
+          <template slot-scope="scope">
+            <span>{{ scope.row.mthfee | toThousandFilter }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column show-overflow-tooltip label="净销售" min-width="120">
+          <template slot-scope="scope">
+            <span>{{ scope.row.thtotal | toThousandFilter }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          show-overflow-tooltip
+          label="净销售完成率"
+          min-width="95"
+        >
+          <template slot-scope="scope">
+            <span>{{ scope.row.thrate ? scope.row.thrate + "%" : "" }}</span>
+          </template>
+        </el-table-column>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import asyncRequest from "@/api/report";
+import setHeight from "@/mixins/index";
+
+export default {
+  name: "SalesReportRejectedNew",
+  props: ["date"],
+  mixins: [setHeight],
+  watch: {
+    date: function(val) {
+      this.dataTime = val;
+      if (val) {
+        this.searchList();
+      }
+    }
+  },
+  data() {
+    return {
+      dataTime: this.date,
+      loading: false,
+      maxHeight: "0",
+      tableData: []
+    };
+  },
+  async created() {
+    window.onresize = () => {
+      this.getHeight();
+    };
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.getHeight();
+    });
+    this.searchList();
+  },
+  methods: {
+    tableRowClassName({ row, rowIndex }) {
+      if ((row && row.child && row.child.length > 0) || rowIndex === 0) {
+        return "warning-row";
+      } else {
+        return "";
+      }
+    },
+    async searchList() {
+      this.loading = true;
+      this.tableData = [];
+      const res = await asyncRequest.departstat({});
+
+      if (res.code === 0 && res.data && res.data.length > 0) {
+        this.tableData = res.data;
+        this.tableData.map((v1, i1) => {
+          v1.id = i1 + "";
+          v1.p = v1.p ? v1.p : v1.depart;
+          if (v1.child && v1.child.length > 0) {
+            v1.child.map((v2, i2) => {
+              v2.id = "" + v1 + i2;
+              return v2;
+            });
+          }
+          return v1;
+        });
+      } else {
+        this.tableData = [];
+      }
+      this.getHeight();
+      this.loading = false;
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.SalesReportRejectedNew {
+}
+
+.table-header {
+  line-height: 40px;
+  background: #f5f7fa !important;
+  border: 1px solid #ebeef5;
+  text-align: center;
+  // color: #909399;
+  font-weight: bold;
+  border-bottom: none;
+}
+</style>

Неке датотеке нису приказане због велике количине промена