morphone1995 4 years ago
parent
commit
1b54d94ab5

+ 5 - 0
src/components/AddNewInspect/SlideIpt/index.jsx

@@ -23,13 +23,18 @@ class SlideIpt extends Component {
   handleInput(e,item,sign){
     e.stopPropagation();
     const {setTipValue} = this.props
+
     setTipValue(item,e.target.value,sign)
   }
   handleInputTime(e){
+    // console.log(e.target.value,'e.target.value');
     this.setState({value:e.target.value})
   }
   handleBlur(e,item,sign){
     const {handlePush,setTipValue} = this.props;
+    // console.log(e.target.value, '000000000000000000000000真实输入的时间');
+    // console.log(item, 'item');
+    // console.log(sign, 'sign');
     $('.canEdit').attr('disabled','disabled')
     setTipValue(item,e.target.value,sign)
     handlePush && handlePush({mode:8});       //右侧推送

+ 1 - 0
src/components/PreviewBody/MedicalAdvice/index.jsx

@@ -9,6 +9,7 @@ class MedicalAdvice extends Component {
     const {advice} = this.props
     // console.log(advice,'===========');
     const {labelListBig,labelListSmall,labelListBlood} = advice
+    // console.log(advice, 'advice');
     return ( 
         <tr className={style['patInfoFst']}>
           <td className={style['patInfoSec']}>医嘱:</td>

+ 31 - 22
src/store/reducers/newAdvice.js

@@ -123,46 +123,55 @@ export default (state = initSearchList, action) => {
         return newState;
     }
 
-    if (action.type == SET_TIP_ADVICE) {    
+    if (action.type == SET_TIP_ADVICE) {   
+        console.log(action,'action'); 
         const newState = Object.assign({}, state);
         let tempArr = newState.labelListBig;
         let tempArrs = newState.labelListSmall;
         let tmpArr = newState.labelListBlood;
         let tmpLis = action.item
-        // console.log(action,1111111)
+        console.log(tmpLis,1111111)
         if(tmpLis.flg == 5){//药品
             for(let i= 0;i < tempArr.length;i++){
-                if(action.tip == i){
-                    if(action.sign == 1){//时间
-                        tempArr[i].time = action.value
-                        tempArr[i].dateValue = action.value
-                    }else{
-                        tempArr[i].value = action.value
-                    }
-                }
+                // 2020/9/9 解决医嘱时间修改 历史病历显示错误的bug,
+                // if(action.tip == i){
+                //     if(action.sign == 1){//时间
+                //         tempArr[i].time = action.value
+                //         tempArr[i].dateValue = action.value
+                //     }else{
+                //         tempArr[i].value = action.value
+                //     }
+                // }
+                tempArr[i].time = action.value
+                tempArr[i].dateValue = action.value
             }
             newState.labelListBig = [...tempArr]
         }else if(tmpLis.flg == 6){//手术
             for(let i= 0;i < tempArrs.length;i++){
-                if(action.tip == i){
-                    tempArrs[i].time = action.value
-                    tempArrs[i].dateValue = action.value
-                }
+                // if(action.tip == i){
+                //     tempArrs[i].time = action.value
+                //     tempArrs[i].dateValue = action.value
+                // }
+                tempArrs[i].time = action.value
+                tempArrs[i].dateValue = action.value
             }
             newState.labelListSmall = [...tempArrs]
         }if(tmpLis.flg == 8){//输血
             for(let i= 0;i < tmpArr.length;i++){
-                if(action.tip == i){
-                    if(action.sign == 1){
-                        tmpArr[i].time = action.value
-                        tmpArr[i].dateValue = action.value
-                    }else{
-                        tmpArr[i].value = action.value
-                    }
-                }
+                // if(action.tip == i){
+                //     if(action.sign == 1){
+                //         tmpArr[i].time = action.value
+                //         tmpArr[i].dateValue = action.value
+                //     }else{
+                //         tmpArr[i].value = action.value
+                //     }
+                // }
+                tmpArr[i].time = action.value
+                tmpArr[i].dateValue = action.value
             }
             newState.labelListBlood = [...tmpArr]
         }
+        console.log(newState,'newState');
         return newState;
     }
     if (action.type == SEARCH_TYPE_NEW) {