Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gongdecai/wangluohuoyun-app

ccj 2 years ago
parent
commit
0b85fdada4
41 changed files with 3123 additions and 1638 deletions
  1. 252 99
      App.vue
  2. 174 0
      common/TabBarView.js
  3. 19 0
      common/helper.js
  4. 1 1
      components/bert-suggest/suggest.vue
  5. 0 1
      components/itmister-address-picker/city_other.json
  6. 0 1
      components/itmister-address-picker/itmister-address-picker.nvue
  7. 727 0
      components/itmister-date-picker/itmister-date-picker.nvue
  8. 2 2
      config/index.js
  9. 6 2
      manifest.json
  10. 6 0
      pages.json
  11. 21 7
      pages/goodSource/cargoOwnerSee.vue
  12. 323 294
      pages/goodSource/index.vue
  13. 34 61
      pages/mine/driverCertification.vue
  14. 48 245
      pages/mine/driverCertificationNext.vue
  15. 23 50
      pages/mine/editDriverCertification.vue
  16. 71 243
      pages/mine/editDriverCertificationNext.vue
  17. 14 3
      pages/mine/index.vue
  18. 200 0
      pages/mine/index1.vue
  19. 3 7
      pages/mine/manageBankCards/addBankCard.vue
  20. 138 107
      pages/mine/manageVehicles/addVehicle.vue
  21. 137 84
      pages/mine/manageVehicles/editVehicle.vue
  22. 33 2
      pages/mine/often/oftenRoute.vue
  23. 19 18
      pages/mine/set.vue
  24. 0 4
      pages/mine/settings/editAvatar.vue
  25. 9 2
      pages/mine/settings/editPassword.vue
  26. 2 1
      pages/news/index.vue
  27. 1 1
      pages/news/newsSee.vue
  28. 2 1
      pages/order/addEvaluation.vue
  29. 21 7
      pages/order/cargoOwnerSee.vue
  30. 232 81
      pages/order/confirmLoading.vue
  31. 59 32
      pages/order/confirmUnloading.vue
  32. 3 2
      pages/order/index.vue
  33. 95 76
      pages/order/signContract.vue
  34. 15 6
      pages/public/code.vue
  35. 298 146
      pages/public/login.vue
  36. 47 20
      pages/public/register.vue
  37. 2 2
      pages/riders/addFleet.vue
  38. 66 27
      pages/riders/index.vue
  39. BIN
      static/images/order/pingjiabianji.png
  40. BIN
      static/images/order/right.png
  41. 20 3
      util/request.js

+ 252 - 99
App.vue

@@ -12,10 +12,35 @@
 	import appUpdate from 'common/appUpdate.js'
 	import app_push from './components/APPPush/app_push.js'
 	import permision from "@/js_sdk/wa-permission/permission.js"
+	//插件对象
+	var sdkwx = uni.requireNativePlugin('Hdgq-LocSdkWX');
 	export default {
+		data() {
+			return {
+				shippingNoteInfos: [{
+					shippingNoteNumber: '',
+					serialNumber: "",
+					startCountrySubdivisionCode: "",
+					endCountrySubdivisionCode: "",
+					startLongitude: "",
+					startLatitude: "",
+					endLongitude: "",
+					endLatitude: "",
+					startLocationText: "",
+					endLocationText: "",
+					vehicleNumber: "",
+					driverName: "",
+					interval: "",
+				}],
+				//网络货运信息定位
+				appId: "", //网络货运企业APP的唯一标识
+				appSecurity: "", //网络货运企业在省平台申请的接入安全码
+				enterpriseSenderCode: "23106960", //网络货运企业在省平台申请的企业发送代码
+				environment: "debug", //环境:“debug”接入测试环境,“release”接入正式环境。
+			}
+		},
 		methods: {
-			
-			...mapMutations(['login']),
+			...mapMutations(['login', "firstAuthentication"]),
 			// vue的method里编写如下代码
 			// async requestAndroidPermission(permisionID) {
 			//     var result = await permision.requestAndroidPermission(permisionID)
@@ -30,10 +55,104 @@
 			//         strStatus = "被永久拒绝权限"
 			// 		// permision.gotoAppPermissionSetting()
 			//     }
-			  
 			// },
+			restart() { //开启定位
+				var remark = "测试"; //备注
+				let that = this
+				sdkwx.restart(this.shippingNoteInfos[0].vehicleNumber, this.shippingNoteInfos[0].driverName, remark, this
+					.shippingNoteInfos,
+					function(res) {
+						if (res.type == "onSuccess") {
+							//成功
+							console.log("开启定位成功!!!")
+							console.log(res)
+							var shippingNoteInfos = res.data[0]; //运单信息列表
+							console.log(shippingNoteInfos, "sdassss")
+							if (shippingNoteInfos) {
+								let dateTtime = Number(shippingNoteInfos.interval + 60000)
+								console.log("开始定时", dateTtime)
+								that.timer = setInterval(() => {
+									console.log("定时")
+									that.send()
+								}, dateTtime);
+							}
+						} else if (res.type == "onFailure") {
+							//失败
+							console.log("开启定位失败!!!")
+							console.log(res)
+							var errorCode = res.data.errorCode; //错误码
+							var errorMsg = res.data.errorMsg; //错误描述
+							that.timer = setInterval(() => { //失败也需要定时发送定位
+								console.log("定时")
+								that.send()
+							}, 915204); //15分钟
+						}
+					});
+			},
+			send() { //发送定位
+				var remark = ""
+				var that = this
+				console.log("send参数", this.shippingNoteInfos)
+				sdkwx.send(this.shippingNoteInfos[0].vehicleNumber, this.shippingNoteInfos[0].driverName, remark, this
+					.shippingNoteInfos,
+					function(res) {
+						if (res.type == "onSuccess") {
+							console.log("App.vue发送定位成功")
+							console.log(res);
+							var shippingNoteInfos = res.data[0]; //运单信息列表
+							if (shippingNoteInfos) {
+								let dateTime = Number(shippingNoteInfos.interval + 1000)
+								console.log("定时开始", dateTime)
+								that.timer = setInterval(() => {
+									//TODO 
+									that.send()
+								}, dateTime);
+							}
+						} else if (res.type == "onFailure") {
+							console.log("App.vue发送定位失败", res)
+							//失败
+							var errorCode = res.data.errorCode; //错误码
+							var errorMsg = res.data.errorMsg; //错误描述
+							console.log("定时开始", "915204")
+							that.timer = setInterval(() => { //失败也需要定时上传定位(为了解决频繁调用接口问题)
+								//TODO 
+								that.send()
+							}, 915204);
+						}
+					});
+			},
+			auth() { //授权
+				let phoneType = uni.getSystemInfoSync().platform //判断手机类型
+				if (phoneType == "android") {
+					this.appId = "uni.UNI9C76CB6"
+					this.appSecurity = "24c593b7037347e08857a6ab05fd231b0509f5bb7cb741078f524f506ad32db8"
+				} else if (phoneType == "ios") {
+					this.appId = "uni.UNIDCD13AC"
+					this.appSecurity = "b01e4805276646eeb25f0fad91de97a4f32e8c2c0e0d42e5b24cc4737e9f040f"
+				}
+				let that = this
+				sdkwx.auth(this.appId, this.appSecurity, this.enterpriseSenderCode, this.environment, function(res) {
+					if (res.type == "onSuccess") {
+						//成功
+						if (res.data.length > 0) {
+							that.restart()
+						}
+						console.log("授权成功")
+						console.log(res)
+					} else if (res.type == "onFailure") {
+						//失败
+						var errorCode = res.data.errorCode; //错误码
+						var errorMsg = res.data.errorMsg; //错误描述
+						console.log("授权失败")
+						console.log(res)
+					}
+					// uni.showModal({
+					// 	content: JSON.stringify(res)
+					// });
+				});
+			},
 		},
-	
+
 		onLaunch: function() {
 			var that = this
 			// #ifdef APP-PLUS
@@ -65,105 +184,137 @@
 			// 			}, cancel => {
 			// 			    // 点击否的回调
 			// 			});
-						
+
 			// 		}
 			// 		console.log(res.networkType);
 			// 	}
 			// });
+			uni.getSystemInfo({
+				success(res) {
+					uni.setStorageSync('phoneType', res)
+				}
+			});
 			console.log(uni.getStorageSync('userInfo'))
-			if(uni.getStorageSync('userInfo')){
+			if (uni.getStorageSync('userInfo')) {
 				that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
-					driverPhone:uni.getStorageSync('userInfo').phone,
+					driverPhone: uni.getStorageSync('userInfo').phone,
 				}).then(res => {
 					if (res.data.authenticationStatus == '已禁用') {
-						
-					// this.isShowAlert = true
-					// this.alertTitle = '账号审核中'
-					// this.confirmText = '退出APP'
-					// this.showCancelButton = false
-					let options = {
-					    title: '提示', 
-						info:'账号审核中',
-					    okText: '退出程序', 
-						infoAlignment:'center',
-						radius:10,
-					    // cancelText: '否',
-						showCancel:false,
-						okButtonColor:'#2772FB'
-					};
-					const native = uni.requireNativePlugin('AJ-Alert');
-					native.showAction(options, result => {
-						// #ifdef APP-PLUS
-						            	if (uni.getSystemInfoSync().platform == 'ios') {
-						            		plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
-						            	} else if (uni.getSystemInfoSync().platform == 'android') {
-						            		plus.runtime.quit();
-						            	}
-						            // #endif
-					    // 点击是的回调, result暂时没有返回内容
-					}, cancel => {
-					    // 点击否的回调
-					});
-					// uni.showModal({
-					//     title: '提示',
-					//     content: '这是一个模态弹窗',
-					// 	showCancel:false,
-					// 	confirmText:'退出app',
-					// 	// confirmColor:'#317AFE',
-					// 	confirmColor:'#F54E40',
-					//     success: function (res) {
-					//         if (res.confirm) {
-					//             // #ifdef APP-PLUS
-					//             	if (uni.getSystemInfoSync().platform == 'ios') {
-					//             		plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
-					//             	} else if (uni.getSystemInfoSync().platform == 'android') {
-					//             		plus.runtime.quit();
-					//             	}
-					//             // #endif
-					//         } else if (res.cancel) {
-					//             console.log('用户点击取消');
-					//         }
-					//     }
-					// });
-			
+
+						// this.isShowAlert = true
+						// this.alertTitle = '账号审核中'
+						// this.confirmText = '退出APP'
+						// this.showCancelButton = false
+						let options = {
+							title: '提示',
+							info: '账号审核中',
+							okText: '退出程序',
+							infoAlignment: 'center',
+							radius: 10,
+							// cancelText: '否',
+							showCancel: false,
+							okButtonColor: '#2772FB'
+						};
+						const native = uni.requireNativePlugin('AJ-Alert');
+						native.showAction(options, result => {
+							// #ifdef APP-PLUS
+							if (uni.getSystemInfoSync().platform == 'ios') {
+								plus.ios.import("UIApplication").sharedApplication().performSelector(
+									"exit")
+							} else if (uni.getSystemInfoSync().platform == 'android') {
+								plus.runtime.quit();
+							}
+							// #endif
+							// 点击是的回调, result暂时没有返回内容
+						}, cancel => {
+							// 点击否的回调
+						});
+						// uni.showModal({
+						//     title: '提示',
+						//     content: '这是一个模态弹窗',
+						// 	showCancel:false,
+						// 	confirmText:'退出app',
+						// 	// confirmColor:'#317AFE',
+						// 	confirmColor:'#F54E40',
+						//     success: function (res) {
+						//         if (res.confirm) {
+						//             // #ifdef APP-PLUS
+						//             	if (uni.getSystemInfoSync().platform == 'ios') {
+						//             		plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
+						//             	} else if (uni.getSystemInfoSync().platform == 'android') {
+						//             		plus.runtime.quit();
+						//             	}
+						//             // #endif
+						//         } else if (res.cancel) {
+						//             console.log('用户点击取消');
+						//         }
+						//     }
+						// });
+
 					} else {
 						console.log(1231233212332312312213)
 					}
 				})
 			}
-			
-			
+
+
 			// #endif
-			 uni.setStorageSync("region", region);
+			uni.setStorageSync("region", region);
 			uni.getSystemInfo({
-			        success:function(e){
-			            Vue.prototype.statusBar = e.statusBarHeight
-			            // #ifndef MP
-			            if(e.platform == 'android') {
-			                Vue.prototype.customBar = e.statusBarHeight + 50
-			            }else {
-			                Vue.prototype.customBar = e.statusBarHeight + 45
-			            }
-			            // #endif
-			            
-			            // #ifdef MP-WEIXIN
-			            let custom = wx.getMenuButtonBoundingClientRect()
-			            Vue.prototype.customBar = custom.bottom + custom.top - e.statusBarHeight
-			            // #endif
-			            
-			            // #ifdef MP-ALIPAY
-			            Vue.prototype.customBar = e.statusBarHeight + e.titleBarHeight
-			            // #endif
-			        }
-			    })
+				success: function(e) {
+					Vue.prototype.statusBar = e.statusBarHeight
+					// #ifndef MP
+					if (e.platform == 'android') {
+						Vue.prototype.customBar = e.statusBarHeight + 50
+					} else {
+						Vue.prototype.customBar = e.statusBarHeight + 45
+					}
+					// #endif
+
+					// #ifdef MP-WEIXIN
+					let custom = wx.getMenuButtonBoundingClientRect()
+					Vue.prototype.customBar = custom.bottom + custom.top - e.statusBarHeight
+					// #endif
+
+					// #ifdef MP-ALIPAY
+					Vue.prototype.customBar = e.statusBarHeight + e.titleBarHeight
+					// #endif
+				}
+			})
 			// #ifdef APP-PLUS
-			var that=this
+			var that = this
 			//判断该用户是否需要开启持续定位
