authentication2.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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/car-insure/dropdown.png" mode="" @tap="searchPopup"></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 src="../../../static/image/addStaff/active1.png" mode=""></image>
  25. <text>已认证</text>
  26. </view>
  27. <u-button size="mini" type="primary" :custom-style="{fontSize:'14px'}" :plain="true"
  28. @click="detail(item.id)">查看详情</u-button>
  29. </view>
  30. <view class="pa-cent dis f-c mt-2">
  31. <text style="color: #333;">姓名:{{item.name}}</text>
  32. <text>工号:{{item.id}}</text>
  33. <view class="dis j-s a-c">
  34. <text>手机号:{{item.mobile}}</text>
  35. <image src="../../../static/image/addStaff/phone.png" mode="" @click="callPhone(item.mobile)">
  36. </image>
  37. </view>
  38. </view>
  39. </view>
  40. <u-loadmore v-if="list.length!=0" :status="status" />
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import {
  46. mapState
  47. } from "vuex"
  48. export default {
  49. data() {
  50. return {
  51. headerStyle: {
  52. backgroundColor: '',
  53. backgroundImage: '',
  54. backgroundSize: '',
  55. backgroundPosition: '',
  56. boxShadow: ''
  57. // 其他样式属性...
  58. },
  59. shape: 'square',
  60. clearabled: true,
  61. showAction: false,
  62. inputAlign: 'left',
  63. pageRequest: { //查询的默认条件
  64. pageNum: 1,
  65. pageSize: 20,
  66. authenticationStatus: '1',
  67. criteria: "",
  68. },
  69. list: [],
  70. status: 'loadmore',
  71. totalPages: 0, //订单总页数
  72. }
  73. },
  74. onReachBottom() {
  75. if (this.pageRequest.pageNum >= this.totalPages) return;
  76. this.status = 'loading';
  77. this.pageRequest.pageNum = ++this.pageRequest.pageNum;
  78. setTimeout(async () => {
  79. let res = await this.$http.post('/app/customer/authenticationQuery', this.pageRequest);
  80. if (res.code == '200') {
  81. this.list = [...this.list, ...res.data.content];
  82. }
  83. if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
  84. else this.status = 'loading';
  85. }, 1000)
  86. },
  87. onLoad() {
  88. this.querylist();
  89. },
  90. computed: {
  91. ...mapState(['userInfo', 'sources']),
  92. },
  93. methods: {
  94. async querylist() {
  95. let res = await this.$http.post('/app/customer/authenticationQuery', this.pageRequest);
  96. if (res.code == '200') {
  97. this.list = res.data.content;
  98. this.totalPages = res.data.totalPages;
  99. }
  100. },
  101. detail(id) {
  102. this.navigate({
  103. url: '/pages/tools/addStaff/authenticationdetails?id=' + id
  104. }, "navigateTo", true);
  105. },
  106. callPhone(tel) {
  107. uni.makePhoneCall({
  108. phoneNumber: tel,
  109. success: () => {
  110. console.log("成功拨打电话")
  111. }
  112. })
  113. },
  114. //页面返回按钮
  115. back() {
  116. uni.navigateBack({
  117. delta: 1, // 返回的页面数,如果是1表示返回上一页
  118. success: function() {}
  119. });
  120. },
  121. change(index) {
  122. this.current = index;
  123. },
  124. change1(index) {
  125. this.current1 = index;
  126. },
  127. getStaffList(staffType) {
  128. // 0未认证 1已认证 2全部
  129. this.navigate({
  130. url: '/pages/tool-staff-list/tool-staff-list?staffType=' + staffType
  131. }, "navigateTo", true);
  132. },
  133. //回车搜索事件
  134. search(val) {
  135. this.querylist();
  136. },
  137. //搜索按钮事件
  138. custom(val) {
  139. this.querylist();
  140. },
  141. }
  142. }
  143. </script>
  144. <style lang="scss" scoped>
  145. page {
  146. background-color: #F8FAFE;
  147. }
  148. .search {
  149. image {
  150. width: 22px;
  151. height: 22px;
  152. margin-left: 20px;
  153. }
  154. }
  155. .headers {
  156. position: fixed;
  157. top: 0;
  158. left: 0;
  159. height: auto;
  160. width: 100%;
  161. z-index: 999999;
  162. padding: 16px;
  163. padding-top: 50px;
  164. height: auto;
  165. background: #F8FAFE;
  166. background-image: url("/static/image/addStaff/bfg.png");
  167. background-size: 100% 100%;
  168. text {
  169. font-size: 18px;
  170. font-weight: bold;
  171. color: #000;
  172. }
  173. }
  174. .Paging {
  175. width: 100%;
  176. height: auto;
  177. background: #FFFFFF;
  178. box-shadow: 0px 4px 10px 0px #DAE3F4;
  179. border-radius: 6px;
  180. padding: 10px;
  181. box-sizing: border-box;
  182. margin-bottom: 10px;
  183. .pa-title {
  184. padding-bottom: 6px;
  185. border-bottom: 1px solid #f2f2f2;
  186. text {
  187. font-size: 14px;
  188. color: #31BE0E;
  189. font-weight: 700;
  190. margin-left: 6px;
  191. }
  192. image {
  193. width: 18px;
  194. height: 18px;
  195. }
  196. }
  197. .pa-cent {
  198. text {
  199. font-size: 13px;
  200. color: rgba(51, 51, 51, 0.8);
  201. font-weight: 400;
  202. }
  203. image {
  204. width: 20px;
  205. height: 20px;
  206. }
  207. }
  208. }
  209. </style>