Bladeren bron

历史处方页面的内容添加和其他页面bug修改

raolu 7 jaren geleden
bovenliggende
commit
6c024d3b80

+ 0 - 13
css/consulting.css

@ -13,19 +13,6 @@ p{
    margin-top: 6px;
    margin-bottom: 6px;
}
/* css3-Grid
-----------------------------------------------------------------------------*/
.ui-grid { display: -webkit-box; display: box; }
.ui-grid-middle { -webkit-box-pack: center; -webkit-box-align: center; box-pack: center; box-align: center; }
.ui-grid-vertical { -webkit-box-orient: vertical; box-orient: vertical; }
.ui-grid-label { -webkit-box-flex: 0; box-flex: 0; width: 100px; font-weight: 600; }
.ui-col-0 { -webkit-box-flex: 0; box-flex: 0; }
.ui-col-1 { -webkit-box-flex: 1; box-flex: 1; }
.ui-col-2 { -webkit-box-flex: 2; box-flex: 2; }
.ui-col-3 { -webkit-box-flex: 3; box-flex: 3; }
.ui-col-4 { -webkit-box-flex: 4; box-flex: 3; }
.ui-col-5 { -webkit-box-flex: 5; box-flex: 5; }
.ui-col-6 { -webkit-box-flex: 6; box-flex: 6; }
.c-chat-box {
	border: none;

+ 14 - 1
css/style.css

@ -5785,4 +5785,17 @@ a.c-12b7f5:hover{
a.disabled,
a.disabled:hover{
    color: #83d6f4;
}
}
/* css3-Grid
-----------------------------------------------------------------------------*/
.ui-grid { display: -webkit-box; display: box; }
.ui-grid-middle { -webkit-box-pack: center; -webkit-box-align: center; box-pack: center; box-align: center; }
.ui-grid-vertical { -webkit-box-orient: vertical; box-orient: vertical; }
.ui-grid-label { -webkit-box-flex: 0; box-flex: 0; width: 100px; font-weight: 600; }
.ui-col-0 { -webkit-box-flex: 0; box-flex: 0; }
.ui-col-1 { -webkit-box-flex: 1; box-flex: 1; }
.ui-col-2 { -webkit-box-flex: 2; box-flex: 2; }
.ui-col-3 { -webkit-box-flex: 3; box-flex: 3; }
.ui-col-4 { -webkit-box-flex: 4; box-flex: 3; }
.ui-col-5 { -webkit-box-flex: 5; box-flex: 5; }
.ui-col-6 { -webkit-box-flex: 6; box-flex: 6; }

+ 1 - 1
js/buz/consulting-list.js

@ -77,7 +77,7 @@ function getListData(isRefresh){
                    field: '',
                    title: '操作',
                    formatter: function(val, row, index){
                        return '<a class="c-12b7f5" href="prescription-main.html?sessionId='+row.session_id+'">查看</a>';
                        return '<a class="c-12b7f5" href="prescription-main.html?sessionId='+row.session_id+'&patiCode='+row.patient+'">查看</a>';
                    }
                }]
            });

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

@ -15,4 +15,8 @@ $(function(){
        }
    });
    $("#backBtn").on('click', function(){
        history.go(-1);
    });
});

+ 1 - 1
js/buz/order-list-jg.js

@ -65,7 +65,7 @@ function getPrescriptionList( refresh){
                        o.statusName = getStatusName(o.status);
                        o.express = getExpressName(o.dispensaryType);
                        o.address = address;
                        o.action = '<a class="c-12b7f5" href="prescription-main.html?code='+o.code+'&tab=2">查看</a>';
                        o.action = '<a class="c-12b7f5" href="prescription-main.html?code='+o.code+'&patiCode='+o.patientCode+'&teamCode='+teamCode+'&tab=2">查看</a>';
                        return o;
                    });
                    

+ 1 - 1
js/buz/order-list.js

@ -85,7 +85,7 @@ function getPrescriptionList( refresh){
                            address = o.expressageHospitalName;
                        }
                        o.address = address;
                        o.action = '<a class="c-12b7f5" href="prescription-main.html?code='+o.code+'&tab=2">查看</a>';
                        o.action = '<a class="c-12b7f5" href="prescription-main.html?code='+o.code+'&patiCode='+o.patientCode+'&teamCode='+teamCode+'&tab=2">查看</a>';
                        o.checkbox = '<input name="orderItem" type="checkbox" class="icon-checkbox" data-status="'+o.status+'" data-type="'+o.dispensaryType+'" data-expressage="'+o.expressageCode+'" data-code="'+o.code+'">';
                        return o;
                    });

+ 149 - 0
js/buz/prescription-list.js

@ -0,0 +1,149 @@
var request = getRequest(),
    teamCode = request.teamCode,
    patient = request.patient,
    state,
    diseases,
    startDate = '',
    endDate = '',
    totalCount = 0;