-			if(uni.getStorageSync('userInfo')){
-				this.$request.baseRequest('get', '/orderInfo/getData',  {
-						commonId:uni.getStorageSync('userInfo').id,
-					}).then(res1 => {
-					if(res1.data.length>0){
+			if (uni.getStorageSync('userInfo')) {
+				this.$request.baseRequest('get', '/orderInfo/getData', {
+					commonId: uni.getStorageSync('userInfo').id,
+				}).then(res1 => {
+					console.log("/orderInfo/getData", res1.data)
+					if (res1.data.length > 0) {
+						this.shippingNoteInfos[0].shippingNoteNumber = res1.data[0].orderNo //运单号
+						this.shippingNoteInfos[0].serialNumber = "0000" //分单号
+						this.shippingNoteInfos[0].startCountrySubdivisionCode = res1.data[0]
+							.sendAdCode //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+						this.shippingNoteInfos[0].endCountrySubdivisionCode = res1.data[0]
+							.unsendAdCode //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+						this.shippingNoteInfos[0].startLongitude = res1.data[0]
+							.sendLongitude //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].startLatitude = res1.data[0]
+							.sendLatitude //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].endLongitude = res1.data[0]
+							.unsendLongitude //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].endLatitude = res1.data[0]
+							.unsendLatitude //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].driverName = res1.data[0]
+							.driverName //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+						this.shippingNoteInfos[0].vehicleNumber = res1.data[0]
+							.carNumber //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+						this.shippingNoteInfos[0].startLocationText = res1.data[0]
+							.sendCity //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].endLocationText = res1.data[0]
+							.unloadCity //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].interval = "5000"
+						console.log("查看参数", this.shippingNoteInfos)
+						that.auth()
 						that.$helper.fUN_AmapLocation.start({
 								// intervalTime: 1000 * 60,
 								intervalTime: 5000,
@@ -197,10 +348,11 @@
 								// console.log(this.$helper.gjList)
 								// console.log("条数", uni.getStorageSync('mapGJ').length)
 								if (uni.getStorageSync('mapGJ').length > 100) {
-									console.log(JSON.stringify(uni.getStorageSync('mapGJ')) )
-									this.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo',  {
-												orderId:"cdae6ec34c2349768c490a9fefa03fb3",
-												longitudeLatitude:JSON.stringify(uni.getStorageSync('mapGJ'))   
+									// console.log(JSON.stringify(uni.getStorageSync('mapGJ')))
+									this.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo', {
+											orderId: "cdae6ec34c2349768c490a9fefa03fb3",
+											longitudeLatitude: JSON.stringify(uni.getStorageSync(
+												'mapGJ'))
 										}).then(res => {
 											uni.removeStorageSync('mapGJ');
 											this.$helper.gjList = []
@@ -211,9 +363,9 @@
 								}
 								//判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
 							}
-						);	
+						);
 					}
-				
+
 				})
 			}
 			// this.$helper.fUN_AmapLocation.stop({}, result => {
@@ -234,7 +386,7 @@
 			// 		}
 			// 	); 
 			// });
-			
+
 			// fUN_AmapLocation.permission({}, result => {
 			//     console.log('====fUN_AmapLocation定位====');
 			// });
@@ -252,15 +404,16 @@
 			// 		console.log('====fUN_AmapLocation定位====', JSON.stringify(result));
 			// 	}
 			// ); 
-			
-       // let  isOpenLocation= permision.checkSystemEnableLocation() 
-	   // console.log("isOpenLocation",isOpenLocation)
-	   // this.requestAndroidPermission('android.permission.ACCESS_FINE_LOCATION')
+
+			// let  isOpenLocation= permision.checkSystemEnableLocation() 
+			// console.log("isOpenLocation",isOpenLocation)
+			// this.requestAndroidPermission('android.permission.ACCESS_FINE_LOCATION')
 			let type = uni.getSystemInfoSync().platform
-			console.log(type) 
+			console.log(type)
 			if (type == "android") {
 				appUpdate()
 			}
+
 			// plus.push.getClientInfoAsync((info) => {
 			// 	var name = 'clientId'
 			// 	var value = info.clientid
@@ -351,7 +504,7 @@
 		},
 		onShow: function() {
 			console.log('App Show')
-			
+
 		},
 		onHide: function() {
 			console.log('App Hide')

+ 174 - 0
common/TabBarView.js

@@ -0,0 +1,174 @@
+
+/**
+ * App端 手绘 tabbar 可以实现凸起按钮
+ * version:1.0.2
+ */
+export default class TabBarView{
+	constructor(){
+		//tabbar 配置
+		this.configs = {
+			background:'#fff', //背景
+			height: 50 , //高度
+			fontSize: 15, //字体大小
+			iconWidth: 24, //图片大小
+			borderStyle:'#F5F5F5', //bordercolor
+			color:'#000000', //字体颜色
+			selectedColor:'#038AFF',
+			midIconWidth:60 //中间凸起按钮大小
+		}
+		
+		//白名单 不需要配置
+		this.whiteList = [];
+		
+		// //tabbar 列表 midButton:true 可实现凸起 想凸几个凸几个
+		this.tabBarList =[{
+				icon: "./static/images/common/huoyuan@2x(1).png",
+				selectIcon: "./static/images/common/huoyuan@2x.png",
+				name: "货源",
+				path: "/pages/goodSource/index"
+				
+			},
+			{
+				"path": "/pages/riders/index",
+				"icon": "static/images/common/zhaoche.png",
+				"selectIcon": "static/images/common/zhaoche_check.png",
+				"name": "车友"
+			},
+			{
+				"path": "/pages/order/index",
+				"icon": "/static/images/common/dingdan@2x(1).png",
+				"selectIcon": "/static/images/common/dingdan@2x.png",
+				"name": "订单"
+			},
+			{
+				"path": "/pages/news/index",
+				"icon": "/static/images/common/mesicon@2x.png",
+				"selectIcon": "/static/images/common/xiaoxi@2x.png",
+				"name": "消息"
+			},
+			{
+				"path": "/pages/mine/index",
+				"icon": "/static/images/common/iconmy@2x.png",
+				"selectIcon": "/static/images/common/my@2x.png",
+				"name": "我的"
+			}
+		]
+		
+		//tabbarItem宽度
+		this.tabbarItemWidth = Math.floor( 100 / this.tabBarList.length );
+	}
+	
+	//开局初始化tabbar
+	init(){
+		this.whiteList = [];
+		//创建tabbar盒子
+		const tabBarBox = new plus.nativeObj.View('tabBarBox', {
+			position:'dock',
+			dock:'bottom',
+			bottom:'0px',
+			left:'0px',
+			width:'100%',
+			height: this.configs.height + 'px',
+			backgroundColor:this.configs.background
+		},[
+			{
+				tag:'rect',
+				id:'taBarBoxRect',
+				rectStyles:{
+					color:this.configs.borderStyle
+				},
+				position:{
+					top:'0px',
+					left:'0px',
+					width:"100%",
+					height:'1px'
+				}
+			}
+		]);
+		
+		//显示tabbar 盒子
+		tabBarBox.show();
+		
+		//创建tabbar item
+		for(let i = 0; i < this.tabBarList.length; i++){
+			const tabItem = this.tabBarList[i];
+			this.whiteList.push(tabItem.path);
+			const tabbarItem = new plus.nativeObj.View('tabBarItem' + i,this.setTabBarStyle(tabItem.midButton,i),this.drawTabBar(false,tabItem));
+			//添加tabbarItem 事件 根据自己需求 默认调转页面
+			tabbarItem.addEventListener("click", function(e) {
+				uni.switchTab({
+					url:tabItem.path
+				})
+			}, false);
+		}
+	}
+	
+	//监听tabbar
+	$watch(){
+		setTimeout(()=>{
+			const pages = getCurrentPages();
+			const page = pages[pages.length - 1];
+			const path = '/'+ page.route;
+			const tabBarBox = plus.nativeObj.View.getViewById('tabBarBox');
+			for(let i = 0; i < this.tabBarList.length; i++){
+				const tabItem = this.tabBarList[i];
+				const tabBarItem = plus.nativeObj.View.getViewById('tabBarItem' + i);
+				tabBarItem.draw(this.drawTabBar(tabItem.path === path,tabItem))
+				if(this.whiteList.indexOf(path) != -1){
+					tabBarItem.show();
+				}else{
+					tabBarItem.hide();
+				}
+			}
+			if(this.whiteList.indexOf(path) != -1){
+				tabBarBox.show();
+			}else{
+				tabBarBox.hide();
+			}
+		},0)
+	}
+	
+	//设置 tabbar 风格
+	setTabBarStyle(midButton,i){
+		return {
+			position:'dock',
+			bottom:'0px',
+			left:this.tabbarItemWidth * i + '%',
+			dock:'bottom',
+			width: this.tabbarItemWidth + '%' ,
+			height: midButton ? this.configs.height + (this.configs.midIconWidth / 2) + 'px' : this.configs.height - 1 + 'px'
+		}
+	}
+	
+	//画 tabbar 样式
+	drawTabBar(select,tabItem){
+		return	[
+					{
+						tag:'img',
+						id:'tabItemIcon',
+						src:select ? tabItem.selectIcon : tabItem.icon,
+						position:{
+							top:tabItem.midButton ? '0px' : '4px',
+							left:'auto',
+							width:tabItem.midButton ? this.configs.midIconWidth : this.configs.iconWidth,
+							height:tabItem.midButton ? this.configs.midIconWidth : this.configs.iconWidth,
+						}
+					},
+					{
+						tag:'font',
+						id:'tabItemFont',
+						text: tabItem.name,
+						textStyles:{
+							size:'10px',
+							color:select ? this.configs.selectedColor : this.configs.color,
+						},
+						position:{
+							bottom:'5px',
+							left:'auto',
+							width:'100%',
+							height:'12px' 
+						}
+					}
+				]
+	}
+}

+ 19 - 0
common/helper.js

@@ -15,6 +15,23 @@ const imgTypeList = [{
 		name: '拍照',
 	}
 ]
+// 当前日期是否超过今天(校验有效期)
+const periodOfValidity=function(year1,month1,day1){
+	let nowDate = new Date();
+	let year = nowDate.getFullYear()
+	let month = nowDate.getMonth() + 1
+	let day = nowDate.getDate()
+	if(year1<year){
+		return false
+	}
+	if(year1==year&&month1<month){
+		return false
+	}
+	if(year1==year&&month1==month&&day1<=day){
+		return false
+	}
+	return true
+}
 const makeValidityPeriod = function(type,yearnum) {
 	console.log(yearnum)
 	//获取当前年
@@ -173,6 +190,7 @@ const filterArea = (q) => {
 	}
 	return q
 }
+
 // 根据当前时间获取本周一到本周日日期
 function getDates() {
 	// var new_Date = new Date(t2)
@@ -436,6 +454,7 @@ export default {
 	imgType,
 	imgTypeList,
 	makeValidityPeriod,
+	periodOfValidity,
 	getProvinceAbbreviation,
 	filterUrban,
 	filterArea,

+ 1 - 1
components/bert-suggest/suggest.vue

@@ -6,7 +6,7 @@
 				<view style='position:absolute;right:22px;bottom:16px;font-size:13px;'>{{data.content.length}}/150个字</view>
 			</uni-card>
 			<uni-card class="box contact" :isFull="true" title="联系方式" >
-				<input v-model="data.contact" placeholder="请输入您的手机号,方便我们联系您" />
+				<input v-model="data.contact" placeholder="请输入您的手机号,方便我们联系您" maxlength="11" type="number" />
 			</uni-card>
 		</view>
 		

+ 0 - 1
components/itmister-address-picker/city_other.json

@@ -5,7 +5,6 @@
 { "name": "天津", "city":[{"name":"天津", "area":["全市","和平区","河东区","河西区","南开区","河北区","红桥区","塘沽区","汉沽区","大港区","东丽区","西青区","津南区","北辰区","武清区","宝坻区","宁河县","静海县","蓟  县"]}]},
 
 { "name": "河北", "city":[
-         {"name":"全省", "area":[]},
          {"name":"石家庄", "area":["全市","长安区","桥东区","桥西区","新华区","郊  区","井陉矿区","井陉县","正定县","栾城县","行唐县","灵寿县","高邑县","深泽县","赞皇县","无极县","平山县","元氏县","赵  县","辛集市","藁","晋州市","新乐市","鹿泉市"]},
 
          {"name":"唐山", "area":["全市","路南区","路北区","古冶区","开平区","新  区","丰润县","滦  县","滦南县","乐亭县","迁西县","玉田县","唐海县","遵化市","丰南市","迁安市"]},

+ 0 - 1
components/itmister-address-picker/itmister-address-picker.nvue

@@ -80,7 +80,6 @@
 			this.value = this.addressIndex;
 			// let arrays = {}
 			// if(this.wholeCountry){
-			// 	debugger
 			// 	let cityDataCopy = this.cityData
 			// 	 arrays = {
 			// 		city:[{area:[],name:''}],

+ 727 - 0
components/itmister-date-picker/itmister-date-picker.nvue

@@ -0,0 +1,727 @@
+<template>
+	<view>
+		<view v-if="isShow">
+			<view class="date-picker-mask" bubble='true' @click="hide" :class="[isOpen?'show-date-picker-mask':'hide-date-picekr-mask']"
+			 :style="{backgroundColor:maskColor}"></view>
+			<view class="date-picker-container" @click.stop="handleClick" :class="[isOpen?'show-date-picker':'hide-date-picekr']">
+
+				<!-- 操作 -->
+				<view class="date-picker-title row between-center">
+					<text class="date-picker-cancel" @click="hide">取消</text>
+					<text class="date-picker-confirm" @click="dateConfirm">确定</text>
+				</view>
+				<!-- 内容 -->
+				<picker-view class="date-picker-box" v-if="visible" :indicator-style="indicatorStyle" :value="value" @change="bindChange">
+					<picker-view-column class="center">
+						<view class="date-picker-item center" v-for="(item,index) in years" :key="index">
+							<text >{{item}}</text>
+						</view>
+					</picker-view-column>
+					<picker-view-column>
+						<view class="date-picker-item center" v-for="(item,index) in months" :key="index">
+							<text>{{item}}</text>
+						</view>
+					</picker-view-column>
+					<picker-view-column>
+						<view class="date-picker-item center" v-for="(item,index) in days" :key="index">
+							<text>{{item}}</text>
+						</view>
+					</picker-view-column>
+				</picker-view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	var that
+	/**
+	 * 日期控件
+	 * @property {String} maskColor 模态框背景色
+	 * @property {String,Number} checkYear 控件打开默认选中的年份(未传值或传空字符串默认选中的年份为当年)
+	 * @property {String,Number} checkMonth 控件打开默认选中的月份(未传值或传空字符串默认选中的年份为当月)
+	 * @property {String,Number} checkDay 控件打开默认选中的日期(未传值或传空字符串默认选中的年份为当日)
+	 * @property {String,Number} startYear 开始年份,默认为1940
+	 * @property {String,Number} futureYear 终止年份,今年向后多少年,可选的最晚年份(截止日期未传时生效)
+	 * @property {Boolean} periodOfValidity = [true | false] 是否是有效期(开启之后选择今天及之前的日期提示日期已过期)
+	 * @property {Boolean} isShow = [true | false] 开启|关闭
+	 * @property {String} overdueContent 开启periodOfValidity之后,选择今天及之前的日期提示日期已过期的内容文字
+	 * @property {Object} endDate 截止日期,可选的最晚日期
+	 * @property {String,Number} dateStatus 日期类型,默认0没有长期和随时,1长期,2随时
+	 */
+	export default {
+		name: "datePicker",
+		props: {
+			maskColor: { 
+				type: String,
+				default: 'rgba(0,0,0,0.3)'
+			},
+			checkYear:{
+				type: [String,Number],
+				default: new Date().getFullYear()
+			},
+			checkMonth:{
+				type: [String,Number],
+				default: new Date().getMonth() + 1
+			},
+			checkDay:{
+				type: [String,Number],
+				default: new Date().getDate()
+			},
+			startYear:{
+				type: [String,Number],
+				default: 1940
+			},
+			futureYear:{
+				type: [String,Number],
+				default: 10
+			},
+			periodOfValidity:{
+				type: Boolean,
+				default: false
+			},
+			overdueContent:{
+				type: String,
+				default: ''
+			},
+			endDate: {
+			  type: Object,
+			  default: () => ({})
+			},
+			dateStatus:{
+				type: [String,Number],
+				default: 0
+			}
+		},
+		data() {
+			const date = new Date();
+			let years = [],months = [];
+			if(this.dateStatus==1){
+				years = ['长期'];
+				months = [''];
+			}
+			if(this.dateStatus==2){
+				years = ['随时'];
+				months = [''];
+			}
+			const currectyear = date.getFullYear()
+			const currectmonth = date.getMonth() + 1
+			const currectday = date.getDate()
+			// console.log(this.checkYear)
+			// const month = date.getMonth() + 1
+			// const day = date.getDate();
+			
+			// 传截止日期设置起始年份和终止年份
+			if(JSON.stringify(this.endDate)!='{}'){
+				if(this.endDate.year&&this.endDate.year<currectyear){
+					this.showtoast('截止日期年份必须大于等于当前年份')
+					return
+				}
+				if(this.endDate.year&&this.endDate.year==currectyear&&this.endDate.month&&this.endDate.month<currectmonth){
+					this.showtoast('截止日期月份必须大于等于当前月份')
+					return
+				}
+				if(this.endDate.year&&this.endDate.year==currectyear&&this.endDate.month&&this.endDate.month==currectmonth&&this.endDate.day&&this.endDate.day<currectday){
+					this.showtoast('截止日期必须大于等于今天')
+					return
+				}
+				var obj=this.createExpirationDate()
+				// console.log(obj)
+				years=obj.years
+				months=obj.months
+			}
+			
+			const year = this.checkYear?this.checkYear:currectyear
+			const month = this.checkMonth?Number(this.checkMonth):currectmonth
+			const day = this.checkDay?Number(this.checkDay):currectday
+			
+			console.log(year,month,day)
+			// 未传截止日期设置起始年份和终止年份
+			if(JSON.stringify(this.endDate)=='{}'){
+				for (let i = this.startYear; i <= currectyear + this.futureYear; i++) {
+					years.push(i);
+				}
+				if(this.dateStatus==0&&year=='长期'||this.dateStatus==0&&year=='随时'){
+					this.showtoast('当前日期选择器未带长期和随时选项,请修改当前类型')
+					return
+				}
+				if(year!='长期'&&year!='随时'){
+					for (let i = 1; i <= 12; i++) {
+						months.push(i);
+					}
+				}
+			}
+			
+			return {
+				isShow: false, // 是否弹出
+				isOpen: false,
+
+				years,
+				months,
+				days: [''],
+				year,
+				month,
+				day,
+				value: this.dateStatus==0?[Number(year - this.startYear), month-1 , day]:year=='长期'||year=='随时'?[0,0,0]:[Number(year - this.startYear+1), month , day], // 默认选中当天
+				visible: true,
+				indicatorStyle: `height: ${Math.round(uni.getSystemInfoSync().screenWidth/(750/100))}px;`
+			}
+		},
+		methods: {
+			setYearList(){
+				const date = new Date();
+				let years = [],months = [];
+				if(this.dateStatus==1){
+					years = ['长期'];
+					months = [''];
+				}
+				if(this.dateStatus==2){
+					years = ['随时'];
+					months = [''];
+				}
+				const currectyear = date.getFullYear()
+				const currectmonth = date.getMonth() + 1
+				const currectday = date.getDate()
+				// console.log(this.checkYear)
+				// const month = date.getMonth() + 1
+				// const day = date.getDate();
+				
+				// 传截止日期设置起始年份和终止年份
+				if(JSON.stringify(this.endDate)!='{}'){
+					if(this.endDate.year&&this.endDate.year<currectyear){
+						this.showtoast('截止日期年份必须大于等于当前年份')
+						return
+					}
+					if(this.endDate.year&&this.endDate.year==currectyear&&this.endDate.month&&this.endDate.month<currectmonth){
+						this.showtoast('截止日期月份必须大于等于当前月份')
+						return
+					}
+					if(this.endDate.year&&this.endDate.year==currectyear&&this.endDate.month&&this.endDate.month==currectmonth&&this.endDate.day&&this.endDate.day<currectday){
+						this.showtoast('截止日期必须大于等于今天')
+						return
+					}
+					var obj=this.createExpirationDate()
+					// console.log(obj)
+					years=obj.years
+				}
+				
+				// console.log(year,month,day)
+				// 未传截止日期设置起始年份和终止年份
+				if(JSON.stringify(this.endDate)=='{}'){
+					for (let i = this.startYear; i <= currectyear + this.futureYear; i++) {
+						years.push(i);
+					}
+				}
+				// console.log(years,2222222)
+				this.years=years
+			},
+			createExpirationDate(){
+				let years = [],months = [];
+				if(this.dateStatus==1){
+					years = ['长期'];
+					months = [''];
+				}
+				if(this.dateStatus==2){
+					years = ['随时'];
+					months = [''];
+				}
+				var year=this.checkYear?this.checkYear:this.year?this.year:new Date().getFullYear()
+				if(this.dateStatus==0&&year=='长期'||this.dateStatus==0&&year=='随时'){
+					this.showtoast('当前日期选择器未带长期和随时选项,请修改当前类型')
+					return
+				}
+				for (let i = this.startYear; i <= this.endDate.year; i++) {
+					years.push(i);
+				}
+				
+				if(year==this.endDate.year&&this.endDate.month){
+					if(year!='长期'||year!='随时'){
+						for (let i = 1; i <= this.endDate.month; i++) {
+							months.push(i);
+						}
+					}
+				}
+				if(year!=this.endDate.year){
+					for (let i = 1; i <= 12; i++) {
+						months.push(i);
+					}
+				}
+				return {years,months}
+			},
+			showtoast(content){
+				// #ifdef APP-PLUS
+				plus.nativeUI.toast(`<font style=\"font-size:15px;margin:20px;\" color="#f56c6c">&nbsp&nbsp&nbsp&nbsp${content?content:this.overdueContent}!&nbsp&nbsp&nbsp&nbsp</font>`, {
+					icon : "icon URL",// eg. "/img/add.png"
+					duration : "long",// 持续3.5s,short---2s
+					align : "center",// 水平居中
+					verticalAlign : "center",// 垂直底部
+					background:'#FEF0F0',
+					type: "richtext",
+				})
+				// #endif
+				// #ifdef H5
+				uni.showToast({
+					title: (content?content:this.overdueContent)+'!',
+					icon:'none',
+					duration: 2000
+				});
+				// #endif
+			},
+			setValue(){
+				var val=[]
+				console.log(this.days)
+				for (let i = 0; i < this.years.length; i++) {
+					if(this.year==this.years[i]){
+						val[0]=i
+					}
+				}
+				for (let i = 0; i < this.months.length; i++) {
+					if(Number(this.month)==this.months[i]){
+						val[1]=i
+					}
+				}
+				for (let i = 0; i < this.days.length; i++) {
+					if(Number(this.day)==this.days[i]){
+						val[2]=i
+					}
+				}
+				return val
+			},
+			// 选中日期
+			dateConfirm() {
+				if(this.month==''&&this.year!='长期'&&this.month==''&&this.year!='随时'){
+					this.showtoast('未选择月份')
+					return
+				}
+				if(this.day==''&&this.year!='长期'&&this.day==''&&this.year!='随时'){
+					this.showtoast('未选择日期')
+					return
+				}
+				if(this.periodOfValidity&&this.year!='长期'&&this.periodOfValidity&&this.year!='随时'){
+					const date=new Date()
+					const currectyear = date.getFullYear()
+					const currectmonth = date.getMonth() + 1
+					const currectday = date.getDate()
+					if(this.year<currectyear){
+						this.showtoast()
+						return
+					}
+					if(this.year==currectyear&&this.month<currectmonth){
+						this.showtoast()
+						return
+					}
+					if(this.year==currectyear&&this.month==currectmonth&&this.day<=currectday){
+						this.showtoast()
+						return
+					}
+				}
+				let dateobj={
+					year:this.year,
+					month:this.month?this.month > 9 ? this.month : '0' + this.month:'',
+					day:this.day?this.day > 9 ? this.day :'0' + this.day:'',
+					date:''
+				}
+				if(this.year!='长期'&&this.year!='随时'){
+					this.value=this.setValue()
+					 dateobj.date= this.year + '-' + (this.month > 9 ? this.month : '0' + this.month) + '-' + (this.day > 9 ? this.day :
+					'0' + this.day);
+				}else{
+					this.value=[0,0,0]
+					dateobj.date = this.year
+				}
+				
+				// 发送一个点击事件,并把当前选中的日期发送出去
+				
+				this.$emit('dateConfirm', dateobj);
+				this.hide();
+				
+			},
+
+			bindChange(e) {
+				const date = new Date();
+				const year = date.getFullYear()
+				const month = date.getMonth() + 1
+				const day = date.getDate()
+				// console.log(this.value,e)
+				
+				const val = e.detail.value;
+				this.year = this.years[val[0]];
+				this.month = this.months[val[1]];
+				this.day = this.days[val[2]];
+				
+				// this.value=[this.year, this.month, this.day]
+			},
+
+			// 弹出
+			show() {
+				this.isShow = true;
+				this.$nextTick(() => {
+					setTimeout(() => {
+						this.isOpen = true;
+					}, 20);
+				});
+			},
+
+			// 关闭
+			hide() {
+				this.isOpen = false;
+				setTimeout(() => {
+					this.isShow = false;
+				}, 200);
+			},
+
+			// 阻止冒泡
+			handleClick(event) {
+				event.stopPropagation();
+			}
+		},
+		watch: {
+			"checkYear":{
+				handler(val){
+					// console.log(val)
+					this.checkYear=val
+					this.year=val
+					this.$nextTick(() => {
+						setTimeout(() => {
+							if(val=='长期'||val=='随时'){
+								this.value=[0,0,0]
+							}
+						}, 500);
+					})
+				}
+			},
+			'dateStatus':{
+				handler(val){
+					this.dateStatus=val
+					this.setYearList()
+					// console.log(this.years,3333333)
+				},
+				deep: true,
+				immediate: true
+			},
+			"endDate":{
+				handler(val){
+					this.endDate=val
+				},
+				deep: true,
+				immediate: true
+			},
+			"checkMonth":{
+				handler(val){
+					this.checkMonth=val
+					this.month=val
+					this.$nextTick(() => {
+						setTimeout(() => {
+							// console.log(this.month,this.day,this.days)
+							if(val!='长期'&&val!='随时'){
+								this.value=this.setValue()
+								// console.log(this.value)
+							}
+						}, 500);
+					})
+					// this.$nextTick(() => {
+					// 	setTimeout(() => {
+					// 		if(val!='长期'&&val!='随时'){
+					// 			this.value=this.setValue()
+					// 			// console.log(this.value)
+					// 		}else{
+					// 			this.value=[0,0,0]
+					// 		}
+					// 	}, 350);
+					// })
+				}
+			},
+			"checkDay":{
+				handler(val){
+					console.log(val,333333)
+					this.checkDay=val
+					this.day=val
+					// this.$nextTick(() => {
+					// 	setTimeout(() => {
+					// 		if(val!='长期'&&val!='随时'){
+					// 			this.value=this.setValue()
+					// 			// console.log(this.value)
+					// 		}else{
+					// 			this.value=[0,0,0]
+					// 		}
+					// 	}, 350);
+					// })
+				}
+			},
+			"month": { // 监听月份变化,改变当前月份天数值 
+				handler(val) {
+					console.log(this.endDate)
+					if (val < 8&&this.year!='长期'&&val < 8&&this.year!='随时') {
+						if (val % 2 !== 0) {
+							this.days = [''];
+							if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
+								for (let i = 1; i <= this.endDate.day; i++) {
+									this.days.push(i);
+								}
+							}else{
+								for (let i = 1; i <= 31; i++) {
+									this.days.push(i);
+								}
+							}
+						} else {
+							this.days = [''];
+							if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
+								for (let i = 1; i <= this.endDate.day; i++) {
+									this.days.push(i);
+								}
+							}else{
+								for (let i = 1; i <= 30; i++) {
+									this.days.push(i);
+								}
+							}
+						}
+					}
+					if (val > 7&&this.year!='长期'&&val > 7&&this.year!='随时') {
+						if (val % 2 === 0) {
+							this.days = [''];
+							if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
+								for (let i = 1; i <= this.endDate.day; i++) {
+									this.days.push(i);
+								}
+							}else{
+								for (let i = 1; i <= 31; i++) {
+									this.days.push(i);
+								}
+							}
+						} else {
+							this.days = [''];
+							if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
+								for (let i = 1; i <= this.endDate.day; i++) {
+									this.days.push(i);
+								}
+							}else{
+								for (let i = 1; i <= 30; i++) {
+									this.days.push(i);
+								}
+							}
+						}
+					}
+					if (val === 2&&this.year!='长期'&&val === 2&&this.year!='随时') {
+						if (this.year % 4 === 0) {
+							this.days = [''];
+							if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
+								for (let i = 1; i <= this.endDate.day; i++) {
+									this.days.push(i);
+								}
+							}else{
+								for (let i = 1; i <= 29; i++) {
+									this.days.push(i);
+								}
+							}
+						} else {
+							this.days = [''];
+							if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
+								for (let i = 1; i <= this.endDate.day; i++) {
+									this.days.push(i);
+								}
+							}else{
+								for (let i = 1; i <= 28; i++) {
+									this.days.push(i);
+								}
+							}
+						}
+					}
+				},
+				deep: true,
+				immediate: true
+			},
+			"year": { // 监听年份变化,处理2月份天数变化
+				handler(val) {
+					if(val=='长期'||val=='随时'){
+						this.months=[''];
+						this.days = [''];
+					}else{
+						const months = [''];
+						// console.log(this.endDate)
+						if(this.endDate.year&&val===this.endDate.year&&this.endDate.month){
+							for (let i = 1; i <= this.endDate.month; i++) {
+								months.push(i);
+							}
+						}else{
+							for (let i = 1; i <= 12; i++) {
+								months.push(i);
+							}
+						}
+						
+						this.months=months
+						if (val % 4 === 0) {
+							if (this.month === 2) {
+								this.days = [''];
+								if(this.endDate.year&&val===this.endDate.year&&this.endDate.month&&this.endDate.month===this.month&&this.endDate.day){
+									for (let i = 1; i <= this.endDate.day; i++) {
+										this.days.push(i);
+									}
+								}else{
+									for (let i = 1; i <= 29; i++) {
+										this.days.push(i);
+									}
+								}
+							}
+						} else {
+							if (this.month === 2) {
+								this.days = [''];
+								if(this.endDate.year&&val===this.endDate.year&&this.endDate.month&&this.endDate.month===this.month&&this.endDate.day){
+									for (let i = 1; i <= this.endDate.day; i++) {
+										this.days.push(i);
+									}
+								}else{
+									for (let i = 1; i <= 28; i++) {
+										this.days.push(i);
+									}
+								}
+							}
+						}
+					}
+					
+				}
+			},
+			deep: true,
+			immediate: true
+		}
+	}
+</script>
+
+<style lang="scss">
+	.date-picker-mask {
+		position: fixed;
+		left: 0;
+		right: 0;
+		top: 0;
+		bottom: 0;
+		z-index: 99988;
+	}
+
+	.date-picker-container {
+		position: fixed;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		z-index: 99999;
+		background-color: #FFFFFF;
+	}
+
+	.show-date-picker-mask {
+		transition-property: opacity;
+		transition-duration: 0.2s;
+		transition-timing-function: ease;
+		opacity: 1;
+	}
+
+	.hide-date-picekr-mask {
+		transition-property: opacity;
+		transition-duration: 0.2s;
+		transition-timing-function: ease;
+		opacity: 0;
+	}
+
+	.show-date-picker {
+		transition-property: transform, opacity;
+		transition-duration: 0.2s;
+		transition-timing-function: ease;
+		transform: translateY(0);
+		opacity: 1;
+		/* #ifndef APP-PLUS-NVUE */
+		-moz-transition-property: transform, opacity;
+		-webkit-transition-property: transform, opacity;
+		-o-transition-property: transform, opacity;
+
+		-moz-transition-duration: 0.2s;
+		-webkit-transition-duration: 0.2s;
+		-webkit-transition-duration: 0.2s;
+
+		-moz-transition-timing-function: ease;
+		-webkit-transition-timing-function: ease;
+		-o-transition-timing-function: ease;
+
+		-moz-transform: translateY(0);
+		-webkit-transform: translateY(0);
+		-o-transform: translateY(0);
+		/* #endif */
+	}
+
+	.hide-date-picekr {
+		transition-property: transform, opacity;
+		transition-duration: 0.2s;
+		transition-timing-function: ease;
+		transform: translateY(500px);
+		opacity: 1;
+		/* #ifndef APP-PLUS-NVUE */
+		-moz-transition-property: transform, opacity;
+		-webkit-transition-property: transform, opacity;
+		-o-transition-property: transform, opacity;
+
+		-moz-transition-duration: 0.2s;
+		-webkit-transition-duration: 0.2s;
+		-webkit-transition-duration: 0.2s;
+
+		-moz-transition-timing-function: ease;
+		-webkit-transition-timing-function: ease;
+		-o-transition-timing-function: ease;
+
+		-moz-transform: translateY(500px);
+		-webkit-transform: translateY(500px);
+		-o-transform: translateY(500px);
+		/* #endif */
+	}
+
+	// 确定、取消
+	.date-picker-title {
+		height: 100rpx;
+		padding: 0 20rpx;
+		// box-shadow: 0 1rpx 1rpx #e4e4e4;
+	}
+
+	.date-picker-confirm {
+		padding: 10rpx 30rpx;
+		font-size: 32rpx;
+		color: #007AFF;
+	}
+
+	.date-picker-cancel {
+		padding: 10rpx 30rpx;
+		font-size: 32rpx;
+		// color: red;
+	}
+
+	// 内容
+	.date-picker-box {
+		width: 750rpx;
+		height: 500rpx;
+		padding: 0 20rpx;
+		/* #ifndef APP-PLUS-NVUE */
+		box-sizing: border-box;
+		/* #endif */
+		background-color: #FFF;
+	}
+
+	.date-picker-item {
+		height: 100rpx;
+	}
+
+	// flex
+	.row {
+		/* #ifndef APP-PLUS-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+
+	}
+
+	.center {
+		/* #ifndef APP-PLUS-NVUE */
+		display: flex;
+		/* #endif */
+		justify-content: center;
+		align-items: center;
+	}
+
+	.between-center {
+		justify-content: space-between;
+		align-items: center;
+	}
+</style>

+ 2 - 2
config/index.js

@@ -1,8 +1,8 @@
 const dev = {
 	// baseUrlNew: 'https://api.changyuntong56.com',
-	baseUrlNew: 'https://apitest.changyuntong56.com',
+	// baseUrlNew: 'https://apitest.changyuntong56.com',
 	// baseUrlNew: 'https://apitest.eliangeyun.com',
-	// baseUrlNew: 'http://192.168.110.9:8099',
+	baseUrlNew: 'http://192.168.110.9:8099',
 	// baseUrlNew: 'http://192.168.110.82:8999',
 	// baseUrlNew: 'http://192.168.1.119:8999',
 	h5Appid: 'wxb66b599f7f61b46f',

+ 6 - 2
manifest.json

@@ -18,9 +18,9 @@
         },
         /* 模块配置 */
         "modules" : {
-            "Maps" : {},
             "Geolocation" : {},
-            "iBeacon" : {}
+            "iBeacon" : {},
+            "Maps" : {}
         },
         /* 应用发布信息 */
         "distribute" : {
@@ -29,6 +29,8 @@
                 "permissions" : [
                     "<uses-feature android:name=\"android.hardware.camera\"/>",
                     "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
@@ -39,11 +41,13 @@
                     "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                     "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.INTERNET\"/>",
                     "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
                     "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
                     "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"

+ 6 - 0
pages.json

@@ -76,6 +76,12 @@
 				"navigationStyle": "custom"
 			}
 
+		},{
+			"path": "pages/mine/index1",
+			"style": {
+				"navigationBarTitleText": "测试定位",
+				"enablePullDownRefresh": false
+			}
 		},
 		{
 			"path": "pages/public/login",

+ 21 - 7
pages/goodSource/cargoOwnerSee.vue

@@ -87,10 +87,10 @@
 								<view class="evaluate_name">{{item.driverName}}</view>
 								<view class="evaluate_date m-top10">{{objectInfo.createDate.split(' ')[0]}}</view>
 								<view class="flex m-top10">
-									<view class="branch_css ">{{item.count}}</view>
+									<view class="branch_css ">{{item.ownerScoreObtained}}</view>
 									<view class="">
-										<start count="5" v-model="item.count" size="35" activeColor="#ffaa00" :size="18"
-											:allowHalf='true' :readonly='true'>
+										<start count="5" v-model="item.ownerScoreObtained" size="35" activeColor="#ffaa00" :size="18"
+											:allowHalf='true' :disabled='true'>
 										</start>
 									</view>
 								</view>
@@ -98,7 +98,7 @@
 									{{item.driverContent}}
 								</view>
 								<view style='flex-wrap: wrap;' class='flex'>
-									<u--image style='margin:7rpx;border:1px solid #ccc;' v-for="(item,index) in item.imgList" :src="item" width='170rpx'
+									<u--image style='margin:7rpx;border:1px solid #ccc;' v-for="(item1,index) in item.imgList" @click='ylImg(item.imgList)' :src="item1" width='170rpx'
 										height='170rpx'>
 									</u--image>
 								</view>
@@ -165,6 +165,20 @@
 			this.show = true
 		},
 		methods: {
+			ylImg(src) {
+				uni.previewImage({
+					urls: src,
+					longPressActions: {
+						itemList: ['发送给朋友', '保存图片', '收藏'],
+						success: function(data) {
+							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
+						},
+						fail: function(err) {
+							console.log(err.errMsg);
+						}
+					}
+				});
+			},
 			selectTypeClose() {
 				this.show = false
 			},
@@ -220,9 +234,9 @@
 								that.list[i].imgList = that.list[i].driverUrl.split(',')
 							}
 
-							that.list[i].count = (Number(that.list[i].ownerCredit) + Number(that.list[i]
-								.tranEfficiency) + Number(that.list[i].freightPayment) + Number(that.list[i]
-								.serviceQuality) + Number(that.list[i].comprehensiveSatisfaction)) / 15 * 5
+							// that.list[i].count = (Number(that.list[i].ownerCredit) + Number(that.list[i]
+							// 	.tranEfficiency) + Number(that.list[i].freightPayment) + Number(that.list[i]
+							// 	.serviceQuality) + Number(that.list[i].comprehensiveSatisfaction)) / 15 * 5
 						}
 						that.mescroll.endBySize(res.data.records.length, res.data.total);
 						uni.hideLoading()

+ 323 - 294
pages/goodSource/index.vue

@@ -1,7 +1,7 @@
 <!-- 货源 -->
 <template>
-	<view  @touchend="end" @touchmove="move" :class="{popupShow:isShowAlert}" class="content">
-<!-- 		<fh-no-network></fh-no-network> -->
+	<view @touchend="end" @touchmove="move" :class="{popupShow:isShowAlert}" class="content">
+		<!-- 		<fh-no-network></fh-no-network> -->
 		<view class="banner">
 			<image class="banner-img" src="@/static/images/goodSource/banner@2x.png" mode='widthFix'></image>
 			<view class="head flex s-row paddingr35">
@@ -33,7 +33,9 @@
 						}" :class="scrollTop>1200?'fixed':''"></u-tabs>
 			<view class="tab-right" @click="selectType">
 				<view>{{pickerSelect}}</view>
-				<image style='width:8px;height:8px;margin-left:5px;' :src="!showMenu?'../../static/images/order/xiala.png':'../../static/images/order/shangla.png'" mode=""></image>
+				<image style='width:8px;height:8px;margin-left:5px;'
+					:src="!showMenu?'../../static/images/order/xiala.png':'../../static/images/order/shangla.png'"
+					mode=""></image>
 				<!-- <u-icon name="arrow-down" size="20"></u-icon> -->
 			</view>
 		</view>
@@ -48,7 +50,9 @@
 							v-if="good.freightAdvance==1"></image>
 						<view class="flex align-center">
 							<view class="item1">
-								<view class="ssx">{{$helper.getProvinceAbbreviation(good.sendPrivate?good.sendPrivate:good.sendCity)}}</view>
+								<view class="ssx">
+									{{$helper.getProvinceAbbreviation(good.sendPrivate?good.sendPrivate:good.sendCity)}}
+								</view>
 								<view class="level2-title">{{$helper.filterUrban(good.sendCity)}}
 									{{$helper.filterArea(good.sendArea)}}
 								</view>
@@ -57,7 +61,9 @@
 							<image class="jt-icon item2" src="@/static/images/goodSource/jt.png" mode='widthFix'>
 							</image>
 							<view class="item3">
-								<view class="ssx">{{$helper.getProvinceAbbreviation(good.unloadPrivate?good.unloadPrivate:good.unloadCity)}}</view>
+								<view class="ssx">
+									{{$helper.getProvinceAbbreviation(good.unloadPrivate?good.unloadPrivate:good.unloadCity)}}
+								</view>
 								<view class="level2-title">{{$helper.filterUrban(good.unloadCity)}}
 									{{$helper.filterArea(good.unloadArea)}}
 								</view>
@@ -87,7 +93,7 @@
 								<view class="fontsize-46">
 									{{good.freightPrice}}
 								</view>
-								<view class="flex dw">元/吨</view>
+								<view class="flex dw">{{good.billingMethod == 0?"元/吨":"元/车"}}</view>
 							</view>
 						</view>
 					</view>
@@ -95,7 +101,7 @@
 						<view class="left flex row" @click.stop="cargoOwner(good)">
 							<u--image
 								:src="good.cargoOwnerPortrait?good.cargoOwnerPortrait:'../../static/images/mine/tx.png'"
-								width='100rpx' height='100rpx' shape="circle" >
+								width='100rpx' height='100rpx' shape="circle">
 							</u--image>
 							<view class="name">{{good.cargoOwnerName}}</view>
 							<!-- <view class="hp flex fontsize-24">
@@ -117,8 +123,8 @@
 		</mescroll-body>
 		<u-toast ref="uToast"></u-toast>
 		<u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :confirmText='confirmText'
