Jelajahi Sumber

Merge branch 'addTime0817' into testNew

# Conflicts:
#	src/components/AddInspect/SlidePic/index.jsx
wyq 3 tahun lalu
induk
melakukan
6ff7cf7ba6

TEMPAT SAMPAH
src/common/images/billing_time.png


TEMPAT SAMPAH
src/common/images/report_time.png


+ 148 - 124
src/components/AddAssistCheck/index.jsx

@@ -1,13 +1,14 @@
 import React from 'react';
-import { SearchOption, Calendar, ConfirmModal, Notify, Add ,DelToast} from '@commonComp';
+import { SearchOption, Calendar, ConfirmModal, Notify, Add, DelToast } from '@commonComp';
 import styles from './index.less';
 import config from '@config/index';
 import $ from 'jquery';
 import Textarea from './Textarea';
 import AssistName from './AssistName';
-import { getPageCoordinate,getCurrentDate,setPosition, setFontColorSize } from '@utils/tools';
+import { getPageCoordinate, getCurrentDate, setPosition, setFontColorSize } from '@utils/tools';
 import ScrollArea from 'react-scrollbar';
-
+import report from '@common/images/report_time.png';
+import billing from '@common/images/billing_time.png';
 class AddAssistCheck extends React.Component {
   constructor(props) {
     super(props);
@@ -17,10 +18,10 @@ class AddAssistCheck extends React.Component {
       dateTime: "",
       active: '',
       visible: false,
-      pageTop:'',
+      pageTop: '',
       id: null,
       stimer: null,
-      activeName:''
+      activeName: ''
     }
     this.handleShowDate = this.handleShowDate.bind(this)
     this.getSearchList = this.getSearchList.bind(this)
@@ -30,7 +31,7 @@ class AddAssistCheck extends React.Component {
     this.handleCancel = this.handleCancel.bind(this)
     this.timeSure = this.timeSure.bind(this)
   }
-  
+
   componentDidMount() {
     $(document).click((event) => {
       let _con = $('#searchWrapAssist');   // 设置目标区域
@@ -39,61 +40,61 @@ class AddAssistCheck extends React.Component {
       let _del = document.getElementById("delBox");   // 删除弹窗
       let _close = document.getElementById("assiClose");   // 删除icon
       let _closeTil = $('#delTit')[0];   // 弹窗标题
-      if(!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭)
-          if ($(event.target).attr('id')=='searchWrapAssist'||_con && _con != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
-            if (this.state.show) {
-              this.props.setHighter(48)
-            }
-            this.setState({show: false});
-          }
-          if (!_cons.is(event.target)&&!_conClick && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
-            this.setState({date: false});
+      if (!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭)
+        if ($(event.target).attr('id') == 'searchWrapAssist' || _con && _con != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
+          if (this.state.show) {
+            this.props.setHighter(48)
           }
-          if($(event.target).attr("contenteditable")||event.target.textContent == '报告描述或意见'){
-            this.setState({date: false});
-          }
-          
-        if(_del){
-          if($(event.target).attr('id') != 'assiClose' &&!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
+          this.setState({ show: false });
+        }
+        if (!_cons.is(event.target) && !_conClick && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
+          this.setState({ date: false });
+        }
+        if ($(event.target).attr("contenteditable") || event.target.textContent == '报告描述或意见') {
+          this.setState({ date: false });
+        }
+
+        if (_del) {
+          if ($(event.target).attr('id') != 'assiClose' && !event.target.isEqualNode(_close) && !event.target.isEqualNode(_del) && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)) {
             this.setState({
               visible: false,
               id: null,
-              activeName:''
+              activeName: ''
             })
           }
         }
       }
     });
     const that = this;
-    document.addEventListener('mousedown',function(e){
+    document.addEventListener('mousedown', function (e) {
       //onMousedown的目标为滚动条时,标签填写单不关闭
-      if(e.target.className=='scrollbar'){
+      if (e.target.className == 'scrollbar') {
         that.isBar = true;
-      }else{
+      } else {
         that.isBar = false;
       }
     });
     getCurrentDate(1);
   }
 
-  handleDelClick(id,item) {
+  handleDelClick(id, item) {
     this.setState({
       visible: true,
       id: id,
-      activeName:item.name
+      activeName: item.name
     })
   }
 
   delConfirm(type) {
     const { handleDelAssist, handlePush } = this.props;
-    const { id,activeName } = this.state;
-    $(".TextareaRsize").css({marginTop:0});
-    handleDelAssist && handleDelAssist(id,activeName,type);
-    handlePush && handlePush({mode:9});           //右侧推送
+    const { id, activeName } = this.state;
+    $(".TextareaRsize").css({ marginTop: 0 });
+    handleDelAssist && handleDelAssist(id, activeName, type);
+    handlePush && handlePush({ mode: 9 });           //右侧推送
     this.setState({
       visible: false,
       id: null,
-      activeName:''
+      activeName: ''
     })
     Notify.success("删除成功");
   }
@@ -102,20 +103,20 @@ class AddAssistCheck extends React.Component {
     this.setState({
       visible: false,
       id: null,
-      activeName:''
+      activeName: ''
     })
   }
 
   handleSearchShow(e) {
     const { handlePush } = this.props;
     let tmpShow = this.state.show;
-    this.setState({ show: !tmpShow,pageTop:getPageCoordinate(e).boxTop })
+    this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
     // e.stopPropagation(); 
-    if(tmpShow){
+    if (tmpShow) {
       this.props.setHighter(48)
-    }else{
-      setPosition(e,"#searchOption",this.props.setHighter)
-      handlePush && handlePush({mode:9});           //右侧推送
+    } else {
+      setPosition(e, "#searchOption", this.props.setHighter)
+      handlePush && handlePush({ mode: 9 });           //右侧推送
     }
   }
   handleShowDate(idx) {
@@ -124,22 +125,23 @@ class AddAssistCheck extends React.Component {
       active: idx
     })
   }
-  handleSign(item,idx){
-    const { handleSign,handlePush } = this.props;
-    handleSign(item,idx)
-    handlePush && handlePush({mode:8});       //右侧推送
+  handleSign(item, idx) {
+    const { handleSign, handlePush } = this.props;
+    handleSign(item, idx)
+    handlePush && handlePush({ mode: 8 });       //右侧推送
   }
 
   getSearchList(list) {      //搜索列表
-    const contStyle={
-      opacity:'0.4',
-      right:'0',
-      top:'1px',
-      zIndex:'15',
-      width:'14px',
-      background:'#f1f1f1'};
-    const barStyle={background:'#777',width:'100%'};
-    return <ul className={`${styles.searchLiUl} ${styles.assistListUl}`} style={{height:'205px',width:'412px',overflow:'auto'}}>
+    const contStyle = {
+      opacity: '0.4',
+      right: '0',
+      top: '1px',
+      zIndex: '15',
+      width: '14px',
+      background: '#f1f1f1'
+    };
+    const barStyle = { background: '#777', width: '100%' };
+    return <ul className={`${styles.searchLiUl} ${styles.assistListUl}`} style={{ height: '205px', width: '412px', overflow: 'auto' }}>
       {
         list && list.map((item, idx) => {
           return <li key={item.id}
@@ -147,7 +149,7 @@ class AddAssistCheck extends React.Component {
             title={item.name}
             onClick={() => {
               this.props.setHighter(96)
-              this.handleSign(item,'search');
+              this.handleSign(item, 'search');
               this.setState({ show: false })
             }}
           >
@@ -155,10 +157,10 @@ class AddAssistCheck extends React.Component {
           </li>
         })
       }
-      </ul>;
+    </ul>;
   }
   getCommonList() {      //常用列表
-    const { handleSign,assistList } = this.props;
+    const { handleSign, assistList } = this.props;
     return <ul className={styles.searchLiUl}>
       {
         assistList && assistList.map((item, idx) => {
@@ -167,7 +169,7 @@ class AddAssistCheck extends React.Component {
             title={item.name}
             onClick={() => {
               this.props.setHighter(48)
-              this.handleSign(item.conceptId, idx,'common');
+              this.handleSign(item.conceptId, idx, 'common');
               this.setState({ show: false })
             }}
           >
@@ -177,67 +179,68 @@ class AddAssistCheck extends React.Component {
       }
     </ul>
   }
-  handleChangeDate(){}
-  timeSure(date,idx){
-    this.props.handleChangeDate(date,idx)
+  handleChangeDate() { }
+  timeSure(date, idx) {
+    this.props.handleChangeDate(date, idx)
     this.setState({ date: false })
   }
-  setEdit(e){
+  setEdit(e) {
     // $('.canEdit').blur().attr('disabled','disabled')
     $(e.target).removeAttr('disabled').focus()
   }
-  handleBlur(){
+  handleBlur() {
     // const {handlePush} = this.props;
-    $('.canEdit').attr('disabled','disabled')
+    $('.canEdit').attr('disabled', 'disabled')
     // handlePush && handlePush({mode:8});       //右侧推送
   }
-  handleInput(e,item,idx){
-    const {setTipValue,handlePush} = this.props
-    setTipValue(item,e.target.value,idx)
+  handleInput(e, item, idx, tip) {
+    const { setTipValue, handlePush } = this.props
+    setTipValue(item, e.target.value, idx, tip)
     //右侧推送--延时推送
     const stimer = this.state.timer;
     clearTimeout(stimer);
-    let timer = setTimeout(function(){
-      handlePush&&handlePush({mode:9});
+    let timer = setTimeout(function () {
+      handlePush && handlePush({ mode: 9 });
       clearTimeout(stimer);
-    },config.delayPushTime);
-    this.setState({timer})
+    }, config.delayPushTime);
+    this.setState({ timer })
   }
-  handleFocus(){
-    const {handlePush} = this.props;
-    handlePush&&handlePush({mode:9});
+  handleFocus() {
+    const { handlePush } = this.props;
+    handlePush && handlePush({ mode: 9 });
   }
   getAssistLabel() {
-    const { assistLabel,checkedListImport, handleChangeAssistValue,checkOnOff, handleChangeDate, isRead, handlePush, winWidth,getInfomation,assistList } = this.props;
-    const { visible,activeName,id,date } = this.state;
+    const { assistLabel, checkedListImport, handleChangeAssistValue, checkOnOff, handleChangeDate, isRead, handlePush, winWidth, getInfomation, assistList } = this.props;
+    const { visible, activeName, id, date } = this.state;
     //出现滚动条时阻止滚动冒泡,未出现时不阻止,否则外部滚动条滚不动
-    const showedBar = $("#datePick .scrollbar-container").length===1;
-    const contStyle={
-      opacity:'0.4',
-      right:'0',
-      top:'1px',
-      zIndex:'1',
-      width:'8px',
-      background:'#f1f1f1'};
-    const barStyle={background:'#777',width:'100%'};
+    const showedBar = $("#datePick .scrollbar-container").length === 1;
+    const contStyle = {
+      opacity: '0.4',
+      right: '0',
+      top: '1px',
+      zIndex: '1',
+      width: '8px',
+      background: '#f1f1f1'
+    };
+    const barStyle = { background: '#777', width: '100%' };
     return <React.Fragment>
       <ul className={styles.labelWrap} id="datePick">
         {
           assistLabel.map((item, idx) => {
             let staticTime = {}
-            if(item.time){
+            if (item.time) {
               let tmp1 = (item.time).split(' ')[0].split('-')
-              let tmp2 = (item.time).split(' ').length>1&&(item.time).split(' ')[1].split(':')
+              let tmp2 = (item.time).split(' ').length > 1 && (item.time).split(' ')[1].split(':')
               staticTime = {
-                year: tmp1[0]-0,
-                month: tmp1[1]-0,
-                day: tmp1[2]-0,
+                year: tmp1[0] - 0,
+                month: tmp1[1] - 0,
+                day: tmp1[2] - 0,
                 hour: tmp2[0],
                 minute: tmp2[1],
                 second: tmp2[2]
               }
             }
-            return (item.disabled?null:<li className={`${styles.assistLists} ${styles.clearfix}`}>
+            return (item.disabled ? null : <li className={`${styles.assistLists} ${styles.clearfix}`}>
               {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':(winWidth-987)+'px' }}> */}
               {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':'auto' }}>
                 <span className={styles.tagSpan}>
@@ -246,43 +249,63 @@ class AddAssistCheck extends React.Component {
                 </span>
               </span> */}
               <AssistName item={item} idx={idx} checkOnOff={checkOnOff} name={item.name} winWidth={winWidth} handlePush={handlePush} getInfomation={getInfomation}></AssistName>
-              <div className={`${styles.textareaWrap} ${setFontColorSize(2,1)}`}>
+              <div className={`${styles.textareaWrap} ${setFontColorSize(2, 1)}`}>
                 <ScrollArea speed={0.8}
-                            horizontal={false}
-                            stopScrollPropagation={showedBar?true:false}
-                            style={{maxHeight:'100px'}}
-                            className={styles["area"]}
-                            verticalContainerStyle={contStyle}
-                            verticalScrollbarStyle={barStyle}
-                            contentClassName="content TextareaRsize">
-                <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
+                  horizontal={false}
+                  stopScrollPropagation={showedBar ? true : false}
+                  style={{ maxHeight: '100px' }}
+                  className={styles["area"]}
+                  verticalContainerStyle={contStyle}
+                  verticalScrollbarStyle={barStyle}
+                  contentClassName="content TextareaRsize">
+                  <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
                 </ScrollArea>
               </div>
-              <div className={`${styles.pointerFinger} ${setFontColorSize(2,2)}`}>
+              <div className={`${styles.pointerFinger} ${setFontColorSize(2, 2)}`}>
                 {/* <p>报告日期: */}
                 <p>
-                  <span>
-                  <input type="text" 
+                  <span className={styles.time}>
+                    <img className={styles.imgCheck} src={billing} title={'开单时间'} />
+                    <input type="text"
                       class="canEdit"
                       // onDoubleClick={(e)=>this.setEdit(e)}
                       style={'#333'}
                       placeholder='时间'
                       autoComplete="off"
                       value={item.time}
-                      onFocus={()=>{this.handleFocus()}}
-                      onInput={(e)=>{this.handleInput(e,item,idx)}}
-                      // onBlur={()=>{this.handleBlur()}}
-                      />
-                </span>
+                      onFocus={() => { this.handleFocus() }}
+                      onInput={(e) => { this.handleInput(e, item, idx, 1, 1) }}
+                    // onBlur={()=>{this.handleBlur()}}
+                    />
+                  </span>
+                  {
+                    item.check ? (
+                      null
+                    ) : <span >
+                        <img className={styles.imgCheck} src={report} title={'报告时间'} />
+                        <input type="text"
+                          class="canEdit"
+                          // onDoubleClick={(e)=>this.setEdit(e)}
+                          style={'#333'}
+                          placeholder='时间'
+                          autoComplete="off"
+                          value={item.finishDateValue}
+                          onFocus={() => { this.handleFocus() }}
+                          onInput={(e) => { this.handleInput(e, item, idx, 3, 1) }}
+                        // onBlur={()=>{this.handleBlur()}}
+                        />
+                      </span>
+                  }
+                  
                 </p>
-                <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx,item) }}></span>
+                <span className={styles.closeIcon} id="assiClose" onClick={() => { this.handleDelClick(idx, item) }}></span>
               </div>
-              <DelToast show={idx==id&&item.name==activeName?visible:false}
-                  name={activeName}
-                  right={'-40px'}
-                  top={'50px'}
-                  cancel={this.handleCancel}
-                  confirm={()=>this.delConfirm(1)}/>
+              <DelToast show={idx == id && item.name == activeName ? visible : false}
+                name={activeName}
+                right={'-40px'}
+                top={'50px'}
+                cancel={this.handleCancel}
+                confirm={() => this.delConfirm(1)} />
               {/* {
                 id == null?null:<DelToast show={idx==id&&item.name==activeName?visible:false}
                   name={activeName}
@@ -296,23 +319,24 @@ class AddAssistCheck extends React.Component {
     </React.Fragment>
   }
   render() {
-    const { handleChangeValue, list,assistVal,windowHeight,assistList, refreshScroller } = this.props;
-    const { visible,pageTop } = this.state;
-    const contStyle={
-      opacity:'0.4',
-      right:'0',
-      top:'1px',
-      zIndex:'15',
-      width:'14px',
-      background:'#f1f1f1'};
-    const barStyle={background:'#777',width:'100%'};
+    const { handleChangeValue, list, assistVal, windowHeight, assistList, refreshScroller } = this.props;
+    const { visible, pageTop } = this.state;
+    const contStyle = {
+      opacity: '0.4',
+      right: '0',
+      top: '1px',
+      zIndex: '15',
+      width: '14px',
+      background: '#f1f1f1'
+    };
+    const barStyle = { background: '#777', width: '100%' };
     return (
       <div className={styles.wrapper}>
         {this.getAssistLabel()}
         <div id="searchWrapAssist" style={{ position: "relative", clear: 'both' }}>
           <Add showText="添加检查项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck" />
-          {this.state.show ? <SearchOption windowHeight={windowHeight} refreshScroller={refreshScroller } searchTop={40}  pageTop={pageTop} height={280} handleChangeValue={handleChangeValue} visible={true}>
-            {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'42px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
+          {this.state.show ? <SearchOption windowHeight={windowHeight} refreshScroller={refreshScroller} searchTop={40} pageTop={pageTop} height={280} handleChangeValue={handleChangeValue} visible={true}>
+            {list && list.length > 0 ? this.getSearchList(list) : (assistVal == '' ? '' : <p style={{ padding: '42px 30px', color: '#bfbfbf' }}>暂无筛选项</p>)}
             {/* {
               (list && list.length>0) || (assistVal != '') || (assistList&&assistList.length==0)?'':<div>
                 <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用检查项</p>

+ 6 - 2
src/components/AddAssistCheck/index.less

@@ -61,7 +61,7 @@
     color: #000;
     .pointerFinger {
        border-bottom: 1px dashed #333;
-      width: 260px;
+      width: 370px;
       position: absolute;
       right: 0;
       bottom: 10px;
@@ -69,6 +69,10 @@
         font-size: unset;
         span {
           font-size: unset;
+
+        }
+        .time{
+          margin-right: 10px;
         }
       }
       i {
@@ -105,7 +109,7 @@
 
     .textareaWrap {
       margin-top: 8px;
-      padding-right: 245px;
+      padding-right: 365px;
       width: 100%;
     }
   }

+ 155 - 118
src/components/AddInspect/SlidePic/index.jsx

@@ -1,11 +1,13 @@
 import React, { Component } from "react";
 import styles from "./index.less";
-import { normalVal,getArrow,getDomUpDown,getPageCoordinate,setPosition,setFontColorSize } from '@utils/tools';
-import { InspectCommon, Notify,DelToast} from '@commonComp';
+import { normalVal, getArrow, getDomUpDown, getPageCoordinate, setPosition, setFontColorSize } from '@utils/tools';
+import { InspectCommon, Notify, DelToast } from '@commonComp';
 import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
 import checkOff from '@common/images/check_off.png';
 import checkOn from '@common/images/check_on.png';
+import report from '@common/images/report_time.png';
+import billing from '@common/images/billing_time.png';
 import $ from 'jquery';
 import ScrollArea from 'react-scrollbar';
 import InspectName from '../InspectName';
@@ -19,11 +21,11 @@ class SlideSelect extends Component {
   constructor(props) {
     super(props);
     this.state = {
-      show:false,
-      activeInd:false,
-      activeName:'',
-      canEdit:true,
-      style:'',
+      show: false,
+      activeInd: false,
+      activeName: '',
+      canEdit: true,
+      style: '',
       timer: null,
     };
     this.handleSlide = this.handleSlide.bind(this);
@@ -39,81 +41,81 @@ class SlideSelect extends Component {
   handleChangeDate(date) {
     // console.log(date,'外')
   }
-  
+
   componentDidMount() {
-    const {item} = this.props;
+    const { item } = this.props;
     $(document).click((event) => {
-      if($(event.target).attr("id")!='addClose'&&$(event.target).attr("id")!='delTit'){
+      if ($(event.target).attr("id") != 'addClose' && $(event.target).attr("id") != 'delTit') {
         this.setState({
-          activeInd:false
+          activeInd: false
         })
       }
     });
-    let type = getArrow(item.minValue,item.maxValue,item.value||null)
-    this.setState({style:type,value:item.value,time:item.time})
+    let type = getArrow(item.minValue, item.maxValue, item.value || null)
+    this.setState({ style: type, value: item.value, time: item.time })
     const that = this;
-    document.addEventListener('mousedown',function(e){
+    document.addEventListener('mousedown', function (e) {
       //onMousedown的目标为滚动条时,标签填写单不关闭
-      if(e.target.className=='scrollbar'){
+      if (e.target.className == 'scrollbar') {
         that.isBar = true;
-      }else{
+      } else {
         that.isBar = false;
       }
     });
     // this.setState({ dateTime: getCurrentDate(1) })
   }
-  handleSlide(){
+  handleSlide() {
     let tmpShow = this.state.show
     this.setState({
-      show:!tmpShow
+      show: !tmpShow
     })
   }
-  handleDel(part,idx){
-    const {handleDelClick,item} = this.props;console.log(item)
+  handleDel(part, idx) {
+    const { handleDelClick, item } = this.props;
     this.setState({
-      activeInd:true,
-      activeName:item.detailName||item.name,
+      activeInd: true,
+      activeName: item.detailName,
     })
-    handleDelClick&&handleDelClick(1,part,idx);
+    handleDelClick && handleDelClick(1, part, idx);
   }
-  handleCancel(){
+  handleCancel() {
     this.setState({
-      activeInd:false,
-      activeName:''
+      activeInd: false,
+      activeName: ''
     })
   }
-  delConfirm(item,idx){
-    const {handleDelConfirm,handlePush} = this.props;
-    handleDelConfirm&&handleDelConfirm(item,idx);
+  delConfirm(item, idx) {
+    const { handleDelConfirm, handlePush } = this.props;
+    handleDelConfirm && handleDelConfirm(item, idx);
     Notify.success("删除成功");
-    handlePush && handlePush({mode:8});       //右侧推送
+    handlePush && handlePush({ mode: 8 });       //右侧推送
     this.setState({
-      activeInd:false,
-      activeName:''
+      activeInd: false,
+      activeName: ''
     })
   }
-  timeSure(date){
-    const {handleChangeDate} = this.props;
-    handleChangeDate&&handleChangeDate(date)
+  timeSure(date) {
+    const { handleChangeDate } = this.props;
+    handleChangeDate && handleChangeDate(date)
   }
-  handleLabelSub(e,questionId,idx){
-    const {handleLabelSub,handleFillShow,setHighter,refreshScroller} = this.props;
-    handleLabelSub(e,questionId,idx);
-    handleFillShow(e,idx);
+  handleLabelSub(e, questionId, idx) {
+    const { handleLabelSub, handleFillShow, setHighter, refreshScroller } = this.props;
+    handleLabelSub(e, questionId, idx);
+    handleFillShow(e, idx);
     //弹窗高度超出屏幕,增加页面高度
-    setPosition(e,"#inspectFill",setHighter);
+    setPosition(e, "#inspectFill", setHighter);
     /*setTimeout(function(){//如果检验下面有很多数据,则会跳过头
       refreshScroller()&&refreshScroller().scrollYTo(290);
     })*/
   }
-  handleInput(e,item,sign,tip){
+  handleInput(e, item, sign, tip) {
     const tempTimer = this.state.timer
-    const {setTipValue} = this.props
-    setTipValue(item,e.target.value,sign,tip)
-    if(tip == 2){
-      let type = getArrow(item.minValue,item.maxValue,e.target.value||null)
+    const { setTipValue } = this.props
+    setTipValue(item, e.target.value, sign, tip)
+    if (tip == 2) {
+      let type = getArrow(item.minValue, item.maxValue, e.target.value || null)
       this.setState({
-        style:type
+        style: type
       })
     }
 
@@ -128,23 +130,23 @@ class SlideSelect extends Component {
     }, config.delayPushTime);
     this.setState({
       timer
-    })     
+    })
   }
-  handleBlur(){
-    const {handlePush} = this.props;
-    $('.canEdit').attr('disabled','disabled')
-    handlePush && handlePush({mode:8});       //右侧推送
+  handleBlur() {
+    const { handlePush } = this.props;
+    $('.canEdit').attr('disabled', 'disabled')
+    handlePush && handlePush({ mode: 8 });       //右侧推送
   }
-  handleFocus(){
-    const {handlePush} = this.props;
-    handlePush && handlePush({mode:8});       //右侧推送
+  handleFocus() {
+    const { handlePush } = this.props;
+    handlePush && handlePush({ mode: 8 });       //右侧推送
   }
-  checkOnOff(item,idx){
-    const {checkOnOff,handlePush} = this.props
-    checkOnOff(item,idx)
-    handlePush && handlePush({mode:8});       //右侧推送
+  checkOnOff(item, idx) {
+    const { checkOnOff, handlePush } = this.props
+    checkOnOff(item, idx)
+    handlePush && handlePush({ mode: 8 });       //右侧推送
   }
-  setEdit(e){
+  setEdit(e) {
     // store.dispatch(embedPush({
     //   action: "lis",
     //   mode: 1
@@ -158,80 +160,115 @@ class SlideSelect extends Component {
     }))
   }
   render() {
-    const {item,idx,activeIdx,activeSign} = this.props;
-    const {canEdit,activeInd,activeName,value,style} = this.state;
+    const { item, idx, activeIdx, activeSign } = this.props;
+    const { canEdit, activeInd, activeName, value, style } = this.state;
     return (
-      item.flg == 1?<li key={item.detailName+idx} className={`${styles.slideLi} clearfix`}> 
-          <table>
-            <tr>
-              <img className={styles.imgCheck} src={item.check?checkOn:checkOff} onClick={()=>this.checkOnOff(item,idx)} alt=""/>
-              <span className={styles.bigname}>{item.name}</span>
-              <span className={styles.smallname}></span>
-              <span className={styles.edit}></span>
-              <span className={styles.maxmin}></span>
-              {/* <span className={styles.pass}>检验时间: */}
-              <span className={styles.pass}>
-                <input type="text" 
-                    class="canEdit" 
+      item.flg == 1 ? <li key={item.detailName + idx} className={`${styles.slideLi} clearfix`}>
+        <table>
+          <tr>
+            <img className={styles.imgCheck} src={item.check ? checkOn : checkOff} onClick={() => this.checkOnOff(item, idx)} alt="" />
+            <span className={styles.bigname}>{item.name}</span>
+            <span className={styles.smallname}></span>
+            <span className={styles.edit}></span>
+            <span className={styles.maxmin}></span>
+            {/* <span className={styles.pass}>检验时间: */}
+            <span className={styles.pass}>
+              <img className={styles.imgCheck} src={billing} title={'开单时间'}/>
+              <input type="text"
+                class="canEdit"
+                // onDoubleClick={(e)=>this.setEdit(e)}
+                style={{ color: '#333' }}
+                placeholder='时间'
+                autoComplete="off"
+                value={item.time}
+                onInput={(e) => { this.handleInput(e, item, idx, 1) }}
+                onFocus={() => { this.handleFocus() }}
+              // onBlur={()=>{this.handleBlur()}}
+              />
+            </span>
+            {
+              item.check ? (
+                null
+              ) : <span className={styles.pass}>
+                  <img className={styles.imgCheck} src={report} title={'报告时间'}/>
+                  <input type="text"
+                    class="canEdit"
                     // onDoubleClick={(e)=>this.setEdit(e)}
-                    style={{color:'#333'}}
+                    style={{ color: '#333' }}
                     placeholder='时间'
                     autoComplete="off"
-                    value={item.time}
-                    onInput={(e)=>{this.handleInput(e,item,idx)}}
-                    onFocus={()=>{this.handleFocus()}}
-                    // onBlur={()=>{this.handleBlur()}}
-                    />
-              </span>
-              <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item,idx)}}></span>
-            </tr>
-          </table>
-          <DelToast show={activeSign==item.flg&&activeIdx==idx&&activeInd?true:false}
-                    name={activeName} 
-                    right={'-34px'}
-                    top={'30px'}
-                    cancel={this.handleCancel}
-                    confirm={()=>{this.delConfirm(item,idx)}}/>
-      </li>:<li key={item.detailName+idx} className={`${styles.slideLi} clearfix`}> 
-          <span style={{width:'22px'}}></span>
+                    value={item.finishDateValue}
+                    onInput={(e) => { this.handleInput(e, item, idx, 3) }}
+                    onFocus={() => { this.handleFocus() }}
+                  // onBlur={()=>{this.handleBlur()}}
+                  />
+                </span>
+            }
+            <span id="addClose" className={styles.partDel} onClick={() => { this.handleDel(item, idx) }}></span>
+          </tr>
+        </table>
+        <DelToast show={activeSign == item.flg && activeIdx == idx && activeInd ? true : false}
+          name={activeName}
+          right={'-34px'}
+          top={'30px'}
+          cancel={this.handleCancel}
+          confirm={() => { this.delConfirm(item, idx) }} />
+      </li> : <li key={item.detailName + idx} className={`${styles.slideLi} clearfix`}>
+          <span style={{ width: '22px' }}></span>
           <span className={styles.bigname}>{item.name}</span>
           <span className={styles.smallname}>{item.detailName}</span>
           <span className={styles.edit}>
-            <input type="text" 
+            <input type="text"
               class="canEdit"
               // onDoubleClick={(e)=>this.setEdit(e)}
-              style={{ color: style == 2 || style == 4 ? 'red' : style == 1 ? '#D949FF' : '#333', backgroundColor: item.value && item.value.length>0 ? '#eeeeee' : ''}}
+              style={{ color: style == 2 || style == 4 ? 'red' : style == 1 ? '#D949FF' : '#333', backgroundColor: item.value && item.value.length > 0 ? '#eeeeee' : '' }}
               placeholder='(填写)'
               autoComplete="off"
-              value={item.value||item.otherValue}
-              onInput={(e)=>{this.handleInput(e,item,idx,2)}}
+              value={item.value || item.otherValue}
+              onInput={(e) => { this.handleInput(e, item, idx, 2) }}
               // onBlur={()=>{this.handleBlur()}}
-              onFocus={()=>{this.handleFocus()}}
-              /><img style={{display:style==1||style==2?'inline-block':'none'}} src={style==1?down:style==2?up:''} />{item.units}
+              onFocus={() => { this.handleFocus() }}
+            /><img style={{ display: style == 1 || style == 2 ? 'inline-block' : 'none' }} src={style == 1 ? down : style == 2 ? up : ''} />{item.units}
           </span>
-          <span className={styles.maxmin}>{normalVal(item.minValue,item.maxValue)}</span>
+          <span className={styles.maxmin}>{normalVal(item.minValue, item.maxValue)}</span>
           <span className={styles.pass}>
-          {/* <span className={styles.pass}>检验时间: */}
-            <input type="text" 
-                class="canEdit" 
-                // onDoubleClick={(e)=>this.setEdit(e)}
-                style={{color:'#333'}}
-                placeholder='时间'
-                autoComplete="off"
-                value={item.time}
-                onInput={(e)=>{this.handleInput(e,item,idx,1)}}
-                // onBlur={()=>{this.handleBlur()}}
-                onFocus={()=>{this.handleFocus()}}
-                />
+            <img className={styles.imgCheck} src={billing} title={'开单时间'}/>
+            {/* <span className={styles.pass}>检验时间: */}
+            <input type="text"
+              class="canEdit"
+              // onDoubleClick={(e)=>this.setEdit(e)}
+              style={{ color: '#333' }}
+              placeholder='时间'
+              autoComplete="off"
+              value={item.time}
+              onInput={(e) => { this.handleInput(e, item, idx, 1) }}
+              // onBlur={()=>{this.handleBlur()}}
+              onFocus={() => { this.handleFocus() }}
+            />
+          </span>
+          <span className={styles.pass}>
+            <img className={styles.imgCheck} src={report} title={'报告时间'}/>
+            {/* <span className={styles.pass}>检验时间: */}
+            <input type="text"
+              class="canEdit"
+              // onDoubleClick={(e)=>this.setEdit(e)}
+              style={{ color: '#333' }}
+              placeholder='时间'
+              autoComplete="off"
+              value={item.finishDateValue}
+              onInput={(e) => { this.handleInput(e, item, idx, 3) }}
+              // onBlur={()=>{this.handleBlur()}}
+              onFocus={() => { this.handleFocus() }}
+            />
           </span>
-          <span id="addClose" className={styles.partDel} onClick={()=>{this.handleDel(item,idx)}}></span>
-          <DelToast show={activeSign==item.flg&&activeIdx==idx&&activeInd?true:false}
-                    name={activeName}
-                    right={'-34px'}
-                    top={'30px'}
-                    cancel={this.handleCancel}
-                    confirm={()=>{this.delConfirm(item,idx)}}/>
-      </li>
+          <span id="addClose" className={styles.partDel} onClick={() => { this.handleDel(item, idx) }}></span>
+          <DelToast show={activeSign == item.flg && activeIdx == idx && activeInd ? true : false}
+            name={activeName}
+            right={'-34px'}
+            top={'30px'}
+            cancel={this.handleCancel}
+            confirm={() => { this.delConfirm(item, idx) }} />
+        </li>
     );
   }
 }

+ 9 - 2
src/components/AddInspect/SlidePic/index.less

@@ -44,11 +44,18 @@
         background-size: 100% 100%;
     }
     .bigname {
-        width: 20%;
+        width: 15%;
         font-weight: bold;
     }
     .smallname {
-        width: 25%;
+        width: 16%;
+        overflow: hidden;
+        word-break: break-all;
+        -o-text-overflow: ellipsis;
+        text-overflow: ellipsis;
+        display: -webkit-box;
+        -webkit-box-orient: vertical;
+        -webkit-line-clamp: 3;
     }
     .edit {
         width: 15%;

+ 1 - 0
src/components/AddInspect/index.less

@@ -7,6 +7,7 @@
     padding-top: 10px;
     padding-bottom: 10px;
     border-bottom:1px dashed #989DA3;
+    display: flex;
     i {
         font-style: normal;
         display: inline-block;

+ 126 - 126
src/components/AssistCheck/index.jsx

@@ -4,113 +4,113 @@ import { ItemBox, ConfirmModal, WrapModalContainer } from '@commonComp';
 import styles from './index.less';
 import Notify from '@commonComp/Notify';
 import $ from 'jquery';
-import { isIE, getUrlArgObject,setFontColorSize } from '@utils/tools.js';
+import { isIE, getUrlArgObject, setFontColorSize } from '@utils/tools.js';
 import { dragBox } from '@utils/drag';
 import WrapModalBodyPac from '@containers/WrapModalBodyPac';
 import { getExcelList } from '@store/actions/inspect';
 import { host, prefix } from '@utils/config.js';
 import store from '@store';
-import {getMRAnalyse} from '@store/async-actions/pushMessage';
-import {SET_CURRENT_MODULE} from '@types/homePage';
+import { getMRAnalyse } from '@store/async-actions/pushMessage';
+import { SET_CURRENT_MODULE } from '@types/homePage';
 
 class AssistCheck extends React.Component {
-  constructor(props){
-        super(props);
-        this.state={
-          val: '',
-          visible: false,
-          dom: [],
-          isIE: isIE(),
-          ieVersion: null,
-          height: '-1',
-          hide: false,
-          importLis:false
-        }
-        this.showSlideImport=this.showSlideImport.bind(this)
-        // this.handleBindFileApi=this.handleBindFileApi.bind(this)
-        this.checkSystemIpt=this.checkSystemIpt.bind(this)
-        this.closeInIcss=this.closeInIcss.bind(this)
-        this.onClose=this.onClose.bind(this)
-        this.handleImportExcel=this.handleImportExcel.bind(this)
-        this.refreshScroller = this.refreshScroller.bind(this);
+  constructor(props) {
+    super(props);
+    this.state = {
+      val: '',
+      visible: false,
+      dom: [],
+      isIE: isIE(),
+      ieVersion: null,
+      height: '-1',
+      hide: false,
+      importLis: false
     }
-    handleImportExcel() {
-      this.inputRef.click();
-      const storeState = store.getState()
-      const {moduleName} = storeState.homePage
-      if(moduleName != '检查') {
-        store.dispatch({
-          type: SET_CURRENT_MODULE,
-          moduleName:'检查'
-        });
-        store.dispatch(getMRAnalyse());
-      }
+    this.showSlideImport = this.showSlideImport.bind(this)
+    // this.handleBindFileApi=this.handleBindFileApi.bind(this)
+    this.checkSystemIpt = this.checkSystemIpt.bind(this)
+    this.closeInIcss = this.closeInIcss.bind(this)
+    this.onClose = this.onClose.bind(this)
+    this.handleImportExcel = this.handleImportExcel.bind(this)
+    this.refreshScroller = this.refreshScroller.bind(this);
+  }
+  handleImportExcel() {
+    this.inputRef.click();
+    const storeState = store.getState()
+    const { moduleName } = storeState.homePage
+    if (moduleName != '检查') {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName: '检查'
+      });
+      store.dispatch(getMRAnalyse());
     }
-    showSlideImport(){
-      let flg = this.state.importLis
-      this.setState({
-        importLis:!flg
-      })
-      const storeState = store.getState()
-      const {moduleName} = storeState.homePage
-      if(moduleName != '检查') {
-        store.dispatch({
-          type: SET_CURRENT_MODULE,
-          moduleName:'检查'
-        });
-        store.dispatch(getMRAnalyse());
-      }
+  }
+  showSlideImport() {
+    let flg = this.state.importLis
+    this.setState({
+      importLis: !flg
+    })
+    const storeState = store.getState()
+    const { moduleName } = storeState.homePage
+    if (moduleName != '检查') {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName: '检查'
+      });
+      store.dispatch(getMRAnalyse());
     }
+  }
 
-    onClose() {
-      this.setState({
-        hide: false
-      })
-      dragBox('previewWrapper', 'previewStatic', 'del')
-    }
-    checkSystemIpt() {
-      this.setState({
-        hide: true
-      })
-      const storeState = store.getState()
-      const {moduleName} = storeState.homePage
-      if(moduleName != '检查') {
-        store.dispatch({
-          type: SET_CURRENT_MODULE,
-          moduleName:'检查'
-        });
-        store.dispatch(getMRAnalyse());
-      }
-    }
-    closeInIcss(){
-      this.setState({
-        hide: false
-      })
+  onClose() {
+    this.setState({
+      hide: false
+    })
+    dragBox('previewWrapper', 'previewStatic', 'del')
+  }
+  checkSystemIpt() {
+    this.setState({
+      hide: true
+    })
+    const storeState = store.getState()
+    const { moduleName } = storeState.homePage
+    if (moduleName != '检查') {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName: '检查'
+      });
+      store.dispatch(getMRAnalyse());
     }
-  refreshScroller(){
+  }
+  closeInIcss() {
+    this.setState({
+      hide: false
+    })
+  }
+  refreshScroller() {
     //更新滚动条状态,解决容器变大滚动条不更新bug
     return this.context.scrollArea;
     //this.context.scrollArea.scrollBottom();
 
   }
-    render(){
-        const {setHighter,checkOnOff,checkedListImport,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,
-          handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,
-          isRead,winWidth,assistList,hideAllDrop,setTipValue} = this.props;
-        const {showSlideImport,checkSystemIpt,onClose,closeInIcss} = this;
-        const {importLis,ieVersion,hide} = this.state;
-        // if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
-        //   ++numFlg
-        //   numFlg == 1?handleBindFileApi():null
-        // }
-        return (
-            <div className={styles.wrapper}>
-                <div className={styles.top}>
-                    <span id="assistResultData" className={`${setFontColorSize(2,5)}`}>检查结果数据</span>
-                    {/* <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
+  render() {
+    const { setHighter, checkOnOff, checkedListImport, list, getInfomation, windowHeight, hospitalMsg, assistLabel, assistVal,
+      handleChangeValue, handleSign, fetchPushInfos, handleDelAssist, handleChangeAssistValue, handleChangeDate,
+      isRead, winWidth, assistList, hideAllDrop, setTipValue } = this.props;
+    const { showSlideImport, checkSystemIpt, onClose, closeInIcss } = this;
+    const { importLis, ieVersion, hide } = this.state;
+    // if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
+    //   ++numFlg
+    //   numFlg == 1?handleBindFileApi():null
+    // }
+    return (
+      <div className={styles.wrapper}>
+        <div className={styles.top}>
+          <span id="assistResultData" className={`${setFontColorSize(2, 5)}`}>检查结果数据</span>
+          {/* <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
                         <p id="importPacBtn" className={styles.importInspectBtn}>导入检查结果</p>
                     </div> */}
-                    {/* {
+          {/* {
                       hospitalMsg.import_way_pacs == 1 ? <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>
                         <p className={styles.importInspectBtn}>导入检查结果</p>
                         <input type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} />
@@ -129,7 +129,7 @@ class AssistCheck extends React.Component {
                         }
                           </div> : null
                       } */}
-                    {/* {
+          {/* {
                       hide ? <WrapModalContainer hide={hide} title={'导入检查数据'} width={1000} height={580} onClose={onClose}>
                         <WrapModalBodyPac
                           closeInIcss={closeInIcss}
@@ -137,43 +137,43 @@ class AssistCheck extends React.Component {
                         ></WrapModalBodyPac>
                       </WrapModalContainer> : null
                     } */}
-                </div>
-                <ItemBox 
-                    className={styles.title}
-                    hideAllDrop={hideAllDrop}
-                    title={'检查'}
-                    editable={false}
-                    border={true}
-                    marginTop={'20px'}
-                >
-                    <div style={{padding:'10px',boxSizing:'border-box',color:'#000'}} >
-                        <AddAssistCheck
-                            setTipValue={setTipValue}
-                            checkOnOff={checkOnOff}
-                            handleChangeValue={handleChangeValue}
-                            refreshScroller={this.refreshScroller}
-                            list={list}
-                            handleSign={handleSign}
-                            assistLabel={assistLabel}
-                            handleDelAssist={handleDelAssist}
-                            handlePush={fetchPushInfos}
-                            handleChangeAssistValue={handleChangeAssistValue}
-                            handleChangeDate={handleChangeDate}
-                            isRead={isRead}
-                            winWidth={winWidth}
-                            getInfomation={getInfomation}
-                            assistList={assistList}
-                            assistVal={assistVal}
-                            windowHeight={windowHeight}
-                            checkedListImport={checkedListImport}
-                            setHighter={setHighter}
-                        >
-                        </AddAssistCheck>
-                    </div>
-                </ItemBox>
-            </div>
-        )
-    }
+        </div>
+        <ItemBox
+          className={styles.title}
+          hideAllDrop={hideAllDrop}
+          title={'检查'}
+          editable={false}
+          border={true}
+          marginTop={'20px'}
+        >
+          <div style={{ padding: '10px', boxSizing: 'border-box', color: '#000' }} >
+            <AddAssistCheck
+              setTipValue={setTipValue}
+              checkOnOff={checkOnOff}
+              handleChangeValue={handleChangeValue}
+              refreshScroller={this.refreshScroller}
+              list={list}
+              handleSign={handleSign}
+              assistLabel={assistLabel}
+              handleDelAssist={handleDelAssist}
+              handlePush={fetchPushInfos}
+              handleChangeAssistValue={handleChangeAssistValue}
+              handleChangeDate={handleChangeDate}
+              isRead={isRead}
+              winWidth={winWidth}
+              getInfomation={getInfomation}
+              assistList={assistList}
+              assistVal={assistVal}
+              windowHeight={windowHeight}
+              checkedListImport={checkedListImport}
+              setHighter={setHighter}
+            >
+            </AddAssistCheck>
+          </div>
+        </ItemBox>
+      </div>
+    )
+  }
 }
 
 AssistCheck.contextTypes = {

+ 0 - 1
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -310,7 +310,6 @@ class HistoryCaseContainer extends React.Component {
     render(){
         const { items,handleSortClick,showHistoryBox,preInfo } = this.props;
         const { activeHis, visible, dataJson, dataStr, delVisible, editVisible, historyCase, currentIndex, activeIndex } = this.state;
-        //console.log(1,dataStr)
         const getAllDataStringList = (dataStr) =>{           //获取所有模块文本的数据
             let jsonDataString = {};
             jsonDataString.lis = {};

+ 50 - 40
src/components/PreviewBody/Inspect/index.jsx

@@ -1,41 +1,44 @@
 import style from "../index.less";
-import { normalVal,getStatusImg } from '@utils/tools';
+import { normalVal, getStatusImg } from '@utils/tools';
+import report from '@common/images/report_time.png';
+import billing from '@common/images/billing_time.png';
 
 const PreviewInspect = (props) => {
-  const { dataJson, toTime ,dateTime,showDetails  } = props;
+  const { dataJson, toTime, dateTime, showDetails } = props;
   // console.log(dateTime,'dateTime');
-    return <tr className={style['patInfoFst']}>
-      <td className={style['patInfoSec']}>检验:</td>
-      <td className={style['patInfoSec']}>
-        <table className={style.assistTable}>
+  return <tr className={style['patInfoFst']}>
+    <td className={style['patInfoSec']}>检验:</td>
+    <td className={style['patInfoSec']}>
+      <table className={style.assistTable}>
         {
-          (dataJson.labelListSmall.length !== 0 || dataJson.labelListBig.length !== 0) && ( <span style={{ lineHeight: '36px' }}>检验结果数据</span>)
+          (dataJson.labelListSmall.length !== 0 || dataJson.labelListBig.length !== 0) && (<span style={{ lineHeight: '36px' }}>检验结果数据</span>)
         }
         {
           dataJson && dataJson.labelListSmall && dataJson.labelListSmall.map((item) => {
             // console.log(item, item,'=====');
-              return (               
-                  <tr className={style.assistTableTrSec}>
-                    <td className={style.assistTableTdFst}>{item.detailName}</td>
-                    <td className={style.assistTableTdSec}>
-                      {/* {getStatusImg(value.type, value.value, 1)}
+            return (
+              <tr className={style.assistTableTrSec}>
+                <td className={style.assistTableTdFst}>{item.detailName}</td>
+                <td className={style.assistTableTdSec}>
+                  {/* {getStatusImg(value.type, value.value, 1)}
                       {value.unit} */}
-                      {getStatusImg(0, item.value, 1)}
-                      {item.units}
-                      {/* {getStatusImg(2, 9.8, 1)}
+                  {getStatusImg(0, item.value, 1)}
+                  {item.units}
+                  {/* {getStatusImg(2, 9.8, 1)}
                       {'mmol/L'} */}
-                    </td>
-                    {/* {showDetails(item)} */}
-                    <td className={style.assistTableTdTrd}>
-                      {normalVal(item.minValue, item.maxValue)}
-                      {/* {normalVal(3.9, 6.1)} */}
-                    </td>
-                    {/* <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '检验时间:' + toTime(item.time) */}
-                  {/* <td className={style.assistTableTdFor}>{item.time == '' ?   dateTime  :  item.time}</td> */}
-                  <td className={style.assistTableTdFor}>{item.time }</td>
-                  </tr>
-                // </table>
-              )
+                </td>
+                {/* {showDetails(item)} */}
+                <td className={style.assistTableTdTrd}>
+                  {normalVal(item.minValue, item.maxValue)}
+                  {/* {normalVal(3.9, 6.1)} */}
+                </td>
+                {/* <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '检验时间:' + toTime(item.time) */}
+                {/* <td className={style.assistTableTdFor}>{item.time == '' ?   dateTime  :  item.time}</td> */}
+                <td className={style.assistTableTdFor}><img className={style.imgCheck} src={report} title={'开单时间'} />{item.time}</td>
+                <td className={style.assistTableTdFor}><img className={style.imgCheck} src={report} title={'报告时间'} />{item.finishDateValue}</td>
+              </tr>
+              // </table>
+            )
           })
         }
 
@@ -43,21 +46,28 @@ const PreviewInspect = (props) => {
           dataJson && dataJson.labelListBig && dataJson.labelListBig.map((item) => {
             return (
               // <table style={style.assistTable}>
-                <tr className={style.assistTableTrSec}>
-                  <td className={style.assistTableTdFst}>{item.name}</td>  
-                  <td className={style.assistTableTdSec}></td>
-                  <td className={style.assistTableTdTrd}></td>                                             
-                  {/* <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '检验时间:' + toTime(item.time) */}
-                  {/* <td className={style.assistTableTdFor}>{item.time == '' ? dateTime : toTime(item.time) */}
-                  <td className={style.assistTableTdFor}>{item.time == '' ? dateTime : toTime(item.time)}</td>
-                </tr>
+              <tr className={style.assistTableTrSec}>
+                <td className={style.assistTableTdFst}>{item.name}</td>
+                <td className={style.assistTableTdSec}></td>
+                <td className={style.assistTableTdTrd}></td>
+                {/* <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '检验时间:' + toTime(item.time) */}
+                {/* <td className={style.assistTableTdFor}>{item.time == '' ? dateTime : toTime(item.time) */}
+                <td className={style.assistTableTdFor}><img className={style.imgCheck} src={report} title={'开单时间'} />{item.time == '' ? dateTime : toTime(item.time)}</td>
+                <td className={style.assistTableTdFor}>
+                  {
+                    item.finishDateValue || item.finishDateValue != '' ? (
+                      <img className={style.imgCheck} src={report} title={'报告时间'} />
+                    ) : null
+                  }
+                  {item.finishDateValue}</td>
+              </tr>
               // </table>
             )
           })
         }
 
-        </table>
-        {/* {
+      </table>
+      {/* {
           dataJson&&dataJson.getExcelDataList && dataJson.getExcelDataList.map((items) => {
             return items.lisExcelRes && items.lisExcelRes.map((item) => {
               return <table style={style.assistTable}>
@@ -82,7 +92,7 @@ const PreviewInspect = (props) => {
             })
           })
         } */}
-        {/* {
+      {/* {
           dataJson&&dataJson.labelList && dataJson.labelList.map((item, idx) => {
             return <table style={{ margin: '8px 0', width: '100%' }}>
               {
@@ -114,8 +124,8 @@ const PreviewInspect = (props) => {
             </table>
           })
         } */}
-      </td>
-    </tr>
+    </td>
+  </tr>
 }
 
 export default PreviewInspect;

+ 1 - 1
src/components/PreviewBody/ItemPart/index.jsx

@@ -1,6 +1,6 @@
 import style from "../index.less";
 import { filterDataArr } from '@utils/tools';
-
+import down from '@images/down.png';
 const ItemPart = (props) => {
   let {dataStr,title,type,dataJson,other_yjs,lastDot} = props;
   // console.log(dataStr,'dataStr===============');

+ 10 - 2
src/components/PreviewBody/index.less

@@ -14,6 +14,12 @@
     // padding-top: 40px;
   }
 }
+.imgCheck {
+  position: relative;
+  top: 2px;
+  margin: 0 3px 0 0px;
+  cursor: pointer;
+}
 table{
   border-collapse: collapse;
   width: 100%;
@@ -107,7 +113,7 @@ table{
   }
 }
 .assistTableTdFst {
-  width: 32%;
+  width: 18%;
 }
 .adviceTableTdFst {
   width: 28%;
@@ -123,7 +129,7 @@ table{
 //   width:3%;
 // }
 .assistTableTdTrd {
-  width:18%;
+  width:15%;
 }
 .assistTableTdFor {
   width: 22%;
@@ -144,9 +150,11 @@ table{
     left: -10px;
   }
 }
+
 .checkAssist {
   font-size: 14px;
   word-break: break-all;
+  display: flex;
 }
 .font14 {
   font-size: 14px;

+ 2 - 2
src/containers/AssistCheck.js

@@ -34,8 +34,8 @@ function mapStateToProps(state) {//console.log(state.typeConfig)
 
 function mapDispatchToProps(dispatch, store) {
     return {
-        setTipValue(item,val,idx){
-          dispatch(setTipVal(item,val,idx))
+        setTipValue(item,val,idx,tip){
+        dispatch(setTipVal(item, val, idx, tip))
         },
         checkOnOff(item,idx){
           dispatch(checkOffOn(item,idx))

+ 3 - 2
src/store/actions/assistCheck.js

@@ -34,11 +34,12 @@ export const checkOffOn = (item,tip) => ({
     type:CHECK_OFF_ON,
     item,tip
 })
-export const setTipVal = (item,val,idx) => ({
+export const setTipVal = (item, val, idx, tip) => ({
     type:SET_TIP_VAL,
     item,
     val,
-    idx
+    idx,
+    tip
 })
 export const clearAssistData = (data,saveText,checkedListImport) => ({         //清空回读
     type:CLEAR_ASSIST_DATA,

+ 1 - 2
src/store/async-actions/inspect.js

@@ -30,11 +30,9 @@ export const getSearchList = (val) => {
                         curDate[i]['flg'] = 0;
                     }
                 }else{
-                    console.log(data)
                     let arr = data.nameList||[],tmp=[];
                     for (var key in arr) {
                         let obj = {}
-                        console.log(arr[key])
                         obj['uniqueName'] = arr[key].name;
                         obj['detailName'] = arr[key].name;
                         obj['value'] = '';
@@ -44,6 +42,7 @@ export const getSearchList = (val) => {
                         tmp.push(obj)
                     }
                     curDate=tmp
+                    
                 }
                 dispatch(searchList(curDate,val.trim()));
             }else{

+ 57 - 9
src/store/reducers/assistCheck.js

@@ -32,22 +32,69 @@ const initSearchList = {
   },
   totalOrder:[],//开单项
 }
-import { getCurrentDate,getAllString} from '@utils/tools';
-
+import { getCurrentDate, getAllString, compareDate} from '@utils/tools';
+import { Notify } from '@commonComp';
 export default (state = initSearchList, action) => {
   if (action.type == SET_TIP_VAL) { //改变shijian
     const newState = Object.assign({}, state);
-    const tempArr = newState.assistLabel;
-    for (let i = 0; i < tempArr.length; i++) {
-      if (i == action.idx) {
-        tempArr[i].dateValue = action.val
-        tempArr[i].time = action.val
-        newState.assistLabel = [...tempArr]
+    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
+        }
       }
-    }
+      return item
+    })
+    // for (let i = 0; i < tempArr.length; i++) {
+    //   if (i == action.idx) {
+    //     if (action.tip == 1) {
+    //       if (compareDate(action.val) > compareDate(tempArr[i].referenceValue)) {
+    //         Notify.error("报告时间不能早于开单时间");
+    //         return tempArr
+    //       }
+    //       if (action.val == '') {
+    //         Notify.error("开单时间不能为空");
+    //         return tempArr
+    //       }
+    //       tempArr[i].time = action.val
+    //       tempArr[i].dateValue = action.val
+    //     } else {
+    //       if (compareDate(tempArr[i].dateValue) > compareDate(action.val)) {
+    //         Notify.error("报告时间不能早于开单时间");
+    //         return tempArr[i]
+    //       }
+    //       tempArr[i].referenceValue = action.val
+    //     }
+    //     console.log(tempArr[i])
+    //     // tempArr[i].dateValue = action.val
+    //     // tempArr[i].time = action.val
+    //     newState.assistLabel = [...tempArr]
+    //   }
+    // }
+    newState.assistLabel = [...tempArr]
     let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    console.log(tmpObj)
     newState.dataArr = tmpObj.arr
     newState.dataString = tmpObj.str
+    
     return newState;
   }
   if (action.type == ADD_ASSIST_LABEL) {
@@ -84,6 +131,7 @@ export default (state = initSearchList, action) => {
     let tempList = action.item
     tempList['dateValue'] = getCurrentDate(1)
     tempList['time'] = getCurrentDate(1)
+    tempList['finishDateValue'] = getCurrentDate(1)
     tempArrs.push(tempList)
     let tmpObj = getAllString([],newState.assistLabel)
     newState.assistLabel = [...tempArrs]

+ 140 - 105
src/store/reducers/inspect.js

@@ -1,25 +1,26 @@
 import {
-  SEARCH_LIST,
-  SET_LABEL,
-  FILL_ACTIVE,
-  GET_EXCEL,
-  CHECK_VALUE_IS_CHANGE,
-  CLEAR_LABEL,
-  RESET_LABEL,
-  CLEAR_ALL_LABEL,
-  DEL_PART_ITEM,
-  DEL_EXCEL_LIST,
-  ADD_LABEL,
-  SET_CONTEXT,
-  SET_TIP_NEW,
-  SEARCH_TYPE,
-  DEL_ONE_PIC,
-  CHECK_ON_OFF,
-  REINSPECTDATA,
-  CLEARINSPECTDATA,
+    SEARCH_LIST,
+    SET_LABEL,
+    FILL_ACTIVE,
+    GET_EXCEL,
+    CHECK_VALUE_IS_CHANGE,
+    CLEAR_LABEL,
+    RESET_LABEL,
+    CLEAR_ALL_LABEL,
+    DEL_PART_ITEM,
+    DEL_EXCEL_LIST,
+    ADD_LABEL,
+    SET_CONTEXT,
+    SET_TIP_NEW,
+    SEARCH_TYPE,
+    DEL_ONE_PIC,
+    CHECK_ON_OFF,
+    REINSPECTDATA,
+    CLEARINSPECTDATA,
 } from '../types/inspect';
 import store from '@store';
-import { getStringPlus,  getPushLists,  getPushList,getCurrentDate} from '@utils/tools.js';
+import { Notify } from '@commonComp';
+import { getStringPlus, getPushLists, getPushList, getCurrentDate, compareDate } from '@utils/tools.js';
 
 const initSearchList = {
     list: [], //搜索的结果
@@ -28,17 +29,17 @@ const initSearchList = {
     fillActive: {}, //选中的标签的填写单
 
     getExcelData: {}, //导入的数据
-    inspectStrPlus:'',
+    inspectStrPlus: '',
 
     getExcelDataList: [], //导入的数据
-    pushItem:[],    //推送的数据
-    pushItems:[],    //右侧模板预览的数据
-    inspectVal:'',
-    context:{},
-    shType:2,
-    labelListBig:[],//大项
-    labelListSmall:[],//小项
-    totalOrder:[],//开单项
+    pushItem: [],    //推送的数据
+    pushItems: [],    //右侧模板预览的数据
+    inspectVal: '',
+    context: {},
+    shType: 2,
+    labelListBig: [],//大项
+    labelListSmall: [],//小项
+    totalOrder: [],//开单项
 }
 
 export default (state = initSearchList, action) => {
@@ -46,81 +47,114 @@ export default (state = initSearchList, action) => {
         const newState = Object.assign({}, state);
         let tempArr = newState.labelListBig;
         let tempArrs = newState.labelListSmall;
-        let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempTotalOrder=[];
-        if(tmpLis&&tmpLis.flg == 1){
-            for(let i = 0;i < tempArr.length;i++){
-                if(action.tip == i){
+        let tmpLis = action.item, tempBigOrder = [], tempSmallOrder = [], tempTotalOrder = [];
+        if (tmpLis && tmpLis.flg == 1) {
+            for (let i = 0; i < tempArr.length; i++) {
+                if (action.tip == i) {
                     let flg = tempArr[i].check;
                     tempArr[i].check = !flg
                 }
             }
             newState.labelListBig = [...tempArr]
-        }else{
-            for(let i = 0;i < tempArrs.length;i++){
-                if(action.tip==i){
+        } else {
+            for (let i = 0; i < tempArrs.length; i++) {
+                if (action.tip == i) {
                     let flg = tempArrs[i].check;
                     tempArrs[i].check = !flg
                 }
             }
             newState.labelListSmall = [...tempArrs]
         }
-        tempBigOrder = tempArr.filter((item)=>item.check)
-        tempSmallOrder = tempArrs.filter((item)=>item.check)
-        tempTotalOrder=tempBigOrder.concat(tempSmallOrder)
-        newState.totalOrder=[...tempTotalOrder]
+        tempBigOrder = tempArr.filter((item) => item.check)
+        tempSmallOrder = tempArrs.filter((item) => item.check)
+        tempTotalOrder = tempBigOrder.concat(tempSmallOrder)
+        newState.totalOrder = [...tempTotalOrder]
         return newState;
     }
     if (action.type == DEL_ONE_PIC) {
         const newState = Object.assign({}, state);
         let tempArr = newState.labelListBig;
         let tempArrs = newState.labelListSmall;
-        let tmpLis = action.item,tempBigOrder=[],tempSmallOrder=[],tempTotalOrder=[];
-        if(tmpLis&&tmpLis.flg == 1){//大项
-            tempArr = tempArr.filter((item,idx)=>{
-                if(action.tip != idx){
+        let tmpLis = action.item, tempBigOrder = [], tempSmallOrder = [], tempTotalOrder = [];
+        if (tmpLis && tmpLis.flg == 1) {//大项
+            tempArr = tempArr.filter((item, idx) => {
+                if (action.tip != idx) {
                     return item
                 }
             })
             newState.labelListBig = [...tempArr]
-        }else{//小项
-            tempArrs = tempArrs.filter((item,idx)=> {
-                if(action.tip != idx){
+        } else {//小项
+            tempArrs = tempArrs.filter((item, idx) => {
+                if (action.tip != idx) {
                     return item
                 }
             })
             newState.labelListSmall = [...tempArrs]
         }
-        tempBigOrder = tempArr.filter((item)=>item.check)
-        tempSmallOrder = tempArrs.filter((item)=>item.check)
-        tempTotalOrder=tempBigOrder.concat(tempSmallOrder)
-        newState.totalOrder=[...tempTotalOrder]
+        tempBigOrder = tempArr.filter((item) => item.check)
+        tempSmallOrder = tempArrs.filter((item) => item.check)
+        tempTotalOrder = tempBigOrder.concat(tempSmallOrder)
+        newState.totalOrder = [...tempTotalOrder]
         return newState;
     }
-
     if (action.type == SET_TIP_NEW) {
         const newState = Object.assign({}, state);
         let tempArr = newState.labelListBig;
         let tempArrs = newState.labelListSmall;
         let tmpLis = action.item
-        if(tmpLis.flg == 1){//大项,改的只能是时间
-            tempArr = tempArr.filter((item,idx)=>{
-                if(action.sign==idx){
-                    item.time = action.value
-                    item.dateValue = action.value
+        if (tmpLis.flg == 1) {//大项,改的只能是时间
+            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
+                    }
                 }
                 return item
             })
-        }else{
-            tempArrs = tempArrs.filter((item,idx)=>{
-                if(action.sign == idx){
-                    if(action.tip==1){//小项改时间
+        } else {
+            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(isNumber(action.value-0)){
+                    } 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)) {
                             item.value = action.value
                             item.otherValue = ''
-                        }else{
+                        } else {
                             item.otherValue = action.value
                             item.value = ''
                         }
@@ -145,10 +179,11 @@ export default (state = initSearchList, action) => {
         let tmpLis = action.list
         tmpLis['dateValue'] = getCurrentDate(1)
         tmpLis['time'] = getCurrentDate(1)
-        if(tmpLis.flg == 1){//大项
+        tmpLis['finishDateValue'] = getCurrentDate(1)
+        if (tmpLis.flg == 1) {//大项
             tempArr.push(tmpLis)
             newState.labelListBig = [...tempArr]
-        }else{//小项
+        } else {//小项
             tempArrs.push(tmpLis)
             newState.labelListSmall = [...tempArrs]
         }
@@ -163,11 +198,11 @@ export default (state = initSearchList, action) => {
     if (action.type == SET_LABEL) {             //选中的结果    
         const newState = Object.assign({}, state);
         let tempArr = [];
-        if(action.sign == 'common'){
-          let tmpInspectList = store.getState().homePage.inspectList
-          tempArr = tmpInspectList;
-        }else{
-          tempArr = newState.list
+        if (action.sign == 'common') {
+            let tmpInspectList = store.getState().homePage.inspectList
+            tempArr = tmpInspectList;
+        } else {
+            tempArr = newState.list
         }
         const tempArrs = newState.labelList;
         for (let i = 0; i < tempArr.length; i++) {
@@ -176,24 +211,24 @@ export default (state = initSearchList, action) => {
                 newState.labelList = [...tempArrs]
             }
         }
-        
+
         let tmpArr = newState.getExcelDataList;
         let tmpArr2 = newState.labelList;
-        newState.pushItems = getPushLists(tmpArr,tmpArr2);
+        newState.pushItems = getPushLists(tmpArr, tmpArr2);
         newState.inspectStrPlus = getStringPlus(newState.pushItems)
         return newState;
     }
     if (action.type == ADD_LABEL) {             //右侧推送的检验检查项,点击开单放到左侧检验检查的位置上
         const newState = Object.assign({}, state);
         const tempArr = newState.labelList;
-        for(let i = 0;i <action.lis.length;i++){
-          tempArr.push(action.lis[i]);
+        for (let i = 0; i < action.lis.length; i++) {
+            tempArr.push(action.lis[i]);
         }
         newState.labelList = [...tempArr]
-        
+
         let tmpArr = newState.getExcelDataList;
         let tmpArr2 = newState.labelList;
-        newState.pushItems = getPushLists(tmpArr,tmpArr2);
+        newState.pushItems = getPushLists(tmpArr, tmpArr2);
         newState.inspectStrPlus = getStringPlus(newState.pushItems);
         return newState;
     }
@@ -214,11 +249,11 @@ export default (state = initSearchList, action) => {
         let tmpArr = newState.getExcelDataList;
         let tmpArr2 = newState.labelList;
         for (let i = 0; i < tempArr.length; i++) {
-          // tempArr[i].value = ''
+            // tempArr[i].value = ''
         }
         tempArrs.show = false;
-        newState.pushItem = getPushList(tmpArr,tmpArr2);
-        newState.pushItems = getPushLists(tmpArr,tmpArr2);
+        newState.pushItem = getPushList(tmpArr, tmpArr2);
+        newState.pushItems = getPushLists(tmpArr, tmpArr2);
         newState.inspectStrPlus = getStringPlus(newState.pushItems)
         return newState;
     }
@@ -230,21 +265,21 @@ export default (state = initSearchList, action) => {
 
         tmpArr.push(action.data)
         newState.getExcelDataList = [...tmpArr]
-        newState.pushItem = getPushList(tmpArr,tmpArr2);
-        newState.pushItems = getPushLists(tmpArr,tmpArr2);
+        newState.pushItem = getPushList(tmpArr, tmpArr2);
+        newState.pushItems = getPushLists(tmpArr, tmpArr2);
         newState.inspectStrPlus = getStringPlus(newState.pushItems)
         // getExcelString(action,newState,tmpArr,tmpArr2)
         return newState;
     }
-    if(action.type == DEL_EXCEL_LIST){       //删除excel列表的某个数据
+    if (action.type == DEL_EXCEL_LIST) {       //删除excel列表的某个数据
         const newState = Object.assign({}, state);
         const tempArr2 = newState.labelList;
         let tmpArr = newState.getExcelDataList;
-        tmpArr.splice(action.idx,1);
+        tmpArr.splice(action.idx, 1);
         newState.getExcelDataList = [...tmpArr];
         let tempArr1 = newState.getExcelDataList;
-        newState.pushItem = getPushList(tempArr1,tempArr2);
-        newState.pushItems = getPushLists(tempArr1,tempArr2);
+        newState.pushItem = getPushList(tempArr1, tempArr2);
+        newState.pushItems = getPushLists(tempArr1, tempArr2);
         newState.inspectStrPlus = getStringPlus(newState.pushItems)
         return newState;
     }
@@ -260,59 +295,59 @@ export default (state = initSearchList, action) => {
         newState.fillActive = tempArr;
         newState.labelList = tempArrs;
         // tempArrAct.show = true;
-        newState.pushItem = getPushList(tmpArr,tempArrs);
-        newState.pushItems = getPushLists(tmpArr,tempArrs);
+        newState.pushItem = getPushList(tmpArr, tempArrs);
+        newState.pushItems = getPushLists(tmpArr, tempArrs);
         newState.inspectStrPlus = getStringPlus(newState.pushItems)
         return newState;
     }
     if (action.type == CLEAR_ALL_LABEL) {     //清空所有数据
         const newState = Object.assign({}, state);
-        newState.labelList =action.data;
+        newState.labelList = action.data;
         newState.getExcelDataList = action.dataExcel;
         let tmpArr = action.dataExcel;
         const tempArrs = action.data;
-        newState.pushItem = getPushList(tmpArr,tempArrs);
+        newState.pushItem = getPushList(tmpArr, tempArrs);
         newState.inspectStrPlus = action.saveTextData;
         return newState;
     }
     if (action.type == DEL_PART_ITEM) {     //清空填寫数据
         const newState = Object.assign({}, state);
         const tempArr = newState.labelList;
-        tempArr.splice(action.idx,1);
+        tempArr.splice(action.idx, 1);
         newState.labelList = [...tempArr];
         let tmpArr = newState.getExcelDataList;
-        newState.pushItem = getPushList(tmpArr,tempArr);
-        newState.pushItems = getPushLists(tmpArr,tempArr);
+        newState.pushItem = getPushList(tmpArr, tempArr);
+        newState.pushItems = getPushLists(tmpArr, tempArr);
         newState.inspectStrPlus = getStringPlus(newState.pushItems)
         return newState;
     }
-    if (action.type == SET_CONTEXT) {    
+    if (action.type == SET_CONTEXT) {
         const newState = Object.assign({}, state);
         newState.context = action.obj
         return newState;
     }
     if (action.type == REINSPECTDATA) {
-      const newState = Object.assign({}, state);
-      const data = action.params[8].content.labelListBig;
-        const arr = data.filter((it)=>{
+        const newState = Object.assign({}, state);
+        const data = action.params[8].content.labelListBig;
+        const arr = data.filter((it) => {
             return it.check;
         });
         newState.labelListBig = data
-        newState.labelListSmall = action.params[8].content.labelListSmall;       
+        newState.labelListSmall = action.params[8].content.labelListSmall;
         newState.totalOrder = arr;
-      return newState;
+        return newState;
 
     }
     if (action.type == CLEARINSPECTDATA) {
-      let newState = Object.assign({}, state);
-      newState.labelListBig = [];
-      newState.labelListSmall = [];
-      newState.totalOrder = [];
-      return newState;
+        let newState = Object.assign({}, state);
+        newState.labelListBig = [];
+        newState.labelListSmall = [];
+        newState.totalOrder = [];
+        return newState;
     }
     return state;
 }
 
-function isNumber(obj) {  
-    return typeof obj === 'number' && !isNaN(obj)  
+function isNumber(obj) {
+    return typeof obj === 'number' && !isNaN(obj)
 }

+ 6 - 1
src/utils/config.js

@@ -36,11 +36,16 @@ function geturl(){
             gourl:'http://192.168.2.121:5654/cdss.html',
             imgurl:'http://192.168.2.121:82'
         }
+    }else if(window.location.href.indexOf('192.168.2.122')>-1){
+        return {
+            gourl:'http://192.168.2.122:5654/cdss.html',
+            imgurl:'http://192.168.2.122:82'
+        }
     }else{
         return {
             // gourl:'http://192.168.2.122:5654/cdss.html',
             gourl:'http://223.93.170.82:12254/cdss.html',
-            imgurl:'http://192.168.2.122:82'
+            imgurl:'http://223.93.170.82:12282'
         }
     }
 }

+ 23 - 6
src/utils/tools.js

@@ -65,7 +65,18 @@ const storageLocal = {
     localStorage.clear();
   }
 };
+const strDateTime = (str) => {
+  var reg = /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/;
+  var r = str.match(reg);
+  if (r == null) return false;
+  var d = new Date(r[1], r[3] - 1, r[4], r[5], r[6], r[7]);
+  return (d.getFullYear() == r[1] && (d.getMonth() + 1) == r[3] && d.getDate() == r[4] && d.getHours() == r[5] && d.getMinutes() == r[6] && d.getSeconds() == r[7]);
+}
 
+const compareDate = (time) => {
+  var date = new Date(time)
+  return date.getTime()
+}    
 //是否为空
 const isNull = (item)=>{
     return String(item)=== "" || String(item)==="null" || String(item)==="undefined";
@@ -953,8 +964,9 @@ function getEMRParams(){
       return item
     }
   })
-  let tempLisOrder = inspect.totalOrder
+  let tempLisOrder = JSON.parse(JSON.stringify(inspect.totalOrder)) 
   tempLisOrder = tempLisOrder.filter((item)=>{
+    delete item.finishDateValue
     if(item.flg == 1){
       item.detailName = ""
     }
@@ -972,8 +984,9 @@ function getEMRParams(){
       return item
     }
   })
-  let tempPacOrder = assistCheck.totalOrder
+  let tempPacOrder = JSON.parse(JSON.stringify(assistCheck.totalOrder)) 
   tempPacOrder = tempPacOrder.filter((item)=>{
+    delete item.finishDateValue
     if(curHos.hosId != -1){
       item.uniqueName = ''
     }
@@ -1802,7 +1815,7 @@ function getPushList(data1,data2){     //推送数据
                 tmpObj.source = '1';//数据来源
                 tmpObj.maxValue = part.max || ''; 
                 tmpObj.minValue = part.min || '';
-                tmpObj.dateValue = part.time ||now;
+                // tmpObj.dateValue = part.time ||now;
                 tmpObj.units = part.unit || '';//单位
                 tmpObj.value = (part.value-0) === (part.value-0) ? part.value:'';//值
                 tmpObj.otherValue = (part.value-0) === (part.value-0) ?'':part.value; //阴性阳性
@@ -1820,7 +1833,7 @@ function getPushList(data1,data2){     //推送数据
                 tmpObj.source = '0';     //数据来源
                 tmpObj.maxValue = val.maxValue ? val.maxValue : '';
                 tmpObj.minValue = val.minValue ? val.minValue : '';
-                tmpObj.dateValue = val.time || now;
+                // tmpObj.dateValue = val.time || now;
                 tmpObj.units = val.labelSuffix || '';
                 tmpObj.value = (val.value-0) === (val.value-0) ? val.value:'';
                 tmpObj.otherValue = (val.value-0) === (val.value-0) ?'':val.value;
@@ -1892,16 +1905,18 @@ function getAllString(checkedListImport,assistLabel,flg){
   for (let i = 0; i < tempArr.length; i++) {
     let tmpVal = tempArr[i].value ? tempArr[i].value.trim() : tempArr[i].value;
     let obj = {
-      "dateValue": tempArr[i].time||"",
+      // "dateValue": tempArr[i].time||"",
       "name": "",
       "uniqueName": tempArr[i].name||"",
       "desc": tempArr[i].value||"",
       "result": tempArr[i].value||"",
     }
     tmpArr.push(obj)
+    console.log(tempArr)
     // tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ':') + (tempArr[i].time ? '报告日期:' + tempArr[i].time : '') + '^;')
-    tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ':') + (tempArr[i].time ? tempArr[i].time : '') + '^;')
+    tmpString += (tempArr[i].name + (tmpVal ? (':' + tmpVal) + ', ' : ':') + `<img style='margin:0 5px' title="开单时间" src='/src/common/images/billing_time.png' alt=""/>` + (tempArr[i].time ? tempArr[i].time : '') + (tempArr[i].check || tempArr[i].finishDateValue == '' ? '' : `<img style="margin:0 5px" title="报告时间" src='/src/common/images/report_time.png' alt=""/>`) + (tempArr[i].check ? '' : tempArr[i].finishDateValue))
   }
+
   return tmpObj = {
     arr:tmpArr,
     str:tmpString
@@ -2182,6 +2197,8 @@ function checkDeptContent(jsonStr,tmpLis){
 }
 
 module.exports = {
+  strDateTime,
+  compareDate,
   getIds,
   getWindowInnerWidth,
   getWindowInnerHeight,