$(function(){
    if(!teamCode){
        getPatientInfo();
    }else{
        getFilter();
        getList();
    }
    bindEvents();
})
function getPatientInfo(){
    var params = {patient: patient};
    prescriptionListAPI.getPatientInfo({data: params}).then(function(res){
        if(res.status == 200){
            teamCode = res.data.jtAdminTeam;
            getFilter();
            getList();
        }else{
            toastr.warning(res.msg);
        }
    })
}
function getFilter(){
    var params = {
        teamCode: teamCode,
        patient: patient
    };
    prescriptionListAPI.getFilter({data: params}).then(function(res){
        if(res.status == 200){
            fillDropDown(res);
        }else{
            toastr.warning(res.msg);
        }
    });
}
function getList(isRefresh){
    var params = {
        startDate: startDate,
        endDate: endDate,
        state: state,
        diseases: diseases,
        teamCode: teamCode,
        patient: patient
    };
    prescriptionListAPI.getPrescriptionListCount({data: params}).then(function(res){
        if(res.status == 200){
            totalCount = res.data.total;
            if(isRefresh){
                $("#prescriptTable").bootstrapTable('refresh');
            }
            var options = $.extend(prescriptionListAPI.getPrescriptionListTableAjaxObj, {
                queryParams: queryParams,
                queryParamsType: "limit",
                pagination: true,
                paginationLoop: true,
                sidePagination: 'server',
                pageNumber: 1,
                pageSize: 10,
                responseHandler: function (res) {
                    return {
                        rows: res.data,
                        total: totalCount
                    }
                },
                columns: [{
                    field: '',
                    title:'',
                    formatter: function(val, row, index){
                        var html = template('info_tmp', row);
                        return html;
                    }
                },{
                    field: 'createTime',
                    title: '申请时间',
                    class: 'c-999 pr20',
                    align: 'right',
                    formatter: function(val, row, index){
                        return '<span class="pr10">'+val+'</span>';
                    }
                }],
                onClickRow: function(row, $el){
                    document.location.href = "prescription-detail.html?code="+row.code;
                }
            })
            $("#prescriptTable").bootstrapTable(options);
        }else{
            toastr.warning(res.msg);
        }
    });
}
function queryParams(params) {
    return {
        page: params.offset/params.limit + 1,
        size: params.limit,
        startDate: startDate,
        endDate: endDate,
        state: state,
        diseases: diseases,
        teamCode: teamCode,
        patient: patient
    };
}
function fillDropDown(res){
    var statusHtml = template('status_tmp', {list: res.data.states});
    $("#status").append(statusHtml);
    var diseaseHtml = tempalte('disease_tmp', {list: res.data.diseases});
    $("#disease").append(diseaseHtml);
}
function bindEvents(){
    $("#status").on('change', function(){
        var $this = $(this);
        state = $this.val();
        getList(true);
    });
    $("#disease").on('change', function(){
        var $this = $(this);
        disease = $this.val();
        getList(true);
    });
    $("#time").on('change', function(){
        var $this = $(this);
        var seDate = $this.val();
        startDate = seDate.startDate;
        endDate = seDate.endDate;
        getList(true);
    });
    template.helper('getStatusName', function(status){
        return getStatusName(status);
    })
}

+ 5 - 3
js/buz/prescription-tabs.js

@ -1,9 +1,10 @@
var request = getRequest(),
    tab = request.tab || 0,
    sessionId = request.sessionId, //续方咨询的sessionId 格式: 居民code+咨询code+咨询类型( 8 )
    patiCode,
    patiCode = request.patiCode || '',
    consultCode,
    prescriptionCode = request.code || '',
    teamCode = request.teamCode || '',
    jwCode; //基卫那边存储的原处方的code
var docInfo = window.localStorage.getItem("docInfo");
@ -35,7 +36,7 @@ var links = [{
    name: '诊断/处方',
    class: ''
},{
    url: 'about:blank',
    url: 'prescription-list.html?teamCode='+teamCode+'&patient='+patiCode,
    name: '历史续方',
    class: ''
}];
@ -64,6 +65,7 @@ function initPage(){
            $li = $this.parent();
        $li.siblings().removeClass("active");
        $li.addClass("active");
        tab = $this.data('index');
        parent.document.getElementById('main').src = links[tab].url;
    })
}
@ -133,7 +135,7 @@ function updateLinkInfo(){
        name: '诊断/处方',
        class: ''
    },{
        url: 'about:blank',
        url: 'prescription-list.html?teamCode='+teamCode+'&patient='+patiCode,
        name: '历史续方',
        class: ''
    }];

+ 6 - 0
js/prescription-detail-api.js

@ -22,9 +22,15 @@
    	getReasonByType:function(data) {
    		return APIService.httpGet('doctor/prescriptionInfo/getReasonByType', data);
        },
        //获得原处方的详情
        getJwPrescriptionInfo: function(data){
            return APIService.httpGet('doctor/prescriptionInfo/getPrescription', data);
        },
        //获得患者处方列表
        getJwPrescriptionList: function(data){
            return APIService.httpGet('doctor/health_record/list_medication', data);
        }
    };
    window.prescriptionDetailApis = prescriptionDetailApis;

+ 32 - 0
js/prescription-list-api.js

