ソースを参照

Merge branch 'master' of http://192.168.1.218:3000/lianghanqiang/ldt-manger-web

lianghanqiang 4 年 前
コミット
a615771680

BIN
public/img/customize/bg-admin-container.png


BIN
public/img/customize/bg-admin.png


BIN
public/img/customize/bg-agent.png


BIN
public/img/customize/bg-mall-container.png


BIN
public/img/customize/bg-mall.png


BIN
public/img/customize/logo.png


+ 48 - 0
src/api/census/census.js

@@ -8,6 +8,14 @@ export const getTenantCensusCount = (params) => {
   })
   })
 }
 }
 
 
+export const getAgentTenantCensusCount = (params) => {
+  return request({
+    url: '/api/census/getAgentTenantCensusCount',
+    method: 'get',
+    params: params
+  })
+}
+
 export const getTenantPlatformBills = (params) => {
 export const getTenantPlatformBills = (params) => {
   return request({
   return request({
     url: '/api/census/getTenantPlatformBills',
     url: '/api/census/getTenantPlatformBills',
@@ -16,6 +24,14 @@ export const getTenantPlatformBills = (params) => {
   })
   })
 }
 }
 
 
+export const getTenantAgentBills = (params) => {
+  return request({
+    url: '/api/census/getTenantAgentBills',
+    method: 'get',
+    params: params
+  })
+}
+
 export const getTenantTodayCensusCount = (params) => {
 export const getTenantTodayCensusCount = (params) => {
   return request({
   return request({
     url: '/api/census/getTenantTodayCensusCount',
     url: '/api/census/getTenantTodayCensusCount',
@@ -24,6 +40,14 @@ export const getTenantTodayCensusCount = (params) => {
   })
   })
 }
 }
 
 
+export const getAgentTenantTodayCensusCount = (params) => {
+  return request({
+    url: '/api/census/getAgentTenantTodayCensusCount',
+    method: 'get',
+    params: params
+  })
+}
+
 export const getTenantAddTrend = (params) => {
 export const getTenantAddTrend = (params) => {
   return request({
   return request({
     url: '/api/census/getTenantAddTrend',
     url: '/api/census/getTenantAddTrend',
@@ -32,6 +56,14 @@ export const getTenantAddTrend = (params) => {
   })
   })
 }
 }
 
 
+export const getAgentTenantAddTrend = (params) => {
+  return request({
+    url: '/api/census/getAgentTenantAddTrend',
+    method: 'get',
+    params: params
+  })
+}
+
 export const getAccountInfo = (params) => {
 export const getAccountInfo = (params) => {
   return request({
   return request({
     url: '/api/census/getMerchantInfo',
     url: '/api/census/getMerchantInfo',
@@ -39,3 +71,19 @@ export const getAccountInfo = (params) => {
     params: params
     params: params
   })
   })
 }
 }
+
+export const rechargeSubmit = (row) => {
+  return request({
+    url: '/api/ldt_mall/mall/recharge',
+    method: 'post',
+    data: row
+  })
+}
+
+export const getAgentInfo = (params) => {
+  return request({
+    url: '/api/census/getAgentInfo',
+    method: 'get',
+    params: params
+  })
+}

+ 17 - 1
src/api/ldt_mall/mall.js

@@ -63,4 +63,20 @@ export const downloadSign = (row) => {
     method: 'get',
     method: 'get',
     params: row
     params: row
   })
   })
-}
+}
+
+export const queryProductFee = (params) => {
+  return request({
+    url: '/api/mall/yeepay/product/fee/query',
+    method: 'get',
+    params: params
+  })
+}
+
+export const modifyProductFee = (params) => {
+  return request({
+    url: '/api/mall/yeepay/product/fee/modify',
+    method: 'post',
+    params: params
+  })
+}

+ 27 - 0
src/api/ldt_shop/shop.js

@@ -12,6 +12,18 @@ export const getList = (current, size, params) => {
   })
   })
 }
 }
 
 
