|
@@ -605,24 +605,28 @@ export default {
|
|
|
this.$message.error('请选择查询类型!');
|
|
|
}else if(this.queryParam.account === '' || !this.queryParam.hasOwnProperty('account')){
|
|
|
this.$message.error('请选择账套号!');
|
|
|
- }else if(this.range.length == 1 || this.range.length == 0){
|
|
|
- this.$message.error('请选择预发货时间区间!');
|
|
|
}else{
|
|
|
- var separator = "-"; //日期分隔符
|
|
|
- var startDates = this.queryParam.preDeliveryDateS.split(separator);
|
|
|
- var endDates = this.queryParam.preDeliveryDateE.split(separator);
|
|
|
- var startDate = new Date(startDates[0], startDates[1]-1, startDates[2]);
|
|
|
- var endDate = new Date(endDates[0], endDates[1]-1, endDates[2]);
|
|
|
- var timeInterval= parseInt(Math.abs(endDate - startDate ) / 1000 / 60 / 60 /24) + 1;
|
|
|
- if(timeInterval > 31 ){
|
|
|
- this.$message.error('预发货时间区间超过31天,请重新选择!');
|
|
|
- this.range = []
|
|
|
- this.queryParam.preDeliveryDateS = ''
|
|
|
- this.queryParam.preDeliveryDateE = ''
|
|
|
- }else{
|
|
|
- this.queryParam.pageNo = '';
|
|
|
+ if(this.range.length == 2){
|
|
|
+ var separator = "-"; //日期分隔符
|
|
|
+ var startDates = this.queryParam.preDeliveryDateS.split(separator);
|
|
|
+ var endDates = this.queryParam.preDeliveryDateE.split(separator);
|
|
|
+ var startDate = new Date(startDates[0], startDates[1]-1, startDates[2]);
|
|
|
+ var endDate = new Date(endDates[0], endDates[1]-1, endDates[2]);
|
|
|
+ var timeInterval= parseInt(Math.abs(endDate - startDate ) / 1000 / 60 / 60 /24) + 1;
|
|
|
+ if(timeInterval > 31 ){
|
|
|
+ this.$message.error('预发货时间区间超过31天,请重新选择!');
|
|
|
+ this.range = []
|
|
|
+ this.queryParam.preDeliveryDateS = ''
|
|
|
+ this.queryParam.preDeliveryDateE = ''
|
|
|
+ }else{
|
|
|
+ this.queryParam.pageNo = '';
|
|
|
+ this.getOrderList();
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ this.queryParam.pageNo = ''
|
|
|
this.getOrderList();
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
|