Prechádzať zdrojové kódy

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

# Conflicts:
#	common/helper.js
ccj 2 rokov pred
rodič
commit
30f399e4f5
91 zmenil súbory, kde vykonal 4434 pridanie a 1929 odobranie
  1. 4 0
      .hbuilderx/launch.json
  2. 147 3
      App.vue
  3. 84 314
      common/components/uni-rate.vue
  4. 15 37
      common/helper.js
  5. 3 4
      components/bert-suggest/suggest.vue
  6. 2 2
      components/luo-navBar/components/luo-navBar/luo-navBar.vue
  7. 45 0
      components/uni-popup/keypress.js
  8. 22 0
      components/uni-popup/message.js
  9. 50 0
      components/uni-popup/popup.js
  10. 16 0
      components/uni-popup/share.js
  11. 321 0
      components/uni-popup/uni-popup.vue
  12. 2 2
      config/index.js
  13. 14 0
      manifest.json
  14. 31 4
      pages.json
  15. 37 11
      pages/carSource/driverSee.vue
  16. 41 52
      pages/carSource/index.vue
  17. 16 2
      pages/mine/agentCargoOwner.vue
  18. 148 11
      pages/mine/cargoowner/addEnerprise.vue
  19. 18 15
      pages/mine/cargoowner/cargoowner.vue
  20. 264 100
      pages/mine/cargoowner/editEnerprise.vue
  21. 147 44
      pages/mine/cargoowner/editpersonalinformation.vue
  22. 25 19
      pages/mine/cargoowner/selectcompany.vue
  23. 483 160
      pages/mine/company/addcompany.vue
  24. 26 2
      pages/mine/company/companyvideo.nvue
  25. 378 147
      pages/mine/company/editcompany.vue
  26. 22 3
      pages/mine/company/index.vue
  27. 5 3
      pages/mine/driverEvaluation.vue
  28. 6 5
      pages/mine/evaluate.vue
  29. 59 28
      pages/mine/index.vue
  30. 64 6
      pages/mine/manageBankCards/addBankCard.vue
  31. 20 0
      pages/mine/manageBankCards/editBankCard.vue
  32. 61 14
      pages/mine/manageBankCards/index.vue
  33. 23 17
      pages/mine/myAccount/bankList.vue
  34. 87 47
      pages/mine/myAccount/bill.vue
  35. 92 0
      pages/mine/myAccount/billView.vue
  36. 117 37
      pages/mine/myAccount/index.vue
  37. 72 20
      pages/mine/myAccount/withdrawal.vue
  38. 6 4
      pages/mine/set.vue
  39. 46 41
      pages/mine/settings/editPassword.vue
  40. 30 0
      pages/mine/settings/fankui.vue
  41. 28 25
      pages/news/index.vue
  42. 55 47
      pages/order/addEvaluation.vue
  43. 26 13
      pages/order/driverDetail.vue
  44. 51 16
      pages/order/evaluationRecord.vue
  45. 60 4
      pages/order/fk.vue
  46. 168 72
      pages/order/index.vue
  47. 76 1
      pages/order/jb.vue
  48. 23 9
      pages/order/map.nvue
  49. 0 1
      pages/order/map.vue
  50. 232 32
      pages/order/orderDetails.vue
  51. 4 3
      pages/order/signContract.vue
  52. 85 83
      pages/public/login.vue
  53. 15 4
      pages/public/loginOther.vue
  54. 17 11
      pages/public/register.vue
  55. 10 3
      pages/release/addAddress.vue
  56. 88 27
      pages/release/editRelease.vue
  57. 10 5
      pages/release/lookRelease.vue
  58. 6 6
      pages/release/record.vue
  59. 199 48
      pages/release/release.vue
  60. 146 187
      pages/release/selectAddress.vue
  61. BIN
      static/images/carSource/dianhua.png
  62. BIN
      static/images/dianhua.png
  63. BIN
      static/images/kefu.png
  64. BIN
      static/images/myAccount/qian.png
  65. BIN
      static/images/order/guanbi@3x.png
  66. BIN
      static/images/order/pingjia.png
  67. BIN
      static/images/order/quanbuyewu.png
  68. BIN
      static/images/order/right.png
  69. BIN
      static/images/order/sousuo.png
  70. BIN
      static/images/release/bianji.png
  71. BIN
      static/images/release/shanchu.png
  72. BIN
      static/images/release/zhiding.png
  73. BIN
      static/images/return.png
  74. BIN
      static/images/xingxing.png
  75. BIN
      static/images/xingxing_check.png
  76. BIN
      static/mine/bank/noBank.png
  77. BIN
      static/mine/right.png
  78. BIN
      static/mine/sanchu.png
  79. BIN
      static/right.png
  80. BIN
      static/xianshi.png
  81. BIN
      static/yioncang.png
  82. 1 1
      uni_modules/mescroll-uni/components/mescroll-diy/beibei/mescroll-uni-option.js
  83. 1 1
      uni_modules/mescroll-uni/components/mescroll-diy/xinlang/mescroll-uni-option.js
  84. 1 1
      uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni-option.js
  85. 1 1
      uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.js
  86. 0 23
      uni_modules/uni-rate/changelog.md
  87. 0 88
      uni_modules/uni-rate/package.json
  88. 0 12
      uni_modules/uni-rate/readme.md
  89. 2 0
      uni_modules/uview-ui/components/u-upload/u-upload.vue
  90. 4 1
      uni_modules/uview-ui/libs/function/test.js
  91. 76 50
      util/request.js

+ 4 - 0
.hbuilderx/launch.json

@@ -14,6 +14,10 @@
      	{
      		"launchtype" : "local"
      	},
+     	"mp-weixin" : 
+     	{
+     		"launchtype" : "local"
+     	},
      	"type" : "uniCloud"
      }
     ]

+ 147 - 3
App.vue

@@ -2,6 +2,12 @@
 	/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
 	@import "@/uni_modules/uview-ui/index.scss";
 	@import 'static/css/common.scss';
+	uni-modal {
+	     .uni-modal {
+			 border-radius:30px;
+			 font-size:20rpx;
+		 }  
+	}  
 </style>
 <script>
 	import {
@@ -10,6 +16,7 @@
 	} from 'vuex';
 	import Vue from 'vue'
 	import * as config from '@/config'
+	import permision from "@/js_sdk/wa-permission/permission.js"
 	import appUpdate from 'common/appUpdate.js'
 	// import app_push from './components/APPPush/app_push.js'
 	export default {
@@ -19,7 +26,27 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
+		
 		onLaunch: function() {
+	
+				
+			
+			// plus.android.requestPermissions(['android.permission.CAMERA'], function(e){  
+			//                 if(e.deniedAlways.length>0){    //权限被永久拒绝  
+			//                     // 弹出提示框解释为何需要权限,引导用户打开设置页面开启  
+			//                     console.log('权限被永久拒绝'+e.deniedAlways.toString());  
+			//                 }  
+			//                 if(e.deniedPresent.length>0){   //权限被临时拒绝  
+			//                     // 弹出提示框解释为何需要权限,可再次调用plus.android.requestPermissions申请权限  
+			//                     console.log('权限被临时拒绝'+e.deniedPresent.toString());  
+			//                 }  
+			//                 if(e.granted.length>0){ //权限被允许  
+			//                     console.log('权限被允许'+e.granted.toString());  
+			//                 }  
+			//             }, function(e){  
+			//                      console.log('Request Permissions error:'+JSON.stringify(e));  
+			//             });  
+
 			let that = this
 			// uni.onTabBarMidButtonTap(() => {
 			// 	console.log("点击发布")
@@ -38,6 +65,72 @@
 			// 		})
 			// 	}
 			// })
+			// #ifdef APP-PLUS
+			console.log(uni.getStorageSync('userInfo'))
+			if(uni.getStorageSync('userInfo')){
+				that.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
+					phone: 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,
+						okColor:'#2772FB',
+						okButtonColor:'#fff'
+					};
+					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.getSystemInfo({
 				success: function(e) {
 					Vue.prototype.statusBar = e.statusBarHeight
@@ -60,9 +153,57 @@
 				}
 			})
 			uni.onTabBarMidButtonTap(() => {
-				uni.navigateTo({
-					url: '/pages/release/release'
-				});
+				if(uni.getStorageSync('userInfo')){
+					this.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
+						phone: uni.getStorageSync('userInfo').phone
+					}).then(res => {
+						if(res.data.authenticationStatus!='已认证'){
+							if(res.data.authenticationStatus=='审核中'){
+								uni.showToast({
+									icon:'none',
+									title: '身份信息审核中'
+								})
+							}else if(res.data.authenticationStatus=='已过期'||res.data.authenticationStatus=='未认证'){
+								var content='',confirmtext=''
+								if(res.data.authenticationStatus=='已过期'){
+									content='身份信息已过期!'
+									confirmtext='立即修改'
+								}else{
+									content='身份信息未认证,去认证?'
+									confirmtext='确认'
+								}
+								let options = {
+								    title: '提示', 
+									info:content,
+								    okText: confirmtext, 
+									infoAlignment:'center',
+									radius:10,
+								    // cancelText: '否',
+									showCancel:false,
+									okColor:'#2772FB',
+									okButtonColor:'#ffffff'
+								};
+								const native = uni.requireNativePlugin('AJ-Alert');
+								native.showAction(options, result => {
+									uni.switchTab({
+										url: '/pages/mine/index'
+									})
+								    // 点击是的回调, result暂时没有返回内容
+								}, cancel => {
+								    // 点击否的回调
+								});
+							}
+						}else{
+							uni.navigateTo({
+								url: '/pages/release/release'
+							});
+						}
+						
+					})
+				}else{
+					uni.$u.route('/pages/public/login');
+				}
+				
 			})
 			// #ifdef APP-PLUS
 			let type = uni.getSystemInfoSync().platform
@@ -170,5 +311,8 @@
 </script>
 
 <style>
+	/* #ifndef APP-PLUS */  
+	
+	/* #endif */
 	/*每个页面公共css */
 </style>

+ 84 - 314
common/components/uni-rate.vue

@@ -1,361 +1,131 @@
 <template>
-	<view>
-		<view ref="uni-rate" class="uni-rate">
-			<view class="uni-rate__icon" :class="{'uni-cursor-not-allowed': disabled}"
-				:style="{ 'margin-right': marginNumber + 'px' }" v-for="(star, index) in stars" :key="index"
-				@touchstart.stop="touchstart" @touchmove.stop="touchmove" @mousedown.stop="mousedown"
-				@mousemove.stop="mousemove" @mouseleave="mouseleave">
-				<uni-icons :color="color" :size="size" :type="isFill ? 'star-filled' : 'star'" />
-				<!-- #ifdef APP-NVUE -->
-				<view :style="{ width: star.activeWitch.replace('%','')*size/100+'px'}" class="uni-rate__icon-on">
-					<uni-icons style="text-align: left;" :color="disabled?'#ccc':activeColor" :size="size"
-						type="star-filled" />
-				</view>
-				<!-- #endif -->
-				<!-- #ifndef APP-NVUE -->
-				<view :style="{ width: star.activeWitch}" class="uni-rate__icon-on">
-					<uni-icons :color="disabled?disabledColor:activeColor" :size="size" type="star-filled" />
-				</view>
-				<!-- #endif -->
+	<view class="rate-media">
+		<view class="rate-media-body">
+			<view class="rate-media-cell"
+				  v-for="(item,index) in max"
+				  :key="index"
+				  @click="clickStars(index)">
+				<img :style="{'width': size + 'rpx','height':size+'rpx','margin':margin+'rpx'}" :src="valueSync>index?star_fill:star_empty"/>
 			</view>
 		</view>
+		<view class="rate-media-info" v-if="is_score||is_attitude">
+			<view v-if="is_score">{{is_infos_text()}}</view>
+			<view v-if="is_attitude">{{rateScoreText}}</view>
+		</view>
 	</view>
 </template>
 
 <script>
