Parcourir la source

Merge branch 'master' of http://47.92.161.104:10080/shuzhan/smart-bus-portal

yanliming il y a 4 ans
Parent
commit
2b3dfb634d

+ 1 - 1
.env.development

@@ -2,7 +2,7 @@ OUT_PUT_DIR=dist/smart-bus-portal
 
 VUE_APP_BACKEND_URL=http://127.0.0.1:8086/smart-bus-server
 #VUE_APP_BACKEND_URL=https://ykt-test.xiaoxinda.com/smart-bus-server
-#VUE_APP_BACKEND_URL=http://qylhhapi.xiaoxinda.com/enterprise-server
+#VUE_APP_BACKEND_URL=http://121.37.187.149/smart-bus-server
 
 #手机企业版
 VUE_APP_COMPANY_HEALTH_WECHAT_QY_URL=http://wisdomhousewechat.sudaonline.net/prevention/motemwall.html 

+ 2 - 2
.env.production

@@ -1,6 +1,6 @@
-OUT_PUT_DIR=dist/bus-admin
+OUT_PUT_DIR=dist/smart-bus-portal
 
-VUE_APP_BACKEND_URL=http://qylhhapi.xiaoxinda.com/enterprise-server
+VUE_APP_BACKEND_URL=http://121.37.187.149/smart-bus-server
 
 #手机企业版
 VUE_APP_COMPANY_HEALTH_WECHAT_QY_URL=https://xpgjapi.xiaoxinda.com/healthPublicity

+ 5 - 2
src/api/bus/vehicleInfo.js

@@ -42,11 +42,14 @@ function batchRemove(idList) {
   });
 }
 
-function gpsHistoryList(formData){
+function gpsHistoryList(formData) {
   return request.post(constant.serverUrl + "/bus/vehicleInfo/gpsHistoryList", formData);
 }
 
+function bindBus(formData) {
+  return request.post(constant.serverUrl + "/bus/vehicleInfo/bindBus", formData);
+}
 
 export default {
-  create, edit, add, update, remove, batchRemove, pageList,gpsHistoryList
+  create, edit, add, update, remove, batchRemove, pageList, gpsHistoryList, bindBus
 }

+ 46 - 0
src/api/merchant/accountInfo.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request'
+import constant from '@/constant'
+
+function pageList(formData){
+  return request.post(constant.serverUrl + "/merchant/accountInfo/pageList", formData);
+}
+
+function create(){
+  return request.get(constant.serverUrl + "/merchant/accountInfo/create");
+}
+
+function edit(id){
+  return request.get(constant.serverUrl + "/merchant/accountInfo/edit/" + id);
+}
+
+function add(formModel){
+  return request.post(constant.serverUrl + "/merchant/accountInfo/add", formModel,{
+    headers: {
+      "Content-Type": "application/json"
+    }
+  });
+}
+
+function update(formModel){  
+  return request.post(constant.serverUrl + "/merchant/accountInfo/update", formModel,{
+    headers: {
+      "Content-Type": "application/json"
+    }
+  });
+}
+
+function remove(id){
+  return request.post(constant.serverUrl + "/merchant/accountInfo/delete/" + id);
+}
+
+function batchRemove(idList){
+  return request.post(constant.serverUrl + "/merchant/accountInfo/batchDelete",idList,{
+    headers: {
+      "Content-Type": "application/json"
+    }
+  });
+}
+
+export default {
+  pageList,create,edit,add,update,remove,batchRemove
+}

+ 46 - 0
src/api/merchant/capitalInfo.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request'
+import constant from '@/constant'
+
+function pageList(formData){
+  return request.post(constant.serverUrl + "/merchant/capitalInfo/pageList", formData);
+}
+
+function create(){
+  return request.get(constant.serverUrl + "/merchant/capitalInfo/create");
+}
+
+function edit(id){
+  return request.get(constant.serverUrl + "/merchant/capitalInfo/edit/" + id);
+}
+
+function add(formModel){
+  return request.post(constant.serverUrl + "/merchant/capitalInfo/add", formModel,{
+    headers: {
+      "Content-Type": "application/json"
+    }
+  });
+}
+
+function update(formModel){  
+  return request.post(constant.serverUrl + "/merchant/capitalInfo/update", formModel,{
+    headers: {
+      "Content-Type": "application/json"
+    }
+  });
+}
+
+function remove(id){
+  return request.post(constant.serverUrl + "/merchant/capitalInfo/delete/" + id);
+}
+
+function batchRemove(idList){
+  return request.post(constant.serverUrl + "/merchant/capitalInfo/batchDelete",idList,{
+    headers: {
+      "Content-Type": "application/json"
+    }
+  });
+}
+
+export default {
+  pageList,create,edit,add,update,remove,batchRemove
+}

+ 50 - 0
src/api/merchant/withdrawalRecord.js

@@ -0,0 +1,50 @@
+import request from '@/utils/request'
+import constant from '@/constant'
+
+function pageList(formData){
+  return request.post(constant.serverUrl + "/merchant/withdrawalRecord/pageList", formData);
+}
+
+function create(){
+  return request.get(constant.serverUrl + "/merchant/withdrawalRecord/create");
+}
+
+function edit(id){
+  return request.get(constant.serverUrl + "/merchant/withdrawalRecord/edit/" + id);
+}
+
+function add(formModel){
+  return request.post(constant.serverUrl + "/merchant/withdrawalRecord/add", formModel,{
+    headers: {
+      "Content-Type": "application/json"
+    }
+  });
+}
+
+function update(formModel){  
+  return request.post(constant.serverUrl + "/merchant/withdrawalRecord/update", formModel,{
+    headers: {
+      "Content-Type": "application/json"
+    }
+  });
+}
+
+function remove(id){
+  return request.post(constant.serverUrl + "/merchant/withdrawalRecord/delete/" + id);
+}
+
+function batchRemove(idList){
+  return request.post(constant.serverUrl + "/merchant/withdrawalRecord/batchDelete",idList,{
+    headers: {
+      "Content-Type": "application/json"
+    }
+  });
+}
+
+function approval(formData){
+  return request.post(constant.serverUrl + "/merchant/withdrawalRecord/approval", formData);
+}
+
+export default {
+  pageList,create,edit,add,update,remove,batchRemove,approval
+}

+ 7 - 1
src/api/sys/log.js

@@ -6,6 +6,12 @@ function pageList(formData) {
 }
 
 
+function busList(formData) {
+    return request.post(constant.serverUrl + "/sys/log/busList", formData);
+}
+
+
+
 export default {
-    pageList
+    pageList, busList
 }

+ 1 - 0
src/assets/icons/bus.svg

@@ -0,0 +1 @@
+<svg t="1619592316797" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2378" width="32" height="32"><path d="M959.992 703.988H64.008c-35.282 0-64-28.688-64-64V277.324c0-35.282 28.718-63.998 64-63.998h895.984c35.31 0 63.998 28.716 63.998 63.998v362.664c0 35.312-28.688 64-63.998 64z" fill="#FFCE54" p-id="2379"></path><path d="M0.01 639.988c0 35.312 28.718 64 64 64h95.826v-85.312H0.01v21.312z" fill="#E6E9ED" p-id="2380"></path><path d="M1023.99 298.668H106.68c-11.782 0-21.344 9.546-21.344 21.328v170.668c0 11.782 9.562 21.312 21.344 21.312h917.31V298.668z" fill="#4FC2E9" p-id="2381"></path><path d="M192.006 597.302c-58.812 0-106.67 47.874-106.67 106.686 0 58.81 47.858 106.686 106.67 106.686s106.67-47.876 106.67-106.686c0-58.812-47.858-106.686-106.67-106.686zM789.306 597.302c-58.81 0-106.624 47.874-106.624 106.686 0 58.81 47.812 106.686 106.624 106.686 58.842 0 106.686-47.876 106.686-106.686 0-58.812-47.844-106.686-106.686-106.686z" fill="#434A54" p-id="2382"></path><path d="M207.1 688.926c8.328 8.312 8.328 21.812 0 30.124-8.344 8.376-21.844 8.376-30.17 0-8.344-8.312-8.344-21.812 0-30.124 8.326-8.376 21.826-8.376 30.17 0z" fill="#F5F7FA" p-id="2383"></path><path d="M362.674 512.07h256.01v191.918H362.674z" fill="#E6E9ED" p-id="2384"></path><path d="M804.432 688.926c8.312 8.312 8.312 21.812 0 30.124-8.344 8.376-21.874 8.376-30.186 0-8.312-8.312-8.312-21.812 0-30.124 8.312-8.376 21.842-8.376 30.186 0z" fill="#F5F7FA" p-id="2385"></path><path d="M480 298.668h21.328v405.32H480z" fill="#E6E9ED" p-id="2386"></path><path d="M190.616 512.07l-0.658-213.402 42.672-0.126 0.656 213.372zM768.308 512.07l-0.624-213.402 42.622-0.126 0.688 213.372z" fill="#3BAFDA" p-id="2387"></path><path d="M362.674 298.668h256.012v405.32h21.31V277.324H341.332v426.664h21.342zM1023.99 554.678h-63.998c-11.782 0-21.312 9.5-21.312 21.312s9.532 21.312 21.312 21.312h63.998v-42.624z" fill="#E6E9ED" p-id="2388"></path></svg>

+ 1 - 0
src/assets/icons/station.svg

@@ -0,0 +1 @@
+<svg t="1619592775334" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5220" width="32" height="32"><path d="M512 1024c-56.096-89.344-97.184-137.728-123.296-145.184C201.216 825.248 64 652.672 64 448 64 200.576 264.576 0 512 0s448 200.576 448 448c0 203.168-135.232 374.72-320.608 429.632-26.88 7.968-69.376 56.768-127.392 146.368z m344.224-396.8c21.952 0 39.776-17.184 39.776-38.4v-202.464L793.216 224H199.776C177.824 224 160 241.184 160 262.4v326.4c0 21.216 17.824 38.4 39.776 38.4h20.896c-0.352-3.2-0.992-6.304-0.992-9.6 0-47.712 40.064-86.4 89.504-86.4 49.44 0 89.504 38.688 89.504 86.4 0 3.296-0.64 6.4-0.96 9.6h240.576c4.64-53.76 46.72-96 98.56-96s93.92 42.24 98.56 96h20.8zM398.688 300.8V416c0 10.592-8.896 19.2-19.872 19.2H239.552a19.552 19.552 0 0 1-19.872-19.2V300.8c0-10.592 8.896-19.2 19.872-19.2h139.264a19.52 19.52 0 0 1 19.872 19.2z m218.816 0V416c0 10.592-8.896 19.2-19.872 19.2h-139.264a19.552 19.552 0 0 1-19.872-19.2V300.8c0-10.592 8.896-19.2 19.872-19.2h139.264c10.976 0 19.872 8.608 19.872 19.2z m198.944 57.6V416c0 10.592-8.928 19.2-19.904 19.2H677.184a19.552 19.552 0 0 1-19.872-19.2V300.8c0-10.592 8.896-19.2 19.872-19.2h99.456l32.16 62.048c2.048 3.52 3.296 6.88 7.648 14.72zM309.184 569.6c-38.464 0-69.632 30.08-69.632 67.2 0 37.12 31.168 67.2 69.632 67.2 38.464 0 69.632-30.08 69.632-67.2 0-37.12-31.168-67.2-69.632-67.2z m437.632 0c-38.464 0-69.632 30.08-69.632 67.2 0 37.12 31.168 67.2 69.632 67.2 38.464 0 69.632-30.08 69.632-67.2 0-37.12-31.168-67.2-69.632-67.2z" p-id="5221" fill="#1296db"></path></svg>

+ 2 - 0
src/routers/index.js

@@ -5,6 +5,7 @@ import Home from '@/views/Home.vue'
 import baseRouters from './modules/base'
 import sysRouters from './modules/sys'
 import busRouters from './modules/bus'
+import merchantRouters from './modules/merchant'
 import { Message } from 'element-ui'
 import NProgress from 'nprogress' // progress bar
 import 'nprogress/nprogress.css' // progress bar style
@@ -31,6 +32,7 @@ export const constantRoutes = [
       ...sysRouters,
       ...baseRouters,
       ...busRouters,
+      ...merchantRouters,
     ]
   },
   {

+ 12 - 0
src/routers/modules/bus.js

@@ -119,6 +119,18 @@ var routers = [
                         title: '司机考勤管理'
                 }
         },
