Forráskód Böngészése

更换日期控件

gjy 2 éve
szülő
commit
36d024d7ca

+ 363 - 88
components/itmister-date-picker/itmister-date-picker.nvue

@@ -1,46 +1,58 @@
 <template>
-	<view v-if="isShow">
-		<view class="date-picker-mask" bubble='true' @click="hide" :class="[isOpen?'show-date-picker-mask':'hide-date-picekr-mask']"
-		 :style="{backgroundColor:maskColor}"></view>
-		<view class="date-picker-container" @click.stop="handleClick" :class="[isOpen?'show-date-picker':'hide-date-picekr']">
+	<view>
+		<view v-if="isShow">
+			<view class="date-picker-mask" bubble='true' @click="hide" :class="[isOpen?'show-date-picker-mask':'hide-date-picekr-mask']"
+			 :style="{backgroundColor:maskColor}"></view>
+			<view class="date-picker-container" @click.stop="handleClick" :class="[isOpen?'show-date-picker':'hide-date-picekr']">
 
-			<!-- 操作 -->
-			<view class="date-picker-title row between-center">
-				<text class="date-picker-cancel" @click="hide">取消</text>
-				<text class="date-picker-confirm" @click="dateConfirm">确定</text>
+				<!-- 操作 -->
+				<view class="date-picker-title row between-center">
+					<text class="date-picker-cancel" @click="hide">取消</text>
+					<text class="date-picker-confirm" @click="dateConfirm">确定</text>
+				</view>
+				<!-- 内容 -->
+				<picker-view class="date-picker-box" v-if="visible" :indicator-style="indicatorStyle" :value="value" @change="bindChange">
+					<picker-view-column class="center">
+						<view class="date-picker-item center" v-for="(item,index) in years" :key="index">
+							<text >{{item}}</text>
+						</view>
+					</picker-view-column>
+					<picker-view-column>
+						<view class="date-picker-item center" v-for="(item,index) in months" :key="index">
+							<text>{{item}}</text>
+						</view>
+					</picker-view-column>
+					<picker-view-column>
+						<view class="date-picker-item center" v-for="(item,index) in days" :key="index">
+							<text>{{item}}</text>
+						</view>
+					</picker-view-column>
+				</picker-view>
 			</view>
-			<!-- 内容 -->
-			<picker-view class="date-picker-box" v-if="visible" :indicator-style="indicatorStyle" :value="value" @change="bindChange">
-				<picker-view-column class="center">
-					<view class="date-picker-item center" v-for="(item,index) in years" :key="index">
-						<text v-if='item!="长期"'>{{item}}年</text>
-						<text v-else>{{item}}</text>
-					</view>
-				</picker-view-column>
-				<picker-view-column>
-					<view class="date-picker-item center" v-for="(item,index) in months" :key="index">
-						<text v-if="item!=''">{{item}}月</text>
-						<text v-else>{{item}}</text>
-					</view>
-				</picker-view-column>
-				<picker-view-column>
-					<view class="date-picker-item center" v-for="(item,index) in days" :key="index">
-
-						<text v-if="item!=''">{{item}}日</text>
-						<text v-else>{{item}}</text>
-					</view>
-				</picker-view-column>
-			</picker-view>
-
 		</view>
 	</view>
 </template>
 
 <script>
