cargoowner.vue 9.8 KB

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