@ -0,0 +1,32 @@
(function(){
    var apis = {
        getFilter: function(data){
            return APIService.httpGet('doctor/prescriptionInfo/getPrescriptionFilter', data);
        },
        getPrescriptionList: function(data){
            return APIService.httpGet('doctor/prescriptionInfo/getDoctorPrescription', data);
        },
        getPrescriptionListCount: function(data){
            return APIService.httpGet('/doctor/prescriptionInfo/getDoctorPrescriptionTotal', data);
        },
        getPrescriptionListTableAjaxObj: { //表格数据获取时,使用的ajax请求配置
            method: 'get',
            url: APIService.server + 'doctor/prescriptionInfo/getDoctorPrescription', 
            contentType: "application/json",
            dataType: "json",
            ajaxOptions: {
                beforeSend: function(request) {
                    var userAgent = APIService.userAgent;
                    userAgent = JSON.stringify(userAgent);
                    request.setRequestHeader("userAgent", userAgent);
                }
            }
        },
        getPatientInfo: function(data){
            return APIService.httpGet('doctor/patient_label_info/patient', data);
        }
    };
    window.prescriptionListAPI = apis;
})(jQuery)

+ 132 - 0
prescription-list.html

@ -0,0 +1,132 @@
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>历史续方</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="css/animate.min.css" rel="stylesheet">
    <link href="css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="css/plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="js/plugins/artDialog/6.0.5/css/ui-dialog.min.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <style>
        .fixed-table-container{
            border:none;
        }
        .bootstrap-table .table{
            border-bottom: none;
            border-collapse: separate !important;
            border-spacing: 0 10px;
        }
        .fixed-table-container tbody td{
            border-left: none;
        }
        .bootstrap-table .table tr{
            background-color: #f5f5fa;
            margin-top: 10px;
        }
        .status-tag{
            display: inline-block;
            background: #12b7f5;
            color: #fff;
            padding: 3px 10px;
            border-radius: 5px;
        }
        .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
            border-top: none;
        }
    </style>
</head>
<body class="white-bg plr10">
    <form role="form" class="form-inline ptb10" onsubmit="return false;">
        <div class="form-group mr10">
            <label for="status">续方状态:</label>
            <select name="status" id="status" class="form-control input-sm">
                <option value="">所有状态</option>
            </select>
        </div>
        <div class="form-group mr10">
            <label for="disease">诊断结果:</label>
            <select name="disease" id="disease" class="form-control input-sm">
                <option value="">所有诊断</option>
            </select>
        </div>
        <div class="form-group mr10">
            <label for="time">续方时间:</label>
            <select name="time" id="time" class="form-control input-sm">
                <option value="0">全部</option>
                <option value="1">近一周</option>
                <option value="2">近一月</option>
                <option value="3">近半年</option>
                <option value="4">近一年</option>
            </select>
        </div>
    </form>
    <table id="prescriptTable" data-mobile-responsive="true" data-show-header="false" cellspacing="10" border="0">
    </table>
    <script type="text/html" id="status_tmp">
    {{each list as it}}
        <option value="{{it.code}}">{{it.value}}</option>
    {{/each}}
    </script>
    <script type="text/html" id="disease_tmp">
    {{each list as it}}
        <option value="{{it.code}}">{{it.name}}</option>
    {{/each}}
    </script>
    <script type="text/html" id="info_tmp">
    <div class="ui-grid pl10 ui-grid-middle mb10">
        <div class="ui-col-0" style="width: 130px"><span class="status-tag">{{status | getStatusName}}</span></div>
        <div class="ui-col-1">临床诊断:
            {{each prescriptionDt as it index}}
            {{if index == 0}}
            {{it.name}}
            {{else}}
            ,{{it.name}}
            {{/if}}
            {{/each}}
        </div>
    </div>
    <div class="ui-grid pl10">
        {{each prescriptionInfo as dg key}}
        {{if key < 2}}
        <div class="ui-col-1">
            <span class="mr30">{{dg.drugName}}</span>
            <span>{{dg.num}}{{dg.drugNumUnitName}}</span>
        </div>
        {{/if}}
        {{/each}}
    </div>
    </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/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="js/plugins/layer/layer.min.js"></script>
    <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="js/hplus.min.js?v=4.1.0"></script>
    <script src="js/plugins/pace/pace.min.js"></script>
    <script src="js/plugins/toastr/toastr.min.js"></script>
    <script src="js/plugins/artDialog/6.0.5/js/dialog-plus.min.js"></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/es6-promise.js"></script>
    <script src="js/underscore.js"></script>
    <script src="js/util.js"></script>
    <script src="js/template.js"></script>
    <script src="js/api-service.js"></script>
    <script src="js/prescription-list-api.js"></script>
    <script src="js/buz/prescription-list.js"></script>
</body>
</html>

+ 2 - 2
prescription-tabs.html

@ -38,9 +38,9 @@
        </ul>
        <script type="text/html" id="tab_tmp">
        {{each list as it}}
        {{each list as it index}}
            <li class="{{it.class}}">
                <a href="{{it.url}}" target="view_frame">{{it.name}}</a>
                <a href="{{it.url}}" target="view_frame" data-index="{{index}}">{{it.name}}</a>
            </li>
        {{/each}}
        </script>