+	var that
+	/**
+	 * 日期控件
+	 * @property {String} maskColor 模态框背景色
+	 * @property {String,Number} checkYear 控件打开默认选中的年份(未传值或传空字符串默认选中的年份为当年)
+	 * @property {String,Number} checkMonth 控件打开默认选中的月份(未传值或传空字符串默认选中的年份为当月)
+	 * @property {String,Number} checkDay 控件打开默认选中的日期(未传值或传空字符串默认选中的年份为当日)
+	 * @property {String,Number} startYear 开始年份,默认为1940
+	 * @property {String,Number} futureYear 终止年份,今年向后多少年,可选的最晚年份(截止日期未传时生效)
+	 * @property {Boolean} periodOfValidity = [true | false] 是否是有效期(开启之后选择今天及之前的日期提示日期已过期)
+	 * @property {Boolean} isShow = [true | false] 开启|关闭
+	 * @property {String} overdueContent 开启periodOfValidity之后,选择今天及之前的日期提示日期已过期的内容文字
+	 * @property {String} endDate 截止日期,可选的最晚日期
+	 * @property {String,Number} dateStatus 日期类型,默认0没有长期和随时,1长期,2随时
+	 */
 	export default {
 		name: "datePicker",
 		props: {
-			maskColor: { // 模态框背景色
+			maskColor: { 
 				type: String,
 				default: 'rgba(0,0,0,0.3)'
 			},
@@ -55,27 +67,91 @@
 			checkDay:{
 				type: [String,Number],
 				default: new Date().getDate()
+			},
+			startYear:{
+				type: [String,Number],
+				default: 1940
+			},
+			futureYear:{
+				type: [String,Number],
+				default: 10
+			},
+			periodOfValidity:{
+				type: Boolean,
+				default: false
+			},
+			overdueContent:{
+				type: String,
+				default: ''
+			},
+			endDate: {
+			  type: Object,
+			  default: () => ({})
+			},
+			dateStatus:{
+				type: [String,Number],
+				default: 0
 			}
 		},
 		data() {
 			const date = new Date();
-			const years = ['长期'];
-			const months = [''];
+			let years = [],months = [];
+			if(this.dateStatus==1){
+				years = ['长期'];
+				months = [''];
+			}
+			if(this.dateStatus==2){
+				years = ['随时'];
+				months = [''];
+			}
+			const currectyear = date.getFullYear()
+			const currectmonth = date.getMonth() + 1
+			const currectday = date.getDate()
 			// console.log(this.checkYear)
 			// const month = date.getMonth() + 1
 			// const day = date.getDate();
-			const year = this.checkYear
-			const month = this.checkMonth
-			const day = this.checkDay
-			console.log(year,month,day)
-			// 可在此设置起始年份和终止年份
-			for (let i = 1940; i <= date.getFullYear() + 10; i++) {
-				years.push(i);
+			
+			// 传截止日期设置起始年份和终止年份
+			if(JSON.stringify(this.endDate)!='{}'){
+				if(this.endDate.year&&this.endDate.year<currectyear){
+					this.showtoast('截止日期年份必须大于等于当前年份')
+					return
+				}
+				if(this.endDate.year&&this.endDate.year==currectyear&&this.endDate.month&&this.endDate.month<currectmonth){
+					this.showtoast('截止日期月份必须大于等于当前月份')
+					return
+				}
+				if(this.endDate.year&&this.endDate.year==currectyear&&this.endDate.month&&this.endDate.month==currectmonth&&this.endDate.day&&this.endDate.day<currectday){
+					this.showtoast('截止日期必须大于等于今天')
+					return
+				}
+				var obj=this.createExpirationDate()
+				// console.log(obj)
+				years=obj.years
+				months=obj.months
 			}
-			for (let i = 1; i <= 12; i++) {
-				months.push(i);
+			
+			const year = this.checkYear?this.checkYear:currectyear
+			const month = this.checkMonth?Number(this.checkMonth):currectmonth
+			const day = this.checkDay?Number(this.checkDay):currectday
+			
+			console.log(year,month,day)
+			// 未传截止日期设置起始年份和终止年份
+			if(JSON.stringify(this.endDate)=='{}'){
+				for (let i = this.startYear; i <= currectyear + this.futureYear; i++) {
+					years.push(i);
+				}
+				if(this.dateStatus==0&&year=='长期'||this.dateStatus==0&&year=='随时'){
+					this.showtoast('当前日期选择器未带长期和随时选项,请修改当前类型')
+					return
+				}
+				if(year!='长期'&&year!='随时'){
+					for (let i = 1; i <= 12; i++) {
+						months.push(i);
+					}
+				}
 			}
-			console.log(months)
+			
 			return {
 				isShow: false, // 是否弹出
 				isOpen: false,
@@ -86,39 +162,119 @@
 				year,
 				month,
 				day,
-				value: [year - 1940, month - 1, day - 1], // 默认选中当天
+				value: year=='长期'||year=='随时'?[0,0,0]:[Number(year - this.startYear+1), month , day], // 默认选中当天
 				visible: true,
 				indicatorStyle: `height: ${Math.round(uni.getSystemInfoSync().screenWidth/(750/100))}px;`
 			}
 		},
 		methods: {
-
+			createExpirationDate(){
+				let years = [],months = [];
+				if(this.dateStatus==1){
+					years = ['长期'];
+					months = [''];
+				}
+				if(this.dateStatus==2){
+					years = ['随时'];
+					months = [''];
+				}
+				var year=this.checkYear?this.checkYear:this.year?this.year:new Date().getFullYear()
+				if(this.dateStatus==0&&year=='长期'||this.dateStatus==0&&year=='随时'){
+					this.showtoast('当前日期选择器未带长期和随时选项,请修改当前类型')
+					return
+				}
+				for (let i = this.startYear; i <= this.endDate.year; i++) {
+					years.push(i);
+				}
+				
+				if(year==this.endDate.year&&this.endDate.month){
+					if(year!='长期'||year!='随时'){
+						for (let i = 1; i <= this.endDate.month; i++) {
+							months.push(i);
+						}
+					}
+				}
+				if(year!=this.endDate.year){
+					for (let i = 1; i <= 12; i++) {
+						months.push(i);
+					}
+				}
+				return {years,months}
+			},
+			showtoast(content){
+				// #ifdef APP-PLUS
+				plus.nativeUI.toast(`<font style=\"font-size:15px;margin:20px;\" color="#f56c6c">&nbsp&nbsp&nbsp&nbsp${content?content:this.overdueContent}!&nbsp&nbsp&nbsp&nbsp</font>`, {
+					icon : "icon URL",// eg. "/img/add.png"
+					duration : "long",// 持续3.5s,short---2s
+					align : "center",// 水平居中
+					verticalAlign : "center",// 垂直底部
+					background:'#FEF0F0',
+					type: "richtext",
+				})
+				// #endif
+				// #ifdef H5
+				uni.showToast({
+					title: (content?content:this.overdueContent)+'!',
+					icon:'none',
+					duration: 2000
+				});
+				// #endif
+			},
+			setValue(){
+				var val=[]
+				for (let i = 0; i < this.years.length; i++) {
+					if(this.year==this.years[i]){
+						val[0]=i
+					}
+				}
+				for (let i = 0; i < this.months.length; i++) {
+					if(Number(this.month)==this.months[i]){
+						val[1]=i
+					}
+				}
+				for (let i = 0; i < this.days.length; i++) {
+					if(Number(this.day)==this.days[i]){
+						val[2]=i
+					}
+				}
+				return val
+			},
 			// 选中日期
 			dateConfirm() {
+				if(this.month==''&&this.year!='长期'&&this.month==''&&this.year!='随时'){
+					this.showtoast('未选择月份')
+					return
+				}
+				if(this.day==''&&this.year!='长期'&&this.day==''&&this.year!='随时'){
+					this.showtoast('未选择日期')
+					return
+				}
+				if(this.periodOfValidity&&this.year!='长期'&&this.periodOfValidity&&this.year!='随时'){
+					const date=new Date()
+					const currectyear = date.getFullYear()
+					const currectmonth = date.getMonth() + 1
+					const currectday = date.getDate()
+					if(this.year<currectyear){
+						this.showtoast()
+						return
+					}
+					if(this.year==currectyear&&this.month<currectmonth){
+						this.showtoast()
+						return
+					}
+					if(this.year==currectyear&&this.month==currectmonth&&this.day<=currectday){
+						this.showtoast()
+						return
+					}
+				}
 				let dateobj={
 					year:this.year,
 					month:this.month?this.month > 9 ? this.month : '0' + this.month:'',
 					day:this.day?this.day > 9 ? this.day :'0' + this.day:'',
 					date:''
 				}
-				if(this.year!='长期'){
-					var val=[]
-					for (let i = 0; i < this.years.length; i++) {
-						if(this.year==this.years[i]){
-							val[0]=i
-						}
-					}
-					for (let i = 0; i < this.months.length; i++) {
-						if(this.month==this.months[i]){
-							val[1]=i
-						}
-					}
-					for (let i = 0; i < this.days.length; i++) {
-						if(this.day==this.days[i]){
-							val[2]=i
-						}
-					}
-					this.value=val
+				if(this.year!='长期'&&this.year!='随时'){
+					this.value=this.setValue()
 					 dateobj.date= this.year + '-' + (this.month > 9 ? this.month : '0' + this.month) + '-' + (this.day > 9 ? this.day :
 					'0' + this.day);
 				}else{
@@ -134,7 +290,12 @@
 			},
 
 			bindChange(e) {
+				const date = new Date();
+				const year = date.getFullYear()
+				const month = date.getMonth() + 1
+				const day = date.getDate()
 				// console.log(this.value,e)
+				
 				const val = e.detail.value;
 				this.year = this.years[val[0]];
 				this.month = this.months[val[1]];
@@ -167,44 +328,138 @@
 			}
 		},
 		watch: {
+			"checkYear":{
+				handler(val){
+					// console.log(val)
+					this.checkYear=val
+					this.year=val
+					this.$nextTick(() => {
+						setTimeout(() => {
+							if(val!='长期'&&val!='随时'){
+								this.value=this.setValue()
+								// console.log(this.value)
+							}else{
+								this.value=[0,0,0]
+							}
+						}, 350);
+					})
+				}
+			},
+			"endDate":{
+				handler(val){
+					this.endDate=val
+				},
+				deep: true,
+				immediate: true
+			},
+			"checkMonth":{
+				handler(val){
+					// console.log(val)
+					this.checkMonth=val
+					this.month=val
+					this.$nextTick(() => {
+						setTimeout(() => {
+							if(val!='长期'&&val!='随时'){
+								this.value=this.setValue()
+								// console.log(this.value)
+							}else{
+								this.value=[0,0,0]
+							}
+						}, 350);
+					})
+				}
+			},
+			"checkDay":{
+				handler(val){
+					// console.log(val)
+					this.checkDay=val
+					this.day=val
+					this.$nextTick(() => {
+						setTimeout(() => {
+							if(val!='长期'&&val!='随时'){
+								this.value=this.setValue()
+								// console.log(this.value)
+							}else{
+								this.value=[0,0,0]
+							}
+						}, 350);
+					})
+				}
+			},
 			"month": { // 监听月份变化,改变当前月份天数值 
 				handler(val) {
-					if (val < 8&&this.year!='长期') {
+					if (val < 8&&this.year!='长期'&&val < 8&&this.year!='随时') {
 						if (val % 2 !== 0) {
 							this.days = [''];
-							for (let i = 1; i <= 31; i++) {
-								this.days.push(i);
+							if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
+								for (let i = 1; i <= this.endDate.month; i++) {
+									this.days.push(i);
+								}
+							}else{
+								for (let i = 1; i <= 31; i++) {
+									this.days.push(i);
+								}
 							}
 						} else {
 							this.days = [''];
-							for (let i = 1; i <= 30; i++) {
-								this.days.push(i);
+							if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
+								for (let i = 1; i <= this.endDate[2]; i++) {
+									this.days.push(i);
+								}
+							}else{
+								for (let i = 1; i <= 30; i++) {
+									this.days.push(i);
+								}
 							}
 						}
 					}
-					if (val > 7&&this.year!='长期') {
+					if (val > 7&&this.year!='长期'&&val > 7&&this.year!='随时') {
 						if (val % 2 === 0) {
 							this.days = [''];
-							for (let i = 1; i <= 31; i++) {
-								this.days.push(i);
+							if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
+								for (let i = 1; i <= this.endDate[2]; i++) {
+									this.days.push(i);
+								}
+							}else{
+								for (let i = 1; i <= 31; i++) {
+									this.days.push(i);
+								}
 							}
 						} else {
 							this.days = [''];
-							for (let i = 1; i <= 30; i++) {
-								this.days.push(i);
+							if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
+								for (let i = 1; i <= this.endDate[2]; i++) {
+									this.days.push(i);
+								}
+							}else{
+								for (let i = 1; i <= 30; i++) {
+									this.days.push(i);
+								}
 							}
 						}
 					}
-					if (val === 2&&this.year!='长期') {
+					if (val === 2&&this.year!='长期'&&val === 2&&this.year!='随时') {
 						if (this.year % 4 === 0) {
 							this.days = [''];
-							for (let i = 1; i <= 29; i++) {
-								this.days.push(i);
+							if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
+								for (let i = 1; i <= this.endDate[2]; i++) {
+									this.days.push(i);
+								}
+							}else{
+								for (let i = 1; i <= 29; i++) {
+									this.days.push(i);
+								}
 							}
 						} else {
 							this.days = [''];
-							for (let i = 1; i <= 28; i++) {
-								this.days.push(i);
+							if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
+								for (let i = 1; i <= this.endDate[2]; i++) {
+									this.days.push(i);
+								}
+							}else{
+								for (let i = 1; i <= 28; i++) {
+									this.days.push(i);
+								}
 							}
 						}
 					}
@@ -214,27 +469,47 @@
 			},
 			"year": { // 监听年份变化,处理2月份天数变化
 				handler(val) {
-					if(val=='长期'){
+					if(val=='长期'||val=='随时'){
 						this.months=[''];
 						this.days = [''];
 					}else{
 						const months = [''];
-						for (let i = 1; i <= 12; i++) {
-							months.push(i);
+						console.log(this.endDate)
+						if(this.endDate.year&&val===this.endDate.year&&this.endDate.month){
+							for (let i = 1; i <= this.endDate.month; i++) {
+								months.push(i);
+							}
+						}else{
+							for (let i = 1; i <= 12; i++) {
+								months.push(i);
+							}
 						}
+						
 						this.months=months
 						if (val % 4 === 0) {
 							if (this.month === 2) {
 								this.days = [''];
-								for (let i = 1; i <= 29; i++) {
-									this.days.push(i);
+								if(this.endDate.year&&val===this.endDate.year&&this.endDate.month&&this.endDate.month===this.month&&this.endDate.day){
+									for (let i = 1; i <= this.endDate.day; i++) {
+										this.days.push(i);
+									}
+								}else{
+									for (let i = 1; i <= 29; i++) {
+										this.days.push(i);
+									}
 								}
 							}
 						} else {
 							if (this.month === 2) {
 								this.days = [''];
-								for (let i = 1; i <= 28; i++) {
-									this.days.push(i);
+								if(this.endDate.year&&val===this.endDate.year&&this.endDate.month&&this.endDate.month===this.month&&this.endDate.day){
+									for (let i = 1; i <= this.endDate.day; i++) {
+										this.days.push(i);
+									}
+								}else{
+									for (let i = 1; i <= 28; i++) {
+										this.days.push(i);
+									}
 								}
 							}
 						}
@@ -335,7 +610,7 @@
 	.date-picker-title {
 		height: 100rpx;
 		padding: 0 20rpx;
-		box-shadow: 0 1rpx 1rpx #e4e4e4;
+		// box-shadow: 0 1rpx 1rpx #e4e4e4;
 	}
 
 	.date-picker-confirm {
@@ -347,7 +622,7 @@
 	.date-picker-cancel {
 		padding: 10rpx 30rpx;
 		font-size: 32rpx;
-		color: red;
+		// color: red;
 	}
 
 	// 内容

+ 2 - 47
pages.json

@@ -176,21 +176,7 @@
 				"enablePullDownRefresh": false
 			}
 
-		}, {
-			"path": "pages/mine/driverCertification",
-			"style": {
-				"navigationBarTitleText": "司机认证",
-				"enablePullDownRefresh": false
-			}
-
-		}, {
-			"path": "pages/mine/driverCertificationNext",
-			"style": {
-				"navigationBarTitleText": "司机认证",
-				"enablePullDownRefresh": false
-			}
-
-		}, {
+		},{
 			"path": "pages/mine/helpDescription",
 			"style": {
 				"navigationBarTitleText": "操作说明",
@@ -386,20 +372,7 @@
 				"enablePullDownRefresh": false
 			}
 
-		}, {
-			"path": "pages/mine/company/addcompanytwo",
-			"style": {
-				"navigationStyle": "custom"
-			}
-
-		}, {
-			"path": "pages/mine/company/addcompanythree",
-			"style": {
-				"navigationBarTitleText": "视频认证",
-				"enablePullDownRefresh": false
-			}
-
-		}, {
+		},{
 			"path": "pages/mine/company/companyvideo",
 			"style": {
 				"navigationBarTitleText": "视频认证",
@@ -413,24 +386,6 @@
 				"enablePullDownRefresh": false
 			}
 
-		}, {
-			"path": "pages/mine/company/editcompanytwo",
-			"style": {
-				"navigationStyle": "custom"
-			}
-
-		}, {
-			"path": "pages/mine/company/editcompanythree",
-			"style": {
-				"navigationStyle": "custom"
-			}
-
-		}, {
-			"path": "pages/mine/company/editcompanyvideo",
-			"style": {
-				"navigationStyle": "custom"
-			}
-
 		}, {
 			"path": "pages/mine/cargoowner/selectcompany",
 			"style": {

+ 6 - 41
pages/carSource/index.vue

@@ -131,8 +131,7 @@
 			</view> -->
 		</view>
 		<u-toast ref="uToast"></u-toast>
-		<u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
-			confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick" @cancel="cancelClick"></u-modal>
+		
 		<u-modal :show="tipsShow" :content='tipsText' :confirmText="btnTips" @confirm="$u.throttle(authentication(), 5000)"></u-modal>
 	</view>
 </template>
@@ -229,7 +228,7 @@
 				})
 			},
 			checking() {
-				this.statusVal = uni.getStorageSync("firstAuthentication").authenticationStatus
+				this.statusVal = uni.getStorageSync("firstAuthentication").passOnce
 				if(!uni.getStorageSync("firstAuthentication")&&!uni.getStorageSync("userInfo")) { //判断有没有登录
 					this.tipsShow = true
 					this.tipsText = "您尚未登录,请前去登录!"
@@ -285,16 +284,12 @@
 			},
 			authentication() {
 				this.tipsShow = false
-				if (this.statusVal == '未认证') {
-					this.$u.route("/pages/mine/driverCertification")
-				} else if (this.statusVal == '未通过') {
-					this.$u.route("/pages/mine/editDriverCertification")
-				} else if (this.statusVal == '审核中') {
+				if (this.statusVal == 0)  {
 					// this.$u.route("")
 					uni.switchTab({
 						url: '/pages/mine/index'
 					});
-				} else {
+				} else if (!this.hasLogin) {
 					uni.$u.route('/pages/public/login');
 				}
 			},
@@ -383,14 +378,7 @@
 				uni.setStorageSync("fleetLocation", this.fleetLocation)
 				this.getList()
 			},
-			joinFleet(item) {
-				this.addMember.commonId = this.commonId
-				this.addMember.driverNickname = uni.getStorageSync("firstAuthentication").driverCall
-				this.addMember.driverPortrait = uni.getStorageSync("userInfo").avatarUrl
-				this.addMember.fleetId = item.id
-				this.alertTitle = "确定申请加入该车队?"
-				this.isShowAlert = true
-			},
+
 			// addressChange(num) {
 			// 	if (num == 1) {
 			// 		this.show1 = true
@@ -400,30 +388,7 @@
 			// 		this.show2 = true
 			// 	}
 			// },
-			cancelClick() {
-				this.isShowAlert = false
-			},
-			confirmClick() {
-				this.isShowAlert = false
-				this.addMember.joinFlag = 1
-				this.$request.baseRequest('post', '/fleetMemberInfo/api/addFleetMemberInfo', this.addMember).then(res => {
-						if (res.code == '200') {
-							this.$refs.uToast.show({
-								type: 'success',
-								message: "申请成功,等待队长审核",
-							})
-							this.getList()
-						} else {
-							this.$refs.uToast.show({
-								type: 'success',
-								message: "申请失败,请稍后重试",
-							})
-						}
-					})
-					.catch(res => {
-						uni.$u.toast(res.message);
-					});
-			},
+			
 			getList() {
 				this.status = 'loading';
 				if (this.indexbtn == 1) {

+ 8 - 64
pages/mine/cargoowner/addEnerprise.vue

@@ -70,10 +70,10 @@
 					</view>
 				</view>
 			</view>
-			<u-picker :show="isdate" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+			<!-- <u-picker :show="isdate" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 				@change="changeHandler" @cancel="isdate=false">
-			</u-picker>
-
+			</u-picker> -->
+			<itmister-date-picker :overdueContent="'授权已过期'" :dateStatus="1" :periodOfValidity="true" :futureYear="30"  ref="dateAuthorization"  @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		</view>
 		<u-toast ref="uToast"></u-toast>
 		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
@@ -93,6 +93,7 @@
 				提交
 			</view>
 		</view>
+		
 		<u-picker :show="formWorkShow" @cancel="formWorkShow = false" @close="formWorkShow = false"
 			:columns="formWorkColumns" @confirm="formWorkSubmit"></u-picker>
 	</view>
@@ -142,7 +143,6 @@
 			if (uni.getStorageSync('cargoOwnerId')) {
 				this.dataDetails.cargoOwnerId = uni.getStorageSync('cargoOwnerId')
 			}
-			this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
 			// this.getList()
 		},
 		onShow() {
@@ -280,70 +280,14 @@
 				this.checked = !this.checked
 			},
 			selectdate() {
-				this.isdate = true
+				this.$refs.dateAuthorization.show();
+				
 			},
 			selectshow() {
 				this.goDetailPage('/pages/mine/cargoowner/selectcompany')
 			},
-			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if (e.value[0] == '长期') {
-					if(e.value[1]||e.value[2]){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "选择长期时不允许选择月日!",
-						})
-						return
-					}
-					this.dataDetails.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
+			confirmValidityPeriod(date) {
+				this.dataDetails.authorizationDeadline = date.date
 			},
 			goDetailPage(src) {
 				uni.setStorage({

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

@@ -211,10 +211,10 @@
 							duration: 2000
 						})
 					});
-				uni.showLoading({
-					title: '加载中',
-					mask: true
-				})
+				// uni.showLoading({
+				// 	title: '加载中',
+				// 	mask: true
+				// })
 				// this.$request.baseRequest('get', '/cargoOwnerCompInfo/api/addCargoOwnerComp',{commonId:this.userInfo.id} ).then(res => {
 				// 	uni.hideLoading()
 				// 	if(res.data){

+ 18 - 62
pages/mine/cargoowner/editEnerprise.vue

@@ -70,9 +70,10 @@
 					</view>
 				</view>
 			</view>
-			<u-picker :show="isdate" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+			<!-- <u-picker :show="isdate" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 				@change="changeHandler" @cancel="isdate=false">
-			</u-picker>
+			</u-picker> -->
+			<itmister-date-picker :overdueContent="'授权已过期'" :dateStatus="1" :checkYear="year" :checkMonth="month" :periodOfValidity="true" :futureYear="30"  ref="dateAuthorization"  @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 
 		</view>
 		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
@@ -116,6 +117,9 @@
 				isshow: false,
 				isdate: false,
 				checked: false,
+				year:'',
+				month:'',
+				day:'',
 				validityPeriod: [],
 				isShowimgType: false,
 				uploadType: '',
@@ -136,10 +140,18 @@
 			if (uni.getStorageSync('cargoOwnerId')) {
 				this.dataDetails.cargoOwnerId = uni.getStorageSync('cargoOwnerId')
 			}
-			this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
 			// this.getList()
 
 			this.dataDetails = options
+			if(this.dataDetails.authorizationDeadline&&this.dataDetails.authorizationDeadline!='长期'){
+				const arr=this.dataDetails.authorizationDeadline.split('-')
+				this.year=arr[0]
+				this.month=arr[1]
+				this.day=arr[2]
+			}
+			if(this.dataDetails.authorizationDeadline=='长期'){
+				this.year='长期'
+			}
 			if (this.dataDetails.legalPersonName.length == 2) {
 				this.dataDetails.legalPersonName1 = this.dataDetails.legalPersonName.toString().replace(
 					/^([^\x00-\xff])([^\x00-\xff]{0,})([^\x00-\xff])/g, '$1*')
@@ -267,69 +279,13 @@
 				this.checked = !this.checked
 			},
 			selectdate() {
-				this.isdate = true
+				this.$refs.dateAuthorization.show();
 			},
 			selectshow() {
 				this.goDetailPage('/pages/mine/cargoowner/selectcompany')
 			},
-			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if (e.value[0] == '长期') {
-					if(e.value[1]||e.value[2]){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "选择长期时不允许选择月日!",
-						})
-						return
-					}
-					this.dataDetails.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
+			confirmValidityPeriod(date) {
+				this.dataDetails.authorizationDeadline =date.date
 			},
 			goDetailPage(src) {
 				uni.setStorage({

+ 17 - 63
pages/mine/cargoowner/editpersonalinformation.vue

@@ -88,9 +88,7 @@
 				</view>
 			</view>
 			<view class="bz">注:个人信息审核通过后自动认证成为个人货主。</view>
-			<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod"
-				@confirm="confirmValidityPeriod" @change="changeHandler" @cancel="isShowcardValidity=false">
-			</u-picker>
+			<itmister-date-picker :overdueContent="'身份证已过期'" :dateStatus="1" :periodOfValidity="true" :futureYear="30" :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateValidityPeriod"  @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		</view>
 
 		<view class="content4">
@@ -145,6 +143,9 @@
 						disabled: false
 					},
 				],
+				year:'',
+				month:'',
+				day:'',
 				uploadType: '',
 				isShowimgType: false,
 				dataDetails: {
@@ -174,8 +175,16 @@
 			// console.log(options)
 			if(JSON.stringify(options) != "{}"){
 				this.dataDetails = options
+				if(this.dataDetails.cardValidityDate&&this.dataDetails.cardValidityDate!='长期'){
+					const arr=this.dataDetails.cardValidityDate.split('-')
+					this.year=arr[0]
+					this.month=arr[1]
+					this.day=arr[2]
+				}
+				if(this.dataDetails.cardValidityDate=='长期'){
+					this.year='长期'
+				}
 			}
-			this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
 			this.dataDetails.phone = this.userInfo.phone
 			this.dataDetails.commonId = this.userInfo.id
 		},
@@ -223,7 +232,8 @@
 				this.checked = !this.checked
 			},
 			selectValidityPeriod() {
-				this.isShowcardValidity = true
+				this.$refs.dateValidityPeriod.show();
+				// this.isShowcardValidity = true
 			},
 			//设置图片
 			setImage(e) {
@@ -290,64 +300,8 @@
 				// 	}
 				// }
 			},
-			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if (e.value[0] == '长期') {
-					if(e.value[1]!=''||e.value[2]!=''){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "选择长期时不允许选择月日!",
-						})
-						return
-					}
-					this.dataDetails.cardValidityDate = e.value[0]
-					
-				} else {
-					if(e.value[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]
-				}
-
-				this.isShowcardValidity = false
+			confirmValidityPeriod(date) {
+				this.dataDetails.cardValidityDate=date.date
 			},
 			uploadImg(type, index) {
 				this.uploadType = type

+ 13 - 102
pages/mine/company/addcompany.vue

@@ -257,9 +257,7 @@
 			<!-- <view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='newlyIncreased'>下一步</view> -->
 			<view @click="$u.throttle(submit(), 5000)" class='newlyIncreased'>提交</view>
 		</view>
-		<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
-			@change="changeHandler" @cancel="isShowcardValidity=false">
-		</u-picker>
+		<itmister-date-picker :overdueContent="overdueContent" :dateStatus="1" :periodOfValidity="true" :futureYear="30"  ref="dateValidityPeriod"  @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		<u-picker :show="isShowBank" :columns="columns" :closeOnClickOverlay='true' @close='zhBankClose'
 			@cancel='zhBankClose' @confirm='confirmBank'></u-picker>
 		</u-picker>
@@ -292,6 +290,7 @@
 				value: false,
 				isShowBank: false,
 				columns: [],
+				overdueContent:'',
 				radioCustomStyle: {
 					margin: '0 0 0 20rpx'
 				},
@@ -305,7 +304,6 @@
 					},
 
 				],
-				isShowcardValidity: false,
 				uploadType: '',
 				index: '',
 				isShowimgType: false,
@@ -325,7 +323,6 @@
 					advanceFreightService: 0,
 					landOwnership: '自有',
 					videoAddressUrl: null,
-					legalPersonName: '',
 					corporateAccount: ''
 				},
 				dataType: ""
@@ -371,7 +368,12 @@
 			},
 			selectData(num) {
 				this.dataType = num
-				this.isShowcardValidity = true
+				if(num==0){
+					this.overdueContent='营业执照已过期'
+				}else if(num==1){
+					this.overdueContent='身份证已过期'
+				}
+				this.$refs.dateValidityPeriod.show()
 			},
 			zhBankClose() {
 				this.isShowBank = false
@@ -422,105 +424,18 @@
 			// 	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
-				}
+			confirmValidityPeriod(date) {
+				console.log(date,this.dataType)
 				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
-							}
-							this.dataDetails.businessTermDate = e.value[0]
+							this.dataDetails.businessTermDate = date.date
 
-						} 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]
-						}
+							this.dataDetails.cardValidityDate = date.date
 						break
 				}
-				this.isShowcardValidity = false
+				this.$forceUpdate()
 			},
 			screenChange(e) {
 				let fullScreen = e.detail.fullScreen; // 值true为进入全屏,false为退出全屏
@@ -624,7 +539,6 @@
 						commonId: this.userInfo.id
 					}).then(res => {
 						if (res.code == 200) {
-							this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
 							console.log(this,res.data)
 							if (uni.getStorageSync('companydata')) {
 								this.dataDetails = uni.getStorageSync('companydata')
@@ -877,9 +791,6 @@
 
 				}
 			},
-			// clickcancel() {
-			// 	this.isShowcardValidity = false
-			// },
 			imgTypeSelect(val) {
 				// debugger
 				var _this = this

+ 0 - 109
pages/mine/company/addcompanythree.vue

@@ -1,109 +0,0 @@
-<template>
-	<view>
-		<!-- <web-view id="mapContainer" :src="srcHandler()"></web-view> -->
-		<view style='text-align:center;height:90vh;'>
-			<view style='transform: translateY(50%);'>
-				<image class="xj-image" src="@/static/mine/company/shipinrenzheng.png" @click="openVideo"></image>
-				<view class='hinttext'>请打开摄像头并阅读提示文字</view>
-			</view>
-		</view>
-		<view class="content4">
-			<view style='margin:0 0 18px;font-size:12px;color:#999;' class='flex items-center'>
-				<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>
-					我已阅读并同意全部细则
-			</view>
-			<view class='line'></view>
-			<view class="next-btn" :class="checked?'active':'' " @click="goDetailPage('/pages/mine/company/companyvideo')">
-				开始
-			</view>
-		</view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				checked:false,
-			}
-		},
-		methods: {
-		srcHandler() {
-			// 
-			return `/hybrid/html/video.html`
-		},
-			openVideo(){
-					// uni.$u.route('/pages/mine/camera/video/video?dotype=idcardface');
-				// console.log(uni)
-				// uni.chooseVideo({
-				//   count: 1,
-				//   mediaType: ['video'],
-				//   sourceType: ['camera'],
-				//   maxDuration: 30,
-				//   camera: 'back',
-				//   success(res) {
-				//     console.log(res.tempFilest)
-				//   }
-				// })
-				
-			},
-			consent(){
-				this.checked=!this.checked
-			},
-			goDetailPage(src) 
-			{
-				if(this.checked){
-					uni.$u.route(src);
-				}
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	page{
-		background:#F5F6FA;
-	}
-	.xj-image{
-		width:216rpx;
-		height:216rpx;
-	}
-	.hinttext{
-		width:236rpx;
-		margin:80rpx auto 0;
-		font-size:32rpx;
-	}
-	.content4 {
-		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%;
-		}
-		.next-btn {
-			background: #F1F3F6;
-			width: 85%;
-			padding: 20rpx 20rpx;
-			text-align: center;
-			color: #C5CAD4;
-			border-radius: 50rpx;margin:0 auto;
-			margin-top:10px;
-		}
-		.next-btn.active{
-			background: #2772FB;
-			color:#fff;
-		}
-	}
-</style>

+ 0 - 286
pages/mine/company/addcompanytwo.vue

@@ -1,286 +0,0 @@
-<template>
-	<view>
-		<u-navbar leftText="返回" title="企业认证" :safeAreaInsetTop="false">
-			<view class="u-nav-slot" slot="left">
-		        <u-icon @click='navback' name="arrow-left" size="19"></u-icon>
-		    </view>
-			<view class="u-nav-slot" slot="right">
-				<view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='next'>下一步</view>
-			</view>
-		</u-navbar>
-		<view class='content1'>
-			<view class="title">上传房产证或租赁合同</view>
-			<view style='position:relative;'>
-				<view v-if='!dataDetails.propertyAddressUrl' @click="uploadImg(1)" class="picture">
-					<image class="xj-image" src="@/static/mine/company/tianjiazhaopian@3x.png"></image>
-				</view>
-				<view v-if='dataDetails.propertyAddressUrl' @click.stop="uploadImg(1)"
-				class="preview-card-img picture">
-				<view @click.stop="delCard(1)">
-					<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-					</image>
-				</view>
-				<image class="uploadimage" :src="dataDetails.propertyAddressUrl" mode="aspectFit"></image>
-			</view>
-			</view>
-		</view>
-		<view class='content'>
-			<view class="flex row">
-				<view class="left-text">场地租赁截止日期</view>
-				<view style='font-size:16px;width:50%;' class='flex flex-space-between'  @click="selectValidityPeriod">
-					<view :style="{'color':dataDetails.siteLeaseDate ? '#000':'#C6CBD5'}">{{dataDetails.siteLeaseDate?dataDetails.siteLeaseDate:'选择日期'}}</view>
-					<view><u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon></view>
-				</view>
-			</view>
-			<view class="flex row noborder">
-				<view style='width:285px;' class="left-text">申请开通平台垫付运费业务</view>
-				<view>
-					<u-switch @change="change" v-model="value" inactiveColor='#ABB0BB' size="20" ></u-switch>
-				</view>
-			</view>
-			<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod"
-				@confirm="confirmValidityPeriod" @change="changeHandler"  @cancel="isShowcardValidity=false" >
-			</u-picker>
-		</view>
-		<view class='footer'>
-			<view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='newlyIncreased'>下一步</view>
-		</view>
-		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
-			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
-		</u-action-sheet>
-	</view>
-</template>
-
-<script>
-	import upload from '@/components/upload.vue';
-	import uploadImage from '@/components/ossutil/uploadFile.js';
-	export default {
-		data() {
-			return {
-				dataDetails:{},
-				value:false,
-				isShowcardValidity:false,
-				uploadType:'',
-				index:'',
-				isShowimgType:false,
-				validityPeriod:[]
-			}
-		},
-		onLoad(){
-			var _this=this
-			this.validityPeriod = this.$helper.makeValidityPeriod(0,100)
-			uni.getStorage({
-				key: 'companydata',
-				success: function (res) {
-					console.log(res.data);
-					_this.dataDetails = JSON.parse(res.data)
-					if(_this.dataDetails.advanceFreightService){
-						_this.value=true
-					}
-				}
-			});
-		},
-		methods: {
-			navBack() {
-				uni.navigateBack();
-			},
-			change(e){
-				if(this.value){
-					_this.$set(_this.dataDetails,'advanceFreightService',1)
-				}else{
-					_this.$set(_this.dataDetails,'advanceFreightService',0)
-				}
-			},
-			imgTypeSelect(val) {
-				var _this=this
-				if (val.name == '相册') {
-					uni.chooseImage({
-						count: 1,
-						sourceType: this.$helper.chooseImage.sourceType,
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage('image',res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功回调函数
-									console.log('图片地址', result)
-									_this.$set(_this.dataDetails,'propertyAddressUrl',result)
-									console.log(_this.dataDetails)
-								}
-							)
-						}
-					});
-				} else {
-					uni.chooseImage({
-						count: 1,
-						sourceType: ['camera'],
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage('image',res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功回调函数
-									console.log('图片地址', result)
-									_this.dataDetails.propertyAddressUrl=result
-								}
-							)
-						}
-					});
-				}
-			},
-			uploadImg(type, index) {
-				this.uploadType = type
-				this.isShowimgType = true
-				this.index = index
-			},
-			goDetailPage(src) {
-				uni.setStorage({key: 'companydata',data: JSON.stringify(this.dataDetails)});
-				uni.$u.route(src);
-			},
-			selectValidityPeriod() {
-				this.isShowcardValidity = true
-			},
-			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if (e.value[0] == '长期') {
-					if(e.value[1]||e.value[2]){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "选择长期时不允许选择月日!",
-						})
-						return
-					}
-					this.dataDetails.siteLeaseDate = e.value[0]
-				} else {
-					this.dataDetails.siteLeaseDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-				}
-			
-				this.isShowcardValidity = false
-			},
-			changeHandler(e) {
-				const {
-					columnIndex,
-					value,
-					values,
-					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())
-				// 	}
-				// }
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	page{
-		background:#F5F6FA;
-	}
-	.preview-card-img {
-		/deep/uni-image.uploadimage {
-		   width:212rpx;
-		   height:212rpx;
-		}
-	}
-	.next{
-		color:#2772FB;
-		font-size:13px;
-	}
-	
-	.content1,.content {
-		background:#fff;
-		padding:40rpx 20rpx 40rpx;
-		margin:110rpx 20rpx 20rpx;
-		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;
-		}
-	
-		.picture {
-			position: relative;
-			width: 212rpx;
-			height: 212rpx;
-			display: flex;
-			justify-content: center;
-			flex-direction: column;
-			align-items: center;
-			background:#F5F6FA;
-			.text {
-				margin-top: 20rpx;
-			}
-		}
-	
-	
-		.xj-image {
-			width: 46rpx;
-			height: 46rpx;
-		}
-	
-		.title {
-			color: #999999;
-			margin: 20rpx 0;
-		}
-	}
-	.content{
-		padding:20rpx 20rpx 20rpx;
-		margin:20rpx 20rpx 20rpx;
-		background:#fff;
-		border-radius: 10rpx;
-	}
-	.service {
-		font-size: 24rpx;
-		margin: 20rpx;
-		justify-content: center;
-	
-		/deep/.u-image {
-			margin: 0 20rpx;
-		}
-	}
-	
-	.del-card {
-		position: absolute;
-		top: -10rpx;
-		right: -6rpx;
-		width: 80rpx;
-		height: 80rpx;
-		z-index: 9;
-	}
-	.footer{
-		position:fixed;
-		background:#fff;
-		width:100%;
-		bottom:0;
-		left:0;
-		padding:15px 15px 30px;
-		box-sizing: border-box;
-	}
-	.newlyIncreased{
-		width:100%;
-		margin:0 auto;
-		text-align:center;
-		height:46px;
-		line-height: 46px;
-		color:#fff;
-		background:url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
-		background-size:100%;
-	}
-</style>

+ 39 - 77
pages/mine/company/editcompany.vue

@@ -256,9 +256,10 @@
 		<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"
+		<!-- <u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			@change="changeHandler" @cancel="isShowcardValidity=false">
-		</u-picker>
+		</u-picker> -->
+		<itmister-date-picker :overdueContent="'身份证已过期'" :dateStatus="1" :periodOfValidity="true" :futureYear="30" :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateValidityPeriod"  @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
 		</u-action-sheet>
@@ -300,13 +301,15 @@
 					},
 
 				],