+export const getAgentShopList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_shop/shop/getAgentShopList',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
 export const getDetail = (id) => {
 export const getDetail = (id) => {
   return request({
   return request({
     url: '/api/ldt_shop/shop/detail',
     url: '/api/ldt_shop/shop/detail',
@@ -48,3 +60,18 @@ export const update = (row) => {
   })
   })
 }
 }
 
 
+export const queryProductFee = (params) => {
+  return request({
+    url: '/api/shop/yeepay/product/fee/query',
+    method: 'get',
+    params: params
+  })
+}
+
+export const modifyProductFee = (params) => {
+  return request({
+    url: '/api/shop/yeepay/product/fee/modify',
+    method: 'post',
+    params: params
+  })
+}

+ 6 - 6
src/lang/zh.js

@@ -1,17 +1,17 @@
 export default {
 export default {
   tip: '提示',
   tip: '提示',
-  title: 'Saber企业级开发平台',
+  title: '欢迎登录联兑通平台',
   logoutTip: '退出系统, 是否继续?',
   logoutTip: '退出系统, 是否继续?',
   submitText: '确定',
   submitText: '确定',
   cancelText: '取消',
   cancelText: '取消',
   search: '请输入搜索内容',
   search: '请输入搜索内容',
   menuTip: '没有发现菜单',
   menuTip: '没有发现菜单',
   wel: {
   wel: {
-    info: '早安,Smallwei,Avuex一款超乎你想象的框架!',
-    dept: '我是avue团队下的一个部门-哈皮部门-哈皮职位',
-    team: '团队内排名',
-    project: '项目访问',
-    count: '项目数',
+    info: '',
+    dept: '',
+    team: '',
+    project: '',
+    count: '',
     data: {
     data: {
       subtitle: '实时',
       subtitle: '实时',
       column1: '分类统计',
       column1: '分类统计',

+ 161 - 0
src/page/login/customize/indexCustomize.vue

@@ -0,0 +1,161 @@
+<template>
+  <div class="login-container"
+       ref="login"
+       @keyup.enter.native="handleLogin" :style="customize.loginContainer">
+    <top-color v-show="false"></top-color>
+    <div class="login-weaper-customize animated bounceInDown" :style="customize.loginWeaperCustomize">
+      <el-card class="box-card" :style="customize.loginCardCustomize">
+        <userlogin-customize></userlogin-customize>
+      </el-card>
+    </div>
+  </div>
+</template>
+<script>
+  import userloginCustomize from "./userloginCustomize";
+  import codeLogin from "../codelogin";
+  import thirdLogin from "../thirdlogin";
+  import {mapGetters} from "vuex";
+  import {dateFormat} from "@/util/date";
+  import {validatenull} from "@/util/validate";
+  import topLang from "@/page/index/top/top-lang";
+  import topColor from "@/page/index/top/top-color";
+  import {getQueryString, getTopUrl} from "@/util/util";
+
+  export default {
+    name: "login",
+    components: {
+      userloginCustomize,
+      codeLogin,
+      thirdLogin,
+      topLang,
+      topColor
+    },
+    data() {
+      return {
+        time: "",
+        activeName: "user",
+        socialForm: {
+          tenantId: "000000",
+          source: "",
+          code: "",
+          state: "",
+        },
+        customize:{
+          loginContainer:{
+            backgroundImage:"",
+          },
+          loginWeaperCustomize:{
+            backgroundImage: "",
+            width: "1501px",
+            height:"829px",
+          },
+          loginCardCustomize:{
+            width:"700px",
+            height: "790px"
+          }
+        }
+      };
+    },
+    watch: {
+      $route() {
+        this.handleLogin();
+      }
+    },
+    created() {
+      this.initLoginSytle();
+      this.handleLogin();
+      this.getTime();
+    },
+    computed: {
+      ...mapGetters(["website", "tagWel"])
+    },
+    props: [],
+    methods: {
+      initLoginSytle(){
+        let tanentType = getTopUrl();
+        if(tanentType!==undefined){
+          tanentType = tanentType.toLocaleLowerCase();
+        }
+        if(tanentType==="https://mall.ldt.com"){ //商场
+          this.customize.loginContainer.backgroundImage = "url(/img/customize/bg-mall.png)";
+          this.customize.loginWeaperCustomize.backgroundImage = "url(/img/customize/bg-mall-container.png)";
+        }else if(tanentType==="https://agent.ldt.com"){ //代理
+          this.customize.loginContainer.background = "url('/img/customize/logo.png') 80% 10%/200px 70px no-repeat,url(/img/customize/bg-agent.png) center/cover no-repeat";
+          this.customize.loginWeaperCustomize.height = "650px";
+          this.customize.loginWeaperCustomize.backgroundImage = "none";
+          this.customize.loginCardCustomize.width = "600px";
+          this.customize.loginCardCustomize.height = "650px";
+        }else{ //平台
+          this.customize.loginContainer.backgroundImage = "url(/img/customize/bg-admin.png)";
+          this.customize.loginWeaperCustomize.backgroundImage = "url(/img/customize/bg-admin-container.png)";
+        }
+      },
+      getTime() {
+        setInterval(() => {
+          this.time = dateFormat(new Date());
+        }, 1000);
+      },
+      handleLogin() {
+        const topUrl = getTopUrl();
+        const redirectUrl = "/oauth/redirect/";
+        this.socialForm.source = getQueryString("source");
+        this.socialForm.code = getQueryString("code");
+        this.socialForm.state = getQueryString("state");
+        if (validatenull(this.socialForm.source) && topUrl.includes(redirectUrl)) {
+          let source = topUrl.split("?")[0];
+          source = source.split(redirectUrl)[1];
+          this.socialForm.source = source;
+        }
+        if (!validatenull(this.socialForm.source) && !validatenull(this.socialForm.code) && !validatenull(this.socialForm.state)) {
+          const loading = this.$loading({
+            lock: true,
+            text: '第三方系统登录中,请稍后。。。',
+            spinner: "el-icon-loading"
+          });
+          this.$store.dispatch("LoginBySocial", this.socialForm).then(() => {
+            window.location.href = topUrl.split(redirectUrl)[0];
+            this.$router.push({path: this.tagWel.value});
+            loading.close();
+          }).catch(() => {
+            loading.close();
+          });
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss">
+  @import "@/styles/login.scss";
+
+  //以下自定义样式
+  .login-container {
+    display: flex;
+    align-items: center;
+    position: relative;
+    width: 100%;
+    height: 100%;
+    margin: 0 auto;
+    background-size: cover,cover;
+    background-position: center,top;
+    background-repeat: no-repeat,no-repeat;
+  }
+
+  .login-weaper-customize{
+    margin: 0 auto;
+    background-size: 100% 100%;
+    background-position: center center;
+    background-repeat: no-repeat;
+    border-radius: 20px;
+
+    .el-input-group__append {
+      border: none;
+    }
+
+    .box-card{
+      float: right;
+      box-shadow: 15px 20px 49px 0px rgba(18, 105, 212, 0.2);
+      border-radius: 20px;
+    }
+  }
+</style>

+ 333 - 0
src/page/login/customize/userloginCustomize.vue

@@ -0,0 +1,333 @@
+<template>
+  <div>
+    <el-form class="login-form"
+             status-icon
+             :rules="loginRules"
+             ref="loginForm"
+             :model="loginForm"
+             label-width="0px">
+      <el-form-item>
+        <el-image src="/img/customize/logo.png" draggable="false" v-if="customize.logo"></el-image>
+      </el-form-item>
+      <el-form-item>
+        <h1 style="margin: 0">欢迎回来</h1>
+        <p style="width: 147px;height: 17px;font-size: 0.5rem;font-family: Source Han Sans SC;font-weight: bold;color: #646464;opacity: 0.7;">{{customize.tip}}</p>
+      </el-form-item>
+      <el-form-item v-if="tenantMode" prop="tenantId">
+        <p class="form-label">商编</p>
+        <el-input size="small"
+                  @keyup.enter.native="handleLogin"
+                  v-model="loginForm.tenantId"
+                  auto-complete="off"
+                  :placeholder="$t('login.tenantId')">
+          <!--        <i slot="prefix" class="icon-quanxian"/>-->
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="username">
+        <p class="form-label">账号</p>
+        <el-input size="small"
+                  @keyup.enter.native="handleLogin"
+                  v-model="loginForm.username"
+                  auto-complete="off"
+                  :placeholder="$t('login.username')">
+          <!--        <i slot="prefix" class="icon-yonghu"/>-->
+        </el-input>
+      </el-form-item>
+      <el-form-item prop="password">
+        <p class="form-label">密码</p>
+        <el-input size="small"
+                  @keyup.enter.native="handleLogin"
+                  :type="passwordType"
+                  v-model="loginForm.password"
+                  auto-complete="off"
+                  :placeholder="$t('login.password')">
+          <i class="el-icon-view el-input__icon" slot="suffix" @click="showPassword"/>
+          <!--        <i slot="prefix" class="icon-mima"/>-->
+        </el-input>
+      </el-form-item>
+      <el-form-item v-if="this.website.captchaMode" prop="code">
+        <el-row :span="24">
+          <el-col :span="16">
+            <el-input size="small"
+                      @keyup.enter.native="handleLogin"
+                      v-model="loginForm.code"
+                      auto-complete="off"
+                      :placeholder="$t('login.code')">
+              <i slot="prefix" class="icon-yanzhengma"/>
+            </el-input>
+          </el-col>
+          <el-col :span="8">
+            <div class="login-code">
+              <img :src="loginForm.image" class="login-code-img" @click="refreshCode"/>
+            </div>
+          </el-col>
+        </el-row>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary"
+                   size="small"
+                   @click.native.prevent="handleLogin"
+                   class="login-submit">立即登录
+        </el-button>
+      </el-form-item>
+      <el-dialog title="用户信息选择"
+                 append-to-body
+                 :visible.sync="userBox"
+                 width="350px">
+        <avue-form :option="userOption" v-model="userForm" @submit="submitLogin"/>
+      </el-dialog>
+    </el-form>
+  </div>
+</template>
+
+<script>
+  import {mapGetters} from "vuex";
+  import {info} from "@/api/system/tenant";
+  import {getCaptcha} from "@/api/user";
+  import {getTopUrl} from "@/util/util";
+
+  export default {
+    name: "userlogin",
+    data() {
+      return {
+        customize:{
+          logo: true,
+          tip:"",
+        },
+        logo: false,
+        tenantMode: this.website.tenantMode,
+        loginForm: {
+          //租户ID
+          tenantId: "000000",
+          //部门ID
+          deptId: "",
+          //角色ID
+          roleId: "",
+          //用户名
+          username: "admin",
+          //密码
+          password: "admin",
+          //账号类型
+          type: "account",
+          //验证码的值
+          code: "",
+          //验证码的索引
+          key: "",
+          //预加载白色背景
+          image: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
+        },
+        loginRules: {
+          tenantId: [
+            {required: false, message: "请输入租户ID", trigger: "blur"}
+          ],
+          username: [
+            {required: true, message: "请输入用户名", trigger: "blur"}
+          ],
+          password: [
+            {required: true, message: "请输入密码", trigger: "blur"},
+            {min: 1, message: "密码长度最少为6位", trigger: "blur"}
+          ]
+        },
+        passwordType: "password",
+        userBox: false,
+        userForm: {
+          deptId: '',
+          roleId: ''
+        },
+        userOption: {
+          labelWidth: 70,
+          submitBtn: true,
+          emptyBtn: false,
+          submitText: '登录',
+          column: [
+            {
+              label: '部门',
+              prop: 'deptId',
+              type: 'select',
+              props: {
+                label: 'deptName',
+                value: 'id'
+              },
+              dicUrl: '/api/blade-system/dept/select',
+              span: 24,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请选择部门",
+                trigger: "blur"
+              }],
+            },
+            {
+              label: '角色',
+              prop: 'roleId',
+              type: 'select',
+              props: {
+                label: 'roleName',
+                value: 'id'
+              },
+              dicUrl: '/api/blade-system/role/select',
+              span: 24,
+              display: false,
+              rules: [{
+                required: true,
+                message: "请选择角色",
+                trigger: "blur"
+              }],
+            },
+          ]
+        }
+      };
+    },
+    created() {
+      this.initLoginSytle();
+      this.getTenant();
+      this.refreshCode();
+    },
+    mounted() {
+    },
+    watch: {
+      'loginForm.deptId'() {
+        const column = this.findObject(this.userOption.column, "deptId");
+        if (this.loginForm.deptId.includes(",")) {
+          column.dicUrl = `/api/blade-system/dept/select?deptId=${this.loginForm.deptId}`;
+          column.display = true;
+        } else {
+          column.dicUrl = '';
+        }
+      },
+      'loginForm.roleId'() {
+        const column = this.findObject(this.userOption.column, "roleId");
+        if (this.loginForm.roleId.includes(",")) {
+          column.dicUrl = `/api/blade-system/role/select?roleId=${this.loginForm.roleId}`;
+          column.display = true;
+        } else {
+          column.dicUrl = '';
+        }
+      }
+    },
+    computed: {
+      ...mapGetters(["tagWel", "userInfo"])
+    },
+    props: [],
+    methods: {
+      initLoginSytle(){
+        let tanentType = getTopUrl();
+        if(tanentType!==undefined){
+          tanentType = tanentType.toLocaleLowerCase();
+        }
+        if(tanentType==="https://mall.ldt.com"){
+          this.customize.logo = true;
+          this.customize.tip = "商户更旺场更高效";
+        }else if(tanentType==="https://agent.ldt.com"){
+          this.customize.logo = false;
+          this.customize.tip = "消费更实惠更便捷";
+        }else{
+          this.customize.logo = true;
+          this.customize.tip = "全面对接数字时代";
+        }
+      },
+      refreshCode() {
+        if (this.website.captchaMode) {
+          getCaptcha().then(res => {
+            const data = res.data;
+            this.loginForm.key = data.key;
+            this.loginForm.image = data.image;
+          })
+        }
+      },
+      showPassword() {
+        this.passwordType === ""
+          ? (this.passwordType = "password")
+          : (this.passwordType = "");
+      },
+      submitLogin (form, done) {
+        if (form.deptId !== '') {
+          this.loginForm.deptId = form.deptId;
+        }
+        if (form.roleId !== '') {
+          this.loginForm.roleId = form.roleId;
+        }
+        this.handleLogin();
+        done();
+      },
+      handleLogin() {
+        this.$refs.loginForm.validate(valid => {
+          if (valid) {
+            const loading = this.$loading({
+              lock: true,
+              text: '登录中,请稍后。。。',
+              spinner: "el-icon-loading"
+            });
+            this.$store.dispatch("LoginByUsername", this.loginForm).then(() => {
+              if (this.website.switchMode) {
+                const deptId = this.userInfo.dept_id;
+                const roleId = this.userInfo.role_id;
+                if (deptId.includes(",") || roleId.includes(",")) {
+                  this.loginForm.deptId = deptId;
+                  this.loginForm.roleId = roleId;
+                  this.userBox = true;
+                  loading.close();
+                  return false;
+                }
+              }
+              this.$router.push({path: this.tagWel.value});
+              loading.close();
+            }).catch(() => {
+              loading.close();
+              this.refreshCode();
+            });
+          }
+        });
+      },
+      getTenant() {
+        let domain = getTopUrl();
+        // 临时指定域名,方便测试
+        //domain = "https://bladex.vip";
+        info(domain).then(res => {
+          const data = res.data;
+          if (data.success && data.data.tenantId) {
+            this.tenantMode = false;
+            this.loginForm.tenantId = data.data.tenantId;
+            // this.$parent.$refs.login.style.backgroundImage = `url(${data.data.backgroundUrl})`;
+          }
+        })
+      }
+    }
+  };
+</script>
+
+<style lang="scss">
+.login-form{
+  padding: 50px;
+
+  .el-input__inner{
+    padding-left: 0;
+    padding-bottom: 0 !important;
+    font-size: 0.5rem;
+    font-family: Source Han Sans SC;
+    font-weight: bold;
+    color: #353535;;
+  }
+}
+.form-label{
+  padding-left: 5px;
+  width: 46px;
+  height: 22px;
+  font-family: Source Han Sans SC;
+  font-weight: bold;
+  color: #353535;
+  opacity: 0.7;
+}
+.login-submit{
+  width: 268px;
+  height: 51px;
+  background-color: #FF9D32 !important;
+  color:#FFFFFF !important;
+  border-radius: 24px;
+  border: 0px solid white !important;
+}
+
+.login-submit:hover{
+  background-color: rgb(103, 177, 255) !important;
+}
+</style>

+ 10 - 10
src/router/page/index.js

@@ -1,16 +1,16 @@
 import Layout from '@/page/index/'
 import Layout from '@/page/index/'
 
 
 export default [{
 export default [{
-  path: '/login',
-  name: '登录页',
-  component: () =>
-    import( /* webpackChunkName: "page" */ '@/page/login/index'),
-  meta: {
-    keepAlive: true,
-    isTab: false,
-    isAuth: false
-  }
-},
+    path: '/login',
+    name: '登录页',
+    component: () =>
+      import( /* webpackChunkName: "page" */ '@/page/login/customize/indexCustomize.vue'),
+    meta: {
+      keepAlive: true,
+      isTab: false,
+      isAuth: false
+    }
+  },
   {
   {
     path: '/lock',
     path: '/lock',
     name: '锁屏页',
     name: '锁屏页',

+ 82 - 57
src/router/views/index.js

@@ -1,4 +1,5 @@
 import Layout from '@/page/index/'
 import Layout from '@/page/index/'
+import {getStore} from '@/util/store'
 
 
 export default [{
 export default [{
   path: '/wel',
   path: '/wel',
@@ -10,8 +11,19 @@ export default [{
     meta: {
     meta: {
       i18n: 'dashboard'
       i18n: 'dashboard'
     },
     },
-    component: () =>
-      import( /* webpackChunkName: "views" */ '@/views/wel/index')
+    component: () => {
+      const userInfo = getStore({name: 'userInfo'}) || '';
+      const tenantType = userInfo?userInfo.detail.tenantType:'';
+      if (tenantType === "ADMIN") {
+        return import( /* webpackChunkName: "views" */ '@/views/wel/index')
+      } else if (tenantType === "AGENT") {
+        return import( /* webpackChunkName: "views" */ '@/views/wel/agentIndex')
+      } else if (tenantType === "MALL") {
+        return import( /* webpackChunkName: "views" */ '@/views/wel/mallIndex')
+      } else {
+        return import( /* webpackChunkName: "views" */ '@/views/wel/index')
+      }
+    }
   }, {
   }, {
     path: 'dashboard',
     path: 'dashboard',
     name: '控制台',
     name: '控制台',
@@ -74,60 +86,73 @@ export default [{
     component: () =>
     component: () =>
       import( /* webpackChunkName: "views" */ '@/views/system/userinfo')
       import( /* webpackChunkName: "views" */ '@/views/system/userinfo')
   }]
   }]
-}, 
-{
-  path: '/work/process/shop',
-  component: Layout,
-  children: [{
-    path: 'handle/:processInstanceId/:businessId',
-    name: '商户审核',
-    meta: {
-      i18n: 'work'
-    },
-    component: () =>
-      import( /* webpackChunkName: "views" */ '@/views/ldt_shop/handleShopAudit')
-  }]
-},
-{
-  path: '/work/process/activity',
-  component: Layout,
-  children: [{
-    path: 'handle/:processInstanceId/:businessId',
-    name: '活动审核',
-    meta: {
-      i18n: 'work'
-    },
-    component: () =>
-      import( /* webpackChunkName: "views" */ '@/views/ldt_activity/handleActivityAudit')
-  }]
 },
 },
-{
-  path: '/work/process/leave',
-  component: Layout,
-  redirect: '/work/process/leave/form',
-  children: [{
-    path: 'form/:processDefinitionId',
-    name: '请假流程',
-    meta: {
-      i18n: 'work'
-    },
-    component: () =>
-      import( /* webpackChunkName: "views" */ '@/views/work/process/leave/form')
-  }, {
-    path: 'handle/:taskId/:processInstanceId/:businessId',
-    name: '处理请假流程',
-    meta: {
-      i18n: 'work'
-    },
-    component: () =>
-      import( /* webpackChunkName: "views" */ '@/views/work/process/leave/handle')
-  }, {
-    path: 'detail/:processInstanceId/:businessId',
-    name: '请假流程详情',
-    meta: {
-      i18n: 'work'
-    },
-    component: () =>
-      import( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail')
+  {
+    path: '/work/process/shop',
+    component: Layout,
+    children: [{
+      path: 'handle/:processInstanceId/:businessId',
+      name: '商户审核',
+      meta: {
+        i18n: 'work'
+      },
+      component: () =>
+        import( /* webpackChunkName: "views" */ '@/views/ldt_shop/handleShopAudit')
+    }]
+  },
+  {
+    path: '/work/process/shop/miniCRO',
+    component: Layout,
+    children: [{
+      path: 'handle/:processInstanceId/:businessId',
+      name: '小微审核',
+      meta: {
+        i18n: 'work'
+      },
+      component: () =>
+        import( /* webpackChunkName: "views" */ '@/views/ldt_shop/handleMiniCROShopAudit')
+    }]
+  },
+  {
+    path: '/work/process/activity',
+    component: Layout,
+    children: [{
+      path: 'handle/:processInstanceId/:businessId',
+      name: '活动审核',
+      meta: {
+        i18n: 'work'
+      },
+      component: () =>
+        import( /* webpackChunkName: "views" */ '@/views/ldt_activity/handleActivityAudit')
+    }]
+  },
+  {
+    path: '/work/process/leave',
+    component: Layout,
+    redirect: '/work/process/leave/form',
+    children: [{
+      path: 'form/:processDefinitionId',
+      name: '请假流程',
+      meta: {
+        i18n: 'work'
+      },
+      component: () =>
+        import( /* webpackChunkName: "views" */ '@/views/work/process/leave/form')
+    }, {
+      path: 'handle/:taskId/:processInstanceId/:businessId',
+      name: '处理请假流程',
+      meta: {
+        i18n: 'work'
+      },
+      component: () =>
+        import( /* webpackChunkName: "views" */ '@/views/work/process/leave/handle')
+    }, {
+      path: 'detail/:processInstanceId/:businessId',
+      name: '请假流程详情',
+      meta: {
+        i18n: 'work'
+      },
+      component: () =>
+        import( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail')
+    }]
   }]
   }]
-}]

+ 45 - 1
src/views/ldt_agent/agentrecord.vue

@@ -1,5 +1,10 @@
 <template>
 <template>
   <basic-container>
   <basic-container>
+    <el-dialog @close="dialogShow=false" append-to-body   :close-on-click-modal="false" :visible.sync="dialogShow" :destroy-on-close="true"
+               :title="dialogTitle" width="80%">
+      <agent-shop v-if="dialogTitle=='代理商户'" ref="refName" :operateId="operateId"></agent-shop>
+    </el-dialog>
+
     <avue-crud :option="option"
     <avue-crud :option="option"
                :table-loading="loading"
                :table-loading="loading"
                :data="data"
                :data="data"
@@ -56,6 +61,11 @@
 <!--          </div>-->
 <!--          </div>-->
 <!--        </div>-->
 <!--        </div>-->
       </template>
       </template>
+      <template slot-scope="scope" slot="menu">
+        <el-button type="text" size="small" icon="el-icon-view" plain class="none-border"
+                   @click.stop="openDialog(scope.row.accountId,'代理商户')">代理商户
+        </el-button>
+      </template>
     </avue-crud>
     </avue-crud>
   </basic-container>
   </basic-container>
 </template>
 </template>
@@ -64,10 +74,17 @@
   import {getList, getDetail, add, update, remove} from "@/api/ldt_agent/agentrecord";
   import {getList, getDetail, add, update, remove} from "@/api/ldt_agent/agentrecord";
   // import {getList as platformList} from "@/api/ldt_platform/platformsetting";
   // import {getList as platformList} from "@/api/ldt_platform/platformsetting";
   import {mapGetters} from "vuex";
   import {mapGetters} from "vuex";
+  import agentShop from "./comps/agent-shop"
 
 
   export default {
   export default {
+    components:{agentShop},
     data() {
     data() {
       return {
       return {
+        //弹框
+        dialogShow:false,
+        operateId: '',
+        dialogTitle:'',
+
         form: {},
         form: {},
         query: {},
         query: {},
         loading: true,
         loading: true,
@@ -96,6 +113,7 @@
           border: true,
           border: true,
           index: true,
           index: true,
           viewBtn: true,
           viewBtn: true,
+          delBtn: false,
           selection: true,
           selection: true,
           dialogClickModal: false,
           dialogClickModal: false,
           column: [
           column: [
@@ -180,6 +198,22 @@
                 trigger: "blur"
                 trigger: "blur"
               }]
               }]
             },
             },
+            {
+              label: "租户",
+              prop: "tenantId",
+              type: "select",
+              dicUrl: "/api/blade-system/tenant/list?current=1&size=99",
+              props: {
+                label: "tenantName",
+                value: "tenantId",
+                res:"data.records"
+              },
+              rules: [{
+                required: true,
+                message: "请选择租户",
+                trigger: "blur"
+              }]
+            },
           ]
           ]
         },
         },
         data: []
         data: []
@@ -223,6 +257,15 @@
       // });
       // });
     },
     },
     methods: {
     methods: {
+      openDialog(id,name) {
+        this.dialogTitle=name
+        this.operateId = id
+        this.dialogShow = true
+        if (this.canReset) {
+          this.$refs.refName.refreshChange()
+        }
+        this.canReset = true
+      },
       rowSave(row, done, loading) {
       rowSave(row, done, loading) {
         add(row).then(() => {
         add(row).then(() => {
           this.onLoad(this.page);
           this.onLoad(this.page);
@@ -323,6 +366,7 @@
         this.onLoad(this.page, this.query);
         this.onLoad(this.page, this.query);
       },
       },
       onLoad(page, params = {}) {
       onLoad(page, params = {}) {
+        this.query.accountId = this.operateId;
         this.loading = true;
         this.loading = true;
         getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
         getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
           const data = res.data.data;
           const data = res.data.data;
@@ -331,7 +375,7 @@
           this.loading = false;
           this.loading = false;
           this.selectionClear();
           this.selectionClear();
         });
         });
-      }
+      },
     }
     }
   };
   };
 </script>
 </script>

+ 250 - 0
src/views/ldt_agent/comps/agent-shop.vue

@@ -0,0 +1,250 @@
+<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="agentInfo" slot-scope="scope" v-if="scope.row.agenter && scope.row.agenter!=-1">
+        <div style="display: flex;">
+          <div style="display: flex;justify-content: center;align-items: center;">
+            <el-avatar size="large" :src="scope.row.agentAvatar"></el-avatar>
+          </div>
+          <div style="padding: 10px;">
+            <div>代理人姓名:{{scope.row.agentName}}</div>
+            <div>代理人id:{{scope.row.agenter}}</div>
+          </div>
+        </div>
+      </template>
+
+      <template slot="labelKey" slot-scope="scope">
+        <el-tag v-for="(item,index) of scope.row.labelKey.split(',')" :key="index">
+          {{item}}
+        </el-tag>
+      </template>
+      <template slot="location" slot-scope="scope">
+        {{scope.row.location}}
+      </template>
+      <template slot="cover" slot-scope="scope">
+        <el-image :src="scope.row.cover" :style="{maxHeight:'50px',maxWidth:'50px'}"></el-image>
+      </template>
+      <template slot="logo" slot-scope="scope">
+        <el-image :src="scope.row.logo" :style="{maxHeight:'50px',maxWidth:'50px'}"></el-image>
+      </template>
+      <template slot="shopPic" slot-scope="scope">
+        <el-image :src="scope.row.shopPic" :style="{maxHeight:'50px',maxWidth:'50px'}"></el-image>
+      </template>
+
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {
+    getAgentShopList,
+  } from "@/api/ldt_shop/shop";
+  import {
+    mapGetters
+  } from "vuex";
+
+  export default {
+    props:{
+      operateId:String
+    },
+    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,
+          columnBtn: false,
+          border: true,
+          index: true,
+          viewBtn: false,
+          selection: false,
+          addBtn: false,
+          dialogClickModal: false,
+          menu: false,
+          labelWidth: 170,
+          column: [
+            {
+              width:220,
+              prop:"agentInfo",
+              label:"代理人信息",
+              slot:true,
+            },
+            {
+              label: "商店名称",
+              prop: "name",
+              search: true,
+              rules: [{
+                required: true,
+                message: "请输入商店名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "店铺图片",
+              prop: "shopPic",
+              type: 'upload',
+              dataType: "string",
+              listType: 'picture-img',
+              span: 24,
+              propsHttp: {
+                res: 'data',
+                url: 'link'
+              },
+              canvasOption: {
+                text: 'avue',
+                ratio: 0.1
+              },
+              tip: '只能上传jpg/png文件,且不超过500kb',
+              action: '/api/blade-resource/oss/endpoint/put-file',
+              rules: [{
+                required: true,
+                message: "请上传店铺图片",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "详细地址",
+              prop: "address",
+              rules: [{
+                required: true,
+                message: "请输入详细地址",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: '所在地区',
+              prop: 'location',
+              type: "cascader",
+              props: {
+                label: 'name',
+                value: 'code'
+              },
+              lazy: true,
+              dataType: "string",
+              lazyLoad: this.region,
+              rules: [{
+                required: true,
+                message: "请选择所在地区",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    watch: {
+      'form.labelKey'(val) {
+        if (val !== undefined) {
+          const labelJson = []
+          const col = this.option.column.find((col) => {
+            return col.prop === "labelKey";
+          });
+          for (const item of val.split(",")) {
+            col.dicData.forEach(key => {
+              if (key.dictKey === item) {
+                labelJson.push(key)
+                return;
+              }
+            })
+          }
+          this.form.labelJson = JSON.stringify(labelJson);
+        }
+      },
+      'form.address'(val) {
+        if (val !== undefined && val !== null) {
+          const split = val.split(",");
+          if (split.length === 3) {
+            this.form.longitude = split[0];
+            this.form.latitude = split[1];
+            this.form.address = split[2];
+          }
+        }
+      }
+    },
+    computed: {
+      ...mapGetters(["userInfo","permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.shop_add, false),
+          viewBtn: this.vaildData(this.permission.shop_view, false),
+          delBtn: this.vaildData(this.permission.shop_delete, false),
+          editBtn: this.vaildData(this.permission.shop_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      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.query.agenter = this.operateId;
+        this.loading = true;
+        getAgentShopList(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;
+        });
+      },
+    }
+  };
+</script>
+
+<style lang="scss">
+  .tag {
+    background-color: #00aa00;
+    color: white;
+    border-radius: 5px;
+    margin: 10px;
+    padding: 0 10px 0 10px;
+    display: inline;
+  }
+</style>

+ 23 - 14
src/views/ldt_bills/balancebills.vue

@@ -20,19 +20,19 @@
                @on-load="onLoad">
                @on-load="onLoad">
       <template slot="menuLeft">
       <template slot="menuLeft">
         <span style="font-family: '宋体'">
         <span style="font-family: '宋体'">
-          商场交易总额:
+          商场交易总额:
           <span style="background-color: #8c70b6;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
           <span style="background-color: #8c70b6;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
             {{parseFloat(parseFloat(censusPrice.MALL_SEND|0) + parseFloat(censusPrice.WECHAT_PAY|0)).toFixed(2)}}
             {{parseFloat(parseFloat(censusPrice.MALL_SEND|0) + parseFloat(censusPrice.WECHAT_PAY|0)).toFixed(2)}}
           </span>
           </span>
         </span>&nbsp;
         </span>&nbsp;
         <span type="warning" style="font-family: '宋体'">
         <span type="warning" style="font-family: '宋体'">
-          商户交易总额:
+          商户交易总额:
           <span style="background-color: #a9c985;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
           <span style="background-color: #a9c985;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
             {{parseFloat(censusPrice.SHOP_SEND|0).toFixed(2)}}
             {{parseFloat(censusPrice.SHOP_SEND|0).toFixed(2)}}
           </span>
           </span>
         </span>&nbsp;
         </span>&nbsp;
         <span type="info" style="font-family: '宋体'">
         <span type="info" style="font-family: '宋体'">
-          用户付款总额:
+          用户付款总额:
           <span style="background-color: #d50e71;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
           <span style="background-color: #d50e71;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
             {{parseFloat(censusPrice.PAY_CONSUMER|0).toFixed(2)}}
             {{parseFloat(censusPrice.PAY_CONSUMER|0).toFixed(2)}}
           </span>
           </span>
@@ -84,6 +84,15 @@
                 trigger: "blur"
                 trigger: "blur"
               }]
               }]
             },
             },
+            {
+              label: "交易总金额",
+              prop: "totalPrice",
+              rules: [{
+                required: true,
+                message: "请输入交易总金额",
+                trigger: "blur"
+              }]
+            },
             {
             {
               label: "付款方",
               label: "付款方",
               prop: "payId",
               prop: "payId",
@@ -104,21 +113,12 @@
               }]
               }]
             },
             },
             {
             {
-              label: "交易标题",
+              label: "交易方式",
               prop: "title",
               prop: "title",
               search: true,
               search: true,
               rules: [{
               rules: [{
                 required: true,
                 required: true,
-                message: "请输入交易标题",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "交易说明",
-              prop: "billDesc",
-              rules: [{
-                required: true,
-                message: "请输入交易说明",
+                message: "请输入交易方式",
                 trigger: "blur"
                 trigger: "blur"
               }]
               }]
             },
             },
@@ -209,6 +209,15 @@
                 trigger: "blur"
                 trigger: "blur"
               }]
               }]
             },
             },
+            {
+              label: "交易说明",
+              prop: "billDesc",
+              rules: [{
+                required: true,
+                message: "请输入交易说明",
+                trigger: "blur"
+              }]
+            }
           ]
           ]
         },
         },
         data: []
         data: []

+ 12 - 9
src/views/ldt_bills/pointbills.vue

@@ -19,42 +19,45 @@
                @refresh-change="refreshChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
                @on-load="onLoad">
       <template slot="menuLeft">
       <template slot="menuLeft">
-        <span style="font-family: '宋体',serif">
+        <span style="font-family: '宋体',serif" v-if="this.userInfo.role_name !== 'administrator'">
           余额(易宝):
           余额(易宝):
           <span
           <span
             style="background-color: #494141;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
             style="background-color: #494141;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{ censusPrice.accountsPayable }}
+<!--            {{ censusPrice.accountsPayable }}-->
+            {{ parseFloat(censusPrice.yeePayBalance | 0).toFixed(2) }}
           </span>
           </span>
         </span>&nbsp;
         </span>&nbsp;
-        <span type="warning" style="font-family: '宋体',serif">
+        <span type="warning" style="font-family: '宋体',serif" v-if="this.userInfo.role_name !== 'administrator'">
           总金额:
           总金额:
           <span
           <span
             style="background-color: #967f1e;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
             style="background-color: #967f1e;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{ censusPrice.accountsPayable }}
+<!--            {{ censusPrice.accountsPayable }}-->
+            {{ parseFloat(censusPrice.accountsPayable | 0).toFixed(2) }}
           </span>
           </span>
         </span>&nbsp;
         </span>&nbsp;
         <span type="info" style="font-family: '宋体',serif">
         <span type="info" style="font-family: '宋体',serif">
           已核销金额:
           已核销金额:
           <span
           <span
             style="background-color: #096e38;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
             style="background-color: #096e38;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{ censusPrice.handledAmount }}
+<!--            {{ censusPrice.handledAmount }}-->
+            {{ parseFloat(censusPrice.handledAmount | 0).toFixed(2) }}
           </span>
           </span>
         </span>
         </span>
         <span type="info" style="font-family: '宋体',serif">
         <span type="info" style="font-family: '宋体',serif">
           未核销金额:
           未核销金额:
           <span
           <span
             style="background-color: #f60824;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
             style="background-color: #f60824;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{ censusPrice.untreatedAmount }}
+<!--            {{ censusPrice.untreatedAmount }}-->
+            {{ parseFloat(censusPrice.untreatedAmount | 0).toFixed(2) }}
           </span>
           </span>
         </span>
         </span>
       </template>
       </template>
 
 
-      <template slot="menuLeft">
+      <template slot="menuLeft" v-if="this.userInfo.role_name !== 'administrator'">
         <el-button type="danger"
         <el-button type="danger"
                    size="small"
                    size="small"
                    icon="el-icon-money"
                    icon="el-icon-money"
                    round
                    round
-                   v-if="permission.pointbills_delete"
                    @click="handleData" style="margin-left: 30px;">核销
                    @click="handleData" style="margin-left: 30px;">核销
         </el-button>
         </el-button>
       </template>
       </template>
@@ -287,7 +290,7 @@ export default {
     };
     };
   },
   },
   computed: {
   computed: {
-    ...mapGetters(["permission"]),
+    ...mapGetters(["permission", "userInfo"]),
     permissionList() {
     permissionList() {
       return {
       return {
         addBtn: this.vaildData(this.permission.pointbills_add, false),
         addBtn: this.vaildData(this.permission.pointbills_add, false),

+ 0 - 7
src/views/ldt_channel/pointchannel.vue

@@ -95,13 +95,6 @@
               label: "类型",
               label: "类型",
               prop: "type",
               prop: "type",
               search:true,
               search:true,
-              type: "select",
-              dicData: [
-                {label: '内部',value:1},
-                {label: '商场',value:2},
-                {label: '代理',value:3},
-                {label: '外部',value:4},
-              ],
               rules: [{
               rules: [{
                 required: true,
                 required: true,
                 message: "请现在类型",
                 message: "请现在类型",

+ 242 - 0
src/views/ldt_mall/comps/mall-product-fee.vue

@@ -0,0 +1,242 @@
+<template>
+  <basic-container>
+    <el-select v-model="productCodeSelect.value" placeholder="请选择商户" size="small" style="width:100%" @change="selectChange">
+      <el-option
+        v-for="opt in productCodeSelect.option"
+        :key="opt.productCode"
+        :label="opt.productName"
+        :value="opt.productCode">
+        <span style="float: left">{{ opt.productName }}</span>
+        <span style="float: right; color: #8492a6; font-size: 13px">{{ opt.productCode }}</span>
+      </el-option>
+    </el-select>
+    <el-divider/>
+    <avue-form ref="form" v-model="form" :option="option" @submit="submit"></avue-form>
+  </basic-container>
+</template>
+
+<script>
+import {
+  queryProductFee,
+  modifyProductFee
+} from "@/api/ldt_mall/mall";
+
+export default {
+  props: {
+    operateId: String
+  },
+  data() {
+    return {
+      form: {},
+      productCodeSelect:{
+        value:"",
+        option:[]
+      },
+      option: {
+        submitText: '保存',
+        labelWidth: 150,
+        entryBtn: false,
+        column: [
+          {
+            label: '产品码',
+            prop: 'productCode',
+            disabled: true,
+            rules: [
+              {
+                required: true,
+                message: '请输入产品码',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '计费策略',
+            prop: 'rateType',
+            type: 'select',
+            change:(value)=>{
+              const percentRate = this.option.column.find(ele=>{
+                return ele.prop==='percentRate';
+              });
+              const fixedRate = this.option.column.find(ele=>{
+                return ele.prop==='fixedRate';
+              });
+              switch (value.value){
+                case "SINGLE_PERCENT":
+                  percentRate.disabled = false;
+                  percentRate.rules[0].required = true;
+                  fixedRate.disabled = true;
+                  fixedRate.rules[0].required = false;
+                  break;
+                case "SINGLE_FIXED":
+                  percentRate.disabled = true;
+                  percentRate.rules[0].required = false;
+                  fixedRate.disabled = false;
+                  fixedRate.rules[0].required = true;
+                  break;
+                case "FIXED_MIX_PERCENT":
+                case "PERCENT_MIX_CAP":
+                  percentRate.disabled = false;
+                  percentRate.rules[0].required = true;
+                  fixedRate.disabled = false;
+                  fixedRate.rules[0].required = true;
+                  break;
+                default:
+                  break;
+              }
+            },
+            dicData: [
+              {
+                label:'单笔百分比',
+                value:'SINGLE_PERCENT',
+              },
+              {
+                label:'单笔固定值',
+                value:'SINGLE_FIXED',
+              },
+              {
+                label:'单笔固定值+单笔百分比',
+                value:'FIXED_MIX_PERCENT',
+              },
+              {
+                label:'单笔百分比+封顶值',
+                value:'PERCENT_MIX_CAP',
+              }
+            ],
+            rules: [
+              {
+                required: true,
+                message: '请输入积分策略',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '单笔百分比',
+            prop: 'percentRate',
+            rules: [
+              {
+                required: false,
+                message: '请输入单笔百分比',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '单笔固定值',
+            prop: 'fixedRate',
+            rules: [
+              {
+                required: false,
+                message: '请输入单笔固定值',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '手续费承担方',
+            prop: 'undertaker',
+            type: 'select',
+            dicData: [
+              {
+                label: '入驻商户',
+                value: 'SETTLED_MERCHANT'
+              },
+              {
+                label: '用户',
+                value: 'USER'
+              },
+              {
+                label: '标准商户',
+                value: 'ORDINARY_MERCHANT'
+              },
+              {
+                label: '平台商',
+                value: 'PLATFORM_MERCHANT'
+              },
+              {
+                label: '服务商',
+                value: 'SAAS_SERVICE_PROVIDER'
+              }
+            ],
+            rules: [
+              {
+                required: false,
+                message: '请输入手续费承担方',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '手续费收取方式',
+            prop: 'paymentMethod',
+            type: 'select',
+            dicData: [
+              {
+                label: '实收',
+                value: 'REAL_TIME'
+              },
+              {
+                label: '预付实扣',
+                value: 'PREPAID_REAL'
+              },
+              {
+                label: '后收',
+                value: 'UN_REAL_TIME'
+              }
+            ],
+            rules: [
+              {
+                required: false,
+                message: '请输入手续费收取方式',
+                trigger: 'blur'
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  mounted() {
+    this.init();
+  },
+  methods: {
+    init() {
+      queryProductFee({
+        id:this.operateId
+      }).then(res=>{
+        this.productCodeSelect.option = res.data.data;
+        this.productCodeSelect.value = res.data.data[0].productCode;
+        this.selectChange(res.data.data[0].productCode);
+      });
+    },
+    /**
+     * 选择下拉框值
+     * @param value
+     */
+    selectChange(value){
+      const tab = this.productCodeSelect.option.find(ele=>{
+        return ele.productCode===value;
+      });
+      this.form = tab;
+    },
+    submit(data, done) {
+      const content = this.productCodeSelect.option.find(col=>{
+        return col.productCode===data.productCode;
+      });
+      //拷贝对象值
+      Object.assign(content,data);
+      modifyProductFee({
+        id:this.operateId,
+        modifyProductInfo:JSON.stringify(this.productCodeSelect.option)
+      }).then(res=>{
+        this.$message.success("修改成功");
+        done();
+      },error => done());
+      done();
+    }
+  }
+};
+</script>
+
+<style>
+</style>

+ 45 - 45
src/views/ldt_mall/mall.vue

@@ -1,9 +1,12 @@
 <template>
 <template>
   <basic-container>
   <basic-container>
     <el-dialog @close="dialogShow=false" append-to-body :close-on-click-modal="false" :visible.sync="dialogShow"
     <el-dialog @close="dialogShow=false" append-to-body :close-on-click-modal="false" :visible.sync="dialogShow"
+               :destroy-on-close="true"
                :title="dialogTitle" width="60%">
                :title="dialogTitle" width="60%">
       <mall-audit v-if="dialogTitle=='商场进件'&& dialogShow" ref="refName" :operateId="operateId"
       <mall-audit v-if="dialogTitle=='商场进件'&& dialogShow" ref="refName" :operateId="operateId"
                   :isResubmit="isResubmit" @finish="dialogShow=false"></mall-audit>
                   :isResubmit="isResubmit" @finish="dialogShow=false"></mall-audit>
+      <mall-product-fee v-if="dialogTitle=='产品费率'&& dialogShow" ref="refName" :operateId="operateId"
+                        :isResubmit="isResubmit" @finish="dialogShow=false"></mall-product-fee>
     </el-dialog>
     </el-dialog>
 
 
     <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
     <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
@@ -79,9 +82,9 @@
       </template>
       </template>
 
 
       <!-- 进件状态 -->
       <!-- 进件状态 -->
-<!--      <template slot-scope="scope" slot="tenantIdForm">-->
-<!--        <avue-select v-model="form.tenantId" placeholder="请选择租户ID" type="tree" :dic="formTenantId.dic" v-loadmore="loadTenantId"></avue-select>-->
-<!--      </template>-->
+      <!--      <template slot-scope="scope" slot="tenantIdForm">-->
+      <!--        <avue-select v-model="form.tenantId" placeholder="请选择租户ID" type="tree" :dic="formTenantId.dic" v-loadmore="loadTenantId"></avue-select>-->
+      <!--      </template>-->
 
 
 
 
       <!-- 操作菜单 -->
       <!-- 操作菜单 -->
@@ -90,6 +93,10 @@
                    :disabled="!$isEmpty(scope.row.auditStatus)"
                    :disabled="!$isEmpty(scope.row.auditStatus)"
                    @click.stop="openDialog(scope.row.id,'商场进件',false)">商场进件
                    @click.stop="openDialog(scope.row.id,'商场进件',false)">商场进件
         </el-button>
         </el-button>
+        <el-button v-if="userInfo.role_name === 'administrator'" type="text" size="small" icon="el-icon-edit" plain
+                   class="none-border" :disabled="$isEmpty(scope.row.merchantNo)"
+                   @click.stop="openDialog(scope.row.id,'产品费率')">产品费率
+        </el-button>
       </template>
       </template>
 
 
       <template slot="menuLeft">
       <template slot="menuLeft">
@@ -102,26 +109,12 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import {
-  getList,
-  getDetail,
-  add,
-  update,
-  downloadSign,
-  remove
-} from "@/api/ldt_mall/mall";
-import {
-  getOne as getAudit
-} from "@/api/ldt_shop/audit";
-import {
-  getOne as getRegion
-} from "@/api/base/region";
-import {
-  mapGetters
-} from "vuex";
-import {
-  getLazyTree
-} from "@/api/base/region";
+import {add, downloadSign, getDetail, getList, remove, update} from "@/api/ldt_mall/mall";
+import {getOne as getAudit} from "@/api/ldt_shop/audit";
+import {getLazyTree, getOne as getRegion} from "@/api/base/region";
+import {mapGetters} from "vuex";
+import mallAudit from "./comps/mall_audit.vue"
+import mallProductFee from "./comps/mall-product-fee"
 
 
 const auditKV = [{
 const auditKV = [{
   label: "待商场审核",
   label: "待商场审核",
@@ -158,11 +151,9 @@ const auditKV = [{
 ]
 ]
 
 
 
 
-import mallAudit from "./comps/mall_audit.vue"
-
 export default {
 export default {
   components: {
   components: {
-    mallAudit
+    mallAudit, mallProductFee
   },
   },
   watch: {
   watch: {
     "form.locationCode"(val) {
     "form.locationCode"(val) {
@@ -198,7 +189,7 @@ export default {
         tip: false,
         tip: false,
         viewBtn: false,
         viewBtn: false,
         searchShow: true,
         searchShow: true,
-        searchSpan:4,
+        searchSpan: 4,
         searchMenuSpan: 6,
         searchMenuSpan: 6,
         searchLabelWidth: 120,
         searchLabelWidth: 120,
         border: true,
         border: true,
@@ -227,7 +218,7 @@ export default {
             search: true,
             search: true,
             hide: true,
             hide: true,
             prop: "mallName",
             prop: "mallName",
-            searchSpan:6,
+            searchSpan: 6,
             rules: [{
             rules: [{
               required: true,
               required: true,
               message: "请输入商场名称",
               message: "请输入商场名称",
@@ -313,18 +304,6 @@ export default {
               trigger: "blur"
               trigger: "blur"
             }]
             }]
           },
           },
-          {
-            label: "具体地址",
-            prop: "address",
-            type: "map",
-            dataType: "string",
-            hide: true,
-            rules: [{
-              required: true,
-              message: "请选择具体地址",
-              trigger: "blur"
-            }]
-          },
           {
           {
             label: "所在区域",
             label: "所在区域",
             prop: "locationCode",
             prop: "locationCode",
@@ -341,11 +320,23 @@ export default {
               value: 'id'
               value: 'id'
             },
             },
             rules: [{
             rules: [{
-              required: false,
+              required: true,
               message: "请输入所在区域编码",
               message: "请输入所在区域编码",
               trigger: "blur"
               trigger: "blur"
             }]
             }]
           },
           },
+          {
+            label: "具体地址",
+            prop: "address",
+            type: "map",
+            dataType: "string",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请选择具体地址",
+              trigger: "blur"
+            }]
+          },
           {
           {
             label: "商场logo",
             label: "商场logo",
             prop: "logo",
             prop: "logo",
@@ -417,10 +408,11 @@ export default {
             prop: "tenantId",
             prop: "tenantId",
             type: "select",
             type: "select",
             dicUrl: "/api/blade-system/tenant/list?current=1&size=99",
             dicUrl: "/api/blade-system/tenant/list?current=1&size=99",
+            disabled: true,
             props: {
             props: {
               label: "tenantName",
               label: "tenantName",
               value: "tenantId",
               value: "tenantId",
-              res:"data.records"
+              res: "data.records"
             },
             },
             rules: [{
             rules: [{
               required: true,
               required: true,
@@ -434,7 +426,7 @@ export default {
     };
     };
   },
   },
   computed: {
   computed: {
-    ...mapGetters(["permission"]),
+    ...mapGetters(["userInfo", "permission"]),
     permissionList() {
     permissionList() {
       return {
       return {
         addBtn: this.vaildData(this.permission.mall_add, false),
         addBtn: this.vaildData(this.permission.mall_add, false),
@@ -452,6 +444,12 @@ export default {
     }
     }
 
 
   },
   },
+  created() {
+    const tenantId = this.option.column.find(ele => {
+      return ele.prop === "tenantId";
+    });
+    tenantId.disabled = this.userInfo.detail.tenantType !== 'ADMIN';
+  },
   methods: {
   methods: {
     auditStatusKey(value) {
     auditStatusKey(value) {
       if (this.$isEmpty(value)) {
       if (this.$isEmpty(value)) {
@@ -547,7 +545,9 @@ export default {
         });
         });
     },
     },
     beforeOpen(done, type) {
     beforeOpen(done, type) {
-      if (["edit", "view"].includes(type)) {
+      if (["add"].includes(type)) {
+        this.form.tenantId = "000000";
+      } else if (["edit", "view"].includes(type)) {
         getDetail(this.form.id).then(res => {
         getDetail(this.form.id).then(res => {
           this.form = res.data.data;
           this.form = res.data.data;
         });
         });
@@ -612,7 +612,7 @@ export default {
         this.selectionClear();
         this.selectionClear();
       });
       });
     },
     },
-    loadTenantId(){
+    loadTenantId() {
       console.log(this.formTenantId);
       console.log(this.formTenantId);
     }
     }
   }
   }

+ 90 - 0
src/views/ldt_platform/platformsetting.vue

@@ -178,6 +178,56 @@ export default {
               {
               {
                 label: '计费策略',
                 label: '计费策略',
                 prop: 'rateType',
                 prop: 'rateType',
+                type: 'select',
+                change:(value)=>{
+                  const percentRate = this.option[3].option.column.find(ele=>{
+                    return ele.prop==='percentRate';
+                  });
+                  const fixedRate = this.option[3].option.column.find(ele=>{
+                    return ele.prop==='fixedRate';
+                  });
+                  switch (value.value){
+                    case "SINGLE_PERCENT":
+                      percentRate.disabled = false;
+                      percentRate.rules[0].required = true;
+                      fixedRate.disabled = true;
+                      fixedRate.rules[0].required = false;
+                      break;
+                    case "SINGLE_FIXED":
+                      percentRate.disabled = true;
+                      percentRate.rules[0].required = false;
+                      fixedRate.disabled = false;
+                      fixedRate.rules[0].required = true;
+                      break;
+                    case "FIXED_MIX_PERCENT":
+                    case "PERCENT_MIX_CAP":
+                      percentRate.disabled = false;
+                      percentRate.rules[0].required = true;
+                      fixedRate.disabled = false;
+                      fixedRate.rules[0].required = true;
+                      break;
+                    default:
+                      break;
+                  }
+                },
+                dicData: [
+                  {
+                    label:'单笔百分比',
+                    value:'SINGLE_PERCENT',
+                  },
+                  {
+                    label:'单笔固定值',
+                    value:'SINGLE_FIXED',
+                  },
+                  {
+                    label:'单笔固定值+单笔百分比',
+                    value:'FIXED_MIX_PERCENT',
+                  },
+                  {
+                    label:'单笔百分比+封顶值',
+                    value:'PERCENT_MIX_CAP',
+                  }
+                ],
                 rules: [
                 rules: [
                   {
                   {
                     required: true,
                     required: true,
@@ -189,6 +239,7 @@ export default {
               {
               {
                 label: '单笔百分比',
                 label: '单笔百分比',
                 prop: 'percentRate',
                 prop: 'percentRate',
+                disabled: true,
                 rules: [
                 rules: [
                   {
                   {
                     required: false,
                     required: false,
@@ -200,6 +251,7 @@ export default {
               {
               {
                 label: '单笔固定值',
                 label: '单笔固定值',
                 prop: 'fixedRate',
                 prop: 'fixedRate',
+                disabled: true,
                 rules: [
                 rules: [
                   {
                   {
                     required: false,
                     required: false,
@@ -211,6 +263,29 @@ export default {
               {
               {
                 label: '手续费承担方',
                 label: '手续费承担方',
                 prop: 'undertaker',
                 prop: 'undertaker',
+                type: 'select',
+                dicData: [
+                  {
+                    label: '入驻商户',
+                    value: 'SETTLED_MERCHANT'
+                  },
+                  {
+                    label: '用户',
+                    value: 'USER'
+                  },
+                  {
+                    label: '标准商户',
+                    value: 'ORDINARY_MERCHANT'
+                  },
+                  {
+                    label: '平台商',
+                    value: 'PLATFORM_MERCHANT'
+                  },
+                  {
+                    label: '服务商',
+                    value: 'SAAS_SERVICE_PROVIDER'
+                  }
+                ],
                 rules: [
                 rules: [
                   {
                   {
                     required: false,
                     required: false,
@@ -222,6 +297,21 @@ export default {
               {
               {
                 label: '手续费收取方式',
                 label: '手续费收取方式',
                 prop: 'paymentMethod',
                 prop: 'paymentMethod',
+                type: 'select',
+                dicData: [
+                  {
+                    label: '实收',
+                    value: 'REAL_TIME'
+                  },
+                  {
+                    label: '预付实扣',
+                    value: 'PREPAID_REAL'
+                  },
+                  {
+                    label: '后收',
+                    value: 'UN_REAL_TIME'
+                  }
+                ],
                 rules: [
                 rules: [
                   {
                   {
                     required: false,
                     required: false,

+ 6 - 2
src/views/ldt_shop/audit.vue

@@ -18,7 +18,7 @@
                @size-change="sizeChange"
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
                @on-load="onLoad">
-      <template slot="menu" slot-scope="scope"> 
+      <template slot="menu" slot-scope="scope">
         <el-button v-if="scope.row.auditStatus =='WAITING_PLATFORM'" icon="el-icon-s-check" type="warning" size="small" @click="handleAudit(scope.row)"> 审 核</el-button>
         <el-button v-if="scope.row.auditStatus =='WAITING_PLATFORM'" icon="el-icon-s-check" type="warning" size="small" @click="handleAudit(scope.row)"> 审 核</el-button>
         <el-button v-else icon="el-icon-view" type="primary" size="small" @click="handleAudit(scope.row)"> 查 看</el-button>
         <el-button v-else icon="el-icon-view" type="primary" size="small" @click="handleAudit(scope.row)"> 查 看</el-button>
       </template>
       </template>
@@ -132,7 +132,11 @@
     },
     },
     methods: {
     methods: {
       handleAudit(row){
       handleAudit(row){
-       this.$router.push(`/work/process/shop/handle/${row.processInstanceId}/${row.id}`);
+        if(row.typeOfEnterprise==="MINICRO"){
+          this.$router.push(`/work/process/shop/miniCRO/handle/${row.processInstanceId}/${row.id}`);
+        }else{
+          this.$router.push(`/work/process/shop/handle/${row.processInstanceId}/${row.id}`);
+        }
       },
       },
       rowSave(row, done, loading) {
       rowSave(row, done, loading) {
         add(row).then(() => {
         add(row).then(() => {

+ 242 - 0
src/views/ldt_shop/comps/shop-product-fee.vue

@@ -0,0 +1,242 @@
+<template>
+  <basic-container>
+    <el-select v-model="productCodeSelect.value" placeholder="请选择商户" size="small" style="width:100%" @change="selectChange">
+      <el-option
+        v-for="opt in productCodeSelect.option"
+        :key="opt.productCode"
+        :label="opt.productName"
+        :value="opt.productCode">
+        <span style="float: left">{{ opt.productName }}</span>
+        <span style="float: right; color: #8492a6; font-size: 13px">{{ opt.productCode }}</span>
+      </el-option>
+    </el-select>
+    <el-divider/>
+    <avue-form ref="form" v-model="form" :option="option" @submit="submit"></avue-form>
+  </basic-container>
+</template>
+
+<script>
+import {
+  queryProductFee,
+  modifyProductFee
+} from "@/api/ldt_shop/shop";
+
+export default {
+  props: {
+    operateId: String
+  },
+  data() {
+    return {
+      form: {},
+      productCodeSelect:{
+        value:"",
+        option:[]
+      },
+      option: {
+        submitText: '保存',
+        labelWidth: 150,
+        entryBtn: false,
+        column: [
+          {
+            label: '产品码',
+            prop: 'productCode',
+            disabled: true,
+            rules: [
+              {
+                required: true,
+                message: '请输入产品码',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '计费策略',
+            prop: 'rateType',
+            type: 'select',
+            change:(value)=>{
+              const percentRate = this.option.column.find(ele=>{
+                return ele.prop==='percentRate';
+              });
+              const fixedRate = this.option.column.find(ele=>{
+                return ele.prop==='fixedRate';
+              });
+              switch (value.value){
+                case "SINGLE_PERCENT":
+                  percentRate.disabled = false;
+                  percentRate.rules[0].required = true;
+                  fixedRate.disabled = true;
+                  fixedRate.rules[0].required = false;
+                  break;
+                case "SINGLE_FIXED":
+                  percentRate.disabled = true;
+                  percentRate.rules[0].required = false;
+                  fixedRate.disabled = false;
+                  fixedRate.rules[0].required = true;
+                  break;
+                case "FIXED_MIX_PERCENT":
+                case "PERCENT_MIX_CAP":
+                  percentRate.disabled = false;
+                  percentRate.rules[0].required = true;
+                  fixedRate.disabled = false;
+                  fixedRate.rules[0].required = true;
+                  break;
+                default:
+                  break;
+              }
+            },
+            dicData: [
+              {
+                label:'单笔百分比',
+                value:'SINGLE_PERCENT',
+              },
+              {
+                label:'单笔固定值',
+                value:'SINGLE_FIXED',
+              },
+              {
+                label:'单笔固定值+单笔百分比',
+                value:'FIXED_MIX_PERCENT',
+              },
+              {
+                label:'单笔百分比+封顶值',
+                value:'PERCENT_MIX_CAP',
+              }
+            ],
+            rules: [
+              {
+                required: true,
+                message: '请输入积分策略',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '单笔百分比',
+            prop: 'percentRate',
+            rules: [
+              {
+                required: false,
+                message: '请输入单笔百分比',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '单笔固定值',
+            prop: 'fixedRate',
+            rules: [
+              {
+                required: false,
+                message: '请输入单笔固定值',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '手续费承担方',
+            prop: 'undertaker',
+            type: 'select',
+            dicData: [
+              {
+                label: '入驻商户',
+                value: 'SETTLED_MERCHANT'
+              },
+              {
+                label: '用户',
+                value: 'USER'
+              },
+              {
+                label: '标准商户',
+                value: 'ORDINARY_MERCHANT'
+              },
+              {
+                label: '平台商',
+                value: 'PLATFORM_MERCHANT'
+              },
+              {
+                label: '服务商',
+                value: 'SAAS_SERVICE_PROVIDER'
+              }
+            ],
+            rules: [
+              {
+                required: false,
+                message: '请输入手续费承担方',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
+            label: '手续费收取方式',
+            prop: 'paymentMethod',
+            type: 'select',
+            dicData: [
+              {
+                label: '实收',
+                value: 'REAL_TIME'
+              },
+              {
+                label: '预付实扣',
+                value: 'PREPAID_REAL'
+              },
+              {
+                label: '后收',
+                value: 'UN_REAL_TIME'
+              }
+            ],
+            rules: [
+              {
+                required: false,
+                message: '请输入手续费收取方式',
+                trigger: 'blur'
+              }
+            ]
+          }
+        ]
+      }
+    }
+  },
+  mounted() {
+    this.init();
+  },
+  methods: {
+    init() {
+      queryProductFee({
+        id:this.operateId
+      }).then(res=>{
+        this.productCodeSelect.option = res.data.data;
+        this.productCodeSelect.value = res.data.data[0].productCode;
+        this.selectChange(res.data.data[0].productCode);
+      });
+    },
+    /**
+     * 选择下拉框值
+     * @param value
+     */
+    selectChange(value){
+      const tab = this.productCodeSelect.option.find(ele=>{
+        return ele.productCode===value;
+      });
+      this.form = tab;
+    },
+    submit(data, done) {
+      const content = this.productCodeSelect.option.find(col=>{
+        return col.productCode===data.productCode;
+      });
+      //拷贝对象值
+      Object.assign(content,data);
+      modifyProductFee({
+        id:this.operateId,
+        modifyProductInfo:JSON.stringify(this.productCodeSelect.option)
+      }).then(res=>{
+        this.$message.success("修改成功");
+        done();
+      },error => done());
+      done();
+    }
+  }
+};
+</script>
+
+<style>
+</style>

+ 332 - 0
src/views/ldt_shop/handleMiniCROShopAudit.vue

@@ -0,0 +1,332 @@
+<template>
+  <basic-container>
+    <el-form :model="form">
+      <el-card shadow="hover">
+        <el-row v-if="form.auditStatus == 'WAITING_PLATFORM'">
+          <el-form-item label="审批意见">
+            <el-input v-model="form.comment" placeholder="请输入审批意见"></el-input>
+          </el-form-item>
+        </el-row>
+        <el-row type="flex" class="row-bg" justify="end">
+          <el-form-item>
+            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'" type="primary" @click="handleAgree">同意</el-button>
+            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'" type="danger" @click="handleDisagree">驳回
+            </el-button>
+            <el-button @click="handleCancel">关闭</el-button>
+          </el-form-item>
+        </el-row>
+      </el-card>
+      <el-card shadow="hover" style="margin-top: 20px">
+        <el-collapse v-model="activeNames" @change="handleChange">
+          <el-collapse-item title="审批信息" name="business">
+            <el-card shadow="hover" style="margin-top: 20px;">
+              <avue-form :option="option" v-model="form">
+              </avue-form>
+            </el-card>
+          </el-collapse-item>
+          <el-collapse-item title="流程信息" name="process">
+            <el-row type="flex" class="row-bg">
+              <el-timeline>
+                <el-timeline-item :key="flow.id" :timestamp="flow.createTime" v-for="flow in flowList" placement="top">
+                  <el-card shadow="hover">
+                    <p>{{ flow.assigneeName ? flow.assigneeName + " 在 " : "" }} [{{ flow.createTime }}] 开始处理
+                      [{{ flow.historyActivityName }}] 环节</p>
+                    <p v-if="flow.historyActivityDurationTime!==''">任务历时 [{{ flow.historyActivityDurationTime }}]</p>
+                    <p v-if="flow.comment!==''">批复意见: [{{ flow.comment }}]</p>
+                    <p v-if="flow.endTime!==''">结束时间: [{{ flow.endTime }}]</p>
+                  </el-card>
+                </el-timeline-item>
+              </el-timeline>
+            </el-row>
+          </el-collapse-item>
+        </el-collapse>
+      </el-card>
+    </el-form>
+  </basic-container>
+</template>
+
+<script>
+import {getDetail} from "@/api/ldt_shop/audit"
+import {historyFlowList} from "@/api/work/process";
+import {completeTask, todoList} from "@/api/work/work";
+
+export default {
+  mounted() {
+    this.init();
+  },
+  data() {
+    return {
+      businessId: null,
+      form: {},
+      task: {},
+      option: {
+        emptyBtn: false,
+        submitBtn: false,
+        labelPosition:"left",
+        column: [
+          {
+            label: "商户名称",
+            prop: "shopName",
+            span: 24,
+            disabled: true,
+          },
+          {
+            label: "身份证号",
+            prop: "idCard",
+            disabled: true,
+            rules: [{
+              required: true,
+              message: "请输入身份证号",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "具体地址",
+            prop: "address",
+            disabled: true,
+            rules: [{
+              required: true,
+              message: "请输入具体地址",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "住址",
+            prop: "addr",
+            disabled: true
+          },
+          {
+            label: "商户实际经营地所在省",
+            prop: "province",
+            disabled: true,
+            labelWidth: 160,
+            span: 8
+          },
+          {
+            label: "商户实际经营地所在市",
+            prop: "district",
+            disabled: true,
+            labelWidth: 160,
+            span: 8
+          },
+          {
+            label: "商户实际经营地所在区",
+            prop: "contactMobile",
+            disabled: true,
+            labelWidth: 160,
+            span: 8
+          },
+          {
+            label: "商户联系人姓名",
+            prop: "contactName",
+            disabled: true,
+            labelWidth: 120,
+            span: 8
+          },
+          {
+            label: "商户联系人证件号码",
+            prop: "contactLicenceNo",
+            disabled: true,
+            labelWidth: 160,
+            span: 8
+          },
+          {
+            label: "商户联系人手机号",
+            prop: "contactMobile",
+            disabled: true,
+            labelWidth: 160,
+            span: 8
+          },
+          // {
+          //   label: "开户许可证编号",
+          //   prop: "openAccountLicenceNo",
+          //   disabled: true,
+          //   labelWidth: 120,
+          //   span:24
+          // },
+          {
+            label: "银行账户类型",
+            prop: "bankAccountTypeLabel",
+            disabled: true,
+            labelWidth: 120,
+            span: 8
+          },
+          {
+            label: "银行账户开户总行",
+            prop: "bankCodeLabel",
+            disabled: true,
+            labelWidth: 130,
+            span: 8
+          },
+          {
+            label: "银行账户号码",
+            prop: "bankCardNo",
+            disabled: true,
+            labelWidth: 120,
+            span: 8
+          },
+          {
+            label: "商户logo",
+            prop: "shopLogo",
+            type: 'upload',
+            disabled: true,
+            listType: 'picture-img',
+            span: 12,
+            labelWidth: 120,
+            propsHttp: {
+              res: 'data',
+              url: 'link'
+            },
+            canvasOption: {
+              text: 'avue',
+              ratio: 0.1
+            },
+            tip: '只能上传jpg/png文件,且不超过500kb',
+            action: '/api/blade-resource/oss/endpoint/put-file',
+            /*rules: [{
+              required: true,
+              message: "请输入身份证-正面",
+              trigger: "blur"
+            }]*/
+          },
+          {
+            label: "身份证-正面",
+            prop: "idCardFront",
+            type: 'upload',
+            disabled: true,
+            listType: 'picture-img',
+            span: 12,
+            labelWidth: 120,
+            propsHttp: {
+              res: 'data',
+              url: 'link'
+            },
+            canvasOption: {
+              text: 'avue',
+              ratio: 0.1
+            },
+            tip: '只能上传jpg/png文件,且不超过500kb',
+            action: '/api/blade-resource/oss/endpoint/put-file',
+            /*rules: [{
+              required: true,
+              message: "请输入身份证-正面",
+              trigger: "blur"
+            }]*/
+          },
+          {
+            label: "身份证-反面",
+            prop: "idCardContrary",
+            disabled: true,
+            type: 'upload',
+            listType: 'picture-img',
+            span: 12,
+            labelWidth: 120,
+            propsHttp: {
+              res: 'data',
+              url: 'link'
+            },
+            canvasOption: {
+              text: 'avue',
+              ratio: 0.1
+            },
+            tip: '只能上传jpg/png文件,且不超过500kb',
+            action: '/api/blade-resource/oss/endpoint/put-file',
+           /* rules: [{
+              required: true,
+              message: "请输入身份证-反面",
+              trigger: "blur"
+            }]*/
+          },
+          {
+            label: "经营范围",
+            prop: "businessScope",
+            disabled: true,
+            type: "textarea"
+          },
+        ]
+      },
+      processInstanceId: null,
+      activeNames: "business",
+      flowList: null,
+    }
+  },
+  methods: {
+    handleCancel() {
+      this.$router.go(-1);
+    },
+    handleAgree() {
+      if (!this.form.comment) {
+        this.$message.warning('请先填写批复意见');
+        return;
+      }
+      let {variables} = this.task;
+      variables.pass = true;
+      const params = {
+        taskId: this.task.taskId,
+        processInstanceId: this.processInstanceId,
+        flag: 'ok',
+        variables,
+        comment: this.form.comment,
+      };
+      completeTask(params).then(res => {
+        const data = res.data;
+        if (data.success) {
+          this.$message.success(data.msg);
+          this.$router.$avueRouter.closeTag();
+          this.$router.go(-1);
+        } else {
+          this.$message.error(data.msg || '提交失败');
+        }
+      })
+    },
+    handleDisagree() {
+      if (!this.form.comment) {
+        this.$message.warning('请先填写批复意见');
+        return;
+      }
+      let {variables} = this.task;
+      variables.pass = true;
+      const params = {
+        taskId: this.task.taskId,
+        variables,
+        processInstanceId: this.processInstanceId,
+        comment: this.form.comment,
+      };
+      completeTask(params).then(res => {
+        const data = res.data;
+        if (data.success) {
+          this.$message.success(data.msg);
+          this.$router.$avueRouter.closeTag();
+          this.$router.go(-1);
+        } else {
+          this.$message.error(data.msg || '提交失败');
+        }
+      })
+    },
+    handleChange(name) {
+      this.activeNames = name;
+    },
+    init() {
+      this.businessId = this.$route.params.businessId;
+      this.processInstanceId = this.$route.params.processInstanceId;
+      getDetail(this.businessId).then(res => {
+        this.form = res.data.data;
+      });
+      todoList(1, 10, {
+        assignee: "LDT_PLATFORM",
+        processInstanceId: this.processInstanceId
+      }).then(res => {
+        this.task = res.data.data.records[0];
+        console.log(this.task);
+      })
+      historyFlowList(this.processInstanceId).then(res => {
+        this.flowList = res.data.data;
+        console.log(this.flowList)
+      })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+</style>

+ 32 - 10
src/views/ldt_shop/handleShopAudit.vue

@@ -62,6 +62,7 @@ export default {
       option: {
       option: {
         emptyBtn: false,
         emptyBtn: false,
         submitBtn: false,
         submitBtn: false,
+        labelPosition:"left",
         column: [
         column: [
           {
           {
             label: "商户名称",
             label: "商户名称",
@@ -209,6 +210,27 @@ export default {
             labelWidth: 120,
             labelWidth: 120,
             span:24
             span:24
           },
           },
+          {
+            label: "银行账户类型",
+            prop: "bankAccountTypeLabel",
+            disabled: true,
+            labelWidth: 120,
+            span: 8
+          },
+          {
+            label: "银行账户开户总行",
+            prop: "bankCodeLabel",
+            disabled: true,
+            labelWidth: 130,
+            span: 8
+          },
+          {
+            label: "银行账户号码",
+            prop: "bankCardNo",
+            disabled: true,
+            labelWidth: 120,
+            span: 8
+          },
           {
           {
             label: "开户许可证照片",
             label: "开户许可证照片",
             prop: "openAccountLicenceUrl",
             prop: "openAccountLicenceUrl",
@@ -226,11 +248,11 @@ export default {
             },
             },
             tip: '只能上传jpg/png文件,且不超过500kb',
             tip: '只能上传jpg/png文件,且不超过500kb',
             action: '/api/blade-resource/oss/endpoint/put-file',
             action: '/api/blade-resource/oss/endpoint/put-file',
-            rules: [{
+            /*rules: [{
               required: true,
               required: true,
               message: "请输入开户许可证照片",
               message: "请输入开户许可证照片",
               trigger: "blur"
               trigger: "blur"
-            }]
+            }]*/
           },
           },
           {
           {
             label: "手持营业执照在经营场所的照片",
             label: "手持营业执照在经营场所的照片",
@@ -249,11 +271,11 @@ export default {
             },
             },
             tip: '只能上传jpg/png文件,且不超过500kb',
             tip: '只能上传jpg/png文件,且不超过500kb',
             action: '/api/blade-resource/oss/endpoint/put-file',
             action: '/api/blade-resource/oss/endpoint/put-file',
-            rules: [{
+            /*rules: [{
               required: true,
               required: true,
               message: "请输入手持营业执照在经营场所的照片",
               message: "请输入手持营业执照在经营场所的照片",
               trigger: "blur"
               trigger: "blur"
-            }]
+            }]*/
           },
           },
           {
           {
             label: "身份证-正面",
             label: "身份证-正面",
@@ -273,11 +295,11 @@ export default {
             },
             },
             tip: '只能上传jpg/png文件,且不超过500kb',
             tip: '只能上传jpg/png文件,且不超过500kb',
             action: '/api/blade-resource/oss/endpoint/put-file',
             action: '/api/blade-resource/oss/endpoint/put-file',
-            rules: [{
+            /*rules: [{
               required: true,
               required: true,
               message: "请输入身份证-正面",
               message: "请输入身份证-正面",
               trigger: "blur"
               trigger: "blur"
-            }]
+            }]*/
           },
           },
           {
           {
             label: "身份证-反面",
             label: "身份证-反面",
@@ -297,11 +319,11 @@ export default {
             },
             },
             tip: '只能上传jpg/png文件,且不超过500kb',
             tip: '只能上传jpg/png文件,且不超过500kb',
             action: '/api/blade-resource/oss/endpoint/put-file',
             action: '/api/blade-resource/oss/endpoint/put-file',
-            rules: [{
+           /* rules: [{
               required: true,
               required: true,
               message: "请输入身份证-反面",
               message: "请输入身份证-反面",
               trigger: "blur"
               trigger: "blur"
-            }]
+            }]*/
           },
           },
           {
           {
             label: "营业执照",
             label: "营业执照",
@@ -320,11 +342,11 @@ export default {
             },
             },
             tip: '只能上传jpg/png文件,且不超过500kb',
             tip: '只能上传jpg/png文件,且不超过500kb',
             action: '/api/blade-resource/oss/endpoint/put-file',
             action: '/api/blade-resource/oss/endpoint/put-file',
-            rules: [{
+            /*rules: [{
               required: true,
               required: true,
               message: "请输入营业执照",
               message: "请输入营业执照",
               trigger: "blur"
               trigger: "blur"
-            }]
+            }]*/
           },
           },
           {
           {
             label: "经营范围",
             label: "经营范围",

+ 11 - 6
src/views/ldt_shop/shop.vue

@@ -1,11 +1,12 @@
 <template>
 <template>
   <basic-container>
   <basic-container>
-    <el-dialog @close="dialogShow=false" append-to-body   :close-on-click-modal="false" :visible.sync="dialogShow"
+    <el-dialog @close="dialogShow=false" append-to-body   :close-on-click-modal="false" :visible.sync="dialogShow" :destroy-on-close="true"
       :title="dialogTitle" width="80%">
       :title="dialogTitle" width="80%">
        <shop-member v-if="dialogTitle=='店铺会员'" ref="refName" :operateId="operateId"></shop-member>
        <shop-member v-if="dialogTitle=='店铺会员'" ref="refName" :operateId="operateId"></shop-member>
        <shop-bills v-if="dialogTitle=='账单流水'" ref="refName" :operateId="operateId"></shop-bills>
        <shop-bills v-if="dialogTitle=='账单流水'" ref="refName" :operateId="operateId"></shop-bills>
        <shop-joinrecord v-if="dialogTitle=='参加的活动'" ref="refName" :operateId="operateId"></shop-joinrecord>
        <shop-joinrecord v-if="dialogTitle=='参加的活动'" ref="refName" :operateId="operateId"></shop-joinrecord>
        <shop-withdrawrec v-if="dialogTitle=='提现记录'" ref="refName" :operateId="operateId"></shop-withdrawrec>
        <shop-withdrawrec v-if="dialogTitle=='提现记录'" ref="refName" :operateId="operateId"></shop-withdrawrec>
+       <shop-product-fee v-if="dialogTitle=='产品费率'" ref="refName" :operateId="operateId"></shop-product-fee>
     </el-dialog>
     </el-dialog>
 
 
     <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
     <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
@@ -57,7 +58,7 @@
                  可提现金额:
                  可提现金额:
                 <div
                 <div
                   style="background-color: #00aa7f;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">
                   style="background-color: #00aa7f;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">
-                  {{scope.row.withdrawTotalPrice}}
+                  {{scope.row.withdrawCharge}}
                 </div>
                 </div>
               </div>
               </div>
 
 
@@ -163,6 +164,9 @@
         <el-button type="text" size="small" icon="el-icon-view" plain class="none-border"
         <el-button type="text" size="small" icon="el-icon-view" plain class="none-border"
           @click.stop="openDialog(scope.row.id,'提现记录')">提现记录
           @click.stop="openDialog(scope.row.id,'提现记录')">提现记录
         </el-button>
         </el-button>
+        <el-button v-if="userInfo.role_name === 'administrator'" type="text" size="small" icon="el-icon-edit" plain class="none-border"
+           @click.stop="openDialog(scope.row.id,'产品费率')" :disabled="$isEmpty(scope.row.merchantNo)">产品费率
+        </el-button>
       </template>
       </template>
     </avue-crud>
     </avue-crud>
   </basic-container>
   </basic-container>
@@ -190,10 +194,11 @@
   import shopBills from "./comps/shop-bills.vue"
   import shopBills from "./comps/shop-bills.vue"
   import shopJoinrecord from "./comps/shop-joinrecord.vue"
   import shopJoinrecord from "./comps/shop-joinrecord.vue"
   import shopWithdrawrec from "./comps/shop-withdrawrec.vue"
   import shopWithdrawrec from "./comps/shop-withdrawrec.vue"
+  import shopProductFee from "./comps/shop-product-fee"
 
 
   export default {
   export default {
     components:{
     components:{
-      shopMember,shopBills,shopJoinrecord,shopWithdrawrec
+      shopMember,shopBills,shopJoinrecord,shopWithdrawrec,shopProductFee
     },
     },
     data() {
     data() {
       return {
       return {
@@ -241,7 +246,7 @@
             {
             {
               prop: "dataInfo",
               prop: "dataInfo",
               slot: true,
               slot: true,
-              width: 300,
+              width: 400,
               display: false,
               display: false,
               label: "数据统计"
               label: "数据统计"
             },
             },
@@ -513,7 +518,7 @@
             },
             },
             {
             {
               label: "可提现金额",
               label: "可提现金额",
-              prop: "withdrawTotalPrice",
+              prop: "withdrawCharge",
               type: "number",
               type: "number",
               hide:true,
               hide:true,
               display: false,
               display: false,
@@ -718,7 +723,7 @@
       }
       }
     },
     },
     computed: {
     computed: {
-      ...mapGetters(["permission"]),
+      ...mapGetters(["userInfo","permission"]),
       permissionList() {
       permissionList() {
         return {
         return {
           addBtn: this.vaildData(this.permission.shop_add, false),
           addBtn: this.vaildData(this.permission.shop_add, false),

+ 13 - 2
src/views/system/param.vue

@@ -13,8 +13,10 @@
                    plain
                    plain
                    @click="handleDelete">删 除
                    @click="handleDelete">删 除
         </el-button>
         </el-button>
-        <el-button size="small"
+        <el-button type="primary"
+                   size="small"
                    icon="iconfont iconicon_subordinate"
                    icon="iconfont iconicon_subordinate"
+                   plain
                    @click="handleMenu(done)">
                    @click="handleMenu(done)">
           选择租户默认角色菜单参数
           选择租户默认角色菜单参数
         </el-button>
         </el-button>
@@ -42,6 +44,11 @@
                :close-on-click-modal="false"
                :close-on-click-modal="false"
                :visible.sync="box"
                :visible.sync="box"
                width="450px">
                width="450px">
+      <el-select v-model="menuTenantSelect" size="mini" style="width: 100%" @change="getCheckMenuValue">
+        <el-option value="tenant.mall.menuJSON" label="商场租户默认菜单"></el-option>
+        <el-option value="tenant.agent.menuJSON" label="代理租户默认菜单"></el-option>
+      </el-select>
+      <el-divider/>
       <el-tree :data="menuGrantList"
       <el-tree :data="menuGrantList"
                show-checkbox
                show-checkbox
                node-key="id"
                node-key="id"
@@ -72,7 +79,9 @@ export default window.$crudCommon({
     return {
     return {
       box: false,
       box: false,
       btnLoading: false,
       btnLoading: false,
+      menuTenantSelect:"tenant.mall.menuJSON",
       menuGrantList: [],
       menuGrantList: [],
+      menuTreeObj:[],
       jsonText: "",
       jsonText: "",
       props: {
       props: {
         label: "title",
         label: "title",
@@ -93,6 +102,7 @@ export default window.$crudCommon({
   methods: {
   methods: {
     handleMenu() {
     handleMenu() {
       this.box = true;
       this.box = true;
+      this.menuTenantSelect = "tenant.mall.menuJSON";
       this.jsonText = "";
       this.jsonText = "";
       this.menuTreeObj = [];
       this.menuTreeObj = [];
       grantTree().then(res => {
       grantTree().then(res => {
@@ -149,9 +159,10 @@ export default window.$crudCommon({
      */
      */
     getCheckMenuValue() {
     getCheckMenuValue() {
       detail({
       detail({
-        paramKey: "tenant.default.menuJSON"
+        paramKey: this.menuTenantSelect
       }).then(res => {
       }).then(res => {
         if (res.data.data) {
         if (res.data.data) {
+          this.menuTreeObj = [];
           const menuJSON = JSON.parse(res.data.data.paramValue);
           const menuJSON = JSON.parse(res.data.data.paramValue);
           this.getChildMenuKeys(menuJSON, this.menuTreeObj);
           this.getChildMenuKeys(menuJSON, this.menuTreeObj);
           this.$refs.treeMenu.setCheckedKeys(this.menuTreeObj);
           this.$refs.treeMenu.setCheckedKeys(this.menuTreeObj);

+ 23 - 0
src/views/system/tenant.vue

@@ -108,6 +108,29 @@ export default {
               trigger: "blur"
               trigger: "blur"
             }]
             }]
           },
           },
+          {
+            label: "租户类型",
+            prop: "tenantType",
+            type: "select",
+            dicData:[{
+              label:"管理员",
+              value:"ADMIN"
+            },{
+              label:"商场租户",
+              value:"MALL"
+            },{
+              label:"代理租户",
+              value:"AGENT"
+            }],
+            width: 100,
+            search: true,
+            span: 24,
+            rules: [{
+              required: true,
+              message: "请选择租户类型",
+              trigger: "blur"
+            }]
+          },
           {
           {
             label: "租户名称",
             label: "租户名称",
             prop: "tenantName",
             prop: "tenantName",

+ 535 - 0
src/views/wel/agentIndex.vue

@@ -0,0 +1,535 @@
+<template>
+  <div>
+    <el-row>
+      <el-col :span="24">
+        <third-register></third-register>
+      </el-col>
+    </el-row>
+    <el-row>
+      <basic-container>
+        <el-col :span="24">
+          <avue-form :option="agentInfo.accountInfo.option" v-model="agentInfo.accountInfo.agentData">
+            <template slot-scope="scope" slot="avatar">
+              <avue-avatar :size="50" shape="circle" icon="el-icon-circle-plus-outline"
+                           :src="agentInfo.accountInfo.agentData.avatar"
+                           style="border: 1px solid #eee"/>
+              <span class="mallName">{{ agentInfo.accountInfo.agentData.accountName }}</span>
+            </template>
+            <template slot-scope="scope" slot="totalBalance">
+              <span>{{ agentInfo.accountInfo.agentData.totalBalance }} 元</span>
+            </template>
+            <template slot-scope="scope" slot="availableValance">
+              <span>{{ agentInfo.accountInfo.agentData.availableValance }} 元</span>
+            </template>
+          </avue-form>
+        </el-col>
+      </basic-container>
+    </el-row>
+    <el-row>
+      <el-col :span="24">
+        <basic-container>
+          <el-card class="box-card">
+            <avue-data-panel :option="optionTotal"></avue-data-panel>
+          </el-card>
+          <div style="margin-top: 30px;">
+            <h3>今日新增</h3>
+            <avue-data-display :option="optionToday"></avue-data-display>
+          </div>
+          <div style="margin-top: 30px;">
+            <h3>新增趋势
+              <el-date-picker
+                size="mini"
+                :picker-options="tenantAddTrend.pickerOptions"
+                v-model="tenantAddTrend.time"
+                type="month"
+                @change="getTenantAddTrend"
+                value-format="yyyy-MM"
+                placeholder="选择月"
+                style="float: right">
+              </el-date-picker>
+            </h3>
+            <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
+          </div>
+          <div style="margin-top: 30px;">
+            <h3>代理账单
+              <el-date-picker
+                size="mini"
+                :picker-options="tenantPlatformBills.pickerOptions"
+                v-model="tenantPlatformBills.time"
+                type="month"
+                @change="getTenantPlatformBills"
+                value-format="yyyy-MM"
+                placeholder="选择月"
+                style="float: right">
+              </el-date-picker>
+            </h3>
+            <div ref="tenantPlatformBills" style="height: 500px;width: 100%"></div>
+          </div>
+        </basic-container>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+<script>
+import moment from "moment";
+import {mapGetters} from "vuex";
+import * as echarts from 'echarts';
+import {
+  getAgentInfo,
+  getAgentTenantAddTrend,
+  getAgentTenantCensusCount,
+  getTenantAgentBills,
+  getAgentTenantTodayCensusCount,
+} from '@/api/census/census';
+
+export default {
+  data() {
+    return {
+      agentInfo: {
+        isLimitHeight: true,
+        accountInfo: {
+          agentData: {},
+          option: {
+            detail: true,
+            labelPosition: "left",
+            group: [
+              {
+                label: '代理信息',
+                prop: 'agentInfo',
+                icon: 'el-icon-s-custom',
+                column: [
+                  {
+                    prop: "avatar",
+                    span: 24,
+                    slot: true,
+                    labelWidth: 0,
+                  },
+                  {
+                    label: '账户总余额',
+                    span: 8,
+                    prop: 'totalBalance',
+                    slot: true,
+                  },
+                  {
+                    label: '可提现余额',
+                    span: 8,
+                    prop: 'availableValance',
+                    slot: true,
+                  },
+                  {
+                    label: '用户身份',
+                    span: 8,
+                    prop: 'userType',
+                  },
+                ]
+              }
+            ]
+          }
+        },
+      },
+      optionTotal: {
+        span: 12,
+        data: [
+          {
+            click: () => {
+              this.$router.push({path: "/ldt_agent/agentrecord"});
+            },
+            title: '商店总数',
+            count: 0,
+            icon: 'el-icon-s-shop',
+            color: 'rgb(27, 201, 142)',
+          },
+          {
+            click: () => {
+              this.$router.push({path: "/ldt_agent/agentbills"});
+            },
+            title: '收入总额',
+            count: 0,
+            decimals: 2,
+            icon: 'el-icon-s-marketing',
+            color: '#f37b1d',
+          },
+        ]
+      },
+      optionToday: {
+        span: 12,
+        data: [
+          {
+            click: () => {
+              this.$router.push({path: "/ldt_shop/shop"});
+            },
+            count: 0,
+            title: '新增商户',
+          },
+          {
+            click: () => {
+              this.$router.push({path: "/ldt_bills/platformbills"});
+            },
+            count: 0,
+            decimals: 2,
+            title: '今日收入',
+          },
+        ]
+      },
+      tenantAddTrend: {
+        dom: null,
+        time: moment(Date.now()).format("yyyy-MM"),
+        pickerOptions: {
+          disabledDate(time) {
+            return time.getTime() > Date.now()
+          }
+        },
+        option: {
+          legend: {},
+          tooltip: {
+            trigger: 'axis',
+            showContent: false
+          },
+          dataset: {
+            source: [
+              ['trend'],
+              ['商户新增'],
+            ],
+            path: [ "/ldt_agent/agentrecord"]
+          },
+          xAxis: {type: 'category'},
+          yAxis: {gridIndex: 0, splitNumber: 2},
+          // grid: {top: '55%'},
+          series: [
+            {
+              type: 'line',
+              smooth: true,
+              seriesLayoutBy: 'row',
+              emphasis: {focus: 'series'},
+            },
+            // {
+            //   type: 'pie',
+            //   id: 'pie',
+            //   radius: '30%',
+            //   center: ['50%', '25%'],
+            //   emphasis: {
+            //     focus: 'self'
+            //   },
+            //   label: {
+            //     formatter: '{b}: {@2012} ({d}%)'
+            //   },
+            //   encode: {
+            //     itemName: 'trend',
+            //     value: moment(Date.now()).format("yyyy-MM-DD"),
+            //     tooltip: moment(Date.now()).format("yyyy-MM-DD")
+            //   }
+            // }
+          ]
+        }
+      },
+      tenantPlatformBills: {
+        dom: null,
+        time: moment(Date.now()).format("yyyy-MM"),
+        pickerOptions: {
+          disabledDate(time) {
+            return time.getTime() > Date.now()
+          }
+        },
+        option: {
+          legend: {},
+          tooltip: {
+            trigger: 'axis',
+            showContent: true
+          },
+          xAxis: [{
+            data: []
+          }],
+          yAxis: {gridIndex: 0, splitNumber: 10},
+          grid: {top: '15%'},
+          series: [
+            {
+              name: '代理收益',
+              type: 'line',
+              smooth: true,
+              seriesLayoutBy: 'row',
+              data: []
+            },
+          ]
+        }
+      },
+    }
+  },
+  computed: {
+    ...
+      mapGetters(["userInfo"]),
+  },
+  mounted() {
+    this.init();
+  },
+  methods: {
+    //初始化方法
+    init() {
+      this.getAgentInfo();
+      this.getTenantCensusCount();
+      this.getTenantTodayCensusCount();
+      this.getTenantAddTrend();
+      this.getTenantPlatformBills();
+    },
+    //删除数组的某个元素
+    deleteArrayByObj(arr,attrName,...value){
+      value.forEach(ele=>{
+        for (let i = 0;i < arr.length; i++){
+          const column = arr[i];
+          if (ele === column[attrName]){
+            arr.splice(i,1);
+          }
+        }
+      });
+    },
+    //获取租户数据统计
+    getTenantCensusCount() {
+      //获取租户数量
+      getAgentTenantCensusCount().then(res => {
+        this.setArrayObjAttrByObj(this.optionTotal.data,"title","商店总数","count",res.data.data.shopCount);
+        this.setArrayObjAttrByObj(this.optionTotal.data,"title","收入总额","count",res.data.data.incomeTotal);
+      });
+    },
+    //获取租户当日数据统计
+    getTenantTodayCensusCount() {
+      //获取租户数量
+      getAgentTenantTodayCensusCount().then(res => {
+        this.setArrayObjAttrByObj(this.optionToday.data,"title","新增商户","count",res.data.data.shopCount);
+        this.setArrayObjAttrByObj(this.optionToday.data,"title","今日收入","count",res.data.data.incomeTotal);
+      });
+    },
+    //设置数组对象属性值
+    setArrayObjAttrByObj(arr,attrName,attrValue,key,value){
+      arr.forEach(ele=>{
+        if(ele[attrName]===attrValue){
+          ele[key] = value;
+          return;
+        }
+      });
+    },
+    //获取租户平台新增趋势
+    getTenantAddTrend() {
+      let time = moment(this.tenantAddTrend.time);
+      //获取租户数量
+      getAgentTenantAddTrend({
+        time: time.format("yyyy-MM-DD HH:mm:ss")
+      }).then(res => {
+        //清空内容
+        for(let i=0;i<this.tenantAddTrend.option.dataset.source.length;i++){
+          this.tenantAddTrend.option.dataset.source[i].splice(1);
+        }
+
+        //获取某月总天数
+        const day = time.format("yyyy-MM") === moment(Date.now()).format("yyyy-MM") ? Number(moment(Date.now()).format("DD"))
+          : new Date(time.format("yyyy"), time.format("MM"), 0).getDate();
+
+        for (let i = 0; i < day; i++) {
+          //添加日期X坐标
+          const date = time.format("yyyy-MM-DD");
+          this.tenantAddTrend.option.dataset.source[0].push(date);
+
+          //添加Y坐标
+          //添加商户新增
+          this.setAddTrend(res.data.data.shopAddCount,date,"商户新增");
+
+          //加上一天
+          time.add(1, 'days');
+        }
+
+        //第一次渲染
+        if (this.tenantAddTrend.dom === null) {
+          this.tenantAddTrend.dom = echarts.init(this.$refs.tenantAddTrend);
+
+          //添加坐标点击
+          this.tenantAddTrend.dom.on('updateAxisPointer', (event) => {
+            const xAxisInfo = event.axesInfo[0];
+            if (xAxisInfo) {
+              const dimension = xAxisInfo.value + 1;
+              this.tenantAddTrend.dom.setOption({
+                series: {
+                  id: 'pie',
+                  label: {
+                    formatter: '{b}: {@[' + dimension + ']} ({d}%)'
+                  },
+                  encode: {
+                    value: dimension,
+                    tooltip: dimension
+                  }
+                }
+              });
+            }
+          });
+
+          //添加饼图点击
+          this.tenantAddTrend.dom.on('click', (params) => {
+            if (params.componentSubType === "pie") {
+              this.$router.push({path: this.tenantAddTrend.option.dataset.path[params.dataIndex]});
+            }
+          });
+
+          //适应屏幕变化
+          window.addEventListener("resize", () => {
+            this.tenantAddTrend.dom.resize()
+          });
+        }
+
+        this.tenantAddTrend.dom.setOption(this.tenantAddTrend.option);
+      });
+    },
+    //设置趋势
+    setAddTrend(arr,date,attrName){
+      //添加Y坐标
+      let count = 0;
+      //添加用户新增
+      arr.forEach(ele => {
+        if (ele.time === date) {
+          count = ele.count;
+        }
+      });
+      this.tenantAddTrend.option.dataset.source.forEach(ele=>{
+        if(ele[0]===attrName){
+          ele.push(count);
+        }
+      });
+    },
+    //获取租户代理收益趋势
+    getTenantPlatformBills() {
+      let time = moment(this.tenantPlatformBills.time);
+      //获取租户数量
+      getTenantAgentBills({
+        time: time.format("yyyy-MM-DD HH:mm:ss")
+      }).then(res => {
+        //清空内容
+        this.tenantPlatformBills.option.xAxis[0].data = [];
+        this.tenantPlatformBills.option.series.forEach(ele => {
+          ele.data = [];
+        });
+
+        //获取某月总天数
+        const day = time.format("yyyy-MM") === moment(Date.now()).format("yyyy-MM") ? Number(moment(Date.now()).format("DD"))
+          : new Date(time.format("yyyy"), time.format("MM"), 0).getDate();
+
+        for (let i = 0; i < day; i++) {
+          //添加日期X坐标
+          const date = time.format("yyyy-MM-DD");
+          this.tenantPlatformBills.option.xAxis[0].data.push(date);
+
+          //添加金额Y坐标
+          this.tenantPlatformBills.option.series[0].data.push(this.getPriceByDate(res.data.data.agentIncomeBills, date));
+
+          //加上一天
+          time.add(1, 'days');
+        }
+
+        //第一次渲染
+        if (this.tenantPlatformBills.dom === null) {
+          this.tenantPlatformBills.dom = echarts.init(this.$refs.tenantPlatformBills);
+          //适应屏幕变化
+          window.addEventListener("resize", () => {
+            this.tenantPlatformBills.dom.resize()
+          });
+        }
+
+        this.tenantPlatformBills.dom.setOption(this.tenantPlatformBills.option);
+      });
+    },
+    /**
+     * 根据日期获取金额
+     */
+    getPriceByDate(array, date) {
+      let price = 0;
+      array.forEach(ele => {
+        if (ele.time === date) {
+          price = ele.price;
+        }
+      });
+      return price;
+    }
+    ,
+    getAgentInfo() {
+      getAgentInfo({}).then(res => {
+        this.agentInfo.accountInfo.agentData = res.data.data;
+      });
+    },
+    changeAccountType(res) {
+      switch (res) {
+        case 'SETTLE_ACCOUNT':
+          return "待结算账户";
+        case 'FUND_ACCOUNT':
+          return "商户资金账户";
+        case 'MARKET_ACCOUNT':
+          return "营销账户";
+        case 'DIVIDE_ACCOUNT':
+          return "待分账账户";
+        case 'FEE_ACCOUNT':
+          return "手续费账户";
+        default:
+          return "";
+      }
+    },
+    changeAccountStatus(res) {
+      switch (res) {
+        case 'AVAILABLE':
+          return "可用";
+        case 'FROZEN':
+          return "冻结";
+        case 'FROZEN_CREDIT':
+          return "冻结止收";
+        case 'FROZEN_DEBIT':
+          return "冻结止付";
+        case 'CANCELLATION':
+          return "销户";
+        default:
+          return "";
+      }
+    },
+    handleClose(done) {
+      this.$confirm('确认关闭?')
+        .then(_ => {
+          done();
+        })
+        .catch(_ => {
+        });
+    },
+    rechargeSubmit(row, done) {
+      rechargeSubmit(row).then((res) => {
+        //回显账单
+        this.rechargeTable.data = res.data.data;
+        this.rechargeTable.data.remark = row.remark;
+        this.rechargeTable.status = true;
+
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        done();
+      });
+    },
+  }
+}
+</script>
+<style scoped="scoped">
+.recharge-btn {
+  color: deepskyblue;
+  margin-left: 10px;
+}
+
+.recharge-btn:hover {
+  cursor: pointer;
+  color: red;
+  text-decoration: underline;
+  font-weight: bold;
+  font-size: medium;
+}
+
+.mallName {
+  font-family: inherit;
+  font-size: inherit;
+  border-color: #E4E7ED;
+  color: #606266;
+  margin-left: 15px;
+  text-align: center;
+}
+</style>

+ 54 - 279
src/views/wel/index.vue

@@ -5,67 +5,6 @@
         <third-register></third-register>
         <third-register></third-register>
       </el-col>
       </el-col>
     </el-row>
     </el-row>
-    <el-row v-if="merchant.isShow">
-      <basic-container>
-        <el-col :span="12">
-          <avue-form :option="merchant.accountInfo.option" v-model="merchant.accountInfo.data">
-            <template slot-scope="scope" slot="totalAccountBalance">
-              <span>{{ merchant.accountInfo.data.totalAccountBalance }} 元</span>
-              <span class="recharge-btn" @click="rechargeForm.isRechargeShow = true">充值</span>
-            </template>
-          </avue-form>
-        </el-col>
-        <el-drawer
-          title="充值信息" :append-to-body="true"
-          :close-on-press-escape="false"
-          :wrapperClosable="false"
-          :visible.sync="rechargeForm.isRechargeShow"
-          :direction="rechargeForm.direction"
-          :before-close="handleClose">
-          <avue-form ref="form" v-model="obj" :option="rechargeForm.option" @reset-change="emptytChange"
-                     @submit="submit">
-          </avue-form>
-          <el-table :data="tableData" style="width: 100%;margin-top: 140px;">
-            <el-table-column label="充值成功信息" header-align="center" align="center">
-              <el-table-column prop="payer" label="付款方信息"/>
-              <el-table-column prop="receiver" label="收款方信息"/>
-            </el-table-column>
-<!--            <el-table-column label="付款方信息">
-              <template slot-scope="scope">
-                <span>为保证充值正常入账,银行汇款时务必在附言或备注处填写此码;</span>
-              </template>
-            </el-table-column>-->
-          </el-table>
-        </el-drawer>
-        <el-col :span="12">
-          <div role="tab" aria-expanded="true" aria-controls="el-collapse-content-8236"
-               aria-describedby="el-collapse-content-8236" style="margin-top:4px;border-bottom: 1px solid #eee;">
-            <div role="button" id="el-collapse-head-8236" tabindex="0" class="el-collapse-item__header is-active">
-              <div class="avue-group__header avue-group"><i class="el-icon-s-order avue-group__icon"></i>
-                <h1 class="avue-group__title">账户信息</h1>
-              </div>
-            </div>
-          </div>
-          <el-table :data="merchant.accountBalanceInfo.data" stripe style="width: 100%">
-            <el-table-column prop="accountType" label="账户类型">
-              <template slot-scope="scope">
-                <span v-text="changeAccountType(scope.row.accountType)"/>
-              </template>
-            </el-table-column>
-            <el-table-column prop="balance" label="余额">
-              <template slot-scope="scope">
-                <span>{{ scope.row.balance }} 元</span>
-              </template>
-            </el-table-column>
-            <el-table-column prop="accountStatus" label="账户状态">
-              <template slot-scope="scope">
-                <span v-text="changeAccountStatus(scope.row.accountStatus)"/>
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-col>
-      </basic-container>
-    </el-row>
     <el-row>
     <el-row>
       <el-col :span="24">
       <el-col :span="24">
         <basic-container>
         <basic-container>
@@ -91,7 +30,7 @@
             </h3>
             </h3>
             <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
             <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
           </div>
           </div>
-          <div style="margin-top: 30px;" v-if="userInfo.role_name==='administrator'">
+          <div style="margin-top: 30px;">
             <h3>平台账单
             <h3>平台账单
               <el-date-picker
               <el-date-picker
                 size="mini"
                 size="mini"
@@ -116,7 +55,6 @@ import moment from "moment";
 import {mapGetters} from "vuex";
 import {mapGetters} from "vuex";
 import * as echarts from 'echarts';
 import * as echarts from 'echarts';
 import {
 import {
-  getAccountInfo,
   getTenantAddTrend,
   getTenantAddTrend,
   getTenantCensusCount,
   getTenantCensusCount,
   getTenantPlatformBills,
   getTenantPlatformBills,
@@ -126,45 +64,6 @@ import {
 export default {
 export default {
   data() {
   data() {
     return {
     return {
-      merchant: {
-        isShow: false,
-        accountInfo: {
-          data: {},
-          option: {
-            detail: true,
-            labelPosition: "left",
-            group: [
-              {
-                label: '商户信息',
-                prop: 'merchantInfo',
-                icon: 'el-icon-s-custom',
-                column: [
-                  {
-                    label: '易宝商户号',
-                    span: 24,
-                    prop: 'merchantNo',
-                    labelWidth: 90,
-                  },
-                  {
-                    label: '总余额',
-                    span: 24,
-                    prop: 'totalAccountBalance',
-                    formslot: true,
-                  },
-                ]
-              }
-            ]
-          }
-        },
-        accountBalanceInfo: {
-          data: [],
-          option: {}
-        },
-        rechargeOption: {
-          data: {},
-          option: {}
-        },
-      },
       optionTotal: {
       optionTotal: {
         span: 4,
         span: 4,
         data: [
         data: [
@@ -425,96 +324,55 @@ export default {
           ]
           ]
         }
         }
       },
       },
-      rechargeForm: {
-        isRechargeShow: false,
-        direction: "rtl",
-        option: {
-          labelPosition: "left",
-          group: [
-            {
-              prop: 'rechargeInfo',
-              column: [
-                {
-                  label: '充值金额',
-                  span: 24,
-                  prop: 'amount',
-                  labelWidth: 90,
-                  type: 'number',
-                  precision: 2,
-                },
-                {
-                  label: '备注',
-                  span: 24,
-                  prop: 'remark',
-                  type: "textarea"
-                },
-              ]
-            }
-          ]
-        }
-      },
-      tableData: [{
-        payer: '汇款金额:{{}} 元',
-        receiver: '全称:易宝支付有限公司',
-      }, {
-        payer: '汇款备注:{{}}',
-        receiver: '汇款账号:210401294',
-      }, {
-        payer: '汇款备注码',
-        receiver: '开户银行:中国银行',
-      }]
     }
     }
   },
   },
   computed: {
   computed: {
     ...
     ...
       mapGetters(["userInfo"]),
       mapGetters(["userInfo"]),
-  }
-  ,
+  },
   mounted() {
   mounted() {
     this.init();
     this.init();
-  }
-  ,
+  },
   methods: {
   methods: {
     //初始化方法
     //初始化方法
     init() {
     init() {
       this.getTenantCensusCount();
       this.getTenantCensusCount();
       this.getTenantTodayCensusCount();
       this.getTenantTodayCensusCount();
       this.getTenantAddTrend();
       this.getTenantAddTrend();
-      this.getAccountInfo();
-      //判断是否是管理员
-      if (this.userInfo) {
-        if (this.userInfo.role_name === 'administrator') {
-          this.getTenantPlatformBills();
-        } else {
-          this.merchant.isShow = true;
-        }
-      }
-    }
-    ,
+      this.getTenantPlatformBills();
+    },
+
     //获取租户数据统计
     //获取租户数据统计
     getTenantCensusCount() {
     getTenantCensusCount() {
       //获取租户数量
       //获取租户数量
       getTenantCensusCount().then(res => {
       getTenantCensusCount().then(res => {
-        this.optionTotal.data[0].count = res.data.data.mallCount;
-        this.optionTotal.data[1].count = res.data.data.shopCount;
-        this.optionTotal.data[2].count = res.data.data.userCount;
-        this.optionTotal.data[3].count = res.data.data.agentCount;
-        this.optionTotal.data[4].count = res.data.data.rechargeTotal;
+        this.setArrayObjAttrByObj(this.optionTotal.data, "title", "商场总数", "count", res.data.data.mallCount);
+        this.setArrayObjAttrByObj(this.optionTotal.data, "title", "商店总数", "count", res.data.data.shopCount);
+        this.setArrayObjAttrByObj(this.optionTotal.data, "title", "用户总数", "count", res.data.data.userCount);
+        this.setArrayObjAttrByObj(this.optionTotal.data, "title", "代理总数", "count", res.data.data.agentCount);
+        this.setArrayObjAttrByObj(this.optionTotal.data, "title", "充值总数", "count", res.data.data.rechargeTotal);
       });
       });
-    }
-    ,
+    },
     //获取租户当日数据统计
     //获取租户当日数据统计
     getTenantTodayCensusCount() {
     getTenantTodayCensusCount() {
       //获取租户数量
       //获取租户数量
       getTenantTodayCensusCount().then(res => {
       getTenantTodayCensusCount().then(res => {
-        this.optionToday.data[0].count = res.data.data.mallCount;
-        this.optionToday.data[1].count = res.data.data.shopCount;
-        this.optionToday.data[2].count = res.data.data.userCount;
-        this.optionToday.data[3].count = res.data.data.agentCount;
-        this.optionToday.data[4].count = res.data.data.rechargeTotal;
+        this.setArrayObjAttrByObj(this.optionToday.data, "title", "新增商场", "count", res.data.data.mallCount);
+        this.setArrayObjAttrByObj(this.optionToday.data, "title", "新增商户", "count", res.data.data.shopCount);
+        this.setArrayObjAttrByObj(this.optionToday.data, "title", "新增用户", "count", res.data.data.userCount);
+        this.setArrayObjAttrByObj(this.optionToday.data, "title", "新增代理", "count", res.data.data.agentCount);
+        this.setArrayObjAttrByObj(this.optionToday.data, "title", "今日充值", "count", res.data.data.rechargeTotal);
       });
       });
-    }
-    ,
+    },
+    //设置数组对象属性值
+    setArrayObjAttrByObj(arr, attrName, attrValue, key, value) {
+      arr.forEach(ele => {
+        if (ele[attrName] === attrValue) {
+          ele[key] = value;
+          return;
+        }
+      });
+    },
     //获取租户平台新增趋势
     //获取租户平台新增趋势
     getTenantAddTrend() {
     getTenantAddTrend() {
       let time = moment(this.tenantAddTrend.time);
       let time = moment(this.tenantAddTrend.time);
@@ -523,12 +381,9 @@ export default {
         time: time.format("yyyy-MM-DD HH:mm:ss")
         time: time.format("yyyy-MM-DD HH:mm:ss")
       }).then(res => {
       }).then(res => {
         //清空内容
         //清空内容
-        this.tenantAddTrend.option.dataset.source[0] = ["trend"];
-        this.tenantAddTrend.option.dataset.source[1] = ['用户新增'];
-        this.tenantAddTrend.option.dataset.source[2] = ['商户新增'];
-        this.tenantAddTrend.option.dataset.source[3] = ['代理新增'];
-        this.tenantAddTrend.option.dataset.source[4] = ['商场新增'];
-        this.tenantAddTrend.option.dataset.source[5] = ['会员新增'];
+        for (let i = 0; i < this.tenantAddTrend.option.dataset.source.length; i++) {
+          this.tenantAddTrend.option.dataset.source[i].splice(1);
+        }
 
 
         //获取某月总天数
         //获取某月总天数
         const day = time.format("yyyy-MM") === moment(Date.now()).format("yyyy-MM") ? Number(moment(Date.now()).format("DD"))
         const day = time.format("yyyy-MM") === moment(Date.now()).format("yyyy-MM") ? Number(moment(Date.now()).format("DD"))
@@ -540,46 +395,16 @@ export default {
           this.tenantAddTrend.option.dataset.source[0].push(date);
           this.tenantAddTrend.option.dataset.source[0].push(date);
 
 
           //添加Y坐标
           //添加Y坐标
-          let count = 0;
           //添加用户新增
           //添加用户新增
-          res.data.data.userAddCount.forEach(ele => {
-            if (ele.time === date) {
-              count = ele.count;
-            }
-          });
-          this.tenantAddTrend.option.dataset.source[1].push(count);
+          this.setAddTrend(res.data.data.userAddCount, date, "用户新增");
           //添加商户新增
           //添加商户新增
-          count = 0;
-          res.data.data.shopAddCount.forEach(ele => {
-            if (ele.time === date) {
-              count = ele.count;
-            }
-          });
-          this.tenantAddTrend.option.dataset.source[2].push(count);
+          this.setAddTrend(res.data.data.shopAddCount, date, "商户新增");
           //添加代理新增
           //添加代理新增
-          count = 0;
-          res.data.data.agentAddCount.forEach(ele => {
-            if (ele.time === date) {
-              count = ele.count;
-            }
-          });
-          this.tenantAddTrend.option.dataset.source[3].push(count);
+          this.setAddTrend(res.data.data.agentAddCount, date, "代理新增");
           //添加商场新增
           //添加商场新增
-          count = 0;
-          res.data.data.mallAddCount.forEach(ele => {
-            if (ele.time === date) {
-              count = ele.count;
-            }
-          });
-          this.tenantAddTrend.option.dataset.source[4].push(count);
+          this.setAddTrend(res.data.data.mallAddCount, date, "商场新增");
           //添加会员新增
           //添加会员新增
-          count = 0;
-          res.data.data.memberAddCount.forEach(ele => {
-            if (ele.time === date) {
-              count = ele.count;
-            }
-          });
-          this.tenantAddTrend.option.dataset.source[5].push(count);
+          this.setAddTrend(res.data.data.memberAddCount, date, "会员新增");
 
 
           //加上一天
           //加上一天
           time.add(1, 'days');
           time.add(1, 'days');
@@ -624,8 +449,23 @@ export default {
 
 
         this.tenantAddTrend.dom.setOption(this.tenantAddTrend.option);
         this.tenantAddTrend.dom.setOption(this.tenantAddTrend.option);
       });
       });
-    }
-    ,
+    },
+    //设置趋势
+    setAddTrend(arr, date, attrName) {
+      //添加Y坐标
+      let count = 0;
+      //添加用户新增
+      arr.forEach(ele => {
+        if (ele.time === date) {
+          count = ele.count;
+        }
+      });
+      this.tenantAddTrend.option.dataset.source.forEach(ele => {
+        if (ele[0] === attrName) {
+          ele.push(count);
+        }
+      });
+    },
     //获取租户平台收益趋势
     //获取租户平台收益趋势
     getTenantPlatformBills() {
     getTenantPlatformBills() {
       let time = moment(this.tenantPlatformBills.time);
       let time = moment(this.tenantPlatformBills.time);
@@ -669,8 +509,7 @@ export default {
 
 
         this.tenantPlatformBills.dom.setOption(this.tenantPlatformBills.option);
         this.tenantPlatformBills.dom.setOption(this.tenantPlatformBills.option);
       });
       });
-    }
-    ,
+    },
     /**
     /**
      * 根据日期获取金额
      * 根据日期获取金额
      */
      */
@@ -682,71 +521,7 @@ export default {
         }
         }
       });
       });
       return price;
       return price;
-    }
-    ,
-    getAccountInfo() {
-      getAccountInfo({}).then(res => {
-        this.merchant.accountInfo.data = res.data.data;
-        this.merchant.accountBalanceInfo.data = res.data.data.accountInfoList;
-      });
-    }
-    ,
-    changeAccountType(res) {
-      switch (res) {
-        case 'SETTLE_ACCOUNT':
-          return "待结算账户";
-        case 'FUND_ACCOUNT':
-          return "商户资金账户";
-        case 'MARKET_ACCOUNT':
-          return "营销账户";
-        case 'DIVIDE_ACCOUNT':
-          return "待分账账户";
-        case 'FEE_ACCOUNT':
-          return "手续费账户";
-        default:
-          return "";
-      }
-    }
-    ,
-    changeAccountStatus(res) {
-      switch (res) {
-        case 'AVAILABLE':
-          return "可用";
-        case 'FROZEN':
-          return "冻结";
-        case 'FROZEN_CREDIT':
-          return "冻结止收";
-        case 'FROZEN_DEBIT':
-          return "冻结止付";
-        case 'CANCELLATION':
-          return "销户";
-        default:
-          return "";
-      }
-    }
-    ,
-    handleClose(done) {
-      this.$confirm('确认关闭?')
-        .then(_ => {
-          done();
-        })
-        .catch(_ => {
-        });
-    }
+    },
   }
   }
 }
 }
 </script>
 </script>
-<style scoped="scoped">
-.recharge-btn {
-  color: deepskyblue;
-  margin-left: 10px;
-}
-
-.recharge-btn:hover {
-  cursor: pointer;
-  color: red;
-  text-decoration: underline;
-  font-weight: bold;
-  font-size: medium;
-}
-</style>

+ 716 - 0
src/views/wel/mallIndex.vue

@@ -0,0 +1,716 @@
+<template>
+  <div>
+    <el-row>
+      <el-col :span="24">
+        <third-register></third-register>
+      </el-col>
+    </el-row>
+    <el-row>
+      <basic-container>
+        <el-col :span="12">
+          <avue-form :option="merchant.accountInfo.option" v-model="merchant.accountInfo.mallData">
+            <template slot-scope="scope" slot="logo">
+              <avue-avatar :size="50" shape="circle" icon="el-icon-circle-plus-outline"
+                           :src="merchant.accountInfo.mallData.logo"
+                           style="border: 1px solid #eee"/>
+              <span class="mallName">{{ merchant.accountInfo.mallData.mallName }}</span>
+            </template>
+            <template slot-scope="scope" slot="totalAccountBalance">
+              <span>{{ merchant.accountInfo.yeePayData.totalAccountBalance }} 元</span>
+              <span class="recharge-btn" @click="rechargeForm.isRechargeShow = true">充值</span>
+            </template>
+            <template slot-scope="scope" slot="intro">
+              <el-popover placement="top-start" title="商场描述:" width="400" trigger="hover"
+                          :content="merchant.accountInfo.mallData.intro">
+                <span>{{ merchant.accountInfo.mallData.intro }}</span>
+                <p slot="reference"
+                   style="overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width: 600px; color: #606266;margin: 0;">
+                  {{ merchant.accountInfo.mallData.intro }}</p>
+              </el-popover>
+            </template>
+          </avue-form>
+        </el-col>
+        <el-drawer
+          title="充值信息" :append-to-body="true"
+          :close-on-press-escape="false"
+          :wrapperClosable="false"
+          :visible.sync="rechargeForm.isRechargeShow"
+          :direction="rechargeForm.direction"
+          :before-close="handleClose">
+          <avue-form ref="form" :option="rechargeForm.option"
+                     @submit="rechargeSubmit">
+          </avue-form>
+          <table border="1" cellpadding="5" bordercolor="#898989" v-if="rechargeTable.status"
+                 :style="rechargeTable.style">
+            <tr v-for="(item,index) in rechargeTable.option" :key="`${index}`">
+              <th v-if="item2.type==='th'" v-for="(item2,index2) in item" :key="`${index+index2}`"
+                  :colspan="item2.colspan?item2.colspan:1" :style="item2.style">
+                <span v-html="item2.name"></span>{{ (typeof item2.value) === "function" ? item2.value() : item2.value }}
+              </th>
+              <th v-if="item2.type==='td'" v-for="(item2,index2) in item" :key="`${index+index2}`"
+                  :colspan="item2.colspan?item2.colspan:1" :style="item2.style">
+                <span v-html="item2.name"></span>{{ (typeof item2.value) === "function" ? item2.value() : item2.value }}
+              </th>
+            </tr>
+          </table>
+        </el-drawer>
+        <el-col :span="12">
+          <div role="tab" aria-expanded="true" aria-controls="el-collapse-content-8236"
+               aria-describedby="el-collapse-content-8236" style="margin-top:4px;border-bottom: 1px solid #eee;">
+            <div role="button" id="el-collapse-head-8236" tabindex="0" class="el-collapse-item__header is-active">
+              <div class="avue-group__header avue-group"><i class="el-icon-s-order avue-group__icon"></i>
+                <h1 class="avue-group__title">账户信息</h1>
+              </div>
+            </div>
+          </div>
+          <el-table :data="merchant.accountBalanceInfo.data" stripe style="width: 100%">
+            <el-table-column prop="accountType" label="账户类型">
+              <template slot-scope="scope">
+                <span v-text="changeAccountType(scope.row.accountType)"/>
+              </template>
+            </el-table-column>
+            <el-table-column prop="balance" label="余额">
+              <template slot-scope="scope">
+                <span>{{ scope.row.balance }} 元</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="accountStatus" label="账户状态">
+              <template slot-scope="scope">
+                <span v-text="changeAccountStatus(scope.row.accountStatus)"/>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-col>
+      </basic-container>
+    </el-row>
+    <el-row>
+      <el-col :span="24">
+        <basic-container>
+          <el-card class="box-card">
+            <avue-data-panel :option="optionTotal"></avue-data-panel>
+          </el-card>
+          <div style="margin-top: 30px;">
+            <h3>今日新增</h3>
+            <avue-data-display :option="optionToday"></avue-data-display>
+          </div>
+          <div style="margin-top: 30px;">
+            <h3>新增趋势
+              <el-date-picker
+                size="mini"
+                :picker-options="tenantAddTrend.pickerOptions"
+                v-model="tenantAddTrend.time"
+                type="month"
+                @change="getTenantAddTrend"
+                value-format="yyyy-MM"
+                placeholder="选择月"
+                style="float: right">
+              </el-date-picker>
+            </h3>
+            <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
+          </div>
+        </basic-container>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+<script>
+import moment from "moment";
+import {mapGetters} from "vuex";
+import * as echarts from 'echarts';
+import {
+  getAccountInfo,
+  getTenantAddTrend,
+  getTenantCensusCount,
+  getTenantTodayCensusCount,
+  rechargeSubmit
+} from '@/api/census/census';
+
+export default {
+  data() {
+    return {
+      merchant: {
+        isLimitHeight: true,
+        accountInfo: {
+          yeePayData: {},
+          mallData: {},
+          option: {
+            detail: true,
+            labelPosition: "left",
+            group: [
+              {
+                label: '商场信息',
+                prop: 'merchantInfo',
+                icon: 'el-icon-s-custom',
+                column: [
+                  {
+                    prop: "logo",
+                    span: 24,
+                    slot: true,
+                    labelWidth: 0,
+                  },
+                  {
+                    label: '易宝商户号',
+                    span: 12,
+                    prop: 'merchantNo',
+                    labelWidth: 90,
+                  },
+                  {
+                    label: '总余额',
+                    span: 12,
+                    prop: 'totalAccountBalance',
+                    slot: true,
+                  },
+                  {
+                    label: '负责人名称',
+                    span: 12,
+                    prop: 'personName',
+                    labelWidth: 90,
+                  },
+                  {
+                    label: '联系方式',
+                    span: 12,
+                    prop: 'personTel',
+                    labelWidth: 90,
+                  },
+                  {
+                    label: "商场描述",
+                    prop: "intro",
+                    span: 24,
+                    slot: true,
+                  }
+                ]
+              }
+            ]
+          }
+        },
+        accountBalanceInfo: {
+          data: [],
+          option: {}
+        },
+        rechargeOption: {
+          data: {},
+          option: {}
+        },
+      },
+      optionTotal: {
+        span: 8,
+        data: [
+          {
+            click: () => {
+              this.$router.push({path: "/ldt_shop/shop"});
+            },
+            title: '商店总数',
+            count: 0,
+            icon: 'el-icon-s-shop',
+            color: 'rgb(27, 201, 142)',
+          },
+          {
+            click: () => {
+              this.$router.push({path: "/ldt_user/loginuser"});
+            },
+            title: '用户总数',
+            count: 0,
+            icon: 'el-icon-user-solid',
+            color: 'rgb(230, 71, 88)',
+          },
+          {
+            click: () => {
+              this.$router.push({path: "/ldt_bills/bills"});
+            },
+            title: '充值总额',
+            count: 0,
+            decimals: 2,
+            icon: 'el-icon-s-finance',
+            color: '#1cbbb4',
+          },
+        ]
+      },
+      optionToday: {
+        span: 8,
+        data: [
+          {
+            click: () => {
+              this.$router.push({path: "/ldt_shop/shop"});
+            },
+            count: 0,
+            title: '新增商户',
+          },
+          {
+            click: () => {
+              this.$router.push({path: "/ldt_user/loginuser"});
+            },
+            count: 0,
+            title: '新增用户',
+          },
+          {
+            click: () => {
+              this.$router.push({path: "/ldt_bills/bills"});
+            },
+            count: 0,
+            decimals: 2,
+            title: '今日充值',
+          },
+        ]
+      },
+      tenantAddTrend: {
+        dom: null,
+        time: moment(Date.now()).format("yyyy-MM"),
+        pickerOptions: {
+          disabledDate(time) {
+            return time.getTime() > Date.now()
+          }
+        },
+        option: {
+          legend: {},
+          tooltip: {
+            trigger: 'axis',
+            showContent: false
+          },
+          dataset: {
+            source: [
+              ['trend'],
+              ['用户新增'],
+              ['商户新增'],
+              ['会员新增']
+            ],
+            path: ["/ldt_user/loginuser", "/ldt_shop/shop", "/ldt_user/member"]
+          },
+          xAxis: {type: 'category'},
+          yAxis: {gridIndex: 0, splitNumber: 2},
+          grid: {top: '55%'},
+          series: [
+            {
+              type: 'line',
+              smooth: true,
+              seriesLayoutBy: 'row',
+              emphasis: {focus: 'series'},
+            },
+            {
+              type: 'line',
+              smooth: true,
+              seriesLayoutBy: 'row',
+              emphasis: {focus: 'series'}
+            },
+            {
+              type: 'line',
+              smooth: true,
+              seriesLayoutBy: 'row',
+              emphasis: {focus: 'series'}
+            },
+            {
+              type: 'line',
+              smooth: true,
+              seriesLayoutBy: 'row',
+              emphasis: {focus: 'series'}
+            },
+            {
+              type: 'line',
+              smooth: true,
+              seriesLayoutBy: 'row',
+              emphasis: {focus: 'series'}
+            },
+            {
+              type: 'pie',
+              id: 'pie',
+              radius: '30%',
+              center: ['50%', '25%'],
+              emphasis: {
+                focus: 'self'
+              },
+              label: {
+                formatter: '{b}: {@2012} ({d}%)'
+              },
+              encode: {
+                itemName: 'trend',
+                value: moment(Date.now()).format("yyyy-MM-DD"),
+                tooltip: moment(Date.now()).format("yyyy-MM-DD")
+              }
+            }
+          ]
+        }
+      },
+      rechargeForm: {
+        isRechargeShow: false,
+        direction: "rtl",
+        option: {
+          labelPosition: "right",
+          group: [
+            {
+              prop: 'rechargeInfo',
+              column: [
+                {
+                  label: '充值金额',
+                  span: 24,
+                  prop: 'amount',
+                  labelWidth: 90,
+                  type: 'number',
+                  precision: 2,
+                  tip: '为保证充值正常入账,银行汇款时汇款金额需为充值金额!',
+                  tipPlacement: "top",
+                  rules: [{
+                    required: true,
+                    message: "请输入充值金额",
+                    trigger: "blur"
+                  }]
+                },
+                {
+                  label: '备注',
+                  span: 24,
+                  prop: 'remark',
+                  type: "textarea",
+                  rules: [{
+                    required: false,
+                    message: "请输入备注",
+                    trigger: "blur"
+                  }]
+                },
+              ]
+            }
+          ]
+        }
+      },
+      rechargeTable: {
+        status: false,
+        style: {
+          width: "95%",
+          margin: "100px 20px 10px 10px",
+          color: "#898989",
+          fontSize: "0.7rem",
+          fontWeight: "bold",
+          textAlign: "left"
+        },
+        data: {
+          remark: "",
+          orderAmount: 0,
+          remitComment: "",
+        },
+        option: [
+          [
+            {
+              name: "银行汇款单",
+              type: "th",
+              colspan: 2,
+              style: {
+                textAlign: "center",
+                backgroundColor: "#efefef",
+              }
+            }
+          ],
+          [
+            {
+              name: "付款方信息",
+              type: "td",
+            },
+            {
+              name: "收款方信息",
+              type: "td"
+            },
+          ],
+          [
+            {
+              name: "全&emsp;&emsp;称:",
+              type: "td",
+              value: ""
+            },
+            {
+              name: "全&emsp;&emsp;称:",
+              type: "td",
+              value: "易宝支付有限公司"
+            },
+          ],
+          [
+            {
+              name: "汇出账号:",
+              type: "td",
+              value: "(保密)"
+            },
+            {
+              name: "汇款账号:",
+              type: "td",
+              value: "210401294"
+            },
+          ],
+          [
+            {
+              name: "开户银行:",
+              type: "td",
+              value: "(保密)"
+            },
+            {
+              name: "开户银行:",
+              type: "td",
+              value: "中国人民银行"
+            },
+          ],
+          [
+            {
+              name: "汇款金额:",
+              type: "td",
+              value: () => this.rechargeTable.data.orderAmount,
+              colspan: 2
+            },
+          ],
+          [
+            {
+              name: "用途/摘要/备注:",
+              type: "td",
+              value: () => this.rechargeTable.data.remark,
+              colspan: 2
+            },
+          ],
+          [
+            {
+              name: "汇款备注码:",
+              type: "td",
+              value: () => this.rechargeTable.data.remitComment,
+              colspan: 2
+            },
+          ],
+          [
+            {
+              name: "注意:",
+              type: "td",
+              value: "为保证充值正常入账,银行汇款时务必在附言或备注处填写此码;",
+              colspan: 2,
+              style: {
+                color: "red",
+                textDecoration: "underline"
+              }
+            },
+          ],
+        ]
+      }
+    }
+  },
+  computed: {
+    ...
+      mapGetters(["userInfo"]),
+  },
+  mounted() {
+    this.init();
+  },
+  methods: {
+    //初始化方法
+    init() {
+      this.getTenantCensusCount();
+      this.getTenantTodayCensusCount();
+      this.getTenantAddTrend();
+      this.getAccountInfo();
+    },
+    //删除数组的某个元素
+    deleteArrayByObj(arr,attrName,...value){
+      value.forEach(ele=>{
+        for (let i = 0;i < arr.length; i++){
+          const column = arr[i];
+          if (ele === column[attrName]){
+            arr.splice(i,1);
+          }
+        }
+      });
+    },
+    //获取租户数据统计
+    getTenantCensusCount() {
+      //获取租户数量
+      getTenantCensusCount().then(res => {
+        this.setArrayObjAttrByObj(this.optionTotal.data,"title","商店总数","count",res.data.data.shopCount);
+        this.setArrayObjAttrByObj(this.optionTotal.data,"title","用户总数","count",res.data.data.userCount);
+        this.setArrayObjAttrByObj(this.optionTotal.data,"title","充值总数","count",res.data.data.rechargeTotal);
+      });
+    },
+    //获取租户当日数据统计
+    getTenantTodayCensusCount() {
+      //获取租户数量
+      getTenantTodayCensusCount().then(res => {
+        this.setArrayObjAttrByObj(this.optionToday.data,"title","新增商户","count",res.data.data.shopCount);
+        this.setArrayObjAttrByObj(this.optionToday.data,"title","新增用户","count",res.data.data.userCount);
+        this.setArrayObjAttrByObj(this.optionToday.data,"title","今日充值","count",res.data.data.rechargeTotal);
+      });
+    },
+    //设置数组对象属性值
+    setArrayObjAttrByObj(arr,attrName,attrValue,key,value){
+      arr.forEach(ele=>{
+        if(ele[attrName]===attrValue){
+          ele[key] = value;
+          return;
+        }
+      });
+    },
+    //获取租户平台新增趋势
+    getTenantAddTrend() {
+      let time = moment(this.tenantAddTrend.time);
+      //获取租户数量
+      getTenantAddTrend({
+        time: time.format("yyyy-MM-DD HH:mm:ss")
+      }).then(res => {
+        //清空内容
+        for(let i=0;i<this.tenantAddTrend.option.dataset.source.length;i++){
+          this.tenantAddTrend.option.dataset.source[i].splice(1);
+        }
+
+        //获取某月总天数
+        const day = time.format("yyyy-MM") === moment(Date.now()).format("yyyy-MM") ? Number(moment(Date.now()).format("DD"))
+          : new Date(time.format("yyyy"), time.format("MM"), 0).getDate();
+
+        for (let i = 0; i < day; i++) {
+          //添加日期X坐标
+          const date = time.format("yyyy-MM-DD");
+          this.tenantAddTrend.option.dataset.source[0].push(date);
+
+          //添加Y坐标
+          //添加用户新增
+          this.setAddTrend(res.data.data.userAddCount,date,"用户新增");
+          //添加商户新增
+          this.setAddTrend(res.data.data.shopAddCount,date,"商户新增");
+          //添加会员新增
+          this.setAddTrend(res.data.data.memberAddCount,date,"会员新增");
+
+          //加上一天
+          time.add(1, 'days');
+        }
+
+        //第一次渲染
+        if (this.tenantAddTrend.dom === null) {
+          this.tenantAddTrend.dom = echarts.init(this.$refs.tenantAddTrend);
+
+          //添加坐标点击
+          this.tenantAddTrend.dom.on('updateAxisPointer', (event) => {
+            const xAxisInfo = event.axesInfo[0];
+            if (xAxisInfo) {
+              const dimension = xAxisInfo.value + 1;
+              this.tenantAddTrend.dom.setOption({
+                series: {
+                  id: 'pie',
+                  label: {
+                    formatter: '{b}: {@[' + dimension + ']} ({d}%)'
+                  },
+                  encode: {
+                    value: dimension,
+                    tooltip: dimension
+                  }
+                }
+              });
+            }
+          });
+
+          //添加饼图点击
+          this.tenantAddTrend.dom.on('click', (params) => {
+            if (params.componentSubType === "pie") {
+              this.$router.push({path: this.tenantAddTrend.option.dataset.path[params.dataIndex]});
+            }
+          });
+
+          //适应屏幕变化
+          window.addEventListener("resize", () => {
+            this.tenantAddTrend.dom.resize()
+          });
+        }
+
+        this.tenantAddTrend.dom.setOption(this.tenantAddTrend.option);
+      });
+    },
+    //设置趋势
+    setAddTrend(arr,date,attrName){
+      //添加Y坐标
+      let count = 0;
+      //添加用户新增
+      arr.forEach(ele => {
+        if (ele.time === date) {
+          count = ele.count;
+        }
+      });
+      this.tenantAddTrend.option.dataset.source.forEach(ele=>{
+        if(ele[0]===attrName){
+          ele.push(count);
+        }
+      });
+    },
+    getAccountInfo() {
+      getAccountInfo({}).then(res => {
+        this.merchant.accountInfo.yeePayData = res.data.data.yeePayInfo;
+        this.merchant.accountBalanceInfo.data = res.data.data.yeePayInfo.accountInfoList;
+        this.merchant.accountInfo.mallData = res.data.data.mall;
+      });
+    },
+    changeAccountType(res) {
+      switch (res) {
+        case 'SETTLE_ACCOUNT':
+          return "待结算账户";
+        case 'FUND_ACCOUNT':
+          return "商户资金账户";
+        case 'MARKET_ACCOUNT':
+          return "营销账户";
+        case 'DIVIDE_ACCOUNT':
+          return "待分账账户";
+        case 'FEE_ACCOUNT':
+          return "手续费账户";
+        default:
+          return "";
+      }
+    },
+    changeAccountStatus(res) {
+      switch (res) {
+        case 'AVAILABLE':
+          return "可用";
+        case 'FROZEN':
+          return "冻结";
+        case 'FROZEN_CREDIT':
+          return "冻结止收";
+        case 'FROZEN_DEBIT':
+          return "冻结止付";
+        case 'CANCELLATION':
+          return "销户";
+        default:
+          return "";
+      }
+    },
+    handleClose(done) {
+      this.$confirm('确认关闭?')
+        .then(_ => {
+          done();
+        })
+        .catch(_ => {
+        });
+    },
+    rechargeSubmit(row, done) {
+      rechargeSubmit(row).then((res) => {
+        //回显账单
+        this.rechargeTable.data = res.data.data;
+        this.rechargeTable.data.remark = row.remark;
+        this.rechargeTable.status = true;
+
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        done();
+      });
+    },
+  }
+}
+</script>
+<style scoped="scoped">
+.recharge-btn {
+  color: deepskyblue;
+  margin-left: 10px;
+}
+
+.recharge-btn:hover {
+  cursor: pointer;
+  color: red;
+  text-decoration: underline;
+  font-weight: bold;
+  font-size: medium;
+}
+
+.mallName {
+  font-family: inherit;
+  font-size: inherit;
+  border-color: #E4E7ED;
+  color: #606266;
+  margin-left: 15px;
+  text-align: center;
+}
+</style>