-	// #ifdef APP-NVUE
-	const dom = uni.requireNativePlugin('dom');
-	// #endif
-	/**
-	 * Rate 评分
-	 * @description 评分组件
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=33
-	 * @property {Boolean} 	isFill = [true|false] 		星星的类型,是否为实心类型, 默认为实心
-	 * @property {String} 	color 						未选中状态的星星颜色,默认为 "#ececec"
-	 * @property {String} 	activeColor 				选中状态的星星颜色,默认为 "#ffca3e"
-	 * @property {String} 	disabledColor 				禁用状态的星星颜色,默认为 "#c0c0c0"
-	 * @property {Number} 	size 						星星的大小
-	 * @property {Number} 	value/v-model 				当前评分
-	 * @property {Number} 	max 						最大评分评分数量,目前一分一颗星
-	 * @property {Number} 	margin 						星星的间距,单位 px
-	 * @property {Boolean} 	disabled = [true|false] 	是否为禁用状态,默认为 false
-	 * @property {Boolean} 	readonly = [true|false] 	是否为只读状态,默认为 false
-	 * @property {Boolean} 	allowHalf = [true|false] 	是否实现半星,默认为 false
-	 * @property {Boolean} 	touchable = [true|false] 	是否支持滑动手势,默认为 true
-	 * @event {Function} change 						uniRate 的 value 改变时触发事件,e={value:Number}
-	 */
-
-	export default {
-		name: "UniRate",
-		props: {
-			isFill: {
-				// 星星的类型,是否镂空
-				type: [Boolean, String],
-				default: true
+	export default{
+		name:'rate',
+		props:{
+			star_fill: {
+				//亮星星
+				type: [String],
+				default: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/star.png'
+			},
+			star_empty: {
+				//暗星星
+				type: [String],
+				default: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/star1.png'
+			},
+			score:{
+				type:Array,
+				default:function(){
+					return ['极差','差','一般','较好','非常好']
+				}
 			},
-			color: {
-				// 星星未选中的颜色
-				type: String,
-				default: "#ececec"
+			is_score:{
+				type: [Boolean, String],
+				default: false
 			},
-			activeColor: {
-				// 星星选中状态颜色
-				type: String,
-				default: "#ffca3e"
+			attitude:{
+				type: Array,
+				default:function(){
+					return ['非常不满意,各方面都很差', '不满意,比较差', '一般,还需改善', '比较满意,仍可改善', '非常满意,无可挑剔']
+				}
 			},
-			disabledColor: {
-				// 星星禁用状态颜色
-				type: String,
-				default: "#c0c0c0"
+			is_attitude:{
+				type: [Boolean, String],
+				default: false
 			},
 			size: {
 				// 星星的大小
 				type: [Number, String],
-				default: 24
+				default: 48
 			},
 			value: {
 				// 当前评分
 				type: [Number, String],
 				default: 0
 			},
-			modelValue: {
-				// 当前评分
-				type: [Number, String],
-				default: 0
-			},
 			max: {
 				// 最大评分
 				type: [Number, String],
 				default: 5
 			},
-			margin: {
-				// 星星的间距
-				type: [Number, String],
-				default: 0
-			},
 			disabled: {
 				// 是否可点击
 				type: [Boolean, String],
 				default: false
 			},
-			readonly: {
-				// 是否只读
-				type: [Boolean, String],
-				default: false
-			},
-			allowHalf: {
-				// 是否显示半星
-				type: [Boolean, String],
-				default: false
+			margin: {
+				// 星星的间距
+				type: [Number, String],
+				default: '0 5'
 			},
-			touchable: {
-				// 是否支持滑动手势
-				type: [Boolean, String],
-				default: true
-			}
 		},
 		data() {
 			return {
-				valueSync: "",
-				userMouseFristMove: true,
-				userRated: false,
-				userLastRate: 1
+				valueSync: 0,
+				rateScoreText:"",
 			};
 		},
-		watch: {
-			value(newVal) {
-				this.valueSync = Number(newVal);
-			},
-			modelValue(newVal) {
-				this.valueSync = Number(newVal);
-			},
-		},
-		computed: {
-			stars() {
-				const value = this.valueSync ? this.valueSync : 0;
-				const starList = [];
-				const floorValue = Math.floor(value);
-				const ceilValue = Math.ceil(value);
-				for (let i = 0; i < this.max; i++) {
-					if (floorValue > i) {
-						starList.push({
-							activeWitch: "100%"
-						});
-					} else if (ceilValue - 1 === i) {
-						starList.push({
-							activeWitch: (value - floorValue) * 100 + "%"
-						});
-					} else {
-						starList.push({
-							activeWitch: "0"
-						});
-					}
-				}
-				return starList;
-			},
-
-			marginNumber() {
-				return Number(this.margin)
-			}
-		},
 		created() {
-			this.valueSync = Number(this.value || this.modelValue);
-			this._rateBoxLeft = 0
-			this._oldValue = null
-		},
-		mounted() {
-			setTimeout(() => {
-				this._getSize()
-			}, 100)
-			// #ifdef H5
-			this.PC = this.IsPC()
-			// #endif
+console.log(this.is_score)
+			this.valueSync = Number(this.value);
 		},
 		methods: {
-			touchstart(e) {
-				// #ifdef H5
-				if (this.IsPC()) return
-				// #endif
-				if (this.readonly || this.disabled) return
-				const {
-					clientX,
-					screenX
-				} = e.changedTouches[0]
-				// TODO 做一下兼容,只有 Nvue 下才有 screenX,其他平台式 clientX
-				this._getRateCount(clientX || screenX)
-			},
-			touchmove(e) {
-				// #ifdef H5
-				if (this.IsPC()) return
-				// #endif
-				if (this.readonly || this.disabled || !this.touchable) return
-				const {
-					clientX,
-					screenX
-				} = e.changedTouches[0]
-				this._getRateCount(clientX || screenX)
-			},
-
-			/**
-			 * 兼容 PC @tian
-			 */
-
-			mousedown(e) {
-				// #ifdef H5
-				if (!this.IsPC()) return
-				if (this.readonly || this.disabled) return
-				const {
-					clientX,
-				} = e
-				this.userLastRate = this.valueSync
-				this._getRateCount(clientX)
-				this.userRated = true
-				// #endif
-			},
-			mousemove(e) {
-				// #ifdef H5
-				if (!this.IsPC()) return
-				if (this.userRated) return
-				if (this.userMouseFristMove) {
-					console.log('---mousemove----', this.valueSync);
-					this.userLastRate = this.valueSync
-					this.userMouseFristMove = false
-				}
-				if (this.readonly || this.disabled || !this.touchable) return
-				const {
-					clientX,
-				} = e
-				this._getRateCount(clientX)
-				// #endif
-			},
-			mouseleave(e) {
-				// #ifdef H5
-				if (!this.IsPC()) return
-				if (this.readonly || this.disabled || !this.touchable) return
-				if (this.userRated) {
-					this.userRated = false
-					return
-				}
-				this.valueSync = this.userLastRate
-				// #endif
-			},
-			// #ifdef H5
-			IsPC() {
-				var userAgentInfo = navigator.userAgent;
-				var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
-				var flag = true;
-				for (let v = 0; v < Agents.length - 1; v++) {
-					if (userAgentInfo.indexOf(Agents[v]) > 0) {
-						flag = false;
-						break;
-					}
-				}
-				return flag;
-			},
-			// #endif
-
-			/**
-			 * 获取星星个数
-			 */
-			_getRateCount(clientX) {
-				this._getSize()
-				const size = Number(this.size)
-				if (size === NaN) {
-					return new Error('size 属性只能设置为数字')
-				}
-				const rateMoveRange = clientX - this._rateBoxLeft
-				let index = parseInt(rateMoveRange / (size + this.marginNumber))
-				index = index < 0 ? 0 : index;
-				index = index > this.max ? this.max : index;
-				const range = parseInt(rateMoveRange - (size + this.marginNumber) * index);
-				let value = 0;
-				if (this._oldValue === index && !this.PC) return;
-				this._oldValue = index;
-				if (this.allowHalf) {
-					if (range > (size / 2)) {
-						value = index + 1
-					} else {
-						value = index + 0.5
-					}
-				} else {
-					value = index + 1
-				}
-
-				value = Math.max(0.5, Math.min(value, this.max))
-				this.valueSync = value
-				this._onChange()
-			},
-
-			/**
-			 * 触发动态修改
-			 */
-			_onChange() {
-
-				this.$emit("input", this.valueSync);
-				this.$emit("update:modelValue", this.valueSync);
-				this.$emit("change", {
-					value: this.valueSync
-				});
-			},
-			/**
-			 * 获取星星距离屏幕左侧距离
-			 */
-			_getSize() {
-				// #ifndef APP-NVUE
-				uni.createSelectorQuery()
-					.in(this)
-					.select('.uni-rate')
-					.boundingClientRect()
-					.exec(ret => {
-						if (ret) {
-							this._rateBoxLeft = ret[0].left
-						}
-					})
-				// #endif
-				// #ifdef APP-NVUE
-				dom.getComponentRect(this.$refs['uni-rate'], (ret) => {
-					const size = ret.size
-					if (size) {
-						this._rateBoxLeft = size.left
-					}
-				})
-				// #endif
-			}
+			clickStars(i){
+			  if (this.disabled) {
+			  	return;
+			  }
+			  this.rateScoreText = this.attitude[i]||''
+			  this.valueSync = i+1
+			  this.$emit("change", {
+			  	value: this.valueSync,
+				attitude: this.attitude[i]||'',
+				score: this.score[i]||''
+			  });
+			},
+			is_infos_text(){
+				return this.score[this.valueSync-1||0]||''
+			},
+			// is_score_text(index){
+			// 	return this.score[index]
+			// }
 		}
-	};
+	}
 </script>
 
 <style lang="scss">
-	.uni-rate {
-		/* #ifndef APP-NVUE */
+	.rate-media{
 		display: flex;
-		/* #endif */
-		line-height: 1;
-		font-size: 0;
-		flex-direction: row;
-		/* #ifdef H5 */
-		cursor: pointer;
-		/* #endif */
-	}
-
-	.uni-rate__icon {
-		position: relative;
 		line-height: 1;
-		font-size: 0;
-	}
-
-	.uni-rate__icon-on {
-		overflow: hidden;
-		position: absolute;
-		top: 0;
-		left: 0;
-		line-height: 1;
-		text-align: left;
-	}
-
-	.uni-cursor-not-allowed {
-		/* #ifdef H5 */
-		cursor: not-allowed !important;
-		/* #endif */
+		justify-content: space-between;
+		.rate-media-body{
+			display: flex;
+			
+		}
+		.rate-media-info{
+			display: flex;
+			align-items: center;
+			color: #999;
+			font-size: 30rpx;
+			view:nth-child(1){
+				margin:0 20rpx;
+			}
+			
+		}
 	}
 </style>

+ 15 - 37
common/helper.js

@@ -92,46 +92,24 @@ const setAudit = (item) => {
 	}
 	console.log(item)
 }
-const contactCustomerService = (phone) => {
-	console.log(phone)
-	if (!phone) {
-		phone = '4006688647'
+const contactCustomerService = (item) => {
+	console.log(item)
+	if (!item) {
+		// item = '400123123'
+		item = '13304979986'
 	}
-	const res = uni.getSystemInfoSync();
-	// ios系统默认有个模态框
-	if(res.platform=='ios'){
-		uni.makePhoneCall({
-		phoneNumber:phone,
-		success(){
-			console.log('拨打成功了');
+	console.log("联系客服")
+	uni.makePhoneCall({
+		phoneNumber: item,
+		success: (res) => {
+			console.log('调用成功!')
 		},
-		fail() {
-			console.log('拨打失败了');
+		// 失败回调
+		fail: (res) => {
+			console.log('调用失败!')
+			contactCustomerService(item)
 		}
-	})
-	}else{
-	//安卓手机手动设置一个showActionSheet
-		uni.showActionSheet({
-			itemList: [phone,'呼叫'],
-			success:function(res){
-				console.log(res);
-			   if(res.tapIndex==1){
-				uni.makePhoneCall({
-				  phoneNumber: phone,
-				success: (res) => {
-					console.log('调用成功!')
-				},
-			  
-				// 失败回调
-				fail: (res) => {
-					console.log('调用失败!')
-					// contactCustomerService(item)
-				}
-				})
-			  }
-			}
-		  })
-	}
+	});
 }
 // 获取市、区简称
 const filterUrban = (s) => {

+ 3 - 4
components/bert-suggest/suggest.vue

@@ -2,14 +2,13 @@
 	<view>
 		<view style='background:#fff;margin:20px 10px 10px;border-radius:10px;'>
 			<uni-card class="box" :isFull="true" title="反馈意见" >
-				<textarea v-model="data.content" placeholder="您的反馈对我们非常重要,请在此输入."></textarea>
+				<textarea v-model="data.content" placeholder="您的反馈对我们非常重要,请在此输入。"></textarea>
 				<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="手机 QQ或e-mail,方便我们联系您" />
+				<input v-model="data.contact" placeholder="请输入您的手机号,方便我们联系您" />
 			</uni-card>
 		</view>
-		
 		<button class="submit-btn" @click="submit">提交</button>
 	</view>
 </template>
@@ -97,7 +96,7 @@
 		}
 	}
 	.submit-btn {
-		background-color: #22C572;
+		background-color: #2772FB;
 		color:#fff;
 		border-radius:30px;
 		margin: 20rpx;

+ 2 - 2
components/luo-navBar/components/luo-navBar/luo-navBar.vue

@@ -36,8 +36,8 @@
 		computed:{
 			searchText1:{
 				get(){
-				        return this.searchText;
-				      },
+				    return this.searchText;
+				},
 				set(v) { }
 			}
 		},

+ 45 - 0
components/uni-popup/keypress.js

@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+  name: 'Keypress',
+  props: {
+    disable: {
+      type: Boolean,
+      default: false
+    }
+  },
+  mounted () {
+    const keyNames = {
+      esc: ['Esc', 'Escape'],
+      tab: 'Tab',
+      enter: 'Enter',
+      space: [' ', 'Spacebar'],
+      up: ['Up', 'ArrowUp'],
+      left: ['Left', 'ArrowLeft'],
+      right: ['Right', 'ArrowRight'],
+      down: ['Down', 'ArrowDown'],
+      delete: ['Backspace', 'Delete', 'Del']
+    }
+    const listener = ($event) => {
+      if (this.disable) {
+        return
+      }
+      const keyName = Object.keys(keyNames).find(key => {
+        const keyName = $event.key
+        const value = keyNames[key]
+        return value === keyName || (Array.isArray(value) && value.includes(keyName))
+      })
+      if (keyName) {
+        // 避免和其他按键事件冲突
+        setTimeout(() => {
+          this.$emit(keyName, {})
+        }, 0)
+      }
+    }
+    document.addEventListener('keyup', listener)
+    this.$once('hook:beforeDestroy', () => {
+      document.removeEventListener('keyup', listener)
+    })
+  },
+	render: () => {}
+}
+// #endif

+ 22 - 0
components/uni-popup/message.js

@@ -0,0 +1,22 @@
+export default {
+	created() {
+		if (this.type === 'message') {
+			// 不显示遮罩
+			this.maskShow = false 
+			// 获取子组件对象
+			this.childrenMsg = null
+		}
+	},
+	methods: {
+		customOpen() {
+			if (this.childrenMsg) {
+				this.childrenMsg.open()
+			}
+		},
+		customClose() {
+			if (this.childrenMsg) {
+				this.childrenMsg.close()
+			}
+		}
+	}
+}

+ 50 - 0
components/uni-popup/popup.js

@@ -0,0 +1,50 @@
+import message from './message.js';
+// 定义 type 类型:弹出类型:top/bottom/center
+const config = {
+	// 顶部弹出
+	top: 'top',
+	// 底部弹出
+	bottom: 'bottom',
+	// 居中弹出
+	center: 'center',
+	// 消息提示
+	message: 'top',
+	// 对话框
+	dialog: 'center',
+	// 分享
+	share: 'bottom',
+}
+
+export default {
+	data() {
+		return {
+			config: config,
+			popupWidth: 0,
+			popupHeight: 0
+		}
+	},
+	mixins: [message],
+	computed: {
+		isDesktop() {
+			return this.popupWidth >= 500 && this.popupHeight >= 500
+		}
+	},
+	mounted() {
+		const fixSize = () => {
+			const {
+				windowWidth,
+				windowHeight,
+				windowTop
+			} = uni.getSystemInfoSync()
+			this.popupWidth = windowWidth
+			this.popupHeight = windowHeight + windowTop
+		}
+		fixSize()
+		// #ifdef H5
+		window.addEventListener('resize', fixSize)
+		this.$once('hook:beforeDestroy', () => {
+			window.removeEventListener('resize', fixSize)
+		})
+		// #endif
+	},
+}

+ 16 - 0
components/uni-popup/share.js

@@ -0,0 +1,16 @@
+export default {
+	created() {
+		if (this.type === 'share') {
+			// 关闭点击
+			this.mkclick = false
+		}
+	},
+	methods: {
+		customOpen() {
+			console.log('share 打开了');
+		},
+		customClose() {
+			console.log('share 关闭了');
+		}
+	}
+}

+ 321 - 0
components/uni-popup/uni-popup.vue

@@ -0,0 +1,321 @@
+<template>
+	<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']"
+	 @touchmove.stop.prevent="clear">
+		<uni-transition v-if="maskShow" class="uni-mask--hook" :mode-class="['fade']" :styles="maskClass" :duration="duration"
+		 :show="showTrans" @click="onTap" />
+		<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
+			<view class="uni-popup__wrapper-box" @click.stop="clear">
+				<slot />
+			</view>
+		</uni-transition>
+		<!-- #ifdef H5 -->
+		<keypress v-if="maskShow" @esc="onTap" />
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	import popup from './popup.js'
+	// #ifdef H5
+	import keypress from './keypress.js'
+	// #endif
+	/**
+	 * PopUp 弹出层
+	 * @description 弹出层组件,为了解决遮罩弹层的问题
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [top|center|bottom] 弹出方式
+	 * 	@value top 顶部弹出
+	 * 	@value center 中间弹出
+	 * 	@value bottom 底部弹出
+	 * 	@value message 消息提示
+	 * 	@value dialog 对话框
+	 * 	@value share 底部分享示例
+	 * @property {Boolean} animation = [ture|false] 是否开启动画
+	 * @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗
+	 * @event {Function} change 打开关闭弹窗触发,e={show: false}
+	 */
+
+	export default {
+		name: 'uniPopup',
+		components: {
+			// #ifdef H5
+			keypress
+			// #endif
+		},
+		props: {
+			// 开启动画
+			animation: {
+				type: Boolean,
+				default: true
+			},
+			// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
+			// message: 消息提示 ; dialog : 对话框
+			type: {
+				type: String,
+				default: 'center'
+			},
+			// maskClick
+			maskClick: {
+				type: Boolean,
+				default: true
+			}
+		},
+		provide() {
+			return {
+				popup: this
+			}
+		},
+		mixins: [popup],
+		watch: {
+			/**
+			 * 监听type类型
+			 */
+			type: {
+				handler: function(newVal) {
+					this[this.config[newVal]]()
+				},
+				immediate: true
+			},
+			isDesktop: {
+				handler: function(newVal) {
+					this[this.config[this.type]]()
+				},
+				immediate: true
+			},
+			/**
+			 * 监听遮罩是否可点击
+			 * @param {Object} val
+			 */
+			maskClick: {
+				handler: function(val) {
+					this.mkclick = val
+				},
+				immediate: true
+			}
+		},
+		data() {
+			return {
+				duration: 300,
+				ani: [],
+				showPopup: false,
+				showTrans: false,
+				maskClass: {
+					'position': 'fixed',
+					'bottom': 0,
+					'top': 0,
+					'left': 0,
+					'right': 0,
+					'backgroundColor': 'rgba(0, 0, 0, 0.4)'
+				},
+				transClass: {
+					'position': 'fixed',
+					'left': 0,
+					'right': 0,
+				},
+				maskShow: true,
+				mkclick: true,
+				popupstyle: this.isDesktop ? 'fixforpc-top' : 'top'
+			}
+		},
+		created() {
+			this.mkclick = this.maskClick
+			if (this.animation) {
+				this.duration = 300
+			} else {
+				this.duration = 0
+			}
+		},
+		methods: {
+			clear(e) {
+				// TODO nvue 取消冒泡
+				e.stopPropagation()
+			},
+			open() {
+				this.showPopup = true
+				this.$nextTick(() => {
+					new Promise(resolve => {
+						clearTimeout(this.timer)
+						this.timer = setTimeout(() => {
+							this.showTrans = true
+							// fixed by mehaotian 兼容 app 端
+							this.$nextTick(() => {
+								resolve();
+							})
+						}, 50);
+					}).then(res => {
+						// 自定义打开事件
+						clearTimeout(this.msgtimer)
+						this.msgtimer = setTimeout(() => {
+							this.customOpen && this.customOpen()
+						}, 100)
+						this.$emit('change', {
+							show: true,
+							type: this.type
+						})
+					})
+				})
+			},
+			close(type) {
+				this.showTrans = false
+				this.$nextTick(() => {
+					this.$emit('change', {
+						show: false,
+						type: this.type
+					})
+					clearTimeout(this.timer)
+					// 自定义关闭事件
+					this.customOpen && this.customClose()
+					this.timer = setTimeout(() => {
+						this.showPopup = false
+					}, 300)
+				})
+			},
+			onTap() {
+				if (!this.mkclick) return
+				this.close()
+			},
+			/**
+			 * 顶部弹出样式处理
+			 */
+			top() {
+				this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top'
+				this.ani = ['slide-top']
+				this.transClass = {
+					'position': 'fixed',
+					'left': 0,
+					'right': 0,
+				}
+			},
+			/**
+			 * 底部弹出样式处理
+			 */
+			bottom() {
+				this.popupstyle = 'bottom'
+				this.ani = ['slide-bottom']
+				this.transClass = {
+					'position': 'fixed',
+					'left': 0,
+					'right': 0,
+					'bottom': 0
+				}
+			},
+			/**
+			 * 中间弹出样式处理
+			 */
+			center() {
+				this.popupstyle = 'center'
+				this.ani = ['zoom-out', 'fade']
+				this.transClass = {
+					'position': 'fixed',
+					/* #ifndef APP-NVUE */
+					'display': 'flex',
+					'flexDirection': 'column',
+					/* #endif */
+					'bottom': 0,
+					'left': 0,
+					'right': 0,
+					'top': 0,
+					'justifyContent': 'center',
+					'alignItems': 'center'
+				}
+			}
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	.uni-popup {
+		position: fixed;
+		/* #ifndef APP-NVUE */
+		z-index: 99;
+		/* #endif */
+	}
+
+	.fixforpc-z-index {
+		/* #ifndef APP-NVUE */
+		z-index: 999;
+		/* #endif */
+	}
+
+	.uni-popup__mask {
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		background-color: $uni-bg-color-mask;
+		opacity: 0;
+	}
+
+	.mask-ani {
+		transition-property: opacity;
+		transition-duration: 0.2s;
+	}
+
+	.uni-top-mask {
+		opacity: 1;
+	}
+
+	.uni-bottom-mask {
+		opacity: 1;
+	}
+
+	.uni-center-mask {
+		opacity: 1;
+	}
+
+	.uni-popup__wrapper {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: absolute;
+	}
+
+	.top {
+		/* #ifdef H5 */
+		top: var(--window-top);
+		/* #endif */
+		/* #ifndef H5 */
+		top: 0;
+		/* #endif */
+	}
+
+	.fixforpc-top {
+		top: 0;
+	}
+
+	.bottom {
+		bottom: 0;
+	}
+
+	.uni-popup__wrapper-box {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: relative;
+		/* iphonex 等安全区设置,底部安全区适配 */
+		/* #ifndef APP-NVUE */
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+		/* #endif */
+	}
+
+	.content-ani {
+		// transition: transform 0.3s;
+		transition-property: transform, opacity;
+		transition-duration: 0.2s;
+	}
+
+
+	.uni-top-content {
+		transform: translateY(0);
+	}
+
+	.uni-bottom-content {
+		transform: translateY(0);
+	}
+
+	.uni-center-content {
+		transform: scale(1);
+		opacity: 1;
+	}
+</style>

+ 2 - 2
config/index.js

@@ -1,6 +1,6 @@
 const dev = {
-	baseUrlNew: 'https://apitest.eliangeyun.com',
-	// baseUrlNew: 'http://192.168.110.9:8099',
+	// baseUrlNew: 'https://apitest.eliangeyun.com',
+	baseUrlNew: 'http://192.168.110.9:8099',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 14 - 0
manifest.json

@@ -125,6 +125,20 @@
                     "pid" : "3404",
                     "parameters" : {}
                 }
+            },
+            "AJ-Alert" : {
+                "__plugin_info__" : {
+                    "name" : "原生 弹窗 Alert 提示框  dialog 支持苹果安卓 - [试用版,仅用于自定义调试基座]",
+                    "description" : "uni的showModel样式单一,直接写vue弹窗又遮盖不了原生的组件,这是一个优化原生弹窗api",
+                    "platforms" : "Android,iOS",
+                    "url" : "https://ext.dcloud.net.cn/plugin?id=1664",
+                    "android_package_name" : "",
+                    "ios_bundle_id" : "",
+                    "isCloud" : true,
+                    "bought" : 0,
+                    "pid" : "1664",
+                    "parameters" : {}
+                }
             }
         }
     },

+ 31 - 4
pages.json

@@ -136,7 +136,17 @@
 			"path": "pages/carSource/driverSee",
 			"style": {
 				"navigationBarTitleText": "司机详情",
-				"enablePullDownRefresh": false
+				"enablePullDownRefresh": false,
+				"app-plus": {
+					"titleNView": {
+						"buttons": [{
+							"type": "menu"
+							// "text": "\f0112",
+							// "fontSrc": "/static/gengduo/iconfont.ttf",
+							// "fontSize": "20"
+						}]
+					}
+				}
 			}
 
 		}, {
@@ -286,6 +296,14 @@
 				"enablePullDownRefresh": false
 			}
 
+		},
+		{
+			"path": "pages/mine/myAccount/billView",
+			"style": {
+				"navigationBarTitleText": "提现详情",
+				"enablePullDownRefresh": false
+			}
+		
 		},
 		{
 			"path": "pages/mine/myAccount/withdrawal",
@@ -578,7 +596,7 @@
 			"style": {
 				"navigationBarTitleText": "评价",
 				"enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "white"
+				"navigationBarBackgroundColor": "#fff"
 			}
 
 		}, {
@@ -588,11 +606,20 @@
 			}
 
 		}
-	],
+	    ,{
+            "path" : "pages/mine/settings/fankui",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "意见反馈",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",
-		"navigationBarBackgroundColor": "white",
+		"navigationBarBackgroundColor": "#fff",
 		"backgroundColor": "#F8F8F8"
 	},
 	"condition": { //模式配置,仅开发期间生效

+ 37 - 11
pages/carSource/driverSee.vue

@@ -10,8 +10,9 @@
 				</view>
 
 				<view class="right flex s-row align-center phone">
-					<view class="bgc flex flex-space-between">
-						<u-icon class="phone" name="phone-fill" color="#2772FB" size="20" @click="toPhone"></u-icon>
+					<view @click="toPhone" class="bgc flex flex-space-between flex-center">
+						<image class='phone-icon' src="@/static/images/carSource/dianhua.png" mode="" ></image>
+						<!-- <u-icon class="phone" name="phone-fill" color="#2772FB" size="20" @click="toPhone"></u-icon> -->
 						<view class="hz-name">联系司机</view>
 					</view>
 				</view>
@@ -28,7 +29,7 @@
 			</view>
 			<view v-if='total>=20' class="flex item">
 				<view class="pf-name">好评率</view>
-				<view class="pf-number">{{driverList.favorableRate?driverList.favorableRate:0}}</view>
+				<view class="pf-number">{{driverList.favorableRate?driverList.favorableRate:0}}%</view>
 			</view>
 		</view>
 		<view class="row3 flex">
@@ -59,8 +60,8 @@
 						<view class="gray fontsize-24">累计发运{{total}}次</view>
 					</view>
 				</view>
-				<view class="right">
-					<view>98%</view>
+				<view v-if='total>=20' class="right">
+					<view>{{driverList.favorableRate?driverList.favorableRate:0}}</view>
 					<view class="gray fontsize-24">好评率</view>
 				</view>
 			</view>
@@ -96,7 +97,7 @@
 									{{item.driverContent}}
 								</view>
 								<view>
-									<u--image v-for="(item,index) in item.imgList" :src="item" width='170rpx'
+									<u--image v-for="item in item.imgList" :src="item" width='170rpx'
 										height='170rpx' class="img-style">
 									</u--image>
 								</view>
@@ -109,10 +110,12 @@
 		<view class="row5">
 			<view class='carMessage' v-if="tabIndex==1&&index==1">
 				<view class='carMessage-item' v-for='(item,index) in hyDriverCarInfoList' :style="{'border-radius':(index!=hyDriverCarInfoList.length-1?'#ccc':'transparent')}">
-					<view v-if='item.carCategory=="挂车"'>{{item.guaCarNumber}}</view>
+					<!-- <view v-if='item.carCategory=="挂车"'>{{item.guaCarNumber}}</view>
 					<view v-else>{{item.carNumber}}</view>
 					<view v-if='item.carCategory=="挂车"' class="flex align-center">{{item.carType}} | 车长{{item.guaCarLong}}米 | 载重{{item.guaCarApprovedWeight}}吨</view>
-					<view v-else class="flex align-center">{{item.carType}} | 车长{{item.carLong}}米 | 载重{{item.carApprovedWeight}}吨</view>
+					<view v-else class="flex align-center">{{item.carType}} | 车长{{item.carLong}}米 | 载重{{item.carApprovedWeight}}吨</view> -->
+					<view>{{item.carNumber}}</view>
+					<view class="flex align-center">{{item.carType}} | 车长{{item.carLong}}米 | 载重{{item.carApprovedWeight}}吨</view>
 				</view>
 				
 			</view>
@@ -161,6 +164,7 @@
 				list3:[],
 				list4:[],
 				ping:[],
+				commonId:'',
 				hyDriverCarInfoList:[],
 				driverList:{},
 				total:0
@@ -171,6 +175,8 @@
 			this.show = true
 		},
 		onLoad(options) {
+			this.commonId=options.commonId
+			console.log(options )
 			// this.dataObj =JSON.parse(options.driver) 
 			// console.log(this.dataObj)
 			that = this
@@ -178,12 +184,25 @@
 		},
 		onShow(){
 			var that=this
-			
+			// this.upCallback({num:1,size:10})
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
 		},
 		methods: {
+			confirmBtn(e) {
+				console.log(this.driverList)
+				if (e.value == '投诉') {
+					uni.$u.route('/pages/order/fk', {
+						val: JSON.stringify(this.driverList)
+					});
+				} else {
+					uni.$u.route('/pages/order/jb', {
+						val: JSON.stringify(this.driverList)
+					});
+				}
+				this.show = false
+			},
 			toPhone(){
 				console.log(this.driverList.driverPhone)
 				var that=this
@@ -229,7 +248,7 @@
 			upCallback(page) {
 				var that =this
 				that.$request.baseRequest('get', '/driverInfo/getDriver', {
-						commonId:'2939c4c23ca14e4ab6f16d7a6b3f8d5e'
+						commonId:this.commonId
 					}).then(res => {
 						console.log(res.data)
 						that.driverList=res.data
@@ -241,8 +260,10 @@
 								res.data.hyDriverCarInfoList[i].guaCarLong=res.data.hyDriverCarInfoList[i].guaCarLong/1000
 								res.data.hyDriverCarInfoList[i].carNumber = res.data.hyDriverCarInfoList[i].carNumber.replace(res.data.hyDriverCarInfoList[i].carNumber.substring(2, 6),
 									"****")
-								res.data.hyDriverCarInfoList[i].guaCarNumber = res.data.hyDriverCarInfoList[i].guaCarNumber.replace(res.data.hyDriverCarInfoList[i].guaCarNumber.substring(2, 6),
+									if(res.data.hyDriverCarInfoList[i].guaCarNumber){
+										res.data.hyDriverCarInfoList[i].guaCarNumber = res.data.hyDriverCarInfoList[i].guaCarNumber.replace(res.data.hyDriverCarInfoList[i].guaCarNumber.substring(2, 6),
 								"****")
+									}
 							}
 							that.hyDriverCarInfoList=res.data.hyDriverCarInfoList
 						}
@@ -483,4 +504,9 @@
 	.pf {
 		margin-bottom: 20rpx;
 	}
+	.phone-icon{
+		width:12px;
+		height:12px;
+		margin-right:3px;
+	}
 </style>

+ 41 - 52
pages/carSource/index.vue

@@ -15,8 +15,11 @@
 					{{title1 ? title1 : "请选择地址"}}
 				</view>
 				<itmister-address-picker ref="addressElone" @confirmChange="confirmChangeOne"></itmister-address-picker>
-				<u--image :showLoading="true" class="exchange" src="../../static/images/carSource/exchange.png"
+				<view class="" style="width: 20%;">
+					<u--image :showLoading="true" class="exchange" src="../../static/images/carSource/exchange.png"
 					width="43px" height="43px" @click="replace"></u--image>
+				</view>
+				
 				<view @click="selectAddress(2)" class="screen_item">
 					<view class="screen_sign sign2">卸</view>
 					{{title2 ? title2 : "请选择地址"}}
@@ -47,13 +50,13 @@
 									@confirm="invitationCheng">
 								</u-picker>
 							</view>
-							<view class="address" v-for="(items,index) in item.startAdress">
+							<view class="address" v-for="(items,index1) in item.startAdress">
 								<span class="spots spot1"></span>
-								{{item.startAdress[index]}}
+								{{item.startAdress[index1]}}
 								<!-- {{item.sendCity ? item.sendCity: item.sendProvince }}{{item.sendArea}} -->
 								<image class="jt-icon" src="@/static/images/goodSource/jt.png" mode='widthFix'></image>
 								<span class="spots spot2"></span>
-								{{item.endAdress[index]}}
+								{{item.endAdress[index1]}}
 								<!-- {{item.unloadCity ? item.unloadCity: item.unloadProvince }}{{item.unloadArea}} -->
 							</view>
 						</view>
@@ -208,7 +211,7 @@
 				this.city = '北京'
 			}
 			this.commonId = uni.getStorageSync("firstAuthentication").commonId
-			// this.checking()
+			this.checking()
 			this.getList()
 		},
 		onLoad() {},
@@ -221,46 +224,11 @@
 			},
 			checking() {
 				this.statusVal = uni.getStorageSync("firstAuthentication").authenticationStatus
-				// if (uni.getStorageSync("firstAuthentication")) {
-				// 	if(this.statusVal != "已认证" && this.statusVal != "已过期"){
-				// 		uni.setTabBarItem({
-				// 			  index: 1,
-				// 			  text: '车友',
-				// 			  pagePath: "/pages/riders/checkPage",
-				// 			  iconPath: 'static/images/common/huoyuan@2x(1).png',
-				// 			  selectedIconPath: 'static/images/common/huoyuan@2x.png'
-				// 		})
-				// 		uni.switchTab({
-				// 			url: '/pages/riders/checkPage'
-				// 		});
-				// 	}else{
-				// 		uni.setTabBarItem({
-				// 			  index: 1,
-				// 			  text: '车友',
-				// 			  pagePath: "/pages/riders/index",
-				// 			  iconPath: 'static/images/common/huoyuan@2x(1).png',
-				// 			  selectedIconPath: 'static/images/common/huoyuan@2x.png'
-				// 		})
-				// 		uni.switchTab({
-				// 			url: '/pages/riders/index'
-				// 		});
-				// 	}
-				// } else if(!uni.getStorageSync("firstAuthentication")&&!uni.getStorageSync("userInfo")) { //判断有没有登录
-				// 	this.tipsShow = true
-				// 	this.tipsText = "您尚未登录,请前去登录!"
-				// 	this.btnTips = "去登录"
-				// }else if (!uni.getStorageSync("firstAuthentication")){ //注册登录后并没有认证司机
-				// 	uni.setTabBarItem({
-				// 		  index: 1,
-				// 		  text: '车友',
-				// 		  pagePath: "/pages/riders/checkPage",
-				// 		  iconPath: 'static/images/common/huoyuan@2x(1).png',
-				// 		  selectedIconPath: 'static/images/common/huoyuan@2x.png'
-				// 	})
-				// 	uni.switchTab({
-				// 		url: '/pages/riders/checkPage'
-				// 	});
-				// }
+				if(!uni.getStorageSync("firstAuthentication")&&!uni.getStorageSync("userInfo")) { //判断有没有登录
+					this.tipsShow = true
+					this.tipsText = "您尚未登录,请前去登录!"
+					this.btnTips = "去登录"
+				}
 			},
 			fleetClose() {
 				this.fleetShow = false
@@ -342,14 +310,24 @@
 					return
 				}
 				this.sendInfo.sendProvince = address.province ? address.province : ''
-				this.sendInfo.sendCity = address.city ? address.city : ''
+				if(address.city=='北京'||address.city=='天津'||address.city=='上海'||address.city=='重庆'||address.city=='台湾'){
+					this.sendInfo.sendCity = ''
+				}else{
+					this.sendInfo.sendCity = address.city ? address.city : ''
+				}
+				// this.sendInfo.sendCity = address.city ? address.city : ''
 				this.sendInfo.sendArea = address.area ? address.area : ''
 				if (address.city == '全省') {
 					this.title1 = address.province
 					this.sendInfo.sendCity = ""
 					this.sendInfo.sendArea = ""
 				} else if (address.area == '全市') {
-					this.title1 = address.province + address.city
+					if(address.city=='北京'||address.city=='天津'||address.city=='上海'||address.city=='重庆'||address.city=='台湾'){
+						this.title1 = address.province 
+					}else{
+						this.title1 = address.province + address.city
+					}
+					
 					this.sendInfo.sendArea = ""
 				} else {
 					this.title1 = address.province + address.city + address.area;
@@ -359,14 +337,24 @@
 			},
 			confirmChangeTwo(address) {
 				this.unloadInfo.unloadProvince = address.province ? address.province : ''
-				this.unloadInfo.unloadCity = address.city ? address.city : ''
+				if(address.city=='北京'||address.city=='天津'||address.city=='上海'||address.city=='重庆'||address.city=='台湾'){
+					this.sendInfo.unloadCity = ''
+				}else{
+					this.sendInfo.unloadCity = address.city ? address.city : ''
+				}
+				// this.unloadInfo.unloadCity = address.city ? address.city : ''
 				this.unloadInfo.unloadArea = address.area ? address.area : ''
 				if (address.city == '全省') {
 					this.title2 = address.province
 					this.unloadInfo.unloadCity = ""
 					this.unloadInfo.unloadArea = ""
 				} else if (address.area == '全市') {
-					this.title2 = address.province + address.city
+					if(address.city=='北京'||address.city=='天津'||address.city=='上海'||address.city=='重庆'||address.city=='台湾'){
+						this.title2 = address.province 
+					}else{
+						this.title2 = address.province + address.city
+					}
+					// this.title2 = address.province + address.city
 					this.unloadInfo.unloadArea = ""
 				} else {
 					if (address.province == '全国') {
@@ -510,7 +498,8 @@
 				this.show = false
 			},
 			replace() {
-				if (this.unloadInfo.unloadProvince == "全国") {
+				// this.unloadInfo.unloadProvince == "全国"
+				if (this.title2 == "全国") {
 					uni.$u.toast("发货地不可以是全国")
 					return
 				}
@@ -663,8 +652,8 @@
 			}
 
 			.exchange {
-				line-height: 200rpx;
-				margin-left: -108rpx;
+				// line-height: 200rpx;
+				margin-top: 72rpx;
 				transform: rotate(90deg);
 			}
 		}

+ 16 - 2
pages/mine/agentCargoOwner.vue

@@ -70,7 +70,7 @@
 		methods: {
 			previewImage(good) {
 				uni.previewImage({
-					urls: [good.certificateAddressUrl],
+					urls: good.certificateAddressUrlArray,
 					longPressActions: {
 						// itemList: ['发送给朋友', '保存图片', '收藏'],
 						success: function(data) {
@@ -165,7 +165,21 @@
 						pageSize: page.size,
 						currentPage: page.num,
 					}).then(res => {
-
+						var obj={}
+						for (var i = 0; i < res.data.records.length; i++) {
+							// obj[i]=[]
+							// console.log(obj[i])
+							res.data.records[i].certificateAddressUrlArray=[]
+							if(res.data.records[i].certificateAddressUrl){
+								var data=res.data.records[i].certificateAddressUrl.split(',')
+								for (var q = 0; q < data.length; q++) {
+									if(data[q]!=''){
+										res.data.records[i].certificateAddressUrlArray.push(data[q])
+									}
+								}
+								// res.data.records[i].certificateAddressUrlArray=obj[i]
+							}
+						}
 						this.mescroll.endBySize(res.data.records.length, res.data.total);
 						if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
 						this.goods = this.goods.concat(res.data.records); //追加新数据

+ 148 - 11
pages/mine/cargoowner/addEnerprise.vue

@@ -24,7 +24,11 @@
 			</view>
 		</view>
 		<view class='content1'>
-			<view class="title">上传企业授权书</view>
+			<view class="flex">
+				<view class="title">上传企业授权书</view>
+				<view class="title title_css" @click="formWork">授权书模板</view>
+			</view>
+
 			<!-- {{show}} -->
 			<!-- 			<button type="default" @click="()=>{show = true}" style="width: 80%;background-color: #007AFF;color: #fff;margin-top: 60rpx;">选择文件</button>
 				<view class="textStyle" v-for="(item,index) in pathArr" :key="index">
@@ -39,8 +43,8 @@
 					</view>
 				</view>
 				<nk-select-file v-model="show" @confirm="getPath"></nk-select-file> -->
-			<u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event)" @delete="deletePic"
-				name="1" multiple :maxCount="9"></u-upload>
+			<u-upload class="uview-upload" :fileList="fileList1" @beforeRead='beforeRead($event)'
+				@afterRead="afterRead($event)" @delete="deletePic" name="1" multiple :maxCount="9"></u-upload>
 			<!-- 		<view style='position:relative;'>
 				<view v-if='!dataDetails.certificateAddressUrl' @click="uploadImg(1)" class="picture picture7">
 					<image class="xj-image" src="@/static/mine/ic_shanchuan@2x.png"></image>
@@ -78,7 +82,7 @@
 		</u-action-sheet>
 		<view class="content4">
 			<view style='margin:0 0 18px;font-size:16px;color:#999;' class='flex items-center'>
-				<u--image style='margin-right:5px;margin-top: 12rpx;' @click='consent'
+				<u--image style='margin-right:5px;margin-top: 16rpx;' @click='consent'
 					:src="checked?'../../../static/mine/duihao@2x.png':'../../../static/mine/wxz.png'" width="12px"
 					height="12px"></u--image>
 				我已阅读并同意全部细则
@@ -89,6 +93,8 @@
 				提交
 			</view>
 		</view>
+		<u-picker :show="formWorkShow" @cancel="formWorkShow = false" @close="formWorkShow = false"
+			:columns="formWorkColumns" @confirm="formWorkSubmit"></u-picker>
 	</view>
 </template>
 
@@ -97,6 +103,7 @@
 		mapState
 	} from 'vuex';
 	import upload from '@/components/upload.vue';
+	import permision from "@/js_sdk/wa-permission/permission.js"
 	import uploadImage from '@/components/ossutil/uploadFile.js';
 	export default {
 		components: {},
@@ -119,13 +126,19 @@
 				uploadType: '',
 				index: 0,
 				fileList1: [],
-				urlList:[]
+				urlList: [],
+				formWorkShow: false,
+				formWorkColumns: [
+					["复制下载链接", "预览模板"]
+				]
+
 			}
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		onLoad() {
+			this.get_camera_permission()
 			if (uni.getStorageSync('cargoOwnerId')) {
 				this.dataDetails.cargoOwnerId = uni.getStorageSync('cargoOwnerId')
 			}
@@ -135,6 +148,7 @@
 		onShow() {
 			if (uni.getStorageSync('currectcompany')) {
 				this.dataDetails.company = uni.getStorageSync('currectcompany').companyName
+				this.dataDetails.compId = uni.getStorageSync('currectcompany').id
 				this.dataDetails.advanceFreightService = uni.getStorageSync('currectcompany').advanceFreightService
 				var name = '',
 					legalPersonNamelength = uni.getStorageSync('currectcompany').legalPersonName.length
@@ -149,12 +163,67 @@
 			}
 		},
 		methods: {
+			formWork() {
+				this.formWorkShow = true
+			},
+			formWorkSubmit(e) {
+				let that = this
+				console.log(e.value[0])
+				if (e.value[0] == "复制下载链接") {
+					uni.setClipboardData({
+						data: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/contractPdf/1069f84fcbbe4c2d9ce048bf98ea7a63.pdf',
+						success: function() {
+							uni.showToast({
+								title: '复制成功',
+							});
+							that.formWorkShow = false
+						},
+						fail: function() {
+							uni.showToast({
+								title: '复制失败',
+							});
+						}
+					});
+				} else {
+					uni.downloadFile({
+						url: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/contractPdf/1069f84fcbbe4c2d9ce048bf98ea7a63.pdf',
+						success: function(res) {
+							var filePath = res.tempFilePath;
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+									that.formWorkShow = false
+								}
+							});
+						}
+					});
+				}
+			},
+			async get_camera_permission() {
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
+					uni.showModal({
+						title: '提示',
+						content: '您已经关闭相机权限,去设置',
+						success: function(res) {
+							if (res.confirm) {
+								permision.gotoAppPermissionSetting()
+								// plus.runtime.openURL("app-settings:");
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+				}
+			},
 			getPath(event) {
 				console.log(event);
 				this.pathArr = event;
 			},
 			uploadFilePromise(file, url) {
-				uploadImage('image',url, 'appData/',
+				uploadImage('image', url, 'appData/',
 					result => {
 						// 上传成功回调函数
 						this.urlList.push(result)
@@ -163,7 +232,7 @@
 			},
 			// 删除图片
 			deletePic(event) {
-				this.urlList=this.urlList.splice(event.index,1)
+				this.urlList = this.urlList.splice(event.index, 1)
 				this[`fileList${event.name}`].splice(event.index, 1)
 			},
 			// 新增图片
@@ -190,6 +259,23 @@
 					fileListLen++
 				}
 			},
+			async beforeRead(event) {
+				console.log(1221212, event)
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
+					uni.showModal({
+						title: '提示',
+						content: '您已经关闭相机权限,去设置',
+						success: function(res) {
+							if (res.confirm) {
+								plus.runtime.openURL("app-settings:");
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+				}
+			},
 			consent() {
 				this.checked = !this.checked
 			},
@@ -204,6 +290,47 @@
 				if (e.value[0] == '长期') {
 					this.dataDetails.authorizationDeadline = e.value[0]
 				} 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()
+					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.authorizationDeadline = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
 				}
 
@@ -272,7 +399,7 @@
 				// 	})
 				// 	return true
 				// }
-				if(this.urlList.length == 0){
+				if (this.urlList.length == 0) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "企业授权书不能为空!",
@@ -296,7 +423,7 @@
 				}
 			},
 			submit() {
-				if(this.validate()){
+				if (this.validate()) {
 					return
 				}
 				uni.showLoading({
@@ -314,7 +441,9 @@
 							uni.removeStorageSync('cargoOwnerId')
 							uni.removeStorageSync('currectcompany')
 							uni.$u.toast('提交成功')
-							_this.goDetailPage('/pages/mine/cargoowner/cargoowner')
+							uni.navigateBack({
+								delta: 1
+							})
 						})
 					.catch(res => {
 						uni.hideLoading()
@@ -410,9 +539,17 @@
 		}
 
 		.title {
+			width: 50%;
 			color: #999999;
 			margin: 20rpx 0;
 		}
+
+		.title_css {
+			text-align: right;
+			color: #2772FB;
+			margin: 20rpx 0;
+			font-size: 30rpx;
+		}
 	}
 
 	.u-input {
@@ -448,6 +585,6 @@
 			margin-top: 10px;
 		}
 
-	
+
 	}
 </style>

+ 18 - 15
pages/mine/cargoowner/cargoowner.vue

@@ -27,11 +27,11 @@
 							:src="personage.authenticationStatus=='已认证'?'../../../static/mine/huozhurenzheng/shenfen2.png':'../../../static/mine/huozhurenzheng/shenfen.png'"
 							width="32px" height="32px"></u--image>
 						<view style='width:100%;'>
-							<view v-if='!datastatus' style='font-size:21px;'>身份信息</view>
+							<view v-if='!personage' style='font-size:21px;'>身份信息</view>
 							<view v-else style='font-size:21px;'>{{personage.name}}</view>
 							<view v-if="personage.authenticationStatus!='已认证'" class='flex flex-space-between'
-								style='width:100%;color:#999999;font-size:14px;'>您的身份信息{{personage.authenticationStatus?personage.authenticationStatus:'未认证'}}状态
-								<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+								style='width:100%;color:#999999;font-size:14px;'>您的身份信息{{personage.authenticationStatus?personage.authenticationStatus:'未认证'}}
+								<u-icon name="arrow-right" color="#7E7E7E" size="10" v-if="datastatus"></u-icon>
 							</view>
 							<view v-else class='flex flex-space-between' style='width:100%;color:#999999;font-size:14px;'>
 								{{starUserphone}}
@@ -41,7 +41,9 @@
 					</view>
 				</view>
 		<view>
-			<view class="content2-title">所属企业 <text style='color:#999;'>({{enterprise.length}})</text></view>
+			<view class="content2-title">所属企业 
+			<!-- <text style='color:#999;'>({{enterprise.length}})</text> -->
+			</view>
 			<view v-if='enterprise.length>0'>
 				<view v-for='item in enterprise' class='wrap'>
 					<view class='flex flex-space-between'>
@@ -61,7 +63,8 @@
 					</view>
 					<view class="row3">
 						<view class="right">
-							<image @click='edit(item)' 							v-if='item.status!="平台审核中"&&item.status!="企业审核中"&&item.status!="企业暂不可用"&&item.status!="企业不存在"&&item.status!="授权已撤销"'
+							<!-- v-if='item.status!="平台审核中"&&item.status!="企业审核中"&&item.status!="企业暂不可用"&&item.status!="企业不存在"&&item.status!="授权已撤销"' -->
+							<image v-if='item.status!="企业审核中"&&item.status!="平台审核中"' @click='edit(item)'
 								style='width:17px;height:17px;margin:0 10px;' src="@/static/mine/company/edit.png">
 							</image>
 							<image @click='del(item)' style='width:17px;height:17px;margin:0 10px;'
@@ -81,7 +84,6 @@
 				<view @click='goDetailPage("/pages/mine/cargoowner/editpersonalinformation")' class='newlyIncreased' v-if="!datastatus">去认证</view>
 			</view>
 		</view>
-		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
@@ -125,12 +127,12 @@
 			toEditPage(){
 				if(this.personage&&this.personage.authenticationStatus=='已认证'){
 					uni.$u.route("/pages/mine/cargoowner/editpersonalinformation",this.personage);
-				}else if(this.personage&&this.personage.authenticationStatus == "审核中"){
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "身份审核中,请耐心等待!",
+				}else if(this.personage&&this.personage.authenticationStatus=='审核中'){
+					uni.showToast({
+						title: '信息审核中',
+						icon: 'none',
+						duration: 2000
 					})
-					return 
 				}else{
 					uni.$u.route("/pages/mine/cargoowner/editpersonalinformation",this.personage);
 				}
@@ -230,7 +232,8 @@
 
 <style lang="scss" scoped>
 	.content {
-		padding-bottom: 460rpx;
+		height:100vh;
+		padding-bottom: 320rpx;
 	}
 
 	.identity {
@@ -263,7 +266,7 @@
 		width: 100%;
 		bottom: 0;
 		left: 0;
-		padding: 15px 15px 30px;
+		padding: 15px 15px 40px;
 		box-sizing: border-box;
 	}
 
@@ -271,8 +274,8 @@
 		width: 100%;
 		margin: 0 auto;
 		text-align: center;
-		height: 46px;
-		line-height: 46px;
+		height: 48px;
+		line-height: 48px;
 		color: #fff;
 		background: url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
 		background-size: 100%;

+ 264 - 100
pages/mine/cargoowner/editEnerprise.vue

@@ -4,23 +4,32 @@
 			<view style='border-bottom:1px solid #eee;padding:10px 0 10px;' class="flex flex-space-between row">
 				<view class="left-text">企业</view>
 				<view style='font-size:16px;width:50%;' class='flex flex-space-between'>
-					<view :style="{'color':dataDetails.company ? '#000':'#C6CBD5'}">{{dataDetails.company?dataDetails.company:'选择所属企业'}}</view>
-					<view><u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon></view>
+					<view :style="{'color':dataDetails.company ? '#000':'#C6CBD5'}">
+						{{dataDetails.company?dataDetails.company:'选择所属企业'}}
+					</view>
+					<view>
+						<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+					</view>
 				</view>
-				
+
 			</view>
 			<view style='padding:10px 0 10px;' class="flex flex-space-between items-center width100">
 				<view style='width:100px;font-size:14px;'>法定代表人姓名</view>
 				<view class="flex">
-					<u--input disabledColor='#fff' disabled placeholder="自动获取" inputAlign='left' border="none" v-model="dataDetails.legalPersonName">
+					<u--input disabledColor='#fff' disabled placeholder="自动获取" inputAlign='left' border="none"
+						v-model="dataDetails.legalPersonName1">
 					</u--input>
 				</view>
 			</view>
 		</view>
 		<view class='content1'>
-			<view class="title">上传企业授权书</view>
+			<!-- <view class="title">上传企业授权书</view> -->
+			<view class="flex">
+				<view class="title">上传企业授权书</view>
+				<view class="title title_css" @click="formWork">授权书模板</view>
+			</view>
 			<!-- {{show}} -->
-<!-- 			<button type="default" @click="()=>{show = true}" style="width: 80%;background-color: #007AFF;color: #fff;margin-top: 60rpx;">选择文件</button>
+			<!-- 			<button type="default" @click="()=>{show = true}" style="width: 80%;background-color: #007AFF;color: #fff;margin-top: 60rpx;">选择文件</button>
 				<view class="textStyle" v-for="(item,index) in pathArr" :key="index">
 					<view>
 						文件名:{{item.name}}
@@ -35,7 +44,7 @@
 				<nk-select-file v-model="show" @confirm="getPath"></nk-select-file> -->
 			<u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event)" @delete="deletePic"
 				name="1" multiple :maxCount="9"></u-upload>
-	<!-- 		<view style='position:relative;'>
+			<!-- 		<view style='position:relative;'>
 				<view v-if='!dataDetails.certificateAddressUrl' @click="uploadImg(1)" class="picture picture7">
 					<image class="xj-image" src="@/static/mine/ic_shanchuan@2x.png"></image>
 					<view class="text">上传企业授权书</view>
@@ -50,32 +59,42 @@
 			</view>
 			</view> -->
 			<view class="flex row noborder">
-				<view class="left-text">授权截止日期</view>
-				<view style='font-size:16px;width:50%;' class='flex flex-space-between'  @click="selectdate">
-					<view :style="{'color':dataDetails.authorizationDeadline ? '#000':'#C6CBD5'}">{{dataDetails.authorizationDeadline?dataDetails.authorizationDeadline:'选择期限截止日期'}}</view>
-					<view><u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon></view>
+				<view stlye='width:100px;' class="left-text">授权截止日期</view>
+				<view style='font-size:16px;width:50%;' class='flex flex-space-between' @click="selectdate">
+					<view style='padding-left:20px;'
+						:style="{'color':dataDetails.authorizationDeadline ? '#000':'#C6CBD5'}">
+						{{dataDetails.authorizationDeadline?dataDetails.authorizationDeadline:'选择期限截止日期'}}
+					</view>
+					<view>
+						<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+					</view>
 				</view>
 			</view>
-			<u-picker :show="isdate" ref="uPicker" :columns="validityPeriod"
-				@confirm="confirmValidityPeriod" @change="changeHandler"  @cancel="isdate=false">
+			<u-picker :show="isdate" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+				@change="changeHandler" @cancel="isdate=false">
 			</u-picker>
-			
+
 		</view>
 		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
-			@select="imgTypeSelect" @cancel='isShowimgType=false' :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
+			@select="imgTypeSelect" @cancel='isShowimgType=false' :closeOnClickOverlay="true" :closeOnClickAction="true"
+			@close="isShowimgType=false">
 		</u-action-sheet>
 		<view class="content4">
-			<view style='margin:0 0 18px;font-size:12px;color:#999;' class='flex items-center'>
+			<view style='margin:0 0 18px;font-size:12px;color:#999;align-items:center' class='flex'>
 				<u--image style='margin-right:5px;' @click='consent'
-					:src="checked?'../../../static/mine/duihao@2x.png':'../../../static/mine/wxz.png'"
-					width="12px" height="12px"></u--image>
-					我已阅读并同意全部细则
+					:src="checked?'../../../static/mine/duihao@2x.png':'../../../static/mine/wxz.png'" width="12px"
+					height="12px"></u--image>
+				我已阅读并同意全部细则
 			</view>
 			<view class='line'></view>
-			<view :class="{'active':dataDetails.certificateAddressUrl&&dataDetails.company&&dataDetails.legalPersonName&&dataDetails.authorizationDeadline}" class="next-btn" @click="submit()">
+			<view
+				:class="{'active':dataDetails.certificateAddressUrl&&dataDetails.company&&dataDetails.legalPersonName&&dataDetails.authorizationDeadline}"
+				class="next-btn" @click="submit()">
 				提交
 			</view>
 		</view>
+		<u-picker :show="formWorkShow" @cancel="formWorkShow = false" @close="formWorkShow = false"
+			:columns="formWorkColumns" @confirm="formWorkSubmit"></u-picker>
 	</view>
 </template>
 
@@ -84,57 +103,131 @@
 		mapState
 	} from 'vuex';
 	import upload from '@/components/upload.vue';
+	import permision from "@/js_sdk/wa-permission/permission.js"
 	import uploadImage from '@/components/ossutil/uploadFile.js';
 	export default {
-		components: {
-		},
+		components: {},
 		data() {
 			return {
-				show:false,
+				show: false,
 				pathArr: [],
-				dataDetails:{},
-				companuList:[],
-				isshow:false,
-				isdate:false,
-				checked:false,
-				validityPeriod:[],
-				isShowimgType:false,
-				uploadType:'',
-				index:0,
+				dataDetails: {},
+				companuList: [],
+				isshow: false,
+				isdate: false,
+				checked: false,
+				validityPeriod: [],
+				isShowimgType: false,
+				uploadType: '',
+				index: 0,
 				fileList1: [],
-				urlList:[]
+				urlList:[],
+				formWorkShow: false,
+				formWorkColumns: [
+					["复制下载链接", "预览模板"]
+				]
 			}
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
-		onLoad(options){
-			if(uni.getStorageSync('cargoOwnerId')){
-				this.dataDetails.cargoOwnerId=uni.getStorageSync('cargoOwnerId')
+		onLoad(options) {
+			this.get_camera_permission()
+			if (uni.getStorageSync('cargoOwnerId')) {
+				this.dataDetails.cargoOwnerId = uni.getStorageSync('cargoOwnerId')
 			}
-			this.validityPeriod = this.$helper.makeValidityPeriod(0,'长期')
+			this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
 			// this.getList()
-			
+
 			this.dataDetails = options
-			if(options.certificateAddressUrl){
+			if (this.dataDetails.legalPersonName.length == 2) {
+				this.dataDetails.legalPersonName1 = this.dataDetails.legalPersonName.toString().replace(
+					/^([^\x00-\xff])([^\x00-\xff]{0,})([^\x00-\xff])/g, '$1*')
+			} else if (this.dataDetails.legalPersonName.length == 3) {
+				this.dataDetails.legalPersonName1 = this.dataDetails.legalPersonName.toString().replace(
+					/^([^\x00-\xff])([^\x00-\xff]{0,})([^\x00-\xff])/g, '$1*$3')
+			} else if (this.dataDetails.legalPersonName.length == 4) {
+				this.dataDetails.legalPersonName1 = this.dataDetails.legalPersonName.toString().replace(
+					/^([^\x00-\xff])([^\x00-\xff]{0,2})([^\x00-\xff])/g, '$1**$3')
+			}
+
+			console.log(this.dataDetails)
+			if (options.certificateAddressUrl) {
 				var arr = options.certificateAddressUrl.split(',')
 				this.urlList = options.certificateAddressUrl.split(',')
-				this.fileList1=[]
-				for(var i=0;i<arr.length;i++){
-					if(arr[i]!=''){
-						this.fileList1.push({url:arr[i]})
+				this.fileList1 = []
+				for (var i = 0; i < arr.length; i++) {
+					if (arr[i] != '') {
+						this.fileList1.push({
+							url: arr[i]
+						})
 					}
 				}
 			}
-			
-			
+
+
 		},
 		onShow() {
-		
+
 		},
 		methods: {
-			uploadFilePromise(file,url) {
-				uploadImage('image',url, 'appData/',
+			formWork() {
+				this.formWorkShow = true
+			},
+			formWorkSubmit(e) {
+				let that = this
+				console.log(e.value[0])
+				if (e.value[0] == "复制下载链接") {
+					uni.setClipboardData({
+						data: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/contractPdf/1069f84fcbbe4c2d9ce048bf98ea7a63.pdf',
+						success: function() {
+							uni.showToast({
+								title: '复制成功',
+							});
+							that.formWorkShow = false
+						},
+						fail: function() {
+							uni.showToast({
+								title: '复制失败',
+							});
+						}
+					});
+				} else {
+					uni.downloadFile({
+						url: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/contractPdf/1069f84fcbbe4c2d9ce048bf98ea7a63.pdf',
+						success: function(res) {
+							var filePath = res.tempFilePath;
+							uni.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								success: function(res) {
+									console.log('打开文档成功');
+									that.formWorkShow = false
+								}
+							});
+						}
+					});
+				}
+			},
+			async get_camera_permission() {
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
+					uni.showModal({
+						title: '提示',
+						content: '您已经关闭相机权限,去设置',
+						success: function(res) {
+							if (res.confirm) {
+								permision.gotoAppPermissionSetting()
+								// plus.runtime.openURL("app-settings:");
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+				}
+			},
+			uploadFilePromise(file, url) {
+				uploadImage('image', url, 'appData/',
 					result => {
 						// 上传成功回调函数
 						console.log('图片地址', result)
@@ -146,7 +239,7 @@
 			},
 			// 删除图片
 			deletePic(event) {
-				this.urlList=this.urlList.splice(event.index,1)
+				this.urlList = this.urlList.splice(event.index, 1)
 				this[`fileList${event.name}`].splice(event.index, 1)
 			},
 			// 新增图片
@@ -163,7 +256,7 @@
 					})
 				})
 				for (let i = 0; i < lists.length; i++) {
-					const result = await this.uploadFilePromise(lists[i],lists[i].url)
+					const result = await this.uploadFilePromise(lists[i], lists[i].url)
 					// console.log(result)
 					let item = this[`fileList${event.name}`][fileListLen]
 					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
@@ -174,13 +267,13 @@
 					fileListLen++
 				}
 			},
-			consent(){
-				this.checked=!this.checked
+			consent() {
+				this.checked = !this.checked
 			},
-			selectdate(){
-				this.isdate=true
+			selectdate() {
+				this.isdate = true
 			},
-			selectshow(){
+			selectshow() {
 				this.goDetailPage('/pages/mine/cargoowner/selectcompany')
 			},
 			confirmValidityPeriod(e) {
@@ -188,13 +281,57 @@
 				if (e.value[0] == '长期') {
 					this.dataDetails.authorizationDeadline = e.value[0]
 				} 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()
+					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.authorizationDeadline = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
 				}
-			
+
 				this.isdate = false
 			},
 			goDetailPage(src) {
-				uni.setStorage({key: 'companydata',data: JSON.stringify(this.dataDetails)});
+				uni.setStorage({
+					key: 'companydata',
+					data: JSON.stringify(this.dataDetails)
+				});
 				uni.$u.route(src);
 			},
 			changeHandler(e) {
@@ -205,13 +342,13 @@
 					index,
 					picker = this.$refs.uPicker
 				} = e
-			
+
 				// if (columnIndex === 0) {
 				// 	
 				// 	if (e.index != 0) {
 				// 		picker.setColumnValues(1, this.validityPeriod[1].shift())
 				// 	}
-			
+
 				// } else if (columnIndex === 1) {
 				// 	if (e.index != 0) {
 				// 		picker.setColumnValues(2, this.validityPeriod[2].shift())
@@ -237,7 +374,7 @@
 			// 		})
 			// 	});
 			// },
-			submit(){
+			submit() {
 				if (!this.checked) {
 					uni.showToast({
 						title: '请勾选协议',
@@ -248,17 +385,19 @@
 				}
 				uni.showLoading({
 					title: '加载中',
-					mask:true
+					mask: true
 				})
-				var _this=this
-				this.dataDetails.commonId=this.userInfo.id
+				var _this = this
+				this.dataDetails.commonId = this.userInfo.id
 				this.dataDetails.certificateAddressUrl = this.urlList.toString()
 				this.$request.baseRequest('post', '/cargoOwnerCompInfo/api/editCargoOwnerComp', _this.dataDetails).then(res => {
 					uni.hideLoading()
 					uni.removeStorage('cargoOwnerId')
 					uni.removeStorage('currectcompany')
 					uni.$u.toast('提交成功')
-					_this.goDetailPage('/pages/mine/cargoowner/cargoowner')
+					uni.navigateBack({
+						delta: 1
+					})
 				})
 				.catch(res => {
 					uni.hideLoading()
@@ -274,24 +413,32 @@
 </script>
 
 <style lang='scss' scoped>
-	page{
+	page {
 		background: #F5F6FA;
+
 	}
-	.content{
+
+	.content {
+		height: 100vh;
 		/* background: white; */
 		/* padding:20rpx */
 	}
-	.wrap{
+
+	.wrap {
 		margin: 20rpx;
 		padding: 20rpx;
 		border-radius: 20rpx;
 		background: white;
 	}
+
 	.preview-card-img {
-		/deep/uni-image>div, uni-image>img {
-		    transform: scale(1.5) rotate(-90deg);
+
+		/deep/uni-image>div,
+		uni-image>img {
+			transform: scale(1.5) rotate(-90deg);
 		}
 	}
+
 	.picture {
 		margin-top: 20rpx;
 		background: #F5F6FA;
@@ -304,27 +451,29 @@
 		align-items: center;
 		color: #6A7282;
 	}
+
 	.content1 {
-		background:#fff;
-		padding:40rpx 20rpx 20rpx;
-		margin:20rpx 0rpx 200rpx;
+		background: #fff;
+		padding: 40rpx 20rpx 20rpx;
+		margin: 20rpx 0rpx 200rpx;
 		border-radius: 10rpx;
+
 		.row {
 			border-bottom: 1px solid #EEEEEE;
 			padding-bottom: 28rpx;
 			margin-top: 26rpx;
-	
+
 		}
-	
+
 		.left-text {
 			// background: red;
 			width: 320rpx;
 			color: #333333;
 			display: flex;
 			align-items: center;
-			font-size:14px;
+			font-size: 14px;
 		}
-	
+
 		.picture {
 			position: relative;
 			width: 100%;
@@ -333,58 +482,73 @@
 			justify-content: center;
 			flex-direction: column;
 			align-items: center;
-	
+
 			.text {
 				margin-top: 20rpx;
 			}
 		}
+
 		.picture7 {
 			background: url(../../../static/mine/cy.png);
 			background-size: 100% 100%;
 		}
-	
-	
+
+
 		.xj-image {
 			width: 100rpx;
 			height: 100rpx;
 		}
-	
+
 		.title {
 			color: #999999;
 			margin: 20rpx 0;
+			width: 50%;
+		}
+		.title_css {
+			text-align: right;
+			color: #2772FB;
+			margin: 20rpx 0;
+			font-size: 30rpx;
 		}
 	}
-	.u-input{
-		font-size:16px;
+
+	.u-input {
+		font-size: 16px;
 	}
+
 	.content4 {
-		position:fixed;
-		bottom:0;
+		position: fixed;
+		bottom: 0;
 		background: white;
-		width:100%;
-		text-align:center;
-		left:0;
-		box-sizing: border-box;;
-		padding:10px 15px;
-		.line{
-			position:absolute;
-			left:0;
-			margin-top:-9px;
-			border-top:1px solid #eee;
-			width:100%;
+		width: 100%;
+		text-align: center;
+		left: 0;
+		box-sizing: border-box;
+		;
+		padding: 10px 15px;
+
+		.line {
+			position: absolute;
+			left: 0;
+			margin-top: -9px;
+			border-top: 1px solid #eee;
+			width: 100%;
 		}
+
 		.next-btn {
 			background: #F1F3F6;
 			width: 85%;
 			padding: 20rpx 20rpx;
 			text-align: center;
 			color: #C5CAD4;
-			border-radius: 50rpx;margin:0 auto;
-			margin-top:10px;
+			border-radius: 50rpx;
+			margin: 0 auto;
+			margin-top: 10px;
 		}
-		.next-btn.active{
-			background:#2772FB;
-			color:#fff;
+
+		.next-btn.active {
+			background: #2772FB;
+			color: #fff;
 		}
 	}
 </style>

+ 147 - 44
pages/mine/cargoowner/editpersonalinformation.vue

@@ -30,51 +30,55 @@
 
 				<image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit"></image>
 			</view>
-			<view style='padding:5px 0 10px;border-bottom:1px solid #eee;' class="flex width100">
-				<view style='width:100px;font-size:14px;'>姓名</view>
-				<view class="flex">
-					<u--input @input='nameinput' placeholder="输入姓名" inputAlign='left' border="none"
+			<view style='padding:5px 0 10px;border-bottom:1px solid #eee;' class="flex flex-space-between width100">
+				<view class="left-text" style='font-size:14px;'>姓名</view>
+				<view style='padding-right:10px;' class="flex">
+					<u--input @input='nameinput' placeholder="输入姓名" inputAlign='right' border="none"
 						v-model="dataDetails.name">
 					</u--input>
 				</view>
 			</view>
-			<view class="flex row" style='padding:10px 0 5px;border-bottom:1px solid #eee;'>
-				<view style='width:100px;font-size:14px;'>性别</view>
-				<u-radio-group v-model="dataDetails.sex" placement="row">
-					<u-radio :customStyle="radioCustomStyle" v-for="(item, index) in radiolist1" :key="index"
-						:label="item.name" :name="item.name" @change="radioChange">
-					</u-radio>
-				</u-radio-group>
+			<view class="flex row flex-space-between" style='padding:10px 0 5px;border-bottom:1px solid #eee;'>
+				<view class="left-text" style='font-size:14px;'>性别</view>
+				<view>
+					<u-radio-group v-model="dataDetails.sex" placement="row">
+						<u-radio :customStyle="radioCustomStyle" v-for="(item, index) in radiolist1" :key="index"
+							:label="item.name" :name="item.name" @change="radioChange">
+						</u-radio>
+					</u-radio-group>
+				</view>
 			</view>
-			<view class="flex row row-ch" style='padding:10px 0 5px;'>
-				<view style='width:100px;font-size:14px;'>称呼</view>
-				<view style="width: 60rpx;">
-					<u--input placeholder="输入姓氏" class="ch-style" inputAlign='left' border="none"
-						v-model="dataDetails.call">
-					</u--input>
+			<view class="flex row row-ch flex-space-between" style='padding:10px 0 5px;'>
+				<view class="left-text" style='font-size:14px;'>称呼</view>
+				<view style='padding-right:10px;' class='flex flex-space-between'>
+					<view style="width: 160rpx;">
+						<u--input style='padding-right:4px;' placeholder="输入姓氏" class="ch-style" inputAlign='right' border="none"
+							v-model="dataDetails.call">
+						</u--input>
+					</view>
+					<view style='position:relative;top:0px;font-size:15px;' class="flex align-center" v-if="dataDetails.sex=='男'">先生</view>
+					<view style='position:relative;top:0px;font-size:15px;' class="flex align-center" v-else>女士</view>
 				</view>
-				<view class="flex align-center" v-if="dataDetails.sex=='男'">先生</view>
-				<view class="flex align-center" v-else>女士</view>
 			</view>
 
-			<view style='padding:10px 0 5px;border-bottom:1px solid #eee;' class="flex width100">
-				<view style='width:100px;font-size:14px;'>联系电话</view>
-				<view class="flex">
-					<u--input disabledColor='#fff' disabled placeholder="输入联系电话" inputAlign='left' border="none"
+			<view style='padding:10px 0 5px;border-bottom:1px solid #eee;' class="flex width100 flex-space-between">
+				<view class="left-text" style='font-size:14px;'>联系电话</view>
+				<view style='padding-right:10px;' class="flex">
+					<u--input disabledColor='#fff' disabled placeholder="输入联系电话" inputAlign='right' border="none"
 						v-model="dataDetails.phone">
 					</u--input>
 				</view>
 			</view>
-			<view class="flex row">
+			<view style='padding-right:10px;' class="flex row">
 				<view class="left-text">身份证号</view>
-				<u--input :disabled='dataDetails.id' placeholder="请输入身份证号" inputAlign='left' border="none"
+				<u--input :disabled='dataDetails.id?true:false' placeholder="请输入身份证号" inputAlign='right' border="none"
 					v-model="dataDetails.cardNumber">
 				</u--input>
 			</view>
 
-			<view class="flex row noborder">
+			<view style='padding-right:10px;' class="flex flex-space-between row noborder">
 				<view class="left-text">身份证截止日期</view>
-				<view style='font-size:16px;width:50%;' class='flex flex-space-between' @click="selectValidityPeriod">
+				<view style='font-size:16px;align-items: center;' class='flex' @click="selectValidityPeriod">
 					<view :style="{'color':dataDetails.cardValidityDate ? '#000':'#C6CBD5'}">
 						{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证截止日期'}}
 					</view>
@@ -121,6 +125,7 @@
 		mapState
 	} from 'vuex';
 	import upload from '@/components/upload.vue';
+	import permision from "@/js_sdk/wa-permission/permission.js"
 	import uploadImage from '@/components/ossutil/uploadFile.js';
 	var _this;
 	export default {
@@ -130,6 +135,7 @@
 				radioCustomStyle: {
 					margin: '0 20rpx 0 0'
 				},
+				submitstatus:false,
 				radiolist1: [{
 						name: '男',
 						disabled: false
@@ -144,6 +150,7 @@
 				dataDetails: {
 					name: '',
 					phone: '',
+					sex:'男',
 					commonId: '',
 					cardNumber: '',
 					cardAddressUrl: '',
@@ -161,8 +168,12 @@
 			};
 		},
 		onLoad(options) {
+			this.get_camera_permission()
 			var _this = this;
-			this.dataDetails = options
+			// console.log(options)
+			if(JSON.stringify(options) != "{}"){
+				this.dataDetails = options
+			}
 			this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
 			this.dataDetails.phone = this.userInfo.phone
 			this.dataDetails.commonId = this.userInfo.id
@@ -171,13 +182,33 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			async get_camera_permission() {
+				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
+				if(photol == false){
+					uni.showModal({
+						title: '提示',
+						content: '您已经关闭相机权限,去设置',
+						success: function (res) {
+							if (res.confirm) {
+								permision.gotoAppPermissionSetting()
+									            // plus.runtime.openURL("app-settings:");
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});	
+				}
+			},
 			nameinput() {
 				this.dataDetails.call = this.dataDetails.name[0]
 			},
 			// 性别切换
 			radioChange(n) {
 				console.log('radioChange', n);
+				
 				this.dataDetails.sex = n
+				this.$forceUpdate()
+				console.log(this.dataDetails.sex)
 			},
 			consent() {
 				this.checked = !this.checked
@@ -254,7 +285,55 @@
 				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[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()
+					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]
 				}
 
@@ -282,6 +361,13 @@
 					})
 					return true
 				}
+				if (this.dataDetails.call.length==0) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "称呼不能为空!",
+					})
+					return true
+				}
 				if (this.dataDetails.call.length > 4) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -289,6 +375,7 @@
 					})
 					return true
 				}
+				
 				if (uni.$u.test.isEmpty(this.dataDetails.cardNumber)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -313,24 +400,33 @@
 			},
 			submit() {
 				if (this.validate()) return
-				uni.showLoading({
-					title: '加载中',
-					mask: true
-				})
-				var _this = this
-				this.$request.baseRequest('post', '/cargoOwnerInfo/api/editCargoOwner', _this.dataDetails).then(res => {
-						uni.hideLoading()
-						uni.$u.toast('提交成功')
-						uni.$u.route('/pages/mine/cargoowner/cargoowner')
+				if(!this.submitstatus){
+					this.submitstatus=true
+					uni.showLoading({
+						title: '加载中',
+						mask: true
 					})
-					.catch(res => {
-						uni.hideLoading()
-						uni.showToast({
-							title: res.message,
-							icon: 'none',
-							duration: 2000
+					var _this = this
+					delete _this.dataDetails.hyCargoOwnerCompInfoList
+					console.log( _this.dataDetails,122121)
+					_this.$request.baseRequest('post', '/cargoOwnerInfo/api/editCargoOwner', _this.dataDetails).then(res => {
+							uni.hideLoading()
+							this.submitstatus=false
+							// console.log(res)
+							uni.$u.toast('提交成功')
+							uni.$u.route('/pages/mine/cargoowner/cargoowner')
 						})
-					});
+						.catch(res => {
+							console.log(res)
+							uni.hideLoading()
+							this.submitstatus=false
+							uni.showToast({
+								title: res.message,
+								icon: 'none',
+								duration: 2000
+							})
+						});
+				}
 			},
 			photograph() {
 				console.log('拍照')
@@ -373,10 +469,17 @@
 												}).then(res => {
 												if (res.data.recPersonNo) {
 													that.dataDetails.cardNumber = res.data.recPersonNo
+													if(that.dataDetails.cardNumber[16]%2==0){
+														that.dataDetails.sex='女'
+													}else{
+														that.dataDetails.sex='男'
+													}
 												}
 												if (res.data.recPerson) {
 													that.dataDetails.name = res.data.recPerson
+													that.dataDetails.call=that.dataDetails.name[0]
 												}
+												
 												that.$forceUpdate()
 											})
 											.catch(res => {

+ 25 - 19
pages/mine/cargoowner/selectcompany.vue

@@ -90,15 +90,14 @@
 						
 						uni.hideLoading()
 						if (res.data) {
-							console.log(111111)
-							if(res.data.name==item.legalPersonName){
-								console.log(22222)
-								uni.showToast({
-									title: '您已经具备该公司货主身份',
-									icon: 'none',
-									duration: 2000
-								})
-							}else if(res.data.hyCargoOwnerCompInfoList){
+							// if(res.data.name==item.legalPersonName){
+							// 	uni.showToast({
+							// 		title: '您已经具备该公司货主身份',
+							// 		icon: 'none',
+							// 		duration: 2000
+							// 	})
+							// }else 
+							if(res.data.hyCargoOwnerCompInfoList){
 								res.data.hyCargoOwnerCompInfoList.every(items=>{
 									 console.log(items.company,item.companyName)
 								})
@@ -107,7 +106,10 @@
 								})){
 
 									uni.setStorageSync('currectcompany', item)
-									that.goDetailPage('pages/mine/cargoowner/addEnerprise')
+									uni.navigateBack({
+										delta: 1
+									})
+									// that.goDetailPage('pages/mine/cargoowner/addEnerprise')
 								}else{
 									for (var i = 0; i < res.data.hyCargoOwnerCompInfoList.length; i++) {
 										if(res.data.hyCargoOwnerCompInfoList[i].company==item.companyName){
@@ -123,7 +125,6 @@
 							}else{
 								uni.setStorageSync('currectcompany', item)
 								that.goDetailPage('pages/mine/cargoowner/addEnerprise')
-								console.log(4444)
 							}
 						}
 					})
@@ -165,11 +166,11 @@
 						})
 					});
 					}
-				
-				this.$request.baseRequest('get', '/companyInfo/selectAllCompany', {
+				if(value){
+					this.$request.baseRequest('get', '/companyInfo/selectAllCompany', {
 						searchKeyWord: value
 					}).then(res => {
-						uni.hideLoading()
+						// uni.hideLoading()
 						var len = 0
 						console.log(res)
 						if (res.data.records.length > 10) {
@@ -196,21 +197,25 @@
 						console.log(arr)
 					})
 					.catch(res => {
-						uni.hideLoading()
+						// uni.hideLoading()
 						uni.showToast({
 							title: res.message,
 							icon: 'none',
 							duration: 2000
 						})
 					});
+				}else{
+					this.companyList=[]
+				}
+				
 			},
 			companyInput(e, value) {
 				var _this = this
 				this.searching = true
-				uni.showLoading({
-					title: '加载中',
-					mask: true
-				})
+				// uni.showLoading({
+				// 	title: '加载中',
+				// 	mask: true
+				// })
 					if (this.lastTime == 0) {
 						this.lastTime = setTimeout(() => {
 							if(e){
@@ -230,6 +235,7 @@
 							}
 						}, 2000)
 					}
+					
 				
 			}
 		}

+ 483 - 160
pages/mine/company/addcompany.vue

@@ -32,8 +32,7 @@
 			</view>
 			<view class="flex row">
 				<view class="left-text">营业期限截止日期</view>
-				<view style='font-size:14px;width:50%;' class='flex flex-space-between'
-					@click="selectData(0)">
+				<view style='font-size:14px;width:50%;' class='flex flex-space-between' @click="selectData(0)">
 					<view :style="{'color':dataDetails.businessTermDate ? '#000':'#C6CBD5'}">
 						{{dataDetails.businessTermDate?dataDetails.businessTermDate:'选择期限截止日期'}}
 					</view>
@@ -44,8 +43,8 @@
 			</view>
 			<view class="flex row noborder">
 				<view class="left-text">统一社会信用代码</view>
-				<u--input placeholder="请输入统一社会信用代码" inputAlign='left' border="none"
-					v-model="dataDetails.unifiedSocialCreditCode">
+				<u--input @blur='codeBlur' placeholder="请输入统一社会信用代码" inputAlign='left' border="none"
+					v-model="dataDetails.unifiedSocialCreditCode" maxlength='18'>
 				</u--input>
 			</view>
 
@@ -54,15 +53,15 @@
 			<view class="flex border-bottom mt20 align-center">
 				<view class="left">企业名称</view>
 				<view class="flex right">
-					<u--input placeholder="输入企业名称" inputAlign='left' border="none" v-model="dataDetails.companyName"
-						@blur='companyNameBlur'>
+					<u--input placeholder="输入企业名称" @input='companyNamechange' inputAlign='left' border="none"
+						v-model="dataDetails.companyName" @blur='companyNameBlur'>
 					</u--input>
 				</view>
 			</view>
 			<view class="flex border-bottom mt20 align-center">
 				<view class="left">法定代表人姓名</view>
 				<view class="flex right">
-					<u--input placeholder="输入法定代表人姓名" inputAlign='left' border="none"
+					<u--input disabled placeholder="输入法定代表人姓名" inputAlign='left' border="none"
 						v-model="dataDetails.legalPersonName">
 					</u--input>
 				</view>
@@ -70,18 +69,25 @@
 			<view class="flex border-bottom mt20 align-center">
 				<view class="left">联系电话</view>
 				<view class="flex right">
-					<u--input disabledColor='#fff' placeholder="输入联系电话" inputAlign='left' border="none"
+					<u--input disabledColor='#fff' placeholder="输入联系电话" maxlength="15" inputAlign='left' border="none"
 						v-model="dataDetails.phone">
 					</u--input>
 				</view>
 			</view>
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left">通讯地址</view>
+				<view class="flex right">
+					<u--input disabledColor='#fff' placeholder="输入通讯地址" maxlength="15" inputAlign='left' border="none"
+						v-model="dataDetails.mailingAddress">
+					</u--input>
+				</view>
+			</view>
 			<view class="title">上传身份证人像面</view>
 			<view @click.stop="uploadImg(2)" class="picture picture1" v-if="!dataDetails.cardAddressUrl">
 				<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
 				<view class="text">上传身份证人像面</view>
 			</view>
-			<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(2)"
-				class="preview-card-img picture">
+			<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(2)" class="preview-card-img picture">
 				<image class="" :src="dataDetails.cardAddressUrl" mode="aspectFit" style=""></image>
 			</view>
 			<view class="title">上传身份证国徽面</view>
@@ -89,31 +95,74 @@
 				<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
 				<view class="text">上传身份证国徽面</view>
 			</view>
-			<view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(3)"
-				class="preview-card-img picture">
+			<view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(3)" class="preview-card-img picture">
 				<image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit" style=""></image>
 			</view>
 			<view class="flex border-bottom mt20 align-center">
-				<view class="left">身份证号</view>
+				<view class="left-text">身份证号</view>
 				<view class="flex right">
-					<u--input disabledColor='#fff' placeholder="输入身份证号" inputAlign='left' border="none"
+					<u--input disabledColor='#fff' placeholder="输入身份证号" maxlength="18" inputAlign='left' border="none"
 						v-model="dataDetails.cardNumber">
 					</u--input>
 				</view>
 			</view>
-		<view class="flex row">
-			<view class="left-text">身份证有效期</view>
-			<view style='font-size:14px;width:50%;' class='flex flex-space-between'
-				@click="selectData(1)">
-				<view :style="{'color':dataDetails.cardValidityDate ? '#000':'#C6CBD5'}">
-					{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择期限截止日期'}}
-				</view>
-				<view>
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left-text">身份证有效期</view>
+				<view class='flex right' @click="selectData(1)">
+					<span :style="{'color':dataDetails.cardValidityDate ? '#000':'#C6CBD5'}">
+						{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证有效期'}}
+					</span>
 					<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+					<view>
+					</view>
 				</view>
 			</view>
-		</view>
-		<!-- 	<view class="flex row noborder">
+			<view class="flex row border-bottom mt20">
+				<view class="left-text">对公账户</view>
+				<view class="flex  right">
+					<u--input disabled placeholder="户名与企业名称一致" inputAlign='left' border="none"
+						v-model="dataDetails.corporateAccount">
+					</u--input>
+				</view>
+			</view>
+			<view class="flex row border-bottom mt20">
+				<view class="left-text">卡号</view>
+				<view class="flex right">
+					<u--input placeholder="输入银行卡号码" inputAlign='left' border="none" v-model="dataDetails.bankCard">
+					</u--input>
+					<view class="" @click="uploadImg(5)">
+						<image src="../../../static/images/xiangji-2.png" mode=""
+							style="width: 40rpx ;height: 40rpx;margin-top: 10rpx;"></image>
+					</view>
+				</view>
+
+			</view>
+			<view class="flex row border-bottom mt20">
+				<view class="left-text">开户行</view>
+				<view class="flex right">
+					<u--input placeholder="输入开户行" inputAlign='left' border="none" v-model="dataDetails.bankDeposit">
+					</u--input>
+				</view>
+			</view>
+			<view class="flex row border-bottom mt20">
+				<view class="left-text khzh-styel">开户支行</view>
+				<view class="flex align-center flex-space-between right" v-if="isShowManualInput">
+					<u--input class="select-bankzh point" placeholder="输入开户支行" inputAlign='left' border="none"
+						v-model="dataDetails.bankDepositBranch">
+					</u--input>
+					<view @click="manualInput" class="type">选择支行</view>
+				</view>
+				<view class="flex align-center flex-space-between right" v-if="!isShowManualInput">
+					<!-- 	<u--input  @click="selectZhbank" placeholder="选择开户支行" inputAlign='left' border="none" disabled>
+				</u--input> -->
+					<view class="select-bankzh" @click="selectZhbank">
+						{{dataDetails.bankDepositBranch?dataDetails.bankDepositBranch:'选择开户支行'}}
+					</view>
+					<view @click="manualInput" class="type">手动输入</view>
+				</view>
+
+			</view>
+			<!-- 	<view class="flex row noborder">
 					<view class="left-text">身份证截止日期</view>
 					<view class="" @click="selectData(1)">
 						{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证截止日期>'}}
@@ -131,7 +180,8 @@
 			<view class="flex row noborder mt20 flex-space-between">
 				<view class="left-text">视频验证(点击按钮播放视频)</view>
 				<view>
-					<u-button type="primary" @click="goDetailPage('/pages/mine/company/companyvideo')" size="mini">重新上传
+					<u-button color='#2772FB' type="primary" @click="goDetailPage('/pages/mine/company/companyvideo')"
+						size="mini">重新上传
 					</u-button>
 				</view>
 			</view>
@@ -152,7 +202,7 @@
 				</view>
 			</view>
 		</view>
-		<view v-if="value" class='content1'>
+		<!-- <view v-if="value" class='content1'>
 			<view class="flex row">
 				<view class="left-text">企业用地是否自有</view>
 				<view class="flex right">
@@ -191,8 +241,7 @@
 					</view>
 				</view>
 			</view>
-
-		</view>
+		</view> -->
 		<view class="content4">
 
 			<view class="flex service align-center">
@@ -215,6 +264,9 @@
 		<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			@change="changeHandler" @cancel="isShowcardValidity=false">
 		</u-picker>
+		<u-picker :show="isShowBank" :columns="columns" :closeOnClickOverlay='true' @close='zhBankClose'
+			@cancel='zhBankClose' @confirm='confirmBank'></u-picker>
+		</u-picker>
 		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
 		</u-action-sheet>
@@ -227,6 +279,7 @@
 		mapState
 	} from 'vuex';
 	import upload from '@/components/upload.vue';
+	import permision from "@/js_sdk/wa-permission/permission.js"
 	import uploadImage from '@/components/ossutil/uploadFile.js';
 	export default {
 		components: {},
@@ -239,7 +292,10 @@
 				},
 				consentStatus: false,
 				ValidityPeriodType: '',
+				isShowManualInput: false,
 				value: false,
+				isShowBank: false,
+				columns: [],
 				radioCustomStyle: {
 					margin: '0 0 0 20rpx'
 				},
@@ -258,6 +314,7 @@
 				index: '',
 				isShowimgType: false,
 				validityPeriod: [],
+				submitstatus:false,
 				checked: false,
 				checked1: false,
 				dataDetails: {
@@ -267,10 +324,10 @@
 					advanceFreightService: 0,
 					landOwnership: '自有',
 					videoAddressUrl: null,
-					legalPersonName: ''
-
+					legalPersonName: '',
+					corporateAccount: ''
 				},
-				dataType:""
+				dataType: ""
 			}
 		},
 		onShow() {
@@ -282,6 +339,7 @@
 
 		},
 		onLoad(options) {
+			this.get_camera_permission()
 			this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
 			console.log(this)
 			this.dataDetails.commonId = this.userInfo.id
@@ -301,23 +359,166 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			async get_camera_permission() {
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
+					uni.showModal({
+						title: '提示',
+						content: '您已经关闭相机权限,去设置',
+						success: function(res) {
+							if (res.confirm) {
+								permision.gotoAppPermissionSetting()
+								// plus.runtime.openURL("app-settings:");
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+				}
+			},
 			selectData(num) {
 				this.dataType = num
 				this.isShowcardValidity = true
 			},
+			zhBankClose() {
+				this.isShowBank = false
+			},
+			// 选择支行
+			selectZhbank() {
+				if (uni.$u.test.isEmpty(this.columns)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "请先上传银行卡!",
+					})
+					return true
+				}
+
+				this.isShowBank = true
+			},
+			manualInput() {
+				if (this.isShowManualInput) {
+					if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "请填写卡号!",
+						})
+						return true
+					}
+					if (this.columns.length == 0) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "请选择手动输入!",
+						})
+						return true
+					}
+
+					this.isShowBank = true
+
+				} else {
+					this.isShowBank = false
+				}
+				this.isShowManualInput = !this.isShowManualInput
+			},
+			confirmBank(e) {
+				console.log(e)
+				this.dataDetails.bankDepositBranch = e.value[0]
+				this.isShowBank = false
+			},
+			uploadImg() {
+				this.uploadType = 5
+				this.imgTypeSelect()
+				// this.isShowimgType = true
+			},
 			confirmValidityPeriod(e) {
+				if(e.value[0]==''&&e.value[0] != '长期'){
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "年份不能为空!",
+					})
+					return
+				}else if(e.value[1]==''&&e.value[0] != '长期'){
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "月份不能为空!",
+					})
+					return
+				}else if(e.value[2]==''&&e.value[0] != '长期'){
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "日期不能为空!",
+					})
+					return
+				}
 				switch (this.dataType) {
 					case 0:
 						if (e.value[0] == '长期') {
 							this.dataDetails.businessTermDate = e.value[0]
+							if(e.value[1]!=''||e.value[2]!=''){
+								this.$refs.uToast.show({
+									type: 'error',
+									message: "选择长期时不允许选择月日!",
+								})
+								return
+							}
 						} else {
+							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.businessTermDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
 						}
 						break
 					case 1:
 						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 {
+							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]
 						}
 						break
@@ -361,11 +562,18 @@
 			// 		})
 			// 	});
 			// },
+			companyNamechange(e) {
+				console.log(e)
+				this.dataDetails.corporateAccount = e
+			},
 			companyNameBlur() {
+
+
 				this.$request.baseRequest('get', '/companyInfo/repeatCompanyInfo', {
 						commonId: this.userInfo.id,
 						companyName: this.dataDetails.companyName
 					}).then(res => {
+						console.log(res)
 						if (res.code == 200) {
 							// that.dataDetails.legalPersonName = res.data.name
 						} else {
@@ -377,6 +585,34 @@
 						}
 					})
 					.catch(res => {
+						console.log(res)
+						uni.hideLoading()
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
+			codeBlur(){
+
+
+				this.$request.baseRequest('get', '/companyInfo/checkCreditCode', {
+						unifiedSocialCreditCode: this.dataDetails.unifiedSocialCreditCode
+					}).then(res => {
+						console.log(res)
+						if (res.code == 200) {
+							// that.dataDetails.legalPersonName = res.data.name
+						} else {
+							uni.showToast({
+								title: res.message,
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					})
+					.catch(res => {
+						console.log(res)
 						uni.hideLoading()
 						uni.showToast({
 							title: res.message,
@@ -444,6 +680,13 @@
 					})
 					return true
 				}
+				if (uni.$u.test.isEmpty(this.dataDetails.mailingAddress)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "通讯地址不能为空!",
+					})
+					return true
+				}
 				// if (uni.$u.test.isEmpty(this.dataDetails.registeredPaidAmount)) {
 				// 	this.$refs.uToast.show({
 				// 		type: 'error',
@@ -451,6 +694,13 @@
 				// 	})
 				// 	return true
 				// }
+				if (this.dataDetails.cardNumber.length != 18) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "身份证号输入错误!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataDetails.businessLicenseAddressUrl)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -472,25 +722,32 @@
 					})
 					return true
 				}
-
-				if (this.dataDetails.advanceFreightService == 1 && uni.$u.test.isEmpty(this.dataDetails
-						.propertyAddressUrl)) {
+				if (!uni.$u.test.rangeLength(this.dataDetails.unifiedSocialCreditCode, [18, 18])) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "房产证或租赁合同不能为空!",
+						message: "统一社会信用代码输出错误!",
 					})
 					return true
 				}
+				//先注释掉
+				// if (this.dataDetails.advanceFreightService == 1 && uni.$u.test.isEmpty(this.dataDetails
+				// 		.propertyAddressUrl)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "房产证或租赁合同不能为空!",
+				// 	})
+				// 	return true
+				// }
 
-				if (this.dataDetails.advanceFreightService == 1 && this.dataDetails.landOwnership == '租赁') {
-					if (uni.$u.test.isEmpty(this.dataDetails.siteLeaseDate)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "场地租赁截止日期不能为空!",
-						})
-						return true
-					}
-				}
+				// if (this.dataDetails.advanceFreightService == 1 && this.dataDetails.landOwnership == '租赁') {
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.siteLeaseDate)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "场地租赁截止日期不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// }
 				// if (uni.$u.test.isEmpty(this.dataDetails.videoAddressUrl)) {
 				// 	this.$refs.uToast.show({
 				// 		type: 'error',
@@ -501,36 +758,43 @@
 			},
 			submit() {
 				if (this.validate()) return
-				if (!this.consentStatus) {
-					uni.showToast({
-						title: '请勾选协议',
-						icon: 'none',
-						duration: 2000
-					})
-					return
-				}
-				uni.showLoading({
-					title: '加载中',
-					mask: true
-				})
-				var _this = this
-				this.$request.baseRequest('post', '/companyInfo/api/addCompanyInfo', _this.dataDetails).then(res => {
-						uni.hideLoading()
-						uni.$u.toast('提交成功')
-						uni.removeStorageSync("videoSrc")
-						uni.navigateBack({
-							delta: 1
-						})
-
-					})
-					.catch(res => {
-						uni.hideLoading()
+				if(!this.submitstatus){
+					this.submitstatus=true
+					
+					if (!this.consentStatus) {
 						uni.showToast({
-							title: res.message,
+							title: '请勾选协议',
 							icon: 'none',
 							duration: 2000
 						})
-					});
+						return
+					}
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					})
+					var _this = this
+					this.$request.baseRequest('post', '/companyInfo/api/addCompanyInfo', _this.dataDetails).then(res => {
+							uni.hideLoading()
+							uni.$u.toast('提交成功')
+							this.submitstatus=false
+							uni.removeStorageSync("videoSrc")
+							uni.navigateBack({
+								delta: 1
+							})
+					
+						})
+						.catch(res => {
+							uni.hideLoading()
+							this.submitstatus=false
+							uni.showToast({
+								title: res.message,
+								icon: 'none',
+								duration: 2000
+							})
+						});
+				}
+				
 			},
 			consent() {
 				this.consentStatus = !this.consentStatus
@@ -581,94 +845,123 @@
 			imgTypeSelect(val) {
 				var _this = this
 				// if (val.name == '相册') {
-					uni.chooseImage({
-						count: 1,
-						// sourceType: ,
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-						
-							uploadImage('image', res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功回调函数
-									switch (_this.uploadType) {
-										
-										// 身份正面
-										case 1:
-											_this.dataDetails.businessLicenseAddressUrl = result
-											// 识别
-											_this.$request.baseRequest('get',
-													'/cargoOwnerInfo/api/licenseShibie', {
-														licenseImg: result,
-													}).then(res => {
-													if (res.code == '200') {
-														if(res.data){
-															if (res.data.validPeriod == '29991231') {
-																_this.dataDetails.businessTermDate = '长期'
-															}
-															_this.dataDetails.unifiedSocialCreditCode = res
-																.data.regNum
-															_this.dataDetails.legalPersonName = res.data
-																.licensePerson
-															_this.dataDetails.companyName = res.data
-																.licenseName
-															console.log(res)
-															_this.$forceUpdate()
-														}else{
-															uni.$u.toast('请上传营业执照');
+				uni.chooseImage({
+					count: 1,
+					// sourceType: ,
+					success: function(res) {
+						console.log(_this.uploadType);
+
+						uploadImage('image', res.tempFilePaths[0], 'appData/',
+							result => {
+								// 上传成功回调函数
+								switch (_this.uploadType) {
+
+									// 身份正面
+									case 1:
+										_this.dataDetails.businessLicenseAddressUrl = result
+										// 识别
+										_this.$request.baseRequest('get',
+												'/cargoOwnerInfo/api/licenseShibie', {
+													licenseImg: result,
+												}).then(res => {
+												if (res.code == '200') {
+													if (res.data) {
+														if (res.data.validPeriod == '29991231') {
+															_this.dataDetails.businessTermDate = '长期'
 														}
+														_this.dataDetails.unifiedSocialCreditCode = res
+															.data.regNum
+														_this.dataDetails.legalPersonName = res.data
+															.licensePerson
+														_this.dataDetails.companyName = res.data
+															.licenseName
+														_this.dataDetails.corporateAccount = _this
+															.dataDetails.companyName
+														console.log(res)
+														_this.$forceUpdate()
 													}
+												}
+
+											})
+											.catch(res => {
+												console.log(res)
+												uni.$u.toast(res.message);
+											});
+										console.log(_this.dataDetails.businessLicenseAddressUrl)
+										break
+										// 身份反面
+									case 2:
+										_this.dataDetails.cardAddressUrl = result
+										// 识别
+										_this.$request.baseRequest('get',
+												'/driverInfo/personShibie', {
+													personImg: result,
+													flag: 1
+												}).then(res => {
+												_this.dataDetails.cardNumber = res.data.recPersonNo
+												_this.$forceUpdate()
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
 
-												})
-												.catch(res => {
-													console.log(res)
-													uni.$u.toast(res.message);
-												});
-											console.log(_this.dataDetails.businessLicenseAddressUrl)
-											break
-											// 身份反面
-										case 2:
-											_this.dataDetails.cardAddressUrl = result
-											// 识别
-											_this.$request.baseRequest('get',
-													'/driverInfo/personShibie', {
-														personImg: result,
-														flag:1
-													}).then(res => {
-													_this.dataDetails.cardNumber = res.data.recPersonNo
-													_this.$forceUpdate()
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											
-											break
-										case 3:
+										break
+									case 3:
 										_this.dataDetails.cardBackAddressUrl = result
-											// 识别
-											_this.$request.baseRequest('get',
-													'/driverInfo/personShibie', {
-														personImg: result,
-														flag:2
-													}).then(res => {
-														if(res.data.idCardValidity){
-															let date = res.data.idCardValidity.split("-")[1]
-														    _this.dataDetails.cardValidityDate = date.replace('.', '-').replace('.', '-')
-														}
-													_this.$forceUpdate()
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
+										// 识别
+										_this.$request.baseRequest('get',
+												'/driverInfo/personShibie', {
+													personImg: result,
+													flag: 2
+												}).then(res => {
+												if (res.data.idCardValidity) {
+													let date = res.data.idCardValidity.split("-")[1]
+													_this.dataDetails.cardValidityDate = date.replace(
+														'.', '-').replace('.', '-')
+												}
+												_this.$forceUpdate()
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										_this.$forceUpdate()
+										break;
+									case 4:
+										_this.dataDetails.propertyAddressUrl = result
+										break;
+									case 5:
+										_this.$request.baseRequest('get',
+												'/driverInfo/bankShibie', {
+													bankImg: result,
+												}).then(res => {
+												console.log(res)
+												_this.dataDetails.payeeAddressUrl = result
+												if (res.data.bankNo) {
+													_this.dataDetails.bankCard = res.data.bankNo
+												}
+												if (res.data.bankName) {
+													_this.dataDetails.bankDeposit = res.data.bankName
+												}
+
+												// 开户支行LIst
+												if (res.data.bankNameZhihang) {
+													_this.columns.push(res.data
+														.bankNameZhihang)
+
+												} else {
+													_this.columns = []
+												}
 												_this.$forceUpdate()
-											break;
-											case 4:
-											   _this.dataDetails.propertyAddressUrl = result
-											break;
-									}
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										break;
 								}
-							)
-						}
-					});
+							}
+						)
+					}
+				});
 				// } else {
 				// 	uni.chooseImage({
 				// 		count: 1,
@@ -736,7 +1029,7 @@
 				this.ValidityPeriodType = type
 				this.imgTypeSelect()
 			},
-			
+
 			changeHandler(e) {
 				const {
 					columnIndex,
@@ -775,6 +1068,11 @@
 		width: 100% !important;
 	}
 
+	.title {
+		color: #333333;
+		margin: 20rpx 0;
+	}
+
 	.next {
 		color: #2772FB;
 		font-size: 13px;
@@ -787,10 +1085,19 @@
 		margin: 20rpx;
 
 		.left {
-			width: 240rpx;
+			width: 50%;
 			font-size: 28rpx;
 		}
 
+		.left-text {
+			// background: red;
+			width: 50%;
+			color: #333333;
+			display: flex;
+			align-items: center;
+			font-size: 14px;
+		}
+
 		.right {
 			font-size: 28rpx;
 			width: calc(100% - 240rpx);
@@ -815,15 +1122,30 @@
 		align-items: center;
 		color: #6A7282;
 	}
+
 	.picture1 {
 		background: url(../../../static/images/mine/zm.png);
 		background-size: 100% 100%;
 	}
+
 	.picture2 {
 		background: url(../../../static/images/mine/gh.png);
 		background-size: 100% 100%;
 	}
-	
+
+	.type {
+		background: #2772FB;
+		border-radius: 10rpx;
+		color: white;
+		box-sizing: border-box;
+		padding: 4rpx 10rpx;
+		font-size: 26rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 68rpx;
+		min-width: 124rpx;
+	}
 
 	.content1 {
 		background: #fff;
@@ -860,7 +1182,7 @@
 				margin-top: 20rpx;
 			}
 		}
-		
+
 		.picture7 {
 			background: url(../../../static/mine/cy.png);
 			background-size: 100% 100%;
@@ -871,10 +1193,7 @@
 			height: 100rpx;
 		}
 
-		.title {
-			color: #333333;
-			margin: 20rpx 0;
-		}
+
 	}
 
 	.content2,
@@ -954,4 +1273,8 @@
 	}
 
 	.myVideo {}
+
+	// /deep/.u-input:disabled{
+	// 	background:transparent !important;
+	// }
 </style>

+ 26 - 2
pages/mine/company/companyvideo.nvue

@@ -77,6 +77,7 @@
 
 	<script>
 		import uploadImage from '@/components/ossutil/uploadFile.js';
+	import permision from "@/js_sdk/wa-permission/permission.js"
 		var videoFilePath;
 		export default {
 			data() {
@@ -96,6 +97,9 @@
 
 				}
 			},
+			onLoad() {
+				this.get_camera_permission()
+			},
 			onShow() {
 				uni.getSystemInfo({
 					success: (res) => {
@@ -120,6 +124,23 @@
 			},
 
 			methods: {
+				async get_camera_permission() {
+					var photol=await permision.requestAndroidPermission("android.permission.RECORD_AUDIO")
+					if(photol == false){
+						uni.showModal({
+							title: '提示',
+							content: '您未开启音频权限,去设置',
+							success: function (res) {
+								if (res.confirm) {
+									permision.gotoAppPermissionSetting()
+										            // plus.runtime.openURL("app-settings:");
+								} else if (res.cancel) {
+									console.log('用户点击取消');
+								}
+							}
+						});	
+					}
+				},
 				saveVideo() {
 					uni.$u.route('/pages/mine/company/addcompany');
 				},
@@ -178,11 +199,14 @@
 						console.log("startVideoCapture: " + JSON.stringify(res))
 						if (res.status == "start") {
 							console.log("开始录像")
-							this.isAlreadyRecord = true
+							setTimeout(()=>{
+								this.isAlreadyRecord = true
+							},1000)
 						} else if (res.status == "end") {
 							console.log("结束录像")
 							uni.showLoading({
-								title: '压缩中...'
+								title: '压缩中...',
+								mask:true
 							});
 							var that = this;
 							uni.compressVideo({

+ 378 - 147
pages/mine/company/editcompany.vue

@@ -23,8 +23,7 @@
 			</view>
 			<view class="flex row">
 				<view class="left-text">营业期限截止日期</view>
-				<view style='font-size:14px;width:50%;' class='flex flex-space-between'
-					@click="selectData(0)">
+				<view style='font-size:14px;width:50%;' class='flex flex-space-between' @click="selectData(0)">
 					<view :style="{'color':dataDetails.businessTermDate ? '#000':'#C6CBD5'}">
 						{{dataDetails.businessTermDate?dataDetails.businessTermDate:'选择期限截止日期'}}
 					</view>
@@ -36,7 +35,7 @@
 			<view class="flex row noborder">
 				<view class="left-text">统一社会信用代码</view>
 				<u--input placeholder="请输入统一社会信用代码" inputAlign='left' border="none"
-					v-model="dataDetails.unifiedSocialCreditCode">
+					v-model="dataDetails.unifiedSocialCreditCode" maxlength='18'>
 				</u--input>
 			</view>
 
@@ -45,8 +44,8 @@
 			<view class="flex border-bottom mt20 align-center">
 				<view class="left">企业名称</view>
 				<view class="flex right">
-					<u--input placeholder="输入企业名称" inputAlign='left' border="none" v-model="dataDetails.companyName"
-						@blur='companyNameBlur'>
+					<u--input placeholder="输入企业名称" @input='companyNamechange' inputAlign='left' border="none"
+						v-model="dataDetails.companyName" @blur='companyNameBlur'>
 					</u--input>
 				</view>
 			</view>
@@ -61,46 +60,44 @@
 			<view class="flex border-bottom mt20 align-center">
 				<view class="left">联系电话</view>
 				<view class="flex right">
-					<u--input disabledColor='#fff' placeholder="输入联系电话" inputAlign='left' border="none"
+					<u--input disabledColor='#fff' placeholder="输入联系电话" maxlength="15" inputAlign='left' border="none"
 						v-model="dataDetails.phone">
 					</u--input>
 				</view>
 			</view>
 			<view class="title">上传身份证人像面</view>
-				<view @click.stop="uploadImg(2)" class="picture picture1" v-if="!dataDetails.cardAddressUrl">
-					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-					<view class="text">上传身份证人像面</view>
-				</view>
-				<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(2)"
-					class="preview-card-img picture">
-					<image class="" :src="dataDetails.cardAddressUrl" mode="aspectFit" style=""></image>
-				</view>
-				<view class="title">上传身份证国徽面</view>
-				<view @click="uploadImg(3)" class="picture picture2" v-if="!dataDetails.cardBackAddressUrl">
-					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-					<view class="text">上传身份证国徽面</view>
-				</view>
-				<view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(3)"
-					class="preview-card-img picture">
-					<image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit" style=""></image>
-				</view>
-				<view class="flex border-bottom mt20 align-center">
-					<view class="left">身份证号</view>
-					<view class="flex right">
-						<u--input disabledColor='#fff' placeholder="输入身份证号" inputAlign='left' border="none"
-							v-model="dataDetails.cardNumber">
-						</u--input>
-					</view>
+			<view @click.stop="uploadImg(2)" class="picture picture1" v-if="!dataDetails.cardAddressUrl">
+				<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+				<view class="text">上传身份证人像面</view>
+			</view>
+			<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(2)" class="preview-card-img picture">
+				<image class="" :src="dataDetails.cardAddressUrl" mode="aspectFit" style=""></image>
+			</view>
+			<view class="title">上传身份证国徽面</view>
+			<view @click="uploadImg(3)" class="picture picture2" v-if="!dataDetails.cardBackAddressUrl">
+				<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
+				<view class="text">上传身份证国徽面</view>
+			</view>
+			<view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(3)" class="preview-card-img picture">
+				<image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit" style=""></image>
+			</view>
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left">身份证号</view>
+				<view class="flex right">
+					<u--input disabledColor='#fff' placeholder="输入身份证号" maxlength="18" inputAlign='left' border="none"
+						v-model="dataDetails.cardNumber">
+					</u--input>
 				</view>
+			</view>
 			<view class="flex row">
-				<view class="left-text">身份证有效期</view>
-				<view style='font-size:14px;width:50%;' class='flex flex-space-between'
-					@click="selectData(1)">
+				<view class="left">身份证有效期</view>
+				<view style='font-size:14px;width:50%;' class='flex flex-space-between' @click="selectData(1)">
 					<view :style="{'color':dataDetails.cardValidityDate ? '#000':'#C6CBD5'}">
 						{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择期限截止日期'}}
 					</view>
+					<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
 					<view>
-						<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+
 					</view>
 				</view>
 			</view>
@@ -112,6 +109,48 @@
 					</u--input>
 				</view>
 			</view>
+			<view class="flex row border-bottom mt20">
+				<view class="left">对公账户</view>
+				<view class="flex">
+					<u--input disabled placeholder="户名与企业名称一致" inputAlign='left' border="none"
+						v-model="dataDetails.corporateAccount">
+					</u--input>
+				</view>
+			</view>
+			<view class="flex row border-bottom mt20">
+				<view class="left">卡号</view>
+				<view class="flex">
+					<u--input placeholder="输入银行卡号码" inputAlign='left' border="none" v-model="dataDetails.bankCard">
+					</u--input>
+				</view>
+				<view class="" @click="uploadImg(5)">
+					<image src="../../../static/images/xiangji-2.png" mode=""
+						style="width: 40rpx ;height: 40rpx;margin-top: 10rpx;"></image>
+				</view>
+			</view>
+			<view class="flex row border-bottom mt20">
+				<view class="left">开户行</view>
+				<u--input placeholder="输入开户行" inputAlign='left' border="none" v-model="dataDetails.bankDeposit">
+				</u--input>
+			</view>
+			<view class="flex row border-bottom mt20">
+				<view class="left khzh-styel">开户支行</view>
+				<view class="flex align-center flex-space-between right" v-if="isShowManualInput">
+					<u--input class="select-bankzh point" placeholder="输入开户支行" inputAlign='left' border="none"
+						v-model="dataDetails.bankDepositBranch">
+					</u--input>
+					<view @click="manualInput" class="type">选择支行</view>
+				</view>
+				<view class="flex align-center flex-space-between right" v-if="!isShowManualInput">
+					<!-- 	<u--input  @click="selectZhbank" placeholder="选择开户支行" inputAlign='left' border="none" disabled>
+					</u--input> -->
+					<view class="select-bankzh" @click="selectZhbank">
+						{{dataDetails.bankDepositBranch?dataDetails.bankDepositBranch:'选择开户支行'}}
+					</view>
+					<view @click="manualInput" class="type">手动输入</view>
+				</view>
+
+			</view>
 			<!-- 	<view class="flex mt20 align-center">
 				<view class="left">注册实缴金额</view>
 				<view class="flex right align-center">
@@ -135,7 +174,8 @@
 			<view class="flex row noborder mt20 flex-space-between">
 				<view class="left-text">视频验证(点击按钮播放视频)</view>
 				<view>
-					<u-button type="primary" @click="goDetailPage('/pages/mine/company/companyvideo')" size="mini">重新上传
+					<u-button color='#2772FB' type="primary" @click="goDetailPage('/pages/mine/company/companyvideo')"
+						size="mini">重新上传
 					</u-button>
 				</view>
 			</view>
@@ -156,7 +196,7 @@
 				</view>
 			</view>
 		</view>
-		<view v-if="dataDetails.advanceFreightService == 1" class='content1'>
+		<!-- <view v-if="dataDetails.advanceFreightService == 1" class='content1'>
 			<view class="flex row">
 				<view class="left-text">企业用地是否自有</view>
 				<view class="flex right">
@@ -195,8 +235,7 @@
 					</view>
 				</view>
 			</view>
-
-		</view>
+		</view> -->
 		<view class="content4">
 
 			<view class="flex service align-center">
@@ -216,6 +255,9 @@
 			<!-- <view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='newlyIncreased'>下一步</view> -->
 			<view @click="submit" class='newlyIncreased'>提交</view>
 		</view>
+		<u-picker :show="isShowBank" :columns="columns" :closeOnClickOverlay='true' @close='zhBankClose'
+			@cancel='zhBankClose' @confirm='confirmBank'></u-picker>
+		</u-picker>
 		<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			@change="changeHandler" @cancel="isShowcardValidity=false">
 		</u-picker>
@@ -231,6 +273,7 @@
 		mapState
 	} from 'vuex';
 	import upload from '@/components/upload.vue';
+	import permision from "@/js_sdk/wa-permission/permission.js"
 	import uploadImage from '@/components/ossutil/uploadFile.js';
 	export default {
 		components: {},
@@ -244,9 +287,11 @@
 				consentStatus: false,
 				ValidityPeriodType: '',
 				value: false,
+				columns: [],
 				radioCustomStyle: {
 					margin: '0 0 0 20rpx'
 				},
+				isShowBank: false,
 				radiolist1: [{
 						name: '自有',
 						disabled: false
@@ -257,9 +302,11 @@
 					},
 
 				],
+				isShowManualInput: false,
 				isShowcardValidity: false,
 				uploadType: '',
 				index: '',
+				submitstatus:false,
 				isShowimgType: false,
 				validityPeriod: [],
 				checked: false,
@@ -274,7 +321,7 @@
 					legalPersonName: ''
 
 				},
-				dataType:""
+				dataType: ""
 			}
 		},
 		onShow() {
@@ -284,6 +331,7 @@
 			}
 		},
 		onLoad(options) {
+			this.get_camera_permission()
 			this.dataDetails.id = options.id
 			this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
 			this.dataDetails.commonId = this.userInfo.id
@@ -300,23 +348,134 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			async get_camera_permission() {
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
+					uni.showModal({
+						title: '提示',
+						content: '您已经关闭相机权限,去设置',
+						success: function(res) {
+							if (res.confirm) {
+								permision.gotoAppPermissionSetting()
+								// plus.runtime.openURL("app-settings:");
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+				}
+			},
+			manualInput() {
+				if (this.isShowManualInput) {
+					if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "请填写卡号!",
+						})
+						return true
+					}
+					this.isShowBank = true
+
+				} else {
+					this.isShowBank = false
+				}
+				this.isShowManualInput = !this.isShowManualInput
+			},
 			selectData(num) {
 				this.dataType = num
 				this.isShowcardValidity = true
 			},
+			zhBankClose() {
+				this.isShowBank = false
+			},
+			// 选择支行
+			selectZhbank() {
+				if (uni.$u.test.isEmpty(this.columns)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "请先上传银行卡!",
+					})
+					return true
+				}
+
+				this.isShowBank = true
+			},
+			confirmBank(e) {
+				console.log(e)
+				this.dataDetails.bankDepositBranch = e.value[0]
+				this.isShowBank = false
+			},
 			confirmValidityPeriod(e) {
 				switch (this.dataType) {
 					case 0:
 						if (e.value[0] == '长期') {
 							this.dataDetails.businessTermDate = e.value[0]
+							if(e.value[1]!=''||e.value[2]!=''){
+								this.$refs.uToast.show({
+									type: 'error',
+									message: "选择长期时不允许选择月日!",
+								})
+								return
+							}
 						} else {
+							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.businessTermDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
 						}
 						break
 					case 1:
 						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 {
+							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]
 						}
 						break
@@ -461,25 +620,32 @@
 					})
 					return true
 				}
-
-				if (this.dataDetails.advanceFreightService == 1 && uni.$u.test.isEmpty(this.dataDetails
-						.propertyAddressUrl)) {
+				if (!uni.$u.test.rangeLength(this.dataDetails.unifiedSocialCreditCode, [18, 18])) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "房产证或租赁合同不能为空!",
+						message: "统一社会信用代码输出错误!",
 					})
 					return true
 				}
+				//先注释掉
+				// if (this.dataDetails.advanceFreightService == 1 && uni.$u.test.isEmpty(this.dataDetails
+				// 		.propertyAddressUrl)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "房产证或租赁合同不能为空!",
+				// 	})
+				// 	return true
+				// }
 
-				if (this.dataDetails.advanceFreightService == 1 && this.dataDetails.landOwnership == '租赁') {
-					if (uni.$u.test.isEmpty(this.dataDetails.siteLeaseDate)) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "场地租赁截止日期不能为空!",
-						})
-						return true
-					}
-				}
+				// if (this.dataDetails.advanceFreightService == 1 && this.dataDetails.landOwnership == '租赁') {
+				// 	if (uni.$u.test.isEmpty(this.dataDetails.siteLeaseDate)) {
+				// 		this.$refs.uToast.show({
+				// 			type: 'error',
+				// 			message: "场地租赁截止日期不能为空!",
+				// 		})
+				// 		return true
+				// 	}
+				// }
 				// if (uni.$u.test.isEmpty(this.dataDetails.videoAddressUrl)) {
 				// 	this.$refs.uToast.show({
 				// 		type: 'error',
@@ -488,34 +654,47 @@
 				// 	return true
 				// }
 			},
+			companyNamechange(e) {
+				console.log(e)
+				this.dataDetails.corporateAccount = e
+			},
 			submit() {
 				if (this.validate()) return
-				if (!this.consentStatus) {
-					uni.showToast({
-						title: '请勾选协议',
-						icon: 'none',
-						duration: 2000
-					})
-					return
-				}
-				uni.showLoading({
-					title: '加载中',
-					mask: true
-				})
-				var _this = this
-				this.$request.baseRequest('post', '/companyInfo/api/editCompanyInfo', _this.dataDetails).then(res => {
-						uni.hideLoading()
-						uni.$u.toast('提交成功')
-						this.goDetailPage('/pages/mine/company/index')
-					})
-					.catch(res => {
-						uni.hideLoading()
+				if(!this.submitstatus){
+					this.submitstatus=true
+					if (!this.consentStatus) {
 						uni.showToast({
-							title: res.message,
+							title: '请勾选协议',
 							icon: 'none',
 							duration: 2000
 						})
-					});
+						return
+					}
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					})
+					var _this = this
+					this.$request.baseRequest('post', '/companyInfo/api/editCompanyInfo', _this.dataDetails).then(res => {
+							uni.hideLoading()
+							uni.$u.toast('提交成功')
+							this.submitstatus=false
+							uni.navigateBack({
+								delta: 1
+							})
+							// this.goDetailPage('/pages/mine/company/index')
+						})
+						.catch(res => {
+							uni.hideLoading()
+							this.submitstatus=false
+							uni.showToast({
+								title: res.message,
+								icon: 'none',
+								duration: 2000
+							})
+						});
+				}
+				
 			},
 			consent() {
 				this.consentStatus = !this.consentStatus
@@ -566,90 +745,117 @@
 			imgTypeSelect(val) {
 				var _this = this
 				// if (val.name == '相册') {
-					uni.chooseImage({
-						count: 1,
-						// sourceType: ,
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage('image', res.tempFilePaths[0], 'appData/',
-								result => {debugger
-									// 上传成功回调函数
-									switch (_this.uploadType) {
-										
-										
-										// 身份正面
-										case 1:
-											_this.dataDetails.businessLicenseAddressUrl = result
-											// 识别
-											_this.$request.baseRequest('get',
-													'/cargoOwnerInfo/api/licenseShibie', {
-														licenseImg: result,
-													}).then(res => {
-													if (res.code == '200') {
-														if(res.data){
-															if (res.data.validPeriod == '29991231') {
-																_this.dataDetails.businessTermDate = '长期'
-															}
-															_this.dataDetails.unifiedSocialCreditCode = res
-																.data.regNum
-															_this.dataDetails.legalPersonName = res.data
-																.licensePerson
-															_this.dataDetails.companyName = res.data
-																.licenseName
-															console.log(res)
-															_this.$forceUpdate()
-														}else{
-															uni.$u.toast('请上传营业执照');
+				uni.chooseImage({
+					count: 1,
+					// sourceType: ,
+					success: function(res) {
+						console.log(JSON.stringify(res.tempFilePaths));
+						uploadImage('image', res.tempFilePaths[0], 'appData/',
+							result => {
+								// 上传成功回调函数
+								switch (_this.uploadType) {
+									// 身份正面
+									case 1:
+										_this.dataDetails.businessLicenseAddressUrl = result
+										// 识别
+										_this.$request.baseRequest('get',
+												'/cargoOwnerInfo/api/licenseShibie', {
+													licenseImg: result,
+												}).then(res => {
+												if (res.code == '200') {
+													if (res.data) {
+														if (res.data.validPeriod == '29991231') {
+															_this.dataDetails.businessTermDate = '长期'
 														}
+														_this.dataDetails.unifiedSocialCreditCode = res
+															.data.regNum
+														_this.dataDetails.legalPersonName = res.data
+															.licensePerson
+														_this.dataDetails.companyName = res.data
+															.licenseName
+														_this.dataDetails.corporateAccount = _this
+															.dataDetails.companyName
+														console.log(res)
+														_this.$forceUpdate()
+													} else {
+														uni.$u.toast('请上传营业执照');
 													}
-			
-												})
-												.catch(res => {
-													console.log(res)
-													uni.$u.toast(res.message);
-												});
-											console.log(_this.dataDetails.businessLicenseAddressUrl)
-											break
-											// 身份反面
-										case 2:
-											_this.dataDetails.cardAddressUrl = result
-											// 识别
-											_this.$request.baseRequest('get','/driverInfo/personShibie', {
-														personImg: result,
-														flag:1
-													}).then(res => {
-													_this.dataDetails.cardNumber = res.data.recPersonNo
-													_this.$forceUpdate()
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											_this.$forceUpdate()
-											break
-										case 3:
+												}
+
+											})
+											.catch(res => {
+												console.log(res)
+												uni.$u.toast(res.message);
+											});
+										console.log(_this.dataDetails.businessLicenseAddressUrl)
+										break
+										// 身份反面
+									case 2:
+										_this.dataDetails.cardAddressUrl = result
+										// 识别
+										_this.$request.baseRequest('get', '/driverInfo/personShibie', {
+												personImg: result,
+												flag: 1
+											}).then(res => {
+												_this.dataDetails.cardNumber = res.data.recPersonNo
+												_this.$forceUpdate()
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										_this.$forceUpdate()
+										break
+									case 3:
 										_this.dataDetails.cardBackAddressUrl = result
 										// 识别
 										_this.$request.baseRequest('get',
 												'/driverInfo/personShibie', {
 													personImg: result,
-													flag:2
+													flag: 2
 												}).then(res => {
-													if(res.data.idCardValidity){
-														let date = res.data.idCardValidity.split("-")[1]
-													    _this.dataDetails.cardValidityDate = date.replace('.', '-').replace('.', '-')
-													}
+												if (res.data.idCardValidity) {
+													let date = res.data.idCardValidity.split("-")[1]
+													_this.dataDetails.cardValidityDate = date.replace(
+														'.', '-').replace('.', '-')
+												}
 												_this.$forceUpdate()
 											})
 											.catch(res => {
 												uni.$u.toast(res.message);
 											});
-											_this.$forceUpdate()
-											break;
-									}
+										_this.$forceUpdate()
+										break;
+									case 5:
+										_this.$request.baseRequest('get',
+												'/driverInfo/bankShibie', {
+													bankImg: result,
+												}).then(res => {
+												console.log(res)
+												_this.dataDetails.payeeAddressUrl = result
+												if (res.data.bankNo) {
+													_this.dataDetails.bankCard = res.data.bankNo
+												}
+												if (res.data.bankName) {
+													_this.dataDetails.bankDeposit = res.data.bankName
+												}
+
+												// 开户支行LIst
+												if (res.data.bankNameZhihang) {
+													_this.columns.push(res.data
+														.bankNameZhihang)
+
+												}
+												_this.$forceUpdate()
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										break;
 								}
-							)
-						}
-					});
+							}
+						)
+					}
+				});
 				// } else {
 				// 	uni.chooseImage({
 				// 		count: 1,
@@ -681,7 +887,7 @@
 				// 										console.log(res)
 				// 										_this.$forceUpdate()
 				// 									}
-			
+
 				// 								})
 				// 								.catch(res => {
 				// 									uni.$u.toast(res.message);
@@ -716,7 +922,7 @@
 				this.ValidityPeriodType = type
 				this.isShowcardValidity = true
 			},
-		
+
 			changeHandler(e) {
 				const {
 					columnIndex,
@@ -748,7 +954,7 @@
 	}
 
 	/deep/.uni-input-input:disabled {
-		background: #fff;
+		background: transparent;
 	}
 
 	page {
@@ -766,6 +972,15 @@
 		border-radius: 5px;
 		margin: 20rpx;
 
+		.left-text {
+			// background: red;
+			width: 50%;
+			color: #333333;
+			display: flex;
+			align-items: center;
+			font-size: 14px;
+		}
+
 		.left {
 			width: 240rpx;
 			font-size: 28rpx;
@@ -784,6 +999,20 @@
 		// }
 	}
 
+	.type {
+		background: #2772FB;
+		border-radius: 10rpx;
+		color: white;
+		box-sizing: border-box;
+		padding: 4rpx 10rpx;
+		font-size: 26rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 68rpx;
+		min-width: 124rpx;
+	}
+
 	.picture {
 		margin-top: 20rpx;
 		background: #F5F6FA;
@@ -796,10 +1025,12 @@
 		align-items: center;
 		color: #6A7282;
 	}
+
 	.picture1 {
 		background: url(../../../static/images/mine/zm.png);
 		background-size: 100% 100%;
 	}
+
 	.picture2 {
 		background: url(../../../static/images/mine/gh.png);
 		background-size: 100% 100%;

+ 22 - 3
pages/mine/company/index.vue

@@ -53,6 +53,8 @@
 			if (!this.hasLogin) {
 				uni.$u.route('/pages/public/login');
 			}
+		},
+		onShow() {
 			this.getList()
 		},
 		methods: {
@@ -60,7 +62,23 @@
 				uni.$u.route("/pages/mine/myAccount/index?id=" + item.id + "&companyId=" + item.id)
 			},
 			goDetailPage(src) {
-				uni.$u.route(src);
+				var that=this
+				if(src=='/pages/mine/company/addcompany'){
+					this.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
+						phone: this.userInfo.phone,
+					}).then(res => {
+						if (res.data.authenticationStatus == '已认证') {
+							uni.$u.route(src);
+						}else{
+							that.$refs.uToast.show({
+								type: 'error',
+								message: "请先完成个人认证"
+							})
+						}
+					})
+				}else{
+					uni.$u.route(src);
+				}
 			},
 			edit(item) {
 				this.goDetailPage('/pages/mine/company/editcompany?id=' + item.id)
@@ -140,8 +158,9 @@
 		height: 42px;
 		margin: 36px auto 0;
 		color: #fff;
-
-		background: url(../../../static/mine/company/Mask@3x.png);
+		// background: url(../../../static/mine/company/Mask@3x.png);
+		background: #2772FB ;
+		border-radius: 44rpx;
 		background-size: 100%;
 		line-height: 42px;
 	}

+ 5 - 3
pages/mine/driverEvaluation.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content">
 		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" class="mescroll">
-		<view class="content-list" v-for="(item,index) in list" :key='index'>
+		<view class="content-list" v-for="(item,index) in list">
 			<view class="top flex flex-space-between">
 				<view class="left flex">
 					<view>
@@ -18,7 +18,9 @@
 					{{item.orderInfo.driverName}}:
 				</view>
 				<view class="xx">
-					<start :count="count" v-model="item.count" size="35" activeColor="#ffaa00" :size="18" :allowHalf='true' :readonly='true'>
+				<!-- 	<start :count="count" v-model="item.count" size="35" activeColor="#ffaa00" :size="18" :allowHalf='true' :readonly='true'>
+					</start> -->
+					<start :value="item.count" :disabled="true" :is_score='true' :size="36" >
 					</start>
 				</view>
 			</view>
@@ -57,7 +59,7 @@
 				<u-icon name="arrow-up" color="#2979ff" size="18" v-else></u-icon>
 			</view>
 			<view v-if="isOpen" class="img-content">
-				<u--image :showLoading="true" :src="item1" width="80px" height="80px" class="img" v-for="(item1,index) in item.imgList"></u--image>
+				<u--image :showLoading="true" :src="item1" width="80px" height="80px" class="img" v-for="item1 in item.imgList"></u--image>
 			</view>
 			<u-line class="line"></u-line>
 			<view class="gray999">

+ 6 - 5
pages/mine/evaluate.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content">
 			<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" class="mescroll">
-		<view class="content-list" v-for="(item,index) in list" :key='index'>
+		<view class="content-list" v-for="(item,index) in list">
 			<view class="top flex flex-space-between">
 				<view style='align-items: center;' class="left flex">
 						<u--image :showLoading="true" :src="item.driverPortrait" width="100rpx" height="100rpx" @click=""
@@ -18,7 +18,7 @@
 					货主信用:
 				</view>
 				<view class="xx">
-					<start :count="count" v-model="item.ownerCredit" size="35" activeColor="#ffaa00" :size="18" :allowHalf='true'>
+					<start :value="item.ownerCredit" :disabled="true" :is_score='true' :size="36" >
 					</start>
 				</view>
 			</view>
@@ -27,7 +27,7 @@
 					运费支付:
 				</view>
 				<view class="xx">
-					<start :count="count" v-model="item.freightPayment" size="35" activeColor="#ffaa00" :size="18" :allowHalf='true'>
+					<start :value="item.freightPayment" :disabled="true" :is_score='true' :size="36" >
 					</start>
 				</view>
 			</view>
@@ -36,7 +36,7 @@
 					综合满意度:
 				</view>
 				<view class="xx">
-					<start :count="count" v-model="item.comprehensiveSatisfaction" size="35" activeColor="#ffaa00" :size="18" :allowHalf='true'>
+					<start :score="score1" :value="item.comprehensiveSatisfaction" :disabled="true" :is_score='true' :size="36">
 					</start>
 				</view>
 			</view>
@@ -71,7 +71,7 @@
 			
 			<view v-if="item.isOpen" class="img-content">
 				<u--image :showLoading="true" :src="item1" width="80px" height="80px" class="img"
-					v-for="(item1,index) in item.imgList"></u--image>
+					v-for="item1 in item.imgList"></u--image>
 				
 			</view>
 			<u-line class="line"></u-line>
@@ -101,6 +101,7 @@
 				// isOpen: false,
 				count: '5',
 				value: '3',
+				score1:['极不满意','不满意','尚可','满意','非常满意'],
 				src: 'https://cdn.uviewui.com/uview/album/1.jpg',
 				rate: [{
 						name: "司机信用",

+ 59 - 28
pages/mine/index.vue

@@ -3,9 +3,9 @@
 	<view class="container">
 		<view class='container_content'>
 			<view class="head">
-				<view style='margin-bottom:14px;' class="row flex flex-end" v-if='hasLogin'>
+				<view style='margin-bottom:14px;' class="row flex flex-end">
 					<u--image class='image' :showLoading="true" src="../../static/mine/saoma.png" width="20px"
-						height="20px" @click="scanCode()"></u--image>
+						height="20px" @click="scanCode()" v-if='hasLogin'></u--image>
 					<u--image @click="goDetailPage('/pages/mine/set')" style='margin-right:0;' class='image'
 						:showLoading="true" src="../../static/mine/shezhi.png" width="20px" height="20px"></u--image>
 				</view>
@@ -15,15 +15,16 @@
 						height="56px" shape='circle'></u--image>
 					<view class='information' v-if='hasLogin'>
 						<view class='flex items-center'>
-							<view class='username'>{{userName}} {{cargoCall}}</view>
+							<view v-if='userName' class='username'>{{userName}} {{cargoCall}}</view>
+							<view v-else class='username'>{{userInfo.userName}} </view>
 							<view v-if='status' class='currectstatus'>已认证</view>
-							<view v-if='!status' class='currectstatus1'>未认证</view>
+							<view v-if='!status' class='currectstatus1'>{{CargoOwner.authenticationStatus?CargoOwner.authenticationStatus:'未认证'}}</view>
 						</view>
 						<view class='phone'>{{starUserphone}}</view>
 					</view>
 					<view class='information' v-else @click="toLogin">立即登录</view>
 				</view>
-				<view v-if='hasLogin&&!status' class='authentication flex flex-space-between'>
+				<view v-if='hasLogin&&!status1' class='authentication flex flex-space-between'>
 					<view>
 						<view style='font-size:14px;'>货主身份认证</view>
 						<view style='color:#DDA558;font-size:12px;'>您还没有完成货主认证哦~</view>
@@ -34,13 +35,13 @@
 			</view>
 
 			<view class='flex operate flex-space-around'>
-				<view class='flex items-center' @click="toMyRelease">
-					<u--image style='margin-right:8px;' :showLoading="true" src="../../static/mine/wodefabu.png"
-						width="42px" height="42px"></u--image>我发布
+				<view style='font-size:14px;' class='flex items-center' @click="toMyRelease">
+					<u--image style='margin-right:8px;position:relative;top:3px;' :showLoading="true"
+						src="../../static/mine/wodefabu.png" width="42px" height="42px"></u--image>我发布
 				</view>
-				<view class='flex items-center' @click="goDetailPage('/pages/mine/evaluate')">
-					<u--image style='margin-right:8px;' :showLoading="true" src="../../static/mine/pingjia.png"
-						width="42px" height="42px"></u--image>
+				<view style='font-size:14px;' class='flex items-center' @click="goDetailPage('/pages/mine/evaluate')">
+					<u--image style='margin-right:8px;position:relative;top:3px;' :showLoading="true"
+						src="../../static/mine/pingjia.png" width="42px" height="42px"></u--image>
 					司机评价
 				</view>
 			</view>
@@ -52,7 +53,8 @@
 							width="20px" height="20px"></u--image>我的账户
 					</view>
 					<view>
-						<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+						<image class='right' src="@/static/mine/right.png" mode=""></image>
+						<!-- <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon> -->
 					</view>
 				</view>
 				<view class="flex flex-space-between content1-item" @click="goDetailPage('/pages/mine/company/index')">
@@ -61,7 +63,8 @@
 							width="20px" height="20px"></u--image>我的公司
 					</view>
 					<view class='flex'>
-						<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+						<image class='right' src="@/static/mine/right.png" mode=""></image>
+						<!-- <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon> -->
 					</view>
 				</view>
 				<view class="flex flex-space-between content1-item"
@@ -71,7 +74,8 @@
 							width="20px" height="20px"></u--image>我的银行卡
 					</view>
 					<view>
-						<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+						<image class='right' src="@/static/mine/right.png" mode=""></image>
+						<!-- <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon> -->
 					</view>
 				</view>
 				<view class="flex flex-space-between content1-item"
@@ -81,7 +85,8 @@
 							width="20px" height="20px"></u--image>货主认证
 					</view>
 					<view class='flex'>
-						<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+						<image class='right' src="@/static/mine/right.png" mode=""></image>
+						<!-- <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon> -->
 					</view>
 				</view>
 				<view class="flex flex-space-between content1-item"
@@ -91,7 +96,8 @@
 							width="20px" height="20px"></u--image>代理货主
 					</view>
 					<view>
-						<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+						<image class='right' src="@/static/mine/right.png" mode=""></image>
+						<!-- <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon> -->
 					</view>
 				</view>
 				<view class="flex flex-space-between content1-item"
@@ -101,7 +107,8 @@
 							src="../../static/mine/bangzhushuoming.png" width="20px" height="20px"></u--image>帮助说明
 					</view>
 					<view>
-						<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+						<image class='right' src="@/static/mine/right.png" mode=""></image>
+						<!-- <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon> -->
 					</view>
 				</view>
 
@@ -142,12 +149,14 @@
 		data() {
 			return {
 				confirmText: '',
+				CargoOwner: {},
 				showCancelButton: true,
 				isShowAlert: false,
 				alertTitle: '',
 				userName: '',
 				phone: '',
 				status: false,
+				status1:false,
 				alertContent: '您尚未登录,是否立即登录?',
 				cargoCall: "",
 			};
@@ -163,14 +172,23 @@
 					}).then(res => {
 						uni.hideLoading()
 						if (res.data) {
-							if (res.data.authenticationStatus == '审核中' || res.data.authenticationStatus == '已驳回') {
+							this.CargoOwner = res.data
+							if (res.data.authenticationStatus == '审核中' || res.data.authenticationStatus == '已驳回' || res
+								.data.authenticationStatus == '未认证') {
+									if(res.data.authenticationStatus == '未认证'){
+										this.status1 = false
+									}else{
+										this.status1 = true
+									}
 								this.status = false
 							} else {
 								this.status = true
+								this.status1 = true
 							}
 
 						} else {
 							this.status = false
+							this.status1 = false
 						}
 					})
 					.catch(res => {
@@ -187,14 +205,13 @@
 					uni.setStorageSync("firstAuthentication", res.data)
 					if (res.data) {
 						this.userName = res.data.call
-						if (res.data.sex == '男') {
-							this.cargoCall = "先生"
-						} else {
-							this.cargoCall = "女士"
+						if(res.data.sex){
+							if (res.data.sex == '男') {
+								this.cargoCall = "先生"
+							} else {
+								this.cargoCall = "女士"
+							}
 						}
-					} else {
-						this.userName = this.userInfo.userName
-						this.cargoCall=""
 					}
 					this.$forceUpdate()
 				})
@@ -268,10 +285,21 @@
 				this.isShowAlert = false
 			},
 			toMyRelease() {
-				uni.$u.route('/pages/release/record');
+				if (!this.hasLogin || !this.userInfo || this.userName == "立即登录") {
+					uni.$u.route('/pages/public/login');
+				} else {uni.$u.route('/pages/release/record');}
+				
 			},
 			goDetailPage(src) {
-				uni.$u.route(src);
+				if (!this.hasLogin || !this.userInfo || this.userName == "立即登录") {
+					if(src!='/pages/mine/helpDescription'){
+						uni.$u.route('/pages/public/login');
+					}else{
+						uni.$u.route(src);
+					}
+					
+				} else {uni.$u.route(src);}
+				
 			},
 			toLogin() {
 				console.log("userInfo", this.userInfo)
@@ -300,7 +328,7 @@
 		background: url('~@/static/mine/bg@3x.png');
 		background-size: 100% 100%;
 		margin: 0 auto;
-		height: calc(100vh - 0px);
+		height: calc(100vh - 85px);
 
 		.container_content {
 			padding: 18px;
@@ -392,4 +420,7 @@
 	.items-center {
 		align-items: center;
 	}
+	.right{
+		width:10px;height:10px;
+	}
 </style>

+ 64 - 6
pages/mine/manageBankCards/addBankCard.vue

@@ -50,7 +50,7 @@
 			<view class="flex row noborder">
 				<view class="left-text">持卡人姓名</view>
 				<view class="flex">
-					<u--input placeholder="输入持卡人姓名" inputAlign='left' border="none"
+					<u--input :disabled='disabled' placeholder="输入持卡人姓名" inputAlign='left' border="none"
 						v-model="dataDetails.cardholderName">
 					</u--input>
 				</view>
@@ -58,7 +58,7 @@
 			<view class="flex row noborder">
 				<view class="left-text">持卡人身份证号</view>
 				<view class="flex">
-					<u--input placeholder="输入持卡人身份证号" inputAlign='left' border="none"
+					<u--input :disabled='disabled' placeholder="输入持卡人身份证号" inputAlign='left' border="none"
 						v-model="dataDetails.cardholderIdNumber" maxlength="18">
 					</u--input>
 				</view>
@@ -79,6 +79,7 @@
 
 <script>
 	import upload from '@/components/upload.vue';
+	import permision from "@/js_sdk/wa-permission/permission.js"
 	import uploadImage from '@/components/ossutil/uploadFile.js';
 	var _this;
 	import {
@@ -97,7 +98,9 @@
 					bankDeposit: '',
 					bankDepositBranch: '',
 				},
+				disabled:false,
 				imagesrc: '',
+				submitstatus:false,
 				columns: [
 
 				],
@@ -112,16 +115,39 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		onLoad() {
+			this.get_camera_permission()
 			_this = this;
 			// this.dataDetails.driverId = this.userInfo.driverId
 			_this.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', { //查身份证号
 				phone: uni.getStorageSync("userInfo").phone
 			}).then(res => {
-				this.id = res.data.cardNumber
-				this.name = res.data.name
+				if(res.data.authenticationStatus=='已认证'){
+					this.id = res.data.cardNumber
+					this.name = res.data.name
+					this.dataDetails.cardholderIdNumber= res.data.cardNumber
+					this.dataDetails.cardholderName=res.data.name
+					this.disabled=true
+				}
 			})
 		},
 		methods: {
+			async get_camera_permission() {
+				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
+				if(photol == false){
+					uni.showModal({
+						title: '提示',
+						content: '您已经关闭相机权限,去设置',
+						success: function (res) {
+							if (res.confirm) {
+								permision.gotoAppPermissionSetting()
+									            // plus.runtime.openURL("app-settings:");
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});	
+				}
+			},
 			delCard() {
 				_this.dataDetails.payeeAddressUrl = ''
 				_this.$forceUpdate()
@@ -139,7 +165,7 @@
 				if (uni.$u.test.isEmpty(this.columns)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "请先上传银行卡!",
+						message: "请选择手动收入",
 					})
 					return true
 				}
@@ -220,6 +246,13 @@
 					})
 					return true
 				}
+				if (uni.$u.test.rangeLength(this.dataDetails.bankCard,[16,20])) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "银行卡号输入错误!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataDetails.bankDeposit)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -227,6 +260,14 @@
 					})
 					return true
 				}
+				
+				if (uni.$u.test.rangeLength(this.dataDetails.bankDeposit,[4,25])) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "开户行输入错误!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataDetails.bankDepositBranch)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -234,6 +275,13 @@
 					})
 					return true
 				}
+				if (uni.$u.test.rangeLength(this.dataDetails.bankDepositBranch,[4,25])) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "开户支行输入错误!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataDetails.cardholderName)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -315,8 +363,11 @@
 				// 	.catch(res => {
 				// 		uni.$u.toast(res.message);
 				// 	});
+				console.log(this.name)
 				if (that.validate()) return //校验  511303198809243079
-				if (that.dataDetails.cardholderName != this.name) {
+				if(!this.submitstatus){
+					this.submitstatus=true
+					if (that.dataDetails.cardholderName != this.name&&this.name!='') {
 					that.$refs.uToast.show({
 						type: 'error',
 						message: "收款人须为货主本人!",
@@ -327,6 +378,7 @@
 						title: '加载中',
 						mask: true
 					})
+					
 					that.$request.baseRequest('get', '/driverPayeeInfo/bankCradShibie', { //三要素验证
 						name: that.dataDetails.cardholderName, //持卡人姓名
 						idCard: this.id, //货主身份证号
@@ -343,6 +395,7 @@
 											message: "提交成功",
 										}
 										uni.hideLoading()
+										this.submitstatus=false
 										that.$refs.uToast.show({
 											...params
 										})
@@ -352,18 +405,23 @@
 										});
 					
 									} else {
+										this.submitstatus=false
 										uni.$u.toast(res.message);
 									}
 					
 								})
 								.catch(res => {
+									this.submitstatus
 									uni.$u.toast(res.message);
 								});
 						} else {
+							this.submitstatus=false
 							uni.$u.toast(response.data.distinguish);
 						}
 					})
 				}
+				}
+				
 				
 
 

+ 20 - 0
pages/mine/manageBankCards/editBankCard.vue

@@ -59,6 +59,7 @@
 
 <script>
 	import upload from '@/components/upload.vue';
+	import permision from "@/js_sdk/wa-permission/permission.js"
 	import uploadImage from '@/components/ossutil/uploadFile.js';
 	var _this;
 	export default {
@@ -69,15 +70,34 @@
 				dataDetails: {},
 				imagesrc: '',
 				bankType: [],
+				submitstatus:false,
 				isShowBank: false,
 				isShowManualInput: false,
 				index: ''
 			};
 		},
 		onLoad() {
+			this.get_camera_permission()
 			_this = this;
 		},
 		methods: {
+			async get_camera_permission() {
+				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
+				if(photol == false){
+					uni.showModal({
+						title: '提示',
+						content: '您已经关闭相机权限,去设置',
+						success: function (res) {
+							if (res.confirm) {
+								permision.gotoAppPermissionSetting()
+									            // plus.runtime.openURL("app-settings:");
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});	
+				}
+			},
 			manualInput() {
 				if (this.isShowManualInput) {
 					if (uni.$u.test.isEmpty(this.bankType[this.index])) {

+ 61 - 14
pages/mine/manageBankCards/index.vue

@@ -2,18 +2,17 @@
 	<view class="content">
 		<view class="top-title flex flex-space-between">
 			<view class="left flex">
-				<view class="text1">我的卡</view>
-				<view class="text2">(共{{bankList?bankList.length:0}}张)</view>
+				<view class="mybank_title">我的银行卡</view>
+				<!-- <view class="text2">(共{{bankList?bankList.length:0}}张)</view> -->
 			</view>
-
-			<view @click="addBankCard" class="add-bankcard flex">
+			<!-- <view v-if='bankList.length==0' @click="addBankCard" class="add-bankcard flex">
 				<view class="car-text">添加银行卡</view>
 				<u-icon class="icon" name="plus-circle-fill" color="#2979ff" size="24"></u-icon>
-			</view>
-
+			</view> -->
+			<view v-if="bankList.length > 0"><image style='width:17px;height:17px;margin-top: 10rpx;' @click="del()" src="../../../static/mine/sanchu.png" mode=""></image></view>
 		</view>
 		<!-- <image src="../../../static/images/mine/bank/nongyelogo.png" mode=""></image> -->
-		<view class="card-list" v-for="(item,index) in bankList" :key='index'>
+		<view class="card-list" v-for="(item,index) in bankList" v-if="bankList.length > 0">
 			<view class="card-list-item" :style='{"background-image":"url("+item.cardColor+")"}'>
 				<view class="flex flex-end number carNumber">{{item.bankCard}}</view>
 				<view class="flex align-center">
@@ -26,17 +25,20 @@
 					</view>
 				</view>
 			</view>
-
 			<view class="flex flex-space-between row2 align-center">
 				<view class="flex align-center">
-					<radio :checked="item.defaultFlag==1" @click='radioChange(item)' />
-					<view class="default-card">设为默认收款账户</view>
+					<!-- <radio :checked="item.defaultFlag==1" @click='radioChange(item)' />
+					<view class="default-card">设为默认收款账户</view> -->
 				</view>
 				<view>
-					<u-icon name="trash" size="24" @click="del(item,index)"></u-icon>
 				</view>
 			</view>
 		</view>
+		<view class="nobank" v-if="bankList.length == 0">
+			<image src="../../../static/mine/bank/noBank.png" mode="" class="nobank_img"></image>
+			<view class="text_css">您还没有银行卡哦,快来添加吧~</view>
+			<view class="add_btn" @click="addBankCard">去添加</view>
+		</view>
 		<!-- <view @click="addBankCard">添加银行卡</view> -->
 		 <u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true' confirmColor='#2772FB'  @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
 		<u-toast ref="uToast"></u-toast>
@@ -66,6 +68,9 @@
 			}
 			this.init();
 		},
+		onShow() {
+			this.init();
+		},
 		methods: {
 			confirmClick(){
 				this.isShowAlert = false
@@ -218,7 +223,21 @@
 					});
 			},
 			addBankCard() {
-				uni.$u.route('/pages/mine/manageBankCards/addBankCard');
+				var _this = this;
+				// this.dataDetails.driverId = this.userInfo.driverId
+				_this.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', { //查身份证号
+					phone: uni.getStorageSync("userInfo").phone
+				}).then(res => {
+					if(res.data.authenticationStatus=='已认证'){
+						uni.$u.route('/pages/mine/manageBankCards/addBankCard');
+					}else{
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "请先进行身份认证!",
+						})
+					}
+				})
+				
 			},
 			edit() {
 				uni.$u.route('/pages/mine/manageBankCards/editBankCard');
@@ -232,8 +251,8 @@
 				})
 			},
 			del(val, index) {
-				this.obj = val
-				this.index = index
+				this.obj = this.bankList[0]
+				this.index = 0
 				this.isShowAlert = true
 		
 			}
@@ -322,4 +341,32 @@
 		// font-size: 28rpx;
 		color: #333333;
 	}
+	.mybank_title{
+		font-size: 40rpx;
+		font-weight: 600;
+	}
+	.nobank{
+		// height: calc(100vh - 13vh);
+		// background: red;
+		text-align: center;
+		.nobank_img{
+			width: 344rpx;
+			height: 228rpx;
+			margin-top: 350rpx;
+		}
+		.text_css{
+			font-size: 30rpx;
+			color: #333333;
+			margin-top: 90rpx;
+		}
+		.add_btn{
+			background: #2772FB;
+			width: 212rpx;
+			height: 86rpx;
+			margin: 74rpx auto;
+			line-height: 86rpx;
+			border-radius: 43rpx;
+			color: #FFFFFF;
+		}
+	}
 </style>

+ 23 - 17
pages/mine/myAccount/bankList.vue

@@ -6,14 +6,14 @@
 				<view class="text2">(共{{bankList?bankList.length:0}}张)</view>
 			</view> -->
 
-			<view @click="addBankCard" class="add-bankcard flex">
+			<view v-if='bankList.length==0' @click="addBankCard" class="add-bankcard flex">
 				<view class="car-text">添加银行卡</view>
 				<u-icon class="icon" name="plus-circle-fill" color="#2979ff" size="24"></u-icon>
 			</view>
-
+			<view v-else><image style='width:17px;height:17px;' @click="del()" src="../../../static/mine/sanchu.png" mode=""></image></view>
 		</view>
 		<!-- <image src="../../../static/images/mine/bank/nongyelogo.png" mode=""></image> -->
-		<view class="card-list" v-for="(item,index) in bankList" :key='index' @click="bankCheng(item)">
+		<view class="card-list" v-for="(item,index) in bankList" @click="bankCheng(item)">
 			<view class="card-list-item" :style='{"background-image":"url("+item.cardColor+")"}'>
 				<view class="flex flex-end number carNumber">{{item.bankCard}}</view>
 				<view class="flex align-center">
@@ -26,16 +26,6 @@
 					</view>
 				</view>
 			</view>
-
-			<view class="flex flex-space-between row2 align-center">
-				<view class="flex align-center">
-					<radio :checked="item.defaultFlag==1" @click='radioChange(item)' />
-					<view class="default-card">设为默认收款账户</view>
-				</view>
-				<view>
-					<u-icon name="trash" size="24" @click="del(item,index)"></u-icon>
-				</view>
-			</view>
 		</view>
 		<!-- <view @click="addBankCard">添加银行卡</view> -->
 		 <u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true' confirmColor='#2772FB'  @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
@@ -66,6 +56,9 @@
 			}
 			this.init();
 		},
+		onShow() {
+			this.init();
+		},
 		methods: {
 			bankCheng(item){
 				uni.setStorageSync("bankInfo",item)
@@ -211,7 +204,20 @@
 					});
 			},
 			addBankCard() {
-				uni.$u.route('/pages/mine/manageBankCards/addBankCard');
+				var _this = this;
+				// this.dataDetails.driverId = this.userInfo.driverId
+				_this.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', { //查身份证号
+					phone: uni.getStorageSync("userInfo").phone
+				}).then(res => {
+					if(res.data.authenticationStatus=='已认证'){
+						uni.$u.route('/pages/mine/manageBankCards/addBankCard');
+					}else{
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "请先进行身份认证!",
+						})
+					}
+				})
 			},
 			edit() {
 				uni.$u.route('/pages/mine/manageBankCards/editBankCard');
@@ -224,9 +230,9 @@
 					...params
 				})
 			},
-			del(val, index) {
-				this.obj = val
-				this.index = index
+			del() {
+				this.obj = this.bankList[0]
+				this.index =0
 				this.isShowAlert = true
 		
 			}

+ 87 - 47
pages/mine/myAccount/bill.vue

@@ -1,24 +1,33 @@
 <template>
 	<view class="center">
-		<view style='border-bottom:1px solid #ccc;' class="" @click="dataShow = true">{{data}}</view>
+		<view @click="dataShow = true" class="data_top">{{data}} 年
+			<image src="../../../static/images/myimg/gengduo1@3x.png" mode=""
+				style="width:12rpx ;height: 20rpx;margin-left: 20rpx;"></image>
+		</view>
 		<u-picker :show="dataShow" :columns="columns" @confirm="dataChange" @cancel="dataShow = false"
 			@close="dataShow = false"></u-picker>
-			<view v-if='formlist.length>0'>
-				<view class="formData" v-for="(item,index) in formlist">
-					<view class="flex row">
-						<view class="left-text">{{item.types}}</view>
-						<view class="flex right-text">
-							{{item.amountMoney}}
-						</view>
+		<view v-if='formlist.length>0' class="dataInfo_css">
+			<view class="formData" v-for="(item,index) in formlist" @click="billSee(item)">
+				<view class="flex row">
+					<view class="left-text">{{item.types}}</view>
+					<view class="flex right-text">
+						{{item.amountMoney}}
+					</view>
+				</view>
+				<view class="flex">
+					<view class="order_no">
+						
+						<text v-if="item.types == '提现'">{{item.status}}</text>
+						<text v-else>{{item.orderNo?item.orderNo:""}}</text>
+						
 					</view>
 					<view class="date_css">
 						{{item.createDate}}
 					</view>
-
 				</view>
 			</view>
-		<view v-else style='text-align:center;padding:10px;'>暂无账单</view>
-
+		</view>
+		<view v-else class="noBill">暂无账单</view>
 	</view>
 </template>
 
@@ -55,6 +64,11 @@
 
 		},
 		methods: {
+			billSee(val){
+				if(val.types == '提现'){
+					uni.$u.route('/pages/mine/myAccount/billView?id=' + val.id)
+				}
+			},
 			dataChange(e) {
 				this.data = e.value[0]
 				this.dataShow = false
@@ -94,43 +108,69 @@
 
 <style lang="scss" scoped>
 	.center {
-		padding: 20rpx;
-
-		.formData {
-			.tips {
-				text-align: right;
-				border-bottom: 2rpx solid #e6e6e6;
-				height: 60rpx;
-			}
-
-			.row {
-				margin: 30rpx 0;
-			}
-
-			.left-text {
-				// background: red;
-				width: 40%;
-				color: #333333;
-				display: flex;
-				align-items: center;
-			}
-
-			.right-text {
-				width: 60%;
-				justify-content: flex-end;
-			}
-
-			.date_css {
-				text-align: right;
+		// padding:0 20rpx;
+		background: #F5F6FA;
+		height: calc(100vh - 1vh);
+		overflow: scroll;
+		.data_top{
+			padding: 20rpx 30rpx 0;
+			background: #ffffff;
+			height: 80rpx;
+		}
+		.dataInfo_css{
+			padding: 10rpx 30rpx 20px;
+			background: #ffffff;
+			width: 85%;
+			border-radius: 20rpx;
+			margin: 20rpx auto;
+			
+			.formData {
+				height: 140rpx;
+				border-bottom: 2rpx solid #EEEEEE ;
+				.tips {
+					text-align: right;
+					border-bottom: 2rpx solid #e6e6e6;
+					height: 60rpx;
+				}
+			
+				.row {
+					margin: 30rpx 0;
+				}
+			
+				.left-text {
+					// background: red;
+					width: 40%;
+					color: #333333;
+					display: flex;
+					align-items: center;
+				}
+			
+				.right-text {
+					width: 60%;
+					justify-content: flex-end;
+				}
+			
+				.order_no {
+					width: 50%;
+					color: #999999 ;
+					font-size: 28rpx;
+				}
+			
+				.date_css {
+					width: 50%;
+					text-align: right;
+					color: #999999 ;
+					font-size: 28rpx;
+				}
 			}
 		}
+		.noBill{
+			text-align:center;padding:10px;
+			background: #FFFFFF;
+			width: 90%;
+			margin: 20rpx auto;
+			border-radius: 20rpx;
+			height: 70rpx;
+		}
 	}
 </style>
-uni.setStorageSync('userInfo', res.data)
-helper.getListByUserId()
-that.$store.commit('login', res.data)
-// that.liangxinLogin()
-uni.switchTab({
-url: '/pages/order/index'
-});
-uni.hideLoading()

+ 92 - 0
pages/mine/myAccount/billView.vue

@@ -0,0 +1,92 @@
+<template>
+	<view class="center">
+		<view class="formData">
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left">提现金额</view>
+				<view class="flex right">
+					<u--input placeholder="暂无" inputAlign='right' border="none"
+						v-model="dataInfo.amountMoney" readonly>
+					</u--input>
+					<text v-if="dataInfo.amountMoney" style="margin-left: 10rpx;">元</text>
+				</view>
+			</view>
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left">发起时间</view>
+				<view class="flex right">
+					<u--input placeholder="暂无" inputAlign='right' border="none"
+						v-model="dataInfo.createDate" readonly>
+					</u--input>
+				</view>
+			</view>
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left">到账时间</view>
+				<view class="flex right">
+					<u--input placeholder="暂无" inputAlign='right' border="none"
+						v-model="dataInfo.paymentDate" readonly>
+					</u--input>
+				</view>
+			</view>
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left">流水号</view>
+				<view class="flex right">
+					<u--input placeholder="暂无" inputAlign='right' border="none"
+						v-model="dataInfo.serialNumber" readonly>
+					</u--input>
+				</view>
+			</view>
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left">到账银行</view>
+				<view class="flex right">
+					<u--input placeholder="暂无" inputAlign='right' border="none"
+						v-model="dataInfo.bankDeposit" readonly>
+					</u--input>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		data(){
+			return{
+				id:"",
+				dataInfo:{}
+			}
+		},
+		onLoad(options) {
+			this.id = options.id
+			this.getList()
+		},
+		onShow() {},
+		methods:{
+			getList(){
+				this.$request.baseRequest('get', '/hyCargoOwnerCapitalInfo/gethyCargoOwnerCapitalInfo', {
+					id: this.id
+				}).then(res => {
+					this.dataInfo = res.data
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.center{
+		padding: 20rpx 0;
+		background: #F5F6FA;
+		height: calc(100vh - 10vh);
+	}
+	.formData{
+		padding: 20rpx 40rpx;
+		background: #ffffff;
+		.left{
+			text-align: left;
+			width: 20%;
+		}
+		.right{
+			text-align: right;
+			width: 80%;
+		}
+	}
+</style>

+ 117 - 37
pages/mine/myAccount/index.vue

@@ -1,24 +1,30 @@
 <template>
 	<view class="center">
-		<view class="" v-if="accountType == '2'">
-			{{dataInfo.companyName}}
-		</view>
-		<view class="flex account">
-			<view class="account_info">
-				可用余额
-				<view class="money">
-					{{dataInfo.accountBalance?dataInfo.accountBalance:0}}元
-				</view>
+		<view v-if="accountType == 1">
+			<view class="account">
+				<image src="../../../static/images/myAccount/qian.png" mode="" class="account_img"></image>
+			</view>
+			<view class="money">可用余额</view>
+			<view class="money_number">{{dataInfo.accountBalance?dataInfo.accountBalance:0}}<span class="yuan">元</span>
+			</view>
+			<view class="money_no">(已冻结:<span class="number">{{dataInfo.frozenAmount?dataInfo.frozenAmount:0}}</span>元)
 			</view>
-			<view class="account_info">
-				已冻结
-				<view class="money">
-					{{dataInfo.frozenAmount?dataInfo.frozenAmount:0}}元
+			<view class="next_btn" @click="withdrawal">提现</view>
+		</view>
+		<view v-else>
+			<view class="company_account">
+				<view class="company_money">可用余额(元)</view>
+				<view class="flex company_center">
+					<view class="company_money_number">{{dataInfo.accountBalance?dataInfo.accountBalance:0}}</view>
+					<view class="company_next" @click="withdrawal">
+						<view class="btn">
+							提现
+						</view>
+					</view>
 				</view>
+				<view class="company_money_no">(已冻结:{{dataInfo.frozenAmount?dataInfo.frozenAmount:0}} 元)</view>
 			</view>
 		</view>
-		<u-button type="primary" text="提现" @click="withdrawal"></u-button>
-
 	</view>
 </template>
 
@@ -28,50 +34,45 @@
 			return {
 				dataInfo: {},
 				accountType: '', //accountType  1个人 2企业
-				id:"",//如果是企业  公司id
-
+				id: "", //如果是企业  公司id
 			}
 		},
 		onLoad(options) {
 			if (options.id) { //我的企业进来的
 				this.accountType = '2'
 				this.id = options.id
-				console.log(this.dataInfo)
-			} else {  //个人账户
+			} else { //个人账户
 				this.accountType = '1'
 			}
 		},
 		onShow() {
-			
-				this.getList()
-			
-
+			this.getList()
 		},
 		onNavigationBarButtonTap(e) {
-			uni.$u.route('/pages/mine/myAccount/bill?type=' + this.accountType+'&id='+this.id)
+			uni.$u.route('/pages/mine/myAccount/bill?type=' + this.accountType + '&id=' + this.id)
 		},
 		methods: {
 			getList() {
-				if(this.accountType == '1'){
+				if (this.accountType == '1') {
 					this.$request.baseRequest('get', '/cargoOwnerInfo/selectAccount', {
 						commonId: uni.getStorageSync("userInfo").id
 					}).then(res => {
 						this.dataInfo = res.data
 					})
-				}else if(this.accountType == '2'){
+				} else if (this.accountType == '2') {
 					this.$request.baseRequest('get', '/cargoOwnerInfo/selectAccountBalance', {
-						id:this.id,
-						flag:this.accountType
+						id: this.id,
+						flag: this.accountType
 					}).then(res => {
 						this.dataInfo = res.data
 					})
 				}
 			},
 			withdrawal() {
-				if(this.accountType == '1'){
-					uni.$u.route("/pages/mine/myAccount/withdrawal?id=" + this.dataInfo.id +"&flag=" + this.accountType)
-				}else if(this.accountType == '2'){
-					uni.$u.route("/pages/mine/myAccount/withdrawal?id=" + this.id +"&flag=" + this.accountType)
+				if (this.accountType == '1') {
+					uni.$u.route("/pages/mine/myAccount/withdrawal?id=" + this.dataInfo.id + "&flag=" + this.accountType)
+				} else if (this.accountType == '2') {
+					uni.$u.route("/pages/mine/myAccount/withdrawal?id=" + this.id + "&flag=" + this.accountType)
 				}
 			},
 		}
@@ -81,20 +82,99 @@
 <style lang="scss" scoped>
 	.center {
 		padding: 20rpx;
+		text-align: center;
 
 		.account {
+			width: 100%;
+			height: 250rpx;
 			margin-top: 30rpx;
+			margin: 0 auto;
+			text-align: center;
 
-			.account_info {
-				width: 50%;
-				text-align: center;
+			.account_img {
+				width: 100rpx;
+				height: 100rpx;
+				margin-top: 200rpx;
 			}
+		}
+
+		.money {
+			margin-top: 90rpx;
+			font-size: 32rpx;
+			// margin: 40rpx;
+		}
+
+		.money_number {
+			font-size: 68rpx;
+			font-weight: 500;
+			margin-top: 20rpx;
 
-			.money {
-				margin: 40rpx;
+			.yuan {
+				font-size: 36rpx;
+				margin-left: 6rpx;
 			}
 		}
 
+		.money_no {
+			margin-top: 20rpx;
+			color: #999999;
+			font-size: 28rpx;
+
+			.number {
+				color: #2a74fb;
+				margin: 0 10rpx;
+			}
+		}
 
+		.next_btn {
+			background: #2772FB;
+			color: #FFFFFF;
+			padding: 25rpx 0;
+			border-radius: 60rpx;
+			margin-top: 100rpx;
+		}
+
+		// 公司账户
+		.company_account {
+			padding-top: 60rpx;
+			text-align: left;
+			color: #FFFFFF;
+			height: 280rpx;
+			border-radius: 10rpx;
+			background: linear-gradient(45deg, #2873fb, #4385fd, #5f98ff);
+
+			.company_money {
+				margin-left: 40rpx;
+				font-size: 30rpx;
+			}
+
+			.company_center {
+				margin: 20rpx;
+
+				.company_money_number {
+					width: 50%;
+					font-size: 70rpx;
+					margin-left: 20rpx;
+				}
+
+				.company_next {
+					width: 50%;
+					text-align: center;
+					line-height: 60rpx;
+					color: #2772FB;
+				}
+
+				.btn {
+					padding: 12rpx 0;
+					width: 180rpx;
+					background: #ffffff;
+					margin: 0 auto;
+					border-radius: 30px;
+				}
+			}
+			.company_money_no {
+				margin-left: 40rpx;
+			}
+		}
 	}
 </style>

+ 72 - 20
pages/mine/myAccount/withdrawal.vue

@@ -1,18 +1,26 @@
 <template>
 	<view class="center">
 		<view class="formData">
-			<view class="flex row">
-				<view class="left-text">提现金额</view>
-				<view class="flex right-text">
-					<u--input placeholder="输入提现金额" inputAlign='right' border="none" clearable
-						v-model="formInfo.amountMoney" type="number">
-					</u--input>
+			<view class="formData_top">
+				<view class="flex row">
+					<view class="left-text">提现金额</view>
+					<view class="flex right-text">
+						<u--input placeholder="输入提现金额" inputAlign='right' border="none" clearable
+							v-model="formInfo.amountMoney" type="number">
+						</u--input>
+					</view>
+				</view>
+				<view class="tips flex">
+					
+					<view style="width: 60%;">
+						<span class="qian">¥</span>
+						可提现{{usableMoney}}元
+					</view>
+					<view style="color: #007AFF;text-align: right;width: 40%;margin-top: 30rpx;" @click="writeIn">全部提现</view>
 				</view>
 			</view>
-			<view class="tips">
-				可提现金额{{usableMoney}}元,<span style="color: #007AFF;" @click="writeIn">全部提现</span>
-			</view>
-			<view class="flex row">
+			<view class="formData_bottom">
+				<view class="flex row">
 				<view class="left-text">提现到银行卡</view>
 				<view class="flex right-text" @click="bankChange">
 					{{formInfo.bankDeposit?formInfo.bankDeposit:"请选择收款账户"}} {{bankNo}}
@@ -44,19 +52,23 @@
 				</view>
 			</view>
 			<view class="flex row">
-				<view class="left-text">收款人姓名</view>
+				<view class="left-text">收款</view>
 				<view class="flex right-text">
 					<u--input placeholder="自动获取" inputAlign='right' border="none" clearable
 						v-model="formInfo.cardholderName">
 					</u--input>
 				</view>
 			</view>
+			</view>
+
+			
 		</view>
 		<u-toast ref="uToast"></u-toast>
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
 			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick"
 			@cancel="cancelClick"></u-modal>
-		<u-button type="primary" text="提交" @click="submit"></u-button>
+			<view @click="submit" class='newlyIncreased'>提交</view>
+		<!-- <u-button type="primary" text="提交" @click="submit" class="btn_css"></u-button> -->
 	</view>
 </template>
 
@@ -121,7 +133,7 @@
 					id: this.id,
 					flag: this.flag
 				}).then(res => {
-					this.usableMoney = Number(res.data.accountBalance) 
+					this.usableMoney = Number(res.data.accountBalance)
 				})
 			},
 			writeIn() {
@@ -136,6 +148,13 @@
 					})
 					return true
 				}
+				if (this.formInfo.amountMoney <= 0) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "请输入提现金额!",
+					})
+					return true
+				}
 				if (Number(this.usableMoney) < Number(this.formInfo.amountMoney)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -212,17 +231,37 @@
 <style lang="scss" scoped>
 	.center {
 		padding: 20rpx;
+		background: #F5F6FA;
+		height: calc(100vh - 9.9vh);
 
-		// .row {
-		// 	margin: 30rpx;
-		// }
+		.btn_css{
+			margin-top: 45rpx;
+		}
 		.formData {
-			.tips {
-				text-align: right;
-				border-bottom: 2rpx solid #e6e6e6;
-				height: 60rpx;
+			.formData_top {
+				background: #ffffff;
+				height: 200rpx;
+				padding: 10rpx 30rpx;
+				border-radius: 20rpx;
+
+				.tips {
+					width: 100%;
+					height: 60rpx;
+					color: #C6CBD5 ;
+					.qian {
+						font-size: 62rpx;
+						color: #333333 ;
+					}
+				}
+			}
+			.formData_bottom{
+					background: #ffffff;
+					padding: 10rpx 30rpx;
+					border-radius: 20rpx;
+					margin-top: 20rpx;
 			}
 
+
 			.row {
 				margin: 30rpx 0;
 			}
@@ -242,4 +281,17 @@
 		}
 
 	}
+	.newlyIncreased {
+		width: 100%;
+		height: 80rpx;
+		margin: 20px auto;
+		text-align: center;
+		color: #fff;
+		background: #2772FB;
+		background-size: 100%;
+		border-radius: 50rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
 </style>

+ 6 - 4
pages/mine/set.vue

@@ -27,6 +27,8 @@
 				</view>
 				<image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image>
 			</view> -->
+		</view>
+		<view class='wrap'>
 			<view class='flex flex-space-between wrap-item' @click='UpdataPassword'>
 				<view>
 					<text>修改密码</text>
@@ -41,19 +43,19 @@
 				</view>
 				<image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image>
 			</view>
-			<u-line color="#EEEEEE" class="line"></u-line>
+			<!-- <u-line color="#EEEEEE" class="line"></u-line>
 			<view class='flex flex-space-between wrap-item' @click='clearStorage'>
 				<view>
 					<text>清除缓存</text>
 				</view>
 				<image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image>
-			</view>
+			</view> -->
 		</view>
 		<view class='exitloginwrap'>
 			<button @click='logoutAlert()' class='exitlogin'>退出登录</button>
 		</view>
 		<u-modal :show="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
-			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' :title='title'
+			:content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#2772FB' confirm-text='确定' :title='title'
 			:showCancelButton='false' :content="content" @confirm="logout" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
@@ -172,7 +174,7 @@
 			},
 			fankui() {
 				uni.navigateTo({
-					url: `/pages/user/fankui`
+					url: `/pages/mine/settings/fankui`
 				})
 			},
 			logoutAlert() {

+ 46 - 41
pages/mine/settings/editPassword.vue

@@ -2,30 +2,28 @@
 	<view class="u-page content">
 		<u-icon class="back-btn" name="arrow-left" color="black" size="20" @click="navBack"></u-icon>
 		<view class="wrapper">
-				<h2 class="Semibold">重置密码</h2>
+			<h2 class="Semibold">重置密码</h2>
 			<u--form labelPosition="left" :model="registerData" ref="registerForm" labelWidth="80">
 				<u-form-item label="手机号" prop="phone" borderBottom>
-					<u--input v-model="registerData.phone" border="none" maxlength="11" placeholder="请输入手机号码"></u--input>
+					<u--input v-model="registerData.phone" border="none" maxlength="11" placeholder="请输入手机号码">
+					</u--input>
 				</u-form-item>
-			
-				<u-form-item label="验证码" prop="code"borderBottom>
+				<u-form-item label="验证码" prop="code" borderBottom>
 					<u--input v-model="registerData.verifyCode" border="none" placeholder="请填写验证码"></u--input>
-					<button  :disabled="disabled1" class="code-style code-small" @tap="getCode">{{tips}}</button>
+					<button :disabled="disabled1" class="code-style code-small" @tap="getCode">{{tips}}</button>
 				</u-form-item>
 				<u-form-item label="新密码" prop="password" borderBottom>
 					<u--input v-model="registerData.password" border="none" placeholder="请输入新密码,6-16位字符"></u--input>
 				</u-form-item>
-			
-				<u-code ref="uCode" @change="codeChange" seconds="60" @start="disabled1 = true" @end="disabled1 = false">
+
+				<u-code ref="uCode" @change="codeChange" seconds="60" @start="disabled1 = true"
+					@end="disabled1 = false">
 				</u-code>
 			</u--form>
-			<button class="code-style reset">重置密码</button>
+			<button class="code-style reset" @click="reset">重置密码</button>
 		</view>
-
-
 	</view>
 </template>
-
 <script>
 	import {
 		mapState
@@ -117,46 +115,50 @@
 				} else {
 					uni.$u.toast('请输入正确手机号');
 				}
-
 			},
-
-
 			//修改密码
 			reset() {
+				if (this.registerData.password.length < 6) {
+					uni.showToast({
+						title: '密码请输入6-16字符格式',
+						icon: 'none',
+						duration: 2000
+					})
+					return
+				}
 				uni.showLoading({
-					title: '加载中1'
+					title: '加载中'
 				})
 				this.$refs.registerForm.validate().then(res => {
 					uni.$u.toast('校验通过')
 					_this.isLoading = true
 					_this.registerData.identification = 2
 					_this.$request.baseRequest('post', '/commonUser/resetPassword', _this.registerData).then(
-						res => {
-							// 获得数据
-							if (res.code == 200) {
-								uni.clearStorageSync();
-								this.$request.baseRequest('post', '/auth/api/logout').then(res => {
-									
-								})
-								this.$store.commit('logout')
-								// this.$api.logout()
+							res => {
+								// 获得数据
+								if (res.code == 200) {
+									uni.clearStorageSync();
+									this.$request.baseRequest('post', '/auth/api/logout').then(res => {
+									})
+									this.$store.commit('logout')
+									// this.$api.logout()
 									uni.showToast({
 										title: '修改成功',
 										icon: 'none',
 										duration: 2000
 									})
-							uni.navigateTo({
-								url: `/pages/public/login`
+									uni.navigateTo({
+										url: `/pages/public/login`
+									})
+								} else {
+									uni.showToast({
+										title: "系统异常或验证码已过期,请退出重试",
+										icon: 'none',
+										duration: 2000
+									})
+								}
+								uni.hideLoading()
 							})
-							} else {
-								uni.showToast({
-									title: "系统异常或验证码已过期,请退出重试",
-									icon: 'none',
-									duration: 2000
-								})
-							}
-							uni.hideLoading()
-						})
 						.catch(res => {
 							uni.$u.toast(res.message)
 						});
@@ -199,15 +201,18 @@
 		background: #2772FB;
 		color: white;
 	}
-	.reset{
+
+	.reset {
 		margin-top: 50rpx;
 	}
-	.Semibold{
+
+	.Semibold {
 		margin-bottom: 50rpx;
 	}
-	.code-small{
-		width:200rpx;
-		height:60rpx;
-		font-size:24rpx;
+
+	.code-small {
+		width: 200rpx;
+		height: 60rpx;
+		font-size: 24rpx;
 	}
 </style>

+ 30 - 0
pages/mine/settings/fankui.vue

@@ -0,0 +1,30 @@
+<template>
+	<view>
+		<suggest @submit="submit"></suggest>
+	</view>
+</template>
+
+<script>
+	import suggest from "@/components/bert-suggest/suggest.vue"
+	export default {
+	    components: { suggest },
+	    methods: {
+	        submit(v) {
+				uni.showModal({
+					title: '提示',
+					content: "感谢您提供反馈意见,我们将立即联系您",
+					showCancel: false,
+					confirmText: '确定',
+					success: () => {
+						uni.navigateBack()
+					}
+				})
+	            console.log(v)
+	        }
+	    }
+	}
+</script>
+
+<style>
+
+</style>

+ 28 - 25
pages/news/index.vue

@@ -77,24 +77,27 @@
 				mescroll: null
 			}
 		},
-		async onLoad() {
-			that = this
-			// #ifdef APP-PLUS
-			let _status = await that.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
-				phone: this.userInfo.phone,
-			}).then(res => {
-				return res.data.authenticationStatus
-			})
-			if (_status == '已禁用') {
-				this.isShowAlert = true
-				this.alertTitle = '账号审核中'
-				this.confirmText = '退出APP'
-				this.showCancelButton = false
-			} else {
-				console.log(1231233212332312312213)
-			}
-			// #endif
+		// async onLoad() {
+		// 	that = this
+		// 	// #ifdef APP-PLUS
+		// 	let _status = await that.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
+		// 		phone: this.userInfo.phone,
+		// 	}).then(res => {
+		// 		return res.data.authenticationStatus
+		// 	})
+		// 	if (_status == '已禁用') {
+		// 		this.isShowAlert = true
+		// 		this.alertTitle = '账号审核中'
+		// 		this.confirmText = '退出APP'
+		// 		this.showCancelButton = false
+		// 	} else {
+		// 		console.log(1231233212332312312213)
+		// 	}
+		// 	// #endif
 
+		// },
+		onLoad() {
+		
 		},
 		onShow() {
 			var that=this
@@ -104,7 +107,6 @@
 				if (res3.data||res3.data==0) {
 					let name = 'myTip';
 					let value = res3.data
-					console.log(value,111111)
 					if (value == 0) {
 						uni.removeTabBarBadge({
 							index: 2
@@ -172,19 +174,21 @@
 					});
 			},
 			read(val) {
-				uni.$u.route("/pages/news/newsSee?_obj="+JSON.stringify(val))
+			     let that = this
 				if(val.newsType == "投诉结果" || val.newsType == "举报结果"){
 					uni.$u.route("/pages/news/feedbackResults?id=" + val.bussId + "&type=" + val.newsType)
-				}
+				}else{
+					uni.$u.route("/pages/news/newsSee?_obj=" + JSON.stringify(val))
+					}
 				uni.showLoading({
 					title: '加载中',
 					mask: true
 				})
-				this.$request.baseRequest('post', '/newsInfo/api/editNewsInfo', {
+				that.$request.baseRequest('post', '/newsInfo/api/editNewsInfo', {
 						id: val.id,
 					}).then(res => {
-						this.mescroll.resetUpScroll()
-						this.look()
+						that.mescroll.resetUpScroll()
+						that.look()
 						uni.hideLoading()
 					})
 					.catch(res => {
@@ -192,14 +196,13 @@
 					});
 			},
 			look() {
+				let that = this
 				that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
 					reCommonId: this.userInfo.id,
 				}).then(res3 => {
-
 					if (res3.data || res3.data == 0) {
 						let name = 'myTip';
 						let value = res3.data
-						console.log(value)
 						if (value == 0) {
 							uni.removeTabBarBadge({
 								index: 2

+ 55 - 47
pages/order/addEvaluation.vue

@@ -7,7 +7,7 @@
 					<view>{{objData.goodName}}</view>
 				</view>
 				<view class="flex align-center">
-					<image :src="objData.driverPortrait" mode="widthFix" class="tx-img"></image>
+					<image :src="objData.driverPortrait"  class="tx-img"></image>
 					<view>{{objData.driverName}}</view>
 				</view>
 			</view>
@@ -16,8 +16,7 @@
 					@click="clickStar(index)">
 					<view class="flex" style="margin: 10rpx 0;">
 						<view class="ziti">{{item.name}}</view>
-						<start :count="item.count" style="" size="35" activeIcon="heart-fill" inactiveIcon="heart"
-							activeColor="#ffaa00" v-model="item.value1" @change="getVal" :size="22">
+						<start :value="item.value1" style="" size="35" @change="getVal" :size="36">
 						</start>
 					</view>
 
@@ -84,31 +83,31 @@
 				rate: [{
 						name: "司机信用",
 						count: "5",
-						value1: '0',
+						value1: '5',
 						level: '非常好'
 					},
 					{
 						name: "运输效率",
 						count: "5",
-						value1: '0',
+						value1: '5',
 						level: '非常好'
 					},
 					{
 						name: "运输安全",
 						count: "5",
-						value1: '0',
+						value1: '5',
 						level: '非常好'
 					},
 					{
-						name: "运输安全",
+						name: "服务质量",
 						count: "5",
-						value1: '0',
+						value1: '5',
 						level: '非常好'
 					},
 					{
 						name: "满意度",
 						count: "5",
-						value1: '0',
+						value1: '5',
 						level: '非常满意'
 					}
 				],
@@ -123,44 +122,13 @@
 			}
 		},
 		onNavigationBarButtonTap() {
+			// console.log(12121,uni.$u,this)
 			// debugger
-			let _data = {
-				evaluatoredId: this.objData.commonId,
-				evaluatorId: this.objData.cargoCommonId,
-				ownerName: this.checkboxValue1 ? this.objData.cargoOwner : '',
-				driverName: this.objData.driverName,
-				ownerPortrait: this.checkboxValue1 ? this.userInfo.avatarUrl : '',
-				orderId: this.objData.id,
-				orderNumber: this.objData.orderNo,
-				driverCredit: this.rate[0].value1,
-				tranEfficiency: this.rate[1].value1,
-				tranSafety: this.rate[2].value1,
-				serviceQuality: this.rate[3].value1,
-				satisfaction: this.rate[4].value1,
-				ownerContent: this.value3,
-				ownerUrl: this.imageList.toString(),
-				ownerAnonymous: this.checkboxValue1.length != 0 ? 1 : 0
-
-			}
-			that.$request.baseRequest('post', '/evaluateInfo/api/addEvaluateInfo', _data).then(res => {
-				if (res.code == 200) {
-					this.$refs.uToast.show({
-						type: 'success',
-						message: "评价成功",
-						complete() {
-							uni.navigateBack({
-								delta:1
-							})
-						}
-					})
-				} else {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "评价失败",
-					})
-				}
-			})
+			uni.$u.throttle(this.submit, 500)
+			// uni.$u.debounce(this.submit, 500)
+			
 		},
+		
 		onLoad(options) {
 			that = this
 			this.objData = JSON.parse(options.val)
@@ -168,8 +136,47 @@
 			that.imageList = []
 		},
 		methods: {
+			submit(){
+				// console.log(11111111)
+				let _data = {
+					evaluatoredId: this.objData.commonId,
+					evaluatorId: this.objData.cargoCommonId,
+					ownerName: this.checkboxValue1 ? this.objData.cargoOwner : '',
+					driverName: this.objData.driverName,
+					ownerPortrait: this.checkboxValue1 ? this.userInfo.avatarUrl : '',
+					orderId: this.objData.id,
+					orderNumber: this.objData.orderNo,
+					driverCredit: this.rate[0].value1,
+					tranEfficiency: this.rate[1].value1,
+					tranSafety: this.rate[2].value1,
+					serviceQuality: this.rate[3].value1,
+					satisfaction: this.rate[4].value1,
+					ownerContent: this.value3,
+					ownerUrl: this.imageList.toString(),
+					ownerAnonymous: this.checkboxValue1.length != 0 ? 1 : 0
+				
+				}
+				that.$request.baseRequest('post', '/evaluateInfo/api/addEvaluateInfo', _data).then(res => {
+					if (res.code == 200) {
+						this.$refs.uToast.show({
+							type: 'success',
+							message: "评价成功",
+							complete() {
+								uni.navigateBack({
+									delta:1
+								})
+							}
+						})
+					} else {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "评价失败",
+						})
+					}
+				})
+			},
 			clickStar(index) {
-				console.log(index)
+				console.log(index,this.starIndex)
 				this.selectStar = index
 				if (index == 0 || index == 1 || index == 2 || index == 3) {
 					if (this.starIndex == '1') {
@@ -183,7 +190,6 @@
 					} else if (this.starIndex == '5') {
 						this.rate[index].level = '非常好'
 					}
-
 				} else {
 					if (this.starIndex == '1') {
 						this.rate[index].level = '极不满意'
@@ -300,6 +306,8 @@
 
 	.tx-img {
 		width: 40rpx;
+		height:40rpx;
+		border-radius: 50%;
 		margin-right: 20rpx;
 	}
 </style>

+ 26 - 13
pages/order/driverDetail.vue

@@ -6,7 +6,7 @@
 					<u--image :showLoading="true" :src="driverList.avatarUrl" width="100rpx" height="100rpx" @click=""
 						shape='circle'>
 					</u--image>
-					<view class="name">{{driverList.driverName}}</view>
+					<view class="name">{{driverList.driverCall}} {{driverList.driverSex =="男"?'先生':'女士'}}</view>
 				</view>
 
 				<view class="right flex s-row align-center phone">
@@ -59,15 +59,15 @@
 						<view class="gray fontsize-24">累计发运{{total}}次</view>
 					</view>
 				</view>
-				<view class="right">
+				<view v-if='total>=20' class="right">
 					<view>{{driverList.favorableRate?driverList.favorableRate:0}}%</view>
 					<view class="gray fontsize-24">好评率</view>
 				</view>
 			</view>
 			<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
-				class="mescroll">
+				class="mescroll" style="min-height:350px">
 				<view class="flex flex-space-between">
-					<view :class="haoType == '' ? 'btn-active':'btn'" @click="btnChange('')">全部({{ping.haoPing+ping.chaPing}}})</view>
+					<view :class="haoType == '' ? 'btn-active':'btn'" @click="btnChange('')">全部({{ping.haoPing+ping.chaPing}})</view>
 					<!-- <view :class="btnData == 2 ? 'btn-active':'btn'" @click="btnChange(2)">最新(1)</view> -->
 					<view :class="haoType == 1 ? 'btn-active':'btn'" @click="btnChange(1)">好评({{ping.haoPing}})</view>
 					<view :class="haoType == 2 ? 'btn-active':'btn'" @click="btnChange(2)">差评({{ping.chaPing}})</view>
@@ -96,7 +96,7 @@
 									{{item.driverContent}}
 								</view>
 								<view>
-									<u--image v-for="(item,index) in item.imgList" :src="item" width='170rpx'
+									<u--image v-for="item in item.imgList" :src="item" width='170rpx'
 										height='170rpx' class="img-style">
 									</u--image>
 								</view>
@@ -108,11 +108,16 @@
 		</view>
 		<view class="row5">
 			<view class='carMessage' v-if="tabIndex==1&&index==1">
-				<view class='carMessage-item' v-for='(item,index) in hyDriverCarInfoList' :style="{'border-radius':(index!=hyDriverCarInfoList.length-1?'#ccc':'transparent')}">
-					<view v-if='item.carCategory=="挂车"'>{{item.guaCarNumber}}</view>
+				<view  v-for='(item,index) in hyDriverCarInfoList' :style="{'border-radius':(index!=hyDriverCarInfoList.length-1?'#ccc':'transparent')}">
+					<view v-if='item.status=="已通过"' class='carMessage-item'>
+						<view>{{item.carNumber}}</view>
+					<view class="flex align-center">{{item.carType}} | 车长{{item.carLong}}米 | 载重{{item.carApprovedWeight}}吨</view>
+					</view>
+					
+					<!-- <view v-if='item.carCategory=="挂车"'>{{item.guaCarNumber}}</view>
 					<view v-else>{{item.carNumber}}</view>
 					<view v-if='item.carCategory=="挂车"' class="flex align-center">{{item.carType}} | 车长{{item.guaCarLong}}米 | 载重{{item.guaCarApprovedWeight}}吨</view>
-					<view v-else class="flex align-center">{{item.carType}} | 车长{{item.carLong}}米 | 载重{{item.carApprovedWeight}}吨</view>
+					<view v-else class="flex align-center">{{item.carType}} | 车长{{item.carLong}}米 | 载重{{item.carApprovedWeight}}吨</view> -->
 				</view>
 				
 			</view>
@@ -171,8 +176,8 @@
 			this.show = true
 		},
 		onLoad(options) {
-			// this.dataObj =JSON.parse(options.driver) 
-			// console.log(this.dataObj)
+			this.dataObj =JSON.parse(options.driver) 
+			console.log(this.dataObj)
 			that = this
 			// this.getList()
 		},
@@ -199,7 +204,7 @@
 				});
 			},
 			confirmBtn(e) {
-				console.log(e.value)
+				console.log(this.driverList)
 				if (e.value == '投诉') {
 					uni.$u.route('/pages/order/fk', {
 						val: JSON.stringify(this.driverList)
@@ -229,10 +234,14 @@
 			upCallback(page) {
 				var that =this
 				that.$request.baseRequest('get', '/driverInfo/getDriver', {
-						commonId:'2939c4c23ca14e4ab6f16d7a6b3f8d5e'
+						commonId:this.dataObj.commonId
 					}).then(res => {
 						console.log(res.data)
 						that.driverList=res.data
+						if(that.dataObj){
+							that.driverList.orderId=that.dataObj.id
+							that.driverList.orderNo=that.dataObj.orderNo
+						}
 						if(res.data.hyDriverCarInfoList){
 							for (var i = 0; i < res.data.hyDriverCarInfoList.length; i++) {
 								res.data.hyDriverCarInfoList[i].carApprovedWeight=res.data.hyDriverCarInfoList[i].carApprovedWeight/1000
@@ -241,8 +250,10 @@
 								res.data.hyDriverCarInfoList[i].guaCarLong=res.data.hyDriverCarInfoList[i].guaCarLong/1000
 								res.data.hyDriverCarInfoList[i].carNumber = res.data.hyDriverCarInfoList[i].carNumber.replace(res.data.hyDriverCarInfoList[i].carNumber.substring(2, 6),
 									"****")
-								res.data.hyDriverCarInfoList[i].guaCarNumber = res.data.hyDriverCarInfoList[i].guaCarNumber.replace(res.data.hyDriverCarInfoList[i].guaCarNumber.substring(2, 6),
+								if(res.data.hyDriverCarInfoList[i].guaCarNumber){
+									res.data.hyDriverCarInfoList[i].guaCarNumber = res.data.hyDriverCarInfoList[i].guaCarNumber.replace(res.data.hyDriverCarInfoList[i].guaCarNumber.substring(2, 6),
 								"****")
+								}
 							}
 							that.hyDriverCarInfoList=res.data.hyDriverCarInfoList
 						}
@@ -270,6 +281,7 @@
 								that.total = res.data.total
 								for (let i = 0; i < that.list.length; i++) {
 									if (that.list[i].ownerUrl) {
+										// that.list[i].imgList=[]
 										that.list[i].imgList = that.list[i].ownerUrl.split(',')
 									}
 						
@@ -314,6 +326,7 @@
 <style lang="scss">
 	.content {
 		height: 100vh;
+		overflow: scroll;
 	}
 	.carMessage{
 		background:#fff;border-radius: 20rpx;

+ 51 - 16
pages/order/evaluationRecord.vue

@@ -1,10 +1,10 @@
 <template>
 	<view class="content">
 		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" class="mescroll">
-			<view class="content-list" v-for="(item,index) in list" :key='index'>
+			<view class="content-list" v-for="(item,index) in list">
 				<view class="top flex flex-space-between">
 					<view  class="left flex">
-						<view>
+						<view @click='toDetail(item.orderId)'>
 							{{item.orderNumber}}
 						</view>
 						<u-icon name="arrow-right" color="#ccc" size="18"></u-icon>
@@ -19,7 +19,7 @@
 					</view>
 					<view>{{item.driverName}}</view>
 				</view>
-				<view class="flex align-center name-row">
+				<view class="flex align-center flex-space-between name-row">
 					<view class="sj-row hz-name">
 						司机信用:
 					</view>
@@ -29,7 +29,7 @@
 						</start>
 					</view>
 				</view>
-				<view class="flex align-center name-row">
+				<view class="flex align-center flex-space-between name-row">
 					<view class="sj-row hz-name">
 						运输效率:
 					</view>
@@ -39,7 +39,7 @@
 						</start>
 					</view>
 				</view>
-				<view class="flex align-center name-row">
+				<view class="flex align-center flex-space-between name-row">
 					<view class="sj-row hz-name">
 						运输安全:
 					</view>
@@ -49,7 +49,7 @@
 						</start>
 					</view>
 				</view>
-				<view class="flex align-center name-row">
+				<view class="flex align-center flex-space-between name-row">
 					<view class="sj-row hz-name">
 						服务质量:
 					</view>
@@ -59,7 +59,7 @@
 						</start>
 					</view>
 				</view>
-				<view class="flex align-center name-row">
+				<view class="flex align-center flex-space-between name-row">
 					<view class="sj-row hz-name">
 						满意度:
 					</view>
@@ -98,21 +98,23 @@
 				<view class="pl-style">
 					{{item.ownerContent}}
 				</view>
-				<view class="color2979ff flex">
-					<view @click="clickZK(item)">展开</view>
-					<u-icon name="arrow-down" color="#2979ff" size="18" v-if="item.isOpen"></u-icon>
-					<u-icon name="arrow-up" color="#2979ff" size="18" v-else></u-icon>
-				</view>
-				<view v-if="item.isOpen" class="img-content">
+				<view class="img-content">
 					<u--image :showLoading="true" :src="item1" width="80px" height="80px" class="img"
-						v-for="(item1,index) in item.imgList"></u--image>
+						v-for="item1 in item.imgList"></u--image>
 				</view>
 				<u-line class="line"></u-line>
-				<view class="gray999">
-					{{item.ownerAnonymous==1?"匿名评价":''}}
+				<view class="flex flex-space-between">
+					<view class="gray999">
+						{{item.ownerAnonymous==1?"匿名评价":'未匿名'}}
+					</view>
+					<view style='color:red;' @click='del(item)' class="">
+						删除
+					</view>
 				</view>
+				
 			</view>
 		</mescroll-body>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
@@ -170,6 +172,39 @@
 			that = this
 		},
 		methods: {
+			del(item){
+				var that=this
+				uni.showModal({
+					title: '提示',
+					content: '确定删除评价吗?',
+					success: ({
+						confirm,
+						cancel
+					}) => {
+						if (confirm) {
+							uni.showLoading({title: '加载中',mask:true})
+							that.$request.baseRequest('post', '/evaluateInfo/api/deleteEvaluateInfo', {
+									id: item.id,
+								}).then(res => {
+									that.$refs.uToast.show({
+										type: 'success',
+										message: '删除评论成功',
+									})
+									uni.hideLoading()
+									that.upCallback({size:10,num:1})
+								})
+								.catch(res => {
+									uni.$u.toast(res.message);
+								});	
+						}
+					}
+				});
+			},
+			toDetail(id) {
+				uni.$u.route('/pages/order/orderDetails', {
+					id: id,
+				});
+			},
 			upCallback(page) {
 				that.$request.baseRequest('get', '/evaluateInfo/selectEvaluateInfo', {
 						evaluatorId: this.userInfo.id,

+ 60 - 4
pages/order/fk.vue

@@ -8,13 +8,23 @@
 			</view>
 		</view>
 		<u-line class="line"></u-line>
+		<view class="row1 flex flex-space-between">
+			<view>关联订单(选填)</view>
+			<view style='align-items: center;' class='flex'>
+				<view @click='selectorder'>{{dataDetails.orderNo?dataDetails.orderNo:'选择订单'}}></view>
+			</view>
+		</view>
+		<u-line class="line"></u-line>
 		<view class="row2">
 			<view class="title">投诉信息</view>
-			<u--textarea v-model="value1" placeholder="输入要反馈的内容,10-300字" count maxlength='300'></u--textarea>
+			<u--textarea v-model="value1" placeholder="输入要反馈的内容10-300字" count maxlength='300'></u--textarea>
 			<u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event)" @delete="deletePic"
 				name="1" multiple :maxCount="9"></u-upload>
 		</view>
 		<view class="row3" @click="submit">提交</view>
+		<u-picker :show="isShow" ref="uPicker"  :columns="orderList" keyName="orderNo" @confirm="confirmorder"
+			:closeOnClickOverlay='true' @close='isShow=false' @cancel='isShow=false'>
+		</u-picker>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -24,13 +34,16 @@
 		mapState
 	} from 'vuex';
 	import uploadImage from '@/components/ossutil/uploadFile.js';
+	import permision from "@/js_sdk/wa-permission/permission.js";
 	export default {
 		data() {
 			return {
 				imgList: [],
 				value1: '',
 				fileList1: [],
+				orderList:[],
 				dataDetails: {},
+				isShow:false,
 			};
 		},
 		computed: {
@@ -38,10 +51,51 @@
 		},
 		onLoad(options) {
 			this.dataDetails = JSON.parse(options.val)
+			console.log(this.dataDetails)
 			this.imgList = []
 		},
+		onShow(){
+			uni.showLoading({
+				title: '加载中'
+			})
+			this.$request.baseRequest('get', '/orderInfo/getAssociatedOrder',{
+				commonId: this.dataDetails.commonId,
+				cargoCommonId:this.userInfo.id
+			}).then(res => {
+				let that = this
+				uni.hideLoading()
+				this.orderList=[res.data]
+				// console.log(this.orderList)
+			})
+			.catch(res => {
+				uni.$u.toast(res.message);
+			});
+		},
 		methods: {
+			confirmorder(e){
+				console.log(e)
+				this.dataDetails.orderId=e.value[0].id
+				this.dataDetails.orderNo=e.value[0].orderNo
+				this.isShow=false
+			},
+			selectorder(){
+				this.isShow=true
+			},
 			submit() {
+				if (!this.value1) {
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "投诉信息不能为空!",
+					})
+					return
+				}
+				if (this.value1.length<10||this.value1.length>300) {
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "投诉信息输入错误!",
+					})
+					return
+				}
 				uni.showLoading({
 					title: '加载中'
 				})
@@ -52,6 +106,8 @@
 						passive: this.dataDetails.driverName,
 						passiveNumber: this.dataDetails.driverPhone,
 						passiveCommonId:this.dataDetails.commonId,
+						orderId:this.dataDetails.orderId,
+						orderNo:this.dataDetails.orderNo,
 						content: this.value1,
 						url: this.imgList.toString(),
 						flag: 1,
@@ -63,9 +119,9 @@
 							type: 'success',
 							message: "反馈成功",
 							complete() {
-								uni.$u.route('/pages/order/driverDetail',{
-									driver:JSON.stringify(that.dataDetails)
-								});
+								uni.navigateBack({
+									delta:1
+								})
 								
 							}
 						})

+ 168 - 72
pages/order/index.vue

@@ -17,7 +17,8 @@
 			
 				<view class="fixed1"></view>
 			<view class="fix-content">
-				<u-search placeholder="搜索订单" v-model="searchKeyWord" bgColor='white' :actionStyle='searchStyle'
+				<u-search placeholder="搜索订单" 
+				v-model="searchKeyWord" bgColor='white' :actionStyle='searchStyle'
 					@custom="getSearch" @search="getSearch" :clearabled="true"></u-search>
 				<view class="tab-content">
 					<u-tabs :list="tabList" @click="clickTab" lineColor='transparent' :current='tabIndex'
@@ -30,7 +31,8 @@
 										'border-radius':'40rpx'
 									}" class="tabs"></u-tabs>
 					<view class="right-btn" @click="showMenu=true">
-						<u-icon name="grid-fill" color="white" size="28"></u-icon>
+						<!-- <u-icon name="grid-fill" color="white" size="28"></u-icon> -->
+						<image class="quanbu" src="@/static/images/order/quanbuyewu.png"></image>
 						<view class="">
 							全部
 						</view>
@@ -50,14 +52,16 @@
 			</u-transition>
 			<view class="modal-black" v-show="showMenu" @click="closeMenu"></view>
 		</view>
-		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" class="mescroll">
+		<mescroll-body ref="mescrollRef" :up="upOption" @init="mescrollInit" @down="downCallback" @up="upCallback" class="mescroll">
 	<view class="evaluatePage flex flex-space-between" v-show="tabIndex == 10"  @click="evaluationRecord">
 		<view class="left flex flex-space-between">
-			<u-icon size="20" name="edit-pen"></u-icon>
+			<!-- <u-icon size="20" name="edit-pen"></u-icon> -->
+			<image class="pingjia" src="@/static/images/order/pingjia.png"></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"></image>
+				<!-- <u-icon size="20" name="arrow-right"></u-icon> -->
 		</view>
 		</view>
 			<view :id="'good'+good.id" class="good-list" v-for="good in goods" :key="good.id"
@@ -107,7 +111,8 @@
 						</view>
 						<view class="flex align-center">
 							<view style="margin-right: 20rpx;">运距 {{good.distance}}km</view>
-							<view class="car">{{good.freight?good.freight:good.freightInfo.freight}}{{good.billingMethod==0?'元/吨':'元/车'}}</view>
+							<view v-if="good.cargoOwnerStatus!='已完结'" class="car">{{good.freight?good.freight:good.freightInfo.freight}}{{good.billingMethod==0?'元/吨':'元/车'}}</view>
+							<view v-else class="car">{{good.freight?good.freight:good.freightInfo.freight}}{{good.billingMethod==0?'元/吨':'元/车'}}</view>
 						</view>
 						<!-- 		<view class="right">
 							<view class="flex fontsize-26 row">
@@ -141,6 +146,7 @@
 						<!-- confirmLoading(good,3) -->
 						<view v-if="good.cargoOwnerStatus=='待确认装车'" class="start normal" @click.stop="toDetail(good.id)"
 							>确认装车</view>
+						<view v-if="good.cargoOwnerStatus=='司机驳回运费信息'" class="start normal" @click.stop="toDetail(good.id)">确认运费</view>
 						<!-- <view class="start normal" @click.stop="confirmLoading(good,1)">确认装车</view> -->
 						<view class="start normal" v-if="good.cargoOwnerStatus!='待接单'&&good.cargoOwnerStatus!='未装车'" @click.stop="$helper.contactCustomerService()">
 							联系客服</view>
@@ -183,16 +189,30 @@
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
 			:closeOnClickOverlay='true' :showCancelButton='showCancelButton' @confirm="confirmClick"
 			@close="cancelClick" @cancel="cancelClick" class="modal">
-			<u-radio-group v-model="radiovalue1" placement="" v-if='isShowTerminationReason' class='row'>
-				<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
-					:label="item.name" :name="item.name" @change="radioChange">
-				</u-radio>
-			</u-radio-group>
-			<u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'
-				v-if='isShowTerminationReason'>
-			</u--textarea>
 		</u-modal>
-
+		<u-popup :show="show" mode="bottom" @close="close" @open="open">
+			<view class="">
+				<view >
+					<image style='width:12px;height:12px;' @click='closepopup' class='close'  src="../../static/images/order/guanbi@3x.png" mode=""></image>
+					<!-- <u-icon @click="closepopup" class='close' name="close" size="20"></u-icon> -->
+				</view>
+				
+				<view style='fon-size:34rpx;margin-bottom:20px;text-align:center;font-weight: 600;'>确认终止订单</view>
+				<view style="margin: 0 auto;">
+		           	<u-radio-group iconPlacement="right" v-model="radiovalue1" placement="" >
+		           	<u-radio  :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
+		           		:label="item.name" :name="item.name" @change="radioChange" >
+		           	</u-radio>
+		           </u-radio-group>
+		           </view>
+				   <view style='border-top:10px solid #F2F4F7;position:absolute;left:0;height:0;width:100%;'></view>
+		           <view style='padding:40rpx 0 30rpx;'>终止原因描述</view>
+		           <u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'>
+		           </u--textarea>
+				   <view class='termination' :class="{'active':value2.length>0}" @click='termination'>终止</view>
+			</view>
+		           
+		</u-popup>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -202,15 +222,20 @@
 	import {
 		mapState
 	} from 'vuex';
+	import uniPopup from '@/components/uni-popup/uni-popup.vue'
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	import {
 		apiGoods
 	} from "@/api/mock.js"
 	export default {
+		components:{
+			uniPopup
+		},
 		mixins: [MescrollMixin], // 使用mixin
 		data() {
 			return {
 				confirmText: '',
+				show:false,
 				showCancelButton: true,
 				type: null,
 				objData: {},
@@ -224,6 +249,15 @@
 					margin:'0 20rpx 0 0',
 					"border-radius": '30rpx'
 				},
+				upOption: {
+					page: {
+												size: 10 // 每页数据的数量,默认10
+											},
+											noMoreSize: 0, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
+					empty: {
+						tip: '暂无相关数据'
+					}
+				},
 				searchKeyWord: '',
 				useSearchList: [],
 				mescroll: null,
@@ -231,22 +265,22 @@
 				id: '',
 				value2: '',
 				radiolist1: [{
-						name: '已与货主协商',
+						name: '已与司机协商',
 						disabled: false
 					},
 					{
-						name: '货主原因终止',
+						name: '司机原因终止',
 						disabled: false
 					},
 					{
-						name: '司机个人原因终止',
+						name: '货主个人原因终止',
 						disabled: false
 					}, {
 						name: '其他',
 						disabled: false
 					}
 				],
-				radiovalue1: '已与货主协商',
+				radiovalue1: '已与司机协商',
 				confirmText: '终止',
 				alertTitle: '确定终止订单?',
 				alertContent: "",
@@ -310,28 +344,28 @@
 			// this.getLngLat();
 			//#endif
 		},
-		async onLoad() {
-			that = this
-			// #ifdef APP-PLUS
-			let _status = await that.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
-				phone: this.userInfo.phone,
-			}).then(res => {
-				if(res.data){
-					return res.data.authenticationStatus
-				}
+		// async onLoad() {
+		// 	that = this
+		// 	// #ifdef APP-PLUS
+		// 	let _status = await that.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
+		// 		phone: this.userInfo.phone,
+		// 	}).then(res => {
+		// 		if(res.data){
+		// 			return res.data.authenticationStatus
+		// 		}
 				
-			})
-			if (_status == '已禁用') {
-				this.isShowAlert = true
-				this.alertTitle = '账号审核中'
-				this.confirmText = '退出APP'
-				this.showCancelButton = false
-			} else {
-				console.log(1231233212332312312213)
-			}
-			// #endif
+		// 	})
+		// 	if (_status == '已禁用') {
+		// 		this.isShowAlert = true
+		// 		this.alertTitle = '账号审核中'
+		// 		this.confirmText = '退出APP'
+		// 		this.showCancelButton = false
+		// 	} else {
+		// 		console.log(1231233212332312312213)
+		// 	}
+		// 	// #endif
 
-		},
+		// },
 		onShow() {
 			this.upCallback({
 				size: 10,
@@ -382,6 +416,12 @@
 
 		// },
 		methods: {
+			closepopup(){
+				this.show=false
+			},
+			close(){
+				this.show=false
+			},
 			goTodriverDetail(val){
 				uni.$u.route('/pages/order/driverDetail',{
 					driver:JSON.stringify(val)
@@ -471,8 +511,9 @@
 				// } else {
 				// 	this.isShowTerminationReason = true
 				// }
+					// this.alertTitle = '确定终止订单?'
 				this.id = item.id
-				this.isShowAlert = true
+				this.show = true
 			},
 			init() {
 
@@ -480,17 +521,55 @@
 			del() {
 				this.isShowAlert = true
 			},
-			confirmClick() {
-				// #ifdef APP-PLUS
-				if (this.alertTitle == '账号审核中') {
-					if (uni.getSystemInfoSync().platform == 'ios') {
-						plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
-					} else if (uni.getSystemInfoSync().platform == 'android') {
-						plus.runtime.quit();
-					}
-					return
+			termination(){
+				var that=this
+				let _terminationReason = ''
+				if (this.radiovalue1 == '已与司机协商') {
+					_terminationReason = 1
+				} else if (this.radiovalue1 == '司机原因终止') {
+					_terminationReason = 2
+				} else if (this.radiovalue1 == '货主个人原因终止') {
+					_terminationReason = 3
+				} else if (this.radiovalue1 == '其他') {
+					_terminationReason = 4
 				}
-				// #endif
+					this.$request.baseRequest('post', '/orderInfo/api/end', {
+							id: this.id,
+							terminator: 2,
+							terminationReason: _terminationReason,
+							terminationReasonDescription: this.value2
+						}).then(res => {
+							if (res.code == 200) {
+								this.show=false
+								this.value2=''
+								this.$refs.uToast.show({
+									type: 'success',
+									message: '终止订单成功',
+								})
+							} else {
+								this.$refs.uToast.show({
+									type: 'success',
+									message: '终止订单失败',
+								})
+							}
+							that.mescroll.resetUpScroll()
+						})
+						.catch(res => {
+							uni.$u.toast(res.message);
+						});
+			},
+			confirmClick() {
+				var that =this
+				// // #ifdef APP-PLUS
+				// if (this.alertTitle == '账号审核中') {
+				// 	if (uni.getSystemInfoSync().platform == 'ios') {
+				// 		plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
+				// 	} else if (uni.getSystemInfoSync().platform == 'android') {
+				// 		plus.runtime.quit();
+				// 	}
+				// 	return
+				// }
+				// // #endif
 				that.isShowAlert = false
 				if (this.type == 1 || this.type == 2) {
 					let _title = ''
@@ -508,6 +587,7 @@
 									type: 'success',
 									message: _title,
 									complete() {
+										that.upCallback({size: 10,num: 1})
 										that.mescroll.resetUpScroll()
 									}
 								})
@@ -521,6 +601,7 @@
 									type: 'success',
 									message: _title,
 									complete() {
+										that.upCallback({size: 10,num: 1})
 										that.mescroll.resetUpScroll()
 									}
 								})
@@ -555,28 +636,7 @@
 						.catch(res => {
 							uni.$u.toast(res.message);
 						});
-				} else {
-					this.$request.baseRequest('post', '/orderInfo/api/end', {
-							id: this.id,
-							terminator: 2,
-						}).then(res => {
-							if (res.code == 200) {
-								this.$refs.uToast.show({
-									type: 'success',
-									message: '终止订单成功',
-								})
-							} else {
-								this.$refs.uToast.show({
-									type: 'success',
-									message: '终止订单失败',
-								})
-							}
-							that.mescroll.resetUpScroll()
-						})
-						.catch(res => {
-							uni.$u.toast(res.message);
-						});
-				}
+				} 
 			},
 			cancelClick() {
 				this.isShowAlert = false
@@ -644,6 +704,9 @@
 	.content{
 		padding-bottom: 160px;
 	}
+	.ssx{
+		position:relative;top:3rpx;
+	}
 	.top-content {
 		background: url(../../static/images/order/bg.png) no-repeat;
 		background-size: cover;
@@ -1019,4 +1082,37 @@
 		padding: 20rpx;
 		border-radius: 20rpx;
 	}
+	/deep/.u-popup__content{
+		border-radius: 10px;
+		padding:20px;
+	}
+	/deep/.u-radio{
+		margin:40rpx 0;
+	}
+	.close{
+		position:absolute;
+		right:20px;
+		top:26px;
+	}
+	.termination{
+		background:#F1F3F6;
+		color:#C5CAD4;
+		padding:10px;
+		border-radius:30px;
+		text-align: center;
+		margin-top:30rpx;
+	}
+	.termination.active{
+		background: #2772FB;
+		color: white;
+	}
+	.quanbu{
+		width:16px;
+		height:16px;
+	}
+	.pingjia{
+		width:14px;
+		height:14px;
+	}
+	
 </style>

+ 76 - 1
pages/order/jb.vue

@@ -8,13 +8,23 @@
 			</view>
 		</view>
 		<u-line class="line"></u-line>
+		<view class="row1 flex flex-space-between">
+			<view>关联订单(选填)</view>
+			<view style='align-items: center;' class='flex'>
+				<view @click='selectorder'>{{dataDetails.orderNo?dataDetails.orderNo:'选择订单'}}></view>
+			</view>
+		</view>
+		<u-line class="line"></u-line>
 		<view class="row2">
 			<view class="title">举报信息</view>
-			<u--textarea v-model="value1" placeholder="输入要举报的内容,10-300字" count maxlength='300'></u--textarea>
+			<u--textarea v-model="value1" placeholder="输入要举报的内容10-300字" count maxlength='300'></u--textarea>
 			<u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event)" @delete="deletePic"
 				name="1" multiple :maxCount="9"></u-upload>
 		</view>
 		<view class="row3" @click="submit">提交</view>
+		<u-picker :show="isShow" ref="uPicker"  :columns="orderList" keyName="orderNo" @confirm="confirmorder"
+			:closeOnClickOverlay='true' @close='isShow=false' @cancel='isShow=false'>
+		</u-picker>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -23,26 +33,89 @@
 	import {
 		mapState
 	} from 'vuex';
+	import permision from "@/js_sdk/wa-permission/permission.js"
 	import uploadImage from '@/components/ossutil/uploadFile.js';
+	
 	export default {
 		data() {
 			return {
 				imgList: [],
 				value1: '',
 				fileList1: [],
+				orderList:[],
 				dataDetails: {},
+				isShow:false,
 			};
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
 		},
 		onLoad(options) {
+			this.get_camera_permission()
 			this.dataDetails = JSON.parse(options.val)
 			console.log(this.dataDetails)
 			this.imgList = []
 		},
+		onShow(){
+			uni.showLoading({
+				title: '加载中'
+			})
+			this.$request.baseRequest('get', '/orderInfo/getAssociatedOrder',{
+				commonId: this.dataDetails.commonId,
+				cargoCommonId:this.userInfo.id
+			}).then(res => {
+				let that = this
+				uni.hideLoading()
+				this.orderList=[res.data]
+				// console.log(this.orderList)
+			})
+			.catch(res => {
+				uni.$u.toast(res.message);
+			});
+		},
 		methods: {
+			confirmorder(e){
+				console.log(e)
+				this.dataDetails.orderId=e.value[0].id
+				this.dataDetails.orderNo=e.value[0].orderNo
+				this.isShow=false
+			},
+			selectorder(){
+				this.isShow=true
+			},
+			async get_camera_permission() {
+				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
+				if(photol == false){
+					uni.showModal({
+						title: '提示',
+						content: '您已经关闭相机权限,去设置',
+						success: function (res) {
+							if (res.confirm) {
+								permision.gotoAppPermissionSetting()
+									            // plus.runtime.openURL("app-settings:");
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});	
+				}
+			},
 			submit() {
+				var that=this
+				if (!this.value1) {
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "举报信息不能为空!",
+					})
+					return
+				}
+				if (this.value1.length<10||this.value1.length>300) {
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "举报信息输入错误!",
+					})
+					return
+				}
 				uni.showLoading({
 					title: '加载中'
 				})
@@ -52,6 +125,8 @@
 						commonId: this.userInfo.id,
 						passive: this.dataDetails.driverName,
 						passiveNumber: this.dataDetails.driverPhone,
+						orderId:this.dataDetails.orderId,
+						orderNo:this.dataDetails.orderNo,
 						passiveCommonId:this.dataDetails.commonId,
 						content: this.value1,
 						url: this.imgList.toString(),

+ 23 - 9
pages/order/map.nvue

@@ -1,9 +1,9 @@
 <template>
 	<view>
-		<map v-if="polyline[0].points.length > 0" id="myMap" :markers="markers" :polyline="polyline"
+		<map v-if="polyline[0].points.length > 0" ref="myMap" id="myMap" :markers="markers" :polyline="polyline"
 			:latitude="polyline[0].points[0].latitude" :longitude="polyline[0].points[0].longitude"
 			style="width: 100%; height: 2000rpx" @updated="test" />
-		<view class="hcp-bottom">
+		<view v-if="polyline[0].points.length > 0" class="hcp-bottom">
 			<button v-if="startMove" @click="handleStopMove()">暂停移动</button>
 			<button v-else @click="handleStartMove()">开始移动</button>
 		</view>
@@ -65,11 +65,19 @@
 						'content-type': 'application/json' //'application/x-www-form-urlencoded; charset=UTF-8',
 					},
 					success: (res) => {
-						console.log(res.data.data,11111111)
+						// console.log(res.data,11111111)
 						if(res.data.code==200){
-							if(res.data.data.longitudeLatitude){
-								console.log(JSON.parse(res.data.data.longitudeLatitude));
-								this.polyline[0].points =JSON.parse(res.data.data.longitudeLatitude)
+							if(res.data.data){
+								if(res.data.data.longitudeLatitude){
+									// console.log(JSON.parse(res.data.data.longitudeLatitude));
+									this.polyline[0].points =JSON.parse(res.data.data.longitudeLatitude)
+								}
+							}else{
+								uni.showToast({
+									title: '暂无运输轨迹',
+									icon: 'none',
+									duration: 2000
+								})
 							}
 						}
 					}
@@ -101,8 +109,12 @@
 				// 	// 	var longitude = this.polyline[0].points[this.polyline[0].points.length -1].longitude + 0.0001
 				// 	// 	this.polyline[0].points.push({latitude,longitude})
 				// 	// }
-					this.durationTime = Math.ceil(30000 / this.polyline[0].points.length)	//默认播放全程使用30秒,计算相连两点动画时长
-					this.initMapData()
+				var that = this
+				setTimeout(()=>{
+					that.durationTime = Math.ceil(30000 / that.polyline[0].points.length)	//默认播放全程使用30秒,计算相连两点动画时长
+					that.initMapData()
+				},1000)
+					
 				// 	})
 				// 	.catch(res => {
 				// 		uni.hideLoading()
@@ -123,7 +135,7 @@
 
 			},
 			test() {
-				console.log("1111111111111111")
+				// console.log("1111111111111111")
 				this.mapContext.includePoints({
 					points: this.polyline[0].points,
 					padding: [100, 100, 1000, 100]
@@ -131,6 +143,7 @@
 			},
 			//设置位置(从起点开始)
 			initMarkers() {
+				console.log(this.polyline[0])
 				this.markers[0].latitude = this.polyline[0].points[0].latitude
 				this.markers[0].longitude = this.polyline[0].points[0].longitude
 			},
@@ -156,6 +169,7 @@
 				})
 				return
 				*/
+			   console.log(this.mapContext)
 				this.mapContext.moveAlong({
 					duration: 10000,
 					markerId: this.markers[0].id,

+ 0 - 1
pages/order/map.vue

@@ -54,7 +54,6 @@ export default {
 		}
 	},
 	onLoad(option) {
-		debugger
 		this.id = option.id
 		this.getTrack()		//获取轨迹信息(只做演示,未进行远程请求)
 	},

+ 232 - 32
pages/order/orderDetails.vue

@@ -4,9 +4,11 @@
 		<view class="fixed1"></view>
 		<view class="fixed">
 			<view class='title flex flex-center'>
-				<u-icon class="back" name="arrow-left" color="" size="20" @click="back"></u-icon>
+				<image class="back"  src="../../static/images/return.png" @click="back" mode="" style="width: 40rpx; height: 40rpx;"></image>
+				<!-- <u-icon class="back" name="arrow-left" color="" size="20" @click="back"></u-icon> -->
 				<view class="nav-title">订单详情</view>
-				<u-icon class="search" name="server-fill" color="" size="28" @click="$helper.contactCustomerService()">
+				<image class="search" style='width:18px;height:18px;' src="../../static/images/kefu.png" @click="$helper.contactCustomerService()" mode=""></image>
+				<!-- <u-icon class="search" name="server-fill" color="" size="28" @click="$helper.contactCustomerService()"> -->
 				</u-icon>
 			</view>
 		</view>
@@ -18,11 +20,11 @@
 			<!-- flex flex-space-between -->
 			<view class="item2">
 
-				<u-button class="btn" text="驳回" @click="accept(2)" v-if="dataObj.cargoOwnerStatus=='待接单'">
+				<u-button class="btn" text="拒绝" @click="accept(2)" v-if="dataObj.cargoOwnerStatus=='待接单'">
 				</u-button>
 				<u-button class="btn" text="接受" @click="accept(1)" v-if="dataObj.cargoOwnerStatus=='待接单'">
 				</u-button>
-				<u-button class="btn" text="终止" @click="stop()" v-if="dataObj.cargoOwnerStatus=='未装车'">
+				<u-button class="btn" text="终止" @click="clickstop()" v-if="dataObj.cargoOwnerStatus=='未装车'">
 				</u-button>
 				<u-button class="btn" text="查看合同" @click="lookContract" v-if="dataObj.cargoOwnerContract=='1'">
 				</u-button>
@@ -42,6 +44,7 @@
 				</u-button>
 				<u-button class="btn" text="确认卸车" @click="confirmUnLoading(4)" v-if="dataObj.cargoOwnerStatus=='待收货'">
 				</u-button>
+				<u-button class="btn" text="确认运费" @click="freightOk()" v-if="dataObj.cargoOwnerStatus=='司机驳回运费信息'"></u-button>
 				<!-- <u-button class="btn" text="确认卸车" @click="confirmLoading(4)" v-if="dataObj.cargoOwnerStatus=='待收货'">
 				</u-button> -->
 				<u-button class="btn" text="付款" @click="closed"
@@ -64,7 +67,8 @@
 				</view>
 				<view class="right flex s-row align-center phone">
 					<view class="bgc">
-						<u-icon class="phone" name="phone-fill" color="#2772FB" size="20" @click="toPhone"></u-icon>
+						<image class="phone" style='width:24px;height:24px;' src="../../static/images/dianhua.png" @click="toPhone" mode=""></image>
+						<!-- <u-icon class="phone" name="phone-fill" color="#2772FB" size="20" @click="toPhone"></u-icon> -->
 					</view>
 
 					<view class="hz-name">联系司机</view>
@@ -179,13 +183,13 @@
 				<view class="row-left-text gray">装车照片</view>
 				<view class="flex">
 					<u--image :showLoading="true" :src="item" width="40px" height="40px"
-						v-for="(item,index) in zcImgList" :key='index' @click='ylImg(item)'></u--image>
+						v-for="(item,index) in zcImgList" @click='ylImg(zcImgList)'></u--image>
 				</view>
 			</view>
 			<view class='row-between'>
 				<view class="row-left-text gray">合计应付运费</view>
 				<view class="row-right-text">
-					{{dataObj.hyCarrierInfo.totalFreight}}{{dataObj.hyCarrierInfo.totalFreight?"元":""}}
+					 <u--input placeholder="请输入合计应付运费" border="none" inputAlign="right" clearable v-model="totalFreight"></u--input>
 				</view>
 			</view>
 			<view class='row-between'>
@@ -196,7 +200,7 @@
 				<view class="row-left-text gray">卸车照片</view>
 				<view class="flex">
 					<u--image :showLoading="true" :src="item" width="40px" height="40px"
-						v-for="(item,index) in xcImgList" :key='index' @click='ylImg(item)'></u--image>
+						v-for="(item,index) in xcImgList" @click='ylImg(xcImgList)'></u--image>
 				</view>
 			</view>
 		</view>
@@ -213,14 +217,14 @@
 			<view class='row-between'>
 				<view class="row-left-text gray">运费尾款</view>
 				<view class="row-right-text">
-					{{dataObj.freightInfo.freightBalance?dataObj.freightInfo.freightBalance:"未支付"}}
+					{{dataObj.freightInfo.ownerFreightBalance?dataObj.freightInfo.ownerFreightBalance:"未支付"}}
 				</view>
 			</view>
 			<view class='flex flex-end'>
-				<view class="row-right-text">{{dataObj.freightInfo.freightBalanceDate}}</view>
+				<view class="row-right-text">{{dataObj.freightInfo.ownerFreightBalanceDate}}</view>
 			</view>
 			<view class='row-between mx row-left-text' v-if="dataObj.freightInfo.freightBalance">
-				明细:预付{{dataObj.advanceCharge}}元,服务费{{dataObj.freightInfo.driverServiceCharge}}元,尾款{{dataObj.freightInfo.freightBalance}}元,司机合计收款{{dataObj.freightInfo.totalCollection}}元。
+				明细:预付{{dataObj.advanceCharge}}元,服务费{{dataObj.freightInfo.driverServiceCharge}}元,尾款{{dataObj.freightInfo.ownerFreightBalance}}元,合计{{dataObj.freightInfo.totalPayment}}元。
 			</view>
 		</view>
 		<!-- v-if="status3" -->
@@ -262,7 +266,48 @@
 				v-if='isShowTerminationReason'>
 			</u--textarea>
 		</u-modal>
+		<u-popup :show="show" mode="bottom" @close="close" @open="open">
+			<view class="">
+				<view >
+					<image style='width:12px;height:12px;' @click='closepopup' class='close'  src="../../static/images/order/guanbi@3x.png" mode=""></image>
+					<!-- <u-icon @click="closepopup" class='close' name="close" size="20"></u-icon> -->
+				</view>
+				
+				<view style='fon-size:34rpx;margin-bottom:20px;text-align:center;font-weight: 600;'>确认终止订单</view>
+				<view style="margin: 0 auto;">
+		           	<u-radio-group iconPlacement="right" v-model="radiovalue1" placement="" >
+		           	<u-radio  :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
+		           		:label="item.name" :name="item.name" @change="radioChange" >
+		           	</u-radio>
+		           </u-radio-group>
+		           </view>
+				   <view style='border-top:10px solid #F2F4F7;position:absolute;left:0;height:0;width:100%;'></view>
+		           <view style='padding:40rpx 0 30rpx;'>终止原因描述</view>
+		           <u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'>
+		           </u--textarea>
+				   <view class='termination' :class="{'active':value2.length>0}" @click='termination'>终止</view>
+			</view>
+		</u-popup>
 		<u-toast ref="uToast"></u-toast>
+		<!-- <u-popup :show="moneyShow" mode="center" @close="close" @open="open">
+			<view class="freight">
+				<view class="freight_text">
+					合计运费
+				</view>
+				<u--input v-model="totalFreight" placeholder="请输入合计运费"></u--input>
+				<view class="freight_up">
+					<view class="freight_item">取消</view>
+					<view class="freight_item">确定</view>
+				</view>
+			</view>
+			
+		</u-popup> -->
+		<u-modal :show="moneyShow"  title="合计运费" showCancelButton @confirm="moneyClick" @close="moneyclose"
+			@cancel="moneyclose">
+					<view class="slot-content">
+						<u--input v-model="totalFreight" type="number" placeholder="请输入合计运费"></u--input>
+					</view>
+		</u-modal>
 		<!-- 		<view v-if="lookAlert" class="look-contract" @click="lookAlert==false">
 			<u-button class="btn" text="查看合同" @click="lookContract"></u-button>
 			<u-button class="btn" text="签名"></u-button>
@@ -293,8 +338,12 @@
 
 <script>
 	var that;
+	import uniPopup from '@/components/uni-popup/uni-popup.vue'
 	import uploadImage from '@/components/ossutil/uploadFile.js';
 	export default {
+		components:{
+			uniPopup
+		},
 		data() {
 			return {
 				cyinfoStatus: '未装车',
@@ -309,24 +358,25 @@
 				status2: false,
 				status3: false,
 				id: '',
+				show:false,
 				value2: '',
 				radiolist1: [{
-						name: '已与货主协商',
+						name: '已与司机协商',
 						disabled: false
 					},
 					{
-						name: '货主原因终止',
+						name: '司机原因终止',
 						disabled: false
 					},
 					{
-						name: '司机个人原因终止',
+						name: '货主个人原因终止',
 						disabled: false
 					}, {
 						name: '其他',
 						disabled: false
 					}
 				],
-				radiovalue1: '已与货主协商',
+				radiovalue1: '已与司机协商',
 				confirmText: '终止',
 				alertTitle: '确定终止订单?',
 				alertContent: "",
@@ -343,6 +393,8 @@
 				selectColor: 'black',
 				lineColor: '#1A1A1A', // 颜色
 				lineSize: 5, // 笔记倍数
+				moneyShow:false,
+				totalFreight:""
 			}
 
 		},
@@ -364,9 +416,43 @@
 			this.getList()
 		},
 		methods: {
+			moneyClick(){
+				this.moneyShow = false
+				if(this.dataObj.cargoOwnerStatus == "司机驳回运费信息"){
+					this.$request.baseRequest('post', '/orderInfo/api/confirmFreight', {
+							 id: this.dataObj.id,
+							 typeFlag:1,
+							 totalFreight:this.totalFreight
+						}).then(res => {
+							if (res.code == 200) {
+								this.$refs.uToast.show({
+									type: 'success',
+									message: "确认成功",
+								})
+								this.getList()
+							}
+						})
+				}
+			},
+			moneyclose(){
+				this.moneyShow = false
+				this.totalFreight = ""
+			},
+			freightOk(){
+					this.moneyShow = true
+			},
+			radioChange(n) {
+				console.log('radioChange', n);
+			},
+			closepopup(){
+				this.show=false
+			},
+			close(){
+				this.show=false
+			},
 			ylImg(src) {
 				uni.previewImage({
-					urls: [src],
+					urls: src,
 					longPressActions: {
 						itemList: ['发送给朋友', '保存图片', '收藏'],
 						success: function(data) {
@@ -475,9 +561,13 @@
 			confirmUnLoading(type) {
 				this.type=type
 				if(type == 4){
-					this.alertTitle = '确认卸车?'
-					this.confirmText = '确定'
-					this.isShowAlert = true
+					if(this.totalFreight){
+						this.alertTitle = '确认卸车?'
+						this.confirmText = '确定'
+						this.isShowAlert = true
+					}else{
+						this.moneyShow = true
+					}
 				}else if(type == 6){
 					this.alertTitle = '确定驳回卸车信息?'
 					this.confirmText = '确定'
@@ -488,6 +578,7 @@
 				// uni.$u.route('/pages/order/confirmUnloading', item);
 			},
 			confirmClick() {
+				var that=this
 				that.isShowAlert = false
 				if (this.type == 1 || this.type == 2) {
 					let _title = ''
@@ -505,7 +596,7 @@
 									type: 'success',
 									message: _title,
 									complete() {
-										that.mescroll.resetUpScroll()
+										that.getList()
 									}
 								})
 							} else {
@@ -518,7 +609,7 @@
 									type: 'success',
 									message: _title,
 									complete() {
-										that.mescroll.resetUpScroll()
+										
 									}
 								})
 							}
@@ -531,9 +622,11 @@
 					if (this.type == 3) _flag = 1
 					if (this.type == 4) _flag = 2
 					this.$request.baseRequest('post', '/carrierInfo/cargoOwnerLoadingAdd', {
-							id: this.dataObj.id,
+							orderId: this.dataObj.id,
+							id: this.dataObj.hyCarrierInfo.id,
 							loadingFlag: _flag,
-							flag: 1
+							flag: 1,
+							totalFreight:this.totalFreight,
 						}).then(res => {
 							if (res.code == 200) {
 								this.$refs.uToast.show({
@@ -555,7 +648,7 @@
 						});
 				}else if(this.type==5){
 					this.$request.baseRequest('post', '/carrierInfo/cargoOwnerLoadingAdd', {
-							id: this.dataObj.id,
+							orderId: this.dataObj.id,
 							loadingFlag: 1,
 							flag: 2
 						}).then(res => {
@@ -578,7 +671,7 @@
 						});
 				}else if(this.type == 6){
 					this.$request.baseRequest('post', '/carrierInfo/cargoOwnerLoadingAdd', {
-							id: this.dataObj.id,
+							orderId: this.dataObj.id,
 							loadingFlag: 2,
 							flag: 2
 						}).then(res => {
@@ -600,7 +693,53 @@
 						.catch(res => {
 							uni.$u.toast(res.message);
 						});
-				} else {
+				} else{
+					var that=this
+										if (this.radiovalue1 == '其他' && !this.value2) {
+											this.$refs.uToast.show({
+												type: 'error',
+												message: "请填写终止原因描述!",
+											})
+											return
+										}
+										let _terminationReason = ''
+										if (this.radiovalue1 == '已与司机协商') {
+											_terminationReason = 1
+										} else if (this.radiovalue1 == '司机原因终止') {
+											_terminationReason = 2
+										} else if (this.radiovalue1 == '货主个人原因终止') {
+											_terminationReason = 3
+										} else if (this.radiovalue1 == '其他') {
+											_terminationReason = 4
+										}
+										this.$request.baseRequest('post', '/orderInfo/api/end', {
+												id: this.id,
+												terminator: 2,
+												terminationReason: _terminationReason,
+												terminationReasonDescription: this.value2
+											}).then(res => {
+												if (res.code == 200) {
+													that.show=false
+													that.value2=''
+													this.$refs.uToast.show({
+														type: 'success',
+														message: '终止订单成功',
+													})
+													that.getList()
+												} else {
+													this.$refs.uToast.show({
+														type: 'success',
+														message: '终止订单失败',
+													})
+												}
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+				}
+			},
+			termination(){
+				var that=this
 					if (this.radiovalue1 == '其他' && !this.value2) {
 						this.$refs.uToast.show({
 							type: 'error',
@@ -609,11 +748,11 @@
 						return
 					}
 					let _terminationReason = ''
-					if (this.radiovalue1 == '已与货主协商') {
+					if (this.radiovalue1 == '已与司机协商') {
 						_terminationReason = 1
-					} else if (this.radiovalue1 == '货主原因终止') {
+					} else if (this.radiovalue1 == '司机原因终止') {
 						_terminationReason = 2
-					} else if (this.radiovalue1 == '司机个人原因终止') {
+					} else if (this.radiovalue1 == '货主个人原因终止') {
 						_terminationReason = 3
 					} else if (this.radiovalue1 == '其他') {
 						_terminationReason = 4
@@ -621,24 +760,27 @@
 					this.$request.baseRequest('post', '/orderInfo/api/end', {
 							id: this.id,
 							terminator: 2,
+							terminationReason: _terminationReason,
+							terminationReasonDescription: this.value2
 						}).then(res => {
 							if (res.code == 200) {
+								that.show=false
+								that.value2=''
 								this.$refs.uToast.show({
 									type: 'success',
 									message: '终止订单成功',
 								})
+								that.getList()
 							} else {
 								this.$refs.uToast.show({
 									type: 'success',
 									message: '终止订单失败',
 								})
 							}
-							that.mescroll.resetUpScroll()
 						})
 						.catch(res => {
 							uni.$u.toast(res.message);
 						});
-				}
 			},
 			cancelClick() {
 				this.isShowAlert = false
@@ -654,6 +796,17 @@
 				this.id = item.id
 				this.isShowAlert = true
 			},
+			clickstop(){
+				let item = this.dataObj
+				// 货主接单
+				if (item.cargoOwnerStatusKey == 1) {
+					this.isShowTerminationReason = false
+				} else {
+					this.isShowTerminationReason = true
+				}
+				this.id = item.id
+				this.show = true
+			},
 			toPhone() {
 				var that=this
 				uni.makePhoneCall({
@@ -673,10 +826,13 @@
 			getList() {
 				this.$request.baseRequest('get', '/orderInfo/getOrderInfo', {
 					id: this.id,
-
 				}).then(res => {
 					if (res.code == 200) {
 						this.dataObj = res.data
+						if(this.dataObj.hyCarrierInfo.totalFreight){//货主确定卸车输入的 合计运费
+							this.totalFreight = this.dataObj.hyCarrierInfo.totalFreight
+						}
+						
 						// 承运信息显示
 						if (res.data.cargoOwnerStatus != "待接单" && res.data.cargoOwnerStatus != "未装车" && res.data
 							.cargoOwnerStatus != "已终止") {
@@ -696,6 +852,7 @@
 							this.status3 = true
 						}
 						if (res.data.hyCarrierInfo) {
+							this.zcImgList=[]
 							if (res.data.hyCarrierInfo.loadingImg) {
 								let _zcList = res.data.hyCarrierInfo.loadingImg.split(',')
 								for (let i = 0; i < _zcList.length; i++) {
@@ -703,6 +860,7 @@
 								}
 							}
 							if (res.data.hyCarrierInfo.unloadingImg) {
+								this.xcImgList=[]
 								let _xcList = res.data.hyCarrierInfo.unloadingImg.split(',')
 								for (let i = 0; i < _xcList.length; i++) {
 									if (_xcList[i]) this.xcImgList.push(_xcList[i])
@@ -1064,4 +1222,46 @@
 		top: 120rpx;
 		left: 10rpx;
 	}
+	/deep/.u-popup__content{
+		border-radius: 10px;
+		padding:20px;
+	}
+	/deep/.u-radio{
+		margin:40rpx 0;
+	}
+	.close{
+		position:absolute;
+		right:20px;
+	}
+	.termination{
+		background:#F1F3F6;
+		color:#C5CAD4;
+		padding:10px;
+		border-radius:30px;
+		text-align: center;
+		margin-top:30rpx;
+	}
+	.termination.active{
+		background: #2772FB;
+		color: white;
+	}
+	.freight{
+		.freight_text{
+			font-size: 34rpx;
+			font-weight: 600;
+			margin-bottom: 20rpx;
+		}
+		.freight_up{
+			display: flex;
+			border-top: 1px solid #EEEEEE;
+			height: 60rpx;
+			background: red;
+			margin-top: 10px;
+		}
+		.freight_item{
+			width: 50%;
+			text-align: center;
+			line-height: 50rpx;
+		}
+	}
 </style>

+ 4 - 3
pages/order/signContract.vue

@@ -49,8 +49,8 @@
 			</view> -->
 			<view class='row-between'>
 				<!-- 后加 -->
-				<view class="gray">服务费(元)</view>
-				<view class="">{{dataDetails.serviceCharge}}</view>
+				<view class="gray">收费比例(%)</view>
+				<view class="">{{chargeProportion}}</view><!-- 暂时写死6% -->
 			</view>
 		</view>
 		<view class="wrapper content3">
@@ -118,11 +118,12 @@
 						disabled: false
 					},
 				],
+				chargeProportion:"",//收费比例
 			};
 		},
 		onLoad(options) {
 			that = this
-			console.log(options)
+			that.chargeProportion =uni.getStorageSync("firstAuthentication").chargeProportion*100//收费比例从缓存中取
 			this.dataDetails = JSON.parse(decodeURIComponent(options.obj))
 			// this.dataDetails.advanceFreightService = '平台垫付运费'
 			this.ctx = uni.createCanvasContext("handWriting");

+ 85 - 83
pages/public/login.vue

@@ -9,43 +9,16 @@
 				class="flex">
 				<view class="phone-before-num NumberMedium">+86</view>
 				<view style='width:85%;'>
-					<!-- <u--input class="phone-number" border="none" maxlength='11' v-model='phone'
-						placeholder="请输入手机号码" type="number"></u--input>
-					<u-input /> -->
 					<input class='phone' maxlength='11' v-model='phone'  placeholder="请输入手机号码" type="number">
-					<!-- <u--input v-model="phone" border="none" type='number' placeholder="请输入手机号码" class="phone-number"
-						maxlength='11' :clearable='true'></u--input> -->
 				</view>
 			</view>
 			<view style='margin-top:20px;border-bottom:1px solid #E8E9ED;position:relative;height:40px'>
-				<!-- <u--input class='password' border="none" v-model='password'
-					placeholder="请输入密码,6-16位字符" :type="type" value="">
-					</u--input> -->
 				<view style='position:relative;'>
-					
 					<input class='password' v-model='password' v-if="isShowPassword=='password'" placeholder="请输入密码" type="password">
 					<input class='password' v-model='password' v-else type="text" placeholder="请输入密码">
-					<u-icon name="eye-fill" color="rgb(192, 196, 204)" size="24" @click="passWordStatus(1)"
-							v-if="isShowPassword=='password'"></u-icon>
-					<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/xianshi.png" mode=""></image>
+						<image class='yanjingicon' style='width:22px;height:22px;' @click="passWordStatus(2)" v-else src="../../static/yioncang.png" mode=""></image>
 				</view>
-				<!-- <u-input v-if="isShowPassword=='password'" class='password' border="none" v-model='password' placeholder="请输入密码,6-16位字符"
-					type="password" :clearable='true'>
-					
-					<template slot="suffix">
-						
-					</template>
-				</u-input>
-				<u-input v-else class='password' border="none" v-model='password' placeholder="请输入密码,6-16位字符"
-					type="text" :clearable='true'>
-					<template slot="suffix">
-						<u-icon name="eye-fill" color="rgb(192, 196, 204)" size="24" @click="passWordStatus(1)"
-							v-if="isShowPassword=='password'"></u-icon>
-						<u-icon name="eye-off" color="rgb(192, 196, 204)" size="24" @click="passWordStatus(2)" v-else>
-						</u-icon>
-					</template>
-				</u-input> -->
 			</view>
 			<button :class='phone!=""&&password!=""?"active":""' @click='passlogin'
 				class='Regular verificationCode'>登录</button>
@@ -56,7 +29,9 @@
 				<view @click='gocode' style='flex:1;text-align:center;' class="Regular">验证码登录</view>
 			</view>
 		</view>
+		<u-toast ref="uToast"></u-toast>
 	</view>
+	
 	</view>
 </template>
 
@@ -151,66 +126,93 @@
 			},
 			passlogin(e) {
 				var that = this
-				uni.showLoading({
-					title: '登录中',
-					mask: true
-				})
-				console.log("clinetId", this.clientId)
-				that.$request.baseRequest('get', '/commonUser/login', {
-						phone: this.phone,
-						password: this.password,
-						loginFlag: 1,
-						identification:2
-					}).then(res => {
-						if (res.code == 200) {
-							uni.setStorageSync('userInfo', res.data)
-							that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
-								reCommonId: this.userInfo.id,
-							}).then(res3 => {
-								if (res3.data||res3.data==0) {
-									let name = 'myTip';
-									let value = res3.data
-									if (value == 0) {
-										uni.removeTabBarBadge({
-											index: 2
-										})
-									}
+				if(this.phone==''){
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "请输入手机号!"
+					})
+					return
+				}
+				if(this.password==''){
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "请输入密码!"
+					})
+					return
+				}
+				
+				
+				that.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
+					phone: this.phone,
+				}).then(res => {
+					if (res.data.authenticationStatus == '已禁用') {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "账号审核中!"
+						})
+						
+					} else {
+						uni.showLoading({
+							title: '登录中',
+							mask: true
+						})
+						that.$request.baseRequest('get', '/commonUser/login', {
+								phone: that.phone,
+								password: that.password,
+								loginFlag: 1,
+								identification:2
+							}).then(res => {
+								if (res.code == 200) {
+									uni.setStorageSync('userInfo', res.data)
+									that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+										reCommonId: that.userInfo.id,
+									}).then(res3 => {
+										if (res3.data||res3.data==0) {
+											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.$store.commit('login', res.data)
+									var name = 'userInfo';
+									var value = res.data;
 									that.$store.commit('$uStore', {
 										name,
 										value
 									});
-									if (value != 0 && value) {
-										uni.setTabBarBadge({
-											index: 2,
-											text: value + ""
-										})
-									}
+									uni.switchTab({
+										url: '/pages/order/index'
+									});
+									uni.hideLoading()
+								} else {
+									uni.hideLoading()
+									uni.showToast({
+										title: res.message,
+										icon: 'none',
+										duration: 2000
+									})
 								}
 							})
-							
-							that.$store.commit('login', res.data)
-							var name = 'userInfo';
-							var value = res.data;
-							that.$store.commit('$uStore', {
-								name,
-								value
-							});
-							uni.switchTab({
-								url: '/pages/order/index'
+							.catch(res => {
+								uni.$u.toast(res.message);
 							});
-							uni.hideLoading()
-						} else {
-							uni.hideLoading()
-							uni.showToast({
-								title: res.message,
-								icon: 'none',
-								duration: 2000
-							})
-						}
-					})
-					.catch(res => {
-						uni.$u.toast(res.message);
-					});
+					}
+				})
 			},
 			gocode() {
 				uni.navigateTo({
@@ -260,7 +262,7 @@
 		position: absolute;
 		right: 0px;
 	}
-	.u-icon{
+	.yanjingicon{
 		position:absolute;
 		right:0;
 		top:50%;

+ 15 - 4
pages/public/loginOther.vue

@@ -18,7 +18,6 @@
 			<button @click='gocode' :class='codestatus?"active":""' class='verificationCode'>获取验证码</button>
 			<view @click='gonumber' class="Regular use-password" style='text-align:center;color:#6A6A6A;'>使用账号密码登录
 			</view>
-
 			<button v-if='tabbar' @click='goregister' class='Regular register active'>手机号一键注册</button>
 		</view>
 		<view v-if="loginType === 'phone'" class="register-section">
@@ -113,9 +112,21 @@
 			},
 			gocode() {
 				if (this.phone.length == 11 && /^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.phone)) {
-					uni.navigateTo({
-						url: '/pages/public/code?phone=' + this.phone
-					})
+					that.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
+						phone: this.phone,
+					}).then(res => {
+						if (res.data.authenticationStatus == '已禁用') {
+							that.$refs.uToast.show({
+								type: 'error',
+								message: "账号审核中!"
+							})
+							
+						} else {
+							uni.navigateTo({
+								url: '/pages/public/code?phone=' + this.phone
+							})
+						}
+					})	
 				} else if (this.phone.length == 0) {
 					uni.showToast({
 					 title: '手机号不能为空',

+ 17 - 11
pages/public/register.vue

@@ -7,22 +7,28 @@
 				class="flex">
 				<view class="NumberMedium" style='width:15%;border-right:1px solid #E8E9ED;'>+86</view>
 				<view style='width:85%;'>
-					<input border="none" maxlength="11" v-model='phone' @input='phoneinput' style='padding-left:10px;'
-						placeholder="请输入手机号码" type="number" class="Regular" />
+					<!-- <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" />
 				</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"/>
-					<!-- <image v-if='verifyCode' @click='verifyCode=""' class='close1' src='../../static/img/login/guanbi@2x.png'></image> -->
+				<!-- 	<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> -->
 				</view>
-				<button class='getcode Regular' :class='codestatus?"activeCode":""' @click='getcode'
-					>{{sendText}}</button>
+				<button  :class='codestatus?"activeCode":""' @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" />
+				<!-- <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" />
 				<!-- 				<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> -->
@@ -31,9 +37,9 @@
 				class='verificationCode'>注册</button>
 			<view
 				style='color:#6A6A6A;margin-top:10px;font-size:30rpx;display:flex;justify-content:center;align-items: center;'>
-				<u--image @click='consent'
+				<u--image style='margin-right:3px;position:relative;top:1rpx;' @click='consent'
 					:src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
-					width="17px" height="17px" style="margin:0 10rpx"></u--image>
+					width="17px" height="17px"></u--image>
 				已阅读并同意
 				<navigator
 					url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/userAgreement.html"
@@ -217,7 +223,7 @@
 				}
 				if (this.password.length < 6) {
 					uni.showToast({
-						title: '请输入正确的密码格式',
+						title: '密码请输入6-16字符格式',
 						icon: 'none',
 						duration: 2000
 					})

+ 10 - 3
pages/release/addAddress.vue

@@ -14,8 +14,9 @@
 			<view class="">
 				<u--form labelPosition="left" :model="addressInfo" ref="form1" labelWidth='100'>
 					<u-form-item label="所属区域" ref="item1" borderBottom>
-						<view @click='toMap' :class="addressInfo.area?'':'select-color'">
-							{{addressInfo.area?(addressInfo.province+addressInfo.city+addressInfo.area):'选择所属区域 '}}
+						<view style='width:100%;' class='flex flex-space-between' @click='toMap' :class="addressInfo.area?'':'select-color'">
+							<view>{{addressInfo.area?(addressInfo.province+addressInfo.city+addressInfo.area):'选择所属区域 '}}</view>
+							<image src="../../static/right.png" style="width: 22rpx;height: 22rpx;"></image>
 						</view>
 					</u-form-item>
 					<u-form-item label="详细地址" prop="addressInfo.detailedAddress" ref="item1" borderBottom>
@@ -116,7 +117,10 @@
 				let that = this
 				// this.isShowMap = true
 				uni.getLocation({
-					type: 'wgs84',
+					type: 'gcj02',
+					geocode:true,
+					altitude:true,
+					isHighAccuracy:true,
 					success: function (res) {
 						console.log('当前位置的经度:' + res.longitude);
 						console.log('当前位置的纬度:' + res.latitude);
@@ -200,4 +204,7 @@
 		right: 0;
 		margin: auto;
 	}
+	/deep/input{
+		word-break:break-all;
+	}
 </style>

+ 88 - 27
pages/release/editRelease.vue

@@ -25,7 +25,7 @@
 					<view class="top" @click="selectAddress(0)">
 						<view class="send">寄</view>
 						<view class="title">
-							{{dataObj.sendArea?(dataObj.sendPrivate + dataObj.sendCity+dataObj.sendArea):'选择发货地区'}}
+							{{dataObj.sendArea?(dataObj.sendPrivate?dataObj.sendPrivate:'' + dataObj.sendCity+dataObj.sendArea):'选择发货地区'}}
 						</view>
 					</view>
 					<view class="bottom">
@@ -41,7 +41,7 @@
 					<view class="top" @click="selectAddress(1)">
 						<view class="collect">收</view>
 						<view class="title">
-							{{dataObj.unloadArea?(dataObj.unloadPrivate + dataObj.unloadCity+dataObj.unloadArea):'选择收货地区'}}
+							{{dataObj.unloadArea?(dataObj.unloadPrivate?dataObj.unloadPrivate:'' + dataObj.unloadCity+dataObj.unloadArea):'选择收货地区'}}
 						</view>
 					</view>
 					<view class="bottom">
@@ -59,11 +59,41 @@
 				<input type="text" value="" class="input" placeholder="自动计算" v-model="dataObj.distance" disabled="" />
 				<view>Km</view>
 			</view>
+			<view class="row">
+				<view class="left">货物类别</view>
+				<view class="right" @click="goodstypeChange">{{dataObj.goodsType?dataObj.goodsType:"请选择货物类别"}}</view>
+			</view>
 			<view class="row">
 				<view class="left">货名</view>
 				<view class="right"><input type="text" class="input" value="" placeholder="输入货物名称"
 						v-model="dataObj.goodsName" /></view>
 			</view>
+			<view class="row">
+				<view class="left">收货方</view>
+				<view class="right flex">
+					<input type="text" value="" placeholder="输入收货人姓名或企业名称" class="input" v-model="dataObj.receiver" />
+				</view>
+			</view>
+			<view class="row">
+				<view class="left">收货方手机号</view>
+				<view class="right flex">
+					<input type="number" maxlength="11" placeholder="输入收货方手机号" class="input"
+						v-model="dataObj.receiverPhone" />
+				</view>
+			</view>
+			<view class="row">
+				<view class="left">收货人身份证号</view>
+				<view class="right flex">
+					<input type="number" maxlength="18" placeholder="输入收货人身份证号" class="input"
+						v-model="dataObj.receiverIdcard" />
+				</view>
+			</view>
+			<view class="row">
+				<view class="left">收货方信用代码(选填)</view>
+				<view class="right flex">
+					<input maxlength="18" placeholder="统一社会信用代码" class="input" v-model="dataObj.receiverCreditCode" />
+				</view>
+			</view>
 			<view class="flex row">
 				<view class="left-text">运费计算方式</view>
 				<u-radio-group placement="row" v-model="dataObj.billingMethod" class="select-type">
@@ -102,19 +132,7 @@
 						v-model="dataObj.senderPhone" />
 				</view>
 			</view>
-			<view class="row">
-				<view class="left">收货联系人</view>
-				<view class="right flex">
-					<input type="text" value="" placeholder="输入收货联系人姓名" class="input" v-model="dataObj.receiver" />
-				</view>
-			</view>
-			<view class="row">
-				<view class="left">收货联系人电话</view>
-				<view class="right flex">
-					<input type="number" maxlength="11" placeholder="输入收货联系人手机号" class="input"
-						v-model="dataObj.receiverPhone" />
-				</view>
-			</view>
+			
 			<view class="row">
 				<view class="left">重量(吨)</view>
 				<view class="right flex">
@@ -302,10 +320,31 @@
 			}
 		},
 		onShow() {
-			// this.getSFList()
+			this.getSFList()
+			let _faddress = uni.getStorageSync('storage_faddress');
+			let _saddress = uni.getStorageSync('storage_saddress');
+			if (_faddress) {
+				this.dataObj.sendCity = _faddress.city
+				this.dataObj.sendArea = _faddress.area
+				this.dataObj.sendPrivate = _faddress.province
+				this.dataObj.sendDetailedAddress = _faddress.detailedAddress
+				this.dataObj.sendLongitude = _faddress.longitude
+				this.dataObj.sendLatitude = _faddress.latitude
+				this.dataObj.senderPhone = _faddress.contactPhone
+				this.dataObj.sender = _faddress.contacts
+			}
+			if (_saddress) {
+				this.dataObj.unloadDetailedAddress = _saddress.detailedAddress
+				this.dataObj.unloadCity = _saddress.city
+				this.dataObj.unloadArea = _saddress.area
+				this.dataObj.unloadPrivate = _saddress.province
+				this.dataObj.unsendLongitude = _saddress.longitude
+				this.dataObj.unsendLatitude = _saddress.latitude
+				this.dataObj.receiver = _saddress.contacts
+				this.dataObj.receiverPhone = _saddress.contactPhone
+			}
 		},
 		onLoad(options) {
-
 			_this = this;
 			_this = this;
 			this.dataObj = options
@@ -344,6 +383,19 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			goodstypeChange(){
+				this.isGoodsType = true
+			},
+			goodsSubmit(e){
+				this.dataObj.goodsType = e.value[0].constValue
+				this.dataObj.goodsTypeKey = e.value[0].constKey
+				let _obj={
+					name:e.value[0].constValue,
+					key:e.value[0].constKey
+				}
+				uni.setStorageSync("goodsType",_obj)
+				this.isGoodsType = false
+			},
 			getSFList() {
 				this.dataObj.commonId = this.userInfo.id
 				this.$request.baseRequest('get', '/cargoOwnerCompInfo/cargoOwnerList', {
@@ -358,17 +410,24 @@
 						let _self = res.data.companyInfoList
 						//代理货主
 						let _dlhz = res.data.cargoOwnerCompInfoList
-						for (let i = 0; i < _self.length; i++) {
-							if (_self[i].status == '已认证') {
-								this.qyList.push(_self[i])
+						if(_self){
+							for (let i = 0; i < _self.length; i++) {
+								if (_self[i].status == '已认证') {
+									this.qyList.push(_self[i])
+								}
 							}
 						}
-
-						for (let i = 0; i < _dlhz.length; i++) {
-							if (_dlhz[i].status == '已认证') {
-								this.qyList.push(_dlhz[i])
+						if(_dlhz){
+							for (let i = 0; i < _dlhz.length; i++) {
+								if (_dlhz[i].status == '已认证') {
+									this.qyList.push(_dlhz[i])
+								}
 							}
 						}
+						let obj = uni.getStorageSync("firstAuthentication")
+						if(obj && obj.authenticationStatus == '已认证'){
+							this.columns[0].push("个人货主")
+						}
 						for (let i = 0; i < this.qyList.length; i++) {
 							this.columns[0].push(this.qyList[i].company ? this.qyList[i].company : this.qyList[i]
 								.companyName)
@@ -511,8 +570,7 @@
 						return true
 					}
 				}
-				if (this.dataObj.loadWeightSmall && this.dataObj.loadWeight && (this.dataObj.loadWeightSmall > this.dataObj
-						.loadWeight)) {
+				if (this.dataObj.loadWeightSmall && this.dataObj.loadWeight && (Number(this.dataObj.loadWeightSmall)>Number(this.dataObj.loadWeight))) {
 					uni.showToast({
 						title: '最小载重应小于最大载重!',
 						duration: 2000,
@@ -556,7 +614,9 @@
 							type: 'success',
 							message: "修改成功",
 							complete() {
-								
+								uni.navigateBack({
+									delta:1
+								})
 								_this.dataObj = {
 									commonId: '',
 									cargoOwner: '',
@@ -702,6 +762,7 @@
 				});
 				uni.$u.route('/pages/release/selectAddress', {
 					type: type,
+					status:1
 				});
 			},
 			checkboxChange(n) {

+ 10 - 5
pages/release/lookRelease.vue

@@ -21,7 +21,9 @@
 		<view class="flex place">
 			<view class="left flex">
 				<view class="flex">
-					<view class="ssx">{{$helper.getProvinceAbbreviation(dataObj.sendPrivate?dataObj.sendPrivate:dataObj.sendCity)}}</view>
+					<view class="ssx">
+						{{$helper.getProvinceAbbreviation(dataObj.sendPrivate?dataObj.sendPrivate:dataObj.sendCity)}}
+					</view>
 					<view class="level2-title">{{dataObj.sendCity}}</view>
 				</view>
 				<view class="level2-title">{{dataObj.sendArea}}</view>
@@ -125,7 +127,7 @@
 				<view class="left">任务描述</view>
 			</view>
 			<view class="row">
-				<u--textarea v-model="dataObj.taskDescription" placeholder="请输入内容"></u--textarea>
+				<u--textarea v-model="dataObj.taskDescription" placeholder="请输入内容" disabled></u--textarea>
 			</view>
 
 
@@ -391,19 +393,22 @@
 			.left .top {
 				display: flex;
 			}
+			
 		}
 	}
 
-	.content2,.content5 {
+	.content2,
+	.content5 {
 		.row {
 			margin: 20rpx 0;
 		}
 
 		.left {
-			color: #8F8F8F;
+			color: #8F8F8F;width: calc(50% - 25rpx);
 		}
-		.right{
+		.right {
 			color: #333333;
+			text-align: right;
 		}
 	}
 

+ 6 - 6
pages/release/record.vue

@@ -70,8 +70,8 @@
 						<view class="normal" @click.stop="del(good)">删除</view>
 						<!-- v-if="good.status!='已通过'" -->
 						<view class="normal" @click.stop="Refresh(good)" v-if="good.status=='已通过'">刷新</view>
-						<view class="normal" @click.stop="hideShow(good)" v-if="good.showHide=='1'">隐藏</view>
-						<view class="normal" @click.stop="hideShow(good)" v-if="good.showHide=='2'">显示</view>
+						<view class="normal" @click.stop="hideShow(good)" v-if="good.showHide=='1'&&good.status=='已通过'">隐藏</view>
+						<view class="normal" @click.stop="hideShow(good)" v-if="good.showHide=='2'&&good.status=='已通过'">显示</view>
 					</view>
 				</view>
 			</view>
@@ -137,10 +137,10 @@
 
 		},
 		onShow() {
-			// this.upCallback({
-			// 	size: 10,
-			// 	num: 1
-			// })
+			this.upCallback({
+				size: 10,
+				num: 1
+			})
 		},
 		// onPageScroll(res) {
 		// 	this.scrollTop = res.scrollTop

+ 199 - 48
pages/release/release.vue

@@ -20,8 +20,9 @@
 		</view> -->
 		<view class="content1">
 			<view class="row" @click="selectCargoOwner">
-				<view class="left select-sf">{{dataObj.cargoOwner?dataObj.cargoOwner:'选择货主身份'}}</view>
-				<view class="right">></view>
+
+				<view class="left select-sf" :class='dataObj.cargoOwner?"":"select-sf1"'>{{dataObj.cargoOwner?dataObj.cargoOwner:'选择货主身份'}}</view>
+				<view class="right"><image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;"></image></view>
 			</view>
 			<!-- 		<view class="row" @click="selectCargoOwner" v-if="dataObj.cargoOwner">
 				<view class="left">{{dataObj.cargoOwner}}</view>
@@ -44,7 +45,8 @@
 					</view>
 				</view>
 				<view class="right" @click="selectAddress(0)" v-if="!dataObj.sendArea">
-					<view class="right">{{dataObj.sendArea?'':'>'}}</view>
+					<view v-if='dataObj.sendArea' class="right"></view>
+					<view class="right" v-else><image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;"></image></view>
 				</view>
 			</view>
 			<view class="row2">
@@ -60,15 +62,21 @@
 					</view>
 				</view>
 				<view class="right" @click="selectAddress(1)" v-if="!dataObj.unloadArea">
-					<view class="right">{{dataObj.unloadArea?(dataObj.unloadCity+dataObj.unloadArea):'>'}}</view>
+					<view v-if='dataObj.unloadArea' class="right">{{(dataObj.unloadCity+dataObj.unloadArea)}}</view>
+					<view class="right" v-else><image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;"></image></view>
 				</view>
 			</view>
 		</view>
 		<view class="content3">
 			<view class="row">
 				<view class="left">距离</view>
-				<input type="text" value="" class="input" placeholder="自动计算" v-model="dataObj.distance" disabled="" />
-				<view>Km</view>
+				<!-- <input type="text" value="" class="input" placeholder="自动计算" v-model="dataObj.distance" disabled /> -->
+				{{dataObj.distance }}
+				km
+			</view>
+			<view class="row">
+				<view class="left">货物类别</view>
+				<view class="right" @click="goodstypeChange">{{dataObj.goodsType?dataObj.goodsType:"请选择货物类别"}}</view>
 			</view>
 			<view class="row">
 				<view class="left">货名</view>
@@ -76,15 +84,15 @@
 						v-model="dataObj.goodsName" /></view>
 			</view>
 			<view class="row">
-				<view class="left">收货联系人</view>
+				<view class="left">收货</view>
 				<view class="right flex">
-					<input type="text" value="" placeholder="输入收货联系人姓名" class="input" v-model="dataObj.receiver" />
+					<input type="text" value="" placeholder="输入收货人姓名或企业名称" class="input" v-model="dataObj.receiver" />
 				</view>
 			</view>
 			<view class="row">
-				<view class="left">收货联系人电话</view>
+				<view class="left">收货方手机号</view>
 				<view class="right flex">
-					<input type="number" maxlength="11" placeholder="输入收货联系人手机号" class="input"
+					<input type="number" maxlength="11" placeholder="输入收货手机号" class="input"
 						v-model="dataObj.receiverPhone" />
 				</view>
 			</view>
@@ -98,7 +106,7 @@
 			<view class="row">
 				<view class="left">收货方信用代码(选填)</view>
 				<view class="right flex">
-					<input placeholder="输入收货方信用代码" class="input" v-model="dataObj.receiverCreditCode" />
+					<input maxlength="18" placeholder="统一社会信用代码" class="input" v-model="dataObj.receiverCreditCode" />
 				</view>
 			</view>
 			<view class="flex row">
@@ -114,7 +122,7 @@
 				<view class="right"><input type="number" value="" placeholder="输入运费单价" class="input"
 						v-model="dataObj.freightPrice" /></view>
 			</view>
-			<view class="row">
+			<view v-if='dataObj.freightAdvance' class="row">
 				<view class="left">该任务申请运费垫付</view>
 				<view class="right">
 					<u-switch v-model="dataObj.freightAdvance" @change="change" size="20"></u-switch>
@@ -143,7 +151,7 @@
 			<view class="row">
 				<view class="left">重量(吨)</view>
 				<view class="right flex">
-					<input type="text" value="" placeholder="输入预计发运重量" class="number" v-model="dataObj.weight"
+					<input type="number" value="" placeholder="输入预计发运重量" class="number" v-model="dataObj.weight"
 						style="text-align: right;" />
 				</view>
 			</view>
@@ -226,9 +234,16 @@
 		<u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
 		</u-picker>
+		<!-- //货物类别 -->
+		<u-picker :show="isGoodsType" ref="uPicker" :columns="goodsList" keyName="constValue" @confirm="goodsSubmit"
+			:closeOnClickOverlay='true' @close='isGoodsType=false' @cancel='isGoodsType=false'>
+		</u-picker>
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='false'
 			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick"
 			@cancel="cancelClick"></u-modal>
+		<u-modal :show="isShowAlert1" :title="alertTitle" :confirmText='confirmText' :content='alertContent'
+			:closeOnClickOverlay='false' :showCancelButton='showCancelButton' confirmColor='#2772FB'
+			@confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
 		<u-toast ref="uToast"></u-toast>
 
 	</view>
@@ -289,6 +304,8 @@
 					unsendLongitude: '',
 					unsendLatitude: '',
 				},
+				confirmText: '',
+				isShowAlert1: false,
 				checkboxValue1: ['不限'],
 				checkboxList1: [{
 						name: '不限',
@@ -326,6 +343,9 @@
 					},
 
 				],
+				// 货物类别
+				isGoodsType:false,
+				goodsList:[]
 			}
 		},
 		onNavigationBarButtonTap(e) {
@@ -363,10 +383,18 @@
 					uni.$u.route('/pages/components/empty/index');
 				} else if (_obj.authenticationStatus == '审核中') {
 					uni.showToast({
-						title: '身份信息审核中'
+						title: '身份信息审核中',
+						icon: 'none'
 					})
+
+				} else if (_obj.authenticationStatus == '已过期') {
+					this.alertTitle = '身份信息已过期!'
+					this.showCancelButton = false
+					this.confirmText = '立即修改'
+					this.isShowAlert1 = true
 				} else {
 					this.alertTitle = '身份信息未认证,去认证?'
+					this.confirmText = '确认'
 					this.showCancelButton = false
 					this.isShowAlert = true
 				}
@@ -410,8 +438,17 @@
 			this.dataObj.loadingDateEnd = '随时'
 			this.dataObj.taskValidity = '长期'
 			this.getSFList()
+			
 		},
 		async onLoad() {
+			//货物类别(默认上一次)
+			this.queryGoodsList() // 查询货物类别
+			let goods = uni.getStorageSync("goodsType")
+			if(goods){
+				this.dataObj.goodsType = goods.name
+				this.dataObj.goodsTypeKey = goods.key
+			}
+			
 
 			// _this = this
 			// // #ifdef APP-PLUS
@@ -421,7 +458,7 @@
 			// 	if(res.data){
 			// 		return res.data.authenticationStatus
 			// 	}
-				
+
 			// })
 			// if (_status == '已禁用') {
 			// 	this.isShowAlert = true
@@ -437,6 +474,27 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			queryGoodsList(){
+				this.$request.baseRequest('get', '/commonSysParameter/getInfo', {
+						constId: "CON1"
+					}).then(res => {
+						this.goodsList.push(res.data)
+						console.log(this.goodsList)
+					})
+			},
+			goodstypeChange(){
+				this.isGoodsType = true
+			},
+			goodsSubmit(e){
+				this.dataObj.goodsType = e.value[0].constValue
+				this.dataObj.goodsTypeKey = e.value[0].constKey
+				let _obj={
+					name:e.value[0].constValue,
+					key:e.value[0].constKey
+				}
+				uni.setStorageSync("goodsType",_obj)
+				this.isGoodsType = false
+			},
 			getSFList() {
 				this.dataObj.commonId = this.userInfo.id
 				this.$request.baseRequest('get', '/cargoOwnerCompInfo/cargoOwnerList', {
@@ -444,6 +502,8 @@
 					}).then(res => {
 						if (uni.getStorageSync('releaseCargoOwner')) {
 							this.dataObj.cargoOwner = uni.getStorageSync('releaseCargoOwner')
+							this.dataObj.compId =uni.getStorageSync('releasecompId')
+							
 						}
 						// 可用企业货主
 						this.qyList = []
@@ -457,6 +517,7 @@
 						if (!_self) _self = []
 						if (_self.length > 0) {
 							for (let i = 0; i < _self.length; i++) {
+								_self[i].compStatus='wd'
 								if (_self[i].status == '已认证') {
 									this.qyList.push(_self[i])
 								}
@@ -464,6 +525,7 @@
 						}
 						if (_dlhz.length > 0) {
 							for (let i = 0; i < _dlhz.length; i++) {
+								_dlhz[i].compStatus='ss'
 								if (_dlhz[i].status == '已认证') {
 									this.qyList.push(_dlhz[i])
 								}
@@ -473,7 +535,7 @@
 							[]
 						]
 						let obj = uni.getStorageSync("firstAuthentication")
-						if(obj && obj.authenticationStatus == '已认证'){
+						if (obj && obj.authenticationStatus == '已认证') {
 							this.columns[0].push("个人货主")
 						}
 						for (let i = 0; i < this.qyList.length; i++) {
@@ -529,17 +591,24 @@
 					})
 					return true
 				}
+				if (!uni.$u.test.chinese(this.dataObj.goodsName)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "货名输入错误!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataObj.receiver)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "收货联系人不能为空!",
+						message: "收货不能为空!",
 					})
 					return true
 				}
 				if (uni.$u.test.isEmpty(this.dataObj.receiverPhone)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "收货联系人电话不能为空!",
+						message: "收货方手机号不能为空!",
 					})
 					return true
 				}
@@ -558,6 +627,27 @@
 					})
 					return true
 				}
+				// if(this.dataObj.receiverIdcard&&!uni.$u.test.rangeLength(this.dataObj.receiverIdcard, [18, 18])){
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "身份证号输入错误!",
+				// 	})
+				// 	return true
+				// }
+				if(this.dataObj.receiverIdcard&&this.dataObj.receiverIdcard.length!=18){
+					this.$refs.uToast.show({
+							type: 'error',
+							message: "身份证号输入错误!",
+						})
+						return true
+				}
+				if(this.dataObj.receiverCreditCode&&this.dataObj.receiverCreditCode.length!=18){
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "信用代码输入错误!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataObj.freightPrice)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -600,7 +690,7 @@
 							duration: 2000,
 							icon: "none",
 						});
-						return
+						return true
 					}
 				}
 				if (this.dataObj.carLength) {
@@ -665,29 +755,30 @@
 					});
 					return true
 				}
-
-
 			},
 			confirmClick() {
-				// #ifdef APP-PLUS
-				if (this.alertTitle == '账号审核中') {
-					if (uni.getSystemInfoSync().platform == 'ios') {
-						plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
-					} else if (uni.getSystemInfoSync().platform == 'android') {
-						plus.runtime.quit();
-					}
-					return
-				}
-				// #endif
-
-				if (this.alertTitle == '身份信息未认证,去认证?') {
-					uni.switchTab({
-						url: '/pages/mine/index'
-					})
-					return
-				}
-				this.isShowAlert = false
-
+				uni.$u.throttle(this.requestdata, 500)
+			},
+			requestdata(){
+				// // #ifdef APP-PLUS
+				// if (this.alertTitle == '账号审核中') {
+				// 	if (uni.getSystemInfoSync().platform == 'ios') {
+				// 		plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
+				// 	} else if (uni.getSystemInfoSync().platform == 'android') {
+				// 		plus.runtime.quit();
+				// 	}
+				// 	return
+				// }
+				// // #endif
+				
+				// if (this.alertTitle == '身份信息未认证,去认证?') {
+				// 	uni.switchTab({
+				// 		url: '/pages/mine/index'
+				// 	})
+				// 	return
+				// }
+				// this.isShowAlert = false
+				
 				if (this.dataObj.billingMethod == '元/吨') {
 					this.dataObj.billingMethod = 0
 				} else {
@@ -698,6 +789,12 @@
 				} else {
 					this.dataObj.freightAdvance = 0
 				}
+				if(this.dataObj.receiverIdcard){
+					this.dataObj.receiverIdcard=''
+				}
+				if(this.dataObj.receiverCreditCode){
+					this.dataObj.receiverCreditCode=''
+				}
 				let _list = []
 				for (let i = 0; i < this.checkboxValue1.length; i++) {
 					if (this.checkboxValue1[i] == '不限') {
@@ -713,7 +810,18 @@
 				this.dataObj.carModel = _list.toString()
 				this.dataObj.commonId = this.userInfo.id
 				this.$request.baseRequest('post', '/publishTaskInfo/api/addTask', this.dataObj).then(res => {
-
+						uni.removeStorage({
+							key: 'storage_saddress'
+						});
+						uni.removeStorage({
+							key: 'storage_faddress'
+						});
+						uni.removeStorage({
+							key: 'releaseCargoOwner'
+						});
+						uni.removeStorage({
+							key: 'releasecompId'
+						});
 						this.$refs.uToast.show({
 							type: 'success',
 							message: "发布成功",
@@ -754,11 +862,11 @@
 									unsendLatitude: '',
 								}
 								_this.checkboxValue1 = ['不限']
+								// uni.$u.route("/pages/release/record")
 							}
 						})
-						uni.switchTab({
-							url: '/pages/order/index'
-						})
+						this.isShowAlert = false
+				
 					})
 					.catch(res => {
 						uni.showToast({
@@ -767,7 +875,6 @@
 							duration: 2000
 						})
 					});
-
 			},
 			cancelClick() {
 				this.isShowAlert = false
@@ -848,10 +955,18 @@
 				for (let i = 0; i < this.qyList.length; i++) {
 					let _name = this.qyList[i].company ? this.qyList[i].company : this.qyList[i].companyName
 					if (_name == e.value[0]) {
+						if(e.value[0]!='个人货主'){
+							if(this.qyList[i].compStatus=='ss'){
+								this.dataObj.compId=this.qyList[i].compId
+							}else{
+								this.dataObj.compId=this.qyList[i].id
+							}
+							uni.setStorageSync('releasecompId', this.dataObj.compId)
+						}
 						this.dataObj.freightAdvance = this.qyList[i].advanceFreightService == 1 ? true : false
 					}
 				}
-
+				
 				uni.setStorageSync('releaseCargoOwner', this.dataObj.cargoOwner)
 				this.show = false
 			},
@@ -911,6 +1026,18 @@
 
 				this.isShowValidity = false
 			},
+			getTime: function() {
+
+				var date = new Date().getTime()
+				year = date.getFullYear(),
+					month = date.getMonth() + 1,
+					day = date.getDate(),
+
+					month >= 1 && month <= 9 ? (month = "0" + month) : "";
+				day >= 0 && day <= 9 ? (day = "0" + day) : "";
+				var timer = year + '-' + month + '-' + day
+				return timer;
+			},
 			confirmValidityPeriodcq(e) {
 				if (e.value[0] == '长期') {
 					this.dataObj.taskValidity = e.value[0]
@@ -922,9 +1049,22 @@
 						})
 						return
 					}
-					this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+					var datetime = new Date().getTime()
+					var datetime1 = datetime + (24 * 60 * 60 * 1000 * 30 * 6)
+					var currecttime = new Date(e.value[0] + '-' + e.value[1] + '-' + e.value[2]).getTime()
+					if (currecttime < datetime || currecttime > datetime1) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "请选择未来六个月之内的日期!",
+						})
+					} else {
+						this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						this.isShowcardValidity = false
+					}
+					console.log(datetime, currecttime)
+
 				}
-				this.isShowcardValidity = false
+
 			},
 			selectValidityPeriod(type) {
 				this.ValidityPeriodType = type
@@ -967,6 +1107,11 @@
 		text-align: right;
 	}
 
+	.content {
+		height: 100vh;
+		overflow: scroll;
+	}
+
 	.title {
 		padding: 0 20rpx;
 		display: flex;
@@ -1008,6 +1153,12 @@
 		padding: 40rpx;
 
 		.select-sf {
+			color: #171717;
+			font-size: 34rpx;
+			font-weight: 600;
+		}
+
+		.select-sf1 {
 			color: #999999;
 		}
 

+ 146 - 187
pages/release/selectAddress.vue

@@ -4,42 +4,57 @@
 			<u-search placeholder="可按地址、联系人和电话查找" v-model="searchKeyWord" :showAction='false' @search="getList()">
 			</u-search>
 		</view>
-		<view class="content2" v-for="(item,index) in dataList" :key='index' @click="configAddress(item)">
-			<view class="row flex row1">
-				<view class="name">
-					{{item.contacts}}
-				</view>
-				<view class="phone">
-					{{item.contactPhone}}
-				</view>
-			</view>
-			<view class="row flex row2">
-				{{item.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}
-			</view>
-			<view class="row flex row3">
-				<u-radio-group placement="row" class="select-type" v-model="item.radiovalue">
-					<u-radio :customStyle="radioCustomStyle" v-for="(item1, index) in radiolist1" :key="index"
-						:label="item1.name" :name="item1.name" @change="radioChange($event,item)" labelSize='12px'
-						:iconSize='10'>
-					</u-radio>
-				</u-radio-group>
-				<view class="flex">
-					<view class="mr20 icon-img" @click.stop="toTop(item)">
-						<u-icon name="arrow-upward" color="#999999" size="18"></u-icon>置顶
+		<view class="content2-wrap">
+			<view class="content2" v-for="(item,index) in dataList" @click="configAddress(item)">
+				<view class="row flex row1">
+					<view class="name">
+						{{item.contacts}}
 					</view>
-					<view class="mr20 icon-img" @click.stop="edit(item)">
-						<u-icon name="edit-pen-fill" color="#999999" size="18"></u-icon>编辑
+					<view class="phone">
+						{{item.contactPhone1}}
 					</view>
-					<view class="mr20 icon-img" @click.stop="del(item)">
-						<u-icon name="trash-fill" color="#999999" size="18"></u-icon>删除
+				</view>
+				<view class="row flex row2">
+					{{item.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}
+				</view>
+				<view class="row flex row3">
+					<u-radio-group placement="row" class="select-type" v-model="item.radiovalue">
+						<u-radio :customStyle="radioCustomStyle" v-for="item1 in radiolist1"
+							:label="item1.name" :name="item1.name" @change="radioChange($event,item)" labelSize='12px'
+							:iconSize='10'>
+						</u-radio>
+					</u-radio-group>
+					<view class="flex">
+						<view class="mr20 icon-img" @click.stop="toTop(item)">
+							<!-- <u-icon name="arrow-upward" color="#999999" size="18"></u-icon> -->
+							<image class="jt-icon" src="@/static/images/release/zhiding.png" mode='widthFix'>
+							</image>
+							置顶
+						</view>
+						<view class="mr20 icon-img" @click.stop="edit(item)">
+							<!-- <u-icon name="edit-pen-fill" color="#999999" size="18"></u-icon> -->
+							<image class="jt-icon" src="@/static/images/release/bianji.png" mode='widthFix'>
+							</image>
+							编辑
+						</view>
+						<view class="mr20 icon-img" @click.stop="del(item)">
+							<!-- <u-icon name="trash-fill" color="#999999" size="18"></u-icon> -->
+							<image class="jt-icon" src="@/static/images/release/shanchu.png" mode='widthFix'>
+							</image>
+							删除
+						</view>
 					</view>
 				</view>
 			</view>
 		</view>
+
 		<view class="bottom-btn">
 			<view class="btn-left" @click="selectAddress(0)">选择临时地址</view>
 			<view class="btn-right" @click="selectAddress(1)">新增地址</view>
 		</view>
+		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
+			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick"
+			@cancel="cancelClick"></u-modal>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -80,6 +95,10 @@
 					},
 
 				],
+				delId: "",
+				isShowAlert: false,
+				alertTitle: "",
+				alertContent: "",
 			}
 		},
 		computed: {
@@ -95,6 +114,32 @@
 			this.getList()
 		},
 		methods: {
+			confirmClick() {
+				this.isShowAlert = false
+				this.$request.baseRequest('post', '/cargoOwnerAddressInfo/api/deleteCargoOwnerAddress', {
+						id: this.delId,
+					}).then(res => {
+						if (res.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "删除成功",
+								complete() {
+									that.getList()
+								}
+							})
+						}
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			configAddress(val) {
 				if (this.type == 0) {
 					uni.setStorageSync('storage_faddress', val);
@@ -118,6 +163,13 @@
 						currentPage: 1
 					}).then(res => {
 						if (res.code == 200) {
+							if (res.data.records.length) {
+								for (var i = 0; i < res.data.records.length; i++) {
+									res.data.records[i].contactPhone1 = res.data.records[i].contactPhone.replace(
+										/(\d{3})(\d{4})(\d{4})/, "$1****$3")
+								}
+							}
+							console.log(res.data.records)
 							this.dataList = res.data.records
 							this.$forceUpdate()
 							for (let i = 0; i < this.dataList.length; i++) {
@@ -145,14 +197,14 @@
 				console.log('radioChange', n);
 				console.log('radioChange', val);
 				for (var i = 0; i < this.dataList.length; i++) {
-					if (this.dataList[i].defaultShipment == 1&&n=='默认装货') {
+					if (this.dataList[i].defaultShipment == 1 && n == '默认装货') {
 						this.dataList[i].radiovalue = ''
 					}
-					if (this.dataList[i].defaultReceipt == 1&&n=='默认卸货') {
+					if (this.dataList[i].defaultReceipt == 1 && n == '默认卸货') {
 						this.dataList[i].radiovalue = ''
 					}
 				}
-				this.$set(val,'radioChange',n)
+				this.$set(val, 'radioChange', n)
 				let _flag;
 				if (n == '默认卸货') {
 					_flag = 2
@@ -209,180 +261,69 @@
 				uni.$u.route('/pages/release/editAddress', val);
 			},
 			del(val) {
-				this.$request.baseRequest('post', '/cargoOwnerAddressInfo/api/deleteCargoOwnerAddress', {
-						id: val.id,
-					}).then(res => {
-						if (res.code == 200) {
-							this.$refs.uToast.show({
-								type: 'success',
-								message: "删除成功",
-								complete() {
-									that.getList()
-								}
-							})
-						}
-					})
-					.catch(res => {
-						uni.showToast({
-							title: res.message,
-							icon: 'none',
-							duration: 2000
-						})
-					});
+				this.delId = val.id
+				this.isShowAlert = true
+				this.alertTitle = "确定将要删除该常用地址?"
 			},
 			selectAddress(type) {
 				// 0临时地址 1 新增地址
 				if (type == 0) {
+					console.log(111111111)
 					let that = this
 					uni.getLocation({
-						type: 'wgs84',
+						type: 'gcj02',
+						geocode:true,
+						altitude:true,
+						isHighAccuracy:true,
 						success: function(res) {
 							console.log('当前位置的经度:' + res.longitude);
 							console.log('当前位置的纬度:' + res.latitude);
 							uni.chooseLocation({
 								success: function(res) {
+									// var locationObj = that.$helper.formatLocation(res);
+									// console.log(locationObj)
 									console.log(res);
 									console.log('位置名称:' + res.name);
 									console.log('详细地址:' + res.address);
 									console.log('纬度:' + res.latitude);
 									console.log('经度:' + res.longitude);
-									var locationObj = that.$helper.formatLocation(res);
-									console.log(locationObj)
-									that.temporaryAddress.latitude = res.latitude
-									that.temporaryAddress.longitude = res.longitude
-									that.temporaryAddress.detailedAddress = locationObj.ADDRESS
-									that.temporaryAddress.province = locationObj.REGION_PROVINCE
-									that.temporaryAddress.city = locationObj.REGION_CITY
-									that.temporaryAddress.area = locationObj.REGION_COUNTRY
-									that.temporaryAddress.commonId = that.userInfo.id
-									that.configAddress(that.temporaryAddress)
+									let _address = that.$helper.formatLocation(res.address)
+									console.log('----------------------------')
+									console.log(_address, that.type)
+									var data = {}
+									data.latitude = res.latitude
+									data.longitude = res.longitude
+									data.detailedAddress = _address.Village
+									data.province = _address.Province
+									data.city = _address.City
+									data.area = _address.Country
+									data.commonId = that.userInfo.id
+									if (that.type == 0) {
+										uni.setStorageSync('storage_faddress', data)
+									} else {
+										uni.setStorageSync('storage_saddress', data)
+									}
+
+									uni.navigateBack({
+										delta: 1
+									})
+									// uni.$u.route('/pages/release/release');
+									// that.temporaryAddress.latitude = res.latitude
+									// that.temporaryAddress.longitude = res.longitude
+									// that.temporaryAddress.detailedAddress = locationObj.ADDRESS
+									// that.temporaryAddress.province = locationObj.REGION_PROVINCE
+									// that.temporaryAddress.city = locationObj.REGION_CITY
+									// that.temporaryAddress.area = locationObj.REGION_COUNTRY
+									// that.temporaryAddress.commonId = that.userInfo.id
+									// that.configAddress(that.temporaryAddress)
+									// that.$forceUpdate()
+								},
+
+								fail(err) {
+									console.log(err)
 								},
-								fail: function() {
-								// 	uni.getSetting({
-								// 		success: function(res) {
-								// 			var statu = res.authSetting;
-								// 			if (!statu['scope.userLocation']) {
-								// 				uni.showModal({
-								// 					title: '是否授权当前位置',
-								// 					content: '需要获取您的地理位置,请确认授权,否则地图功能将无法使用',
-								// 					success: function(tip) {
-								// 						if (tip.confirm) {
-								// 							uni.openSetting({
-								// 								success: function(
-								// 									data
-								// 									) {
-								// 									if (data
-								// 										.authSetting[
-								// 											"scope.userLocation"
-								// 										] ===
-								// 										true
-								// 									) {
-								// 										uni.showToast({
-								// 											title: '授权成功',
-								// 											icon: 'success',
-								// 											duration: 1000
-								// 										})
-								// 										//授权成功之后,再调用chooseLocation选择地方
-								// 										uni.chooseLocation({
-								// 											success: function(
-								// 												res
-								// 											) {
-								// 												console
-								// 													.log(
-								// 														res
-								// 													);
-								// 												console
-								// 													.log(
-								// 														'位置名称:' +
-								// 														res
-								// 														.name
-								// 													);
-								// 												console
-								// 													.log(
-								// 														'详细地址:' +
-								// 														res
-								// 														.address
-								// 													);
-								// 												console
-								// 													.log(
-								// 														'纬度:' +
-								// 														res
-								// 														.latitude
-								// 													);
-								// 												console
-								// 													.log(
-								// 														'经度:' +
-								// 														res
-								// 														.longitude
-								// 													);
-								// 												var locationObj =
-								// 													that
-								// 													.$helper
-								// 													.formatLocation(
-								// 														res
-								// 													);
-								// 												console
-								// 													.log(
-								// 														locationObj
-								// 													)
-								// 												that.temporaryAddress
-								// 													.latitude =
-								// 													res
-								// 													.latitude
-								// 												that.temporaryAddress
-								// 													.longitude =
-								// 													res
-								// 													.longitude
-								// 												that.temporaryAddress
-								// 													.detailedAddress =
-								// 													locationObj
-								// 													.ADDRESS
-								// 												that.temporaryAddress
-								// 													.province =
-								// 													locationObj
-								// 													.REGION_PROVINCE
-								// 												that.temporaryAddress
-								// 													.city =
-								// 													locationObj
-								// 													.REGION_CITY
-								// 												that.temporaryAddress
-								// 													.area =
-								// 													locationObj
-								// 													.REGION_COUNTRY
-								// 												that.temporaryAddress
-								// 													.commonId =
-								// 													that
-								// 													.userInfo
-								// 													.id
-								// 												that.configAddress(
-								// 													that
-								// 													.temporaryAddress
-								// 												)
-								// 											},
-								// 										})
-								// 									} else {
-								// 										uni.showToast({
-								// 											title: '授权失败',
-								// 											icon: 'none',
-								// 											duration: 1000
-								// 										})
-								// 									}
-								// 								}
-								// 							})
-								// 						}
-								// 					}
-								// 				})
-								// 			}
-								// 		},
-								// 		fail: function(res) {
-								// 			uni.showToast({
-								// 				title: '调用授权窗口失败',
-								// 				icon: 'none',
-								// 				duration: 1000
-								// 			})
-								// 		}
-								// 	})
-								
+								complete(res1) {
+									console.log(res1)
 								}
 							});
 						}
@@ -404,6 +345,22 @@
 		padding: 20rpx;
 	}
 
+	.content {
+		height: 100vh;
+	}
+
+	.content2-wrap {
+		margin-bottom: 200rpx;
+	}
+
+	.jt-icon {
+		position: relative;
+		top: 4rpx;
+		width: 24rpx;
+		margin: 0 10rpx;
+
+	}
+
 	.content2 {
 		border-radius: 20rpx;
 		background: white;
@@ -436,8 +393,10 @@
 
 	.bottom-btn {
 		position: fixed;
-		bottom: 50rpx;
+		bottom: 0rpx;
+		padding: 50rpx 0;
 		width: 100%;
+		background-color: #fff;
 		display: flex;
 		justify-content: space-around;
 

BIN
static/images/carSource/dianhua.png


BIN
static/images/dianhua.png


BIN
static/images/kefu.png


BIN
static/images/myAccount/qian.png


BIN
static/images/order/guanbi@3x.png


BIN
static/images/order/pingjia.png


BIN
static/images/order/quanbuyewu.png


BIN
static/images/order/right.png


BIN
static/images/order/sousuo.png


BIN
static/images/release/bianji.png


BIN
static/images/release/shanchu.png


BIN
static/images/release/zhiding.png


BIN
static/images/return.png


BIN
static/images/xingxing.png


BIN
static/images/xingxing_check.png


BIN
static/mine/bank/noBank.png


BIN
static/mine/right.png


BIN
static/mine/sanchu.png


BIN
static/right.png


BIN
static/xianshi.png


BIN
static/yioncang.png


+ 1 - 1
uni_modules/mescroll-uni/components/mescroll-diy/beibei/mescroll-uni-option.js

@@ -27,7 +27,7 @@ const GlobalOption = {
 		zh: {
 			up: {
 				textLoading: '加载中 ...', // 加载中的提示文本
-				textNoMore: '-- 没有更多了~ --', // 没有更多数据的提示文本
+				textNoMore: ' 没有更多了~ ', // 没有更多数据的提示文本
 				empty: {
 					tip: '~ 暂无相关数据 ~' // 空提示
 				}

+ 1 - 1
uni_modules/mescroll-uni/components/mescroll-diy/xinlang/mescroll-uni-option.js

@@ -35,7 +35,7 @@ const GlobalOption = {
 			},
 			up: {
 				textLoading: '加载中 ...', // 加载中的提示文本
-				textNoMore: '-- 没有更多了~ --', // 没有更多数据的提示文本
+				textNoMore: ' 没有更多了~ ', // 没有更多数据的提示文本
 				empty: {
 					tip: '~ 空空如也 ~' // 空提示
 				}

+ 1 - 1
uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni-option.js

@@ -35,7 +35,7 @@ const GlobalOption = {
 			},
 			up: {
 				textLoading: '加载中 ...', // 加载中的提示文本
-				textNoMore: '-- 没有更多了~ --', // 没有更多数据的提示文本
+				textNoMore: ' 没有更多了~ ', // 没有更多数据的提示文本
 				empty: {
 					tip: '~ 空空如也 ~' // 空提示
 				}

+ 1 - 1
uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.js

@@ -95,7 +95,7 @@ MeScroll.prototype.extendUpScroll = function(optUp) {
 		noMoreSize: 5, // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
 		offset: 150, // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
 		textLoading: '加载中 ...', // 加载中的提示文本
-		textNoMore: '-- 没有更多了~ --', // 没有更多数据的提示文本
+		textNoMore: ' 没有更多了~ ', // 没有更多数据的提示文本
 		bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
 		textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
 		inited: null, // 初始化完毕的回调

+ 0 - 23
uni_modules/uni-rate/changelog.md

@@ -1,23 +0,0 @@
-## 1.3.0(2021-11-19)
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-rate](https://uniapp.dcloud.io/component/uniui/uni-rate)
-## 1.2.2(2021-09-10)
-- 优化 默认值修改为 0 颗星
-## 1.2.1(2021-07-30)
-- 优化 vue3下事件警告的问题
-## 1.2.0(2021-07-13)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
-## 1.1.2(2021-05-12)
-- 新增 组件示例地址
-## 1.1.1(2021-04-21)
-- 修复 布局变化后 uni-rate  星星计算不准确的 bug
-- 优化 添加依赖 uni-icons, 导入 uni-rate 自动下载依赖
-## 1.1.0(2021-04-16)
-- 修复 uni-rate 属性 margin 值为 string 组件失效的 bug
-
-## 1.0.9(2021-02-05)
-- 优化 组件引用关系,通过uni_modules引用组件
-
-## 1.0.8(2021-02-05)
-- 调整为uni_modules目录规范
-- 支持 pc 端

+ 0 - 88
uni_modules/uni-rate/package.json

@@ -1,88 +0,0 @@
-{
-  "id": "uni-rate",
-  "displayName": "uni-rate 评分",
-  "version": "1.3.0",
-  "description": "Rate 评分组件,可自定义评分星星图标的大小、间隔、评分数。",
-  "keywords": [
-    "uni-ui",
-    "uniui",
-    "评分"
-],
-  "repository": "https://github.com/dcloudio/uni-ui",
-  "engines": {
-    "HBuilderX": ""
-  },
-  "directories": {
-    "example": "../../temps/example_temps"
-  },
-  "dcloudext": {
-    "category": [
-      "前端组件",
-      "通用组件"
-    ],
-    "sale": {
-      "regular": {
-        "price": "0.00"
-      },
-      "sourcecode": {
-        "price": "0.00"
-      }
-    },
-    "contact": {
-      "qq": ""
-    },
-    "declaration": {
-      "ads": "无",
-      "data": "无",
-      "permissions": "无"
-    },
-    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
-  },
-  "uni_modules": {
-    "dependencies": [
-			"uni-scss",
-			"uni-icons"
-		],
-    "encrypt": [],
-    "platforms": {
-      "cloud": {
-        "tcb": "y",
-        "aliyun": "y"
-      },
-      "client": {
-        "App": {
-          "app-vue": "y",
-          "app-nvue": "y"
-        },
-        "H5-mobile": {
-          "Safari": "y",
-          "Android Browser": "y",
-          "微信浏览器(Android)": "y",
-          "QQ浏览器(Android)": "y"
-        },
-        "H5-pc": {
-          "Chrome": "y",
-          "IE": "y",
-          "Edge": "y",
-          "Firefox": "y",
-          "Safari": "y"
-        },
-        "小程序": {
-          "微信": "y",
-          "阿里": "y",
-          "百度": "y",
-          "字节跳动": "y",
-          "QQ": "y"
-        },
-        "快应用": {
-          "华为": "u",
-          "联盟": "u"
-        },
-        "Vue": {
-            "vue2": "y",
-            "vue3": "y"
-        }
-      }
-    }
-  }
-}

+ 0 - 12
uni_modules/uni-rate/readme.md

@@ -1,12 +0,0 @@
-
-
-## Rate 评分
-> **组件名:uni-rate**
-> 代码块: `uRate`
-> 关联组件:`uni-icons`
-
-
-评分组件,多用于购买商品后,对商品进行评价等场景
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-rate)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 2 - 0
uni_modules/uview-ui/components/u-upload/u-upload.vue

@@ -124,6 +124,7 @@
 	import {
 		chooseFile
 	} from './utils';
+
 	import mixin from './mixin.js';
 	import props from './props.js';
 
@@ -197,6 +198,7 @@
 				this.lists = lists
 				this.isInCount = lists.length < maxCount
 			},
+			
 			chooseFile() {
 				const {
 					maxCount,

+ 4 - 1
uni_modules/uview-ui/libs/function/test.js

@@ -133,7 +133,10 @@ function range(value, param) {
  * 验证一个长度范围[min, max]
  */
 function rangeLength(value, param) {
-    return value.length >= param[0] && value.length <= param[1]
+	let check = value.length >= param[0] && value.length <= param[1]
+	//如果value长度小于min个或max 返回true  (不符合条件)
+	//符合条件返回false
+    return !check
 }
 
 /**

+ 76 - 50
util/request.js

@@ -1,13 +1,13 @@
 import * as config from '@/config'
 let baseUrl = config.def().baseUrlNew
 // 定义基础请求路径(后端服务器地址)
-const baseRequest = (method, url, data,header) => {
+const baseRequest = (method, url, data, header) => {
 	var contentheader = 'application/json'
 	if (header) {
 		contentheader = header
 	}
 	let baseDefaultOpts = {
-		url: baseUrl+url,
+		url: baseUrl + url,
 		// 请求接口地址
 		data: data,
 		// 传入请求参数
@@ -16,47 +16,73 @@ const baseRequest = (method, url, data,header) => {
 		header: {
 			'content-type': contentheader //'application/x-www-form-urlencoded; charset=UTF-8',
 		}
-		}
-		let promise = new Promise(function(resolve, reject) {
-			uni.request(baseDefaultOpts).then(
-				(res) => {
-					// console.log(JSON.stringify(res[1].data))
-					if(res[1].data.code == '200' || res[1].data.code == 200){
-						// 后端返回的状态码100为成功状态,成功则返回请求结果,在app调试时可以通过console.log(JSON.stringify(res[1].data))来查看返回值(以项目实际情况为准)
-						resolve(res[1].data)
-					}else{
-						uni.showToast({
-							icon:'none',
-						    title: res[1].data.message,
-						    duration: 2000 
-						}); 
+	}
+	let promise = new Promise(function(resolve, reject) {
+		uni.getNetworkType({}).then((res) => {
+			console.log(res)
+			if (res[1].networkType === "none") {
+				uni.showToast({
+					icon: 'none',
+					title: '网络异常,请检查网络状况',
+					duration: 2000
+				});
+			} else {
+				uni.request(baseDefaultOpts).then(
+					(res) => {
+						// console.log(JSON.stringify(res[1].data))
+						// if(res[1].data.code == '200' || res[1].data.code == 200){
+						// 	// 后端返回的状态码100为成功状态,成功则返回请求结果,在app调试时可以通过console.log(JSON.stringify(res[1].data))来查看返回值(以项目实际情况为准)
+						// 	resolve(res[1].data)
+						// }else{
+						// 	uni.showToast({
+						// 		icon:'none',
+						// 	    title: res[1].data.message,
+						// 	    duration: 2000 
+						// 	}); 
+						// }
+						if (res[1]) {
+							if (res[1].data.code == '200' || res[1].data.code == 200) {
+								resolve(res[1].data)
+							}else{
+								resolve(res[1].data)
+							}
+						} else {
+							reject(response)
+							// uni.showToast({
+							// 	icon: 'none',
+							// 	title: '网络异常,请检查网络状况',
+							// 	duration: 2000
+							// });
+						}
+						// // 登录失败
+						// if(res[1].data.code == '11006' || res[1].data.code == 11006){
+						// 	reject(res[1].data)
+						// }
+						// if(res[1].data.code == '105' || res[1].data.code == 105){
+						// 	// 后端返回状态码为105则为未登录状态(以项目实际情况为准)
+						// 	uni.showToast({
+						// 		icon:'none',
+						// 	    title: '尚未登录',
+						// 	    duration: 2000 
+						// 	}); 
+						// 	// 尚未登录的逻辑处理
+						// 	return false
+						// }
 					}
-					// // 登录失败
-					// if(res[1].data.code == '11006' || res[1].data.code == 11006){
-					// 	reject(res[1].data)
-					// }
-					// if(res[1].data.code == '105' || res[1].data.code == 105){
-					// 	// 后端返回状态码为105则为未登录状态(以项目实际情况为准)
-					// 	uni.showToast({
-					// 		icon:'none',
-					// 	    title: '尚未登录',
-					// 	    duration: 2000 
-					// 	}); 
-					// 	// 尚未登录的逻辑处理
-					// 	return false
-					// }
-				}
-			).catch(
-				(response) => {
-					reject(response)
-				}
-			)
+				).catch(
+					(response) => {
+						reject(response)
+					}
+				)
+			}
+
 		})
-		return promise	
+	})
+	return promise
 };
 
 //带Token请求
-const TokenRequest = (method, url, data,header) => {
+const TokenRequest = (method, url, data, header) => {
 	var contentheader = 'application/json'
 	if (header) {
 		contentheader = header
@@ -70,29 +96,29 @@ const TokenRequest = (method, url, data,header) => {
 	});
 	//此token是登录成功后后台返回保存在storage中的
 	let DefaultOpts = {
-		url: baseUrl+url,
+		url: baseUrl + url,
 		data: data,
 		method: method,
-	header: {
-		'content-type': contentheader ,
-		'Token': ac_token,
-	}
+		header: {
+			'content-type': contentheader,
+			'Token': ac_token,
+		}
 	}
 	let promise = new Promise(function(resolve, reject) {
 		uni.request(DefaultOpts).then(
 			(res) => {
 				console.log(JSON.stringify(res[1].data))
-				if(res[1].data.code == '200' || res[1].data.code == 200){
+				if (res[1].data.code == '200' || res[1].data.code == 200) {
 					// 后端返回的状态码100为成功状态,成功则返回请求结果,在app调试时可以通过console.log(JSON.stringify(res[1].data))来查看返回值(以项目实际情况为准)
 					resolve(res[1].data)
 				}
-				if(res[1].data.code == '105' || res[1].data.code == 105){
+				if (res[1].data.code == '105' || res[1].data.code == 105) {
 					// 后端返回状态码为105则为未登录状态(以项目实际情况为准)
 					uni.showToast({
-						icon:'none',
-					    title: '尚未登录',
-					    duration: 2000 
-					}); 
+						icon: 'none',
+						title: '尚未登录',
+						duration: 2000
+					});
 					// 尚未登录的逻辑处理
 					return false
 				}
@@ -109,4 +135,4 @@ export default {
 	baseUrl,
 	baseRequest,
 	TokenRequest
-}
+}