Parcourir la source

feat:新增会员权益 ,操作日志

jinx il y a 4 ans
Parent
commit
c5ac83cf4b

+ 163 - 86
src/page/device/index.vue

@@ -7,7 +7,7 @@
             <span>关键词:</span>
             <el-input style="width:220px;" @keyup.enter.native="currentPage=1&&_getCameraData()" v-model="searchKey" placeholder="关键词"></el-input>
             <el-button type="primary" @click="currentPage=1&&_getCameraData()" color='red'>搜索</el-button>
-            <el-button icon="el-icon-plus" type="primary" style="float: right;" @click="showCameraDialog" color='red'>添加相机</el-button>
+            <el-button icon="el-icon-plus" type="primary" style="float: right;" @click="showCameraDialog(null)" color='red'>添加相机</el-button>
           </div>
         </div>
         <!-- 全部 -->
@@ -38,6 +38,7 @@
               </el-table-column>
               <el-table-column label="操作">
                 <template slot-scope="scope">
+                  <el-button type="text" @click="showCameraDialog(scope.row)" class="new_edit_btn">编辑</el-button>
                   <el-button type="text" @click="showDialog(scope.row)" class="edit_btn">点数</el-button>
                   <el-button type="text" v-if="scope.row.userName!='未绑定'" @click="_unbindDevice(scope.row)" class="delete_btn">解绑</el-button>
                 </template>
@@ -45,19 +46,19 @@
             </el-table>
           </div>
           <div class="order-management-pagination">
-            <el-pagination  @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pagesize" layout="total, prev, pager, next, jumper" :total="total">
+            <el-pagination @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pagesize" layout="total, prev, pager, next, jumper" :total="total">
             </el-pagination>
           </div>
         </div>
         <el-dialog width="450px" title="点数修改" :visible.sync="dialogFormVisible">
-          <el-form :model="form" >
-            <el-form-item >
+          <el-form :model="form">
+            <el-form-item>
               <div style="display: flex;justify-content: space-between;font-size: 14px;">
                 <span>设备ID:
-              <span>{{currentChildName}}</span>
+                  <span>{{currentChildName}}</span>
                 </span>
                 <span>当前余额:
-              <span>{{currentBalance}}</span>
+                  <span>{{currentBalance}}</span>
                 </span>
               </div>
             </el-form-item>
@@ -81,8 +82,8 @@
             <el-form-item label="出库类型" prop="own">
               <el-select v-model="ruleForm.own" placeholder="请选择出库类型">
                 <el-option label="正常销售" value="0"></el-option>
-                <el-option label="礼品赠送" value="2"></el-option>
                 <el-option label="员工自用" value="1"></el-option>
+                <el-option label="礼品赠送" value="2"></el-option>
                 <el-option label="其他" value="3"></el-option>
               </el-select>
             </el-form-item>
@@ -95,28 +96,29 @@
               </el-select>
             </el-form-item>
             <el-form-item label="wifi名称" prop="wifi">
-              <el-input v-model="ruleForm.wifi"></el-input>
+              <el-input v-model="ruleForm.wifi" :disabled="editStatus==2 && ruleForm.wifi!=''"></el-input>
             </el-form-item>
             <el-form-item label="物理地址" prop="address">
-              <el-input v-model="ruleForm.address"></el-input>
+              <el-input v-model="ruleForm.address" :disabled="editStatus==2&& ruleForm.address!=''"></el-input>
             </el-form-item>
             <el-form-item label="sn码" prop="snCode">
-              <el-input v-model="ruleForm.snCode"></el-input>
+              <el-input v-model="ruleForm.snCode" :disabled="editStatus==2&& ruleForm.snCode!=''"></el-input>
             </el-form-item>
             <el-form-item label="初始点数" @keyup.native="_checkPointInput" prop="initPoint">
-              <el-input v-model="ruleForm.initPoint"></el-input>
+              <el-input v-model="ruleForm.initPoint" :disabled="editStatus==2&& ruleForm.initPoint!=''"></el-input>
             </el-form-item>
             <el-form-item label="订单号" prop="orderNum">
               <el-input v-model="ruleForm.orderNum"></el-input>
             </el-form-item>
             <el-form-item label="客户名称" prop="own">
               <el-select v-model="ruleForm.companyId" placeholder="请选择">
