authentication.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. <template>
  2. <view class="page">
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <service-widget @btnClick="btn_click"></service-widget>
  6. <view class="headers ">
  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. <image src="../../../static/image/addStaff/search.png" mode="" style="width: 22px;height: 22px;"
  11. @click="search">
  12. </image>
  13. </view>
  14. <view class="search dis f-c mt-3" v-if="this.userInfo.sysUser.managementSource == '2'">
  15. <u-tabs :list="userAuthType" :is-scroll="false" :current="current" @change="change"
  16. inactive-color="#666666" active-color="#333" style="width: 100%;"></u-tabs>
  17. <view class="dis j-s a-c numberOfPeople">
  18. <text>{{allCount}}</text>
  19. <text>{{noCount}}</text>
  20. <text>{{yesCount}}</text>
  21. </view>
  22. </view>
  23. </view>
  24. <view
  25. :style="{padding:this.userInfo.sysUser.managementSource == '2'?'188px 16px 50px 16px':'108px 16px 50px 16px'}">
  26. <view class="Paging dis f-c " v-for="(item,index) in authlist" :key="index">
  27. <view class="pa-title dis a-c"
  28. :style="{background:item.status==1?'linear-gradient( 90deg, #F5F7FF 0%, #E4EBFF 100%)':'linear-gradient( 90deg, #FDF9F4 0%, #FFF1E0 100%)',borderBottom:item.status==1?'1px solid #E7EFFF':'1px solid #FFF1E7'}">
  29. <view class="colorBlock dis a-c j-c " :style="{background:item.status==1?'#3D7BFE':'#FF984E'}">
  30. <text>{{item.status==1?'认证通过':'申请加入'}}</text>
  31. </view>
  32. <text :style="{color:item.status==1?'#3D7BFE':'#E37D34'}">{{item.updateTime}}</text>
  33. </view>
  34. <view class="pa-cent dis f-c " @click.stop="detail(item)">
  35. <view class="title dis a-c j-s">
  36. <view class="dis a-c">
  37. <text>{{item.name}}</text>
  38. <image v-if="item.levelName=='一级代理'" src="../../../static/image/team/proxy1.png" mode="">
  39. </image>
  40. <image v-if="item.levelName=='二级代理'" src="../../../static/image/team/proxy2.png" mode="">
  41. </image>
  42. <image v-if="item.levelName=='三级代理'" src="../../../static/image/team/proxy3.png" mode="">
  43. </image>
  44. <image v-if="item.levelName=='临时代理'" src="../../../static/image/team/proxy4.png" mode="">
  45. </image>
  46. </view>
  47. <u-icon name="arrow-right" color="#C7C6CA" size="26"></u-icon>
  48. </view>
  49. <text>工号:{{item.id}}</text>
  50. <view class="dis j-s a-c">
  51. <text>手机号:{{item.mobile}}</text>
  52. <view class="callPhone dis a-c j-c" @click.stop="callPhone(item.mobile)">
  53. <text>联系TA</text>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. <u-loadmore v-if="authlist.length!=0" :status="status" />
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. import {
  64. mapState
  65. } from "vuex"
  66. export default {
  67. data() {
  68. return {
  69. userAuthType: [{
  70. name: '全部'
  71. }, {
  72. name: '未认证'
  73. }, {
  74. name: '认证通过'
  75. }, ],
  76. current: 0,
  77. shape: 'square',
  78. clearabled: true,
  79. showAction: false,
  80. inputAlign: 'left',
  81. pageRequest: { //查询的默认条件
  82. pageNum: 1,
  83. pageSize: 20,
  84. authenticationStatus: null,
  85. criteria: "",
  86. },
  87. authlist: [],
  88. status: 'loadmore',
  89. totalPages: 0, //订单总页数
  90. allCount: "",
  91. noCount: "",
  92. yesCount: "",
  93. }
  94. },
  95. onReachBottom() {
  96. if (this.pageRequest.pageNum >= this.totalPages) return;
  97. this.status = 'loading';
  98. this.pageRequest.pageNum = ++this.pageRequest.pageNum;
  99. setTimeout(async () => {
  100. let res = await this.$http.post('/app/customer/authenticationQuery', this.pageRequest);
  101. if (res.code == '200') {
  102. this.authlist = [...this.authlist, ...res.data.content];
  103. }
  104. if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
  105. else this.status = 'loading';
  106. }, 1000)
  107. },
  108. onLoad() {
  109. if (this.userInfo.sysUser.managementSource == '1') {
  110. this.userAuthType = [{
  111. name: '全部'
  112. }];
  113. }
  114. this.getServerData();
  115. this.querylist();
  116. },
  117. computed: {
  118. ...mapState(['userInfo', 'sources']),
  119. },
  120. methods: {
  121. change(index) {
  122. this.current = index;
  123. switch (index) {
  124. case 0:
  125. this.pageRequest.authenticationStatus = null;
  126. this.querylist();
  127. break;
  128. case 1:
  129. this.pageRequest.authenticationStatus = "2";
  130. this.querylist();
  131. break;
  132. case 2:
  133. this.pageRequest.authenticationStatus = "1";
  134. this.querylist();
  135. break;
  136. }
  137. },
  138. async getServerData() {
  139. let res = await this.$http.get(
  140. `/app/customer/authStatics?dateType=0`);
  141. if (res.code == '200') {
  142. this.allCount = res.data.allCount;
  143. this.noCount = res.data.noCount;
  144. this.yesCount = res.data.yesCount;
  145. }
  146. },
  147. btn_click() {
  148. uni.navigateTo({
  149. url: '/pages/chat/chat'
  150. })
  151. },
  152. async querylist() {
  153. let res = await this.$http.post('/app/customer/authenticationQuery', this.pageRequest);
  154. if (res.code == '200') {
  155. this.authlist = res.data.content;
  156. this.totalPages = res.data.totalPages;
  157. }
  158. },
  159. detail(item) {
  160. this.navigate({
  161. url: '/pages/tools/addStaff/authenticationdetails?id=' + item.id + "&status=" + item.status
  162. }, "navigateTo", true);
  163. },
  164. async stausSearch() {
  165. this.querylist();
  166. this.statusShow = false;
  167. },
  168. //状态筛选
  169. statusclick(e) {
  170. this.pageRequest.authenticationStatus = e.value;
  171. },
  172. callPhone(tel) {
  173. uni.makePhoneCall({
  174. phoneNumber: tel,
  175. success: () => {
  176. console.log("成功拨打电话")
  177. }
  178. })
  179. },
  180. //页面返回按钮
  181. back() {
  182. uni.navigateBack({
  183. delta: 1, // 返回的页面数,如果是1表示返回上一页
  184. success: function() {}
  185. });
  186. },
  187. change1(index) {
  188. this.current1 = index;
  189. },
  190. //回车搜索事件
  191. search() {
  192. this.navigate({
  193. url: '/pages/tools/addStaff/authenticationSearch'
  194. }, "navigateTo", true);
  195. },
  196. //搜索按钮事件
  197. clear(val) {
  198. this.pageRequest.criteria = "";
  199. this.querylist();
  200. },
  201. }
  202. }
  203. </script>
  204. <style lang="scss" scoped>
  205. ::deep {
  206. .u-tab-bar {
  207. background: linear-gradient(90deg, #0052FF 0%, rgba(0, 82, 255, 0) 100%) !important;
  208. border-radius: 4px 4px 4px 4px;
  209. }
  210. }
  211. .page {
  212. background-color: #F8FAFE;
  213. }
  214. .active {
  215. position: relative;
  216. background: rgba(0, 82, 255, 0.1);
  217. color: #0052FF;
  218. border: 1px solid #0052FF;
  219. font-weight: 700;
  220. }
  221. .term {
  222. height: 100%;
  223. .title {
  224. font-size: 14px;
  225. font-weight: bold;
  226. color: #232832;
  227. padding: 10px 0;
  228. border-bottom: 1px solid #f2f2f2;
  229. }
  230. >text {
  231. font-size: 13px;
  232. font-weight: bold;
  233. color: #232832;
  234. margin-bottom: 10px;
  235. }
  236. .status-data {
  237. padding: 4px 10px;
  238. box-sizing: border-box;
  239. margin-right: 10px;
  240. font-size: 12px;
  241. border: 1px solid #eee;
  242. cursor: pointer;
  243. }
  244. .operateBtn {
  245. font-weight: bold;
  246. font-size: 16px;
  247. .cancel {
  248. width: 50%;
  249. height: 46px;
  250. color: #0052FF;
  251. background-color: #EAEAEA;
  252. }
  253. .confirm {
  254. width: 50%;
  255. height: 46px;
  256. color: #fff;
  257. background-color: #0052FF;
  258. }
  259. }
  260. }
  261. .search {
  262. width: 100%;
  263. .numberOfPeople {
  264. text {
  265. width: 33.33%;
  266. text-align: center;
  267. font-weight: 500;
  268. font-size: 14px;
  269. color: #333;
  270. }
  271. }
  272. }
  273. .headers {
  274. position: fixed;
  275. top: 0;
  276. left: 0;
  277. height: auto;
  278. width: 100%;
  279. z-index: 999999;
  280. padding: 50px 16px 10px;
  281. height: auto;
  282. background: #fff;
  283. text {
  284. font-size: 18px;
  285. font-weight: bold;
  286. color: #000;
  287. }
  288. }
  289. .Paging {
  290. background: #FFFFFF;
  291. border-radius: 4px;
  292. border-bottom: 1px solid #E7EFFF;
  293. margin-bottom: 10px;
  294. .pa-title {
  295. background: linear-gradient(90deg, #FDF9F4 0%, #FFF1E0 100%);
  296. border-radius: 4px 4px 0px 0px;
  297. border-bottom: 1px solid #FFF1E7;
  298. .colorBlock {
  299. background: #FF984E;
  300. border-radius: 4px 0px 4px 0px;
  301. color: #fff;
  302. font-size: 12px;
  303. margin-right: 6px;
  304. padding: 3px 8px;
  305. }
  306. >text {
  307. font-size: 12px;
  308. color: #E37D34;
  309. }
  310. }
  311. .pa-cent {
  312. padding: 10px;
  313. .title {
  314. text {
  315. font-size: 17px;
  316. color: #333;
  317. font-weight: bold;
  318. }
  319. image {
  320. width: 133rpx;
  321. height: 46rpx;
  322. margin-left: 8px;
  323. }
  324. }
  325. >text {
  326. font-size: 14px;
  327. color: #666;
  328. }
  329. .callPhone {
  330. background: linear-gradient(90deg, #3793FF 0%, #0075FF 100%);
  331. box-shadow: 0px 2px 2px 0px rgba(0, 178, 255, 0.15);
  332. border-radius: 4px;
  333. padding: 2px 6px;
  334. color: #fff;
  335. font-size: 12px;
  336. }
  337. }
  338. }
  339. </style>