+        {
+            path: '/bus/busLog/list',
+            name: 'busBusLogList',
+            // route level code-splitting
+            // this generates a separate chunk (about.[hash].js) for this route
+            // which is lazy-loaded when the route is visited.
+            component: () => import('@/views/bus/bus-log-list.vue'),
+            meta: {
+                roles: ["admin"],
+                title: '车辆日志'
+            }
+        },
 ]
 
 export default routers;

+ 28 - 0
src/routers/modules/merchant.js

@@ -0,0 +1,28 @@
+var routers = [
+        {
+                path: '/merchant/accountInfo/list',
+                name: 'MerchantAccountInfoList',
+                // route level code-splitting
+                // this generates a separate chunk (about.[hash].js) for this route
+                // which is lazy-loaded when the route is visited.
+                component: () => import('@/views/merchant/accountInfo-list.vue'),
+                meta: {
+                        roles: ["admin"],
+                        title: '营收用户管理'
+                }
+        },{
+                path: '/merchant/withdrawalRecord/list',
+                name: 'MerchantWithdrawalRecordList',
+                // route level code-splitting
+                // this generates a separate chunk (about.[hash].js) for this route
+                // which is lazy-loaded when the route is visited.
+                component: () => import('@/views/merchant/withdrawalRecord-list.vue'),
+                meta: {
+                        roles: ["admin"],
+                        title: '营收用户提现审核'
+                }
+        },
+        
+]
+
+export default routers;

+ 301 - 0
src/views/bus/bus-log-list.vue

