ソースを参照

添加剂量下拉

luolei 4 年 前
コミット
a110df8101

+ 9 - 4
src/components/AddNewInspect/SlidePic/index.jsx

@@ -5,6 +5,7 @@ import config from '@config/index';
 import $ from 'jquery';
 import checkOff from '@common/images/check_off.png';
 import checkOn from '@common/images/check_on.png';
+import dowm from '../img/down.png';
 import SlideIpt from '../SlideIpt';
 
 
@@ -96,8 +97,9 @@ class SlidePic extends Component {
     handlePush&&handlePush({mode:8});
   }
   handleSelect(part,idx){
-    const {selectJiType,handleSelectShow} = this.props;
+    const {selectJiType,handleSelectShow,handlePush} = this.props;
     selectJiType(part,idx)
+    handlePush&&handlePush({mode:8});
     handleSelectShow(idx)
   }
   handleSelectShow (idx){
@@ -105,7 +107,7 @@ class SlidePic extends Component {
     handleSelectShow(idx)
   }
   render() {
-    const {item,time,setTipValue,idx,handlePush,staticData} = this.props;
+    const {item,time,setTipValue,idx,handlePush,staticData,activeIdx} = this.props;
     const {selectShow,activeInd,activeName,value,style} = this.state;
     // console.log(item)
     return (
@@ -114,9 +116,12 @@ class SlidePic extends Component {
           <span className={styles.bigname} title={item.name}>{item.name}</span>
           <span className={styles.smallname}>{item.flg == 5?'药品':item.flg == 6?'手术/操作':'输血'}</span>
           <span className={styles.medType}>
-            <a style={{display:item.flg == 5?'block':'none'}} id="selectJiTypeWrap" onClick={()=>this.handleSelectShow(idx)}>{item.selectName||'选择剂型'}</a>
+            <a style={{display:item.flg == 5?'block':'none'}} id="selectJiTypeWrap" onClick={()=>this.handleSelectShow(idx)}>
+              {item.form||'选择剂型'}
+              <img src={dowm} alt=""/>
+            </a>
               {
-                item.flg == 5&&item.selectShow&&item.activeIdx==idx?<ul className={styles.selectLis} id="selectJiType">
+                item.flg == 5&&item.selectShow&&activeIdx==idx?<ul className={styles.selectLis} id="selectJiType">
                   {
                     staticData&&staticData.map((part)=>{
                       return <li onClick={()=>this.handleSelect(part,idx)}>{part.name||'选择剂型'}</li>

+ 13 - 3
src/components/AddNewInspect/SlidePic/index.less

@@ -56,14 +56,24 @@
     }
     .medType {
         width: 94px;
-        border: 1px solid #AAAAAA;
-        border-radius: 4px;
         cursor: pointer;
         margin-right: 30px;
         position: relative;
+        padding: 0;
         a {
+            padding: 0 5px;
+            box-sizing: border-box;
             display: inline-block;
+            border: 1px solid #AAAAAA;
+            border-radius: 4px;
             width: 100%;
+            position: relative;
+            img{
+                position: absolute;
+                right: 8px;
+                top: 9px;
+                width: 8px;
+            }
         }
     }
     .edit {
@@ -89,7 +99,7 @@
     .selectLis {
         position: absolute;
         left: 0;
-        top: 23px;
+        top: 24px;
         width: 100%;
         background-color: #fff;
         box-shadow: 0 10px 20px 0 #989DA3;

BIN
src/components/AddNewInspect/img/down.png


+ 2 - 1
src/components/AddNewInspect/index.jsx

@@ -122,7 +122,7 @@ class AddNewInspect extends React.Component {
       </ul>;
   }
   render() {
-    const {labelListBlood,handleSelectShow,selectJiType,setHighter,staticData,refreshScroller,checkOnOff, getInfomation,setTipValue, handleChangeValue,labelListSmall,inspectList, inspectVal, list, labelListBig, windowHeight, windowWidth,detailClick, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush,handleDelConfirm } = this.props;
+    const {activeIdx,labelListBlood,handleSelectShow,selectJiType,setHighter,staticData,refreshScroller,checkOnOff, getInfomation,setTipValue, handleChangeValue,labelListSmall,inspectList, inspectVal, list, labelListBig, windowHeight, windowWidth,detailClick, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush,handleDelConfirm } = this.props;
     const { tmpId, tmpIdx, time, pageTop, impId } = this.state;
     const contStyle={
       opacity:'0.4',
@@ -141,6 +141,7 @@ class AddNewInspect extends React.Component {
                 return <SlidePic
                   item={item}
                   handleSelectShow={handleSelectShow}
+                  activeIdx={activeIdx}
                   selectJiType={selectJiType}
                   checkOnOff={checkOnOff}
                   staticData={staticData}

+ 2 - 1
src/components/NewAdvice/index.jsx

@@ -52,7 +52,7 @@ class NewAdvice extends React.Component {
 
   }
   render() {
-    const {hideAllDrop,staticData,selectJiType,handleSelectShow,setHighter,labelListBig, fetchPushInfos,getInfomation,labelListSmall, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList,detailClick,handleDelConfirm,checkOnOff ,labelListBlood} = this.props;
+    const {hideAllDrop,staticData,activeIdx,selectJiType,handleSelectShow,setHighter,labelListBig, fetchPushInfos,getInfomation,labelListSmall, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList,detailClick,handleDelConfirm,checkOnOff ,labelListBlood} = this.props;
 
     return (
       <div className={styles.wrapper}>
@@ -70,6 +70,7 @@ class NewAdvice extends React.Component {
         >
           <div style={{ padding: '0px 10px 10px 10px', boxSizing: 'border-box',color:'#000' }} >
             <AddNewInspect
+              activeIdx={activeIdx}
               handleSelectShow={handleSelectShow}
               selectJiType={selectJiType}
               checkOnOff={checkOnOff}

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

@@ -22,6 +22,7 @@ class MedicalAdvice extends Component {
                     <td className={style.adviceTableTdFst}>{item.name}</td>
                     
                     <td className={style.assistTableTdTrd}>药品</td>
+                    <td className={style.assistTableTdSec}>{item.form}</td>
                     <td className={style.assistTableTdSec}>{item.value}</td>
                     <td className={style.assistTableTdFor}>{item.time}</td>
                   </tr>

+ 1 - 0
src/containers/NewAdvice.js

@@ -38,6 +38,7 @@ function mapStateToProps(state) {//console.log(state)
     labelList: state.newAdvice.labelList,
     fillActive: state.newAdvice.fillActive,
     shType: state.newAdvice.shType,
+    activeIdx: state.newAdvice.activeIdx,
     getExcelDataList: state.newAdvice.getExcelDataList,
     labelListActive: state.newAdvice.labelListActive,
     inspectList: state.homePage.inspectList,

+ 6 - 8
src/store/reducers/newAdvice.js

@@ -43,7 +43,8 @@ const initSearchList = {
     labelListBlood:[],//输血
     drugOrder:[],//开单项
     operationOrder:[],//开单项
-    transfusionOrder:[]
+    transfusionOrder:[],
+    activeIdx:''
 }
 
 export default (state = initSearchList, action) => {
@@ -54,12 +55,7 @@ export default (state = initSearchList, action) => {
             if(action.idx == i){
                 let flg = tempArr[i].selectShow;
                 tempArr[i].selectShow = action.sign==1?true:action.sign==0?false:!flg
-                tempArr[i].activeIdx = action.idx 
-                // if(action.sign==1||!flg){
-
-                // }else{
-
-                // }
+                newState.activeIdx = action.idx 
             }
         }
         newState.labelListBig = [...tempArr]
@@ -71,11 +67,13 @@ export default (state = initSearchList, action) => {
         for(let i = 0;i < tempArr.length;i++){
             if(action.idx == i){
                 tempArr[i].selectShow = false
-                tempArr[i].selectName = action.part.name
+                tempArr[i].form = action.part.name
                 tempArr[i].selectVal = action.part.val
             }
         }
         newState.labelListBig = [...tempArr]
+
+        
         return newState;
     }
     if (action.type == CHECK_OFF_ON_NEW) {