|
@@ -78,31 +78,20 @@ class PrintPreview extends Component {
|
|
|
this.props.onClose()
|
|
|
}
|
|
|
surePrint(jsonData,jsonStr,whichSign){
|
|
|
- if(whichSign == 0){
|
|
|
- if(jsonData.chief.length < 1){
|
|
|
- Notify.info('主诉不能为空');
|
|
|
- return;
|
|
|
- }else if(jsonData.diag.length < 1){
|
|
|
- Notify.info('诊断不能为空');
|
|
|
- return;
|
|
|
- }else{
|
|
|
- this.onPrint();
|
|
|
- this.props.save(true)
|
|
|
- }
|
|
|
+ console.log(jsonData)
|
|
|
+ console.log(jsonStr)
|
|
|
+ if(JSON.parse(jsonStr.chief).length == 1 && JSON.parse(jsonStr.chief)[0].trim() ==''){
|
|
|
+ Notify.info('主诉不能为空');
|
|
|
+ return false;
|
|
|
+ }else if(jsonStr.chief && JSON.parse(jsonStr.chief).length < 1){
|
|
|
+ Notify.info('主诉不能为空');
|
|
|
+ return false;
|
|
|
+ }else if(!jsonStr.diag || jsonStr.diag.trim().length < 1){
|
|
|
+ Notify.info('诊断不能为空');
|
|
|
+ return false;
|
|
|
}else{
|
|
|
- if(JSON.parse(jsonStr.chief).length == 1 && JSON.parse(jsonStr.chief)[0] ==''){
|
|
|
- Notify.info('主诉不能为空');
|
|
|
- return;
|
|
|
- }else if(JSON.parse(jsonStr.chief).length < 1){
|
|
|
- Notify.info('主诉不能为空');
|
|
|
- return;
|
|
|
- }else if(jsonStr.diag.trim().length < 1){
|
|
|
- Notify.info('诊断不能为空');
|
|
|
- return;
|
|
|
- }else{
|
|
|
- this.onPrint();
|
|
|
- this.props.save(true)
|
|
|
- }
|
|
|
+ this.onPrint();
|
|
|
+ this.props.save(true)
|
|
|
}
|
|
|
}
|
|
|
render() {
|