@@ -0,0 +1,301 @@
+<template>
+  <div>
+    <el-breadcrumb separator=">">
+      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
+      <el-breadcrumb-item>
+        <a href="#">系统管理</a>
+      </el-breadcrumb-item>
+      <el-breadcrumb-item>
+        <a href="#">车辆日志</a>
+      </el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-divider></el-divider>
+    <!--
+      要resetFields起作用,必须配置:model和prop
+    -->
+    <el-form
+      ref="queryForm"
+      :model="queryModel"
+      inline
+      class="demo-form-inline"
+    >
+      <el-form-item label="起始时间" prop="startTime">
+        <el-date-picker
+          v-model="queryModel.startTime"
+          type="datetime"
+          size="mini"
+          format="yyyy-MM-dd HH:mm"
+          value-format="yyyy-MM-dd HH:mm"
+          placeholder="选择日期时间"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item label="结束时间" prop="endTime">
+        <el-date-picker
+          v-model="queryModel.endTime"
+          type="datetime"
+          size="mini"
+          format="yyyy-MM-dd HH:mm"
+          value-format="yyyy-MM-dd HH:mm"
+          placeholder="选择日期时间"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item label="用户编号" prop="userId">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.userId"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="备注" prop="remark">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.remark"
+        ></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          size="mini"
+          icon="ios-search"
+          @click="changePage(1)"
+          :loading="loading"
+          >查询</el-button
+        >&nbsp;
+        <el-button
+          type="info"
+          size="mini"
+          style="margin-left: 8px"
+          @click="handleReset('queryForm')"
+          >重置</el-button
+        >&nbsp;
+      </el-form-item>
+    </el-form>
+    <el-divider></el-divider>
+    <el-table
+      :data="tableData"
+      style="min-height: 400px"
+      v-loading="loading"
+      stripe
+      border
+    >
+      <el-table-column type="expand">
+        <template slot-scope="{ row }">
+          <el-form label-position="left" inline>
+            <el-form-item label="参数:">
+              <span>{{ row.data }}</span>
+            </el-form-item>
+            <el-form-item label="远程IP:">
+              <span>{{ row.remoteIp }}</span>
+            </el-form-item>
+          </el-form>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="pointcut"
+        label="入口"
+        width="250"
+      ></el-table-column>
+      <el-table-column
+        prop="userId"
+        label="用户编号"
+        width="180"
+      ></el-table-column>
+      <el-table-column prop="remark" label="备注">
+        <template slot-scope="{ row }">
+          <span>{{ row.remark }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="elapse" label="耗时(毫秒)">
+        <template slot-scope="{ row }">
+          <span>{{ row.elapse }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="createTime"
+        sort-by="create_time"
+        label="创建时间"
+        width="180"
+      ></el-table-column>
+      <el-table-column label="操作" fixed="right" width="180px">
+        <template slot-scope="{ row }">
+          <el-link size="mini" type="primary" @click="handleBind(row)"
+            >一键绑定</el-link
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      :current-page.sync="pageIndex"
+      :total="totalElements"
+      :page-sizes="pageSizeList"
+      @current-change="changePage"
+      @size-change="pageSizeChange"
+      layout="total, sizes, prev, pager, next, jumper"
+    ></el-pagination>
+  </div>
+</template>
+<script>
+import Constant from "@/constant";
+import logApi from "@/api/sys/log";
+import vehicleInfoApi from "@/api/bus/vehicleInfo";
+import NProgress from "nprogress"; // progress bar
+import "nprogress/nprogress.css"; // progress bar style
+
+export default {
+  name: "SysLogList",
+  data() {
+    var self = this;
+    var now = new Date();
+
+    var dateStr = [];
+
+    dateStr.push(now.getFullYear());
+    dateStr.push("-");
+
+    var month = now.getMonth() + 1;
+
+    if (month < 10) {
+      dateStr.push("0");
+    }
+
+    dateStr.push(month);
+    dateStr.push("-");
+
+    var day = now.getDate();
+
+    if (day < 10) {
+      dateStr.push("0");
+    }
+
+    dateStr.push(day);
+
+    return {
+      queryModel: {
+        userId: "",
+        pointcut: "车辆激活",
+        data: "",
+        remark: "",
+        startTime: dateStr.join("") + " 00:00",
+        endTime: dateStr.join("") + " 23:59",
+      },
+      loading: false,
+      tableData: [],
+      pageIndex: 1,
+      pageSize: 10,
+      totalPages: 0,
+      totalElements: 0,
+      field: "",
+      direction: "",
+      pageSizeList: [10, 20, 30],
+      multipleSelection: [],
+    };
+  },
+  methods: {
+    changePage(pageIndex) {
+      var self = this;
+
+      console.log(pageIndex);
+
+      self.pageIndex = pageIndex;
+      var formData = new FormData();
+
+      formData.append("pageIndex", self.pageIndex);
+      formData.append("pageSize", self.pageSize);
+
+      formData.append("userId", self.queryModel.userId);
+      formData.append("pointcut", self.queryModel.pointcut);
+      formData.append("remark", self.queryModel.remark);
+      formData.append("startTime", self.queryModel.startTime);
+      formData.append("endTime", self.queryModel.endTime);
+
+      self.loading = true;
+
+      logApi
+        .busList(formData)
+        .then(function (response) {
+          self.loading = false;
+
+          var jsonData = response.data;
+
+          if (jsonData.result) {
+            var pageInfo = jsonData.data;
+
+            self.tableData = pageInfo.data;
+            self.totalPages = pageInfo.totalPages;
+            self.totalElements = pageInfo.recordsTotal;
+          } else {
+            self.$message({
+              message: jsonData.message + "",
+              type: "warning",
+            });
+          }
+        })
+        .catch((error) => {
+          self.loading = false;
+        });
+    },
+    pageSizeChange(pageSize) {
+      this.pageSize = pageSize;
+
+      this.changePage(1);
+    },
+    handleReset(name) {
+      this.$refs[name].resetFields();
+    },
+    handleBind(record) {
+      var self = this;
+      self.loading = true;
+      var formData = new FormData();
+
+      formData.append("logId", record.id);
+      vehicleInfoApi
+        .bindBus(formData)
+        .then(function (response) {
+          self.loading = false;
+
+          var jsonData = response.data;
+          if (jsonData.result) {
+            self.$message({
+                message: jsonData.message + "",
+                type: "success",
+              });
+            self.changePage(self.pageIndex);
+          } else {
+            self.$message({
+              message: jsonData.message + "",
+              type: "warning",
+            });
+          }
+        })
+        .catch((error) => {
+          self.loading = false;
+        });
+    },
+  },
+  mounted: function () {
+    var self = this;
+    this.changePage(1);
+  },
+};
+</script>
+<style lang="scss" scoped>
+.el-breadcrumb {
+  margin: 10px;
+  line-height: 20px;
+}
+
+.el-divider {
+  margin: 5px 0;
+}
+
+.demo-form-inline {
+  margin-left: 10px;
+  text-align: left;
+}
+
+.button-group {
+  padding: 10px;
+  text-align: left;
+}
+</style>

+ 15 - 15
src/views/bus/routeInfo-list.vue

@@ -609,22 +609,22 @@ export default {
       });
     },
     handleEditPrice(record) {
+      var path = "/bus/routeInfo/priceList";
 
-            var path = "/bus/routeInfo/priceList";
-            
-
-            this.$store.dispatch('tagsView/delView', {
-                name: "BusRouteInfoList",
-                path: path
-            }).then(({ visitedViews }) => {
-                this.$router.push({ 
-                path: path,
-                query:{
-                    routeId: record.id
-                }
-                });
-            });
-        },
+      this.$store
+        .dispatch("tagsView/delView", {
+          name: "BusRouteInfoList",
+          path: path,
+        })
+        .then(({ visitedViews }) => {
+          this.$router.push({
+            path: path,
+            query: {
+              routeId: record.id,
+            },
+          });
+        });
+    },
   },
   mounted: function () {},
   components: {

+ 33 - 23
src/views/bus/routeInfo-price-list.vue

@@ -12,21 +12,21 @@
     <el-divider></el-divider>
     <el-row class="button-group">
       <el-button
-          type="primary"
-          size="small"
-          icon="ios-search"
-          @click="changePage()"
-          :loading="loading"
-          >刷新</el-button
-        >
-        <el-button
-          type="primary"
-          size="small"
-          icon="ios-search"
-          @click="editPrice()"
-          :loading="loading"
-          >编辑</el-button
-        >
+        type="primary"
+        size="small"
+        icon="ios-search"
+        @click="changePage()"
+        :loading="loading"
+        >刷新</el-button
+      >
+      <el-button
+        type="primary"
+        size="small"
+        icon="ios-search"
+        @click="editPrice()"
+        :loading="loading"
+        >编辑</el-button
+      >
       <el-button
         type="primary"
         size="small"
@@ -42,12 +42,14 @@
         icon="el-icon-download"
         :loading="xlsLoading"
         @click="downloadAll"
-      >导出数据</el-button>
+        >导出数据</el-button
+      >
     </el-row>
     <el-table
       :data="tableData"
-      style="min-height: 400px"
       v-loading="loading"
+      ref="formTable"
+      :height="tableHeight"
       stripe
       @selection-change="handleSelectionChange"
     >
@@ -133,7 +135,6 @@
       :routeId="routeId"
       @close="onDetailModalClose"
     ></routeInfo-price-detail>
-    
   </div>
 </template>
 <script>
@@ -144,6 +145,7 @@ import shiftInfoApi from "@/api/bus/shiftInfo";
 
 import passengerInfoApi from "@/api/bus/passengerInfo";
 import priceInfoApi from "@/api/bus/priceInfo";
+import pageUtil from "@/utils/page";
 
 import { getToken } from "@/utils/auth"; // get token from cookie
 export default {
@@ -173,17 +175,18 @@ export default {
       showDialog: true,
       stationPriceColumns: [],
       batchImportVisible: false,
-      routeId:"",
+      routeId: "",
       uploadUrlXls: Constant.serverUrl + "/bus/priceInfo/importXls",
       uploadXlsData: {
         subFolder: "driver",
-        routeId:""
+        routeId: "",
       },
       headers: {
         Authorization: getToken(),
       },
-      batchImportFileList:[],
-      xlsLoading:false,
+      batchImportFileList: [],
+      xlsLoading: false,
+      tableHeight: 400,
     };
   },
   methods: {
@@ -205,6 +208,13 @@ export default {
           var jsonData = response.data;
           self.tableData = jsonData.stationInfoList;
           self.stationPriceColumns = jsonData.stationPriceColumns;
+
+          setTimeout(() => {
+            console.log(self.$refs.formTable.$el.offsetTop);
+            self.tableHeight = pageUtil.autoAdjustHeight(
+              self.$refs.formTable.$el
+            );
+          }, 1000);
         })
         .catch((error) => {
           self.loading = false;
@@ -328,7 +338,7 @@ export default {
     this.routeId = routeId;
     this.changePage();
   },
-  
+
   components: {
     "routeInfo-price-detail": priceDetail,
   },

+ 26 - 2
src/views/bus/shiftInfo-list.vue

@@ -127,8 +127,10 @@
       <el-table-column label="操作" width="150" fixed="right">
         <template slot-scope="{ row }">
           <el-link type="primary" :underline="false" @click="handleOpenPassenger(row)"
-            >查看乘客</el-link
-          >
+            >查看乘客</el-link>
+          -
+          <el-link type="primary" :underline="false" @click="handleOpenMap(row)"
+            >查看地图</el-link>
         </template>
       </el-table-column>
     </el-table>
@@ -146,12 +148,27 @@
       :title="modalTitle"
       @close="onDetailModalClose"
     ></shiftInfo-passenger>
+    <el-dialog
+      width="80%"
+      :visible.sync="showMap"
+      title="地图"
+      :modal-append-to-body="true"
+      :append-to-body="true"
+      style="text-align: left"
+      :close-on-click-modal="false"
+    >
+      <shiftInfo-map
+        v-if="showMap"
+        :shift="selectedShift"
+      ></shiftInfo-map>
+      </el-dialog>
   </div>
 </template>
 <script>
 import Constant from "@/constant";
 import shiftInfoApi from "@/api/bus/shiftInfo";
 import ShiftInfoPassenger from "./shiftInfo-passenger";
+import ShiftInfoMap from './shiftInfo-map';
 
 import NProgress from "nprogress"; // progress bar
 import "nprogress/nprogress.css"; // progress bar style
@@ -178,9 +195,15 @@ export default {
       showModal: false,
       modalTitle: "",
       businessKey: "",
+      selectedShift: null,
+      showMap: false
     };
   },
   methods: {
+    handleOpenMap(item) {
+      this.selectedShift = item;
+      this.showMap  = true;
+    },
     indexMethod(index) {
       return (this.pageIndex - 1) * this.pageSize + (index + 1);
     },
@@ -312,6 +335,7 @@ export default {
 
   components: {
     "shiftInfo-passenger": ShiftInfoPassenger,
+    "shiftInfo-map": ShiftInfoMap
   },
 };
 </script>

+ 164 - 0
src/views/bus/shiftInfo-map.vue

@@ -0,0 +1,164 @@
+<template>
+    <div>
+      <el-amap
+        ref="shiftMap"
+        vid="shiftMap"
+        :plugin="plugin"
+        :center="centerPoint"
+        :zoom="15"
+        style="width: 100%; height: 400px"
+      >
+        <!--车辆当前位置-->
+        <el-amap-marker
+          :zIndex="2"
+          :position="vehiclePos"
+          :title="vehicle.licensePlateNumber"
+          :icon="busIcon"
+        ></el-amap-marker>
+
+        <!--站点-->
+        <el-amap-marker
+          :zIndex="1"
+          v-for="station in stationList"
+          :key="station.id"
+          :position="station.position"
+          :title="station.title"
+          :icon="stationIcon"
+        ></el-amap-marker>
+
+        <!--路线-->
+        <el-amap-polyline
+          :path="mapPath"
+          :zIndex="2"
+          :isOutline="true"
+          :outlineColor="'#ffeeff'"
+          :borderWeight="3"
+          :strokeColor="'#3366FF'"
+          :strokeOpacity="1"
+          :strokeWeight="6"
+          :strokeStyle="'solid'"
+          :strokeDasharray="[10, 5]"
+          :lineJoin="'round'"
+          :lineCap="'round'"
+          :editable="false"
+        ></el-amap-polyline>
+      </el-amap>
+    </div>
+</template>
+<script>
+import routeInfoApi from "@/api/bus/routeInfo";
+import vehicleInfoApi from "@/api/bus/vehicleInfo";
+import busIcon from "@/assets/icons/bus.svg";
+import stationIcon from "@/assets/icons/station.svg";
+
+export default {
+    props :{
+        shift : {
+            type: Object,
+            default: null
+        }
+    },
+    data() {
+        return {
+            busIcon: busIcon,
+            stationIcon: stationIcon,
+            showMapDialog: true,
+            loading: false,
+            centerPoint: [112.276585, 30.306401],
+            stationList: [],
+            mapPath: [],
+            vehicle: {},
+            vehiclePos: [112.276585, 30.306401],
+            plugin: [
+                {
+                    pName: "ToolBar",
+                    events: {
+                        init(instance) {
+                            console.log(instance);
+                        }
+                    }
+                }
+            ]
+        }
+    },
+    methods: {
+        loadVehicle(vehicleId) {
+            vehicleInfoApi.edit(vehicleId).then(response=>{
+                var jsonData = response.data;
+                this.vehicle = jsonData.data;
+                this.vehiclePos = [this.vehicle.longitude,this.vehicle.latitude];
+                this.centerPoint = this.vehiclePos;
+
+                console.log(this.centerPoint);
+
+                setTimeout(()=>{
+                    this.loadVehicle(vehicleId);
+                },60000);
+            });
+        },
+        loadRouteMap(routeId) {
+            //读取当前路线的站点
+            this.loading = true;
+
+            routeInfoApi.edit(routeId).then((response) => {
+                this.loading = false;
+
+                var jsonData = response.data;
+                var model = jsonData.data;
+
+                var _stationList = model.stationList;
+
+                if (model.pathList != null) {
+                    this.mapPath = model.pathList.map((item) => {
+                        return item.split(",");
+                    });
+
+                    //this.centerPoint = this.mapPath[0];
+                } else {
+                    this.mapPath = [];
+                }
+
+                if (_stationList.length <= 1) {
+                    this.$message.warning("请先至少设置2个站点!");
+                } else {
+                    this.stationList = [];
+
+                    var initMapPath = this.mapPath.length == 0;
+
+                    _stationList.forEach((item) => {
+                        if (item.location != null && item.location.length > 0) {
+                            var station = {
+                                id: item.id,
+                                title: item.name,
+                                position: item.location.split(","),
+                            };
+
+                            this.stationList.push(station);
+
+                            if (initMapPath) {
+                                this.mapPath.push(station.position);
+                            }
+                        }
+                    });
+
+                    // if (this.mapPath.length > 0) {
+                    //     this.centerPoint = this.mapPath[0];
+                    // }
+                }
+            });
+        }
+    },
+    mounted: function () {
+        console.log("mounted");
+        console.log(this.shift);
+
+        if(this.shift!=null) {
+            this.loadVehicle(this.shift.vehicleId);
+            this.loadRouteMap(this.shift.routeId);
+        }
+    }
+}
+</script>
+<style>
+
+</style>

+ 1 - 1
src/views/bus/vehicleInfo-detail.vue

@@ -67,7 +67,7 @@
             style="width: 400px"
           ></el-input>
         </el-form-item>
-        <el-form-item label="激活码" prop="activationCode">
+        <el-form-item label="平板设备编号" prop="activationCode">
           <el-input
             v-model="formModel.activationCode"
             placeholder="请输入激活码"

+ 2 - 2
src/views/bus/vehicleInfo-list.vue

@@ -32,7 +32,7 @@
       <el-form-item label="gps设备编号" prop="gpsDeviceNo">
         <el-input type="text" size="mini" v-model="queryModel.gpsDeviceNo"></el-input>
       </el-form-item>
-      <el-form-item label="设备编号" prop="deviceNo">
+      <el-form-item label="打卡设备编号" prop="deviceNo">
         <el-input type="text" size="mini" v-model="queryModel.deviceNo"></el-input>
       </el-form-item>
       <el-form-item>
@@ -113,7 +113,7 @@
       ></el-table-column>
       <el-table-column
         prop="activationCode"
-        label="激活码"
+        label="平板设备编号"
         width="130"
       ></el-table-column>
       <el-table-column prop="picture" label="照片" width="150">

+ 255 - 0
src/views/merchant/accountInfo-detail.vue

@@ -0,0 +1,255 @@
+
+<style scoped>
+.user-panel {
+  margin: 10px auto;
+}
+</style>
+<template>
+  <el-dialog
+    :visible.sync="showDialog"
+    :title="title"
+    :modal-append-to-body="false"
+    style="text-align: left"
+    @close="closeDialog"
+    :close-on-click-modal="false"
+  >
+    <div class="user-panel" v-loading="loading">
+      <el-form
+        ref="form"
+        :model="formModel"
+        :rules="ruleValidate"
+        :label-width="'100px'"
+      >
+        <el-form-item label="公司车队" prop="companyId">
+          <el-select-tree
+            :props="props"
+            :options="companyResult"
+            v-model="formModel.companyId"
+            size="mediumn"
+            width="300px"
+          ></el-select-tree>
+        </el-form-item>
+        <el-form-item label="商户名称" prop="name">
+          <el-input
+            v-model="formModel.name"
+            placeholder="请输入商户名称"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="头像" prop="imageUrl">
+          <el-upload
+            class="avatar-uploader"
+            name="photoFile"
+            :action="uploadUrl"
+            :show-file-list="false"
+            :headers="headers"
+            :data="uploadData"
+            :on-success="handleAvatarSuccess"
+            :before-upload="beforeAvatarUpload"
+          >
+            <img v-if="fileUrl" :src="fileUrl" class="avatar" />
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item>
+        
+        <el-form-item label="手机号" prop="phone">
+          <el-input
+            v-model="formModel.phone"
+            placeholder="请输入手机号"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="银行名称" prop="bankName">
+          <el-input
+            v-model="formModel.bankName"
+            placeholder="请输入银行名称"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="银行卡账号" prop="bankNumber">
+          <el-input
+            v-model="formModel.bankNumber"
+            placeholder="请输入银行卡账号"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="提现许可" prop="withdrawAllow">
+          <el-radio-group v-model="formModel.withdrawAllow">
+            <el-radio :label="true">可提现</el-radio>
+            <el-radio :label="false">不可提现</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="商户状态" prop="frozen">
+          <el-radio-group v-model="formModel.frozen">
+            <el-radio :label="true">已冻结</el-radio>
+            <el-radio :label="false">未冻结</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="closeDialog">取 消</el-button>
+      <el-button type="primary" @click="handleSubmit" :loading="submitting"
+        >确 定</el-button
+      >
+    </span>
+  </el-dialog>
+</template>
+<script>
+import Constant from "@/constant";
+import accountInfoApi from "@/api/merchant/accountInfo";
+import companyInfoApi from "@/api/bus/companyInfo";
+import SelectTree from "@/components/SelectTree";
+
+import { getToken } from "@/utils/auth"; // get token from cookie
+export default {
+  props: ["businessKey", "title"],
+  data() {
+    return {
+      formModel: {},
+      ruleValidate: {
+        name: [
+          { required: true, message: "商户名称不能为空", trigger: "blur" },
+        ],
+        companyId: [
+          {
+            required: true,
+            message: "关联的公司车队不能为空",
+            trigger: "blur",
+          },
+        ],
+        phone: [{ required: true, message: "手机号不能为空", trigger: "blur" }],
+      },
+      showDialog: true,
+      loading: false,
+      submitting: false,
+      //上传地址
+      uploadUrl: Constant.serverUrl + "/uploadPicture",
+      uploadData: {
+        subFolder: "accountInfo",
+      },
+      fileUrl: "",
+      headers: {
+        Authorization: getToken(),
+      },
+      companyResult: [],
+      treeData: [],
+      props: {
+        // 配置项(必选)
+        value: "id",
+        label: "name",
+        children: "children",
+      },
+    };
+  },
+  created() {
+    var self = this;
+
+    companyInfoApi.treeList().then(function (response) {
+      var jsonData = response.data;
+      if (jsonData.result) {
+        self.companyResult = jsonData.data;
+      }
+    });
+  },
+  methods: {
+    closeDialog() {
+      this.$emit("close", false);
+    },
+    handleSubmit() {
+      var self = this;
+
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          (function () {
+            var id = self.formModel.id;
+
+            if (id == null || id.length == 0) {
+              return accountInfoApi.add(self.formModel);
+            } else {
+              return accountInfoApi.update(self.formModel);
+            }
+          })().then(function (response) {
+            var jsonData = response.data;
+
+            if (jsonData.result) {
+              self.$message({
+                message: "保存成功!",
+                type: "success",
+              });
+
+              self.$emit("close", true);
+            } else {
+              self.$message({
+                message: jsonData.message + "",
+                type: "warning",
+              });
+
+              self.$emit("close", false);
+            }
+          });
+        }
+      });
+    },
+    handleAvatarSuccess(res, file) {
+      var self = this;
+      self.formModel.imageUrl = res.data;
+      self.fileUrl =
+        res.data + "?x-oss-process=image/resize,m_lfit,h_200,w_200";
+    },
+    beforeAvatarUpload(file) {
+      const isJPG = file.type === "image/jpeg";
+      const isLt2M = file.size / 1024 / 1024 < 2;
+
+      if (!isJPG) {
+        this.$message.error("上传头像图片只能是 JPG 格式!");
+      }
+      if (!isLt2M) {
+        this.$message.error("上传头像图片大小不能超过 2MB!");
+      }
+      return isJPG && isLt2M;
+    },
+  },
+  mounted: function () {
+    var self = this;
+
+    (function () {
+      if (self.businessKey.length == 0) {
+        return accountInfoApi.create();
+      } else {
+        return accountInfoApi.edit(self.businessKey);
+      }
+    })()
+      .then((response) => {
+        var jsonData = response.data;
+        self.loading = false;
+
+        if (jsonData.result) {
+          self.formModel = jsonData.data;
+          let imageUrl = self.formModel.imageUrl;
+          if (imageUrl != null) {
+            self.fileUrl =
+              imageUrl + "?x-oss-process=image/resize,m_lfit,h_200,w_200";
+          }
+
+          let withdrawAllow = self.formModel.withdrawAllow;
+          if (withdrawAllow == null) {
+            self.formModel.withdrawAllow = false;
+          }
+          let frozen = self.formModel.frozen;
+          if (frozen == null) {
+            self.formModel.frozen = false;
+          }
+        } else {
+          self.$message.error(jsonData.message + "");
+        }
+      })
+      .catch((error) => {
+        self.$message.error(error + "");
+      });
+  },
+  components: {
+    "el-select-tree": SelectTree,
+  },
+};
+</script>

