|
@@ -63,20 +63,20 @@
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="交期">
|
|
|
- <a-date-picker
|
|
|
- style="width: 100%"
|
|
|
- format="YYYY-MM-DD"
|
|
|
- placeholder="请选择交期"
|
|
|
- @change="onDateChange"
|
|
|
- v-model="queryParam.DPreDateBT"
|
|
|
- ></a-date-picker>
|
|
|
+ <a-range-picker
|
|
|
+ :placeholder="['开始时间', '结束时间']"
|
|
|
+ format="YYYY-MM-DD"
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="preDeliveryDate"
|
|
|
+ @change="deliveryDateChange"
|
|
|
+ />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="8">
|
|
|
+ <!-- <a-col :md="6" :sm="8">
|
|
|
<a-form-item label="账套号">
|
|
|
<a-input placeholder="请输入账套号" v-model="queryParam.accId"></a-input>
|
|
|
</a-form-item>
|
|
|
- </a-col>
|
|
|
+ </a-col> -->
|
|
|
</template>
|
|
|
|
|
|
<!-- 重置 -->
|
|
@@ -234,6 +234,7 @@ export default {
|
|
|
// current: 0,
|
|
|
// pageSize: 0
|
|
|
},
|
|
|
+ preDeliveryDate:[],
|
|
|
// 查询条件
|
|
|
queryParam: {
|
|
|
// pageNo: '',
|
|
@@ -246,13 +247,12 @@ export default {
|
|
|
// dDate: '',
|
|
|
// color: '',
|
|
|
// dPreDateBT: '' // 交期
|
|
|
- accId:'903'
|
|
|
+ // accId:'903'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
-
|
|
|
- this.getproProgressList()
|
|
|
+ // this.getproProgressList()
|
|
|
},
|
|
|
methods: {
|
|
|
// 分页查询 生产进度列表
|
|
@@ -311,12 +311,31 @@ export default {
|
|
|
// 查询
|
|
|
searchQuery() {
|
|
|
this.queryParam.pageNo = ''
|
|
|
- this.getproProgressList()
|
|
|
+ if(this.preDeliveryDate.length==0){
|
|
|
+ this.$message.error('请选择交期!');
|
|
|
+ }else if(this.preDeliveryDate.length ==2){
|
|
|
+ var separator = "-"; //日期分隔符
|
|
|
+ var startDates = this.queryParam.dPreDateB.split(separator);
|
|
|
+ var endDates = this.queryParam.dPreDateE.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天,请重新选择!');
|
|
|
+ }else {
|
|
|
+ this.getproProgressList()
|
|
|
+
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.getproProgressList()
|
|
|
+ }
|
|
|
},
|
|
|
searchReset() {
|
|
|
this.queryParam = {}
|
|
|
- this.queryParam.accId='903'
|
|
|
- this.getproProgressList()
|
|
|
+ // this.queryParam.accId='903'
|
|
|
+ this.preDeliveryDate = []
|
|
|
+ this.proProgressData =[]
|
|
|
+ // this.getproProgressList()
|
|
|
},
|
|
|
|
|
|
// 分页变化时触发
|
|
@@ -329,7 +348,10 @@ export default {
|
|
|
this.queryParam.DDate = dateString
|
|
|
this.queryParam.DPreDateBT = dateString
|
|
|
},
|
|
|
-
|
|
|
+ deliveryDateChange(value, dateString) {
|
|
|
+ this.queryParam.dPreDateB = dateString[0]
|
|
|
+ this.queryParam.dPreDateE = dateString[1]
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|