index.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <template>
  2. <view class="center">
  3. <!-- <view class="homePage">
  4. <view class="title">
  5. 粮商身份
  6. </view>
  7. <view class="arrows">
  8. <text style="margin-right: 30px;">新增身份</text>
  9. <image src="../../static/img/authentication/jiantou@3x.png" class="arrow"></image>
  10. </view>
  11. <image src="../../static/img/authentication/liangshang@3x.png" class="portrait"></image>
  12. </view> -->
  13. <view class="homePage">
  14. <image src="../../static/img/authentication/bg@2x.png" class="background"></image>
  15. <view class="title">
  16. 粮商身份
  17. </view>
  18. <view class="arrows1" @click="liangShang">
  19. <text style="margin-right: 30px;">新增身份</text>
  20. <image src="../../static/img/authentication/jiantou@3x.png" class="arrow"></image>
  21. </view>
  22. <image src="../../static/img/authentication/liangshang@3x.png" class="portrait1"></image>
  23. </view>
  24. <view class="homePage1">
  25. <image src="../../static/img/authentication/bg@2x.png" class="background"></image>
  26. <view class="title">
  27. 司机身份
  28. </view>
  29. <view class="arrows1" @click="siJi">
  30. <text style="margin-right: 30px;">新增身份</text>
  31. <image src="../../static/img/authentication/jiantou@3x.png" class="arrow"></image>
  32. </view>
  33. <image src="../../static/img/authentication/siji@3x.png" class="portrait1"></image>
  34. </view>
  35. <!-- <view>
  36. <view class="title">粮商身份</view>
  37. <view class='cu-tag radius line-pink' @click="adddriver(1)">新增</view>
  38. <view v-for="(item , index) in businessman" :Key="index">
  39. <view class="company">{{item.compName}}</view>
  40. <view class="guess-item">
  41. <view class="infos" @click="navToDetailPage(1,item)">
  42. <view class="info">{{item.customerName}}
  43. <view class='cu-tag radius line-pink but'>{{item.authenticationStatus}}</view>
  44. </view>
  45. <view class="info">{{item.customerPhone}}</view>
  46. </view>
  47. <label>
  48. <checkbox :value="1" /><text>设置默认</text>
  49. </label>
  50. <view class='cu-tag radius line-pink ' @click="deleteLS(item)">删除</view>
  51. <view class='cu-tag radius line-pink ' @click="companyEdit(item)">修改</view>
  52. <view class='cu-tag radius line-pink but'>更换手机号</view>
  53. </view>
  54. <hr>
  55. </view>
  56. </view> -->
  57. <!-- <view class="margin-top">
  58. <view class="title">司机身份</view>
  59. <view class='cu-tag radius line-pink' @click="adddriver(2)">新增</view>
  60. <view v-for="(items , index) in drivers" :Key="index">
  61. <view class="guess-item" @click="navToDetailPage(2,items)">
  62. <view class="infos">
  63. <view class="info">{{items.driverName}}
  64. <view class='cu-tag radius line-pink but'>{{items.authenticationStatus}}</view>
  65. </view>
  66. <view class="info">{{items.driverPhone}}</view>
  67. </view>
  68. </view>
  69. <view class='cu-tag radius line-pink ' @click="deleteSJ(items)">删除</view>
  70. <view class='cu-tag radius line-pink ' @click="driverIdentityEdit(items)">修改</view>
  71. <view class='cu-tag radius line-pink but'>更换手机号</view>
  72. <hr>
  73. </view>
  74. </view> -->
  75. </view>
  76. </template>
  77. <script>
  78. import {
  79. mapState
  80. } from 'vuex';
  81. export default {
  82. name: "buy",
  83. data() {
  84. return {
  85. PageCur: "buy",
  86. buyInfo: [],
  87. pages: 1, //页数
  88. limit: 10, //每次取条目数
  89. loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
  90. isLoadMore: false, //是否加载中
  91. showTran: true,
  92. scrollTop: 0,
  93. TabCur: 0,
  94. current: 1,
  95. identityAuthenticationInfo: {
  96. pageSize: 10,
  97. currentPage: 1,
  98. commonId: "",
  99. },
  100. businessman: [],
  101. drivers: [],
  102. deletes: {
  103. id: "",
  104. },
  105. };
  106. },
  107. computed: {
  108. ...mapState(['hasLogin', 'userInfo'])
  109. },
  110. onLoad() {
  111. this.getList()
  112. },
  113. methods: {
  114. liangShang(){
  115. uni.navigateTo({
  116. url: `/pages/attestation/indexTwo`
  117. })
  118. },
  119. siJi(){
  120. uni.navigateTo({
  121. url: `/pages/attestation/indexThree`
  122. })
  123. },
  124. driverIdentityEdit(items) {
  125. uni.navigateTo({
  126. url: `/pageD/identity/driverIdentityEdit?id=${items.id}`
  127. })
  128. },
  129. // companyEdit(item) {
  130. // uni.navigateTo({
  131. // url: `/pageD/identity/companyIdentityEdit?id=${item.id}`
  132. // })
  133. // },
  134. deleteLS(item) {
  135. uni.showModal({
  136. // title: '登录提示',
  137. content: '身份信息删除后不可恢复,是否确定删除?',
  138. showCancel: true,
  139. confirmText: '确定',
  140. success: (e) => {
  141. this.$api.doRequest('post',
  142. '/identityAuthenticationInfo/api/deleteIdentityAuthenticationInfo', {
  143. id: item.id
  144. }, 'application/json;charset=UTF-8').then(res => {
  145. this.procurementPlanInfos = res.data.data.records
  146. if (res.errmsg == "Success") {
  147. this.$api.msg('删除成功!')
  148. this.getList()
  149. return
  150. }
  151. })
  152. .catch(res => {
  153. uni.showToast({
  154. title: res.errmsg,
  155. icon: 'none',
  156. duration: 2000
  157. })
  158. });
  159. },
  160. fail: () => {},
  161. complete: () => {}
  162. })
  163. },
  164. deleteSJ(item) {
  165. console.log(item.driverName)
  166. this.deletes = {}
  167. this.deletes.id = item.id
  168. uni.showModal({
  169. // title: '登录提示',
  170. content: '身份信息删除后不可恢复,是否确定删除?',
  171. showCancel: true,
  172. confirmText: '确定',
  173. success: (e) => {
  174. this.$api.doRequest('get', '/driverViewInfo/api/deleteDriver', this.deletes,
  175. 'application/json;charset=UTF-8').then(res => {
  176. this.procurementPlanInfos = res.data.data.records
  177. if (res.errmsg == "Success") {
  178. this.$api.msg('删除成功!')
  179. this.getList()
  180. return
  181. }
  182. })
  183. .catch(res => {
  184. uni.showToast({
  185. title: res.errmsg,
  186. icon: 'none',
  187. duration: 2000
  188. })
  189. });
  190. },
  191. fail: () => {},
  192. complete: () => {}
  193. })
  194. },
  195. getList() {
  196. this.identityAuthenticationInfo.commonId = this.userInfo.id
  197. this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {
  198. pageSize: 10,
  199. currentPage: 1,
  200. commonId: this.userInfo.id
  201. }, 'application/json;charset=UTF-8').then(res => {
  202. console.log("成功连接")
  203. this.businessman = res.data.data.records
  204. })
  205. .catch(res => {
  206. uni.showToast({
  207. title: res.errmsg,
  208. icon: 'none',
  209. duration: 2000
  210. })
  211. });
  212. this.$api.doRequest('get', '/driverViewInfo/selectDriverInfoPage', {
  213. pageSize: 10,
  214. currentPage: 1,
  215. commonId: this.userInfo.id,
  216. flag: 0
  217. }, 'application/json;charset=UTF-8').then(res => {
  218. console.log("成功连接")
  219. this.drivers = res.data.data.records
  220. console.log(this.drivers, "skalkdkk")
  221. })
  222. .catch(res => {
  223. uni.showToast({
  224. title: res.errmsg,
  225. icon: 'none',
  226. duration: 2000
  227. })
  228. });
  229. },
  230. adddriver(index) {
  231. if (index == 1) {
  232. uni.navigateTo({
  233. url: `/pageD/identity/companyIdentity`
  234. })
  235. } else {
  236. uni.navigateTo({
  237. url: `/pageD/identity/driverIdentity`
  238. })
  239. }
  240. },
  241. navToDetailPage(index, item) {
  242. if (index == 1) {
  243. uni.navigateTo({
  244. url: `/pageD/identity/companyIdentityLook?id=${item.id}`
  245. })
  246. } else {
  247. uni.navigateTo({
  248. url: `/pageD/identity/driverIdentityLook?id=${item.id}`
  249. })
  250. }
  251. }
  252. }
  253. }
  254. </script>
  255. <style>
  256. .center {
  257. padding: 10px 20px;
  258. }
  259. .title {
  260. font-size: 22px;
  261. font-weight: 900;
  262. /* margin-top: 30px; */
  263. top: 50px;
  264. left: 24px;
  265. position: relative;
  266. }
  267. .company {
  268. font-size: 16px;
  269. margin-top: 10px;
  270. }
  271. .infos {
  272. /* margin: 10px 20px; */
  273. width: 100%;
  274. display: inline-table;
  275. }
  276. .info {
  277. line-height: 20px;
  278. }
  279. .but {
  280. right: 3px;
  281. float: right;
  282. }
  283. .homePage {
  284. width: 101%;
  285. height: 200px;
  286. margin: 20px auto;
  287. }
  288. .arrows {
  289. font-size: 14px;
  290. font-weight: 600;
  291. float: right;
  292. margin-top: 130px;
  293. }
  294. .arrow {
  295. width: 16px;
  296. height: 16px;
  297. float: right;
  298. right: 20px;
  299. }
  300. .portrait {
  301. width: 75px;
  302. height: 75px;
  303. float: right;
  304. right: -70px;
  305. }
  306. .homePage1 {
  307. width: 101%;
  308. }
  309. .background {
  310. width: 100%;
  311. height: 200px;
  312. position: fixed;
  313. }
  314. .arrows1 {
  315. position: absolute;
  316. right: 30px;
  317. margin-top: 120px;
  318. }
  319. .portrait1 {
  320. width: 75px;
  321. height: 75px;
  322. float: right;
  323. }
  324. </style>