+ 423 - 0
src/views/merchant/accountInfo-list.vue

@@ -0,0 +1,423 @@
+<template>
+  <div>
+    <el-breadcrumb separator=">">
+      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
+      <el-breadcrumb-item>
+        <a href="#">系统管理</a>
+      </el-breadcrumb-item>
+      <el-breadcrumb-item>
+        <a href="/accountInfo">营收用户管理</a>
+      </el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-divider></el-divider>
+    <!--
+      要resetFields起作用,必须配置:model和prop
+    -->
+    <el-form
+      ref="queryForm"
+      :model="queryModel"
+      inline
+      class="demo-form-inline"
+    >
+      <el-form-item label="关联的公司车队" prop="companyId">
+        <el-select-tree
+          :props="props"
+          :options="companyResult"
+          v-model="queryModel.companyId"
+          size="mini"
+          width="200px"
+        ></el-select-tree>
+      </el-form-item>
+      <el-form-item label="商户名称" prop="name">
+        <el-input type="text" size="mini" v-model="queryModel.name"></el-input>
+      </el-form-item>
+      <el-form-item label="手机号" prop="phone">
+        <el-input type="text" size="mini" v-model="queryModel.phone"></el-input>
+      </el-form-item>
+      <el-form-item label="商户冻结" prop="frozen">
+        <el-select
+          v-model="queryModel.frozen"
+          size="mini"
+          placeholder="请选择"
+          style="width:100px"
+        >
+          <el-option label="全部" value=""> </el-option>
+          <el-option label="未冻结" value="0"> </el-option>
+          <el-option label="已冻结" value="1"> </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          size="mini"
+          icon="ios-search"
+          @click="changePage(1)"
+          :loading="loading"
+          >查询</el-button
+        >&nbsp;
+        <el-button
+          type="info"
+          size="mini"
+          style="margin-left: 8px"
+          @click="handleReset('queryForm')"
+          >重置</el-button
+        >&nbsp;
+      </el-form-item>
+    </el-form>
+    <el-divider></el-divider>
+    <el-row class="button-group">
+      <el-button
+        type="primary"
+        size="small"
+        plain
+        icon="el-icon-circle-plus"
+        @click="handleAdd"
+        >新增</el-button
+      >
+      <el-button
+        type="primary"
+        size="small"
+        plain
+        icon="el-icon-circle-plus"
+        :disabled="multipleSelection.length == 0"
+        @click="handleBatchDelete"
+        >删除选中项</el-button
+      >
+    </el-row>
+    <el-table
+      :data="tableData"
+      style="min-height: 400px"
+      v-loading="loading"
+      stripe
+      @sort-change="sortChange"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55"></el-table-column>
+      <el-table-column
+        type="index"
+        label="序号"
+        :index="indexMethod"
+        width="50"
+      ></el-table-column>
+      <el-table-column prop="imageUrl" label="头像" width="80">
+        <template slot-scope="{ row }">
+          <a :href="row.imageUrl" target="_blank">
+            <el-avatar
+              :size="48"
+              shape="circle"
+              :src="
+                row.imageUrl + '?x-oss-process=image/resize,m_fill,w_64,h_64'
+              "
+              :key="row.id"
+            ></el-avatar>
+          </a> </template
+      ></el-table-column>
+      <el-table-column
+        prop="companyName"
+        label="关联的公司车队"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="name"
+        label="商户名称"
+        width="150"
+      ></el-table-column>
+      <el-table-column
+        prop="openId"
+        label="微信openId"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="phone"
+        label="手机号"
+        width="180"
+      ></el-table-column>
+      <el-table-column prop="withdrawAllow" label="提现许可" width="180">
+        <template slot-scope="{ row }">
+          <el-switch
+            v-model="row.withdrawAllow"
+            active-color="#13ce66"
+            inactive-color="#ff4949"
+            active-text="可提现 "
+            inactive-text="不可提现"
+            @change="updateSwitch(row)"
+          ></el-switch>
+        </template>
+      </el-table-column>
+      <el-table-column prop="frozen" label="商户状态" width="180">
+        <template slot-scope="{ row }">
+          <el-switch
+            v-model="row.frozen"
+            active-color="#ff4949"
+            inactive-color="#13ce66"
+            active-text="冻结"
+            inactive-text="正常"
+            @change="updateSwitch(row)"
+          ></el-switch>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="bankName"
+        label="银行名称"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="bankNumber"
+        label="银行卡账号"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="updateTime"
+        label="更新时间"
+        width="180"
+      ></el-table-column>
+      <el-table-column label="操作" width="120">
+        <template slot-scope="{ row }">
+          <el-link type="primary" :underline="false" @click="handleEdit(row)"
+            >编辑</el-link
+          >-
+          <el-link type="danger" :underline="false" @click="handleDelete(row)"
+            >删除</el-link
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      :current-page.sync="pageIndex"
+      :total="totalElements"
+      :page-sizes="pageSizeList"
+      @current-change="changePage"
+      @size-change="pageSizeChange"
+      layout="total, sizes, prev, pager, next, jumper"
+    ></el-pagination>
+    <accountInfo-detail
+      v-if="showModal"
+      :businessKey="businessKey"
+      :title="modalTitle"
+      @close="onDetailModalClose"
+    ></accountInfo-detail>
+  </div>
+</template>
+<script>
+import Constant from "@/constant";
+import AccountInfoDetail from "./accountInfo-detail";
+import accountInfoApi from "@/api/merchant/accountInfo";
+import companyInfoApi from "@/api/bus/companyInfo";
+import SelectTree from "@/components/SelectTree";
+import NProgress from "nprogress"; // progress bar
+import "nprogress/nprogress.css"; // progress bar style
+
+export default {
+  data() {
+    var self = this;
+
+    return {
+      queryModel: {
+        name: "",
+        companyId: "",
+        openId: "",
+        phone: "",
+        frozen: "",
+      },
+      loading: false,
+      tableData: [],
+      pageIndex: 1,
+      pageSize: 10,
+      totalPages: 0,
+      totalElements: 0,
+      field: "",
+      direction: "",
+      pageSizeList: [10, 20, 30],
+      multipleSelection: [],
+      showModal: false,
+      modalTitle: "",
+      businessKey: "",
+      companyResult: [],
+      treeData: [],
+      props: {
+        // 配置项(必选)
+        value: "id",
+        label: "name",
+        children: "children",
+      },
+    };
+  },
+  created() {
+    var self = this;
+
+    companyInfoApi.treeList().then(function (response) {
+      var jsonData = response.data;
+      if (jsonData.result) {
+        self.companyResult = jsonData.data;
+      }
+    });
+  },
+  methods: {
+    indexMethod(index) {
+      return (this.pageIndex - 1) * this.pageSize + (index + 1);
+    },
+    changePage(pageIndex) {
+      var self = this;
+
+      self.loading = true;
+
+      self.pageIndex = pageIndex;
+      var formData = new FormData();
+
+      formData.append("pageIndex", self.pageIndex);
+      formData.append("pageSize", self.pageSize);
+
+      formData.append("name", self.queryModel.name);
+      if(self.queryModel.companyId == null){
+        self.queryModel.companyId = '';
+      }
+      formData.append("companyId", self.queryModel.companyId);
+      formData.append("phone", self.queryModel.phone);
+      formData.append("frozen", self.queryModel.frozen);
+
+      if (this.field != null) {
+        formData.append("field", this.field);
+      }
+
+      if (this.direction != null) {
+        formData.append("direction", this.direction);
+      }
+
+      accountInfoApi
+        .pageList(formData)
+        .then(function (response) {
+          self.loading = false;
+
+          var jsonData = response.data.data;
+
+          self.tableData = jsonData.data;
+          self.totalPages = jsonData.totalPages;
+          self.totalElements = jsonData.recordsTotal;
+        })
+        .catch((error) => {
+          self.loading = false;
+          // self.$message.error(error + "");
+        });
+    },
+    pageSizeChange(pageSize) {
+      this.pageSize = pageSize;
+
+      this.$nextTick(() => {
+        this.changePage(this.pageIndex);
+      });
+    },
+    sortChange(data) {
+      this.field = data.column.field;
+      this.direction = data.order;
+
+      this.changePage(this.pageIndex);
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    handleReset(name) {
+      this.$refs[name].resetFields();
+    },
+    handleAdd() {
+      this.modalTitle = "新增";
+      this.businessKey = "";
+      this.showModal = true;
+    },
+    handleEdit(record) {
+      this.modalTitle = "编辑";
+      this.businessKey = record.id;
+      this.showModal = true;
+    },
+    handleDelete(record) {
+      var self = this;
+
+      self
+        .$confirm("是否确认删除?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+        .then(() => {
+          accountInfoApi.remove(record.id).then(function (response) {
+            var jsonData = response.data;
+
+            if (jsonData.result) {
+              // var index = self.tableData.indexOf(record);
+              // self.tableData.splice(index, 1);
+              self.changePage(self.pageIndex);
+
+              self.$message({
+                type: "success",
+                message: "删除成功!",
+              });
+            }
+          });
+        });
+    },
+    handleBatchDelete() {
+      var self = this;
+
+      var idList = this.multipleSelection.map((record) => {
+        return record.id;
+      });
+
+      this.$confirm("是否确认删除选中项?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        accountInfoApi.batchRemove(idList).then(function (response) {
+          var jsonData = response.data;
+
+          if (jsonData.result) {
+            self.changePage(self.pageIndex);
+
+            self.$message({
+              type: "success",
+              message: "删除成功!",
+            });
+          }
+        });
+      });
+    },
+    onDetailModalClose(refreshed) {
+      //保存成功后回调
+      this.showModal = false;
+
+      if (refreshed) {
+        this.changePage(this.pageIndex);
+      }
+    },
+    updateSwitch(row) {
+      accountInfoApi.update(row);
+    },
+  },
+  mounted: function () {
+    this.changePage(1);
+  },
+  components: {
+    "el-select-tree": SelectTree,
+    "accountInfo-detail": AccountInfoDetail,
+  },
+};
+</script>
+<style lang="scss" scoped>
+.el-breadcrumb {
+  margin: 10px;
+  line-height: 20px;
+}
+
+.el-divider {
+  margin: 5px 0;
+}
+
+.demo-form-inline {
+  margin-left: 10px;
+  text-align: left;
+}
+
+.button-group {
+  margin-left: 10px;
+  text-align: left;
+}
+</style>