+				year:'',
+				month:'',
+				day:'',
 				isShowManualInput: false,
 				isShowcardValidity: false,
 				uploadType: '',
 				index: '',
 				submitstatus:false,
 				isShowimgType: false,
-				validityPeriod: [],
 				checked: false,
 				checked1: false,
 				dataDetails: {
@@ -331,7 +334,6 @@
 		onLoad(options) {
 			this.get_camera_permission()
 			this.dataDetails.id = options.id
-			this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
 			this.dataDetails.commonId = this.userInfo.id
 			this.dataDetails.phone = this.userInfo.phone
 			console.log('```````````````')
@@ -381,7 +383,34 @@
 			},
 			selectData(num) {
 				this.dataType = num
-				this.isShowcardValidity = true
+				switch (this.dataType) {
+					case 0:
+						if(this.dataDetails.businessTermDate=='长期'){
+							this.year=this.dataDetails.businessTermDate
+						}else{
+							var arr=this.dataDetails.businessTermDate.split('-')
+							this.year=arr[0]
+							this.month=arr[1]
+							this.day=arr[2]
+						}
+						break
+					case 1:
+						if(this.dataDetails.cardValidityDate=='长期'){
+							this.year=this.dataDetails.cardValidityDate
+						}else{
+							var arr=this.dataDetails.cardValidityDate.split('-')
+							this.year=arr[0]
+							this.month=arr[1]
+							this.day=arr[2]
+						}
+						break
+				}
+				if(num==0){
+					this.overdueContent='营业执照已过期'
+				}else if(num==1){
+					this.overdueContent='身份证已过期'
+				}
+				this.$refs.dateValidityPeriod.show()
 			},
 			zhBankClose() {
 				this.isShowBank = false
@@ -403,84 +432,17 @@
 				this.dataDetails.bankDepositBranch = e.value[0]
 				this.isShowBank = false
 			},
-			confirmValidityPeriod(e) {
+			confirmValidityPeriod(date) {
 				switch (this.dataType) {
 					case 0:
-						if (e.value[0] == '长期') {
-							if(e.value[1]!=''||e.value[2]!=''){
-								this.$refs.uToast.show({
-									type: 'error',
-									message: "选择长期时不允许选择月日!",
-								})
-								return
-							}
-							this.dataDetails.businessTermDate = e.value[0]
-							
-						} 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]
-						}
+							this.dataDetails.businessTermDate = date.date
+				
 						break
 					case 1:
-						if (e.value[0] == '长期') {
-							if(e.value[1]!=''||e.value[2]!=''){
-								this.$refs.uToast.show({
-									type: 'error',
-									message: "选择长期时不允许选择月日!",
-								})
-								return
-							}
-							this.dataDetails.cardValidityDate = e.value[0]
-							
-						} else {
-							var date=new Date()
-							if(e.value[0]<date.getFullYear()){
-								this.$refs.uToast.show({
-									type: 'error',
-									message: "身份证已过期!",
-								})
-								return
-							}
-							if(e.value[0]==date.getFullYear()&&Number(e.value[1])<(date.getMonth()+1)){
-								this.$refs.uToast.show({
-									type: 'error',
-									message: "身份证已过期!",
-								})
-								return
-							}
-							if(e.value[0]==date.getFullYear()&&Number(e.value[1])==(date.getMonth()+1)&&Number(e.value[2])<=(date.getDate())){
-								this.$refs.uToast.show({
-									type: 'error',
-									message: "身份证已过期!",
-								})
-								return
-							}
-							this.dataDetails.cardValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-						}
+							this.dataDetails.cardValidityDate = date.date
 						break
 				}
-				this.isShowcardValidity = false
+				this.$forceUpdate()
 			},
 			screenChange(e) {
 				let fullScreen = e.detail.fullScreen; // 值true为进入全屏,false为退出全屏

+ 0 - 100
pages/mine/company/editcompanythree.vue

@@ -1,100 +0,0 @@
-<template>
-	<view>
-		<view style='text-align:center;height:90vh;'>
-			<view style='transform: translateY(50%);'>
-				<image class="xj-image" src="@/static/mine/company/shipinrenzheng.png"></image>
-				<view class='hinttext' @click="openVideo">请打开摄像头并阅读提示文字</view>
-			</view>
-		</view>
-		<view class="content4">
-			<view style='margin:0 0 18px;font-size:12px;color:#999;' class='flex items-center'>
-				<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>
-					我已阅读并同意全部细则
-			</view>
-			<view class='line'></view>
-			<view class="next-btn" :class="checked?'active':'' " @click="goDetailPage('/pages/mine/company/companyvideo')">
-				开始
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				checked:false,
-			}
-		},
-		methods: {
-			openVideo(){
-				uni.chooseMedia({
-				  count: 1,
-				  mediaType: ['video'],
-				  sourceType: ['camera'],
-				  maxDuration: 30,
-				  camera: 'back',
-				  success(res) {
-				    console.log(res.tempFilest)
-				  }
-				})
-			},
-			consent(){
-				this.checked=!this.checked
-			},
-			goDetailPage(src) 
-			{
-				if(this.checked){
-					uni.$u.route(src);
-				}
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	page{
-		background:#F5F6FA;
-	}
-	.xj-image{
-		width:216rpx;
-		height:216rpx;
-	}
-	.hinttext{
-		width:236rpx;
-		margin:80rpx auto 0;
-		font-size:32rpx;
-	}
-	.content4 {
-		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%;
-		}
-		.next-btn {
-			background: #F1F3F6;
-			width: 85%;
-			padding: 20rpx 20rpx;
-			text-align: center;
-			color: #C5CAD4;
-			border-radius: 50rpx;margin:0 auto;
-			margin-top:10px;
-		}
-		.next-btn.active{
-			background: #2772FB;
-			color:#fff;
-		}
-	}
-</style>

+ 0 - 286
pages/mine/company/editcompanytwo.vue

@@ -1,286 +0,0 @@
-<template>
-	<view>
-		<u-navbar leftText="返回" title="企业认证" :safeAreaInsetTop="false">
-			<view class="u-nav-slot" slot="left">
-		        <u-icon @click='navback' name="arrow-left" size="19"></u-icon>
-		    </view>
-			<view class="u-nav-slot" slot="right">
-				<view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='next'>下一步</view>
-			</view>
-		</u-navbar>
-		<view class='content1'>
-			<view class="title">上传房产证或租赁合同</view>
-			<view style='position:relative;'>
-				<view v-if='!dataDetails.propertyAddressUrl' @click="uploadImg(1)" class="picture">
-					<image class="xj-image" src="@/static/mine/company/tianjiazhaopian@3x.png"></image>
-				</view>
-				<view v-if='dataDetails.propertyAddressUrl' @click.stop="uploadImg(1)"
-				class="preview-card-img picture">
-				<view @click.stop="delCard(1)">
-					<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-					</image>
-				</view>
-				<image class="uploadimage" :src="dataDetails.propertyAddressUrl" mode="aspectFit"></image>
-			</view>
-			</view>
-		</view>
-		<view class='content'>
-			<view class="flex row">
-				<view class="left-text">场地租赁截止日期</view>
-				<view style='font-size:16px;width:50%;' class='flex flex-space-between'  @click="selectValidityPeriod">
-					<view :style="{'color':dataDetails.siteLeaseDate ? '#000':'#C6CBD5'}">{{dataDetails.siteLeaseDate?dataDetails.siteLeaseDate:'选择日期'}}</view>
-					<view><u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon></view>
-				</view>
-			</view>
-			<view class="flex row noborder">
-				<view style='width:285px;' class="left-text">申请开通平台垫付运费业务</view>
-				<view>
-					<u-switch @change="change" v-model="value" inactiveColor='#ABB0BB' size="20" ></u-switch>
-				</view>
-			</view>
-			<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod"
-				@confirm="confirmValidityPeriod" @change="changeHandler"  @cancel="isShowcardValidity=false" >
-			</u-picker>
-		</view>
-		<view class='footer'>
-			<view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='newlyIncreased'>下一步</view>
-		</view>
-		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
-			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
-		</u-action-sheet>
-	</view>
-</template>
-
-<script>
-	import upload from '@/components/upload.vue';
-	import uploadImage from '@/components/ossutil/uploadFile.js';
-	export default {
-		data() {
-			return {
-				dataDetails:{},
-				value:false,
-				isShowcardValidity:false,
-				uploadType:'',
-				index:'',
-				isShowimgType:false,
-				validityPeriod:[]
-			}
-		},
-		onLoad(){
-			var _this=this
-			this.validityPeriod = this.$helper.makeValidityPeriod(0,100)
-			uni.getStorage({
-				key: 'companydata',
-				success: function (res) {
-					console.log(res.data);
-					_this.dataDetails = JSON.parse(res.data)
-					if(_this.dataDetails.advanceFreightService){
-						_this.value=true
-					}
-				}
-			});
-		},
-		methods: {
-			navBack() {
-				uni.navigateBack();
-			},
-			change(e){
-				if(this.value){
-					_this.$set(_this.dataDetails,'advanceFreightService',1)
-				}else{
-					_this.$set(_this.dataDetails,'advanceFreightService',0)
-				}
-			},
-			imgTypeSelect(val) {
-				var _this=this
-				if (val.name == '相册') {
-					uni.chooseImage({
-						count: 1,
-						sourceType: this.$helper.chooseImage.sourceType,
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage('image',res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功回调函数
-									console.log('图片地址', result)
-									_this.$set(_this.dataDetails,'propertyAddressUrl',result)
-									console.log(_this.dataDetails)
-								}
-							)
-						}
-					});
-				} else {
-					uni.chooseImage({
-						count: 1,
-						sourceType: ['camera'],
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage('image',res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功回调函数
-									console.log('图片地址', result)
-									_this.dataDetails.propertyAddressUrl=result
-								}
-							)
-						}
-					});
-				}
-			},
-			uploadImg(type, index) {
-				this.uploadType = type
-				this.isShowimgType = true
-				this.index = index
-			},
-			goDetailPage(src) {
-				uni.setStorage({key: 'companydata',data: JSON.stringify(this.dataDetails)});
-				uni.$u.route(src);
-			},
-			selectValidityPeriod() {
-				this.isShowcardValidity = true
-			},
-			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if (e.value[0] == '长期') {
-					if(e.value[1]||e.value[2]){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "选择长期时不允许选择月日!",
-						})
-						return
-					}
-					this.dataDetails.siteLeaseDate = e.value[0]
-				} else {
-					this.dataDetails.siteLeaseDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-				}
-			
-				this.isShowcardValidity = false
-			},
-			changeHandler(e) {
-				const {
-					columnIndex,
-					value,
-					values,
-					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())
-				// 	}
-				// }
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	page{
-		background:#F5F6FA;
-	}
-	.preview-card-img {
-		/deep/uni-image.uploadimage {
-		   width:212rpx;
-		   height:212rpx;
-		}
-	}
-	.next{
-		color:#2772FB;
-		font-size:13px;
-	}
-	
-	.content1,.content {
-		background:#fff;
-		padding:40rpx 20rpx 40rpx;
-		margin:110rpx 20rpx 20rpx;
-		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;
-		}
-	
-		.picture {
-			position: relative;
-			width: 212rpx;
-			height: 212rpx;
-			display: flex;
-			justify-content: center;
-			flex-direction: column;
-			align-items: center;
-			background:#F5F6FA;
-			.text {
-				margin-top: 20rpx;
-			}
-		}
-	
-	
-		.xj-image {
-			width: 46rpx;
-			height: 46rpx;
-		}
-	
-		.title {
-			color: #999999;
-			margin: 20rpx 0;
-		}
-	}
-	.content{
-		padding:20rpx 20rpx 20rpx;
-		margin:20rpx 20rpx 20rpx;
-		background:#fff;
-		border-radius: 10rpx;
-	}
-	.service {
-		font-size: 24rpx;
-		margin: 20rpx;
-		justify-content: center;
-	
-		/deep/.u-image {
-			margin: 0 20rpx;
-		}
-	}
-	
-	.del-card {
-		position: absolute;
-		top: -10rpx;
-		right: -6rpx;
-		width: 80rpx;
-		height: 80rpx;
-		z-index: 9;
-	}
-	.footer{
-		position:fixed;
-		background:#fff;
-		width:100%;
-		bottom:0;
-		left:0;
-		padding:15px 15px 30px;
-		box-sizing: border-box;
-	}
-	.newlyIncreased{
-		width:100%;
-		margin:0 auto;
-		text-align:center;
-		height:46px;
-		line-height: 46px;
-		color:#fff;
-		background:url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
-		background-size:100%;
-	}
-</style>

