cargoowner.vue 9.5 KB

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