瀏覽代碼

月份跳转问题更改

123 3 年之前
父節點
當前提交
0580c775bc

+ 2 - 3
App/components/CalendarCard/CalendarCard.vue

@@ -38,7 +38,7 @@
 							<view class="content-item flex-n fac fjb" :class="[item.mm!=month?'notexist-text':'']">
 								<view class="content-item-text1" :class="[item.date==today?'nowday':'']">{{item.dd}}
 								</view>
-								<view class="content-item-text2">初一</view>
+								<view class="content-item-text2">{{item.IDayCn}}</view>
 							</view>
 						<!-- </template> -->
 						<view style="min-height: 120rpx;">
@@ -57,7 +57,7 @@
 							<view class="content-item flex-n fac fjb" :class="[item.mm!=month?'notexist-text':'']">
 								<view class="content-item-text1" :class="[item.date==today?'nowday':'']">{{item.dd}}
 								</view>
-								<view class="content-item-text2">初一</view>
+								<view class="content-item-text2">{{item.IDayCn}}</view>
 							</view>
 						<!-- </template> -->
 						<view style="min-height: 120rpx;">
@@ -154,7 +154,6 @@
 
 			},
 			getCanlendar(date) {
-				console.log(date)
 				let d = this.getDateInfo(date);
 				this.month = d.mm;
 				let nowMonthDay = 0, //当前月的天数

+ 23 - 1
App/pages/book/index/book-month.vue

@@ -81,7 +81,8 @@
 
 				allDateInfo: {
 
-				}
+				},
+				nowChooseDate:'',//现在选中的日期
 
 			}
 		},
@@ -90,13 +91,34 @@
 			nowDateList(dateList) {
 				this.allDateInfo = {};
 				this.dateList = dateList;
+				console.error(2131234938985492843)
 				this.$emit('changeDate', dateList[15].date)
+				let k=-1;
+				for(let i in dateList){
+					//选择的日子在列表中的
+					if(dateList[i].date==this.nowChooseDate&&dateList[15].mm==Number(this.nowChooseDate.substring(5,7))){
+						k=i;
+						break;
+					}
+				
+				}
+				if(k==-1){
+					console.error(this.nowChooseDate,324213123)
+					for(let i in dateList){
+						if(dateList[i].dd==1){
+							 this.$emit('changeDate', dateList[i].date)
+							break;
+						}
+					}
+					
+				}
 				this.orderCalendarTotal(dateList);
 				this.bookImportantDate(dateList);
 				this.getAuthState();
 			},
 			getDate(date) {
 				console.log(date)
+				this.nowChooseDate=date;
 				this.$nextTick(() => {
 					this.$refs.date.setDate(date);
 				})

+ 8 - 5
App/pages/book/index/index.vue

@@ -106,7 +106,7 @@
 				});
 			},
 			onConfirm(e) {
-				console.log(e)
+				console.log('-------',e,'-------')
 				this.datevalue = e.value;
 				this.tabInfo();
 			},
@@ -126,19 +126,21 @@
 				console.warn(this.datevalue)
 				var a = this.datevalue.split("-");
 				this.dataYearMonth = a[0] + '.' + a[1];
-				if (this.stateTab == 0) { //日
 					this.$nextTick(() => {
+						console.log(this.datevalue)
+				if (this.stateTab == 0) { //日
+						
 						if (this.$refs.day)
 							this.$refs.day.getDate(this.datevalue);
-					})
 				}
 				if (this.stateTab == 1) { //月
-					this.$nextTick(() => {
+				
 						if (this.$refs.month)
 							this.$refs.month.getDate(this.datevalue);
-					})
+				
 
 				}
+					})
 			},
 			changeTabs(idx) {
 				console.log(idx, this.datevalue)
@@ -161,6 +163,7 @@
 				this.dataYearMonth = a[0] + '.' + a[1];
 			},
 			clickDate(date) {
+				console.log(1312)
 				this.changeDate(date);
 				this.stateTab = 0;
 				this.$nextTick(() => {

+ 11 - 11
App/pages/settlement/collection/index.vue

@@ -1,13 +1,13 @@
 <template>
 	<view>
 		<z-navbar title="确认收款" back></z-navbar>
-		<w-picker mode="date" startYear="2000" endYear="2100" v-model="info.operateDate" :current="true" fields="day"
-			@confirm="onConfirmWantDate($event)" @cancel="onCancel" :disabled-after="false" ref="operateDate">
+		<w-picker mode="date" startYear="2000" endYear="2100" v-model="info.operateTime" :current="true" fields="day"
+			@confirm="onConfirmWantDate($event)" @cancel="onCancel" :disabled-after="false" ref="operateTime">
 		</w-picker>
 		<z-card class="mt-30 ptb-10">
 			<z-form :model="info" :rules="rules" ref="info">
-				<z-form-item label="收款时间" prop="operateDate" showline>
-					<date-select v-model="info.operateDate" placeholder="选择收款时间"></date-select>
+				<z-form-item label="收款时间" prop="operateTime" showline>
+					<date-select v-model="info.operateTime" placeholder="选择收款时间"></date-select>
 				</z-form-item>
 				</z-form-item>
 				<z-form-item height="100rpx" label="支付方式" prop="payment" showline>
@@ -60,11 +60,11 @@
 				type: 0,
 				info: {
 					payment: [],
-					operateDate: '',
+					operateTime: '',
 					remark: ''
 				},
 				rules: {
-					operateDate: [{
+					operateTime: [{
 						required: true,
 						message: ''
 					}],
@@ -84,7 +84,7 @@
 			//获取当前时间的信息
 			var date = this.$Date.getDayDate().date;
 			var nowTime = new Date();
-			this.$set(this.info, 'operateDate', date + ' ' + nowTime.getHours() + ':' + nowTime.getMinutes());
+			this.$set(this.info, 'operateTime', date + ' ' + nowTime.getHours() + ':' + nowTime.getMinutes());
 		},
 		methods: {
 			getPayMent() {
@@ -147,7 +147,7 @@
 				this.$axios.post('app/orderFinanceConfirm/saveReceivable', {
 					"confirmMoney": this.info.confirmMoney,
 					"storeId": uni.getStorageSync('storeId'),
-					"operateDate": this.info.operateDate, //操作时间
+					"operateTime": this.info.operateTime, //操作时间
 					"isSupplement": 0,
 					"orderId": this.id,
 					"payment": this.info.payment,
@@ -164,7 +164,7 @@
 
 			submitWedData() {
 				this.$axios.post('app/weddingFinanceConfirm/saveWeddingReceivable', {
-					"operateDate": this.info.operateDate, //操作时间
+					"operateTime": this.info.operateTime, //操作时间
 					"payment": this.info.payment,
 					"isSupplement": 0,
 					"weddingOrderId": this.id,
@@ -179,10 +179,10 @@
 				})
 			},
 			choosewantDate() {
-				this.$refs.operateDate.show();
+				this.$refs.operateTime.show();
 			},
 			onConfirmWantDate(e) {
-				this.$set(this.info, 'operateDate', e.value)
+				this.$set(this.info, 'operateTime', e.value)
 			},
 			onCancel() {
 				console.log(this.$refs.date.value, this.$refs.date.pickVal)