lyh 1 rok pred
rodič
commit
ee0a17d5a2

+ 11 - 0
package-lock.json

@@ -14,6 +14,7 @@
         "echarts": "^5.4.2",
         "element-ui": "^2.15.13",
         "qs": "^6.11.2",
+        "sortablejs": "^1.15.0",
         "vue": "^2.6.14",
         "vue-router": "^3.5.1",
         "vuex": "^3.6.2"
@@ -8880,6 +8881,11 @@
         "websocket-driver": "^0.7.4"
       }
     },
+    "node_modules/sortablejs": {
+      "version": "1.15.0",
+      "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.0.tgz",
+      "integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w=="
+    },
     "node_modules/source-map": {
       "version": "0.6.1",
       "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
@@ -17133,6 +17139,11 @@
         "websocket-driver": "^0.7.4"
       }
     },
+    "sortablejs": {
+      "version": "1.15.0",
+      "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.0.tgz",
+      "integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w=="
+    },
     "source-map": {
       "version": "0.6.1",
       "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",

+ 1 - 0
package.json

@@ -13,6 +13,7 @@
     "echarts": "^5.4.2",
     "element-ui": "^2.15.13",
     "qs": "^6.11.2",
+    "sortablejs": "^1.15.0",
     "vue": "^2.6.14",
     "vue-router": "^3.5.1",
     "vuex": "^3.6.2"

+ 13 - 21
src/components/HomeChart/BKFX.vue

@@ -8,12 +8,15 @@
 </template>
 <script>
 import * as echarts from 'echarts';
+import { bkfxchartInfo } from "../../servuces/prove";
 export default {
   data () {
-    return {}
+    return {
+      bk_data: []
+    }
   },
   mounted () {
-    this.bkfxchart()
+    this.getData()
   },
   methods: {
     bkfxchart () {
@@ -42,24 +45,14 @@ export default {
             type: 'pie',
             radius: ['40%', '60%'],
             center: ['50%', '55%'],
-            // avoidLabelOverlap: false,
             label: {
               show: true,
-              // color: (params) => {
-              //   console.log(params);
-              // },
+
               color: 'inherit',
               formatter: (params) => {
                 return params.name + (params.percent + "%")
               }
             },
-            // emphasis: {
-            //   label: {
-            //     // show: true,
-            //     fontSize: 40,
-            //     fontWeight: 'bold'
-            //   }
-            // },
 
             labelLine: {
               normal: {
@@ -67,14 +60,7 @@ export default {
                 length: 15,//引导线长度
               }
             },
-            data: [
-              { value: 2254, name: '新增客户' },
-              { value: 1254, name: '无价值客户' },
-              { value: 2123, name: '回归客户' },
-              { value: 1254, name: '重点客户' },
-              { value: 8545, name: '普通客户' },
-              { value: 5254, name: '忠实客户' },
-            ]
+            data: this.bk_data
           }
         ]
       }
@@ -83,6 +69,12 @@ export default {
         myChartbkfx.resize()
       })
     },
+    getData () {
+      bkfxchartInfo().then(res => {
+        this.bk_data = res.data;
+        this.bkfxchart();
+      })
+    },
     baokefenxi(){
       this.$router.push('/baokefenxidetail')
   }

+ 30 - 13
src/components/HomeChart/BXCBHB.vue

@@ -1,38 +1,55 @@
 <template>
   <div class="bxcbhb" @click="bxcbhb">
     <div class="godetail"><img src="../../assets/bargound/shuangjiantou.png" alt="">&nbsp;保险承保核保</div>
-    <dv-scroll-board :config="config" style="width:96%;height:82%;text-align: center;margin: 1% auto;" />
+    <dv-scroll-board :config="bx_data" style="width:96%;height:82%;text-align: center;margin: 1% auto;" />
   </div>
 </template>
 <script>
 import * as echarts from 'echarts';
+import { bxcbhbchartInfo } from "../../servuces/prove";
 export default {
   data () {
     return {
-      config: {
+      bx_data: {
         header: ['/', '新保金额', '续保金额', '总承保金额', '理赔金额', '理赔比例'],
-        data: [
-          ['平安保险', '0', '0', '0', '0', '0'], ['太平洋保险', '570', '867', '687', '687', '687'], ['人寿保险', '0', '0', '0', '0', '0'], ['人保保险', '0', '0', '0', '0', '0'],
-
-        ],
+        data: [],
         rowNum: 4,
         headerBGC: 'rgb(19,54,84)',
         headerHeight: 28,
         align: 'center',
         evenRowBGC: 'rgb(8,27,43)',
         oddRowBGC: 'rgb(19,54,84)',
-      }
+      },
     }
   },
   mounted () {
-
+    this.getData();
   },
   methods: {
-    bxcbhbchart () {
-      const bxcbhbchart = document.getElementById('bxcbhbchart')
-      const myChartbxcbhb = echarts.init(bxcbhbchart)
-      const bxcbhboption = {}
-      bxcbhboption && myChartbxcbhb.setOption(bxcbhboption)
+    getData () {
+      bxcbhbchartInfo().then(res => {
+        const keyindex = {
+          'name': 0,
+          'first_amount': 1,
+          'again_amount': 2,
+          'amount': 3,
+          'lp_amount': 4,
+          'lpbl': 5
+        };
+
+        let item_values = [];
+        res.data.map(obj => {
+          let item_value = [];
+          for (let key in obj) {
+            let index = keyindex[key]
+            item_value[index] = obj[key] + ''
+          }
+          item_values.push(item_value)
+        });
+        this.bx_data.data = item_values;
+        this.bx_data = { ...this.bx_data }
+
+      })
     },
     bxcbhb(){
       this.$router.push('/baoxianchengbaodetail')

+ 49 - 25
src/components/HomeChart/CZTJ.vue

@@ -1,34 +1,34 @@
 <template>
   <div class="cztj" >
     <div class="godetail"  @click="chanzhitongji"><img src="../../assets/bargound/shuangjiantou.png" alt="">&nbsp;产值统计</div>
-    <dv-scroll-board :config="config" style="width:94%;height:30%;text-align: center;margin: 12px auto;flex: 1;" />
+    <dv-scroll-board :config="cztj_data" style="width:94%;height:30%;text-align: center;margin: 12px auto;flex: 1;" />
     <div class="klfxtwosmallbox">
       <div class="klfxtwosmallbox1">
         <p @click="ruchangtaici">入场台次</p>
-        <p><span style="color: rgb(44,214,204);font-size: 1.2rem;">350</span>台</p>
+        <p><span style="color: rgb(44,214,204);font-size: 1.2rem;">{{tc_data.total}}</span>台</p>
         <span class="iconfont icon-cheliangshuliang" style="font-size: 2.8rem;"></span>
       </div>
       <div class="klfxtwosmallbox2">
         <p @click="ruchangchanzhi">入厂产值</p>
-        <p><span style="color: rgb(209,177,50);font-size: 1.2rem;">180</span>元</p>
+        <p><span style="color: rgb(209,177,50);font-size: 1.2rem;">{{tc_data.total_amount}}</span>万</p>
         <span class="iconfont icon-xindiantu" style="font-size: 3.5rem;"></span>
       </div>
     </div>
     <div id="cztjchart">
       <div>
-        <p><span>首保</span><span>18</span></p>
-        <p><span>索赔</span><span>54</span></p>
-        <p><span>定保</span><span>64</span></p>
-        <p><span>一般维修</span><span>6</span></p>
-        <p><span>钣喷</span><span>0</span></p>
+        <p><span>首保</span><span>{{tc_data.sb_count}}</span></p>
+        <p><span>索赔</span><span>{{tc_data.sp_count}}</span></p>
+        <p><span>定保</span><span>{{tc_data.db_count}}</span></p>
+        <p><span>一般维修</span><span>{{tc_data.ws_count}}</span></p>
+        <p><span>钣喷</span><span>{{tc_data.bp_count}}</span></p>
 
       </div>
       <div>
-        <p><span>首保</span><span>1845156</span></p>
-        <p><span>索赔</span><span>54456</span></p>
-        <p><span>定保</span><span>6412</span></p>
-        <p><span>一般维修</span><span>6215</span></p>
-        <p><span>钣喷</span><span>0</span></p>
+        <p><span>首保</span><span>{{tc_data.sb_amount}}万</span></p>
+        <p><span>索赔</span><span>{{tc_data.sp_amount}}万</span></p>
+        <p><span>定保</span><span>{{tc_data.db_amount}}万</span></p>
+        <p><span>一般维修</span><span>{{tc_data.ws_amount}}万</span></p>
+        <p><span>钣喷</span><span>{{tc_data.bp_amount}}万</span></p>
       </div>
     </div>
 
@@ -36,33 +36,57 @@
 </template>
 <script>
 import * as echarts from 'echarts';
+import { cztjchartInfo, rctcchartInfo } from "../../servuces/prove";
 export default {
   data () {
     return {
-      config: {
+      cztj_data: {
         header: ['/', '索赔', '一般维修', '定保', '钣喷', '首保'],
-        data: [
-          ['目标', '0', '0', '0', '0', '0'], ['完成', '570', '867', '687', '687', '687'], ['完成率', '0', '0', '0', '0', '0'], [], [], [], [], [],
-
-        ],
+        data: [],
         rowNum: 3,
         headerBGC: 'rgb(19,54,84)',
         headerHeight: 28,
         align: 'center',
         evenRowBGC: 'rgb(8,27,43)',
         oddRowBGC: 'rgb(19,54,84)',
-      }
+      },
+      tc_data: {}
     }
   },
   mounted () {
-
+    this.getCZTJData();
+    this.getTCData();
   },
   methods: {
-    cztjchart () {
-      const cztjchart = document.getElementById('cztjchart')
-      const myChartcztj = echarts.init(cztjchart)
-      const cztjoption = {}
-      cztjoption && myChartcztj.setOption(cztjoption)
+    getCZTJData () {
+      cztjchartInfo().then(res => {
+        const keyindex = {
+          'name': 0,
+          'sp': 1,
+          'wx': 2,
+          'db': 3,
+          'bp': 4,
+          'sb': 5
+        };
+
+        let item_values = [];
+        res.data.map(obj => {
+          let item_value = [];
+          for (let key in obj) {
+            let index = keyindex[key]
+            item_value[index] = obj[key] + ''
+          }
+          item_values.push(item_value)
+        });
+        this.cztj_data.data = item_values;
+        this.cztj_data = { ...this.cztj_data }
+
+      })
+    },
+    getTCData () {
+      rctcchartInfo().then(res => {
+          this.tc_data = res.data;
+      })
     },
     chanzhitongji(){
       this.$router.push('/chanzhitongjidetail')

+ 25 - 36
src/components/HomeChart/FQYW.vue

@@ -2,11 +2,11 @@
   <div class="fqyw" @click="fenqiyewu">
     <div class="godetail"><img src="../../assets/bargound/shuangjiantou.png" alt="">&nbsp;分期业务</div>
     <div class="progress">
-      <div class="progress1"><span>高期限</span><el-progress :percentage="gaoqixian" define-back-color="rgb(5,26,53)"
-          text-color="white" :stroke-width="10"></el-progress>
+      <div class="progress1"><span>高期限</span><el-progress :percentage="gqx_count" define-back-color="rgb(5,26,53)"
+          text-color="white" :stroke-width="8"></el-progress>
       </div>
-      <div class="progress2"><span>渗透率</span><el-progress :percentage="shentoulv" define-back-color="rgb(5,26,53)"
-          text-color="white" :stroke-width="10"></el-progress></div>
+      <div class="progress2"><span>渗透率</span><el-progress :percentage="stl" define-back-color="rgb(5,26,53)"
+          text-color="white" :stroke-width="8"></el-progress></div>
     </div>
     <div id="fqywchart"></div>
 
@@ -14,49 +14,30 @@
 </template>
 <script>
 import * as echarts from 'echarts';
+import { fqywchartInfo } from "../../servuces/prove";
 export default {
   data () {
     return {
-      //高期限
-      gaoqixian: 99,
-
-      //渗透率
-      shentoulv: 40,
+      gqx_count: 0,
+      stl: 0,
       //折线图数据
-      data: [1, 1, 1, 1, 1, 5]
+      data: [1, 1, 1, 1, 1, 5],
+      fq_data: {}
     }
   },
   mounted () {
-    this.fqywchart();
+    this.getData();
   },
   methods: {
-    //折线图数据处理
-    zhexiantu () {
-      var percent = [];
-      var total = 0;
-      for (let i in this.data) {
-        total += this.data[i];
-      }
-      this.data.forEach(item => {
-        var newitem = ((item / total) * 100).toFixed(2)
-        percent.push(newitem);
-      });
-      // console.log(percent.map(Number));
-      return percent.map(Number)
-
-    },
     fqywchart () {
-      const fqywchart = document.getElementById('fqywchart')
-      const myChartfqyw = echarts.init(fqywchart)
+      const fqywchart = document.getElementById('fqywchart');
+      const myChartfqyw = echarts.init(fqywchart);
       const fqywoption = {
         tooltip: {
           trigger: 'axis',
           backgroundColor: 'black',
           formatter: (params) => {
-            // console.log(params);
             return params[0].axisValue + ':' + this.data[params[0].dataIndex] + '<br/>' + params[0].data + '%'
-
-            // console.log();
           },
           textStyle: {
             color: 'white'
@@ -65,7 +46,7 @@ export default {
         xAxis: {
           type: 'category',
           boundaryGap: false,
-          data: ['全款', '36期', '24期', '18期', '12期', '其他'],
+          data: this.fq_data.name_data,
           axisLine: {
             lineStyle: {
               color: 'rgb(70,166,196)'
@@ -79,7 +60,6 @@ export default {
         yAxis: {
           show: true,
           type: 'value',
-          max: 100,//最大值
           min: 0,
           interval: 20,
           splitLine: {
@@ -97,7 +77,7 @@ export default {
           axisLabel: {
             color: 'white',
             show: true,
-            formatter: '{value}%'
+            formatter: '{value}'
           },
           axisTick: {
             show: true
@@ -111,9 +91,8 @@ export default {
         },
         series: [
           {
-            data: this.zhexiantu(),
+            data: this.fq_data.value_data,
             type: 'line',
-            smooth: true,
             itemStyle: {
               normal: {
                 color: 'yellow'
@@ -153,6 +132,16 @@ export default {
         myChartfqyw.resize()
       })
     },
+
+    getData () {
+      fqywchartInfo().then(res => {
+        this.gqx_count = res.gqx_count;
+        this.stl = res.stl;
+        this.fq_data = res.fq_data;
+        this.fqywchart();
+      })
+    },
+
     fenqiyewu(){
       this.$router.push('/fenqiyewudetail')
 

+ 30 - 12
src/components/HomeChart/JCPM.vue

@@ -1,20 +1,18 @@
 <template>
   <div class="jcpm" @click="jiaochepaihang">
     <div class="godetail"><img src="../../assets/bargound/shuangjiantou.png" alt="">&nbsp;交车排行</div>
-    <dv-scroll-board :config="config" style="width:94%;height:82%;text-align: center;margin: 1% auto;" />
+    <dv-scroll-board :config="jc_data" style="width:94%;height:82%;text-align: center;margin: 1% auto;" />
   </div>
 </template>
 <script>
 import * as echarts from 'echarts';
+import { jcpmchartInfo } from "../../servuces/prove";
 export default {
   data () {
     return {
-      config: {
+      jc_data: {
         header: ['#', '店面', '销售顾问', '集客数量', '订单数量', '成交率'],
-        data: [
-          ['平安保险', '0', '0', '0', '0', '0'], ['太平洋保险', '570', '867', '687', '687', '687'], ['人寿保险', '0', '0', '0', '0', '0'], ['人保保险', '0', '0', '0', '0', '0'],
-
-        ],
+        data: [],
         rowNum: 3,
         headerBGC: 'rgb(19,54,84)',
         headerHeight: 30,
@@ -25,15 +23,35 @@ export default {
     }
   },
   mounted () {
-
+    this.getJCPMData();
   },
   methods: {
-    jcpmchart () {
-      const jcpmchart = document.getElementById('jcpmchart')
-      const myChartjcpm = echarts.init(jcpmchart)
-      const jcpmoption = {}
-      jcpmoption && myChartjcpm.setOption(jcpmoption)
+    getJCPMData () {
+      jcpmchartInfo().then(res => {
+        const keyindex = {
+          'pm': 0,
+          'company': 1,
+          'xsgw': 2,
+          'jksl': 3,
+          'ddsl': 4,
+          'cjl': 5
+        };
+
+        let item_values = [];
+        res.data.map(obj => {
+          let item_value = [];
+          for (let key in obj) {
+            let index = keyindex[key]
+            item_value[index] = obj[key] + ''
+          }
+          item_values.push(item_value)
+        });
+        this.jc_data.data = item_values;
+        this.jc_data = { ...this.jc_data }
+
+      })
     },
+
     jiaochepaihang(){
       this.$router.push('/jiaochepaihangdetail')
 

+ 16 - 13
src/components/HomeChart/KCFX.vue

@@ -6,12 +6,15 @@
 </template>
 <script>
 import * as echarts from 'echarts';
+import { kcfxchartInfo } from "../../servuces/prove";
 export default {
   data () {
-    return {}
+    return {
+      kc_data: []
+    }
   },
   mounted () {
-    this.kcfxchart()
+    this.getData()
   },
   methods: {
     kcfxchart () {
@@ -19,7 +22,7 @@ export default {
       const myChartkcfx = echarts.init(kcfxchart)
       const kcfxoption = {
         legend: [{
-          data: ['线索总量'],
+          data: ['配件'],
           right: '25%',
           textStyle: {
             color: 'white' // 设置柱子1的图例文本颜色
@@ -29,7 +32,7 @@ export default {
           }
         },
         {
-          data: ['精品数量'],
+          data: ['精品'],
           right: '6%',
           textStyle: {
             color: 'white' // 设置柱子2的图例文本颜色
@@ -53,13 +56,7 @@ export default {
           containLabel: true
         },
         dataset: {
-          source: [
-            // ['product', '线索总量', '交车量'],
-            ['库存金额', 120000, 75000],
-            ['呆滞金额', 150000, 95000],
-            ['本月入库', 60000, 30000],
-            ['本月出库', 90000, 80000],
-          ]
+          source: this.kc_data
         },
         xAxis: {
           type: 'category',
@@ -101,7 +98,7 @@ export default {
         // to a column of dataset.source by default.
         series: [
           {
-            name: '线索总量', type: 'bar', barWidth: 20, barGap: '60%', itemStyle: {
+            name: '配件', type: 'bar', barWidth: 20, barGap: '60%', itemStyle: {
               normal: {
                 color: new echarts.graphic.LinearGradient(
                   0, 0, 0, 1, // 渐变方向从左上到右下
@@ -114,7 +111,7 @@ export default {
             },
           },
           {
-            name: '精品数量', type: 'bar', barWidth: 20, barGap: '60%', itemStyle: {
+            name: '精品', type: 'bar', barWidth: 20, barGap: '60%', itemStyle: {
               normal: {
                 color: new echarts.graphic.LinearGradient(
                   0, 0, 0, 1, // 渐变方向从左上到右下
@@ -132,6 +129,12 @@ export default {
         myChartkcfx.resize();
       })
     },
+    getData () {
+      kcfxchartInfo().then(res => {
+        this.kc_data = res.data;
+        this.kcfxchart();
+      })
+    },
     kucunfenxi(){
       this.$router.push('/kucunfenxidetail')
       

+ 24 - 112
src/components/HomeChart/KLFX.vue

@@ -4,11 +4,11 @@
     <div class="klfxtwosmallbox">
       <div class="klfxtwosmallbox1">
         <p>首次进店</p>
-        <p><span style="color: rgb(44,214,204);font-size: 22px;">350</span>人</p>
+        <p><span style="color: rgb(44,214,204);font-size: 22px;">{{sc_count}}</span>人</p>
       </div>
       <div class="klfxtwosmallbox2">
         <p>再次进店</p>
-        <p><span style="color: rgb(209,177,50);font-size: 22px;">180</span>人</p>
+        <p><span style="color: rgb(209,177,50);font-size: 22px;">{{ec_count}}</span>人</p>
       </div>
     </div>
     <div id="klfxchart"></div>
@@ -17,102 +17,30 @@
 </template>
 <script>
 import * as echarts from 'echarts';
-import { klfxchartInfo } from "@/servuces/prove";
+import { klfxchartInfo } from "../../servuces/prove";
 
 export default {
   data () {
     return {
        //客流分析数据
-       klfxchartdata: []
+      sc_count: 0,
+      ec_count: 0,
+       data: []
     }
   },
   mounted () {
-    this.klfxchart()
+    this.getData()
   },
   methods: {
     klfxchart () {
-      let dataPie = [
-
-        {
-          value: 10,
-          name: '首次进店'
-        },
-        {
-          value: 80,
-          name: '再次进店'
-        },
-      ];
-      let colorPie = ['#173852', '#0b2036'];
-      let colorWrap = ['#3087d6', '#f6ce54',];
-      let baseDataPie = [],
-        baseDataWrap = [];
+      let dataPie = this.data;
       let total = 0;
       dataPie.forEach(function (val, idx, arr) {
         total += val.value;
-      })
-      for (let i = 0; i < dataPie.length; i++) {
-        baseDataPie.push({
-          value: dataPie[i].value,
-          name: dataPie[i].name,
-          itemStyle: {
-            normal: {
-              borderWidth: 6,
-              borderColor: colorPie[i],
-            }
-          }
-        });
-        baseDataWrap.push({
-          value: dataPie[i].value,
-          name: dataPie[i].name,
-          itemStyle: {
-            normal: {
-              color: colorWrap[i],
-              borderWidth: 5,
-              borderColor: colorWrap[i],
-              shadowBlur: 1,
-              shadowColor: 'rgba(7, 132, 250, 0.8)',
-            }
-          }
-        }, {
-          value: 5,
-          name: '',
-          itemStyle: {
-            normal: {
-              color: 'transparent',
-              borderWidth: 5,
-              borderColor: 'transparent',
-
-            }
-          }
-        });
-      }
-      const klfxchart = document.getElementById('klfxchart')
-      const myChartklfx = echarts.init(klfxchart)
+      });
+      const klfxchart = document.getElementById('klfxchart');
+      const myChartklfx = echarts.init(klfxchart);
       const klfxoption = {
-        // title: {
-        //   text: '设备总数',
-        //   subtext: '10,225',
-        //   textStyle: {
-        //     color: '#00b5f3',
-        //     fontSize: 14,
-
-        //   },
-        //   // subtextStyle: {
-        //   //   align: 'center',
-        //   //   fontSize: 20,
-        //   //   color: ['#85c7e3'],
-        //   //   fontWeight: 100
-        //   // },
-        //   // x: '1%',
-        //   // y: 'center',
-        // },
-        // grid: {
-        //   left: '1%', // 与容器左侧的距离
-        //   right: '1%', // 与容器右侧的距离
-        //   top: '1%', // 与容器顶部的距离
-        //   bottom: '1%', // 与容器底部的距离
-
-        // },
         tooltip: {
           show: true,
           backgroundColor: 'black',
@@ -153,13 +81,10 @@ export default {
             rich: {
               yellow: {
                 color: '#f6ce54',
-
-
               },
               blue: {
                 color: '#4be1ff',
                 align: 'right',
-
               },
             }
 
@@ -170,12 +95,9 @@ export default {
           name: '',
           type: 'pie',
           clockWise: false, //顺时加载
-          // hoverAnimation: false, //鼠标移入变大
+          //hoverAnimation: false, //鼠标移入变大
           center: ['40%', '50%'],
-          radius: ['80%', '81%'],
-          tooltip: {
-            show: false
-          },
+          radius: ['40%', '70%'],
           label: {
             normal: {
               show: true,
@@ -186,29 +108,11 @@ export default {
           labelLine: {
             normal: {
               show: true,
-
-              length2: 80,
-
+              length2: 50,
             },
           },
-          data: baseDataWrap
-        },
-        {
-          name: '',
-          type: 'pie',
-          // color: colorPie,
-          // selectedMode: 'single',
-          radius: ['60%', '61%'],
-          center: ['40%', '50%'],
-          hoverAnimation: false,
-          label: {
-            normal: {
-              show: false,
-            }
-          },
-          data: baseDataPie
-        },
-
+          data: this.data
+        }
         ]
       }
       klfxoption && myChartklfx.setOption(klfxoption)
@@ -216,6 +120,14 @@ export default {
         myChartklfx.resize()
       })
     },
+    getData () {
+      klfxchartInfo().then(res => {
+        this.sc_count = res.data.sc_count;
+        this.ec_count = res.data.ec_count;
+        this.data = res.data.tb;
+        this.klfxchart();
+      })
+    },
     keliufenxi(){
       this.$router.push('/keliufenxidetail')
     }

+ 12 - 10
src/components/HomeChart/KYFX.vue

@@ -6,12 +6,15 @@
 </template>
 <script>
 import * as echarts from 'echarts';
+import { kyfxchartInfo } from "../../servuces/prove";
 export default {
   data () {
-    return {}
+    return {
+      ky_data: []
+    }
   },
   mounted () {
-    this.kyfxchart()
+    this.getData()
   },
   methods: {
     kyfxchart () {
@@ -53,14 +56,7 @@ export default {
           containLabel: true
         },
         dataset: {
-          source: [
-            ['product', '线索总量', '交车量'],
-            ['展厅', 43.3, 85.8],
-            ['转介绍', 83.1, 73.4],
-            ['网络直销', 86.4, 65.2],
-            ['车展外拓', 72.4, 53.9],
-            ['二网大客', 72.4, 53.9],
-          ]
+          source:this.ky_data
         },
         xAxis: {
           type: 'category',
@@ -134,6 +130,12 @@ export default {
         myChartkyfx.resize();
       })
     },
+    getData () {
+      kyfxchartInfo().then(res => {
+        this.ky_data = res.data;
+        this.kyfxchart();
+      })
+    },
     keyuanfenxi(){
       this.$router.push('/keyuanfenxidetail')
 

+ 35 - 26
src/components/HomeChart/XSFX.vue

@@ -4,17 +4,17 @@
     <div class="xsfxtwosmallbox">
       <div class="xsfxtwosmallbox1">
         <p>当日台次</p>
-        <p class="dangri"><span style="color: rgb(44,214,204);font-size: 22px;">350</span>台</p><span
+        <p class="dangri"><span style="color: rgb(44,214,204);font-size: 22px;">{{today_count}}</span>台</p><span
           class="iconfont icon-dangtianshichang" style="font-size: 32px;"></span>
       </div>
       <div class="xsfxtwosmallbox2">
         <p>本月累计</p>
-        <p><span style="color: rgb(44,214,204);font-size: 22px;">180</span>台</p>
+        <p><span style="color: rgb(44,214,204);font-size: 22px;">{{month_count}}</span>台</p>
         <span class="iconfont icon-benyue" style="font-size: 32px;"></span>
       </div>
       <div class="xsfxtwosmallbox2">
         <p>单车毛利</p>
-        <p><span style="color: rgb(44,214,204);font-size: 22px;">180</span>元</p>
+        <p><span style="color: rgb(44,214,204);font-size: 22px;">{{profit_amount}}</span>元</p>
         <span class="iconfont icon-lirun2" style="font-size: 32px;"></span>
       </div>
     </div>
@@ -32,19 +32,26 @@
 </template>
 <script>
 import * as echarts from 'echarts';
+import { monthlydata } from "../../servuces/prove";
 export default {
   data () {
-    return {}
+    return {
+      today_count: 0,
+      month_count: 0,
+      profit_amount: 0,
+      count_QOQ: 0,
+      profit_amount_QOQ: 0,
+    }
   },
   mounted () {
-    this.xsfxchart1();
-    this.xsfxchart2()
+    this.getData();
   },
   methods: {
+
     xsfxchart1 () {
-      const xsfxchart1 = document.getElementById('xsfxchart1')
-      const myChartxsfx1 = echarts.init(xsfxchart1)
-      var value = 29;
+      const xsfxchart1 = document.getElementById('xsfxchart1');
+      const myChartxsfx1 = echarts.init(xsfxchart1);
+      var value = this.count_QOQ;
       const xsfxoption1 = {
         series: [{
           type: 'gauge',
@@ -78,16 +85,10 @@ export default {
             lineStyle: {
               color: 'rgba(255,255,255,0.6)'
             }
-          }, //分隔线样式
+          },
           axisLabel: {
             show: false,
-            // distance: -30,
-            // textStyle: {
-            //   color: '#03b7c9',
-            //   fontSize: '14',
-            //   fontWeight: 'bold'
-            // },
-            // formatter: '{value}%'
+
           },
           pointer: {
             show: 0
@@ -97,9 +98,8 @@ export default {
           }
         },
 
-        // 内侧指针、数值显示
         {
-          name: '台环比',
+          name: '台环比',
           type: 'gauge',
           radius: '75%',
           startAngle: 225,
@@ -153,14 +153,13 @@ export default {
             formatter: [
               '{name|台次环比}' + '',
               value + '%',
-              '' + '{val|完成率:{value}%}',
+              '' + '{val|台次环比:{value}%}',
             ].join('\n'),
             rich: {
               name: {
                 fontSize: 14,
                 fontWeight: 200,
                 color: '#fff',
-                // fontWeight: 'bold'
               },
               val: {
                 color: 'white',
@@ -188,13 +187,12 @@ export default {
     xsfxchart2 () {
       const xsfxchart2 = document.getElementById('xsfxchart2')
       const myChartxsfx2 = echarts.init(xsfxchart2)
-      var value = 30;
+      var value = this.profit_amount_QOQ;
       const xsfxoption2 = {
         series: [{
           type: 'gauge',
           radius: '100%',
 
-          //splitNumber: 10,
           min: 10,
           max: 100,
           startAngle: 225,
@@ -243,7 +241,7 @@ export default {
 
         // 内侧指针、数值显示
         {
-          name: '台词环比',
+          name: '利润环比',
           type: 'gauge',
           radius: '75%',
           startAngle: 225,
@@ -295,9 +293,9 @@ export default {
               color: '#fff'
             },
             formatter: [
-              '{name|台次环比}' + '',
+              '{name|利润环比}' + '',
               value + '%',
-              '' + '{val|完成率:{value}%}',
+              '' + '{val|利润环比:{value}%}',
             ].join('\n'),
             rich: {
               name: {
@@ -329,6 +327,17 @@ export default {
         myChartxsfx2.resize()
       })
     },
+    getData () {
+      monthlydata().then(res => {
+        this.today_count = res.data.today_count;
+        this.month_count = res.data.month_count;
+        this.profit_amount = res.data.profit_amount;
+        this.count_QOQ = res.data.count_QOQ;
+        this.profit_amount_QOQ = res.data.profit_amount_QOQ;
+        this.xsfxchart1();
+        this.xsfxchart2();
+      })
+    },
     xiaoshoufenxi(){
       this.$router.push('/xiaoshoufenxidetail')
 

+ 82 - 0
src/store/tuozhuai.js

@@ -0,0 +1,82 @@
+import Sortable from "sortablejs";
+// function sortDatabyid (data, idOrder) {
+//   const sortedData = [];
+
+//   idOrder.forEach((id) => {
+//     const item = data.findIndex((dataItem) => dataItem === id);
+//     if (item) {
+//       sortedData.push(item);
+//     }
+//   });
+//   // this.tableData1 = sortedData;
+//   // console.log(this.tableData1);
+//   return sortedData
+// }
+// 拖拽排序
+
+// function aaa () {
+//   console.log("------------------- aaa")
+// }
+
+export function column (fa) {
+
+  // 获取对象
+  const el = document.querySelector(".el-table__body-wrapper tbody");
+  // 设置配置
+  var ops = {
+
+    // 丝滑拖拽
+    animation: 800,
+    // handle: '.handle',
+    // onEnd ({ newIndex, oldIndex }) {
+    //   // 获取拖动后的排序
+    //   const currRow = tableData.splice(oldIndex, 1)[0];
+    //   tableData.splice(newIndex, 0, currRow);
+    //   // 创建新数组
+    //   const tableArray = [];
+    //   tableData.forEach((item, index) => {
+    //     tableArray.push(index);
+    //   });
+    //   console.log(tableArray);
+
+
+
+
+    //   // // 调用排序接口
+    //   // getSort(tableArray);
+    //   // sortDatabyid(tableData, tableArray);
+
+    //   // console.log(sortDatabyid(tableData, tableArray));
+    // },
+
+    onEnd: function (evt) {
+      let newIndex = evt.newIndex;
+      let oldIndex = evt.oldIndex;
+      let oldData = this.fa.tableData.concat();
+      // let item1 = oldData[oldIndex];
+      // let item2 = oldData[newIndex];
+
+
+      // oldData[newIndex] = item1;
+      // oldData[oldIndex] = item2;
+      const currRow = oldData.splice(oldIndex, 1)[0];
+      oldData.splice(newIndex, 0, currRow);
+
+      this.fa.tableData = [];
+      //this.fa.tableData = oldData.splice(0, 3);
+      //this.fa.newTableData
+
+      this.fa.$nextTick(() => {
+        this.fa.tableData = oldData;
+      })
+
+      //this.fa.$refs.table.clearSelection();
+      // this.fa.$refs.table.clearSort();
+      // this.fa.$refs.table.clearFilter();
+    }
+
+  };
+  // 初始化
+  let sortable = new Sortable(el, ops);
+  sortable.fa = fa;
+}

+ 16 - 6
src/views/HomeView.vue

@@ -51,7 +51,8 @@ import JCPM from "../components/HomeChart/JCPM.vue";
 import BXCBHB from "../components/HomeChart/BXCBHB.vue";
 import KCFX from "../components/HomeChart/KCFX.vue";
 import BKFX from "../components/HomeChart/BKFX.vue"
-
+import {  kcfxcompanInfo } from "../servuces/prove";
+import { mapMutations } from "vuex";
 export default {
   name: 'HomeView',
   data () {
@@ -60,23 +61,32 @@ export default {
     }
   },
   mounted () {
-    this.updateTime()//时间
+    this.updateTime(); //时间
+    this.kcfxcompanapi()//时间
   },
   beforeDestroy () {
     // 在组件销毁前清除定时器,避免内存泄漏
     clearInterval(this.timer);
   },
   methods: {
+    ...mapMutations(['setData']),
+    kcfxcompanapi () {
+      kcfxcompanInfo().then(res => {
+        const storefront = res.data;
+        this.setData(storefront);
+        sessionStorage.setItem('company_data', JSON.stringify(storefront))
+      })
+    },
     //更新时间
-    updateTime () {
+    updateTime() {
       // 在组件挂载结束时启动定时器,每秒更新一次时间
       this.currentTime = this.getCurrentTime();
       //每秒更新一次
       this.timer = setInterval(() => {
-        this.currentTime = this.getCurrentTime()
+        this.currentTime = this.getCurrentTime();
       }, 1000);
     },
-    getCurrentTime () {
+    getCurrentTime() {
       const now = new Date();
       const year = now.getFullYear();
       const month = String(now.getMonth() + 1).padStart(2, "0");
@@ -85,7 +95,7 @@ export default {
       const minutes = String(now.getMinutes()).padStart(2, "0");
       const seconds = String(now.getSeconds()).padStart(2, "0");
       return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
-    }
+    },
   },
   components: {
     KLFX, XSFX, FQYW, CZTJ, KYFX, JCPM, BXCBHB, KCFX, BKFX

+ 45 - 61
src/views/TableDetail/BKFXtable.vue

@@ -45,7 +45,7 @@
             <!-- 日期表 -->
             <div class="dataForm" style="margin-right: 20px">
               <el-date-picker
-                v-model="value1"
+                v-model="search_date"
                 type="daterange"
                 range-separator="——"
                 start-placeholder="开始日期"
@@ -57,7 +57,7 @@
             </div>
             <!-- 按钮 -->
             <el-button
-              @click="searchBtn"
+              @click="searchBtn(company_ids, search_date)"
               style="background-color: rgb(40, 155, 209); color: black"
               >搜索</el-button
             >
@@ -116,7 +116,9 @@
 
 <script>
 import axios from "axios";
-
+import { bkfxtabledataInfo } from "../../servuces/prove";
+import { nowdaterange } from "../../servuces/getnowtime";
+import { column } from "../../store/tuozhuai";
 import { number } from "echarts";
 export default {
   data() {
@@ -126,59 +128,61 @@ export default {
       value: "",
       //表格各类属性
       tableData: [],
+      tableDatahj: [],
       //下拉框内属性
       options: [],
-      //日期表属性
-      pickerOptions: {
-        shortcuts: [
-          {
-            text: "最近一个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        ],
-      },
-      value1: ["2023-08-01", "2023-08-08"],
+      search_date: '',
     };
   },
+  created () {
+    const data = sessionStorage.getItem('company_data');
+    if (data) {
+      this.options = JSON.parse(data)
+    }
+  },
   mounted() {
+    column(this);
     this.updateTime(); //时间
-    this.getTableDate(); //开始获取表格
-    this.getSelectDate(); //下拉框接口数据
+    this.getTableData(); //开始获取表格
   },
   beforeDestroy() {
     // 在组件销毁前清除定时器,避免内存泄漏
     clearInterval(this.timer);
   },
   methods: {
-   
+
     //表格接口数据
-    getTableDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/bkfx_detail", {
-          params: {
-            company_ids:this.company_ids.join(),
-            date_begin: this.value1[0],
-            date_end: this.value1[1],
-          },
-       
-        })
-        .then((res) => {
-          // console.log("--------", res.data.data);
-          this.tableData = res.data.data;
-        });
+    getTableData () {
+      this.search_date = nowdaterange;
+      bkfxtabledataInfo({ "company_ids": '', "date_begin": nowdaterange[0], 'date_end': nowdaterange[1] }).then(res => {
+        this.tableData = res.data;
+        this.tableDatahj = res.footer
+      })
     },
-    //下拉框数据
-    getSelectDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/get_companies")
-        .then((ret) => {
-          this.options = ret.data.data;
+    //查询
+    searchBtn(value, value1) {
+      const company_ids = value.join(',');
+      if (value1) {
+        const strvaluezh = value1.map(item => {
+          const date = new Date(item);
+          // 获取年份和月份
+          const year = date.getFullYear();
+          const month = date.getMonth() + 1; // 月份从0开始,需要加1
+          const day = date.getDate();
+          // 将年份和月份拼接成所需形式的字符串
+          return `${year}-${month}-${day}`;
+        });
+        bkfxtabledataInfo({ "company_ids": company_ids, "date_begin": strvaluezh[0], 'date_end': strvaluezh[1] }).then(res => {
+          this.tableData = res.data;
+          this.tableDatahj = res.footer
+
+        })
+      } else {
+        bkfxtabledataInfo({"company_ids": company_ids, "date_begin": '', 'date_end': ''}).then(res => {
+          this.tableData = res.data;
+          this.tableDatahj = res.footer;
         });
+      }
     },
     //更新时间
     updateTime() {
@@ -199,26 +203,6 @@ export default {
       const seconds = String(now.getSeconds()).padStart(2, "0");
       return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
     },
-    resetDateFilter() {
-      this.$refs.filterTable.clearFilter("date");
-    },
-    clearFilter() {
-      this.$refs.filterTable.clearFilter();
-    },
-    formatter(row, column) {
-      return row.address;
-    },
-    filterTag(value, row) {
-      return row.tag === value;
-    },
-    filterHandler(value, row, column) {
-      const property = column["property"];
-      return row[property] === value;
-    },
-    searchBtn() {
-      this.getTableDate();
-      console.log(this.company_ids );
-    },
   },
 };
 </script>

+ 44 - 58
src/views/TableDetail/BXCBtable.vue

@@ -34,7 +34,7 @@
             <!-- 日期表 -->
             <div class="dataForm" style="margin-right: 20px">
               <el-date-picker
-                v-model="value1"
+                v-model="search_date"
                 type="daterange"
                 range-separator="——"
                 start-placeholder="开始日期"
@@ -44,7 +44,7 @@
             </div>
             <!-- 按钮 -->
             <el-button
-              @click="searchBtn"
+              @click="searchBtn(company_ids, search_date)"
               style="background-color: rgb(40, 155, 209); color: black"
               >搜索</el-button
             >
@@ -106,6 +106,9 @@
 
 <script>
 import axios from "axios";
+import { bxcbhbtabledataInfo } from "../../servuces/prove";
+import { nowdaterange } from "../../servuces/getnowtime";
+import { column } from "../../store/tuozhuai";
 export default {
   data() {
     return {
@@ -115,29 +118,22 @@ export default {
       value: "",
       //表格各类属性
       tableData: [],
+      tableDatahj: [],
       //下拉框内属性
       options: [],
-      //日期表属性
-      pickerOptions: {
-        shortcuts: [
-          {
-            text: "最近一个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        ],
-      },
-      value1: ["2023-08-01", "2023-08-08"],
+      search_date: '',
     };
   },
+  created () {
+    const data = sessionStorage.getItem('company_data');
+    if (data) {
+      this.options = JSON.parse(data)
+    }
+  },
   mounted() {
+    column(this);
     this.updateTime(); //时间
-    this.getTableDate(); //开始获取表格
-    this.getSelectDate(); //下拉框接口数据
+    this.getTableData(); //开始获取表格
   },
   beforeDestroy() {
     // 在组件销毁前清除定时器,避免内存泄漏
@@ -145,27 +141,37 @@ export default {
   },
   methods: {
     //表格接口数据
-    getTableDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/bxcb_detail", {
-          params: {
-            company_ids: this.company_ids.join(),
-            date_begin: this.value1[0],
-            date_end: this.value1[1],
-          },
-        })
-        .then((res) => {
-          console.log("--------", res.data.data);
-          this.tableData = res.data.data;
-        });
+    getTableData () {
+      this.search_date = nowdaterange;
+      bxcbhbtabledataInfo({ "company_ids": '', "date_begin": nowdaterange[0], 'date_end': nowdaterange[1] }).then(res => {
+        this.tableData = res.data;
+        this.tableDatahj = res.footer
+      })
     },
-    //下拉框数据
-    getSelectDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/get_companies")
-        .then((ret) => {
-          this.options = ret.data.data;
+    //查询
+    searchBtn(value, value1) {
+      const company_ids = value.join(',');
+      if (value1) {
+        const strvaluezh = value1.map(item => {
+          const date = new Date(item);
+          // 获取年份和月份
+          const year = date.getFullYear();
+          const month = date.getMonth() + 1; // 月份从0开始,需要加1
+          const day = date.getDate();
+          // 将年份和月份拼接成所需形式的字符串
+          return `${year}-${month}-${day}`;
+        });
+        bxcbhbtabledataInfo({ "company_ids": company_ids, "date_begin": strvaluezh[0], 'date_end': strvaluezh[1] }).then(res => {
+          this.tableData = res.data;
+          this.tableDatahj = res.footer
+
+        })
+      } else {
+        bxcbhbtabledataInfo({"company_ids": company_ids, "date_begin": '', 'date_end': ''}).then(res => {
+          this.tableData = res.data;
+          this.tableDatahj = res.footer;
         });
+      }
     },
     //更新时间
     updateTime() {
@@ -186,26 +192,6 @@ export default {
       const seconds = String(now.getSeconds()).padStart(2, "0");
       return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
     },
-    resetDateFilter() {
-      this.$refs.filterTable.clearFilter("date");
-    },
-    clearFilter() {
-      this.$refs.filterTable.clearFilter();
-    },
-    formatter(row, column) {
-      return row.address;
-    },
-    filterTag(value, row) {
-      return row.tag === value;
-    },
-    filterHandler(value, row, column) {
-      const property = column["property"];
-      return row[property] === value;
-    },
-    searchBtn() {
-      this.getTableDate()
-      
-    },
   },
 };
 </script>

+ 48 - 64
src/views/TableDetail/CZTJtable.vue

@@ -36,7 +36,7 @@
             <!-- 日期表 -->
             <div class="dataForm" style="margin-right: 20px">
               <el-date-picker
-                v-model="value1"
+                v-model="search_date"
                 type="daterange"
                 range-separator="——"
                 start-placeholder="开始日期"
@@ -46,7 +46,7 @@
             </div>
             <!-- 按钮 -->
             <el-button
-              @click="searchBtn"
+              @click="searchBtn(company_ids, search_date)"
               style="background-color: rgb(40, 155, 209); color: black"
               >搜索</el-button
             >
@@ -77,20 +77,20 @@
           </el-table-column>
 
           <el-table-column  label="索赔收入">
-            <el-table-column prop="spll" label="索赔领料"> </el-table-column>
             <el-table-column prop="spgs" label="索赔工时"> </el-table-column>
+            <el-table-column prop="spll" label="索赔领料"> </el-table-column>
           </el-table-column>
           <el-table-column  label="定保收入">
             <el-table-column prop="dbgs" label="定保工时"> </el-table-column>
             <el-table-column prop="dbll" label="定保领料"> </el-table-column>
           </el-table-column>
           <el-table-column  label="一般维修收入">
-            <el-table-column prop="ybwxll" label="外修领料"> </el-table-column>
-            <el-table-column prop="ybwxgs" label="外修工时"> </el-table-column>
+            <el-table-column prop="ybwxgs" label="维修工时"> </el-table-column>
+            <el-table-column prop="ybwxll" label="维修领料"> </el-table-column>
           </el-table-column>
           <el-table-column label="钣喷收入">
-            <el-table-column prop="bpll" label="钣喷材料"> </el-table-column>
             <el-table-column prop="bpgs" label="钣喷工时"> </el-table-column>
+            <el-table-column prop="bpll" label="钣喷材料"> </el-table-column>
           </el-table-column>
           <el-table-column prop="jpsr" label="精品"> </el-table-column>
           <el-table-column prop="qtsr" label="其他收入"> </el-table-column>
@@ -103,6 +103,9 @@
 
 <script>
 import axios from "axios";
+import { cztjtabledataInfo } from "../../servuces/prove";
+import { nowdaterange } from "../../servuces/getnowtime";
+import { column } from "../../store/tuozhuai";
 export default {
   data() {
     return {
@@ -111,58 +114,59 @@ export default {
       value: "",
       //表格各类属性
       tableData: [],
+      tableDatahj: [],
       //下拉框内属性
       options: [],
-      //日期表属性
-      pickerOptions: {
-        shortcuts: [
-          {
-            text: "最近一个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        ],
-      },
-      value1: ["2023-08-01", "2023-08-03"],
+      search_date: '',
     };
   },
+  created () {
+    const data = sessionStorage.getItem('company_data');
+    if (data) {
+      this.options = JSON.parse(data)
+    }
+  },
   mounted() {
+    column(this);
     this.updateTime(); //时间
-    this.getTableDate(); //开始获取表格
-    this.getSelectDate(); //下拉框接口数据
+    this.getTableData(); //开始获取表格
   },
   beforeDestroy() {
     // 在组件销毁前清除定时器,避免内存泄漏
     clearInterval(this.timer);
   },
   methods: {
-    //表格接口数据
-    getTableDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/shsr_detail", {
-          params: {
-            company_ids: this.company_ids.join(),
-            date_begin: this.value1[0],
-            date_end: this.value1[1],
-          },
-        })
-        .then((res) => {
-          console.log("--------", res.data.rows);
-          this.tableData = res.data.rows;
-        });
+    getTableData () {
+      this.search_date = nowdaterange;
+      cztjtabledataInfo({ "company_ids": '', "date_begin": nowdaterange[0], 'date_end': nowdaterange[1] }).then(res => {
+        this.tableData = res.rows;
+        this.tableDatahj = res.footer
+      })
     },
-    //下拉框数据
-    getSelectDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/get_companies")
-        .then((ret) => {
-          console.log(ret);
-          this.options = ret.data.data;
+    //查询
+    searchBtn(value, value1) {
+      const company_ids = value.join(',');
+      if (value1) {
+        const strvaluezh = value1.map(item => {
+          const date = new Date(item);
+          // 获取年份和月份
+          const year = date.getFullYear();
+          const month = date.getMonth() + 1; // 月份从0开始,需要加1
+          const day = date.getDate();
+          // 将年份和月份拼接成所需形式的字符串
+          return `${year}-${month}-${day}`;
+        });
+        cztjtabledataInfo({ "company_ids": company_ids, "date_begin": strvaluezh[0], 'date_end': strvaluezh[1] }).then(res => {
+          this.tableData = res.rows;
+          this.tableDatahj = res.footer
+
+        })
+      } else {
+        cztjtabledataInfo({"company_ids": company_ids, "date_begin": '', 'date_end': ''}).then(res => {
+          this.tableData = res.rows;
+          this.tableDatahj = res.footer;
         });
+      }
     },
     //更新时间
     updateTime() {
@@ -183,26 +187,6 @@ export default {
       const seconds = String(now.getSeconds()).padStart(2, "0");
       return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
     },
-    resetDateFilter() {
-      this.$refs.filterTable.clearFilter("date");
-    },
-    clearFilter() {
-      this.$refs.filterTable.clearFilter();
-    },
-    formatter(row, column) {
-      return row.address;
-    },
-    filterTag(value, row) {
-      return row.tag === value;
-    },
-    filterHandler(value, row, column) {
-      const property = column["property"];
-      return row[property] === value;
-    },
-    
-    searchBtn() {
-      this.getTableDate()
-    },
   },
 };
 </script>

+ 35 - 73
src/views/TableDetail/FQYWtable.vue

@@ -45,7 +45,7 @@
             <!-- 日期表 -->
             <div class="dataForm" style="margin-right: 20px">
               <el-date-picker
-                v-model="value1"
+                v-model="serach_month"
                 type="month"
                 placeholder="2023-08"
               >
@@ -53,7 +53,7 @@
             </div>
             <!-- 按钮 -->
             <el-button
-              @click="searchBtn"
+              @click="searchBtn(company_ids, serach_month)"
               style="background-color: rgb(40, 155, 209); color: black"
               >搜索</el-button
             >
@@ -100,7 +100,7 @@
             </el-table-column>
             <el-table-column prop="yhqdfy" label="银行渠道返佣">
             </el-table-column>
-            <el-table-column prop="sysj" label="收入合计"></el-table-column>
+            <el-table-column prop="yjhj" label="佣金合计"></el-table-column>
             <el-table-column prop="yjtby" label="同比月"></el-table-column>
             <el-table-column prop="yjhb" label="环比"></el-table-column>
           </el-table-column>
@@ -114,7 +114,9 @@
 
 <script>
 import axios from "axios";
-
+import { fqywtabledataInfo } from "../../servuces/prove";
+import { nowmonthy } from "../../servuces/getnowtime";
+import { column } from "../../store/tuozhuai";
 export default {
   data() {
     return {
@@ -124,71 +126,50 @@ export default {
       value: "",
       //表格各类属性
       tableData: [],
+      tableDatahj: [],
       //下拉框内属性
       options: [],
-      //日期表属性
-      pickerOptions: {
-        shortcuts: [
-          {
-            text: "最近一个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        ],
-      },
-      value1: ["2023-08"],
+      serach_month: '',
     };
   },
-  computed: {
-    Riqi : function getNowFormatDate() {
-      let date = new Date(),
-        year = date.getFullYear(), //获取完整的年份(4位)
-        month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
-        strDate = date.getDate(); // 获取当前日(1-31)
-      if (month < 10) month = `0${month}`; // 如果月份是个位数,在前面补0
-      if (strDate < 10) strDate = `0${strDate}`; // 如果日是个位数,在前面补0
-
-      return `${year}-${month}-${strDate}`;
+  created () {
+    const data = sessionStorage.getItem('company_data');
+    if (data) {
+      this.options = JSON.parse(data)
     }
   },
   mounted() {
-    this.updateTime(); //时间
-    this.getTableDate(); //开始获取表格
-    this.getSelectDate(); //下拉框接口数据
-    console.log(this.Riqi);
-    this.value1 =this.Riqi;
+    column(this);
+    this.updateTime();
+    this.getTableData();
   },
   beforeDestroy() {
     // 在组件销毁前清除定时器,避免内存泄漏
     clearInterval(this.timer);
   },
   methods: {
-    //表格接口数据
-    getTableDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/fqyx_detail", {
-          params: {
-            company_ids: this.company_ids.join(),
-            search_month: this.value1[0],
-          },
-        })
-        .then((res) => {
-          console.log("--------", res.data.data);
+    //查询
+    searchBtn(value, value1) {
+      const company_ids = value.join(',');
+      const date = new Date(value1);
+      // 获取年份和月份
+      const year = date.getFullYear();
+      const month = date.getMonth() + 1; // 月份从0开始,需要加1
+
+      // 将年份和月份拼接成所需形式的字符串
+      const search_month = `${year}-${month}`;
+      fqywtabledataInfo({ "company_ids": company_ids, "search_month": search_month}).then(res => {
+        this.tableData = res.data;
+        this.tableDatahj = res.footer
 
-          this.tableData = res.data.data;
-        });
+      });
     },
-    //下拉框数据
-    getSelectDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/get_companies")
-        .then((ret) => {
-          this.options = ret.data.data;
-        });
+    getTableData () {
+      this.serach_month = nowmonthy;
+      fqywtabledataInfo({ "company_ids": '', "search_month": nowmonthy }).then(res => {
+        this.tableData = res.data;
+        this.tableDatahj = res.footer
+      })
     },
     //更新时间
     updateTime() {
@@ -209,25 +190,6 @@ export default {
       const seconds = String(now.getSeconds()).padStart(2, "0");
       return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
     },
-    resetDateFilter() {
-      this.$refs.filterTable.clearFilter("date");
-    },
-    clearFilter() {
-      this.$refs.filterTable.clearFilter();
-    },
-    formatter(row, column) {
-      return row.address;
-    },
-    filterTag(value, row) {
-      return row.tag === value;
-    },
-    filterHandler(value, row, column) {
-      const property = column["property"];
-      return row[property] === value;
-    },
-    searchBtn() {
-      this.getTableDate();
-    },
   },
 };
 </script>

+ 45 - 60
src/views/TableDetail/KCFXtable.vue

@@ -45,7 +45,7 @@
             <!-- 日期表 -->
             <div class="dataForm" style="margin-right: 20px">
               <el-date-picker
-                v-model="value1"
+                v-model="search_date"
                 type="daterange"
                 range-separator="——"
                 start-placeholder="开始日期"
@@ -55,7 +55,7 @@
             </div>
             <!-- 按钮 -->
             <el-button
-              @click="searchBtn"
+              @click="searchBtn(company_ids, search_date)"
               style="background-color: rgb(40, 155, 209); color: black">查询
             </el-button>
           </div>
@@ -133,7 +133,9 @@
 
 <script>
 import axios from "axios";
-
+import { kcfxdataInfo } from "../../servuces/prove";
+import { nowdaterange } from "../../servuces/getnowtime";
+import { column } from "../../store/tuozhuai";
 export default {
   data() {
     return {
@@ -143,59 +145,61 @@ export default {
       value: "",
       //表格各类属性
       tableData: [],
+      tableDatahj: [],
       //下拉框内属性
       options: [],
-      //日期表属性
-      pickerOptions: {
-        shortcuts: [
-          {
-            text: "最近一个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        ],
-      },
-      value1: ["2023-08-01", "2023-08-03"],
+      search_date: '',
     };
   },
+  created () {
+    const data = sessionStorage.getItem('company_data');
+    if (data) {
+      this.options = JSON.parse(data)
+    }
+  },
   mounted() {
+    column(this);
     this.updateTime(); //时间
-    this.getTableDate(); //开始获取表格
-    this.getSelectDate(); //下拉框接口数据
+    this.getTableData(); //开始获取表格
   },
   beforeDestroy() {
     // 在组件销毁前清除定时器,避免内存泄漏
     clearInterval(this.timer);
   },
   methods: {
-   
+
     //表格接口数据
-    getTableDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/product_stock/detail", {
-          params: {
-            company_ids:this.company_ids.join(),
-            date_begin: this.value1[0],
-            date_end: this.value1[1],
-          },
-       
-        })
-        .then((res) => {
-          console.log("--------", res.data.data);
-          this.tableData = res.data.data;
-        });
+    getTableData () {
+      this.search_date = nowdaterange;
+      kcfxdataInfo({ "company_ids": '', "date_begin": nowdaterange[0], 'date_end': nowdaterange[1] }).then(res => {
+        this.tableData = res.data;
+        this.tableDatahj = res.footer
+      })
     },
-    //下拉框数据
-    getSelectDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/get_companies")
-        .then((ret) => {
-          this.options = ret.data.data;
+    //查询
+    searchBtn(value, value1) {
+      const company_ids = value.join(',');
+      if (value1) {
+        const strvaluezh = value1.map(item => {
+          const date = new Date(item);
+          // 获取年份和月份
+          const year = date.getFullYear();
+          const month = date.getMonth() + 1; // 月份从0开始,需要加1
+          const day = date.getDate();
+          // 将年份和月份拼接成所需形式的字符串
+          return `${year}-${month}-${day}`;
         });
+        kcfxdataInfo({ "company_ids": company_ids, "date_begin": strvaluezh[0], 'date_end': strvaluezh[1] }).then(res => {
+          this.tableData = res.data;
+          this.tableDatahj = res.footer
+
+        })
+      } else {
+        kcfxdataInfo({"company_ids": company_ids, "date_begin": '', 'date_end': ''}).then(res => {
+          this.tableData = res.data;
+          this.tableDatahj = res.footer;
+        });
+      }
     },
     //更新时间
     updateTime() {
@@ -216,25 +220,6 @@ export default {
       const seconds = String(now.getSeconds()).padStart(2, "0");
       return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
     },
-    resetDateFilter() {
-      this.$refs.filterTable.clearFilter("date");
-    },
-    clearFilter() {
-      this.$refs.filterTable.clearFilter();
-    },
-    formatter(row, column) {
-      return row.address;
-    },
-    filterTag(value, row) {
-      return row.tag === value;
-    },
-    filterHandler(value, row, column) {
-      const property = column["property"];
-      return row[property] === value;
-    },
-    searchBtn() {
-    this.getTableDate();
-  },
   },
 
 };

+ 45 - 81
src/views/TableDetail/KLFXtable.vue

@@ -31,13 +31,13 @@
               </el-select>
             </div>
             <!-- 日期表 -->
-            <div class="dataForm" style="margin-right: 20px">
-              <el-date-picker v-model="value1" type="daterange" range-separator="——" start-placeholder="开始日期"
+            <div class="timeselec" style="margin-right: 20px">
+              <el-date-picker v-model="search_date" type="daterange" range-separator="至" start-placeholder="开始日期"
                 end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
               </el-date-picker>
             </div>
             <!-- 按钮 -->
-            <el-button @click="searchBtn" style="background-color: rgb(40, 155, 209); color: black">查询</el-button>
+            <el-button @click="searchBtn(company_ids, search_date)" style="background-color: rgb(40, 155, 209); color: black">查询</el-button>
           </div>
         </div>
         <!-- 表格 -->
@@ -71,84 +71,69 @@
 
 <script>
 import axios from "axios";
+import { column } from "../../store/tuozhuai";
+import { klfxtabledataInfo } from "../../servuces/prove";
+import { nowdaterange } from "../../servuces/getnowtime";
 export default {
   data() {
     return {
-      
       currentTime: "",
       company_ids: [],
       //表格各类属性
       tableData: [],
+      tableDatahj: [],
       //下拉框内属性
       options: [],
-      //日期表属性
-      pickerOptions: {
-        shortcuts: [
-          {
-            text: "最近一周",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-          {
-            text: "最近一个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-          {
-            text: "最近三个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        ],
-      },
-      value1: [("2023-08-01"), ("2023-08-08")],
+      search_date: '',
     };
   },
+  created () {
+    const data = sessionStorage.getItem('company_data');
+    if (data) {
+      this.options = JSON.parse(data)
+    }
+  },
   mounted() {
-    this.updateTime(); //时间
-    this.getTableDate();//开始获取表格
-    this.getSelectDate()//下拉框接口数据
+    column(this);
+    this.updateTime();
+    this.getTaleData()//下拉框接口数据
   },
   beforeDestroy() {
     // 在组件销毁前清除定时器,避免内存泄漏
     clearInterval(this.timer);
   },
   methods: {
- 
-    //表格接口数据
-    getTableDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/klfx_detail", {
-          params: {
-            company_ids: this.company_ids.join(),
-            date_begin: this.value1[0],
-            date_end: this.value1[1]
-          }
+    //查询
+    searchBtn(value, value1) {
+      const company_ids = value.join(',');
+      if (value1) {
+        const strvaluezh = value1.map(item => {
+          const date = new Date(item);
+          // 获取年份和月份
+          const year = date.getFullYear();
+          const month = date.getMonth() + 1; // 月份从0开始,需要加1
+          const day = date.getDate();
+          // 将年份和月份拼接成所需形式的字符串
+          return `${year}-${month}-${day}`;
+        });
+        klfxtabledataInfo({ "company_ids": company_ids, "date_begin": strvaluezh[0], 'date_end': strvaluezh[1] }).then(res => {
+          this.tableData = res.data;
+          this.tableDatahj = res.footer
+
         })
-        .then((res) => {
-          // console.log("--------", res.data.data);
-          this.tableData = res.data.data;
+      } else {
+        klfxtabledataInfo({"company_ids": company_ids, "date_begin": '', 'date_end': ''}).then(res => {
+          this.tableData = res.data;
+          this.tableDatahj = res.footer;
         });
+      }
     },
-    //下拉框数据
-    getSelectDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/get_companies")
-        .then((ret) => {
-          this.options = ret.data.data;
-        });
+    getTaleData () {
+      this.search_date = nowdaterange;
+      klfxtabledataInfo({ "company_ids": '', "date_begin": nowdaterange[0], 'date_end': nowdaterange[1] }).then(res => {
+        this.tableData = res.data;
+        this.tableDatahj = res.footer
+      })
     },
     //更新时间
     updateTime() {
@@ -169,27 +154,6 @@ export default {
       const seconds = String(now.getSeconds()).padStart(2, "0");
       return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
     },
-    resetDateFilter() {
-      this.$refs.filterTable.clearFilter("date");
-    },
-    clearFilter() {
-      this.$refs.filterTable.clearFilter();
-    },
-    formatter(row, column) {
-      return row.address;
-    },
-    filterTag(value, row) {
-      return row.tag === value;
-    },
-    filterHandler(value, row, column) {
-      const property = column["property"];
-      return row[property] === value;
-    },
-    //查询
-    searchBtn() {
-     this.getTableDate()
-    
-    }
   },
 };
 </script>

+ 45 - 62
src/views/TableDetail/KYFXtable.vue

@@ -32,12 +32,12 @@
             </div>
             <!-- 日期表 -->
             <div class="dataForm" style="margin-right: 20px">
-              <el-date-picker v-model="value1" type="daterange" range-separator="——" start-placeholder="开始日期"
+              <el-date-picker v-model="search_date" type="daterange" range-separator="——" start-placeholder="开始日期"
                 end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
               </el-date-picker>
             </div>
             <!-- 按钮 -->
-            <el-button @click="searchBtn" style="background-color: rgb(40, 155, 209); color: black">查询</el-button>
+            <el-button @click="searchBtn(company_ids, search_date)" style="background-color: rgb(40, 155, 209); color: black">查询</el-button>
           </div>
         </div>
         <!-- 表格 -->
@@ -281,6 +281,9 @@
 
 <script>
 import axios from "axios";
+import { kyfxtabledataInfo } from "../../servuces/prove";
+import { nowdaterange } from "../../servuces/getnowtime";
+import { column } from "../../store/tuozhuai";
 export default {
   data() {
     return {
@@ -289,31 +292,22 @@ export default {
       company_ids: [],
       //表格各类属性
       tableData: [],
+      tableDatahj: [],
       //下拉框内属性
       options: [],
-      //日期表属性
-      pickerOptions: {
-        shortcuts: [
-        
-          {
-            text: "最近一个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        
-        ],
-      },
-      value1: [("2023-08-01"), ("2023-08-08")],
+      search_date: '',
     };
   },
+  created () {
+    const data = sessionStorage.getItem('company_data');
+    if (data) {
+      this.options = JSON.parse(data)
+    }
+  },
   mounted() {
-    this.updateTime(); //时间
-    this.getTableDate();//开始获取表格
-    this.getSelectDate()//下拉框接口数据
+    column(this);
+    this.updateTime();
+    this.getTableData();//开始获取表格
   },
   beforeDestroy() {
     // 在组件销毁前清除定时器,避免内存泄漏
@@ -322,27 +316,37 @@ export default {
   methods: {
  
     //表格接口数据
-    getTableDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/kyfx_detail", {
-          params: {
-            company_ids: this.company_ids.join(),
-            date_begin: this.value1[0],
-            date_end: this.value1[1]
-          }
-        })
-        .then((res) => {
-          console.log("--------", res.data.data);
-          this.tableData = res.data.data;
-        });
+    getTableData () {
+      this.search_date = nowdaterange;
+      kyfxtabledataInfo({ "company_ids": '', "date_begin": nowdaterange[0], 'date_end': nowdaterange[1] }).then(res => {
+        this.tableData = res.data;
+        this.tableDatahj = res.footer
+      })
     },
-    //下拉框数据
-    getSelectDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/get_companies")
-        .then((ret) => {
-          this.options = ret.data.data;
+    //查询
+    searchBtn(value, value1) {
+      const company_ids = value.join(',');
+      if (value1) {
+        const strvaluezh = value1.map(item => {
+          const date = new Date(item);
+          // 获取年份和月份
+          const year = date.getFullYear();
+          const month = date.getMonth() + 1; // 月份从0开始,需要加1
+          const day = date.getDate();
+          // 将年份和月份拼接成所需形式的字符串
+          return `${year}-${month}-${day}`;
+        });
+        kyfxtabledataInfo({ "company_ids": company_ids, "date_begin": strvaluezh[0], 'date_end': strvaluezh[1] }).then(res => {
+          this.tableData = res.data;
+          this.tableDatahj = res.footer
+
+        })
+      } else {
+        kyfxtabledataInfo({"company_ids": company_ids, "date_begin": '', 'date_end': ''}).then(res => {
+          this.tableData = res.data;
+          this.tableDatahj = res.footer;
         });
+      }
     },
     //更新时间
     updateTime() {
@@ -363,27 +367,6 @@ export default {
       const seconds = String(now.getSeconds()).padStart(2, "0");
       return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
     },
-    resetDateFilter() {
-      this.$refs.filterTable.clearFilter("date");
-    },
-    clearFilter() {
-      this.$refs.filterTable.clearFilter();
-    },
-    formatter(row, column) {
-      return row.address;
-    },
-    filterTag(value, row) {
-      return row.tag === value;
-    },
-    filterHandler(value, row, column) {
-      const property = column["property"];
-      return row[property] === value;
-    },
-    //查询
-    searchBtn() {
-     this.getTableDate()
-    
-    }
   },
 };
 </script>

+ 58 - 97
src/views/TableDetail/RCCZtable.vue

@@ -33,14 +33,14 @@
             <!-- 日期表 -->
             <div class="dataForm" style="margin-right: 20px">
               <el-date-picker
-                v-model="value1"
+                v-model="serach_month"
                 type="month"
                 placeholder="2023-08"
               >
               </el-date-picker>
             </div>
             <!-- 按钮 -->
-            <el-button @click="searchBtn" style="background-color: rgb(40, 155, 209); color: black">查询</el-button>
+            <el-button @click="searchBtn(company_ids, serach_month)" style="background-color: rgb(40, 155, 209); color: black">查询</el-button>
           </div>
         </div>
        <!-- 表格 -->
@@ -165,122 +165,83 @@
 
 <script>
 import axios from "axios";
+import { rccztabledataInfo } from "../../servuces/prove";
+import { nowmonthy } from "../../servuces/getnowtime";
+import { column } from "../../store/tuozhuai";
 export default {
   data() {
     return {
-      
       currentTime: "",
       company_ids: [],
       //表格各类属性
       tableData: [],
+      tableDatahj: [],
       //下拉框内属性
       options: [],
       //日期表属性
-      pickerOptions: {
-        shortcuts: [
-        
-          {
-            text: "最近一个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        
-        ],
-      },
-      value1: [("2023-08-01")],
+        serach_month: '',
     };
   },
-  computed: {
-    Riqi : function getNowFormatDate() {
-      let date = new Date(),
-        year = date.getFullYear(), //获取完整的年份(4位)
-        month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
-        strDate = date.getDate(); // 获取当前日(1-31)
-      if (month < 10) month = `0${month}`; // 如果月份是个位数,在前面补0
-      if (strDate < 10) strDate = `0${strDate}`; // 如果日是个位数,在前面补0
+    created () {
+        const data = sessionStorage.getItem('company_data');
+        if (data) {
+            this.options = JSON.parse(data)
+        }
+    },
 
-      return `${year}-${month}`;
-    }
-  },
   mounted() {
-    this.updateTime(); //时间
-    this.getTableDate(); //开始获取表格
-    this.getSelectDate(); //下拉框接口数据
-    console.log(this.Riqi);
-    this.value1 =this.Riqi;
+      column(this);
+      this.updateTime();
+    this.getTableData(); //开始获取表格
   },
   beforeDestroy() {
     // 在组件销毁前清除定时器,避免内存泄漏
     clearInterval(this.timer);
   },
   methods: {
- 
     //表格接口数据
-    getTableDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/shjy_detail", {
-          params: {
-            company_ids: this.company_ids.join(),
-            search_month: this.Riqi,
-          }
-        })
-        .then((res) => {
-          console.log("--------", res.data.data);
-          this.tableData = res.data.data;
-        });
-    },
-    //下拉框数据
-    getSelectDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/get_companies")
-        .then((ret) => {
-          this.options = ret.data.data;
-        });
-    },
-    //更新时间
-    updateTime() {
-      // 在组件挂载结束时启动定时器,每秒更新一次时间
-      this.currentTime = this.getCurrentTime();
-      //每秒更新一次
-      this.timer = setInterval(() => {
-        this.currentTime = this.getCurrentTime();
-      }, 1000);
-    },
-    getCurrentTime() {
-      const now = new Date();
-      const year = now.getFullYear();
-      const month = String(now.getMonth() + 1).padStart(2, "0");
-      const day = String(now.getDate()).padStart(2, "0");
-      const hours = String(now.getHours()).padStart(2, "0");
-      const minutes = String(now.getMinutes()).padStart(2, "0");
-      const seconds = String(now.getSeconds()).padStart(2, "0");
-      return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
-    },
-    resetDateFilter() {
-      this.$refs.filterTable.clearFilter("date");
-    },
-    clearFilter() {
-      this.$refs.filterTable.clearFilter();
-    },
-    formatter(row, column) {
-      return row.address;
-    },
-    filterTag(value, row) {
-      return row.tag === value;
-    },
-    filterHandler(value, row, column) {
-      const property = column["property"];
-      return row[property] === value;
-    },
-    //查询
-    searchBtn() {
-     this.getTableDate()
-    
-    }
+      getTableData () {
+          this.serach_month = nowmonthy;
+          rccztabledataInfo({ "company_ids": '', "search_month": nowmonthy}).then(res => {
+              this.tableData = res.data;
+              this.tableDatahj = res.footer
+          })
+      },
+      //查询
+      searchBtn(value, value1) {
+          const company_ids = value.join(',');
+          const date = new Date(value1);
+          // 获取年份和月份
+          const year = date.getFullYear();
+          const month = date.getMonth() + 1; // 月份从0开始,需要加1
+
+          // 将年份和月份拼接成所需形式的字符串
+          const serach_date = `${year}-${month}`;
+          rccztabledataInfo({ "company_ids": company_ids, "search_month": serach_date}).then(res => {
+              this.tableData = res.data;
+              this.tableDatahj = res.footer
+
+          });
+      },
+      //更新时间
+      updateTime() {
+          // 在组件挂载结束时启动定时器,每秒更新一次时间
+          this.currentTime = this.getCurrentTime();
+          //每秒更新一次
+          this.timer = setInterval(() => {
+              this.currentTime = this.getCurrentTime();
+          }, 1000);
+      },
+      getCurrentTime() {
+          const now = new Date();
+          const year = now.getFullYear();
+          const month = String(now.getMonth() + 1).padStart(2, "0");
+          const day = String(now.getDate()).padStart(2, "0");
+          const hours = String(now.getHours()).padStart(2, "0");
+          const minutes = String(now.getMinutes()).padStart(2, "0");
+          const seconds = String(now.getSeconds()).padStart(2, "0");
+          return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
+      },
   },
 };
 </script>

+ 35 - 77
src/views/TableDetail/RCTCtable.vue

@@ -33,14 +33,14 @@
             <!-- 日期表 -->
             <div class="dataForm" style="margin-right: 20px">
               <el-date-picker
-                v-model="value1"
+                v-model="serach_month"
                 type="month"
                 placeholder="2023-08"
               >
               </el-date-picker>
             </div>
             <!-- 按钮 -->
-            <el-button @click="searchBtn" style="background-color: rgb(40, 155, 209); color: black">查询</el-button>
+            <el-button @click="searchBtn(company_ids, serach_month)" style="background-color: rgb(40, 155, 209); color: black">查询</el-button>
           </div>
         </div>
        <!-- 表格 -->
@@ -86,81 +86,60 @@
 
 <script>
 import axios from "axios";
+import { rctctabledataInfo } from "../../servuces/prove";
+import { nowmonthy } from "../../servuces/getnowtime";
+import { column } from "../../store/tuozhuai";
 export default {
   data() {
     return {
-      
       currentTime: "",
       company_ids: [],
       //表格各类属性
       tableData: [],
+      tableDatahj: [],
       //下拉框内属性
       options: [],
-      //日期表属性
-      pickerOptions: {
-        shortcuts: [
-        
-          {
-            text: "最近一个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        
-        ],
-      },
-      value1: [("2023-08-01")],
+      serach_month: ''
     };
   },
-  computed: {
-    Riqi : function getNowFormatDate() {
-      let date = new Date(),
-        year = date.getFullYear(), //获取完整的年份(4位)
-        month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
-        strDate = date.getDate(); // 获取当前日(1-31)
-      if (month < 10) month = `0${month}`; // 如果月份是个位数,在前面补0
-      if (strDate < 10) strDate = `0${strDate}`; // 如果日是个位数,在前面补0
-
-      return `${year}-${month}`;
+  created () {
+    const data = sessionStorage.getItem('company_data');
+    if (data) {
+      this.options = JSON.parse(data)
     }
   },
   mounted() {
-    this.updateTime(); //时间
-    this.getTableDate(); //开始获取表格
-    this.getSelectDate(); //下拉框接口数据
-    console.log(this.Riqi);
-    this.value1 =this.Riqi;
+    column(this);
+    this.updateTime();
+    this.getTableData(); //开始获取表格
   },
   beforeDestroy() {
     // 在组件销毁前清除定时器,避免内存泄漏
     clearInterval(this.timer);
   },
   methods: {
- 
-    //表格接口数据
-    getTableDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/shtc_detail", {
-          params: {
-            company_ids: this.company_ids.join(),
-            search_month: this.Riqi,
-          }
-        })
-        .then((res) => {
-          console.log("--------", res.data.data);
-          this.tableData = res.data.data;
-        });
+    getTableData () {
+      this.serach_month = nowmonthy;
+      rctctabledataInfo({ "company_ids": '', "search_month": nowmonthy}).then(res => {
+        this.tableData = res.data;
+        this.tableDatahj = res.footer
+      })
     },
-    //下拉框数据
-    getSelectDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/get_companies")
-        .then((ret) => {
-          this.options = ret.data.data;
-        });
+    //查询
+    searchBtn(value, value1) {
+      const company_ids = value.join(',');
+      const date = new Date(value1);
+      // 获取年份和月份
+      const year = date.getFullYear();
+      const month = date.getMonth() + 1; // 月份从0开始,需要加1
+
+      // 将年份和月份拼接成所需形式的字符串
+      const serach_date = `${year}-${month}`;
+      rctctabledataInfo({ "company_ids": company_ids, "search_month": serach_date}).then(res => {
+        this.tableData = res.data;
+        this.tableDatahj = res.footer
+
+      });
     },
     //更新时间
     updateTime() {
@@ -181,27 +160,6 @@ export default {
       const seconds = String(now.getSeconds()).padStart(2, "0");
       return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
     },
-    resetDateFilter() {
-      this.$refs.filterTable.clearFilter("date");
-    },
-    clearFilter() {
-      this.$refs.filterTable.clearFilter();
-    },
-    formatter(row, column) {
-      return row.address;
-    },
-    filterTag(value, row) {
-      return row.tag === value;
-    },
-    filterHandler(value, row, column) {
-      const property = column["property"];
-      return row[property] === value;
-    },
-    //查询
-    searchBtn() {
-     this.getTableDate()
-    
-    }
   },
 };
 </script>

+ 34 - 74
src/views/TableDetail/XSFXtable.vue

@@ -47,7 +47,7 @@
             <!-- 日期表 -->
             <div class="dataForm" style="margin-right: 20px">
               <el-date-picker
-                v-model="value1"
+                v-model="search_date"
                 type="date"
                
               >
@@ -55,7 +55,7 @@
             </div>
             <!-- 按钮 -->
             <el-button
-              @click="searchBtn"
+              @click="searchBtn(company_ids, search_date)"
               style="background-color: rgb(40, 155, 209); color: black"
               >查询</el-button
             >
@@ -77,8 +77,8 @@
         >
           <el-table-column prop="company" label="品牌"> </el-table-column>
           <el-table-column prop="dymb" label="当月目标"> </el-table-column>
-          <el-table-column prop="dyxl" label="当日销量"> </el-table-column>
-          <el-table-column prop="dytj" label="当日台均"> </el-table-column>
+          <el-table-column prop="drxl" label="当日销量"> </el-table-column>
+          <el-table-column prop="drtj" label="当日台均"> </el-table-column>
           <el-table-column prop="ylxl" label="月累销量"> </el-table-column>
           <el-table-column prop="yltj" label="月累台均"> </el-table-column>
           <el-table-column prop="syzytjml" label="上月整月台均毛利">
@@ -101,6 +101,9 @@
 
 <script>
 import axios from "axios";
+import { monthlytabledataInfo } from "../../servuces/prove";
+import { nowdate } from "../../servuces/getnowtime";
+import { column } from "../../store/tuozhuai";
 export default {
   data() {
     return {
@@ -111,68 +114,45 @@ export default {
       tableData: [],
       //下拉框内属性
       options: [],
-      //日期表属性
-      pickerOptions: {
-        shortcuts: [
-          {
-            text: "最近一个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        ],
-      },
-      value1: ["2023-08-01"],
+      search_date: '',
     };
   },
-  computed: {
-    Riqi : function getNowFormatDate() {
-      let date = new Date(),
-        year = date.getFullYear(), //获取完整的年份(4位)
-        month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
-        strDate = date.getDate(); // 获取当前日(1-31)
-      if (month < 10) month = `0${month}`; // 如果月份是个位数,在前面补0
-      if (strDate < 10) strDate = `0${strDate}`; // 如果日是个位数,在前面补0
-
-      return `${year}-${month}-${strDate}`;
+  created () {
+    const data = sessionStorage.getItem('company_data');
+    if (data) {
+      this.options = JSON.parse(data)
     }
   },
   mounted() {
-    this.updateTime(); //时间
-    this.getTableDate(); //开始获取表格
-    this.getSelectDate(); //下拉框接口数据
-    console.log(this.Riqi);
-    this.value1 =this.Riqi;
+    column(this);
+    this.updateTime();
+    this.getTaleData(); //下拉框接口数据
   },
   beforeDestroy() {
     // 在组件销毁前清除定时器,避免内存泄漏
     clearInterval(this.timer);
   },
   methods: {
-    //表格接口数据
-    getTableDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/xssjml_detail", {
-          params: {
-            company_ids: this.company_ids.join(),
-            search_date: this.Riqi,
-          },
-        })
-        .then((res) => {
-          console.log("--------", res.data.data);
-          this.tableData = res.data.data;
-        });
+    //查询
+    searchBtn(value, value1) {
+      const company_ids = value.join(',');
+      const date = new Date(value1);
+      // 获取年份和月份
+      const year = date.getFullYear();
+      const month = date.getMonth() + 1; // 月份从0开始,需要加1
+      const day = date.getDate()
+      // 将年份和月份拼接成所需形式的字符串
+      const search_date = `${year}-${month}-${day}`;
+      monthlytabledataInfo({ "company_ids": company_ids, "search_date": search_date }).then(res => {
+        this.tableData = res.data;
+
+      })
     },
-    //下拉框数据
-    getSelectDate() {
-      axios
-        .get("http://192.168.2.55:8022/plugins/lhyt/get_companies")
-        .then((ret) => {
-          this.options = ret.data.data;
-        });
+    getTaleData () {
+      this.search_date = nowdate;
+      monthlytabledataInfo({ "company_ids": '', "search_date": nowdate}).then(res => {
+        this.tableData = res.data;
+      })
     },
     //更新时间
     updateTime() {
@@ -193,26 +173,6 @@ export default {
       const seconds = String(now.getSeconds()).padStart(2, "0");
       return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
     },
-    resetDateFilter() {
-      this.$refs.filterTable.clearFilter("date");
-    },
-    clearFilter() {
-      this.$refs.filterTable.clearFilter();
-    },
-    formatter(row, column) {
-      return row.address;
-    },
-    filterTag(value, row) {
-      return row.tag === value;
-    },
-    filterHandler(value, row, column) {
-      const property = column["property"];
-      return row[property] === value;
-    },
-    //查询
-    searchBtn() {
-      this.getTableDate();
-    },
   },
 };
 </script>