+ 0 - 69
pages/mine/company/editcompanyvideo.vue

@@ -1,69 +0,0 @@
-<template>
-	<view>
-		<view class='footer'>
-			<view @click="submit" class='newlyIncreased'>提交</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			}
-		},
-		onLoad(){
-			var _this=this
-			uni.getStorage({
-				key: 'companydata',
-				success: function (res) {
-					_this.dataDetails = JSON.parse(res.data)
-				}
-			});
-		},
-		methods: {
-			submit(){
-				uni.showLoading({
-					title: '加载中',
-					mask:true
-				})
-				var _this=this
-				this.$request.baseRequest('post', '/companyInfo/api/editCompanyInfo', _this.dataDetails).then(res => {
-					uni.hideLoading()
-					uni.$u.toast('提交成功')
-				})
-				.catch(res => {
-					uni.hideLoading()
-					uni.showToast({
-						title: res.message,
-						icon: 'none',
-						duration: 2000
-					})
-				});
-			},
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-.footer{
-		position:fixed;
-		background:#fff;
-		width:100%;
-		bottom:0;
-		left:0;
-		padding:15px 15px 30px;
-		box-sizing: border-box;
-	}
-	.newlyIncreased{
-		width:100%;
-		margin:0 auto;
-		text-align:center;
-		height:46px;
-		line-height: 46px;
-		color:#fff;
-		background:url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
-		background-size:100%;
-	}
-</style>

+ 0 - 538
pages/mine/driverCertification.vue

@@ -1,538 +0,0 @@
-<template>
-	<view class="content">
-		<view class="content1 content-other">
-			<view class="flex flex-space-between">
-				<view>姓名</view>
-				<u--input placeholder="请输入内容" inputAlign='right' border="none" v-model="dataDetails.driverName">
-				</u--input>
-			</view>
-			<view class="flex flex-space-between">
-				<view>联系电话</view>
-				<u--input placeholder="请输入联系电话" inputAlign='right' border="none" v-model="dataDetails.driverPhone">
-				</u--input>
-			</view>
-			<view class="flex s-row" v-for="(item,index) in dataDetails.driverCarInfoList" :key='index'>
-				<view class="flex flex-space-between width100">
-					<view class="left">
-						车牌号-{{index+1}}
-					</view>
-					<view class="right flex">
-						<input class="car-uumber" v-model='item.carNumber' @click.stop="handleShowKeyboard(index)"
-							:disabled="true" placeholder="输入7位车牌号" name="input"></input>
-						<!-- <u-input v-model="item1.carNo" placeholder="输入7位车牌号" /> -->
-						<view class="flex">
-							<view @click="addCarNumber(dataDetails.driverCarInfoList)" style="margin-right: 20rpx;">
-								<image class='row4-img'
-									src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jia%402x.png">
-								</image>
-							</view>
-							<view @click="delCarNumber(dataDetails.driverCarInfoList,index)">
-								<image class='row4-img'
-									src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jian%402x.png">
-								</image>
-							</view>
-						</view>
-					</view>
-				</view>
-				<view class="width100">
-					<view class="">人车合影-{{index+1}}</view>
-					<u-button type="primary" @click="uploadImg(0,item)">上传人车合影</u-button>
-					<image class="preview" :src="item.addressUrl" mode="aspectFit"
-						style="width:710rpx:height:710rpx;margin: 20rpx;">
-						<!-- 		<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
-						:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
-						@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload> -->
-				</view>
-			</view>
-		</view>
-		<u-divider text="分割线"></u-divider>
-		<view class="content2 content-other">
-			<u-button type="primary" @click="uploadImg(1)">上传身份证人像</u-button>
-			<!-- <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
-				:size-type="['compressed']" @on-success="getImgUrl1" @on-error="onError" @on-remove="onRemove"
-				@on-uploaded="isAdd = true" :before-upload="filterFileType" :options="uploadOptions1"
-				:custom="uploadCustom1" @on-progress="onProgress"></upload> -->
-			<!-- <navigator class="buttons" url="./camera/idcard/idcard?dotype=face"><button type="primary">打开身份证人像面采集相机</button></navigator> -->
-			<!-- <view>拍摄结果预览图,见下方</view> -->
-			<image class="preview" :src="dataDetails.cardAddressUrl" mode="aspectFit"
-				style="width:710rpx:height:710rpx;margin: 20rpx;">
-			</image>
-			<view class="flex flex-space-between">
-				<view>身份证号</view>
-				<u--input placeholder="请输入身份证号" inputAlign='right' border="none" v-model="dataDetails.numberCard">
-				</u--input>
-			</view>
-			<u-button type="primary" @click="uploadImg(2)">上传身份证国徽页</u-button>
-			<image class="preview" :src="dataDetails.cardBackAddressUrl" mode="aspectFit"
-				style="width:710rpx:height:710rpx;margin: 20rpx;">
-			</image>
-			<view class="flex flex-space-between">
-				<view>身份证截止日期</view>
-				<view class="" @click="selectValidityPeriod">
-					{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证截止日期'}}</view>
-
-			</view>
-			<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod"
-				@confirm="confirmValidityPeriod" @change="changeHandler">
-			</u-picker>
-		</view>
-		<u-divider text="分割线"></u-divider>
-		<view class="content3 flex s-row" v-for="(item,index) in dataDetails.bankList" :key='index'>
-			<view class="flex flex-space-between width100">
-				<view class="left">
-					银行卡-{{index+1}}
-				</view>
-				<view class="right flex">
-					<view class="flex">
-						<view @click="addBankNumber(dataDetails.bankList)" style="margin-right: 20rpx;">
-							<image class='row4-img'
-								src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jia%402x.png">
-							</image>
-						</view>
-						<view @click="delBankNumber(dataDetails.bankList,index)">
-							<image class='row4-img'
-								src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jian%402x.png">
-							</image>
-						</view>
-					</view>
-				</view>
-			</view>
-			<!-- 	<view class="width100">
-				<view class="">上传银行卡号面</view>
-				<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
-					:size-type="['compressed']" @on-success="getImgUrl" @on-remove="onRemove" delIconSize='30'
-					delBgColor='rgba(0,0,0,0.4)' delIcon="trash" @on-uploaded="isAdd = true"
-					:before-upload="filterFileType" :options="uploadOptions3" :custom="uploadCustom3"></upload>
-			</view> -->
-			<u-button type="primary" @click="uploadImg(3)">上传银行卡号页</u-button>
-			<view class="flex flex-space-between width100">
-				<view>银行卡卡号</view>
-				<view class="flex">
-					<u--input placeholder="输入银行卡号码" inputAlign='right' border="none" v-model="dataDetails.name">
-					</u--input>
-					<u--image src="../../static/images/xiangji-2.png" width="40px" height="40px" @click='photograph'>
-					</u--image>
-				</view>
-			</view>
-			<view class="flex flex-space-between width100">
-				<view>开户行</view>
-				<view class="flex">
-					<u--input placeholder="输入开户行" inputAlign='right' border="none" v-model="dataDetails.name">
-					</u--input>
-				</view>
-			</view>
-			<view class="flex flex-space-between width100">
-				<view>开户支行</view>
-				<view class="flex">
-					<u--input placeholder="选择开户支行" inputAlign='right' border="none" v-model="dataDetails.name">
-					</u--input>
-					<view>手动输入</view>
-				</view>
-			</view>
-			<view class="flex flex-space-between width100">
-				<view>收款人</view>
-				<view class="flex">
-					<u--input placeholder="输入收款人姓名" inputAlign='right' border="none" v-model="dataDetails.name">
-					</u--input>
-				</view>
-			</view>
-		</view>
-		<view class="content4">
-			<u-button type="primary" @click="next()">
-				下一步
-			</u-button>
-		</view>
-		<master-keyboard ref="keyboard" keyboardtype="car" :show="keyShow" :randomNumber="true" :newCar="false"
-			:defaultValue="carNumber" @keyboardClick="handleClick"></master-keyboard>
-		<u-toast ref="uToast"></u-toast>
-		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
-			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
-		</u-action-sheet>
-	</view>
-</template>
-
-<script>
-	import keyboard from "@/components/master-keyboard/master-keyboard.vue";
-	import upload from '@/components/upload.vue';
-	import uploadImage from '@/components/ossutil/uploadFile.js';
-	var _this;
-	export default {
-		components: {
-			keyboard,
-			upload
-		},
-		data() {
-			return {
-				index:'',
-				validityPeriod: [],
-				isShowcardValidity: false,
-				uploadType: '',
-				isShowimgType: false,
-				// uploadOptions1: {
-				// 	"text": "上传身份证头像页",
-				// 	"bgc": "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/identityup%282%29.png"
-				// },
-				// uploadOptions2: {
-				// 	"text": "上传身份证国徽页",
-				// 	"bgc": "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/identitylow%282%29.png"
-				// },
-				// uploadOptions3: {
-				// 	"text": "上传银行卡正面",
-				// 	"bgc": "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/bankup%282%29.png"
-				// },
-				carInfo: '',
-				dataDetails: {
-					commonId: '',
-					driverName: '',
-					driverPhone: '',
-					cardAddressUrl: '',
-					cardBackAddressUrl: '',
-					cardValidityDate: '',
-					driverType: '',
-					driverLicenseHomePage: '',
-					driverLicenseBackPage: '',
-					driverLicenseValidityDate: '',
-					drivingLicenseHomePage: '',
-					drivingLicenseBackPage: '',
-					drivingLicenseValidityDate: '',
-					trailerLicenseHomePage: '',
-					trailerLicenseBackPage: '',
-					trailerLicenseValidityDate: '',
-					qualificationCertificate: '',
-					qualificationCertificateValidityDate: '',
-					operationCertificate: '',
-					operationCertificateValidityDate: '',
-					trailerOperationCertificate: '',
-					trailerOperationCertificateValidityDate: '',
-					numberCard: '',
-					numberCard: '',
-					numberCard: '',
-					numberCard: '',
-					numberCard: '',
-					numberCard: '',
-					numberCard: '',
-					numberCard: '',
-					numberCard: '',
-					numberCard: '',
-					numberCard: '',
-					numberCard: '',
-					numberCard: '',
-					driverCarInfoList: [{
-						carNumber: '',
-						addressUrl: ''
-					}],
-					driverPayeeInfoList: [{
-						payeeAddressUrl: '',
-						bankCard: '',
-						bankDeposit: '',
-						bankDepositBranch: '',
-						payeeName: ''
-					}],
-				},
-				keyShow: false,
-				carNumber: '',
-				action: this.$helper.ossUploadUrl,
-				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
-				isAdd: true,
-				imagesrc: ''
-			};
-		},
-		onLoad() {
-			_this = this;
-			this.makeValidityPeriod()
-		},
-		methods: {
-			changeHandler(e) {
-				const {
-					columnIndex,
-					value,
-					values,
-					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())
-				// 	}
-				// }
-			},
-			// 回调参数为包含columnIndex、value、values
-			confirmValidityPeriod(e) {
-				// 
-				console.log('confirm', e)
-				if (e.value[0] == '长期') {
-					if(e.value[1]||e.value[2]){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "选择长期时不允许选择月日!",
-						})
-						return
-					}
-					this.dataDetails.cardValidityDate = e.value[0]
-				} else {
-					this.dataDetails.cardValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-				}
-
-				this.isShowcardValidity = false
-			},
-			makeValidityPeriod() {
-				//获取当前年
-				let nowDate = new Date();
-				let year = nowDate.getFullYear()
-				let _list1 = ['长期']
-				// let _list2 = ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]
-				let _list2 = ['长期', "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]
-				let _list3 = ['长期', "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14",
-					"15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30",
-					"31"
-				]
-				let _ValidityPeriod = []
-				for (let i = 0; i < 30; i++) {
-					_list1.push(year + i)
-				}
-				this.validityPeriod.push(_list1, _list2, _list3)
-
-			},
-			selectValidityPeriod() {
-				this.isShowcardValidity = true
-			},
-			//设置图片
-			setImage(e) {
-				// 
-				console.log(e);
-				//显示在页面
-				//this.imagesrc = e.path;
-				if (e.dotype == 'idphoto') {
-					_this.zjzClipper(e.path);
-				} else if (e.dotype == 'watermark') {
-					_this.watermark(e.path);
-				} else {
-					_this.savePhoto(e.path);
-				}
-			},
-			//保存图片到相册,方便核查
-			savePhoto(path) {
-				// 
-				this.imagesrc = path;
-				uploadImage('image',path, 'appData/',
-					result => {
-						// 上传成功
-						console.log('图片地址', result)
-					}
-				)
-				//保存到相册
-				// uni.saveImageToPhotosAlbum({
-				// 	filePath: path,
-				// 	success: () => {
-				// 		uni.showToast({
-				// 			title: '已保存至相册',
-				// 			duration: 2000
-				// 		});
-				// 	}
-				// });
-			},
-			uploadImg(type, val) {
-				// 
-				this.uploadType = type
-				this.isShowimgType = true
-				this.carInfo = val
-			},
-			photograph() {
-				console.log('拍照')
-				let that = this;
-				uni.chooseImage({
-					count: 1,
-					success: function(res) {
-						console.log(JSON.stringify(res.tempFilePaths));
-						uploadImage('image',res.tempFilePaths[0], 'appData/',
-							result => {
-								// 上传成功
-								console.log('图片地址', result)
-							}
-						)
-					}
-				});
-
-			},
-			imgTypeSelect(val) {
-				// 
-				console.log(val)
-				console.log(this.uploadType)
-				if (val.name == '相册') {
-					uni.chooseImage({
-						count: 1,
-						sourceType: this.$helper.chooseImage.sourceType,
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage('image',res.tempFilePaths[0], 'appData/',
-								result => {
-
-									// 上传成功
-									console.log('图片地址', result)
-									switch (_this.uploadType) {
-										case 0:
-											//赋值上传图片图片路径
-											for (let i = 0; i < _this.dataDetails.driverCarInfoList
-												.length; i++) {
-												let _item = _this.dataDetails.driverCarInfoList[i]
-												if (_item.carNumber == _this.carInfo.carNumber) {
-													_item.addressUrl = result
-													}
-										}
-										
-											console.log('人车合影')
-											break
-										case 1:
-											console.log('身份正面')
-											break
-										case 2:
-											console.log('身份反面')
-											break
-										case 3:
-											console.log('银行卡')
-											break
-										case 4:
-									}
-								}
-							)
-						}
-					});
-
-				} else {
-					switch (this.uploadType) {
-						case 0:
-							console.log('人车合影')
-							break
-						case 1:
-							uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=face');
-							console.log('身份正面')
-							break
-						case 2:
-							console.log('身份反面')
-							break
-						case 3:
-							console.log('银行卡')
-							break
-						case 4:
-					}
-				}
-
-			},
-			//身份证正面
-			getImgUrl1(src) {
-				// console.log(src)
-				// console.log('------------res-----------')
-				// let that = this;
-				// that.id[0] = src
-				// that.id1 = src
-				// that.certificates = false
-				// that.personImgs.personImg = that.id[0]
-				// that.$api.doRequest('get', '/driverViewInfo/personShibie', that
-				// 	.personImgs).then(res => {
-				// 	if (res.data.data.recPerson != null) {
-				// 		if (res.data.data.recPerson != "") {
-				// 			that.$set(that.DriverViewInfo, 'driverName', res
-				// 				.data.data.recPerson)
-				// 		}
-				// 	}
-				// 	if (res.data.data.recPersonNo != null) {
-				// 		if (res.data.data.recPersonNo != "") {
-				// 			that.$set(that.DriverViewInfo, 'numberCard', res
-				// 				.data.data.recPersonNo)
-				// 		}
-				// 	}
-				// }).catch(res => {
-				// 	uni.showToast({
-				// 		title: res.data.message,
-				// 		icon: 'none',
-				// 		duration: 2000
-				// 	})
-				// })
-			},
-			handleClick(e) {
-				this.carNumber = e.value
-				this.dataDetails.driverCarInfoList[this.index].carNumber = e.value //键盘输入值
-			},
-			handleShowKeyboard(index) {
-				// 
-				if (this.dataDetails.driverCarInfoList[index].carNumber == '') {
-					this.carNumber = ''
-				} else {
-					this.carNumber = this.dataDetails.driverCarInfoList[index].carNumber
-				}
-				if (this.$refs.keyboard.open) {
-					this.$refs.keyboard.open(false) //true 键盘显示 false 键盘隐藏
-				} else {
-					this.$refs.keyboard[0].open(false)
-				}
-				this.index = index
-				if (this.$refs.keyboard.open) {
-					this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
-				} else {
-					this.$refs.keyboard[0].open(true)
-				}
-			},
-			addCarNumber(val) {
-				val.push({
-					carNo: ''
-				})
-			},
-			delCarNumber(val, index) {
-				if (val.length > 1) {
-					val.splice(index, 1)
-					this.$forceUpdate()
-				} else {
-					let params = {
-						type: 'error',
-						message: "至少保留一个车牌号!",
-						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
-					}
-					this.$refs.uToast.show({
-						...params
-					})
-				}
-			},
-			addBankNumber(val) {
-				val.push({
-					bankNo: ''
-				})
-			},
-			delBankNumber(val, index) {
-				if (val.length > 1) {
-					val.splice(index, 1)
-					this.$forceUpdate()
-				} else {
-					let params = {
-						type: 'error',
-						message: "至少保留一张银行卡!",
-						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
-					}
-					this.$refs.uToast.show({
-						...params
-					})
-				}
-			},
-			next(val) {
-				console.log(111111111111)
-				uni.$u.route('/pages/mine/driverCertificationNext', {
-					id: 1,
-				});
-			}
-
-		},
-	};
-</script>
-
-<style scoped lang="scss">
-	.row4-img {
-		width: 32rpx;
-		height: 32rpx;
-	}
-</style>

