|
@@ -13,25 +13,19 @@
|
|
|
<div class="staff-record" v-if="switchType === 'info'">
|
|
<div class="staff-record" v-if="switchType === 'info'">
|
|
|
<div class="search-content clearfix">
|
|
<div class="search-content clearfix">
|
|
|
<div class="search">
|
|
<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>
|
|
|
|
|
|
|
+ <input type="text" placeholder="人员姓名、电话号码、邮箱或UU" v-model="staffSearch" class="staff-search" @keyup.13="staffRecord()">
|
|
|
|
|
+ <span @click="staffRecord()"><i class="iconfont icon-sousuo"></i></span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="search-filter">
|
|
<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>
|
|
|
|
|
|
|
+ <div class="select-wrap" @click="showRoleEvent($event)"><strong v-text="role"></strong><i class="iconfont icon-arrow-down"></i></div>
|
|
|
|
|
+ <ul class="select-list" v-if="showRole">
|
|
|
|
|
+ <li @click="rolesEvent()">全部角色</li>
|
|
|
|
|
+ <li v-for="item in roles" v-text="item.desc" @click="rolesEvent(item)">全部角色</li>
|
|
|
</ul>
|
|
</ul>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="list-content">
|
|
|
|
|
- <div class="bg" v-for="item in staffData">
|
|
|
|
|
|
|
+ <div class="list-content" v-if="staffDataList && staffDataList.length">
|
|
|
|
|
+ <div class="bg" v-for="item in staffDataList">
|
|
|
<div class="staff-list">
|
|
<div class="staff-list">
|
|
|
<div class="list-item"><span>UU账号:</span><span v-text="item.userUU">100000721</span></div>
|
|
<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.userName">张洪别</span></div>
|
|
@@ -46,34 +40,32 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <empty-status :type="'collect'" :showLink="true" :text="'抱歉,没有相关信息'" v-else></empty-status>
|
|
|
|
|
+ <pull-up :fixId="'mobile-staff-center'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
|
|
|
<nuxt-link class="staff-add" :to="'/mobile/user/staff/add'"><i class="iconfont icon-add"></i>新增用户</nuxt-link>
|
|
<nuxt-link class="staff-add" :to="'/mobile/user/staff/add'"><i class="iconfont icon-add"></i>新增用户</nuxt-link>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="staff-record" v-if="switchType === 'Audit'">
|
|
<div class="staff-record" v-if="switchType === 'Audit'">
|
|
|
<div class="search-content">
|
|
<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>
|
|
|
|
|
|
|
+ <input type="text" placeholder="人员姓名、电话号码、邮箱或UU" v-model="auditSearch" @keyup.13="auditRecord()">
|
|
|
|
|
+ <span @click="auditRecord()"><i class="iconfont icon-sousuo"></i></span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="list-content">
|
|
|
|
|
- <div class="bg">
|
|
|
|
|
|
|
+ <div class="list-content" v-if="AuditList && AuditList.length">
|
|
|
|
|
+ <div class="bg" v-for="item in AuditList">
|
|
|
<div class="staff-list">
|
|
<div class="staff-list">
|
|
|
- <div class="list-item"><span>用户名:</span><span>{item}</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 class="list-item"><span>用户名:</span><span v-text="item.user.vipName"></span></div>
|
|
|
|
|
+ <div class="list-item"><span>UU账号:</span><span v-text="item.user.userUU">100000721</span></div>
|
|
|
|
|
+ <div class="list-item"><span>手机号:</span><span v-text="item.user.mobile">12345678901</span></div>
|
|
|
|
|
+ <div class="list-item"><span>邮箱:</span><span v-text="item.user.email">12345678901</span></div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="list-footer">
|
|
<div class="list-footer">
|
|
|
- <div class="edit handle"><i class="iconfont icon-check-circle"></i><span>同意</span></div>
|
|
|
|
|
- <div class="handle delete"><i class="iconfont icon-close-circle"></i><span>拒绝</span></div>
|
|
|
|
|
|
|
+ <div class="edit handle" @click="agreeEvent(item, '1')"><i class="iconfont icon-check-circle"></i><span>同意</span></div>
|
|
|
|
|
+ <div class="handle delete" @click="agreeEvent(item, '0')"><i class="iconfont icon-close-circle"></i><span>拒绝</span></div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <empty-status :type="'collect'" :showLink="true" :text="'抱歉,没有相关信息'"></empty-status>
|
|
|
|
|
|
|
+ <empty-status :type="'collect'" :showLink="true" :text="'抱歉,没有相关信息'" v-else></empty-status>
|
|
|
|
|
+ <pull-up :fixId="'mobile-staff-center'" :searchMore="fetch" :allPage="allPageAudit" :page="page" @pullUpAction="onPullUpAudit"></pull-up>
|
|
|
</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>-->
|
|
|
|
|
- <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
<!--删除员工-->
|
|
<!--删除员工-->
|
|
|
<div class="deleteKuang" v-if="showDelete">
|
|
<div class="deleteKuang" v-if="showDelete">
|
|
@@ -86,6 +78,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -99,10 +92,18 @@
|
|
|
timeoutCount: 0,
|
|
timeoutCount: 0,
|
|
|
page: 1,
|
|
page: 1,
|
|
|
count: 10,
|
|
count: 10,
|
|
|
|
|
+ staffSearch: '',
|
|
|
|
|
+ staffDataList: [],
|
|
|
auditSearch: '',
|
|
auditSearch: '',
|
|
|
|
|
+ AuditList: [],
|
|
|
|
|
+ isChange: false,
|
|
|
|
|
+ hasChange: false,
|
|
|
switchType: 'info',
|
|
switchType: 'info',
|
|
|
showDelete: false,
|
|
showDelete: false,
|
|
|
- currentObject: ''
|
|
|
|
|
|
|
+ currentObject: '',
|
|
|
|
|
+ role: '全部角色',
|
|
|
|
|
+ roles: [],
|
|
|
|
|
+ showRole: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
components: {
|
|
components: {
|
|
@@ -111,69 +112,179 @@
|
|
|
EmptyStatus,
|
|
EmptyStatus,
|
|
|
BaseFilter
|
|
BaseFilter
|
|
|
},
|
|
},
|
|
|
|
|
+ created () {
|
|
|
|
|
+ this.auditRecord()
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted () {
|
|
|
|
|
+ // 获取角色
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.getRoles()
|
|
|
|
|
+ })
|
|
|
|
|
+ let _this = this
|
|
|
|
|
+ _this.$nextTick(function () {
|
|
|
|
|
+ window.addEventListener('scroll', function () {
|
|
|
|
|
+ _this.scroll()
|
|
|
|
|
+ }, false)
|
|
|
|
|
+ document.body.onclick = () => {
|
|
|
|
|
+ this.showRole = false
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
watch: {
|
|
watch: {
|
|
|
- // 'buyerAccount': {
|
|
|
|
|
- // handler: function (val) {
|
|
|
|
|
- // if (val && val.content) {
|
|
|
|
|
- // if (this.isChange) {
|
|
|
|
|
- // this.accountList = []
|
|
|
|
|
- // this.isChange = false
|
|
|
|
|
- // }
|
|
|
|
|
- // this.accountList = [...this.accountList, ...val.content]
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ 'staffData': {
|
|
|
|
|
+ handler: function (val) {
|
|
|
|
|
+ if (this.isChange) {
|
|
|
|
|
+ this.staffDataList = val.content
|
|
|
|
|
+ this.isChange = false
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.staffDataList = [...this.staffDataList, ...val.content]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ immediate: true
|
|
|
|
|
+ },
|
|
|
|
|
+ 'auditBind': {
|
|
|
|
|
+ handler: function (val) {
|
|
|
|
|
+ if (this.hasChange) {
|
|
|
|
|
+ this.AuditList = val.content
|
|
|
|
|
+ this.hasChange = false
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.AuditList = [...this.AuditList, ...val.content]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ immediate: true
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
staffData () {
|
|
staffData () {
|
|
|
- return this.$store.state.staff.infoList.info.data.content
|
|
|
|
|
|
|
+ return this.$store.state.staff.infoList.info.data
|
|
|
|
|
+ },
|
|
|
|
|
+ fetching () {
|
|
|
|
|
+ return this.$store.state.staff.infoList.info.fetching
|
|
|
|
|
+ },
|
|
|
|
|
+ allPage () {
|
|
|
|
|
+ return Math.floor(this.staffData.totalElements / this.staffData.size) + Math.floor(this.staffData.totalElements % this.staffData.size > 0 ? 1 : 0)
|
|
|
|
|
+ },
|
|
|
|
|
+ auditBind () {
|
|
|
|
|
+ console.log(this.$store.state.staff.infoList.audit.data, '213')
|
|
|
|
|
+ return this.$store.state.staff.infoList.audit.data ? this.$store.state.staff.infoList.audit.data.content : {content: []}
|
|
|
|
|
+ },
|
|
|
|
|
+ fetch () {
|
|
|
|
|
+ return this.$store.state.staff.infoList.audit.fetching
|
|
|
|
|
+ },
|
|
|
|
|
+ allPageAudit () {
|
|
|
|
|
+ return Math.floor(this.auditBind.totalElements / this.auditBind.size) + Math.floor(this.auditBind.totalElements % this.auditBind.size > 0 ? 1 : 0)
|
|
|
},
|
|
},
|
|
|
userInfo () {
|
|
userInfo () {
|
|
|
return this.$store.state.option.user.data
|
|
return this.$store.state.option.user.data
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- goEdit (item) {
|
|
|
|
|
- this.$store.commit('staff/infoList/EDIT_DATA_SUCCESS', item)
|
|
|
|
|
- this.$router.push('/mobile/user/staff/edit')
|
|
|
|
|
|
|
+ onRemind: function (str) {
|
|
|
|
|
+ this.remindText = str
|
|
|
|
|
+ this.timeoutCount++
|
|
|
},
|
|
},
|
|
|
setSwitchType (type) {
|
|
setSwitchType (type) {
|
|
|
this.switchType = type
|
|
this.switchType = type
|
|
|
- this.$http({
|
|
|
|
|
- method: 'get',
|
|
|
|
|
- baseURL: process.env.ssoUrl,
|
|
|
|
|
- url: `/api/userspace/apply/info/mall`,
|
|
|
|
|
- data: {
|
|
|
|
|
- count: 10,
|
|
|
|
|
- page: 1,
|
|
|
|
|
- speaceUU: 10049698,
|
|
|
|
|
- status: 311
|
|
|
|
|
- }
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- console.log('1', res.data)
|
|
|
|
|
- }, err => {
|
|
|
|
|
- console.log('12', err)
|
|
|
|
|
|
|
+ this.page = 1
|
|
|
|
|
+ if ( type === 'info') {
|
|
|
|
|
+ this.staffRecord()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.auditRecord()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取角色信息
|
|
|
|
|
+ getRoles () {
|
|
|
|
|
+ this.$http.get('/account/role')
|
|
|
|
|
+ .then(response => {
|
|
|
|
|
+ if (response.data) {
|
|
|
|
|
+ this.roles = response.data
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
|
|
+ .catch(err => {
|
|
|
|
|
+ console.log(err)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ staffList () {
|
|
|
|
|
+ this.$store.dispatch('staff/loadStaffList', {count: this.count, page: this.page, enuu: this.userInfo.enterprise.uu})
|
|
|
|
|
+ },
|
|
|
|
|
+ onPullUpAction: function () {
|
|
|
|
|
+ this.page++
|
|
|
|
|
+ this.staffList()
|
|
|
|
|
+ },
|
|
|
|
|
+ goEdit (item) {
|
|
|
|
|
+ this.$store.commit('staff/infoList/EDIT_DATA_SUCCESS', item)
|
|
|
|
|
+ this.$router.push('/mobile/user/staff/edit')
|
|
|
},
|
|
},
|
|
|
// 删除员工
|
|
// 删除员工
|
|
|
openDelete (item) {
|
|
openDelete (item) {
|
|
|
this.currentObject = item
|
|
this.currentObject = item
|
|
|
this.showDelete = true
|
|
this.showDelete = true
|
|
|
},
|
|
},
|
|
|
|
|
+ // 员工搜索
|
|
|
|
|
+ staffRecord () {
|
|
|
|
|
+ this.role = '全部角色'
|
|
|
|
|
+ this.showRole = false
|
|
|
|
|
+ this.$store.dispatch('staff/loadStaffList', {count: this.count, page: this.page, enuu: this.user.data.enterprise.uu, keyword: this.staffSearch})
|
|
|
|
|
+ },
|
|
|
|
|
+ // 打开选择
|
|
|
|
|
+ showRoleEvent (e) {
|
|
|
|
|
+ if (e) {
|
|
|
|
|
+ e.stopPropagation()
|
|
|
|
|
+ }
|
|
|
|
|
+ this.showRole = !this.showRole
|
|
|
|
|
+ },
|
|
|
|
|
+ // 选择性搜索
|
|
|
|
|
+ rolesEvent (type) {
|
|
|
|
|
+ this.showRole = !this.showRole
|
|
|
|
|
+ this.page = 1
|
|
|
|
|
+ if (type) {
|
|
|
|
|
+ this.role = type.desc
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ count: this.count,
|
|
|
|
|
+ page: this.page,
|
|
|
|
|
+ enuu: this.user.data.enterprise.uu,
|
|
|
|
|
+ keyword: this.staffSearch,
|
|
|
|
|
+ roleId: type.id
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$store.commit('infoList/REQUEST_INFO_LIST')
|
|
|
|
|
+ this.$http.get('/basic/user/enterprise/keywordinfo', {params})
|
|
|
|
|
+ .then(response => {
|
|
|
|
|
+ this.$store.commit('staff/infoList/GET_INFO_LIST_SUCCESS', response.data ? response.data : {})
|
|
|
|
|
+ }, err => {
|
|
|
|
|
+ this.$store.commit('staff/infoList/GET_INFO_LIST_FAILURE', err)
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.role = '全部角色'
|
|
|
|
|
+ this.staffRecord()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
sureDelete () {
|
|
sureDelete () {
|
|
|
this.$http.delete('/basic/user/' + this.currentObject.userUU)
|
|
this.$http.delete('/basic/user/' + this.currentObject.userUU)
|
|
|
.then(response => {
|
|
.then(response => {
|
|
|
- console.log(response)
|
|
|
|
|
|
|
+ console.log(response.data)
|
|
|
this.showDelete = false
|
|
this.showDelete = false
|
|
|
this.onRemind('用户' + this.currentObject.userUU + '删除成功')
|
|
this.onRemind('用户' + this.currentObject.userUU + '删除成功')
|
|
|
this.staffData()
|
|
this.staffData()
|
|
|
}).catch(data => {
|
|
}).catch(data => {
|
|
|
- this.showDelete = false
|
|
|
|
|
- this.onRemind(data.response.data)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.showDelete = false
|
|
|
|
|
+ this.onRemind(data.response.data)
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- onRemind: function (str) {
|
|
|
|
|
- this.remindText = str
|
|
|
|
|
- this.timeoutCount ++
|
|
|
|
|
|
|
+ // 申请绑定搜索
|
|
|
|
|
+ auditRecord () {
|
|
|
|
|
+ this.$store.dispatch('staff/loadBindAudit', {count: this.count, page: this.page, speaceUU: this.user.data.enterprise.uu, status: 311, keyword: this.auditSearch})
|
|
|
|
|
+ },
|
|
|
|
|
+ // 绑定下拉
|
|
|
|
|
+ onPullUpAudit () {
|
|
|
|
|
+ this.page++
|
|
|
|
|
+ this.auditRecord()
|
|
|
|
|
+ },
|
|
|
|
|
+ // 申请绑定操作事件 (同意和拒绝)
|
|
|
|
|
+ agreeEvent (type, flag) {
|
|
|
|
|
+ this.$http.get(`/basic/enterprise/auditApply?id=${type.id}&status=${Number(flag)}&userUU=${type.userUU}`)
|
|
|
|
|
+ this.auditSearch = null
|
|
|
|
|
+ this.page = 1
|
|
|
|
|
+ this.auditRecord()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -222,7 +333,12 @@
|
|
|
background-color: #ffffff;
|
|
background-color: #ffffff;
|
|
|
border-radius: .06rem;
|
|
border-radius: .06rem;
|
|
|
border: solid 1px #b4b4b4;
|
|
border: solid 1px #b4b4b4;
|
|
|
|
|
+ strong{
|
|
|
|
|
+ font-weight: normal;
|
|
|
|
|
+ }
|
|
|
i{
|
|
i{
|
|
|
|
|
+ float:right;
|
|
|
|
|
+ display:inline-block;
|
|
|
font-size: .1rem;
|
|
font-size: .1rem;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
color: $base-color;
|
|
color: $base-color;
|
|
@@ -252,6 +368,7 @@
|
|
|
.list-content{
|
|
.list-content{
|
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
|
padding: 0 .20rem;
|
|
padding: 0 .20rem;
|
|
|
|
|
+ margin-bottom:1.2rem;
|
|
|
div.bg{
|
|
div.bg{
|
|
|
padding: .32rem .24rem 0 .24rem;
|
|
padding: .32rem .24rem 0 .24rem;
|
|
|
margin-bottom: .25rem;
|
|
margin-bottom: .25rem;
|
|
@@ -262,7 +379,7 @@
|
|
|
.staff-list {
|
|
.staff-list {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
.list-item {
|
|
.list-item {
|
|
|
- margin-bottom: .24rem;
|
|
|
|
|
|
|
+ margin-bottom: .14rem;
|
|
|
&:last-child{
|
|
&:last-child{
|
|
|
padding-bottom: 0;
|
|
padding-bottom: 0;
|
|
|
}
|
|
}
|
|
@@ -280,6 +397,7 @@
|
|
|
}
|
|
}
|
|
|
span.role{
|
|
span.role{
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
|
|
|
+ margin-right: .1rem;
|
|
|
padding: 0 .05rem;
|
|
padding: 0 .05rem;
|
|
|
height: .25rem;
|
|
height: .25rem;
|
|
|
line-height: .25rem;
|
|
line-height: .25rem;
|