-			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick"
-			@cancel="cancelClick"></u-modal>
+			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)"
+			@close="cancelClick" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 <script>
@@ -135,7 +141,7 @@
 		mixins: [MescrollMixin], // 使用mixin
 		data() {
 			return {
-					confirmText: '确定',
+				confirmText: '确定',
 				showCancelButton: true,
 				isFirstIndex: null,
 				ObjSelect: {},
@@ -169,27 +175,30 @@
 				pickerSelect: '全部类型',
 				tabIndex: 0,
 				scrollTop: 0,
-				isdblclick:0,
+				isdblclick: 0,
 				count: 0,
 				lng: '',
 				lat: '',
 				bool: false,
-				showMenu:false
+				showMenu: false,
+				driverCommonId:"",
+				driverPhone:"",
+				driverName:""
 			}
 		},
 		onTabItemTap(e) {
 			this.isdblclick++
 			// tab 点击时执行,此处直接接收单击事件
-			if(this.scrollTop>1200){
-				if(this.isdblclick>1){
+			if (this.scrollTop > 1200) {
+				if (this.isdblclick > 1) {
 					uni.pageScrollTo({
 						scrollTop: 0,
 						duration: 300
 					});
 				}
-				
+
 			}
-			
+
 		},
 		created() {
 
@@ -197,20 +206,20 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
 		},
-		watch:{
+		watch: {
 			// startPlace(){
 			// 	console.log(this.startPlace)
-   //              this.upCallback({page});
-   //          },
+			//              this.upCallback({page});
+			//          },
 		},
 		onLoad() {
 			this.checkOpenGPSServiceByAndroidIOS()
 		},
 		onHide() {
-			this.isdblclick=0
+			this.isdblclick = 0
 		},
 		onShow() {
-			if(this.scrollTop>1200){
+			if (this.scrollTop > 1200) {
 				uni.setTabBarItem({
 					index: 0,
 					text: '返回顶部',
@@ -224,10 +233,10 @@
 				iconPath: 'static/images/common/dingdan@2x(1).png',
 				selectedIconPath: 'static/images/common/dingdan@2x.png'
 			})
-			var that= this
-			setTimeout(()=>{
+			var that = this
+			setTimeout(() => {
 				// var photol=await permision.checkSystemEnableLocation()
-				if(uni.getStorageSync('confirm_location')){
+				if (uni.getStorageSync('confirm_location')) {
 					that.get_localtion_permission()
 				}
 				//获取上一次点击起装卸地
@@ -237,13 +246,16 @@
 				if (uni.getStorageSync('sPlaceObj')) {
 					that.endPlace = uni.getStorageSync('sPlaceObj');
 				}
-				that.upCallback({size:10,num:1})
-			},1500)
-			
+				that.upCallback({
+					size: 10,
+					num: 1
+				})
+			}, 1500)
+
 			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
 				reCommonId: this.userInfo.id,
 			}).then(res3 => {
-				if (res3.data||res3.data==0) {
+				if (res3.data || res3.data == 0) {
 					let name = 'myTip';
 					let value = res3.data
 					if (value == 0) {
@@ -285,7 +297,7 @@
 		// 	// #endif
 
 		// },
-		
+
 		onPageScroll(res) {
 			this.scrollTop = res.scrollTop
 			// console.log("页面滚动了", res.scrollTop)
@@ -307,12 +319,12 @@
 
 		},
 		methods: {
-			stopRoll(){
-				
+			stopRoll() {
+
 			},
 			async get_localtion_permission() {
-				var photol=await permision.checkSystemEnableLocation()
-				if(photol == true){
+				var photol = await permision.checkSystemEnableLocation()
+				if (photol == true) {
 					uni.removeStorageSync('confirm_location')
 					// uni.showToast({
 					// 				title: '只有文字弹窗',
@@ -320,132 +332,134 @@
 					// 				duration: 2000    //持续时间为 2秒
 					// 			})  
 					this.getLngLat()
-				}else{
-					if(uni.getStorageSync('confirm_location')){
+				} else {
+					if (uni.getStorageSync('confirm_location')) {
 						uni.removeStorageSync('confirm_location')
-				}
-					uni.setStorageSync('fPlaceObj',{
-						fchoosearea:'全部',
-						fchoosecity:'市辖区',
-						fchooseprovince:'北京',
-						selected:'东城'
+					}
+					uni.setStorageSync('fPlaceObj', {
+						fchoosearea: '全部',
+						fchoosecity: '市辖区',
+						fchooseprovince: '北京',
+						selected: '东城'
 					})
-					uni.setStorageSync('sPlaceObj',{
-						schoosearea:'请选择区',
-						schoosecity:'请选择市',
-						schooseprovince:'全国',
-						selected:'全国'
+					uni.setStorageSync('sPlaceObj', {
+						schoosearea: '请选择区',
+						schoosecity: '请选择市',
+						schooseprovince: '全国',
+						selected: '全国'
 					})
-					uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
+					uni.setStorageSync('longitudeAndLatitude', '116.3972,39.9096')
 				}
 			},
-			async getLngLat(){
+			async getLngLat() {
 				await uni.getLocation({
 					type: 'gcj02',
 					geocode: true,
 					success: res => {
 						if (res.latitude) {
-							if(res.address.city){
-								if(res.address.city.indexOf('市')!=-1){
-									res.address.city=res.address.city.substring(0,res.address.city.length-1)
+							if (res.address.city) {
+								if (res.address.city.indexOf('市') != -1) {
+									res.address.city = res.address.city.substring(0, res.address.city
+										.length - 1)
 								}
 							}
-							if(res.address.province){
-								if(res.address.province.indexOf('省')!=-1){
-									res.address.province=res.address.province.substring(0,res.address.province.length-1)
+							if (res.address.province) {
+								if (res.address.province.indexOf('省') != -1) {
+									res.address.province = res.address.province.substring(0, res.address
+										.province.length - 1)
 								}
 							}
-							uni.setStorageSync('fPlaceObj',{
-								fchoosearea:'全部',
-								fchoosecity:res.address.city,
-								fchooseprovince:res.address.province,
-								selected:res.address.city
+							uni.setStorageSync('fPlaceObj', {
+								fchoosearea: '全部',
+								fchoosecity: res.address.city,
+								fchooseprovince: res.address.province,
+								selected: res.address.city
 							})
-							uni.setStorageSync('sPlaceObj',{
-								schoosearea:'请选择区',
-								schoosecity:'请选择市',
-								schooseprovince:'全国',
-								selected:'全国'
+							uni.setStorageSync('sPlaceObj', {
+								schoosearea: '请选择区',
+								schoosecity: '请选择市',
+								schooseprovince: '全国',
+								selected: '全国'
 							})
-							uni.setStorageSync('longitudeAndLatitude',res.longitude+','+res.latitude)
-				}
-				}
+							uni.setStorageSync('longitudeAndLatitude', res.longitude + ',' + res.latitude)
+						}
+					}
 				})
 			},
 			checkOpenGPSServiceByAndroidIOS() {
-			    let system = uni.getSystemInfoSync(); // 获取系统信息
-			    // console.log(system);
-			    if (system.platform === 'android') { // 判断平台
-			        var context = plus.android.importClass("android.content.Context");
-			        var locationManager = plus.android.importClass("android.location.LocationManager");
-			        var main = plus.android.runtimeMainActivity();
-			        var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
-			        if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
-			            uni.showModal({
-			                title: '提示',
-			                content: '请打开定位服务功能',
-			                // showCancel: false, // 不显示取消按钮
-			                success(res) {
-								if(res.confirm){
-									uni.setStorageSync('confirm_location',1)
+				let system = uni.getSystemInfoSync(); // 获取系统信息
+				// console.log(system);
+				if (system.platform === 'android') { // 判断平台
+					var context = plus.android.importClass("android.content.Context");
+					var locationManager = plus.android.importClass("android.location.LocationManager");
+					var main = plus.android.runtimeMainActivity();
+					var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+					if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
+						uni.showModal({
+							title: '提示',
+							content: '请打开定位服务功能',
+							// showCancel: false, // 不显示取消按钮
+							success(res) {
+								if (res.confirm) {
+									uni.setStorageSync('confirm_location', 1)
 									if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
-										
+
 										var Intent = plus.android.importClass('android.content.Intent');
 										var Settings = plus.android.importClass('android.provider.Settings');
 										var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
 										main.startActivity(intent); // 打开系统设置GPS服务页面
 									} else {
-										uni.setStorageSync('fPlaceObj',{
-											fchoosearea:'全部',
-											fchoosecity:'市辖区',
-											fchooseprovince:'北京',
-											selected:'东城'
+										uni.setStorageSync('fPlaceObj', {
+											fchoosearea: '全部',
+											fchoosecity: '市辖区',
+											fchooseprovince: '北京',
+											selected: '东城'
 										})
-										uni.setStorageSync('sPlaceObj',{
-											schoosearea:'请选择区',
-											schoosecity:'请选择市',
-											schooseprovince:'全国',
-											selected:'全国'
+										uni.setStorageSync('sPlaceObj', {
+											schoosearea: '请选择区',
+											schoosecity: '请选择市',
+											schooseprovince: '全国',
+											selected: '全国'
 										})
-										uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
+										uni.setStorageSync('longitudeAndLatitude', '116.3972,39.9096')
 									}
-								}else{
-									uni.setStorageSync('fPlaceObj',{
-										fchoosearea:'全部',
-										fchoosecity:'市辖区',
-										fchooseprovince:'北京',
-										selected:'东城'
+								} else {
+									uni.setStorageSync('fPlaceObj', {
+										fchoosearea: '全部',
+										fchoosecity: '市辖区',
+										fchooseprovince: '北京',
+										selected: '东城'
 									})
-									uni.setStorageSync('sPlaceObj',{
-										schoosearea:'请选择区',
-										schoosecity:'请选择市',
-										schooseprovince:'全国',
-										selected:'全国'
+									uni.setStorageSync('sPlaceObj', {
+										schoosearea: '请选择区',
+										schoosecity: '请选择市',
+										schooseprovince: '全国',
+										selected: '全国'
 									})
-									uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
+									uni.setStorageSync('longitudeAndLatitude', '116.3972,39.9096')
 								}
-			                }
-			            });
-			        }else{
+							}
+						});
+					} else {
 						this.getLngLat()
 					}
-			    } else if (system.platform === 'ios') {
-			        // console.log("苹果");
-			        var cllocationManger = plus.ios.import("CLLocationManager");
-			        var enable = cllocationManger.locationServicesEnabled();
-			        var status = cllocationManger.authorizationStatus();
-			        plus.ios.deleteObject(cllocationManger);
-			        if (enable && status != 2) {
+				} else if (system.platform === 'ios') {
+					// console.log("苹果");
+					var cllocationManger = plus.ios.import("CLLocationManager");
+					var enable = cllocationManger.locationServicesEnabled();
+					var status = cllocationManger.authorizationStatus();
+					plus.ios.deleteObject(cllocationManger);
+					if (enable && status != 2) {
 						this.getLngLat()
-			            console.log("手机系统的定位已经打开");
-			        } else {
-			            console.log("手机系统的定位没有打开");
-			            uni.showModal({
-			                title: '提示',
-			                content: '请前往设置-隐私-定位服务打开定位服务功能',
-			                // showCancel: false, // 不显示取消按钮
-			                success(res) {
-								if(res.confirm){
+						console.log("手机系统的定位已经打开");
+					} else {
+						console.log("手机系统的定位没有打开");
+						uni.showModal({
+							title: '提示',
+							content: '请前往设置-隐私-定位服务打开定位服务功能',
+							// showCancel: false, // 不显示取消按钮
+							success(res) {
+								if (res.confirm) {
 									var UIApplication = plus.ios.import("UIApplication");
 									var application2 = UIApplication.sharedApplication();
 									var NSURL2 = plus.ios.import("NSURL");
@@ -460,72 +474,50 @@
 									plus.ios.deleteObject(application2);
 									this.getLngLat()
 								}
-			                }
-			            });
-			        }
-			    }
+							}
+						});
+					}
+				}
 			},
-			cargoOwner(_obj){
+			cargoOwner(_obj) {
 				// uni.$u.route('/pages/order/evaluateList');
 				// console.log("查看---------------",_obj)
-				uni.$u.route('/pages/goodSource/cargoOwnerSee',_obj)
+				uni.$u.route('/pages/goodSource/cargoOwnerSee', _obj)
 			},
 			mescrollInit(mescroll) {
 				this.mescroll = mescroll;
 			},
 			confirmClick() {
 				let item = this.ObjSelect
-				var that=this
-				this.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
-					driverPhone: this.userInfo.phone,
-				}).then(res2 => {
-					if(res2.data.authenticationStatus=='已过期'){
-						that.$refs.uToast.show({
-							type: 'error',
-							message: '证件已过期,请上传新证件!',
-						})
-						return
-					}else if(res2.data.authenticationStatus=='未认证'||res2.data.authenticationStatus=='已驳回'){
-						that.$refs.uToast.show({
-							type: 'error',
-							message: '请先完成司机认证!',
-						})
-						return
-					}
-					else if(res2.data.authenticationStatus=='审核中'){
-						that.$refs.uToast.show({
-							type: 'error',
-							message: '司机审核中!',
-						})
-						return
-					}
-					let _obj = {
-						driverCommonId: res2.data.commonId,
-						commonId: item.commonId,
-						compId:item.compId,
-						cargoOwnerName: item.cargoOwnerName,
-						cargoOwner: item.cargoOwner,
-						sendPrivate: item.sendPrivate,
-						sendCity: item.sendCity,
-						sendArea: item.sendArea,
-						sendDetailedAddress: item.sendDetailedAddress,
-						unloadPrivate: item.unloadPrivate,
-						unloadCity: item.unloadCity,
-						unloadArea: item.unloadArea,
-						unloadDetailedAddress: item.unloadDetailedAddress,
-						goodsName: item.goodsName,
-						distance: item.distance,
-						freightPrice: item.freightPrice,
-						driverName: res2.data.driverName,
-						driverPhone: res2.data.driverPhone,
-						cargoOwnerPhone: item.cargoOwnerPhone,
-						id:item.id,
-						billingMethod:item.billingMethod,
-						freightAdvance:item.freightAdvance,
-						goodsType:item.goodsType,
-						goodsTypeKey:item.goodsTypeKey
-					}
-					that.$request.baseRequest('post', '/publishTaskInfo/api/addOrder', _obj).then(res => {
+				var that = this
+
+				let _obj = {
+					driverCommonId: that.driverCommonId,
+					commonId: item.commonId,
+					compId: item.compId,
+					cargoOwnerName: item.cargoOwnerName,
+					cargoOwner: item.cargoOwner,
+					sendPrivate: item.sendPrivate,
+					sendCity: item.sendCity,
+					sendArea: item.sendArea,
+					sendDetailedAddress: item.sendDetailedAddress,
+					unloadPrivate: item.unloadPrivate,
+					unloadCity: item.unloadCity,
+					unloadArea: item.unloadArea,
+					unloadDetailedAddress: item.unloadDetailedAddress,
+					goodsName: item.goodsName,
+					distance: item.distance,
+					freightPrice: item.freightPrice,
+					driverName: that.driverName,
+					driverPhone: that.driverPhone,
+					cargoOwnerPhone: item.cargoOwnerPhone,
+					id: item.id,
+					billingMethod: item.billingMethod,
+					freightAdvance: item.freightAdvance,
+					goodsType: item.goodsType,
+					goodsTypeKey: item.goodsTypeKey
+				}
+				that.$request.baseRequest('post', '/publishTaskInfo/api/addOrder', _obj).then(res => {
 						if (res.code == 200) {
 							that.$refs.uToast.show({
 								type: 'success',
@@ -546,8 +538,8 @@
 					.catch(res => {
 						uni.$u.toast(res.message);
 					});
-				
-				});
+
+				// });
 				this.isShowAlert = false
 			},
 			cancelClick() {
@@ -608,16 +600,46 @@
 				return String(year) + String(mouth) + String(datetime)
 			},
 			grabOrders(item) {
-
-				this.isShowAlert = true
-				this.ObjSelect = item
-
+				let that = this
+				this.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
+					driverPhone: this.userInfo.phone,
+				}).then(res2 => {
+					if (res2.data.authenticationStatus == '已过期') {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: '证件已过期,请上传新证件!',
+						})
+						return
+					} else if (res2.data.authenticationStatus == '未认证' || res2.data.authenticationStatus ==
+						'已驳回') {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: '请先完成司机认证!',
+						})
+						return
+					} else if (res2.data.authenticationStatus == '审核中') {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: '司机审核中!',
+						})
+						return
+					} else if(res2.data.authenticationStatus == '已认证'){
+						this.driverCommonId = res2.data.commonId
+						this.driverPhone = res2.data.driverPhone
+						this.driverName = res2.data.driverName
+						this.isShowAlert = true
+						this.ObjSelect = item
+					}
+				})
 			},
 			confirmSelectType(val) {
 				this.pickerSelect = val.value[0]
-				
+
 				this.show = false
-				this.upCallback({size:10,num:1})
+				this.upCallback({
+					size: 10,
+					num: 1
+				})
 			},
 			selectTypeClose() {
 				this.show = false
@@ -630,7 +652,7 @@
 			// 	// uni.showLoading({
 			// 	// 	title: '获取定位信息'
 			// 	// })
-				
+
 			// 	uni.getLocation({
 			// 		type: 'gcj02',
 			// 		geocode: true,
@@ -674,7 +696,7 @@
 			// 					currentPage: 1,
 			// 					loadingPlaceCity: that.startPlace.fchoosecity,
 			// 					// unLoadingPlaceCity: this.endPlace.schoosecity
-							
+
 			// 				}
 			// 				that.$forceUpdate()
 			// 				// that.$set(that.startPlace,'selected',res.address.city)
@@ -696,7 +718,7 @@
 			// 							}else{
 			// 								that.goods=[]
 			// 							}
-										
+
 			// 						}
 			// 						uni.hideLoading()
 			// 					})
@@ -737,19 +759,19 @@
 			// 					});
 			// 				}
 			// 				uni.hideLoading()
-							
+
 			// 			}
 			// 		}
 			// 	});
 			// },
 			toDetail(id) {
-				var that=this
+				var that = this
 				that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
 					driverPhone: this.userInfo.phone,
 				}).then(res2 => {
 					// console.log('跳转',1111111)
 					uni.setStorageSync('firstAuthentication', res2.data)
-					that.firstAuthentication=uni.getStorageSync('firstAuthentication')
+					that.firstAuthentication = uni.getStorageSync('firstAuthentication')
 					// console.log(that.firstAuthentication)
 					//司机是否认证身份
 					// 保留uni.getStorageSync('firstAuthentication'),thisfirstAuthentication有缓存问题
@@ -772,7 +794,7 @@
 			},
 			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
 			upCallback(page) {
-				var that =this
+				var that = this
 				let _pickerSelect;
 				if (this.pickerSelect == '运费先付') {
 					_pickerSelect = 1
@@ -794,109 +816,113 @@
 				}
 				console.log(uni.getStorageSync('longitudeAndLatitude'))
 				// if (this.tabIndex == 2) {
-					if(uni.getStorageSync('longitudeAndLatitude')){
-						this.lng=uni.getStorageSync('longitudeAndLatitude').split(',')[0]
-						this.lat=uni.getStorageSync('longitudeAndLatitude').split(',')[1]
-					}
-						_data.driverLongitude = this.lng
-						_data.driverLatitude = this.lat
-						// }
-						console.log('------')
-						console.log(_data)
-						if (uni.getStorageSync('fPlaceObj')) {
-							if (this.startPlace.fchoosearea && this.startPlace.fchoosearea == '全部' && this.startPlace
-								.fchoosearea != '请选择区') {
-								// _data.loadingPlaceCity = this.startPlace.fchoosecity
-								if(this.startPlace.fchoosecity=='市辖区'){
-									_data.loadingPlaceCity = this.startPlace.fchooseprovince
-								}else{
-									_data.loadingPlaceCity = this.startPlace.fchoosecity
-								}
-							} else if (this.startPlace.fchoosecity == '全部') {
-								_data.loadingPlace = this.startPlace.selected
-							} else {
-								_data.loadingPlaceCity = this.startPlace.fchoosecity
-								_data.loadingPlace = this.startPlace.fchoosearea
-							}
-						
+				if (uni.getStorageSync('longitudeAndLatitude')) {
+					this.lng = uni.getStorageSync('longitudeAndLatitude').split(',')[0]
+					this.lat = uni.getStorageSync('longitudeAndLatitude').split(',')[1]
+				}
+				_data.driverLongitude = this.lng
+				_data.driverLatitude = this.lat
+				// }
+				console.log('------')
+				console.log(_data)
+				if (uni.getStorageSync('fPlaceObj')) {
+					if (this.startPlace.fchoosearea && this.startPlace.fchoosearea == '全部' && this.startPlace
+						.fchoosearea != '请选择区') {
+						// _data.loadingPlaceCity = this.startPlace.fchoosecity
+						if (this.startPlace.fchoosecity == '市辖区') {
+							_data.loadingPlaceCity = this.startPlace.fchooseprovince
 						} else {
 							_data.loadingPlaceCity = this.startPlace.fchoosecity
 						}
-						if (uni.getStorageSync('sPlaceObj')) {
-							if (this.endPlace.schoosearea && this.endPlace.schoosearea == '全部' && this.endPlace.schoosearea !=
-								'请选择区') {
-									if(this.endPlace.schoosecity=='市辖区'){
-										_data.unLoadingPlaceCity = this.endPlace.schooseprovince
-									}else{
-										_data.unLoadingPlaceCity = this.endPlace.schoosecity
-									}
-							} else if (this.endPlace.schoosearea) {
-								_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
-							} else {
-								_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
-								_data.unLoadingPlaceCity = this.endPlace.schoosecity
-							}
+					} else if (this.startPlace.fchoosecity == '全部') {
+						_data.loadingPlace = this.startPlace.selected
+					} else {
+						_data.loadingPlaceCity = this.startPlace.fchoosecity
+						_data.loadingPlace = this.startPlace.fchoosearea
+					}
+
+				} else {
+					_data.loadingPlaceCity = this.startPlace.fchoosecity
+				}
+				if (uni.getStorageSync('sPlaceObj')) {
+					if (this.endPlace.schoosearea && this.endPlace.schoosearea == '全部' && this.endPlace.schoosearea !=
+						'请选择区') {
+						if (this.endPlace.schoosecity == '市辖区') {
+							_data.unLoadingPlaceCity = this.endPlace.schooseprovince
 						} else {
-							_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
+							_data.unLoadingPlaceCity = this.endPlace.schoosecity
 						}
-						if (this.lng) {
-							_data.longitude = this.lng
-							_data.latitude = this.lat
-						}
-						uni.showLoading({
-							mask: true,
-							title: '加载中'
-						})
-						console.log(_data)
-						this.$request.baseRequest('get', '/publishTaskInfo/selectGoodsSource', _data).then(res => {
-								if (res.code == 200) {
-									uni.hideLoading()
-									if (page.num == 1) {
-										this.goods = [];
-										// this.otherGoods = []
-									};
-									if(res.data.records){
-										for(var i=0;i<res.data.records.length;i++){
-											if(res.data.records[i].cargoDistance){
-												if(res.data.records[i].cargoDistance>10){
-													res.data.records[i].cargoDistance=res.data.records[i].cargoDistance.toFixed(0)
-												}else{
-													res.data.records[i].cargoDistance=res.data.records[i].cargoDistance.toFixed(1)
-												}	
-											}
-											if(res.data.records[i].distance){
-												if(res.data.records[i].distance>10){
-													res.data.records[i].distance=res.data.records[i].distance.toFixed(0)
-												}else{
-													res.data.records[i].distance=res.data.records[i].distance.toFixed(1)
-												}
-												
-											}
+					} else if (this.endPlace.schoosearea) {
+						_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
+					} else {
+						_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
+						_data.unLoadingPlaceCity = this.endPlace.schoosecity
+					}
+				} else {
+					_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
+				}
+				if (this.lng) {
+					_data.longitude = this.lng
+					_data.latitude = this.lat
+				}
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
+				})
+				console.log(_data)
+				this.$request.baseRequest('get', '/publishTaskInfo/selectGoodsSource', _data).then(res => {
+						uni.hideLoading()
+						if (res.code == 200) {
+
+							if (page.num == 1) {
+								this.goods = [];
+								// this.otherGoods = []
+							};
+							if (res.data.records) {
+								for (var i = 0; i < res.data.records.length; i++) {
+									if (res.data.records[i].cargoDistance) {
+										if (res.data.records[i].cargoDistance > 10) {
+											res.data.records[i].cargoDistance = res.data.records[i].cargoDistance
+												.toFixed(0)
+										} else {
+											res.data.records[i].cargoDistance = res.data.records[i].cargoDistance
+												.toFixed(1)
 										}
 									}
-									this.mescroll.endBySize(res.data.records.length, res.data.total);
-									// for (var i = 0; i < res.data.records.length; i++) {
-									// 	res.data.records[i].cargoOwnerName1=
-									// }
-									 //如果是第一页需手动制空列表
-									if(res.data.records){
-										that.goods = that.goods.concat(res.data.records);
-										for (let i = 0; i < that.goods.length; i++) {
-											if (that.goods[i].peripheralInfo == 1) {
-												that.isFirstIndex = i
-												return
-											}
+									if (res.data.records[i].distance) {
+										if (res.data.records[i].distance > 10) {
+											res.data.records[i].distance = res.data.records[i].distance.toFixed(0)
+										} else {
+											res.data.records[i].distance = res.data.records[i].distance.toFixed(1)
 										}
-									}else{
-										that.goods=[]
+
 									}
-									
 								}
-							})
-							.catch(res => {
-								uni.$u.toast(res.message);
-								this.mescroll.endErr();
-							});
+							}
+							this.mescroll.endBySize(res.data.records.length, res.data.total);
+							// for (var i = 0; i < res.data.records.length; i++) {
+							// 	res.data.records[i].cargoOwnerName1=
+							// }
+							//如果是第一页需手动制空列表
+							if (res.data.records) {
+								that.goods = that.goods.concat(res.data.records);
+								for (let i = 0; i < that.goods.length; i++) {
+									if (that.goods[i].peripheralInfo == 1) {
+										that.isFirstIndex = i
+										return
+									}
+								}
+							} else {
+								that.goods = []
+							}
+
+						}
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.$u.toast(res.message);
+						this.mescroll.endErr();
+					});
 			},
 			clickTab(val) {
 				this.tabIndex = val.index
@@ -949,6 +975,7 @@
 		height: 100vh;
 		width: 100%;
 	}
+
 	.content {
 		background: #F2F4F7;
 	}
@@ -957,9 +984,11 @@
 		width: 100%;
 		position: relative;
 	}
-.u-flex-wrap{
-	flex-wrap: wrap;
-}
+
+	.u-flex-wrap {
+		flex-wrap: wrap;
+	}
+
 	.fixed,
 	.fixed1 {
 		background: linear-gradient(97deg, #4FABFD 0%, #2772FB 100%);
@@ -1110,7 +1139,7 @@
 
 	.other-goods {
 		// background: red;
-		color:#999999;
+		color: #999999;
 		margin: 40rpx 0;
 		display: flex;
 		justify-content: center;

+ 34 - 61
pages/mine/driverCertification.vue

@@ -59,6 +59,7 @@
 				<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod"
 					@cancel='isShowcardValidity=false' @confirm="confirmValidityPeriod" @change="changeHandler">
 				</u-picker>
+				<itmister-date-picker :overdueContent="'身份证已过期'" :dateStatus="status" :periodOfValidity="true" ref="dateEl" :startYear="1999"  :futureYear="30" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 			</view>
 			<view class="content1 content-other">
 				<view class="flex row">
@@ -220,7 +221,7 @@
 				<view class="flex row flex-space-between">
 					<view class="left-text">银行卡卡号</view>
 					<view class="flex">
-						<u--input placeholder="输入银行卡号码" inputAlign='right' border="none" v-model="item.bankCard">
+						<u--input placeholder="输入银行卡号码" inputAlign='right' border="none" v-model="item.bankCard" maxlength="19">
 						</u--input>
 					</view>
 				</view>
@@ -237,20 +238,21 @@
 						</u--input>
 						<view @click="manualInput(index)" class="type">选择支行</view>
 					</view>
-					<view class="flex" v-if="!isShowManualInput">
-						<u--input class="select-bankzh" placeholder="选择开户支行" inputAlign='right' border="none"
+					<view class="flex align-center" v-if="!isShowManualInput">
+						<!-- <u--input class="select-bankzh" placeholder="选择开户支行" inputAlign='right' border="none"
 							v-model="item.bankDepositBranch">
-						</u--input>
-						<!-- <view class="select-bankzh point" @click="selectZhbank">
+						</u--input> -->
+						<view 
+						 :style="{'color':item.bankDepositBranch?'#000':'#C6CBD5'}" style='font-size:15px;text-align:right;' class="select-bankzh point" @click="selectZhbank">
 							{{item.bankDepositBranch?item.bankDepositBranch:'选择开户支行'}}
-						</view> -->
+						</view>
 						<view @click="manualInput" class="type">手动输入</view>
 					</view>
 				</view>
 				<view class="flex row flex-space-between">
 					<view class="left-text">收款人</view>
 					<view class="flex">
-						<u--input placeholder="自动获取,不可编辑" inputAlign='right' border="none" v-model="item.payeeName" disabled>
+						<u--input placeholder="自动获取,不可编辑" inputAlign='right' border="none" v-model="item.payeeName" readonly>
 						</u--input>
 					</view>
 				</view>
@@ -302,6 +304,7 @@
 					height: 273
 				},
 				tips: '',
+				status:1,
 				// refCode: null,
 				seconds: 30,
 				carModelColumns: [
@@ -390,7 +393,7 @@
 						bankCard: '',
 						bankDeposit: '',
 						bankDepositBranch: '',
-						payeeName: ''
+						payeeName: '',
 					}],
 				},
 				keyShow: false,
@@ -406,7 +409,6 @@
 			this.get_camera_permission()
 			console.log(this.userInfo)
 			//获取截止日期List数据
-			this.validityPeriod = this.$helper.makeValidityPeriod(0)
 			this.dataDetails.driverPhone = this.userInfo.phone
 			this.dataDetails.commonId = this.userInfo.id
 			//获取认证状态
@@ -600,7 +602,7 @@
 				this.$request.baseRequest('', '/driverInfo/firstAuthentication', {
 						driverPhone: this.userInfo.phone,
 					}).then(res => {
-						if (res.data) {
+						if (res.data.passOnce==1) {
 							this.isFirstAuthentication = false
 						} else {
 							this.isFirstAuthentication = true
@@ -633,6 +635,7 @@
 				this.isShowBank = false
 			},
 			manualInput(val) {
+				console.log(1111111111111)
 				this.index = val
 
 				if (this.isShowManualInput) {
@@ -666,7 +669,6 @@
 				} = e
 
 				// if (columnIndex === 0) {
-				// 	debugger
 				// 	if (e.index != 0) {
 				// 		picker.setColumnValues(1, this.validityPeriod[1].shift())
 				// 	}
@@ -678,55 +680,12 @@
 				// }
 			},
 			// 回调参数为包含columnIndex、value、values
-			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if (e.value[0] == '长期') {
-					if (e.value[1] || e.value[2]) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "选择长期不允许选择月日!",
-						})
-						return
-					}
-					this.dataDetails.cardValidityDate = e.value[0]
-				} else {
-					if (!e.value[1] || !e.value[2]) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "日期格式错误,请重新选择!",
-						})
-						return
-					}
-					var date = new Date()
-					if (e.value[0] < date.getFullYear()) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "身份证已过期!",
-						})
-						return
-					}
-					if (e.value[0] == date.getFullYear() && Number(e.value[1]) < (date.getMonth() + 1)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "身份证已过期!",
-						})
-						return
-					}
-					if (e.value[0] == date.getFullYear() && Number(e.value[1]) == (date.getMonth() + 1) && Number(e.value[
-							2]) <= (date.getDate())) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "身份证已过期!",
-						})
-						return
-					}
-					this.dataDetails.cardValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-				}
-
-				this.isShowcardValidity = false
+			confirmValidityPeriod(date) {
+					this.dataDetails.cardValidityDate = date.date
 			},
 			selectValidityPeriod() {
-				this.isShowcardValidity = true
+				this.$refs.dateEl.show()
+				// this.isShowcardValidity = true
 			},
 			//设置图片
 			setImage(e) {
@@ -754,10 +713,12 @@
 				)
 			},
 			uploadImg(type, index) {
+				console.log(index,"sdfjkahfi")
 				this.uploadType = type
 				// this.isShowimgType = true
 				// this.imgTypeSelect()
 				this.index = index
+				this.dataDetails.hyDriverPayeeInfoList[index].bankDepositBranch=''
 				this.imgTypeSelect()
 			},
 			// 上传图片
@@ -787,6 +748,14 @@
 													_this.dataDetails.cardAddress = res.data
 														.recPersonAddr
 													_this.dataDetails.numberCard = res.data.recPersonNo
+													if(res.data.recPersonNo && res.data.recPersonNo.length == 18){  //自动获取性别
+														let sex = res.data.recPersonNo.substr(-2,1)
+														if(sex % 2 == 0){
+															_this.dataDetails.driverSex = "女"
+														}else{
+															_this.dataDetails.driverSex = "男"
+														}
+													}
 													if (res.data.recPerson) {
 														_this.dataDetails.driverName = res.data
 															.recPerson
@@ -798,7 +767,6 @@
 															_this.dataDetails.hyDriverPayeeInfoList[i]
 																.payeeName = res.data.recPerson
 														}
-														console.log()
 													}
 													_this.dataDetails.driverBirthday = res.data
 														.recPersonBrithday
@@ -985,7 +953,12 @@
 							res => {
 								if (res.data.distinguishNum != "01") { //不等于01 证明银行卡验证不通过
 									// this.payCheck = false //验证开关
-									uni.$u.toast(res.data.distinguish);
+									// uni.$u.toast(res.data.distinguish);
+									this.$refs.uToast.show({
+										type: 'error',
+										message: res.data.distinguish,
+										duration:4000
+									})
 								} else {
 									uni.$u.route('/pages/mine/driverCertificationNext', {
 										data: JSON.stringify(this.dataDetails),
@@ -1366,7 +1339,7 @@
 
 		.select-bankzh {
 			width: 230rpx;
-			height: 48rpx;
+			// height: 48rpx;
 		}
 	}
 

+ 48 - 245
pages/mine/driverCertificationNext.vue

@@ -60,89 +60,6 @@
 					<u--input placeholder="请输入驾驶证发证机关" inputAlign='right' border="none" v-model="dataDetails.lssuingAuthority" >
 					</u--input>
 				</view>
-<!--
-				<view class="title">上传行驶证主页</view>
-				<view @click="uploadImg(3)" class="picture picture3" v-if="!dataDetails.drivingLicenseHomePage">
-					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-					<view class="text">上传行驶证主页</view>
-				</view>
-				<view v-if="dataDetails.drivingLicenseHomePage" @click.stop="uploadImg(1)"
-					class="preview-card-img picture">
-					<view @click.stop="delCard(1)">
-						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-						</image>
-					</view>
-					<image class="" :src="dataDetails.drivingLicenseHomePage" mode="aspectFit"></image>
-				</view>
-				<view class="title">上传行驶证副页</view>
-				<view @click="uploadImg(4)" class="picture picture4" v-if="!dataDetails.drivingLicenseBackPage">
-					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-					<view class="text">上传行驶证副页</view>
-				</view>
-				<view v-if="dataDetails.drivingLicenseBackPage" @click.stop="uploadImg(1)"
-					class="preview-card-img picture">
-					<view @click.stop="delCard(1)">
-						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-						</image>
-					</view>
-					<image class="" :src="dataDetails.drivingLicenseBackPage" mode="aspectFit"></image>
-				</view>
-				<view class="flex row flex-space-between">
-					<view class="left-text">行驶证档案编号</view>
-					<u--input placeholder="输入行驶证档案编号" inputAlign='right' border="none" v-model="dataDetails.drivingLicenseNumber">
-					</u--input>
-				</view>
-
-				<view class="flex row flex-space-between">
-					<view class="left-text">行驶证有效期</view>
-					<view class="" @click="selectValidityPeriod(1)">
-						{{dataDetails.drivingLicenseValidityDate?dataDetails.drivingLicenseValidityDate:'选择有效截止日期>'}}
-					</view>
-				</view>
-
-
-				<view class="" v-if="isGCar">
-					<view class="title">挂车行驶证主页</view>
-					<view @click="uploadImg(5)" class="picture picture5" v-if="!dataDetails.trailerLicenseHomePage">
-						<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-						<view class="text">上传挂车行驶证主页</view>
-					</view>
-					<view v-if="dataDetails.trailerLicenseHomePage" @click.stop="uploadImg(1)"
-						class="preview-card-img picture">
-						<view @click.stop="delCard(1)">
-							<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-							</image>
-						</view>
-						<image class="" :src="dataDetails.trailerLicenseHomePage" mode="aspectFit"></image>
-					</view>
-				</view>
-				<view v-if="isGCar">
-					<view class="title">挂车行驶证副页</view>
-					<view @click="uploadImg(6)" class="picture picture6" v-if="!dataDetails.trailerLicenseBackPage">
-						<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-						<view class="text">上传挂车行驶证副页</view>
-					</view>
-					<view v-if="dataDetails.trailerLicenseBackPage" @click.stop="uploadImg(1)"
-						class="preview-card-img picture">
-						<view @click.stop="delCard(1)">
-							<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-							</image>
-						</view>
-						<image class="" :src="dataDetails.trailerLicenseBackPage" mode="aspectFit"></image>
-					</view>
-				</view>
-				<view class="flex row">
-					<view class="left-text">挂车行驶证档案编号</view>
-					<u--input placeholder="输入挂车行驶证档案编号" inputAlign='right' border="none" v-model="dataDetails.trailerLicenseNumber">
-					</u--input>
-				</view>
-
-				<view class="flex row flex-space-between" v-if="isGCar">
-					<view class="left-text">挂车行驶证有效期</view>
-					<view class="" @click="selectValidityPeriod(2)">
-						{{dataDetails.trailerLicenseValidityDate?dataDetails.trailerLicenseValidityDate:'选择有效截止日期>'}}
-					</view>
-				</view>-->
 
 				<view class="title">从业资格证</view>
 				<view @click="uploadImg(7)" class="picture picture7" v-if="!dataDetails.qualificationCertificate">
@@ -166,70 +83,20 @@
 				</view>
 				<view class="flex row ">
 					<view class="left-text">从业资格证号</view>
-					<u--input maxlength='19' placeholder="请输入从业资格证号" inputAlign='right' border="none" v-model="dataDetails.qualificationCertificateNumber">
-					</u--input>
-				</view>
-<!--
-				<view class="title">道路运输证</view>
-				<view @click="uploadImg(8)" class="picture picture8" v-if="!dataDetails.operationCertificate">
-					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-					<view class="text">上传道路运输证</view>
-				</view>
-				<view v-if="dataDetails.operationCertificate" @click.stop="uploadImg(1)"
-					class="preview-card-img picture">
-					<view @click.stop="delCard(1)">
-						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-						</image>
-					</view>
-					<image class="" :src="dataDetails.operationCertificate" mode="aspectFit"></image>
-				</view>
-				<view class="flex row">
-					<view class="left-text">道路运输证号</view>
-					<u--input placeholder="输入道路运输证号" inputAlign='right' border="none" v-model="dataDetails.operationCertificateNumber">
+					<u--input maxlength='30' placeholder="请输入从业资格证号" inputAlign='right' border="none" v-model="dataDetails.qualificationCertificateNumber">
 					</u--input>
 				</view>
-				<view class="flex row flex-space-between">
-					<view class="left-text">道路运输证有效期</view>
-					<view class="" @click="selectValidityPeriod(4)">
-						{{dataDetails.operationCertificateValidityDate?dataDetails.operationCertificateValidityDate:'选择有效期>'}}
-					</view>
-				</view>
-
-				<view v-if="isGCar">
-					<view class="title">挂车道路运输证</view>
-					<view @click="uploadImg(9)" class="picture picture9"
-						v-if="!dataDetails.trailerOperationCertificate">
-						<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-						<view class="text">上传挂车道路运输证</view>
-					</view>
-					<view v-if="dataDetails.trailerOperationCertificate" @click.stop="uploadImg(1)"
-						class="preview-card-img picture">
-						<view @click.stop="delCard(1)">
-							<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-							</image>
-						</view>
-						<image class="" :src="dataDetails.trailerOperationCertificate" mode="aspectFit"></image>
-					</view>
-				</view>
-				<view class="flex row">
-					<view class="left-text">挂车道路运输证号</view>
-					<u--input placeholder="输入挂车道路运输证号" inputAlign='right' border="none" v-model="dataDetails.trailerOperationCertificateNumber">
+				<view class="flex row ">
+					<view class="left-text">道路运输经营许可证号</view>
+					<u--input maxlength='30' placeholder="请输入道路运输经营许可证号" inputAlign='right' border="none" v-model="dataDetails.actualCarrierBusinessLicense">
 					</u--input>
 				</view>
-
-				<view class="flex row flex-space-between" v-if="isGCar">
-					<view class="left-text">挂车道路运输证有效期</view>
-					<view class="" @click="selectValidityPeriod(5)">
-						{{dataDetails.trailerOperationCertificateValidityDate?dataDetails.trailerOperationCertificateValidityDate:'选择有效期>'}}
-					</view>
-				</view>
-			
-				-->
 				<view class="flex row noborder">
 					<view class="left-text">通讯地址</view>
 					<u--textarea v-model="dataDetails.postalAddress" border="none"  placeholder="输入通讯地址" autoHeight  maxlength="30"></u--textarea>
 					<!-- <u--input placeholder="输入通讯地址" inputAlign='right' border="none" v-model="dataDetails.postalAddress"></u--input> -->
 				</view>
+				
 			</view>
 			
 			<view class="flex service align-center">
@@ -249,9 +116,16 @@
 				@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
 				@close="isShowimgType=false">
 			</u-action-sheet>
-			<u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+			<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 				:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
-			</u-picker>
+			</u-picker> -->
+			<itmister-date-picker :dateStatus="0"
+			ref="datestartEl" :startYear="1980"  :futureYear="10" 
+			@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+			<itmister-date-picker :overdueContent="overdueContent" :dateStatus="status" 
+			:periodOfValidity="true" 
+			ref="dateEl" :startYear="1980"  :futureYear="10" 
+			@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 			<u-picker :show="isShowDrive" ref="uPicker" :columns="driveList" @confirm="confirmDriveType"
 				:closeOnClickOverlay='true' @close='isShowDrive=false' @cancel='isShowDrive=false'>
 			</u-picker>
@@ -271,11 +145,12 @@
 				consentStatus: false,
 				isGCar: true,
 				ValidityPeriodType: '',
-				validityPeriod: [],
 				isShowValidity: false,
 				isShowDrive:false,
 				driveList:[["A2","B2"]],
+				overdueContent:'',
 				uploadType: '',
+				status:1,
 				isShowimgType: false,
 				dataDetails: {},
 				radiolist: [{
@@ -299,9 +174,6 @@
 				this.dataDetails = JSON.parse(options.data)
 				this.dataDetails.driverType = 1
 			}
-			this.validityPeriod = this.$helper.makeValidityPeriod('kong',1980)
-			this.validityPeriod1 = this.$helper.makeValidityPeriod(0,1980)
-			console.log(this.validityPeriod)
 		},
 		methods: {
 			async get_camera_permission() {
@@ -360,126 +232,50 @@
 				// });
 			},
 			validate(data) {},
-			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if(e.value[0]=='长期'){
-					if (e.value[1] || e.value[2]) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "选择长期不允许选择月日!",
-						})
-						return
-					}
+			confirmValidityPeriod(date) {
+				console.log('confirm', date)
 					switch (this.ValidityPeriodType) {
 						case 0:
-							this.dataDetails.driverLicenseValidityStartDate = e.value[0]
+							this.dataDetails.driverLicenseValidityStartDate = date.date
 							break
 						case 1:
-							this.dataDetails.drivingLicenseValidityDate = e.value[0] 
+							this.dataDetails.drivingLicenseValidityDate = date.date 
 							break
 						case 2:
-							this.dataDetails.trailerLicenseValidityDate = e.value[0]
+							this.dataDetails.trailerLicenseValidityDate = date.date
 							break
 						case 3:
-							this.dataDetails.qualificationCertificateValidityDate = e.value[0] 
+							this.dataDetails.qualificationCertificateValidityDate = date.date 
 							break
 						case 4:
-							this.dataDetails.operationCertificateValidityDate = e.value[0] 
+							this.dataDetails.operationCertificateValidityDate = date.date 
 							break
 						case 5:
-							this.dataDetails.trailerOperationCertificateValidityDate = e.value[0] 
+							this.dataDetails.trailerOperationCertificateValidityDate = date.date 
 							break
 						case 9:
-							this.dataDetails.driverLicenseValidityDate = e.value[0]
+							this.dataDetails.driverLicenseValidityDate = date.date
 							break
 					}
+					this.$forceUpdate()
+				
+			},
+			selectValidityPeriod(type) {
+				this.ValidityPeriodType = type
+				if(type==0){
+					this.$refs.datestartEl.show()
 				}else{
-					if(e.value[0]==''){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "年份不能为空!",
-						})
-						return
-					}else if(e.value[1]==''){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "月份不能为空!",
-						})
-						return
-					}else if(e.value[2]==''){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "日期不能为空!",
-						})
-						return
-					}
-					var date=new Date()
-					var text=''
 					switch (this.ValidityPeriodType) {
-						case 3:
-							text='从业资格证已过期!'
-							break
-						case 9:
-							text='驾驶证已过期!'
-							break
-					}
-					if(this.ValidityPeriodType==3||this.ValidityPeriodType==9){
-						if(e.value[0]<date.getFullYear()){
-							this.$refs.uToast.show({
-								type: 'error',
-								message: text,
-							})
-							return
-						}
-						if(e.value[0]==date.getFullYear()&&Number(e.value[1])<(date.getMonth()+1)){
-							this.$refs.uToast.show({
-								type: 'error',
-								message: text,
-							})
-							return
-						}
-						if(e.value[0]==date.getFullYear()&&Number(e.value[1])==(date.getMonth()+1)&&Number(e.value[2])<=(date.getDate())){
-							this.$refs.uToast.show({
-								type: 'error',
-								message: text,
-							})
-							return
-						}
-					}
-					switch (this.ValidityPeriodType) {
-						case 0:
-							this.dataDetails.driverLicenseValidityStartDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-							break
-						case 1:
-							this.dataDetails.drivingLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-							break
-						case 2:
-							this.dataDetails.trailerLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-							break
-						case 3:
-							this.dataDetails.qualificationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
-								.value[2]
-							break
-						case 4:
-							this.dataDetails.operationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[
-								2]
-							break
-						case 5:
-							this.dataDetails.trailerOperationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
-								.value[2]
-							break
-						case 9:
-							this.dataDetails.driverLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
-									.value[2]
-								break
+					case 3:
+						this.status=0
+						this.overdueContent='从业资格证已过期'
+						break
+					case 9:
+						this.overdueContent='驾驶证已过期'
+						break
 					}
+					this.$refs.dateEl.show()
 				}
-				this.isShowValidity = false
-			},
-			selectValidityPeriod(type) {
-				
-				this.ValidityPeriodType = type
-				this.isShowValidity = true
 			},
 			driveType(){
 				this.isShowDrive = true
@@ -714,7 +510,7 @@
 				// 	return true
 				// }
 
-				if (this.dataDetails.qualificationCertificateNumber.length!=19) {
+				if (this.dataDetails.qualificationCertificateNumber.length > 30) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "从业资格证号输入错误!",
@@ -765,6 +561,13 @@
 				// 		return true
 				// 	}
 				// }
+				if (uni.$u.test.isEmpty(this.dataDetails.actualCarrierBusinessLicense)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "道路运输经营许可证号不能为空!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataDetails.postalAddress)) {
 					this.$refs.uToast.show({
 						type: 'error',

+ 23 - 50
pages/mine/editDriverCertification.vue

@@ -90,6 +90,10 @@
 			<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod"
 				@confirm="confirmValidityPeriod" @change="changeHandler" @cancel='isShowcardValidity= false'>
 			</u-picker>
+			<itmister-date-picker :overdueContent="'身份证已过期'" :dateStatus="status" :periodOfValidity="true"
+			 :checkYear="year" :checkMonth="month" :checkDay="day"
+			 ref="dateEl" :startYear="1999"  :futureYear="30" 
+			 @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 			<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 				@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
 				@close="isShowimgType=false">
@@ -122,10 +126,13 @@
 					width: 188,
 					height: 273
 				},
+				status:1,
 				tips: '',
 				// refCode: null,
 				seconds: 30,
-
+				year:'',
+				month:'',
+				day:'',
 				radiolist1: [{
 						name: '男',
 						disabled: false
@@ -178,8 +185,6 @@
 			_this = this;
 			console.log(this.userInfo)
 			this.get_camera_permission()
-			//获取截止日期List数据
-			this.validityPeriod = this.$helper.makeValidityPeriod(0)
 			// this.dataDetails.driverPhone = this.userInfo.phone
 			this.dataDetails.commonId = this.userInfo.id
 			//获取认证状态
@@ -216,7 +221,6 @@
 				} = e
 
 				// if (columnIndex === 0) {
-				// 	debugger
 				// 	if (e.index != 0) {
 				// 		picker.setColumnValues(1, this.validityPeriod[1].shift())
 				// 	}
@@ -295,54 +299,23 @@
 						uni.$u.toast(res.message);
 					});
 			},
-			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if (e.value[0] == '长期') {
-					this.dataDetails.cardValidityDate = e.value[0]
-					if (e.value[1] || e.value[2]) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "选择长期不允许选择月日!",
-						})
-						return
-					}
-				} else {
-					if (!e.value[1] || !e.value[2]) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "日期格式错误,请重新选择!",
-						})
-						return
-					}
-					var date=new Date()
-					if(e.value[0]<date.getFullYear()){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "身份证已过期!",
-						})
-						return
-					}
-					if(e.value[0]==date.getFullYear()&&Number(e.value[1])<(date.getMonth()+1)){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "身份证已过期!",
-						})
-						return
-					}
-					if(e.value[0]==date.getFullYear()&&Number(e.value[1])==(date.getMonth()+1)&&Number(e.value[2])<=(date.getDate())){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "身份证已过期!",
-						})
-						return
-					}
-					this.dataDetails.cardValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-				}
-
-				this.isShowcardValidity = false
+			confirmValidityPeriod(date) {
+				console.log('confirm', date)
+				this.dataDetails.cardValidityDate = date.date
 			},
 			selectValidityPeriod() {
-				this.isShowcardValidity = true
+				if(this.dataDetails.cardValidityDate!='长期'){
+					var arr=this.dataDetails.cardValidityDate.split('-')
+					this.year=arr[0]
+					this.month=arr[1]
+					this.day=arr[2]
+				}
+				if(this.dataDetails.cardValidityDate=='长期'){
+					this.year='长期'
+					this.month=''
+					this.day=''
+				}
+				this.$refs.dateEl.show()
 			},
 			//设置图片
 			setImage(e) {

+ 71 - 243
pages/mine/editDriverCertificationNext.vue

@@ -60,91 +60,7 @@
 					<u--input placeholder="请输入驾驶证发证机关" inputAlign='right' border="none" v-model="dataDetails.lssuingAuthority" >
 					</u--input>
 				</view>
-				<!--
-				<view class="title">上传行驶证主页</view>
-				<view @click="uploadImg(3)" class="picture picture3" v-if="!dataDetails.drivingLicenseHomePage">
-					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-					<view class="text">上传行驶证主页</view>
-				</view>
-				<view v-if="dataDetails.drivingLicenseHomePage" @click.stop="uploadImg(3)"
-					class="preview-card-img picture">
-					<view @click.stop="delCard(3)">
-						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-						</image>
-					</view>
-					<image class="" :src="dataDetails.drivingLicenseHomePage" mode="aspectFit"></image>
-				</view>
-				<view class="title">上传行驶证副页</view>
-				<view @click="uploadImg(4)" class="picture picture4" v-if="!dataDetails.drivingLicenseBackPage">
-					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-					<view class="text">上传行驶证副页</view>
-				</view>
-				<view v-if="dataDetails.drivingLicenseBackPage" @click.stop="uploadImg(4)"
-					class="preview-card-img picture">
-					<view @click.stop="delCard(4)">
-						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-						</image>
-					</view>
-					<image class="" :src="dataDetails.drivingLicenseBackPage" mode="aspectFit"></image>
-				</view>
-				<view class="flex row">
-					<view class="left-text">行驶证档案编号</view>
-					<u--input placeholder="输入行驶证档案编号" inputAlign='left' border="none"
-						v-model="dataDetails.drivingLicenseNumber">
-					</u--input>
-				</view>
-				<view class="flex row">
-					<view class="left-text">行驶证有效期</view>
-					<view class="" @click="selectValidityPeriod(1)">
-						{{dataDetails.drivingLicenseValidityDate?dataDetails.drivingLicenseValidityDate:'选择有效截止日期>'}}
-					</view>
-				</view>
-
-
-				<view class="" v-if="isGCar">
-					<view class="title row flex">挂车行驶证主页</view>
-					<view @click="uploadImg(5)" class="picture picture5" v-if="!dataDetails.trailerLicenseHomePage">
-						<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-						<view class="text">上传挂车行驶证主页</view>
-					</view>
-					<view v-if="dataDetails.trailerLicenseHomePage" @click.stop="uploadImg(5)"
-						class="preview-card-img picture">
-						<view @click.stop="delCard(5)">
-							<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-							</image>
-						</view>
-						<image class="" :src="dataDetails.trailerLicenseHomePage" mode="aspectFit"></image>
-					</view>
-				</view>
-				<view v-if="isGCar">
-					<view class="title row flex">挂车行驶证副页</view>
-					<view @click="uploadImg(6)" class="picture picture6" v-if="!dataDetails.trailerLicenseBackPage">
-						<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-						<view class="text">上传挂车行驶证副页</view>
-					</view>
-					<view v-if="dataDetails.trailerLicenseBackPage" @click.stop="uploadImg(6)"
-						class="preview-card-img picture">
-						<view @click.stop="delCard(6)">
-							<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-							</image>
-						</view>
-						<image class="" :src="dataDetails.trailerLicenseBackPage" mode="aspectFit"></image>
-					</view>
-				</view>
-				<view class="flex row" v-if="isGCar">
-					<view class="left-text">挂车行驶证档案编号</view>
-					<u--input placeholder="输入挂车行驶证档案编号" inputAlign='left' border="none"
-						v-model="dataDetails.trailerLicenseNumber">
-					</u--input>
-				</view>
-				<view class="flex row" v-if="isGCar">
-					<view class="left-text">挂车行驶证有效期</view>
-					<view class="" @click="selectValidityPeriod(2)">
-						{{dataDetails.trailerLicenseValidityDate?dataDetails.trailerLicenseValidityDate:'选择有效截止日期>'}}
-					</view>
-				</view>
-				-->
-
+				
 				<view class="title">从业资格证</view>
 				<view @click="uploadImg(7)" class="picture picture7" v-if="!dataDetails.qualificationCertificate">
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
@@ -170,64 +86,11 @@
 					<u--input maxlength='19' placeholder="请输入从业资格证号" inputAlign='right' border="none" v-model="dataDetails.qualificationCertificateNumber">
 					</u--input>
 				</view>
-				<!--
-
-				<view class="title">道路运输证</view>
-				<view @click="uploadImg(8)" class="picture picture8" v-if="!dataDetails.operationCertificate">
-					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-					<view class="text">上传道路运输证</view>
-				</view>
-				<view v-if="dataDetails.operationCertificate" @click.stop="uploadImg(8)"
-					class="preview-card-img picture">
-					<view @click.stop="delCard(8)">
-						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-						</image>
-					</view>
-					<image class="" :src="dataDetails.operationCertificate" mode="aspectFit"></image>
-				</view>
-				<view class="flex row">
-					<view class="left-text">道路运输证号</view>
-					<u--input placeholder="输入道路运输证号" inputAlign='left' border="none"
-						v-model="dataDetails.operationCertificateNumber">
-					</u--input>
-				</view>
-				<view class="flex row">
-					<view class="left-text">道路运输证有效期</view>
-					<view class="" @click="selectValidityPeriod(4)">
-						{{dataDetails.operationCertificateValidityDate?dataDetails.operationCertificateValidityDate:'选择有效期>'}}
-					</view>
-				</view>
-
-				<view v-if="isGCar">
-					<view class="title row flex">挂车道路运输证</view>
-					<view @click="uploadImg(9)" class="picture picture9"
-						v-if="!dataDetails.trailerOperationCertificate">
-						<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-						<view class="text">上传挂车道路运输证</view>
-					</view>
-					<view v-if="dataDetails.trailerOperationCertificate" @click.stop="uploadImg(9)"
-						class="preview-card-img picture">
-						<view @click.stop="delCard(9)">
-							<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-							</image>
-						</view>
-						<image class="" :src="dataDetails.trailerOperationCertificate" mode="aspectFit"></image>
-					</view>
-				</view>
-				<view class="flex row" v-if="isGCar">
-					<view class="left-text">挂车道路运输证号</view>
-					<u--input placeholder="输入挂车道路运输证号" inputAlign='left' border="none"
-						v-model="dataDetails.trailerOperationCertificateNumber">
+				<view class="flex row ">
+					<view class="left-text">道路运输经营许可证号</view>
+					<u--input maxlength='30' placeholder="请输入道路运输经营许可证号" inputAlign='right' border="none" v-model="dataDetails.actualCarrierBusinessLicense">
 					</u--input>
 				</view>
-				<view class="flex row" v-if="isGCar">
-					<view class="left-text">挂车运输证有效期</view>
-					<view class="" @click="selectValidityPeriod(5)">
-						{{dataDetails.trailerOperationCertificateValidityDate?dataDetails.trailerOperationCertificateValidityDate:'选择有效期>'}}
-					</view>
-				</view>
-				
-				-->
 				<view class="flex row noborder align-center">
 					<view class="left-text">通讯地址</view>
 					<u--textarea v-model="dataDetails.postalAddress" border="none"  placeholder="输入通讯地址" autoHeight  maxlength="30"></u--textarea>
@@ -249,9 +112,18 @@
 				@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
 				@close="isShowimgType=false">
 			</u-action-sheet>
-			<u-picker :show="isShowValidity" ref="uPicker" :columns="ValidityPeriodType==9?validityPeriod1:validityPeriod" @confirm="confirmValidityPeriod"
+			<itmister-date-picker :dateStatus="0"
+			:checkYear="year" :checkMonth="month" :checkDay="day"
+			ref="datestartEl" :startYear="1980"  :futureYear="10" 
+			@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+			<itmister-date-picker :overdueContent="overdueContent" :dateStatus="status" 
+			:periodOfValidity="true" 
+			:checkYear="year" :checkMonth="month" :checkDay="day"
+			ref="dateEl" :startYear="1980"  :futureYear="10" 
+			@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+			<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="ValidityPeriodType==9?validityPeriod1:validityPeriod" @confirm="confirmValidityPeriod"
 				:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
-			</u-picker>
+			</u-picker> -->
 			<u-picker :show="isShowDrive" ref="uPicker" :columns="driveList" @confirm="confirmDriveType"
 				:closeOnClickOverlay='true' @close='isShowDrive=false' @cancel='isShowDrive=false'>
 			</u-picker>
@@ -280,6 +152,9 @@
 				uploadType: '',
 				isShowimgType: false,
 				dataDetails: {},
+				year:'',
+				month:'',
+				day:'',
 				radiolist: [{
 						name: '挂车司机',
 						disabled: false
@@ -302,8 +177,6 @@
 			} else {
 				this.radiovalue = '非挂车司机'
 			}
-			this.validityPeriod = this.$helper.makeValidityPeriod('kong',1980)
-			this.validityPeriod1 = this.$helper.makeValidityPeriod(0,1980)
 		},
 		methods: {
 			async get_camera_permission() {
@@ -361,125 +234,73 @@
 				// 	data: this.consentStatus
 				// });
 			},
-			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if(e.value[0]=='长期'){
-					if (e.value[1] || e.value[2]) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "选择长期不允许选择月日!",
-						})
-						return
-					}
+			confirmValidityPeriod(date) {
+				console.log('confirm', date)
 					switch (this.ValidityPeriodType) {
 						case 0:
-							this.dataDetails.driverLicenseValidityStartDate = e.value[0]
+							this.dataDetails.driverLicenseValidityStartDate = date.date
 							break
 						case 1:
-							this.dataDetails.drivingLicenseValidityDate = e.value[0] 
+							this.dataDetails.drivingLicenseValidityDate = date.date 
 							break
 						case 2:
-							this.dataDetails.trailerLicenseValidityDate = e.value[0]
+							this.dataDetails.trailerLicenseValidityDate = date.date
 							break
 						case 3:
-							this.dataDetails.qualificationCertificateValidityDate = e.value[0] 
+							this.dataDetails.qualificationCertificateValidityDate = date.date 
 							break
 						case 4:
-							this.dataDetails.operationCertificateValidityDate = e.value[0] 
+							this.dataDetails.operationCertificateValidityDate = date.date 
 							break
 						case 5:
-							this.dataDetails.trailerOperationCertificateValidityDate = e.value[0] 
+							this.dataDetails.trailerOperationCertificateValidityDate = date.date 
 							break
 						case 9:
-							this.dataDetails.driverLicenseValidityDate = e.value[0]
+							this.dataDetails.driverLicenseValidityDate = date.date
 							break
 					}
-				}else{
-					if(e.value[0]==''){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "年份不能为空!",
-						})
-						return
-					}else if(e.value[1]==''){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "月份不能为空!",
-						})
-						return
-					}else if(e.value[2]==''){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "日期不能为空!",
-						})
-						return
+					this.$forceUpdate()
+				
+			},
+			selectValidityPeriod(type) {
+				this.ValidityPeriodType = type
+				if(type==0){
+					if(this.dataDetails.driverLicenseValidityStartDate!='长期'&&this.dataDetails.driverLicenseValidityStartDate){
+						var arr=this.dataDetails.driverLicenseValidityStartDate.split('-')
+						this.year=arr[0]
+						this.month=arr[1]
+						this.day=arr[2]
 					}
-					var date=new Date()
-					var text=''
+					this.$refs.datestartEl.show()
+				}else{
 					switch (this.ValidityPeriodType) {
-						case 3:
-							text='从业资格证已过期!'
-							break
-						case 9:
-							text='驾驶证已过期!'
-							break
-					}
-					if(this.ValidityPeriodType==3||this.ValidityPeriodType==9){
-						if(e.value[0]<date.getFullYear()){
-							this.$refs.uToast.show({
-								type: 'error',
-								message: text,
-							})
-							return
-						}
-						if(e.value[0]==date.getFullYear()&&Number(e.value[1])<(date.getMonth()+1)){
-							this.$refs.uToast.show({
-								type: 'error',
-								message: text,
-							})
-							return
-						}
-						if(e.value[0]==date.getFullYear()&&Number(e.value[1])==(date.getMonth()+1)&&Number(e.value[2])<=(date.getDate())){
-							this.$refs.uToast.show({
-								type: 'error',
-								message: text,
-							})
-							return
+					case 3:
+						this.status=0
+						this.overdueContent='从业资格证已过期'
+						if(this.dataDetails.qualificationCertificateValidityDate!='长期'&&this.dataDetails.qualificationCertificateValidityDate){
+							var arr=this.dataDetails.qualificationCertificateValidityDate.split('-')
+							this.year=arr[0]
+							this.month=arr[1]
+							this.day=arr[2]
 						}
+						break
+					case 9:
+					if(this.dataDetails.driverLicenseValidityDate!='长期'&&this.dataDetails.qualificationCertificateValidityDate){
+						var arr=this.dataDetails.driverLicenseValidityDate.split('-')
+						this.year=arr[0]
+						this.month=arr[1]
+						this.day=arr[2]
 					}
-					switch (this.ValidityPeriodType) {
-						case 0:
-							this.dataDetails.driverLicenseValidityStartDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-							break
-						case 1:
-							this.dataDetails.drivingLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-							break
-						case 2:
-							this.dataDetails.trailerLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-							break
-						case 3:
-							this.dataDetails.qualificationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
-								.value[2]
-							break
-						case 4:
-							this.dataDetails.operationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[
-								2]
-							break
-						case 5:
-							this.dataDetails.trailerOperationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
-								.value[2]
-							break
-						case 9:
-							this.dataDetails.driverLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
-									.value[2]
-								break
+					if(this.dataDetails.driverLicenseValidityDate=='长期'){
+						this.year='长期'
+						this.month=''
+						this.day=''
+					}
+						this.overdueContent='驾驶证已过期'
+						break
 					}
+					this.$refs.dateEl.show()
 				}
-				this.isShowValidity = false
-			},
-			selectValidityPeriod(type) {
-				this.ValidityPeriodType = type
-				this.isShowValidity = true
 			},
 			driveType(){
 				this.isShowDrive = true
@@ -761,7 +582,14 @@
 				// 		})
 				// 		return true
 				// 	}
-				// }
+				// }.
+				if (uni.$u.test.isEmpty(this.dataDetails.actualCarrierBusinessLicense)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "道路运输经营许可证号不能为空!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataDetails.postalAddress)) {
 					this.$refs.uToast.show({
 						type: 'error',

+ 14 - 3
pages/mine/index.vue

@@ -13,8 +13,8 @@
 				<view class="right-text">
 					<!-- <view @click="toLogin" class="name">{{hasLogin? userName : '立即登录' }} -->
 					<!-- {{hasLogin?driverSex:""}} -->
-					<view @click="toLogin" class="name">{{hasLogin? userName : '立即登录' }} {{hasLogin?driverSex:""}}
-					</view>
+					<!-- <view class="name" v-if='userName'></view> -->
+					<view @click="toLogin" class="name">{{hasLogin? userName : '立即登录' }} {{hasLogin?driverSex:""}}</view>
 					<view @click="toLogin" class="phone" v-if="hasLogin">{{starUserphone}}</view>
 				</view>
 			</view>
@@ -103,6 +103,16 @@
 					<image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image>
 				</view>
 			</view>
+			<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/index1')">
+				<view class="flex align-center">
+					<image class="img" src="@/static/images/mine/set.png" mode='widthFix'>
+					</image>
+					<view>测试</view>
+				</view>
+				<view>
+					<image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image>
+				</view>
+			</view>
 			<!-- 	<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/evaluate')">
 				<view class="flex align-center">
 					<image class="img" src="@/static/images/mine/set.png" mode='widthFix'>
@@ -238,7 +248,8 @@
 								this.userName = this.firstAuthentication.driverCall
 								this.driverSex = "先生"
 							} else {
-								this.userName = this.firstAuthentication.driverCall
+								// this.userName = this.firstAuthentication.driverCall
+								this.userName = this.userInfo.userName //未认证时  显示(用户 + 电话号)未认证没有性别,通过性别判断认证或未认证
 								this.driverSex = ""
 							}
 

+ 200 - 0
pages/mine/index1.vue

@@ -0,0 +1,200 @@
+<template>
+	<view class="content">
+		<image class="logo" src="/static/logo.png"></image>
+		<button type="primary" @click="auth()">授权</button>
+		<button type="primary" @click="start()">开启定位</button>		
+		<button type="primary" @click="send()">发送定位</button>	
+		<button type="primary" @click="pause()">暂停定位</button>	
+		<button type="primary" @click="restart()">重启定位</button>	
+		<button type="primary" @click="stop()">结束定位</button>	
+	</view>
+</template>
+
+<script>
+	//插件对象
+	var sdkwx = uni.requireNativePlugin('Hdgq-LocSdkWX');
+	export default {
+		data() {
+			return {
+				title: 'Hello',
+				vehicleNumber:"浙A8G93H",//车牌号
+				driverName:"王师傅",//司机姓名
+				remark:"测试",//备注
+				shippingNoteInfos:[{
+					shippingNoteNumber:"YD20211012",//运单号
+					serialNumber:"0000",//分单号
+					startCountrySubdivisionCode:"330108",//起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					endCountrySubdivisionCode:"330205",//到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					startLongitude:"120.152193",//起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					startLatitude:"30.281367",//起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					endLongitude:"121.552812",//到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					endLatitude:"29.885021",//到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					startLocationText:"杭州",//起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					endLocationText:"宁波",//到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					vehicleNumber:"浙A8G93H",//车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+					driverName:"王师傅",//司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+					interval:"5000"//请求时间间隔,SDK 回调返 回(单位 ms)				 
+				}]//运单信息列表,一辆车运单数最大支持数为 10
+			}
+		},
+		onLoad() {
+			// console.log("appId-------------------",uni.getAccountInfoSync().miniProgram.appId)
+			// let phoneType = uni.getSystemInfoSync().platform //判断手机类型
+			// if( phoneType == "android"){
+			// 	this.appId = "uni.UNIDCD13AC"
+			// }else if(phoneType == "ios"){
+			// 	this.appId = "uni.UNI9C76CB6"
+			// }
+			//隐私合规接口,HBuildx3.3.3及其以后的版本需要调用合规检查
+			var isContains = true;//隐私权政策是否包含高德开平隐私权政策  true是包含
+			var isShow = true;//隐私权政策是否弹窗展示告知用户 true是展示 
+			sdkwx.updatePrivacyShow(isContains, isShow);
+			
+			var isAgree = true;//隐私权政策是否取得用户同意  true是用户同意
+			sdkwx.updatePrivacyAgree(isAgree);
+			//检查定位权限
+			sdkwx.checkLocationPermission(function(res){
+				console.log(res);
+			});
+		},
+		methods: {
+			auth() { 
+				//授权
+				var appId = "uni.UNI9C76CB6";//网络货运企业APP的唯一标识
+				var appSecurity = "24c593b7037347e08857a6ab05fd231b0509f5bb7cb741078f524f506ad32db8";//网络货运企业在省平台申请的接入安全码
+				var enterpriseSenderCode = "23106960";//网络货运企业在省平台申请的企业发送代码
+				var environment = "debug";//环境:“debug”接入测试环境,“release”接入正式环境。
+				sdkwx.auth(appId, appSecurity, enterpriseSenderCode, environment, function(res) {
+					console.log(res,"成功");
+					if (res.type == "onSuccess") {
+						//成功
+					} else if (res.type == "onFailure"){
+						//失败
+						var errorCode = res.data.errorCode;//错误码
+						var errorMsg = res.data.errorMsg;//错误描述
+					}
+					uni.showModal({
+						content:JSON.stringify(res)
+					});
+				});
+			},
+			start(){
+				//开启定位
+				var vehicleNumber= this.vehicleNumber;//车牌号
+				var driverName = this.driverName;//司机姓名
+				var remark = this.remark;//备注
+				var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
+				sdkwx.start(vehicleNumber, driverName, remark, shippingNoteInfos, function(res){
+					console.log(res);
+					if (res.type == "onSuccess") {
+						//成功
+						var shippingNoteInfos = res.data;//运单信息列表
+					} else if (res.type == "onFailure"){
+						//失败
+						var errorCode = res.data.errorCode;//错误码
+						var errorMsg = res.data.errorMsg;//错误描述
+					}
+				});			   
+			},
+			send(){
+				//发送定位
+				var vehicleNumber= this.vehicleNumber;//车牌号
+				var driverName = this.driverName;//司机姓名
+				var remark = this.remark;//备注
+				var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
+				sdkwx.send(vehicleNumber, driverName, remark, shippingNoteInfos, function(res){
+					console.log(res);
+					if (res.type == "onSuccess") {
+						//成功
+						var shippingNoteInfos = res.data;//运单信息列表
+					} else if (res.type == "onFailure"){
+						//失败
+						var errorCode = res.data.errorCode;//错误码
+						var errorMsg = res.data.errorMsg;//错误描述
+					}
+				});	
+			},
+			pause(){
+				//暂停定位
+				var vehicleNumber= this.vehicleNumber;//车牌号
+				var driverName = this.driverName;//司机姓名
+				var remark = this.remark;//备注
+				var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
+				sdkwx.pause(vehicleNumber, driverName, remark, shippingNoteInfos, function(res) {
+					console.log(res);
+					if (res.type == "onSuccess") {
+						//成功
+					} else if (res.type == "onFailure"){
+						//失败
+						var errorCode = res.data.errorCode;//错误码
+						var errorMsg = res.data.errorMsg;//错误描述
+					}
+				});			 			
+			},
+			restart(){
+				//重启定位
+				var vehicleNumber= this.vehicleNumber;//车牌号
+				var driverName = this.driverName;//司机姓名
+				var remark = this.remark;//备注
+				var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
+				sdkwx.restart(vehicleNumber, driverName, remark, shippingNoteInfos, function(res) {
+					console.log(res);
+					if (res.type == "onSuccess") {
+						//成功
+						var shippingNoteInfos = res.data;//运单信息列表
+					} else if (res.type == "onFailure"){
+						//失败
+						var errorCode = res.data.errorCode;//错误码
+						var errorMsg = res.data.errorMsg;//错误描述
+					}	
+				});			
+			},
+			stop(){
+				//结束定位
+				var vehicleNumber= this.vehicleNumber;//车牌号
+				var driverName = this.driverName;//司机姓名
+				var remark = this.remark;//备注
+				var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
+				sdkwx.stop(vehicleNumber, driverName, remark, shippingNoteInfos, function(res) {
+					console.log(res);
+					if (res.type == "onSuccess") {
+						//成功
+					} else if (res.type == "onFailure"){
+						//失败
+						var errorCode = res.data.errorCode;//错误码
+						var errorMsg = res.data.errorMsg;//错误描述
+					}	
+				});			
+			},
+		}
+		
+	}
+</script>
+
+<style>
+	.content {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.logo {
+		height: 200rpx;
+		width: 200rpx;
+		margin-top: 200rpx;
+		margin-left: auto;
+		margin-right: auto;
+		margin-bottom: 50rpx;
+	}
+
+	.text-area {
+		display: flex;
+		justify-content: center;
+	}
+
+	.title {
+		font-size: 36rpx;
+		color: #8f8f94;
+	}
+</style>

+ 3 - 7
pages/mine/manageBankCards/addBankCard.vue

@@ -36,14 +36,9 @@
 					<view @click="manualInput" class="type">选择支行</view>
 				</view>
 				<view class="flex align-center" v-if="!isShowManualInput">
-					<!-- 	<u--input  @click="selectZhbank" placeholder="选择开户支行" inputAlign='left' border="none" disabled>
-					</u--input> -->
-					<u--input class="select-bankzh point" placeholder="选择开户支行" inputAlign='left' border="none"
-						v-model="dataDetails.bankDepositBranch">
-					</u--input>
-					<!-- <view class="select-bankzh" @click="selectZhbank">
+					<view :style="{'color':dataDetails.bankDepositBranch?'#000':'#C6CBD5'}" style='font-size:15px;' class="select-bankzh" @click="selectZhbank">
 						{{dataDetails.bankDepositBranch?dataDetails.bankDepositBranch:'选择开户支行'}}
-					</view> -->
+					</view>
 					<view @click="manualInput" class="type">手动输入</view>
 				</view>
 
@@ -239,6 +234,7 @@
 										'/driverInfo/bankShibie', {
 											bankImg: result,
 										}).then(res => {
+											_this.dataDetails.bankDepositBranch=''
 										_this.dataDetails.payeeAddressUrl = result
 										if (res.data.bankNo) {
 											_this.dataDetails.bankCard = res.data.bankNo

+ 138 - 107
pages/mine/manageVehicles/addVehicle.vue

@@ -137,9 +137,10 @@
 			</view>
 			<view class="flex row flex-space-between">
 				<view class="left-text">使用性质</view>
-				<u--input placeholder="输入使用性质" inputAlign='right' border="none" v-model="dataDetails.useNature"
+				{{dataDetails.useNature?dataDetails.useNature:'输入使用性质'}}
+				<!-- <u--input placeholder="输入使用性质" inputAlign='right' border="none" v-model="dataDetails.useNature"
 					disabled>
-				</u--input>
+				</u--input> -->
 			</view>
 			<view class="flex row flex-space-between">
 				<view class="left-text">发证机关</view>
@@ -227,9 +228,10 @@
 			</view>
 			<view class="flex row flex-space-between" v-if="sign == '挂车'">
 				<view class="left-text">使用性质</view>
-				<u--input placeholder="输入使用性质" inputAlign='right' border="none" v-model="dataDetails.guaUseNature"
+				{{dataDetails.guaUseNature?dataDetails.guaUseNature:'输入使用性质'}}
+			<!-- 	<u--input placeholder="输入使用性质" inputAlign='right' border="none" v-model="dataDetails.guaUseNature"
 					disabled>
-				</u--input>
+				</u--input> -->
 			</view>
 			<view class="flex row flex-space-between" v-if="sign == '挂车'">
 				<view class="left-text">发证机关</view>
@@ -333,7 +335,7 @@
 				<view class="flex row">
 					<view class="left left-text">挂车车牌号</view>
 					<view class="right flex">
-						<input class="car-uumber" v-model='dataDetails.guaCarNumber'
+						<input class="car-uumber" v-model='dataDetails.guaCarNumber1'
 							@click.stop="handleShowKeyboard1(index)" :disabled="true" placeholder-class= "phsy" placeholder="输入挂车牌号"
 							name="input"></input>
@@ -408,9 +410,12 @@
 		</u-action-sheet>
 		<u-picker :show="carColor" :columns="colorColumns" :closeOnClickOverlay='true' @close='colorClose'
 			@cancel='colorClose' @confirm='confirmColor' ></u-picker>
-		<u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+		<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
-		</u-picker>
+		</u-picker> -->
+		<itmister-date-picker :overdueContent="overdueContent" :dateStatus="0" :periodOfValidity="true" ref="dateEl" :startYear="1999"  :futureYear="6" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+		<itmister-date-picker :overdueContent="overdueContent" :dateStatus="1" :periodOfValidity="true" ref="dateXSZEl" :startYear="1999"  :futureYear="10" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+		<itmister-date-picker :dateStatus="0" ref="daterestsEl" :startYear="1980"  :futureYear="0" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		<u-picker :show="isShowCarType" ref="uPicker" :columns="carTypeList" @confirm="confirmCarType"
 			:closeOnClickOverlay='true' @close='isShowCarType=false' @cancel='isShowCarType=false'>
 		</u-picker>
@@ -433,6 +438,7 @@
 				keyShow1: false,
 				carNumber: '',
 				carNumber1: "",
+				overdueContent:'',
 				dataDetails: {
 					// driverId: '',
 					// carNumber: '',
@@ -451,6 +457,7 @@
 					// addressUrl: ''
 
 				},
+				startYear:1980,
 				carTypeList:[["汽油","柴油","油电混合","纯电动","插电式混合动力","增程式"]],
 				isShowCarType:false,
 				carModelColumns: [
@@ -484,7 +491,9 @@
 			_this = this;
 			this.dataDetails.commonId = this.userInfo.id
 			this.get_camera_permission()
-			this.validityPeriod = this.$helper.makeValidityPeriod()
+		},
+		onShow(){
+			this.startYear=new Date().getFullYear()-30
 		},
 		methods: {
 			async get_camera_permission() {
@@ -517,10 +526,10 @@
 			},
 			//挂车牌号弹出键盘
 			handleShowKeyboard1(index) {
-				if (this.dataDetails.guaCarNumber == '') {
+				if (this.dataDetails.guaCarNumber1 == '') {
 					this.carNumber1 = ''
 				} else {
-					this.carNumber1 = this.dataDetails.guaCarNumber
+					this.carNumber1 = this.dataDetails.guaCarNumber1
 				}
 				if (this.$refs.keyboard1.open) {
 					this.$refs.keyboard1.open(false) //true 键盘显示 false 键盘隐藏
@@ -536,7 +545,7 @@
 			},
 			handleClick1(e) {
 				this.carNumber1 = e.value
-				this.dataDetails.guaCarNumber = e.value //键盘输入值
+				this.dataDetails.guaCarNumber1 = e.value //键盘输入值
 			},
 			delCard(type) {
 				switch (type) {
@@ -569,7 +578,38 @@
 			},
 			selectValidityPeriod(type) {
 				this.ValidityPeriodType = type
-				this.isShowValidity = true
+				switch (this.ValidityPeriodType) {
+					case 1:
+					this.overdueContent='行驶证已过期'
+					this.$refs.dateXSZEl.show()
+					break;
+					case 2:
+					this.overdueContent='挂车行驶证已过期'
+					this.$refs.dateXSZEl.show()
+					break;
+					case 4:
+					this.overdueContent='道路运输证已过期'
+					this.$refs.dateEl.show()
+					break;
+					case 5:
+					this.overdueContent='挂车道路运输证已过期'
+					this.$refs.dateEl.show()
+					break;
+					case 6:
+					this.$refs.daterestsEl.show()
+					break;
+					case 7:
+					this.$refs.daterestsEl.show()
+					break;
+					case 8:
+					this.$refs.daterestsEl.show()
+					break;
+					case 9:
+					this.$refs.daterestsEl.show()
+					break;
+				}
+				// this.isShowValidity = true
+				
 			},
 			// 上传图片
 			imgTypeSelect(val) {
@@ -691,8 +731,12 @@
 															_this.dataDetails.trailerLicenseIssueDate = res
 																.data.licenseIssueDate
 														}
-														_this.dataDetails.guaCarNumber = res.data
-															.carNum //车牌号
+														if(res.data
+															.carNum){
+																_this.dataDetails.guaCarNumber1 = res.data
+															.carNum.substring(0,6)
+															}
+														 //车牌号
 														_this.dataDetails.guaOwner = res.data
 															.owner //车辆所有人
 														_this.$forceUpdate()
@@ -801,105 +845,40 @@
 
 				// }
 			},
-			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if(e.value[0]==''){
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "年份不能为空!",
-					})
-					return
-				}else if(e.value[1]==''){
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "月份不能为空!",
-					})
-					return
-				}else if(e.value[2]==''){
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "日期不能为空!",
-					})
-					return
-				}
-				var date=new Date()
-				var text=''
-				switch (this.ValidityPeriodType) {
-					case 4:
-						text='道路运输证已过期!'
-						break
-					case 5:
-						text='挂车道路运输证已过期!'
-						break
-					case 1:
-						text='行驶证已过期!'
-						break
-					case 2:
-						text='挂车行驶证已过期!'
-						break
-				}
-				if(this.ValidityPeriodType==1||this.ValidityPeriodType==2||this.ValidityPeriodType==4||this.ValidityPeriodType==5){
-					if(e.value[0]<date.getFullYear()){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: text,
-						})
-						return
-					}
-					if(e.value[0]==date.getFullYear()&&Number(e.value[1])<(date.getMonth()+1)){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: text,
-						})
-						return
-					}
-					if(e.value[0]==date.getFullYear()&&Number(e.value[1])==(date.getMonth()+1)&&Number(e.value[2])<=(date.getDate())){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: text,
-						})
-						return
-					}
-				}
+			confirmValidityPeriod(date) {
+				console.log('confirm', date)
 				switch (this.ValidityPeriodType) {
 					case 0:
-						this.dataDetails.driverLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						this.dataDetails.driverLicenseValidityDate = date.date
 						break
 					case 1:
-						this.dataDetails.drivingLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						this.dataDetails.drivingLicenseValidityDate = date.date
 						break
 					case 2:
-						this.dataDetails.trailerLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						this.dataDetails.trailerLicenseValidityDate = date.date
 						break
 					case 3:
-						this.dataDetails.qualificationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
-							.value[2]
+						this.dataDetails.qualificationCertificateValidityDate = date.date
 						break
 					case 4:
-						this.dataDetails.operationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[
-							2]
+						this.dataDetails.operationCertificateValidityDate = date.date
 						break
 					case 5:
-						this.dataDetails.trailerOperationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
-							.value[2]
+						this.dataDetails.trailerOperationCertificateValidityDate = date.date
 					case 6: //行驶证注册日期
-						this.dataDetails.drivingLicenseRegistrationDate = e.value[0] + '-' + e.value[1] + '-' + e
-							.value[2]
+						this.dataDetails.drivingLicenseRegistrationDate = date.date
 						break
 					case 7: //行驶证发证日期
-						this.dataDetails.drivingLicenseIssueDate = e.value[0] + '-' + e.value[1] + '-' + e
-							.value[2]
+						this.dataDetails.drivingLicenseIssueDate = date.date
 						break
 					case 8: //挂车行驶证注册日期
-						this.dataDetails.trailerLicenseRegistrationDate = e.value[0] + '-' + e.value[1] + '-' + e
-							.value[2]
+						this.dataDetails.trailerLicenseRegistrationDate = date.date
 						break
 					case 9: //挂车行驶证发证日期
-						this.dataDetails.trailerLicenseIssueDate = e.value[0] + '-' + e.value[1] + '-' + e
-							.value[2]
+						this.dataDetails.trailerLicenseIssueDate = date.date
 						break
 				}
-				this.isShowValidity = false
+				this.$forceUpdate()
 			},
 			// 车型切换
 			changeCarModel(e) {
@@ -1128,6 +1107,13 @@
 					})
 					return true
 				}
