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){
  115. return
  116. }else{
  117. uni.$u.route("/pages/mine/cargoowner/editpersonalinformation",this.personage);
  118. }
  119. },
  120. edit(val){
  121. uni.$u.route('/pages/mine/cargoowner/editEnerprise', val);
  122. },
  123. del(val){
  124. uni.showLoading({
  125. mask:true,
  126. title:'加载中...'
  127. })
  128. this.$request.baseRequest('post', '/cargoOwnerCompInfo/api/deleteCargoOwnerComp',{id:val.id} ).then(res => {
  129. uni.hideLoading()
  130. this.getList()
  131. })
  132. .catch(res => {
  133. uni.hideLoading()
  134. uni.showToast({
  135. title: res.message,
  136. icon: 'none',
  137. duration: 2000
  138. })
  139. });
  140. },
  141. goDetailPage(src, status) {
  142. if (status) {
  143. uni.setStorageSync('cargoOwnerId', this.personage.id)
  144. }
  145. uni.$u.route(src);
  146. },
  147. getList() {
  148. uni.showLoading({
  149. title: '加载中',
  150. mask: true
  151. })
  152. this.$request.baseRequest('get', '/cargoOwnerInfo/selectCargoOwner', {
  153. commonId: this.userInfo.id
  154. }).then(res => {
  155. uni.hideLoading()
  156. if (res.data) {
  157. this.datastatus = true
  158. this.personage = res.data
  159. if (res.data.cargoOwnerCompInfoList) {
  160. this.enterprise = res.data.cargoOwnerCompInfoList
  161. }
  162. if (this.personage) {
  163. // this.statustext = this.personage.authenticationStatus
  164. // if (this.personage.authenticationStatus == '审核中' || this.personage
  165. // .authenticationStatus == '已驳回') {
  166. // this.status = false
  167. // } else {
  168. // this.status = true
  169. // }
  170. this.phone = this.personage.phone.replace(this.personage.phone.substring(3, 7), "****")
  171. }
  172. } else {
  173. this.datastatus = false
  174. }
  175. })
  176. .catch(res => {
  177. uni.hideLoading()
  178. uni.showToast({
  179. title: res.message,
  180. icon: 'none',
  181. duration: 2000
  182. })
  183. });
  184. uni.showLoading({
  185. title: '加载中',
  186. mask: true
  187. })
  188. // this.$request.baseRequest('get', '/cargoOwnerCompInfo/api/addCargoOwnerComp',{commonId:this.userInfo.id} ).then(res => {
  189. // uni.hideLoading()
  190. // if(res.data){
  191. // this.enterprise=res.data
  192. // }
  193. // })
  194. // .catch(res => {
  195. // uni.hideLoading()
  196. // uni.showToast({
  197. // title: res.message,
  198. // icon: 'none',
  199. // duration: 2000
  200. // })
  201. // });
  202. },
  203. }
  204. }
  205. </script>
  206. <style lang="scss" scoped>
  207. .content {
  208. padding-bottom: 200rpx;
  209. }
  210. .identity {
  211. background: linear-gradient(150deg, #FFFFFF 0%, #F8FCFF 100%);
  212. box-shadow: 9rpx 10rpx 17rpx 0px rgba(53, 105, 255, 0.06), inset 2rpx 4rpx 0px 0px rgba(255, 255, 255, 0.5);
  213. padding: 60rpx;
  214. display: flex;
  215. align-items: center;
  216. margin: 20rpx;
  217. border-radius: 20rpx;
  218. }
  219. .content1 {
  220. display: flex;
  221. align-items: center;
  222. }
  223. .content2-title {
  224. margin: 20rpx;
  225. }
  226. .weibangding {
  227. width: 141px;
  228. height: 141px;
  229. }
  230. .footer {
  231. position: fixed;
  232. background: #fff;
  233. width: 100%;
  234. bottom: 0;
  235. left: 0;
  236. padding: 15px 15px 30px;
  237. box-sizing: border-box;
  238. }
  239. .newlyIncreased {
  240. width: 100%;
  241. margin: 0 auto;
  242. text-align: center;
  243. height: 46px;
  244. line-height: 46px;
  245. color: #fff;
  246. background: url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
  247. background-size: 100%;
  248. }
  249. .wrap {
  250. background: #fff;
  251. border-radius: 10rpx;
  252. padding: 24rpx;
  253. box-sizing: border-box;
  254. margin: 20rpx;
  255. .row2{
  256. margin: 20rpx 0;
  257. color: #AFB3BF;
  258. }
  259. .row3 {
  260. display: flex;
  261. justify-content: flex-end;
  262. margin-top: 20rpx;
  263. }
  264. }
  265. .status {
  266. font-size: 26rpx;
  267. padding: 5rpx 18rpx;
  268. border-radius: 20rpx;
  269. }
  270. .status.passed {
  271. background: #25E491;
  272. }
  273. .status.aduit {
  274. background: #FE8031;
  275. }
  276. .status.reject {
  277. background: #FC5A51;
  278. }
  279. .content {
  280. margin-bottom: 200rpx;
  281. }
  282. </style>