|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
<view class="one">
|
|
|
- <input type="text" v-model="searchInfo.goods" @input="toInput" placeholder="搜索商品">
|
|
|
+ <input type="text" v-model="searchInfo.name" @input="toInput" placeholder="搜索用户姓名">
|
|
|
</view>
|
|
|
<view class="two">
|
|
|
<tabs :tabs="tabs" @tabsChange="tabsChange">
|
|
@@ -21,6 +21,22 @@
|
|
|
<text>联系电话:</text>
|
|
|
<text>{{item.tel||'暂无'}}</text>
|
|
|
</view>
|
|
|
+ <view class="other">
|
|
|
+ <text>性别:</text>
|
|
|
+ <text>{{item.zhGender||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="other">
|
|
|
+ <text>角色:</text>
|
|
|
+ <text>{{item.zhRole||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="other">
|
|
|
+ <text>所属街道:</text>
|
|
|
+ <text>{{item.zhStreet||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="other">
|
|
|
+ <text>所属社区:</text>
|
|
|
+ <text>{{item.zhCommunity||'暂无'}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="bottom" v-if="item.status=='0'">
|
|
|
<button size="mini" type="default" @tap.stop="toExam(item,'0')">审核通过</button>
|
|
@@ -65,6 +81,9 @@
|
|
|
scrollTop: 0,
|
|
|
// 字典表
|
|
|
statusList: [],
|
|
|
+ genderList: [],
|
|
|
+ roleList: [],
|
|
|
+ benlongList: []
|
|
|
}
|
|
|
},
|
|
|
onLoad: function(e) {
|
|
@@ -132,7 +151,11 @@
|
|
|
if (res.errcode == '0') {
|
|
|
let list = [...that.list, ...res.data];
|
|
|
for (let val of list) {
|
|
|
- val.zhStatus = that.searchStatus(val.status)
|
|
|
+ val.zhStatus = that.searchDict(val.status, 'status')
|
|
|
+ val.zhGender = that.searchDict(val.gender, 'gender')
|
|
|
+ val.zhRole = that.searchDict(val.role, 'role')
|
|
|
+ val.zhStreet = that.searchDict(val.street, 'street')
|
|
|
+ val.zhCommunity = that.searchDict(val.community, 'community')
|
|
|
}
|
|
|
that.$set(that, `list`, list);
|
|
|
that.$set(that, `total`, res.total)
|
|
@@ -143,12 +166,31 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- // 查询状态
|
|
|
- searchStatus(e) {
|
|
|
+ // 转换字典表
|
|
|
+ searchDict(e, model) {
|
|
|
const that = this;
|
|
|
- let data = that.statusList.find((i) => i.value == e);
|
|
|
- if (data) return data.label
|
|
|
- else return '暂无'
|
|
|
+ let data;
|
|
|
+ if (model == 'status') {
|
|
|
+ data = that.statusList.find((i) => i.value == e);
|
|
|
+ if (data) return data.label
|
|
|
+ else return '暂无'
|
|
|
+ } else if (model == 'gender') {
|
|
|
+ data = that.genderList.find((i) => i.value == e);
|
|
|
+ if (data) return data.label
|
|
|
+ else return '暂无'
|
|
|
+ } else if (model == 'role') {
|
|
|
+ data = that.roleList.find((i) => i.code == e);
|
|
|
+ if (data) return data.name
|
|
|
+ else return '暂无'
|
|
|
+ } else if (model == 'street') {
|
|
|
+ data = that.benlongList.find((i) => i._id == e);
|
|
|
+ if (data) return data.name
|
|
|
+ else return '暂无'
|
|
|
+ } else if (model == 'community') {
|
|
|
+ data = that.benlongList.find((i) => i._id == e);
|
|
|
+ if (data) return data.name
|
|
|
+ else return '暂无'
|
|
|
+ }
|
|
|
},
|
|
|
// 确认发货
|
|
|
async toExam(item, type) {
|
|
@@ -213,7 +255,7 @@
|
|
|
// 输入框
|
|
|
toInput(e) {
|
|
|
const that = this;
|
|
|
- if (that.searchInfo.goods) that.$set(that.searchInfo, `goods`, e.detail.value)
|
|
|
+ if (that.searchInfo.name) that.$set(that.searchInfo, `name`, e.detail.value)
|
|
|
else that.$set(that, `searchInfo`, {})
|
|
|
that.clearPage();
|
|
|
that.search();
|
|
@@ -224,7 +266,8 @@
|
|
|
let res;
|
|
|
// 查询状态
|
|
|
res = await that.$api(`/DictData`, 'GET', {
|
|
|
- type: 'status'
|
|
|
+ type: 'status',
|
|
|
+ is_use: '0'
|
|
|
})
|
|
|
if (res.errcode == '0') {
|
|
|
that.$set(that, `statusList`, res.data);
|
|
@@ -236,6 +279,22 @@
|
|
|
})
|
|
|
that.$set(that.tabs, `menu`, menu)
|
|
|
}
|
|
|
+ // 性别
|
|
|
+ res = await that.$api(`/DictData`, 'GET', {
|
|
|
+ type: 'gender',
|
|
|
+ is_use: '0'
|
|
|
+ })
|
|
|
+ if (res.errcode == '0') that.$set(that, `genderList`, res.data);
|
|
|
+ // 角色
|
|
|
+ res = await that.$api(`/Role`, 'GET', {
|
|
|
+ is_use: '0'
|
|
|
+ })
|
|
|
+ if (res.errcode == '0') that.$set(that, `roleList`, res.data);
|
|
|
+ // 街道/社区
|
|
|
+ res = await that.$api(`/Office`, 'GET', {
|
|
|
+ is_use: '0'
|
|
|
+ })
|
|
|
+ if (res.errcode == '0') that.$set(that, `benlongList`, res.data);
|
|
|
},
|
|
|
// 选择选项卡
|
|
|
tabsChange(e) {
|
|
@@ -296,9 +355,10 @@
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
padding: 2vw 0;
|
|
|
- font-size: var(--font14Size);
|
|
|
+ font-size: var(--font16Size);
|
|
|
|
|
|
.status {
|
|
|
+ font-size: var(--font14Size);
|
|
|
color: var(--fF0Color);
|
|
|
}
|
|
|
}
|