Browse Source

所属企业

gjy 3 years ago
parent
commit
131bf2a7dc
2 changed files with 9 additions and 3 deletions
  1. 4 1
      pages/mine/cargoowner/addEnerprise.vue
  2. 5 2
      pages/mine/cargoowner/cargoowner.vue

+ 4 - 1
pages/mine/cargoowner/addEnerprise.vue

@@ -85,12 +85,14 @@
 				index:0
 				index:0
 			}
 			}
 		},
 		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
+		},
 		onLoad(){
 		onLoad(){
 			this.validityPeriod = this.$helper.makeValidityPeriod(0,50)
 			this.validityPeriod = this.$helper.makeValidityPeriod(0,50)
 			this.getList()
 			this.getList()
 		},
 		},
 		onShow() {
 		onShow() {
-			console.log(uni.getStorageSync('currectcompany'))
 			if(uni.getStorageSync('currectcompany')){
 			if(uni.getStorageSync('currectcompany')){
 				this.dataDetails.company=uni.getStorageSync('currectcompany').companyName
 				this.dataDetails.company=uni.getStorageSync('currectcompany').companyName
 				this.dataDetails.legalPersonName=uni.getStorageSync('currectcompany').legalPersonName
 				this.dataDetails.legalPersonName=uni.getStorageSync('currectcompany').legalPersonName
@@ -213,6 +215,7 @@
 					mask:true
 					mask:true
 				})
 				})
 				var _this=this
 				var _this=this
+				this.dataDetails.commonId=this.userInfo.id
 				this.$request.baseRequest('post', '/cargoOwnerCompInfo/api/addCargoOwnerComp', _this.dataDetails).then(res => {
 				this.$request.baseRequest('post', '/cargoOwnerCompInfo/api/addCargoOwnerComp', _this.dataDetails).then(res => {
 					uni.hideLoading()
 					uni.hideLoading()
 					uni.$u.toast('提交成功')
 					uni.$u.toast('提交成功')

+ 5 - 2
pages/mine/cargoowner/cargoowner.vue

@@ -31,7 +31,7 @@
 				<view style='font-size:12px;color:#999;'>您还未认证企业信息</view>
 				<view style='font-size:12px;color:#999;'>您还未认证企业信息</view>
 			</view>
 			</view>
 			<view class='footer'>
 			<view class='footer'>
-				<view @click='goDetailPage("/pages/mine/cargoowner/addEnerprise?cargoOwnerId="+personage.id)' class='newlyIncreased'>新增</view>
+				<view @click='goDetailPage("/pages/mine/cargoowner/addEnerprise",1)' class='newlyIncreased'>新增</view>
 			</view>
 			</view>
 		</view>
 		</view>
 	</view>
 	</view>
@@ -63,7 +63,10 @@
 			...mapState(['hasLogin', 'userInfo']),
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		},
 		methods: {
 		methods: {
-			goDetailPage(src) {
+			goDetailPage(src,status) {
+				if(status){
+					uni.setStorageSync('cargoOwnerId', this.personage.id)
+				}
 				uni.$u.route(src);
 				uni.$u.route(src);
 			},
 			},
 			getList(){
 			getList(){