+				if(!this.dataDetails.vehicleType){
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "行驶证车辆类型不能为空!",
+					})
+					return true
+				}
 				if (this.dataDetails.vehicleType.length<2||this.dataDetails.vehicleType.length>10) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -1177,6 +1163,18 @@
 					})
 					return true
 				}
+				
+				if(this.dataDetails.drivingLicenseValidityDate!='长期'){
+					var arr=this.dataDetails.drivingLicenseValidityDate.split('-')
+					if(!this.$helper.periodOfValidity(arr[0],arr[1],arr[2])){
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "行驶证已过期!",
+						})
+						return true
+					}
+				}
+				
 				if (uni.$u.test.isEmpty(this.dataDetails.lssuingAuthority)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -1248,6 +1246,16 @@
 						})
 						return true
 					}
+					if(this.dataDetails.trailerLicenseValidityDate!='长期'){
+						var arr=this.dataDetails.trailerLicenseValidityDate.split('-')
+						if(!this.$helper.periodOfValidity(arr[0],arr[1],arr[2])){
+							this.$refs.uToast.show({
+								type: 'error',
+								message: "挂车行驶证已过期!",
+							})
+							return true
+						}
+					}
 					if (uni.$u.test.isEmpty(this.dataDetails.guaLssuingAuthority)) {
 						this.$refs.uToast.show({
 							type: 'error',
@@ -1317,7 +1325,13 @@
 					})
 					return true
 				}
