Browse Source

处方详情页面的内容

raolu 7 năm trước cách đây
mục cha
commit
77e273bbe4

+ 3 - 0
css/order-tracking.css

@ -71,4 +71,7 @@
.btn-2{
    background-color: #f96565;
    color: #fff;
}
.container{
    width: 100% !important;
}

+ 18 - 0
js/buz/jw-prescription-info.js

@ -0,0 +1,18 @@
var request = getRequest(),
    code = request.code,
    patient = request.patient;
$(function(){
    var params = {
        code: code,
        patient: patient
    }
    prescriptionDetailApis.getJwPrescriptionInfo({data: params}).then(function(res){
        if(res.status == 200){
            var html = template('tmp', res.data);
            $("#main").empty().append(html);
        }else{
        }
    });
});

+ 0 - 2
js/buz/prescription-consulting.js

@ -97,9 +97,7 @@ function formatMsg(reply){
    try{
        reply = JSON.parse(reply);
    }catch(e){
        console.log(reply);
    }
    console.log(reply);
    var isSelf = (reply.sender_id==docInfo.code) ? true : false;
    var isSystem = reply.sender_id == 'system';
    var html = '';

+ 27 - 6
js/buz/prescription-tabs.js

@ -31,7 +31,7 @@ var links = [{
    name: '检查检验',
    class: ''
},{
    url: 'about:blank',
    url: 'jw-prescription-info.html?code='+jwCode+'&patient='+patiCode,
    name: '诊断/处方',
    class: ''
},{
@ -45,12 +45,12 @@ $(function(){
        //没有续方的code,就从咨询中获取对应的code
        getPrescriptionInfo();
    }else{
        initPage();
        //有续方的code,通过code获得续方详情
        getPrescriptionInfoByCode();
    }
})
function initPage(){
    
    if(!(docInfo.isLeader == '1')){
        links[0].class="hidden";
    }
@ -77,7 +77,27 @@ function getPrescriptionInfo(){
            prescriptionCode = res.data.code;
            jwCode = res.data.jwCode;
            updateLinkInfo();
            if(status<50){ //支付成功前不会有订单记录
            if(res.data.status < 50){ //支付成功前不会有订单记录
                links[2].class="hidden";
            }
            initPage();
        }else{
            toastr && toastr.warning(res.msg);
        }
    });
}
function getPrescriptionInfoByCode(){
    var params = {
        code: prescriptionCode,
        type: docInfo.isLeader == '1' ? 1 : 2
    };
    consultingAPI.getPrescriptionInfoByCode({data: params}).then(function(res){
        if(res.status == 200){
            patiCode = res.data.patient.code;
            jwCode = res.data.prescription.jwCode;
            updateLinkInfo();
            if(res.data.prescription.status < 50){ //支付成功前不会有订单记录
                links[2].class="hidden";
            }
            initPage();
@ -88,7 +108,7 @@ function getPrescriptionInfo(){
}
function updateLinkInfo(){
    link = [{
    links = [{
        url: 'prescription-consulting.html?sessionId='+sessionId,
        name: '咨询',
        class: ''
@ -109,7 +129,7 @@ function updateLinkInfo(){
        name: '检查检验',
        class: ''
    },{
        url: 'jw-prescription-info.html?code='+jwCode+'&patitent='+patiCode,
        url: 'jw-prescription-info.html?code='+jwCode+'&patient='+patiCode,
        name: '诊断/处方',
        class: ''
    },{
@ -117,4 +137,5 @@ function updateLinkInfo(){
        name: '历史续方',
        class: ''
    }];
    console.log(links);
}

+ 4 - 1
js/consulting-api.js

@ -44,8 +44,11 @@
        },
        getMembers: function(sessionId){
            return APIService.imHttpGet('/sessions/'+sessionId+'/participants');
        },
        //通过续方code,获得续方详情
        getPrescriptionInfoByCode: function(data){
            return APIService.httpGet('doctor/prescriptionInfo/getContinuedPrescriptionAsDoctor', data);
        }
    
    };
    window.consultingAPI = consulting;

+ 4 - 1
js/prescription-detail-api.js

@ -21,7 +21,10 @@
    	},
    	getReasonByType:function(data) {
    		return APIService.httpGet('doctor/prescriptionInfo/getReasonByType', data);
    	}
        },
        getJwPrescriptionInfo: function(data){
            return APIService.httpGet('doctor/prescriptionInfo/getPrescription', data);
        }
    };
    window.prescriptionDetailApis = prescriptionDetailApis;

+ 100 - 0
jw-prescription-info.html

@ -0,0 +1,100 @@
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>处方详情</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="css/animate.min.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
    <link href="css/plugins/toastr/toastr.min.css" rel="stylesheet">
    <style>
    .session-title{
        font-size: 16px;
    }
    .container{
        width: 100% !important;
    }
    </style>
</head>
<body class="white-bg plr10">
    <div id="main">
    </div>
    <div class="c-tac mb20 mt20">
        <button id="backBtn" type="button" class="btn btn-w-m btn-danger mlr20">返回</button>
    </div>
    <script  type="text/html" id="tmp">
        <h2 class="text-center">门诊</h2>
        <div class="session-title border-bottom pb5">基本信息</div>
        <div class="container">
            <div class="row mtb5">
                <div class="col-xs-6">
                    <span class="c-999">开方时间:</span>
                    <span>{{createTime}}</span>
                </div>
                <div class="col-xs-6">
                    <span class="c-999">科室/医院:</span>
                    <span>{{hospitalName}}</span>
                </div>
            </div>
            <div class="row mtb5">
                <div class="col-xs-6">
                    <span class="c-999">开方医生:</span>
                    <span>{{doctorName}}</span>
                </div>
            </div>
        </div>
    </div>
    <div class="session-title border-bottom pb5 mt20">临床诊断</div>
    <div class="container">
        <div class="row mtb5">
            <div class="col-xs-12">
                <span class="c-999">临床诊断:</span>
                <span>
                {{each prescriptionDt as dt index}}
                {{if index == 0}}
                    {{dt.name}}
                {{else}}
                    ,{{dt.name}}
                {{/if}}
                {{/each}}
                </span>
            </div>
        </div>
    </div>
    <div class="session-title pb5 mt20">RP</div>
    <table class="table">
        {{each prescriptionInfo as it}}
        <tr>
            <td>{{it.drugName}}</td>
            <td><span class="c-999">用法:</span>{{it.usageName}}</td>
            <td><span class="c-999">总量:</span>{{it.num}}{{it.drugNumUnitName}}</td>
            <td><span class="c-999">规格:</span>{{it.drugFormat}}</td>
        </tr>
        {{/each}}
    </table>
    </script>
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <script src="js/content.min.js?v=1.0.0"></script>
    <script src="js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
    <script src="js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
    <script src="js/plugins/toastr/toastr.min.js"></script>
    <script src="js/es6-promise.js"></script>
    <script src="js/underscore.js"></script>
    <script src="js/api-service.js"></script>
    <script src="js/prescription-detail-api.js"></script>
    <script src="js/util.js"></script>
    <script src="js/template.js"></script>
    <script src="js/buz/jw-prescription-info.js"></script>
</body>
</html>