+                <el-option label="-" :value="0">-</el-option>
                 <el-option v-for="(item,i) in companyList" :key="i" :label="item.companyName" :value="item.id">{{item.companyName}}</el-option>
               </el-select>
             </el-form-item>
           </el-form>
           <div slot="footer" class="dialog-footer">
-            <el-button @click="cameraVisible = false">取 消</el-button>
+            <el-button @click="closeCamera()">取 消</el-button>
             <el-button type="primary" @click="_addCamera">确 定</el-button>
           </div>
         </el-dialog>
@@ -125,11 +127,15 @@
   </div>
 </template>
 <script>
-
 export default {
   data () {
     return {
-      tabs: [{ name: '设备ID', idx: 0 }, { name: '手机号', idx: 1 }, { name: '当前余额', idx: 2 }, { name: '历史充值', idx: 3 }],
+      tabs: [
+        { name: '设备ID', idx: 0 },
+        { name: '手机号', idx: 1 },
+        { name: '当前余额', idx: 2 },
+        { name: '历史充值', idx: 3 }
+      ],
       expands: [],
       expandedArr: [],
       cameras: [],
@@ -137,19 +143,19 @@ export default {
       key_input: '',
       fullscreenLoading: false,
       product: {
-        'name': '',
-        'packageName': '',
-        'count': '',
-        'amount': '',
-        'url': ''
+        name: '',
+        packageName: '',
+        count: '',
+        amount: '',
+        url: ''
       },
       // labelPosition: 'right',
       receive: {
-        'name': '',
-        'phone': '',
-        'address': '',
-        'invoice': '',
-        'expressNum': ''
+        name: '',
+        phone: '',
+        address: '',
+        invoice: '',
+        expressNum: ''
       },
       searchKey: '',
       total: 0,
@@ -199,7 +205,6 @@ export default {
           { required: true, message: '请输入初始点数', trigger: 'blur' }
           // { type: "number", message: '必须为数字值', trigger: 'blur' }
         ]
-
       },
       cameraInfo: {
         wifi: '',
@@ -215,7 +220,9 @@ export default {
       currentChildName: '',
       currentDeviceId: '',
       currentBalance: '',
-      pagesize: 10
+      pagesize: 10,
+      currentId: 0,
+      editStatus: 1
     }
   },
   watch: {
@@ -224,6 +231,10 @@ export default {
     }
   },
   methods: {
+    closeCamera () {
+      this.cameraVisible = false
+      this.$refs['ruleForm'].resetFields()
+    },
     async _getCameraData () {
       this.fullscreenLoading = true
       if (!Number(this.currentPage)) this.currentPage = 1
@@ -251,8 +262,12 @@ export default {
               temp[i]['own'] = '其他'
               break
           }
-          temp[i]['userName'] = temp[i]['userName'] ? temp[i]['userName'] : '未绑定'
-          temp[i]['activatedTime'] = temp[i]['activatedTime'] ? new Date(temp[i]['activatedTime']).format('yyyy-MM-dd hh:mm:ss') : '/'
+          temp[i]['userName'] = temp[i]['userName']
+            ? temp[i]['userName']
+            : '未绑定'
+          temp[i]['activatedTime'] = temp[i]['activatedTime']
+            ? new Date(temp[i]['activatedTime']).format('yyyy-MM-dd hh:mm:ss')
+            : '/'
         }
         this.cameras = temp
         this.total = res.data.total ? res.data.total : this.total
@@ -278,31 +293,33 @@ export default {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
-      }).then(async () => {
-        this.fullscreenLoading = true
-        console.log(row)
-        let res = await this.$http.post('/manager/camera/unbind', {
-          cameraId: row.id
+      })
+        .then(async () => {
+          this.fullscreenLoading = true
+          console.log(row)
+          let res = await this.$http.post('/manager/camera/unbind', {
+            cameraId: row.id
+          })
+          if (res.code === 0) {
+            this.$message({
+              type: 'success',
+              message: '解绑成功!'
+            })
+            this._getCameraData()
+          } else {
+            this.$alert('解绑失败', '提示', {
+              confirmButtonText: '确定'
+            })
+          }
+          this.fullscreenLoading = false
         })
-        if (res.code === 0) {
+        .catch(() => {
           this.$message({
-            type: 'success',
-            message: '解绑成功!'
+            type: 'info',
+            message: '已取消解绑'
           })
-          this._getCameraData()
-        } else {
-          this.$alert('解绑失败', '提示', {
-            confirmButtonText: '确定'
-          })
-        }
-        this.fullscreenLoading = false
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消解绑'
+          this.fullscreenLoading = false
         })
-        this.fullscreenLoading = false
-      })
     },
     _checkInput: function (e) {
       this.form.point += ''
@@ -326,9 +343,7 @@ export default {
       if (!body) {
         this.$alert('请选择充值类型', '提示', {
           confirmButtonText: '确定',
-          callback: action => {
-
-          }
+          callback: (action) => {}
         })
       } else {
         let res = await this.$http.post('/manager/camera/modifyPoints', {
@@ -363,27 +378,100 @@ export default {
         companyId,
         orderNum: orderSn
       } = this.ruleForm
-      if (wifiName === '' || childName === '' || snCode === '' || balance === '' || own === '' || type === '') {
-        return
-      }
+      // if (wifiName === '' || childName === '' || snCode === '' || balance === '' || own === '' || type === '') {
+      //   return
+      // }
+      this.$refs['ruleForm'].validate(async (valid) => {
+        if (valid) {
+          this.fullscreenLoading = true
 
-      this.fullscreenLoading = true
-      let res = await this.$http.post('/manager/camera/add', {
-        childName,
-        wifiName,
-        orderSn,
-        snCode,
-        companyId,
-        balance: Number(balance),
-        type: Number(type),
-        own
+          let res
+          if (this.editStatus === 1) {
+            res = await this.$http.post('/manager/camera/add', {
+              childName,
+              wifiName,
+              orderSn,
+              snCode,
+              companyId,
+              balance: Number(balance),
+              type: Number(type),
+              own
+            })
+          } else {
+            res = await this.$http.post('/manager/camera/update', {
+              cameraId: this.currentId,
+              childName,
+              wifiName,
+              orderSn,
+              snCode,
+              companyId,
+              balance: Number(balance),
+              type: Number(type),
+              own
+            })
+          }
+
+          this.fullscreenLoading = false
+          if (res.code === 0) {
+            this.$alert('该相机信息已成功添加入库', '添加成功', {
+              confirmButtonText: '确定'
+            })
+            this._getCameraData()
+            this.ruleForm.address = ''
+            this.ruleForm.wifi = ''
+            this.ruleForm.own = ''
+            this.ruleForm.orderNum = ''
+            this.ruleForm.snCode = ''
+            this.ruleForm.type = ''
+            this.ruleForm.initPoint = ''
+            this.ruleForm.companyId = ''
+
+            this.cameraVisible = false
+          } else {
+            this.$alert(res.msg, '添加失败', {
+              confirmButtonText: '确定'
+            })
+          }
+        } else {
+          console.log('error submit!!')
+          return false
+        }
       })
-      this.fullscreenLoading = false
-      if (res.code === 0) {
-        this.$alert('该相机信息已成功添加入库', '添加成功', {
-          confirmButtonText: '确定'
-        })
-        this._getCameraData()
+    },
+    showCameraDialog (row) {
+      this.cameraVisible = true
+      if (row) {
+        console.log(row)
+        this.editStatus = 2
+        this.currentId = row.id
+        this.ruleForm.address = row.childName
+        this.ruleForm.wifi = ''
+        let own = ''
+        switch (row.own) {
+          case '正常销售':
+            own = '0'
+            break
+          case '员工自用':
+            own = '1'
+            break
+          case '礼品赠送':
+            own = '2'
+            break
+          case '其他':
+            own = '3'
+            break
+        }
+
+        this.ruleForm.own = own
+        this.ruleForm.orderNum = row.orderSn
+        this.ruleForm.snCode = row.snCode
+        this.ruleForm.type = row.cameraType
+        this.ruleForm.initPoint = row.balance
+        this.ruleForm.companyId = row.companyId
+        this.ruleForm.wifi = row.wifiName
+      } else {
+        this.editStatus = 1
+        this.currentId = 0
         this.ruleForm.address = ''
         this.ruleForm.wifi = ''
         this.ruleForm.own = ''
@@ -392,16 +480,7 @@ export default {
         this.ruleForm.type = ''
         this.ruleForm.initPoint = ''
         this.ruleForm.companyId = ''
-
-        this.cameraVisible = false
-      } else {
-        this.$alert(res.msg, '添加失败', {
-          confirmButtonText: '确定'
-        })
       }
-    },
-    showCameraDialog (row) {
-      this.cameraVisible = true
     }
   },
   created () {
@@ -409,22 +488,20 @@ export default {
     this.getCompanyList()
   }
 }
-
 </script>
 <style lang="css" scoped>
-@import './style.css';
+@import "./style.css";
 </style>
 <style type="text/css">
-.el-table__expand-icon>i {
+.el-table__expand-icon > i {
   display: none !important;
 }
 
 .edit_btn span {
-  color: #09e1c0
+  color: #09e1c0;
 }
 
 .delete_btn span {
-  color: #f56c6c
+  color: #f56c6c;
 }
-
 </style>

+ 7 - 2
src/page/layout/slide.vue

@@ -55,7 +55,7 @@ export default {
         text: '更多设置',
         link: {name: 'home'},
         children: [
-          { text: '激光场景', link: {name: 'laser'} },
+          // { text: '激光场景', link: {name: 'laser'} },
           { text: '场景管理', link: {name: 'scene'} },
           { text: '反馈消息', link: {name: 'feedback'} },
           { text: '设备管理', link: {name: 'device'} },
@@ -76,7 +76,12 @@ export default {
         top: 154
       },
       // { text: '版本管理', link: {name: 'edition'}, top: 182 },
-      { text: '数据统计', link: {name: 'Statistics'}, top: 210 }
+      { text: '数据统计', link: {name: 'Statistics'}, top: 210 },
+      { text: '用户列表', link: {name: 'userList'}, top: 126 },
+      { text: '操作日志', link: {name: 'oplog'}, top: 210 }
+      // { text: '会员权益', link: {name: 'Statistics'}, top: 210 },
+      // { text: '下载次数', link: {name: 'Statistics'}, top: 210 },
+      // { text: '操作日志', link: {name: 'Statistics'}, top: 210 }
       // {
       //   text: 'SDK 发布管理',
       //   link: {name: 'sdkManage'},

+ 212 - 0
src/page/oplog/oplog.vue

@@ -0,0 +1,212 @@
+<template>
+  <div id="order-check">
+    <div class="order-check-body" v-loading.fullscreen.lock="fullscreenLoading">
+      <div class="order-management-body">
+        <div class="order-management-inner">
+          <span>时间段:</span>
+          <el-date-picker size="large" v-model="searchDate" type="daterange" unlink-panels range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2" value-format="yyyy-MM-dd" align="center">
+          </el-date-picker>
+          <!-- <span>关键字:</span>
+          <el-input @keyup.enter.native="_searchOrderData(1)" ref="searchOrderNumber" v-model="searchOrderNumber" value="" placeholder="留言内容、备注"></el-input> -->
+          <el-button type="primary" @click="_searchOrderData(1)" color='red'>筛选</el-button>
+
+        </div>
+        <div class="order-check_bottom">
+          <div class="order-management-table">
+            <el-table ref="order_table" class='e-table' :data="orders" style="width: 100%">
+              <el-table-column prop="userId" label="用户id">
+              </el-table-column>
+              <el-table-column prop="createTime" label="操作时间">
+              </el-table-column>
+              <el-table-column label="操作详情">
+                <template slot-scope="scope">
+                  <span v-if="scope.row.type==1">下载场景</span>
+                  <span v-if="scope.row.type==2">新增权益</span>
+                  <span v-if="scope.row.type==3">新增下载</span>
+                </template>
+              </el-table-column>
+
+            </el-table>
+          </div>
+          <div class="order-management-pagination">
+            <el-pagination @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="10" layout="total, prev, pager, next, jumper" :total="total">
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'order-check',
+
+  data () {
+    return {
+      //   type: 9,
+      active: null,
+
+      orders: [],
+      currentPage: 1,
+      fullscreenLoading: false,
+      product: {
+        name: '',
+        packageName: '',
+        count: '',
+        amount: '',
+        url: ''
+      },
+      receive: {
+        name: '',
+        phone: '',
+        address: '',
+        invoice: '',
+        expressNum: ''
+      },
+      total: 0,
+      options: [
+        {
+          value: undefined,
+          label: '全部筛选订单'
+        },
+        {
+          value: 0,
+          label: '未支付筛选订单'
+        },
+        {
+          value: 1,
+          label: '待发货筛选订单'
+        },
+        {
+          value: 2,
+          label: '已发货筛选订单'
+        },
+        {
+          value: 3,
+          label: '已完成筛选订单'
+        }
+      ],
+      selectValue: '',
+      // expressNum_input: "",
+      searchDate: [],
+      searchOrderNumber: '',
+      hasClickSearch: false,
+      pickerOptions2: {
+        shortcuts: [
+          {
+            text: '最近一周',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', [start, end])
+            }
+          },
+          {
+            text: '最近一个月',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+              picker.$emit('pick', [start, end])
+            }
+          },
+          {
+            text: '最近三个月',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+              picker.$emit('pick', [start, end])
+            }
+          }
+        ]
+      }
+    }
+  },
+  methods: {
+    handleCurrentChange (val) {
+      let page = val
+      if (this.total > 0 && !this.hasClickSearch) {
+        this._searchOrderData(page)
+      } else {
+        this._searchOrderData(page)
+      }
+    },
+
+    async _searchOrderData (page) {
+      this.hasClickSearch = true
+      let date1, date2, orderNum
+      this.date1 = this.searchDate ? this.searchDate[0] : null
+      this.date2 = this.searchDate ? this.searchDate[1] : null
+      date1 = this.date1 ? this.date1 + ' 00:00:00' : null
+      date2 = this.date2 ? this.date2 + ' 23:59:59' : null
+
+      this.orderNum = orderNum = this.searchOrderNumber || null
+
+      this.fullscreenLoading = true
+
+      let para = {
+        pageNum: page,
+        // type: this.type,
+        startDate: date1,
+        endDate: date2,
+        // itemName: orderNum || '',
+        pageSize: 10
+      }
+
+      let url = '/manager/user/incrementlist'
+      let method = 'post'
+      let data
+      //   if (para.startDate || para.endDate || para.itemName) {
+      //     url = '/manager/goods/version/search'
+      //     method = 'post'
+      //   }
+
+      //   console.log(method, para)
+      //   if (method === 'get') {
+      //     let paras = []
+      //     Object.keys(para).forEach((k) => {
+      //       if (para[k] || typeof para[k] === 'number') {
+      //         paras.push(`${k}=${para[k]}`)
+      //       } else {
+      //         paras.push(`${k}=''`)
+      //       }
+      //     })
+
+      //     para = paras.join('&')
+      //     data = (await this.$http[method](url + '?' + para)).data
+      //   } else {
+      data = (await this.$http[method](url, para)).data
+      //   }
+
+      this.fullscreenLoading = false
+      let temp = data.list
+      for (var i = 0; i < temp.length; i++) {
+        // temp[i]['expressNum_input'] = "";
+        temp[i].items = []
+      }
+      this.orders = temp
+      this.currentPage = page
+      this.total = data.total
+    }
+  },
+  mounted () {
+    // console.log(window.location.origin)
+    // window.open(window.location.origin+'/main')
+    this._searchOrderData(1)
+  }
+}
+</script>
+
+<style scoped>
+@import url("./style.css");
+</style>
+
+<style type="text/css">
+.el-table__expand-icon > i {
+  display: none !important;
+}
+</style>

+ 183 - 0
src/page/oplog/style.css

@@ -0,0 +1,183 @@
+.order-check-body {
+  width: 100%;
+  float: left;
+  /*  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);*/
+  /*border: 1px solid #ebeef5;*/
+}
+
+.upload-file {
+  position: relative;
+  display: inline-block;
+  overflow: hidden;
+}
+
+.upload-file input {
+  position: absolute;
+  z-index: 1;
+  cursor: pointer;
+  opacity: 0;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+}
+
+.order_check_row {
+  display: flex;
+  width: 100%;
+}
+
+.product_info {
+  width: 50%;
+  flex-direction: column;
+  display: flex;
+  padding: 20px;
+  background: #fff;
+}
+
+.order_info {
+  width: 50%;
+  padding: 20px;
+  margin-left: 20px;
+  background: #fff;
+}
+
+.product_info_title {
+  text-align: left;
+  font-weight: 700;
+  margin-bottom: 20px;
+}
+
+.product_info_body {
+  margin-left: 30px;
+  display: flex;
+}
+
+.product_info_body_img {
+  width: 110px;
+  height: 110px;
+  border: 1px solid #ddd;
+}
+
+.product_img {
+  margin: 5px auto;
+  width: 100px;
+  height: 100px;
+}
+
+.product_info_body_info {
+  margin-left: 50px;
+}
+
+.product_info_body_info_item {
+  line-height: 27px;
+  text-align: left;
+}
+
+.product_info_body_info_item_title {
+  width: 100px;
+  display: inline-block;
+  margin-right: 20px;
+  font-weight: 700;
+}
+
+.order_info_title {
+  text-align: left;
+  font-weight: 700;
+  margin-bottom: 20px;
+}
+
+.order_info_body {
+  margin-left: 30px;
+  text-align: left;
+}
+
+.order_info_body_info_item {
+  line-height: 23px;
+  padding: 10px 0;
+  border-bottom: 1px solid #f5f5f5;
+  text-align: left;
+}
+
+.order_info_body_info_item_title {
+  width: 100px;
+  display: inline-block;
+  margin-right: 20px;
+  font-weight: 700;
+  vertical-align: top;
+}
+
+.fix-order_info_body_info_item_content {
+  width: 70%;
+  display: inline-block;
+}
+
+.order-management-body {
+  width: 100%;
+  margin: 30px 0 20px 0;
+  float: left;
+}
+
+.order-management-inner {
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  /*border: 1px solid #ebeef5;*/
+  padding: 30px 20px;
+  background: #fff;
+  border-radius: 5px;
+}
+
+.base-info {
+  margin: 20px 0;
+}
+
+.order-check_bottom {
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  /*border: 1px solid #ebeef5;*/
+  margin-top: 30px;
+  background: #fff;
+  border-radius: 5px;
+  padding: 20px 0;
+}
+
+.order-check_tab {
+  margin: 0 0 20px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.order-check_tab ul {
+  display: inline-block;
+}
+
+.order-check_tab li {
+  display: inline-block;
+  cursor: pointer;
+  color: #999;
+  line-height: 1;
+}
+
+.order-check_tab_li_active {
+  color: #000 !important;
+  font-weight: bold;
+}
+
+.order-management-table {
+  margin: 0 20px;
+}
+
+.order-management-pagination {
+  padding: 20px 20px 0;
+  position: relative;
+  text-align: right;
+}
+
+.el-input {
+  width: 220px;
+}

+ 183 - 0
src/page/userList/style.css

@@ -0,0 +1,183 @@
+.order-check-body {
+    width: 100%;
+    float: left;
+    /*  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);*/
+    /*border: 1px solid #ebeef5;*/
+}
+
+.upload-file {
+    position: relative;
+    display: inline-block;
+    overflow: hidden;
+}
+
+.upload-file input {
+    position: absolute;
+    z-index: 1;
+    cursor: pointer;
+    opacity: 0;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+}
+
+.order_check_row {
+    display: flex;
+    width: 100%;
+}
+
+.product_info {
+    width: 50%;
+    flex-direction: column;
+    display: flex;
+    padding: 20px;
+    background: #fff;
+}
+
+.order_info {
+    width: 50%;
+    padding: 20px;
+    margin-left: 20px;
+    background: #fff;
+}
+
+.product_info_title {
+    text-align: left;
+    font-weight: 700;
+    margin-bottom: 20px;
+}
+
+.product_info_body {
+    margin-left: 30px;
+    display: flex;
+}
+
+.product_info_body_img {
+    width: 110px;
+    height: 110px;
+    border: 1px solid #ddd;
+}
+
+.product_img {
+    margin: 5px auto;
+    width: 100px;
+    height: 100px;
+}
+
+.product_info_body_info {
+    margin-left: 50px;
+}
+
+.product_info_body_info_item {
+    line-height: 27px;
+    text-align: left;
+}
+
+.product_info_body_info_item_title {
+    width: 100px;
+    display: inline-block;
+    margin-right: 20px;
+    font-weight: 700;
+}
+
+.order_info_title {
+    text-align: left;
+    font-weight: 700;
+    margin-bottom: 20px;
+}
+
+.order_info_body {
+    margin-left: 30px;
+    text-align: left;
+}
+
+.order_info_body_info_item {
+    line-height: 23px;
+    padding: 10px 0;
+    border-bottom: 1px solid #f5f5f5;
+    text-align: left;
+}
+
+.order_info_body_info_item_title {
+    width: 100px;
+    display: inline-block;
+    margin-right: 20px;
+    font-weight: 700;
+    vertical-align: top;
+}
+
+.fix-order_info_body_info_item_content {
+    width: 70%;
+    display: inline-block;
+}
+
+.order-management-body {
+    width: 100%;
+    margin: 0px 0 20px 0;
+    float: left;
+}
+
+.order-management-inner {
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    /*border: 1px solid #ebeef5;*/
+    padding: 30px 20px;
+    background: #fff;
+    border-radius: 5px;
+}
+
+.base-info {
+    margin: 20px 0;
+}
+
+.order-check_bottom {
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    -moz-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    /*border: 1px solid #ebeef5;*/
+    margin-top: 30px;
+    background: #fff;
+    border-radius: 5px;
+    padding: 20px 0;
+}
+
+.order-check_tab {
+    margin: 0 0 20px;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.order-check_tab ul {
+    display: inline-block;
+}
+
+.order-check_tab li {
+    display: inline-block;
+    cursor: pointer;
+    color: #999;
+    line-height: 1;
+}
+
+.order-check_tab_li_active {
+    color: #000 !important;
+    font-weight: bold;
+}
+
+.order-management-table {
+    margin: 0 20px;
+}
+
+.order-management-pagination {
+    padding: 20px 20px 0;
+    position: relative;
+    text-align: right;
+}
+
+.el-input {
+    width: 220px;
+}

+ 240 - 0
src/page/userList/userList.vue

@@ -0,0 +1,240 @@
+<template>
+  <div id="order-check">
+    <div class="order-check-body" v-loading.fullscreen.lock="fullscreenLoading">
+      <div class="order-management-body">
+        <!-- <div class="order-management-inner">
+          <span>时间段:</span>
+          <el-date-picker size="large" v-model="searchDate" type="daterange" unlink-panels range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions2" value-format="yyyy-MM-dd" align="center">
+          </el-date-picker>
+          <span>关键字:</span>
+          <el-input @keyup.enter.native="_searchOrderData(1)" ref="searchOrderNumber" v-model="searchOrderNumber" value="" placeholder="留言内容、备注"></el-input>
+          <el-button type="primary" @click="_searchOrderData(1)" color='red'>筛选</el-button>
+
+          <el-button type="success" @click="active = {file: ''}" color='red' style="float: right">上传</el-button>
+        </div> -->
+        <div class="order-check_bottom">
+          <div class="order-management-table">
+            <el-table ref="order_table" class='e-table' :data="orders" style="width: 100%">
+              <el-table-column prop="id" label="用户id">
+              </el-table-column>
+              <!-- <el-table-column prop="name" label="名称">
+              </el-table-column> -->
+              <el-table-column prop="userName" label="用户名称">
+              </el-table-column>
+              <el-table-column prop="incrementNum" label="会员权益">
+              </el-table-column>
+              <el-table-column prop="remainDownLoadNum" label="剩余下载次数">
+              </el-table-column>
+              <el-table-column label="操作">
+                <template slot-scope="scope">
+                  <el-button type="text" @click="addVipNum(scope.row)" class="new_edit_btn">新增权益</el-button>
+                  <el-button type="text" class="edit_btn" @click="addDownLoadNum(scope.row)">新增下载</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+          <div class="order-management-pagination">
+            <el-pagination @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="10" layout="total, prev, pager, next, jumper" :total="total">
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <el-dialog :title="dialogTitle" :visible.sync="dialogFormVisible" @close="closeAdd" width="30%">
+      <el-form :model="vipForm" :rules="rules" ref="ruleForm">
+        <el-form-item prop="num" :label="`${dialogTitle}数:`" :label-width="formLabelWidth">
+          <el-input style="width: 80%;" @input="limitNum" v-model="vipForm.num"></el-input>
+        </el-form-item>
+        <el-form-item prop="incrementEndTime" v-if="addType==1" label="到期时间:" :label-width="formLabelWidth">
+          <el-date-picker style="width: 80%;" v-model="vipForm.incrementEndTime" value-format="yyyy-MM-dd HH:mm:ss" type="date" placeholder="选择日期">
+          </el-date-picker>
+        </el-form-item>
+
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="closeAdd">取 消</el-button>
+        <el-button type="primary" @click="addNum">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'order-check',
+
+  data () {
+    return {
+      //   type: 9,
+      orders: [],
+      currentPage: 1,
+      fullscreenLoading: false,
+      total: 0,
+      searchDate: [],
+      searchOrderNumber: '',
+      hasClickSearch: false,
+      pickerOptions2: {
+        shortcuts: [
+          {
+            text: '最近一周',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', [start, end])
+            }
+          },
+          {
+            text: '最近一个月',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+              picker.$emit('pick', [start, end])
+            }
+          },
+          {
+            text: '最近三个月',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+              picker.$emit('pick', [start, end])
+            }
+          }
+        ]
+      },
+      dialogFormVisible: false,
+      formLabelWidth: '180px',
+      vipForm: {
+        num: 1,
+        incrementEndTime: ''
+      },
+      dialogTitle: '新增权益',
+      addType: 1,
+      rules: {
+        num: [{ required: true, message: '请输入数量', trigger: 'blur' }],
+        incrementEndTime: [
+          { required: true, message: '请选择结束时间', trigger: 'change' }
+        ]
+      }
+    }
+  },
+  methods: {
+    limitNum () {
+    //   if (this.vipForm.num - 0 == 0 && this.vipForm.num.length == 1) {
+    //     this.vipForm.num = 1
+    //   } else {
+    //     // this.vipForm.num = this.vipForm.num.replace(/[^1-9]/g, '')
+    //   }
+
+      if (this.vipForm.num - 0 == 0 && this.vipForm.num.length == 1) {
+        this.vipForm.num = 1
+      } else {
+        this.vipForm.num = this.vipForm.num.replace(/\D/g, '')
+      }
+    },
+    addDownLoadNum (row) {
+      this.vipForm.userName = row.userName
+      this.addType = 2
+      this.dialogFormVisible = true
+      this.dialogTitle = '新增下载'
+    },
+    addVipNum (row) {
+      this.vipForm.userName = row.userName
+      this.addType = 1
+      this.dialogTitle = '新增权益'
+      this.dialogFormVisible = true
+    },
+    closeAdd () {
+      this.dialogFormVisible = false
+      this.vipForm.num = 1
+      this.vipForm.incrementEndTime = ''
+      this.$refs['ruleForm'].resetFields()
+    },
+    addNum () {
+      let params
+      if (this.addType == 1) {
+        // params = this.vipForm
+        params = {
+          userName: this.vipForm.userName,
+          incrementEndTime: this.vipForm.incrementEndTime,
+          incrementNum: this.vipForm.num
+        }
+      } else {
+        params = {
+          downloadNum: this.vipForm.num,
+          userName: this.vipForm.userName
+        }
+      }
+
+      this.$refs['ruleForm'].validate(async (valid) => {
+        if (valid) {
+          this.$http
+            .post('/manager/user/insertIncrementls', params)
+            .then((res) => {
+              this.closeAdd()
+              this._searchOrderData(1)
+            })
+        } else {
+          console.log('请补全信息')
+        }
+      })
+    },
+    handleCurrentChange (val) {
+      let page = val
+      if (this.total > 0 && !this.hasClickSearch) {
+        this._searchOrderData(page)
+      } else {
+        this._searchOrderData(page)
+      }
+    },
+
+    async _searchOrderData (page) {
+      this.hasClickSearch = true
+
+      this.fullscreenLoading = true
+
+      let para = {
+        pageNum: page,
+        // startDate: date1,
+        // endDate: date2,
+        pageSize: 10
+      }
+
+      let url = '/manager/user/list'
+
+      let data = (await this.$http['post'](url, para)).data
+      console.log(data)
+      this.fullscreenLoading = false
+      let temp = data.list
+      for (var i = 0; i < temp.length; i++) {
+        // temp[i]['expressNum_input'] = "";
+        temp[i].items = []
+        temp[i].remainDownLoadNum =
+          temp[i].downloadNumTotal - temp[i].downloadNum
+        if (!temp[i].incrementNum) {
+          temp[i].incrementNum = 0
+        }
+      }
+      this.orders = temp
+      this.currentPage = page
+      this.total = data.total
+    }
+  },
+  mounted () {
+    this._searchOrderData(1)
+  }
+}
+</script>
+
+<style scoped>
+@import url("./style.css");
+</style>
+
+<style type="text/css">
+.el-table__expand-icon > i {
+  display: none !important;
+}
+</style>

+ 9 - 4
src/router/index.js

@@ -139,10 +139,15 @@ export default new Router({
           meta: { text: '数据统计' }
         },
         {
-          path: '/down',
-          name: 'Down',
-          component: require('@/page/down').default,
-          meta: { text: '数据下载' }
+          path: '/userList',
+          name: 'userList',
+          component: require('@/page/userList/userList').default,
+          meta: { text: '用户列表' }
+        },  {
+          path: '/oplog',
+          name: 'oplog',
+          component: require('@/page/oplog/oplog').default,
+          meta: { text: '操作日志' }
         },
         {
           path: '*',