|
@@ -5,17 +5,16 @@
|
|
|
<view
|
|
|
class="check-order-list"
|
|
|
v-for="(item,index) in list"
|
|
|
- :key="item.id"
|
|
|
+ :key="item.userId"
|
|
|
>
|
|
|
<view class="flex align_center justify_between" @click="editPerson(item)">
|
|
|
<view class="u-name">
|
|
|
- <text style="margin-right: 0.5rem;">{{item.name}}</text>
|
|
|
- <u-icon :name="item.sex==1?'man':'woman'" size="28" :color="item.sex==1?'#00aaff':'#ffaaaa'"></u-icon>
|
|
|
+ <text style="margin-right: 0.5rem;">{{item.userName}}</text>
|
|
|
</view>
|
|
|
<view class="u-mobile">
|
|
|
- <text v-if="item.isManager == 1">门店负责人\ </text>
|
|
|
- <text v-if="item.isManager == 0 && item.roleNames">{{item.roleNames}} / </text>
|
|
|
- {{item.mobile}}
|
|
|
+ <text v-if="item.isManager == 1">门店负责人/ </text>
|
|
|
+ <text v-if="item.isManager == 0 && item.roleName">{{item.roleName}} / </text>
|
|
|
+ {{item.phone}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="set-item flex align_center justify_between">
|
|
@@ -35,7 +34,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {searchEmployee, delEmployee } from '@/api/employee'
|
|
|
+ import {getShopUserParamList, updateShopUserParam } from '@/api/bizParam.js'
|
|
|
import moment from 'moment'
|
|
|
export default{
|
|
|
name:'personnel',
|
|
@@ -45,7 +44,7 @@
|
|
|
noDataText: '暂无数据',
|
|
|
// 查询条件
|
|
|
pageNo: 1,
|
|
|
- pageSize: 20,
|
|
|
+ pageSize: 1000,
|
|
|
list: [],
|
|
|
total: 0,
|
|
|
}
|
|
@@ -65,26 +64,23 @@
|
|
|
// 查询列表
|
|
|
getRow (pageNo) {
|
|
|
let _this = this
|
|
|
- if (pageNo) {
|
|
|
- this.pageNo = pageNo
|
|
|
- }
|
|
|
+ const shelf = this.$store.state.vuex_storeShelf
|
|
|
let params = {
|
|
|
- pageNo:this.pageNo,
|
|
|
- pageSize:this.pageSize
|
|
|
+ shelfSn: shelf.shelfSn
|
|
|
}
|
|
|
this.status = "loading"
|
|
|
- searchEmployee(params).then(res => {
|
|
|
+ getShopUserParamList(params).then(res => {
|
|
|
if (res.code == 200 || res.status == 204 || res.status == 200) {
|
|
|
- const list = res.data.list || []
|
|
|
+ const list = res.data || []
|
|
|
list.forEach(item=>{
|
|
|
- item.show = 0
|
|
|
+ item.show = item.paramMap && item.paramMap.mall_flag && item.paramMap.mall_flag.paramValue
|
|
|
})
|
|
|
if(_this.pageNo>1){
|
|
|
_this.list = _this.list.concat(list)
|
|
|
}else{
|
|
|
_this.list = list
|
|
|
}
|
|
|
- _this.total = res.data.count || 0
|
|
|
+ _this.total = list.length || 0
|
|
|
} else {
|
|
|
_this.list = []
|
|
|
_this.total = 0
|
|
@@ -105,6 +101,22 @@
|
|
|
},
|
|
|
changeShow(e,item){
|
|
|
console.log(e,item)
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ const userId = item.userId
|
|
|
+ const shelf = this.$store.state.vuex_storeShelf
|
|
|
+ updateShopUserParam({'userId':userId,'paramValue':e,shelfSn: shelf.shelfSn}).then(res=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ if(res.status == 200){
|
|
|
+ item.show = e
|
|
|
+ uni.$emit("refashHome")
|
|
|
+ }else{
|
|
|
+ item.show = !e ? 1 : 0
|
|
|
+ }
|
|
|
+ this.list.splice()
|
|
|
+ uni.showToast(res.message)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|