领料办理-增加默认时间查询2个月内
This commit is contained in:
		
							parent
							
								
									0a831b2842
								
							
						
					
					
						commit
						f6c384e163
					
				| 
						 | 
				
			
			@ -409,6 +409,10 @@ export default {
 | 
			
		|||
    };
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    const end = new Date()
 | 
			
		||||
    let start = new Date()
 | 
			
		||||
    start.setMonth(start.getMonth() - 2)
 | 
			
		||||
    this.queryParams.time = [this.format(start), this.format(end)]
 | 
			
		||||
    // this.getStatusList();
 | 
			
		||||
    this.getList();
 | 
			
		||||
    // this.getTypeList()
 | 
			
		||||
| 
						 | 
				
			
			@ -422,6 +426,12 @@ export default {
 | 
			
		|||
    //         this.modelList = response.data
 | 
			
		||||
    //     })
 | 
			
		||||
    // },
 | 
			
		||||
    format(date) {
 | 
			
		||||
      const y = date.getFullYear()
 | 
			
		||||
      const m = String(date.getMonth() + 1).padStart(2, '0')
 | 
			
		||||
      const day = String(date.getDate()).padStart(2, '0')
 | 
			
		||||
      return `${y}-${m}-${day}`
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    // 多选框选中数据
 | 
			
		||||
    handleSelectionChange(selection) {
 | 
			
		||||
| 
						 | 
				
			
			@ -468,9 +478,12 @@ export default {
 | 
			
		|||
    },
 | 
			
		||||
    /** 重置按钮操作 */
 | 
			
		||||
    resetQuery() {
 | 
			
		||||
      this.queryParams.time = [];
 | 
			
		||||
      this.resetForm("queryForm");
 | 
			
		||||
      this.queryParams.keyWord = "";
 | 
			
		||||
      const end = new Date()
 | 
			
		||||
      let start = new Date()
 | 
			
		||||
      start.setMonth(start.getMonth() - 2)
 | 
			
		||||
      this.queryParams.time = [this.format(start), this.format(end)]
 | 
			
		||||
      this.handleQuery();
 | 
			
		||||
    },
 | 
			
		||||
    /** 新增按钮操作 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue