wyq 3 лет назад
Родитель
Сommit
e77f43f093
2 измененных файлов с 1 добавлено и 43 удалено
  1. 1 15
      src/store/reducers/assistCheck.js
  2. 0 28
      src/store/reducers/inspect.js

+ 1 - 15
src/store/reducers/assistCheck.js

@@ -32,7 +32,7 @@ const initSearchList = {
   },
   totalOrder:[],//开单项
 }
-import { getCurrentDate, getAllString, compareDate} from '@utils/tools';
+import { getCurrentDate, getAllString} from '@utils/tools';
 import { Notify } from '@commonComp';
 export default (state = initSearchList, action) => {
   if (action.type == SET_TIP_VAL) { //改变shijian
@@ -40,24 +40,10 @@ export default (state = initSearchList, action) => {
     let tempArr = newState.assistLabel;
     tempArr = tempArr.filter((item, idx) => {
       if (action.idx == idx) {
-        console.log(1)
         if (action.tip == 1) {
-          if (compareDate(action.val) > compareDate(item.finishDateValue)) {
-            Notify.error("报告时间不能早于开单时间");
-            return item
-          }
-          if (action.val == '') {
-            Notify.error("开单时间不能为空");
-            return item
-          }
           item.time = action.val
           item.dateValue = action.val
         } else {
-          console.log(2)
-          if (compareDate(item.dateValue) > compareDate(action.val)) {
-            Notify.error("报告时间不能早于开单时间");
-            return item
-          }
           item.finishDateValue = action.val
         }
       }

+ 0 - 28
src/store/reducers/inspect.js

@@ -106,21 +106,9 @@ export default (state = initSearchList, action) => {
             tempArr = tempArr.filter((item, idx) => {
                 if (action.sign == idx) {
                     if (action.tip == 1) {
-                        if (compareDate(action.value) > compareDate(item.finishDateValue)) {
-                            Notify.error("报告时间不能早于开单时间");
-                            return item
-                        }
-                        if (action.value == ''){
-                            Notify.error("开单时间不能为空");
-                            return item
-                        }
                         item.time = action.value
                         item.dateValue = action.value
                     } else {
-                        if (compareDate(item.dateValue) > compareDate(action.value)) {
-                            Notify.error("报告时间不能早于开单时间");
-                            return item
-                        }
                         item.finishDateValue = action.value
                     }
                 }
@@ -130,25 +118,9 @@ export default (state = initSearchList, action) => {
             tempArrs = tempArrs.filter((item, idx) => {
                 if (action.sign == idx) {
                     if (action.tip == 1) {//小项改时间
-                        if (compareDate(action.value) > compareDate(item.finishDateValue)) {
-                            Notify.error("报告时间不能早于开单时间");
-                            return item
-                        }
-                        if (action.value == '') {
-                            Notify.error("开单时间不能为空");
-                            return item
-                        }
                         item.time = action.value
                         item.dateValue = action.value
                     } else if (action.tip == 3) {
-                        if (compareDate(item.dateValue) > compareDate(action.value)) {
-                            Notify.error("报告时间不能早于开单时间");
-                            return item
-                        }
-                        if (action.value == '') {
-                            Notify.error("检验细项报告时间不能为空");
-                            return item
-                        }
                         item.finishDateValue = action.value
                     } else {//小项该数值
                         if (isNumber(action.value - 0)) {