-				
+				if (this.dataDetails.servicingWeight>100000) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "整备质量输入错误!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataDetails.carLong) || uni.$u.test.isEmpty(this.dataDetails.carWidth) || uni
 					.$u.test.isEmpty(this.dataDetails.carHeight)) {
 					this.$refs.uToast.show({
@@ -1352,7 +1366,7 @@
 						})
 						return true
 					}
-					if (uni.$u.test.isEmpty(this.dataDetails.guaCarNumber)) {
+					if (uni.$u.test.isEmpty(this.dataDetails.guaCarNumber1)) {
 						this.$refs.uToast.show({
 							type: 'error',
 							message: "挂车车牌号不能为空!",
@@ -1373,6 +1387,13 @@
 						})
 						return true
 					}
+					if (uni.$u.test.isEmpty(this.dataDetails.guaServicingWeight)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车整备质量不能为空!",
+						})
+						return true
+					}
 					if (uni.$u.test.isEmpty(this.dataDetails.guaCarApprovedWeight)) {
 						this.$refs.uToast.show({
 							type: 'error',
@@ -1394,15 +1415,20 @@
 						})
 						return true
 					}
-					// if (this.dataDetails.fileList2.length == 0) {
-					// 	this.$refs.uToast.show({
-					// 		type: 'error',
-					// 		message: "人和挂车合影不能为空!",
-					// 	})
-					// 	return true
-					// }
-					
-					
+					if (this.fileList1.length == 0) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "请上传人和牵引车合影!",
+						})
+						return true
+					}
+					if (this.fileList2.length == 0) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "请上传人和挂车合影!",
+						})
+						return true
+					}	
 				}
 
 				
@@ -1419,8 +1445,8 @@
 					delete this.dataDetails.guaUseNature
 				}
 				if(this.dataDetails.carCategory == "挂车"){
-					if(this.dataDetails.guaCarNumber.indexOf('挂')==-1){
-						this.dataDetails.guaCarNumber=this.dataDetails.guaCarNumber+'挂'
+					if(this.dataDetails.guaCarNumber1.indexOf('挂')==-1){
+						this.dataDetails.guaCarNumber=this.dataDetails.guaCarNumber1+'挂'
 					}
 				}
 				uni.showLoading({
@@ -1428,8 +1454,9 @@
 					title: '加载中'
 				})
 				this.$request.baseRequest('post', '/driverCarInfo/api/addInfo', this.dataDetails).then(res => {
+						uni.hideLoading()
 						if (res.code == '200') {
-							uni.hideLoading()
+							
 							this.$refs.uToast.show({
 								type: 'success',
 								message: "提交成功!",
@@ -1453,6 +1480,7 @@
 
 					})
 					.catch(res => {
+						uni.hideLoading()
 						console.log(res)
 						uni.$u.toast(res.message);
 					});
@@ -1571,7 +1599,7 @@
 		}
 
 		.title {
-			color: #999999;
+			color: #000;
 			margin: 20rpx 0;
 		}
 	}
@@ -1661,4 +1689,7 @@
 	.car-uumber{
 		text-align:right;
 	}
+	.content{
+		font-size:15px;
+	}
 </style>

+ 137 - 84
pages/mine/manageVehicles/editVehicle.vue

@@ -368,9 +368,12 @@
 		</u-action-sheet>
 		<u-picker :show="carColor" :columns="colorColumns" :closeOnClickOverlay='true' @close='colorClose'
 			@cancel='colorClose' @confirm='confirmColor' ></u-picker>
-		<u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+		<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
-		</u-picker>
+		</u-picker> -->
+		<itmister-date-picker :checkYear="year" :checkMonth="month" :checkDay="day" :overdueContent="overdueContent" :dateStatus="0" :periodOfValidity="true" ref="dateEl" :startYear="1999"  :futureYear="6" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+		<itmister-date-picker :checkYear="year" :checkMonth="month" :checkDay="day" :overdueContent="overdueContent" :dateStatus="1" :periodOfValidity="true" ref="dateXSZEl" :startYear="1999"  :futureYear="10" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+		<itmister-date-picker :checkYear="year" :checkMonth="month" :checkDay="day" :dateStatus="0" ref="daterestsEl" :startYear="startYear"  :futureYear="0" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		<u-picker :show="isShowCarType" ref="uPicker" :columns="carTypeList" @confirm="confirmCarType"
 			:closeOnClickOverlay='true' @close='isShowCarType=false' @cancel='isShowCarType=false'>
 		</u-picker>
@@ -393,6 +396,10 @@
 				keyShow1: false,
 				carNumber: '',
 				carNumber1: "",
+				overdueContent:'',
+				year:'',
+				month:'',
+				day:'',
 				dataDetails: {
 					// driverId: '',
 					// carNumber: '',
@@ -431,7 +438,8 @@
 				isShowValidity: false,
 				uploadType: '',
 				isShowimgType: false,
-				sign: "挂车"
+				sign: "挂车",
+				startYear:1980
 
 			};
 		},
@@ -439,6 +447,7 @@
 			...mapState(['hasLogin', 'userInfo', 'firstAuthentication']),
 		},
 		onLoad(options) {
+			
 			_this = this;
 			console.log(options)
 			if(options.guaCarNumber){
@@ -459,7 +468,9 @@
 				url: options.guaAddressUrl
 			}]
 			this.get_camera_permission()
