|
@@ -6,6 +6,9 @@ import diagDown from './img/diagDown.png'
|
|
|
import {ConfirmModal, Message} from '@commonComp';
|
|
|
import Notify from '@commonComp/Notify';
|
|
|
import Treat from '@containers/Treat'
|
|
|
+import store from '@store';
|
|
|
+import { pushAllDataList } from '@utils/tools';
|
|
|
+import iconRadioDefault from '@common/images/icon-radio-default.png'
|
|
|
|
|
|
class DiagnosticList extends Component {
|
|
|
constructor(props) {
|
|
@@ -13,7 +16,8 @@ class DiagnosticList extends Component {
|
|
|
this.state = {
|
|
|
visible: false,
|
|
|
delItem: {},
|
|
|
- treatTitle: ''
|
|
|
+ treatTitle: '',
|
|
|
+ activeHistory: -1
|
|
|
}
|
|
|
this.deleteItem = this.deleteItem.bind(this);
|
|
|
this.cancel = this.cancel.bind(this);
|
|
@@ -91,16 +95,45 @@ class DiagnosticList extends Component {
|
|
|
hideReferRecord && hideReferRecord()
|
|
|
}
|
|
|
referCase() {
|
|
|
- const { hideHistoryCaseModal } = this.props
|
|
|
+ const { hideHistoryCaseModal, items } = this.props
|
|
|
hideHistoryCaseModal && hideHistoryCaseModal()
|
|
|
+ if (this.state.activeHistory === -1) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let baseList = store.getState();
|
|
|
+
|
|
|
+ let baseObj = items[this.state.activeHistory];
|
|
|
+
|
|
|
+ // store.dispatch({type: CONFIRM_TYPE, confirmType: baseObj.sign});
|
|
|
+ pushAllDataList(baseObj.sign,'push',baseObj,'history') //引用
|
|
|
+ store.dispatch(billing())
|
|
|
+ this.setState({
|
|
|
+ activeHistory: -1
|
|
|
+ })
|
|
|
}
|
|
|
closeHistoryCaseModal() {
|
|
|
const { hideHistoryCaseModal } = this.props
|
|
|
+ this.setState({
|
|
|
+ activeHistory: -1
|
|
|
+ })
|
|
|
hideHistoryCaseModal && hideHistoryCaseModal()
|
|
|
}
|
|
|
+ handleQuoteClick(item, index) {
|
|
|
+ console.log('asadsd', item)
|
|
|
+ const { handleQuoteClick } = this.props
|
|
|
+ // handleQuoteClick && handleQuoteClick(item)
|
|
|
+ this.setState({
|
|
|
+ activeHistory: index
|
|
|
+ })
|
|
|
+ }
|
|
|
getHistoryCase() {
|
|
|
+ const { items } = this.props
|
|
|
return (<div className={style['history-info']}>
|
|
|
-
|
|
|
+ {items.map((item, index) => {
|
|
|
+ return<div onClick={this.handleQuoteClick.bind(this, item, index)} style={this.state.activeHistory === index ? {color: '#abcdef'} : ''}>
|
|
|
+ <img src={iconRadioDefault}/>{item.diagnose}
|
|
|
+ </div>
|
|
|
+ })}
|
|
|
</div>)
|
|
|
}
|
|
|
|
|
@@ -142,7 +175,7 @@ class DiagnosticList extends Component {
|
|
|
<div className={style['confirm-info']}>是否引用往期病历</div>
|
|
|
</ConfirmModal>
|
|
|
<ConfirmModal visible={showHistoryCase} noFooter='true' title='请选择历史病历' close={this.closeHistoryCaseModal}>
|
|
|
- {this.getHistoryCase}
|
|
|
+ {this.getHistoryCase()}
|
|
|
<div className={style['confirm-history']}><span className={style['confirm-history-btn']} onClick={this.referCase}>确定</span></div>
|
|
|
</ConfirmModal>
|
|
|
</div>
|