Browse Source

员工管理

huangb 7 years ago
parent
commit
e0a6d808cb

+ 1 - 1
app.html

@@ -6,7 +6,7 @@
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" />
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/element-ui/1.3.7/theme-default/index.css" />
   <!--<link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_0d1jjt5tukcblnmi.css"/>-->
-  <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_2swn48l3ywz.css">
+  <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_c7tjqxmhqkl.css">
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.css" />
   <!--<script src="https://wechatfe.github.io/vconsole/lib/vconsole.min.js?v=3.2.0"></script>-->
   {{ HEAD }}

+ 244 - 0
components/mobile/staffManagement/StaffAdd.vue

@@ -0,0 +1,244 @@
+<template>
+  <div class="seek" @click="showChooseSex === false">
+    <div class="com-mobile-header mobile-center-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p>新增账户</p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
+    </div>
+    <div class="mobile-fix-content mobile-centerfix-content" id="mobile-staff-center">
+      <div class="staff-head">
+        <span class="inline-block" :class="{'active': switchType === 'addNoRegister'}" @click="setSwitchType('addNoRegister')">添加未注册用户</span>
+        <span class="inline-block" :class="{'active': switchType === 'addRegister'}" @click="setSwitchType('addRegister')">添加已注册用户</span>
+      </div>
+      <div class="staff-record" v-if="switchType == 'addNoRegister'" >
+        <div class="list-content">
+          <ul class="staff-adds">
+            <li><span>姓名:</span><input type="text" v-model="newUserName" placeholder="请输入用户名"></li>
+            <li style="overflow: visible;"><span>性别:</span>
+              <div class="sex-filter">
+                <div class="select-wrap" @click="openChoose">{{sex === 'M' ? '男' : '女'}}<i class="iconfont icon-arrow-down"></i></div>
+                <ul class="select-list" v-if="showChooseSex">
+                  <li v-show="sex != 'M'" @click="chooseSex('M')">男</li>
+                  <li v-show="sex != 'F'" @click="chooseSex('F')">女</li>
+                </ul>
+              </div>
+            </li>
+            <li><span>手机号:</span><input type="text" v-model="newUserPhone" placeholder="请输入手机号"></li>
+            <li><span>邮箱:</span><input type="text" v-model="newUserEmail" placeholder="请输入邮箱"></li>
+          </ul>
+          <div class="staff-footer">
+            <div class="cancel handle">取消</div>
+            <div class="agree handle" @click="addNewUser">确定</div>
+          </div>
+        </div>
+      </div>
+      <div class="staff-record" v-if="switchType == 'addRegister'">
+        <div class="search-content">
+          <input type="text" placeholder="请输入UU号、手机号或邮箱">
+          <span><i class="iconfont icon-sousuo"></i></span>
+        </div>
+        <div class="list-content">
+          <div class="staff-list">
+            <div class="list-item"><span>UU账号:</span><span>100000721</span></div>
+            <div class="list-item"><span>姓名:</span><span>张洪别</span></div>
+            <div class="list-item"><span>性别:</span><span>男</span></div>
+            <div class="list-item"><span>手机号:</span><span>12345678901</span></div>
+            <div class="list-item"><span>邮箱:</span><span>12345678901</span></div>
+          </div>
+          <div class="staff-footer">
+            <div class="cancel handle">取消</div>
+            <div class="agree handle">确定绑定</div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
+  export default {
+    data () {
+      return {
+        switchType: 'addNoRegister',
+        newUserName: '',
+        newUserPhone: '',
+        newUserEmail: '',
+        showChooseSex: false,
+        sex: 'M'
+      }
+    },
+    components: {
+      RemindBox,
+      PullUp,
+      EmptyStatus
+    },
+    computed: {
+    },
+    methods: {
+      setSwitchType (type) {
+        this.switchType = type
+      },
+      openChoose () {
+        this.showChooseSex = true
+      },
+      chooseSex (info) {
+        this.sex = info
+        this.showChooseSex = false
+      },
+      addNewUser () {
+        this.$http.post('/basic/user', {userEmail: this.newUserEmail, userName: this.newUserName, userSex: this.sex, userTel: this.newUserPhone})
+          .then(response => {
+            console.log(response)
+          })
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  $base-color: #3f84f6;
+  #mobile-staff-center {
+    .staff-head {
+      height: .82rem;
+      line-height: .82rem;
+      text-align: center;
+      background: #fff;
+      span {
+        font-size: .29rem;
+        &:first-child {
+          margin-right: 2.6rem;
+        }
+        &.active {
+          color: $base-color;
+          border-bottom: 1px solid $base-color;
+        }
+      }
+    }
+    .staff-record {
+      .search-content {
+        overflow: hidden;
+        padding: .25rem 0;
+        text-align: center;
+        input {
+          width: 6.9rem;
+          border: 1px solid #376ff3;
+        }
+      }
+      .list-content{
+        margin: 0 auto;
+        padding: 0 .20rem;
+        .staff-adds {
+          margin: 0.25rem auto 0;
+          padding: 0 .24rem;
+          width: 6.64rem;
+          background-color: #ffffff;
+          border-radius: .05rem;
+          li{
+            overflow: hidden;
+            height: 1.18rem;
+            line-height: 1.18rem;
+            border-bottom: 1px solid #d9d9d9;
+            list-style: none;
+            span {
+              display: inline-block;
+              float: left;
+              width: 1rem;
+              font-size: .28rem;
+              color: #3f84f6;
+            }
+            input{
+              float: left;
+              width: 4.85rem;
+              border: none;
+              outline: none;
+            }
+            div.sex-filter {
+              float: left;
+              position: relative;
+              margin-top: .3rem;
+              width: .73rem;
+              height: .58rem;
+              line-height: .58rem;
+              border-radius: .05rem;
+              border: solid 1px #b4b4b4;
+              .select-wrap {
+                width: .73rem;
+                height: .58rem;
+                text-align: center;
+                i{
+                  font-size: .1rem;
+                  font-weight: bold;
+                  color: $base-color;
+                }
+              }
+              ul.select-list{
+                width: .73rem;
+                position: absolute;
+                left: -0.02rem;
+                top: .59rem;
+                border: solid 1px #b4b4b4;
+                border-top: none;
+                -webkit-box-shadow: 0 1px 5px 0 #aaa;
+                box-shadow: 0 1px 5px 0 #aaa;
+                border-radius: .04rem;
+                li{
+                  background: #fff;
+                  text-align: center;
+                  padding: 0 .13rem;
+                  font-size: .28rem;
+                  height: .53rem;
+                  line-height: .53rem;
+                }
+              }
+            }
+            &:last-child {
+              border-bottom: none;
+            }
+          }
+        }
+        .staff-footer{
+          overflow: hidden;
+          margin-top: .6rem;
+          div.handle{
+            float: left;
+            width: 3.24rem;
+            height: .77rem;
+            line-height: .77rem;
+            font-size: .32rem;
+            color: #fff;
+            text-align: center;
+            border-radius: .08rem;
+            &:first-child{
+              margin: 0 .28rem 0 .2rem;
+              background-color: #acaaab;
+            }
+            &:last-child{
+              background-color: #3f84f6       ;
+            }
+          }
+        }
+        .staff-list {
+          margin: 0 auto;
+          padding: .35rem .24rem .15rem;
+          width: 6.64rem;
+          background-color: #ffffff;
+          border-radius: .05rem;
+          .list-item {
+            overflow: hidden;
+            span{
+              float: left;
+              font-size: .28rem;
+              color: #3f84f6;
+              &:first-child{
+                width: 1.3rem;
+              }
+              &:last-child{
+                width: 4.8rem;
+                color: #666;
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+</style>

+ 138 - 0
components/mobile/staffManagement/StaffEdit.vue

@@ -0,0 +1,138 @@
+<template>
+  <div class="seek">
+    <div class="com-mobile-header mobile-center-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p>编辑角色</p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
+    </div>
+    <div class="mobile-fix-content mobile-centerfix-content" id="mobile-staff-center">
+      <div class="staff-role">
+        <div class="staff-header"><span class="active_01"><b></b>管理员</span></div>
+        <div class="staff-content">
+          <label for="1" class="radio-label active">
+            <input type="radio" v-model="selectFlag" name="role" value="" id="1"/>
+          </label>
+          <p class="staff-des">拥有管理员角色的用户不受权限控制,可以执行任何操作</p>
+        </div>
+      </div>
+      <div class="staff-role">
+        <div class="staff-header"><span class="active_02"><b></b>店长</span></div>
+        <div class="staff-content">
+          <label for="2" class="radio-label">
+            <input type="radio" v-model="selectFlag" name="role" value="" id="2"/>
+          </label>
+          <p class="staff-des">店长可以对买/卖家中心的全部模块进行查看和编辑</p>
+        </div>
+      </div>
+      <div class="staff-role">
+        <div class="staff-header"><span class="active_03"><b></b>普通用户</span></div>
+        <div class="staff-content">
+          <label for="3" class="radio-label">
+            <input type="radio" v-model="selectFlag" name="role" value="" id="3"/>
+          </label>
+          <p class="staff-des">可以进行交易相关的一般操作,不能进行“员工管理”和“角色权限”的编辑操作</p>
+        </div>
+      </div>
+      <div class="staff-role">
+        <div class="staff-header"><span class="active_04"><b></b>采购员</span></div>
+        <div class="staff-content">
+          <label for="4" class="radio-label">
+            <input type="radio" v-model="selectFlag" name="role" value="" id="4"/>
+          </label>
+          <p class="staff-des" style="margin-top: .12rem;">可以查看并操作处理买家中心所有模块</p>
+        </div>
+      </div>
+      <div class="staff-role">
+        <div class="staff-header"><span class="active_05"><b></b>销售员</span></div>
+        <div class="staff-content">
+          <label for="5" class="radio-label">
+            <input type="radio" v-model="selectFlag" name="role" value="" id="5"/>
+          </label>
+          <p class="staff-des">可以查看并操作处理卖家中心的基本模块,不能进行 "员工管理" 和 "角色权限" 的编辑操作</p>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    data () {
+      return {
+      }
+    },
+    methods: {
+    }
+  }
+</script>
+<style lang="scss">
+  $base-color: #3f84f6;
+  #mobile-staff-center {
+    margin: 0 auto;
+    .staff-role{
+      margin: .2rem auto 0;
+      padding: 0 .24rem;
+      width: 7.1rem;
+      height: 1.72rem;
+      background-color: #fff;
+      border-radius: .05rem;
+      .staff-header {
+        height: .5rem;
+        line-height: .5rem;
+        text-align: left;
+        border-bottom: 1px solid #d9d9d9;
+        span {
+          font-size: .28rem;
+          color: #333;
+          b{
+            display: inline-block;
+            margin-right: .05rem;
+            width: .05rem;
+            height: .18rem;
+            background-color: #3f84f6;
+          }
+        }
+        span.active_02 b{
+          background-color: #8aaefc;
+        }
+        span.active_03 b{
+          background-color: #09d7cd;
+        }
+        span.active_04 b{
+          background-color: #ff676a;
+        }
+        span.active_05 b{
+          background-color: #fc9b68;
+        }
+      }
+      .staff-content {
+        overflow: hidden;
+        padding-top: .25rem;
+        .radio-label {
+          float: left;
+          margin: .18rem .1rem 0 0;
+          min-width: .36rem;
+          height: .36rem;
+          background: url(/images/mobile/center/user/car-noChecked.png) no-repeat;
+          background-size: contain;
+          vertical-align: middle;
+          input{
+            display: none;
+            width: .36rem;
+            height: .36rem;
+            border: solid 2px #999999;
+          }
+          &.active {
+            background-image: url(/images/mobile/center/user/car-checked.png);
+          }
+        }
+        .staff-des{
+          float: left;
+          width: 6rem;
+          line-height: .42rem;
+          font-size: .28rem;
+          color: #666666;
+        }
+      }
+    }
+  }
+</style>

+ 313 - 0
components/mobile/staffManagement/StaffList.vue

@@ -0,0 +1,313 @@
+<template>
+  <div class="seek">
+    <div class="com-mobile-header mobile-center-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p>员工管理</p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
+    </div>
+    <div class="mobile-fix-content mobile-centerfix-content" id="mobile-staff-center">
+      <div class="staff-head">
+        <span class="inline-block" :class="{'active': switchType === 'info'}" @click="setSwitchType('info')">员工信息</span>
+        <span class="inline-block" :class="{'active': switchType === 'Audit'}" @click="setSwitchType('Audit')">审核绑定</span>
+      </div>
+      <div class="staff-record" v-if="switchType == 'info'">
+        <div class="search-content clearfix">
+          <div class="search">
+            <!--<input type="text" placeholder="卖家名称/订单号" v-model="filterParams.keyword" @keyup.13="filterRecord">-->
+            <input type="text" placeholder="人员姓名、电话号码、邮箱或UU" class="staff-search">
+            <!--<span @click="filterRecord"><i class="iconfont icon-sousuo"></i></span>-->
+            <span><i class="iconfont icon-sousuo"></i></span>
+          </div>
+          <div class="search-filter">
+            <div class="select-wrap">全部角色<i class="iconfont icon-arrow-down"></i></div>
+            <ul class="select-list" v-if="false">
+              <li>全部角色</li>
+              <li>管理员</li>
+              <li>店长</li>
+              <li>普通用户</li>
+              <li>销售员</li>
+              <li>任意测试</li>
+            </ul>
+          </div>
+        </div>
+        <div class="list-content">
+          <div class="bg" v-for="item in staffData">
+            <div class="staff-list">
+              <div class="list-item"><span>UU账号:</span><span v-text="item.userUU">100000721</span></div>
+              <div class="list-item"><span>姓名:</span><span v-text="item.userName">张洪别</span></div>
+              <div class="list-item"><span>性别:</span><span v-text="item.userSex === 'F' ? '女' : item.userSex === 'M' ? '男' : '-'">男</span></div>
+              <div class="list-item"><span>手机号:</span><span v-text="item.userTel">12345678901</span></div>
+              <div class="list-item"><span>邮箱:</span><span v-text="item.userEmail">12345678901</span></div>
+              <div class="list-item"><span>角色:</span><span class="role" v-for="role in item.roles" v-text="role.desc ? role.desc.slice(0,2) : ''" v-bind:class="'bg' + role.color">普通</span></div>
+            </div>
+            <div class="list-footer">
+              <nuxt-link tag="div" :to="'/mobile/user/staff/edit'" class="edit handle" v-bind:class="{'no-allow': (item.userUU === userInfo.userUU)}"><i class="iconfont icon-edit"></i><span>编辑</span></nuxt-link>
+              <div class="delete handle" v-bind:class="{'no-allow': (item.userUU === userInfo.userUU)}"><i class="iconfont icon-lajitong"></i><span>删除</span></div>
+            </div>
+          </div>
+        </div>
+        <nuxt-link class="staff-add" :to="'/mobile/user/staff/add'"><i class="iconfont icon-add"></i>新增用户</nuxt-link>
+      </div>
+      <div class="staff-record" v-if="switchType == 'Audit'">
+        <div class="search-content">
+          <!--<input type="text" placeholder="卖家名称/订单号" v-model="filterParams.keyword" @keyup.13="filterRecord">-->
+          <input type="text" placeholder="人员姓名、电话号码、邮箱或UU" v-model="auditSearch">
+          <!--<span @click="filterRecord"><i class="iconfont icon-sousuo"></i></span>-->
+          <span><i class="iconfont icon-sousuo"></i></span>
+        </div>
+        <div class="list-content">
+          <div class="bg">
+            <div class="staff-list">
+              <div class="list-item"><span>用户名:</span><span>张洪别</span></div>
+              <div class="list-item"><span>UU账号:</span><span>100000721</span></div>
+              <div class="list-item"><span>手机号:</span><span>12345678901</span></div>
+              <div class="list-item"><span>邮箱:</span><span>12345678901</span></div>
+            </div>
+            <div class="list-footer">
+              <div class="edit handle"><i class="iconfont icon-close-circle"></i><span>同意</span></div>
+              <div class="delete handle"><i class="iconfont icon-check-circle"></i><span>拒绝</span></div>
+            </div>
+          </div>
+        </div>
+        <div>{{auditBind}}</div>
+      </div>
+      <!--<seek-list :keyword="remindKeyword" :isSearch="isSearch" :userType="userType" :seekType="seekType" :purchaseManList="purchaseManListData"></seek-list>-->
+      <!--<pull-up :fixId="'mobileFixContent'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>-->
+    </div>
+  </div>
+</template>
+<script>
+  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
+  import { BaseFilter } from '~components/mobile/base'
+  export default {
+    layout: 'mobile',
+    data () {
+      return {
+        remindText: '',
+        timeoutCount: '',
+        page: 1,
+        count: 10,
+        auditSearch: '',
+        switchType: 'info',
+      }
+    },
+    components: {
+      RemindBox,
+      PullUp,
+      EmptyStatus
+    },
+    watch: {
+      // 'buyerAccount': {
+      //   handler: function (val) {
+      //     if (val && val.content) {
+      //       if (this.isChange) {
+      //         this.accountList = []
+      //         this.isChange = false
+      //       }
+      //       this.accountList = [...this.accountList, ...val.content]
+      //     }
+      //   }
+    },
+    computed: {
+      staffData () {
+        return this.$store.state.staff.infoList.info.data.content
+      },
+      auditBind () {
+        console.log(this.$store.state.staff.infoList.audit.data, '123')
+        return this.$store.state.staff.infoList.audit.data.content
+      },
+      userInfo () {
+        return this.$store.state.option.user.data
+      }
+    },
+    fetch ({ store }) {
+      return Promise.all([
+        store.dispatch('staff/bindAudit', { size: this.count, page: this.page, speaceUU: this.user.userUU, status: 311, keyword: this.auditSearch})
+      ])
+    },
+    methods: {
+      setSwitchType (type) {
+        this.switchType = type
+      }
+    }
+  }
+</script>
+<style lang="scss">
+  $base-color: #3f84f6;
+  #mobile-staff-center {
+    .staff-head {
+      height: .82rem;
+      line-height: .82rem;
+      text-align: center;
+      background: #fff;
+      span {
+        font-size: .29rem;
+        &:first-child {
+          margin-right: 2.6rem;
+        }
+        &.active {
+          color: $base-color;
+          border-bottom: 1px solid $base-color;
+        }
+      }
+    }
+    .staff-record {
+      .search-content {
+        padding: .25rem 0;
+        text-align: center;
+        input {
+          width: 6.9rem;
+          border: 1px solid #376ff3;
+        }
+        .staff-search {
+          width: 5.31rem;
+        }
+        .search {
+          float: left;
+        }
+        .search-filter {
+          float: left;
+          margin-left: .35rem;
+          position: relative;
+          .select-wrap {
+            width: 1.45rem;
+            height: .58rem;
+            line-height: .58rem;
+            background-color: #ffffff;
+            border-radius: .06rem;
+            border: solid 1px #b4b4b4;
+            i{
+              font-size: .1rem;
+              font-weight: bold;
+              color: $base-color;
+            }
+          }
+          ul.select-list{
+            width: 1.45rem;
+            position: absolute;
+            left: 0rem;
+            top: .59rem;
+            border: solid 1px #b4b4b4;
+            border-top: none;
+            -webkit-box-shadow: 0 1px 5px 0 #aaa;
+            box-shadow: 0 1px 5px 0 #aaa;
+            border-radius: .04rem;
+            li{
+              background: #fff;
+              text-align: left;
+              padding: 0 .13rem;
+              font-size: .28rem;
+              height: .53rem;
+              line-height: .53rem;
+            }
+          }
+        }
+      }
+      .list-content{
+        margin: 0 auto;
+        padding: 0 .20rem;
+        div.bg{
+          padding: .32rem .24rem 0 .24rem;
+          width: 7.1rem;
+          background: #fff;
+          border-radius: .05rem;
+        }
+        .staff-list {
+          width: 100%;
+          .list-item {
+            margin-bottom: .24rem;
+            &:last-child{
+              padding-bottom: 0;
+            }
+            span {
+              display: inline-block;
+              font-size: .28rem;
+              &:first-child {
+                width: 1.3rem;
+                text-align: right;
+                color: #3f84f6;
+              }
+              &:last-child {
+                color: #666;
+              }
+            }
+            span.role{
+              display: inline-block;
+              padding: 0 .05rem;
+              height: .25rem;
+              line-height: .25rem;
+              text-align: center;
+              font-size: .24rem;
+              color: #fff;
+              border-radius: .04rem;
+            }
+            span.role.bg1{
+              background-color: #89aefa;
+            }
+            span.role.bg2{
+              background-color: #01d9ce;
+            }
+            span.role.bg3{
+              background-color: #01d9ce;
+            }
+            span.role.bg4{
+              background-color: #ff6769;
+            }
+            span.role.bg5{
+              background-color: #ff8050;
+            }
+          }
+        }
+        .list-footer {
+          width: 100%;
+          height: .8rem;
+          line-height: .8rem;
+          background: #fff;
+          border-top: 1px solid #d9d9d9;
+          div.handle{
+            float: left;
+            width: 50%;
+            margin: 0 auto;
+            text-align: center;
+            span{
+              font-size: .26rem;
+              color: #333;
+            }
+            i.iconfont {
+              margin-right: .06rem;
+              font-size: .36rem;
+              color: #333;
+            }
+          }
+          div.edit{
+            border-right: 1px solid #d9d9d9;
+          }
+          div.no-allow {
+            color: #606168;
+            cursor: not-allowed;
+          }
+        }
+      }
+      .staff-add {
+        display: inline-block;
+        position: fixed;
+        bottom: 1.2rem;
+        left: 50%;
+        margin-left: -3.29rem;
+        width: 6.59rem;
+        height: .77rem;
+        line-height: .77rem;
+        text-align: center;
+        font-size: .32rem;
+        color: #fff;
+        background-color: #3f84f6;
+        border-radius: 0.08rem;
+        i{
+          margin-right: .1rem;
+          font-size: .32rem;
+          color: #fff;
+        }
+      }
+    }
+  }
+</style>

+ 4 - 0
components/mobile/staffManagement/index.js

@@ -0,0 +1,4 @@
+import StaffList from './StaffList.vue'
+import StaffAdd from './StaffAdd.vue'
+import StaffEdit from './StaffEdit.vue'
+export { StaffList, StaffAdd, StaffEdit }

+ 1 - 1
pages/mobile/user/index.vue

@@ -68,7 +68,7 @@
             <img src="/images/mobile/user/icon_05.png" alt="">
             <p>管理员信息</p>
           </li>
-          <li @click="go('/')">
+          <li @click="go('/mobile/user/staff')">
             <img src="/images/mobile/center/vendor/onsale.png" alt="">
             <p>员工管理</p>
           </li>

+ 26 - 0
pages/mobile/user/staff/add.vue

@@ -0,0 +1,26 @@
+<template>
+  <div>
+    <staff-add/>
+  </div>
+</template>
+<script>
+  import { StaffAdd } from '~components/mobile/staffManagement'
+  export default {
+    middleware: 'authenticated',
+    layout: 'mobile',
+    components: {
+      StaffAdd,
+    },
+    data () {
+      return {
+      }
+    },
+    fetch ({ store }) {
+      return Promise.all([
+        store.dispatch('staff/loadStaffList', { count: 10, page: 1, enuu: store.state.option.user.data.enterprise.uu})
+      ])
+    },
+    methods: {
+    }
+  }
+</script>

+ 26 - 0
pages/mobile/user/staff/edit.vue

@@ -0,0 +1,26 @@
+<template>
+  <div>
+    <staff-edit/>
+  </div>
+</template>
+<script>
+  import { StaffEdit } from '~components/mobile/staffManagement'
+  export default {
+    middleware: 'authenticated',
+    layout: 'mobile',
+    components: {
+      StaffEdit
+    },
+    data () {
+      return {
+      }
+    },
+    fetch ({ store }) {
+      return Promise.all([
+        store.dispatch('staff/loadStaffList', { count: 10, page: 1, enuu: store.state.option.user.data.enterprise.uu})
+      ])
+    },
+    methods: {
+    }
+  }
+</script>

+ 27 - 0
pages/mobile/user/staff/index.vue

@@ -0,0 +1,27 @@
+<template>
+  <div>
+    <staff-list/>
+  </div>
+</template>
+<script>
+  import { StaffList } from '~components/mobile/staffManagement'
+  export default {
+    middleware: 'authenticated',
+    layout: 'mobile',
+    components: {
+      StaffList
+    },
+    data () {
+      return {
+        step: 'showInfo'
+      }
+    },
+    fetch ({ store }) {
+      return Promise.all([
+        store.dispatch('staff/loadStaffList', { count: 10, page: 1, enuu: store.state.option.user.data.enterprise.uu})
+      ])
+    },
+    methods: {
+    }
+  }
+</script>

+ 25 - 0
store/staff.js

@@ -0,0 +1,25 @@
+import axios from '~/plugins/axios'
+
+export const actions = {
+  // 获取员工列表
+  loadStaffList ({ commit }, params = {}) {
+    commit('infoList/REQUEST_INFO_LIST')
+    return axios.get('/basic/user/enterprise/info', {params})
+      .then(response => {
+        commit('infoList/GET_INFO_LIST_SUCCESS', response.data)
+      }, err => {
+        commit('infoList/GET_INFO_LIST_FAILURE', err)
+      })
+  },
+  // 审核绑定
+  bindAudit ({ commit }, params = {}) {
+    commit('infoList/REQUEST_BIND_AUDIT')
+    return axios.get(`${process.env.ssoUrl}/basic/user/enterprise/info`, {params})
+      .then(response => {
+        console.log(response.data)
+        commit('infoList/GET_BIND_AUDIT_SUCCESS', response.data)
+      }, err => {
+        commit('infoList/GET_BIND_AUDIT_FAILURE', err)
+      })
+  }
+}

+ 33 - 0
store/staff/infoList.js

@@ -0,0 +1,33 @@
+export const state = () => ({
+  info: {
+    fetching: false,
+    data: []
+  },
+  audit: {
+    fetching: false,
+    data: []
+  }
+})
+
+export const mutations = {
+  REQUEST_INFO_LIST (state) {
+    state.info.fetching = true
+  },
+  GET_INFO_LIST_FAILURE (state) {
+    state.info.fetching = false
+  },
+  GET_INFO_LIST_SUCCESS (state, result) {
+    state.info.fetching = false
+    state.info.data = result
+  },
+  REQUEST_BIND_AUDIT (state) {
+    state.info.fetching = true
+  },
+  GET_BIND_AUDIT_FAILURE (state) {
+    state.info.fetching = false
+  },
+  GET_BIND_AUDIT_SUCCESS (state, result) {
+    state.info.fetching = false
+    state.info.data = result
+  }
+}