hsb před 5 měsíci
rodič
revize
e49880d178
4 změnil soubory, kde provedl 49 přidání a 98 odebrání
  1. 1 1
      manifest.json
  2. 1 1
      pages/home/home.vue
  3. 32 93
      pages/info/info.vue
  4. 15 3
      pages/other/addOrder.vue

+ 1 - 1
manifest.json

@@ -3,7 +3,7 @@
     "appid" : "__UNI__930F417",
     "description" : "计数通APP",
     "versionName" : "1.1.1",
-    "versionCode" : 102,
+    "versionCode" : 101,
     "transformPx" : false,
     "lazyCodeLoading" : "requiredComponents",
     "app-plus" : {

+ 1 - 1
pages/home/home.vue

@@ -157,7 +157,7 @@
 		
 			//去新增订单
 			toAdd(){
-				uni.navigateTo({ url: '/pages/other/addOrder' })
+				uni.navigateTo({ url: `/pages/other/addOrder?name=${this.currentLane.name}&id=${this.currentLane.id}` })
 			},
 			//显示选择
 			showPopup(refs) {

+ 32 - 93
pages/info/info.vue

@@ -10,15 +10,9 @@
 			<view class="userInfo" @click.capture="toUserInfo">
 				<!-- <u-avatar :src="userInfo.avatar" size="120rpx"></u-avatar> -->
 				<view class="logo-title">
-					<view class="user-name" v-if="hasLogin">
-						<span>{{userInfo.displayName||userInfo.username}}</span>
-						<span class="role-tag" v-if="isDriverUser">{{$t('mine.driver')}}</span>
-						<span class="role-tag" v-if="isDealerUser">{{$t('mine.dealer')}}</span>
-						<span class="role-tag" v-if="isAuditUser">{{$t('mine.auditUser')}}</span>
-						<span class="role-tag" v-if="isTransUser">{{$t('order.transporter')}}</span>
+					<view class="user-name">
+						<span>退出登录</span>
 					</view>
-					<text class="user-name" v-else>{{$t('mine.notLogged')}}</text>
-					<text class="user-phone">{{userInfo.phone}}</text>
 				</view>
 			</view>
 		</view>
@@ -103,83 +97,6 @@
 					icon: "file-text",
 					to: '/subpages/order/dealerList?index=0'
 				},
-				gridList: [{
-						title: this.$t("mine.reviewed"),
-						icon: "../../static/czzn-img/info/info-order.png",
-						dealerTo: '/subpages/order/dealerList?orderType=0&orderStatus=0',
-						driverTo: '/subpages/order/driverList?orderType=0&orderStatus=0'
-					},
-					{
-						title: this.$t("mine.unpaid"),
-						icon: "../../static/czzn-img/info/info-jc.png",
-						dealerTo: '/subpages/order/dealerList?orderType=0&orderStatus=1',
-						driverTo: '/subpages/order/driverList?orderType=0&orderStatus=1'
-					},
-					{
-						title: this.$t("mine.weigh"),
-						icon: "../../static/czzn-img/info/info-gb.png",
-						dealerTo: '/subpages/order/dealerList?orderType=0&orderStatus=3',
-						driverTo: '/subpages/order/driverList?orderType=0&orderStatus=3'
-					},
-					{
-						title: this.$t("mine.ongoing"),
-						icon: "../../static/czzn-img/info/info-cc.png",
-						dealerTo: '/subpages/order/dealerList?orderType=0&orderStatus=2',
-						driverTo: '/subpages/order/driverList?orderType=0&orderStatus=2'
-					},
-					{
-						title: this.$t("mine.invalid"),
-						icon: "../../static/czzn-img/info/info-zf.png",
-						dealerTo: '/subpages/order/dealerList?orderType=0&orderStatus=4',
-						driverTo: '/subpages/order/driverList?orderType=0&orderStatus=4'
-					},
-
-				],
-				driverMenuList: [{
-						title: this.$t("mine.vehicle"),
-						icon: "../../static/czzn-img/info/info-cl.png",
-						to: '/subpages/driver/driverList',
-						count: 0,
-					},
-					{
-						title: this.$t("mine.feedback"),
-						icon: imgUtil.feedbackIcon,
-						to: '/substaticpages/info/feedback',
-						count: 0,
-					},
-					// {
-					// 	title: this.$t("mine.mp"),
-					// 	icon: "../../static/czzn-img/info/info-msg.png",
-					// 	to: '/subpages/mp/index',
-					// 	count: 0,
-					// },
-				],
-				dealerMenuList: [{
-						title: this.$t("mine.enterprise"),
-						icon: imgUtil.enterpriseIcon,
-						to: '/subpages/tenant/list',
-						count: 0,
-					},
-					{
-						title: this.$t("mine.driver"),
-						icon: imgUtil.driverIcon,
-						to: '/subpages/driver/dealerList',
-						count: 0,
-					},
-					{
-						title: this.$t("mine.feedback"),
-						icon: imgUtil.feedbackIcon,
-						to: '/substaticpages/info/feedback',
-						count: 0,
-					},
-					// {
-					// 	title: this.$t("mine.mp"),
-					// 	icon: "../../static/czzn-img/info/info-msg.png",
-					// 	to: '/subpages/mp/index',
-					// 	count: 0,
-					// },
-				],
-
 				role: [],
 				userType: "0",
 				tenantCount: 0,
@@ -273,15 +190,37 @@
 				setUserInfo: "user/login",
 			}),
 			toUserInfo() {
-				if(this.hasLogin){
-					uni.navigateTo({
-						url: "/substaticpages/info/userInfo",
+					uni.showModal({
+						title: this.$t('settings.tips'),
+						content: this.$t('settings.exitLogin'),
+						cancelText: this.$t('settings.cancelText'),
+						confirmText: this.$t('settings.confirmText'),
+						success: res => {
+							if (res.confirm) {
+								uni.removeStorageSync('token')
+								uni.removeStorageSync('tenantId')
+								uni.removeStorageSync('userId')
+								uni.removeStorageSync('userName')
+								uni.removeStorageSync('userInfo')
+								uni.removeStorageSync('userType')
+								uni.removeStorageSync('tenantInfo')
+								uni.removeStorageSync('currentTenantId')
+								uni.removeStorageSync('currentVehicleInfo')
+								uni.removeStorageSync('isAuditUser')
+								uni.removeStorageSync('isDealerUser')
+								uni.removeStorageSync('isDriverUser')
+								uni.removeStorageSync('enterpriseInfo')
+								uni.removeStorageSync('serverAddress');
+								uni.removeStorageSync('serverPrefix');
+								uni.reLaunch({
+									url: '/pages/login/login'
+								});
+								getApp().globalData.tabIndex = 'home';
+							}
+						},
+						fail: () => {},
+						complete: () => {}
 					});
-				}else{
-					uni.reLaunch({
-						url: "/pages/login/login"
-					})
-				}					
 			},
 			toPage(url) {
 				uni.navigateTo({

+ 15 - 3
pages/other/addOrder.vue

@@ -114,6 +114,8 @@
 			this.getCompany()
 			this.getMater()
 			this.getLane()
+			this.orderForm.roadId=options.id
+			this.orderForm.roadName = options.name
 		},
 		methods: {
 			//显示选择
@@ -194,6 +196,10 @@
 								...item
 							}
 						})
+						if(this.companyOption.length == 1){
+							this.orderForm.companyId = this.companyOption[0].value
+							this.orderForm.companyName = this.companyOption[0].text
+						}
 					}
 				})
 			},
@@ -208,6 +214,10 @@
 								...item
 							}
 						})
+						if(this.materOption.length == 1){
+							this.orderForm.materialId = this.materOption[0].value
+							this.orderForm.materialName = this.materOption[0].text
+						}
 					}
 				})
 			},
@@ -222,6 +232,10 @@
 								...item
 							}
 						})
+						if(this.laneOption.length == 1){
+							this.orderForm.roadId = this.laneOption[0].value
+							this.orderForm.roadName = this.laneOption[0].text
+						}
 					}
 				})
 			},
@@ -267,9 +281,7 @@
 											console.log('用户点击确定');
 									} else if (res.cancel) {
 										console.log('用户点击取消');
-										uni.redirectTo({
-											url: '/pages/home/home'
-										})
+										uni.navigateBack({ delta: 1 })
 									}
 								}
 							})