authentication3.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. <template>
  2. <view>
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <service-widget @btnClick="btn_click"></service-widget>
  6. <view class="headers " :style="headerStyle">
  7. <view class="dis a-c j-start ">
  8. <u-icon name="arrow-left" size="40" @tap="back"></u-icon>
  9. <text style="margin: auto;">认证管理</text>
  10. </view>
  11. <view class="search dis j-s a-c mt-5">
  12. <u-search v-model="pageRequest.criteria"
  13. style="box-shadow: 0px 4px 10px 0px #DAE3F4;border-radius: 6px;" @search="search" :shape="shape"
  14. :height='68' bg-color="#fff" color="#000" :input-style="{background:'transparent'}"
  15. placeholder-color="rgba(51,51,51,0.6)" :clearabled="clearabled" :show-action="showAction"
  16. :input-align="inputAlign" @clear="clear" :action-style="{background:'#fff'}"
  17. placeholder="请输入工号、姓名、手机号查询"></u-search>
  18. <image src="/static/image/addStaff/screen.png" mode="" @tap="statusShow=true"></image>
  19. </view>
  20. </view>
  21. <view style="padding: 160px 16px 50px 16px;">
  22. <view class="Paging dis f-c " v-for="(item,index) in list" :key="index">
  23. <view class="pa-title dis a-c j-s">
  24. <view class="dis a-c ">
  25. <image
  26. :src="item.status==1?'../../../static/image/addStaff/active1.png':'../../../static/image/addStaff/active.png'"
  27. mode=""></image>
  28. <text>{{item.status==1?"已认证":"未认证"}}</text>
  29. </view>
  30. <u-button size="mini" type="primary" :custom-style="{fontSize:'14px'}" :plain="true"
  31. @click="detail(item)">查看详情</u-button>
  32. </view>
  33. <view class="pa-cent dis f-c mt-2">
  34. <text style="color: #333;">姓名:{{item.name}}</text>
  35. <text>工号:{{item.id}}</text>
  36. <view class="dis j-s a-c">
  37. <text>手机号:{{item.mobile}}</text>
  38. <image src="../../../static/image/addStaff/phone.png" mode="" @click="callPhone(item.mobile)">
  39. </image>
  40. </view>
  41. </view>
  42. </view>
  43. <u-loadmore v-if="list.length!=0" :status="status" />
  44. </view>
  45. <u-popup v-model="statusShow" mode="bottom" height="400">
  46. <view class="term dis f-c j-s">
  47. <view style="padding: 0 16px;">
  48. <view class="title dis j-c a-c">
  49. <text>状态筛选</text>
  50. </view>
  51. <text>人员状态</text>
  52. <view class="dis a-c " style="margin-top: 10px;">
  53. <view class="status-data" :class="item.value==pageRequest.authenticationStatus? 'active':''"
  54. v-for="(item,index) in statusList" @tap.stop.prevent="statusclick(item)" :key="index">
  55. {{item.label}}
  56. </view>
  57. </view>
  58. </view>
  59. <view class="operateBtn dis ">
  60. <view class="cancel dis a-c j-c" @click="statusShow=false">
  61. 取消
  62. </view>
  63. <view class="confirm dis a-c j-c" @click="stausSearch">
  64. 确定
  65. </view>
  66. </view>
  67. </view>
  68. </u-popup>
  69. </view>
  70. </template>
  71. <script>
  72. import {
  73. mapState
  74. } from "vuex"
  75. export default {
  76. data() {
  77. return {
  78. statusList: [{
  79. label: '未认证',
  80. value: 2,
  81. },
  82. {
  83. label: '已认证',
  84. value: 1,
  85. },
  86. {
  87. label: '全部',
  88. value: null,
  89. },
  90. ],
  91. statusShow: false, //状态筛选
  92. headerStyle: {
  93. backgroundColor: '',
  94. backgroundImage: '',
  95. backgroundSize: '',
  96. backgroundPosition: '',
  97. boxShadow: ''
  98. // 其他样式属性...
  99. },
  100. shape: 'square',
  101. clearabled: true,
  102. showAction: false,
  103. inputAlign: 'left',
  104. pageRequest: { //查询的默认条件
  105. pageNum: 1,
  106. pageSize: 20,
  107. authenticationStatus: null,
  108. criteria: "",
  109. },
  110. list: [],
  111. status: 'loadmore',
  112. totalPages: 0, //订单总页数
  113. }
  114. },
  115. onReachBottom() {
  116. if (this.pageRequest.pageNum >= this.totalPages) return;
  117. this.status = 'loading';
  118. this.pageRequest.pageNum = ++this.pageRequest.pageNum;
  119. setTimeout(async () => {
  120. let res = await this.$http.post('/app/customer/authenticationQuery', this.pageRequest);
  121. if (res.code == '200') {
  122. this.list = [...this.list, ...res.data.content];
  123. }
  124. if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
  125. else this.status = 'loading';
  126. }, 1000)
  127. },
  128. onLoad() {
  129. this.querylist();
  130. },
  131. computed: {
  132. ...mapState(['userInfo', 'sources']),
  133. },
  134. methods: {
  135. btn_click() {
  136. uni.navigateTo({
  137. url: '/pages/chat/chat'
  138. })
  139. },
  140. async querylist() {
  141. let res = await this.$http.post('/app/customer/authenticationQuery', this.pageRequest);
  142. if (res.code == '200') {
  143. this.list = res.data.content;
  144. this.totalPages = res.data.totalPages;
  145. }
  146. },
  147. detail(item) {
  148. this.navigate({
  149. url: '/pages/tools/addStaff/authenticationdetails?id=' + item.id + "&status=" + item.status
  150. }, "navigateTo", true);
  151. },
  152. async stausSearch() {
  153. this.querylist();
  154. this.statusShow = false;
  155. },
  156. //状态筛选
  157. statusclick(e) {
  158. this.pageRequest.authenticationStatus = e.value;
  159. },
  160. callPhone(tel) {
  161. uni.makePhoneCall({
  162. phoneNumber: tel,
  163. success: () => {
  164. console.log("成功拨打电话")
  165. }
  166. })
  167. },
  168. //页面返回按钮
  169. back() {
  170. uni.navigateBack({
  171. delta: 1, // 返回的页面数,如果是1表示返回上一页
  172. success: function() {}
  173. });
  174. },
  175. change(index) {
  176. this.current = index;
  177. },
  178. change1(index) {
  179. this.current1 = index;
  180. },
  181. getStaffList(staffType) {
  182. // 0未认证 1已认证 2全部
  183. this.navigate({
  184. url: '/pages/tool-staff-list/tool-staff-list?staffType=' + staffType
  185. }, "navigateTo", true);
  186. },
  187. //回车搜索事件
  188. search(val) {
  189. this.querylist();
  190. },
  191. //搜索按钮事件
  192. clear(val) {
  193. this.pageRequest.criteria = "";
  194. this.querylist();
  195. },
  196. }
  197. }
  198. </script>
  199. <style lang="scss" scoped>
  200. page {
  201. background-color: #F8FAFE;
  202. }
  203. .active {
  204. position: relative;
  205. background: rgba(0, 82, 255, 0.1);
  206. color: #0052FF;
  207. border: 1px solid #0052FF;
  208. font-weight: 700;
  209. }
  210. .term {
  211. height: 100%;
  212. .title {
  213. font-size: 14px;
  214. font-weight: bold;
  215. color: #232832;
  216. padding: 10px 0;
  217. border-bottom: 1px solid #f2f2f2;
  218. }
  219. >text {
  220. font-size: 13px;
  221. font-weight: bold;
  222. color: #232832;
  223. margin-bottom: 10px;
  224. }
  225. .status-data {
  226. padding: 4px 10px;
  227. box-sizing: border-box;
  228. margin-right: 10px;
  229. font-size: 12px;
  230. border: 1px solid #eee;
  231. cursor: pointer;
  232. }
  233. .operateBtn {
  234. font-weight: bold;
  235. font-size: 16px;
  236. .cancel {
  237. width: 50%;
  238. height: 46px;
  239. color: #0052FF;
  240. background-color: #EAEAEA;
  241. }
  242. .confirm {
  243. width: 50%;
  244. height: 46px;
  245. color: #fff;
  246. background-color: #0052FF;
  247. }
  248. }
  249. }
  250. .search {
  251. image {
  252. width: 22px;
  253. height: 22px;
  254. margin-left: 20px;
  255. }
  256. }
  257. .headers {
  258. position: fixed;
  259. top: 0;
  260. left: 0;
  261. height: auto;
  262. width: 100%;
  263. z-index: 999999;
  264. padding: 16px;
  265. padding-top: 50px;
  266. height: auto;
  267. background: #F8FAFE;
  268. background-image: url("/static/image/addStaff/bfg.png");
  269. background-size: 100% 100%;
  270. text {
  271. font-size: 18px;
  272. font-weight: bold;
  273. color: #000;
  274. }
  275. }
  276. .Paging {
  277. width: 100%;
  278. height: auto;
  279. background: #FFFFFF;
  280. box-shadow: 0px 4px 10px 0px #DAE3F4;
  281. border-radius: 6px;
  282. padding: 10px;
  283. box-sizing: border-box;
  284. margin-bottom: 10px;
  285. .pa-title {
  286. padding-bottom: 6px;
  287. border-bottom: 1px solid #f2f2f2;
  288. text {
  289. font-size: 14px;
  290. color: #31BE0E;
  291. font-weight: 700;
  292. margin-left: 6px;
  293. }
  294. image {
  295. width: 18px;
  296. height: 18px;
  297. }
  298. }
  299. .pa-cent {
  300. text {
  301. font-size: 13px;
  302. color: rgba(51, 51, 51, 0.8);
  303. font-weight: 400;
  304. }
  305. image {
  306. width: 20px;
  307. height: 20px;
  308. }
  309. }
  310. }
  311. </style>