+ 0 - 329
pages/mine/driverCertificationNext.vue

@@ -1,329 +0,0 @@
-<template>
-	<view class="content">
-		<u-radio-group v-model="radiovalue1" iconPlacement="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>
-
-		<view class="level1-title">证件信息</view>
-		<view class="content1">
-			<view class="flex flex-space-between">
-				<view class="left">
-					<view>驾驶证主页</view>
-					<u-button type="primary">上传驾驶证主页</u-button>
-				</view>
-				<view class="left">
-					<view>驾驶证副页</view>
-					<u-button type="primary">上传驾驶证副页</u-button>
-				</view>
-			</view>
-			<view class="flex flex-space-between">
-				<view>驾驶证有效期</view>
-				<view>选择驾驶证有效期</view>
-			</view>
-		</view>
-
-		<u-divider text="分割线"></u-divider>
-		<view class="content2">
-			<view class="flex flex-space-between">
-				<view class="left">
-					<view>行驶证主页</view>
-					<u-button type="primary">上传行驶证主页</u-button>
-				</view>
-				<view class="left">
-					<view>行驶证副页</view>
-					<u-button type="primary">上传行驶证副页</u-button>
-				</view>
-			</view>
-			<view class="flex flex-space-between">
-				<view>行驶证有效期</view>
-				<view>选择行驶证有效期</view>
-			</view>
-		</view>
-		<u-divider text="分割线"></u-divider>
-		<view class="content3">
-			<view class="flex flex-space-between">
-				<view class="left">
-					<view>挂车行驶证主页</view>
-					<u-button type="primary">上传挂车行驶证主页</u-button>
-				</view>
-				<view class="left">
-					<view>挂车行驶证副页</view>
-					<u-button type="primary">上传挂车行驶证副页</u-button>
-				</view>
-			</view>
-			<view class="flex flex-space-between">
-				<view>挂车行驶证有效期</view>
-				<view>选择挂车行驶证有效期</view>
-			</view>
-			<u-divider text="分割线"></u-divider>
-		</view>
-		<view class="content4">
-			<view class="flex s-row">
-				<view class="">从业资格证</view>
-				<u-button type="primary">上传从业资格证</u-button>
-			</view>
-			<view class="flex flex-space-between">
-				<view>从业资格证有效期</view>
-				<view>选择从业资格证有效期</view>
-			</view>
-		</view>
-		<u-divider text="分割线"></u-divider>
-		<view class="content5">
-			<view class="flex s-row">
-				<view class="">运营证</view>
-				<u-button type="primary">上传运营证</u-button>
-			</view>
-			<view class="flex flex-space-between">
-				<view>运营证有效期</view>
-				<view>选择运营证有效期</view>
-			</view>
-		</view>
-		<u-divider text="分割线"></u-divider>
-		<view class="content6">
-			<view class="flex s-row">
-				<view class="">挂车运营证</view>
-				<u-button type="primary">上传挂车运营证</u-button>
-			</view>
-			<view class="flex flex-space-between">
-				<view>挂车运营证有效期</view>
-				<view>选择挂车运营证有效期</view>
-			</view>
-		</view>
-		<u-button type="primary" @click="submit">提交</u-button>
-		<u-toast ref="uToast"></u-toast>
-
-	</view>
-</template>
-
-<script>
-	import uploadImage from '@/components/ossutil/uploadFile.js';
-	var _this;
-	export default {
-		components: {},
-		data() {
-			return {
-				radiolist1: [{
-						name: '挂车司机',
-						disabled: false
-					},
-					{
-						name: '非挂车司机',
-						disabled: false
-					}
-				],
-				// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
-				radiovalue1: '挂车司机',
-			};
-		},
-		onLoad(options) {
-			_this = this;
-			console.log(options)
-		},
-		methods: {
-			submit() {
-				// 校验
-				console.log('提交')
-			},
-			radioChange(n) {
-				console.log('radioChange', n);
-			},
-			//设置图片
-			setImage(e) {
-				// 
-				console.log(e);
-				//显示在页面
-				//this.imagesrc = e.path;
-				if (e.dotype == 'idphoto') {
-					_this.zjzClipper(e.path);
-				} else if (e.dotype == 'watermark') {
-					_this.watermark(e.path);
-				} else {
-					_this.savePhoto(e.path);
-				}
-			},
-			//保存图片到相册,方便核查
-			savePhoto(path) {
-				// 
-				this.imagesrc = path;
-				uploadImage('image',path, 'appData/',
-					result => {
-						// 上传成功
-						console.log('图片地址', result)
-					}
-				)
-				//保存到相册
-				// uni.saveImageToPhotosAlbum({
-				// 	filePath: path,
-				// 	success: () => {
-				// 		uni.showToast({
-				// 			title: '已保存至相册',
-				// 			duration: 2000
-				// 		});
-				// 	}
-				// });
-			},
-			uploadImg(type) {
-
-				this.uploadType = type
-				this.isShowimgType = true
-			},
-			photograph() {
-				console.log('拍照')
-				let that = this;
-				uni.chooseImage({
-					count: 1,
-					success: function(res) {
-						console.log(JSON.stringify(res.tempFilePaths));
-						uploadImage('image',res.tempFilePaths[0], 'appData/',
-							result => {
-								// 上传成功
-								console.log('图片地址', result)
-							}
-						)
-					}
-				});
-
-			},
-			imgTypeSelect(val) {
-				console.log(val)
-				console.log(this.uploadType)
-				if (val.name == '相册') {
-					uni.chooseImage({
-						count: 1,
-						sourceType: this.$helper.chooseImage.sourceType,
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage('image',res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功
-									console.log('图片地址', result)
-									switch (this.uploadType) {
-										case 0:
-											console.log('人车合影')
-											break
-										case 1:
-											console.log('身份正面')
-											break
-										case 2:
-											console.log('身份反面')
-											break
-										case 3:
-											console.log('银行卡')
-											break
-										case 4:
-									}
-								}
-							)
-						}
-					});
-
-				} else {
-					// 
-					switch (this.uploadType) {
-						case 0:
-
-
-							console.log('人车合影')
-
-							break
-						case 1:
-							uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=face');
-							console.log('身份正面')
-							break
-						case 2:
-							console.log('身份反面')
-							break
-						case 3:
-							console.log('银行卡')
-							break
-						case 4:
-					}
-				}
-
-			},
-			// 上传人车合影
-			unloadGroupPhoto() {
-				this.isShowimgType = true
-				// uni.chooseImage({
-				//     count: 1, 
-				//     success: function (res) {
-				//         console.log(JSON.stringify(res.tempFilePaths));
-				// 		uploadImage(res.tempFilePaths[0], 'appData/',
-				// 			result => {
-				// 				// 上传成功
-				// 				console.log('图片地址', result)
-				// 			}
-				// 		)
-				//     }
-				// });
-			},
-			//身份证正面
-			getImgUrl1(src) {
-				// console.log(src)
-				// console.log('------------res-----------')
-				// let that = this;
-				// that.id[0] = src
-				// that.id1 = src
-				// that.certificates = false
-				// that.personImgs.personImg = that.id[0]
-				// that.$api.doRequest('get', '/driverViewInfo/personShibie', that
-				// 	.personImgs).then(res => {
-				// 	if (res.data.data.recPerson != null) {
-				// 		if (res.data.data.recPerson != "") {
-				// 			that.$set(that.DriverViewInfo, 'driverName', res
-				// 				.data.data.recPerson)
-				// 		}
-				// 	}
-				// 	if (res.data.data.recPersonNo != null) {
-				// 		if (res.data.data.recPersonNo != "") {
-				// 			that.$set(that.DriverViewInfo, 'numberCard', res
-				// 				.data.data.recPersonNo)
-				// 		}
-				// 	}
-				// }).catch(res => {
-				// 	uni.showToast({
-				// 		title: res.data.message,
-				// 		icon: 'none',
-				// 		duration: 2000
-				// 	})
-				// })
-			},
-
-			// getImgUrl(res) {
-			// 	// this.detailData.addressUrl = res
-			// 	console.log(res)
-			// 	console.log('------------res-----------')
-			// },
-			// onError(error) {
-			// 	console.log('------------error-----------')
-			// 	console.log(error)
-			// },
-			// onRemove(index) {},
-			// filterFileType(index, lists) {
-			// 	if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
-			// 		lists.splice(index, 1);
-			// 		// 当前文件不支持
-			// 		uni.showModal({
-			// 			title: '暂不支持当前图片类型',
-			// 			showCancel: false
-			// 		});
-			// 	} else {
-			// 		this.isAdd = false;
-			// 	}
-			// },
-			// onProgress(e) {
-			// 	console.log(e)
-			// },
-
-		},
-	};
-</script>
-
-<style scoped lang="scss">
-	.row4-img {
-		width: 32rpx;
-		height: 32rpx;
-	}
-</style>

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