+ 224 - 0
src/views/merchant/capitalInfo-detail.vue

@@ -0,0 +1,224 @@
+
+<style scoped>
+.user-panel {
+  margin: 10px auto;
+}
+</style>
+<template>
+  <el-dialog
+    :visible.sync="showDialog"
+    :title="title"
+    :modal-append-to-body="false"
+    style="text-align: left"
+    @close="closeDialog"
+    :close-on-click-modal="false"
+  >
+    <div class="user-panel" v-loading="loading">
+      <el-form
+        ref="form"
+        :model="formModel"
+        :rules="ruleValidate"
+        :label-width="'100px'"
+      >
+        <el-form-item label="" prop="id">
+          <el-input
+            v-model="formModel.id"
+            placeholder="请输入"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="商户id" prop="merchantId">
+          <el-input
+            v-model="formModel.merchantId"
+            placeholder="请输入商户id"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="可提现金额(线上)" prop="withdrawalAmount">
+          <el-input
+            v-model="formModel.withdrawalAmount"
+            placeholder="请输入可提现金额(线上)"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="已提现金额(线上)" prop="alreadyWithdrawalAmount">
+          <el-input
+            v-model="formModel.alreadyWithdrawalAmount"
+            placeholder="请输入已提现金额(线上)"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="总收益(线上,不包含当天)" prop="totalRevenue">
+          <el-input
+            v-model="formModel.totalRevenue"
+            placeholder="请输入总收益(线上,不包含当天)"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="创建人" prop="createBy">
+          <el-input
+            v-model="formModel.createBy"
+            placeholder="请输入创建人"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="创建时间" prop="createTime">
+          <el-input
+            v-model="formModel.createTime"
+            placeholder="请输入创建时间"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="更新人" prop="updateBy">
+          <el-input
+            v-model="formModel.updateBy"
+            placeholder="请输入更新人"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="更新时间" prop="updateTime">
+          <el-input
+            v-model="formModel.updateTime"
+            placeholder="请输入更新时间"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="是否删除" prop="delFlag">
+          <el-input
+            v-model="formModel.delFlag"
+            placeholder="请输入是否删除"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="closeDialog">取 消</el-button>
+      <el-button type="primary" @click="handleSubmit" :loading="submitting"
+        >确 定</el-button
+      >
+    </span>
+  </el-dialog>
+</template>
+<script>
+import Constant from "@/constant";
+import capitalInfoApi from "@/api/merchant/capitalInfo";
+
+export default {
+  props: ["businessKey", "title"],
+  data() {
+    return {
+      formModel: {},
+      ruleValidate: {
+        id: [{ required: true, message: "不能为空", trigger: "blur" }],
+        merchantId: [
+          { required: true, message: "商户id不能为空", trigger: "blur" },
+        ],
+        withdrawalAmount: [
+          {
+            required: true,
+            message: "可提现金额(线上)不能为空",
+            trigger: "blur",
+          },
+        ],
+        alreadyWithdrawalAmount: [
+          {
+            required: true,
+            message: "已提现金额(线上)不能为空",
+            trigger: "blur",
+          },
+        ],
+        totalRevenue: [
+          {
+            required: true,
+            message: "总收益(线上,不包含当天)不能为空",
+            trigger: "blur",
+          },
+        ],
+        createBy: [
+          { required: true, message: "创建人不能为空", trigger: "blur" },
+        ],
+        createTime: [
+          { required: true, message: "创建时间不能为空", trigger: "blur" },
+        ],
+        updateBy: [
+          { required: true, message: "更新人不能为空", trigger: "blur" },
+        ],
+        updateTime: [
+          { required: true, message: "更新时间不能为空", trigger: "blur" },
+        ],
+        delFlag: [
+          { required: true, message: "是否删除不能为空", trigger: "blur" },
+        ],
+      },
+      showDialog: true,
+      loading: false,
+      submitting: false,
+    };
+  },
+  methods: {
+    closeDialog() {
+      this.$emit("close", false);
+    },
+    handleSubmit() {
+      var self = this;
+
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          (function () {
+            var id = self.formModel.id;
+
+            if (id == null || id.length == 0) {
+              return capitalInfoApi.add(self.formModel);
+            } else {
+              return capitalInfoApi.update(self.formModel);
+            }
+          })().then(function (response) {
+            var jsonData = response.data;
+
+            if (jsonData.result) {
+              self.$message({
+                message: "保存成功!",
+                type: "success",
+              });
+
+              self.$emit("close", true);
+            } else {
+              self.$message({
+                message: jsonData.message + "",
+                type: "warning",
+              });
+
+              self.$emit("close", false);
+            }
+          });
+        }
+      });
+    },
+  },
+  mounted: function () {
+    var self = this;
+
+    (function () {
+      if (self.businessKey.length == 0) {
+        return capitalInfoApi.create();
+      } else {
+        return capitalInfoApi.edit(self.businessKey);
+      }
+    })()
+      .then((response) => {
+        var jsonData = response.data;
+        self.loading = false;
+
+        if (jsonData.result) {
+          self.formModel = jsonData.data;
+        } else {
+          self.$message.error(jsonData.message + "");
+        }
+      })
+      .catch((error) => {
+        self.$message.error(error + "");
+      });
+  },
+};
+</script>

