Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

hmp 4 tahun lalu
induk
melakukan
6ef3423c07

TEMPAT SAMPAH
public/img/bg/fxfr.png


TEMPAT SAMPAH
public/img/bg/qb.png


TEMPAT SAMPAH
public/img/bg/rmb.png


TEMPAT SAMPAH
public/img/bg/sm.png


TEMPAT SAMPAH
public/img/bg/tg.png


TEMPAT SAMPAH
public/img/bg/zd.png


TEMPAT SAMPAH
public/img/logo2.png


+ 50 - 0
src/api/billrecord/bussinessdebit.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessdebit/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessdebit/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessdebit/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessdebit/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessdebit/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 18 - 0
src/api/guosen/bussiness.js

@@ -22,6 +22,16 @@ export const getDetail = (id) => {
   })
 }
 
+export const generateApi = (ids) => {
+  return request({
+    url: '/api/cyzh-guosen/bussiness/generateApi',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
 export const remove = (ids) => {
   return request({
     url: '/api/cyzh-guosen/bussiness/remove',
@@ -48,3 +58,11 @@ export const update = (row) => {
   })
 }
 
+
+export const getByAccount = () => {
+  return request({
+    url: '/api/cyzh-guosen/bussiness/getByAccount',
+    method: 'get',
+
+  })
+}

+ 50 - 0
src/api/guosen/bussinessbonusaccout.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusaccout/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusaccout/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusaccout/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusaccout/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusaccout/submit',
+    method: 'post',
+    data: row
+  })
+}
+

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

@@ -0,0 +1,58 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusrecords/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusrecords/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusrecords/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusrecords/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusrecords/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const bonus = (row) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusrecords/bonus',
+    method: 'post',
+    data: row
+  })
+}
+

+ 57 - 0
src/api/guosen/bussinessbonusstatic.js

@@ -0,0 +1,57 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusstatic/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusstatic/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const getYesterdayData = () => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusstatic/getYestoday',
+    method: 'get',
+
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusstatic/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusstatic/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessbonusstatic/submit',
+    method: 'post',
+    data: row
+  })
+}

+ 50 - 0
src/api/guosen/bussinessdebitrequest.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessdebitrequest/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessdebitrequest/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessdebitrequest/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessdebitrequest/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/cyzh-guosen/bussinessdebitrequest/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 5 - 1
src/main.js

@@ -22,9 +22,12 @@ import thirdRegister from './components/third-register/main';
 import avueUeditor from 'avue-plugin-ueditor';
 import website from '@/config/website';
 import crudCommon from '@/mixins/crud';
+import VueClipboard from "vue-clipboard2";
+
+
 
 // 判空函数
