authentication3.vue 7.3 KB

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