+ 414 - 0
src/views/merchant/capitalInfo-list.vue

@@ -0,0 +1,414 @@
+<template>
+  <div>
+    <el-breadcrumb separator=">">
+      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
+      <el-breadcrumb-item>
+        <a href="#">系统管理</a>
+      </el-breadcrumb-item>
+      <el-breadcrumb-item>
+        <a href="/capitalInfo">capitalInfo管理</a>
+      </el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-divider></el-divider>
+    <!--
+      要resetFields起作用,必须配置:model和prop
+    -->
+    <el-form
+      ref="queryForm"
+      :model="queryModel"
+      inline
+      class="demo-form-inline"
+    >
+      <el-form-item label="" prop="id">
+        <el-input type="text" size="mini" v-model="queryModel.id"></el-input>
+      </el-form-item>
+      <el-form-item label="商户id" prop="merchantId">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.merchantId"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="可提现金额(线上)" prop="withdrawalAmount">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.withdrawalAmount"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="已提现金额(线上)" prop="alreadyWithdrawalAmount">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.alreadyWithdrawalAmount"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="总收益(线上,不包含当天)" prop="totalRevenue">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.totalRevenue"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="创建人" prop="createBy">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.createBy"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="创建时间" prop="createTime">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.createTime"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="更新人" prop="updateBy">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.updateBy"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="更新时间" prop="updateTime">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.updateTime"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="是否删除" prop="delFlag">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.delFlag"
+        ></el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          size="mini"
+          icon="ios-search"
+          @click="changePage(1)"
+          :loading="loading"
+          >查询</el-button
+        >&nbsp;
+        <el-button
+          type="info"
+          size="mini"
+          style="margin-left: 8px"
+          @click="handleReset('queryForm')"
+          >重置</el-button
+        >&nbsp;
+      </el-form-item>
+    </el-form>
+    <el-divider></el-divider>
+    <el-row class="button-group">
+      <el-button
+        type="primary"
+        size="small"
+        plain
+        icon="el-icon-circle-plus"
+        @click="handleAdd"
+        >新增</el-button
+      >
+      <el-button
+        type="primary"
+        size="small"
+        plain
+        icon="el-icon-circle-plus"
+        :disabled="multipleSelection.length == 0"
+        @click="handleBatchDelete"
+        >删除选中项</el-button
+      >
+    </el-row>
+    <el-table
+      :data="tableData"
+      style="min-height: 400px"
+      v-loading="loading"
+      stripe
+      @sort-change="sortChange"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55"></el-table-column>
+      <el-table-column prop="id" label="" width="180"></el-table-column>
+      <el-table-column
+        prop="merchantId"
+        label="商户id"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="withdrawalAmount"
+        label="可提现金额(线上)"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="alreadyWithdrawalAmount"
+        label="已提现金额(线上)"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="totalRevenue"
+        label="总收益(线上,不包含当天)"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="createBy"
+        label="创建人"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="createTime"
+        label="创建时间"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="updateBy"
+        label="更新人"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="updateTime"
+        label="更新时间"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="delFlag"
+        label="是否删除"
+        width="180"
+      ></el-table-column>
+      <el-table-column label="操作">
+        <template slot-scope="{ row }">
+          <el-button size="mini" type="warning" @click="handleEdit(row)"
+            >编辑</el-button
+          >
+          <el-button size="mini" type="danger" @click="handleDelete(row)"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      :current-page.sync="pageIndex"
+      :total="totalElements"
+      :page-sizes="pageSizeList"
+      @current-change="changePage"
+      @size-change="pageSizeChange"
+      layout="total, sizes, prev, pager, next, jumper"
+    ></el-pagination>
+    <capitalInfo-detail
+      v-if="showModal"
+      :businessKey="businessKey"
+      :title="modalTitle"
+      @close="onDetailModalClose"
+    ></capitalInfo-detail>
+  </div>
+</template>
+<script>
+import Constant from "@/constant";
+import CapitalInfoDetail from "./capitalInfo-detail";
+import capitalInfoApi from "@/api/merchant/capitalInfo";
+import NProgress from "nprogress"; // progress bar
+import "nprogress/nprogress.css"; // progress bar style
+
+export default {
+  data() {
+    var self = this;
+
+    return {
+      queryModel: {
+        id: "",
+        merchantId: "",
+        withdrawalAmount: "",
+        alreadyWithdrawalAmount: "",
+        totalRevenue: "",
+        createBy: "",
+        createTime: "",
+        updateBy: "",
+        updateTime: "",
+        delFlag: "",
+      },
+      loading: false,
+      tableData: [],
+      pageIndex: 1,
+      pageSize: 10,
+      totalPages: 0,
+      totalElements: 0,
+      field: "",
+      direction: "",
+      pageSizeList: [10, 20, 30],
+      multipleSelection: [],
+      showModal: false,
+      modalTitle: "",
+      businessKey: "",
+    };
+  },
+  methods: {
+    changePage(pageIndex) {
+      var self = this;
+
+      self.loading = true;
+
+      self.pageIndex = pageIndex;
+      var formData = new FormData();
+
+      formData.append("pageIndex", self.pageIndex);
+      formData.append("pageSize", self.pageSize);
+
+      formData.append("id", self.queryModel.id);
+      formData.append("merchantId", self.queryModel.merchantId);
+      formData.append("withdrawalAmount", self.queryModel.withdrawalAmount);
+      formData.append(
+        "alreadyWithdrawalAmount",
+        self.queryModel.alreadyWithdrawalAmount
+      );
+      formData.append("totalRevenue", self.queryModel.totalRevenue);
+      formData.append("createBy", self.queryModel.createBy);
+      formData.append("createTime", self.queryModel.createTime);
+      formData.append("updateBy", self.queryModel.updateBy);
+      formData.append("updateTime", self.queryModel.updateTime);
+      formData.append("delFlag", self.queryModel.delFlag);
+
+      if (this.field != null) {
+        formData.append("field", this.field);
+      }
+
+      if (this.direction != null) {
+        formData.append("direction", this.direction);
+      }
+
+      capitalInfoApi
+        .pageList(formData)
+        .then(function (response) {
+          self.loading = false;
+
+          var jsonData = response.data.data;
+
+          self.tableData = jsonData.data;
+          self.totalPages = jsonData.totalPages;
+          self.totalElements = jsonData.recordsTotal;
+        })
+        .catch((error) => {
+          self.loading = false;
+          // self.$message.error(error + "");
+        });
+    },
+    pageSizeChange(pageSize) {
+      this.pageSize = pageSize;
+
+      this.$nextTick(() => {
+        this.changePage(this.pageIndex);
+      });
+    },
+    sortChange(data) {
+      this.field = data.column.field;
+      this.direction = data.order;
+
+      this.changePage(this.pageIndex);
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    handleReset(name) {
+      this.$refs[name].resetFields();
+    },
+    handleAdd() {
+      this.modalTitle = "新增";
+      this.businessKey = "";
+      this.showModal = true;
+    },
+    handleEdit(record) {
+      this.modalTitle = "编辑";
+      this.businessKey = record.id;
+      this.showModal = true;
+    },
+    handleDelete(record) {
+      var self = this;
+
+      self
+        .$confirm("是否确认删除?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+        .then(() => {
+          capitalInfoApi.remove(record.id).then(function (response) {
+            var jsonData = response.data;
+
+            if (jsonData.result) {
+              // var index = self.tableData.indexOf(record);
+              // self.tableData.splice(index, 1);
+              self.changePage(self.pageIndex);
+
+              self.$message({
+                type: "success",
+                message: "删除成功!",
+              });
+            }
+          });
+        });
+    },
+    handleBatchDelete() {
+      var self = this;
+
+      var idList = this.multipleSelection.map((record) => {
+        return record.id;
+      });
+
+      this.$confirm("是否确认删除选中项?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        capitalInfoApi.batchRemove(idList).then(function (response) {
+          var jsonData = response.data;
+
+          if (jsonData.result) {
+            self.changePage(self.pageIndex);
+
+            self.$message({
+              type: "success",
+              message: "删除成功!",
+            });
+          }
+        });
+      });
+    },
+    onDetailModalClose(refreshed) {
+      //保存成功后回调
+      this.showModal = false;
+
+      if (refreshed) {
+        this.changePage(this.pageIndex);
+      }
+    },
+  },
+  mounted: function () {
+    this.changePage(1);
+  },
+  components: {
+    "capitalInfo-detail": CapitalInfoDetail,
+  },
+};
+</script>
+<style lang="scss" scoped>
+.el-breadcrumb {
+  margin: 10px;
+  line-height: 20px;
+}
+
+.el-divider {
+  margin: 5px 0;
+}
+
+.demo-form-inline {
+  margin-left: 10px;
+  text-align: left;
+}
+
+.button-group {
+  margin-left: 10px;
+  text-align: left;
+}
+</style>

