Jelajahi Sumber

对账管理及部分功能

chen 3 tahun lalu
induk
melakukan
1af1e811b8

+ 27 - 4
src/App.vue

@@ -16,8 +16,31 @@
 
 <script>
 export default {
-  name: 'App',
-
-
-}
+  name: "App",
+  data() {
+    return {};
+  },
+  watch: {
+    $route: {
+      handler: function (route) {
+        let id = setInterval(() => {
+          if (route.path !== "/login") {
+            this.$notify.info({
+              title: "自定义位置",
+              message: "右下角弹出的消息",
+              position: "bottom-right",
+              duration: 0,
+              // onClose: id(),
+            });
+            clearInterval(id);
+          } else {
+            // clearInterval(id);
+          }
+        }, 3000);
+      },
+      // immediate: true,
+    },
+  },
+  created() {},
+};
 </script>

+ 8 - 0
src/api/engin_deposit/refund_list.js

@@ -24,3 +24,11 @@ export function getDepositManageExamine(data) {
     data,
   });
 }
+// 押金管理导出
+export function getDepositManagExport(params) {
+  return request({
+    url: "/deposit-manage/export",
+    method: "get",
+    params,
+  });
+}

+ 34 - 0
src/api/finance/account_list.js

@@ -0,0 +1,34 @@
+import request from "@/utils/request";
+
+// 台账列表
+export function getFinanceStandingBookList(params) {
+  return request({
+    url: "/finance/standing/book/list",
+    method: "get",
+    params,
+  });
+}
+// 一键对账
+export function getFinanceStandingBookCheck(params) {
+  return request({
+    url: "/finance/standing/book/check",
+    method: "POST",
+    params,
+  });
+}
+// 经销商列表
+export function getCustomerList(params) {
+  return request({
+    url: "/customer/list",
+    method: "get",
+    params,
+  });
+}
+// 经销商钱包列表
+export function getWalletCustomerList(params) {
+  return request({
+    url: "/wallet/customer/list",
+    method: "get",
+    params,
+  });
+}

+ 142 - 143
src/permission.js

@@ -1,77 +1,77 @@
-import router from './router'
-import {resetRouter} from './router'
-import store from './store'
-import { Message } from 'element-ui'
-import NProgress from 'nprogress' // progress bar
-import 'nprogress/nprogress.css' // progress bar style
-import { getToken } from '@/utils/auth' // get token from cookie
-import getPageTitle from '@/utils/get-page-title'
-import Layout from '@/layout'
-const _import = require('./router/_import_' + process.env.NODE_ENV) // 获取组件的方法
+import router from "./router";
+import { resetRouter } from "./router";
+import store from "./store";
+import { Message } from "element-ui";
+import NProgress from "nprogress"; // progress bar
+import "nprogress/nprogress.css"; // progress bar style
+import { getToken } from "@/utils/auth"; // get token from cookie
+import getPageTitle from "@/utils/get-page-title";
+import Layout from "@/layout";
+const _import = require("./router/_import_" + process.env.NODE_ENV); // 获取组件的方法
 
-NProgress.configure({ showSpinner: false }) // NProgress Configuration
+NProgress.configure({ showSpinner: false }); // NProgress Configuration
 
-const whiteList = ['/login'] // no redirect whitelist
+const whiteList = ["/login"]; // no redirect whitelist
 
