Browse Source

日历范围修改:前3后1

htc 4 tháng trước cách đây
mục cha
commit
f1268a0f74
2 tập tin đã thay đổi với 12 bổ sung4 xóa
  1. 6 2
      pagesStorage/inStorage/add.vue
  2. 6 2
      pagesStorage/outStorage/add.vue

+ 6 - 2
pagesStorage/inStorage/add.vue

@@ -107,7 +107,7 @@
 		<u-picker title="供应商" :show="merchantShow" :columns="merchantList" keyName="merchantName" 
 			@cancel="merchantShow=false" @confirm="merchantConfirm">
 		</u-picker>
-		<u-calendar title="到货日期" :show="dateShow" mode="single" @confirm="dateConfirm" @close="dateShow = false"></u-calendar>
+		<u-calendar title="到货日期" :minDate="minDate" :maxDate="maxDate" :monthNum="5" :show="dateShow" mode="single" @confirm="dateConfirm" @close="dateShow = false"></u-calendar>
 	</view>
 </template>
 
@@ -139,11 +139,15 @@
 				receiptTypeList:[],
 				merchantShow:false,
 				merchantList:[],
-				dateShow:false
+				dateShow:false,
+				minDate:'',
+				maxDate:''
 			}
 		},
 		mounted() {
 			this.receiptDto.orderNo = generateNo('RK');
+			this.minDate = new Date(new Date().setMonth(new Date().getMonth() - 3)).Format('yyyy-MM-dd');
+			this.maxDate = new Date(new Date().setMonth(new Date().getMonth() + 1)).Format('yyyy-MM-dd');
 		},
 		methods:{
 			selectWarehouse(){

+ 6 - 2
pagesStorage/outStorage/add.vue

@@ -104,7 +104,7 @@
 		<u-picker title="客户" :show="merchantShow" :columns="merchantList" keyName="merchantName" 
 			@cancel="merchantShow=false" @confirm="merchantConfirm">
 		</u-picker>
-		<u-calendar title='出库日期' :show="dateShow" mode="single" @confirm="dateConfirm" @close="dateShow = false"></u-calendar>
+		<u-calendar title='出库日期' :minDate="minDate" :maxDate="maxDate" :monthNum="5" :show="dateShow" mode="single" @confirm="dateConfirm" @close="dateShow = false"></u-calendar>
 	</view>
 </template>
 
@@ -136,11 +136,15 @@
 				ShipmentTypeList:[],
 				merchantShow:false,
 				merchantList:[],
-				dateShow:false
+				dateShow:false,
+				minDate:'',
+				maxDate:''
 			}
 		},
 		mounted() {
 			this.shipmentDto.orderNo = generateNo('CK');
+			this.minDate = new Date(new Date().setMonth(new Date().getMonth() - 3)).Format('yyyy-MM-dd');
+			this.maxDate = new Date(new Date().setMonth(new Date().getMonth() + 1)).Format('yyyy-MM-dd');
 		},
 		methods:{
 			selectWarehouse(){