+ 254 - 0
src/views/merchant/withdrawalRecord-detail.vue

@@ -0,0 +1,254 @@
+
+<style scoped>
+.user-panel {
+  margin: 10px auto;
+}
+</style>
+<template>
+  <el-dialog
+    :visible.sync="showDialog"
+    :title="title"
+    :modal-append-to-body="false"
+    style="text-align: left"
+    @close="closeDialog"
+    :close-on-click-modal="false"
+  >
+    <div class="user-panel" v-loading="loading">
+      <el-form
+        ref="form"
+        :model="formModel"
+        :rules="ruleValidate"
+        :label-width="'100px'"
+      >
+        <el-form-item label="" prop="id">
+          <el-input
+            v-model="formModel.id"
+            placeholder="请输入"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="商户id" prop="merchantId">
+          <el-input
+            v-model="formModel.merchantId"
+            placeholder="请输入商户id"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="申请提现金额" prop="applyWithdrawalAmount">
+          <el-input
+            v-model="formModel.applyWithdrawalAmount"
+            placeholder="请输入申请提现金额"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="申请时间" prop="applyTime">
+          <el-input
+            v-model="formModel.applyTime"
+            placeholder="请输入申请时间"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="状态(0:申请中,1:同意,2:拒绝)" prop="status">
+          <el-input
+            v-model="formModel.status"
+            placeholder="请输入状态(0:申请中,1:同意,2:拒绝)"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="审核时间" prop="examineTime">
+          <el-input
+            v-model="formModel.examineTime"
+            placeholder="请输入审核时间"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="审核人" prop="examineBy">
+          <el-input
+            v-model="formModel.examineBy"
+            placeholder="请输入审核人"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input
+            v-model="formModel.remark"
+            placeholder="请输入备注"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="提现编号" prop="withdrawalNo">
+          <el-input
+            v-model="formModel.withdrawalNo"
+            placeholder="请输入提现编号"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="创建人" prop="createBy">
+          <el-input
+            v-model="formModel.createBy"
+            placeholder="请输入创建人"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="创建时间" prop="createTime">
+          <el-input
+            v-model="formModel.createTime"
+            placeholder="请输入创建时间"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="更新人" prop="updateBy">
+          <el-input
+            v-model="formModel.updateBy"
+            placeholder="请输入更新人"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="更新时间" prop="updateTime">
+          <el-input
+            v-model="formModel.updateTime"
+            placeholder="请输入更新时间"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="是否删除" prop="delFlag">
+          <el-input
+            v-model="formModel.delFlag"
+            placeholder="请输入是否删除"
+            style="width: 300px"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="closeDialog">取 消</el-button>
+      <el-button type="primary" @click="handleSubmit" :loading="submitting"
+        >确 定</el-button
+      >
+    </span>
+  </el-dialog>
+</template>
+<script>
+import Constant from "@/constant";
+import withdrawalRecordApi from "@/api/merchant/withdrawalRecord";
+
+export default {
+  props: ["businessKey", "title"],
+  data() {
+    return {
+      formModel: {},
+      ruleValidate: {
+        id: [{ required: true, message: "不能为空", trigger: "blur" }],
+        merchantId: [
+          { required: true, message: "商户id不能为空", trigger: "blur" },
+        ],
+        applyWithdrawalAmount: [
+          { required: true, message: "申请提现金额不能为空", trigger: "blur" },
+        ],
+        applyTime: [
+          { required: true, message: "申请时间不能为空", trigger: "blur" },
+        ],
+        status: [
+          {
+            required: true,
+            message: "状态(0:申请中,1:同意,2:拒绝)不能为空",
+            trigger: "blur",
+          },
+        ],
+        examineTime: [
+          { required: true, message: "审核时间不能为空", trigger: "blur" },
+        ],
+        examineBy: [
+          { required: true, message: "审核人不能为空", trigger: "blur" },
+        ],
+        remark: [{ required: true, message: "备注不能为空", trigger: "blur" }],
+        withdrawalNo: [
+          { required: true, message: "提现编号不能为空", trigger: "blur" },
+        ],
+        createBy: [
+          { required: true, message: "创建人不能为空", trigger: "blur" },
+        ],
+        createTime: [
+          { required: true, message: "创建时间不能为空", trigger: "blur" },
+        ],
+        updateBy: [
+          { required: true, message: "更新人不能为空", trigger: "blur" },
+        ],
+        updateTime: [
+          { required: true, message: "更新时间不能为空", trigger: "blur" },
+        ],
+        delFlag: [
+          { required: true, message: "是否删除不能为空", trigger: "blur" },
+        ],
+      },
+      showDialog: true,
+      loading: false,
+      submitting: false,
+    };
+  },
+  methods: {
+    closeDialog() {
+      this.$emit("close", false);
+    },
+    handleSubmit() {
+      var self = this;
+
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          (function () {
+            var id = self.formModel.id;
+
+            if (id == null || id.length == 0) {
+              return withdrawalRecordApi.add(self.formModel);
+            } else {
+              return withdrawalRecordApi.update(self.formModel);
+            }
+          })().then(function (response) {
+            var jsonData = response.data;
+
+            if (jsonData.result) {
+              self.$message({
+                message: "保存成功!",
+                type: "success",
+              });
+
+              self.$emit("close", true);
+            } else {
+              self.$message({
+                message: jsonData.message + "",
+                type: "warning",
+              });
+
+              self.$emit("close", false);
+            }
+          });
+        }
+      });
+    },
+  },
+  mounted: function () {
+    var self = this;
+
+    (function () {
+      if (self.businessKey.length == 0) {
+        return withdrawalRecordApi.create();
+      } else {
+        return withdrawalRecordApi.edit(self.businessKey);
+      }
+    })()
+      .then((response) => {
+        var jsonData = response.data;
+        self.loading = false;
+
+        if (jsonData.result) {
+          self.formModel = jsonData.data;
+        } else {
+          self.$message.error(jsonData.message + "");
+        }
+      })
+      .catch((error) => {
+        self.$message.error(error + "");
+      });
+  },
+};
+</script>

+ 440 - 0
src/views/merchant/withdrawalRecord-list.vue

