indexThree.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <view class="center">
  3. <view v-for="(item , index) in drivers" :Key="index" class="forList">
  4. <view class='flex' @click="navToDetailPage(item)">
  5. <view class="logo">
  6. 粮商
  7. </view>
  8. <view class = "company" >{{item.driverName}}</view>
  9. <view class = "geren" >{{item.driverPhone}}</view>
  10. <!-- <view class = "company" v-if="item.customerTypeFlag == 1">{{item.customerName}}</view>
  11. <view class = "geren" v-if="item.customerTypeFlag == 1"> {{item.customerPhone}}</view>
  12. <view class = "geren" v-if="item.customerTypeFlag == 2">{{item.customerName}} {{item.customerPhone}}</view> -->
  13. <view class="status" v-if="item.authenticationStatus == '已认证'" >
  14. <image src="../../static/img/authentication/cert-personal@3x.png" style="width: 16px;height: 16px;top:3px;"></image>
  15. {{item.authenticationStatus}}
  16. </view>
  17. <view class="status1" v-if="item.authenticationStatus == '审核中'" >
  18. {{item.authenticationStatus}}
  19. </view>
  20. <view class="status2" v-if="item.authenticationStatus == '未通过'" >
  21. {{item.authenticationStatus}}
  22. </view>
  23. <view class="status3" v-if="item.authenticationStatus == '已覆盖'" >
  24. {{item.authenticationStatus}}
  25. </view>
  26. </view>
  27. <hr style="margin: 10px 0;">
  28. <view class="cu-tag yuan">
  29. <image src="../../static/img/authentication/selected(2).png" style="width: 16px;height: 16px;">设置默认</image>
  30. </view>
  31. <view class='cu-tag but'>更换手机号</view>
  32. <view class='cu-tag but' @click="companyEdit(item)">修改</view>
  33. <view class='cu-tag but' @click="deleteSJ(item)">删除</view>
  34. </view>
  35. <button class="btn btns" @click="Add">新增</button>
  36. </view>
  37. </template>
  38. <script>
  39. import {
  40. mapState
  41. } from 'vuex';
  42. export default {
  43. name: "buy",
  44. data() {
  45. return {
  46. businessman: {},
  47. identityAuthenticationInfo: {},
  48. drivers:{},
  49. }
  50. },
  51. computed: {
  52. ...mapState(['hasLogin', 'userInfo'])
  53. },
  54. onLoad() {
  55. this.getList()
  56. },
  57. methods: {
  58. Add(){
  59. uni.navigateTo({
  60. url: `/pageD/identity/driverIdentity`
  61. })
  62. },
  63. getList() {
  64. this.identityAuthenticationInfo.commonId = this.userInfo.id
  65. this.$api.doRequest('get', '/driverViewInfo/selectDriverInfoPage', {
  66. pageSize: 10,
  67. currentPage: 1,
  68. commonId: this.userInfo.id,
  69. flag: 0
  70. }, 'application/json;charset=UTF-8').then(res => {
  71. console.log("成功连接")
  72. this.drivers = res.data.data.records
  73. console.log(this.drivers, "skalkdkk")
  74. })
  75. .catch(res => {
  76. uni.showToast({
  77. title: res.errmsg,
  78. icon: 'none',
  79. duration: 2000
  80. })
  81. });
  82. },
  83. navToDetailPage(item){
  84. uni.navigateTo({
  85. url: `/pageD/identity/driverIdentityLook?id=${item.id}`
  86. })
  87. },
  88. deleteSJ(item) {
  89. this.deletes = {}
  90. this.deletes.id = item.id
  91. uni.showModal({
  92. // title: '登录提示',
  93. content: '身份信息删除后不可恢复,是否确定删除?',
  94. showCancel: true,
  95. confirmText: '确定',
  96. success: (e) => {
  97. this.$api.doRequest('post', '/driverViewInfo/api/deleteDriver', this.deletes,
  98. 'application/json;charset=UTF-8').then(res => {
  99. this.procurementPlanInfos = res.data.data.records
  100. if (res.errmsg == "Success") {
  101. this.$api.msg('删除成功!')
  102. this.getList()
  103. return
  104. }
  105. })
  106. .catch(res => {
  107. uni.showToast({
  108. title: res.errmsg,
  109. icon: 'none',
  110. duration: 2000
  111. })
  112. });
  113. },
  114. fail: () => {},
  115. complete: () => {}
  116. })
  117. },
  118. companyEdit(item) {
  119. uni.navigateTo({
  120. url: `/pageD/identity/driverIdentityEdit?id=${item.id}`
  121. })
  122. },
  123. }
  124. }
  125. </script>
  126. <style>
  127. .center {
  128. padding: 10px 20px;
  129. background-color: #F5F6FA;
  130. }
  131. .title {
  132. font-size: 22px;
  133. font-weight: 900;
  134. /* margin-top: 30px; */
  135. top: 50px;
  136. left: 24px;
  137. position: relative;
  138. }
  139. .company {
  140. font-size: 16px;
  141. font-weight: 600;
  142. margin-top: 10px;
  143. display: inline-block;
  144. margin-left: 10px;
  145. }
  146. .geren{
  147. color: #AFB3BF;
  148. font-size: 14px;
  149. margin-top: 34px;
  150. margin-left: -10px;
  151. }
  152. .infos {
  153. width: 100%;
  154. display: inline-table;
  155. }
  156. .info {
  157. line-height: 20px;
  158. }
  159. .but {
  160. border: 1px solid #CDCDCD;
  161. border-radius: 10px;
  162. }
  163. .homePage {
  164. width: 101%;
  165. height: 200px;
  166. margin: 20px auto;
  167. }
  168. .logo {
  169. width: 35px;
  170. height: 35px;
  171. background-color: #E9F8F0;
  172. color: #22C572;
  173. text-align: center;
  174. line-height: 35px;
  175. padding: 0 3px;
  176. border-radius: 6px;
  177. display: inline-block;
  178. margin-top: 10px;
  179. }
  180. .forList {
  181. background: #FFFFFF;
  182. margin-top: 10px;
  183. padding: 10px 10px;
  184. border-radius: 16px;
  185. }
  186. .status{
  187. position: absolute;
  188. margin-top: 10px;
  189. right: 36px;
  190. color:#22C572;
  191. }
  192. .status1{
  193. position: absolute;
  194. margin-top: 10px;
  195. right: 36px;
  196. color:#FE6430;
  197. }
  198. .status2{
  199. position: absolute;
  200. margin-top: 10px;
  201. right: 36px;
  202. color: #FB1E1E;
  203. }
  204. .status3{
  205. position: absolute;
  206. margin-top: 10px;
  207. right: 36px;
  208. color: #AFB3BF;
  209. }
  210. .btn {
  211. margin-top: 10px;
  212. background-color: #FFFFFF;
  213. border-radius: 25px;
  214. border: none;
  215. }
  216. .btns {
  217. background-color: #22C572;
  218. }
  219. </style>