@@ -414,12 +414,12 @@
 							delete that.dataDetails.payeeAddressUrl
 							that.$request.baseRequest('post', '/hyCargoOwnerPayeeInfo/api/addPayee',
 									that.dataDetails).then(res => {
+										uni.hideLoading()
 									if (res.code == '200') {
 										let params = {
 											type: 'success',
 											message: "提交成功",
 										}
-										uni.hideLoading()
 										this.submitstatus=false
 										that.$refs.uToast.show({
 											...params
@@ -436,10 +436,12 @@
 					
 								})
 								.catch(res => {
+									uni.hideLoading()
 									this.submitstatus
 									uni.$u.toast(res.message);
 								});
 						} else {
+							uni.hideLoading()
 							this.submitstatus=false
 							uni.$u.toast(response.data.distinguish);
 						}

+ 3 - 0
pages/news/index.vue

@@ -175,6 +175,7 @@
 
 					})
 					.catch(res => {
+						uni.hideLoading()
 						uni.$u.toast(res.message);
 					});
 			},
@@ -192,11 +193,13 @@
 				that.$request.baseRequest('post', '/newsInfo/api/editNewsInfo', {
 						id: val.id,
 					}).then(res => {
+						uni.hideLoading()
 						that.mescroll.resetUpScroll()
 						that.look()
 						uni.hideLoading()
 					})
 					.catch(res => {
+						uni.hideLoading()
 						uni.$u.toast(res.message);
 					});
 			},

