魏志佳 5 vuotta sitten
vanhempi
commit
ec267effa3

+ 1 - 1
src/views/modules/Statistics/CompareData.vue

@@ -656,7 +656,7 @@ export default {
 <style lang="scss" scoped>
 .clickHandle {
   position: relative;
-  top: -24px;
+  top: 0px;
   left: 0px;
   .selectDate {
     margin-left: 2rem;

+ 140 - 0
src/views/modules/Statistics/accountReport.vue

@@ -0,0 +1,140 @@
+<template>
+  <div class="accountReport">
+    <div class="optionLine">
+      
+          <span>项目选择:</span>
+          <a-tree-select
+            v-model="treeValue"
+            style="width: 30%"
+            :tree-data="treeData"
+            tree-checkable
+            :show-checked-strategy="SHOW_PARENT"
+            searchPlaceholder="请选择项目和账户"
+            :allowClear="true"
+            @change="treeChange"
+          />
+     
+      <div class="optItem">
+          <span>折扣:</span>
+          <a-input-number :min="0" :max="10" :step="0.1" v-model="discount" />
+      </div>
+      <div class="optItem">
+          <span>返点比例:</span>
+          <a-input-number :min="0" :max="10" :step="0.1" v-model="rebateProp" />
+      </div>
+      <div class="optItem">
+
+      </div>
+        
+      <div class="btn">
+        <a-button type="primary" @click="getData">查询</a-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import moment from 'moment';
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
+import { TreeSelect } from 'ant-design-vue';
+const SHOW_PARENT = TreeSelect.SHOW_PARENT;
+import DatePicker from '@/components/DatePicker.vue'
+// 引入基本模板
+var echarts = require('echarts')
+// 引入柱状图组件
+require('echarts/lib/chart/bar')
+require('echarts/lib/chart/pie')
+require('echarts/lib/chart/line')
+// 引入提示框和title组件
+require('echarts/lib/component/tooltip')
+require('echarts/lib/component/title')
+require('echarts/lib/component/graphic')
+require('echarts/lib/component/toolbox')
+require('echarts/lib/component/legend')
+export default {
+   components:{
+        DatePicker,
+       
+    },
+  data() {
+    return {
+      //treeselect的参数
+      treeValue: [],
+      treeData: [],
+      SHOW_PARENT,
+      //折扣数值
+      discount:1.0,
+      //返点比例
+      rebateProp:1.0,
+    }
+  },
+  methods: {
+    //项目改变后的事件
+    treeChange(val) {
+      this.projectId = []
+      this.accountName = []
+      console.log(val, this.treeValue)
+      this.treeValue.forEach((item, index) => {
+        if (parseInt(item)) {
+          this.projectId.push(item)
+        } else {
+          this.accountName.push(item)
+        }
+      })
+      if (this.treeValue.length == 0) {
+        this.optionArr = []
+      }
+      postAction('/pangolin/api/app/list', {
+        projectId: this.projectId,
+        accountName: this.accountName
+      }).then(res => {
+        console.log(res)
+        if (res.success) {
+          this.optionArr = res.data
+        }
+      })
+    },
+    disabledDate(current) {
+      // console.log(current)
+
+      return current && current > moment().subtract(1, 'day')
+    },
+
+    //确定按钮的事件
+    getData(){
+           
+        console.log();
+        this.loading=true;
+        // this.HttpPost()
+            
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.accountReport {
+  .optionLine {
+    
+    position: relative;
+    margin-top: 20px;
+    margin-bottom: 15px;
+    // border: 1px solid #ccc;
+    .optItem{
+      display: inline-block;
+      margin-left: 15px;
+        span {
+        display: inline-block;
+        padding: 0 3px;
+        }
+    }
+    
+
+    .btn {
+      position: absolute;
+      right: 10px;
+      top: 0px;
+    }
+  }
+}
+</style>