Browse Source

配资总览联调接口

Qukatie 1 month ago
parent
commit
fd576fc349
1 changed files with 76 additions and 126 deletions
  1. 76 126
      src/views/overviewAllocation/index.vue

+ 76 - 126
src/views/overviewAllocation/index.vue

@@ -1,14 +1,14 @@
 <template>
   <!--青岛鑫动力-->
-  <div class="xindongpowerBox">
-    <div class="tableEchatsBox">
+  <div>
+    <basic-container>
       <div class="echattsBox">
-        <index-card :classType="true" title="实时总览" iconName="el-icon-s-fold" style="height:450px;margin-bottom: 30px">
-          <div slot="select">
+        <div style="display: flex;justify-content: flex-end;">
+          <div>
             <el-date-picker
               v-model="annual4"
               type="year"
-              size="mini"
+              size="small"
               placeholder="选择年"
               value-format="yyyy"
               style="margin-right:10px;margin-bottom: -20px"
@@ -16,68 +16,82 @@
             >
             </el-date-picker>
           </div>
-          <div slot="header">
-            <div style="display: flex;align-items: center;justify-content: space-around">
-              <div style="width: 100%;">
-                <div class="bottomFlex" style="justify-content: space-around">
-                  <div>
-                    <div style="color: #81B337">
-                      <span>订单金额:</span>
-                      <span class="weightnum">¥{{ overviewForm.totalMoney || "0.00" }}元</span>
-                    </div>
-                  </div>
-                  <div>
-                    <div style="color: #6BBCD1">
-                      <span>配额:</span>
-                      <span class="weightnum">¥{{ overviewForm.fundingAmount || "0.00" }}元</span>
-                    </div>
-                  </div>
-                  <div>
-                    <div style="color: #808bbd">
-                      <span>保证金:</span>
-                      <span class="weightnum">¥{{ overviewForm.bondAmount || "0.00" }}元</span>
-                    </div>
+          <div>
+            <dic-select
+              v-model="customerName"
+              placeholder="租户"
+              key="id"
+              label="customerName"
+              url="/blade-system/tenant/getFundingCustomerList "
+              :filterable="true"
+              :clearable="false"
+              dataName="customerName"
+              @selectChange="dicChange('customerName', $event)"
+            ></dic-select>
+          </div>
+        </div>
+        <div style="margin: 20px 0;">
+          <div style="display: flex;align-items: center;justify-content: space-around">
+            <div style="width: 100%;">
+              <div class="bottomFlex" style="justify-content: space-around">
+                <div>
+                  <div style="color: #81B337">
+                    <span>订单金额:</span>
+                    <span class="weightnum">¥{{ overviewForm.totalMoney || "0.00" }}元</span>
                   </div>
-                  <div>
-                    <div style="color: #b3373f">
-                      <span>还款:</span>
-                      <span class="weightnum">¥{{ overviewForm.repayment || "0.00" }}元</span>
-                    </div>
+                </div>
+                <div>
+                  <div style="color: #6BBCD1">
+                    <span>配额:</span>
+                    <span class="weightnum">¥{{ overviewForm.fundingAmount || "0.00" }}元</span>
                   </div>
-                  <div style="color: #8dab14">
-                    <span>允许提货金额:</span>
-                    <span>¥{{ overviewForm.amount || "0.00" }}元</span>
+                </div>
+                <div>
+                  <div style="color: #808bbd">
+                    <span>保证金:</span>
+                    <span class="weightnum">¥{{ overviewForm.bondAmount || "0.00" }}元</span>
                   </div>
-                  <div style="color: #f09d68">
-                    <span>资金占用:</span>
-                    <span>¥{{ overviewForm.interest || "0.00" }}元</span>
+                </div>
+                <div>
+                  <div style="color: #b3373f">
+                    <span>还款:</span>
+                    <span class="weightnum">¥{{ overviewForm.repayment || "0.00" }}元</span>
                   </div>
                 </div>
+                <div style="color: #8dab14">
+                  <span>允许提货金额:</span>
+                  <span>¥{{ overviewForm.amount || "0.00" }}元</span>
+                </div>
+                <div style="color: #f09d68">
+                  <span>资金占用:</span>
+                  <span>¥{{ overviewForm.interest || "0.00" }}元</span>
+                </div>
               </div>
             </div>
           </div>
-          <div slot="content" style="height:350px" id="commoDity3"></div>
-        </index-card>
+        </div>
+        <div style="height:78vh" id="commoDity3"></div>
       </div>
-    </div>
+    </basic-container>
   </div>
 </template>
 
 <script>
+import dicSelect from "@/components/dicSelect/main";
 import indexCard from "@/views/wel/components/card.vue";
 import { columnarRz, realTimeOverview } from "@/api/overviewAllocation/index";