@@ -0,0 +1,440 @@
+<template>
+  <div>
+    <el-breadcrumb separator=">">
+      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
+      <el-breadcrumb-item>
+        <a href="#">系统管理</a>
+      </el-breadcrumb-item>
+      <el-breadcrumb-item>
+        <a href="/withdrawalRecord">营收用户提现审核</a>
+      </el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-divider></el-divider>
+    <!--
+      要resetFields起作用,必须配置:model和prop
+    -->
+    <el-form
+      ref="queryForm"
+      :model="queryModel"
+      inline
+      class="demo-form-inline"
+    >
+      <el-form-item label="关联的公司车队" prop="companyId">
+        <el-select-tree
+          :props="props"
+          :options="companyResult"
+          v-model="queryModel.companyId"
+          size="mini"
+          width="200px"
+        ></el-select-tree>
+      </el-form-item>
+      <el-form-item label="商户名称" prop="name">
+        <el-input type="text" size="mini" v-model="queryModel.name"></el-input>
+      </el-form-item>
+      <!-- <el-form-item label="申请时间" prop="applyTime">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.applyTime"
+        ></el-input>
+      </el-form-item> -->
+      <el-form-item label="提现编号" prop="withdrawalNo">
+        <el-input
+          type="text"
+          size="mini"
+          v-model="queryModel.withdrawalNo"
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="审批状态" prop="status">
+        <el-select
+          v-model="queryModel.status"
+          size="mini"
+          placeholder="请选择"
+          style="width: 100px"
+        >
+          <el-option label="全部" value=""> </el-option>
+          <el-option label="申请中" value="0"> </el-option>
+          <el-option label="同意" value="1"> </el-option>
+          <el-option label="拒绝" value="2"> </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          size="mini"
+          icon="ios-search"
+          @click="changePage(1)"
+          :loading="loading"
+          >查询</el-button
+        >&nbsp;
+        <el-button
+          type="info"
+          size="mini"
+          style="margin-left: 8px"
+          @click="handleReset('queryForm')"
+          >重置</el-button
+        >&nbsp;
+      </el-form-item>
+    </el-form>
+    <el-divider></el-divider>
+    <el-row class="button-group"> </el-row>
+    <el-table
+      :data="tableData"
+      style="min-height: 400px"
+      v-loading="loading"
+      stripe
+      @sort-change="sortChange"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55"></el-table-column>
+      <el-table-column
+        type="index"
+        label="序号"
+        :index="indexMethod"
+        width="50"
+      ></el-table-column>
+      <el-table-column
+        prop="accountInfo.companyName"
+        label="所属公司"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="accountInfo.name"
+        label="提现人员名称"
+        width="150"
+      ></el-table-column>
+      <el-table-column
+        prop="capitalInfo.withdrawalAmount"
+        label="可提现金额"
+        width="150"
+      ></el-table-column>
+      <el-table-column
+        prop="withdrawalNo"
+        label="提现编号"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        prop="applyWithdrawalAmount"
+        label="申请提现金额"
+        width="150"
+      ></el-table-column>
+      <el-table-column
+        prop="applyTime"
+        label="申请时间"
+        width="180"
+      ></el-table-column>
+      <el-table-column prop="status" label="状态" width="150">
+        <template slot-scope="{ row }">
+          <span v-if="row.status == 0">申请中</span>
+          <span v-else-if="row.status == 1">同意</span>
+          <span v-else-if="row.status == 2">拒绝</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="examineTime"
+        label="审核时间"
+        width="180"
+      ></el-table-column>
+      <el-table-column prop="remark" label="备注" width="180"></el-table-column>
+      <el-table-column label="操作" fixed="right" width="180">
+        <template slot-scope="{ row }">
+          <el-row>
+            <el-col :span="12">
+              <el-link
+                v-if="row.status == 0"
+                type="primary"
+                :underline="false"
+                @click="handleApproval(row, '1')"
+                >审核通过</el-link
+              >
+            </el-col>
+            <el-col :span="12">
+              <el-link
+                v-if="row.status == 0"
+                type="primary"
+                :underline="false"
+                @click="handleApproval(row, '2')"
+                >审核不通过</el-link
+              >
+            </el-col>
+          </el-row>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      :current-page.sync="pageIndex"
+      :total="totalElements"
+      :page-sizes="pageSizeList"
+      @current-change="changePage"
+      @size-change="pageSizeChange"
+      layout="total, sizes, prev, pager, next, jumper"
+    ></el-pagination>
+    <withdrawalRecord-detail
+      v-if="showModal"
+      :businessKey="businessKey"
+      :title="modalTitle"
+      @close="onDetailModalClose"
+    ></withdrawalRecord-detail>
+  </div>
+</template>
+<script>
+import Constant from "@/constant";
+import WithdrawalRecordDetail from "./withdrawalRecord-detail";
+import withdrawalRecordApi from "@/api/merchant/withdrawalRecord";
+import companyInfoApi from "@/api/bus/companyInfo";
+import SelectTree from "@/components/SelectTree";
+import NProgress from "nprogress"; // progress bar
+import "nprogress/nprogress.css"; // progress bar style
+
+export default {
+  data() {
+    var self = this;
+
+    return {
+      queryModel: {
+        id: "",
+        companyId: "",
+        name: "",
+        phone: "",
+        applyTime: "",
+        status: "",
+        withdrawalNo: "",
+      },
+      loading: false,
+      tableData: [],
+      pageIndex: 1,
+      pageSize: 10,
+      totalPages: 0,
+      totalElements: 0,
+      field: "",
+      direction: "",
+      pageSizeList: [10, 20, 30],
+      multipleSelection: [],
+      showModal: false,
+      modalTitle: "",
+      businessKey: "",
+      companyResult: [],
+      treeData: [],
+      props: {
+        // 配置项(必选)
+        value: "id",
+        label: "name",
+        children: "children",
+      },
+    };
+  },
+  created() {
+    var self = this;
+
+    companyInfoApi.treeList().then(function (response) {
+      var jsonData = response.data;
+      if (jsonData.result) {
+        self.companyResult = jsonData.data;
+      }
+    });
+  },
+  methods: {
+    indexMethod(index) {
+      return (this.pageIndex - 1) * this.pageSize + (index + 1);
+    },
+    changePage(pageIndex) {
+      var self = this;
+
+      self.loading = true;
+
+      self.pageIndex = pageIndex;
+      var formData = new FormData();
+
+      formData.append("pageIndex", self.pageIndex);
+      formData.append("pageSize", self.pageSize);
+
+      formData.append("id", self.queryModel.id);
+      formData.append("merchantId", self.queryModel.merchantId);
+      formData.append(
+        "applyWithdrawalAmount",
+        self.queryModel.applyWithdrawalAmount
+      );
+      formData.append("name", self.queryModel.name);
+      formData.append("status", self.queryModel.status);
+      if (self.queryModel.companyId == null) {
+        self.queryModel.companyId = "";
+      }
+      formData.append("companyId", self.queryModel.companyId);
+      formData.append("examineBy", self.queryModel.examineBy);
+      formData.append("withdrawalNo", self.queryModel.withdrawalNo);
+
+      if (this.field != null) {
+        formData.append("field", this.field);
+      }
+
+      if (this.direction != null) {
+        formData.append("direction", this.direction);
+      }
+
+      withdrawalRecordApi
+        .pageList(formData)
+        .then(function (response) {
+          self.loading = false;
+
+          var jsonData = response.data.data;
+
+          self.tableData = jsonData.data;
+          self.totalPages = jsonData.totalPages;
+          self.totalElements = jsonData.recordsTotal;
+        })
+        .catch((error) => {
+          self.loading = false;
+          // self.$message.error(error + "");
+        });
+    },
+    pageSizeChange(pageSize) {
+      this.pageSize = pageSize;
+
+      this.$nextTick(() => {
+        this.changePage(this.pageIndex);
+      });
+    },
+    sortChange(data) {
+      this.field = data.column.field;
+      this.direction = data.order;
+
+      this.changePage(this.pageIndex);
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    handleReset(name) {
+      this.$refs[name].resetFields();
+    },
+    handleAdd() {
+      this.modalTitle = "新增";
+      this.businessKey = "";
+      this.showModal = true;
+    },
+    handleEdit(record) {
+      this.modalTitle = "编辑";
+      this.businessKey = record.id;
+      this.showModal = true;
+    },
+    handleDelete(record) {
+      var self = this;
+
+      self
+        .$confirm("是否确认删除?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+        .then(() => {
+          withdrawalRecordApi.remove(record.id).then(function (response) {
+            var jsonData = response.data;
+
+            if (jsonData.result) {
+              // var index = self.tableData.indexOf(record);
+              // self.tableData.splice(index, 1);
+              self.changePage(self.pageIndex);
+
+              self.$message({
+                type: "success",
+                message: "删除成功!",
+              });
+            }
+          });
+        });
+    },
+    handleBatchDelete() {
+      var self = this;
+
+      var idList = this.multipleSelection.map((record) => {
+        return record.id;
+      });
+
+      this.$confirm("是否确认删除选中项?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        withdrawalRecordApi.batchRemove(idList).then(function (response) {
+          var jsonData = response.data;
+
+          if (jsonData.result) {
+            self.changePage(self.pageIndex);
+
+            self.$message({
+              type: "success",
+              message: "删除成功!",
+            });
+          }
+        });
+      });
+    },
+    onDetailModalClose(refreshed) {
+      //保存成功后回调
+      this.showModal = false;
+
+      if (refreshed) {
+        this.changePage(this.pageIndex);
+      }
+    },
+    handleApproval(record, status) {
+      var self = this;
+      self
+        .$confirm("是否确认审核?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+        .then(() => {
+          var formData = new FormData();
+          formData.append("id", record.id);
+          formData.append("status", status);
+          withdrawalRecordApi.approval(formData).then(function (response) {
+            var jsonData = response.data;
+
+            if (jsonData.result) {
+              self.changePage(self.pageIndex);
+
+              self.$message({
+                type: "success",
+                message: jsonData.message,
+              });
+            } else {
+              self.$message({
+                showClose: true,
+                dangerouslyUseHTMLString: true,
+                message: jsonData.message,
+              });
+            }
+          });
+        });
+    },
+  },
+  mounted: function () {
+    this.changePage(1);
+  },
+  components: {
+    "el-select-tree": SelectTree,
+    "withdrawalRecord-detail": WithdrawalRecordDetail,
+  },
+};
+</script>
+<style lang="scss" scoped>
+.el-breadcrumb {
+  margin: 10px;
+  line-height: 20px;
+}
+
+.el-divider {
+  margin: 5px 0;
+}
+
+.demo-form-inline {
+  margin-left: 10px;
+  text-align: left;
+}
+
+.button-group {
+  margin-left: 10px;
+  text-align: left;
+}
+</style>