-Vue.prototype.$isEmpty=function(value){ 
+Vue.prototype.$isEmpty=function(value){
 	switch (typeof value) {
 		case 'undefined':
 			return true;
@@ -52,6 +55,7 @@ Vue.prototype.$isEmpty=function(value){
 window.$crudCommon = crudCommon;
 // 加载Vue拓展
 Vue.use(router);
+Vue.use(VueClipboard);
 Vue.use(VueAxios, axios);
 Vue.use(Element, {
   i18n: (key, value) => i18n.t(key, value)

+ 0 - 1
src/views/billrecord/billrecord.vue

@@ -27,7 +27,6 @@
                    @click="handleDelete">删 除
         </el-button>
       </template>
-      <template></template>
     </avue-crud>
   </basic-container>
 </template>

+ 252 - 0
src/views/billrecord/chongzhi.vue

@@ -0,0 +1,252 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               ref="crud"
+               @row-del="rowDel"
+               v-model="form"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               :before-open="beforeOpen"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getBussinessList as getList} from "@/api/billrecord/billrecord";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          // showHeader:false,
+          addBtn: false,
+          menu: false,
+          height: 'auto',
+          calcHeight: 30,
+          dialogWidth: 950,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "广告商",
+              prop: "userId",
+              type: "select",
+              dicUrl: "/api/cyzh-guosen/bussiness/list?size=500",
+              dicFormatter:(res)=>{
+                return res.data.records;
+              },
+              props:{
+                label: "name",
+                value: "id"
+              },
+              search: true,
+
+            },
+            {
+              label: "充值金额",
+              prop: "price",
+
+            },
+            {
+              label: "充值状态",
+              prop: "payStatus",
+              type: "select",
+              search: true,
+              dicData:[
+                {
+                  label:"待付款",
+                  value:0
+                },
+                {
+                  label:"已付款",
+                  value: 1
+                },
+                {
+                  label:"已取消",
+                  value: 2
+                },
+
+              ]
+            },
+            {
+              label: "时间",
+              prop: "createTime",
+
+            },
+
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          window.console.log(error);
+          loading();
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          window.console.log(error);
+          loading();
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getNotice(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      currentChange(currentPage) {
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        const {releaseTimeRange} = this.query;
+        let values = {
+          ...params,
+        };
+        if (releaseTimeRange) {
+          values = {
+            ...params,
+            releaseTime_datege: releaseTimeRange[0],
+            releaseTime_datelt: releaseTimeRange[1],
+            ...this.query
+          };
+          values.releaseTimeRange = null;
+        }
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, values).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 63 - 0
src/views/bussiness/order.vue

@@ -0,0 +1,63 @@
+<template>
+  <basicContainer>
+    <avue-tabs :option="option" @change="handleChange"></avue-tabs>
+    <span v-if="type.prop==='tab1'">
+      <chongzhi ref="chongzhi"></chongzhi>
+    </span>
+    <span v-else-if="type.prop==='tab2'">
+    <debit ref="debit"></debit>
+    </span>
+  </basicContainer>
+
+</template>
+
+
+<script>
+  import chongzhi from "@/views/billrecord/chongzhi";
+  import debit from "@/views/guosen/debit";
+  export default {
+    components:{
+      chongzhi,
+      debit
+    },
+    data() {
+      return {
+
+        type: {},
+        option: {
+          column: [{
+            icon: 'el-icon-info',
+            label: '充值明细',
+            prop: 'tab1',
+          }, {
+            icon: 'el-icon-warning',
+            label: '扣款明细',
+            prop: 'tab2',
+          }]
+        },
+
+      }
+    },
+    created() {
+      this.type = this.option.column[0];
+
+    },
+    methods: {
+      handleChange(column) {
+        this.type = column
+        if(type.prop==='tab1'){
+          this.$nextTick(()=>{
+            this.$refs.chongzhi.searchReset();
+          })
+        }else{
+          this.$nextTick(()=>{
+            this.$refs.debit.searchReset();
+          })
+        }
+      }
+    }
+  }
+</script>
+
+<style>
+</style>

+ 84 - 48
src/views/guosen/bussiness.vue

@@ -1,42 +1,40 @@
 <template>
   <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               :page.sync="page"
-               :permission="permissionList"
-               :before-open="beforeOpen"
-               v-model="form"
-               ref="crud"
-               @row-update="rowUpdate"
-               @row-save="rowSave"
-               @row-del="rowDel"
-               @search-change="searchChange"
-               @search-reset="searchReset"
-               @selection-change="selectionChange"
-               @current-change="currentChange"
-               @size-change="sizeChange"
-               @refresh-change="refreshChange"
-               @on-load="onLoad">
+    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
+      :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
+      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+      @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
       <template slot="menuLeft">
-        <el-button type="danger"
-                   size="small"
-                   icon="el-icon-delete"
-                   plain
-                   v-if="permission.bussiness_delete"
-                   @click="handleDelete">删 除
+        <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.bussiness_delete" @click="handleDelete">删
+          除
+        </el-button>
+       <el-button type="success" size="small" icon="el-icon-upload" plain v-if="permission.bussiness_generateapi" @click="generateDoc">
+          生成api文档
         </el-button>
       </template>
       <template slot="maxLimitForm" slot-scope="scope">
-         <avue-input-number v-model="scope.row.maxLimit" precision="2" controls-position></avue-input-number>
+        <avue-input-number v-model="scope.row.maxLimit" precision="2" controls-position></avue-input-number>
+      </template>
+      <template slot="apiFilePath" slot-scope="scope">
+        <el-tab v-if="scope.row.apiFilePath == null">无</el-tab>
+        <el-tab v-if="scope.row.apiFilePath != null&&scope.row.apiFilePath != ''">有</el-tab>
       </template>
     </avue-crud>
   </basic-container>
 </template>
 
 <script>
-  import {getList, getDetail, add, update, remove} from "@/api/guosen/bussiness";
-  import {mapGetters} from "vuex";
+  import {
+    getList,
+    getDetail,
+    add,
+    update,
+    remove,
+    generateApi
+  } from "@/api/guosen/bussiness";
+  import {
+    mapGetters
+  } from "vuex";
   import md5 from 'js-md5'
 
   export default {
@@ -52,7 +50,7 @@
         },
         selectionList: [],
         option: {
-          height:'auto',
+          height: 'auto',
           calcHeight: 30,
           tip: false,
           searchShow: true,
@@ -63,8 +61,7 @@
           selection: true,
           dialogClickModal: false,
           dialogWidth: "30%",
-          column: [
-            {
+          column: [{
               label: "商户号名称",
               labelWidth: 130,
               prop: "name",
@@ -87,12 +84,24 @@
                 trigger: "blur"
               }]
             },
+            {
+              label: "服务费率(千分比)",
+              prop: "serviceRate",
+              labelWidth: 130,
+              width: 300,
+              span: 24,
+              rules: [{
+                required: true,
+                message: "请输入关联账号的名称",
+                trigger: "blur"
+              }]
+            },
             {
               label: "账号",
               prop: "userName",
-              labelWidth:130,
+              labelWidth: 130,
               display: true,
-              span:24,
+              span: 24,
               rules: [{
                 required: true,
                 message: "请输入关联账号的名称",
@@ -102,8 +111,8 @@
             {
               label: "密码",
               prop: "userPassword",
-              labelWidth:130,
-              span:24,
+              labelWidth: 130,
+              span: 24,
               display: true,
               hide: true,
               rules: [{
@@ -112,15 +121,20 @@
                 trigger: "blur"
               }]
             },
+            {
+              label: "api文档",
+              prop: "apiFilePath",
+              slot: true,
+            },
 
             {
               label: "回调地址",
               prop: "recallUrl",
-              labelWidth:130,
-              span:24,
+              labelWidth: 130,
+              span: 24,
               hide: true,
               rules: [{
-                required: true,
+                required: false,
                 message: "请输入关联账号的密码",
                 trigger: "blur"
               }]
@@ -161,7 +175,7 @@
     },
     methods: {
       rowSave(row, done, loading) {
-         row.userPassword = md5(row.userPassword)
+        row.userPassword = md5(row.userPassword)
         add(row).then(() => {
           this.onLoad(this.page);
           this.$message({
@@ -190,10 +204,10 @@
       },
       rowDel(row) {
         this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
           .then(() => {
             return remove(row.id);
           })
@@ -205,16 +219,38 @@
             });
           });
       },
+      generateDoc(){
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定重新生成api文档吗?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            return generateApi(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
           return;
         }
         this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
           .then(() => {
             return remove(this.ids);
           })
@@ -252,10 +288,10 @@
         this.selectionList = [];
         this.$refs.crud.toggleSelection();
       },
-      currentChange(currentPage){
+      currentChange(currentPage) {
         this.page.currentPage = currentPage;
       },
-      sizeChange(pageSize){
+      sizeChange(pageSize) {
         this.page.pageSize = pageSize;
       },
       refreshChange() {

+ 274 - 0
src/views/guosen/bussinessbonusaccout.vue

@@ -0,0 +1,274 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.bussinessbonusaccout_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/guosen/bussinessbonusaccout";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          dialogWidth: "30%",
+          column: [
+            {
+              label: "账号名称",
+              prop: "accout",
+              span: 24,
+              rules: [{
+                required: true,
+                message: "请输入账号名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "分润比例",
+              span: 24,
+              prop: "rate",
+              type: "number",
+              rules: [{
+                required: true,
+                message: "请输入分润比例",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "收款方开户行",
+              prop: "receiverBankCode",
+              span: 24,
+              type: "select",
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=bank_type",
+              props:{
+                label: "dictValue",
+                value: "dictKey"
+              },
+              rules: [{
+                required: true,
+                message: "请输入分润比例",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "账户类型",
+              prop: "bankAccountType",
+              span: 24,
+              type: "select",
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=bank_account_type",
+              props:{
+                label: "dictValue",
+                value: "dictKey"
+              },
+              rules: [{
+                required: true,
+                message: "请输入分润比例",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "收款帐户的卡号",
+              prop: "receiverAccountNo",
+              span: 24,
+              rules: [{
+                required: true,
+                message: "请输入分润比例",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "收款方开户名",
+              prop: "receiverAccountName",
+              span: 24,
+              rules: [{
+                required: true,
+                message: "请输入分润比例",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.bussinessbonusaccout_add, false),
+          viewBtn: this.vaildData(this.permission.bussinessbonusaccout_view, false),
+          delBtn: this.vaildData(this.permission.bussinessbonusaccout_delete, false),
+          editBtn: this.vaildData(this.permission.bussinessbonusaccout_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 331 - 0
src/views/guosen/bussinessbonusrecords.vue

@@ -0,0 +1,331 @@
+<template>
+  <basic-container>
+    <avue-data-display :option="staticOption">
+    </avue-data-display>
+
+    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
+      :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
+      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+      @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" >
+      <!-- <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.bussinessbonusrecords_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template> -->
+      <template slot="menu" slot-scope="scope">
+        <el-button type="success" size="small" icon="el-icon-s-promotion" plain @click="bonusDo(scope.row)">分润
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {
+    getList,
+    getDetail,
+    add,
+    update,
+    remove,
+    bonus
+  } from "@/api/guosen/bussinessbonusrecords";
+  import {
+    getYesterdayData
+  } from "@/api/guosen/bussinessbonusstatic"
+  import {
+    mapGetters
+  } from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height: 'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          addBtn: false,
+          delBtn: false,
+          editBtn: false,
+          viewBtn: false,
+          selection: true,
+          dialogClickModal: false,
+          column: [{
+              label: "广告充值分润账号",
+              prop: "bonusAccoutId",
+              type: "select",
+              dicUrl: "/api/cyzh-guosen/bussinessbonusaccout/list",
+              props: {
+                label: "accout",
+                value: "id"
+              },
+              dicFormatter: (res) => {
+                return res.data.records;
+              },
+              rules: [{
+                required: true,
+                message: "请输入广告充值红利账号id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "分润比例",
+              prop: "rate",
+              rules: [{
+                required: true,
+                message: "请输入分润比例",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "分成金额",
+              prop: "price",
+              rules: [{
+                required: true,
+                message: "请输入分成金额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "分成状态",
+              prop: "bonusStatus",
+              type: "select",
+              dicData: [{
+                  label: "待分配",
+                  value: 0
+                },
+                {
+                  label: "分配成功",
+                  value: 1
+                },
+                {
+                  label: "分配中",
+                  value: 2
+                },
+                {
+                  label: "分配失败",
+                  value: 3
+                }
+              ],
+              rules: [{
+                required: true,
+                message: "请输入分成状态",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "分成日期",
+              prop: "bonusDate",
+              search:true,
+              searchRange: true,
+              type: "date",
+              format: "yyyy-MM-dd",
+              valueFormat: "yyyy-MM-dd",
+              rules: [{
+                required: true,
+                message: "请输入分成金额",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        staticOption: {
+          span: 6,
+          data: [{
+              count: 1000000,
+              title: '广告昨日充值',
+
+            },
+
+            {
+              count: 5000,
+              title: '服务费昨日收入 ',
+
+            },
+            {
+              count: 4000,
+              title: '昨日可分配利润',
+
+            }
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.bussinessbonusrecords_add, false),
+          viewBtn: this.vaildData(this.permission.bussinessbonusrecords_view, false),
+          delBtn: this.vaildData(this.permission.bussinessbonusrecords_delete, false),
+          editBtn: this.vaildData(this.permission.bussinessbonusrecords_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      bonusDo(row,done,loading) {
+          this.$alert("确定分润吗?").then(()=>{
+            bonus(row).then(() => {
+              this.onLoad(this.page);
+              this.$message({
+                type: "success",
+                message: "操作成功!"
+              });
+              done();
+            }, error => {
+              loading();
+              window.console.log(error);
+            });
+          })
+      },
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage) {
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        debugger
+        if( params.bonusDate != undefined){
+          params.beginDate = params.bonusDate[0];
+          params.endDate = params.bonusDate[1];
+          params.bonusDate = undefined
+        }
+        var _that = this;
+        this.loading = true;
+        getYesterdayData().then(res => {
+          _that.staticOption.data[0].count = res.data.data.totalAmt;
+          _that.staticOption.data[1].count = res.data.data.serviceAmt;
+          _that.staticOption.data[2].count = res.data.data.bonusAmt;
+        });
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 245 - 0
src/views/guosen/bussinessbonusstatic.vue

@@ -0,0 +1,245 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.bussinessbonusstatic_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/guosen/bussinessbonusstatic";
+  import {mapGetters} from "vuex";
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "日期",
+              prop: "date",
+              rules: [{
+                required: true,
+                message: "请输入日期",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "总充值",
+              prop: "totalAmt",
+              rules: [{
+                required: true,
+                message: "请输入总充值",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "手续费",
+              prop: "fee",
+              rules: [{
+                required: true,
+                message: "请输入手续费",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "服务费",
+              prop: "serviceAmt",
+              rules: [{
+                required: true,
+                message: "请输入服务费",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "可分配利润",
+              prop: "bonusAmt",
+              rules: [{
+                required: true,
+                message: "请输入可分配利润",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.bussinessbonusstatic_add, false),
+          viewBtn: this.vaildData(this.permission.bussinessbonusstatic_view, false),
+          delBtn: this.vaildData(this.permission.bussinessbonusstatic_delete, false),
+          editBtn: this.vaildData(this.permission.bussinessbonusstatic_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 335 - 0
src/views/guosen/bussinessdebitrequest.vue

@@ -0,0 +1,335 @@
+<template>
+  <basic-container>
+    <el-dialog  :modal-append-to-body="false" :visible.sync="debitDetailVisible" title="分佣明细" width="70%">
+      <debit ref="debit" :requestId="selectRequestId"></debit>
+    </el-dialog>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad"
+               :upload-after="uploadAfter">
+      <!-- <template slot="menuLeft">
+        <el-button type="danger"
+                   size="small"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.bussinessdebitrequest_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+      </template> -->
+      <template slot="menu" slot-scope="scope">
+        <el-button type="text"
+                   size="small"
+                   icon="el-icon-zoom-in"
+                   @click="handleDetail(scope.row)">分佣明细
+        </el-button>
+      </template>
+      <template slot="demoDownloadForm">
+
+        <el-button type="primary" @click="handleTemplate">
+          模板下载
+        </el-button>
+      </template>
+      <template slot="attachUrl" slot-scope="scope">
+
+        <el-link :href="scope.row.attachUrl" type="primary">
+          {{scope.row.attachName}}
+        </el-link>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/guosen/bussinessdebitrequest";
+  import {mapGetters} from "vuex";
+   import {getToken} from '@/util/auth';
+   import debit from "@/views/guosen/debit"
+
+  export default {
+    components:{
+      debit
+    },
+    data() {
+      return {
+        debitDetailVisible:false,
+        selectRequestId : 0,
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          saveBtn: false,
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          delBtn: false,
+          editBtn: false,
+          viewBtn: false,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "广告商id",
+              prop: "bussinessId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入广告商id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "附件",
+              prop: "attachUrl",
+              slot: true,
+              span: 24,
+              drag: true,
+              type: "upload",
+              tip: '只能上传指定模板的excel表格文件,请先下载模板并填充数据后上传',
+              action: "/api/cyzh-guosen/bussinessdebitrequest/import-excel",
+              rules: [{
+                required: true,
+                message: "请输入提交附件url",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "",
+              prop: "demoDownload",
+              span: 24,
+              slot: true,
+              hide: true,
+            },
+            {
+              label: "订单总笔数",
+              prop: "orderCount",
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入订单总笔数",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "成功的订单笔数",
+              prop: "successOrderCount",
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入成功的订单笔数",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "失败的订单笔数",
+              prop: "failOrderCount",
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入失败的订单笔数",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "手续费",
+              prop: "fee",
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入手续费",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "创建时间",
+              prop: "createTime",
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入手续费",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.bussinessdebitrequest_add, false),
+          viewBtn: this.vaildData(this.permission.bussinessdebitrequest_view, false),
+          delBtn: this.vaildData(this.permission.bussinessdebitrequest_delete, false),
+          editBtn: this.vaildData(this.permission.bussinessdebitrequest_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      uploadAfter(res, done, loading,column){
+        done()
+         this.$refs.crud.closeDialog()
+         this.onLoad(this.page,{})
+       // this.refreshChange()
+
+
+      },
+      handleDetail(row){
+        this.debitDetailVisible = true;
+        this.selectRequestId = row.id;
+        this.$nextTick(()=>{
+          this.$refs.debit.onLoad({current:1,size:10},{requestId:row.id})
+        })
+
+      },
+      handleTemplate(){
+         window.open(`/api/cyzh-guosen/bussinessdebitrequest/export-template?${this.website.tokenHeader}=${getToken()}`);
+      },
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 371 - 0
src/views/guosen/debit.vue

@@ -0,0 +1,371 @@
+<template>
+  <basic-container>
+    <el-dialog :modal-append-to-body="false" :visible.sync="debitObjectVisible" title="分佣对象" width="40%">
+      <div>
+        <span style="margin:10px;">
+          <font size="3">姓名:</font>
+        </span>
+        <span style="margin:10px;">
+          {{debitObject.receiverAccountName}}
+        </span>
+
+      </div>
+      <div>
+        <span style="margin:10px;">
+          <font size="3">
+            银行卡编码:
+          </font>
+        </span>
+        <span style="margin:10px;">
+          {{debitObject.receiverBankCode}}
+        </span>
+
+      </div>
+
+      <div>
+        <span style="margin:10px;">
+          <font size="3">
+            账户类型:
+          </font>
+        </span>
+        <span>
+          {{debitObject.bankAccountType}}
+        </span>
+      </div>
+      <div>
+        <span style="margin:10px;">
+          <font size="3">
+            银行卡号:
+          </font>
+        </span>
+        <span>
+          {{debitObject.receiverAccountNo}}
+        </span>
+      </div>
+      <div>
+        <span style="margin:10px;">
+          <font size="3">
+            分佣金额:
+          </font>
+        </span>
+        <span>
+          {{debitObject.price}}
+        </span>
+      </div>
+      <div>
+        <span style="margin:10px;">
+          <font size="3">
+            手续费:
+          </font>
+        </span>
+        <span>
+          {{debitObject.fee}}
+        </span>
+      </div>
+      <div>
+        <span style="margin:10px;">
+          <font size="3">
+            分佣状态:
+          </font>
+        </span>
+        <span>
+          {{debitObject.$status}}
+        </span>
+      </div>
+    </el-dialog>
+    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
+      :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
+      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+      @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+
+      <template slot="menu" slot-scope="scope">
+        <el-button type="text" size="small" icon="el-icon-zoom-in" @click="handleDetail(scope.row)">分佣对象
+        </el-button>
+      </template>
+    </avue-crud>
+
+
+
+  </basic-container>
+</template>
+
+<script>
+  import {
+    getList,
+    getDetail,
+    add,
+    update,
+    remove
+  } from "@/api/billrecord/bussinessdebit";
+  import {
+    mapGetters
+  } from "vuex";
+
+  export default {
+    props: {
+      requestId: {}
+    },
+    data() {
+
+      return {
+        debitObjectVisible: false,
+        debitObject: {},
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: {
+          refreshBtn: false,
+          // showHeader: false,
+          height: 'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: false,
+          selection: true,
+          dialogClickModal: false,
+          column: [{
+              label: "广告商id",
+              prop: "bussinessId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入广告商id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "扣款类型",
+              prop: "type",
+              width: 200,
+              type: "select",
+              dicData: [{
+                  label: "分佣分润",
+                  value: 1
+                },
+                {
+                  label: "曝光量收费",
+                  value: 2
+                },
+                {
+                  label: "点击量收费",
+                  value: 3
+                },
+              ],
+              rules: [{
+                required: true,
+                message: "请输入扣款类型: 1-分润 2-曝光量收费 3-点击量收费",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "扣款金额(元)",
+              prop: "price",
+              width: 200,
+              rules: [{
+                required: true,
+                message: "请输入扣款金额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "关联id: 当type=1时为分佣用户id,当type=2时为报告记录id,当type=3时为点击记录id",
+              prop: "relationId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入关联id: 当type=1时为分佣用户id,当type=2时为报告记录id,当type=3时为点击记录id",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "手续费(元)",
+              prop: "fee",
+              width: 200,
+              rules: [{
+                required: true,
+                message: "请输入手续费,当type=1时有值",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "状态",
+              prop: "status",
+              width: 200,
+              type: "select",
+              dicData: [{
+                  label: "待确认",
+                  value: 1
+                },
+                {
+                  label: "确认成功",
+                  value: 2
+                },
+                {
+                  label: "确认失败",
+                  value: 3
+                },
+              ],
+              rules: [{
+                required: true,
+                message: "请输入手续费,当type=1时有值",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "时间",
+              prop: "updateTime",
+            }
+          ]
+        },
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.bussinessdebit_add, false),
+          viewBtn: this.vaildData(true),
+          delBtn: this.vaildData(this.permission.bussinessdebit_delete, false),
+          editBtn: this.vaildData(this.permission.bussinessdebit_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      handleDetail(row) {
+        this.debitObjectVisible = true;
+        this.debitObject = row;
+      },
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage) {
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 14 - 1
src/views/guosen/ordercommission.vue

@@ -69,8 +69,19 @@
               }]
             },
             {
-              label: "佣金所属代理人id",
+              label: "佣金所属代理人",
               prop: "agenterId",
+              type: "select",
+              search: true,
+              searchLabelWidth:120,
+              dicUrl:"/api/cyzh-guosen/agenter/list?size=500",
+              dicFormatter:(res)=>{
+                return res.data.records;
+              },
+              props:{
+                label: "name",
+                value: "id"
+              },
               rules: [{
                 required: true,
                 message: "请输入佣金所属代理人id",
@@ -98,6 +109,7 @@
             {
               label: "佣金类型",
               prop: "type",
+              search: true,
               type: "select",
               dataType: "number",
               dicData: [
@@ -120,6 +132,7 @@
             {
               //-1: 取消  0:待结算 1:已结算
               label: "分佣状态",
+              search: true,
               prop: "status",
               type: "select",
               dataType: "number",

+ 581 - 5
src/views/wel/index.vue

@@ -1,11 +1,47 @@
 <template>
   <basic-container>
+    <el-dialog :modal-append-to-body="false" :visible.sync="editBussinessVisible" title="编辑资料" width="80%">
+      <avue-form v-if="editBussinessVisible" :table-loading="loading" v-model="bussiness" :option="bussinessOption" @reset-change="emptytChange" @submit="submitBussiness()">
+
+      </avue-form>
+    </el-dialog>
+    <el-dialog :modal-append-to-body="false" :visible.sync="chongzhiVisible" title="网银支付" width="30%">
+      ,<div align="center" style="font-size: 20px;color: #0099FF;margin-bottom: 20px;">充值金额</div>
+      <div align="center">
+        <span>
+          <!-- <el-input-number  size="large" placeholder="请输入充值金额" v-model="money" min="1">
+          </el-input-number> -->
+          <el-input placeholder="请输入内容" v-model="money" type="number" :min="1">
+            <template slot="prepend">RMB</template>
+          </el-input>
+        </span>
+        <div align="left" style="margin: 10px;">充值金额(大写):{{moneyChina}}</div>
+        <div align="center" style="margin: 20px;">
+          <el-button type="success" size="mini" @click="chongzhiConfirm"> 去充值</el-button>
+        </div>
+        <el-divider></el-divider>
+        <div>说明:充值后账户余额 = 本次充值金额 - 技术服务费 - 手续费
+          <div>
+            <table style="width: 100%;" border="1" class="myTable">
+              <tr v-for="(item,i) in statDatas" :key="i">
+                <td class="column">{{ item.key }}</td>
+                <td class="column">{{ item.value }}</td>
+              </tr>
+            </table>
+          </div>
+        </div>
+      </div>
+
+
+    </el-dialog>
+
     <el-card>
       <el-row :gutter="50">
         <el-col :span="24">
-          <el-card>
+          <!--  <el-card>
             {{userInfo.userName}} 欢迎回来
-          </el-card>
+          </el-card> -->
+
           <el-card header="音乐之声-基础数据统计" v-if="permission.basic_static">
             <avue-data-rotate :option="optionMusic"></avue-data-rotate>
           </el-card>
@@ -20,10 +56,10 @@
                 <div align="center" id="historyOut" style="width: 100%;height: 300px;"></div>
               </el-col>
               <el-col :span="6">
-                <div align="center"  id="todayIn" style="width: 100%;height: 300px;"></div>
+                <div align="center" id="todayIn" style="width: 100%;height: 300px;"></div>
               </el-col>
               <el-col :span="6">
-                <div align="center"  id="historyIn" style="width: 100%;height: 300px;"></div>
+                <div align="center" id="historyIn" style="width: 100%;height: 300px;"></div>
               </el-col>
             </el-row>
           </el-card>
@@ -64,12 +100,127 @@
         </el-col>
 
       </el-row>
+
+    </el-card>
+
+    <el-card v-if="permission.bussiness_screen" :span="24">
+
+      <el-row>
+        <div>
+          <el-row :gutter="50">
+            <el-col span="12">
+              <div style="background-color: #4d4dff;border-radius: 30px;">
+                <avue-avatar style="margin:20px;" :size="128" :src="bussiness.icon"></avue-avatar>
+                <span style="color: white;">{{bussiness.name}}</span>
+                <span style="color: white;margin-left: 40px;">API密钥:</span> <span style="color: white;margin-left:10px">******</span>
+                <span style="margin-left: 10px;">
+                  <el-tooltip content="API密钥用于接口对接,请谨慎保存" placement="bottom" effect="dark">
+                    <el-button type="primary" size="mini" @click="doCopy()">
+                      复制
+                    </el-button>
+                  </el-tooltip>
+                </span>
+                <span style="margin-left: 30px;background-color: #4d4dff;">
+                  <el-link target="_blank" type="success" :href="bussiness.apiFilePath">Api文档下载(打开需输入密钥)</el-link>
+                  </span>
+                <div>
+                  <el-button style="margin-left:50px;" type="primary" class="button" @click="editBussiness">编辑资料</el-button>
+                  <span style="color: white;margin-left: 40px;">服务费率(千分比):{{bussiness.serviceRate}}</span>
+                </div>
+                <div style="margin-left: 20px;margin-top:30px;">
+                  <span style="color: white;">账户余额</span>
+
+                </div>
+                <div style="margin-left: 20px;margin-top:10px;padding-bottom: 20px;">
+                  <span>
+                    <avue-avatar style="margin-bottom: 30px;" src="/img/bg/rmb.png"></avue-avatar>
+                  </span>
+                  <span style="font-size:60px;margin-left:20px;margin-bottom: 20px;color:white;">
+                    {{bussiness.remain}}
+                  </span>
+                </div>
+
+              </div>
+            </el-col>
+            <el-col span="12" height="400px">
+              <el-row :gutter="50">
+                <el-col span="12">
+                  <div style="background-color: #4d4dff;border-radius: 30px;" align="center" @click="chongzhi">
+                    <img style="margin:10px;" float="center" :size="30" src="/img/bg/qb.png" />
+                    <div style="color: white;padding-bottom: 10px;">
+                      账户充值
+                    </div>
+                  </div>
+                </el-col>
+                <el-col span="12">
+                  <div style="background-color: #ff5050;border-radius: 30px;" align="center" @click="toMyOrder">
+                    <img style="margin:10px;" float="center" :size="30" src="/img/bg/zd.png" />
+                    <div style="color: white;padding-bottom: 10px;">
+                      我的账单
+                    </div>
+                  </div>
+                </el-col>
+              </el-row>
+              <el-row :gutter="50">
+                <el-col span="12">
+                  <div style="background-color:  #d633ff;border-radius: 30px;" align="center" @click="toMyDebit">
+                    <img style="margin:10px;" float="center" :size="30" src="/img/bg/fxfr.png" />
+                    <div style="color: white;padding-bottom: 10px;">
+                      分销分润
+                    </div>
+                  </div>
+                </el-col>
+                <el-col span="12">
+                  <div style="background-color: #8080ff;border-radius: 30px;" align="center">
+                    <img style="margin:10px;" float="center" :size="30" src="/img/bg/sm.png" />
+                    <div style="color: white;padding-bottom: 10px;">
+                      计费说明
+                    </div>
+                  </div>
+                </el-col>
+              </el-row>
+            </el-col>
+          </el-row>
+        </div>
+      </el-row>
+
+      <el-row :gutter="50">
+        <el-col span="12">
+          <el-card style="background-color: #f2f2f2;border-radius: 30px;">
+            <div slot="header">
+              <span>推广数据</span>
+            </div>
+            <avue-data-display :option="tgOption"></avue-data-display>
+          </el-card>
+        </el-col>
+        <el-col span="12">
+          <el-card style="background-color: #f2f2f2;border-radius: 30px;">
+            <div slot="header">
+              <span>产品销量</span>
+            </div>
+            <avue-data-display :option="tgOption"></avue-data-display>
+          </el-card>
+        </el-col>
+      </el-row>
     </el-card>
+
   </basic-container>
 </template>
 <script>
   import request from '@/router/axios';
   import echarts from "echarts";
+  import {
+    getList as getParams
+  } from "@/api/system/param";
+  import {
+    add as addBillrecord,
+    chongzhi,
+
+  } from "@/api/billrecord/billrecord";
+  import {
+    getByAccount,
+    update
+  } from "@/api/guosen/bussiness"
   import {
     mapGetters
   } from "vuex";
@@ -77,6 +228,38 @@
 
     data() {
       return {
+        loading: true,
+        editBussinessVisible: false,
+        moneyChina: "壹拾万元整",
+        bussiness: {},
+        statDatas: [{
+            key: "技术服务费率",
+            value: 0
+          },
+          {
+            key: "技术服务费",
+            value: 0
+          },
+          {
+            key: "充值金额",
+            value: 0
+          },
+          {
+            key: "可用余额",
+            value: 0
+          }
+
+        ],
+        yibaoOrder: {
+
+        },
+        billrecord: {
+          payStatus: 0,
+          type: 5
+        },
+        money: 100000,
+        serviceRate: 0.005,
+        chongzhiVisible: false,
         buttonDay: "primary",
         buttonMonth: "",
         selectDate: [],
@@ -85,6 +268,206 @@
         query: {
           staticType: 1
         },
+        tgOption: {
+          span: 8,
+          data: [{
+              count: "66.6万",
+              title: '总曝光量',
+            },
+            {
+              count: '88.8万',
+              title: '总点击率',
+
+            },
+            {
+              count: '688万',
+              title: '总访问量',
+
+            },
+            {
+              count: '6666',
+              title: '今日曝光量',
+
+            },
+            {
+              count: '6666',
+              title: '今日点击率',
+
+            },
+            {
+              count: '6666',
+              title: '今日访问量',
+
+            }
+          ]
+        },
+
+        bussiness_option2: {
+          span: 12,
+          data: [{
+            click: function(item) {
+              alert(JSON.stringify(item));
+            },
+            count: '150',
+            title: '充值',
+            icon: 'el-icon-warning',
+            color: 'rgb(49, 180, 141)'
+          }, {
+            click: function(item) {
+              alert(JSON.stringify(item));
+            },
+            count: '53%',
+            title: '跳出率',
+            icon: 'el-icon-view',
+            color: '#00a65a'
+          }, {
+            click: function(item) {
+              alert(JSON.stringify(item));
+            },
+            count: '44',
+            title: '用户注册数',
+            icon: 'el-icon-setting',
+            color: '#f39c12'
+          }]
+        },
+        bussinessOption: {
+          height: 'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          dialogWidth: "30%",
+          column: [{
+              label: "商户号名称",
+              labelWidth: 130,
+              prop: "name",
+              span: 24,
+              rules: [{
+                required: true,
+                message: "请输入商户号名称",
+                trigger: "blur"
+              }]
+            },
+
+
+
+            {
+              label: "api回调地址",
+              prop: "recallUrl",
+              labelWidth: 130,
+              span: 24,
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请输入关联账号的密码",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "广告图",
+              prop: "icon",
+              labelWidth: 130,
+              span: 12,
+              type: "upload",
+              listType: "picture-img",
+              action: '/api/putObject',
+              propsHttp: {
+                url: 'data'
+              },
+              rules: [{
+                required: false,
+                message: "请输入营业执照",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "营业执照",
+              prop: "businessLicense",
+              labelWidth: 130,
+              span: 12,
+              type: "upload",
+              listType: "picture-img",
+              action: '/api/putObject',
+              propsHttp: {
+                url: 'data'
+              },
+              rules: [{
+                required: false,
+                message: "请输入营业执照",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "税务登记证",
+              prop: "taxAffairsLicense",
+              labelWidth: 130,
+              type: "upload",
+              listType: "picture-img",
+              action: '/api/putObject',
+              propsHttp: {
+                url: 'data'
+              },
+              span: 12,
+              rules: [{
+                required: false,
+                message: "请输入税务登记证",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "组织机构代码证",
+              prop: "organizationCodeLicense",
+              labelWidth: 130,
+              span: 12,
+              type: "upload",
+              listType: "picture-img",
+              action: '/api/putObject',
+              propsHttp: {
+                url: 'data'
+              },
+              rules: [{
+                required: false,
+                message: "请输入关联账号的密码",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "关联账号的id",
+              prop: "accountId",
+              hide: true,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请输入关联账号的id",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        bussiness_option1: {
+          height: "500px",
+          span: 24,
+          data: [{
+              click: function(item) {
+                alert(JSON.stringify(item));
+              },
+
+              title: '分类统计',
+              subtitle: '实时',
+              count: 7993,
+              allcount: 10222,
+              text: '当前分类总记录数',
+              color: 'rgb(27, 201, 142)',
+              key: '类'
+            },
+
+          ]
+        },
         option: {
           span: 6,
           data: [{
@@ -292,7 +675,7 @@
             }
           }]
         },
-optionHistoryIn: {
+        optionHistoryIn: {
           title: {
             text: '历史收入来源',
 
@@ -336,7 +719,22 @@ optionHistoryIn: {
       ...mapGetters(["permission", "userInfo"])
 
     },
+    watch: {
+      "money"() {
+
+        if (this.money < 0) {
+          this.money = 1;
+        }
+        this.moneyChina = this.convertCurrency(this.money)
+        this.statDatas[0].value = this.bussiness.serviceRate /1000
+        this.statDatas[1].value = this.money * this.bussiness.serviceRate /1000
+        this.statDatas[2].value = parseFloat(this.money)
+        this.statDatas[3].value = parseFloat(this.statDatas[2].value) - parseFloat(this.statDatas[1].value)
+      },
+    },
     mounted() {
+      var _that = this;
+
       // this.type = this.tabsOption.column[0];
       let befDate = new Date();
       let byear = befDate.getFullYear();
@@ -344,12 +742,171 @@ optionHistoryIn: {
       let bday = befDate.getDate();
       let startTime = `${byear}-${bmonth}-${bday}`;
       this.selectDate = [startTime, startTime];
+
       this.getData();
       this.getOrderCommissionData();
       this.getAccoutStatic()
 
+
+
+      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))
+      })
+
     },
     methods: {
+      submitBussiness(){
+        update(this.bussiness).then(res=>{
+          this.$message({
+            type: "success",
+            message: res.data.msg
+          });
+          this.editBussinessVisible = false;
+        })
+
+      },
+      convertCurrency(money) {
+        debugger
+        //汉字的数字
+        var cnNums = new Array('零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖');
+        //基本单位
+        var cnIntRadice = new Array('', '拾', '佰', '仟');
+        //对应整数部分扩展单位
+        var cnIntUnits = new Array('', '万', '亿', '兆');
+        //对应小数部分单位
+        var cnDecUnits = new Array('角', '分', '毫', '厘');
+        //整数金额时后面跟的字符
+        var cnInteger = '整';
+        //整型完以后的单位
+        var cnIntLast = '元';
+        //最大处理的数字
+        var maxNum = 999999999999999.9999;
+        //金额整数部分
+        var integerNum;
+        //金额小数部分
+        var decimalNum;
+        //输出的中文金额字符串
+        var chineseStr = '';
+        //分离金额后用的数组,预定义
+        var parts;
+        if (money == '') {
+          return '';
+        }
+        money = parseFloat(money);
+        if (money >= maxNum) {
+          //超出最大处理数字
+          return '';
+        }
+        if (money == 0) {
+          chineseStr = cnNums[0] + cnIntLast + cnInteger;
+          return chineseStr;
+        }
+        //转换为字符串
+        money = money.toString();
+        if (money.indexOf('.') == -1) {
+          integerNum = money;
+          decimalNum = '';
+        } else {
+          parts = money.split('.');
+          integerNum = parts[0];
+          decimalNum = parts[1].substr(0, 4);
+        }
+        //获取整型部分转换
+        if (parseInt(integerNum, 10) > 0) {
+          var zeroCount = 0;
+          var IntLen = integerNum.length;
+          for (var i = 0; i < IntLen; i++) {
+            var n = integerNum.substr(i, 1);
+            var p = IntLen - i - 1;
+            var q = p / 4;
+            var m = p % 4;
+            if (n == '0') {
+              zeroCount++;
+            } else {
+              if (zeroCount > 0) {
+                chineseStr += cnNums[0];
+              }
+              //归零
+              zeroCount = 0;
+              chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
+            }
+            if (m == 0 && zeroCount < 4) {
+              chineseStr += cnIntUnits[q];
+            }
+          }
+          chineseStr += cnIntLast;
+        }
+        //小数部分
+        if (decimalNum != '') {
+          var decLen = decimalNum.length;
+          for (var i = 0; i < decLen; i++) {
+            var n = decimalNum.substr(i, 1);
+            if (n != '0') {
+              chineseStr += cnNums[Number(n)] + cnDecUnits[i];
+            }
+          }
+        }
+        if (chineseStr == '') {
+          chineseStr += cnNums[0] + cnIntLast + cnInteger;
+        } else if (decimalNum == '') {
+          chineseStr += cnInteger;
+        }
+        return chineseStr;
+      },
+
+      editBussiness() {
+        this.editBussinessVisible = true;
+
+      },
+      doCopy() {
+        this.$copyText(this.bussiness.secret)
+        this.$message.success("复制成功")
+      },
+      toMyDebit() {
+        this.$router.push('/guosen/bussinessdebitrequest');
+      },
+      toMyOrder() {
+        this.$router.push('/bussiness/order');
+      },
+      guid() {
+        var str = "abcdefghijklmnopqrstuvwxyz0123456789"; // 可以作为常量放到random外面
+        var result = "";
+        for (var i = 0; i < 32; i++) {
+          result += str[parseInt(Math.random() * str.length)];
+        }
+        return result;
+
+      },
+      chongzhi() {
+        this.chongzhiVisible = true;
+      },
+      chongzhiConfirm() {
+
+        this.billrecord.price = this.money;
+        this.billrecord.orderId = this.guid();
+        this.billrecord.bussinessFee = this.statDatas[1].value
+        //易宝订单
+        this.yibaoOrder.orderId = this.billrecord.orderId; //商户请求号
+        debugger
+        this.yibaoOrder.orderAmount = this.money; //充值金额
+        // this.yibaoOrder.payType = "B2B"; //"B2C:个人网银" "B2B:企业网银
+        this.yibaoOrder.goodsName = "充值"
+        this.yibaoOrder.notifyUrl = ",,,"
+        // this.yibaoOrder.bankCode = "ABC,ICBC,BOC,CMBCHINA,SZPA,CCB"; //银行编码
+        this.yibaoOrder.redirectUrl = "https://music.nanyue6688.com/test/#/wel/index";
+        addBillrecord(this.billrecord).then(res => {
+          chongzhi(this.yibaoOrder).then(res => {
+            location.href = res.data.data.payUrl;
+
+            console.log(JSON.stringify(res))
+          })
+        })
+      },
       //按日
       handleDay() {
         this.buttonDay = "primary";
@@ -514,3 +1071,22 @@ optionHistoryIn: {
 
   }
 </script>
+
+<style>
+  .button {
+    padding: 10;
+    float: center;
+  }
+
+  .image {
+    width: 35%;
+    display: block;
+    border-radius: 65px;
+  }
+
+  .myTable {
+    border-collapse: collapse;
+    margin: 0 auto;
+    text-align: center;
+  }
+</style>