Browse Source

Merge branch 'master' of http://192.168.1.220:10080/raolu/PC-prescription

linehang 7 years ago
parent
commit
0cabbeb0b5

+ 1 - 1
index.html

@ -95,7 +95,7 @@
                </nav>
            </div> -->
            <div class="row J_mainContent" id="content-main">
                <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="" frameborder="0" data-id="" seamless></iframe>
                <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="about:blank" frameborder="0" data-id="" seamless></iframe>
            </div>
        </div>
        <!--右侧部分结束-->

+ 7 - 3
js/api-service.js

@ -150,10 +150,11 @@
        }
        setTimeout(function() {
            sessionStorage.setItem("wlyy_relogin", 1)
            top.location.replace(loginUrl + '?redirect_url=' + encodeURIComponent(location.href))
            top.location.replace(loginUrl + '?redirect_url=' + encodeURIComponent(top.location.href))
        }, 2000)
    }
    var count = 0;
    function failCodeHandle(res) {
        var tip = "";
        if(res.status == 999) {
@ -164,8 +165,11 @@
            tip = "此账号未登录,请先登录"
        }
        if(tip) {
            toastr && toastr.warning(tip)
            toLoginPage()
            count ++;
            if(count == 1){
                toastr && toastr.warning(tip)
                toLoginPage()
            }
        }
    }

+ 8 - 2
js/buz/consulting-list.js

@ -2,7 +2,7 @@ var request = getRequest();
var doctor = APIService.userAgent.uid,
    reply = request.reply,
    status = request.status,
    status = request.status | '',
    patientName = '',
    startDate = '',
    endDate = '',
@ -111,12 +111,17 @@ function bindEvents(){
            var seDate = getStartEndDate($(this).attr("data-val"));
            startDate = seDate.startDate;
            endDate = seDate.endDate;
            $('#listTable').bootstrapTable('refreshOptions',{pageNumber:1});
            getListData(true);
        }
    });
    $("#searchName").on('keyup', function(){
    $("#searchName").on('keyup', function(e){
        if (e.which === 13) {
            var $input = $("#searchName"),
                text = $.trim($input.val());
            patientName = text;
            $('#listTable').bootstrapTable('refreshOptions',{pageNumber:1});
            getListData(true);
        }
    })
@ -125,6 +130,7 @@ function bindEvents(){
        var $input = $("#searchName"),
            text = $.trim($input.val());
        patientName = text;
        $('#listTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getListData(true);
    });
}

+ 4 - 0
js/buz/order-list-jg.js

@ -119,6 +119,7 @@ function bindEvents(){
            var seDate = getStartEndDate($(this).attr("data-val"));
            startDate = seDate.startDate;
            endDate = seDate.endDate;
            $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
            getPrescriptionList(true);
        }
    });
@ -126,11 +127,13 @@ function bindEvents(){
    $("#orderStatus").on('change', function(){
        var $this = $(this);
        state = $this.val();
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getPrescriptionList(true);
    });
    
    $("#address").on('change', function(){
        hospital = $(this).val();
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getPrescriptionList(true);
    });
@ -138,6 +141,7 @@ function bindEvents(){
        var $input = $("#searchName"),
            text = $.trim($input.val());
        nameKey = text;
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getPrescriptionList(true);
    });

+ 19 - 11
js/buz/order-list.js

@ -8,6 +8,7 @@ var startDate = '',
    state = '', //状态
    dispensaryType = '', //配送方式
    page = 1,
    jgPage = 1,
    size = 10,
    hospital = '', //服务站code
    allocationType, //是否是待分配续方
@ -75,7 +76,14 @@ function getPrescriptionList( refresh){
                            }
                        }
                        o.result = result;
                        o.statusName = getStatusName(o.status);
                        if(o.status == '50'){
                            o.statusName = '订单已支付';
                        }else if(o.status == '60'){
                            o.statusName = '配药完成';
                        }else{
                            o.statusName = getStatusName(o.status);
                        }
                        
                        o.express = getExpressName(o.dispensaryType);
                        var address = "",
                            expressage = "";
@ -107,9 +115,7 @@ function getPrescriptionList( refresh){
function queryParams(params) {
    //当表格数据变化的时候,则取消全选按钮,然后之前的选中的信息将取消选中
//  if(page != 1){
        page = params.offset/params.limit + 1;
//  }
    page = params.offset/params.limit + 1;
    selectItemNum = 0;
    $("#selectAll").prop("checked", false);
    $("#selectedCount").text(0);
@ -185,8 +191,9 @@ function getHealthDoctorList(isRefresh){
function queryParams2(params) {
    //当表格数据变化的时候,则取消全选按钮,然后之前的选中的信息将取消选中
    jgPage = params.offset/params.limit + 1
    return {
        page: params.offset/params.limit + 1,
        page: jgPage,
        size: params.limit,
        name: $.trim($("#doctorName").val())
    };
@ -215,7 +222,7 @@ function bindEvents(){
            var seDate = getStartEndDate($(this).attr("data-val"));
            startDate = seDate.startDate;
            endDate = seDate.endDate;
            page = 1;
            $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
            getPrescriptionList(true);
        }
    });
@ -223,7 +230,7 @@ function bindEvents(){
    $("#orderStatus").on('change', function(){
        var $this = $(this);
        state = $this.val();
        page = 1;
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getPrescriptionList(true);
    });
@ -236,13 +243,13 @@ function bindEvents(){
            $("#allocationType").prop("checked", false);
            allocationType = 0;
        }
        page = 1;
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getPrescriptionList(true);
    });
    
    $("#address").on('change', function(){
        hospital = $(this).val();
        page = 1;
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getPrescriptionList(true);
    });
@ -253,7 +260,7 @@ function bindEvents(){
        }else{
            allocationType = 0;
        }
        page = 1;
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getPrescriptionList(true);
    });
