index.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <template>
  2. <view class="center">
  3. <view >
  4. <view class="title">粮商身份</view>
  5. <view class='cu-tag radius line-pink' @click="adddriver(1)">新增</view>
  6. <view v-for="(item , index) in businessman" :Key="index" >
  7. <view class="company">{{item.compName}}</view>
  8. <view class="guess-item" >
  9. <view class="infos" @click="navToDetailPage(1,item)">
  10. <view class="info">{{item.customerName}}
  11. <view class='cu-tag radius line-pink but'>{{item.authenticationStatus}}</view>
  12. </view>
  13. <view class="info">{{item.customerPhone}}</view>
  14. </view>
  15. <label>
  16. <checkbox :value="1" /><text>设置默认</text>
  17. </label>
  18. <view class='cu-tag radius line-pink ' @click="deleteLS(item)">删除</view>
  19. <view class='cu-tag radius line-pink ' @click="companyEdit(item)" >修改</view>
  20. <view class='cu-tag radius line-pink but'>更换手机号</view>
  21. </view>
  22. <hr>
  23. </view>
  24. </view>
  25. <view class="margin-top" >
  26. <view class="title">司机身份</view>
  27. <view class='cu-tag radius line-pink' @click="adddriver(2)">新增</view>
  28. <view v-for="(items , index) in drivers" :Key="index">
  29. <view class="guess-item" @click="navToDetailPage(2,items)">
  30. <view class="infos">
  31. <view class="info">{{items.driverName}}
  32. <view class='cu-tag radius line-pink but'>{{items.authenticationStatus}}</view>
  33. </view>
  34. <view class="info">{{items.driverPhone}}</view>
  35. </view>
  36. </view>
  37. <view class='cu-tag radius line-pink ' @click="deleteSJ(items)">删除</view>
  38. <view class='cu-tag radius line-pink ' @click="driverIdentityEdit(items)">修改</view>
  39. <view class='cu-tag radius line-pink but'>更换手机号</view>
  40. <hr>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import {
  49. mapState
  50. } from 'vuex';
  51. export default {
  52. name: "buy",
  53. data() {
  54. return {
  55. PageCur: "buy",
  56. buyInfo: [],
  57. pages: 1, //页数
  58. limit: 10, //每次取条目数
  59. loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
  60. isLoadMore: false, //是否加载中
  61. showTran: true,
  62. scrollTop: 0,
  63. TabCur: 0,
  64. current: 1,
  65. identityAuthenticationInfo:{
  66. pageSize:10,
  67. currentPage:1,
  68. commonId:"",
  69. },
  70. businessman:[],
  71. drivers:[],
  72. deletes:{
  73. id:"",
  74. },
  75. };
  76. },
  77. onLoad(){
  78. this.getList()
  79. },
  80. computed: {
  81. ...mapState(['hasLogin','userInfo'])
  82. },
  83. methods: {
  84. driverIdentityEdit(items){
  85. uni.navigateTo({
  86. url: `/pageD/identity/driverIdentityEdit?id=${items.id}`
  87. })
  88. },
  89. companyEdit(item){
  90. uni.navigateTo({
  91. url: `/pageD/identity/companyIdentityEdit?id=${item.id}`
  92. })
  93. },
  94. deleteLS(item){
  95. uni.showModal({
  96. // title: '登录提示',
  97. content: '身份信息删除后不可恢复,是否确定删除?',
  98. showCancel: true,
  99. confirmText: '确定',
  100. success: (e) => {
  101. this.$api.doRequest('post','/identityAuthenticationInfo/api/deleteIdentityAuthenticationInfo',{id:item.id},'application/json;charset=UTF-8').then(res => {
  102. this.procurementPlanInfos = res.data.data.records
  103. if (res.errmsg == "Success") {
  104. this.$api.msg('删除成功!')
  105. this.getList()
  106. return
  107. }
  108. })
  109. .catch(res => {
  110. uni.showToast({
  111. title: res.errmsg,
  112. icon:'none',
  113. duration: 2000
  114. })
  115. });
  116. },
  117. fail: () => {},
  118. complete: () => {}
  119. })
  120. },
  121. deleteSJ(item){
  122. console.log(item.driverName)
  123. this.deletes = {}
  124. this.deletes.id = item.id
  125. uni.showModal({
  126. // title: '登录提示',
  127. content: '身份信息删除后不可恢复,是否确定删除?',
  128. showCancel: true,
  129. confirmText: '确定',
  130. success: (e) => {
  131. this.$api.doRequest('get','/driverViewInfo/api/deleteDriver',this.deletes,'application/json;charset=UTF-8').then(res => {
  132. this.procurementPlanInfos = res.data.data.records
  133. if (res.errmsg == "Success") {
  134. this.$api.msg('删除成功!')
  135. this.getList()
  136. return
  137. }
  138. })
  139. .catch(res => {
  140. uni.showToast({
  141. title: res.errmsg,
  142. icon:'none',
  143. duration: 2000
  144. })
  145. });
  146. },
  147. fail: () => {},
  148. complete: () => {}
  149. })
  150. },
  151. getList(){
  152. this.identityAuthenticationInfo.commonId = this.userInfo.id
  153. this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {pageSize:10,
  154. currentPage:1,
  155. commonId:this.userInfo.id},'application/json;charset=UTF-8').then(res => {
  156. console.log("成功连接")
  157. this.businessman = res.data.data.records
  158. })
  159. .catch(res => {
  160. uni.showToast({
  161. title: res.errmsg,
  162. icon: 'none',
  163. duration: 2000
  164. })
  165. });
  166. this.$api.doRequest('get', '/driverViewInfo/selectDriverInfoPage', {pageSize:10,
  167. currentPage:1,
  168. commonId:this.userInfo.id,flag:0},'application/json;charset=UTF-8').then(res => {
  169. console.log("成功连接")
  170. this.drivers = res.data.data.records
  171. console.log(this.drivers,"skalkdkk")
  172. })
  173. .catch(res => {
  174. uni.showToast({
  175. title: res.errmsg,
  176. icon: 'none',
  177. duration: 2000
  178. })
  179. });
  180. },
  181. adddriver(index) {
  182. if (index == 1) {
  183. uni.navigateTo({
  184. url: `/pageD/identity/companyIdentity`
  185. })
  186. } else {
  187. uni.navigateTo({
  188. url: `/pageD/identity/driverIdentity`
  189. })
  190. }
  191. },
  192. navToDetailPage(index,item) {
  193. if (index == 1) {
  194. uni.navigateTo({
  195. url: `/pageD/identity/companyIdentityLook?id=${item.id}`
  196. })
  197. } else {
  198. uni.navigateTo({
  199. url: `/pageD/identity/driverIdentityLook?id=${item.id}`
  200. })
  201. }
  202. }
  203. }
  204. }
  205. </script>
  206. <style>
  207. .center {
  208. padding: 10px 20px;
  209. }
  210. .title {
  211. font-size: 18px;
  212. font-weight: 900;
  213. margin-right: 20px;
  214. display: initial;
  215. }
  216. .company {
  217. font-size: 16px;
  218. margin-top: 10px;
  219. }
  220. .infos {
  221. /* margin: 10px 20px; */
  222. width: 100%;
  223. display: inline-table;
  224. }
  225. .info {
  226. line-height: 20px;
  227. }
  228. .but {
  229. right: 3px;
  230. float: right;
  231. }
  232. </style>