authentication3.vue 6.7 KB

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