@ -261,7 +268,7 @@ function bindEvents(){
        var $input = $("#searchName"),
            text = $.trim($input.val());
        nameKey = text;
        page = 1;
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getPrescriptionList(true);
    });
@ -313,6 +320,7 @@ function bindEvents(){
    $("#doctorName").on('keyup', function(e){
        if (e.which === 13) {
            $('#hDoctor').bootstrapTable('refreshOptions',{pageNumber:1});
            getHealthDoctorList(true);
        }
    });

+ 5 - 5
js/buz/prescription-adjustment.js

@ -187,8 +187,8 @@ $(function(){
				data.drugRate = $box.eq(i).find('.j-selFreq').attr('data-code');
				data.drugRateName = $box.eq(i).find('.j-selFreq').val();
	   		    data.drugFormat=saveData.drugFormat.replace(/\(/,'(').replace(/\)/,')'); 
	   		    data.subjectClass = $box.eq(i).attr('data-class');
	   		    data.isRefrigerate = $box.eq(i).attr('data-storage')==2?1:0;
	   		    data.subjectClass = saveData.subjectClass; //$box.eq(i).attr('data-class');
	   		    data.isRefrigerate = saveData.isRefrigerate==2?1:0 //$box.eq(i).attr('data-storage')==2?1:0;
		 		data.physicAmount = "";
		 		data.physicAmountUnit = saveData.physicAmountUnit;
		 		data.physicAmountUnitName = saveData.physicAmountUnitName;
@ -197,7 +197,7 @@ $(function(){
		 		data.physicDoseUnitName = $box.eq(i).find('.j-dose-unit').text(); 
		 		data.drugNumUnit = $box.eq(i).find('.j-sumMedicine').attr('data-unit');//取当次用量单位
		 		data.drugNumUnitName = $box.eq(i).find('.j-sumMedicine').attr('data-name'); 
		 		data.drugUsage= $box.eq(i).find('.j-method').attr('data-code');
		 		data.drugUsage= $box.eq(i).find('.j-method').attr('data-id');
		 		data.usageName= $box.eq(i).find('.j-method').val();
		 		data.num= $box.eq(i).find(".j-sumMedicine").attr('data-num');//取总量
		 		data.dayCount=$box.eq(i).find('.j-selDate').val();
@ -300,7 +300,7 @@ $(function(){
				$sum = $box.find('.j-sumMedicine'),
				$method = $box.find('.j-method');
			var json = v.json;	
			$box.attr('data-json',JSON.stringify(json))
			$box.attr('data-json',json)
			$single.val(json.physicDose)
			$single.attr('data-code', json.physicDoseUnit)
			$doseUnit.text(json.physicDoseUnitName)
@ -356,7 +356,7 @@ $(function(){
	      effectiveFields: ['name'],
	      ignorecase: true
	    }).on('onSetSelectValue', function (e, v) {
	        
//	        console.log(e);
	    })
	}
	

+ 4 - 2
js/buz/prescription-detail.js

@ -7,7 +7,8 @@ $(function(){
	    isLeader = isTeamLeader() && (teamCode == docInfo.adminTeamCode),
	    prescriptionCode = request.code,
	    from = request.from, // 判断是否是tab页加载进来
	    fromTabIdx = request.fromTabIdx; 
	    fromTabIdx = request.fromTabIdx,
	    jwCode;
    
    var $main = $('#main');
    
@ -109,10 +110,11 @@ $(function(){
	    	strOriginalData = detailData;
	    	jwHospital = prescription.jwHospital;
	    	jwDoctorCode = prescription.jwDoctorCode;
	    	jwCode = prescription.jwCode;
	    	var diagnosisNames = _.pluck(diagnosis,'name').join('、')
    		prescriptionDetailApis.getPrescription({
    			data: {
    				code: prescriptionCode, 
    				code: jwCode, 
    				patient: patient.code
    			}
    		}).then(function(res) {

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

@ -125,12 +125,14 @@ function bindEvents(){
    $("#status").on('change', function(){
        var $this = $(this);
        state = $this.val();
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getList(true);
    });
    $("#disease").on('change', function(){
        var $this = $(this);
        diseases = $this.val();
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getList(true);
    });
@ -139,6 +141,7 @@ function bindEvents(){
        var seDate = getStartEndDate($this.val());
        startDate = seDate.startDate;
        endDate = seDate.endDate;
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getList(true);
    });

+ 5 - 1
js/buz/prescription-management.js

@ -74,7 +74,7 @@ function getPrescriptionList( refresh){
				    	}
                        o.drugs = getDrugs(o.prescriptionInfo);
                        o.daysRemaining = getDaysRemaining(o)
                        o.action = '<a class="c-12b7f5" href="prescription-detail.html?id='+teamCode+'&code='+o.code+'">查看</a>';
                        o.action = '<a class="c-12b7f5" href="prescription-main.html?tab=1&teamCode='+teamCode+'&code='+o.code+'">查看</a>';
                        return o;
                    });
                    
@ -134,6 +134,7 @@ function bindEvents(){
            var seDate = getStartEndDate($(this).attr("data-val"));
            startDate = seDate.startDate;
            endDate = seDate.endDate;
            $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
            getPrescriptionList(true);
        }
    });
@ -141,11 +142,13 @@ function bindEvents(){
    $("#presctiptionStatus").on('change', function(){
        var $this = $(this);
        state = $this.val();
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getPrescriptionList(true);
    });
    $("#express").on('change', function(){
        dispensaryType = $(this).val();
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getPrescriptionList(true);
    });
    
@ -154,6 +157,7 @@ function bindEvents(){
        var $input = $("#searchName"),
            text = $.trim($input.val());
        nameKey = text;
        $('#prescriptTable').bootstrapTable('refreshOptions',{pageNumber:1});
        getPrescriptionList(true);
    });
}

+ 10 - 8
js/contabs.min.js

@ -106,12 +106,12 @@ $(function() {
        //         if (!$(this).hasClass("active")) {
        //             $(this).addClass("active").siblings(".J_menuTab").removeClass("active");
        //             g(this);
                    $(".J_mainContent .J_iframe").each(function() {
                        if ($(this).data("id") == o) {
                            $(this).show().siblings(".J_iframe").hide();
                            return false
                        }
                    })
//                  $(".J_mainContent .J_iframe").each(function() {
//                      if ($(this).data("id") == o) {
//                          $(this).show().siblings(".J_iframe").hide();
//                          return false
//                      }
//                  })
        //         }
        //         k = false;
        //         return false
@ -120,8 +120,10 @@ $(function() {
        if (k) {
            // var p = '<a href="javascript:;" class="active J_menuTab" data-id="' + o + '">' + l + ' <i class="fa fa-times-circle"></i></a>';
            // $(".J_menuTab").removeClass("active");
            var n = '<iframe class="J_iframe" name="iframe' + m + '" width="100%" height="100%" src="' + o + '" frameborder="0" data-id="' + o + '" seamless></iframe>';
            $(".J_mainContent").find("iframe.J_iframe").hide().parents(".J_mainContent").append(n);
//          var n = '<iframe class="J_iframe" name="iframe' + m + '" width="100%" height="100%" src="' + o + '" frameborder="0" data-id="' + o + '" seamless></iframe>';
            $(".J_mainContent").find("iframe.J_iframe").attr("src", o);
            $(".J_mainContent").find("iframe.J_iframe").attr("id", o);
//          $(".J_mainContent").append(n);
            // $(".J_menuTabs .page-tabs-content").append(p);
            // g($(".J_menuTab.active"))
        }

+ 5 - 3
js/plugins/suggest/bootstrap-suggest.min.js

@ -98,7 +98,9 @@
        } else {
            setOrGetDataId($input, keywords.id || '').val(keywords.key).focus();
        }
        if(keywords){
            keywords.json = unescape(keywords.json);
        }
        $input.trigger('onSetSelectValue', [keywords, (options.data.value || options._lastData.value)[keywords.index]]);
    }
    /**
@ -370,9 +372,9 @@
                    tds.push('<td data-name="', field, '">', dataI[field], '</td>');
                }
            }
            var str = JSON.stringify(dataI);
            html.push('<tr data-index="', (dataI.__index || i),
            	'" data-json=', JSON.stringify(dataI),
            	'" data-json=', escape(str),
                ' data-id="', idValue,
                '" data-key="', keyValue, '">',
                tds.join(''), '</tr>');

+ 2 - 2
login.html

@ -133,8 +133,8 @@
						                </div>
						                <button type="submit" class="btn btn-success block full-width m-b">登 录</button>
						
						                <p class="text-muted text-center"> <a href="login.html#"><small>忘记密码了?</small></a> | <a href="register.html">注册一个新账号</a>
						                </p>
						                <!--<p class="text-muted text-center"> <a href="login.html#"><small>忘记密码了?</small></a> | <a href="register.html">注册一个新账号</a>
						                </p>-->
						
						            </form>
	                            </div>