-			this.validityPeriod = this.$helper.makeValidityPeriod()
+		},
+		onShow(){
+			this.startYear=new Date().getFullYear()-30
 		},
 		methods: {
 			async get_camera_permission() {
@@ -543,7 +554,93 @@
 			},
 			selectValidityPeriod(type) {
 				this.ValidityPeriodType = type
-				this.isShowValidity = true
+				var arr=[]
+				switch (this.ValidityPeriodType) {
+					case 1:
+					if(this.dataDetails.drivingLicenseValidityDate!='长期'){
+						arr=this.dataDetails.drivingLicenseValidityDate.split('-')
+						this.year=arr[0]
+						this.month=arr[1]
+						this.day=arr[2]
+					}else{
+						this.year='长期'
+						this.month=''
+						this.day=''
+					}
+					this.overdueContent='行驶证已过期'
+					this.$refs.dateXSZEl.show()
+					break;
+					case 2:
+					if(this.dataDetails.trailerLicenseValidityDate!='长期'){
+						arr=this.dataDetails.trailerLicenseValidityDate.split('-')
+						this.year=arr[0]
+						this.month=arr[1]
+						this.day=arr[2]
+					}else{
+						this.year='长期'
+						this.month=''
+						this.day=''
+					}
+					this.overdueContent='挂车行驶证已过期'
+					this.$refs.dateXSZEl.show()
+					break;
+					case 4:
+					if(this.dataDetails.operationCertificateValidityDate){
+						arr=this.dataDetails.operationCertificateValidityDate.split('-')
+						this.year=arr[0]
+						this.month=arr[1]
+						this.day=arr[2]
+					}
+					this.overdueContent='道路运输证已过期'
+					this.$refs.dateEl.show()
+					break;
+					case 5:
+					if(this.dataDetails.trailerOperationCertificateValidityDate){
+						arr=this.dataDetails.trailerOperationCertificateValidityDate.split('-')
+						this.year=arr[0]
+						this.month=arr[1]
+						this.day=arr[2]
+					}
+					this.overdueContent='挂车道路运输证已过期'
+					this.$refs.dateEl.show()
+					break;
+					case 6:
+					if(this.dataDetails.drivingLicenseRegistrationDate){
+						arr=this.dataDetails.drivingLicenseRegistrationDate.split('-')
+						this.year=arr[0]
+						this.month=arr[1]
+						this.day=arr[2]
+					}
+					this.$refs.daterestsEl.show()
+					break;
+					case 7:
+					if(this.dataDetails.drivingLicenseIssueDate){
+						arr=this.dataDetails.drivingLicenseIssueDate.split('-')
+						this.year=arr[0]
+						this.month=arr[1]
+						this.day=arr[2]
+					}
+					this.$refs.daterestsEl.show()
+					break;
+					case 8:
+					if(this.dataDetails.trailerLicenseRegistrationDate){
+						arr=this.dataDetails.trailerLicenseRegistrationDate.split('-')
+						this.year=arr[0]
+						this.month=arr[1]
+						this.day=arr[2]
+					}
+					this.$refs.daterestsEl.show()
+					break;
+					case 9:
+					if(this.dataDetails.trailerLicenseIssueDate){
+						arr=this.dataDetails.trailerLicenseIssueDate.split('-')
+						this.year=arr[0]
+						this.month=arr[1]
+						this.day=arr[2]
+					}
+					this.$refs.daterestsEl.show()
+					break;
+				}
 			},
 			// 上传图片
 			imgTypeSelect(val) {
@@ -774,106 +871,40 @@
 						}
 					});
 			},
-			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if(e.value[0]==''){
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "年份不能为空!",
-					})
-					return
-				}else if(e.value[1]==''){
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "月份不能为空!",
-					})
-					return
-				}else if(e.value[2]==''){
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "日期不能为空!",
-					})
-					return
-				}
-				var date=new Date()
-				var text=''
-				switch (this.ValidityPeriodType) {
-					case 4:
-						text='道路运输证已过期!'
-						break
-					case 5:
-						text='挂车道路运输证已过期!'
-						break
-					case 1:
-						text='行驶证已过期!'
-						break
-					case 2:
-						text='挂车行驶证已过期!'
-						break
-				}
-				if(this.ValidityPeriodType==1||this.ValidityPeriodType==2||this.ValidityPeriodType==4||this.ValidityPeriodType==5){
-					if(e.value[0]<date.getFullYear()){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: text,
-						})
-						return
-					}
-					if(e.value[0]==date.getFullYear()&&Number(e.value[1])<(date.getMonth()+1)){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: text,
-						})
-						return
-					}
-					if(e.value[0]==date.getFullYear()&&Number(e.value[1])==(date.getMonth()+1)&&Number(e.value[2])<=(date.getDate())){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: text,
-						})
-						return
-					}
-				}
+			confirmValidityPeriod(date) {
+				
 				switch (this.ValidityPeriodType) {
 					case 0:
-						this.dataDetails.driverLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						this.dataDetails.driverLicenseValidityDate = date.date
 						break
 					case 1:
-						this.dataDetails.drivingLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						this.dataDetails.drivingLicenseValidityDate = date.date
 						break
 					case 2:
-						this.dataDetails.trailerLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						this.dataDetails.trailerLicenseValidityDate = date.date
 						break
 					case 3:
-						this.dataDetails.qualificationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
-							.value[2]
+						this.dataDetails.qualificationCertificateValidityDate = date.date
 						break
 					case 4:
-						this.dataDetails.operationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[
-							2]
+						this.dataDetails.operationCertificateValidityDate = date.date
 						break
 					case 5:
-						this.dataDetails.trailerOperationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
-							.value[2]
+						this.dataDetails.trailerOperationCertificateValidityDate = date.date
 						break
 					case 6: //行驶证注册日期
-						this.dataDetails.drivingLicenseRegistrationDate = e.value[0] + '-' + e.value[1] + '-' + e
-							.value[2]
+						this.dataDetails.drivingLicenseRegistrationDate = date.date
 						break
 					case 7: //行驶证发证日期
-						this.dataDetails.drivingLicenseIssueDate = e.value[0] + '-' + e.value[1] + '-' + e
-							.value[2]
+						this.dataDetails.drivingLicenseIssueDate = date.date
 						break
 					case 8: //挂车行驶证注册日期
-						this.dataDetails.trailerLicenseRegistrationDate = e.value[0] + '-' + e.value[1] + '-' + e
-							.value[2]
+						this.dataDetails.trailerLicenseRegistrationDate = date.date
 						break
 					case 9: //挂车行驶证发证日期
-						this.dataDetails.trailerLicenseIssueDate = e.value[0] + '-' + e.value[1] + '-' + e
-							.value[2]
+						this.dataDetails.trailerLicenseIssueDate = date.date
 						break
 				}
-				this.isShowValidity = false
 			},
 			// 车型切换
 			changeCarModel(e) {
@@ -1031,6 +1062,7 @@
 				});
 			},
 			validate() {
+				
 				// true 为校验不通过
 				if (uni.$u.test.isEmpty(this.dataDetails.carNumber)) {
 					this.$refs.uToast.show({
@@ -1190,6 +1222,16 @@
 					})
 					return true
 				}
+				if(this.dataDetails.drivingLicenseValidityDate!='长期'){
+					var arr=this.dataDetails.drivingLicenseValidityDate.split('-')
+					if(!this.$helper.periodOfValidity(arr[0],arr[1],arr[2])){
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "行驶证已过期!",
+						})
+						return true
+					}
+				}
 				if (uni.$u.test.isEmpty(this.dataDetails.lssuingAuthority)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -1241,6 +1283,7 @@
 						})
 						return true
 					}
+					
 					if (uni.$u.test.isEmpty(this.dataDetails.guaCarNumber)) {
 						this.$refs.uToast.show({
 							type: 'error',
@@ -1312,6 +1355,16 @@
 						})
 						return true
 					}
+					if(this.dataDetails.trailerLicenseValidityDate!='长期'){
+						var arr=this.dataDetails.trailerLicenseValidityDate.split('-')
+						if(!this.$helper.periodOfValidity(arr[0],arr[1],arr[2])){
+							this.$refs.uToast.show({
+								type: 'error',
+								message: "挂车行驶证已过期!",
+							})
+							return true
+						}
+					}
 					if (uni.$u.test.isEmpty(this.dataDetails.guaLssuingAuthority)) {
 						this.$refs.uToast.show({
 							type: 'error',
@@ -1476,7 +1529,7 @@
 		}
 
 		.title {
-			color: #999999;
+			color: #000;
 			margin: 20rpx 0;
 		}
 	}

+ 33 - 2
pages/mine/often/oftenRoute.vue

@@ -6,14 +6,14 @@
 				<view class="route_site flex">
 					<span class="blueDot dot"></span>
 					<view class="site_text">
-						<!-- {{item.sendProvince}} -->{{item.sendCity ? item.sendCity: item.sendProvince}}
+						{{item.sendProvince}}{{item.sendCity }}
 						{{item.sendArea}}
 					</view>
 					<!-- {{item.sendCity ? item.sendCity: item.sendProvince}} {{item.sendArea}} -->
 					<image class="jt_css" src="@/static/images/goodSource/jt.png" mode='widthFix'></image>
 					<span class="redDot dot"></span>
 					<view class="site_text">
-						<!-- {{item.unloadProvince}} -->{{item.unloadCity ? item.unloadCity: item.unloadProvince}}
+						{{item.unloadProvince}}{{item.unloadCity }}
 						{{item.unloadArea}}
 					</view>
 				</view>
@@ -95,6 +95,37 @@
 							if (page.num == 1) {
 								this.routeData = []
 							}
+							if(res.data.records>0){
+								for (let i = 0; i < res.data.records.length; i++) {
+									if(res.data.records[i].sendProvince=='北京'
+									||res.data.records[i].sendProvince=='天津'
+									||res.data.records[i].sendProvince=='上海'
+									||res.data.records[i].sendProvince=='重庆'
+									||res.data.records[i].sendProvince=='台湾'
+									||res.data.records[i].sendProvince=='澳门'
+									||res.data.records[i].sendProvince=='香港'
+									||res.data.records[i].sendProvince=='钓鱼岛'){
+										res.data.records[i].sendProvince=''
+									}
+									if(res.data.records[i].sendCity=='钓鱼岛'){
+										res.data.records[i].sendArea=''
+									}
+									if(res.data.records[i].unloadProvince=='北京'
+									||res.data.records[i].unloadProvince=='天津'
+									||res.data.records[i].unloadProvince=='上海'
+									||res.data.records[i].unloadProvince=='重庆'
+									||res.data.records[i].unloadProvince=='台湾'
+									||res.data.records[i].unloadProvince=='澳门'
+									||res.data.records[i].unloadProvince=='香港'
+									||res.data.records[i].unloadProvince=='钓鱼岛'){
+										res.data.records[i].unloadProvince=''
+									}
+									if(res.data.records[i].unloadCity=='钓鱼岛'){
+										res.data.records[i].unloadArea=''
+									}
+								}
+							}
+							console.log(res.data.records)
 							this.routeData = this.routeData.concat(res.data.records); //追加新数据
 							this.$forceUpdate()
 							this.mescroll.endBySize(res.data.records.length, res.data.total);

+ 19 - 18
pages/mine/set.vue

@@ -26,7 +26,7 @@
 			</view>
 		</view>
 		<view class="content2">
-<!-- 
+			<!-- 
 			<view class='flex flex-space-between' @click='UpdataAccount'>
 				<view>
 					<text>修改账号</text>
@@ -93,7 +93,7 @@
 		},
 		onShow() {
 			this.getList()
-			this.firstAuthentication=uni.getStorageSync("firstAuthentication")
+			this.firstAuthentication = uni.getStorageSync("firstAuthentication")
 		},
 		onLoad() {
 			_this = this
@@ -101,12 +101,12 @@
 			console.log(this.hasLogin)
 		},
 		methods: {
-				editName(){
-					uni.showToast({
-						icon:'none',
-						title:'可在司机认证中修改'
-					})
-				},
+			editName() {
+				uni.showToast({
+					icon: 'none',
+					title: '可在司机认证中修改'
+				})
+			},
 			UpdataAccount() {
 				uni.navigateTo({
 					url: `/pages/mine/settings/editPhone`
@@ -121,18 +121,18 @@
 				let that = this
 				uni.clearStorageSync();
 				this.$request.baseRequest('post', '/auth/api/logout').then(res => {
-					if (res.code==200) {
+					if (res.code == 200) {
 						that.$store.commit('logout')
 						// that.$api.logout()
-								uni.navigateTo({
-									url: `/pages/public/login`
-								})
+						uni.navigateTo({
+							url: `/pages/public/login`
+						})
 					}
 				})
-				
-		
+
+
 			},
-		
+
 			cancelClick() {
 				this.isShowAlert = false
 			},
@@ -204,9 +204,9 @@
 
 <style lang="scss" scoped>
 	.content {
-		height: 100vh;
+		height: calc(100vh - 7vh);
 
-color: #333333;
+		color: #333333;
 	}
 
 	.content1,
@@ -217,7 +217,8 @@ color: #333333;
 
 	.content2 {
 		margin-top: 10rpx;
-		.flex{
+
+		.flex {
 			height: 70rpx;
 		}
 	}

+ 0 - 4
pages/mine/settings/editAvatar.vue

@@ -102,15 +102,11 @@
 				// 						.catch(res => {
 				// 							uni.$u.toast(res.message);
 				// 						});
-					
-					
-					
 				// 				}
 				// 			)
 				// 		}
 				// 	});
 				// }
-
 			},
 			submit() {
 				this.deptListurl.id = this.userInfo.id

+ 9 - 2
pages/mine/settings/editPassword.vue

@@ -13,7 +13,10 @@
 			</view>
 			<view style='border-bottom:1px solid #E8E9ED;padding:10px;position:relative;'>
 				<input class='password' style='height:30px;' v-model='password' placeholder="请输入新密码,6-16位字符" :type="type" value="" />
-				<view @click='switchover' style='position:absolute;right:0;top:38%;z-index:10;cursor:pointer;' class="iconfont " :class='type=="password"?"icon-yanjing-biyan":"icon-yanjing-zhengyan"'></view>
+				<view  style='position:absolute;right:0;top:38%;z-index:10;cursor:pointer;' class="iconfont ">
+					<image class='yanjingicon' style='width:22px;height:22px;margin-top: -10rpx;' @click='switchover' v-if="type=='password'" src="../../../static/yioncang.png" mode=""></image>
+					<image class='yanjingicon' style='width:22px;height:22px;margin-top: -10rpx;' @click='switchover' v-else src="../../../static/xianshi.png" mode=""></image>
+				</view>
 			</view>
 			<button :class='phone!=""&&verifyCode!=""&&password!=""?"active":""' @click='reset' class='verificationCode'>重置密码</button>
 		</view>
@@ -107,7 +110,7 @@
 				}
 				if(/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.phone)){
 				var that=this
-					this.$request.baseRequest('get','/commonUser/sendVerifyCode',{phone:this.phone,identification:1}).then(res => {
+					this.$request.baseRequest('get','/commonUser/sendVerifyCode',{phone:this.phone,identification:1,flag:2}).then(res => {
 					
 					if(res.code==200){
 						that.sendDisabled = true
@@ -345,4 +348,8 @@
 		display:inline-block;
 		color:#2772FB;
 	}
+	.yanjingicon{
+		margin: 0;
+		justify-content: flex-end;
+	}
 </style>

+ 2 - 1
pages/news/index.vue

@@ -174,6 +174,7 @@
 
 					})
 					.catch(res => {
+						uni.hideLoading()
 						uni.$u.toast(res.message);
 					});
 			},
@@ -192,7 +193,7 @@
 						this.newsNumber() //查询消息气泡
 					})
 					.catch(res => {
-						
+						uni.hideLoading()
 						uni.$u.toast(res.message);
 					});
 			},

+ 1 - 1
pages/news/newsSee.vue

@@ -32,7 +32,7 @@
 <style lang="scss">
 	.center{
 		padding:30rpx;
-		height: calc(100vh - 11.2vh);
+		height: calc(100vh - 4vh);
 		background: #F5F6FA ;
 		.news_info{
 			background: #FFFFFF;

+ 2 - 1
pages/order/addEvaluation.vue

@@ -280,7 +280,8 @@
 		.ziti {
 			color: #909090;
 			margin-right: 20rpx;
-			width: 160rpx;
+			width: 200rpx;
+			min-width: 180rpx;
 		}
 
 		.xkuang {

+ 21 - 7
pages/order/cargoOwnerSee.vue

@@ -87,10 +87,10 @@
 								<view class="evaluate_name">{{item.driverName}}</view>
 								<view class="evaluate_date m-top10">{{objectInfo.createDate.split(' ')[0]}}</view>
 								<view class="flex m-top10">
-									<view class="branch_css ">{{item.count}}</view>
+									<view class="branch_css ">{{item.ownerScoreObtained}}</view>
 									<view class="">
-										<start count="5" v-model="item.count" size="35" activeColor="#ffaa00" :size="18"
-											:allowHalf='true' :readonly='true'>
+										<start count="5" v-model="item.ownerScoreObtained" size="35" activeColor="#ffaa00" :size="18"
+											:allowHalf='true' :disabled='true'>
 										</start>
 									</view>
 								</view>
@@ -98,7 +98,7 @@
 									{{item.driverContent}}
 								</view>
 								<view style='flex-wrap: wrap;' class='flex'>
-									<u--image style='margin:7rpx;border:1px solid #ccc;' v-for="(item,index) in item.imgList" :src="item" width='170rpx'
+									<u--image style='margin:7rpx;border:1px solid #ccc;' v-for="(item1,index) in item.imgList" @click='ylImg(item.imgList)' :src="item1" width='170rpx'
 										height='170rpx'>
 									</u--image>
 								</view>
@@ -166,6 +166,20 @@
 			this.show = true
 		},
 		methods: {
+			ylImg(src) {
+				uni.previewImage({
+					urls: src,
+					longPressActions: {
+						itemList: ['发送给朋友', '保存图片', '收藏'],
+						success: function(data) {
+							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
+						},
+						fail: function(err) {
+							console.log(err.errMsg);
+						}
+					}
+				});
+			},
 			selectTypeClose() {
 				this.show = false
 			},
@@ -221,9 +235,9 @@
 								that.list[i].imgList = that.list[i].driverUrl.split(',')
 							}
 
-							that.list[i].count = (Number(that.list[i].ownerCredit) + Number(that.list[i]
-								.tranEfficiency) + Number(that.list[i].freightPayment) + Number(that.list[i]
-								.serviceQuality) + Number(that.list[i].comprehensiveSatisfaction)) / 15 * 5
+							// that.list[i].count = (Number(that.list[i].ownerCredit) + Number(that.list[i]
+							// 	.tranEfficiency) + Number(that.list[i].freightPayment) + Number(that.list[i]
+							// 	.serviceQuality) + Number(that.list[i].comprehensiveSatisfaction)) / 15 * 5
 						}
 						that.mescroll.endBySize(res.data.records.length, res.data.total);
 						uni.hideLoading()

+ 232 - 81
pages/order/confirmLoading.vue

@@ -57,6 +57,10 @@
 					{{detailData.loadingDate1?detailData.loadingDate1:'来自合同'}}
 				</view>
 			</view>
+			<view class='row-between'>
+				<view class="">装车毛重(吨)</view>
+				{{detailData.grossWeight ? detailData.grossWeight:"来自合同"}}
+			</view>
 			<view class='row-between'>
 				<view class="">装车净重(吨)</view>
 				{{detailData.weight ? detailData.weight:"来自合同"}}
@@ -110,7 +114,12 @@
 
 <script>
 	let that;
+	//插件对象
+	var sdkwx = uni.requireNativePlugin('Hdgq-LocSdkWX');
 	import uploadImage from '@/components/ossutil/uploadFile.js';
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
@@ -138,20 +147,45 @@
 				keyShow: false,
 				carNumber: '',
 				gjList: [],
+				//网络货运信息定位
+				appId: "", //网络货运企业APP的唯一标识
+				appSecurity: "", //网络货运企业在省平台申请的接入安全码
+				enterpriseSenderCode: "23106960", //网络货运企业在省平台申请的企业发送代码
+				environment: "debug", //环境:“debug”接入测试环境,“release”接入正式环境。
+				shippingNoteInfos: [{
+					shippingNoteNumber: '',
+					serialNumber: "",
+					startCountrySubdivisionCode: "",
+					endCountrySubdivisionCode: "",
+					startLongitude: "",
+					startLatitude: "",
+					endLongitude: "",
+					endLatitude: "",
+					startLocationText: "",
+					endLocationText: "",
+					vehicleNumber: "",
+					driverName: "",
+					interval: "",
+				}],
+				timer: null
 			}
 		},
 		onLoad(options) {
-			if(!uni.getStorageSync('contractdata')){
+			let phoneType = uni.getSystemInfoSync().platform //判断手机类型
+			if (phoneType == "android") {
+				this.appId = "uni.UNI9C76CB6"
+				this.appSecurity = "24c593b7037347e08857a6ab05fd231b0509f5bb7cb741078f524f506ad32db8"
+			} else if (phoneType == "ios") {
+				this.appId = "uni.UNIDCD13AC"
+				this.appSecurity = "b01e4805276646eeb25f0fad91de97a4f32e8c2c0e0d42e5b24cc4737e9f040f"
+			}
+			if (!uni.getStorageSync('contractdata')) {
 				this.id = JSON.parse(decodeURIComponent(options.obj)).id
 				this.detailData.hyCarrierInfo.id = JSON.parse(decodeURIComponent(options.obj)).carrierId
 				this.cyId = JSON.parse(decodeURIComponent(options.obj)).carrierId
 				this.getInfo()
 			}
-			
-			
 			console.log(options)
-			
-			
 			// this.detailData = JSON.parse(options.obj) ;
 			// console.log(this.detailData)
 			// CYHT20220317000001
@@ -160,14 +194,17 @@
 			uni.removeStorageSync(
 				"contractdata")
 		},
-		onShow(){
-			if(uni.getStorageSync('contractdata')){
+		onShow() {
+			if (uni.getStorageSync('contractdata')) {
 				this.id = uni.getStorageSync('contractdata').id
 				this.detailData.hyCarrierInfo.id = uni.getStorageSync('contractdata').carrierId
 				this.cyId = uni.getStorageSync('contractdata').carrierId
 				this.getInfo()
 			}
 		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo', "firstAuthentication"])
+		},
 		methods: {
 			//确认装车提交成功后,开启实时定位,
 			// 调接口5分钟一次发送轨迹,[
@@ -188,7 +225,113 @@
 			// 	{latitude: 39.998968, longitude: 116.48367},
 			// 	{latitude: 39.999861, longitude: 116.484648}
 			// ]
-			// a(){},
+			auth() { //授权
+				// var appId = "uni.UNI9C76CB6";//网络货运企业APP的唯一标识
+				// var appSecurity = "24c593b7037347e08857a6ab05fd231b0509f5bb7cb741078f524f506ad32db8";//网络货运企业在省平台申请的接入安全码
+				// var enterpriseSenderCode = "23106960";//网络货运企业在省平台申请的企业发送代码
+				// var environment = "debug";//环境:“debug”接入测试环境,“release”接入正式环境。
+				console.log("appid:" + this.appId + "安全码:" + this.appSecurity + "发送代码:" + this.enterpriseSenderCode)
+				let that = this
+				sdkwx.auth(this.appId, this.appSecurity, this.enterpriseSenderCode, this.environment, function(res) {
+					if (res.type == "onSuccess") {
+						//成功
+						that.start()
+						console.log("授权成功")
+						console.log(res)
+					} else if (res.type == "onFailure") {
+						//失败
+						var errorCode = res.data.errorCode; //错误码
+						var errorMsg = res.data.errorMsg; //错误描述
+						console.log("授权失败")
+						console.log(res)
+					}
+					// uni.showModal({
+					// 	content: JSON.stringify(res)
+					// });
+				});
+			},
+			start() { //开启定位
+				//车牌号 //司机姓名 //备注 //运单信息列表
+				console.log(this.detailData, "行政区划分")
+				this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo, //运单号
+					this.shippingNoteInfos[0].serialNumber = "0000", //分单号
+					this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData.publishTaskInfo
+					.sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData.publishTaskInfo
+					.unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					this.shippingNoteInfos[0].startLongitude = this.detailData
+					.loadingLatitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].startLatitude = this.detailData
+					.loadingLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLongitude = this.detailData.publishTaskInfo
+					.unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLatitude = this.detailData.publishTaskInfo
+					.unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].startLocationText = this.detailData
+					.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLocationText = this.detailData
+					.unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].vehicleNumber = this.detailData
+					.carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+					this.shippingNoteInfos[0].driverName = this.detailData
+					.driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+					this.shippingNoteInfos[0].interval = "5000" //请求时间间隔,SDK 回调返 回(单位 ms)
+
+				//}],//运单信息列表,一辆车运单数最大支持数为 10
+				var remark = "测试"; //备注
+				let that = this
+				sdkwx.start(this.detailData.carNo, this.firstAuthentication.driverName, remark, this.shippingNoteInfos,
+					function(res) {
+						if (res.type == "onSuccess") {
+							//成功
+							console.log("开启定位成功!!!")
+							console.log(res)
+							var shippingNoteInfos = res.data[0]; //运单信息列表
+							console.log(shippingNoteInfos, "sdassss")
+							if (shippingNoteInfos) {
+								let dateTtime = Number(shippingNoteInfos.interval + 1000)
+								console.log("开始定时", dateTtime)
+								that.timer = setInterval(() => {
+									console.log("定时")
+									that.send()
+								}, dateTtime);
+							}
+						} else if (res.type == "onFailure") {
+							//失败
+							console.log("开启定位失败!!!")
+							console.log(res)
+							var errorCode = res.data.errorCode; //错误码
+							var errorMsg = res.data.errorMsg; //错误描述
+							that.timer = setInterval(() => {
+								console.log("定时")
+								that.send()
+							}, 915204);
+						}
+					});
+			},
+			send() { //发送定位
+				var remark = ""; //备注
+				let that = this
+				sdkwx.send(this.detailData.carNo, this.firstAuthentication.driverName, remark, this.shippingNoteInfos,
+					function(res) {
+						console.log('发送定位', res);
+						if (res.type == "onSuccess") {
+							var shippingNoteInfos = res.data[0]; //运单信息列表
+							let dateTtime = Number(shippingNoteInfos.interval + 1000)
+							console.log("开始定时", dateTtime)
+							that.timer = setInterval(() => {
+								that.send()
+							}, dateTtime);
+						} else if (res.type == "onFailure") {
+							var errorCode = res.data.errorCode; //错误码
+							var errorMsg = res.data.errorMsg; //错误描述
+							that.timer = setInterval(() => {
+								console.log("定时")
+								that.send()
+							}, 915204); //15分钟
+						}
+					});
+			},
 			toSignContract() {
 				console.log(this.detailData)
 				this.$request.baseRequest('get', '/orderInfo/getOrderInfo', {
@@ -211,7 +354,7 @@
 					id: this.id,
 				}).then(res => {
 					if (res.code == 200) {
-						
+
 						this.detailData = res.data
 						// #ifdef APP-PLUS
 						this.getLngLat();
@@ -220,23 +363,25 @@
 							orderId: this.detailData.id,
 						}).then(res => {
 							if (res.data) {
-								if(res.data.loadingImg){
-									var data=res.data.loadingImg.split(',')
-									this.imgList=res.data.loadingImg.split(',')
+								if (res.data.loadingImg) {
+									var data = res.data.loadingImg.split(',')
+									this.imgList = res.data.loadingImg.split(',')
 									for (var i = 0; i < data.length; i++) {
-										if(data[i]!=''){
-											this.fileList1.push({url:data[i]})
+										if (data[i] != '') {
+											this.fileList1.push({
+												url: data[i]
+											})
 										}
 									}
-									
 								}
 								console.log(this.fileList1)
 								this.detailData.carNo = res.data.carNo
 								this.detailData.loadingDate = res.data.loadingDate
-								if(res.data.loadingDate){
-									this.detailData.loadingDate1=res.data.loadingDate.split(' ')[0]
+								if (res.data.loadingDate) {
+									this.detailData.loadingDate1 = res.data.loadingDate.split(' ')[0]
 								}
 								this.detailData.weight = res.data.loadingWeight
+								this.detailData.grossWeight = res.data.loadingGrossWeight
 								this.detailData.freight = res.data.estimatedFreight
 							}
 						})
@@ -288,47 +433,45 @@
 				this.detailData.hyCarrierInfo.carNo = e.value //键盘输入值
 			},
 			checkOpenGPSServiceByAndroidIOS() {
-			    let system = uni.getSystemInfoSync(); // 获取系统信息
-			    if (system.platform === 'android') { // 判断平台
-			        var context = plus.android.importClass("android.content.Context");
-			        var locationManager = plus.android.importClass("android.location.LocationManager");
-			        var main = plus.android.runtimeMainActivity();
-			        var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
-					console.log(mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER))
-			        if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
-			            uni.showModal({
-			                title: '提示',
-			                content: '请打开定位服务功能',
-			                // showCancel: false, // 不显示取消按钮
-			                success(res) {
-								if(res.confirm){
+				let system = uni.getSystemInfoSync(); // 获取系统信息
+				if (system.platform === 'android') { // 判断平台
+					var context = plus.android.importClass("android.content.Context");
+					var locationManager = plus.android.importClass("android.location.LocationManager");
+					var main = plus.android.runtimeMainActivity();
+					var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+					if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
+						uni.showModal({
+							title: '提示',
+							content: '请打开定位服务功能',
+							// showCancel: false, // 不显示取消按钮
+							success(res) {
+								if (res.confirm) {
 									if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
-										
 										var Intent = plus.android.importClass('android.content.Intent');
 										var Settings = plus.android.importClass('android.provider.Settings');
 										var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
 										main.startActivity(intent); // 打开系统设置GPS服务页面
-									} 
+									}
 								}
-			                }
-			            });
-			        }
-			    } else if (system.platform === 'ios') {
-			        // console.log("苹果");
-			        var cllocationManger = plus.ios.import("CLLocationManager");
-			        var enable = cllocationManger.locationServicesEnabled();
-			        var status = cllocationManger.authorizationStatus();
-			        plus.ios.deleteObject(cllocationManger);
-			        if (enable && status != 2) {
-			            console.log("手机系统的定位已经打开");
-			        } else {
-			            console.log("手机系统的定位没有打开");
-			            uni.showModal({
-			                title: '提示',
-			                content: '请前往设置-隐私-定位服务打开定位服务功能',
-			                // showCancel: false, // 不显示取消按钮
-			                success(res) {
-								if(res.confirm){
+							}
+						});
+					}
+				} else if (system.platform === 'ios') {
+					// console.log("苹果");
+					var cllocationManger = plus.ios.import("CLLocationManager");
+					var enable = cllocationManger.locationServicesEnabled();
+					var status = cllocationManger.authorizationStatus();
+					plus.ios.deleteObject(cllocationManger);
+					if (enable && status != 2) {
+						console.log("手机系统的定位已经打开");
+					} else {
+						console.log("手机系统的定位没有打开");
+						uni.showModal({
+							title: '提示',
+							content: '请前往设置-隐私-定位服务打开定位服务功能',
+							// showCancel: false, // 不显示取消按钮
+							success(res) {
+								if (res.confirm) {
 									var UIApplication = plus.ios.import("UIApplication");
 									var application2 = UIApplication.sharedApplication();
 									var NSURL2 = plus.ios.import("NSURL");
@@ -342,14 +485,14 @@
 									plus.ios.deleteObject(NSURL2);
 									plus.ios.deleteObject(application2);
 								}
-			                }
-			            });
-			        }
-			    }
+							}
+						});
+					}
+				}
 			},
 			getLngLat() {
 				this.checkOpenGPSServiceByAndroidIOS()
-				var that=this
+				var that = this
 				uni.showLoading({
 					title: '获取定位中',
 					mask: true
@@ -385,19 +528,20 @@
 					geocode: true,
 					success: res => {
 						if (res.latitude) {
-							
-							that.detailData.hyCarrierInfo.longitudeLatitude=res.longitude+','+res.latitude
+							that.detailData.hyCarrierInfo.longitudeLatitude = res.longitude + ',' + res
+								.latitude
 							that.detailData.hyCarrierInfo.loadingAreaLongitude = res.longitude;
 							that.detailData.hyCarrierInfo.loadingAreaLatitude = res.latitude;
 							that.detailData.hyCarrierInfo.sendCity = that.$helper.filterUrban(res.address.city)
 							that.localtion.city = that.$helper.filterUrban(res.address.city)
-							that.$set(that.detailData,'loadingArea',that.$helper.filterUrban(res.address.district))
-							that.$set(that.detailData,'loadingCity',that.$helper.filterUrban(res.address.city))
+							that.$set(that.detailData, 'loadingArea', that.$helper.filterUrban(res.address
+								.district))
+							that.$set(that.detailData, 'loadingCity', that.$helper.filterUrban(res.address
+								.city))
 							that.localtion.sendArea = that.$helper.filterUrban(res.address.district)
 							// .loadingCity = that.$helper.filterUrban(res.address.city)
 							that.detailData.loadingLongitude = res.longitude;
 							that.detailData.loadingLatitude = res.latitude;
-							console.log(res,that.detailData,22222)
 							that.$forceUpdate()
 							uni.hideLoading()
 						} else {
@@ -431,7 +575,6 @@
 										}
 									}
 								});
-								
 								uni.hideLoading()
 							}
 						}
@@ -440,7 +583,6 @@
 						console.log('定位失败')
 						console.log(res)
 						uni.hideLoading()
-
 					}
 				});
 