+ 1 - 0
pages/order/signContract.vue

@@ -224,6 +224,7 @@
 											}
 										})
 									.catch(res => {
+										uni.hideLoading()
 										uni.$u.toast(res.message);
 									});
 							}

+ 1 - 0
pages/public/code.vue

@@ -148,6 +148,7 @@
 							}
 						})
 						.catch(res => {
+							uni.hideLoading()
 							uni.showToast({
 								title: res.message,
 								icon: 'none',

+ 1 - 0
pages/public/login.vue

@@ -209,6 +209,7 @@
 								}
 							})
 							.catch(res => {
+								uni.hideLoading()
 								uni.$u.toast(res.message);
 							});
 					}

+ 2 - 0
pages/public/register.vue

@@ -335,11 +335,13 @@
 									uni.hideLoading()
 								})
 								.catch(res => {
+									uni.hideLoading()
 									console.log(res);
 								});
 						}
 					})
 					.catch(res => {
+						uni.hideLoading()
 						console.log(res);
 					});
 			},

+ 65 - 91
pages/release/editRelease.vue

@@ -210,15 +210,18 @@
 					{{dataObj.taskValidity?dataObj.taskValidity:'选择任务有效期>'}}
 				</view>
 			</view>
-			<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriodcq"
+			<!-- <u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriodcq"
 				@confirm="confirmValidityPeriodcq" @change="changeHandler" @close='isShowcardValidity=false'
 				@cancel='isShowcardValidity=false' :closeOnClickOverlay='true'>
-			</u-picker>
+			</u-picker> -->
+			<itmister-date-picker :overdueContent="'任务已过期'" :dateStatus="1" :periodOfValidity="true" :startYear='2022' :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl" :endDate="array" :futureYear="30" @dateConfirm="confirmValidityPeriodcq"></itmister-date-picker>
 		</view>
 		<view class="submit" @click="submit">立即发布</view>
-		<u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+		
+		<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
-		</u-picker>
+		</u-picker> -->
+		<itmister-date-picker :dateStatus="2" :startYear='2022' ref="datezc" :futureYear="30" :checkYear="year" :checkMonth="month" :checkDay="day" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
 			:showCancelButton='true' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick"
 			@cancel="cancelClick"></u-modal>
@@ -246,6 +249,10 @@
 				columns: [
 					[]
 				],
+				array:{},
+				year:'',
+				month:'',
+				day:'',
 				dataObj: {
 					commonId: '',
 					cargoOwner: '',
@@ -321,6 +328,7 @@
 			}
 		},
 		onShow() {
+			
 			this.getSFList()
 			let _faddress = uni.getStorageSync('storage_faddress');
 			let _saddress = uni.getStorageSync('storage_saddress');
@@ -355,6 +363,7 @@
 				this.dataObj.billingMethod = '元/吨'
 			}
 			