-router.beforeEach(async(to, from, next) => {
+router.beforeEach(async (to, from, next) => {
   // start progress bar
-  NProgress.start()
+  NProgress.start();
 
   // set page title
-  document.title = getPageTitle(to.meta.title)
+  document.title = getPageTitle(to.meta.title);
 
   // determine whether the user has logged in
-  const hasToken = getToken()
+  const hasToken = getToken();
   if (hasToken) {
-    if (to.path === '/login') {
+    if (to.path === "/login") {
       // if is logged in, redirect to the home page
-      next({ path: '/' })
-      NProgress.done()
+      next({ path: "/" });
+      NProgress.done();
     } else {
-      const hasGetUserInfo = store.getters.name
+      const hasGetUserInfo = store.getters.name;
       if (hasGetUserInfo) {
-        next()
+        next();
       } else {
         try {
           // get user info
-          await store.dispatch('user/getInfo')
+          await store.dispatch("user/getInfo");
 
           // 请求获取路由表
-          await store.dispatch('user/getRouter')
+          await store.dispatch("user/getRouter");
           if (store.getters.menus.length < 1) {
-            global.antRouter = []
-            next()
+            global.antRouter = [];
+            next();
           }
 
           // 设置路由
-          var newRoutes = []
+          var newRoutes = [];
           for (var route of store.getters.menus) {
-            const item = buildRootRoute(route)
-            newRoutes.push(item)
+            const item = buildRootRoute(route);
+            newRoutes.push(item);
           }
           // newRoutes.shift();
 
           // 添加一项根目录重定向页面
-          if(newRoutes[0].path != '/') {
+          if (newRoutes[0].path != "/") {
             let path = newRoutes[0].path;
-            if(newRoutes[0].children.length > 0) {
-              path = `${path}/${newRoutes[0].children[0].path}`
+            if (newRoutes[0].children.length > 0) {
+              path = `${path}/${newRoutes[0].children[0].path}`;
             }
-            if(newRoutes[0].children[0].children.length > 0) {
-              path = `${path}/${newRoutes[0].children[0].children[0].path}`
+            if (newRoutes[0].children[0].children.length > 0) {
+              path = `${path}/${newRoutes[0].children[0].children[0].path}`;
             }
             newRoutes.unshift({
-              path: '/',
+              path: "/",
               component: Layout,
-              redirect: path
-            })
-          }else {
-            newRoutes[0].redirect = '/dashboard'
+              redirect: path,
+            });
+          } else {
+            newRoutes[0].redirect = "/dashboard";
           }
 
           console.log(newRoutes);
-          router.addRoutes(newRoutes) // 2.动态添加路由
-          global.antRouter = newRoutes // 3.将路由数据传递给全局变量,做侧边栏菜单渲染工作
+          router.addRoutes(newRoutes); // 2.动态添加路由
+          global.antRouter = newRoutes; // 3.将路由数据传递给全局变量,做侧边栏菜单渲染工作
 
           // const menus = filterAsyncRouter(store.getters.menus) // 1.过滤路由
           // console.log(menus);
@@ -79,15 +79,15 @@ router.beforeEach(async(to, from, next) => {
           // global.antRouter = menus // 3.将路由数据传递给全局变量,做侧边栏菜单渲染工作
           next({
             ...to,
-            replace: true
-          })
+            replace: true,
+          });
           // next()
         } catch (error) {
           // remove token and go to login page to re-login
-          await store.dispatch('user/resetToken')
-          Message.error(error || 'Has Error')
-          next(`/login?redirect=${to.path}`)
-          NProgress.done()
+          await store.dispatch("user/resetToken");
+          Message.error(error || "Has Error");
+          next(`/login?redirect=${to.path}`);
+          NProgress.done();
         }
       }
     }
@@ -96,169 +96,168 @@ router.beforeEach(async(to, from, next) => {
 
     if (whiteList.indexOf(to.path) !== -1) {
       // in the free login whitelist, go directly
-      next()
+      next();
     } else {
       // other pages that do not have permission to access are redirected to the login page.
-      next(`/login?redirect=${to.path}`)
-      NProgress.done()
+      next(`/login?redirect=${to.path}`);
+      NProgress.done();
     }
   }
-})
+});
 
 router.afterEach(() => {
   // finish progress bar
-  NProgress.done()
-})
+  NProgress.done();
+});
 
 // 遍历后台传来的路由字符串,转换为组件对象
 function filterAsyncRouter(asyncRouterMap) {
-  const accessedRouters = asyncRouterMap.filter(route => {
+  const accessedRouters = asyncRouterMap.filter((route) => {
     console.log(route);
     if (route.component) {
-      if (route.component === 'Layout') {
-        route.component = Layout
+      if (route.component === "Layout") {
+        route.component = Layout;
       } else {
-        route.component = _import(route.component) // 导入组件
+        route.component = _import(route.component); // 导入组件
       }
     }
     if (route.children && route.children.length) {
-      route.children = filterAsyncRouter(route.children)
+      route.children = filterAsyncRouter(route.children);
     }
-    return true
-  })
-  return accessedRouters
+    return true;
+  });
+  return accessedRouters;
 }
 
 function buildRootRoute(route) {
-  const { url, icon, moduleName, moduleId, code, type } = route
-  var item = {}
-  item.path = url
-  item.component = Layout
-  item.name = code
+  const { url, icon, moduleName, moduleId, code, type } = route;
+  var item = {};
+  item.path = url;
+  item.component = Layout;
+  item.name = code;
   item.meta = {
     title: moduleName,
-    icon: icon
-  }
-  if(code == 'index') {
-    item.path = '/';
+    icon: icon,
+  };
+  if (code == "index") {
+    item.path = "/";
     item.alwaysShow = false;
     let children = route.children;
     route.children = [];
-    route.children.push(
-      {
-        'code': "dashboard",
-        'moduleName': "首页",
-        'type': 2,
-        'url': '/dashboard',
-        'children': children
-      }
-    )
+    route.children.push({
+      code: "dashboard",
+      moduleName: "首页",
+      type: 2,
+      url: "/dashboard",
+      children: children,
+    });
   }
-  if (code == 'issue') {
+  if (code == "issue") {
     let children = route.children;
     route.children = [];
-    route.children.push(
-      {
-        'code': "issue_index",
-        'moduleName': "文件下发",
-        'type': 2,
-        'url': '/index',
-        'children': children
-      }
-    )
+    route.children.push({
+      code: "issue_index",
+      moduleName: "文件下发",
+      type: 2,
+      url: "/index",
+      children: children,
+    });
     item.alwaysShow = false;
   }
-  if (code == 'notice') {
+  if (code == "notice") {
     let children = route.children;
     route.children = [];
-    route.children.push(
-      {
-        'code': "notice_index",
-        'moduleName': "系统通知",
-        'type': 2,
-        'url': '/index',
-        'children': children
-      }
-    )
+    route.children.push({
+      code: "notice_index",
+      moduleName: "系统通知",
+      type: 2,
+      url: "/index",
+      children: children,
+    });
     item.alwaysShow = false;
   }
-  item.children = []
-  if ((route.hasOwnProperty('children') && type === 1) || code == 'issue' || code == 'notice' || code == 'index') {
+  item.children = [];
+  if (
+    (route.hasOwnProperty("children") && type === 1) ||
+    code == "issue" ||
+    code == "notice" ||
+    code == "index"
+  ) {
     for (var child of route.children) {
-      item.children.push(buildRoute(child, url))
+      item.children.push(buildRoute(child, url));
     }
   }
-  return item
+  return item;
 }
 
 function buildRoute(route, p_url) {
-  const { url, moduleName, icon, moduleId, code, type, hidden } = route
-  var item = {}
-  if(url.substr(0, 1) == '/') {
-    item.path = url.substr(1)
-  }else {
-    item.path = url
+  const { url, moduleName, icon, moduleId, code, type, hidden } = route;
+  var item = {};
+  if (url.substr(0, 1) == "/") {
+    item.path = url.substr(1);
+  } else {
+    item.path = url;
   }
   try {
-    if(code == 'dashboard') {
+    if (code == "dashboard") {
       // item.component = _import(`${url}/index`)
-      item.component = (resolve) => require(["@/views"+`${url}/index`], resolve)
-    }
-    else {
-      item.component = _import(`${p_url}${url}`)
+      item.component = (resolve) =>
+        require(["@/views" + `${url}/index`], resolve);
+    } else {
+      item.component = _import(`${p_url}${url}`);
     }
   } catch (e) {
-    console.log(e)
+    console.log(e);
   }
-  item.name = code
+  item.name = code;
   item.meta = {
     title: moduleName,
-    icon: icon
-  }
-  if((route.children && type == 2)) {
+    icon: icon,
+  };
+  if (route.children && type == 2) {
     let roles = [];
-    for(var role of route.children) {
-      roles.push(role.code)
+    for (var role of route.children) {
+      roles.push(role.code);
     }
     item.meta.roles = roles;
   }
-  item.hidden = hidden
-  item.children = []
-  if (route.hasOwnProperty('children') && type === 1) {
+  item.hidden = hidden;
+  item.children = [];
+  if (route.hasOwnProperty("children") && type === 1) {
     for (var child of route.children) {
-      item.children.push(buildThirdRoute(child, `${p_url}${url}`))
+      item.children.push(buildThirdRoute(child, `${p_url}${url}`));
     }
   }
-  return item
+  return item;
 }
 
 function buildThirdRoute(route, p_url) {
-  const { url, moduleName, icon, moduleId, code, hidden, type } = route
-  var item = {}
-  if(url.substr(0, 1) == '/') {
-    item.path = url.substr(1)
-  }else {
-    tem.path = url
+  const { url, moduleName, icon, moduleId, code, hidden, type } = route;
+  var item = {};
+  if (url.substr(0, 1) == "/") {
+    item.path = url.substr(1);
+  } else {
+    tem.path = url;
   }
   try {
-    item.component = _import(`${p_url}${url}`)
+    item.component = _import(`${p_url}${url}`);
   } catch (e) {
-    console.log(e)
+    console.log(e);
   }
-  item.name = code
+  item.name = code;
 
   item.meta = {
     title: moduleName,
-    icon: icon
-  }
-  if(route.children && type == 2) {
+    icon: icon,
+  };
+  if (route.children && type == 2) {
     let roles = [];
-    for(var role of route.children) {
-      roles.push(role.code)
+    for (var role of route.children) {
+      roles.push(role.code);
     }
     item.meta.roles = roles;
   }
-  item.hidden = hidden
-  item.children = []
-  return item
-}
+  item.hidden = hidden;
+  item.children = [];
+  return item;
+}

+ 1 - 1
src/views/dashboard/index.vue

@@ -263,7 +263,7 @@
           </div>
         </div>
         <div slot="footer" class="dialog-footer">
-          <el-button type="primary" @click="confirmCheck(detailData.id)"
+          <el-button type="primary" @click="confirmCheck(detailData.noticeId)"
             >确认接收</el-button
           >
           <el-button @click="inDialog = false">关 闭</el-button>

+ 29 - 2
src/views/engin_deposit/refund_list.vue

@@ -102,7 +102,9 @@
       <!-- 按钮 -->
       <div class="btn-group clearfix">
         <div class="fr">
-          <el-button type="primary" size="small">导出</el-button>
+          <el-button type="primary" size="small" @click="exportFn"
+            >导出</el-button
+          >
         </div>
       </div>
       <!-- 列表 -->
@@ -116,7 +118,11 @@
             fit
             highlight-current-row
             stripe
+            @selection-change="handleSelectionChange"
           >
+            >
+            <el-table-column type="selection" align="center" width="55">
+            </el-table-column>
             <el-table-column
               align="center"
               label="工程登录编码"
@@ -217,7 +223,11 @@
 </template>
 
 <script>
-import { getDepositManageList } from "@/api/engin_deposit/refund_list";
+import {
+  getDepositManageList,
+  getDepositManagExport,
+} from "@/api/engin_deposit/refund_list";
+import { downloadFiles } from "@/utils/util";
 import RefundListDetail from "./components/refund_list-detail.vue";
 export default {
   components: {
@@ -240,6 +250,7 @@ export default {
       examine: "全部",
       showSurrender: true,
       detailId: "",
+      selectData: [],
     };
   },
   created() {
@@ -260,6 +271,22 @@ export default {
     });
   },
   methods: {
+    //导出
+    exportFn() {
+      if (this.selectData.length) {
+        const arr = [];
+        for (let i = 0; i < this.selectData.length; i++) {
+          arr.push(this.selectData[i].depositManageId);
+        }
+        downloadFiles("/deposit-manage/export", { id: arr });
+      } else {
+        this.$errorMsg("请选择押金项");
+      }
+    },
+    //多选列表数据
+    handleSelectionChange(selectData) {
+      this.selectData = selectData;
+    },
     //重置
     resetFn() {
       this.$refs.searchForm.resetFields();

+ 183 - 32
src/views/finance/account_list.vue

@@ -12,32 +12,81 @@
         >
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="钱包" prop="">
-                <el-select class="selectStyle" placeholder="请选择">
-                  <el-option> </el-option>
+              <el-form-item label="经销商名称" prop="customerId">
+                <el-select
+                  v-model="searchForm.customerId"
+                  class="selectStyle"
+                  placeholder="请选择"
+                  filterable
+                  @change="changeFn"
+                >
+                  <el-option
+                    v-for="(v, i) in customerList"
+                    :key="i"
+                    :label="v.name"
+                    :value="v.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="钱包" prop="customerWalletId">
+                <el-select
+                  v-model="searchForm.customerWalletId"
+                  class="selectStyle"
+                  placeholder="请选择"
+                >
+                  <el-option
+                    v-for="(v, i) in walletList"
+                    :key="i"
+                    :label="v.customerWalletName"
+                    :value="v.customerWalletId"
+                  >
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="单据号" prop="">
-                <el-input placeholder="请输入"></el-input>
+              <el-form-item label="单据号" prop="billNo">
+                <el-input
+                  v-model="searchForm.billNo"
+                  placeholder="请输入"
+                ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="12" :lg="12">
-              <el-form-item label="日期时间" prop="">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="开始时间" prop="startTime">
                 <el-date-picker
-                  type="datetimerange"
-                  range-separator="至"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
+                  class="selectStyle"
+                  v-model="searchForm.startTime"
+                  placeholder="选择日期"
+                  type="datetime"
+                  default-time="00:00:00"
+                  value-format="yyyy-MM-dd HH:mm:ss"
                 >
                 </el-date-picker>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="24" :lg="24">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="结束时间" prop="endTime">
+                <el-date-picker
+                  class="selectStyle"
+                  v-model="searchForm.endTime"
+                  placeholder="选择日期"
+                  type="datetime"
+                  default-time="23:59:59"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="24" :lg="18">
               <el-form-item label="" class="fr">
-                <el-button size="small">清空</el-button>
-                <el-button size="small" type="primary">搜索</el-button>
+                <el-button size="small" @click="clearFn">清空</el-button>
+                <el-button size="small" type="primary" @click="searchFn"
+                  >搜索</el-button
+                >
               </el-form-item>
             </el-col>
           </el-row>
@@ -46,9 +95,16 @@
       <!-- 按钮 -->
       <div class="btn-group clearfix">
         <div class="fl">
-          <el-button type="primary" size="small" @click="reconciliationFn"
+          <el-button
+            :disabled="dataList.length == 0"
+            type="primary"
+            size="small"
+            @click="reconciliationFn"
             >一键对账</el-button
           >
+          <el-button type="primary" size="small" @click="recordFn"
+            >记录</el-button
+          >
         </div>
       </div>
       <!-- 列表 -->
@@ -66,35 +122,41 @@
             <el-table-column
               align="center"
               label="序号"
-              prop=""
-              min-width="160"
+              type="index"
+              width="100"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="月份"
-              prop=""
+              prop="month"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="对账状态"
-              prop=""
+              prop="isReconciliation"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            >
+              <template slot-scope="scope">
+                <el-tag type="danger" v-if="scope.row.isReconciliation == false"
+                  >未对账</el-tag
+                >
+              </template>
+            </el-table-column>
             <el-table-column
               align="center"
               label="客户编码"
-              prop=""
+              prop="customerCode"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="客户名称"
-              prop=""
+              prop="customerName"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
@@ -108,35 +170,35 @@
             <el-table-column
               align="center"
               label="现金钱包类型"
-              prop=""
+              prop="walletName"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="单据类型"
-              prop=""
+              prop="billType"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="单据号"
-              prop=""
+              prop="billNo"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="单据日期"
-              prop=""
+              prop="theTime"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="收付款金额"
-              prop=""
+              prop="amount"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
@@ -150,7 +212,7 @@
             <el-table-column
               align="center"
               label="备注"
-              prop=""
+              prop="remark"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
@@ -159,6 +221,8 @@
         <!-- 分页 -->
         <div class="fr">
           <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
             :current-page="currentPage"
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
@@ -174,6 +238,12 @@
 </template>
 
 <script>
+import {
+  getFinanceStandingBookList,
+  getFinanceStandingBookCheck,
+  getCustomerList,
+  getWalletCustomerList,
+} from "@/api/finance/account_list";
 import AccountListDetail from "./components/account_list-detail";
 export default {
   components: {
@@ -185,16 +255,97 @@ export default {
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
       dataList: [], // 列表数据
-      searchForm: {}, //搜索表单
+      searchForm: {
+        customerId: "",
+        customerWalletId: "",
+        billNo: "",
+        startTime: "",
+        endTime: "",
+      }, //搜索表单
       listLoading: false, // 列表加载loading
       showReconciliation: true,
+      customerList: [],
+      walletList: [],
     };
   },
+  created() {
+    this.getDataList({
+      pageSize: this.pageSize,
+      pageNum: this.currentPage,
+      isReconciliation: false,
+    });
+    this.getCustomerDataList({
+      pageSize: -1,
+      pageNum: 1,
+    });
+  },
   methods: {
-    //一键对账
-    reconciliationFn() {
+    //清空
+    clearFn() {
+      this.$refs.searchForm.resetFields();
+    },
+    //搜索
+    searchFn() {
+      this.getDataList({
+        ...this.searchForm,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        isReconciliation: false,
+      });
+    },
+    //改变经销商
+    async changeFn(v) {
+      this.searchForm.customerWalletId = "";
+      let res = await getWalletCustomerList({ customerId: v });
+      this.walletList = res.data;
+    },
+    //获取经销商数据
+    async getCustomerDataList(data) {
+      const res = await getCustomerList(data);
+      this.customerList = res.data.records;
+    },
+    //记录
+    recordFn() {
       this.showReconciliation = false;
     },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        isReconciliation: false,
+      });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        isReconciliation: false,
+      });
+    },
+    //获取列表
+    async getDataList(data) {
+      let res = await getFinanceStandingBookList(data);
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
+    //一键对账
+    async reconciliationFn() {
+      const res = await getFinanceStandingBookList({
+        pageSize: -1,
+        pageNum: 1,
+      });
+      let arr = res.data.records;
+      let ids = arr.map((v) => v.id);
+      console.log(ids);
+
+      await getFinanceStandingBookCheck({ ids: ids.toString() });
+      this.$message.success("对账成功");
+    },
     seeFN() {
       this.showDetail = false;
     },
@@ -206,4 +357,4 @@ export default {
 .selectStyle {
   width: 100%;
 }
-</style>
+</style>

+ 21 - 15
src/views/finance/change_apply.vue

@@ -6,7 +6,6 @@
     <div>
       <el-form
         ref="searchForm"
-        :rules="rules"
         :model="searchForm"
         label-width="100px"
         size="small"
@@ -21,9 +20,9 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="单据日期" prop="theTime">
               <el-date-picker
+                disabled
                 class="dateStyle"
-                v-model="searchForm.theTime"
-                placeholder="选择日期"
+                placeholder="系统自动生成"
                 type="datetime"
                 value-format="yyyy-MM-dd HH:mm:ss"
               >
@@ -192,19 +191,18 @@ export default {
         customerName: "",
         nickName: "",
         customerNumber: "",
-        theTime: null,
       },
       customerData: [], //经销商数据
       typeList: [], //返利类型数据
-      rules: {
-        theTime: [
-          {
-            required: true,
-            message: "请选择日期",
-            trigger: "change",
-          },
-        ],
-      },
+      // rules: {
+      //   theTime: [
+      //     {
+      //       required: true,
+      //       message: "请选择日期",
+      //       trigger: "change",
+      //     },
+      //   ],
+      // },
     };
   },
   computed: {
@@ -274,7 +272,7 @@ export default {
     //查询同个集团的经销商数据
     async getCustomerData() {
       const res = await getCustomerGroupList();
-      console.log(res, 123214);
+      // console.log(res, 123214);
       this.customerData = res.data;
     },
 
@@ -287,6 +285,7 @@ export default {
       let amount;
 
       await this.$refs.searchForm.validate();
+
       let aaa = this.dataList.find((v) => {
         if (v.money == "") {
           this.$message.error("请输入返利金额");
@@ -301,10 +300,17 @@ export default {
           return v;
         }
       });
-      console.log(aaa);
+
       if (aaa != undefined) {
         return;
       }
+      if (
+        Number(this.dataList[0].money) + Number(this.dataList[1].money) !=
+        0
+      ) {
+        this.$message.error("返利金额不等,请重新输入");
+        return;
+      }
 
       if (this.dataList[0].money > 0) {
         receiverWalletRebateId = this.dataList[0].name;

+ 159 - 30
src/views/finance/components/account_list-detail.vue

@@ -15,31 +15,81 @@
       >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="钱包" prop="">
-              <el-select class="selectStyle" placeholder="请选择">
-                <el-option> </el-option>
+            <el-form-item label="经销商名称" prop="customerId">
+              <el-select
+                v-model="searchForm.customerId"
+                class="selectStyle"
+                placeholder="请选择"
+                filterable
+                @change="changeFn"
+              >
+                <el-option
+                  v-for="(v, i) in customerList"
+                  :key="i"
+                  :label="v.name"
+                  :value="v.id"
+                >
+                </el-option>
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="单据号" prop="">
-              <el-input placeholder="请输入"></el-input>
+            <el-form-item label="钱包" prop="customerWalletId">
+              <el-select
+                v-model="searchForm.customerWalletId"
+                class="selectStyle"
+                placeholder="请选择"
+              >
+                <el-option
+                  v-for="(v, i) in walletList"
+                  :key="i"
+                  :label="v.customerWalletName"
+                  :value="v.customerWalletId"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据号" prop="billNo">
+              <el-input
+                v-model="searchForm.billNo"
+                placeholder="请输入"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="开始时间" prop="">
-              <el-input placeholder="请输入"></el-input>
+            <el-form-item label="开始时间" prop="startTime">
+              <el-date-picker
+                class="selectStyle"
+                v-model="searchForm.startTime"
+                placeholder="选择日期"
+                type="datetime"
+                default-time="00:00:00"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
+              </el-date-picker>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="结束时间" prop="">
-              <el-input placeholder="请输入"></el-input>
+            <el-form-item label="结束时间" prop="endTime">
+              <el-date-picker
+                class="selectStyle"
+                v-model="searchForm.endTime"
+                placeholder="选择日期"
+                type="datetime"
+                default-time="23:59:59"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
+              </el-date-picker>
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="24" :lg="24">
+          <el-col :xs="24" :sm="24" :lg="18">
             <el-form-item label="" class="fr">
-              <el-button size="small">清空</el-button>
-              <el-button size="small" type="primary">搜索</el-button>
+              <el-button size="small" @click="clearFn">清空</el-button>
+              <el-button size="small" type="primary" @click="searchFn"
+                >搜索</el-button
+              >
             </el-form-item>
           </el-col>
         </el-row>
@@ -48,9 +98,7 @@
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fr">
-        <el-button type="primary" size="small" @click="reconciliationFn"
-          >导出</el-button
-        >
+        <el-button type="primary" size="small">导出</el-button>
       </div>
     </div>
     <!-- 列表 -->
@@ -68,35 +116,41 @@
           <el-table-column
             align="center"
             label="序号"
-            prop=""
-            min-width="160"
+            type="index"
+            width="100"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="月份"
-            prop=""
+            prop="month"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="对账状态"
-            prop=""
+            prop="isReconciliation"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          >
+            <template slot-scope="scope">
+              <el-tag type="success" v-if="scope.row.isReconciliation == true"
+                >已对账</el-tag
+              >
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             label="客户编码"
-            prop=""
+            prop="customerCode"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="客户名称"
-            prop=""
+            prop="customerName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -110,35 +164,35 @@
           <el-table-column
             align="center"
             label="现金钱包类型"
-            prop=""
+            prop="walletName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="单据类型"
-            prop=""
+            prop="billType"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="单据号"
-            prop=""
+            prop="billNo"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="单据日期"
-            prop=""
+            prop="theTime"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="收付款金额"
-            prop=""
+            prop="amount"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -152,7 +206,7 @@
           <el-table-column
             align="center"
             label="备注"
-            prop=""
+            prop="remark"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -161,6 +215,8 @@
       <!-- 分页 -->
       <div class="fr">
         <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-sizes="[10, 20, 30, 50]"
           :page-size="10"
@@ -174,6 +230,11 @@
 </template>
 
 <script>
+import {
+  getFinanceStandingBookList,
+  getCustomerList,
+  getWalletCustomerList,
+} from "@/api/finance/account_list";
 export default {
   data() {
     return {
@@ -181,11 +242,79 @@ export default {
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
       dataList: [], // 列表数据
-      searchForm: {}, //搜索表单
+      searchForm: {
+        customerId: "",
+        customerWalletId: "",
+        billNo: "",
+        startTime: "",
+        endTime: "",
+      }, //搜索表单
       listLoading: false, // 列表加载loading
+      customerList: [],
+      walletList: [],
     };
   },
+  created() {
+    this.getDataList({
+      pageSize: this.pageSize,
+      pageNum: this.currentPage,
+      isReconciliation: true,
+    });
+    this.getCustomerDataList({
+      pageSize: -1,
+      pageNum: 1,
+    });
+  },
   methods: {
+    //清空
+    clearFn() {
+      this.$refs.searchForm.resetFields();
+    },
+    //搜索
+    searchFn() {
+      this.getDataList({
+        ...this.searchForm,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        isReconciliation: false,
+      });
+    },
+    //改变经销商
+    async changeFn(v) {
+      this.searchForm.customerWalletId = "";
+      let res = await getWalletCustomerList({ customerId: v });
+      this.walletList = res.data;
+    },
+    //获取经销商数据
+    async getCustomerDataList(data) {
+      const res = await getCustomerList(data);
+      this.customerList = res.data.records;
+    },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        isReconciliation: true,
+      });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        isReconciliation: true,
+      });
+    },
+    //获取列表
+    async getDataList(data) {
+      let res = await getFinanceStandingBookList(data);
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
     goBack() {
       this.$parent.showReconciliation = true;
     },
@@ -197,4 +326,4 @@ export default {
 .selectStyle {
   width: 100%;
 }
-</style>
+</style>

+ 13 - 14
src/views/finance/components/rebate_list-edit.vue

@@ -8,7 +8,6 @@
     <div>
       <el-form
         ref="searchForm"
-        :rules="rules"
         :model="searchForm"
         label-width="100px"
         size="small"
@@ -16,12 +15,12 @@
       >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="返利日期" prop="theTime">
+            <el-form-item label="返利日期" prop="">
               <el-date-picker
+                disabled
                 class="selectStyle"
-                v-model="searchForm.theTime"
                 type="datetime"
-                placeholder="选择日期时间"
+                placeholder="系统自动生成"
                 default-time="23:59:59"
                 value-format="yyyy-MM-dd HH:mm:ss"
               >
@@ -456,15 +455,15 @@ export default {
         remark: "",
       },
       customerData: [],
-      rules: {
-        theTime: [
-          {
-            required: true,
-            message: "请选择返利日期",
-            trigger: "blur",
-          },
-        ],
-      },
+      // rules: {
+      //   theTime: [
+      //     {
+      //       required: true,
+      //       message: "请选择返利日期",
+      //       trigger: "blur",
+      //     },
+      //   ],
+      // },
     };
   },
   created() {
@@ -489,7 +488,7 @@ export default {
     },
     //保存
     async addFn() {
-      await this.$refs.searchForm.validate();
+      // await this.$refs.searchForm.validate();
 
       if (this.state2) {
         this.dataList.forEach((v) => {

+ 7 - 7
src/views/finance/components/receivable_list-add.vue

@@ -38,10 +38,10 @@
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="业务日期" prop="">
               <el-date-picker
+                disabled
                 class="selectStyle"
-                v-model="searchForm.theTime"
                 type="datetime"
-                placeholder="选择日期时间"
+                placeholder="系统自动生成"
                 default-time="23:59:59"
                 value-format="yyyy-MM-dd HH:mm:ss"
               >
@@ -181,9 +181,9 @@
               <el-select v-model="scope.row.walletId" placeholder="请选择">
                 <el-option
                   v-for="item in scope.row.walletList"
-                  :key="item.mainId"
-                  :label="item.name"
-                  :value="item.mainId"
+                  :key="item.customerWalletId"
+                  :label="item.customerWalletName"
+                  :value="item.customerWalletId"
                 >
                 </el-option>
               </el-select>
@@ -292,7 +292,7 @@ export default {
     return {
       searchForm: {
         source: "",
-        theTime: "",
+
         billType: "其他应收单",
         examineStatus: "",
       },
@@ -361,7 +361,7 @@ export default {
         console.log(res);
         v.customerName = res[0].name;
         v.customerNumber = res[0].number;
-        let res2 = v.walletList.filter((j) => j.mainId == v.walletId);
+        let res2 = v.walletList.filter((j) => j.customerWalletId == v.walletId);
         v.customerWalletId = res2[0].customerWalletId;
         v.walletId = res2[0].walletRebateId;
       });

+ 8 - 8
src/views/finance/components/receivable_list-detail.vue

@@ -21,7 +21,7 @@
               <el-input
                 disabled
                 v-model="searchForm.billType"
-                placeholder="请输入"
+                placeholder=""
               ></el-input>
             </el-form-item>
           </el-col>
@@ -30,7 +30,7 @@
               <el-input
                 disabled
                 v-model="searchForm.code"
-                placeholder="请输入"
+                placeholder=""
               ></el-input>
             </el-form-item>
           </el-col>
@@ -39,7 +39,7 @@
               <el-input
                 disabled
                 v-model="searchForm.source"
-                placeholder="请输入"
+                placeholder=""
               ></el-input>
             </el-form-item>
           </el-col>
@@ -48,7 +48,7 @@
               <el-input
                 disabled
                 v-model="searchForm.examineStatus"
-                placeholder="请输入"
+                placeholder=""
               ></el-input>
             </el-form-item>
           </el-col>
@@ -57,7 +57,7 @@
               <el-input
                 disabled
                 v-model="searchForm.theTime"
-                placeholder="请输入"
+                placeholder=""
               ></el-input>
             </el-form-item>
           </el-col>
@@ -66,7 +66,7 @@
               <el-input
                 disabled
                 v-model="searchForm.endTime"
-                placeholder="请输入"
+                placeholder=""
               ></el-input>
             </el-form-item>
           </el-col>
@@ -75,7 +75,7 @@
               <el-input
                 disabled
                 v-model="searchForm.totalAmount"
-                placeholder="请输入"
+                placeholder=""
               ></el-input>
             </el-form-item>
           </el-col>
@@ -84,7 +84,7 @@
               <el-input
                 disabled
                 v-model="searchForm.remark"
-                placeholder="请输入"
+                placeholder=""
               ></el-input>
             </el-form-item>
           </el-col>

+ 0 - 1
src/views/finance/rebate_form.vue

@@ -6,7 +6,6 @@
     <div>
       <el-form
         ref="searchForm"
-        :rules="rules"
         :model="searchForm"
         label-width="100px"
         size="small"

+ 3 - 44
src/views/finance/rebate_list.vue

@@ -144,19 +144,7 @@
               prop="theTime"
               min-width="180"
               show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                <div>
-                  <span>{{ scope.row.theTime }}</span>
-                  <el-button
-                    type="text"
-                    icon="el-icon-edit"
-                    style="padding: 0; margin-left: 6px"
-                    @click="editDate(scope.row)"
-                  ></el-button>
-                </div>
-              </template>
-            </el-table-column>
+            ></el-table-column>
             <el-table-column
               v-if="isCustomer"
               align="center"
@@ -549,10 +537,10 @@
       :detailId="detailId"
       v-else-if="showPage == 7"
     />
-    <EditDateTimeDialog
+    <!-- <EditDateTimeDialog
       :isShow.sync="isShowEditDateDialog"
       :dateForm.sync="dateForm"
-    />
+    /> -->
   </div>
 </template>
 
@@ -560,7 +548,6 @@
 import {
   getRebateOrderList,
   getRebateOrderApply,
-  getRebateOrderUpdate,
 } from "@/api/finance/rebate_list";
 import RebateListApply from "./components/rebate_list-apply.vue";
 import RebateListExamine from "./components/rebate_list-examine.vue";
@@ -568,7 +555,6 @@ import RebateListReview from "./components/rebate_list-review.vue";
 import RebateListDetail from "./components/rebate_list-detail";
 import RebateListConfirm from "./components/rebate_list-confirm";
 import RebateListEdit from "./components/rebate_list-edit.vue";
-import EditDateTimeDialog from "@/components/Common/edit-date-time-dialog.vue";
 
 export default {
   components: {
@@ -578,7 +564,6 @@ export default {
     RebateListReview,
     RebateListConfirm,
     RebateListEdit,
-    EditDateTimeDialog,
   },
   data() {
     return {
@@ -599,11 +584,6 @@ export default {
       isCustomer: null,
       secondId: null,
       isShow: null,
-      isShowEditDateDialog: false,
-      dateForm: {
-        date: "",
-      },
-      editId: null,
     };
   },
   created() {
@@ -619,27 +599,6 @@ export default {
     }
   },
   methods: {
-    // 提交 修改订单日期
-    submitDateForm() {
-      getRebateOrderUpdate({
-        id: this.editId,
-        theTime: this.dateForm.date,
-      }).then((res) => {
-        this.isShowEditDateDialog = false;
-        this.getDataList({
-          pageSize: this.pageSize,
-          pageNum: this.currentPage,
-        });
-        this.$successMsg("修改成功");
-      });
-    },
-    // 打开 修改订单日期
-    editDate(item) {
-      console.log(item);
-      this.editId = item.rebateOrderId;
-      this.dateForm.date = item.theTime;
-      this.isShowEditDateDialog = true;
-    },
     //清除
     cancelFn() {
       this.$refs.searchForm.resetFields();

+ 47 - 38
src/views/finance/standbook_list.vue

@@ -27,12 +27,13 @@
       >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="经销商名称" prop="">
+            <el-form-item label="经销商名称" prop="customerId">
               <el-select
                 class="selectStyle"
                 v-model="searchForm.customerId"
                 placeholder="请选择"
                 filterable
+                @change="changeFn"
               >
                 <el-option
                   v-for="(v, i) in customerList"
@@ -45,16 +46,16 @@
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="钱包" prop="walletRebateId">
+            <el-form-item label="钱包" prop="customerWalletId">
               <el-select
                 class="selectStyle"
-                v-model="searchForm.walletRebateId"
+                v-model="searchForm.customerWalletId"
                 placeholder="请选择"
               >
                 <el-option
-                  v-for="(v, i) in selectList"
+                  v-for="(v, i) in walletList"
                   :key="i"
-                  :label="v.name"
+                  :label="v.customerWalletName"
                   :value="v.customerWalletId"
                 >
                 </el-option>
@@ -401,17 +402,17 @@
             <el-table-column
               align="center"
               label="暂扣返利"
-              prop=""
+              prop="withholdAmount"
               min-width="160"
               show-overflow-tooltip
             >
-              <template slot-scope="scope">
+              <!-- <template slot-scope="scope">
                 {{
                   scope.row.amountType == "OUT"
                     ? scope.row.amount
                     : -scope.row.amount
                 }}
-              </template>
+              </template> -->
             </el-table-column>
             <el-table-column
               align="center"
@@ -459,19 +460,19 @@ export default {
       // dataListRebate: [], // 列表数据
       // dataListLoan: [], // 列表数据
       dataList: [],
-      selectList: [],
-      dictList: [],
+      walletList: [],
+      // dictList: [],
       customerName: null,
       customerNumber: null,
       searchForm: {
         customerId: "",
+        customerWalletId: "",
+        billNo: "",
         startTime: "",
         endTime: "",
-        billNo: "",
-        walletRebateId: "",
       }, //搜索表单
       listLoading: false, // 列表加载loading
-      mainId: null,
+
       bill: "COMMONLY",
     };
   },
@@ -495,10 +496,16 @@ export default {
       });
     }
     this.getCustomerDataList();
-    this.getWalletList();
-    this.getDataDict();
+    // this.getWalletList();
+    // this.getDataDict();
   },
   methods: {
+    //改变经销商
+    async changeFn(v) {
+      this.searchForm.customerWalletId = "";
+      let res = await getWalletCustomerList({ customerId: v });
+      this.walletList = res.data;
+    },
     //获取经销商列表
     async getCustomerDataList() {
       let res = await getCustomerList({
@@ -527,6 +534,7 @@ export default {
         });
       } else {
         this.getDataList({
+          ...this.searchForm,
           pageSize: this.pageSize,
           pageNum: this.currentPage,
           type: this.bill,
@@ -553,6 +561,7 @@ export default {
         });
       } else {
         this.getDataList({
+          ...this.searchForm,
           pageSize: this.pageSize,
           pageNum: this.currentPage,
           type: this.bill,
@@ -561,22 +570,22 @@ export default {
         });
       }
     },
-    //获取品类
-    async getDataDict() {
-      const res = await getDictList({ sysDictEnum: "PRODUCT_TYPE" });
-      console.log(res);
-      this.dictList = res.data;
-    },
+    // //获取品类
+    // async getDataDict() {
+    //   const res = await getDictList({ sysDictEnum: "PRODUCT_TYPE" });
+    //   console.log(res);
+    //   this.dictList = res.data;
+    // },
     //重置
     resetFn() {
-      this.mainId = "";
-      this.searchForm.customerId = "";
+      // this.searchForm.customerId = "";
+      this.walletList = [];
       this.$refs.searchForm.resetFields();
     },
     //查询
     searchFn() {
-      this.customerName = null;
-      this.customerNumber = null;
+      // this.customerName = null;
+      // this.customerNumber = null;
       let res = this.customerList.filter((v) => {
         return v.id == this.searchForm.customerId;
       });
@@ -590,7 +599,7 @@ export default {
       if (this.$route.query.customerName && this.$route.query.customerNumber) {
         this.getDataList({
           ...this.searchForm,
-          mainId: this.mainId,
+
           pageSize: this.pageSize,
           pageNum: this.currentPage,
           type: this.bill,
@@ -602,7 +611,7 @@ export default {
           ...this.searchForm,
           customerName: this.customerName,
           customerNumber: this.customerNumber,
-          mainId: this.mainId,
+
           pageSize: this.pageSize,
           pageNum: this.currentPage,
           type: this.bill,
@@ -610,14 +619,14 @@ export default {
       }
     },
 
-    //钱包数据
-    async getWalletList() {
-      let res = await getWalletCustomerList({
-        customerId: this.customerId,
-        type: this.bill,
-      });
-      this.selectList = res.data;
-    },
+    // //钱包数据
+    // async getWalletList() {
+    //   let res = await getWalletCustomerList({
+    //     customerId: this.customerId,
+    //     type: this.bill,
+    //   });
+    //   this.selectList = res.data;
+    // },
     //切换列表
     checkFn(v) {
       // this.getDataList({
@@ -630,7 +639,7 @@ export default {
       if (this.$route.query.customerName && this.$route.query.customerNumber) {
         this.getDataList({
           ...this.searchForm,
-          mainId: this.mainId,
+
           pageSize: 10,
           pageNum: 1,
           type: v,
@@ -640,7 +649,7 @@ export default {
       } else {
         this.getDataList({
           ...this.searchForm,
-          mainId: this.mainId,
+
           customerName: this.customerName,
           customerNumber: this.customerNumber,
           pageSize: this.pageSize,
@@ -648,7 +657,7 @@ export default {
           type: v,
         });
       }
-      this.getWalletList();
+      // this.getWalletList();
     },
     //
     async getDataList(data) {

+ 116 - 113
src/views/login/index.vue

@@ -9,7 +9,7 @@
           class="login-form"
           auto-complete="on"
           label-position="left"
-         @submit.native.prevent="handleLogin"
+          @submit.native.prevent="handleLogin"
         >
           <div class="flex">
             <div class="image-container">
@@ -46,146 +46,151 @@
                     微信登录
                   </div>
                 </div>
-                  <transition name="slide">
+                <transition name="slide">
                   <div v-if="acitve == 'pas'">
-                  <el-form-item prop="username" class="input-box">
-                    <span class="svg-container">
-                      <el-image
-                        style="width: 20px; height: 20px"
-                        :src="require('@/assets/login/icon_001.png')"
-                        fit="contain "
-                      ></el-image>
-                    </span>
-                    <el-input
-                      ref="username"
-                      v-model="loginForm.username"
-                      placeholder="请输入用户名"
-                      name="username"
-                      type="text"
-                      tabindex="1"
-                      auto-complete="on"
-                    />
-                  </el-form-item>
-
-                  <el-form-item prop="password" class="input-box">
-                    <span class="svg-container">
-                      <el-image
-                        style="width: 20px; height: 20px"
-                        :src="require('@/assets/login/icon_002.png')"
-                        fit="contain "
-                      ></el-image>
-                    </span>
-                    <el-input
-                      :key="passwordType"
-                      ref="password"
-                      v-model="loginForm.password"
-                      :type="passwordType"
-                      placeholder="请输入密码"
-                      name="password"
-                      tabindex="2"
-                      auto-complete="off"
-                      @keyup.enter.native="handleLogin"
-                    />
-                    <span class="show-pwd" @click="showPwd">
-                      <svg-icon
-                        :icon-class="
-                          passwordType === 'password' ? 'eye' : 'eye-open'
-                        "
+                    <el-form-item prop="username" class="input-box">
+                      <span class="svg-container">
+                        <el-image
+                          style="width: 20px; height: 20px"
+                          :src="require('@/assets/login/icon_001.png')"
+                          fit="contain "
+                        ></el-image>
+                      </span>
+                      <el-input
+                        ref="username"
+                        v-model="loginForm.username"
+                        placeholder="请输入用户名"
+                        name="username"
+                        type="text"
+                        tabindex="1"
+                        auto-complete="on"
                       />
-                    </span>
-                  </el-form-item>
+                    </el-form-item>
 
-                  <div class="input-box">
-                    <el-form-item prop="codeValue">
+                    <el-form-item prop="password" class="input-box">
                       <span class="svg-container">
                         <el-image
                           style="width: 20px; height: 20px"
-                          :src="require('@/assets/login/icon_003.png')"
+                          :src="require('@/assets/login/icon_002.png')"
                           fit="contain "
                         ></el-image>
                       </span>
                       <el-input
-                        ref="codeValue"
-                        v-model="loginForm.codeValue"
-                        placeholder="请输入验证码"
-                        name="codeValue"
-                        type="text"
-                        tabindex="3"
+                        :key="passwordType"
+                        ref="password"
+                        v-model="loginForm.password"
+                        :type="passwordType"
+                        placeholder="请输入密码"
+                        name="password"
+                        tabindex="2"
                         auto-complete="off"
                         @keyup.enter.native="handleLogin"
                       />
+                      <span class="show-pwd" @click="showPwd">
+                        <svg-icon
+                          :icon-class="
+                            passwordType === 'password' ? 'eye' : 'eye-open'
+                          "
+                        />
+                      </span>
                     </el-form-item>
-                    <div class="code" @click.stop="getCode">
-                      <img
-                        :src="'data:image/jpeg;base64,' + codeImage"
-                        alt=""
-                      />
+
+                    <div class="input-box">
+                      <el-form-item prop="codeValue">
+                        <span class="svg-container">
+                          <el-image
+                            style="width: 20px; height: 20px"
+                            :src="require('@/assets/login/icon_003.png')"
+                            fit="contain "
+                          ></el-image>
+                        </span>
+                        <el-input
+                          ref="codeValue"
+                          v-model="loginForm.codeValue"
+                          placeholder="请输入验证码"
+                          name="codeValue"
+                          type="text"
+                          tabindex="3"
+                          auto-complete="off"
+                          @keyup.enter.native="handleLogin"
+                        />
+                      </el-form-item>
+                      <div class="code" @click.stop="getCode">
+                        <img
+                          :src="'data:image/jpeg;base64,' + codeImage"
+                          alt=""
+                        />
+                      </div>
                     </div>
-                  </div>
 
-                  <div class="checkbox">
-                    <div class="check-yes">
-                      <el-image
-                        style="width: 16px; height: 16px"
-                        :src="require('@/assets/login/icon_004.png')"
-                        fit="contain "
-                      ></el-image>
-                      <el-image
-                        v-if="isRemenberPw"
-                        class="yes"
-                        style="width: 11px; height: 11px"
-                        :src="require('@/assets/login/icon_005.png')"
-                        fit="contain "
-                      ></el-image>
+                    <div class="checkbox">
+                      <div class="check-yes">
+                        <el-image
+                          style="width: 16px; height: 16px"
+                          :src="require('@/assets/login/icon_004.png')"
+                          fit="contain "
+                        ></el-image>
+                        <el-image
+                          v-if="isRemenberPw"
+                          class="yes"
+                          style="width: 11px; height: 11px"
+                          :src="require('@/assets/login/icon_005.png')"
+                          fit="contain "
+                        ></el-image>
+                      </div>
+                      <el-checkbox v-model="isRemenberPw"
+                        >记住账号密码</el-checkbox
+                      >
                     </div>
-                    <el-checkbox v-model="isRemenberPw"
-                      >记住账号密码</el-checkbox
-                    >
-                  </div>
 
-                  <div class="button-container">
-                    <el-button
-                      :loading="loading"
-                      type="primary"
-                      @click.native.prevent="handleLogin"
-                      >登录</el-button
-                    >
+                    <div class="button-container">
+                      <el-button
+                        :loading="loading"
+                        type="primary"
+                        @click.native.prevent="handleLogin"
+                        >登录</el-button
+                      >
+                    </div>
                   </div>
-                </div>
-                <div v-else class="wei">
-                  <div style="width: 250px; height: 250px">
-                    <!-- <el-image
+                  <div v-else class="wei">
+                    <div style="width: 250px; height: 250px">
+                      <!-- <el-image
                       style="width: 250px; height: 250px"
                       :src="require('@/assets/login/icon_001.png')"
                       fit="contain "
                     ></el-image> -->
+                    </div>
+                    <div>
+                      <div class="wei-item-tip">使用手机微信扫码登录</div>
+                      <div class="wei-item-text">
+                        网页版微信需要配合手机使用
+                      </div>
+                    </div>
                   </div>
-                  <div>
-                    <div class="wei-item-tip">使用手机微信扫码登录</div>
-                    <div class="wei-item-text">网页版微信需要配合手机使用</div>
-                  </div>
-                </div>
-                  </transition>
-
+                </transition>
               </div>
             </div>
           </div>
         </el-form>
       </div>
-      <div class="info" >
+      <div class="info">
         <div class="info-item">
           <a :href="companyList[0].icpRecordLink">{{
             companyList[0].icpRecord
           }}</a>
-          <div style="margin: 0 20px" v-if=" companyList[0].companyName && companyList[0].icpRecordLink">|</div>
+          <div
+            style="margin: 0 20px"
+            v-if="companyList[0].companyName && companyList[0].icpRecordLink"
+          >
+            |
+          </div>
           <a :href="companyList[0].pubSecurityRecordLink">
-          <el-image
-            style="width: 14px; height: 16px;"
-            :src="require('@/assets/login/icon_0001.png')"
-          ></el-image>
-          {{
-            companyList[0].pubSecurityRecord
-          }}</a>
+            <el-image
+              style="width: 14px; height: 16px"
+              :src="require('@/assets/login/icon_0001.png')"
+            ></el-image>
+            {{ companyList[0].pubSecurityRecord }}</a
+          >
         </div>
         <div>{{ companyList[0].companyName }}</div>
       </div>
@@ -285,13 +290,11 @@ export default {
     getCompanyList() {
       getCompanyList().then((res) => {
         this.companyList = res.data;
-
       });
     },
     getList() {
       getList().then((res) => {
         this.banner = res.data;
-
       });
     },
     hanleTabs(val) {
@@ -311,7 +314,7 @@ export default {
 
     // 登录
     handleLogin() {
-      console.log(this.loginForm,'lll');
+      console.log(this.loginForm, "lll");
       this.$refs.loginForm.validate((valid) => {
         if (valid) {
           this.loading = true;
@@ -321,7 +324,7 @@ export default {
               console.log(this.redirect);
               this.$router.push({ path: this.redirect || "/" });
               this.saveUnAndPw();
-                this.$store.commit("user/showMessage", "yes");
+              this.$store.commit("user/showMessage", "yes");
               this.loading = false;
             })
             .catch(() => {
@@ -493,7 +496,7 @@ $back: #333;
     transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
   }
 
-  .slide-fade-leave-active  {
+  .slide-fade-leave-active {
     transform: translateX(10px);
     opacity: 0;
   }
@@ -551,7 +554,7 @@ $light_gray: #eee;
   font-size: 24px;
   color: #666666;
   line-height: 40px;
-  border-bottom: 3px solid #FFFFFF;
+  border-bottom: 3px solid #ffffff;
 }
 .acitve {
   font-weight: bold;