@@ -487,7 +629,6 @@
 						// 上传成功回调函数
 						console.log('图片地址', result)
 						this.imgList.push(result)
-
 					}
 				)
 			},
@@ -514,6 +655,7 @@
 					}
 					this.alertTitle = '确定提交装车信息?'
 				}
+
 				if (this.validate()) return
 				this.isShowAlert = true
 				this.detailData.statusFlag = type
@@ -563,8 +705,7 @@
 					})
 					return true
 				}
-			
-				if(this.imgList.length == 0){
+				if (this.imgList.length == 0) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "装车照片不能为空!",
@@ -574,7 +715,7 @@
 			},
 			confirmClick() {
 				uni.removeStorageSync('contractdata')
-				var that=this
+				var that = this
 				this.isShowAlert = false
 				//1暂存
 				if (this.detailData.statusFlag == 1) {
@@ -599,16 +740,17 @@
 				if (m < 10) {
 					m = "0" + m
 				}
-				var data={
-					loadingImg:this.imgList.toString(),
-					statusFlag:this.detailData.statusFlag,
-					loadingDate:this.detailData.hyCarrierInfo.loadingDate.split(" ")[0] + " " + h + ":" + f + ":" + m,
-					loadingArea:this.detailData.loadingArea,
-					loadingCity:this.detailData.loadingCity,
-					loadingLongitude:this.detailData.loadingLongitude,
-					loadingLatitude:this.detailData.loadingLatitude,
-					id:this.detailData.hyCarrierInfo.id
+				var data = {
+					loadingImg: this.imgList.toString(),
+					statusFlag: this.detailData.statusFlag,
+					loadingDate: this.detailData.hyCarrierInfo.loadingDate.split(" ")[0] + " " + h + ":" + f + ":" + m,
+					loadingArea: this.detailData.loadingArea,
+					loadingCity: this.detailData.loadingCity,
+					loadingLongitude: this.detailData.loadingLongitude,
+					loadingLatitude: this.detailData.loadingLatitude,
+					id: this.detailData.hyCarrierInfo.id
 				}
+
 				// console.log("查看id--------",this.detailData.hyCarrierInfo.id)
 				this.$request.baseRequest('post', '/carrierInfo/loadingAdd', data).then(res => {
 						if (res.code == 200) {
@@ -617,6 +759,7 @@
 							if (this.detailData.statusFlag == 1) {
 								_title = '暂存成功!'
 							} else {
+								that.auth() //开始授权并开始定位
 								_title = '提交成功!'
 							}
 							that.$helper.fUN_AmapLocation.start({
@@ -646,16 +789,24 @@
 										city: res.city,
 										area: res.district
 									}
+									if (this.shippingNoteInfos && this.shippingNoteInfos.length > 0) { //更新持续定位经纬度
+										for (let i = 0; i < this.shippingNoteInfos.length; i++) {
+											this.shippingNoteInfos[i].startLatitude = _data.latitude //纬度
+											this.shippingNoteInfos[i].startLocationText = _data.city //起点
+											this.shippingNoteInfos[i].startLongitude = _data.longitude //经度
+										}
+									}
 									this.$helper.gjList.push(_data)
 									uni.setStorageSync('mapGJ', this.$helper.gjList);
 									// console.log('this.$helper.gjList')
 									// console.log(this.$helper.gjList)
 									// console.log("条数", uni.getStorageSync('mapGJ').length)
 									if (uni.getStorageSync('mapGJ').length > 100) {
-										console.log(JSON.stringify(uni.getStorageSync('mapGJ')) )
-										this.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo',  {
-													orderId:that.id,
-													longitudeLatitude:JSON.stringify(uni.getStorageSync('mapGJ'))   
+										// console.log(JSON.stringify(uni.getStorageSync('mapGJ')))
+										// that.send()
+										this.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo', {
+												orderId: that.id,
+												longitudeLatitude: JSON.stringify(uni.getStorageSync('mapGJ'))
 											}).then(res => {
 												uni.removeStorageSync('mapGJ');
 												this.$helper.gjList = []

+ 59 - 32
pages/order/confirmUnloading.vue

@@ -1,4 +1,4 @@
-<!-- 确认车 -->
+<!-- 确认车 -->
 <template>
 	<view class="content">
 		<view class="content2">
@@ -49,7 +49,7 @@
 			</view> -->
 			<view class="row-between">
 				<view class="left-text">卸车日期</view>
-				<view class="" @click="selectUnloadingDate">
+				<view class="row-right-text" @click="selectUnloadingDate">
 					{{detailData.carrierInfo.unloadingDate?detailData.carrierInfo.unloadingDate:'选择卸车日期'}}
 				</view>
 			</view>
@@ -63,11 +63,10 @@
 			</view> -->
 			<view class='row-between'>
 				<view class="row-left-text">定位</view>
-				<view class="flex align-center">
+				<view style='font-size:14px;' class="flex align-center">
 					{{detailData.carrierInfo.unloadCity}}{{detailData.carrierInfo.unloadArea}}
 					<view class="sx-style" @click.stop="getLngLat()">刷新</view>
 				</view>
-
 			</view>
 			<view class='s-flex'>
 				<view class="row-left-text" style="margin:20rpx 0;">上传卸车照片(1-3张)</view>
@@ -87,9 +86,12 @@
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
 			:showCancelButton='true' confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick"
 			@cancel="cancelClick"></u-modal>
-		<u-picker :show="isShowValidity" :defaultIndex='defaultIndex' ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+		<!--<u- picker :show="isShowValidity" :defaultIndex='defaultIndex' ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
-		</u-picker>
+		</u-picker> -->
+		<!-- :endDate="array" -->
+		<itmister-date-picker :dateStatus="0" ref="dateEl"  :startYear="1999"  
+		:futureYear="30" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -97,13 +99,14 @@
 <script>
 	let that;
 	import uploadImage from '@/components/ossutil/uploadFile.js';
+	//插件对象
+	var sdkwx = uni.requireNativePlugin('Hdgq-LocSdkWX');
 	export default {
 		data() {
 			return {
 				imgList: [],
 				fileList1: [],
 				fileList2:[],
-				isShowValidity: false,
 				validityPeriod: [],
 				sourceType: ['camera'],
 				imgList1:[],
@@ -120,11 +123,26 @@
 				alertContent: '',
 				alertTitle: '',
 				localtion:{},
+				shippingNoteInfos: [{
+					shippingNoteNumber: '',
+					serialNumber: "",
+					startCountrySubdivisionCode: "",
+					endCountrySubdivisionCode: "",
+					startLongitude: "",
+					startLatitude: "",
+					endLongitude: "",
+					endLatitude: "",
+					startLocationText: "",
+					endLocationText: "",
+					vehicleNumber: "",
+					driverName: "",
+					interval: "",
+				}],
 			}
 		},
 		onLoad(options) {
 			this.detailData = JSON.parse(options.obj)
-			console.log(this.detailData)
+			console.log(this.detailData,"编号编号焦点方式规范化见到过")
 			this.fileList1=[]
 			this.fileList2=[]
 			if(this.detailData.hyCarrierInfo.unloadingImg){
@@ -165,13 +183,40 @@
 				receiptImg:this.detailData.hyCarrierInfo.receiptImg,
 				id: this.detailData.carrierId?this.detailData.carrierId:this.detailData.hyCarrierInfo.id,
 			}
-			this.validityPeriod = this.$helper.makeValidityPeriod()
 			// #ifdef APP-PLUS
 			this.getLngLat();
 			// #endif
 			this.getNowTime()
 		},
 		methods: {
+			stop(){//结束定位
+				this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo, //运单号
+					this.shippingNoteInfos[0].serialNumber = "0000", //分单号
+					this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData.sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData.unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					this.shippingNoteInfos[0].startLongitude = this.detailData.sendLongitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].startLatitude = this.detailData.sendLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLongitude = this.detailData.unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLatitude = this.detailData.unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].startLocationText = this.detailData.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLocationText = this.detailData.unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].vehicleNumber = this.detailData.carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+					this.shippingNoteInfos[0].driverName = this.detailData.driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+					this.shippingNoteInfos[0].interval = "5000" //请求时间间隔,SDK 回调返 回(单位 ms)
+				// var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
+				let remark = ""
+				sdkwx.stop(this.detailData.carNumber, this.detailData.driverName, remark, this.shippingNoteInfos, function(res) {
+					if (res.type == "onSuccess") {
+						console.log("结束成功!!!",res)
+						//成功
+					} else if (res.type == "onFailure"){
+							console.log("结束成功!!!",res)
+						//失败
+						var errorCode = res.data.errorCode;//错误码
+						var errorMsg = res.data.errorMsg;//错误描述
+					}	
+				});			
+			},
 			deletePic(event) {
 				console.log(this[`fileList${event.name}`])
 				this[`fileList${event.name}`].splice(event.index, 1)
@@ -189,25 +234,6 @@
 				month = month + 1;
 				month = month.toString().padStart(2, "0");
 				date = date.toString().padStart(2, "0");
-				this.defaultIndex=[]
-				console.log(this.validityPeriod)
-				for(var i=0;i<this.validityPeriod[0].length;i++){
-					if(this.validityPeriod[0][i]==year){
-						console.log(this.validityPeriod[0][i])
-						this.defaultIndex.push(i)
-					}
-				}
-				for(var i=0;i<this.validityPeriod[1].length;i++){
-					if(this.validityPeriod[1][i]==month){
-						this.defaultIndex.push(i)
-					}
-				}
-				for(var i=0;i<this.validityPeriod[2].length;i++){
-					if(this.validityPeriod[2][i]==date){
-						this.defaultIndex.push(i)
-					}
-				}
-				console.log(this.defaultIndex)
 				let defaultDate = `${year}-${month}-${date}`
 				this.detailData.carrierInfo.unloadingDate = defaultDate
 				// this.$forceUpdate()
@@ -220,7 +246,7 @@
 				console.log(this.detailData.totalFreight.length)
 			},
 			selectUnloadingDate() {
-				this.isShowValidity = true
+				this.$refs.dateEl.show()
 			},
 			getLngLat() {
 				let that = this
@@ -485,6 +511,7 @@
 				uni.showLoading({
 					title:'加载中'
 				})
+			
 				let time = new Date() //卸车时间   去当前时间的时分秒
 				let h = time.getHours();
 				if (h < 10) {
@@ -509,6 +536,7 @@
 							if (this.detailData.statusFlag == 1) {
 								_title = '暂存成功!'
 							} else {
+								that.stop()
 								_title = '提交成功!'
 							}
 							uni.hideLoading()
@@ -533,9 +561,8 @@
 						uni.$u.toast(res.message);
 					});
 			},
-			confirmValidityPeriod(e) {
-				this.detailData.carrierInfo.unloadingDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-				this.isShowValidity = false
+			confirmValidityPeriod(date) {
+				this.detailData.carrierInfo.unloadingDate = date.date
 			},
 		},
 	}

+ 3 - 2
pages/order/index.vue

@@ -40,11 +40,12 @@
 				class="mescroll">
 				<view class="evaluatePage flex flex-space-between" v-show="tabIndex == 6" @click="evaluateClick">
 					<view class="left flex flex-space-between" @click="evaluateClick">
-						<u-icon size="20" name="edit-pen"></u-icon>
+						<!-- <u-icon size="20" name="edit-pen"></u-icon> -->
+						<image style='width:14px;height:14px;margin-right:7px;' src="../../static/images/order/pingjiabianji.png" mode=""></image>
 						<view style="margin-left: 20prx;">我的评价</view>
 					</view>
 					<view class="right">
-						<u-icon size="20" name="arrow-right"></u-icon>
+						<image style='width:12px;height:12px;' src="../../static/images/order/right.png" mode=""></image>
 					</view>
 				</view>
 				<view :id="'good'+good.id" class="good-list" v-for="good in goods" 

+ 95 - 76
pages/order/signContract.vue

@@ -80,6 +80,13 @@
 						inputAlign='right' clearable></u--input> -->
 				</view>
 			</view>
+			<view class='row-between'>
+				<view class="gray">装车毛重(吨)</view>
+				<view class="flex">
+					<u--input placeholder="请输入装车毛重" border="none" v-model="dataDetails.grossWeight" inputAlign='right'
+						clearable></u--input>
+				</view>
+			</view>
 			<view class='row-between'>
 				<view class="gray">装车净重(吨)</view>
 				<view class="flex">
@@ -252,29 +259,25 @@
 
 				})
 			}
-			
-			console.log(this.dataDetails)
 			if (this.dataDetails.carNumber) {
 				this.$set(this.dataDetails.carrierInfo, 'carNo', this.dataDetails.carNumber)
 			}
 			this.preMoney()
 			// this.$set(this.dataDetails,'advanceCharge',this.dataDetails.advanceCharge)
 			// this.$set(this.dataDetails.carrierInfo,'carNo',this.dataDetails.carNo)
-			console.log(this.dataDetails)
 		},
 		onLoad(options) {
-
 			this.carList = []
 			that = this
 			// this.dataDetails = JSON.parse(options.obj)
 			// console.log(this.dataDetails.billingMethod==1,this.dataDetails.freight)
-			
 			// console.log(this.dataDetails.carNo,this.dataDetails.carrierInfo)
 			// this.dataDetails.advanceFreightService = '平台垫付运费'
 			this.dataDetails = JSON.parse(decodeURIComponent(options.obj))
 			console.log(this.dataDetails)
 			if (this.dataDetails.hyCarrierInfo) {
 				this.dataDetails.weight = this.dataDetails.hyCarrierInfo.loadingWeight
+				this.dataDetails.grossWeight = this.dataDetails.hyCarrierInfo.loadingGrossWeight
 			}
 			if (this.dataDetails.freightAdvance == 1) {
 				this.proportion = this.dataDetails.driverAdvancePayment >= this.dataDetails.ownerAdvancePayment ? this
@@ -328,7 +331,6 @@
 						})
 					})
 					.exec();
-					
 			});
 			uni.showLoading({
 				title: '加载中'
@@ -431,96 +433,112 @@
 				} else { //提交合同
 					this.contractCheck = true
 					_obj.submitFlag = 2
-				}
-				if (!that.isScaleStart) {
-					if (!this.userInfo.signImg) {
+					if (!that.isScaleStart) {
+						if (!this.userInfo.signImg) {
+							that.$refs.uToast.show({
+								type: 'error',
+								message: "手写签名不能为空!",
+							})
+							return
+						}
+					
+					}
+					if (uni.$u.test.isEmpty(that.dataDetails.carrierInfo.carNo)) {
 						that.$refs.uToast.show({
 							type: 'error',
-							message: "手写签名不能为空!",
+							message: "车牌号不能为空!",
 						})
 						return
 					}
-
-				}
-				if (uni.$u.test.isEmpty(that.dataDetails.carrierInfo.carNo)) {
-					that.$refs.uToast.show({
-						type: 'error',
-						message: "车牌号不能为空!",
-					})
-					return
-				}
-				if (uni.$u.test.isEmpty(that.dataDetails.weight)) {
-					that.$refs.uToast.show({
-						type: 'error',
-						message: "装车净重不能为空!",
-					})
-					return
-				}
-				if (uni.$u.test.isEmpty(that.dataDetails.freight)) {
-					that.$refs.uToast.show({
-						type: 'error',
-						message: "运费不能为空!",
-					})
-					return
-				}
-				if (uni.$u.test.isEmpty(that.dataDetails.tranStartDate)) {
-					that.$refs.uToast.show({
-						type: 'error',
-						message: "运输起始日期不能为空!",
-					})
-					return
-				}
-				if (uni.$u.test.isEmpty(that.dataDetails.tranEndDate)) {
-					that.$refs.uToast.show({
-						type: 'error',
-						message: "运输截止日期不能为空!",
-					})
-					return
-				}
-				if (uni.$u.test.isEmpty(that.dataDetails.driverName)) {
-					that.$refs.uToast.show({
-						type: 'error',
-						message: "联络人姓名不能为空!",
-					})
-					return
-				}
-				if (uni.$u.test.isEmpty(that.dataDetails.driverPhone)) {
-					that.$refs.uToast.show({
-						type: 'error',
-						message: "联络人电话不能为空!",
-					})
-					return
-				}
-				if (uni.$u.test.isEmpty(that.dataDetails.advanceCharge) && that.dataDetails.advanceCharge != 0) {
-					that.$refs.uToast.show({
-						type: 'error',
-						message: "装车后预付款不能为空!",
-					})
-					return
-				}
-				if (uni.$u.test.isEmpty(that.dataDetails.bankDeposit)) {
-					that.$refs.uToast.show({
-						type: 'error',
-						message: "收款账号不能为空!",
-					})
-					return
+					if (uni.$u.test.isEmpty(that.dataDetails.grossWeight)) {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "装车毛重不能为空!",
+						})
+						return
+					}
+					if (uni.$u.test.isEmpty(that.dataDetails.weight)) {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "装车净重不能为空!",
+						})
+						return
+					}
+					if(Number(that.dataDetails.weight) > Number(that.dataDetails.grossWeight)){
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "装车净重大于装车毛重!",
+						})
+						return
+					}
+					if (uni.$u.test.isEmpty(that.dataDetails.freight)) {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "运费不能为空!",
+						})
+						return
+					}
+					if (uni.$u.test.isEmpty(that.dataDetails.tranStartDate)) {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "运输起始日期不能为空!",
+						})
+						return
+					}
+					if (uni.$u.test.isEmpty(that.dataDetails.tranEndDate)) {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "运输截止日期不能为空!",
+						})
+						return
+					}
+					if (uni.$u.test.isEmpty(that.dataDetails.driverName)) {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "联络人姓名不能为空!",
+						})
+						return
+					}
+					if (uni.$u.test.isEmpty(that.dataDetails.driverPhone)) {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "联络人电话不能为空!",
+						})
+						return
+					}
+					if (uni.$u.test.isEmpty(that.dataDetails.advanceCharge) && that.dataDetails.advanceCharge != 0) {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "装车后预付款不能为空!",
+						})
+						return
+					}
+					if (uni.$u.test.isEmpty(that.dataDetails.bankDeposit)) {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "收款账号不能为空!",
+						})
+						return
+					}
+					
+					
 				}
 				_obj.trailerNumber = that.dataDetails.trailerNumber
 				_obj.tranStartDate = that.dataDetails.tranStartDate
 				_obj.tranEndDate = that.dataDetails.tranEndDate
-
 				_obj.contactPersonName = that.dataDetails.driverName
 				_obj.contactPersonPhone = that.dataDetails.driverPhone
 				_obj.freightCars = that.dataDetails.freight
 				// _obj.advanceCharge = that.dataDetails.advanceCharge
-				_obj.id = that.dataDetails.id
 				_obj.carNumber = that.dataDetails.carrierInfo.carNo
 				_obj.weight = that.dataDetails.weight
+				_obj.grossWeight = that.dataDetails.grossWeight
 				_obj.advanceCharge = that.dataDetails.advanceCharge
 				_obj.bankCard = that.dataDetails.bankCard
 				_obj.bankDeposit = that.dataDetails.bankDeposit
 				_obj.bankDepositBranch = that.dataDetails.bankDepositBranch
 				_obj.payeeName = that.dataDetails.payeeName
+				_obj.id = that.dataDetails.id
 				_obj.typeFlag = 2
 				uni.canvasToTempFilePath({
 					canvasId: 'handWriting',
@@ -584,6 +602,7 @@
 											}
 										})
 									.catch(res => {
+										uni.hideLoading()
 										uni.$u.toast(res.message);
 									});
 							}

+ 15 - 6
pages/public/code.vue

@@ -35,8 +35,8 @@
 		<view class="top_four">
 			<input type="number" class="input_show" maxlength="6" @input='submit' v-model="inputList" focus="true" />
 		</view>
-		<!-- 重新获取 -->
-		<view class="top_five" @click='regain' :class="!status ? 'active' : '' "><text v-if="!status">重新发送</text><text
+		<!-- 重新获取 regain -->
+		<view class="top_five" @click='judge' :class="!status ? 'active' : '' "><text v-if="!status">重新发送</text><text
 				v-if="status">{{count_down}}秒后重新发送</text></view>
 	</view>
 </template>
@@ -73,8 +73,15 @@
 			navBack() {
 				uni.navigateBack();
 			},
+			judge(){
+				if(this.count_down > 0){
+					return
+				}else{
+					this.regain()
+				}
+			},
 			regain() {
-				console.log("regain", this.phone);
+				this.count_down = 60
 				this.status = true
 				// console.log(e)150500
 				// 设定一个定时器 1000是1秒的意思
@@ -89,6 +96,7 @@
 					this.status = false
 					clearInterval(interval) //括号里面的名字要与setInterval定义的相同
 				}, 60000)