-import {  getYearDate } from "@/util/date";
+import { getYearDate } from "@/util/date";
 import { getParamservice } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 import "@/assets/icon/homeicon/iconfont.css";
 export default {
-  components: { indexCard },
+  components: { indexCard, dicSelect },
   props: {
     sysType: Number
   },
   data() {
     return {
-      menuAll: [], //所有路由菜单id
-      annual3: "", // echatts 时间筛选
+      tenantId: "883868",
+      customerName: "黄岛鑫动力",
       annual4: "", // echatts 时间筛选
       amountList2: [], // 金额
       numberList2: [], // 数量
@@ -92,39 +106,25 @@ export default {
       orderStatusList: [], // 支付状态
       saberUserInfo: {}, // 当前登录人数据
       overviewForm: {},
-      inShow: false,
+      inShow: false
     };
   },
   created() {
-    this.annual3 = getYearDate().toString(); // 获取当前时间
     this.annual4 = getYearDate().toString(); // 获取当前时间
-    //从缓存中获取所有路由信息
-    setTimeout(data => {
-      let menu = JSON.parse(localStorage.getItem("saber-menuAll")).content;
-      for (let item of menu) {
-        this.menuAll.push(item.id);
-        if (item.children.length > 0) {
-          this.getMenuId(item.children);
-        }
-      }
-    }, 600);
   },
   mounted() {
-    getParamservice(1, 10, { paramKey: "whether.financing" }).then(res => {
-      if (res.data.data.records.length) {
-        res.data.data.records.forEach(e => {
-          if (e.paramValue == 1) {
-            this.inShow = true;
-            this.commoDity3Datafun();
-            realTimeOverview({ date: Number(this.annual4) }).then(res => {
-              this.overviewForm = res.data.data;
-            });
-          }
-        });
-      }
+    this.commoDity3Datafun();
+    realTimeOverview({ year: Number(this.annual4), tenantId: this.tenantId }).then(res => {
+      this.overviewForm = res.data.data;
     });
   },
   methods: {
+    dicChange(name, row) {
+      if (name == "customerName") {
+        this.tenantId = row.customerCode;
+        this.commoDity3Datafun();
+      }
+    },
     // 排序切换
     sortfun() {
       if (this.search.sort == 1) {
@@ -154,52 +154,18 @@ export default {
     // 获取echarts 表的数据
     commoDity3Datafun() {
       columnarRz({
-        year: Number(this.annual4)
+        year: Number(this.annual4),
+        tenantId: this.tenantId
       }).then(res => {
         this.amountList3 = res.data.data.amount;
         this.numberList3 = res.data.data.number;
         this.primaryFundingAmount3 = res.data.data.primaryFundingAmount;
         this.commoDity3();
-        realTimeOverview({ date: Number(this.annual4) }).then(res => {
+        realTimeOverview({ year: Number(this.annual4), tenantId: this.tenantId }).then(res => {
           this.overviewForm = res.data.data;
         });
       });
     },
-    //获取所有路由信息id
-    getMenuId(array) {
-      for (let item of array) {
-        this.menuAll.push(item.id);
-      }
-    },
-    // 快捷跳转
-    inPage(type) {
-      switch (type) {
-        case "xs":
-          this.$router.push("/tirePartsMall/salesManagement/saleOrder/index?showTrue=" + true);
-          break;
-        case "ck":
-          this.$router.push("/tirePartsMall/salesManagement/outboundTask/index");
-          break;
-        case "ckgd":
-          this.$router.push("/tirePartsMall/salesManagement/outboundWorkOrder/index");
-          break;
-        case "cgdd":
-          this.$router.push("/tirePartsMall/salesManagement/purchaseOrder/index?showTrue=" + true);
-          break;
-        case "rkrw":
-          this.$router.push("/tirePartsMall/salesManagement/inboundTask/index");
-          break;
-        case "rk":
-          this.$router.push("/tirePartsMall/purchasingManagement/warehouseEntryOrder/index");
-          break;
-        case "kccx":
-          this.$router.push("/tirePartsMall/inventory/index");
-          break;
-        case "db":
-          this.$router.push("/tirePartsMall/salesManagement/outboundWorkOrderL/index?showTrue=" + true);
-          break;
-      }
-    },
     commoDity3() {
       // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
       let myChart = this.$echarts.init(document.getElementById("commoDity3"));
@@ -334,7 +300,6 @@ export default {
 
 <style lang="scss" scoped>
 .xindongpowerBox {
-  padding: 15px;
   box-sizing: border-box;
 }
 
@@ -417,26 +382,11 @@ export default {
   }
 }
 
-.tableEchatsBox {
-  margin-top: 10px;
-  display: flex;
-
-  .tableBox {
-    flex: 2;
-    background: #fff;
-    border-radius: 10px;
-    box-sizing: border-box;
-    margin-right: 20px;
-    padding-bottom: 20px;
-  }
-
-  .echattsBox {
-    flex: 3;
-    background: #fff;
-    border-radius: 10px;
-    padding-bottom: 20px;
-    box-sizing: border-box;
-  }
+.echattsBox {
+  background: #fff;
+  border-radius: 10px;
+  padding-bottom: 20px;
+  box-sizing: border-box;
 }
 
 .tradingIcon {