cargoowner.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <view class='content'>
  3. <!-- <view @click='goDetailPage("/pages/mine/cargoowner/editpersonalinformation")'
  4. :class="[statustext == '审核中'?'identity2':'identity']" class=' flex items-center'>
  5. <view style='width:100%;' class='flex items-center content1'>
  6. <u--image style='margin-right:5px;' class='image' :showLoading="true"
  7. :src="status?'../../../static/mine/huozhurenzheng/shenfen2.png':'../../../static/mine/huozhurenzheng/shenfen.png'"
  8. width="32px" height="32px"></u--image>
  9. <view style='width:100%;'>
  10. <view v-if='!datastatus' style='font-size:21px;'>身份信息</view>
  11. <view v-else style='font-size:21px;'>{{personage.name}}</view>
  12. <view v-if='!datastatus' class='flex flex-space-between'
  13. style='width:100%;color:#999999;font-size:14px;'>您还未认证身份信息<u-icon name="arrow-right"
  14. color="#7E7E7E" size="10"></u-icon>
  15. </view>
  16. <view v-else class='flex flex-space-between' style='width:100%;color:#999999;font-size:14px;'>
  17. {{phone}}
  18. <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
  19. </view>
  20. </view>
  21. </view>
  22. </view> -->
  23. <!-- @click='goDetailPage("/pages/mine/cargoowner/editpersonalinformation")' -->
  24. <view class=' flex items-center identity' @click='toEditPage()'>
  25. <view style='width:100%;' class='flex items-center content1'>
  26. <u--image style='margin-right:5px;' class='image' :showLoading="true"
  27. :src="personage.authenticationStatus=='已认证'?'../../../static/mine/huozhurenzheng/shenfen2.png':'../../../static/mine/huozhurenzheng/shenfen.png'"
  28. width="32px" height="32px"></u--image>
  29. <view style='width:100%;'>
  30. <view v-if='!personage' style='font-size:21px;'>身份信息</view>
  31. <view v-else style='font-size:21px;'>{{personage.name}}</view>
  32. <view v-if="personage.authenticationStatus!='已认证'" class='flex flex-space-between'
  33. style='width:100%;color:#999999;font-size:14px;'>您的身份信息{{personage.authenticationStatus?personage.authenticationStatus:'未认证'}}状态
  34. <u-icon name="arrow-right" color="#7E7E7E" size="10" v-if="datastatus"></u-icon>
  35. </view>
  36. <view v-else class='flex flex-space-between' style='width:100%;color:#999999;font-size:14px;'>
  37. {{phone}}
  38. <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <view>
  44. <view class="content2-title">所属企业 <text style='color:#999;'>({{enterprise.length}})</text></view>
  45. <view v-if='enterprise.length>0'>
  46. <view v-for='item in enterprise' class='wrap'>
  47. <view class='flex flex-space-between'>
  48. <view>{{item.company}}</view>
  49. <view v-if='item.status=="企业已驳回"' class='status wtg-color'>{{item.status}}</view>
  50. <view v-if='item.status=="企业审核中"' class='status number-color'>{{item.status}}</view>
  51. <view v-if='item.status=="平台审核中"' class='status number-color'>{{item.status}}</view>
  52. <view v-if='item.status=="平台已驳回"' class='status wtg-color'>{{item.status}}</view>
  53. <view v-if='item.status=="已认证"' class='status ytg-color'>{{item.status}}</view>
  54. <view v-if='item.status=="授权已过期"' class='status shz-color'>{{item.status}}</view>
  55. <view v-if='item.status=="企业暂不可用"' class='status wtg-color'>{{item.status}}</view>
  56. <view v-if='item.status=="企业不存在"' class='status shz-color'>{{item.status}}</view>
  57. <view v-if='item.status=="授权已撤销"' class='status shz-color'>{{item.status}}</view>
  58. </view>
  59. <view class="row2">
  60. {{item.advanceFreightService==1?'可垫付运费':'不可垫付运费'}}
  61. </view>
  62. <view class="row3">
  63. <view class="right">
  64. <!-- v-if='item.status!="平台审核中"&&item.status!="企业审核中"&&item.status!="企业暂不可用"&&item.status!="企业不存在"&&item.status!="授权已撤销"' -->
  65. <image @click='edit(item)'
  66. style='width:17px;height:17px;margin:0 10px;' src="@/static/mine/company/edit.png">
  67. </image>
  68. <image @click='del(item)' style='width:17px;height:17px;margin:0 10px;'
  69. src="@/static/mine/company/del.png"></image>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <view v-else style='text-align:center;'>
  75. <image class='image weibangding' :showLoading="true"
  76. src="../../../static/mine/huozhurenzheng/weibangding.png"></image>
  77. <view style='font-size:12px;color:#999;'>您还未认证企业信息</view>
  78. </view>
  79. <view class='footer'>
  80. <view @click='goDetailPage("/pages/mine/cargoowner/addEnerprise",1)' class='newlyIncreased' v-if='datastatus'>新增</view>
  81. <view @click='goDetailPage("/pages/mine/cargoowner/editpersonalinformation")' class='newlyIncreased' v-if="!datastatus">去认证</view>
  82. </view>
  83. </view>
  84. </view>
  85. </template>
  86. <script>
  87. import {
  88. mapState
  89. } from 'vuex';
  90. export default {
  91. data() {
  92. return {
  93. personage: {},
  94. phone: '',
  95. status: false,
  96. datastatus: false,
  97. statustext: '未认证',
  98. enterprise: [],
  99. isFirst:false
  100. }
  101. },
  102. onLoad() {
  103. var _this = this;
  104. if (!this.hasLogin) {
  105. uni.$u.route('/pages/public/login');
  106. }
  107. this.getList()
  108. },
  109. computed: {
  110. ...mapState(['hasLogin', 'userInfo']),
  111. },
  112. methods: {
  113. toEditPage(){
  114. if(this.personage&&this.personage.authenticationStatus=='已认证'){
  115. uni.$u.route("/pages/mine/cargoowner/editpersonalinformation",this.personage);
  116. }else{
  117. }
  118. },
  119. edit(val){
  120. uni.$u.route('/pages/mine/cargoowner/editEnerprise', val);
  121. },
  122. del(val){
  123. uni.showLoading({
  124. mask:true,
  125. title:'加载中...'
  126. })
  127. this.$request.baseRequest('post', '/cargoOwnerCompInfo/api/deleteCargoOwnerComp',{id:val.id} ).then(res => {
  128. uni.hideLoading()
  129. this.getList()
  130. })
  131. .catch(res => {
  132. uni.hideLoading()
  133. uni.showToast({
  134. title: res.message,
  135. icon: 'none',
  136. duration: 2000
  137. })
  138. });
  139. },
  140. goDetailPage(src, status) {
  141. if (status) {
  142. uni.setStorageSync('cargoOwnerId', this.personage.id)
  143. }
  144. uni.$u.route(src);
  145. },
  146. getList() {
  147. uni.showLoading({
  148. title: '加载中',
  149. mask: true
  150. })
  151. this.$request.baseRequest('get', '/cargoOwnerInfo/selectCargoOwner', {
  152. commonId: this.userInfo.id
  153. }).then(res => {
  154. uni.hideLoading()
  155. if (res.data) {
  156. this.datastatus = true
  157. this.personage = res.data
  158. if (res.data.cargoOwnerCompInfoList) {
  159. this.enterprise = res.data.cargoOwnerCompInfoList
  160. }
  161. if (this.personage) {
  162. // this.statustext = this.personage.authenticationStatus
  163. // if (this.personage.authenticationStatus == '审核中' || this.personage
  164. // .authenticationStatus == '已驳回') {
  165. // this.status = false
  166. // } else {
  167. // this.status = true
  168. // }
  169. this.phone = this.personage.phone.replace(this.personage.phone.substring(3, 7), "****")
  170. }
  171. } else {
  172. this.datastatus = false
  173. }
  174. })
  175. .catch(res => {
  176. uni.hideLoading()
  177. uni.showToast({
  178. title: res.message,
  179. icon: 'none',
  180. duration: 2000
  181. })
  182. });
  183. uni.showLoading({
  184. title: '加载中',
  185. mask: true
  186. })
  187. // this.$request.baseRequest('get', '/cargoOwnerCompInfo/api/addCargoOwnerComp',{commonId:this.userInfo.id} ).then(res => {
  188. // uni.hideLoading()
  189. // if(res.data){
  190. // this.enterprise=res.data
  191. // }
  192. // })
  193. // .catch(res => {
  194. // uni.hideLoading()
  195. // uni.showToast({
  196. // title: res.message,
  197. // icon: 'none',
  198. // duration: 2000
  199. // })
  200. // });
  201. },
  202. }
  203. }
  204. </script>
  205. <style lang="scss" scoped>
  206. .content {
  207. padding-bottom: 200rpx;
  208. }
  209. .identity {
  210. background: linear-gradient(150deg, #FFFFFF 0%, #F8FCFF 100%);
  211. box-shadow: 9rpx 10rpx 17rpx 0px rgba(53, 105, 255, 0.06), inset 2rpx 4rpx 0px 0px rgba(255, 255, 255, 0.5);
  212. padding: 60rpx;
  213. display: flex;
  214. align-items: center;
  215. margin: 20rpx;
  216. border-radius: 20rpx;
  217. }
  218. .content1 {
  219. display: flex;
  220. align-items: center;
  221. }
  222. .content2-title {
  223. margin: 20rpx;
  224. }
  225. .weibangding {
  226. width: 141px;
  227. height: 141px;
  228. }
  229. .footer {
  230. position: fixed;
  231. background: #fff;
  232. width: 100%;
  233. bottom: 0;
  234. left: 0;
  235. padding: 15px 15px 30px;
  236. box-sizing: border-box;
  237. }
  238. .newlyIncreased {
  239. width: 100%;
  240. margin: 0 auto;
  241. text-align: center;
  242. height: 46px;
  243. line-height: 46px;
  244. color: #fff;
  245. background: url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
  246. background-size: 100%;
  247. }
  248. .wrap {
  249. background: #fff;
  250. border-radius: 10rpx;
  251. padding: 24rpx;
  252. box-sizing: border-box;
  253. margin: 20rpx;
  254. .row2{
  255. margin: 20rpx 0;
  256. color: #AFB3BF;
  257. }
  258. .row3 {
  259. display: flex;
  260. justify-content: flex-end;
  261. margin-top: 20rpx;
  262. }
  263. }
  264. .status {
  265. font-size: 26rpx;
  266. padding: 5rpx 18rpx;
  267. border-radius: 20rpx;
  268. }
  269. .status.passed {
  270. background: #25E491;
  271. }
  272. .status.aduit {
  273. background: #FE8031;
  274. }
  275. .status.reject {
  276. background: #FC5A51;
  277. }
  278. .content {
  279. margin-bottom: 200rpx;
  280. }
  281. </style>