+				
 				this.$request.baseRequest('get', '/commonUser/sendVerifyCode', {
 						phone: this.phone
 					}).then(res => {
@@ -115,7 +123,7 @@
 					var that = this
 					that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
 						driverPhone: this.phone,
-					}).then(res2 => {
+					}).then(res => {
 						if (res.data.authenticationStatus == '已禁用') {
 							that.$refs.uToast.show({
 								type: 'error',
@@ -158,11 +166,11 @@
 										}
 									}
 								})
-								uni.setStorageSync("shiro",encodeURIComponent(`ws_login_companyShortName=
+								uni.setStorageSync("shiro",encodeURIComponent(`ws_login_companySh041500ortName=
 								'黑龙江中天昊元贸易有限公司'; ws_login_rememberMe=1; ws_login_account=${that.phone}; ws_login_pwd=${that.password}; shiro.session=65500189-7bb5-457f-9ff6-0db069150e78`))
 									uni.setStorageSync('pcuserInfo', res.data)
 									uni.setStorageSync('userInfo', res.data)
-									uni.setStorageSync('firstAuthentication', res2.data)
+									uni.setStorageSync('firstAuthentication', res.data)
 									helper.getListByUserId()
 									that.$store.commit('login', res.data)
 									var name = 'userInfo';
@@ -193,6 +201,7 @@
 							}
 						})
 						.catch(res => {
+							uni.hideLoading()
 							uni.showToast({
 								title: res.message,
 								icon: 'none',

+ 298 - 146
pages/public/login.vue

@@ -14,18 +14,22 @@
 					<u-input /> -->
 					<!-- <u--input v-model="phone" border="none" type='number' placeholder="请输入手机号码" class="phone-number"
 						maxlength='11' :clearable='true'></u--input> -->
-					<input placeholder-style="color:#AFB3BF" v-model="phone" border="none" type='number' placeholder="请输入手机号码" class="phone-number"
-							maxlength='11' >
+					<input placeholder-style="color:#AFB3BF" v-model="phone" border="none" type='number'
+						placeholder="请输入手机号码" class="phone-number" maxlength='11'>
 				</view>
 			</view>
 			<view style='margin-top:20px;border-bottom:1px solid #E8E9ED;position:relative;height:40px'>
 				<view style='position:relative;'>
-					<input placeholder-style="color:#AFB3BF" class='password' v-model='password' v-if="isShowPassword=='password'" placeholder="请输入密码" type="password">
-					<input placeholder-style="color:#AFB3BF" class='password' v-model='password' v-else type="text" placeholder="请输入密码">
+					<input placeholder-style="color:#AFB3BF" class='password' v-model='password'
+						v-if="isShowPassword=='password'" placeholder="请输入密码" type="password">
+					<input maxlength='16' placeholder-style="color:#AFB3BF" class='password' v-model='password' v-else
+						type="text" placeholder="请输入密码">
 					<!-- <u-icon name="eye-off" color="rgb(192, 196, 204)" size="24" @click="passWordStatus(2)" v-else>
 						</u-icon> -->
-						<image class='yanjingicon' style='width:22px;height:22px;' @click="passWordStatus(1)" v-if="isShowPassword=='password'" src="../../static/yioncang.png" mode=""></image>
-						<image class='yanjingicon' style='width:22px;height:22px;' @click="passWordStatus(2)" v-else src="../../static/xianshi.png" mode=""></image>
+					<image class='yanjingicon' style='width:22px;height:22px;' @click="passWordStatus(1)"
+						v-if="isShowPassword=='password'" src="../../static/yioncang.png" mode=""></image>
+					<image class='yanjingicon' style='width:22px;height:22px;' @click="passWordStatus(2)" v-else
+						src="../../static/xianshi.png" mode=""></image>
 				</view>
 			</view>
 			<button :class='phone!=""&&password!=""?"active":""' @click='passlogin'
@@ -38,7 +42,9 @@
 			</view>
 		</view>
 		<u-toast ref="uToast"></u-toast>
-		 <u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' confirmText='退出登录' :showCancelButton='true' confirmColor='#2772FB'  @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
+		<u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' confirmText='退出登录'
+			:showCancelButton='true' confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick"
+			@cancel="cancelClick"></u-modal>
 	</view>
 	</view>
 </template>
@@ -62,11 +68,13 @@
 	import {
 		mapState
 	} from 'vuex';
+	//插件对象
+	var sdkwx = uni.requireNativePlugin('Hdgq-LocSdkWX');
 	export default {
 		data() {
 			return {
-				isShowAlert:false,
-				alertTitle:'当前账号已禁用',
+				isShowAlert: false,
+				alertTitle: '当前账号已禁用',
 				isShowPassword: 'password',
 				inputContent: null,
 				loginType: "wechat",
@@ -95,13 +103,35 @@
 				system: '',
 				platform: '',
 				userData: undefined,
-				canIUseProfile: false
+				canIUseProfile: false,
+				//定位
+				shippingNoteInfos: [{
+					shippingNoteNumber: '',
+					serialNumber: "",
+					startCountrySubdivisionCode: "",
+					endCountrySubdivisionCode: "",
+					startLongitude: "",
+					startLatitude: "",
+					endLongitude: "",
+					endLatitude: "",
+					startLocationText: "",
+					endLocationText: "",
+					vehicleNumber: "",
+					driverName: "",
+					interval: "",
+				}],
+				//网络货运信息定位
+				appId: "", //网络货运企业APP的唯一标识
+				appSecurity: "", //网络货运企业在省平台申请的接入安全码
+				enterpriseSenderCode: "23106960", //网络货运企业在省平台申请的企业发送代码
+				environment: "debug", //环境:“debug”接入测试环境,“release”接入正式环境。
 			}
 		},
 		computed: {
 			...mapState(['clientId'])
 		},
 		onShow() {
+			// console.log(uni.$u.test.date('2020-02-29'))
 			// this.loginType = "wechat"
 			this.$api.logout()
 		},
@@ -126,6 +156,95 @@
 			// })
 		},
 		methods: {
+			restart() { //开启定位
+				var remark = "测试"; //备注
+				let that = this
+				sdkwx.restart(this.shippingNoteInfos[0].vehicleNumber, this.shippingNoteInfos[0].driverName, remark, this
+					.shippingNoteInfos,
+					function(res) {
+						if (res.type == "onSuccess") {
+							//成功
+							console.log("开启定位成功!!!",res)
+							var shippingNoteInfos = res.data[0]; //运单信息列表
+							if (shippingNoteInfos) {
+								let dateTtime = Number(shippingNoteInfos.interval + 60000)
+								console.log("开始定时", dateTtime)
+								that.timer = setInterval(() => {
+									console.log("定时")
+									that.send()
+								}, dateTtime);
+							}
+						} else if (res.type == "onFailure") {
+							//失败
+							console.log("开启定位失败!!!",res)
+							var errorCode = res.data.errorCode; //错误码
+							var errorMsg = res.data.errorMsg; //错误描述
+							that.timer = setInterval(() => { //失败也需要定时发送定位
+								console.log("定时")
+								that.send()
+							}, 975204); //15分钟
+						}
+					});
+			},
+			send() { //发送定位
+				var remark = ""
+				var that = this
+				console.log("send参数", this.shippingNoteInfos)
+				sdkwx.send(this.shippingNoteInfos[0].vehicleNumber, this.shippingNoteInfos[0].driverName, remark, this
+					.shippingNoteInfos,
+					function(res) {
+						if (res.type == "onSuccess") {
+							console.log("App.vue发送定位成功",res)
+							var shippingNoteInfos = res.data[0]; //运单信息列表
+							if (shippingNoteInfos) {
+								let dateTime = Number(shippingNoteInfos.interval + 60000)
+								console.log("定时开始", dateTime)
+								that.timer = setInterval(() => {
+									that.send()
+								}, dateTime);
+							}
+						} else if (res.type == "onFailure") {
+							console.log("App.vue发送定位失败", res)
+							//失败
+							var errorCode = res.data.errorCode; //错误码
+							var errorMsg = res.data.errorMsg; //错误描述
+							that.timer = setInterval(() => { //失败也需要定时上传定位(为了解决频繁调用接口问题)
+								that.send()
+							}, 975204);
+						}
+					});
+			},
+			auth() { //授权
+			
+				let phoneType = uni.getSystemInfoSync().platform //判断手机类型
+				if (phoneType == "android") {
+					this.appId = "uni.UNI9C76CB6"
+					this.appSecurity = "24c593b7037347e08857a6ab05fd231b0509f5bb7cb741078f524f506ad32db8"
+				} else if (phoneType == "ios") {
+					this.appId = "uni.UNIDCD13AC"
+					this.appSecurity = "b01e4805276646eeb25f0fad91de97a4f32e8c2c0e0d42e5b24cc4737e9f040f"
+				}
+				console.log("授权")
+				let that = this
+				sdkwx.auth(this.appId, this.appSecurity, this.enterpriseSenderCode, this.environment, function(res) {
+					if (res.type == "onSuccess") {
+						//成功
+						if (res.data.length > 0) {
+							that.restart()
+						}
+						console.log("授权成功",res)
+					} else if (res.type == "onFailure") {
+						//失败
+						var errorCode = res.data.errorCode; //错误码
+						var errorMsg = res.data.errorMsg; //错误描述
+						console.log("授权失败","没有可定位的订单")
+						console.log(res)
+					}
+					// uni.showModal({
+					// 	content: JSON.stringify(res)
+					// });
+				});
+			},
 			passWordStatus(type) {
 				if (type == 1) {
 					this.isShowPassword = 'text'
@@ -133,26 +252,26 @@
 					this.isShowPassword = 'password'
 				}
 			},
-			cancelClick(){
+			cancelClick() {
 				this.isShowAlert = false
 			},
-			confirmClick(){
-				if (uni.getSystemInfoSync().platform == 'ios'){
-				    plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
-				} else if (uni.getSystemInfoSync().platform == 'android'){
-				    plus.runtime.quit();
+			confirmClick() {
+				if (uni.getSystemInfoSync().platform == 'ios') {
+					plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
+				} else if (uni.getSystemInfoSync().platform == 'android') {
+					plus.runtime.quit();
 				}
 			},
 			passlogin(e) {
 				var that = this
-				if(this.phone==''){
+				if (this.phone == '') {
 					that.$refs.uToast.show({
 						type: 'error',
 						message: "请输入手机号!"
 					})
 					return
 				}
-				if(this.password==''){
+				if (this.password == '') {
 					that.$refs.uToast.show({
 						type: 'error',
 						message: "请输入密码!"
@@ -167,137 +286,168 @@
 							type: 'error',
 							message: "账号审核中!"
 						})
-						
+
 					} else {
-				uni.showLoading({
-					title: '登录中',
-					mask: true
-				})
-				console.log("clinetId", this.clientId)
-				that.$request.baseRequest('get', '/commonUser/login', {
-						phone: that.phone,
-						password: that.password,
-						loginFlag: 2,
-						identification: 1
-					},'application/x-www-form-urlencoded').then(res => {
-						if (res.code == 200) {
-// 							uni.setStorageSync("shiro",encodeURIComponent(`ws_login_companyShortName=
-// '黑龙江中天昊元贸易有限公司'; ws_login_rememberMe=1; ws_login_account=${that.phone}; ws_login_pwd=${that.password}; shiro.session=65500189-7bb5-457f-9ff6-0db069150e78`)
-							uni.setStorageSync('userInfo', res.data)
-							// uni.setStorageSync("shiro",res.header['Set-Cookie'])
-							that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
-								reCommonId: that.userInfo.id,
-							}).then(res3 => {
-								if (res3.data) {
-									let name = 'myTip';
-									let value = res3.data
-									if (value == 0) {
-										uni.removeTabBarBadge({
-											index: 2
-										})
-									}
-									that.$store.commit('$uStore', {
-										name,
-										value
-									});
-									if (value != 0 && value) {
-										uni.setTabBarBadge({
-											index: 2,
-											text: value + ""
-										})
-									}
-								}
-							})
-							that.$request.baseRequest('get', '/orderInfo/getData',  {
-									commonId:uni.getStorageSync('userInfo').id,
-								}).then(res1 => {
-								if(res1.data.length>0){
-									that.$helper.fUN_AmapLocation.start({
-											intervalTime: 5000,
-											isReport: false
-										},
-										res => {
-											// console.log('====确认装车开启连续定位====');
-											// console.log(res)
-											let _data = {
-												orderId: res1.data[0].id,
-												longitude: res.longitude,
-												latitude: res.latitude,
-												province: res.province,
-												city: res.city,
-												area: res.district
+						uni.showLoading({
+							title: '登录中',
+							mask: true
+						})
+						console.log("clinetId", this.clientId)
+						that.$request.baseRequest('get', '/commonUser/login', {
+								phone: that.phone,
+								password: that.password,
+								loginFlag: 2,
+								identification: 1
+							}, 'application/x-www-form-urlencoded').then(res => {
+								if (res.code == 200) {
+									// 							uni.setStorageSync("shiro",encodeURIComponent(`ws_login_companyShortName=
+									// '黑龙江中天昊元贸易有限公司'; ws_login_rememberMe=1; ws_login_account=${that.phone}; ws_login_pwd=${that.password}; shiro.session=65500189-7bb5-457f-9ff6-0db069150e78`)
+									uni.setStorageSync('userInfo', res.data)
+									// uni.setStorageSync("shiro",res.header['Set-Cookie'])
+									that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+										reCommonId: that.userInfo.id,
+									}).then(res3 => {
+										if (res3.data) {
+											let name = 'myTip';
+											let value = res3.data
+											if (value == 0) {
+												uni.removeTabBarBadge({
+													index: 2
+												})
 											}
-											that.$helper.gjList.push(_data)
-											uni.setStorageSync('mapGJ', that.$helper.gjList);
-											// console.log('this.$helper.gjList')
-											// console.log(this.$helper.gjList)
-											// console.log("条数", uni.getStorageSync('mapGJ').length)
-											if (uni.getStorageSync('mapGJ').length > 100) {
-												console.log(JSON.stringify(uni.getStorageSync('mapGJ')) )
-												that.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo',  {
-															orderId:"cdae6ec34c2349768c490a9fefa03fb3",
-															longitudeLatitude:JSON.stringify(uni.getStorageSync('mapGJ'))   
-													}).then(res => {
-														uni.removeStorageSync('mapGJ');
-														that.$helper.gjList = []
-													})
-													.catch(res => {
-														uni.$u.toast(res.message);
-													});
+											that.$store.commit('$uStore', {
+												name,
+												value
+											});
+											if (value != 0 && value) {
+												uni.setTabBarBadge({
+													index: 2,
+													text: value + ""
+												})
 											}
-											//判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
 										}
-									);	
-								}
-							
-							})
-							that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
-								driverPhone: this.phone,
-							}).then(res2 => {
-								if(res.data.statusFlag=='已禁用'){
-									this.isShowAlert = true
+									})
+									that.$request.baseRequest('get', '/orderInfo/getData', {
+										commonId: uni.getStorageSync('userInfo').id,
+									}).then(res1 => {
+										if (res1.data.length > 0) {
+											that.shippingNoteInfos[0].shippingNoteNumber = res1.data[0].orderNo //运单号
+											that.shippingNoteInfos[0].serialNumber = "0000" //分单号
+											that.shippingNoteInfos[0].startCountrySubdivisionCode = res1.data[0]
+												.sendAdCode //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+											that.shippingNoteInfos[0].endCountrySubdivisionCode = res1.data[0]
+												.unsendAdCode //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+											that.shippingNoteInfos[0].startLongitude = res1.data[0]
+												.sendLongitude //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+											that.shippingNoteInfos[0].startLatitude = res1.data[0]
+												.sendLatitude //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+											that.shippingNoteInfos[0].endLongitude = res1.data[0]
+												.unsendLongitude //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+											that.shippingNoteInfos[0].endLatitude = res1.data[0]
+												.unsendLatitude //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+											that.shippingNoteInfos[0].driverName = res1.data[0]
+												.driverName //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+											that.shippingNoteInfos[0].vehicleNumber = res1.data[0]
+												.carNumber //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+											that.shippingNoteInfos[0].startLocationText = res1.data[0]
+												.sendCity //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+											that.shippingNoteInfos[0].endLocationText = res1.data[0]
+												.unloadCity //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+											that.shippingNoteInfos[0].interval = "5000"
+											console.log("查看参数", that.shippingNoteInfos)
+											that.auth()
+											that.$helper.fUN_AmapLocation.start({
+													intervalTime: 5000,
+													isReport: false
+												},
+												res => {
+													// console.log('====确认装车开启连续定位====');
+													// console.log(res)
+													let _data = {
+														orderId: res1.data[0].id,
+														longitude: res.longitude,
+														latitude: res.latitude,
+														province: res.province,
+														city: res.city,
+														area: res.district
+													}
+													that.$helper.gjList.push(_data)
+													uni.setStorageSync('mapGJ', that.$helper
+														.gjList);
+													// console.log('this.$helper.gjList')
+													// console.log(this.$helper.gjList)
+													// console.log("条数", uni.getStorageSync('mapGJ').length)
+													if (uni.getStorageSync('mapGJ').length > 100) {
+														// console.log(JSON.stringify(uni
+														// 	.getStorageSync('mapGJ')))
+														that.$request.baseRequest('post',
+																'/hyOrderTravelPath/api/addInfo', {
+																	orderId: "cdae6ec34c2349768c490a9fefa03fb3",
+																	longitudeLatitude: JSON
+																		.stringify(uni
+																			.getStorageSync(
+																				'mapGJ'))
+																}).then(res => {
+																uni.removeStorageSync('mapGJ');
+																that.$helper.gjList = []
+															})
+															.catch(res => {
+																uni.$u.toast(res.message);
+															});
+													}
+													//判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
+												}
+											);
+										}
+
+									})
+									that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
+										driverPhone: this.phone,
+									}).then(res2 => {
+										if (res.data.statusFlag == '已禁用') {
+											this.isShowAlert = true
+											uni.hideLoading()
+											return
+										}
+
+										uni.setStorageSync('pcuserInfo', res.data)
+										uni.setStorageSync('userInfo', res.data)
+										uni.setStorageSync('firstAuthentication', res2.data)
+										helper.getListByUserId()
+										that.$store.commit('login', res.data)
+										var name = 'userInfo';
+										var value = res.data;
+										that.$store.commit('$uStore', {
+											name,
+											value
+										});
+
+										uni.switchTab({
+											url: '/pages/goodSource/index'
+										});
+										uni.hideLoading()
+										uni.switchTab({
+											url: '/pages/goodSource/index'
+										});
+										uni.hideLoading()
+
+									})
+
+
+								} else {
 									uni.hideLoading()
-									return
+									uni.showToast({
+										title: res.message,
+										icon: 'none',
+										duration: 2000
+									})
 								}
-								
-								uni.setStorageSync('pcuserInfo', res.data)
-								uni.setStorageSync('userInfo', res.data)
-								uni.setStorageSync('firstAuthentication', res2.data)
-								helper.getListByUserId()
-								that.$store.commit('login', res.data)
-								var name = 'userInfo';
-								var value = res.data;
-								that.$store.commit('$uStore', {
-									name,
-									value
-								});
-								
-								uni.switchTab({
-									url: '/pages/goodSource/index'
-								});
-								uni.hideLoading()
-								uni.switchTab({
-									url: '/pages/goodSource/index'
-								});
-								uni.hideLoading()
-
 							})
-				
-				
-						} else {
-							uni.hideLoading()
-							uni.showToast({
-								title: res.message,
-								icon: 'none',
-								duration: 2000
-							})
-						}
-					})
-					.catch(res => {
-						uni.$u.toast(res.message);
-					});
+							.catch(res => {
+								uni.$u.toast(res.message);
+							});
 					}
-			})
+				})
 			},
 			gocode() {
 				uni.navigateTo({
@@ -337,12 +487,14 @@
 	page {
 		background: #fff;
 	}
-	.yanjingicon{
-		position:absolute;
-		right:0;
-		top:50%;
-		transform: translate(-50%,-50%);
+
+	.yanjingicon {
+		position: absolute;
+		right: 0;
+		top: 50%;
+		transform: translate(-50%, -50%);
 	}
+
 	.close {
 		width: 20px;
 		height: 20px;

+ 47 - 20
pages/public/register.vue

@@ -9,26 +9,38 @@
 				<view style='width:85%;'>
 					<!-- <u-input border="none" maxlength="11" v-model='phone' @input='phoneinput' style='padding-left:10px;'
 						placeholder="请输入手机号码" type="number" class="Regular" /> -->
-					<input placeholder-style="color:#AFB3BF" border="none" maxlength="11" v-model='phone' @input='phoneinput' style='padding-left:10px;'
-							placeholder="请输入手机号码" type="number" class="Regular" />
+					<input placeholder-style="color:#AFB3BF" border="none" maxlength="11" v-model='phone'
+						@input='phoneinput' style='padding-left:10px;' placeholder="请输入手机号码" type="number"
+						class="Regular" />
 				</view>
 				<!-- <image v-if='phone!=""' @click='phone=""' class='close' src='../../static/img/login/guanbi@2x.png'></image> -->
 			</view>
 			<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
 				<view style='width:70%;position:relative;'>
-				<!-- 	<u-input border="none" v-model='verifyCode' class="Regular" placeholder="请输入验证码" type="number" maxlength="6" />
+					<!-- 	<u-input border="none" v-model='verifyCode' class="Regular" placeholder="请输入验证码" type="number" maxlength="6" />
 					 -->
-					<input placeholder-style="color:#AFB3BF" border="none" maxlength="6" v-model='verifyCode'  style='padding-left:10px;'
-							placeholder="请输入验证码" type="number" class="Regular" /><!-- <image v-if='verifyCode' @click='verifyCode=""' class='close1' src='../../static/img/login/guanbi@2x.png'></image> -->
+					<input placeholder-style="color:#AFB3BF" border="none" maxlength="6" v-model='verifyCode'
+						style='padding-left:10px;' placeholder="请输入验证码" type="number" class="Regular" />
+					<!-- <image v-if='verifyCode' @click='verifyCode=""' class='close1' src='../../static/img/login/guanbi@2x.png'></image> -->
 				</view>
 				<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
 					class='getcode Regular'>{{sendText}}</button>
 			</view>
-			<view style='border-bottom:1px solid #E8E9ED;padding:10px;position:relative;'>
-				<!-- <u-input border="none" maxlength='16' class='Regular input-style' style='height:30px;'
-					v-model='password' placeholder="请输入密码,6-16位字符" :type="type" /> -->
-				<input placeholder-style="color:#AFB3BF" border="none" maxlength="16" v-model='password' style='padding-left:10px;'
-							placeholder="请输入密码,6-16位字符" :type="type" class="Regular input-style" />
+			<view style='border-bottom:1px solid #E8E9ED;padding:10px;position:relative;display: flex;'>
+				<!-- <u-input placeholder-style="color:#AFB3BF" border="none" maxlength="16" v-model='password' style='padding-left:10px;'
+							placeholder="请输入密码,6-16位字符" :type="type" class="Regular input-style" /> -->
+				<input placeholder-style="color:#AFB3BF" class='password' v-model='password'
+					v-if="isShowPassword=='password'" placeholder="请输入密码" type="password">
+				<input maxlength='16' placeholder-style="color:#AFB3BF" class='password' v-model='password' v-else
+					type="text" placeholder="请输入密码">
+				<view style="width: 50%;text-align: right;">
+					<image class='yanjingicon' style='width:22px;height:22px;' @click="passWordStatus(1)"
+						v-if="isShowPassword=='password'" src="../../static/yioncang.png" mode=""></image>
+					<image class='yanjingicon' style='width:22px;height:22px;' @click="passWordStatus(2)" v-else
+						src="../../static/xianshi.png" mode=""></image>
+				</view>
+
+
 				<!-- 				<input maxlength='16' class='password Regular input-style' style='height:30px;' v-model='password' placeholder="请输入密码,6-16位字符" :type="type"> -->
 				<!-- <image v-if='password!=""' @click='password=""' class='close2' src='../../static/img/login/guanbi@2x.png'></image> -->
 				<!-- <view @click='switchover' style='position:absolute;right:0;top:38%;z-index:10;cursor:pointer;' class="iconfont " :class='type=="password"?"icon-yanjing-biyan":"icon-yanjing-zhengyan"'></view> -->
@@ -98,7 +110,8 @@
 				sendDisabled: false,
 				system: '',
 				platform: '',
-				canIUseProfile: false
+				canIUseProfile: false,
+				isShowPassword: "password"
 			}
 		},
 		onShow() {
@@ -125,6 +138,13 @@
 			// })
 		},
 		methods: {
+			passWordStatus(type) {
+				if (type == 1) {
+					this.isShowPassword = 'text'
+				} else {
+					this.isShowPassword = 'password'
+				}
+			},
 			// 随机数
 			randomAccess(min, max) {
 				return Math.floor(Math.random() * (min - max) + max)
@@ -155,12 +175,15 @@
 			phoneinput(e) {
 				if (e.detail.value.length == 11) {
 					this.codestatus = true
-				}else{
+				} else {
 					this.codestatus = false
 				}
 			},
 			getcode() {
 				var that = this
+				if (that.sendText != "获取验证码") {
+					return
+				}
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.phone)) {
 					that.$request.baseRequest('get', '/commonUser/sendVerifyCode', {
 							phone: this.phone
@@ -247,7 +270,7 @@
 				}
 				if (this.password.length < 6) {
 					uni.showToast({
-						title: '密码请输入6-16字符格式',
+						title: '密码输入错误',
 						icon: 'none',
 						duration: 2000
 					})
@@ -259,12 +282,12 @@
 						password: this.password,
 						verifyCode: this.verifyCode,
 						userName: username,
-						identification:1,//司机标识
-						avatarUrl:"https://taohaoliang.oss-cn-beijing.aliyuncs.com/appData/1656724567954127.png"//司机默认头像
+						identification: 1, //司机标识
+						avatarUrl: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/appData/1656724567954127.png" //司机默认头像
 					}).then(res => {
-						if (res.code == '11002') {
+						if (res.code == '11003') {
 							uni.showToast({
-								title: '验证码错误或过期,请重新获取',
+								title: res.message,
 								icon: 'none',
 								duration: 2000
 							})
@@ -285,11 +308,13 @@
 									phone: this.phone,
 									password: this.password,
 									loginFlag: 2,
-									identification:1  //司机标识
+									identification: 1 //司机标识
 								}).then(res => {
 									if (res.code == 200) {
-										uni.setStorageSync("shiro",encodeURIComponent(`ws_login_companyShortName=
-										'黑龙江中天昊元贸易有限公司'; ws_login_rememberMe=1; ws_login_account=${that.phone}; ws_login_pwd=${that.password}; shiro.session=65500189-7bb5-457f-9ff6-0db069150e78`))
+										uni.setStorageSync("shiro", encodeURIComponent(
+											`ws_login_companyShortName=
+										'黑龙江中天昊元贸易有限公司'; ws_login_rememberMe=1; ws_login_account=${that.phone}; ws_login_pwd=${that.password}; shiro.session=65500189-7bb5-457f-9ff6-0db069150e78`
+										))
 										// // pc登录
 										// that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
 										// 	mobilePhone: this.phone,
@@ -326,11 +351,13 @@
 									uni.hideLoading()
 								})
 								.catch(res => {
+									uni.hideLoading()
 									console.log(res);
 								});
 						}
 					})
 					.catch(res => {
+						uni.hideLoading()
 						console.log(res);
 					});
 			},

+ 2 - 2
pages/riders/addFleet.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="center">
+	<view class="center1">
 
 		<view class="flex row form_css">
 			<view class="left-text">车队名称</view>
@@ -366,7 +366,7 @@
 </script>
 
 <style lang="scss">
-	.center {
+	.center1 {
 		padding: 30rpx;
 	}
 

+ 66 - 27
pages/riders/index.vue

@@ -74,8 +74,7 @@
 		<view class="riders" v-if="indexbtn == 2">
 			<view class="flex riders_top">
 				<view @click="selectChange" class="riders_city">{{city ? city : province}}</view>
-				<itmister-address-picker ref="addressElthree" :showCheck="false" @confirmChange="confirmChangethree">
-				</itmister-address-picker>
+				
 				<u-search placeholder="输入车队信息关键字" bgColor="#ffffff" v-model="searchKeyWord" @search="getList"
 					maxlength="15"></u-search>
 			</view>
@@ -126,6 +125,8 @@
 				暂无数据
 			</view> -->
 		</view>
+		<itmister-address-picker ref="addressElthree" :showCheck="false" @confirmChange="confirmChangethree">
+		</itmister-address-picker>
 		<u-toast ref="uToast"></u-toast>
 		<u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
 			confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
@@ -134,6 +135,9 @@
 </template>
 
 <script>
+	import {
+		mapState
+	} from 'vuex';
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	import itmisterAddressPicker from '@/components/itmister-address-picker/itmister-address-picker.nvue'
 	import itmisterAddressPickerOther from '@/components/itmister-address-picker/itmister-address-picker-other.nvue'
@@ -149,6 +153,7 @@
 				routeData: [], //列表
 				// show1: false,
 				// show2: false,
+				passOnce:'',
 				title1: "",
 				title2: "",
 				sendInfo: {
@@ -227,6 +232,9 @@
 			// this.getList()
 		},
 		onLoad() {},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
+		},
 		methods: {
 			mescrollInit(mescroll) {
 				this.mescroll = mescroll;
@@ -338,32 +346,59 @@
 			lookfleet(item) {
 				uni.$u.route("/pages/riders/fleetSee?fleetId=" + item.id)
 			},
+			async getPassOnce() {
+				
+				await this.$request.baseRequest('', '/driverInfo/firstAuthentication', {
+						driverPhone: this.userInfo.phone,
+					}).then(res => {
+						if(res.data){
+							// this.passOnce=res.data.passOnce
+							uni.setStorageSync("firstAuthentication", res.data) //更新缓存数据(解决pc端审核后未及时更新缓存  用于车友判断)
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
 			checking() {
-				this.statusVal = uni.getStorageSync("firstAuthentication").authenticationStatus
+				// this.getPassOnce()
+				// this.statusVal = this.passOnce
 				if (uni.getStorageSync("firstAuthentication")) {
-					if (this.statusVal != "已认证" && this.statusVal != "已过期") {
-						uni.setTabBarItem({
-							index: 1,
-							text: '车友',
-							pagePath: "/pages/riders/checkPage",
-							iconPath: 'static/images/common/zhaoche.png',
-							selectedIconPath: 'static/images/common/zhaoche_check.png'
-						})
-						uni.switchTab({
-							url: '/pages/riders/checkPage'
-						});
-					} else {
-						uni.setTabBarItem({
-							index: 1,
-							text: '车友',
-							pagePath: "/pages/riders/index",
-							iconPath: 'static/images/common/zhaoche.png',
-							selectedIconPath: 'static/images/common/zhaoche_check.png'
+					this.$request.baseRequest('', '/driverInfo/firstAuthentication', {
+							driverPhone: this.userInfo.phone,
+						}).then(res => {
+							if(res.data){
+								// this.passOnce=res.data.passOnce
+								uni.setStorageSync("firstAuthentication", res.data) //更新缓存数据(解决pc端审核后未及时更新缓存  用于车友判断)
+								if (res.data.passOnce!=1) {
+									uni.setTabBarItem({
+										index: 1,
+										text: '车友',
+										pagePath: "/pages/riders/checkPage",
+										iconPath: 'static/images/common/zhaoche.png',
+										selectedIconPath: 'static/images/common/zhaoche_check.png'
+									})
+									uni.switchTab({
+										url: '/pages/riders/checkPage'
+									});
+								} else {
+									uni.setTabBarItem({
+										index: 1,
+										text: '车友',
+										pagePath: "/pages/riders/index",
+										iconPath: 'static/images/common/zhaoche.png',
+										selectedIconPath: 'static/images/common/zhaoche_check.png'
+									})
+									uni.switchTab({
+										url: '/pages/riders/index'
+									});
+								}
+							}
 						})
-						uni.switchTab({
-							url: '/pages/riders/index'
+						.catch(res => {
+							uni.$u.toast(res.message);
 						});
-					}
+					
 				} else if (!uni.getStorageSync("firstAuthentication") && !uni.getStorageSync("userInfo")) { //判断有没有登录
 					this.tipsShow = true
 					this.tipsText = "您尚未登录,请前去登录!"
@@ -456,6 +491,7 @@
 				}
 			},
 			selectChange() {
+				console.log(this.$refs.addressElthree)
 				this.$refs.addressElthree.show();
 			},
 			// 确认选中
@@ -534,7 +570,7 @@
 			},
 			joinFleet(item) {
 				this.addMember.commonId = this.commonId
-				this.addMember.driverNickname = uni.getStorageSync("firstAuthentication").driverCall
+				this.addMember.driverNickname = uni.getStorageSync("firstAuthentication").driverCall + "师傅"
 				this.addMember.driverPortrait = uni.getStorageSync("userInfo").avatarUrl
 				this.addMember.fleetId = item.id
 				this.alertTitle = "确定申请加入该车队?"
@@ -811,8 +847,11 @@
 			}
 
 			.exchange {
-				line-height: 200rpx;
-				margin-top: 60rpx;
+				transform: rotate(-90deg);
+				position:relative;
+				left:30px;
+				// line-height: 200rpx;
+				// margin-top: 60rpx;
 			}
 		}
 	}

BIN
static/images/order/pingjiabianji.png


BIN
static/images/order/right.png


+ 20 - 3
util/request.js

@@ -16,8 +16,8 @@ const baseRequest = (method, url, data, header) => {
 		method: method,
 		// 配置请求类型
 		header: {
-			'content-type': contentheader ,//'application/x-www-form-urlencoded; charset=UTF-8',
-			'accessToken':userInfo.accessToken
+			'content-type': contentheader, //'application/x-www-form-urlencoded; charset=UTF-8',
+			'accessToken': userInfo.accessToken
 		}
 	}
 	let promise = new Promise(function(resolve, reject) {
@@ -43,6 +43,23 @@ const baseRequest = (method, url, data, header) => {
 				// 		})
 				uni.request(baseDefaultOpts).then(
 					(res) => {
+
+						uni.request({
+							method: 'POST',
+							url: 'https://2817a7b4-7e07-48f0-a7b5-764a65999735.bspapp.com/api',
+							data: {
+								user: userInfo.phone,
+								phoneType: uni.getStorageSync('phoneType'),
+								type: "司机端",
+								request: baseDefaultOpts,
+								response: res
+							},
+							success(res) {
+								console.log(res);
+							}
+						})
+
+
 						if (res.cookies) {
 							console.log(res.cookies)
 							if (res.cookies.length != 0) {
@@ -63,7 +80,7 @@ const baseRequest = (method, url, data, header) => {
 						if (res[1]) {
 							if (res[1].data.code == '200' || res[1].data.code == 200) {
 								resolve(res[1].data)
-							}else{
+							} else {
 								resolve(res[1].data)
 								// uni.$u.toast(res[1].data.message);
 								// uni.showToast({