+			
 			for (let i = 0; i < this.dataObj.carModel.length; i++) {
 			
 				if (this.dataObj.carModel[i] == '1') {
@@ -682,6 +691,7 @@
 				this.$request.baseRequest('get', '/cargoOwnerAddressInfo/addressList', {
 						commonId: this.userInfo.id
 					}).then(res => {
+						uni.hideLoading()
 						for (let i = 0; i < res.data.length; i++) {
 							if (res.data[i].defaultShipment == 1 && type == 0) {
 								this.dataObj.sendCity = res.data[i].city
@@ -705,11 +715,12 @@
 							this.dataObj.distance = this.$helper.getDistance(this.dataObj.unsendLatitude, this.dataObj
 								.unsendLongitude, this.dataObj.sendLatitude, this.dataObj.sendLongitude)
 						}
-						uni.hideLoading()
+						
 
 
 					})
 					.catch(res => {
+						uni.hideLoading()
 						uni.showToast({
 							title: res.message,
 							icon: 'none',
@@ -802,101 +813,64 @@
 				}
 			},
 			selectValidityPeriodcq() {
-				this.isShowcardValidity = true
+				var datetime = new Date().getTime()
+				var datetime1 = datetime + (24 * 60 * 60 * 1000 * 30 * 6)
+				var date=new Date(datetime1)
+				this.array={year:date.getFullYear(),month:date.getMonth() + 1,day:date.getDate()}
+				console.log(this.array)
+				if(this.dataObj.taskValidity&&this.dataObj.taskValidity!='长期'){
+					const arr=this.dataObj.taskValidity.split('-')
+					this.year=arr[0]
+					this.month=arr[1]
+					this.day=arr[2]
+				}
+				if(this.dataObj.taskValidity=='长期'){
+					this.year='长期'
+				}
+				this.$refs.dateEl.show()
 			},
-			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if (e.value[0] == '随时') {
-					switch (this.ValidityPeriodType) {
-						case 0:
-							this.dataObj.loadingDateStart = e.value[0]
-							break
-						case 1:
-							this.dataObj.loadingDateEnd = e.value[0]
-							break
-					}
-				} else {
-					if (!e.value[1] || !e.value[2]) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "日期格式错误,请重新选择!",
-						})
-						return
-					}
-					switch (this.ValidityPeriodType) {
-						case 0:
-							this.dataObj.loadingDateStart = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-							break
-						case 1:
-							this.dataObj.loadingDateEnd = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-							break
+			confirmValidityPeriod(date) {
+				switch (this.ValidityPeriodType) {
+					case 0:
+						this.dataObj.loadingDateStart =date.date
+						break
+					case 1:
+						this.dataObj.loadingDateEnd = date.date
+						break
 
-					}
 				}
-
-
-				this.isShowValidity = false
 			},
-			confirmValidityPeriodcq(e) {
-				console.log('confirm', e)
-				if (e.value[0] == '长期') {
-					if(e.value[1]||e.value[2]){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "选择长期时不允许选择月日!",
-						})
-						return
-					}
-					this.dataObj.taskValidity = e.value[0]
-				} else {
-					if (!e.value[1] || !e.value[2]) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "日期格式错误,请重新选择!",
-						})
-						return
-					}
-					var date=new Date()
-					var text='任务已过期!'
-						if(e.value[0]<date.getFullYear()){
-							this.$refs.uToast.show({
-								type: 'error',
-								message: text,
-							})
-							return
+			confirmValidityPeriodcq(date) {
+				this.dataObj.taskValidity = date.date
+			},
+			selectValidityPeriod(type) {
+				this.ValidityPeriodType = type
+				switch (this.ValidityPeriodType) {
+					case 0:
+						if(this.dataObj.loadingDateStart&&this.dataObj.loadingDateStart!='随时'){
+							const arr=this.dataObj.loadingDateStart.split('-')
+							this.year=arr[0]
+							this.month=arr[1]
+							this.day=arr[2]
 						}
-						if(e.value[0]==date.getFullYear()&&Number(e.value[1])<(date.getMonth()+1)){
-							this.$refs.uToast.show({
-								type: 'error',
-								message: text,
-							})
-							return
+						if(this.dataObj.loadingDateStart=='随时'){
+							this.year='随时'
 						}
-						if(e.value[0]==date.getFullYear()&&Number(e.value[1])==(date.getMonth()+1)&&Number(e.value[2])<=(date.getDate())){
-							this.$refs.uToast.show({
-								type: 'error',
-								message: text,
-							})
-							return
+						break
+					case 1:
+						if(this.dataObj.loadingDateEnd&&this.dataObj.loadingDateEnd!='随时'){
+							const arr=this.dataObj.loadingDateEnd.split('-')
+							this.year=arr[0]
+							this.month=arr[1]
+							this.day=arr[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]
-							
+						if(this.dataObj.loadingDateEnd=='随时'){
+							this.year='随时'
 						}
+						break
+				
 				}
-				this.isShowcardValidity = false
-			},
-			selectValidityPeriod(type) {
-				this.ValidityPeriodType = type
-				this.isShowValidity = true
+				this.$refs.datezc.show()
 			},
 			change(e) {
 				console.log('change', e);

+ 0 - 2
pages/release/lookRelease.vue

@@ -194,8 +194,6 @@
 		},
 		onLoad(options) {
 			_this = this;
-			// this.validityPeriod = this.$helper.makeValidityPeriod()
-			// this.validityPeriodcq = this.$helper.makeValidityPeriod(0)
 			this.id = options.id
 			this.getDetails()
 		},

+ 1 - 0
pages/release/record.vue

@@ -354,6 +354,7 @@
 						uni.hideLoading()
 					})
 					.catch(res => {
+						uni.hideLoading()
 						uni.$u.toast(res.message);
 					});
 			},

+ 27 - 103
pages/release/release.vue

@@ -225,15 +225,13 @@
 					{{dataObj.taskValidity?dataObj.taskValidity:'选择任务有效期>'}}
 				</view>
 			</view>
-			<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriodcq"
-				@confirm="confirmValidityPeriodcq" @change="changeHandler" @close='isShowcardValidity=false'
-				@cancel='isShowcardValidity=false' :closeOnClickOverlay='true'>
-			</u-picker>
+			<itmister-date-picker :overdueContent="'任务已过期'" :dateStatus="1" :periodOfValidity="true" :startYear='2022' ref="dateEl" :endDate="array" :futureYear="30" @dateConfirm="confirmValidityPeriodcq"></itmister-date-picker>
 		</view>
 		<view class="submit" @click="submit">立即发布</view>
-		<u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+		<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
-		</u-picker>
+		</u-picker> -->
+		<itmister-date-picker :dateStatus="2" :startYear='2022' ref="datezc" :futureYear="30" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		<!-- //货物类别 -->
 		<u-picker :show="isGoodsType" ref="uPicker" :columns="goodsList" keyName="constValue" @confirm="goodsSubmit"
 			:closeOnClickOverlay='true' @close='isGoodsType=false' @cancel='isGoodsType=false'>
@@ -269,6 +267,7 @@
 				columns: [
 					[]
 				],
+				array:{},
 				freightAdvance: false,
 				dataObj: {
 					commonId: '',
@@ -326,11 +325,7 @@
 					}
 				],
 				value: true,
-				isShowcardValidity: false,
 				ValidityPeriodType: '',
-				validityPeriod: [],
-				validityPeriodcq: [],
-				isShowValidity: false,
 				dataDetails: {
 					type: '元/吨'
 				},
@@ -354,6 +349,10 @@
 			this.goToRecord()
 		},
 		onShow() {
+			var datetime = new Date().getTime()
+			var datetime1 = datetime + (24 * 60 * 60 * 1000 * 30 * 6)
+			var date=new Date(datetime1)
+			this.array={year:date.getFullYear(),month:date.getMonth() + 1,day:date.getDate()}
 			_this = this
 			// #ifdef APP-PLUS
 			// let _status = this.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
@@ -402,7 +401,6 @@
 			})
 
 			this.validityPeriod = this.$helper.makeValidityPeriod(0, '随时')
-			this.validityPeriodcq = this.$helper.makeValidityPeriod(0, '长期')
 			let _faddress = uni.getStorageSync('storage_faddress');
 			let _saddress = uni.getStorageSync('storage_saddress');
 			if (_faddress) {
@@ -911,6 +909,7 @@
 				this.$request.baseRequest('get', '/cargoOwnerAddressInfo/addressList', {
 						commonId: this.userInfo.id
 					}).then(res => {
+						uni.hideLoading()
 						for (let i = 0; i < res.data.length; i++) {
 							if (res.data[i].defaultShipment == 1 && type == 0) {
 								this.dataObj.sendCity = res.data[i].city
@@ -938,9 +937,10 @@
 							this.dataObj.distance = this.$helper.getDistance(this.dataObj.unsendLatitude, this.dataObj
 								.unsendLongitude, this.dataObj.sendLatitude, this.dataObj.sendLongitude)
 						}
-						uni.hideLoading()
+						
 					})
 					.catch(res => {
+						uni.hideLoading()
 						uni.showToast({
 							title: res.message,
 							icon: 'none',
@@ -1019,40 +1019,18 @@
 				}
 			},
 			selectValidityPeriodcq() {
-				this.isShowcardValidity = true
+				this.$refs.dateEl.show();
 			},
-			confirmValidityPeriod(e) {
-				if (e.value[0] == '随时') {
-					switch (this.ValidityPeriodType) {
-						case 0:
-							this.dataObj.loadingDateStart = e.value[0]
-							break
-						case 1:
-							this.dataObj.loadingDateEnd = e.value[0]
-							break
-					}
-				} else {
-					if (!e.value[1] || !e.value[2]) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "日期格式错误,请重新选择!",
-						})
-						return
-					}
-					
-					switch (this.ValidityPeriodType) {
-						case 0:
-							this.dataObj.loadingDateStart = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-							break
-						case 1:
-							this.dataObj.loadingDateEnd = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-							break
-
-					}
-				}
-
-
-				this.isShowValidity = false
+			confirmValidityPeriod(date) {
+			
+			switch (this.ValidityPeriodType) {
+				case 0:
+					this.dataObj.loadingDateStart = date.date
+					break
+				case 1:
+					this.dataObj.loadingDateEnd =date.date
+					break
+			}
 			},
 			getTime: function() {
 
@@ -1066,67 +1044,13 @@
 				var timer = year + '-' + month + '-' + day
 				return timer;
 			},
-			confirmValidityPeriodcq(e) {
-				if (e.value[0] == '长期') {
-					if(e.value[1]||e.value[2]){
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "选择长期时不允许选择月日!",
-						})
-						return
-					}
-					this.dataObj.taskValidity = e.value[0]
-				} else {
-					if (!e.value[1] || !e.value[2]) {
-						this.$refs.uToast.show({
-							type: 'error',
-							message: "日期格式错误,请重新选择!",
-						})
-						return
-					}
-					var date=new Date()
-					var text='任务已过期!'
-						if(e.value[0]<date.getFullYear()){
-							this.$refs.uToast.show({
-								type: 'error',
-								message: text,
-							})
-							return
-						}
-						if(e.value[0]==date.getFullYear()&&Number(e.value[1])<(date.getMonth()+1)){
-							this.$refs.uToast.show({
-								type: 'error',
-								message: text,
-							})
-							return
-						}
-						if(e.value[0]==date.getFullYear()&&Number(e.value[1])==(date.getMonth()+1)&&Number(e.value[2])<=(date.getDate())){
-							this.$refs.uToast.show({
-								type: 'error',
-								message: text,
-							})
-							return
-						}
-					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: "请选择未来六个月之内的日期!",
-						})
-						return
-					} else {
-						this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-					}
-					console.log(datetime, currecttime)
-
-				}
-				this.isShowcardValidity = false
+			confirmValidityPeriodcq(date) {
+				this.dataObj.taskValidity=date.date
 			},
 			selectValidityPeriod(type) {
 				this.ValidityPeriodType = type
-				this.isShowValidity = true
+				this.$refs.datezc.show()
+				// this.isShowValidity = true
 			},
 			change(e) {
 				console.log('change', e);

+ 3 - 1
pages/release/selectAddress.vue

@@ -161,6 +161,7 @@
 						pageSize: 100,
 						currentPage: 1
 					}).then(res => {
+						uni.hideLoading()
 						if (res.code == 200) {
 							if (res.data.records.length) {
 								for (var i = 0; i < res.data.records.length; i++) {
@@ -180,11 +181,12 @@
 								}
 							}
 
-							uni.hideLoading()
+							
 						}
 
 					})
 					.catch(res => {
+						uni.hideLoading()
 						uni.showToast({
 							title: res.message,
 							icon: 'none',