|
@@ -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)) {
|