Przeglądaj źródła

修复新增检测计划时间查询添加已过期选项

Liuqi 6 lat temu
rodzic
commit
96272f6b82

+ 4 - 1
src/dashoo.cn/backend/api/controllers/lims/limscheckequipmentlist.go

@@ -141,7 +141,10 @@ func (this *LimsCheckEquipmentListController) GetEntityList() {
 	}
 
 	if QueryCheckDate != "" {
-		where = where + " and  date_add(LastCheckDate, interval " + QueryCheckDate + " month) >= now()"
+		if QueryCheckDate == "500" {
+			where = where + " and  now() > NextCheckDate"
+		}else {
+		where = where + " and  date_add(now(), interval " + QueryCheckDate + " month) >= NextCheckDate AND NextCheckDate > now()"}
 	}
 
 	if statusValue != "" {

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/lims/taskplan/_opera/operation.vue

@@ -173,6 +173,7 @@
         <el-form>
           <el-form-item label="到期时间查询:" :label-width="formLabelWidth">
             <el-select v-model="QueryCheckDate" placeholder="请选择到期时间" style="width: 350px" clearable  @change="SampleTypeChangeHandler">
+              <el-option label="已过期" value="500"></el-option>
               <el-option label="近1个月" value="1"></el-option>
               <el-option label="近2个月" value="2"></el-option>
               <el-option label="近3个月" value="3"></el-option>