Browse Source

Merge branch 'feature/Feature-basic_data' of https://gogs.zfire.top/zfire-front/supply-front into feature/Feature-basic_data

chen 3 years ago
parent
commit
0814abaf7a

+ 34 - 19
package-lock.json

@@ -4677,7 +4677,7 @@
       "dependencies": {
         "define-property": {
           "version": "0.2.5",
-          "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
           "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
           "dev": true,
           "requires": {
@@ -10555,7 +10555,7 @@
       "dependencies": {
         "lodash": {
           "version": "4.17.4",
-          "resolved": "https://registry.nlark.com/lodash/download/lodash-4.17.4.tgz",
+          "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
           "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
           "dev": true
         }
@@ -13272,7 +13272,7 @@
       "dependencies": {
         "jsesc": {
           "version": "0.5.0",
-          "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-0.5.0.tgz?cache=0&sync_timestamp=1603900010788&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsesc%2Fdownload%2Fjsesc-0.5.0.tgz",
+          "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
           "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
           "dev": true
         }
@@ -13513,13 +13513,13 @@
         },
         "has-flag": {
           "version": "2.0.0",
-          "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-2.0.0.tgz",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
           "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
           "dev": true
         },
         "supports-color": {
           "version": "4.5.0",
-          "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-4.5.0.tgz?cache=0&sync_timestamp=1618560983872&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-4.5.0.tgz",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
           "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
           "dev": true,
           "requires": {
@@ -13868,7 +13868,7 @@
         },
         "http-errors": {
           "version": "1.6.3",
-          "resolved": "https://registry.npm.taobao.org/http-errors/download/http-errors-1.6.3.tgz",
+          "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
           "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
           "dev": true,
           "requires": {
@@ -13880,7 +13880,7 @@
         },
         "inherits": {
           "version": "2.0.3",
-          "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
           "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
           "dev": true
         },
@@ -14089,7 +14089,7 @@
       "dependencies": {
         "is-fullwidth-code-point": {
           "version": "2.0.0",
-          "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz?cache=0&sync_timestamp=1618552489864&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-fullwidth-code-point%2Fdownload%2Fis-fullwidth-code-point-2.0.0.tgz",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
           "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
           "dev": true
         }
@@ -14122,7 +14122,7 @@
         },
         "define-property": {
           "version": "0.2.5",
-          "resolved": "https://registry.npm.taobao.org/define-property/download/define-property-0.2.5.tgz",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
           "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
           "dev": true,
           "requires": {
@@ -14714,13 +14714,13 @@
       "dependencies": {
         "ansi-regex": {
           "version": "2.1.1",
-          "resolved": "https://registry.nlark.com/ansi-regex/download/ansi-regex-2.1.1.tgz",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
           "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
           "dev": true
         },
         "ansi-styles": {
           "version": "2.2.1",
-          "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-2.2.1.tgz",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
           "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
           "dev": true
         },
@@ -14744,7 +14744,7 @@
         },
         "chalk": {
           "version": "1.1.3",
-          "resolved": "https://registry.nlark.com/chalk/download/chalk-1.1.3.tgz?cache=0&sync_timestamp=1618995367379&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-1.1.3.tgz",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
           "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
           "dev": true,
           "requires": {
@@ -14757,7 +14757,7 @@
           "dependencies": {
             "supports-color": {
               "version": "2.0.0",
-              "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz?cache=0&sync_timestamp=1618560983872&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz",
+              "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
               "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
               "dev": true
             }
@@ -14777,7 +14777,7 @@
         },
         "has-flag": {
           "version": "1.0.0",
-          "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-1.0.0.tgz",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
           "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
           "dev": true
         },
@@ -14842,7 +14842,7 @@
         },
         "strip-ansi": {
           "version": "3.0.1",
-          "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz?cache=0&sync_timestamp=1618553320591&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-3.0.1.tgz",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
           "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
           "dev": true,
           "requires": {
@@ -14851,7 +14851,7 @@
         },
         "supports-color": {
           "version": "3.2.3",
-          "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-3.2.3.tgz?cache=0&sync_timestamp=1618560983872&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-3.2.3.tgz",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
           "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
           "dev": true,
           "requires": {
@@ -14883,7 +14883,7 @@
       "dependencies": {
         "deepmerge": {
           "version": "1.3.2",
-          "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.3.2.tgz",
+          "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.3.2.tgz",
           "integrity": "sha1-FmNpFinU2/42T6EqKk8KqGqjoFA=",
           "dev": true
         }
@@ -14908,7 +14908,7 @@
       "dependencies": {
         "deepmerge": {
           "version": "1.3.2",
-          "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.3.2.tgz",
+          "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.3.2.tgz",
           "integrity": "sha1-FmNpFinU2/42T6EqKk8KqGqjoFA=",
           "dev": true
         }
@@ -15037,7 +15037,7 @@
         },
         "is-fullwidth-code-point": {
           "version": "2.0.0",
-          "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz?cache=0&sync_timestamp=1618552489864&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-fullwidth-code-point%2Fdownload%2Fis-fullwidth-code-point-2.0.0.tgz",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
           "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
           "dev": true
         },
@@ -16060,6 +16060,21 @@
         "worker-loader": "^2.0.0"
       }
     },
+    "vue-print-nb": {
+      "version": "1.7.5",
+      "resolved": "https://registry.npmmirror.com/vue-print-nb/-/vue-print-nb-1.7.5.tgz",
+      "integrity": "sha512-iNbNyUVRWz0Ha1UTiCKxMPtHLUDGgNI8e8xmD3xqm9RlXIUeX9bT7DgNAfY8vPzqyFRHqGjxLI1rycKH366ziQ==",
+      "requires": {
+        "vue": "^2.6.11"
+      },
+      "dependencies": {
+        "vue": {
+          "version": "2.6.14",
+          "resolved": "https://registry.npmmirror.com/vue/-/vue-2.6.14.tgz",
+          "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ=="
+        }
+      }
+    },
     "vue-quill-editor": {
       "version": "3.0.6",
       "resolved": "https://registry.npmjs.org/vue-quill-editor/-/vue-quill-editor-3.0.6.tgz",

+ 1 - 0
package.json

@@ -26,6 +26,7 @@
     "screenfull": "^4.2.0",
     "vue": "2.6.10",
     "vue-pdf": "^4.3.0",
+    "vue-print-nb": "^1.7.5",
     "vue-quill-editor": "^3.0.6",
     "vue-router": "3.0.6",
     "vuex": "3.1.0"

+ 10 - 0
src/api/sales_region.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 获取对应关系列表
+export function getRelationList(params) {
+  return request({
+    url: '/admin/user/mch/list',
+    method: 'get',
+    params
+  })
+}

+ 10 - 0
src/api/stock.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 获取库存列表
+export function getStockList(params) {
+  return request({
+    url: '/admin/user/mch/list',
+    method: 'get',
+    params
+  })
+}

+ 10 - 0
src/api/supply/sales.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 获取列表
+export function getList(params) {
+  return request({
+    url: '/admin/user/mch/list',
+    method: 'get',
+    params
+  })
+}

+ 40 - 0
src/components/Common/export-button.vue

@@ -0,0 +1,40 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" :icon="isIcon ? 'el-icon-download':''" @click="handleExport">{{exText}}</el-button>
+  </div>
+</template>
+
+<script>
+import { downloadFiles } from '@/utils/util'
+
+export default {
+  name: 'ExportButton',
+  props: {
+    exText: {
+      type: String,
+      default: '导出数据'
+    },
+    isIcon: {
+      type: Boolean,
+      default: true
+    },
+    exUrl: {
+      type: String,
+      default: '',
+    },
+    exParams: {
+      type: Object,
+      default: null
+    }
+  },
+  methods: {
+    handleExport() {
+      downloadFiles(this.exUrl, this.exParams);
+    }
+  }
+}
+</script>
+
+<style>
+
+</style>

+ 5 - 0
src/main.js

@@ -20,11 +20,16 @@ import '@/permission' // permission control
 
 import * as filters from './filters' // global filters
 
+// 成功/错误提示
 import {successMsg, errorMsg, warningNotify} from '@/utils/common.js'
 Vue.prototype.$successMsg = successMsg;
 Vue.prototype.$errorMsg = errorMsg;
 Vue.prototype.$warningNotify = warningNotify;
 
+// 自定义组件
+import ExportButton from '@/components/Common/export-button.vue'
+Vue.component('ExportButton', ExportButton);
+
 /**
  * If you don't want to use mock-server
  * you want to use MockJs for mock api

+ 99 - 0
src/styles/index.scss

@@ -258,4 +258,103 @@ div:focus {
       width: calc(100vw - 210px);
     }
   }
+}
+
+.diy-table-1 {
+  border: 1px solid #EBEEF5;
+  border-right: none;
+  border-bottom: none;
+  .item {
+    display: flex;
+    border-bottom: 1px solid #EBEEF5;
+    .label {
+      width: 120px;
+      height: 40px;
+      display: flex;
+      align-items: center;
+      padding: 0 10px;
+      box-sizing: border-box;
+      background: #F5F7FA;
+      border-right: 1px solid #EBEEF5;
+      font-size: 14px;
+      color: #333333;
+    }
+    .value {
+      flex: 1;
+      height: 40px;
+      display: flex;
+      align-items: center;
+      padding: 0 10px;
+      box-sizing: border-box;
+      border-right: 1px solid #EBEEF5;
+      font-size: 14px;
+      color: #333333;
+      input {
+        border: none;
+        padding: 0;
+      }
+    }
+  }
+}
+.diy-table-2 {
+  font-size: 14px;
+  margin-top: 20px;
+  margin-bottom: 20px;
+  .el-row {
+    margin-left: 0 !important;
+    margin-right: 0 !important;
+    border: 1px solid #EBEEF5;
+    border-right: none;
+  }
+  .el-col {
+    padding-top: 14px;
+    padding-bottom: 14px;
+    border-right: 1px solid #EBEEF5;
+  }
+  .head {
+    color: #909399;
+    font-weight: bold;
+    background: #F5F7FA;
+  }
+  .body {
+    color: #333333;
+    .el-row {
+      border-top: none;
+    }
+  }
+  .foot {
+    color: #333333;
+    .el-row {
+      border-top: none;
+    }
+  }
+}
+
+.diy-form-1 {
+  .item {
+    display: flex;
+    height: 40px;
+    .label {
+      width: 100px;
+      display: flex;
+      align-items: center;
+      padding-right: 10px;
+      box-sizing: border-box;
+      font-size: 14px;
+      color: #606266;
+      font-weight: 700;
+    }
+    .value {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      box-sizing: border-box;
+      font-size: 14px;
+      color: #333333;
+      input {
+        border: none;
+        padding: 0;
+      }
+    }
+  }
 }

+ 1 - 1
src/utils/util.js

@@ -10,7 +10,7 @@ import { getToken } from '@/utils/auth'
 export function deleteEmptyObj(obj) {
   let newObj = obj;
   for(var key in newObj) {
-    if(newObj[key] === '' || newObj[key] === null) {
+    if(newObj[key] === '' || newObj[key] === null || newObj[key] === undefined) {
       delete newObj[key]
     }
   }

+ 196 - 391
src/views/merchant/merchant_list.vue

@@ -2,69 +2,41 @@
   <div class="app-container">
     <!-- 筛选条件 -->
     <div class="screen-container">
-      <div class="top clearfix">
-        <div class="title fl">条件筛选</div>
-      </div>
-      <el-form
-        ref="screenForm"
-        :model="screenForm"
-        label-width="70px"
-        size="small"
-        label-position="left"
-      >
+      <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="商户账号" prop="account">
-              <el-input
-                v-model="screenForm.account"
-                placeholder="请输入商户账号"
-              ></el-input>
+              <el-input v-model="screenForm.account" placeholder="请输入商户账号"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="商户昵称" prop="nickname">
-              <el-input
-                v-model="screenForm.nickname"
-                placeholder="请输入商户昵称"
-              ></el-input>
+              <el-input v-model="screenForm.nickname" placeholder="请输入商户昵称"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="联系电话" prop="phone">
-              <el-input
-                v-model="screenForm.phone"
-                placeholder="请输入联系电话"
-              ></el-input>
+              <el-input v-model="screenForm.phone" placeholder="请输入联系电话"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="电子邮箱" prop="email">
-              <el-input
-                v-model="screenForm.email"
-                placeholder="请输入电子邮箱"
-              ></el-input>
+              <el-input v-model="screenForm.email" placeholder="请输入电子邮箱"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="状态" prop="state">
               <el-select v-model="screenForm.status" placeholder="全部">
                 <el-option label="全部" value=""></el-option>
-                <el-option
-                  :label="item.label"
-                  :value="item.value"
-                  v-for="(item, index) in select_status"
-                  :key="index"
-                ></el-option>
+                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
-
+          
           <el-col :xs="24" :sm="12" :lg="18" class="tr">
             <el-form-item label="">
               <el-button size="small" @click="resetScreenForm">清空</el-button>
-              <el-button size="small" type="primary" @click="submitScreenForm"
-                >搜索</el-button
-              >
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
             </el-form-item>
           </el-col>
         </el-row>
@@ -74,134 +46,43 @@
     <div class="mymain-container">
       <div class="btn-group clearfix">
         <div class="fl">
-          <el-button size="small" type="primary" @click="toCreate()"
-            >开通账号</el-button
-          >
+          <el-button size="small" type="primary" @click="toCreate()">开通账号</el-button>
         </div>
         <div class="fr">
-          <el-button
-            size="small"
-            type="primary"
-            icon="el-icon-download"
-            @click="handleExport"
-            >导出数据</el-button
-          >
+          <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
         </div>
       </div>
       <div class="table">
-        <el-table
-          v-loading="listLoading"
-          :data="dataList"
-          element-loading-text="Loading"
-          border
-          fit
-          highlight-current-row
-          stripe
-        >
-          <el-table-column
-            align="center"
-            label="操作"
-            width="120"
-            fixed="right"
-          >
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="操作" width="120" fixed="right">
             <template slot-scope="scope">
-              <el-button type="text" @click="toDetail(scope.row.adminUserId)"
-                >详情</el-button
-              >
+              <el-button type="text" @click="toDetail(scope.row.adminUserId)">详情</el-button>
               <template v-if="checkBtnRole('status')">
-                <el-popconfirm
-                  v-if="scope.row.status"
-                  style="margin-left: 10px"
-                  title="确定冻结吗?"
-                  @onConfirm="changeStatus(scope.row.adminUserId, 0)"
-                >
+                <el-popconfirm v-if="scope.row.status" style="margin-left: 10px;" title="确定冻结吗?" @onConfirm="changeStatus(scope.row.adminUserId, 0)" >
                   <el-button slot="reference" type="text">冻结</el-button>
                 </el-popconfirm>
-                <el-popconfirm
-                  v-else
-                  style="margin-left: 10px"
-                  title="确定恢复吗?"
-                  @onConfirm="changeStatus(scope.row.adminUserId, 1)"
-                >
+                <el-popconfirm v-else style="margin-left: 10px;" title="确定恢复吗?" @onConfirm="changeStatus(scope.row.adminUserId, 1)" >
                   <el-button slot="reference" type="text">恢复</el-button>
                 </el-popconfirm>
               </template>
             </template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            label="商户账号"
-            prop="userName"
-            min-width="100"
-            show-overflow-tooltip
-          >
+          <el-table-column align="center" label="商户账号" prop="userName" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-button type="text" @click="toAccountList(scope.row)"
-                >查看</el-button
-              >
+              <el-button type="text" @click="toAccountList(scope.row)">查看</el-button>
             </template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            label="商户昵称"
-            prop="adminCompanyName"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="负责人"
-            prop="linkName"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="角色"
-            prop="roleName"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="联系电话"
-            prop="linkPhone"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="金蝶主体账号"
-            prop="useOrgNumber"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="金蝶主体名称"
-            prop="useOrgName"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="电子邮箱"
-            prop="email"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="地址"
-            prop="address"
-            min-width="200"
-            show-overflow-tooltip
-          ></el-table-column>
+          <el-table-column align="center" label="商户昵称" prop="adminCompanyName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="负责人" prop="linkName" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="角色" prop="roleName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="联系电话" prop="linkPhone" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="金蝶主体账号" prop="useOrgNumber" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="金蝶主体名称" prop="useOrgName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="电子邮箱" prop="email" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="地址" prop="address" min-width="200" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="状态" class-name="status-col">
             <template slot-scope="scope">
-              <el-tag :type="scope.row.status ? 'success' : 'danger'">{{
-                scope.row.status ? "正常" : "冻结"
-              }}</el-tag>
+              <el-tag :type="scope.row.status ? 'success':'danger'">{{ scope.row.status ? '正常':'冻结' }}</el-tag>
             </template>
           </el-table-column>
         </el-table>
@@ -216,12 +97,11 @@
           :page-sizes="[10, 20, 30, 50]"
           :page-size="10"
           layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal"
-        >
+          :total="listTotal">
         </el-pagination>
       </div>
     </div>
-
+    
     <!-- 详情弹窗 -->
     <el-dialog
       title="详情"
@@ -229,264 +109,190 @@
       width="600px"
       :show-close="false"
       :close-on-click-modal="false"
-    >
-      <div>
-        <el-form
-          class="my-form"
-          ref="mainForm"
-          :model="mainForm"
-          label-width="100px"
-          label-position="right"
-        >
-          <el-form-item label="商户账号" prop="account">
-            <el-input
-              v-model="mainForm.account"
-              disabled
-              class="formWidth"
-            ></el-input>
-          </el-form-item>
-          <el-form-item label="账户昵称" prop="nickName">
-            <el-input
-              v-model="mainForm.nickName"
-              disabled
-              class="formWidth"
-            ></el-input>
-          </el-form-item>
-          <el-form-item label="负责人" prop="chargePerson">
-            <el-input
-              v-model="mainForm.chargePerson"
-              disabled
-              class="formWidth"
-            ></el-input>
-          </el-form-item>
-          <el-form-item label="联系电话" prop="phone">
-            <el-input
-              v-model="mainForm.phone"
-              disabled
-              class="formWidth"
-            ></el-input>
-          </el-form-item>
-          <el-form-item label="金蝶主体账号" prop="kingdeeId">
-            <el-input
-              v-model="mainForm.kingdeeId"
-              disabled
-              class="formWidth"
-            ></el-input>
-          </el-form-item>
-          <el-form-item label="金蝶主体名称" prop="kingdeeName">
-            <el-input
-              v-model="mainForm.kingdeeName"
-              disabled
-              class="formWidth"
-            ></el-input>
-          </el-form-item>
-          <el-form-item label="电子邮箱" prop="email">
-            <el-input
-              v-model="mainForm.email"
-              disabled
-              class="formWidth"
-            ></el-input>
-          </el-form-item>
-          <el-form-item label="地址" prop="address">
-            <el-input
-              v-model="mainForm.address"
-              disabled
-              class="formWidth"
-            ></el-input>
-          </el-form-item>
-          <el-form-item label="登录密码" prop="password">
-            <el-input
-              v-model="mainForm.password"
-              type="password"
-              disabled
-              class="formWidth"
-            ></el-input>
-            <el-button class="reset" @click="handleReset()">重置密码</el-button>
-          </el-form-item>
-          <!-- <el-form-item class="tr">
+      >
+     <div>
+      <el-form class="my-form" ref="mainForm" :model="mainForm" label-width="100px" label-position="right">
+        <el-form-item label="商户账号" prop="account">
+          <el-input v-model="mainForm.account" disabled  class="formWidth"></el-input>
+        </el-form-item>
+        <el-form-item label="账户昵称" prop="nickName">
+          <el-input v-model="mainForm.nickName" disabled class="formWidth" ></el-input>
+        </el-form-item>
+        <el-form-item label="负责人" prop="chargePerson">
+          <el-input v-model="mainForm.chargePerson" disabled class="formWidth"></el-input>
+        </el-form-item>
+        <el-form-item label="联系电话" prop="phone">
+          <el-input v-model="mainForm.phone" disabled class="formWidth"></el-input>
+        </el-form-item>
+        <el-form-item label="金蝶主体账号" prop="kingdeeId">
+          <el-input v-model="mainForm.kingdeeId" disabled class="formWidth"></el-input>
+        </el-form-item>
+        <el-form-item label="金蝶主体名称" prop="kingdeeName">
+          <el-input v-model="mainForm.kingdeeName" disabled class="formWidth"></el-input>
+        </el-form-item>
+        <el-form-item label="电子邮箱" prop="email">
+          <el-input v-model="mainForm.email" disabled class="formWidth"></el-input>
+        </el-form-item>
+        <el-form-item label="地址" prop="address">
+          <el-input v-model="mainForm.address" disabled class="formWidth"></el-input>
+        </el-form-item>
+        <el-form-item label="登录密码" prop="password">
+          <el-input v-model="mainForm.password" type="password" disabled class="formWidth"></el-input>
+          <el-button class="reset" @click="handleReset()">重置密码</el-button>
+        </el-form-item>
+        <!-- <el-form-item class="tr">
           <el-button type="primary" @click="submitmainForm">保存</el-button>
         </el-form-item> -->
-        </el-form>
-
-        <!-- 重置密码 -->
-        <el-dialog
-          append-to-body
-          title="重置密码"
-          :visible.sync="resetFormVisible"
-          :show-close="false"
-          width="500px"
-          :close-on-click-modal="false"
-        >
-          <el-form
-            ref="resetForm"
-            :model="resetForm"
-            :rules="resetFormRules"
-            label-position="left"
-            label-width="100px"
-          >
-            <el-form-item label="输入新密码" prop="newPassword">
-              <el-input
-                v-model="resetForm.newPassword"
-                ref="password1"
-                autocomplete="off"
-                class="formWidth"
-                placeholder="请输入新密码"
-                :type="passwordType1"
-              ></el-input>
-              <span class="show-pwd" @click="showPwd(1)">
-                <svg-icon
-                  :icon-class="
-                    passwordType1 === 'password' ? 'eye' : 'eye-open'
-                  "
-                />
-              </span>
-            </el-form-item>
-            <el-form-item label="确认密码" prop="confirmPassword">
-              <el-input
-                v-model="resetForm.confirmPassword"
-                ref="password2"
-                autocomplete="off"
-                class="formWidth"
-                placeholder="请再次输入新密码"
-                :type="passwordType2"
-              ></el-input>
-              <span class="show-pwd" @click="showPwd(2)">
-                <svg-icon
-                  :icon-class="
-                    passwordType2 === 'password' ? 'eye' : 'eye-open'
-                  "
-                />
-              </span>
-            </el-form-item>
-          </el-form>
-          <div slot="footer" class="dialog-footer">
-            <el-button @click="cancelResetForm">取 消</el-button>
-            <el-button type="primary" @click="submitResetForm">确 定</el-button>
-          </div>
-        </el-dialog>
+      </el-form>
+      
+    
+    <!-- 重置密码 -->
+    <el-dialog append-to-body title="重置密码" :visible.sync="resetFormVisible" :show-close="false" width="500px" :close-on-click-modal="false">
+      <el-form ref="resetForm" :model="resetForm" :rules="resetFormRules" label-position="left" label-width="100px">
+        <el-form-item label="输入新密码" prop="newPassword">
+          <el-input v-model="resetForm.newPassword" ref="password1" autocomplete="off" class="formWidth" placeholder="请输入新密码" :type="passwordType1"></el-input>
+          <span class="show-pwd" @click="showPwd(1)">
+            <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
+          </span>
+        </el-form-item>
+        <el-form-item label="确认密码" prop="confirmPassword">
+          <el-input v-model="resetForm.confirmPassword" ref="password2" autocomplete="off" class="formWidth" placeholder="请再次输入新密码" :type="passwordType2"></el-input>
+          <span class="show-pwd" @click="showPwd(2)">
+            <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
+          </span>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelResetForm">取 消</el-button>
+        <el-button type="primary" @click="submitResetForm">确 定</el-button>
       </div>
+    </el-dialog>
+    </div>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="detailDiaLog = false">关 闭</el-button>
+        <el-button @click="detailDiaLog = false" >关 闭</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import { COMMON_SELECT } from "@/utils/select_data";
-import {
-  getList,
-  changeAccountStatus,
-  getDetail,
-  resetPassword,
-  editAccount,
-} from "@/api/merchant";
-import { downloadFiles } from "@/utils/util";
-import { getToken } from "@/utils/auth";
+import { COMMON_SELECT } from '@/utils/select_data'
+import { getList, changeAccountStatus, getDetail, resetPassword, editAccount } from "@/api/merchant";
+import {downloadFiles} from '@/utils/util'
+import { getToken } from '@/utils/auth'
 
 export default {
   // components:{MERCHANT_DETAIL},
-
+  
   data() {
     var validatePass = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("请输入登录密码"));
+      if (value === '') {
+        callback(new Error('请输入登录密码'));
       } else if (value.length < 12) {
-        callback(new Error("密码长度至少12位"));
+        callback(new Error('密码长度至少12位'));
       } else if (/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/.test(value) == false) {
-        callback(new Error("密码必须包含数字和字母"));
+        callback(new Error('密码必须包含数字和字母'));
       } else {
-        if (this.resetForm.confirmPassword !== "") {
-          this.$refs.resetForm.validateField("confirmPassword");
+        if (this.resetForm.confirmPassword !== '') {
+          this.$refs.resetForm.validateField('confirmPassword');
         }
         callback();
       }
     };
     var validatePass2 = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("请再次输入密码"));
+      if (value === '') {
+        callback(new Error('请再次输入密码'));
       } else if (value !== this.resetForm.newPassword) {
-        callback(new Error("两次输入密码不一致"));
+        callback(new Error('两次输入密码不一致'));
       } else {
         callback();
       }
     };
     return {
       baseURL: process.env.VUE_APP_BASE_API,
-      myHeaders: { "x-token": getToken() },
+      myHeaders: {'x-token': getToken()},
       id: null,
       companyWechatId: null,
-      step: "first",
+      step: 'first',
       mainForm: {
-        account: "", // 账号
-        nickName: "", // 用户名
-        chargePerson: "", // 负责人
-        phone: "", // 联系电话
-        kingdeeId: "",
-        kingdeeName: "",
-        email: "", // 电子邮箱
-        address: "", // 地址
-        newPassword: "", // 新密码
-        confirmPassword: "", // 确认密码
+        account: '', // 账号
+        nickName: '', // 用户名
+        chargePerson: '', // 负责人
+        phone: '', // 联系电话
+        kingdeeId: '',
+        kingdeeName: '',          
+        email: '', // 电子邮箱
+        address: '', // 地址
+        newPassword: '', // 新密码
+        confirmPassword: '', // 确认密码
       },
 
-      passwordType1: "password",
-      passwordType2: "password",
+      passwordType1: 'password',
+      passwordType2: 'password',
 
+      
       resetFormVisible: false,
       resetForm: {
-        newPassword: "", // 新密码
-        confirmPassword: "", // 确认密码
+        newPassword: '', // 新密码
+        confirmPassword: '', // 确认密码
       },
       resetFormRules: {
         newPassword: [
-          { required: true, validator: validatePass, trigger: "blur" },
+          { required: true, validator: validatePass, trigger: 'blur' }
         ],
         confirmPassword: [
-          { required: true, validator: validatePass2, trigger: "blur" },
+          { required: true, validator: validatePass2, trigger: 'blur' }
         ],
       },
 
       formLoading: false,
+    
 
-      detailDiaLog: false, //详情弹窗
+      detailDiaLog:false,//详情弹窗
       isOpen: false, // 是否展开条件筛选
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
       dataList: null, // 列表数据
       listLoading: false, // 列表加载loading
-      screenForm: {
-        // 筛选表单数据
-        account: "",
-        nickname: "",
-        phone: "",
-        email: "",
-        status: "",
+      screenForm: { // 筛选表单数据
+        account: '',
+        nickname: '',
+        phone: '',
+        email: '',
+        status: '',
       },
-      select_status: [
-        // 筛选字段 - 状态
-        { label: "正常", value: true },
-        { label: "冻结", value: false },
+      select_status: [ // 筛选字段 - 状态
+        { label: '正常', value: true },
+        { label: '冻结', value: false }
       ],
-    };
+    }
   },
   created() {
     this.getList();
   },
-  computed: {
+   computed: {
     sidebar() {
-      return this.$store.state.app.sidebar;
+      return this.$store.state.app.sidebar
     },
     classObj() {
       return {
         hideSidebar: !this.sidebar.opened,
-        openSidebar: this.sidebar.opened,
-      };
+        openSidebar: this.sidebar.opened
+      }
     },
+    exParams() {
+      return {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      }
+    }
   },
   methods: {
-    goBack() {
+   goBack() {
       this.$router.go(-1);
     },
 
@@ -497,10 +303,10 @@ export default {
     },
 
     // 取消重置密码
-    cancelResetForm() {
+    cancelResetForm(){
       this.resetFormVisible = false;
-      this.passwordType1 = "password";
-      this.passwordType2 = "password";
+      this.passwordType1 = 'password';
+      this.passwordType2 = 'password';
       this.$refs.resetForm.resetFields();
     },
 
@@ -510,38 +316,38 @@ export default {
         if (valid) {
           let params = {
             password: this.resetForm.newPassword,
-            adminUserId: this.id,
-          };
-          resetPassword(params).then((res) => {
+            adminUserId: this.id
+          }
+          resetPassword(params).then(res => {
             this.cancelResetForm();
             this.getDetail();
             this.$successMsg();
-          });
+          })
         }
-      });
+      })
     },
 
     // 显示隐藏密码
     showPwd(num) {
-      if (num == 1) {
-        if (this.passwordType1 === "password") {
-          this.passwordType1 = "";
+      if(num == 1) {
+        if (this.passwordType1 === 'password') {
+          this.passwordType1 = ''
         } else {
-          this.passwordType1 = "password";
+          this.passwordType1 = 'password'
         }
         this.$nextTick(() => {
-          this.$refs.password1.focus();
-        });
+          this.$refs.password1.focus()
+        })
       }
-      if (num == 2) {
-        if (this.passwordType2 === "password") {
-          this.passwordType2 = "";
+      if(num == 2) {
+        if (this.passwordType2 === 'password') {
+          this.passwordType2 = ''
         } else {
-          this.passwordType2 = "password";
+          this.passwordType2 = 'password'
         }
         this.$nextTick(() => {
-          this.$refs.password2.focus();
-        });
+          this.$refs.password2.focus()
+        })
       }
     },
 
@@ -564,20 +370,18 @@ export default {
             subSecret: this.mainForm.childKey,
             subMchId: this.mainForm.childMerchantId,
             template: this.mainForm.templateId,
-            companyWechatId: this.companyWechatId,
-          };
-          editAccount(params)
-            .then((res) => {
-              this.$successMsg("保存成功");
-              setTimeout(() => {
-                this.goBack();
-              }, 1500);
-            })
-            .finally((res) => {
-              this.formLoading = false;
-            });
+            companyWechatId: this.companyWechatId
+          }
+          editAccount(params).then(res => {
+            this.$successMsg('保存成功');
+            setTimeout(() => {
+              this.goBack();
+            }, 1500)
+          }).finally(res => {
+            this.formLoading = false;
+          })
         }
-      });
+      })
     },
     // 查询按钮权限
     checkBtnRole(value) {
@@ -585,7 +389,7 @@ export default {
       // if(!btnRole) {return true}
       // let index = btnRole.indexOf(value);
       // return index >= 0;
-      return true;
+      return true
     },
 
     // 查询列表
@@ -605,7 +409,7 @@ export default {
         this.dataList = res.data.records;
         this.listTotal = res.data.total;
         this.listLoading = false;
-      });
+      })
     },
     // 提交筛选表单
     submitScreenForm() {
@@ -633,22 +437,22 @@ export default {
     // 去开通账号
     toCreate() {
       this.$router.push({
-        path: "/merchant/create_account",
-        query: {},
-      });
+        path: '/merchant/create_account',
+        query: {}
+      })
     },
 
     toAccountList() {
       this.$router.push({
-        path: "/setting/account",
+        path: '/setting/account',
         query: {
-          type: 1,
-        },
-      });
+          type: 1
+        }
+      })
     },
 
     async toDetail(id) {
-      getDetail({ adminUserId: id }).then((res) => {
+      getDetail({adminUserId: id}).then(res => {
         this.mainForm.account = res.data.userName;
         this.mainForm.nickName = res.data.nickName;
         this.mainForm.chargePerson = res.data.linkName;
@@ -657,18 +461,18 @@ export default {
         this.mainForm.kingdeeName = res.data.useOrgName;
         this.mainForm.email = res.data.email;
         this.mainForm.address = res.data.address;
-        this.mainForm.password = "************";
-        this.detailDiaLog = true;
-      });
+        this.mainForm.password = '************';
+        this.detailDiaLog = true
+      })
     },
 
     // 操作 - 更改状态(type: 禁用0,启用1)
     changeStatus(id, type) {
-      type = type ? true : false;
-      changeAccountStatus({ adminUserId: id, status: type }).then((res) => {
+      type = type ? true : false
+      changeAccountStatus({adminUserId: id, status: type}).then(res => {
         this.getList();
         this.$successMsg();
-      });
+      })
     },
 
     // 导出
@@ -680,14 +484,15 @@ export default {
         email: this.screenForm.email,
         status: this.screenForm.status,
       };
-      downloadFiles("admin/user/mch/export", screenData);
+      downloadFiles('admin/user/mch/export', screenData);
     },
-  },
-};
+  }
+}
 </script>
 
 <style lang="scss" scoped>
-.formWidth {
+
+ .formWidth {
   width: 70%;
   margin-right: 20px;
 }

+ 244 - 0
src/views/sales_region/sales_line.vue

@@ -0,0 +1,244 @@
+<template>
+  <div class="app-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <div class="top clearfix">
+        <div class="title fl">条件筛选</div>
+      </div>
+      <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="业务线" prop="name">
+              <el-input v-model="screenForm.name" placeholder="请输入业务线"></el-input>
+            </el-form-item>
+          </el-col>
+          
+          <el-col :xs="24" :sm="12" :lg="18" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <div class="fl">
+          <el-button size="small" type="primary" icon="el-icon-plus" @click="openMainForm('add')">新增</el-button>
+        </div>
+        <div class="fr">
+          <el-button size="small" type="primary" icon="el-icon-download" @click="handleExport">导出数据</el-button>
+        </div>
+      </div>
+      <div class="table">
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="状态" prop="aaa" min-width="100">
+            <template slot-scope="scope">
+              <el-tag :type="scope.row.status ? 'success':'danger'">{{ scope.row.status ? '启用':'禁用' }}</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="业务线" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="业务线名称" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售公司" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="创建人" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="创建时间" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="更新人" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="更新时间" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="操作" width="100">
+            <template slot-scope="scope">
+              <el-button type="text" @click="openMainForm('edit', scope.row.id)">编辑</el-button>
+              <el-popconfirm v-if="scope.row.status" style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.id, 0)" >
+                <el-button slot="reference" type="text">删除</el-button>
+              </el-popconfirm>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="pagination clearfix">
+      <div class="fr">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal">
+        </el-pagination>
+      </div>
+    </div>
+
+    <!-- 新增编辑 -->
+    <el-dialog :title="mainFormType == 'add' ? '新增':'编辑'" :visible.sync="mainFormVisible" :show-close="false" width="40%" :close-on-click-modal="false">
+      <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-position="left" label-width="100px">
+        <el-form-item label="业务线名称" prop="name">
+          <el-input placeholder="请输入业务线名称" v-model="mainForm.name"></el-input>
+        </el-form-item>
+        <el-form-item label="业务线" prop="line">
+          <el-select v-model="mainForm.line" placeholder="请选择业务线" style="width: 100%;">
+            <el-option :label="item.name" :value="item.id" v-for="(item, index) in departmentList" :key="index"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-radio-group v-model="mainForm.status">
+            <el-radio :label="true">启用</el-radio>
+            <el-radio :label="false">禁用</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelMainForm">取 消</el-button>
+        <el-button type="primary" @click="submitMainForm">确 定</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { getRelationList } from "@/api/sales_region";
+import { downloadFiles } from '@/utils/util'
+
+export default {
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        name: '',
+      },
+
+      mainFormVisible: false,
+      mainFormType: 'add',
+      mainForm: {
+        name: '',
+        line: '',
+        status: true,
+      },
+      mainFormRules: {
+        name: [
+          { required: true, message: '请输入业务线名称', trigger: 'blur' }
+        ],
+        line: [
+          { required: true, message: '请选择业务线', trigger: 'change' }
+        ],
+      },
+      salesManList: [],
+      departmentList: [],
+
+    }
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      getRelationList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 打开 新增编辑
+    openMainForm(type, id) {
+      this.mainFormType = type;
+      this.mainFormVisible = true;
+    },
+
+    // 取消 新增编辑 账号表单
+    cancelMainForm(){
+      this.mainFormVisible = false;
+      this.$refs.mainForm.resetFields();
+    },
+
+    // 提交
+    submitMainForm() {
+      this.$refs.mainForm.validate((valid) => {
+        if (valid) {
+          let params = {
+            password: this.mainForm.salesMan,
+            password: this.mainForm.salesLine,
+          }
+          resetPassword(params).then(res => {
+            this.getList();
+            this.cancelMainForm();
+            this.$successMsg();
+          })
+        }
+      })
+    },
+
+    // 导出
+    handleExport() {
+      let screenData = {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      downloadFiles('admin/user/mch/export', screenData);
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 258 - 0
src/views/sales_region/sales_man.vue

@@ -0,0 +1,258 @@
+<template>
+  <div class="app-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <div class="top clearfix">
+        <div class="title fl">条件筛选</div>
+      </div>
+      <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="业务员" prop="name">
+              <el-input v-model="screenForm.name" placeholder="请输入业务员"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="销售公司" prop="company">
+              <el-input v-model="screenForm.company" placeholder="请输入销售公司"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="部门" prop="department">
+              <el-input v-model="screenForm.department" placeholder="请输入部门"></el-input>
+            </el-form-item>
+          </el-col>
+          
+          <el-col :xs="24" :sm="12" :lg="6" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <div class="fl">
+          <el-button size="small" type="primary" icon="el-icon-plus" @click="openMainForm('add')">新增</el-button>
+        </div>
+        <div class="fr">
+          <el-button size="small" type="primary" icon="el-icon-download" @click="handleExport">导出数据</el-button>
+        </div>
+      </div>
+      <div class="table">
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="状态" prop="aaa" min-width="100">
+            <template slot-scope="scope">
+              <el-tag :type="scope.row.status ? 'success':'danger'">{{ scope.row.status ? '启用':'禁用' }}</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="业务员" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="部门名称" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售公司" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="创建人" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="创建时间" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="更新人" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="更新时间" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="操作" width="100">
+            <template slot-scope="scope">
+              <el-button type="text" @click="openMainForm('edit', scope.row.id)">编辑</el-button>
+              <el-popconfirm v-if="scope.row.status" style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.id, 0)" >
+                <el-button slot="reference" type="text">删除</el-button>
+              </el-popconfirm>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="pagination clearfix">
+      <div class="fr">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal">
+        </el-pagination>
+      </div>
+    </div>
+
+    <!-- 新增编辑 -->
+    <el-dialog :title="mainFormType == 'add' ? '新增':'编辑'" :visible.sync="mainFormVisible" :show-close="false" width="40%" :close-on-click-modal="false">
+      <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-position="left" label-width="70px">
+        <el-form-item label="业务员" prop="salesMan">
+          <el-select v-model="mainForm.salesMan" placeholder="请选择业务员" style="width: 100%;">
+            <el-option :label="item.name" :value="item.id" v-for="(item, index) in salesManList" :key="index"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="部门" prop="department">
+          <el-select v-model="mainForm.department" placeholder="请选择部门" style="width: 100%;">
+            <el-option :label="item.name" :value="item.id" v-for="(item, index) in departmentList" :key="index"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-radio-group v-model="mainForm.status">
+            <el-radio :label="true">启用</el-radio>
+            <el-radio :label="false">禁用</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelMainForm">取 消</el-button>
+        <el-button type="primary" @click="submitMainForm">确 定</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { getRelationList } from "@/api/sales_region";
+import { downloadFiles } from '@/utils/util'
+
+export default {
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        name: '',
+        company: '',
+        department: '',
+      },
+
+      mainFormVisible: false,
+      mainFormType: 'add',
+      mainForm: {
+        salesMan: '',
+        department: '',
+        status: true,
+      },
+      mainFormRules: {
+        salesMan: [
+          { required: true, message: '请选择业务员', trigger: 'change' }
+        ],
+        department: [
+          { required: true, message: '请选择业务线', trigger: 'change' }
+        ],
+      },
+      salesManList: [],
+      departmentList: [],
+
+    }
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      getRelationList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 打开 新增编辑
+    openMainForm(type, id) {
+      this.mainFormType = type;
+      this.mainFormVisible = true;
+    },
+
+    // 取消 新增编辑 账号表单
+    cancelMainForm(){
+      this.mainFormVisible = false;
+      this.$refs.mainForm.resetFields();
+    },
+
+    // 提交
+    submitMainForm() {
+      this.$refs.mainForm.validate((valid) => {
+        if (valid) {
+          let params = {
+            password: this.mainForm.salesMan,
+            password: this.mainForm.salesLine,
+          }
+          resetPassword(params).then(res => {
+            this.getList();
+            this.cancelMainForm();
+            this.$successMsg();
+          })
+        }
+      })
+    },
+
+    // 导出
+    handleExport() {
+      let screenData = {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      downloadFiles('admin/user/mch/export', screenData);
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 236 - 0
src/views/sales_region/sales_relation.vue

@@ -0,0 +1,236 @@
+<template>
+  <div class="app-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <div class="top clearfix">
+        <div class="title fl">条件筛选</div>
+      </div>
+      <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="业务员" prop="salesMan">
+              <el-input v-model="screenForm.salesMan" placeholder="请输入业务员"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="业务线" prop="slaesLine">
+              <el-input v-model="screenForm.slaesLine" placeholder="请输入业务线"></el-input>
+            </el-form-item>
+          </el-col>
+          
+          <el-col :xs="24" :sm="24" :lg="12" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <div class="fl">
+          <el-button size="small" type="primary" icon="el-icon-plus" @click="openMainForm('add')">新增</el-button>
+        </div>
+        <div class="fr">
+          <el-button size="small" type="primary" icon="el-icon-download" @click="handleExport">导出数据</el-button>
+        </div>
+      </div>
+      <div class="table">
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="业务员" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="是否负责人" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="业务线" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="操作" width="100">
+            <template slot-scope="scope">
+              <el-button type="text" @click="openMainForm('edit', scope.row.id)">编辑</el-button>
+              <el-popconfirm v-if="scope.row.status" style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.id, 0)" >
+                <el-button slot="reference" type="text">删除</el-button>
+              </el-popconfirm>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="pagination clearfix">
+      <div class="fr">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal">
+        </el-pagination>
+      </div>
+    </div>
+
+    <!-- 新增编辑 -->
+    <el-dialog :title="mainFormType == 'add' ? '新增':'编辑'" :visible.sync="mainFormVisible" :show-close="false" width="40%" :close-on-click-modal="false">
+      <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-position="left" label-width="70px">
+        <el-form-item label="业务员" prop="salesMan">
+          <el-select v-model="mainForm.salesMan" placeholder="请选择业务员" style="width: 100%;">
+            <el-option :label="item.name" :value="item.id" v-for="(item, index) in salesManList" :key="index"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="业务线" prop="salesLine">
+          <el-select v-model="mainForm.salesLine" placeholder="请选择业务线" style="width: 100%;">
+            <el-option :label="item.name" :value="item.id" v-for="(item, index) in salesLineList" :key="index"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelMainForm">取 消</el-button>
+        <el-button type="primary" @click="submitMainForm">确 定</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { getRelationList } from "@/api/sales_region";
+import { downloadFiles } from '@/utils/util'
+
+export default {
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        salesMan: '',
+        salesLine: '',
+      },
+
+      mainFormVisible: false,
+      mainFormType: 'add',
+      mainForm: {
+        salesMan: '',
+        salesLine: '',
+      },
+      mainFormRules: {
+        salesMan: [
+          { required: true, message: '请选择业务员', trigger: 'change' }
+        ],
+        salesLine: [
+          { required: true, message: '请选择业务线', trigger: 'change' }
+        ],
+      },
+      salesManList: [],
+      salesLineList: [],
+
+    }
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      getRelationList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 打开 新增编辑
+    openMainForm(type, id) {
+      this.mainFormType = type;
+      this.mainFormVisible = true;
+    },
+
+    // 取消 新增编辑 账号表单
+    cancelMainForm(){
+      this.mainFormVisible = false;
+      this.$refs.mainForm.resetFields();
+    },
+
+    // 提交
+    submitMainForm() {
+      this.$refs.mainForm.validate((valid) => {
+        if (valid) {
+          let params = {
+            password: this.mainForm.salesMan,
+            password: this.mainForm.salesLine,
+          }
+          resetPassword(params).then(res => {
+            this.getList();
+            this.cancelMainForm();
+            this.$successMsg();
+          })
+        }
+      })
+    },
+
+    // 导出
+    handleExport() {
+      let screenData = {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      downloadFiles('admin/user/mch/export', screenData);
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 196 - 0
src/views/setting/components/log-examine.vue

@@ -0,0 +1,196 @@
+<template>
+  <div class="detail-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="账号" prop="account">
+              <el-input v-model="screenForm.account" placeholder="请输入账号"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="姓名" prop="name">
+              <el-input v-model="screenForm.name" placeholder="请输入姓名"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审批时间" prop="examineDate">
+              <el-date-picker
+                v-model="screenForm.examineDate"
+                type="datetimerange"
+                range-separator="至"
+                style="width: 100%;"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="提交时间" prop="submitDate">
+              <el-date-picker
+                v-model="screenForm.submitDate"
+                type="datetimerange"
+                range-separator="至"
+                style="width: 100%;"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          
+          <el-col :xs="24" :sm="12" :lg="24" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <div class="fl" />
+        <div class="fr">
+          <el-button size="small" type="primary" @click="handleExport">导出</el-button>
+        </div>
+      </div>
+
+      <div class="table">
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="账号" prop="moduleName" min-width="140"></el-table-column>
+          <el-table-column align="center" label="姓名" prop="moduleName" min-width="140"></el-table-column>
+          <el-table-column align="center" label="审批编号" prop="moduleName" min-width="140"></el-table-column>
+          <el-table-column align="center" label="审批类型" prop="moduleName" min-width="140"></el-table-column>
+          <el-table-column align="center" label="操作时间" prop="createTime" min-width="160"></el-table-column>
+          <el-table-column align="center" label="业务编号" prop="ip" min-width="140"></el-table-column>
+          <el-table-column align="center" label="操作时间" prop="createTime" min-width="160"></el-table-column>
+          <el-table-column align="center" label="审批结果" prop="ip" min-width="140"></el-table-column>
+        </el-table>
+      </div>
+      
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { getOplogList } from '@/api/setting'
+import { downloadFiles } from '@/utils/util'
+
+export default {
+  data() {
+    return {
+      dataList: null, // 列表数据
+      listLoading: true, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        account: '',
+        name: '',
+        examineDate: '',
+        submitDate: '',
+      },
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+
+    }
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0 ? true : false;
+      return true;
+    },
+
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        account: this.screenForm.account,
+        name: this.screenForm.name,
+        obj: this.screenForm.obj,
+        startTime: this.screenForm.submitDate ? this.screenForm.submitDate[0] : '',
+        endTime: this.screenForm.submitDate ? this.screenForm.submitDate[1] : '',
+        pageNo: this.currentPage,
+        pageSize: this.pageSize
+      };
+
+      getOplogList(params).then(res => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 筛选后重新获取列表
+    getListByScreen() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+    
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 导出
+    handleExport() {
+      let screenData = {
+        orderId: this.screenForm.orderId,
+        status: this.screenForm.status,
+      };
+      downloadFiles('tax/export', screenData);
+    },
+
+  }
+}
+</script>
+
+<style>
+
+</style>

+ 190 - 0
src/views/setting/components/log-login.vue

@@ -0,0 +1,190 @@
+<template>
+  <div class="detail-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="账号" prop="account">
+              <el-input v-model="screenForm.account" placeholder="请输入账号"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="姓名" prop="name">
+              <el-input v-model="screenForm.name" placeholder="请输入姓名"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="登陆时间" prop="date">
+              <el-date-picker
+                v-model="screenForm.date"
+                type="datetimerange"
+                range-separator="至"
+                style="width: 100%;"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="所在地区" prop="region">
+              <el-input v-model="screenForm.region" placeholder="请输入所在地区"></el-input>
+            </el-form-item>
+          </el-col>
+          
+          <el-col :xs="24" :sm="12" :lg="24" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <div class="fl" />
+        <div class="fr">
+          <el-button size="small" type="primary" @click="handleExport">导出</el-button>
+        </div>
+      </div>
+
+      <div class="table">
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="账号" prop="moduleName" min-width="140"></el-table-column>
+          <el-table-column align="center" label="姓名" prop="moduleName" min-width="140"></el-table-column>
+          <el-table-column align="center" label="登录时间" prop="createTime" min-width="160"></el-table-column>
+          <el-table-column align="center" label="终端类型" prop="ip" min-width="140"></el-table-column>
+          <el-table-column align="center" label="浏览器/终端版本" prop="ip" min-width="140"></el-table-column>
+          <el-table-column align="center" label="操作系统" prop="ip" min-width="140"></el-table-column>
+          <el-table-column align="center" label="设备名称" prop="ip" min-width="140"></el-table-column>
+          <el-table-column align="center" label="MAC地址" prop="ip" min-width="140"></el-table-column>
+          <el-table-column align="center" label="登录IP" prop="ip" min-width="140"></el-table-column>
+          <el-table-column align="center" label="所在地区" prop="ip" min-width="140"></el-table-column>
+        </el-table>
+      </div>
+      
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { getOplogList } from '@/api/setting'
+import { downloadFiles } from '@/utils/util'
+
+export default {
+  data() {
+    return {
+      dataList: null, // 列表数据
+      listLoading: true, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        account: '',
+        name: '',
+        date: '',
+        region: '',
+      },
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+
+    }
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0 ? true : false;
+      return true;
+    },
+
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        account: this.screenForm.account,
+        name: this.screenForm.name,
+        region: this.screenForm.region,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        pageNo: this.currentPage,
+        pageSize: this.pageSize
+      };
+
+      getOplogList(params).then(res => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 筛选后重新获取列表
+    getListByScreen() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 导出
+    handleExport() {
+      let screenData = {
+        orderId: this.screenForm.orderId,
+        status: this.screenForm.status,
+      };
+      downloadFiles('tax/export', screenData);
+    },
+
+  }
+}
+</script>
+
+<style>
+
+</style>

+ 187 - 0
src/views/setting/components/log-operation.vue

@@ -0,0 +1,187 @@
+<template>
+  <div class="detail-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="账号" prop="account">
+              <el-input v-model="screenForm.account" placeholder="请输入账号"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="姓名" prop="name">
+              <el-input v-model="screenForm.name" placeholder="请输入姓名"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="操作对象" prop="obj">
+              <el-input v-model="screenForm.obj" placeholder="请输入操作对象"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="操作时间" prop="date">
+              <el-date-picker
+                v-model="screenForm.date"
+                type="datetimerange"
+                range-separator="至"
+                style="width: 100%;"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          
+          <el-col :xs="24" :sm="12" :lg="24" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <div class="fl" />
+        <div class="fr">
+          <el-button size="small" type="primary" @click="handleExport">导出</el-button>
+        </div>
+      </div>
+
+      <div class="table">
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="账号" prop="moduleName" min-width="140"></el-table-column>
+          <el-table-column align="center" label="姓名" prop="moduleName" min-width="140"></el-table-column>
+          <el-table-column align="center" label="操作编号" prop="moduleName" min-width="140"></el-table-column>
+          <el-table-column align="center" label="操作时间" prop="createTime" min-width="160"></el-table-column>
+          <el-table-column align="center" label="所属模块" prop="ip" min-width="140"></el-table-column>
+          <el-table-column align="center" label="操作对象" prop="ip" min-width="140"></el-table-column>
+          <el-table-column align="center" label="操作类型" prop="ip" min-width="140"></el-table-column>
+        </el-table>
+      </div>
+      
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { getOplogList } from '@/api/setting'
+import { downloadFiles } from '@/utils/util'
+
+export default {
+  data() {
+    return {
+      dataList: null, // 列表数据
+      listLoading: true, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        account: '',
+        name: '',
+        date: '',
+        obj: '',
+      },
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+
+    }
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0 ? true : false;
+      return true;
+    },
+
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        account: this.screenForm.account,
+        name: this.screenForm.name,
+        obj: this.screenForm.obj,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        pageNo: this.currentPage,
+        pageSize: this.pageSize
+      };
+
+      getOplogList(params).then(res => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 筛选后重新获取列表
+    getListByScreen() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+    
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 导出
+    handleExport() {
+      let screenData = {
+        orderId: this.screenForm.orderId,
+        status: this.screenForm.status,
+      };
+      downloadFiles('tax/export', screenData);
+    },
+
+  }
+}
+</script>
+
+<style>
+
+</style>

+ 18 - 133
src/views/setting/oplog.vue

@@ -1,109 +1,37 @@
 <template>
   <div class="app-container">
-    <div class="setting_title">操作日志</div>
+    <el-radio-group v-model="logType" size="small">
+      <el-radio-button label="login">登录日志</el-radio-button>
+      <el-radio-button label="operation">操作日志</el-radio-button>
+      <el-radio-button label="examine">审批日志</el-radio-button>
+    </el-radio-group>
     <el-divider></el-divider>
 
-    <div class="mymain-container">
-      <div class="btn-group clearfix">
-        <div class="fl">
-          
-        </div>
-        <div class="fr">
-          <el-select v-model="screenForm.moduleName" placeholder="全部" size="small" style="width: 140px;" @change="getListByScreen">
-            <el-option label="选择模块" value=""></el-option>
-            <el-option :label="item" :value="item" v-for="(item, index) in moduleList" :key="index"></el-option>
-          </el-select>
-
-          <el-date-picker
-            v-model="screenForm.date"
-            @change="getListByScreen"
-            type="daterange"
-            size="small"
-            style="margin-left: 20px; width: 250px !important;"
-            value-format="yyyy-MM-dd"
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期">
-          </el-date-picker>
-        </div>
-      </div>
-
-      <div class="table">
-        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-          <el-table-column type="expand" v-if="checkBtnRole('detail')">
-            <template slot-scope="scope">
-              <el-form label-position="left" inline class="demo-table-expand">
-                <el-form-item label="所在模块">
-                  <span>{{ scope.row.moduleName }}</span>
-                </el-form-item>
-                <el-form-item label="操作类型">
-                  <span>{{ scope.row.shop }}</span>
-                </el-form-item>
-                <el-form-item label="IP">
-                  <span>{{ scope.row.ip }}</span>
-                </el-form-item>
-                <el-form-item label="用户">
-                  <span>{{ scope.row.nickName +'('+scope.row.userName+')' }}</span>
-                </el-form-item>
-                <el-form-item label="记录时间">
-                  <span>{{ scope.row.createTime }}</span>
-                </el-form-item>
-                <el-form-item label="操作">
-                  <span>{{ scope.row.content }}</span>
-                </el-form-item>
-              </el-form>
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="所在模块" prop="moduleName" min-width="140"></el-table-column>
-          <el-table-column align="center" label="记录时间" prop="createTime" min-width="160"></el-table-column>
-          <el-table-column align="center" label="用户" prop="nickName" min-width="140">
-            <template slot-scope="scope">
-              {{ scope.row.nickName +'('+scope.row.userName+')' }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="IP" prop="ip" min-width="160"></el-table-column>
-        </el-table>
-      </div>
-      
-      <div class="pagination clearfix">
-        <div class="fr">
-          <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="currentPage"
-            :page-sizes="[10, 20, 30, 50]"
-            :page-size="10"
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="listTotal">
-          </el-pagination>
-        </div>
-      </div>
-    </div>
+    <LoginLog v-if="logType === 'login'" />
+    <OperationLog v-if="logType === 'operation'" />
+    <ExamineLog v-if="logType === 'examine'" />
 
   </div>
 </template>
 
 <script>
-import { getOplogList, getModuleList } from '@/api/setting'
+import LoginLog from "@/views/setting/components/log-login";
+import OperationLog from "@/views/setting/components/log-operation";
+import ExamineLog from "@/views/setting/components/log-examine";
 
 export default {
+  components: {
+    LoginLog,
+    OperationLog,
+    ExamineLog,
+  },
   data() {
     return {
-      dataList: null, // 列表数据
-      moduleList: null, // 模块列表
-      listLoading: true, // 列表加载loading
-      screenForm: { // 筛选表单数据
-        moduleName: '', // 模块名称
-        date: '', // 日期
-      },
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0, // 列表总数
+      logType: 'login',
     }
   },
   created() {
-    this.getList();
-    this.getModuleList();
+    
   },
   methods: {
     // 查询按钮权限
@@ -115,49 +43,6 @@ export default {
       return true;
     },
 
-    getList() {
-      this.listLoading = true;
-
-      let params = {
-        moduleName: this.screenForm.moduleName,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
-        pageNo: this.currentPage,
-        pageSize: this.pageSize
-      };
-
-      getOplogList(params).then(res => {
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      })
-    },
-
-    getModuleList() {
-      getModuleList().then(res => {
-        this.moduleList = res.data;
-      })
-    },
-
-    // 筛选后重新获取列表
-    getListByScreen() {
-      this.currentPage = 1;
-      this.getList();
-    },
-
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val;
-      this.currentPage = 1;
-      this.getList();
-    },
-
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getList();
-    },
-
   }
 }
 </script>

+ 196 - 0
src/views/stock/reserved_stock.vue

@@ -0,0 +1,196 @@
+<template>
+  <div class="app-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <div class="top clearfix">
+        <div class="title fl">条件筛选</div>
+      </div>
+      <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="品类" prop="category">
+              <el-select v-model="screenForm.category" placeholder="全部">
+                <el-option label="全部" value=""></el-option>
+                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="销售类型" prop="saleType">
+              <el-select v-model="screenForm.saleType" placeholder="全部">
+                <el-option label="全部" value=""></el-option>
+                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="产品名称" prop="name">
+              <el-input v-model="screenForm.name" placeholder="请输入产品名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="产品编码" prop="code">
+              <el-input v-model="screenForm.code" placeholder="请输入产品编码"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="规格型号" prop="model">
+              <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
+            </el-form-item>
+          </el-col>
+          
+          <el-col :xs="24" :sm="12" :lg="18" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <div class="fr">
+          <el-button size="small" type="primary" icon="el-icon-download" @click="handleExport">导出数据</el-button>
+        </div>
+      </div>
+      <div class="table">
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="经销商编码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商名称" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品品类" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售类型" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="计量单位" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单价" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商预留库存" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商暂扣库存" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="pagination clearfix">
+      <div class="fr">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal">
+        </el-pagination>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { COMMON_SELECT } from '@/utils/select_data'
+import { getStockList } from "@/api/stock";
+import { downloadFiles } from '@/utils/util'
+
+export default {
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        warehouse: '',
+        name: '',
+        code: '',
+        model: '',
+        category: '',
+        saleType: '',
+      },
+      select_status: [ // 筛选字段 - 状态
+        { label: '正常', value: true },
+        { label: '冻结', value: false }
+      ],
+    }
+  },
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      getStockList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 导出
+    handleExport() {
+      let screenData = {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      downloadFiles('admin/user/mch/export', screenData);
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 205 - 0
src/views/stock/stock_list.vue

@@ -0,0 +1,205 @@
+<template>
+  <div class="app-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <div class="top clearfix">
+        <div class="title fl">条件筛选</div>
+      </div>
+      <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="仓库" prop="warehouse">
+              <el-select v-model="screenForm.warehouse" placeholder="全部">
+                <el-option label="全部" value=""></el-option>
+                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="产品名称" prop="name">
+              <el-input v-model="screenForm.name" placeholder="请输入产品名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="产品编码" prop="code">
+              <el-input v-model="screenForm.code" placeholder="请输入产品编码"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="规格型号" prop="model">
+              <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="品类" prop="category">
+              <el-select v-model="screenForm.category" placeholder="全部">
+                <el-option label="全部" value=""></el-option>
+                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="销售类型" prop="saleType">
+              <el-select v-model="screenForm.saleType" placeholder="全部">
+                <el-option label="全部" value=""></el-option>
+                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          
+          <el-col :xs="24" :sm="24" :lg="12" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <div class="fr">
+          <el-button size="small" type="primary" icon="el-icon-download" @click="handleExport">导出数据</el-button>
+        </div>
+      </div>
+      <div class="table">
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="产品品类" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售类型" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="计量单位" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="总库存数量" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单价" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商预留库存" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商暂扣库存" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="中转仓" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="退货仓" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="破损仓" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="pagination clearfix">
+      <div class="fr">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal">
+        </el-pagination>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { COMMON_SELECT } from '@/utils/select_data'
+import { getStockList } from "@/api/stock";
+import { downloadFiles } from '@/utils/util'
+
+export default {
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        warehouse: '',
+        name: '',
+        code: '',
+        model: '',
+        category: '',
+        saleType: '',
+      },
+      select_status: [ // 筛选字段 - 状态
+        { label: '正常', value: true },
+        { label: '冻结', value: false }
+      ],
+    }
+  },
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      getStockList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 导出
+    handleExport() {
+      let screenData = {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      downloadFiles('admin/user/mch/export', screenData);
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 5 - 0
src/views/supply/sales.vue

@@ -0,0 +1,5 @@
+<template>
+  <div>
+    <router-view />
+  </div>
+</template>

+ 162 - 0
src/views/supply/sales/components/sales_detail.vue

@@ -0,0 +1,162 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="详情"></el-page-header>
+
+    <div id="printMe">
+      <div class="main-title">
+        <div class="title">出库单信息</div>
+        <el-button size="small" type="primary" icon="el-icon-printer" v-print="printObj">打印单据</el-button>
+      </div>
+      <div class="diy-table-1">
+        <el-row :gutter="0">
+          <el-col :span="8" class="item">
+            <div class="label">出库单号</div>
+            <div class="value">2022123233435342</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">单据日期</div>
+            <div class="value">2022123233435342</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">单据状态</div>
+            <div class="value">2022123233435342</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">仓库</div>
+            <div class="value">万豪仓</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">发货单号</div>
+            <div class="value">2022123233435342</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">经销商</div>
+            <div class="value">广州格匠机电有限公司</div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :lg="24" class="item">
+            <div class="label">备注</div>
+            <div class="value">2022123233435342</div>
+          </el-col>
+        </el-row>
+      </div>
+
+      <div class="main-title">
+        <div class="title">货品信息</div>
+      </div>
+      <div class="diy-table-2">
+        <div class="head">
+          <el-row :gutter="20">
+            <el-col :span="2">序号</el-col>
+            <el-col :span="4">产品编号</el-col>
+            <el-col :span="8">产品名称</el-col>
+            <el-col :span="2">规格型号</el-col>
+            <el-col :span="2">内机编码</el-col>
+            <el-col :span="2">外机编码</el-col>
+            <el-col :span="2">单位</el-col>
+            <el-col :span="2">数量</el-col>
+          </el-row>
+        </div>
+        <div class="body">
+          <el-row v-for="(item, index) in goodsList" :key="item.goodsId" :gutter="20">
+            <el-col :span="2">{{ index + 1 }}</el-col>
+            <el-col :span="4">{{ item.goodsId || 0 }}</el-col>
+            <el-col :span="8">{{ item.goodsName || 0 }}</el-col>
+            <el-col :span="2">{{ item.salesUnit || 0 }}</el-col>
+            <el-col :span="2">{{ item.price || 0 }}</el-col>
+            <el-col :span="2">{{ item.saleQty || 0 }}</el-col>
+            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
+            <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
+          </el-row>
+        </div>
+        <div class="foot">
+          <el-row :gutter="20">
+            <el-col :span="24">合计</el-col>
+          </el-row>
+        </div>
+      </div>
+
+      <div class="main-title">
+        <div class="title">审批记录</div>
+      </div>
+      <div class="diy-table-1">
+        <el-row :gutter="0">
+          <el-col :xs="12" :sm="8" :lg="8" class="item">
+            <div class="label">审批人</div>
+            <div class="value">2022123233435342</div>
+          </el-col>
+          <el-col :xs="12" :sm="8" :lg="8" class="item">
+            <div class="label">审批结果</div>
+            <div class="value">2022123233435342</div>
+          </el-col>
+          <el-col :xs="12" :sm="8" :lg="8" class="item">
+            <div class="label">审批时间</div>
+            <div class="value">2022123233435342</div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :lg="24" class="item">
+            <div class="label">审批说明</div>
+            <div class="value">2022123233435342</div>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+    
+
+
+  </div>
+</template>
+
+<script>
+import print from 'vue-print-nb'
+import { getList } from "@/api/supply/sales";
+
+export default {
+  name: 'SalesDetail',
+  componentName: 'SalesDetail',
+  props: ['listItem'],
+  directives: {
+    print
+  },
+  data() {
+    return {
+      printObj: {
+        id: 'printMe'
+      },
+      goodsList: [{
+        goodsId: 1,
+      }]
+    }
+  },
+
+  created() {
+
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 30px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 187 - 0
src/views/supply/sales/components/sales_examine.vue

@@ -0,0 +1,187 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="审批"></el-page-header>
+
+    <div class="main-title">
+      <div class="title">出库单信息</div>
+    </div>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="8" class="item">
+          <div class="label">出库单号</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">单据日期</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">单据状态</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">仓库</div>
+          <div class="value">万豪仓</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">发货单号</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">经销商</div>
+          <div class="value">广州格匠机电有限公司</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">备注</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+      </el-row>
+    </div>
+
+    <div class="main-title">
+      <div class="title">货品信息</div>
+    </div>
+    <div class="diy-table-2">
+      <div class="head">
+        <el-row :gutter="20">
+          <el-col :span="2">序号</el-col>
+          <el-col :span="4">产品编号</el-col>
+          <el-col :span="8">产品名称</el-col>
+          <el-col :span="2">规格型号</el-col>
+          <el-col :span="2">内机编码</el-col>
+          <el-col :span="2">外机编码</el-col>
+          <el-col :span="2">单位</el-col>
+          <el-col :span="2">数量</el-col>
+        </el-row>
+      </div>
+      <div class="body">
+        <el-row v-for="(item, index) in goodsList" :key="item.goodsId" :gutter="20">
+          <el-col :span="2">{{ index + 1 }}</el-col>
+          <el-col :span="4">{{ item.goodsId || 0 }}</el-col>
+          <el-col :span="8">{{ item.goodsName || 0 }}</el-col>
+          <el-col :span="2">{{ item.salesUnit || 0 }}</el-col>
+          <el-col :span="2">{{ item.price || 0 }}</el-col>
+          <el-col :span="2">{{ item.saleQty || 0 }}</el-col>
+          <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
+          <el-col :span="2">{{ item.saleValue || 0 }}</el-col>
+        </el-row>
+      </div>
+      <div class="foot">
+        <el-row :gutter="20">
+          <el-col :span="24">合计</el-col>
+        </el-row>
+      </div>
+    </div>
+
+    <div class="main-title">
+      <div class="title">审批记录</div>
+    </div>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="12" class="item">
+          <div class="label">审批人</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="12" class="item">
+          <div class="label">审批结果</div>
+          <div class="value">
+            <el-radio-group v-model="examineForm.status">
+              <el-radio :label="true">通过</el-radio>
+              <el-radio :label="false">驳回</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">审批说明</div>
+          <div class="value">
+            <el-input v-model="examineForm.remark" placeholder="请输入内容"></el-input>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
+        <el-popconfirm
+          title="确定关闭吗?"
+          @onConfirm="goBack"
+          style="margin-left: 10px;"
+        >
+          <el-button slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { getList } from "@/api/supply/sales";
+
+export default {
+  name: 'SalesDetail',
+  componentName: 'SalesDetail',
+  props: ['listItem'],
+  data() {
+    return {
+      goodsList: [{
+        goodsId: 1,
+      }],
+      formLoading: false,
+      examineForm: {
+        status: true,
+        remark: '',
+      }
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormExamine');
+    },
+
+    clickSubmitForm() {
+
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 30px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 262 - 0
src/views/supply/sales/sales_list.vue

@@ -0,0 +1,262 @@
+<template>
+  <div class="app-container">
+    <div v-show="!isShowDetail && !isShowExamine">
+      <!-- 筛选条件 -->
+      <div class="screen-container">
+        <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="24" :lg="24">
+              <el-form-item prop="orderNum" label-width="0">
+                <el-radio-group v-model="screenForm.status" size="medium">
+                  <el-radio-button label="1">全部</el-radio-button>
+                  <el-radio-button label="2">待审核</el-radio-button>
+                  <el-radio-button label="3">审核通过</el-radio-button>
+                  <el-radio-button label="4">审核驳回</el-radio-button>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="发货单号" prop="orderNum">
+                <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="经销商名称" prop="jxsName">
+                <el-input v-model="screenForm.jxsName" placeholder="请输入经销商名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="存货名称" prop="chName">
+                <el-input v-model="screenForm.chName" placeholder="请输入存货名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="规格型号" prop="model">
+                <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="发货日期" prop="date">
+                <el-date-picker
+                  v-model="screenForm.date"
+                  type="datetimerange"
+                  range-separator="至"
+                  style="width: 100%;"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="经销商编号" prop="jxsNum">
+                <el-input v-model="screenForm.jxsNum" placeholder="请输入规格型号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="状态" prop="status">
+                <el-select v-model="screenForm.status" placeholder="全部">
+                  <el-option label="全部" value=""></el-option>
+                  <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            
+            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+              <el-form-item label="">
+                <el-button size="small" @click="resetScreenForm">清空</el-button>
+                <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+
+      <div class="mymain-container">
+        <div class="btn-group clearfix">
+          <div class="fl">
+            <el-button size="small" type="warning" icon="el-icon-close">退单</el-button>
+          </div>
+          <div class="fr">
+            <el-button size="small" type="primary" icon="el-icon-download" @click="handleExport">导出数据</el-button>
+          </div>
+        </div>
+        <div class="table">
+          <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+            <el-table-column align="center" label="出库单号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="发货单号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="仓库" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="经销商" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="产品名称" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="规格型号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="内急条码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="外机条码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="数量" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="备注" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="操作" width="120" fixed="right">
+              <template slot-scope="scope">
+                <el-button type="text" @click="toDetail('detail', scope.row)">详情</el-button>
+                <el-button type="text" @click="toDetail('examine', scope.row)">审批</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    
+    <SalesDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
+    <SalesExamine :listItem="queryItem" v-if="isShowExamine" @backListFormExamine="backList" />
+
+  </div>
+</template>
+
+<script>
+import { COMMON_SELECT } from '@/utils/select_data'
+import { getList } from "@/api/supply/sales";
+import { downloadFiles } from '@/utils/util'
+import SalesDetail from "@/views/supply/sales/components/sales_detail";
+import SalesExamine from "@/views/supply/sales/components/sales_examine";
+
+export default {
+  components: {
+    SalesDetail,
+    SalesExamine,
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        orderNum: '',
+        jxsName: '',
+        chName: '',
+        model: '',
+        date: '',
+        jxsNum: '',
+        status: '',
+      },
+      select_status: [ // 筛选字段 - 状态
+        { label: '正常', value: true },
+        { label: '冻结', value: false }
+      ],
+
+      jumpType: '',
+      queryItem: {},
+    }
+  },
+
+  computed: {
+    isShowDetail() {
+      return this.queryItem.hasOwnProperty('adminUserId') && this.jumpType == 'detail';
+    },
+    isShowExamine() {
+      return this.queryItem.hasOwnProperty('adminUserId') && this.jumpType == 'examine';
+    },
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 进入详情
+    toDetail(type, item) {
+      this.jumpType = type;
+      this.queryItem = item;
+    },
+
+    backList() {
+      this.jumpType = '';
+      this.queryItem = {};
+    },
+
+    // 导出
+    handleExport() {
+      let screenData = {
+        userName: this.screenForm.account,
+        nickName: this.screenForm.nickName,
+        linkPhone: this.screenForm.phone,
+        email: this.screenForm.email,
+        status: this.screenForm.status,
+      };
+      downloadFiles('admin/user/mch/export', screenData);
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>