Quellcode durchsuchen

1、首页统计

billisme vor 4 Jahren
Ursprung
Commit
07f58c6b06

+ 7 - 0
src/api/guosen/bussinessbonusrecords.js

@@ -56,3 +56,10 @@ export const bonus = (row) => {
   })
 }
 
+export const queryBalance = () => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusrecords/queryBalance',
+    method: 'get',
+  })
+}
+

+ 2 - 2
src/components/index/accountstatic.vue

@@ -25,7 +25,7 @@
               },
               count: this.statData.todayOut,
               decimals: 2,
-              title: '今日分润',
+              title: '今日扣款',
 
             },
             {
@@ -34,7 +34,7 @@
               },
               count: this.statData.historyOut,
               decimals: 2,
-              title: '历史分润',
+              title: '历史扣款',
 
             },
             {

+ 41 - 23
src/views/guosen/bussinessbonusrecords.vue

@@ -15,7 +15,7 @@
                    v-if="permission.bussinessbonusrecords_delete"
                    @click="handleDelete">删 除
         </el-button>
-      </template> -->
+      </template> -->I
       <template slot="menu" slot-scope="scope">
         <el-button v-if="scope.row.bonusStatus != 2" type="success" size="small" icon="el-icon-s-promotion" plain @click="bonusDo(scope.row)">分润
         </el-button>
@@ -28,6 +28,13 @@
         <el-tag v-else-if="scope.row.bonusStatus == 4" type="info">系统异常</el-tag>
         <el-tag v-else>未知</el-tag>
       </template>
+      <template slot="menuLeft">
+        <el-button type="warning"
+                   size="small"
+                   v-if="permission.balance_query"
+                   @click="handelQueryBalance">
+          余额查询</el-button><span style="color: red; font-weight:bold">{{balance}}</span>
+      </template>
     </avue-crud>
   </basic-container>
 </template>
@@ -39,7 +46,8 @@
     add,
     update,
     remove,
-    bonus
+    bonus,
+    queryBalance
   } from "@/api/guosen/bussinessbonusrecords";
   import {
     getYesterdayData
@@ -54,6 +62,7 @@
       return {
         form: {},
         query: {},
+        balance: "",
         loading: true,
         page: {
           pageSize: 10,
@@ -84,7 +93,7 @@
               dicFormatter:(res)=>{
                 return res.data.records;
               },
-              hide:true,
+              // hide:true,
               display: false,
               props:{
                 label: "account",
@@ -93,24 +102,24 @@
               search: true,
 
             },
-            {
-              label: "分润账号",
-              prop: "bonusAccountName",
-              // type: "select",
-              // dicUrl: "/api/cyzh-guosen/bussinessbonusaccount/list",
-              // props: {
-              //   label: "account",
-              //   value: "account"
-              // },
-              // dicFormatter: (res) => {
-              //   return res.data.records;
-              // },
-              rules: [{
-                required: true,
-                message: "请输入广告充值红利账号名称",
-                trigger: "blur"
-              }]
-            },
+            // {
+            //   label: "分润账号",
+            //   prop: "bonusAccountName",
+            //   // type: "select",
+            //   // dicUrl: "/api/cyzh-guosen/bussinessbonusaccount/list",
+            //   // props: {
+            //   //   label: "account",
+            //   //   value: "account"
+            //   // },
+            //   // dicFormatter: (res) => {
+            //   //   return res.data.records;
+            //   // },
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入广告充值红利账号名称",
+            //     trigger: "blur"
+            //   }]
+            // },
             {
               label: "分润比例",
               prop: "rate",
@@ -140,11 +149,11 @@
                   value: 0
                 },
                 {
-                  label: "分配成功",
+                  label: "分配",
                   value: 1
                 },
                 {
-                  label: "分配",
+                  label: "分配成功",
                   value: 2
                 },
                 {
@@ -162,6 +171,10 @@
                 trigger: "blur"
               }]
             },
+            {
+              label: "描述",
+              prop: "failReason",
+            },
             {
               label: "分成日期",
               prop: "bonusDate",
@@ -220,6 +233,11 @@
       }
     },
     methods: {
+      handelQueryBalance(){
+        queryBalance().then(res =>{
+          this.balance = "¥" + res.data.data;
+        })
+      },
       bonusDo(row,done,loading) {
           this.$alert("确定分润吗?").then(()=>{
             bonus(row).then(() => {

+ 14 - 11
src/views/wel/index.vue

@@ -488,7 +488,7 @@
           ]
         },
 
-        optionMusic: {
+        /*optionMusic: {
           span: 6,
           data: [{
               title: '用户总数',
@@ -528,9 +528,9 @@
             },
 
           ]
-        },
+        },*/
 
-        optionTodayOut: {
+        /*optionTodayOut: {
           title: {
             text: '今日提现去向',
 
@@ -693,7 +693,7 @@
               }
             }
           }]
-        },
+        },*/
 
 
       }
@@ -733,18 +733,21 @@
 
 
       getByAccount().then(res => {
-        _that.bussiness = res.data.data
-        _that.statDatas[0].value = res.data.data.serviceRate / 1000
-        _that.statDatas[1].value = _that.money * _that.statDatas[0].value
-        _that.statDatas[2].value = _that.money
-        _that.statDatas[3].value = _that.statDatas[2].value - _that.statDatas[1].value
-        console.log("buss" + JSON.stringify(_that.bussiness))
+        if(res.data.data){
+          _that.bussiness = res.data.data
+          _that.statDatas[0].value = res.data.data.serviceRate / 1000
+          _that.statDatas[1].value = _that.money * _that.statDatas[0].value
+          _that.statDatas[2].value = _that.money
+          _that.statDatas[3].value = _that.statDatas[2].value - _that.statDatas[1].value
+          console.log("buss" + JSON.stringify(_that.bussiness))
+        }
       })
 
     },
     methods: {
       submitBussiness() {
         this.bussiness.userPassword = null;
+        this.bussiness.leastPrice = null;
         update(this.bussiness).then(res => {
           this.$message({
             type: "success",
@@ -912,7 +915,7 @@
       getAccoutStatic() {
         let that = this;
         request({
-          url: '/api/cyzh-static/staticAccountStatic',
+          url: '/api/cyzh-static/adStaticAccountStatic',
           method: "get",
         }).then(res => {
           //今日分润