|
@@ -1,5 +1,5 @@
|
|
import React from 'react';
|
|
import React from 'react';
|
|
-import { SearchOption, Calendar ,ConfirmModal,Notify} from '@commonComp';
|
|
|
|
|
|
+import { SearchOption, Calendar } from '@commonComp';
|
|
import styles from './index.less';
|
|
import styles from './index.less';
|
|
import $ from 'jquery';
|
|
import $ from 'jquery';
|
|
import Textarea from './Textarea';
|
|
import Textarea from './Textarea';
|
|
@@ -12,41 +12,11 @@ class AddAssistCheck extends React.Component {
|
|
date: false,
|
|
date: false,
|
|
dateTime:"",
|
|
dateTime:"",
|
|
active:'',
|
|
active:'',
|
|
- visible:false,
|
|
|
|
- id:null
|
|
|
|
}
|
|
}
|
|
this.handleShowDate = this.handleShowDate.bind(this)
|
|
this.handleShowDate = this.handleShowDate.bind(this)
|
|
this.getCurrentDate = this.getCurrentDate.bind(this)
|
|
this.getCurrentDate = this.getCurrentDate.bind(this)
|
|
this.getSearchList = this.getSearchList.bind(this)
|
|
this.getSearchList = this.getSearchList.bind(this)
|
|
this.getAssistLabel = this.getAssistLabel.bind(this)
|
|
this.getAssistLabel = this.getAssistLabel.bind(this)
|
|
- this.handleDelClick = this.handleDelClick.bind(this)
|
|
|
|
- this.delConfirm = this.delConfirm.bind(this)
|
|
|
|
- this.handleCancel = this.handleCancel.bind(this)
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- handleDelClick(id){
|
|
|
|
- this.setState({
|
|
|
|
- visible:true,
|
|
|
|
- id:id
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- delConfirm(){
|
|
|
|
- const {handleDelAssist} = this.props;
|
|
|
|
- const {id} = this.state;
|
|
|
|
- handleDelAssist&&handleDelAssist(id)
|
|
|
|
- this.setState({
|
|
|
|
- visible:false,
|
|
|
|
- id:null
|
|
|
|
- })
|
|
|
|
- Notify.success("删除成功");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- handleCancel(){
|
|
|
|
- this.setState({
|
|
|
|
- visible:false,
|
|
|
|
- id:null
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
componentDidMount() {
|
|
@@ -66,7 +36,7 @@ class AddAssistCheck extends React.Component {
|
|
handleSearchShow(e) {
|
|
handleSearchShow(e) {
|
|
let tmpShow = this.state.show;
|
|
let tmpShow = this.state.show;
|
|
this.setState({ show: !tmpShow })
|
|
this.setState({ show: !tmpShow })
|
|
- // e.stopPropagation();
|
|
|
|
|
|
+ e.stopPropagation();
|
|
}
|
|
}
|
|
handleShowDate(idx){
|
|
handleShowDate(idx){
|
|
this.setState({
|
|
this.setState({
|
|
@@ -130,7 +100,7 @@ class AddAssistCheck extends React.Component {
|
|
<div>
|
|
<div>
|
|
<p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
|
|
<p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
|
|
<i onClick={()=>this.handleShowDate(idx)}></i>
|
|
<i onClick={()=>this.handleShowDate(idx)}></i>
|
|
- <a href="javascript:void(0);" onClick={(idx)=>{this.handleDelClick(idx)}}></a>
|
|
|
|
|
|
+ <a href="javascript:void(0);" onClick={()=>{handleDelAssist(idx)}}></a>
|
|
<div style={{display:this.state.date && idx == this.state.active?"block":"none",position:"relative"}}>
|
|
<div style={{display:this.state.date && idx == this.state.active?"block":"none",position:"relative"}}>
|
|
<Calendar isShow={true} handleChange={(info)=>{handleChangeDate(info,idx);this.setState({date:false})}}></Calendar>
|
|
<Calendar isShow={true} handleChange={(info)=>{handleChangeDate(info,idx);this.setState({date:false})}}></Calendar>
|
|
</div>
|
|
</div>
|
|
@@ -146,7 +116,6 @@ class AddAssistCheck extends React.Component {
|
|
}
|
|
}
|
|
render() {
|
|
render() {
|
|
const { handleChangeValue, list } = this.props;
|
|
const { handleChangeValue, list } = this.props;
|
|
- const { visible } = this.state;
|
|
|
|
return (
|
|
return (
|
|
<div className={styles.wrapper}>
|
|
<div className={styles.wrapper}>
|
|
{this.getAssistLabel()}
|
|
{this.getAssistLabel()}
|
|
@@ -156,19 +125,6 @@ class AddAssistCheck extends React.Component {
|
|
{this.getSearchList(list)}
|
|
{this.getSearchList(list)}
|
|
</SearchOption>
|
|
</SearchOption>
|
|
</div>
|
|
</div>
|
|
- <ConfirmModal
|
|
|
|
- visible={visible}
|
|
|
|
- confirm={()=>{this.delConfirm()}}
|
|
|
|
- close={this.handleCancel}
|
|
|
|
- cancel={this.handleCancel}
|
|
|
|
- okText="删除"
|
|
|
|
- cancelText='取消'
|
|
|
|
- okBorderColor={'#3B9ED0'}
|
|
|
|
- okColor={'#fff'}
|
|
|
|
- oKBg={'#3B9ED0'}
|
|
|
|
- >
|
|
|
|
- <p className={styles['center']}>是否删除该辅检项?</p>
|
|
|
|
- </ConfirmModal>
|
|
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|