Procházet zdrojové kódy

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

chenweida před 7 roky
rodič
revize
a78f5e5155
53 změnil soubory, kde provedl 12506 přidání a 107 odebrání
  1. 4 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/prescription/PrescriptionDao.java
  2. 10 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/prescription/PrescriptionExpressage.java
  3. 20 9
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java
  4. 76 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/4.1.7/css/artDialog.css
  5. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/4.1.7/images/articons.png
  6. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/4.1.7/images/loading.gif
  7. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/4.1.7/images/tips-icon.png
  8. 2096 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/4.1.7/js/artDialog.js
  9. 58 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/css/doc.css
  10. 435 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/css/ui-dialog.css
  11. 1314 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/index.html
  12. 1648 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/js/dialog-plus.js
  13. 67 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/js/doc.js
  14. 5 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/js/jquery.js
  15. 9 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/js/sh_languages.js
  16. 435 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/css/ui-dialog.css
  17. 126 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/css/ui-dialog.min.css
  18. 930 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/js/dialog-plus.js
  19. 1 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/js/dialog-plus.min.js
  20. 1597 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/css/chatRoom.css
  21. 342 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/css/cross.css
  22. 496 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/css/cross.ui.css
  23. 61 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/css/prescription-consulting.css
  24. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/bofang_icon.png
  25. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/loading2.gif
  26. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/logo_dibu_img.png
  27. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/xitongtixing_im_icon.png
  28. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/youshanjiao_bg.png
  29. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuyin-2.gif
  30. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuyin.gif
  31. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuyin2_icon.png
  32. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuyin3.gif
  33. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuyin4_icon.png
  34. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuyin_icon.png
  35. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuying_icon.png
  36. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuying_icon5.png
  37. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/zuoshanjiao_bg.png
  38. 38 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/iscroll2/5.1.3/css/iscroll.css
  39. binární
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/iscroll2/5.1.3/images/pull_update.png
  40. 2213 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/iscroll2/5.1.3/js/iscroll.js
  41. 5 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/js/jquery.js
  42. 241 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/js/prescription_consulting_info.js
  43. 38 0
      patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/prescription_consulting_info.html
  44. 1 3
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/third/jw/JwPrescriptionService.java
  45. 1 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionDispensaryCodeDao.java
  46. 12 6
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java
  47. 140 40
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PatientPrescriptionPayService.java
  48. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionAdjustService.java
  49. 29 16
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionDispensaryCodeService.java
  50. 0 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwPrescriptionService.java
  51. 2 6
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionController.java
  52. 1 24
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionPayController.java
  53. 54 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/ylzpay/ThirdPayController.java

+ 4 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/dao/prescription/PrescriptionDao.java

@ -30,4 +30,8 @@ public interface PrescriptionDao extends PagingAndSortingRepository<Prescription
    @Query("from Prescription p where p.visitNo=?1 and p.recipeNo=?2")
    Prescription findByVisitNoAndRecipeNo(String visitNo,String recipeNo);
    @Modifying
    @Query("update Prescription p set p.jwPayStatus=1 where p.code=?1")
    void updatejwPayStatus(String prescriptionCode);
}

+ 10 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/prescription/PrescriptionExpressage.java

@ -49,6 +49,8 @@ public class PrescriptionExpressage extends IdEntity {
    private Date createTime;                //创建的时间
    private Integer del;    //1可用 0删除
    private Date deliveryTime; //送达时间
    @Column(name = "code", unique = true , nullable=false)
@ -304,4 +306,12 @@ public class PrescriptionExpressage extends IdEntity {
    public void setAcceptTime(Date acceptTime) {
        this.acceptTime = acceptTime;
    }
    public Date getDeliveryTime() {
        return deliveryTime;
    }
    public void setDeliveryTime(Date deliveryTime) {
        this.deliveryTime = deliveryTime;
    }
}

+ 20 - 9
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java

@ -1,5 +1,6 @@
package com.yihu.wlyy.service.service.prescription;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
@ -831,10 +832,6 @@ public class PrescriptionService extends ZysoftBaseService{
        params.put("visitNo",visitNo);
        String response = postSecond("getDispUnSettleFeeInfoList","查询处方结算结果列表",params,null,header,false,2);
        //添加日志到wlyy_zy_push_log表
        addZyPushLog(response,"getDispUnSettleFeeInfoList","查询处方结算结果列表",null  ,"POST","","2","");
        return response;
    }
@ -843,6 +840,7 @@ public class PrescriptionService extends ZysoftBaseService{
     * @param  prescriptionCode 处方号
     * @throws Exception
     */
    @Transactional
    public String executeSickSettle(String prescriptionCode)  throws Exception
    {
        Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
@ -904,10 +902,18 @@ public class PrescriptionService extends ZysoftBaseService{
        }
        String response = postSecond("executeSickSettle","院内结算确认接口",null,json,header,false,2);
        //添加日志到wlyy_zy_push_log表
        addZyPushLog(response,"executeSickSettle","院内结算确认接口",null  ,"POST","","3","");
        if(StringUtils.isNotBlank(response)){
            JSONObject reobj =  JSON.parseObject(response);
            Integer code = reobj.getInteger("CODE");
            String errmsg = reobj.getString("MESSAGE");
            if(1 != code){
                throw new Exception("基卫接口(院内结算确认接口)请求失败,"+errmsg);
            }else{
                prescriptionDao.updatejwPayStatus(prescriptionCode);
            }
        }else{
            throw new Exception("基卫接口(院内结算确认接口)请求失败,无数据返回!");
        }
        return response;
    }
@ -1025,7 +1031,12 @@ public class PrescriptionService extends ZysoftBaseService{
        vo.setD_phone(prescriptionExpressage.getPhone());
        vo.setPay_method(2);
        vo.setExpress_type(11);
        vo.setReceive_time("");//---2017.08.22-huangwnejie,新增收件时间,默认先放空
        //---2017.08.30-huangwnejie,新增收件时间
        if(prescriptionExpressage.getDeliveryTime() != null ){
            vo.setReceive_time(DateUtil.dateToStrLong(prescriptionExpressage.getDeliveryTime()));
        }else{
            vo.setReceive_time("");
        }
        vo.setInfos(prescriptionInfolist);

+ 76 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/4.1.7/css/artDialog.css

@ -0,0 +1,76 @@
@charset "utf-8";
/*
 * artDialog skin
 * http://code.google.com/p/artdialog/
 * (c) 2009-2011 TangBin, http://www.planeArt.cn
 *
 * This is licensed under the GNU LGPL, version 2.1 or later.
 * For details, see: http://creativecommons.org/licenses/LGPL/2.1/
 */
 
/* common start */
body { _margin:0; _height:100%; /*IE6 BUG*/ }
.aui_outer { text-align:left; }
table.aui_border, table.aui_dialog { border:0; margin:0; border-collapse:collapse; width:auto; }
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_c, .aui_e, .aui_sw, .aui_s, .aui_se, .aui_header, .aui_tdIcon, .aui_main, .aui_footer { padding:0; }
.aui_header, .aui_buttons button { font: 12px/1.11 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; _font-family:Tahoma,Arial,Helvetica,STHeiti; -o-font-family: Tahoma, Arial; }
.aui_title { overflow:hidden; text-overflow: ellipsis; }
.aui_state_noTitle .aui_title { display:none; }
.aui_close {display:block; position:absolute; text-decoration:none; outline:none; _cursor:pointer; }
.aui_close:hover {text-decoration:none;}
.aui_main { text-align:center; min-width:9em; min-width:0\9/*IE8 BUG*/; }
.aui_content {*zoom:1; *display:inline; text-align:left; border:none 0; }
.aui_content.aui_state_full { display:block; width:100%; margin:0; padding:0!important; height:100%; }
.aui_loading { width:96px; height:32px; text-align:left; text-indent:-999em; overflow:hidden; background:url(../images/loading.gif) no-repeat center center; }
.aui_icon { vertical-align: middle; }
.aui_icon div { width:48px; height:48px; margin:10px 0 10px 10px; background-position: center center; background-repeat:no-repeat; }
.aui_buttons { padding:8px 8px 32px 8px; text-align:center; white-space:nowrap; }
.aui_buttons button { margin-left:15px; padding: 10px 30px; cursor: pointer; display: inline-block; border-radius:2px; text-align: center; line-height: 1; *padding:5px 15px; *height:2em; font-family: Tahoma, Arial/9!important; width:auto; overflow:visible; *width:1; color: #333; border: solid 1px #cbcbcb; background: #f3f3f3; opacity:.9;}
.aui_buttons button::-moz-focus-inner{ border:0; padding:0; margin:0; }
.aui_buttons button:focus { outline:none 0; border-color:#47d7ad; opacity:.9; }
.aui_buttons button:hover { color:#000; border-color:#ccc; opacity:1; }
.aui_buttons button:active { border-color:#666; opacity:1;}
.aui_buttons button[disabled] { cursor:default; color:#666; background:#DDD; border: solid 1px #999; filter:alpha(opacity=50); opacity:.5; box-shadow:none; }
button.aui_state_highlight { color: #FFF; border-color:#47d7ad; background: #47d7ad;}
button.aui_state_highlight:hover { color:#FFF; border-color:#47d7ad; }
button.aui_state_highlight:active { border-color:#47d7ad;}
/* common end */
.aui_inner { background:#FFF; -webkit-box-shadow:0px 0px 5px #ccc; box-shadow:0px 0px 5px #ccc;}
.aui_outer, .aui_inner { border:0; }
.aui_border { /*box-shadow: inset 0 0 1px rgba(255, 255, 255, .9);*/ }
.aui_nw, .aui_ne, .aui_sw, .aui_se { width:8px; height:8px;}
.aui_nw {border-top-left-radius:5px;}
.aui_ne {border-top-right-radius:5px;}
.aui_sw {border-bottom-left-radius:5px;}
.aui_se {border-bottom-right-radius:5px;}
.aui_nw, .aui_n, .aui_ne, .aui_w, .aui_e, .aui_sw, .aui_s, .aui_se { }
.aui_state_lock .aui_nw, .aui_state_lock .aui_n, .aui_state_lock .aui_ne, .aui_state_lock .aui_w, .aui_state_lock .aui_e, .aui_state_lock .aui_sw, .aui_state_lock .aui_s, .aui_state_lock .aui_se {}
.aui_state_focus .aui_dialog { }
.aui_state_focus .aui_outer { }
.aui_state_lock .aui_border { /*box-shadow:0 3px 26px rgba(0, 0, 0, 0.9);*/ }
.aui_state_drag .aui_outer, .aui_outer:active { box-shadow:none; }
.aui_titleBar { position:relative; height:100%; background:#dcdddd }
.aui_title { height:50px; line-height:50px; padding:0 20px; text-align:left; color:#000; font-size:14px; font-weight:bold; background:#fff; border-bottom:#f2f2f2 1px solid; _height:35px; _line-height:35px; _padding:15px 20px 0 20px;}
.aui_state_focus .aui_title { color:#3d3d3d; }
.aui_state_drag .aui_title { color:#000}
.aui_state_drag .aui_titleBar { box-shadow:none; }
.aui_close { padding:0; top:0px; right:-40px; width:40px; height:40px; line-height:40px; font-size:26px; color:#a8a8a8 !important; text-align:center; background:#fafafa; }
.aui_close:hover {color:#ed6f74 !important; line-height:40px; line-height:40px\0; *line-height:40px;}
.aui_close:active { box-shadow: none; }
.aui_content { color:#666; }
.aui_state_focus .aui_content { color:#7d7d7d; }
.aui_buttons { background-color:#fff; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_se { width:3px; height:3px; }
.aui_state_noTitle .aui_inner { border:1px solid #666; background:#FFF; }
.aui_state_noTitle .aui_outer { border:none 0; box-shadow:none; }
.aui_state_noTitle .aui_nw, .aui_state_noTitle .aui_n, .aui_state_noTitle .aui_ne, .aui_state_noTitle .aui_w, .aui_state_noTitle .aui_e, .aui_state_noTitle .aui_sw, .aui_state_noTitle .aui_s, .aui_state_noTitle .aui_se { }
.aui_state_noTitle .aui_titleBar { bottom:0; _bottom:0; _margin-top:0; }
.aui_state_noTitle .aui_close { top:0; right:0; width:18px; height:18px; line-height:18px; text-align:center; text-indent:0; font-size:18px; text-decoration:none; color:#214FA3; background:none; filter:!important; }
.aui_state_noTitle .aui_close:hover, .aui_state_noTitle .aui_close:active { text-decoration:none; color:#900; }
.aui_state_noTitle .aui_dialog { box-shadow: none; }
.art-icon {display:inline-block; background:url(../../../../images/articons.png) no-repeat; vertical-align: text-top; overflow:hidden; *display:inline; *zoom:1; width:15px; height:15px; position:relative; top:2px; margin-right:10px}
.icon-title-add {background-position:0 0;}
.icon-title-edit {background-position:0 -33px;}
.icon-title-ask {background-position:0 -100px;}
.icon-title-error {background-position:0 -67px;}

binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/4.1.7/images/articons.png


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/4.1.7/images/loading.gif


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/4.1.7/images/tips-icon.png


+ 2096 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/4.1.7/js/artDialog.js

@ -0,0 +1,2096 @@
/*!
 * artDialog 4.1.7
 * Date: 2013-03-03 08:04
 * http://code.google.com/p/artdialog/
 * (c) 2009-2012 TangBin, http://www.planeArt.cn
 *
 * This is licensed under the GNU LGPL, version 2.1 or later.
 * For details, see: http://creativecommons.org/licenses/LGPL/2.1/
 */
 
;(function (window, undefined) {
//if (window.jQuery) return jQuery;
var $ = window.art = function (selector, context) {
    	return new $.fn.init(selector, context);
	},
    readyBound = false,
    readyList = [],
    DOMContentLoaded,
	isOpacity = 'opacity' in document.documentElement.style,
	quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
	rclass = /[\n\t]/g,
	ralpha = /alpha\([^)]*\)/i,
	ropacity = /opacity=([^)]*)/,
    rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/;
if (window.$ === undefined) window.$ = $;
$.fn = $.prototype = {
	constructor: $,
	
    /**
	 * DOM 就绪
	 * @param	{Function}	回调函数
	 */
    ready: function (callback) {
        $.bindReady();
        if ($.isReady) {
            callback.call(document, $);
        } else if (readyList) {
            readyList.push(callback);
        };
        return this;
    },
    /**
	 * 判断样式类是否存在
	 * @param	{String}	名称
	 * @return	{Boolean}
	 */
    hasClass: function (name) {		
		var className = ' ' + name + ' ';
		if ((' ' + this[0].className + ' ').replace(rclass, ' ')
		.indexOf(className) > -1) return true;
		return false;
    },
    /**
	 * 添加样式类
	 * @param	{String}	名称
	 */
    addClass: function (name) {
        if (!this.hasClass(name)) this[0].className += ' ' + name;
        return this;
    },
    /**
	 * 移除样式类
	 * @param	{String}	名称
	 */
    removeClass: function (name) {
        var elem = this[0];
        if (!name) {
            elem.className = '';
        } else
		if (this.hasClass(name)) {
            elem.className = elem.className.replace(name, ' ');
        };
        return this;
    },
    /**
	 * 读写样式<br />
     * css(name) 访问第一个匹配元素的样式属性<br />
     * css(properties) 把一个"名/值对"对象设置为所有匹配元素的样式属性<br />
     * css(name, value) 在所有匹配的元素中,设置一个样式属性的值<br />
	 */
    css: function (name, value) {
        var i, elem = this[0], obj = arguments[0];
        if (typeof name === 'string') {
            if (value === undefined) {
                return $.css(elem, name);
            } else {
                name === 'opacity' ?
					$.opacity.set(elem, value) :
					elem.style[name] = value;
            };
        } else {
            for (i in obj) {
				i === 'opacity' ?
					$.opacity.set(elem, obj[i]) :
					elem.style[i] = obj[i];
			};
        };
		
        return this;
    },
	
	/** 显示元素 */
	show: function () {
		return this.css('display', 'block');
	},
	
	/** 隐藏元素 */
	hide: function () {
		return this.css('display', 'none');
	},
    /**
	 * 获取相对文档的坐标
	 * @return	{Object}	返回left、top的数值
	 */
    offset: function () {
        var elem = this[0],
            box = elem.getBoundingClientRect(),
            doc = elem.ownerDocument,
            body = doc.body,
            docElem = doc.documentElement,
            clientTop = docElem.clientTop || body.clientTop || 0,
            clientLeft = docElem.clientLeft || body.clientLeft || 0,
            top = box.top + (self.pageYOffset || docElem.scrollTop) - clientTop,
            left = box.left + (self.pageXOffset || docElem.scrollLeft) - clientLeft;
        return {
            left: left,
            top: top
        };
    },
	
	/**
	 * 读写HTML - (不支持文本框)
	 * @param	{String}	内容
	 */
	html: function (content) {
		var elem = this[0];
		
		if (content === undefined) return elem.innerHTML;
		$.cleanData(elem.getElementsByTagName('*'));
		elem.innerHTML = content;
		
		return this;
	},
	
	/**
	 * 移除节点
	 */
	remove: function () {
		var elem = this[0];
		$.cleanData(elem.getElementsByTagName('*'));
		$.cleanData([elem]);
		elem.parentNode.removeChild(elem);
		
		return this;
	},
	/**
	 * 事件绑定
	 * @param	{String}	类型
	 * @param	{Function}	要绑定的函数
	 */
	bind: function (type, callback) {
		$.event.add(this[0], type, callback);
		return this;
	},
	/**
	 * 移除事件
	 * @param	{String}	类型
	 * @param	{Function}	要卸载的函数
	 */
	unbind: function(type, callback) {
		$.event.remove(this[0], type, callback);
		return this;
	}
};
$.fn.init = function (selector, context) {
	var match, elem;
	context = context || document;
	
	if (!selector) return this;
	
	if (selector.nodeType) {
		this[0] = selector;
		return this;
	};
	
	if (selector === 'body' && context.body) {
		this[0] = context.body;
		return this;
	};
	
	if (selector === 'head' || selector === 'html') {
		this[0] = context.getElementsByTagName(selector)[0];
		return this;
	};
		
	if (typeof selector === 'string') {
		match = quickExpr.exec(selector);
		if (match && match[2]) {
			elem = context.getElementById(match[2]);
			if (elem && elem.parentNode) this[0] = elem;
			return this;
		};
	};
	
	if (typeof selector === 'function') return $(document).ready(selector);
	
	this[0] = selector;
	
	return this;
};
$.fn.init.prototype = $.fn;
/** 空函数 */
$.noop = function () {};
/** 检测window */
$.isWindow = function (obj) {
	return obj && typeof obj === 'object' && 'setInterval' in obj;
};
/** 数组判定 */
$.isArray = function (obj) {
    return Object.prototype.toString.call(obj) === '[object Array]';
};
/**
 * 搜索子元素
 * 注意:只支持nodeName或.className的形式,并且只返回第一个元素
 * @param	{String}
 */
$.fn.find = function (expr) {
	var value, elem = this[0],
		className = expr.split('.')[1];
	if (className) {
		if (document.getElementsByClassName) {
			value = elem.getElementsByClassName(className);
		} else {
			value = getElementsByClassName(className, elem);
		};
	} else {
		value = elem.getElementsByTagName(expr);
	};
	
	return $(value[0]);
};
function getElementsByClassName (className, node, tag) {
	node = node || document;
	tag = tag || '*';
	var i = 0,
		j = 0,
		classElements = [],
		els = node.getElementsByTagName(tag),
		elsLen = els.length,
		pattern = new RegExp("(^|\\s)" + className + "(\\s|$)");
		
	for (; i < elsLen; i ++) {
		if (pattern.test(els[i].className)) {
			classElements[j] = els[i];
			j ++;
		};
	};
	return classElements;
};
/**
 * 遍历
 * @param {Object}
 * @param {Function}
 */
$.each = function (obj, callback) {
    var name, i = 0,
        length = obj.length,
        isObj = length === undefined;
    if (isObj) {
        for (name in obj) {
            if (callback.call(obj[name], name, obj[name]) === false) break;
        };
    } else {
        for (var value = obj[0];
		i < length && callback.call(value, i, value) !== false;
		value = obj[++i]) {};
    };
	
	return obj;
};
/**
 * 读写缓存
 * @param		{HTMLElement}	元素
 * @param		{String}		缓存名称
 * @param		{Any}			数据
 * @return		{Any}			如果无参数data则返回缓存数据
 */
$.data = function (elem, name, data) {
	var cache = $.cache,
		id = uuid(elem);
	
	if (name === undefined) return cache[id];
	if (!cache[id]) cache[id] = {};
	if (data !== undefined) cache[id][name] = data;
	
	return cache[id][name];
};
/**
 * 删除缓存
 * @param		{HTMLElement}	元素
 * @param		{String}		缓存名称
 */
$.removeData = function (elem, name) {
	var empty = true,
		expando = $.expando,
		cache = $.cache,
		id = uuid(elem),
		thisCache = id && cache[id];
	if (!thisCache) return;
	if (name) {
		delete thisCache[name];
		for (var n in thisCache) empty = false;
		if (empty) delete $.cache[id];
	} else {
		delete cache[id];
		if (elem.removeAttribute) {
			elem.removeAttribute(expando);
		} else {
			elem[expando] = null;
		};
	};
};
$.uuid = 0;
$.cache = {};
$.expando = '@cache' + + new Date
// 标记元素唯一身份
function uuid (elem) {
	var expando = $.expando,
		id = elem === window ? 0 : elem[expando];
	if (id === undefined) elem[expando] = id = ++ $.uuid;
	return id;
};
/**
 * 事件机制
 * @namespace
 * @requires	[$.data, $.removeData]
 */
$.event = {
	
	/**
	 * 添加事件
	 * @param		{HTMLElement}	元素
	 * @param		{String}		事件类型
	 * @param		{Function}		要添加的函数
	 */
	add: function (elem, type, callback) {
		var cache, listeners,
			that = $.event,
			data = $.data(elem, '@events') || $.data(elem, '@events', {});
		
		cache = data[type] = data[type] || {};
		listeners = cache.listeners = cache.listeners || [];
		listeners.push(callback);
		
		if (!cache.handler) {
			cache.elem = elem;
			cache.handler = that.handler(cache);
			
			elem.addEventListener
			? elem.addEventListener(type, cache.handler, false)
			: elem.attachEvent('on' + type, cache.handler);
		};
	},
	
	/**
	 * 卸载事件
	 * @param		{HTMLElement}	元素
	 * @param		{String}		事件类型
	 * @param		{Function}		要卸载的函数
	 */
	remove: function (elem, type, callback) {
		var i, cache, listeners,
			that = $.event,
			empty = true,
			data = $.data(elem, '@events');
		
		if (!data) return;
		if (!type) {
			for (i in data) that.remove(elem, i);
			return;
		};
		
		cache = data[type];
		if (!cache) return;
		
		listeners = cache.listeners;
		if (callback) {
			for (i = 0; i < listeners.length; i ++) {
				listeners[i] === callback && listeners.splice(i--, 1);
			};
		} else {
			cache.listeners = [];
		};
		
		if (cache.listeners.length === 0) {
			elem.removeEventListener
			? elem.removeEventListener(type, cache.handler, false)
			: elem.detachEvent('on' + type, cache.handler);
			
			delete data[type];
			cache = $.data(elem, '@events');
			for (var n in cache) empty = false;
			if (empty) $.removeData(elem, '@events');
		};
	},
	
	/** @inner 事件句柄 */
	handler: function (cache) {
		return function (event) {
			event = $.event.fix(event || window.event);
			for (var i = 0, list = cache.listeners, fn; fn = list[i++];) {
				if (fn.call(cache.elem, event) === false) {
					event.preventDefault();
					event.stopPropagation();
				};
			};
		};
	},
	
	/** @inner Event对象兼容处理 */
	fix: function (event) {
		if (event.target) return event;
		
		var event2 = {
			target: event.srcElement || document,
			preventDefault: function () {event.returnValue = false},
			stopPropagation: function () {event.cancelBubble = true}
		};
		// IE6/7/8 在原生window.event对象写入数据会导致内存无法回收,应当采用拷贝
		for (var i in event) event2[i] = event[i];
		return event2;
	}
	
};
/**
 * 清理元素集的事件与缓存
 * @requires	[$.removeData, $.event]
 * @param		{HTMLCollection}	元素集
 */
$.cleanData = function (elems) {
	var i = 0, elem,
		len = elems.length,
		removeEvent = $.event.remove,
		removeData = $.removeData;
	
	for (; i < len; i ++) {
		elem = elems[i];
		removeEvent(elem);
		removeData(elem);
	};
};
// DOM就绪事件
$.isReady = false;
$.ready = function () {
    if (!$.isReady) {
        if (!document.body) return setTimeout($.ready, 13);
        $.isReady = true;
        if (readyList) {
            var fn, i = 0;
            while ((fn = readyList[i++])) {
                fn.call(document, $);
            };
            readyList = null;
        };
    };
};
$.bindReady = function () {
    if (readyBound) return;
    readyBound = true;
    if (document.readyState === 'complete') {
        return $.ready();
    };
    if (document.addEventListener) {
        document.addEventListener('DOMContentLoaded', DOMContentLoaded, false);
        window.addEventListener('load', $.ready, false);
    } else if (document.attachEvent) {
        document.attachEvent('onreadystatechange', DOMContentLoaded);
        window.attachEvent('onload', $.ready);
        var toplevel = false;
        try {
            toplevel = window.frameElement == null;
        } catch (e) {};
        if (document.documentElement.doScroll && toplevel) {
            doScrollCheck();
        };
    };
};
if (document.addEventListener) {
    DOMContentLoaded = function () {
        document.removeEventListener('DOMContentLoaded', DOMContentLoaded, false);
        $.ready();
    };
} else if (document.attachEvent) {
    DOMContentLoaded = function () {
        if (document.readyState === 'complete') {
            document.detachEvent('onreadystatechange', DOMContentLoaded);
            $.ready();
        };
    };
};
function doScrollCheck () {
    if ($.isReady) return;
    try {
        document.documentElement.doScroll('left');
    } catch (e) {
        setTimeout(doScrollCheck, 1);
        return;
    };
    $.ready();
};
// 获取css
$.css = 'defaultView' in document && 'getComputedStyle' in document.defaultView ?
	function (elem, name) {
		return document.defaultView.getComputedStyle(elem, false)[name];
} :
	function (elem, name) {
		var ret = name === 'opacity' ? $.opacity.get(elem) : elem.currentStyle[name];
		return ret || '';
};
// 跨浏览器处理opacity
$.opacity = {
	get: function (elem) {
		return isOpacity ?
			document.defaultView.getComputedStyle(elem, false).opacity :
			ropacity.test((elem.currentStyle
				? elem.currentStyle.filter
				: elem.style.filter) || '')
				? (parseFloat(RegExp.$1) / 100) + ''
				: 1;
	},
	set: function (elem, value) {
		if (isOpacity) return elem.style.opacity = value;
		var style = elem.style;
		style.zoom = 1;
		var opacity = 'alpha(opacity=' + value * 100 + ')',
			filter = style.filter || '';
		style.filter = ralpha.test(filter) ?
			filter.replace(ralpha, opacity) :
			style.filter + ' ' + opacity;
	}
};
/**
 * 获取滚动条位置 - [不支持写入]
 * $.fn.scrollLeft, $.fn.scrollTop
 * @example		获取文档垂直滚动条:$(document).scrollTop()
 * @return		{Number}	返回滚动条位置
 */
$.each(['Left', 'Top'], function (i, name) {
    var method = 'scroll' + name;
    $.fn[method] = function () {
        var elem = this[0], win;
		win = getWindow(elem);
		return win ?
			('pageXOffset' in win) ?
				win[i ? 'pageYOffset' : 'pageXOffset'] :
				win.document.documentElement[method] || win.document.body[method] :
			elem[method];
    };
});
function getWindow (elem) {
	return $.isWindow(elem) ?
		elem :
		elem.nodeType === 9 ?
			elem.defaultView || elem.parentWindow :
			false;
};
/**
 * 获取窗口或文档尺寸 - [只支持window与document读取]
 * @example 
   获取文档宽度:$(document).width()
   获取可视范围:$(window).width()
 * @return	{Number}
 */
$.each(['Height', 'Width'], function (i, name) {
    var type = name.toLowerCase();
    $.fn[type] = function (size) {
        var elem = this[0];
        if (!elem) {
            return size == null ? null : this;
        };
		return $.isWindow(elem) ?
			elem.document.documentElement['client' + name] || elem.document.body['client' + name] :
			(elem.nodeType === 9) ?
				Math.max(
					elem.documentElement['client' + name],
					elem.body['scroll' + name], elem.documentElement['scroll' + name],
					elem.body['offset' + name], elem.documentElement['offset' + name]
				) : null;
    };
});
/**
 * 简单ajax支持
 * @example
 * $.ajax({
 * 		url: url,
 * 		success: callback,
 * 		cache: cache
 * });
 */
$.ajax = function (config) {
	var ajax = window.XMLHttpRequest ?
			new XMLHttpRequest() :
			new ActiveXObject('Microsoft.XMLHTTP'),
		url = config.url;
	
	if (config.cache === false) {
		var ts = + new Date,
			ret = url.replace(/([?&])_=[^&]*/, "$1_=" + ts );
		url = ret + ((ret === url) ? (/\?/.test(url) ? "&" : "?") + "_=" + ts : "");
	};
	
	ajax.onreadystatechange = function() {
		if (ajax.readyState === 4 && ajax.status === 200) {
			config.success && config.success(ajax.responseText);
			ajax.onreadystatechange = $.noop;
		};
	};
	ajax.open('GET', url, 1);
	ajax.send(null);
};
/** 动画引擎 - [不支持链式列队操作] */
$.fn.animate = function (prop, speed, easing, callback) {
	
	speed = speed || 400;
	if (typeof easing === 'function') callback = easing;
	easing = easing && $.easing[easing] ? easing : 'swing';
	
    var elem = this[0], overflow,
        fx, parts, start, end, unit,
		opt = {
			speed: speed,
			easing: easing,
			callback: function () {
				if (overflow != null) elem.style.overflow = '';
				callback && callback();
			}
		};
	
	opt.curAnim = {};
	$.each(prop, function (name, val) {
		opt.curAnim[name] = val;
	});
	
    $.each(prop, function (name, val) {
        fx = new $.fx(elem, opt, name);
        parts = rfxnum.exec(val);
        start = parseFloat(name === 'opacity'
			|| (elem.style && elem.style[name] != null) ?
			$.css(elem, name) :
			elem[name]);
        end = parseFloat(parts[2]);
        unit = parts[3];
		if (name === 'height' || name === 'width') {
			end = Math.max(0, end);
			overflow = [elem.style.overflow,
			elem.style.overflowX, elem.style.overflowY];
		};
		
        fx.custom(start, end, unit);
    });
	
	if (overflow != null) elem.style.overflow = 'hidden';
    return this;
};
$.timers = [];
$.fx = function (elem, options, prop) {
    this.elem = elem;
    this.options = options;
    this.prop = prop;
};
$.fx.prototype = {
    custom: function (from, to, unit) {
		var that = this;
        that.startTime = $.fx.now();
        that.start = from;
        that.end = to;
        that.unit = unit;
        that.now = that.start;
        that.state = that.pos = 0;
        function t() {
            return that.step();
        };
        t.elem = that.elem;
		t();
        $.timers.push(t);
        if (!$.timerId) $.timerId = setInterval($.fx.tick, 13);
    },
    step: function () {
        var that = this, t = $.fx.now(), done = true;
		
        if (t >= that.options.speed + that.startTime) {
            that.now = that.end;
            that.state = that.pos = 1;
            that.update();
			
			that.options.curAnim[that.prop] = true;
			for (var i in that.options.curAnim) {
				if (that.options.curAnim[i] !== true) {
					done = false;
				};
			};
			
			if (done) that.options.callback.call(that.elem);
			
            return false;
        } else {
            var n = t - that.startTime;
            that.state = n / that.options.speed;
            that.pos = $.easing[that.options.easing](that.state, n, 0, 1, that.options.speed);
            that.now = that.start + ((that.end - that.start) * that.pos);
            that.update();
            return true;
        };
    },
    update: function () {
		var that = this;
		if (that.prop === 'opacity') {
			$.opacity.set(that.elem, that.now);
		} else
		if (that.elem.style && that.elem.style[that.prop] != null) {
			that.elem.style[that.prop] = that.now + that.unit;
		} else {
			that.elem[that.prop] = that.now;
		};
    }
};
$.fx.now = function () {
    return + new Date;
};
$.easing = {
    linear: function (p, n, firstNum, diff) {
        return firstNum + diff * p;
    },
    swing: function (p, n, firstNum, diff) {
        return ((-Math.cos(p * Math.PI) / 2) + 0.5) * diff + firstNum;
    }
};
$.fx.tick = function () {
	var timers = $.timers;
    for (var i = 0; i < timers.length; i++) {
        !timers[i]() && timers.splice(i--, 1);
    };
    !timers.length && $.fx.stop();
};
$.fx.stop = function () {
    clearInterval($.timerId);
    $.timerId = null;
};
$.fn.stop = function () {
	var timers = $.timers;
    for (var i = timers.length - 1; i >= 0; i--) {
    	if (timers[i].elem === this[0]) timers.splice(i, 1);
	};
    return this;
};
//-------------end
return $}(window));
//------------------------------------------------
// 对话框模块
//------------------------------------------------
;(function ($, window, undefined) {
$.noop = $.noop || function () {}; // jQuery 1.3.2
var _box, _thisScript, _skin, _path,
	_count = 0,
	_$window = $(window),
	_$document = $(document),
	_$html = $('html'),
	_elem = document.documentElement,
	_isIE6 = window.VBArray && !window.XMLHttpRequest,
	_isMobile = 'createTouch' in document && !('onmousemove' in _elem)
		|| /(iPhone|iPad|iPod)/i.test(navigator.userAgent),
	_expando = 'artDialog' + + new Date;
var artDialog = function (config, ok, cancel) {
	config = config || {};
	
	if (typeof config === 'string' || config.nodeType === 1) {
		config = {content: config, fixed: !_isMobile};
	};
	
	var api,
		defaults = artDialog.defaults,
		elem = config.follow = this.nodeType === 1 && this || config.follow;
		
	// 合并默认配置
	for (var i in defaults) {
		if (config[i] === undefined) config[i] = defaults[i];		
	};
	
	// 兼容v4.1.0之前的参数,未来版本将删除此
	$.each({ok:"yesFn",cancel:"noFn",close:"closeFn",init:"initFn",okVal:"yesText",cancelVal:"noText"},
	function(i,o){config[i]=config[i]!==undefined?config[i]:config[o]});
	
	// 返回跟随模式或重复定义的ID
	if (typeof elem === 'string') elem = $(elem)[0];
	config.id = elem && elem[_expando + 'follow'] || config.id || _expando + _count;
	api = artDialog.list[config.id];
	if (elem && api) return api.follow(elem).zIndex().focus();
	if (api) return api.zIndex().focus();
	
	// 目前主流移动设备对fixed支持不好
	if (_isMobile) config.fixed = false;
	
	// 按钮队列
	if (!$.isArray(config.button)) {
		config.button = config.button ? [config.button] : [];
	};
	if (ok !== undefined) config.ok = ok;
	if (cancel !== undefined) config.cancel = cancel;
	config.ok && config.button.push({
		name: config.okVal,
		callback: config.ok,
		focus: true
	});
	config.cancel && config.button.push({
		name: config.cancelVal,
		callback: config.cancel
	});
	
	// zIndex全局配置
	artDialog.defaults.zIndex = config.zIndex;
	
	_count ++;
	
	return artDialog.list[config.id] = _box ?
		_box._init(config) : new artDialog.fn._init(config);
};
artDialog.fn = artDialog.prototype = {
	version: '4.1.7',
	
	closed: true,
	
	_init: function (config) {
		var that = this, DOM,
			icon = config.icon,
			iconBg = icon && (_isIE6 ? {png: 'images/' + icon + '.png'}
			: {backgroundImage: 'url(\'' + 'images/' + icon + '.png\')'});
		var artIcon='';
		switch(config.artIcon)
        {
              case 'add':
			  	artIcon='<i class="art-icon icon-title-add"></i>';
                break;
              case 'edit':
			  	artIcon='<i class="art-icon icon-title-edit"></i>';
               	break;
              case 'ask':
			  	artIcon='<i class="art-icon icon-title-ask"></i>';
               	break;
              case 'error':
			  	artIcon='<i class="art-icon icon-title-error"></i>';
              	break;
        }
        that.closed = false;
		that.config = config;
		that.DOM = DOM = that.DOM || that._getDOM();
		
		DOM.wrap.addClass(config.skin);
		DOM.close[config.cancel === false ? 'hide' : 'show']();
		DOM.icon[0].style.display = icon ? '' : 'none';
		DOM.iconBg.css(iconBg || {background: 'none'});
		DOM.se.css('cursor', config.resize ? 'se-resize' : 'auto');
		DOM.title.css('cursor', config.drag ? 'move' : 'auto');
		DOM.content.css('padding', config.padding);
		
		that[config.show ? 'show' : 'hide'](true)
		that.button(config.button)
		.title(artIcon+config.title)
		.content(config.content, true)
		.size(config.width, config.height)
		.time(config.time);
		
		config.follow
		? that.follow(config.follow)
		: that.position(config.left, config.top);
		
		that.zIndex().focus();
		config.lock && that.lock();
		
		that._addEvent();
		that._ie6PngFix();
		_box = null;		
		if(config.tips){
			$('#aui_dialog_title').hide();
		}
		config.init && config.init.call(that, window);
		return that;
	},
	
	/**
	 * 设置内容
	 * @param	{String, HTMLElement}	内容 (可选)
	 * @return	{this, HTMLElement}		如果无参数则返回内容容器DOM对象
	 */
	content: function (msg) {
		var prev, next, parent, display,
			that = this,
			DOM = that.DOM,
			wrap = DOM.wrap[0],
			width = wrap.offsetWidth,
			height = wrap.offsetHeight,
			left = parseInt(wrap.style.left),
			top = parseInt(wrap.style.top),
			cssWidth = wrap.style.width,
			$content = DOM.content,
			content = $content[0];
		
		that._elemBack && that._elemBack();
		wrap.style.width = 'auto';
		
		if (msg === undefined) return content;
		if (typeof msg === 'string') {
			$content.html(msg);
		} else if (msg && msg.nodeType === 1) {
		
			// 让传入的元素在对话框关闭后可以返回到原来的地方
			display = msg.style.display;
			prev = msg.previousSibling;
			next = msg.nextSibling;
			parent = msg.parentNode;
			that._elemBack = function () {
				if (prev && prev.parentNode) {
					prev.parentNode.insertBefore(msg, prev.nextSibling);
				} else if (next && next.parentNode) {
					next.parentNode.insertBefore(msg, next);
				} else if (parent) {
					parent.appendChild(msg);
				};
				msg.style.display = display;
				that._elemBack = null;
			};
			
			$content.html('');
			content.appendChild(msg);
			msg.style.display = 'block';
			
		};
		
		// 新增内容后调整位置
		if (!arguments[1]) {
			if (that.config.follow) {
				that.follow(that.config.follow);
			} else {
				width = wrap.offsetWidth - width;
				height = wrap.offsetHeight - height;
				left = left - width / 2;
				top = top - height / 2;
				wrap.style.left = Math.max(left, 0) + 'px';
				wrap.style.top = Math.max(top, 0) + 'px';
			};
			if (cssWidth && cssWidth !== 'auto') {
				wrap.style.width = wrap.offsetWidth + 'px';
			};
			that._autoPositionType();
		};
		
		that._ie6SelectFix();
		that._runScript(content);
		
		return that;
	},
	
	/**
	 * 设置标题
	 * @param	{String, Boolean}	标题内容. 为false则隐藏标题栏
	 * @return	{this, HTMLElement}	如果无参数则返回内容器DOM对象
	 */
	title: function (text) {
		var DOM = this.DOM,
			wrap = DOM.wrap,
			title = DOM.title,
			className = 'aui_state_noTitle';
			
		if (text === undefined) return title[0];
		if (text === false) {
			title.hide().html('');
			wrap.addClass(className);
		} else {
			title.show().html(text || '');
			wrap.removeClass(className);
		};
		
		return this;
	},
	
	/**
	 * 位置(相对于可视区域)
	 * @param	{Number, String}
	 * @param	{Number, String}
	 */
	position: function (left, top) {
		var that = this,
			config = that.config,
			wrap = that.DOM.wrap[0],
			isFixed = _isIE6 ? false : config.fixed,
			ie6Fixed = _isIE6 && that.config.fixed,
			docLeft = _$document.scrollLeft(),
			docTop = _$document.scrollTop(),
			dl = isFixed ? 0 : docLeft,
			dt = isFixed ? 0 : docTop,
			ww = _$window.width(),
			wh = _$window.height(),
			ow = wrap.offsetWidth,
			oh = wrap.offsetHeight,
			style = wrap.style;
		
		if (left || left === 0) {
			that._left = left.toString().indexOf('%') !== -1 ? left : null;
			left = that._toNumber(left, ww - ow);
			
			if (typeof left === 'number') {
				left = ie6Fixed ? (left += docLeft) : left + dl;
				style.left = Math.max(left, dl) + 'px';
			} else if (typeof left === 'string') {
				style.left = left;
			};
		};
		
		if (top || top === 0) {
			that._top = top.toString().indexOf('%') !== -1 ? top : null;
			top = that._toNumber(top, wh - oh);
			
			if (typeof top === 'number') {
				top = ie6Fixed ? (top += docTop) : top + dt;
				style.top = Math.max(top, dt) + 'px';
			} else if (typeof top === 'string') {
				style.top = top;
			};
		};
		
		if (left !== undefined && top !== undefined) {
			that._follow = null;
			that._autoPositionType();
		};
		
		return that;
	},
	/**
	 *	尺寸
	 *	@param	{Number, String}	宽度
	 *	@param	{Number, String}	高度
	 */
	size: function (width, height) {
		var maxWidth, maxHeight, scaleWidth, scaleHeight,
			that = this,
			config = that.config,
			DOM = that.DOM,
			wrap = DOM.wrap,
			main = DOM.main,
			wrapStyle = wrap[0].style,
			style = main[0].style;
			
		if (width) {
			that._width = width.toString().indexOf('%') !== -1 ? width : null;
			maxWidth = _$window.width() - wrap[0].offsetWidth + main[0].offsetWidth;
			scaleWidth = that._toNumber(width, maxWidth);
			width = scaleWidth;
			
			if (typeof width === 'number') {
				wrapStyle.width = 'auto';
				style.width = Math.max(that.config.minWidth, width) + 'px';
				wrapStyle.width = wrap[0].offsetWidth + 'px'; // 防止未定义宽度的表格遇到浏览器右边边界伸缩
			} else if (typeof width === 'string') {
				style.width = width;
				width === 'auto' && wrap.css('width', 'auto');
			};
		};
		
		if (height) {
			that._height = height.toString().indexOf('%') !== -1 ? height : null;
			maxHeight = _$window.height() - wrap[0].offsetHeight + main[0].offsetHeight;
			scaleHeight = that._toNumber(height, maxHeight);
			height = scaleHeight;
			
			if (typeof height === 'number') {
				style.height = Math.max(that.config.minHeight, height) + 'px';
			} else if (typeof height === 'string') {
				style.height = height;
			};
		};
		
		that._ie6SelectFix();
		
		return that;
	},
	
	/**
	 * 跟随元素
	 * @param	{HTMLElement, String}
	 */
	follow: function (elem) {
		var $elem, that = this, config = that.config;
		
		if (typeof elem === 'string' || elem && elem.nodeType === 1) {
			$elem = $(elem);
			elem = $elem[0];
		};
		
		// 隐藏元素不可用
		if (!elem || !elem.offsetWidth && !elem.offsetHeight) {
			return that.position(that._left, that._top);
		};
		
		var expando = _expando + 'follow',
			winWidth = _$window.width(),
			winHeight = _$window.height(),
			docLeft =  _$document.scrollLeft(),
			docTop = _$document.scrollTop(),
			offset = $elem.offset(),
			width = elem.offsetWidth,
			height = elem.offsetHeight,
			isFixed = _isIE6 ? false : config.fixed,
			left = isFixed ? offset.left - docLeft : offset.left,
			top = isFixed ? offset.top - docTop : offset.top,
			wrap = that.DOM.wrap[0],
			style = wrap.style,
			wrapWidth = wrap.offsetWidth,
			wrapHeight = wrap.offsetHeight,
			setLeft = left - (wrapWidth - width) / 2,
			setTop = top + height,
			dl = isFixed ? 0 : docLeft,
			dt = isFixed ? 0 : docTop;
		
		setLeft = setLeft < dl ? left :
		(setLeft + wrapWidth > winWidth) && (left - wrapWidth > dl)
		? left - wrapWidth + width
		: setLeft;
		setTop = (setTop + wrapHeight > winHeight + dt)
		&& (top - wrapHeight > dt)
		? top - wrapHeight
		: setTop;
		
		style.left = setLeft + 'px';
		style.top = setTop + 'px';
		
		that._follow && that._follow.removeAttribute(expando);
		that._follow = elem;
		elem[expando] = config.id;
		that._autoPositionType();
		return that;
	},
	
	/**
	 * 自定义按钮
	 * @example
		button({
			name: 'login',
			callback: function () {},
			disabled: false,
			focus: true
		}, .., ..)
	 */
	button: function () {
		var that = this,
			ags = arguments,
			DOM = that.DOM,
			buttons = DOM.buttons,
			elem = buttons[0],
			strongButton = 'aui_state_highlight',
			listeners = that._listeners = that._listeners || {},
			list = $.isArray(ags[0]) ? ags[0] : [].slice.call(ags);
		
		if (ags[0] === undefined) return elem;
		$.each(list, function (i, val) {
			var name = val.name,
				isNewButton = !listeners[name],
				button = !isNewButton ?
					listeners[name].elem :
					document.createElement('button');
					
			if (!listeners[name]) listeners[name] = {};
			if (val.callback) listeners[name].callback = val.callback;
			if (val.className) button.className = val.className;
			if (val.focus) {
				that._focus && that._focus.removeClass(strongButton);
				that._focus = $(button).addClass(strongButton);
				that.focus();
			};
			
			// Internet Explorer 的默认类型是 "button",
			// 而其他浏览器中(包括 W3C 规范)的默认值是 "submit"
			// @see http://www.w3school.com.cn/tags/att_button_type.asp
			button.setAttribute('type', 'button');
			
			button[_expando + 'callback'] = name;
			button.disabled = !!val.disabled;
			if (isNewButton) {
				button.innerHTML = name;
				listeners[name].elem = button;
				elem.appendChild(button);
			};
		});
		
		buttons[0].style.display = list.length ? '' : 'none';
		
		that._ie6SelectFix();
		return that;
	},
	
	/** 显示对话框 */
	show: function () {
		
		this.DOM.wrap.show();
		!arguments[0] && this._lockMaskWrap && this._lockMaskWrap.show();
		return this;
	},
	
	/** 隐藏对话框 */
	hide: function () {
		this.DOM.wrap.hide();
		!arguments[0] && this._lockMaskWrap && this._lockMaskWrap.hide();
		return this;
	},
	
	/** 关闭对话框 */
	close: function () {
		if (this.closed) return this;
		var that = this,
			DOM = that.DOM,
			wrap = DOM.wrap,
			list = artDialog.list,
			fn = that.config.close,
			follow = that.config.follow;
		
		that.time();
		if (typeof fn === 'function' && fn.call(that, window) === false) {
			return that;
		};
		
		that.unlock();
		
		// 置空内容
		that._elemBack && that._elemBack();
		wrap[0].className = wrap[0].style.cssText = '';
		DOM.title.html('');
		DOM.content.html('');
		DOM.buttons.html('');
		
		if (artDialog.focus === that) artDialog.focus = null;
		if (follow) follow.removeAttribute(_expando + 'follow');
		delete list[that.config.id];
		that._removeEvent();
		that.hide(true)._setAbsolute();
		
		// 清空除this.DOM之外临时对象,恢复到初始状态,以便使用单例模式
		for (var i in that) {
			if (that.hasOwnProperty(i) && i !== 'DOM') delete that[i];
		};
		
		// 移除HTMLElement或重用
		//_box ? wrap.remove() : _box = that;
		wrap.remove();
		return that;
	},
	
	/**
	 * 定时关闭
	 * @param	{Number}	单位为秒, 无参数则停止计时器
	 */
	time: function (second) {
		var that = this,
			cancel = that.config.cancelVal,
			timer = that._timer;
			
		timer && clearTimeout(timer);
		
		if (second) {
			that._timer = setTimeout(function(){
				that._click(cancel);
			}, 1000 * second);
		};
		
		return that;
	},
	
	/** 设置焦点 */
	focus: function () {
		try {
			if (this.config.focus) {
				var elem = this._focus && this._focus[0] || this.DOM.close[0];
				elem && elem.focus();
			}
		} catch (e) {}; // IE对不可见元素设置焦点会报错
		return this;
	},
	
	/** 置顶对话框 */
	zIndex: function () {
		var that = this,
			DOM = that.DOM,
			wrap = DOM.wrap,
			top = artDialog.focus,
			index = artDialog.defaults.zIndex ++;
		
		// 设置叠加高度
		wrap.css('zIndex', index);
		that._lockMask && that._lockMask.css('zIndex', index - 1);
		
		// 设置最高层的样式
		top && top.DOM.wrap.removeClass('aui_state_focus');
		artDialog.focus = that;
		wrap.addClass('aui_state_focus');
		
		return that;
	},
	
	/** 设置屏锁 */
	lock: function () {
		if (this._lock) return this;
		
		var that = this,
			index = artDialog.defaults.zIndex - 1,
			wrap = that.DOM.wrap,
			config = that.config,
			docWidth = _$document.width(),
			docHeight = _$document.height(),
			lockMaskWrap = that._lockMaskWrap || $(document.body.appendChild(document.createElement('div'))),
			lockMask = that._lockMask || $(lockMaskWrap[0].appendChild(document.createElement('div'))),
			domTxt = '(document).documentElement',
			sizeCss = _isMobile ? 'width:' + docWidth + 'px;height:' + docHeight
				+ 'px' : 'width:100%;height:100%',
			ie6Css = _isIE6 ?
				'position:absolute;left:expression(' + domTxt + '.scrollLeft);top:expression('
				+ domTxt + '.scrollTop);width:expression(' + domTxt
				+ '.clientWidth);height:expression(' + domTxt + '.clientHeight)'
			: '';
		
		that.zIndex();
		wrap.addClass('aui_state_lock');
		
		lockMaskWrap[0].style.cssText = sizeCss + ';position:fixed;z-index:'
			+ index + ';top:0;left:0;overflow:hidden;' + ie6Css;
		lockMask[0].style.cssText = 'height:100%;background:' + config.background
			+ ';filter:alpha(opacity=0);opacity:0';
		
		// 让IE6锁屏遮罩能够盖住下拉控件
		if (_isIE6) lockMask.html(
			'<iframe src="about:blank" style="width:100%;height:100%;position:absolute;' +
			'top:0;left:0;z-index:-1;filter:alpha(opacity=0)"></iframe>');
			
		lockMask.stop();
		lockMask.bind('click', function () {
			that._reset();
		}).bind('dblclick', function () {
			return false;
			//that._click(that.config.cancelVal);
		});
		
		if (config.duration === 0) {
			lockMask.css({opacity: config.opacity});
		} else {
			lockMask.animate({opacity: config.opacity}, config.duration);
		};
		
		that._lockMaskWrap = lockMaskWrap;
		that._lockMask = lockMask;
		
		that._lock = true;
		return that;
	},
	
	/** 解开屏锁 */
	unlock: function () {
		var that = this,
			lockMaskWrap = that._lockMaskWrap,
			lockMask = that._lockMask;
		
		if (!that._lock) return that;
		var style = lockMaskWrap[0].style;
		var un = function () {
			if (_isIE6) {
				style.removeExpression('width');
				style.removeExpression('height');
				style.removeExpression('left');
				style.removeExpression('top');
			};
			style.cssText = 'display:none';
			
			_box && lockMaskWrap.remove();
		};
		
		lockMask.stop().unbind();
		that.DOM.wrap.removeClass('aui_state_lock');
		if (!that.config.duration) {// 取消动画,快速关闭
			un();
		} else {
			lockMask.animate({opacity: 0}, that.config.duration, un);
		};
		
		that._lock = false;
		return that;
	},
	
	// 获取元素
	_getDOM: function () {	
		var wrap = document.createElement('div'),
			body = document.body;
		wrap.style.cssText = 'position:absolute;left:0;top:0';
		wrap.innerHTML = artDialog._templates;
		body.insertBefore(wrap, body.firstChild);
		
		var name, i = 0,
			DOM = {wrap: $(wrap)},
			els = wrap.getElementsByTagName('*'),
			elsLen = els.length;
			
		for (; i < elsLen; i ++) {
			name = els[i].className.split('aui_')[1];
			if (name) DOM[name] = $(els[i]);
		};
		
		return DOM;
	},
	
	// px与%单位转换成数值 (百分比单位按照最大值换算)
	// 其他的单位返回原值
	_toNumber: function (thisValue, maxValue) {
		if (!thisValue && thisValue !== 0 || typeof thisValue === 'number') {
			return thisValue;
		};
		
		var last = thisValue.length - 1;
		if (thisValue.lastIndexOf('px') === last) {
			thisValue = parseInt(thisValue);
		} else if (thisValue.lastIndexOf('%') === last) {
			thisValue = parseInt(maxValue * thisValue.split('%')[0] / 100);
		};
		
		return thisValue;
	},
	
	// 让IE6 CSS支持PNG背景
	_ie6PngFix: _isIE6 ? function () {
		var i = 0, elem, png, pngPath, runtimeStyle,
			path = artDialog.defaults.path + '/skins/',
			list = this.DOM.wrap[0].getElementsByTagName('*');
		
		for (; i < list.length; i ++) {
			elem = list[i];
			png = elem.currentStyle['png'];
			if (png) {
				pngPath = path + png;
				runtimeStyle = elem.runtimeStyle;
				runtimeStyle.backgroundImage = 'none';
				runtimeStyle.filter = "progid:DXImageTransform.Microsoft." +
					"AlphaImageLoader(src='" + pngPath + "',sizingMethod='crop')";
			};
		};
	} : $.noop,
	
	// 强制覆盖IE6下拉控件
	_ie6SelectFix: _isIE6 ? function () {
		var $wrap = this.DOM.wrap,
			wrap = $wrap[0],
			expando = _expando + 'iframeMask',
			iframe = $wrap[expando],
			width = wrap.offsetWidth,
			height = wrap.offsetHeight;
		width = width + 'px';
		height = height + 'px';
		if (iframe) {
			iframe.style.width = width;
			iframe.style.height = height;
		} else {
			iframe = wrap.appendChild(document.createElement('iframe'));
			$wrap[expando] = iframe;
			iframe.src = 'about:blank';
			iframe.style.cssText = 'position:absolute;z-index:-1;left:0;top:0;'
			+ 'filter:alpha(opacity=0);width:' + width + ';height:' + height;
		};
	} : $.noop,
	
	// 解析HTML片段中自定义类型脚本,其this指向artDialog内部
	// <script type="text/dialog">/* [code] */</script>
	_runScript: function (elem) {
		var fun, i = 0, n = 0,
			tags = elem.getElementsByTagName('script'),
			length = tags.length,
			script = [];
			
		for (; i < length; i ++) {
			if (tags[i].type === 'text/dialog') {
				script[n] = tags[i].innerHTML;
				n ++;
			};
		};
		
		if (script.length) {
			script = script.join('');
			fun = new Function(script);
			fun.call(this);
		};
	},
	
	// 自动切换定位类型
	_autoPositionType: function () {
		this[this.config.fixed ? '_setFixed' : '_setAbsolute']();/////////////
	},
	
	
	// 设置静止定位
	// IE6 Fixed @see: http://www.planeart.cn/?p=877
	_setFixed: (function () {
		_isIE6 && $(function () {
			var bg = 'backgroundAttachment';
			if (_$html.css(bg) !== 'fixed' && $('body').css(bg) !== 'fixed') {
				_$html.css({
					zoom: 1,// 避免偶尔出现body背景图片异常的情况
					backgroundImage: 'url(about:blank)',
					backgroundAttachment: 'fixed'
				});
			};
		});
		
		return function () {
			var $elem = this.DOM.wrap,
				style = $elem[0].style;
			
			if (_isIE6) {
				var left = parseInt($elem.css('left')),
					top = parseInt($elem.css('top')),
					sLeft = _$document.scrollLeft(),
					sTop = _$document.scrollTop(),
					txt = '(document.documentElement)';
				
				this._setAbsolute();
				style.setExpression('left', 'eval(' + txt + '.scrollLeft + '
					+ (left - sLeft) + ') + "px"');
				style.setExpression('top', 'eval(' + txt + '.scrollTop + '
					+ (top - sTop) + ') + "px"');
			} else {
				style.position = 'fixed';
			};
		};
	}()),
	
	// 设置绝对定位
	_setAbsolute: function () {
		var style = this.DOM.wrap[0].style;
			
		if (_isIE6) {
			style.removeExpression('left');
			style.removeExpression('top');
		};
		style.position = 'absolute';
	},
	
	// 按钮回调函数触发
	_click: function (name) {
		var that = this,
			fn = that._listeners[name] && that._listeners[name].callback;
		return typeof fn !== 'function' || fn.call(that, window) !== false ?
			that.close() : that;
	},
	
	// 重置位置与尺寸
	_reset: function (test) {
		var newSize,
			that = this,
			oldSize = that._winSize || _$window.width() * _$window.height(),
			elem = that._follow,
			width = that._width,
			height = that._height,
			left = that._left,
			top = that._top;
		
		if (test) {
			// IE6~7 window.onresize bug
			newSize = that._winSize =  _$window.width() * _$window.height();
			if (oldSize === newSize) return;
		};
		
		if (width || height) that.size(width, height);
		
		if (elem) {
			that.follow(elem);
		} else if (left || top) {
			that.position(left, top);
		};
	},
	
	// 事件代理
	_addEvent: function () {
		var resizeTimer,
			that = this,
			config = that.config,
			isIE = 'CollectGarbage' in window,
			DOM = that.DOM;
		
		// 窗口调节事件
		that._winResize = function () {
			resizeTimer && clearTimeout(resizeTimer);
			resizeTimer = setTimeout(function () {
				that._reset(isIE);
			}, 40);
		};
		_$window.bind('resize', that._winResize);
		
		// 监听点击
		DOM.wrap
		.bind('click', function (event) {
			var target = event.target, callbackID;
			
			if (target.disabled) return false; // IE BUG
			
			if (target === DOM.close[0]) {
				that._click(config.cancelVal);
				return false;
			} else {
				callbackID = target[_expando + 'callback'];
				callbackID && that._click(callbackID);
			};
			
			that._ie6SelectFix();
		})
		.bind('mousedown', function () {
			that.zIndex();
		});
	},
	
	// 卸载事件代理
	_removeEvent: function () {
		var that = this,
			DOM = that.DOM;
		
		DOM.wrap.unbind();
		_$window.unbind('resize', that._winResize);
	}
	
};
artDialog.fn._init.prototype = artDialog.fn;
$.fn.dialog = $.fn.artDialog = function () {
	var config = arguments;
	this[this.live ? 'live' : 'bind']('click', function () {
		artDialog.apply(this, config);
		return false;
	});
	return this;
};
/** 最顶层的对话框API */
artDialog.focus = null;
/** 获取某对话框API */
artDialog.get = function (id) {
	return id === undefined
	? artDialog.list
	: artDialog.list[id];
};
artDialog.list = {};
// 全局快捷键
_$document.bind('keydown', function (event) {
	var target = event.target,
		nodeName = target.nodeName,
		rinput = /^INPUT|TEXTAREA$/,
		api = artDialog.focus,
		keyCode = event.keyCode;
	if (!api || !api.config.esc || rinput.test(nodeName)) return;
		
	keyCode === 27 && api._click(api.config.cancelVal);
});
// 获取artDialog路径
_path = window['_artDialog_path'] || (function (script, i, me) {
	for (i in script) {
		// 如果通过第三方脚本加载器加载本文件,请保证文件名含有"artDialog"字符
		if (script[i].src && script[i].src.indexOf('artDialog') !== -1) me = script[i];
	};
	
	_thisScript = me || script[script.length - 1];
	me = _thisScript.src.replace(/\\/g, '/');
	return me.lastIndexOf('/') < 0 ? '.' : me.substring(0, me.lastIndexOf('/'));
}(document.getElementsByTagName('script')));
// 无阻塞载入CSS (如"artDialog.js?skin=aero")
_skin = _thisScript.src.split('skin=')[1];
if (_skin) {
	var link = document.createElement('link');
	link.rel = 'stylesheet';
	link.href = _path + '/skins/' + _skin + '.css?' + artDialog.fn.version;
	_thisScript.parentNode.insertBefore(link, _thisScript);
};
// 触发浏览器预先缓存背景图片
_$window.bind('load', function () {
	setTimeout(function () {
		if (_count) return;
		//artDialog({left: '-9999em',time: 0,fixed: false,lock: false,focus: false});
	}, 150);
});
// 开启IE6 CSS背景图片缓存
try {
	document.execCommand('BackgroundImageCache', false, true);
} catch (e) {};
// 使用uglifyjs压缩能够预先处理"+"号合并字符串
// uglifyjs: http://marijnhaverbeke.nl/uglifyjs
artDialog._templates =
'<div class="aui_outer">'
+	'<table class="aui_border">'
+		'<tbody>'
+			'<tr>'
+				'<td class="aui_nw"></td>'
+				'<td class="aui_n"></td>'
+				'<td class="aui_ne"></td>'
+			'</tr>'
+			'<tr>'
+				'<td class="aui_w"></td>'
+				'<td class="aui_c">'
+					'<div class="aui_inner">'
+					'<table class="aui_dialog">'
+						'<tbody>'
+							'<tr id="aui_dialog_title">'
+								'<td colspan="2" class="aui_header">'
+									'<div class="aui_titleBar">'
+										'<div class="aui_title"></div>'
+										'<a class="aui_close" href="javascript:/*artDialog*/;">'
+											'\xd7'
+										'</a>'
+									'</div>'
+								'</td>'
+							'</tr>'
+							'<tr>'
+								'<td class="aui_icon">'
+									'<div class="aui_iconBg"></div>'
+								'</td>'
+								'<td class="aui_main">'
+									'<div class="aui_content"></div>'
+								'</td>'
+							'</tr>'
+							'<tr>'
+								'<td colspan="2" class="aui_footer">'
+									'<div class="aui_buttons"></div>'
+								'</td>'
+							'</tr>'
+						'</tbody>'
+					'</table>'
+					'</div>'
+				'</td>'
+				'<td class="aui_e"></td>'
+			'</tr>'
+			'<tr>'
+				'<td class="aui_sw"></td>'
+				'<td class="aui_s"></td>'
+				'<td class="aui_se"></td>'
+			'</tr>'
+		'</tbody>'
+	'</table>'
+'</div>';
/**
 * 默认配置
 */
artDialog.defaults = {
								// 消息内容
	content: '<div class="aui_loading"><span>loading..</span></div>',
	title: '\u6d88\u606f',		// 标题. 默认'消息'
	button: null,				// 自定义按钮
	ok: null,					// 确定按钮回调函数
	cancel: null,				// 取消按钮回调函数
	init: null,					// 对话框初始化后执行的函数
	close: null,				// 对话框关闭前执行的函数
	okVal: '\u786E\u5B9A',		// 确定按钮文本. 默认'确定'
	cancelVal: '\u53D6\u6D88',	// 取消按钮文本. 默认'取消'
	width: 'auto',				// 内容宽度
	height: 'auto',				// 内容高度
	minWidth: 96,				// 最小宽度限制
	minHeight: 32,				// 最小高度限制
	padding: '20px 25px',		// 内容与边界填充距离
	skin: '',					// 皮肤名(预留接口,尚未实现)
	icon: null,					// 消息图标名称
	time: null,					// 自动关闭时间
	esc: true,					// 是否支持Esc键关闭
	focus: true,				// 是否支持对话框按钮自动聚焦
	show: true,					// 初始化后是否显示对话框
	follow: null,				// 跟随某元素(即让对话框在元素附近弹出)
	path: _path,				// artDialog路径
	lock: false,				// 是否锁屏
	background: '#000',			// 遮罩颜色
	opacity: .7,				// 遮罩透明度
	duration: 300,				// 遮罩透明度渐变动画速度
	fixed: false,				// 是否静止定位
	left: '50%',				// X轴坐标
	top: '38.2%',				// Y轴坐标
	zIndex: 1987,				// 对话框叠加高度值(重要:此值不能超过浏览器最大限制)
	resize: true,				// 是否允许用户调节尺寸
	drag: true,				// 是否允许用户拖动位置
	artIcon: '',        //标题旁边的图标,
	tips: false
	
};
window.artDialog = $.dialog = $.artDialog = artDialog;
}(this.art || this.jQuery && (this.art = jQuery), this));
//------------------------------------------------
// 对话框模块-拖拽支持(可选外置模块)
//------------------------------------------------
;(function ($) {
var _dragEvent, _use,
	_$window = $(window),
	_$document = $(document),
	_elem = document.documentElement,
	_isIE6 = !('minWidth' in _elem.style),
	_isLosecapture = 'onlosecapture' in _elem,
	_isSetCapture = 'setCapture' in _elem;
// 拖拽事件
artDialog.dragEvent = function () {
	var that = this,
		proxy = function (name) {
			var fn = that[name];
			that[name] = function () {
				return fn.apply(that, arguments);
			};
		};
		
	proxy('start');
	proxy('move');
	proxy('end');
};
artDialog.dragEvent.prototype = {
	// 开始拖拽
	onstart: $.noop,
	start: function (event) {
		_$document
		.bind('mousemove', this.move)
		.bind('mouseup', this.end);
			
		this._sClientX = event.clientX;
		this._sClientY = event.clientY;
		this.onstart(event.clientX, event.clientY);
		return false;
	},
	
	// 正在拖拽
	onmove: $.noop,
	move: function (event) {		
		this._mClientX = event.clientX;
		this._mClientY = event.clientY;
		this.onmove(
			event.clientX - this._sClientX,
			event.clientY - this._sClientY
		);
		
		return false;
	},
	
	// 结束拖拽
	onend: $.noop,
	end: function (event) {
		_$document
		.unbind('mousemove', this.move)
		.unbind('mouseup', this.end);
		
		this.onend(event.clientX, event.clientY);
		return false;
	}
	
};
_use = function (event) {
	var limit, startWidth, startHeight, startLeft, startTop, isResize,
		api = artDialog.focus,
		//config = api.config,
		DOM = api.DOM,
		wrap = DOM.wrap,
		title = DOM.title,
		main = DOM.main;
	// 清除文本选择
	var clsSelect = 'getSelection' in window ? function () {
		window.getSelection().removeAllRanges();
	} : function () {
		try {
			document.selection.empty();
		} catch (e) {};
	};
	
	// 对话框准备拖动
	_dragEvent.onstart = function (x, y) {
		if (isResize) {
			startWidth = main[0].offsetWidth;
			startHeight = main[0].offsetHeight;
		} else {
			startLeft = wrap[0].offsetLeft;
			startTop = wrap[0].offsetTop;
		};
		
		_$document.bind('dblclick', _dragEvent.end);
		!_isIE6 && _isLosecapture ?
			title.bind('losecapture', _dragEvent.end) :
			_$window.bind('blur', _dragEvent.end);
		_isSetCapture && title[0].setCapture();
		
		wrap.addClass('aui_state_drag');
		api.focus();
	};
	
	// 对话框拖动进行中
	_dragEvent.onmove = function (x, y) {
		if (isResize) {
			var wrapStyle = wrap[0].style,
				style = main[0].style,
				width = x + startWidth,
				height = y + startHeight;
			
			wrapStyle.width = 'auto';
			style.width = Math.max(0, width) + 'px';
			wrapStyle.width = wrap[0].offsetWidth + 'px';
			
			style.height = Math.max(0, height) + 'px';
			
		} else {
			var style = wrap[0].style,
				left = Math.max(limit.minX, Math.min(limit.maxX, x + startLeft)),
				top = Math.max(limit.minY, Math.min(limit.maxY, y + startTop));
			style.left = left  + 'px';
			style.top = top + 'px';
		};
			
		clsSelect();
		api._ie6SelectFix();
	};
	
	// 对话框拖动结束
	_dragEvent.onend = function (x, y) {
		_$document.unbind('dblclick', _dragEvent.end);
		!_isIE6 && _isLosecapture ?
			title.unbind('losecapture', _dragEvent.end) :
			_$window.unbind('blur', _dragEvent.end);
		_isSetCapture && title[0].releaseCapture();
		
		_isIE6 && !api.closed && api._autoPositionType();
		
		wrap.removeClass('aui_state_drag');
	};
	
	isResize = event.target === DOM.se[0] ? true : false;
	limit = (function () {
		var maxX, maxY,
			wrap = api.DOM.wrap[0],
			fixed = wrap.style.position === 'fixed',
			ow = wrap.offsetWidth,
			oh = wrap.offsetHeight,
			ww = _$window.width(),
			wh = _$window.height(),
			dl = fixed ? 0 : _$document.scrollLeft(),
			dt = fixed ? 0 : _$document.scrollTop(),
			
		// 坐标最大值限制
		maxX = ww - ow + dl;
		maxY = wh - oh + dt;
		
		return {
			minX: dl,
			minY: dt,
			maxX: maxX,
			maxY: maxY
		};
	})();
	
	_dragEvent.start(event);
};
// 代理 mousedown 事件触发对话框拖动
_$document.bind('mousedown', function (event) {
	var api = artDialog.focus;
	if (!api) return;
	var target = event.target,
		config = api.config,
		DOM = api.DOM;
	
	if (config.drag !== false && target === DOM.title[0]
	|| config.resize !== false && target === DOM.se[0]) {
		_dragEvent = _dragEvent || new artDialog.dragEvent();
		_use(event);
		return false;// 防止firefox与chrome滚屏
	};
});
})(this.art || this.jQuery && (this.art = jQuery));

+ 58 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/css/doc.css

@ -0,0 +1,58 @@
.doc-line {
	height: 3px;
}
.doc-gotop {
	position: fixed;
	bottom: 5px;
	right: 5px;
	z-index: 9;
}
h1 span[id],
h2 span[id],
h3 span[id],
h4 span[id],
h5 span[id],
h6 span[id] {
	cursor: pointer;
}
/*避免对话框样式被工具生成的全局样式污染*/
.ui-dialog table,
.ui-dialog table tr,
.ui-dialog tr td,
.ui-dialog tr:nth-child(2n) {
	border: 0 none;
	background: transparent;
}
.ui-dialog td.ui-dialog-header {
	border-bottom: 1px solid #E5E5E5;
}
code.sh_sourceCode { color: #000000; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_keyword { color: #009; font-weight: bold; font-style: normal; }
code.sh_sourceCode .sh_type { color: #0000ff; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_string { color: #00F; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_regexp { color: #060; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_specialchar { color: #C42DA8; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_comment { color: #999; font-weight: normal; font-style: italic; }
code.sh_sourceCode .sh_number { color: #F00; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_codeproc { color: #00b800; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_symbol { color: #009; font-weight: bold; font-style: normal; }
code.sh_sourceCode .sh_function { color: #000; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_cbracket { color: #009; font-weight: bold; font-style: normal; }
code.sh_sourceCode .sh_url { color: #ff0000; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_date { color: #0000ff; font-weight: bold; font-style: normal; }
code.sh_sourceCode .sh_time { color: #0000ff; font-weight: bold; font-style: normal; }
code.sh_sourceCode .sh_file { color: #0000ff; font-weight: bold; font-style: normal; }
code.sh_sourceCode .sh_ip { color: #ff0000; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_name { color: #ff0000; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_variable { color: #ec7f15; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_oldfile { color: #C42DA8; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_newfile { color: #ff0000; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_difflines { color: #0000ff; font-weight: bold; font-style: normal; }
code.sh_sourceCode .sh_selector { color: #ec7f15; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_property { color: #0000ff; font-weight: bold; font-style: normal; }
code.sh_sourceCode .sh_value { color: #ff0000; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_codedef_var { color: #909; font-weight: normal; font-style: normal; }
code.sh_sourceCode .sh_codedef_func { color: #099; font-weight: normal; font-style: normal; }

+ 435 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/css/ui-dialog.css

@ -0,0 +1,435 @@
/*!
 * ui-dialog.css
 * Date: 2014-07-03
 * https://github.com/aui/artDialog
 * (c) 2009-2014 TangBin, http://www.planeArt.cn
 *
 * This is licensed under the GNU LGPL, version 2.1 or later.
 * For details, see: http://www.gnu.org/licenses/lgpl-2.1.html
*/
.ui-popup-full{
    width:100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    padding:0 15px !important;
    left:0 !important;
}
.ui-dialog {
    *zoom:1;
    _float: left;
    position: relative;
    background-color: #FFF;
    border: 1px solid #999;
    border-radius: 6px;
    outline: 0;
    background-clip: padding-box;
    font-family: Helvetica, arial, sans-serif;
    font-size: 14px;
    line-height: 1.428571429;
    color: #333;
    opacity: 0;
    -webkit-transform: scale(0);
    transform: scale(0);
    -webkit-transition: -webkit-transform .15s ease-in-out, opacity .15s ease-in-out;
    transition: transform .15s ease-in-out, opacity .15s ease-in-out;
	padding:0 10px;
}
.ui-popup-show .ui-dialog {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
}
.ui-popup-focus .ui-dialog {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}
.ui-popup-modal .ui-dialog {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1), 0 0 256px rgba(255, 255, 255, .3);
}
.ui-dialog-grid {
    width: 100%;
    margin: 0;
    border: 0 none;
    border-collapse:collapse;
    border-spacing: 0;
    background: transparent;
}
.ui-dialog-header,
.ui-dialog-body,
.ui-dialog-footer {
    padding: 0;
    border: 0 none;
    text-align: left;
    background: transparent;
}
.ui-dialog-header {
    white-space: nowrap;
    border-bottom: 1px solid #E5E5E5;
}
.ui-dialog-close {
    position: relative;
    _position: absolute;
    float: right;
    top: 13px;
    right: 13px;
    _height: 26px;
    padding: 0 4px;
    font-size: 21px;
    font-weight: bold;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #FFF;
    opacity: .2;
    filter: alpha(opacity=20);
    cursor: pointer;
    background: transparent;
    _background: #FFF;
    border: 0;
    -webkit-appearance: none;
}
.ui-dialog-close:hover,
.ui-dialog-close:focus {
    color: #000000;
    text-decoration: none;
    cursor: pointer;
    outline: 0;
    opacity: 0.5;
    filter: alpha(opacity=50);
}
.ui-dialog-title {
    margin: 0;
    line-height: 1.428571429;
    min-height: 16.428571429px;
    padding: 15px;
    overflow:hidden; 
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: bold;
    cursor: default;
}
.ui-dialog-body {
    padding: 20px;
    text-align: center;
}
.ui-dialog-content {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    *zoom: 1;
    *display: inline;
    text-align: left;
}
.ui-dialog-footer {
    padding: 0 20px 20px 20px;
}
.ui-dialog-statusbar {
    float: left;
    margin-right: 20px;
    padding: 6px 0;
    line-height: 1.428571429;
    font-size: 14px;
    color: #888;
    white-space: nowrap;
}
.ui-dialog-statusbar label:hover {
    color: #333;
}
.ui-dialog-statusbar input,
.ui-dialog-statusbar .label {
    vertical-align: middle;
}
.ui-dialog-button {
    float: right;
    white-space: nowrap;
}
.ui-dialog-footer button+button {
    margin-bottom: 0;
    margin-left: 5px;
}
.ui-dialog-footer button {
    width:auto;
    overflow:visible;
    display: inline-block;
    padding: 6px 12px;
    _margin-left: 5px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.428571429;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
    -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
       -o-user-select: none;
          user-select: none;
}
.ui-dialog-footer button:focus {
  outline: thin dotted #333;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
.ui-dialog-footer button:hover,
.ui-dialog-footer button:focus {
  color: #333333;
  text-decoration: none;
}
.ui-dialog-footer button:active {
  background-image: none;
  outline: 0;
  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
          box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.ui-dialog-footer button[disabled] {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.65;
  filter: alpha(opacity=65);
  -webkit-box-shadow: none;
          box-shadow: none;
}
.ui-dialog-footer button {
  color: #333333;
  background-color: #ffffff;
  border-color: #cccccc;
}
.ui-dialog-footer button:hover,
.ui-dialog-footer button:focus,
.ui-dialog-footer button:active {
  color: #333333;
  background-color: #ebebeb;
  border-color: #adadad;
}
.ui-dialog-footer button:active{
  background-image: none;
}
.ui-dialog-footer button[disabled],
.ui-dialog-footer button[disabled]:hover,
.ui-dialog-footer button[disabled]:focus,
.ui-dialog-footer button[disabled]:active {
  background-color: #ffffff;
  border-color: #cccccc;
}
.ui-dialog-footer button.ui-dialog-autofocus {
  color: #ffffff;
  background-color: #428bca;
  border-color: #357ebd;
}
.ui-dialog-footer button.ui-dialog-autofocus:hover,
.ui-dialog-footer button.ui-dialog-autofocus:focus,
.ui-dialog-footer button.ui-dialog-autofocus:active {
  color: #ffffff;
  background-color: #3276b1;
  border-color: #285e8e;
}
.ui-dialog-footer button.ui-dialog-autofocus:active {
  background-image: none;
}
.ui-popup-top-left .ui-dialog,
.ui-popup-top .ui-dialog,
.ui-popup-top-right .ui-dialog {
    top: -8px;
}
.ui-popup-bottom-left .ui-dialog,
.ui-popup-bottom .ui-dialog,
.ui-popup-bottom-right .ui-dialog {
    top: 8px;
}
.ui-popup-left-top .ui-dialog,
.ui-popup-left .ui-dialog,
.ui-popup-left-bottom .ui-dialog {
    left: -8px;
}
.ui-popup-right-top .ui-dialog,
.ui-popup-right .ui-dialog,
.ui-popup-right-bottom .ui-dialog {
    left: 8px;
}
.ui-dialog-arrow-a,
.ui-dialog-arrow-b {
    position: absolute;
    display: none;
    width: 0;
    height: 0;
    overflow:hidden;
    _color:#FF3FFF;
    _filter:chroma(color=#FF3FFF);
    border:8px dashed transparent;
}
.ui-popup-follow .ui-dialog-arrow-a,
.ui-popup-follow .ui-dialog-arrow-b{
    display: block;
}
.ui-popup-top-left .ui-dialog-arrow-a,
.ui-popup-top .ui-dialog-arrow-a,
.ui-popup-top-right .ui-dialog-arrow-a {
    bottom: -16px;
    border-top:8px solid #7C7C7C;
}
.ui-popup-top-left .ui-dialog-arrow-b,
.ui-popup-top .ui-dialog-arrow-b,
.ui-popup-top-right .ui-dialog-arrow-b {
    bottom: -15px;
    border-top:8px solid #fff;
}
.ui-popup-top-left .ui-dialog-arrow-a,
.ui-popup-top-left .ui-dialog-arrow-b  {
    left: 15px;
}
.ui-popup-top .ui-dialog-arrow-a,
.ui-popup-top .ui-dialog-arrow-b  {
    left: 50%;
    margin-left: -8px;
}
.ui-popup-top-right .ui-dialog-arrow-a,
.ui-popup-top-right .ui-dialog-arrow-b {
    right: 15px;
}
.ui-popup-bottom-left .ui-dialog-arrow-a,
.ui-popup-bottom .ui-dialog-arrow-a,
.ui-popup-bottom-right .ui-dialog-arrow-a {
    top: -16px;
    border-bottom:8px solid #7C7C7C;
}
.ui-popup-bottom-left .ui-dialog-arrow-b,
.ui-popup-bottom .ui-dialog-arrow-b,
.ui-popup-bottom-right .ui-dialog-arrow-b {
    top: -15px;
    border-bottom:8px solid #fff;
}
.ui-popup-bottom-left .ui-dialog-arrow-a,
.ui-popup-bottom-left .ui-dialog-arrow-b {
    left: 15px;
}
.ui-popup-bottom .ui-dialog-arrow-a,
.ui-popup-bottom .ui-dialog-arrow-b {
    margin-left: -8px;
    left: 50%;
}
.ui-popup-bottom-right .ui-dialog-arrow-a,
.ui-popup-bottom-right .ui-dialog-arrow-b {
    right: 15px;
}
.ui-popup-left-top .ui-dialog-arrow-a,
.ui-popup-left .ui-dialog-arrow-a,
.ui-popup-left-bottom .ui-dialog-arrow-a {
    right: -16px;
    border-left:8px solid #7C7C7C;
}
.ui-popup-left-top .ui-dialog-arrow-b,
.ui-popup-left .ui-dialog-arrow-b,
.ui-popup-left-bottom .ui-dialog-arrow-b {
    right: -15px;
    border-left:8px solid #fff;
}
.ui-popup-left-top .ui-dialog-arrow-a,
.ui-popup-left-top .ui-dialog-arrow-b {
    top: 15px;
}
.ui-popup-left .ui-dialog-arrow-a,
.ui-popup-left .ui-dialog-arrow-b {
    margin-top: -8px;
    top: 50%;
}
.ui-popup-left-bottom .ui-dialog-arrow-a,
.ui-popup-left-bottom .ui-dialog-arrow-b {
    bottom: 15px;
}
.ui-popup-right-top .ui-dialog-arrow-a,
.ui-popup-right .ui-dialog-arrow-a,
.ui-popup-right-bottom .ui-dialog-arrow-a {
    left: -16px;
    border-right:8px solid #7C7C7C;
}
.ui-popup-right-top .ui-dialog-arrow-b,
.ui-popup-right .ui-dialog-arrow-b,
.ui-popup-right-bottom .ui-dialog-arrow-b {
    left: -15px;
    border-right:8px solid #fff;
}
.ui-popup-right-top .ui-dialog-arrow-a,
.ui-popup-right-top .ui-dialog-arrow-b {
    top: 15px;
}
.ui-popup-right .ui-dialog-arrow-a,
.ui-popup-right .ui-dialog-arrow-b {
    margin-top: -8px;
    top: 50%;
}
.ui-popup-right-bottom .ui-dialog-arrow-a,
.ui-popup-right-bottom .ui-dialog-arrow-b {
    bottom: 15px;
}
@-webkit-keyframes ui-dialog-loading {
    0% {
        -webkit-transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
    }
}
@keyframes ui-dialog-loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
.ui-dialog-loading {
    vertical-align: middle;
    position: relative;
    display: block;
    *zoom: 1;
    *display: inline;
    overflow: hidden;
    width: 32px;
    height: 32px;
    top: 50%;
    margin: -16px auto 0 auto;
    font-size: 0;
    text-indent: -999em;
    color: #666;
}
.ui-dialog-loading {
    width: 100%\9;
    text-indent: 0\9;
    line-height: 32px\9;
    text-align: center\9;
    font-size: 12px\9;
}
.ui-dialog-loading::after {
    position: absolute;
    content: '';
    width: 3px;
    height: 3px;
    margin: 14.5px 0 0 14.5px;
    border-radius: 100%;
    box-shadow: 0 -10px 0 1px #ccc, 10px 0px #ccc, 0 10px #ccc, -10px 0 #ccc, -7px -7px 0 0.5px #ccc, 7px -7px 0 1.5px #ccc, 7px 7px #ccc, -7px 7px #ccc;
    -webkit-transform: rotate(360deg);
    -webkit-animation: ui-dialog-loading 1.5s infinite linear;
    transform: rotate(360deg);
    animation: ui-dialog-loading 1.5s infinite linear;
    display: none\9;
}

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1314 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/index.html


+ 1648 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/js/dialog-plus.js

@ -0,0 +1,1648 @@
/*! artDialog v6.0.5 | https://github.com/aui/artDialog */
!(function () {
var __modules__ = {};
function require (id) {
    var mod = __modules__[id];
    var exports = 'exports';
    if (typeof mod === 'object') {
        return mod;
    }
    if (!mod[exports]) {
        mod[exports] = {};
        mod[exports] = mod.call(mod[exports], require, mod[exports], mod) || mod[exports];
    }
    return mod[exports];
}
function define (path, fn) {
    __modules__[path] = fn;
}
define("jquery", function () {
	return jQuery;
});
/*!
 * PopupJS
 * Date: 2014-11-09
 * https://github.com/aui/popupjs
 * (c) 2009-2014 TangBin, http://www.planeArt.cn
 *
 * This is licensed under the GNU LGPL, version 2.1 or later.
 * For details, see: http://www.gnu.org/licenses/lgpl-2.1.html
 */
define("popup", function (require) {
var $ = require("jquery");
var _count = 0;
var _isIE6 = !('minWidth' in $('html')[0].style);
var _isFixed = !_isIE6;
function Popup () {
    this.destroyed = false;
    this.__popup = $('<div />')
    /*使用 <dialog /> 元素可能导致 z-index 永远置顶的问题(chrome)*/
    .css({
        display: 'none',
        position: 'absolute',
        /*
        left: 0,
        top: 0,
        bottom: 'auto',
        right: 'auto',
        margin: 0,
        padding: 0,
        border: '0 none',
        background: 'transparent'
        */
        outline: 0
    })
    .attr('tabindex', '-1')
    .html(this.innerHTML)
    .appendTo('body');
    this.__backdrop = this.__mask = $('<div />')
    .css({
        opacity: .7,
        background: '#000'
    });
    // 使用 HTMLElement 作为外部接口使用,而不是 jquery 对象
    // 统一的接口利于未来 Popup 移植到其他 DOM 库中
    this.node = this.__popup[0];
    this.backdrop = this.__backdrop[0];
    _count ++;
}
$.extend(Popup.prototype, {
    
    /**
     * 初始化完毕事件,在 show()、showModal() 执行
     * @name Popup.prototype.onshow
     * @event
     */
    /**
     * 关闭事件,在 close() 执行
     * @name Popup.prototype.onclose
     * @event
     */
    /**
     * 销毁前事件,在 remove() 前执行
     * @name Popup.prototype.onbeforeremove
     * @event
     */
    /**
     * 销毁事件,在 remove() 执行
     * @name Popup.prototype.onremove
     * @event
     */
    /**
     * 重置事件,在 reset() 执行
     * @name Popup.prototype.onreset
     * @event
     */
    /**
     * 焦点事件,在 foucs() 执行
     * @name Popup.prototype.onfocus
     * @event
     */
    /**
     * 失焦事件,在 blur() 执行
     * @name Popup.prototype.onblur
     * @event
     */
    /** 浮层 DOM 素节点[*] */
    node: null,
    /** 遮罩 DOM 节点[*] */
    backdrop: null,
    /** 是否开启固定定位[*] */
    fixed: false,
    /** 判断对话框是否删除[*] */
    destroyed: true,
    /** 判断对话框是否显示 */
    open: false,
    /** close 返回值 */
    returnValue: '',
    /** 是否自动聚焦 */
    autofocus: true,
    /** 对齐方式[*] */
    align: 'bottom left',
    /** 内部的 HTML 字符串 */
    innerHTML: '',
    /** CSS 类名 */
    className: 'ui-popup',
    /**
     * 显示浮层
     * @param   {HTMLElement, Event}  指定位置(可选)
     */
    show: function (anchor) {
        if (this.destroyed) {
            return this;
        }
        var that = this;
        var popup = this.__popup;
        var backdrop = this.__backdrop;
        this.__activeElement = this.__getActive();
        this.open = true;
        this.follow = anchor || this.follow;
        // 初始化 show 方法
        if (!this.__ready) {
            popup
            .addClass(this.className)
            .attr('role', this.modal ? 'alertdialog' : 'dialog')
            .css('position', this.fixed ? 'fixed' : 'absolute');
            if (!_isIE6) {
                $(window).on('resize', $.proxy(this.reset, this));
            }
            // 模态浮层的遮罩
            if (this.modal) {
                var backdropCss = {
                    position: 'fixed',
                    left: 0,
                    top: 0,
                    width: '100%',
                    height: '100%',
                    overflow: 'hidden',
                    userSelect: 'none',
                    zIndex: this.zIndex || Popup.zIndex
                };
                popup.addClass(this.className + '-modal');
                if (!_isFixed) {
                    $.extend(backdropCss, {
                        position: 'absolute',
                        width: $(window).width() + 'px',
                        height: $(document).height() + 'px'
                    });
                }
                backdrop
                .css(backdropCss)
                .attr({tabindex: '0'})
                .on('focus', $.proxy(this.focus, this));
                // 锁定 tab 的焦点操作
                this.__mask = backdrop
                .clone(true)
                .attr('style', '')
                .insertAfter(popup);
                backdrop
                .addClass(this.className + '-backdrop')
                .insertBefore(popup);
                this.__ready = true;
            }
            if (!popup.html()) {
                popup.html(this.innerHTML);
            }
        }
        popup
        .addClass(this.className + '-show')
        .show();
        backdrop.show();
        this.reset().focus();
        this.__dispatchEvent('show');
        return this;
    },
    /** 显示模态浮层。参数参见 show() */
    showModal: function () {
        this.modal = true;
        return this.show.apply(this, arguments);
    },
    
    
    /** 关闭浮层 */
    close: function (result) {
        
        if (!this.destroyed && this.open) {
            
            if (result !== undefined) {
                this.returnValue = result;
            }
            
            this.__popup.hide().removeClass(this.className + '-show');
            this.__backdrop.hide();
            this.open = false;
            this.blur();// 恢复焦点,照顾键盘操作的用户
            this.__dispatchEvent('close');
        }
    
        return this;
    },
    /** 销毁浮层 */
    remove: function () {
        if (this.destroyed) {
            return this;
        }
        this.__dispatchEvent('beforeremove');
        
        if (Popup.current === this) {
            Popup.current = null;
        }
        // 从 DOM 中移除节点
        this.__popup.remove();
        this.__backdrop.remove();
        this.__mask.remove();
        if (!_isIE6) {
            $(window).off('resize', this.reset);
        }
        this.__dispatchEvent('remove');
        for (var i in this) {
            delete this[i];
        }
        return this;
    },
    /** 重置位置 */
    reset: function () {
        var elem = this.follow;
        if (elem) {
            this.__follow(elem);
        } else {
            this.__center();
        }
        this.__dispatchEvent('reset');
        return this;
    },
    /** 让浮层获取焦点 */
    focus: function () {
        var node = this.node;
        var popup = this.__popup;
        var current = Popup.current;
        var index = this.zIndex = Popup.zIndex ++;
        if (current && current !== this) {
            current.blur(false);
        }
        // 检查焦点是否在浮层里面
        if (!$.contains(node, this.__getActive())) {
            var autofocus = popup.find('[autofocus]')[0];
            if (!this._autofocus && autofocus) {
                this._autofocus = true;
            } else {
                autofocus = node;
            }
            this.__focus(autofocus);
        }
        // 设置叠加高度
        popup.css('zIndex', index);
        //this.__backdrop.css('zIndex', index);
        Popup.current = this;
        popup.addClass(this.className + '-focus');
        this.__dispatchEvent('focus');
        return this;
    },
    /** 让浮层失去焦点。将焦点退还给之前的元素,照顾视力障碍用户 */
    blur: function () {
        var activeElement = this.__activeElement;
        var isBlur = arguments[0];
        if (isBlur !== false) {
            this.__focus(activeElement);
        }
        this._autofocus = false;
        this.__popup.removeClass(this.className + '-focus');
        this.__dispatchEvent('blur');
        return this;
    },
    /**
     * 添加事件
     * @param   {String}    事件类型
     * @param   {Function}  监听函数
     */
    addEventListener: function (type, callback) {
        this.__getEventListener(type).push(callback);
        return this;
    },
    /**
     * 删除事件
     * @param   {String}    事件类型
     * @param   {Function}  监听函数
     */
    removeEventListener: function (type, callback) {
        var listeners = this.__getEventListener(type);
        for (var i = 0; i < listeners.length; i ++) {
            if (callback === listeners[i]) {
                listeners.splice(i--, 1);
            }
        }
        return this;
    },
    // 获取事件缓存
    __getEventListener: function (type) {
        var listener = this.__listener;
        if (!listener) {
            listener = this.__listener = {};
        }
        if (!listener[type]) {
            listener[type] = [];
        }
        return listener[type];
    },
    // 派发事件
    __dispatchEvent: function (type) {
        var listeners = this.__getEventListener(type);
        if (this['on' + type]) {
            this['on' + type]();
        }
        for (var i = 0; i < listeners.length; i ++) {
            listeners[i].call(this);
        }
    },
    // 对元素安全聚焦
    __focus: function (elem) {
        // 防止 iframe 跨域无权限报错
        // 防止 IE 不可见元素报错
        try {
            // ie11 bug: iframe 页面点击会跳到顶部
            if (this.autofocus && !/^iframe$/i.test(elem.nodeName)) {
                elem.focus();
            }
        } catch (e) {}
    },
    // 获取当前焦点的元素
    __getActive: function () {
        try {// try: ie8~9, iframe #26
            var activeElement = document.activeElement;
            var contentDocument = activeElement.contentDocument;
            var elem = contentDocument && contentDocument.activeElement || activeElement;
            return elem;
        } catch (e) {}
    },
    // 居中浮层
    __center: function () {
    
        var popup = this.__popup;
        var $window = $(window);
        var $document = $(document);
        var fixed = this.fixed;
        var dl = fixed ? 0 : $document.scrollLeft();
        var dt = fixed ? 0 : $document.scrollTop();
        var ww = $window.width();
        var wh = $window.height();
        var ow = popup.width();
        var oh = popup.height();
        var left = (ww - ow) / 2 + dl;
        var top = (wh - oh) * 382 / 1000 + dt;// 黄金比例
        var style = popup[0].style;
        
        style.left = Math.max(parseInt(left), dl) + 'px';
        style.top = Math.max(parseInt(top), dt) + 'px';
    },
    
    
    // 指定位置 @param    {HTMLElement, Event}  anchor
    __follow: function (anchor) {
        
        var $elem = anchor.parentNode && $(anchor);
        var popup = this.__popup;
        
        if (this.__followSkin) {
            popup.removeClass(this.__followSkin);
        }
        // 隐藏元素不可用
        if ($elem) {
            var o = $elem.offset();
            if (o.left * o.top < 0) {
                return this.__center();
            }
        }
        
        var that = this;
        var fixed = this.fixed;
        var $window = $(window);
        var $document = $(document);
        var winWidth = $window.width();
        var winHeight = $window.height();
        var docLeft =  $document.scrollLeft();
        var docTop = $document.scrollTop();
        var popupWidth = popup.width();
        var popupHeight = popup.height();
        var width = $elem ? $elem.outerWidth() : 0;
        var height = $elem ? $elem.outerHeight() : 0;
        var offset = this.__offset(anchor);
        var x = offset.left;
        var y = offset.top;
        var left =  fixed ? x - docLeft : x;
        var top = fixed ? y - docTop : y;
        var minLeft = fixed ? 0 : docLeft;
        var minTop = fixed ? 0 : docTop;
        var maxLeft = minLeft + winWidth - popupWidth;
        var maxTop = minTop + winHeight - popupHeight;
        var css = {};
        var align = this.align.split(' ');
        var className = this.className + '-';
        var reverse = {top: 'bottom', bottom: 'top', left: 'right', right: 'left'};
        var name = {top: 'top', bottom: 'top', left: 'left', right: 'left'};
        var temp = [{
            top: top - popupHeight,
            bottom: top + height,
            left: left - popupWidth,
            right: left + width
        }, {
            top: top,
            bottom: top - popupHeight + height,
            left: left,
            right: left - popupWidth + width
        }];
        var center = {
            left: left + width / 2 - popupWidth / 2,
            top: top + height / 2 - popupHeight / 2
        };
        
        var range = {
            left: [minLeft, maxLeft],
            top: [minTop, maxTop]
        };
        // 超出可视区域重新适应位置
        $.each(align, function (i, val) {
            // 超出右或下边界:使用左或者上边对齐
            if (temp[i][val] > range[name[val]][1]) {
                val = align[i] = reverse[val];
            }
            // 超出左或右边界:使用右或者下边对齐
            if (temp[i][val] < range[name[val]][0]) {
                align[i] = reverse[val];
            }
        });
        // 一个参数的情况
        if (!align[1]) {
            name[align[1]] = name[align[0]] === 'left' ? 'top' : 'left';
            temp[1][align[1]] = center[name[align[1]]];
        }
        //添加follow的css, 为了给css使用
        className += align.join('-') + ' '+ this.className+ '-follow';
        
        that.__followSkin = className;
        if ($elem) {
            popup.addClass(className);
        }
        
        css[name[align[0]]] = parseInt(temp[0][align[0]]);
        css[name[align[1]]] = parseInt(temp[1][align[1]]);
        popup.css(css);
    },
    // 获取元素相对于页面的位置(包括iframe内的元素)
    // 暂时不支持两层以上的 iframe 套嵌
    __offset: function (anchor) {
        var isNode = anchor.parentNode;
        var offset = isNode ? $(anchor).offset() : {
            left: anchor.pageX,
            top: anchor.pageY
        };
        anchor = isNode ? anchor : anchor.target;
        var ownerDocument = anchor.ownerDocument;
        var defaultView = ownerDocument.defaultView || ownerDocument.parentWindow;
        
        if (defaultView == window) {// IE <= 8 只能使用两个等于号
            return offset;
        }
        // {Element: Ifarme}
        var frameElement = defaultView.frameElement;
        var $ownerDocument = $(ownerDocument);
        var docLeft =  $ownerDocument.scrollLeft();
        var docTop = $ownerDocument.scrollTop();
        var frameOffset = $(frameElement).offset();
        var frameLeft = frameOffset.left;
        var frameTop = frameOffset.top;
        
        return {
            left: offset.left + frameLeft - docLeft,
            top: offset.top + frameTop - docTop
        };
    }
    
});
/** 当前叠加高度 */
Popup.zIndex = 1024;
/** 顶层浮层的实例 */
Popup.current = null;
return Popup;
});
// artDialog - 默认配置
define("dialog-config", {
    /* -----已注释的配置继承自 popup.js,仍可以再这里重新定义它----- */
    // 对齐方式
    //align: 'bottom left',
    
    // 是否固定定位
    //fixed: false,
    
    // 对话框叠加高度值(重要:此值不能超过浏览器最大限制)
    //zIndex: 1024,
    // 设置遮罩背景颜色
    backdropBackground: '#000',
    // 设置遮罩透明度
    backdropOpacity: 0.7,
    // 消息内容
    content: '<span class="ui-dialog-loading">Loading..</span>',
    
    // 标题
    title: '',
    // 对话框状态栏区域 HTML 代码
    statusbar: '',
    
    // 自定义按钮
    button: null,
    
    // 确定按钮回调函数
    ok: null,
    
    // 取消按钮回调函数
    cancel: null,
    // 确定按钮文本
    okValue: 'ok',
    
    // 取消按钮文本
    cancelValue: 'cancel',
    cancelDisplay: true,
    
    // 内容宽度
    width: '',
    
    // 内容高度
    height: '',
    
    // 内容与边界填充距离
    padding: '',
    
    // 对话框自定义 className
    skin: '',
    // 对话框最外层自定义 className
    boxSkin: '',
    // 是否支持快捷关闭(点击遮罩层自动关闭)
    quickClose: false,
    // css 文件路径,留空则不会使用 js 自动加载样式
    // 注意:css 只允许加载一个
    cssUri: '../css/ui-dialog.css',
    // 模板(使用 table 解决 IE7 宽度自适应的 BUG)
    // js 使用 i="***" 属性识别结构,其余的均可自定义
    innerHTML:
        '<div i="dialog" class="ui-dialog">'
        +       '<div class="ui-dialog-arrow-a"></div>'
        +       '<div class="ui-dialog-arrow-b"></div>'
        +       '<table class="ui-dialog-grid">'
        +           '<tr>'
        +               '<td i="header" class="ui-dialog-header">'
        +                   '<button i="close" class="ui-dialog-close">&#215;</button>'
        +                   '<div i="title" class="ui-dialog-title"></div>'
        +               '</td>'
        +           '</tr>'
        +           '<tr>'
        +               '<td i="body" class="ui-dialog-body">'
        +                   '<div i="content" class="ui-dialog-content"></div>'
        +               '</td>'
        +           '</tr>'
        +           '<tr>'
        +               '<td i="footer" class="ui-dialog-footer">'
        +                   '<div i="statusbar" class="ui-dialog-statusbar"></div>'
        +                   '<div i="button" class="ui-dialog-button"></div>'
        +               '</td>'
        +           '</tr>'
        +       '</table>'
        +'</div>'
    
});
/*!
 * artDialog
 * Date: 2014-11-09
 * https://github.com/aui/artDialog
 * (c) 2009-2014 TangBin, http://www.planeArt.cn
 *
 * This is licensed under the GNU LGPL, version 2.1 or later.
 * For details, see: http://www.gnu.org/licenses/lgpl-2.1.html
 */
define("dialog", function (require) {
var $ = require("jquery");
var Popup = require("popup");
var defaults = require("dialog-config");
var css = defaults.cssUri;
// css loader: RequireJS & SeaJS
if (css) {
    var fn = require[require.toUrl ? 'toUrl' : 'resolve'];
    if (fn) {
        css = fn(css);
        css = '<link rel="stylesheet" href="' + css + '" />';
        if ($('base')[0]) {
            $('base').before(css);
        } else {
            $('head').append(css);
        } 
    }
}
var _count = 0;
var _expando = new Date() - 0; // Date.now()
var _isIE6 = !('minWidth' in $('html')[0].style);
var _isMobile = 'createTouch' in document && !('onmousemove' in document)
    || /(iPhone|iPad|iPod)/i.test(navigator.userAgent);
var _isFixed = !_isIE6 && !_isMobile;
var artDialog = function (options, ok, cancel) {
    var originalOptions = options = options || {};
    
    if (typeof options === 'string' || options.nodeType === 1) {
    
        options = {content: options, fixed: !_isMobile};
    }
    
    options = $.extend(true, {}, artDialog.defaults, options);
    options.original = originalOptions;
    var id = options.id = options.id || _expando + _count;
    var api = artDialog.get(id);
    
    
    // 如果存在同名的对话框对象,则直接返回
    if (api) {
        return api.focus();
    }
    
    
    // 目前主流移动设备对fixed支持不好,禁用此特性
    if (!_isFixed) {
        options.fixed = false;
    }
    // 快捷关闭支持:点击对话框外快速关闭对话框
    if (options.quickClose) {
        options.modal = true;
        options.backdropOpacity = 0;
    }
    
    // 按钮组
    if (!$.isArray(options.button)) {
        options.button = [];
    }
    // 取消按钮
    if (cancel !== undefined) {
        options.cancel = cancel;
    }
    
    if (options.cancel) {
        options.button.push({
            id: 'cancel',
            value: options.cancelValue,
            callback: options.cancel,
            display: options.cancelDisplay
        });
    }
    
    
    // 确定按钮
    if (ok !== undefined) {
        options.ok = ok;
    }
    
    if (options.ok) {
        options.button.push({
            id: 'ok',
            value: options.okValue,
            callback: options.ok,
            autofocus: true
        });
    }
    
    return artDialog.list[id] = new artDialog.create(options);
};
var popup = function () {};
popup.prototype = Popup.prototype;
var prototype = artDialog.prototype = new popup();
artDialog.create = function (options) {
    var that = this;
    $.extend(this, new Popup());
    var originalOptions = options.original;
    var $popup = $(this.node).html(options.innerHTML);
    var $backdrop = $(this.backdrop);
    this.options = options;
    this._popup = $popup;
    
    $.each(options, function (name, value) {
        if (typeof that[name] === 'function') {
            that[name](value);
        } else {
            that[name] = value;
        }
    });
    // 更新 zIndex 全局配置
    if (options.zIndex) {
        Popup.zIndex = options.zIndex;
    }
    // 设置 ARIA 信息
    $popup.attr({
        'aria-labelledby': this._$('title')
            .attr('id', 'title:' + this.id).attr('id'),
        'aria-describedby': this._$('content')
            .attr('id', 'content:' + this.id).attr('id')
    });
    // 关闭按钮
    this._$('close')
    .css('display', this.cancel === false ? 'none' : '')
    .attr('title', this.cancelValue)
    .on('click', function (event) {
        that._trigger('cancel');
        event.preventDefault();
    });
    
    // 添加视觉参数
    this._$('dialog').addClass(this.skin);
    $popup.addClass(this.boxSkin);
    this._$('body').css('padding', this.padding);
    // 点击任意空白处关闭对话框
    if (options.quickClose) {
        $backdrop
        .on(
            'onmousedown' in document ? 'mousedown' : 'click',
            function () {
            that._trigger('cancel');
            return false;// 阻止抢夺焦点
        });
    }
    // 遮罩设置
    this.addEventListener('show', function () {
        $backdrop.css({
            opacity: 0,
            background: options.backdropBackground
        }).animate(
            {opacity: options.backdropOpacity}
        , 150);
    });
    // ESC 快捷键关闭对话框
    this._esc = function (event) {
        var target = event.target;
        var nodeName = target.nodeName;
        var rinput = /^input|textarea$/i;
        var isTop = Popup.current === that;
        var keyCode = event.keyCode;
        // 避免输入状态中 ESC 误操作关闭
        if (!isTop || rinput.test(nodeName) && target.type !== 'button') {
            return;
        }
        
        if (keyCode === 27) {
            that._trigger('cancel');
        }
    };
    $(document).on('keydown', this._esc);
    this.addEventListener('remove', function () {
        $(document).off('keydown', this._esc);
        delete artDialog.list[this.id];
    });
    _count ++;
    
    artDialog.oncreate(this);
    return this;
};
artDialog.create.prototype = prototype;
$.extend(prototype, {
    /**
     * 显示对话框
     * @name artDialog.prototype.show
     * @param   {HTMLElement Object, Event Object}  指定位置(可选)
     */
    
    /**
     * 显示对话框(模态)
     * @name artDialog.prototype.showModal
     * @param   {HTMLElement Object, Event Object}  指定位置(可选)
     */
    /**
     * 关闭对话框
     * @name artDialog.prototype.close
     * @param   {String, Number}    返回值,可被 onclose 事件收取(可选)
     */
    /**
     * 销毁对话框
     * @name artDialog.prototype.remove
     */
    /**
     * 重置对话框位置
     * @name artDialog.prototype.reset
     */
    /**
     * 让对话框聚焦(同时置顶)
     * @name artDialog.prototype.focus
     */
    /**
     * 让对话框失焦(同时置顶)
     * @name artDialog.prototype.blur
     */
    /**
     * 添加事件
     * @param   {String}    事件类型
     * @param   {Function}  监听函数
     * @name artDialog.prototype.addEventListener
     */
    /**
     * 删除事件
     * @param   {String}    事件类型
     * @param   {Function}  监听函数
     * @name artDialog.prototype.removeEventListener
     */
    /**
     * 对话框显示事件,在 show()、showModal() 执行
     * @name artDialog.prototype.onshow
     * @event
     */
    /**
     * 关闭事件,在 close() 执行
     * @name artDialog.prototype.onclose
     * @event
     */
    /**
     * 销毁前事件,在 remove() 前执行
     * @name artDialog.prototype.onbeforeremove
     * @event
     */
    /**
     * 销毁事件,在 remove() 执行
     * @name artDialog.prototype.onremove
     * @event
     */
    /**
     * 重置事件,在 reset() 执行
     * @name artDialog.prototype.onreset
     * @event
     */
    /**
     * 焦点事件,在 foucs() 执行
     * @name artDialog.prototype.onfocus
     * @event
     */
    /**
     * 失焦事件,在 blur() 执行
     * @name artDialog.prototype.onblur
     * @event
     */
    
    /**
     * 设置内容
     * @param    {String, HTMLElement}   内容
     */
    content: function (html) {
    
        var $content = this._$('content');
        // HTMLElement
        if (typeof html === 'object') {
            html = $(html);
            $content.empty('').append(html.show());
            this.addEventListener('beforeremove', function () {
                $('body').append(html.hide());
            });
        // String
        } else {
            $content.html(html);
        }
                
        return this.reset();
    },
    
    
    /**
     * 设置标题
     * @param    {String}   标题内容
     */
    title: function (text) {
        this._$('title').html(text);
        this._$('header')[text ? 'show' : 'hide']();
        return this;
    },
    /** 设置宽度 */
    width: function (value) {
        this._$('content').css('width', value);
        return this.reset();
    },
    /** 设置高度 */
    height: function (value) {
        this._$('content').css('height', value);
        return this.reset();
    },
    /**
     * 设置按钮组
     * @param   {Array, String}
     * Options: value, callback, autofocus, disabled 
     */
    button: function (args) {
        args = args || [];
        var that = this;
        var html = '';
        var number = 0;
        this.callbacks = {};
        
           
        if (typeof args === 'string') {
            html = args;
            number ++;
        } else {
            $.each(args, function (i, val) {
                var id = val.id = val.id || val.value;
                var style = '';
                that.callbacks[id] = val.callback;
                if (val.display === false) {
                    style = ' style="display:none"';
                } else {
                    number ++;
                }
                html +=
                  '<button'
                + ' type="button"'
                + ' i-id="' + id + '"'
                + style
                + (val.disabled ? ' disabled' : '')
                + (val.autofocus ? ' autofocus class="ui-dialog-autofocus"' : '')
                + '>'
                +   val.value
                + '</button>';
                that._$('button')
                .on('click', '[i-id=' + id +']', function (event) {                
                    var $this = $(this);
                    if (!$this.attr('disabled')) {// IE BUG
                        that._trigger(id);
                    }
                
                    event.preventDefault();
                });
            });
        }
        this._$('button').html(html);
        this._$('footer')[number ? 'show' : 'hide']();
        return this;
    },
    statusbar: function (html) {
        this._$('statusbar')
        .html(html)[html ? 'show' : 'hide']();
        return this;
    },
    _$: function (i) {
        return this._popup.find('[i=' + i + ']');
    },
    
    
    // 触发按钮回调函数
    _trigger: function (id) {
        var fn = this.callbacks[id];
            
        return typeof fn !== 'function' || fn.call(this) !== false ?
            this.close().remove() : this;
    }
    
});
artDialog.oncreate = $.noop;
/** 获取最顶层的对话框API */
artDialog.getCurrent = function () {
    return Popup.current;
};
/**
 * 根据 ID 获取某对话框 API
 * @param    {String}    对话框 ID
 * @return   {Object}    对话框 API (实例)
 */
artDialog.get = function (id) {
    return id === undefined
    ? artDialog.list
    : artDialog.list[id];
};
artDialog.list = {};
/**
 * 默认配置
 */
artDialog.defaults = defaults;
return artDialog;
});
/*!
 * drag.js
 * Date: 2013-12-06
 * https://github.com/aui/artDialog
 * (c) 2009-2014 TangBin, http://www.planeArt.cn
 *
 * This is licensed under the GNU LGPL, version 2.1 or later.
 * For details, see: http://www.gnu.org/licenses/lgpl-2.1.html
 */
define("drag", function (require) {
var $ = require("jquery");
var $window = $(window);
var $document = $(document);
var isTouch = 'createTouch' in document;
var html = document.documentElement;
var isIE6 = !('minWidth' in html.style);
var isLosecapture = !isIE6 && 'onlosecapture' in html;
var isSetCapture = 'setCapture' in html;
var types = {
    start: isTouch ? 'touchstart' : 'mousedown',
    over: isTouch ? 'touchmove' : 'mousemove',
    end: isTouch ? 'touchend' : 'mouseup'
};
var getEvent = isTouch ? function (event) {
    if (!event.touches) {
        event = event.originalEvent.touches.item(0);
    }
    return event;
} : function (event) {
    return event;
};
var DragEvent = function () {
    this.start = $.proxy(this.start, this);
    this.over = $.proxy(this.over, this);
    this.end = $.proxy(this.end, this);
    this.onstart = this.onover = this.onend = $.noop;
};
DragEvent.types = types;
DragEvent.prototype = {
    start: function (event) {
        event = this.startFix(event);
        $document
        .on(types.over, this.over)
        .on(types.end, this.end);
        
        this.onstart(event);
        return false;
    },
    over: function (event) {
        event = this.overFix(event);
        this.onover(event);
        return false;
    },
    end: function (event) {
        event = this.endFix(event);
        $document
        .off(types.over, this.over)
        .off(types.end, this.end);
        this.onend(event);
        return false;
    },
    startFix: function (event) {
        event = getEvent(event);
        this.target = $(event.target);
        this.selectstart = function () {
            return false;
        };
        $document
        .on('selectstart', this.selectstart)
        .on('dblclick', this.end);
        if (isLosecapture) {
            this.target.on('losecapture', this.end);
        } else {
            $window.on('blur', this.end);
        }
        if (isSetCapture) {
            this.target[0].setCapture();
        }
        return event;
    },
    overFix: function (event) {
        event = getEvent(event);
        return event;
    },
    endFix: function (event) {
        event = getEvent(event);
        $document
        .off('selectstart', this.selectstart)
        .off('dblclick', this.end);
        if (isLosecapture) {
            this.target.off('losecapture', this.end);
        } else {
            $window.off('blur', this.end);
        }
        if (isSetCapture) {
            this.target[0].releaseCapture();
        }
        return event;
    }
    
};
/**
 * 启动拖拽
 * @param   {HTMLElement}   被拖拽的元素
 * @param   {Event} 触发拖拽的事件对象。可选,若无则监听 elem 的按下事件启动
 */
DragEvent.create = function (elem, event) {
    var $elem = $(elem);
    var dragEvent = new DragEvent();
    var startType = DragEvent.types.start;
    var noop = function () {};
    var className = elem.className
        .replace(/^\s|\s.*/g, '') + '-drag-start';
    var minX;
    var minY;
    var maxX;
    var maxY;
    var api = {
        onstart: noop,
        onover: noop,
        onend: noop,
        off: function () {
            $elem.off(startType, dragEvent.start);
        }
    };
    dragEvent.onstart = function (event) {
        var isFixed = $elem.css('position') === 'fixed';
        var dl = $document.scrollLeft();
        var dt = $document.scrollTop();
        var w = $elem.width();
        var h = $elem.height();
        minX = 0;
        minY = 0;
        maxX = isFixed ? $window.width() - w + minX : $document.width() - w;
        maxY = isFixed ? $window.height() - h + minY : $document.height() - h;
        var offset = $elem.offset();
        var left = this.startLeft = isFixed ? offset.left - dl : offset.left;
        var top = this.startTop = isFixed ? offset.top - dt  : offset.top;
        this.clientX = event.clientX;
        this.clientY = event.clientY;
        $elem.addClass(className);
        api.onstart.call(elem, event, left, top);
    };
    
    dragEvent.onover = function (event) {
        var left = event.clientX - this.clientX + this.startLeft;
        var top = event.clientY - this.clientY + this.startTop;
        var style = $elem[0].style;
        left = Math.max(minX, Math.min(maxX, left));
        top = Math.max(minY, Math.min(maxY, top));
        style.left = left + 'px';
        style.top = top + 'px';
        
        api.onover.call(elem, event, left, top);
    };
    
    dragEvent.onend = function (event) {
        var position = $elem.position();
        var left = position.left;
        var top = position.top;
        $elem.removeClass(className);
        api.onend.call(elem, event, left, top);
    };
    dragEvent.off = function () {
        $elem.off(startType, dragEvent.start);
    };
    if (event) {
        dragEvent.start(event);
    } else {
        $elem.on(startType, dragEvent.start);
    }
    return api;
};
return DragEvent;
});
/*!
 * artDialog-plus
 * Date: 2013-11-09
 * https://github.com/aui/artDialog
 * (c) 2009-2014 TangBin, http://www.planeArt.cn
 *
 * This is licensed under the GNU LGPL, version 2.1 or later.
 * For details, see: http://www.gnu.org/licenses/lgpl-2.1.html
 */
define("dialog-plus", function (require) {
var $ = require("jquery");
var dialog = require("dialog");
var drag = require("drag");
dialog.oncreate = function (api) {
    var options = api.options;
    var originalOptions = options.original;
    // 页面地址
    var url = options.url;
    // 页面加载完毕的事件
    var oniframeload = options.oniframeload;
    var $iframe;
    if (url) {
        this.padding = options.padding = 0;
        $iframe = $('<iframe />');
        $iframe.attr({
            src: url,
            name: api.id,
            width: '100%',
            height: '100%',
            allowtransparency: 'yes',
            frameborder: 'no',
            scrolling: 'no'
        })
        .on('load', function () {
            var test;
            
            try {
                // 跨域测试
                test = $iframe[0].contentWindow.frameElement;
            } catch (e) {}
            if (test) {
                if (!options.width) {
                    api.width($iframe.contents().width());
                }
                
                if (!options.height) {
                    api.height($iframe.contents().height());
                }
            }
            if (oniframeload) {
                oniframeload.call(api);
            }
        });
        api.addEventListener('beforeremove', function () {
            // 重要!需要重置iframe地址,否则下次出现的对话框在IE6、7无法聚焦input
            // IE删除iframe后,iframe仍然会留在内存中出现上述问题,置换src是最容易解决的方法
            $iframe.attr('src', 'about:blank').remove();
        }, false);
        api.content($iframe[0]);
        api.iframeNode = $iframe[0];
    }
    // 对于子页面呼出的对话框特殊处理
    // 如果对话框配置来自 iframe
    if (!(originalOptions instanceof Object)) {
        var un = function () {
            api.close().remove();
        };
        // 找到那个 iframe
        for (var i = 0; i < frames.length; i ++) {
            try {
                if (originalOptions instanceof frames[i].Object) {
                    // 让 iframe 刷新的时候也关闭对话框,
                    // 防止要执行的对象被强制收回导致 IE 报错:“不能执行已释放 Script 的代码”
                    $(frames[i]).one('unload', un);
                    break;
                }
            } catch (e) {} 
        }
    }
    // 拖拽支持
    $(api.node).on(drag.types.start, '[i=title]', function (event) {
        // 排除气泡类型的对话框
        if (!api.follow) {
            api.focus();
            drag.create(api.node, event);
        }
    });
};
dialog.get = function (id) {
    // 从 iframe 传入 window 对象
    if (id && id.frameElement) {
        var iframe = id.frameElement;
        var list = dialog.list;
        var api;
        for (var i in list) {
            api = list[i];
            if (api.node.getElementsByTagName('iframe')[0] === iframe) {
                return api;
            }
        }
    // 直接传入 id 的情况
    } else if (id) {
        return dialog.list[id];
    }
};
return dialog;
});
window.dialog = require("dialog-plus");
})();

+ 67 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/js/doc.js

@ -0,0 +1,67 @@
!(function () {
	window.console = window.console || {
		log: $.noop
	};
	var codes = {};
	var debug = location.href.indexOf('Users/tangbin') !== -1;
	$(function () {
		console.log('你可以在调试器中粘贴本页示例代码运行');
		var RE = /[\n\s\t]*?\/\/\.\.[\r\n]/;
		$('pre code').each(function (index) {
			var $this = $(this);
			var code = $this.text();
			// 忽略不完整的代码片段
			// 开头使用"//.."表示
			if (RE.test(code)) {
				$this.text(code.replace(RE, ''));
				return;
			}
			try {
				codes[index] = new Function(code);
			} catch (e) {
				return;
			}
			$this
			.after('<div class="doc-line"></div>'
				+'<button data-code="' + index + '">运行</button>');
		});
		// 回到顶部
		var $top = $('<a class="doc-gotop" href="javascript:;">TOP</a>')
		.on('click', function () {
			$(window).scrollTop(0);
			return false;
		});
		$('body').append($top);
	});
	var runCode = function (id) {
		codes[id]();
		var api = dialog.getCurrent();
		if (debug && api) {
			console.log(api);
		}
	};
	$(document).on('click', 'button[data-code]', function () {
		var id = $(this).data('code');
		runCode(id);
		return false;
	}).on('click', 'h1 [id], h2 [id], h3 [id], h4 [id], h5 [id], h6 [id]', function () {
		var id = this.id;
		location.hash = id;
	});
}());

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 5 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/js/jquery.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 9 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/api/js/sh_languages.js


+ 435 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/css/ui-dialog.css

@ -0,0 +1,435 @@
/*!
 * ui-dialog.css
 * Date: 2014-07-03
 * https://github.com/aui/artDialog
 * (c) 2009-2014 TangBin, http://www.planeArt.cn
 *
 * This is licensed under the GNU LGPL, version 2.1 or later.
 * For details, see: http://www.gnu.org/licenses/lgpl-2.1.html
*/
.ui-popup-full{
    width:100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    padding:0 15px !important;
    left:0 !important;
}
.ui-dialog {
    *zoom:1;
    _float: left;
    position: relative;
    background-color: #FFF;
    border: 1px solid #999;
    border-radius: 6px;
    outline: 0;
    background-clip: padding-box;
    font-family: Helvetica, arial, sans-serif;
    font-size: 14px;
    line-height: 1.428571429;
    color: #333;
    opacity: 0;
    -webkit-transform: scale(0);
    transform: scale(0);
    -webkit-transition: -webkit-transform .15s ease-in-out, opacity .15s ease-in-out;
    transition: transform .15s ease-in-out, opacity .15s ease-in-out;
	padding:0 10px;
}
.ui-popup-show .ui-dialog {
    opacity: 1;
    -webkit-transform: scale(1);
    transform: scale(1);
}
.ui-popup-focus .ui-dialog {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}
.ui-popup-modal .ui-dialog {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1), 0 0 256px rgba(255, 255, 255, .3);
}
.ui-dialog-grid {
    width: 100%;
    margin: 0;
    border: 0 none;
    border-collapse:collapse;
    border-spacing: 0;
    background: transparent;
}
.ui-dialog-header,
.ui-dialog-body,
.ui-dialog-footer {
    padding: 0;
    border: 0 none;
    text-align: left;
    background: transparent;
}
.ui-dialog-header {
    white-space: nowrap;
    border-bottom: 1px solid #E5E5E5;
}
.ui-dialog-close {
    position: relative;
    _position: absolute;
    float: right;
    top: 13px;
    right: 13px;
    _height: 26px;
    padding: 0 4px;
    font-size: 21px;
    font-weight: bold;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #FFF;
    opacity: .2;
    filter: alpha(opacity=20);
    cursor: pointer;
    background: transparent;
    _background: #FFF;
    border: 0;
    -webkit-appearance: none;
}
.ui-dialog-close:hover,
.ui-dialog-close:focus {
    color: #000000;
    text-decoration: none;
    cursor: pointer;
    outline: 0;
    opacity: 0.5;
    filter: alpha(opacity=50);
}
.ui-dialog-title {
    margin: 0;
    line-height: 1.428571429;
    min-height: 16.428571429px;
    padding: 15px;
    overflow:hidden; 
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: bold;
    cursor: default;
}
.ui-dialog-body {
    padding: 20px;
    text-align: center;
}
.ui-dialog-content {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    *zoom: 1;
    *display: inline;
    text-align: left;
}
.ui-dialog-footer {
    padding: 0 20px 20px 20px;
}
.ui-dialog-statusbar {
    float: left;
    margin-right: 20px;
    padding: 6px 0;
    line-height: 1.428571429;
    font-size: 14px;
    color: #888;
    white-space: nowrap;
}
.ui-dialog-statusbar label:hover {
    color: #333;
}
.ui-dialog-statusbar input,
.ui-dialog-statusbar .label {
    vertical-align: middle;
}
.ui-dialog-button {
    float: right;
    white-space: nowrap;
}
.ui-dialog-footer button+button {
    margin-bottom: 0;
    margin-left: 5px;
}
.ui-dialog-footer button {
    width:auto;
    overflow:visible;
    display: inline-block;
    padding: 6px 12px;
    _margin-left: 5px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.428571429;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
    -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
       -o-user-select: none;
          user-select: none;
}
.ui-dialog-footer button:focus {
  outline: thin dotted #333;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
.ui-dialog-footer button:hover,
.ui-dialog-footer button:focus {
  color: #333333;
  text-decoration: none;
}
.ui-dialog-footer button:active {
  background-image: none;
  outline: 0;
  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
          box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.ui-dialog-footer button[disabled] {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.65;
  filter: alpha(opacity=65);
  -webkit-box-shadow: none;
          box-shadow: none;
}
.ui-dialog-footer button {
  color: #333333;
  background-color: #ffffff;
  border-color: #cccccc;
}
.ui-dialog-footer button:hover,
.ui-dialog-footer button:focus,
.ui-dialog-footer button:active {
  color: #333333;
  background-color: #ebebeb;
  border-color: #adadad;
}
.ui-dialog-footer button:active{
  background-image: none;
}
.ui-dialog-footer button[disabled],
.ui-dialog-footer button[disabled]:hover,
.ui-dialog-footer button[disabled]:focus,
.ui-dialog-footer button[disabled]:active {
  background-color: #ffffff;
  border-color: #cccccc;
}
.ui-dialog-footer button.ui-dialog-autofocus {
  color: #ffffff;
  background-color: #428bca;
  border-color: #357ebd;
}
.ui-dialog-footer button.ui-dialog-autofocus:hover,
.ui-dialog-footer button.ui-dialog-autofocus:focus,
.ui-dialog-footer button.ui-dialog-autofocus:active {
  color: #ffffff;
  background-color: #3276b1;
  border-color: #285e8e;
}
.ui-dialog-footer button.ui-dialog-autofocus:active {
  background-image: none;
}
.ui-popup-top-left .ui-dialog,
.ui-popup-top .ui-dialog,
.ui-popup-top-right .ui-dialog {
    top: -8px;
}
.ui-popup-bottom-left .ui-dialog,
.ui-popup-bottom .ui-dialog,
.ui-popup-bottom-right .ui-dialog {
    top: 8px;
}
.ui-popup-left-top .ui-dialog,
.ui-popup-left .ui-dialog,
.ui-popup-left-bottom .ui-dialog {
    left: -8px;
}
.ui-popup-right-top .ui-dialog,
.ui-popup-right .ui-dialog,
.ui-popup-right-bottom .ui-dialog {
    left: 8px;
}
.ui-dialog-arrow-a,
.ui-dialog-arrow-b {
    position: absolute;
    display: none;
    width: 0;
    height: 0;
    overflow:hidden;
    _color:#FF3FFF;
    _filter:chroma(color=#FF3FFF);
    border:8px dashed transparent;
}
.ui-popup-follow .ui-dialog-arrow-a,
.ui-popup-follow .ui-dialog-arrow-b{
    display: block;
}
.ui-popup-top-left .ui-dialog-arrow-a,
.ui-popup-top .ui-dialog-arrow-a,
.ui-popup-top-right .ui-dialog-arrow-a {
    bottom: -16px;
    border-top:8px solid #7C7C7C;
}
.ui-popup-top-left .ui-dialog-arrow-b,
.ui-popup-top .ui-dialog-arrow-b,
.ui-popup-top-right .ui-dialog-arrow-b {
    bottom: -15px;
    border-top:8px solid #fff;
}
.ui-popup-top-left .ui-dialog-arrow-a,
.ui-popup-top-left .ui-dialog-arrow-b  {
    left: 15px;
}
.ui-popup-top .ui-dialog-arrow-a,
.ui-popup-top .ui-dialog-arrow-b  {
    left: 50%;
    margin-left: -8px;
}
.ui-popup-top-right .ui-dialog-arrow-a,
.ui-popup-top-right .ui-dialog-arrow-b {
    right: 15px;
}
.ui-popup-bottom-left .ui-dialog-arrow-a,
.ui-popup-bottom .ui-dialog-arrow-a,
.ui-popup-bottom-right .ui-dialog-arrow-a {
    top: -16px;
    border-bottom:8px solid #7C7C7C;
}
.ui-popup-bottom-left .ui-dialog-arrow-b,
.ui-popup-bottom .ui-dialog-arrow-b,
.ui-popup-bottom-right .ui-dialog-arrow-b {
    top: -15px;
    border-bottom:8px solid #fff;
}
.ui-popup-bottom-left .ui-dialog-arrow-a,
.ui-popup-bottom-left .ui-dialog-arrow-b {
    left: 15px;
}
.ui-popup-bottom .ui-dialog-arrow-a,
.ui-popup-bottom .ui-dialog-arrow-b {
    margin-left: -8px;
    left: 50%;
}
.ui-popup-bottom-right .ui-dialog-arrow-a,
.ui-popup-bottom-right .ui-dialog-arrow-b {
    right: 15px;
}
.ui-popup-left-top .ui-dialog-arrow-a,
.ui-popup-left .ui-dialog-arrow-a,
.ui-popup-left-bottom .ui-dialog-arrow-a {
    right: -16px;
    border-left:8px solid #7C7C7C;
}
.ui-popup-left-top .ui-dialog-arrow-b,
.ui-popup-left .ui-dialog-arrow-b,
.ui-popup-left-bottom .ui-dialog-arrow-b {
    right: -15px;
    border-left:8px solid #fff;
}
.ui-popup-left-top .ui-dialog-arrow-a,
.ui-popup-left-top .ui-dialog-arrow-b {
    top: 15px;
}
.ui-popup-left .ui-dialog-arrow-a,
.ui-popup-left .ui-dialog-arrow-b {
    margin-top: -8px;
    top: 50%;
}
.ui-popup-left-bottom .ui-dialog-arrow-a,
.ui-popup-left-bottom .ui-dialog-arrow-b {
    bottom: 15px;
}
.ui-popup-right-top .ui-dialog-arrow-a,
.ui-popup-right .ui-dialog-arrow-a,
.ui-popup-right-bottom .ui-dialog-arrow-a {
    left: -16px;
    border-right:8px solid #7C7C7C;
}
.ui-popup-right-top .ui-dialog-arrow-b,
.ui-popup-right .ui-dialog-arrow-b,
.ui-popup-right-bottom .ui-dialog-arrow-b {
    left: -15px;
    border-right:8px solid #fff;
}
.ui-popup-right-top .ui-dialog-arrow-a,
.ui-popup-right-top .ui-dialog-arrow-b {
    top: 15px;
}
.ui-popup-right .ui-dialog-arrow-a,
.ui-popup-right .ui-dialog-arrow-b {
    margin-top: -8px;
    top: 50%;
}
.ui-popup-right-bottom .ui-dialog-arrow-a,
.ui-popup-right-bottom .ui-dialog-arrow-b {
    bottom: 15px;
}
@-webkit-keyframes ui-dialog-loading {
    0% {
        -webkit-transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
    }
}
@keyframes ui-dialog-loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
.ui-dialog-loading {
    vertical-align: middle;
    position: relative;
    display: block;
    *zoom: 1;
    *display: inline;
    overflow: hidden;
    width: 32px;
    height: 32px;
    top: 50%;
    margin: -16px auto 0 auto;
    font-size: 0;
    text-indent: -999em;
    color: #666;
}
.ui-dialog-loading {
    width: 100%\9;
    text-indent: 0\9;
    line-height: 32px\9;
    text-align: center\9;
    font-size: 12px\9;
}
.ui-dialog-loading::after {
    position: absolute;
    content: '';
    width: 3px;
    height: 3px;
    margin: 14.5px 0 0 14.5px;
    border-radius: 100%;
    box-shadow: 0 -10px 0 1px #ccc, 10px 0px #ccc, 0 10px #ccc, -10px 0 #ccc, -7px -7px 0 0.5px #ccc, 7px -7px 0 1.5px #ccc, 7px 7px #ccc, -7px 7px #ccc;
    -webkit-transform: rotate(360deg);
    -webkit-animation: ui-dialog-loading 1.5s infinite linear;
    transform: rotate(360deg);
    animation: ui-dialog-loading 1.5s infinite linear;
    display: none\9;
}

+ 126 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/css/ui-dialog.min.css

@ -0,0 +1,126 @@
.ui-popup-full { width: 100%; box-sizing: border-box; -webkit-box-sizing: border-box; padding: 0 25px !important; left: 0 !important }
.ui-dialog {
 *zoom: 1; _float: left; position: relative; background-color: #FFF; border: 1px solid #999; border-radius: 6px; outline: 0; background-clip: padding-box; font-family: Helvetica, arial, sans-serif; font-size: 14px; line-height: 1.428571429; color: #333; opacity: 0; -webkit-transform: scale(0); transform: scale(0); -webkit-transition: -webkit-transform .15s ease-in-out, opacity .15s ease-in-out; transition: transform .15s ease-in-out, opacity .15s ease-in-out; padding: 0 10px }
.ui-popup-show .ui-dialog { opacity: 1; -webkit-transform: scale(1); transform: scale(1) }
.ui-popup-focus .ui-dialog { box-shadow: 0 0 8px rgba(0, 0, 0, 0.1) }
.ui-popup-modal .ui-dialog { box-shadow: 0 0 8px rgba(0, 0, 0, 0.1), 0 0 256px rgba(255, 255, 255, .3) }
.ui-dialog-grid { width: 100%; margin: 0; border: 0 none; border-collapse: collapse; border-spacing: 0; background: transparent }
.ui-dialog-header, .ui-dialog-body, .ui-dialog-footer { padding: 0; border: 0 none; text-align: left; background: transparent }
.ui-dialog-header { white-space: nowrap; border-bottom: 1px solid #e5e5e5 }
.ui-dialog-close { position: relative; _position: absolute; float: right; top: 13px; right: 13px; _height: 26px; padding: 0 4px; font-size: 21px; font-weight: bold; line-height: 1; color: #000; text-shadow: 0 1px 0 #FFF; opacity: .2; filter: alpha(opacity=20); cursor: pointer; background: transparent; _background: #FFF; border: 0; -webkit-appearance: none }
.ui-dialog-close:hover, .ui-dialog-close:focus { color: #000; text-decoration: none; cursor: pointer; outline: 0; opacity: .5; filter: alpha(opacity=50) }
.ui-dialog-title { margin: 0; line-height: 1.428571429; min-height: 16.428571429px; padding: 15px; overflow: hidden; white-space: pre-wrap;font-weight: bold; cursor: default }
.ui-dialog-body { padding: 20px; text-align: center }
.ui-dialog-content { display: inline-block; position: relative; vertical-align: middle;  *zoom: 1; *display: inline;text-align: left }
.ui-dialog-footer { padding: 0 20px 20px 20px }
.ui-dialog-statusbar { float: left; margin-right: 20px; padding: 6px 0; line-height: 1.428571429; font-size: 14px; color: #888; white-space: nowrap }
.ui-dialog-statusbar label:hover { color: #333 }
.ui-dialog-statusbar input, .ui-dialog-statusbar .label { vertical-align: middle }
.ui-dialog-button { float: right; white-space: nowrap }
.ui-dialog-footer button + button { margin-bottom: 0; margin-left: 5px }
.ui-dialog-footer button { width: auto; overflow: visible; display: inline-block; padding: 6px 12px; _margin-left: 5px; margin-bottom: 0; font-size: 14px; font-weight: normal; line-height: 1.428571429; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; background-image: none; border: 1px solid transparent; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none }
.ui-dialog-footer button:focus { outline: thin dotted #333; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px }
.ui-dialog-footer button:hover, .ui-dialog-footer button:focus { color: #333; text-decoration: none }
.ui-dialog-footer button:active { background-image: none; outline: 0; -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125) }
.ui-dialog-footer button[disabled] { pointer-events: none; cursor: not-allowed; opacity: .65; filter: alpha(opacity=65); -webkit-box-shadow: none; box-shadow: none }
.ui-dialog-footer button { color: #333; background-color: #fff; border-color: #ccc }
.ui-dialog-footer button:hover, .ui-dialog-footer button:focus, .ui-dialog-footer button:active { color: #333; background-color: #ebebeb; border-color: #adadad }
.ui-dialog-footer button:active { background-image: none }
.ui-dialog-footer button[disabled], .ui-dialog-footer button[disabled]:hover, .ui-dialog-footer button[disabled]:focus, .ui-dialog-footer button[disabled]:active { background-color: #fff; border-color: #ccc }
.ui-dialog-footer button.ui-dialog-autofocus { color: #fff; background-color: #428bca; border-color: #357ebd }
.ui-dialog-footer button.ui-dialog-autofocus:hover, .ui-dialog-footer button.ui-dialog-autofocus:focus, .ui-dialog-footer button.ui-dialog-autofocus:active { color: #fff; background-color: #3276b1; border-color: #285e8e }
.ui-dialog-footer button.ui-dialog-autofocus:active { background-image: none }
.ui-popup-top-left .ui-dialog, .ui-popup-top .ui-dialog, .ui-popup-top-right .ui-dialog { top: -8px }
.ui-popup-bottom-left .ui-dialog, .ui-popup-bottom .ui-dialog, .ui-popup-bottom-right .ui-dialog { top: 8px }
.ui-popup-left-top .ui-dialog, .ui-popup-left .ui-dialog, .ui-popup-left-bottom .ui-dialog { left: -8px }
.ui-popup-right-top .ui-dialog, .ui-popup-right .ui-dialog, .ui-popup-right-bottom .ui-dialog { left: 8px }
.ui-dialog-arrow-a, .ui-dialog-arrow-b { position: absolute; display: none; width: 0; height: 0; overflow: hidden; _color: #ff3fff; _filter: chroma(color=#FF3FFF); border: 8px dashed transparent }
.ui-popup-follow .ui-dialog-arrow-a, .ui-popup-follow .ui-dialog-arrow-b { display: block }
.ui-popup-top-left .ui-dialog-arrow-a, .ui-popup-top .ui-dialog-arrow-a, .ui-popup-top-right .ui-dialog-arrow-a { bottom: -16px; border-top: 8px solid #7c7c7c }
.ui-popup-top-left .ui-dialog-arrow-b, .ui-popup-top .ui-dialog-arrow-b, .ui-popup-top-right .ui-dialog-arrow-b { bottom: -15px; border-top: 8px solid #fff }
.ui-popup-top-left .ui-dialog-arrow-a, .ui-popup-top-left .ui-dialog-arrow-b { left: 15px }
.ui-popup-top .ui-dialog-arrow-a, .ui-popup-top .ui-dialog-arrow-b { left: 50%; margin-left: -8px }
.ui-popup-top-right .ui-dialog-arrow-a, .ui-popup-top-right .ui-dialog-arrow-b { right: 15px }
.ui-popup-bottom-left .ui-dialog-arrow-a, .ui-popup-bottom .ui-dialog-arrow-a, .ui-popup-bottom-right .ui-dialog-arrow-a { top: -16px; border-bottom: 8px solid #7c7c7c }
.ui-popup-bottom-left .ui-dialog-arrow-b, .ui-popup-bottom .ui-dialog-arrow-b, .ui-popup-bottom-right .ui-dialog-arrow-b { top: -15px; border-bottom: 8px solid #fff }
.ui-popup-bottom-left .ui-dialog-arrow-a, .ui-popup-bottom-left .ui-dialog-arrow-b { left: 15px }
.ui-popup-bottom .ui-dialog-arrow-a, .ui-popup-bottom .ui-dialog-arrow-b { margin-left: -8px; left: 50% }
.ui-popup-bottom-right .ui-dialog-arrow-a, .ui-popup-bottom-right .ui-dialog-arrow-b { right: 15px }
.ui-popup-left-top .ui-dialog-arrow-a, .ui-popup-left .ui-dialog-arrow-a, .ui-popup-left-bottom .ui-dialog-arrow-a { right: -16px; border-left: 8px solid #7c7c7c }
.ui-popup-left-top .ui-dialog-arrow-b, .ui-popup-left .ui-dialog-arrow-b, .ui-popup-left-bottom .ui-dialog-arrow-b { right: -15px; border-left: 8px solid #fff }
.ui-popup-left-top .ui-dialog-arrow-a, .ui-popup-left-top .ui-dialog-arrow-b { top: 15px }
.ui-popup-left .ui-dialog-arrow-a, .ui-popup-left .ui-dialog-arrow-b { margin-top: -8px; top: 50% }
.ui-popup-left-bottom .ui-dialog-arrow-a, .ui-popup-left-bottom .ui-dialog-arrow-b { bottom: 15px }
.ui-popup-right-top .ui-dialog-arrow-a, .ui-popup-right .ui-dialog-arrow-a, .ui-popup-right-bottom .ui-dialog-arrow-a { left: -16px; border-right: 8px solid #7c7c7c }
.ui-popup-right-top .ui-dialog-arrow-b, .ui-popup-right .ui-dialog-arrow-b, .ui-popup-right-bottom .ui-dialog-arrow-b { left: -15px; border-right: 8px solid #fff }
.ui-popup-right-top .ui-dialog-arrow-a, .ui-popup-right-top .ui-dialog-arrow-b { top: 15px }
.ui-popup-right .ui-dialog-arrow-a, .ui-popup-right .ui-dialog-arrow-b { margin-top: -8px; top: 50% }
.ui-popup-right-bottom .ui-dialog-arrow-a, .ui-popup-right-bottom .ui-dialog-arrow-b { bottom: 15px }
 @-webkit-keyframes ui-dialog-loading {
 0% {
 -webkit-transform: rotate(0deg)
}
 100% {
 -webkit-transform: rotate(360deg)
}
}
 @keyframes ui-dialog-loading {
 0% {
 transform: rotate(0deg)
}
 100% {
 transform: rotate(360deg)
}
}
.ui-dialog-loading { vertical-align: middle; position: relative; display: block;  *zoom: 1;
 *display: inline;
overflow: hidden; width: 32px; height: 32px; top: 50%; margin: -16px auto 0 auto; font-size: 0; text-indent: -999em; color: #666 }
.ui-dialog-loading { width: 100% \9; text-indent: 0 \9; line-height: 32px \9; text-align: center \9; font-size: 12px \9 }
.ui-dialog-loading::after { position: absolute; content: ''; width: 3px; height: 3px; margin: 14.5px 0 0 14.5px; border-radius: 100%; box-shadow: 0 -10px 0 1px #ccc, 10px 0 #ccc, 0 10px #ccc, -10px 0 #ccc, -7px -7px 0 .5px #ccc, 7px -7px 0 1.5px #ccc, 7px 7px #ccc, -7px 7px #ccc; -webkit-transform: rotate(360deg); -webkit-animation: ui-dialog-loading 1.5s infinite linear; transform: rotate(360deg); animation: ui-dialog-loading 1.5s infinite linear; display: none \9 }
.ax-popup { padding: 0; border: 0; border-radius: 10px; outline: 0; font-size: 14px; line-height: 1.428571429; color: #333; overflow: hidden; }
.ax-popup .ui-dialog-header { font-size: 17px; font-weight: 700; border: 0; text-align: center; }
.ax-popup .ui-dialog-close { display: none; }
.ax-popup .ui-dialog-title { padding: 15px 20px 0 20px; border-top-left-radius: 10px; border-top-right-radius: 10px; overflow: hidden; }
.fat-title .ui-dialog-title { padding: 25px 15px 0 15px; }
.ax-popup .ui-dialog-body, .ax-popup .ui-dialog-content { text-align: center; color: #5b5b5b; }
.ui-popup-modal .ui-dialog { -webkit-box-shadow: none; box-shadow: none; }
.ax-popup .ui-dialog-body { padding: 15px; line-height:1.8; }
.ax-popup .ui-dialog-footer { border-top: 1px solid #e1e1e1; padding: 0; text-align: center; border-radius: 0 0 10px 10px; overflow: hidden; }
.ax-popup .ui-dialog-button { float: none; width: 100%; white-space: nowrap; display: -webkit-box; display: box; }
.ax-popup .ui-dialog-footer button { display: box; display: -webkit-box; -webkit-box-flex: 1; box-flex: 1; box-sizing: border-box; -webkit-box-sizing: border-box; padding: 0; margin: 0; height: 44px; font-size: 17px; font-weight: normal; color: #167efb; cursor: pointer; background: none; border: 0; text-align: center !important; border-left: 1px solid #e1e1e1; border-radius: 0; outline: 0; }
.ax-popup .ui-dialog-footer button span { display: block; width: 100%; text-align: center; }
.ax-popup .ui-dialog-footer button + button { margin-bottom: 0; margin-left: 0; }
.ax-popup .ui-dialog-footer button.ui-dialog-autofocus { color: #167efb; background-color: #fff; border: 0; border-left: 1px solid #e1e1e1; }
.ax-popup .ui-dialog-footer button:first-child { border: 0; border-bottom-left-radius: 10px; }
.ax-popup .ui-dialog-footer button:last-child { border-bottom-right-radius: 10px; }
.ax-popup .ui-dialog-footer button:active { background-image: none; outline: 0; -webkit-box-shadow: none; box-shadow: none; background: #efefef; }
.bk-popup { padding: 0 10px; border: 0; border-radius: 10px; outline: 0; font-size: 14px; line-height: 1.428571429; color: #fff; overflow: hidden; border:0; background:rgba(0,0,0,.8);}
.ui-popup-focus .bk-popup{ box-shadow:none; }
.bk-popup .ui-dialog-header { font-size: 17px; font-weight: 700; border: 0; text-align: center;}
.bk-popup .ui-dialog-close { display: none; }
.bk-popup .ui-dialog-title { padding: 15px 20px 0 20px; border-top-left-radius: 10px; border-top-right-radius: 10px; overflow: hidden; }
.fat-title .ui-dialog-title { padding: 25px 15px 0 15px; }
.bk-popup .ui-dialog-body, .bk-popup .ui-dialog-content { text-align: center; color: #5b5b5b; font-size:17px; line-height:1.5; background:rgba(0,0,0,0); }
.ui-popup .bk-popup tr, .ui-popup  .bk-popup tr {background:none}
.ui-popup-modal .ui-dialog { -webkit-box-shadow: none; box-shadow: none; }
.bk-popup .ui-dialog-content, .bk-popup tr{ background:transparent; color:#fff;}
.thin-con .ui-dialog-body { padding: 9px 10px; }
.bk-popup .ui-dialog-footer { border-top: 1px solid rgba(255,255,255,.3); padding: 10px 0; text-align: center; border-radius: 0 0 10px 10px; overflow: hidden; }
.bk-popup .ui-dialog-button { float: none; width: 100%; white-space: nowrap; display: -webkit-box; display: box; }
.bk-popup .ui-dialog-footer button { display: box; display: -webkit-box; -webkit-box-flex: 1; box-flex: 1; box-sizing: border-box; -webkit-box-sizing: border-box; padding: 0; margin: 0; height: 28px; font-size: 17px; font-weight: normal; color: #fff; cursor: pointer; background: none; border: 0; text-align: center !important; border-left: 1px solid rgba(255,255,255,.3); border-radius: 0; outline: 0; }
.bk-popup .ui-dialog-footer button span { display: block; width: 100%; text-align: center; }
.bk-popup .ui-dialog-footer button + button { margin-bottom: 0; margin-left: 0; }
.bk-popup .ui-dialog-footer button.ui-dialog-autofocus { color: #fff; background-color:transparent; border: 0; border-left: 1px solid rgba(255,255,255,.3); }
.bk-popup .ui-dialog-footer button:first-child { border: 0; border-bottom-left-radius: 10px; }
.bk-popup .ui-dialog-footer button:last-child { border-bottom-right-radius: 10px; }
.bk-popup .ui-dialog-footer button:active { background-image: none; outline: 0; color:#167efb; -webkit-box-shadow: none; box-shadow:none;}
.ui-dialog-loading{ text-align:left;}
.smallTips .ui-dialog-grid{margin:15px 0;}
.ui-popup p,.ui-popup blockquote,.ui-popup ul,.ui-popup ol,.ui-popup dl,.ui-popup li, .ui-popup pre { margin: 15px 0; }
.ui-popup table { padding: 0; border-collapse: collapse; }
.ui-popup tr { background-color: white; margin: 0; padding: 0; }
.ui-popup th { font-weight: bold; text-align: left; margin: 0; padding: 6px 13px; }
.ui-popup td { text-align: left; margin: 0; padding: 6px 13px; }
.ui-popup th :first-child,.ui-popup td :first-child { margin-top: 0; }
.ui-popup th :last-child,.ui-popup td :last-child { margin-bottom: 0; }

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 930 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/js/dialog-plus.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/artDialog/6.0.5/js/dialog-plus.min.js


+ 1597 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/css/chatRoom.css

@ -0,0 +1,1597 @@
@charset "utf-8";
/* CSS Document */
body,
html {
	background: #f3f3f3;
}
.c-ccc {
	color: #ccc;
}
.ax-naills span.axills-boxer {
	display: inline-block;
	padding: 3px 5px;
	background: #f5f5f5;
	color: #999999;
	font-size: 10px;
	border-radius: 5px;
}
.ax-naills span.axills-right {
	background: #fff;
	color: #17b3ec;
	border: 1px solid #17b3ec;
	padding: 3px 5px;
	border-radius: 5px;
	font-size: 10px;
}
.ax-naills .c-btn-tiny {
	padding: 3px 15px;
	border-color: #17b3ec;
	color: #17b3ec;
}
.ax-naills .c-btn-tiny-grey {
	padding: 3px 15px;
	border-color: #C0C0C0;
	color: #C0C0C0;
	background-color: #E5E5E5;
}
.ax-naills span.ax-longboxer {
	background: #f5f5f5;
	color: #999999;
	font-size: 10px;
	padding: 3px 10px;
	display: inline-block;
	max-width: 100%;
	box-sizing: border-box;
	border-radius: 5px;
}
.c-17b3ec {
	color: #17b3ec;
}
.ax-naills span.ax-qybox {
	display: inline-block;
	font-size: 10px;
	padding: 2px 5px;
	border-radius: 5px;
	font-size: 10px;
}
.ax-naills span.ax-qybox.b-ff9555 {
	color: #ff9555;
	border: 1px solid #ff9555;
}
.ax-naills span.ax-qybox.b-2ddc46 {
	color: #2ddc46;
	border: 1px solid #2ddc46;
}
.ax-naills span.ax-qybox.b-2d8cdc {
	color: #2d8cdc;
	border: 1px solid #2d8cdc;
}
.c-4bd663 {
	color: #4bd663;
}
.tioper-hd {
	line-height: 33px;
}
.bgc-f7f7f7 {
	background: #f7f7f7;
}
.bgc-ebebeb {
	background: #ebebeb;
}
#serv-liang th {
	background: #f4f7fa;
	vertical-align: middle;
	text-align: center;
	border-right: 1px solid #e1e1e1;
	border-bottom: 1px solid #e1e1e1;
	padding: 10px 5px;
}
#serv-liang td {
	background: #fff;
	vertical-align: middle;
	text-align: center;
	border-right: 1px solid #e1e1e1;
	border-bottom: 1px solid #e1e1e1;
	padding: 10px 5px;
	color: #5b5b5b;
}
#serv-liang td.first {
	color: #909090;
}
.c-list .c-list-info > p.c-f12 {
	font-size: 12px;
}
.tanper .c-btn {
	padding: 5px 5px;
}
.tanper {
	background: #fbfcfc;
}
/* 医患沟通开始 */
.c-chat-box {
	border: none;
	padding-left: 2%;
	padding-right: 2%;
}
.time-tips {
	margin: 10px 0 0 0;
	text-align: center;
	clear: both;
}
.time-tips span {
	position: relative;
	display: inline-block;
	padding: 0 60px;
	color: #aeaeae;
	font-size: 15px;
}
.time-tips span:before,
.time-tips span:after {
	position: absolute;
	content: "";
	display: block;
	width: 50px;
	height: 1px;
	background: #e6e4e1;
	top: 50%;
}
.time-tips span:before {
	left: 0;
}
.time-tips span:after {
	right: 0;
}
.chat-left,
.chat-right {
	clear: both;
	overflow: hidden;
	padding: 10px 0;
}
.chat-left > dt,
.chat-right > dt {
	width: 40px;
	height: 40px;
}
.chat-left > dt {
	float: left;
	margin-right: 15px;
}
.chat-right > dt {
	float: right;
	margin-left: 15px;
}
.chat-left > dt img,
.chat-right > dt img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}
.chat-left > dd,
.chat-right > dd {
	position: relative;
	min-height: 18px;
	font-size: 15px;
	display: inline-block;
	max-width: 80%;
	background: #fff;
	border: 1px solid #e1e1e1;
	border-radius: 6px;
	padding: 8px 10px;
	box-shadow: 1px 1px 1px rgba(0, 0, 0, .1);
}
.chat-left > dd {
	float: left;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.chat-right > dd {
	float: right;
	background: #bce0ff;
	border: 1px solid #81bdf7;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.chat-left > dd:after {
	content: "";
	position: absolute;
	top: 14px;
	left: -6px;
	display: block;
	width: 8px;
	height: 8px;
	background: #fff;
	border-color: #e1e1e1;
	border-style: solid;
	border-width: 1px 0 0 1px;
	-webkit-transform: rotate(-45deg);
	-moz-transform: rotate(-45deg);
	transform: rotate(-45deg);
}
.chat-right > dd:after {
	content: "";
	position: absolute;
	top: 14px;
	right: -6px;
	display: block;
	width: 8px;
	height: 8px;
	background: #bce0ff;
	border-color: #81bdf7;
	border-style: solid;
	border-width: 1px 0 0 1px;
	-webkit-transform: rotate(135deg);
	-moz-transform: rotate(135deg);
	transform: rotate(135deg);
}
.chat-left > dd p img,
.chat-right > dd p img {
	max-width: 150px;
	max-height: 150px;
	margin: 5px 0;
}
.chat-msg-box {
	bottom: 0;
	left: 0
}
.chat-msg-box .input-group .form-control {
	height: 32px;
}
.pull-more {
	text-align: center;
	color: #5b5b5b;
	font-size: 14px;
	padding: 14px 0;
}
/* 医患沟通结束 */
.pt13 {
	padding-top: 13px;
}
.jt-boradius {
	border-radius: 5px;
}
.bot-pper a.c-btn {
	border: 1px dashed #999999;
	text-align: center;
	display: block;
	color: #666666;
	font-size: 16px;
	border-radius: 5px;
}
.c-999999 {
	color: #999999;
}
.lh40 {
	line-height: 40px;
}
/***/
.call-con {
	clear: both;
	overflow: hidden;
}
.phone-book,
.doctor-list,
.ill-case {
	width: 100%;
	background: #fff;
}
.phone-book li,
.doctor-list li,
.ill-case li {
	width: 100%;
	overflow: hidden;
	border-bottom: 1px solid #e1e1e1;
}
.contacts {
	position: relative;
	height: 65px;
	transform: translateX(0);
	transition: all 0.3s;
	-webkit-transform: translateX(0);
	-webkit-transition: all 0.3s;
	-moz-transform: translateX(0);
	-moz-transition: all 0.3s;
}
.contact-sin {
	position: absolute;
	top: 50%;
	padding: 0 15px 0 15px;
	width: 100%;
	box-sizing: border-box;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	transform: translateY(50%);
	-webkit-transform: translateY(-50%);
	-moz-transform: translateY(-50%);
}
.contact-sin dt {
	position: absolute;
	width: 40px;
}
.contact-sin dd {
	float: left;
	min-height: 40px;
	width: 100%;
}
.contact-sin dd h4 {
	font-size: 15px;
	display: inline-block;
	padding-right: 20px;
	line-height: normal;
	vertical-align: middle;
	position: relative;
	box-sizing: border-box;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
}
.contact-sin h4 .iconfont {
	position: absolute;
	top: 50%;
	right: 0;
	margin-top: -9px;
	font-size: 14px;
}
.contact-sin dt a,
.doctor-sin dt a {
	display: block;
}
.doctors {
	position: relative;
	height: 90px;
	padding-right: 60px;
	box-sizing: border-box;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
}
.doctor-sin {
	position: absolute;
	top: 50%;
	padding: 0 60px 0 15px;
	width: 100%;
	box-sizing: border-box;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	transform: translateY(50%);
	-webkit-transform: translateY(-50%);
	-moz-transform: translateY(-50%);
}
.doctors:after {
	position: absolute;
	top: 50%;
	right: 60px;
	content: "";
	display: block;
	width: 1px;
	height: 54px;
	background: #e1e1e1;
	z-index: 100;
	margin-top: -27px;
}
.apply:after {
	right: 75px;
	background: rgba(0, 0, 0, 0);
}
.apply .doctor-sin {
	padding-right: 70px;
}
@media screen and (min-width:360px) {
	.apply .doctor-sin {
		padding-right: 75px;
	}
}
.doctor-sin dt {
	position: absolute;
	width: 54px;
	top: 50%;
	transform: translateY(-50%);
	-webkit-transform: translateY(-50%);
	-moz-transform: translateY(-50%);
}
.doctor-sin dd {
	float: left;
	margin-left: 69px;
	padding: 5px 0;
	min-height: 54px;
	box-sizing: border-box;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
}
.doctor-sin dd h4 {
	font-size: 18px;
	display: inline-block;
	padding: 0 0 4px 0;
	line-height: normal;
	vertical-align: middle;
	position: relative;
	box-sizing: border-box;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
}
.doctor-sin dd p {
	white-space: pre-wrap;
	word-wrap: break-word;
	max-height: 40px;
	overflow: hidden;
}
.scrollLeft {
	transform: translateX(-72px);
	transition: all 0.3s;
	-webkit-transform: translateX(-72px);
	-webkit-transition: all 0.3s;
	-moz-transform: translateX(-72px);
	-moz-transition: all 0.3s;
}
.call-phone {
	position: absolute;
	display: inline-block;
	width: 40px;
	height: 40px;
	right: 10px;
	top: 50%;
	margin-top: -20px;
	text-align: center;
	line-height: 40px;
}
.call-phone .iconfont {
	font-size: 30px;
	color: #4dcd70;
}
.apply-btn {
	position: absolute;
	display: inline-block;
	width: 50px;
	right: 15px;
	top: 50%;
	margin-top: -14px;
	text-align: center;
	line-height: 40px;
}
.del-contact {
	position: absolute;
	display: inline-block;
	width: 72px;
	height: 100%;
	background: #ff3b2f;
	left: 100%;
	top: 0;
	text-align: center;
	line-height: 65px;
	color: #fff;
	font-size: 18px;
}
.call-tips {
	list-style: decimal;
	list-style-position: outside;
	padding-left: 15px;
}
.call-tips li {
	padding-bottom: 5px;
}
.no-data {
	width: 100%;
	font-size: 12px;
	color: #909090;
	text-align: center;
	padding: 30px 0;
}
.no-data-img {
	width: 40%;
	max-width: 320px;
	margin: 0 auto;
}
.no-data-icon {
	width: 100%;
	height: 0;
	padding-bottom: 100%;
	background: url(http://ued.yihu.cn/htmlCode/健康之路APP/诊间咨询/images/nodata.png) no-repeat 0 0;
	background-size: 100% auto;
}
.no-data p {
	font-size: 14px;
	padding-top: 10px;
}
em.online,
em.offline {
	display: inline-block;
	font-size: 12px;
	background: #4dcd70;
	color: #fff;
	border-radius: 2px;
	padding: 0 2px;
	line-height: 14px;
	vertical-align: middle;
}
em.offline {
	background: #909090;
}
/**/
.header-menus {
	right: 15px;
	top: 0;
	position: absolute;
}
.header-menus a {
	color: #5cb4ff;
}
.referral-pop {
	width: 250px;
	position: fixed;
	left: 50%;
	margin-left: -125px;
	top: 50%;
	margin-top: -80px;
	z-index: 600;
}
.referral-pop-hold {
	position: relative;
	z-index: 631;
	background: #fff;
	border-radius: 7px;
	overflow: hidden;
}
.referral-pop-hold a {
	display: block;
	line-height: 55px;
	text-align: center;
	color: #666;
	border-bottom: 1px solid #f2f2f2;
	font-size: 16px;
}
.referral-pop-hold a.cancle {
	color: #999;
	border-bottom: none;
}
.referral-pop-mb {
	width: 100%;
	height: 100%;
	position: fixed;
	left: 0;
	top: 0;
	background: rgba(0, 0, 0, .5);
	z-index: 600;
}
.juris-close {
	position: absolute;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, .7);
	left: 0;
	top: 0;
	z-index: 600;
	color: #fff;
	text-align: center;
	display: box;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-box-pack: center;
	font-size: 18px;
}
.seval-hold {
	position: relative;
	padding-left: 33px;
	font-size: 12px;
	color: #999;
	margin-top: 6px;
}
.seval-tit {
	position: absolute;
	left: 0;
	top: 5px;
}
.seval-con {
	background: #eee;
	padding: 7px 10px;
	border-radius: 5px;
}
.star-img {
	vertical-align: middle;
	margin-bottom: 4px;
}
.tw-add {
	margin: 0 7px 0 2px;
	text-align: center;
}
.tw-add-detail {
	padding: 7px 15px;
	border-top: 1px solid #e1e1e1;
	margin-top: 10px;
}
.tw-add-detail li {
	display: block;
	width: 25%;
	text-align: center;
	float: left;
	color: #909090;
}
.tw-add-detail li img {
	margin: 5px;
}
.ask-lab-lage {
	width: 100%;
	overflow: auto;
	border-bottom: 1px solid #e1e1e1;
}
.ask-lab-lage ul {
	display: block;
	width: 400px;
	background: #fff;
}
.ask-lab-lage li {
	display: block;
	width: auto;
	padding: 0 2px;
	float: left;
	line-height: 40px;
	text-align: center;
	position: relative;
	margin: 0 12px;
}
.ask-lab-lage li a {
	margin-top: 5px;
	color: #333;
}
.ask-lab-lage li.curr a {
	color: #17b3ec;
}
.ask-lab-lage li.curr:before {
	content: '';
	display: block;
	width: 100%;
	height: 2px;
	background: #17b3ec;
	position: absolute;
	left: 0;
	bottom: 0;
}
.appeal-texa {
	background: #fff;
	border: none;
	width: 100%;
	padding: 10px;
	height: 150px;
	font-size: 14px;
}
.mui-toast-container {
	position: fixed;
	z-index: 9999;
	bottom: 50px;
	width: 100%;
	-webkit-transition: opacity .8s;
	transition: opacity .8s;
	opacity: 0
}
.mui-toast-container.mui-active {
	opacity: 1
}
.mui-toast-message {
	font-size: 14px;
	width: 270px;
	margin: 5px auto;
	padding: 5px;
	text-align: center;
	color: #000;
	border-radius: 7px;
	background-color: #d8d8d8
}
.win-broadcast {
	position: fixed;
	outline: 0px;
	top: 50%;
	left: 50%;
	margin: -113px 0 0 -135px;
	width: 269px;
	height: 226px;
	border-radius: 5px;
	z-index: 100;
}
.win-broadcast .bg {
	background-color: #fff;
	width: 269px;
	height: 226px;
	border-radius: 5px;
	display: block;
}
.win-broadcast .broadcast {
	background: url(../images/broadcast.png) no-repeat 0 -2px;
	width: 85px;
	height: 85px;
	display: block;
	background-size: 100%;
	position: absolute;
	top: 67px;
	left: 34%;
	border-radius: 50%;
	z-index: 99;
}
.win-broadcast .word {
	position: absolute;
	bottom: 0;
	border-radius: 5px;
	border-top: 1px solid #e1e1e1;
	border-top-right-radius: 0;
	border-top-left-radius: 0;
	color: #666;
	background-color: #fff;
	height: 35px;
	width: 100%;
	line-height: 35px;
}
.win-broadcast .word.title {
	top: 0;
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
}
.delete {
	display: block;
	position: absolute;
	height: 12px;
	width: 12px;
	border-radius: 50%;
	background-color: #fff;
	right: 6px;
	top: 6px;
	z-index: 10;
	text-align: center;
	line-height: 9px;
	color: #919191;
	font-size: 12px;
}
.broadcast-shadow-panel {
	width: 100%;
	position: absolute;
	overflow: hidden;
	z-index: 10;
	top: 0;
	background-color: rgba(0, 0, 0, .35);
}
/*动画*/
.win-broadcast .broadcast {
	animation: broadcast 2s infinite;
	-webkit-animation: broadcast 2s infinite;
	/* Safari 和 Chrome */
}
@-webkit-keyframes broadcast {
	0% {
		background-color: #ccf5ff;
		box-shadow: 0 0 0 0px #ccf5ff, 0 0 0 0 #c3e9f2, 0 0 0 0px #e9fffe, 0 0 0 0 #ddf5f4;
	}
	25% {
		background-color: #ccf5ff;
		box-shadow: 0 0 0 5px #ccf5ff, 0 0 0 1px #c3e9f2, 0 0 0 20px #e9fffe, 0 0 0 1px #ddf5f4;
	}
	50% {
		background-color: #ccf5ff;
		box-shadow: 0 0 0 10px #ccf5ff, 0 0 0 1px #c3e9f2, 0 0 0 25px #e9fffe, 0 0 0 1px #ddf5f4;
	}
	100% {
		background-color: #ccf5ff;
		box-shadow: 0 0 0 15px #ccf5ff, 0 0 0 1px #c3e9f2, 0 0 0 30px #e9fffe, 0 0 0 1px #ddf5f4;
	}
}
/* 12-18 */
.nxz-voice {
	line-height: 21px;
	text-align: right;
}
.nzx-tb {
	display: inline-block;
	width: 15px;
	height: 21px;
	background: url(../images/icon-broadcast.png) no-repeat;
	background-size: 100% auto;
	-webkit-background-size: 100% auto;
	-moz-background-size: 100% auto;
	-ms-background-size: 100% auto;
	vertical-align: middle;
}
.win-broadcast-mb {
	width: 100%;
	height: 100%;
	position: fixed;
	left: 0;
	top: 0;
	z-index: 10;
	background: rgba(0, 0, 0, .35);
	display: none;
}
.myorder li .vlname {
	line-height: 20px;
	border-bottom: 1px solid #f2f2f2;
	position: relative;
	padding-right: 15px;
	padding-top: 10px;
	padding-bottom: 10px;
}
.pa-icon-dagou {
	width: 20px;
	height: 20px;
	font-size: 13px;
	display: block;
	text-align: center;
	border-radius: 100%;
	border: 1px solid #e1e1e1;
}
.pa-icon-dagou.on {
	background: #17b3ec;
	color: #fff;
}
.ask-record li {
	background: #fff;
	position: relative;
	padding: 10px 35px 10px 45px;
	border-top: 1px solid #f2f2f2;
	color: #909090;
}
.ask-record li .ar-check {
	position: absolute;
	left: 10px;
	top: 50%;
	margin-top: -10px;
}
.ask-record li .ar-check i {
	display: block;
	width: 18px;
	height: 18px;
	border: 1px solid #e1e1e1;
	border-radius: 50%;
}
.ask-record li .ar-check i.checked {
	background: #17b3ec;
	border: 1px solid #17b3ec;
}
.ask-record li .ar-check i.checked:before {
	content: "\d61a";
	position: absolute;
	top: -12px;
	left: 3px;
	color: #fff;
	font-size: 12px;
}
.ask-record li .arrow-right {
	position: absolute;
	right: 12px;
	top: 50%;
	margin-top: -6px;
	transform: rotate(135deg);
	-webkit-transform: rotate(135deg);
	transition: all .3s ease;
}
.ask-record li .arrow-right.ashow {
	transform: rotate(-45deg);
	-webkit-transform: rotate(-45deg);
	margin-top: -3px;
}
.view-more {
	display: inline-block;
	width: 100%;
	text-align: center;
	padding: 15px 0 10px 0;
}
.view-more a {
	/*color: #5b5b5b;*/
	color: #17b3ec;
}
.time-tips span{
	padding: 2px 10px;
	border-radius: 15px;
	color: #aaa;
	/*background-color: #E1E1E1;*/
	font-size: 12px;
}
.chat-left, .chat-right {
	display: -webkit-box;
	clear: both;
	overflow: hidden;
	padding: 10px 0;
}
.chat-right{
	-webkit-box-direction: reverse;
}
.chat-left > dt{
	float: none;
}
.chat-right > dt {
	float: none;
}
.chat-right .word-bread{
	text-align: left;
	/*float: right;*/
	background: #17b3ec;
	border: 1px solid #17b3ec;
	white-space: pre-wrap;
	word-wrap: break-word;
	
	position: relative;
	min-height: 18px;
	font-size: 15px;
	display: inline-block;
	max-width: 80%;
	border-radius: 6px;
	padding: 8px 10px;
	box-shadow: 1px 1px 1px rgba(0, 0, 0, .1);
}
.chat-right > div.c-content{
	-webkit-box-flex: 1;
	text-align: right;
}
.chat-right .word-bread:after{
	content: "";
	position: absolute;
	top: 5px;
	right: -5px;
	display: block;
	width: 8px;
	height: 8px;
	background: #17b3ec;
	border-color: #E1E1E1;
	border-style: solid;
	border-width: 1px 0 0 1px;
	-webkit-transform: rotate(135deg);
	-moz-transform: rotate(135deg);
	transform: rotate(135deg);
}
.chat-left .word-bread{
	/*float: left;*/
	white-space: pre-wrap;
	word-wrap: break-word;
	
	position: relative;
	min-height: 18px;
	font-size: 15px;
	display: inline-block;
	max-width: 80%;
	background: #fff;
	border: 1px solid #e1e1e1;
	border-radius: 6px;
	padding: 8px 10px;
	box-shadow: 1px 1px 1px rgba(0, 0, 0, .1);
}
.chat-left > div.c-content{
	-webkit-box-flex: 1;
	text-align: left;
}
.chat-left .word-bread:after{
	content: "";
	position: absolute;
	top: 5px;
	left: -5px;
	display: block;
	width: 8px;
	height: 8px;
	background: #fff;
	border-color: #e1e1e1;
	border-style: solid;
	border-width: 1px 0 0 1px;
	-webkit-transform: rotate(-45deg);
	-moz-transform: rotate(-45deg);
	transform: rotate(-45deg);
}
.chat-left span.name, .chat-right span.name{
	display: block;
	height: 24px;
}
.time-tips span:before, .time-tips span:after{
	height: 0!important;
}
.zi2{
	z-index: 2;	
}
.doc-name {
	font-size: 15px;
}
/*#contain{position: absolute; width: 95%; top:45px; bottom: 52px; overflow-y: auto;}*/
@media only screen and (max-width: 640px) {
	.doc-name {
		font-size: 13px; 
	}
}
.chat-right.checkbox:after, .chat-left.checkbox:before{
	display: block;
	content: '√';
	line-height: 24px;
	width: 22px;
	height: 22px;
	border: 1px solid #ccc;
	border-radius: 50%;
	margin-right: 10px;
	color: #f3f3f3;
	text-align: center;
	font-size: 16px;
	box-sizing: border-box;
}
.chat-right.checked:after, .chat-left.checked:before{
	background: #17b3ec;
	border: none;
}
.log-oper{
	position: absolute;
	background: rgba(20, 20, 20, .8);
	border-radius: 8px;
	color: #fff;
	z-index: 10000;
	display: -webkit-box;
	display: none;
}
.log-oper li{
	margin: 8px 0px;
	padding: 0px 8px;
	font-size: 14px;
	border-left: 1px solid #fff;
}
.log-oper li:first-child{
	border-left:none ;
}
.log-oper div{
	position: absolute;
	/*width: 10px;
	height: 10px;
	background: transparent;*/
	/*-webkit-transform: rotate(45deg);*/
	top: 37px;
	
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-top: 8px solid rgba(20, 20, 20, .8);
	border-bottom: 8px solid transparent;
}
.footer-bar{
	z-index: 2;
	bottom: 0;
	left: 0;
	width: 100%;
	position: fixed;
	border-top-width: 1px;
	border-color: #e1e1e1;
	border-style: solid;
	background-color: #fff;
	display: -webkit-box;
}
.c-hide{
	display: none;	
}
.footer-bar li{
	margin: 10px 0px;
	-webkit-box-flex: 1;
	text-align: center;
	line-height: 27px;
	font-size: 16px;
	color: #333;
}
.footer-bar li:first-child{
	border-right: 1px solid #e1e1e1;	
}
.footer-bar li > img{
	width: 22px;
	margin-right: 10px;
}
.header-group{
	line-height: 20px;
}
.btn-cancel{
	color: #fff;
	font-size: 16px;
	display: none;
}
.tw-add{
	width: 50px;
	margin: 3px 5px 3px 0;
}
.input-group input{
	margin-bottom: 0;
}
.c-main .c-btn{
	padding-top: 5px;
	padding-bottom: 5px;
}
.chat-right  .wb-img{
	padding: 2px;
}
.wb-img img{
	position: relative;
	z-index: 2;
	border-radius: 6px;
}
.xt-xiaoxi{
	background: #888;
    color: #fff!important;
    padding: 4px 10px!important;
    border-radius: 8px!important;
}
.yy-hold{
	background: #ccc;
}
.rprogress {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 140px;
	height: 140px;
	margin-left: -70px;
	margin-top: -70px;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 30px 30px;
	background-color: rgba(0, 0, 0, 0.7);
	border-radius: 5px;
	display: none;
	-webkit-transition: .15s;
	z-index: 100;
}
.rschedule {
	background: url("../images/yuying_icon5.png");
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 30px 50px;
	width: 46px;
	height: 50px;
	position: absolute;
	left: 30px;
	top: 40px;
}
.r-sigh{
	display: none;
	border-radius: 50px;
	box-shadow: 0 0 15px #2187e7;
	width: 46px;
	height: 46px;
	position: absolute;
	left: 50%;
	top: 50%;
	margin-left: -23px;
	margin-top: -23px;
	text-align: center;
	line-height: 46px;
	font-size: 40px;
	font-weight: bold;
	color: #2187e7;
}
.rprogress-sigh{
	background-image: none !important;
}
.rprogress-sigh .rschedule{
	display: none !important;
}
.rprogress-sigh .r-sigh{
	display: block !important;
}
.rsalert {
	font-size: 12px;
	color: #bbb;
	text-align: center;
	position: absolute;
	border-radius: 5px;
	width: 130px;
	margin: 5px 5px;
	padding: 5px;
	left: 0px;
	bottom: 0px;
}
.chat-right .audio{
	padding-right: 30px;
	background: url("../images/yuyin4_icon.png") no-repeat -20px 0 #17b3ec;
	background-size: 18px;
	-webkit-background-size: 18px;
	-moz-background-size: 18px;
	-o-background-size: 18px;
	background-position:  90% 50%;
}
.chat-right .audio.active{
	background: url("../images/yuyin3.gif") no-repeat -20px 0 #17b3ec;
	background-size: 18px;
	-webkit-background-size: 18px;
	-moz-background-size: 18px;
	-o-background-size: 18px;
	background-position:  90% 50%;
}
.chat-right .soundWav{
	height: 20px;display: -webkit-box;-webkit-box-direction: normal;
}
.chat-right .soundWavT{
	display: block;margin-left: 10px;
}
.chat-right .soundWav img{
	position: relative;
	width: 40px;
	height: 30px;
	top: -5px;
}
.chat-left .audio{
	padding-left: 30px;
	background: url("../images/yuyin_icon.png") no-repeat #fff;
	background-size: 18px;
	-webkit-background-size: 18px;
	-moz-background-size: 18px;
	-o-background-size: 18px;
	background-position:  10% 50%;
}
.chat-left .audio.active{
	background: url("../images/yuyin-2.gif") no-repeat #fff;
	background-size: 18px;
	-webkit-background-size: 18px;
	-moz-background-size: 18px;
	-o-background-size: 18px;
	background-position:  10% 50%;
}
.chat-left .soundWav{
	height: 20px;display: -webkit-box;-webkit-box-direction: reverse;
}
.chat-left .soundWavT{
	display: block;margin-right: 10px;
}
.chat-left .soundWav img{
	position: relative;
	width: 40px;
	height: 30px;
	top: -5px;
}
.volumn {
    display: inline-block;
    height: 30px;
    line-height: 40px;
    text-align: center;
    position: relative;
    vertical-align: bottom;
    left: 84px;
	top: 60px;
}
.volumn div {
    height: 3px;
    margin-bottom: 0;
    background-color: white;
    margin-right: -12px;
    margin-bottom: 6px;
}
.volumn .line1 {
	width: 10px;
    -webkit-animation: line1 2s infinite ease-in-out alternate;
}
.volumn .line2 {
	width: 14px;
    -webkit-animation: line2 2s infinite ease-in-out alternate;
}
.volumn .line3 {
	width: 18px;
    -webkit-animation: line3 2s infinite ease-in-out alternate;
}
.volumn .line4 {
	width: 22px;
    /*-webkit-animation: line 0.6s infinite 1.8s ease-in-out alternate;*/
    /*-webkit-animation-delay: 3.6s;*/
}
@-webkit-keyframes line1 {
    0% {
         opacity: 0;
    }
    41%{
    	 opacity: 0;
    }
    42%{
    	 opacity: 1;
    }
    55% {
         opacity: 1;
    }
    56% {
         opacity: 0;
    }
    100% {
         opacity: 0;
    }
}
@-webkit-keyframes line2 {
    0% {
         opacity: 0;
    }
    27%{
    	 opacity: 0;
    }
    28%{
    	 opacity: 1;
    }
    73% {
         opacity: 1;
    }
    74% {
         opacity: 0;
    }
    100% {
         opacity: 0;
    }
}
@-webkit-keyframes line3 {
    0% {
         opacity: 0;
    }
    13%{
    	 opacity: 0;
    }
    14%{
    	 opacity: 1;
    }
    84% {
         opacity: 1;
    }
    85% {
         opacity: 0;
    }
    100% {
         opacity: 0;
    }
}
.input-msg{
    min-height: 32px;
    width: 100%;
    line-height: 22px;
    overflow-x: hidden;
    overflow-y: auto;
    /*_overflow-y: visible;
    _height: 32px;*/
    max-height: 120px;
    background-color: #fff;
    background-image: none;
    border: 1px solid #e1e1e1;
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 4px;
    -webkit-user-select: auto;
    user-modify: read-write-plaintext-only;
    -webkit-user-modify: read-write-plaintext-only
}
.preview-video{padding: 6px 0px;max-height: 100px;position: relative;}
.preview-video .video-img-right{width: 135px !important;height: 100px;border-radius: 15px;border-bottom-right-radius: 0px;border-top-right-radius: 0px;}
.preview-video .video-img-left{width: 135px !important;height: 100px;border-radius: 15px;border-bottom-left-radius: 0px;border-top-left-radius: 0px;}
.preview-video .bofang-icon-right{position: absolute;right: 65px;bottom: 50%;width: 25px !important;height: 25px;margin-right: -12px;top: 40px;z-index: 100;}
.preview-video .bofang-icon-left{position: absolute;left: 65px;bottom: 50%;width: 25px !important;height: 25px;margin-right: -12px;top: 40px;z-index: 100;}
.preview-video .shichang-time-right{position: absolute;right: 27px;bottom: 50%;width: auto;height: 18px;margin-right: -12px;top: 82px;font-size: 12px;color: #fff;}
.preview-video .shichang-time-left{position: absolute;left: 5px;bottom: 50%;width: auto;height: 18px;margin-left: 90px;top: 82px;font-size: 12px;color: #fff}
.preview-video .jianjiao-icon-right{top: 6px;z-index: 20;position: absolute;right: 12px;width: 20px !important;height: 100px;margin-right: -12px;}
.preview-video .jianjiao-icon-left{top: 6px;z-index: 20;position: absolute;left: 12px;width: 20px !important;height: 100px;margin-left: -12px;}
/*添加文章类消息显示样式*/
.chat-left .word-article{
    width: 82%;
    max-width: 82%;
    text-align: left;
}
.chat-left .word-article:after{background: #fff;}
.chat-left .article-content{
    -webkit-box-direction: reverse;
    display: -webkit-box;
    height: 80px;
    padding: 5px 0px;
    overflow: hidden;
}
.chat-left .article-content>img{
    width: 60px !important;
    height: 60px;
    margin-top: 3px;
}
.chat-left .article-content>div{
    -webkit-box-flex: 1;
    overflow: hidden;
    padding: 1px 0px 0px 5px;
}
.xzzx{
    position: fixed;
    bottom: 0;
    left:0;
    width: 100%;
    height: 60px;
    padding:10px;
    text-align: center;
}
.xzzx span{
    display: inline-block;
    color: #fff;
    font-size: 16px;
    background-color: #74bf00;
    width: 100%;
    border-radius: 5px;
    height: 40px;
    line-height: 40px;
}
.xzzx img{
    vertical-align: middle;
    margin-bottom: 3px;
    margin-right: 5px;
}

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 342 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/css/cross.css


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 496 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/css/cross.ui.css


+ 61 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/css/prescription-consulting.css

@ -0,0 +1,61 @@
.div-top-content{
    position: fixed;
    width: 100%;
    z-index: 20;
    background: #FFFFFF;
}
.c-main{
    position: absolute;
    width: 100%;
    top: 75px;
    z-index: 10;
}
.h34{
    height: 34px;
}
.lh34{
    line-height: 34px;
}
.c-inline-block{
    display: inline-block;
}
.div-xf-status{
    /*width: 70px;*/
    height: 22px;
    /*line-height: 22px;*/
    padding: 0 10px;
    border:1px solid #74bf00;
    color:#74BF00;
    text-align: center;
    font-size: 12px;
    border-radius: 20px;
}
.chat-right .word-bread.sys-msg{
    background-color: #fff;
    
}
.chat-right .word-bread.sys-msg:after{
    background-color: #fff;
    border-color: #17b3ec;
}
.chat-left .word-bread.sys-msg{
    background-color: #fff;
    border-color: #17b3ec;
}
.chat-left .word-bread.sys-msg:after{
    background-color: #fff;
    border-color: #17b3ec;
}
.sys-header{
    display: inline-block;
    background-color: #17b3ec;
    height: 20px;
    line-height: 20px;
    padding: 0 10px;
    border-radius: 10px;
    color: #fff
}
.sys-header img{
    vertical-align: middle;
    margin-right: 5px;
}

binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/bofang_icon.png


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/loading2.gif


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/logo_dibu_img.png


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/xitongtixing_im_icon.png


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/youshanjiao_bg.png


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuyin-2.gif


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuyin.gif


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuyin2_icon.png


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuyin3.gif


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuyin4_icon.png


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuyin_icon.png


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuying_icon.png


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/yuying_icon5.png


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/images/zuoshanjiao_bg.png


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 38 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/iscroll2/5.1.3/css/iscroll.css


binární
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/iscroll2/5.1.3/images/pull_update.png


+ 2213 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/iscroll2/5.1.3/js/iscroll.js

@ -0,0 +1,2213 @@
/*! iScroll v5.1.3 ~ (c) 2008-2014 Matteo Spinelli ~ http://cubiq.org/license */
(function (window, document, Math) {
var rAF = window.requestAnimationFrame	||
	window.webkitRequestAnimationFrame	||
	window.mozRequestAnimationFrame		||
	window.oRequestAnimationFrame		||
	window.msRequestAnimationFrame		||
	function (callback) { window.setTimeout(callback, 1000 / 60); };
var utils = (function () {
	var me = {};
	var _elementStyle = document.createElement('div').style;
	var _vendor = (function () {
		var vendors = ['t', 'webkitT', 'MozT', 'msT', 'OT'],
			transform,
			i = 0,
			l = vendors.length;
		for ( ; i < l; i++ ) {
			transform = vendors[i] + 'ransform';
			if ( transform in _elementStyle ) return vendors[i].substr(0, vendors[i].length-1);
		}
		return false;
	})();
	function _prefixStyle (style) {
		if ( _vendor === false ) return false;
		if ( _vendor === '' ) return style;
		return _vendor + style.charAt(0).toUpperCase() + style.substr(1);
	}
	me.getTime = Date.now || function getTime () { return new Date().getTime(); };
	me.extend = function (target, obj) {
		for ( var i in obj ) {
			target[i] = obj[i];
		}
	};
	me.addEvent = function (el, type, fn, capture) {
		el.addEventListener(type, fn, !!capture);
	};
	me.removeEvent = function (el, type, fn, capture) {
		el.removeEventListener(type, fn, !!capture);
	};
	me.prefixPointerEvent = function (pointerEvent) {
		return window.MSPointerEvent ? 
			'MSPointer' + pointerEvent.charAt(9).toUpperCase() + pointerEvent.substr(10):
			pointerEvent;
	};
	me.momentum = function (current, start, time, lowerMargin, wrapperSize, deceleration) {
		var distance = current - start,
			speed = Math.abs(distance) / time,
			destination,
			duration;
		deceleration = deceleration === undefined ? 0.0006 : deceleration;
		destination = current + ( speed * speed ) / ( 2 * deceleration ) * ( distance < 0 ? -1 : 1 );
		duration = speed / deceleration;
		if ( destination < lowerMargin ) {
			destination = wrapperSize ? lowerMargin - ( wrapperSize / 2.5 * ( speed / 8 ) ) : lowerMargin;
			distance = Math.abs(destination - current);
			duration = distance / speed;
		} else if ( destination > 0 ) {
			destination = wrapperSize ? wrapperSize / 2.5 * ( speed / 8 ) : 0;
			distance = Math.abs(current) + destination;
			duration = distance / speed;
		}
		return {
			destination: Math.round(destination),
			duration: duration
		};
	};
	var _transform = _prefixStyle('transform');
	me.extend(me, {
		hasTransform: _transform !== false,
		hasPerspective: _prefixStyle('perspective') in _elementStyle,
		hasTouch: 'ontouchstart' in window,
		hasPointer: window.PointerEvent || window.MSPointerEvent, // IE10 is prefixed
		hasTransition: _prefixStyle('transition') in _elementStyle
	});
	// This should find all Android browsers lower than build 535.19 (both stock browser and webview)
	me.isBadAndroid = /Android /.test(window.navigator.appVersion) && !(/Chrome\/\d/.test(window.navigator.appVersion));
	me.extend(me.style = {}, {
		transform: _transform,
		transitionTimingFunction: _prefixStyle('transitionTimingFunction'),
		transitionDuration: _prefixStyle('transitionDuration'),
		transitionDelay: _prefixStyle('transitionDelay'),
		transformOrigin: _prefixStyle('transformOrigin')
	});
	me.hasClass = function (e, c) {
		var re = new RegExp("(^|\\s)" + c + "(\\s|$)");
		return re.test(e.className);
	};
	me.addClass = function (e, c) {
		if ( me.hasClass(e, c) ) {
			return;
		}
		var newclass = e.className.split(' ');
		newclass.push(c);
		e.className = newclass.join(' ');
	};
	me.removeClass = function (e, c) {
		if ( !me.hasClass(e, c) ) {
			return;
		}
		var re = new RegExp("(^|\\s)" + c + "(\\s|$)", 'g');
		e.className = e.className.replace(re, ' ');
	};
	me.offset = function (el) {
		var left = -el.offsetLeft,
			top = -el.offsetTop;
		// jshint -W084
		while (el = el.offsetParent) {
			left -= el.offsetLeft;
			top -= el.offsetTop;
		}
		// jshint +W084
		return {
			left: left,
			top: top
		};
	};
	me.preventDefaultException = function (el, exceptions) {
		for ( var i in exceptions ) {
			if ( exceptions[i].test(el[i]) ) {
				return true;
			}
		}
		return false;
	};
	me.extend(me.eventType = {}, {
		touchstart: 1,
		touchmove: 1,
		touchend: 1,
		mousedown: 2,
		mousemove: 2,
		mouseup: 2,
		pointerdown: 3,
		pointermove: 3,
		pointerup: 3,
		MSPointerDown: 3,
		MSPointerMove: 3,
		MSPointerUp: 3
	});
	me.extend(me.ease = {}, {
		quadratic: {
			style: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',
			fn: function (k) {
				return k * ( 2 - k );
			}
		},
		circular: {
			style: 'cubic-bezier(0.1, 0.57, 0.1, 1)',	// Not properly "circular" but this looks better, it should be (0.075, 0.82, 0.165, 1)
			fn: function (k) {
				return Math.sqrt( 1 - ( --k * k ) );
			}
		},
		back: {
			style: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',
			fn: function (k) {
				var b = 4;
				return ( k = k - 1 ) * k * ( ( b + 1 ) * k + b ) + 1;
			}
		},
		bounce: {
			style: '',
			fn: function (k) {
				if ( ( k /= 1 ) < ( 1 / 2.75 ) ) {
					return 7.5625 * k * k;
				} else if ( k < ( 2 / 2.75 ) ) {
					return 7.5625 * ( k -= ( 1.5 / 2.75 ) ) * k + 0.75;
				} else if ( k < ( 2.5 / 2.75 ) ) {
					return 7.5625 * ( k -= ( 2.25 / 2.75 ) ) * k + 0.9375;
				} else {
					return 7.5625 * ( k -= ( 2.625 / 2.75 ) ) * k + 0.984375;
				}
			}
		},
		elastic: {
			style: '',
			fn: function (k) {
				var f = 0.22,
					e = 0.4;
				if ( k === 0 ) { return 0; }
				if ( k == 1 ) { return 1; }
				return ( e * Math.pow( 2, - 10 * k ) * Math.sin( ( k - f / 4 ) * ( 2 * Math.PI ) / f ) + 1 );
			}
		}
	});
	me.tap = function (e, eventName) {
		var ev = document.createEvent('Event');
		ev.initEvent(eventName, true, true);
		ev.pageX = e.pageX;
		ev.pageY = e.pageY;
		e.target.dispatchEvent(ev);
	};
	me.click = function (e) {
		var target = e.target,
			ev;
		if ( !(/(SELECT|INPUT|TEXTAREA)/i).test(target.tagName) ) {
			ev = document.createEvent('MouseEvents');
			ev.initMouseEvent('click', true, true, e.view, 1,
				target.screenX, target.screenY, target.clientX, target.clientY,
				e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
				0, null);
			ev._constructed = true;
			target.dispatchEvent(ev);
		}
	};
	return me;
})();
function IScroll (el, options) {
	this.wrapper = typeof el == 'string' ? document.querySelector(el) : el;
	this.scroller = this.wrapper.children[0];
	this.scrollerStyle = this.scroller.style;		// cache style for better performance
	this.options = {
		resizeScrollbars: true,
		mouseWheelSpeed: 20,
		snapThreshold: 0.334,
// INSERT POINT: OPTIONS 
		startX: 0,
		startY: 0,
		scrollY: true,
		directionLockThreshold: 5,
		momentum: true,
		bounce: true,
		bounceTime: 600,
		bounceEasing: '',
		preventDefault: true,
		preventDefaultException: { tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/ },
		HWCompositing: true,
		useTransition: true,
		useTransform: true,
		
		// 50856845@qq.com
		topOffset : 0,
		formEleBlurOnMove: false
	};
	for ( var i in options ) {
		this.options[i] = options[i];
	}
	// Normalize options
	this.translateZ = this.options.HWCompositing && utils.hasPerspective ? ' translateZ(0)' : '';
	this.options.useTransition = utils.hasTransition && this.options.useTransition;
	this.options.useTransform = utils.hasTransform && this.options.useTransform;
	this.options.eventPassthrough = this.options.eventPassthrough === true ? 'vertical' : this.options.eventPassthrough;
	this.options.preventDefault = !this.options.eventPassthrough && this.options.preventDefault;
	// If you want eventPassthrough I have to lock one of the axes
	this.options.scrollY = this.options.eventPassthrough == 'vertical' ? false : this.options.scrollY;
	this.options.scrollX = this.options.eventPassthrough == 'horizontal' ? false : this.options.scrollX;
	// With eventPassthrough we also need lockDirection mechanism
	this.options.freeScroll = this.options.freeScroll && !this.options.eventPassthrough;
	this.options.directionLockThreshold = this.options.eventPassthrough ? 0 : this.options.directionLockThreshold;
	this.options.bounceEasing = typeof this.options.bounceEasing == 'string' ? utils.ease[this.options.bounceEasing] || utils.ease.circular : this.options.bounceEasing;
	this.options.resizePolling = this.options.resizePolling === undefined ? 60 : this.options.resizePolling;
	if ( this.options.tap === true ) {
		this.options.tap = 'tap';
	}
	if ( this.options.shrinkScrollbars == 'scale' ) {
		this.options.useTransition = false;
	}
	this.options.invertWheelDirection = this.options.invertWheelDirection ? -1 : 1;
	if ( this.options.probeType == 3 ) {
		this.options.useTransition = false;	}
// INSERT POINT: NORMALIZATION
	// Some defaults	
	this.x = 0;
	this.y = 0;
	this.directionX = 0;
	this.directionY = 0;
	this._events = {};
// INSERT POINT: DEFAULTS
	this._init();
	this.refresh();
	this.scrollTo(this.options.startX, this.options.startY);
	this.enable();
}
IScroll.prototype = {
	version: '5.1.3',
	_init: function () {
		this._initEvents();
		if ( this.options.scrollbars || this.options.indicators ) {
			this._initIndicators();
		}
		if ( this.options.mouseWheel ) {
			this._initWheel();
		}
		if ( this.options.snap ) {
			this._initSnap();
		}
		if ( this.options.keyBindings ) {
			this._initKeys();
		}
// INSERT POINT: _init
	},
	destroy: function () {
		this._initEvents(true);
		this._execEvent('destroy');
	},
	_transitionEnd: function (e) {
		if ( e.target != this.scroller || !this.isInTransition ) {
			return;
		}
		this._transitionTime();
		if ( !this.resetPosition(this.options.bounceTime) ) {
			this.isInTransition = false;
			this._execEvent('scrollEnd');
		}
	},
	_start: function (e) {
		// React to left mouse button only
		if ( utils.eventType[e.type] != 1 ) {
			if ( e.button !== 0 ) {
				return;
			}
		}
		if ( !this.enabled || (this.initiated && utils.eventType[e.type] !== this.initiated) ) {
			return;
		}
		if ( this.options.preventDefault && !utils.isBadAndroid && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) {
			e.preventDefault();
		}
		var point = e.touches ? e.touches[0] : e,
			pos;
		this.initiated	= utils.eventType[e.type];
		this.moved		= false;
		this.distX		= 0;
		this.distY		= 0;
		this.directionX = 0;
		this.directionY = 0;
		this.directionLocked = 0;
		this._transitionTime();
		this.startTime = utils.getTime();
		if ( this.options.useTransition && this.isInTransition ) {
			this.isInTransition = false;
			pos = this.getComputedPosition();
			this._translate(Math.round(pos.x), Math.round(pos.y));
			this._execEvent('scrollEnd');
		} else if ( !this.options.useTransition && this.isAnimating ) {
			this.isAnimating = false;
			this._execEvent('scrollEnd');
		}
		this.startX    = this.x;
		this.startY    = this.y;
		this.absStartX = this.x;
		this.absStartY = this.y;
		this.pointX    = point.pageX;
		this.pointY    = point.pageY;
		this._execEvent('beforeScrollStart');
	},
	_move: function (e) {
		if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) {
			return;
		}
		if ( this.options.preventDefault ) {	// increases performance on Android? TODO: check!
			e.preventDefault();
		}
		var point		= e.touches ? e.touches[0] : e,
			deltaX		= point.pageX - this.pointX,
			deltaY		= point.pageY - this.pointY,
			timestamp	= utils.getTime(),
			newX, newY,
			absDistX, absDistY;
		this.pointX		= point.pageX;
		this.pointY		= point.pageY;
		this.distX		+= deltaX;
		this.distY		+= deltaY;
		absDistX		= Math.abs(this.distX);
		absDistY		= Math.abs(this.distY);
		// We need to move at least 10 pixels for the scrolling to initiate
		if ( timestamp - this.endTime > 300 && (absDistX < 10 && absDistY < 10) ) {
			return;
		}
		// If you are scrolling in one direction lock the other
		if ( !this.directionLocked && !this.options.freeScroll ) {
			if ( absDistX > absDistY + this.options.directionLockThreshold ) {
				this.directionLocked = 'h';		// lock horizontally
			} else if ( absDistY >= absDistX + this.options.directionLockThreshold ) {
				this.directionLocked = 'v';		// lock vertically
			} else {
				this.directionLocked = 'n';		// no lock
			}
		}
		if ( this.directionLocked == 'h' ) {
			if ( this.options.eventPassthrough == 'vertical' ) {
				e.preventDefault();
			} else if ( this.options.eventPassthrough == 'horizontal' ) {
				this.initiated = false;
				return;
			}
			deltaY = 0;
		} else if ( this.directionLocked == 'v' ) {
			if ( this.options.eventPassthrough == 'horizontal' ) {
				e.preventDefault();
			} else if ( this.options.eventPassthrough == 'vertical' ) {
				this.initiated = false;
				return;
			}
			deltaX = 0;
		}
		deltaX = this.hasHorizontalScroll ? deltaX : 0;
		deltaY = this.hasVerticalScroll ? deltaY : 0;
		newX = this.x + deltaX;
		newY = this.y + deltaY;
		// Slow down if outside of the boundaries
		if ( newX > 0 || newX < this.maxScrollX ) {
			newX = this.options.bounce ? this.x + deltaX / 3 : newX > 0 ? 0 : this.maxScrollX;
		}
		if ( newY > 0 || newY < this.maxScrollY ) {
			newY = this.options.bounce ? this.y + deltaY / 3 : newY > 0 ? 0 : this.maxScrollY;
		}
		this.directionX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0;
		this.directionY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0;
		if ( !this.moved ) {
			this._execEvent('scrollStart');
		}
		this.moved = true;
		this._translate(newX, newY);
/* REPLACE START: _move */
		if ( timestamp - this.startTime > 300 ) {
			this.startTime = timestamp;
			this.startX = this.x;
			this.startY = this.y;
			if ( this.options.probeType == 1 ) {
				this._execEvent('scroll');
			}
		}
		if ( this.options.probeType > 1 ) {
			this._execEvent('scroll');
		}
/* REPLACE END: _move */
		if(this.options.formEleBlurOnMove) {
			$(this.wrapper).find('input,textarea').blur();
		}
	},
	_end: function (e) {
		if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) {
			return;
		}
		if ( this.options.preventDefault && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) {
			e.preventDefault();
		}
		var point = e.changedTouches ? e.changedTouches[0] : e,
			momentumX,
			momentumY,
			duration = utils.getTime() - this.startTime,
			newX = Math.round(this.x),
			newY = Math.round(this.y),
			distanceX = Math.abs(newX - this.startX),
			distanceY = Math.abs(newY - this.startY),
			time = 0,
			easing = '';
		this.isInTransition = 0;
		this.initiated = 0;
		this.endTime = utils.getTime();
		// reset if we are outside of the boundaries
		if ( this.resetPosition(this.options.bounceTime) ) {
			return;
		}
		this.scrollTo(newX, newY);	// ensures that the last position is rounded
		// we scrolled less than 10 pixels
		if ( !this.moved ) {
			if ( this.options.tap ) {
				utils.tap(e, this.options.tap);
			}
			if ( this.options.click ) {
				utils.click(e);
			}
			this._execEvent('scrollCancel');
			return;
		}
		if ( this._events.flick && duration < 200 && distanceX < 100 && distanceY < 100 ) {
			this._execEvent('flick');
			return;
		}
		// start momentum animation if needed
		if ( this.options.momentum && duration < 300 ) {
			momentumX = this.hasHorizontalScroll ? utils.momentum(this.x, this.startX, duration, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : { destination: newX, duration: 0 };
			momentumY = this.hasVerticalScroll ? utils.momentum(this.y, this.startY, duration, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : { destination: newY, duration: 0 };
			newX = momentumX.destination;
			newY = momentumY.destination;
			time = Math.max(momentumX.duration, momentumY.duration);
			this.isInTransition = 1;
		}
		if ( this.options.snap ) {
			var snap = this._nearestSnap(newX, newY);
			this.currentPage = snap;
			time = this.options.snapSpeed || Math.max(
					Math.max(
						Math.min(Math.abs(newX - snap.x), 1000),
						Math.min(Math.abs(newY - snap.y), 1000)
					), 300);
			newX = snap.x;
			newY = snap.y;
			this.directionX = 0;
			this.directionY = 0;
			easing = this.options.bounceEasing;
		}
// INSERT POINT: _end
		if ( newX != this.x || newY != this.y ) {
			// change easing function when scroller goes out of the boundaries
			if ( newX > 0 || newX < this.maxScrollX || newY > 0 || newY < this.maxScrollY ) {
				easing = utils.ease.quadratic;
			}
			this.scrollTo(newX, newY, time, easing);
			return;
		}
		this._execEvent('scrollEnd');
	},
	_resize: function () {
		var that = this;
		clearTimeout(this.resizeTimeout);
		this.resizeTimeout = setTimeout(function () {
			that.refresh();
		}, this.options.resizePolling);
	},
	resetPosition: function (time) {
		var x = this.x,
			y = this.y;
		time = time || 0;
		if ( !this.hasHorizontalScroll || this.x > 0 ) {
			x = 0;
		} else if ( this.x < this.maxScrollX ) {
			x = this.maxScrollX;
		}
		if ( !this.hasVerticalScroll || this.y > 0 ) {
			y = 0;
		} else if ( this.y < this.maxScrollY ) {
			y = this.maxScrollY;
		}
		
		//50856485@qq.com
		if(this.y >= this.minScrollY || this.maxScrollY > 0){
			y = this.minScrollY;
		}else{
			if(this.y < this.maxScrollY){
				//若当前可滚动高度与可视高度一样,则说明到底了,要直接回弹到初始状态(否则会先回弹到0,再定位到初始位置)
				if(this.scrollerHeight==this.wrapperHeight){
					y = this.minScrollY;
				}else{//若不一样高,则按最大滚动值
					y = this.maxScrollY;
				}
			}else{
				y = this.y;
			}
		}
		//end add
		
		if ( x == this.x && y == this.y ) {
			return false;
		}
		this.scrollTo(x, y, time, this.options.bounceEasing);
		return true;
	},
	disable: function () {
		this.enabled = false;
	},
	enable: function () {
		this.enabled = true;
	},
	refresh: function () {
		var rf = this.wrapper.offsetHeight;		// Force reflow
		this.wrapperWidth	= this.wrapper.clientWidth;
		this.wrapperHeight	= this.wrapper.clientHeight;
		
		// 50856845@qq.com
		this.minScrollY = -this.options.topOffset || 0;
/* REPLACE START: refresh */
		this.scrollerWidth	= this.scroller.offsetWidth;
		//this.scrollerHeight	= this.scroller.offsetHeight;
		// 50856845@qq.com
		this.scrollerHeight	= this.scroller.offsetHeight+ this.minScrollY;
		this.maxScrollX		= this.wrapperWidth - this.scrollerWidth;
		//this.maxScrollY		= this.wrapperHeight - this.scrollerHeight;
		// 50856845@qq.com
		this.maxScrollY		= this.wrapperHeight - this.scrollerHeight+ this.minScrollY;
/* REPLACE END: refresh */
		this.hasHorizontalScroll	= this.options.scrollX && this.maxScrollX < 0;
		this.hasVerticalScroll		= this.options.scrollY && this.maxScrollY < 0;
		if ( !this.hasHorizontalScroll ) {
			this.maxScrollX = 0;
			this.scrollerWidth = this.wrapperWidth;
		}
		if ( !this.hasVerticalScroll ) {
			this.maxScrollY = 0;
			this.scrollerHeight = this.wrapperHeight;
		}
		this.endTime = 0;
		this.directionX = 0;
		this.directionY = 0;
		this.wrapperOffset = utils.offset(this.wrapper);
		this._execEvent('refresh');
		this.resetPosition();
// INSERT POINT: _refresh
	},
	on: function (type, fn) {
		if ( !this._events[type] ) {
			this._events[type] = [];
		}
		this._events[type].push(fn);
	},
	off: function (type, fn) {
		if ( !this._events[type] ) {
			return;
		}
		var index = this._events[type].indexOf(fn);
		if ( index > -1 ) {
			this._events[type].splice(index, 1);
		}
	},
	_execEvent: function (type) {
		if ( !this._events[type] ) {
			return;
		}
		var i = 0,
			l = this._events[type].length;
		if ( !l ) {
			return;
		}
		for ( ; i < l; i++ ) {
			this._events[type][i].apply(this, [].slice.call(arguments, 1));
		}
	},
	scrollBy: function (x, y, time, easing) {
		x = this.x + x;
		y = this.y + y;
		time = time || 0;
		this.scrollTo(x, y, time, easing);
	},
	scrollTo: function (x, y, time, easing) {
		easing = easing || utils.ease.circular;
		this.isInTransition = this.options.useTransition && time > 0;
		if ( !time || (this.options.useTransition && easing.style) ) {
			this._transitionTimingFunction(easing.style);
			this._transitionTime(time);
			this._translate(x, y);
		} else {
			this._animate(x, y, time, easing.fn);
		}
	},
	scrollToElement: function (el, time, offsetX, offsetY, easing) {
		el = el.nodeType ? el : this.scroller.querySelector(el);
		if ( !el ) {
			return;
		}
		var pos = utils.offset(el);
		pos.left -= this.wrapperOffset.left;
		pos.top  -= this.wrapperOffset.top;
		// if offsetX/Y are true we center the element to the screen
		if ( offsetX === true ) {
			offsetX = Math.round(el.offsetWidth / 2 - this.wrapper.offsetWidth / 2);
		}
		if ( offsetY === true ) {
			offsetY = Math.round(el.offsetHeight / 2 - this.wrapper.offsetHeight / 2);
		}
		pos.left -= offsetX || 0;
		pos.top  -= offsetY || 0;
		pos.left = pos.left > 0 ? 0 : pos.left < this.maxScrollX ? this.maxScrollX : pos.left;
		pos.top  = pos.top  > 0 ? 0 : pos.top  < this.maxScrollY ? this.maxScrollY : pos.top;
		time = time === undefined || time === null || time === 'auto' ? Math.max(Math.abs(this.x-pos.left), Math.abs(this.y-pos.top)) : time;
		this.scrollTo(pos.left, pos.top, time, easing);
	},
	_transitionTime: function (time) {
		time = time || 0;
		this.scrollerStyle[utils.style.transitionDuration] = time + 'ms';
		if ( !time && utils.isBadAndroid ) {
			this.scrollerStyle[utils.style.transitionDuration] = '0.001s';
		}
		if ( this.indicators ) {
			for ( var i = this.indicators.length; i--; ) {
				this.indicators[i].transitionTime(time);
			}
		}
// INSERT POINT: _transitionTime
	},
	_transitionTimingFunction: function (easing) {
		this.scrollerStyle[utils.style.transitionTimingFunction] = easing;
		if ( this.indicators ) {
			for ( var i = this.indicators.length; i--; ) {
				this.indicators[i].transitionTimingFunction(easing);
			}
		}
// INSERT POINT: _transitionTimingFunction
	},
	_translate: function (x, y) {
		if ( this.options.useTransform ) {
/* REPLACE START: _translate */
			this.scrollerStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.translateZ;
/* REPLACE END: _translate */
		} else {
			x = Math.round(x);
			y = Math.round(y);
			this.scrollerStyle.left = x + 'px';
			this.scrollerStyle.top = y + 'px';
		}
		this.x = x;
		this.y = y;
	if ( this.indicators ) {
		for ( var i = this.indicators.length; i--; ) {
			this.indicators[i].updatePosition();
		}
	}
// INSERT POINT: _translate
	},
	_initEvents: function (remove) {
		var eventType = remove ? utils.removeEvent : utils.addEvent,
			target = this.options.bindToWrapper ? this.wrapper : window;
		eventType(window, 'orientationchange', this);
		eventType(window, 'resize', this);
		if ( this.options.click ) {
			eventType(this.wrapper, 'click', this, true);
		}
		if ( !this.options.disableMouse ) {
			eventType(this.wrapper, 'mousedown', this);
			eventType(target, 'mousemove', this);
			eventType(target, 'mousecancel', this);
			eventType(target, 'mouseup', this);
		}
		if ( utils.hasPointer && !this.options.disablePointer ) {
			eventType(this.wrapper, utils.prefixPointerEvent('pointerdown'), this);
			eventType(target, utils.prefixPointerEvent('pointermove'), this);
			eventType(target, utils.prefixPointerEvent('pointercancel'), this);
			eventType(target, utils.prefixPointerEvent('pointerup'), this);
		}
		if ( utils.hasTouch && !this.options.disableTouch ) {
			eventType(this.wrapper, 'touchstart', this);
			eventType(target, 'touchmove', this);
			eventType(target, 'touchcancel', this);
			eventType(target, 'touchend', this);
		}
		eventType(this.scroller, 'transitionend', this);
		eventType(this.scroller, 'webkitTransitionEnd', this);
		eventType(this.scroller, 'oTransitionEnd', this);
		eventType(this.scroller, 'MSTransitionEnd', this);
	},
	getComputedPosition: function () {
		var matrix = window.getComputedStyle(this.scroller, null),
			x, y;
		if ( this.options.useTransform ) {
			matrix = matrix[utils.style.transform].split(')')[0].split(', ');
			x = +(matrix[12] || matrix[4]);
			y = +(matrix[13] || matrix[5]);
		} else {
			x = +matrix.left.replace(/[^-\d.]/g, '');
			y = +matrix.top.replace(/[^-\d.]/g, '');
		}
		return { x: x, y: y };
	},
	_initIndicators: function () {
		var interactive = this.options.interactiveScrollbars,
			customStyle = typeof this.options.scrollbars != 'string',
			indicators = [],
			indicator;
		var that = this;
		this.indicators = [];
		if ( this.options.scrollbars ) {
			// Vertical scrollbar
			if ( this.options.scrollY ) {
				indicator = {
					el: createDefaultScrollbar('v', interactive, this.options.scrollbars),
					interactive: interactive,
					defaultScrollbars: true,
					customStyle: customStyle,
					resize: this.options.resizeScrollbars,
					shrink: this.options.shrinkScrollbars,
					fade: this.options.fadeScrollbars,
					listenX: false
				};
				this.wrapper.appendChild(indicator.el);
				indicators.push(indicator);
			}
			// Horizontal scrollbar
			if ( this.options.scrollX ) {
				indicator = {
					el: createDefaultScrollbar('h', interactive, this.options.scrollbars),
					interactive: interactive,
					defaultScrollbars: true,
					customStyle: customStyle,
					resize: this.options.resizeScrollbars,
					shrink: this.options.shrinkScrollbars,
					fade: this.options.fadeScrollbars,
					listenY: false
				};
				this.wrapper.appendChild(indicator.el);
				indicators.push(indicator);
			}
		}
		if ( this.options.indicators ) {
			// TODO: check concat compatibility
			indicators = indicators.concat(this.options.indicators);
		}
		for ( var i = indicators.length; i--; ) {
			this.indicators.push( new Indicator(this, indicators[i]) );
		}
		// TODO: check if we can use array.map (wide compatibility and performance issues)
		function _indicatorsMap (fn) {
			for ( var i = that.indicators.length; i--; ) {
				fn.call(that.indicators[i]);
			}
		}
		if ( this.options.fadeScrollbars ) {
			this.on('scrollEnd', function () {
				_indicatorsMap(function () {
					this.fade();
				});
			});
			this.on('scrollCancel', function () {
				_indicatorsMap(function () {
					this.fade();
				});
			});
			this.on('scrollStart', function () {
				_indicatorsMap(function () {
					this.fade(1);
				});
			});
			this.on('beforeScrollStart', function () {
				_indicatorsMap(function () {
					this.fade(1, true);
				});
			});
		}
		this.on('refresh', function () {
			_indicatorsMap(function () {
				this.refresh();
			});
		});
		this.on('destroy', function () {
			_indicatorsMap(function () {
				this.destroy();
			});
			delete this.indicators;
		});
	},
	_initWheel: function () {
		utils.addEvent(this.wrapper, 'wheel', this);
		utils.addEvent(this.wrapper, 'mousewheel', this);
		utils.addEvent(this.wrapper, 'DOMMouseScroll', this);
		this.on('destroy', function () {
			utils.removeEvent(this.wrapper, 'wheel', this);
			utils.removeEvent(this.wrapper, 'mousewheel', this);
			utils.removeEvent(this.wrapper, 'DOMMouseScroll', this);
		});
	},
	_wheel: function (e) {
		if ( !this.enabled ) {
			return;
		}
		e.preventDefault();
		e.stopPropagation();
		var wheelDeltaX, wheelDeltaY,
			newX, newY,
			that = this;
		if ( this.wheelTimeout === undefined ) {
			that._execEvent('scrollStart');
		}
		// Execute the scrollEnd event after 400ms the wheel stopped scrolling
		clearTimeout(this.wheelTimeout);
		this.wheelTimeout = setTimeout(function () {
			that._execEvent('scrollEnd');
			that.wheelTimeout = undefined;
		}, 400);
		if ( 'deltaX' in e ) {
			if (e.deltaMode === 1) {
				wheelDeltaX = -e.deltaX * this.options.mouseWheelSpeed;
				wheelDeltaY = -e.deltaY * this.options.mouseWheelSpeed;
			} else {
				wheelDeltaX = -e.deltaX;
				wheelDeltaY = -e.deltaY;
			}
		} else if ( 'wheelDeltaX' in e ) {
			wheelDeltaX = e.wheelDeltaX / 120 * this.options.mouseWheelSpeed;
			wheelDeltaY = e.wheelDeltaY / 120 * this.options.mouseWheelSpeed;
		} else if ( 'wheelDelta' in e ) {
			wheelDeltaX = wheelDeltaY = e.wheelDelta / 120 * this.options.mouseWheelSpeed;
		} else if ( 'detail' in e ) {
			wheelDeltaX = wheelDeltaY = -e.detail / 3 * this.options.mouseWheelSpeed;
		} else {
			return;
		}
		wheelDeltaX *= this.options.invertWheelDirection;
		wheelDeltaY *= this.options.invertWheelDirection;
		if ( !this.hasVerticalScroll ) {
			wheelDeltaX = wheelDeltaY;
			wheelDeltaY = 0;
		}
		if ( this.options.snap ) {
			newX = this.currentPage.pageX;
			newY = this.currentPage.pageY;
			if ( wheelDeltaX > 0 ) {
				newX--;
			} else if ( wheelDeltaX < 0 ) {
				newX++;
			}
			if ( wheelDeltaY > 0 ) {
				newY--;
			} else if ( wheelDeltaY < 0 ) {
				newY++;
			}
			this.goToPage(newX, newY);
			return;
		}
		newX = this.x + Math.round(this.hasHorizontalScroll ? wheelDeltaX : 0);
		newY = this.y + Math.round(this.hasVerticalScroll ? wheelDeltaY : 0);
		if ( newX > 0 ) {
			newX = 0;
		} else if ( newX < this.maxScrollX ) {
			newX = this.maxScrollX;
		}
		if ( newY > 0 ) {
			newY = 0;
		} else if ( newY < this.maxScrollY ) {
			newY = this.maxScrollY;
		}
		this.scrollTo(newX, newY, 0);
		if ( this.options.probeType > 1 ) {
			this._execEvent('scroll');
		}
// INSERT POINT: _wheel
	},
	_initSnap: function () {
		this.currentPage = {};
		if ( typeof this.options.snap == 'string' ) {
			this.options.snap = this.scroller.querySelectorAll(this.options.snap);
		}
		this.on('refresh', function () {
			var i = 0, l,
				m = 0, n,
				cx, cy,
				x = 0, y,
				stepX = this.options.snapStepX || this.wrapperWidth,
				stepY = this.options.snapStepY || this.wrapperHeight,
				el;
			this.pages = [];
			if ( !this.wrapperWidth || !this.wrapperHeight || !this.scrollerWidth || !this.scrollerHeight ) {
				return;
			}
			if ( this.options.snap === true ) {
				cx = Math.round( stepX / 2 );
				cy = Math.round( stepY / 2 );
				while ( x > -this.scrollerWidth ) {
					this.pages[i] = [];
					l = 0;
					y = 0;
					while ( y > -this.scrollerHeight ) {
						this.pages[i][l] = {
							x: Math.max(x, this.maxScrollX),
							y: Math.max(y, this.maxScrollY),
							width: stepX,
							height: stepY,
							cx: x - cx,
							cy: y - cy
						};
						y -= stepY;
						l++;
					}
					x -= stepX;
					i++;
				}
			} else {
				el = this.options.snap;
				l = el.length;
				n = -1;
				for ( ; i < l; i++ ) {
					if ( i === 0 || el[i].offsetLeft <= el[i-1].offsetLeft ) {
						m = 0;
						n++;
					}
					if ( !this.pages[m] ) {
						this.pages[m] = [];
					}
					x = Math.max(-el[i].offsetLeft, this.maxScrollX);
					y = Math.max(-el[i].offsetTop, this.maxScrollY);
					cx = x - Math.round(el[i].offsetWidth / 2);
					cy = y - Math.round(el[i].offsetHeight / 2);
					this.pages[m][n] = {
						x: x,
						y: y,
						width: el[i].offsetWidth,
						height: el[i].offsetHeight,
						cx: cx,
						cy: cy
					};
					if ( x > this.maxScrollX ) {
						m++;
					}
				}
			}
			this.goToPage(this.currentPage.pageX || 0, this.currentPage.pageY || 0, 0);
			// Update snap threshold if needed
			if ( this.options.snapThreshold % 1 === 0 ) {
				this.snapThresholdX = this.options.snapThreshold;
				this.snapThresholdY = this.options.snapThreshold;
			} else {
				this.snapThresholdX = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width * this.options.snapThreshold);
				this.snapThresholdY = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height * this.options.snapThreshold);
			}
		});
		this.on('flick', function () {
			var time = this.options.snapSpeed || Math.max(
					Math.max(
						Math.min(Math.abs(this.x - this.startX), 1000),
						Math.min(Math.abs(this.y - this.startY), 1000)
					), 300);
			this.goToPage(
				this.currentPage.pageX + this.directionX,
				this.currentPage.pageY + this.directionY,
				time
			);
		});
	},
	_nearestSnap: function (x, y) {
		if ( !this.pages.length ) {
			return { x: 0, y: 0, pageX: 0, pageY: 0 };
		}
		var i = 0,
			l = this.pages.length,
			m = 0;
		// Check if we exceeded the snap threshold
		if ( Math.abs(x - this.absStartX) < this.snapThresholdX &&
			Math.abs(y - this.absStartY) < this.snapThresholdY ) {
			return this.currentPage;
		}
		if ( x > 0 ) {
			x = 0;
		} else if ( x < this.maxScrollX ) {
			x = this.maxScrollX;
		}
		if ( y > 0 ) {
			y = 0;
		} else if ( y < this.maxScrollY ) {
			y = this.maxScrollY;
		}
		for ( ; i < l; i++ ) {
			if ( x >= this.pages[i][0].cx ) {
				x = this.pages[i][0].x;
				break;
			}
		}
		l = this.pages[i].length;
		for ( ; m < l; m++ ) {
			if ( y >= this.pages[0][m].cy ) {
				y = this.pages[0][m].y;
				break;
			}
		}
		if ( i == this.currentPage.pageX ) {
			i += this.directionX;
			if ( i < 0 ) {
				i = 0;
			} else if ( i >= this.pages.length ) {
				i = this.pages.length - 1;
			}
			x = this.pages[i][0].x;
		}
		if ( m == this.currentPage.pageY ) {
			m += this.directionY;
			if ( m < 0 ) {
				m = 0;
			} else if ( m >= this.pages[0].length ) {
				m = this.pages[0].length - 1;
			}
			y = this.pages[0][m].y;
		}
		return {
			x: x,
			y: y,
			pageX: i,
			pageY: m
		};
	},
	goToPage: function (x, y, time, easing) {
		easing = easing || this.options.bounceEasing;
		if ( x >= this.pages.length ) {
			x = this.pages.length - 1;
		} else if ( x < 0 ) {
			x = 0;
		}
		if ( y >= this.pages[x].length ) {
			y = this.pages[x].length - 1;
		} else if ( y < 0 ) {
			y = 0;
		}
		var posX = this.pages[x][y].x,
			posY = this.pages[x][y].y;
		time = time === undefined ? this.options.snapSpeed || Math.max(
			Math.max(
				Math.min(Math.abs(posX - this.x), 1000),
				Math.min(Math.abs(posY - this.y), 1000)
			), 300) : time;
		this.currentPage = {
			x: posX,
			y: posY,
			pageX: x,
			pageY: y
		};
		this.scrollTo(posX, posY, time, easing);
	},
	next: function (time, easing) {
		var x = this.currentPage.pageX,
			y = this.currentPage.pageY;
		x++;
		if ( x >= this.pages.length && this.hasVerticalScroll ) {
			x = 0;
			y++;
		}
		this.goToPage(x, y, time, easing);
	},
	prev: function (time, easing) {
		var x = this.currentPage.pageX,
			y = this.currentPage.pageY;
		x--;
		if ( x < 0 && this.hasVerticalScroll ) {
			x = 0;
			y--;
		}
		this.goToPage(x, y, time, easing);
	},
	_initKeys: function (e) {
		// default key bindings
		var keys = {
			pageUp: 33,
			pageDown: 34,
			end: 35,
			home: 36,
			left: 37,
			up: 38,
			right: 39,
			down: 40
		};
		var i;
		// if you give me characters I give you keycode
		if ( typeof this.options.keyBindings == 'object' ) {
			for ( i in this.options.keyBindings ) {
				if ( typeof this.options.keyBindings[i] == 'string' ) {
					this.options.keyBindings[i] = this.options.keyBindings[i].toUpperCase().charCodeAt(0);
				}
			}
		} else {
			this.options.keyBindings = {};
		}
		for ( i in keys ) {
			this.options.keyBindings[i] = this.options.keyBindings[i] || keys[i];
		}
		utils.addEvent(window, 'keydown', this);
		this.on('destroy', function () {
			utils.removeEvent(window, 'keydown', this);
		});
	},
	_key: function (e) {
		if ( !this.enabled ) {
			return;
		}
		var snap = this.options.snap,	// we are using this alot, better to cache it
			newX = snap ? this.currentPage.pageX : this.x,
			newY = snap ? this.currentPage.pageY : this.y,
			now = utils.getTime(),
			prevTime = this.keyTime || 0,
			acceleration = 0.250,
			pos;
		if ( this.options.useTransition && this.isInTransition ) {
			pos = this.getComputedPosition();
			this._translate(Math.round(pos.x), Math.round(pos.y));
			this.isInTransition = false;
		}
		this.keyAcceleration = now - prevTime < 200 ? Math.min(this.keyAcceleration + acceleration, 50) : 0;
		switch ( e.keyCode ) {
			case this.options.keyBindings.pageUp:
				if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) {
					newX += snap ? 1 : this.wrapperWidth;
				} else {
					newY += snap ? 1 : this.wrapperHeight;
				}
				break;
			case this.options.keyBindings.pageDown:
				if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) {
					newX -= snap ? 1 : this.wrapperWidth;
				} else {
					newY -= snap ? 1 : this.wrapperHeight;
				}
				break;
			case this.options.keyBindings.end:
				newX = snap ? this.pages.length-1 : this.maxScrollX;
				newY = snap ? this.pages[0].length-1 : this.maxScrollY;
				break;
			case this.options.keyBindings.home:
				newX = 0;
				newY = 0;
				break;
			case this.options.keyBindings.left:
				newX += snap ? -1 : 5 + this.keyAcceleration>>0;
				break;
			case this.options.keyBindings.up:
				newY += snap ? 1 : 5 + this.keyAcceleration>>0;
				break;
			case this.options.keyBindings.right:
				newX -= snap ? -1 : 5 + this.keyAcceleration>>0;
				break;
			case this.options.keyBindings.down:
				newY -= snap ? 1 : 5 + this.keyAcceleration>>0;
				break;
			default:
				return;
		}
		if ( snap ) {
			this.goToPage(newX, newY);
			return;
		}
		if ( newX > 0 ) {
			newX = 0;
			this.keyAcceleration = 0;
		} else if ( newX < this.maxScrollX ) {
			newX = this.maxScrollX;
			this.keyAcceleration = 0;
		}
		if ( newY > 0 ) {
			newY = 0;
			this.keyAcceleration = 0;
		} else if ( newY < this.maxScrollY ) {
			newY = this.maxScrollY;
			this.keyAcceleration = 0;
		}
		this.scrollTo(newX, newY, 0);
		this.keyTime = now;
	},
	_animate: function (destX, destY, duration, easingFn) {
		var that = this,
			startX = this.x,
			startY = this.y,
			startTime = utils.getTime(),
			destTime = startTime + duration;
		function step () {
			var now = utils.getTime(),
				newX, newY,
				easing;
			if ( now >= destTime ) {
				that.isAnimating = false;
				that._translate(destX, destY);
				
				if ( !that.resetPosition(that.options.bounceTime) ) {
					that._execEvent('scrollEnd');
				}
				return;
			}
			now = ( now - startTime ) / duration;
			easing = easingFn(now);
			newX = ( destX - startX ) * easing + startX;
			newY = ( destY - startY ) * easing + startY;
			that._translate(newX, newY);
			if ( that.isAnimating ) {
				rAF(step);
			}
			if ( that.options.probeType == 3 ) {
				that._execEvent('scroll');
			}
		}
		this.isAnimating = true;
		step();
	},
	handleEvent: function (e) {
		switch ( e.type ) {
			case 'touchstart':
			case 'pointerdown':
			case 'MSPointerDown':
			case 'mousedown':
				this._start(e);
				break;
			case 'touchmove':
			case 'pointermove':
			case 'MSPointerMove':
			case 'mousemove':
				this._move(e);
				break;
			case 'touchend':
			case 'pointerup':
			case 'MSPointerUp':
			case 'mouseup':
			case 'touchcancel':
			case 'pointercancel':
			case 'MSPointerCancel':
			case 'mousecancel':
				this._end(e);
				break;
			case 'orientationchange':
			case 'resize':
				this._resize();
				break;
			case 'transitionend':
			case 'webkitTransitionEnd':
			case 'oTransitionEnd':
			case 'MSTransitionEnd':
				this._transitionEnd(e);
				break;
			case 'wheel':
			case 'DOMMouseScroll':
			case 'mousewheel':
				this._wheel(e);
				break;
			case 'keydown':
				this._key(e);
				break;
			case 'click':
				if ( !e._constructed ) {
					e.preventDefault();
					e.stopPropagation();
				}
				break;
		}
	}
};
function createDefaultScrollbar (direction, interactive, type) {
	var scrollbar = document.createElement('div'),
		indicator = document.createElement('div');
	if ( type === true ) {
		scrollbar.style.cssText = 'position:absolute;z-index:9999';
		indicator.style.cssText = '-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px';
	}
	indicator.className = 'iScrollIndicator';
	if ( direction == 'h' ) {
		if ( type === true ) {
			scrollbar.style.cssText += ';height:7px;left:2px;right:2px;bottom:0';
			indicator.style.height = '100%';
		}
		scrollbar.className = 'iScrollHorizontalScrollbar';
	} else {
		if ( type === true ) {
			scrollbar.style.cssText += ';width:7px;bottom:2px;top:2px;right:1px';
			indicator.style.width = '100%';
		}
		scrollbar.className = 'iScrollVerticalScrollbar';
	}
	scrollbar.style.cssText += ';overflow:hidden';
	if ( !interactive ) {
		scrollbar.style.pointerEvents = 'none';
	}
	scrollbar.appendChild(indicator);
	return scrollbar;
}
function Indicator (scroller, options) {
	this.wrapper = typeof options.el == 'string' ? document.querySelector(options.el) : options.el;
	this.wrapperStyle = this.wrapper.style;
	this.indicator = this.wrapper.children[0];
	this.indicatorStyle = this.indicator.style;
	this.scroller = scroller;
	this.options = {
		listenX: true,
		listenY: true,
		interactive: false,
		resize: true,
		defaultScrollbars: false,
		shrink: false,
		fade: false,
		speedRatioX: 0,
		speedRatioY: 0
	};
	for ( var i in options ) {
		this.options[i] = options[i];
	}
	this.sizeRatioX = 1;
	this.sizeRatioY = 1;
	this.maxPosX = 0;
	this.maxPosY = 0;
	if ( this.options.interactive ) {
		if ( !this.options.disableTouch ) {
			utils.addEvent(this.indicator, 'touchstart', this);
			utils.addEvent(window, 'touchend', this);
		}
		if ( !this.options.disablePointer ) {
			utils.addEvent(this.indicator, utils.prefixPointerEvent('pointerdown'), this);
			utils.addEvent(window, utils.prefixPointerEvent('pointerup'), this);
		}
		if ( !this.options.disableMouse ) {
			utils.addEvent(this.indicator, 'mousedown', this);
			utils.addEvent(window, 'mouseup', this);
		}
	}
	if ( this.options.fade ) {
		this.wrapperStyle[utils.style.transform] = this.scroller.translateZ;
		this.wrapperStyle[utils.style.transitionDuration] = utils.isBadAndroid ? '0.001s' : '0ms';
		this.wrapperStyle.opacity = '0';
	}
}
Indicator.prototype = {
	handleEvent: function (e) {
		switch ( e.type ) {
			case 'touchstart':
			case 'pointerdown':
			case 'MSPointerDown':
			case 'mousedown':
				this._start(e);
				break;
			case 'touchmove':
			case 'pointermove':
			case 'MSPointerMove':
			case 'mousemove':
				this._move(e);
				break;
			case 'touchend':
			case 'pointerup':
			case 'MSPointerUp':
			case 'mouseup':
			case 'touchcancel':
			case 'pointercancel':
			case 'MSPointerCancel':
			case 'mousecancel':
				this._end(e);
				break;
		}
	},
	destroy: function () {
		if ( this.options.interactive ) {
			utils.removeEvent(this.indicator, 'touchstart', this);
			utils.removeEvent(this.indicator, utils.prefixPointerEvent('pointerdown'), this);
			utils.removeEvent(this.indicator, 'mousedown', this);
			utils.removeEvent(window, 'touchmove', this);
			utils.removeEvent(window, utils.prefixPointerEvent('pointermove'), this);
			utils.removeEvent(window, 'mousemove', this);
			utils.removeEvent(window, 'touchend', this);
			utils.removeEvent(window, utils.prefixPointerEvent('pointerup'), this);
			utils.removeEvent(window, 'mouseup', this);
		}
		if ( this.options.defaultScrollbars ) {
			this.wrapper.parentNode.removeChild(this.wrapper);
		}
	},
	_start: function (e) {
		var point = e.touches ? e.touches[0] : e;
		e.preventDefault();
		e.stopPropagation();
		this.transitionTime();
		this.initiated = true;
		this.moved = false;
		this.lastPointX	= point.pageX;
		this.lastPointY	= point.pageY;
		this.startTime	= utils.getTime();
		if ( !this.options.disableTouch ) {
			utils.addEvent(window, 'touchmove', this);
		}
		if ( !this.options.disablePointer ) {
			utils.addEvent(window, utils.prefixPointerEvent('pointermove'), this);
		}
		if ( !this.options.disableMouse ) {
			utils.addEvent(window, 'mousemove', this);
		}
		this.scroller._execEvent('beforeScrollStart');
	},
	_move: function (e) {
		var point = e.touches ? e.touches[0] : e,
			deltaX, deltaY,
			newX, newY,
			timestamp = utils.getTime();
		if ( !this.moved ) {
			this.scroller._execEvent('scrollStart');
		}
		this.moved = true;
		deltaX = point.pageX - this.lastPointX;
		this.lastPointX = point.pageX;
		deltaY = point.pageY - this.lastPointY;
		this.lastPointY = point.pageY;
		newX = this.x + deltaX;
		newY = this.y + deltaY;
		this._pos(newX, newY);
		if ( this.scroller.options.probeType == 1 && timestamp - this.startTime > 300 ) {
			this.startTime = timestamp;
			this.scroller._execEvent('scroll');
		} else if ( this.scroller.options.probeType > 1 ) {
			this.scroller._execEvent('scroll');
		}
// INSERT POINT: indicator._move
		e.preventDefault();
		e.stopPropagation();
	},
	_end: function (e) {
		if ( !this.initiated ) {
			return;
		}
		this.initiated = false;
		e.preventDefault();
		e.stopPropagation();
		utils.removeEvent(window, 'touchmove', this);
		utils.removeEvent(window, utils.prefixPointerEvent('pointermove'), this);
		utils.removeEvent(window, 'mousemove', this);
		if ( this.scroller.options.snap ) {
			var snap = this.scroller._nearestSnap(this.scroller.x, this.scroller.y);
			var time = this.options.snapSpeed || Math.max(
					Math.max(
						Math.min(Math.abs(this.scroller.x - snap.x), 1000),
						Math.min(Math.abs(this.scroller.y - snap.y), 1000)
					), 300);
			if ( this.scroller.x != snap.x || this.scroller.y != snap.y ) {
				this.scroller.directionX = 0;
				this.scroller.directionY = 0;
				this.scroller.currentPage = snap;
				this.scroller.scrollTo(snap.x, snap.y, time, this.scroller.options.bounceEasing);
			}
		}
		if ( this.moved ) {
			this.scroller._execEvent('scrollEnd');
		}
	},
	transitionTime: function (time) {
		time = time || 0;
		this.indicatorStyle[utils.style.transitionDuration] = time + 'ms';
		if ( !time && utils.isBadAndroid ) {
			this.indicatorStyle[utils.style.transitionDuration] = '0.001s';
		}
	},
	transitionTimingFunction: function (easing) {
		this.indicatorStyle[utils.style.transitionTimingFunction] = easing;
	},
	refresh: function () {
		this.transitionTime();
		if ( this.options.listenX && !this.options.listenY ) {
			this.indicatorStyle.display = this.scroller.hasHorizontalScroll ? 'block' : 'none';
		} else if ( this.options.listenY && !this.options.listenX ) {
			this.indicatorStyle.display = this.scroller.hasVerticalScroll ? 'block' : 'none';
		} else {
			this.indicatorStyle.display = this.scroller.hasHorizontalScroll || this.scroller.hasVerticalScroll ? 'block' : 'none';
		}
		if ( this.scroller.hasHorizontalScroll && this.scroller.hasVerticalScroll ) {
			utils.addClass(this.wrapper, 'iScrollBothScrollbars');
			utils.removeClass(this.wrapper, 'iScrollLoneScrollbar');
			if ( this.options.defaultScrollbars && this.options.customStyle ) {
				if ( this.options.listenX ) {
					this.wrapper.style.right = '8px';
				} else {
					this.wrapper.style.bottom = '8px';
				}
			}
		} else {
			utils.removeClass(this.wrapper, 'iScrollBothScrollbars');
			utils.addClass(this.wrapper, 'iScrollLoneScrollbar');
			if ( this.options.defaultScrollbars && this.options.customStyle ) {
				if ( this.options.listenX ) {
					this.wrapper.style.right = '2px';
				} else {
					this.wrapper.style.bottom = '2px';
				}
			}
		}
		var r = this.wrapper.offsetHeight;	// force refresh
		if ( this.options.listenX ) {
			this.wrapperWidth = this.wrapper.clientWidth;
			if ( this.options.resize ) {
				this.indicatorWidth = Math.max(Math.round(this.wrapperWidth * this.wrapperWidth / (this.scroller.scrollerWidth || this.wrapperWidth || 1)), 8);
				this.indicatorStyle.width = this.indicatorWidth + 'px';
			} else {
				this.indicatorWidth = this.indicator.clientWidth;
			}
			this.maxPosX = this.wrapperWidth - this.indicatorWidth;
			if ( this.options.shrink == 'clip' ) {
				this.minBoundaryX = -this.indicatorWidth + 8;
				this.maxBoundaryX = this.wrapperWidth - 8;
			} else {
				this.minBoundaryX = 0;
				this.maxBoundaryX = this.maxPosX;
			}
			this.sizeRatioX = this.options.speedRatioX || (this.scroller.maxScrollX && (this.maxPosX / this.scroller.maxScrollX));	
		}
		if ( this.options.listenY ) {
			this.wrapperHeight = this.wrapper.clientHeight;
			if ( this.options.resize ) {
				this.indicatorHeight = Math.max(Math.round(this.wrapperHeight * this.wrapperHeight / (this.scroller.scrollerHeight || this.wrapperHeight || 1)), 8);
				this.indicatorStyle.height = this.indicatorHeight + 'px';
			} else {
				this.indicatorHeight = this.indicator.clientHeight;
			}
			this.maxPosY = this.wrapperHeight - this.indicatorHeight;
			if ( this.options.shrink == 'clip' ) {
				this.minBoundaryY = -this.indicatorHeight + 8;
				this.maxBoundaryY = this.wrapperHeight - 8;
			} else {
				this.minBoundaryY = 0;
				this.maxBoundaryY = this.maxPosY;
			}
			this.maxPosY = this.wrapperHeight - this.indicatorHeight;
			this.sizeRatioY = this.options.speedRatioY || (this.scroller.maxScrollY && (this.maxPosY / this.scroller.maxScrollY));
		}
		this.updatePosition();
	},
	updatePosition: function () {
		var x = this.options.listenX && Math.round(this.sizeRatioX * this.scroller.x) || 0,
			y = this.options.listenY && Math.round(this.sizeRatioY * this.scroller.y) || 0;
		if ( !this.options.ignoreBoundaries ) {
			if ( x < this.minBoundaryX ) {
				if ( this.options.shrink == 'scale' ) {
					this.width = Math.max(this.indicatorWidth + x, 8);
					this.indicatorStyle.width = this.width + 'px';
				}
				x = this.minBoundaryX;
			} else if ( x > this.maxBoundaryX ) {
				if ( this.options.shrink == 'scale' ) {
					this.width = Math.max(this.indicatorWidth - (x - this.maxPosX), 8);
					this.indicatorStyle.width = this.width + 'px';
					x = this.maxPosX + this.indicatorWidth - this.width;
				} else {
					x = this.maxBoundaryX;
				}
			} else if ( this.options.shrink == 'scale' && this.width != this.indicatorWidth ) {
				this.width = this.indicatorWidth;
				this.indicatorStyle.width = this.width + 'px';
			}
			if ( y < this.minBoundaryY ) {
				if ( this.options.shrink == 'scale' ) {
					this.height = Math.max(this.indicatorHeight + y * 3, 8);
					this.indicatorStyle.height = this.height + 'px';
				}
				y = this.minBoundaryY;
			} else if ( y > this.maxBoundaryY ) {
				if ( this.options.shrink == 'scale' ) {
					this.height = Math.max(this.indicatorHeight - (y - this.maxPosY) * 3, 8);
					this.indicatorStyle.height = this.height + 'px';
					y = this.maxPosY + this.indicatorHeight - this.height;
				} else {
					y = this.maxBoundaryY;
				}
			} else if ( this.options.shrink == 'scale' && this.height != this.indicatorHeight ) {
				this.height = this.indicatorHeight;
				this.indicatorStyle.height = this.height + 'px';
			}
		}
		this.x = x;
		this.y = y;
		if ( this.scroller.options.useTransform ) {
			this.indicatorStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.scroller.translateZ;
		} else {
			this.indicatorStyle.left = x + 'px';
			this.indicatorStyle.top = y + 'px';
		}
	},
	_pos: function (x, y) {
		if ( x < 0 ) {
			x = 0;
		} else if ( x > this.maxPosX ) {
			x = this.maxPosX;
		}
		if ( y < 0 ) {
			y = 0;
		} else if ( y > this.maxPosY ) {
			y = this.maxPosY;
		}
		x = this.options.listenX ? Math.round(x / this.sizeRatioX) : this.scroller.x;
		y = this.options.listenY ? Math.round(y / this.sizeRatioY) : this.scroller.y;
		this.scroller.scrollTo(x, y);
	},
	fade: function (val, hold) {
		if ( hold && !this.visible ) {
			return;
		}
		clearTimeout(this.fadeTimeout);
		this.fadeTimeout = null;
		var time = val ? 250 : 500,
			delay = val ? 0 : 300;
		val = val ? '1' : '0';
		this.wrapperStyle[utils.style.transitionDuration] = time + 'ms';
		this.fadeTimeout = setTimeout((function (val) {
			this.wrapperStyle.opacity = val;
			this.visible = +val;
		}).bind(this, val), delay);
	}
};
IScroll.utils = utils;
if ( typeof module != 'undefined' && module.exports ) {
	module.exports = IScroll;
} else {
	window.IScroll = IScroll;
}
})(window, document, Math);
;(function($,window){
	
	//模块对外提供的公共方法
	var exportsMethods = {
	
		/**
		 * 新建一个竖直滚动实例,并做一些处理,整合上拉下拉的功能
		 * wrapper        要渲染滚动实例的位置
		 * pulldownAction 下拉执行的逻辑
		 * pullupAction   上拉执行的逻辑
		 * opts           滚动个性化参数 
		 * pullText       拉动时不同状态要显示的文字
		 */
		newVerScrollForPull : function(wrapper,pulldownAction,pullupAction,opts,pullText){
			
			var $wrapper ;
			if(typeof wrapper === 'string'){
				$wrapper = $(wrapper);
			}else if(typeof wrapper === 'object'){
				$wrapper = wrapper;
			}
			var pulldownRefresh   = pullText && pullText['pulldownRefresh'] ? pullText['pulldownRefresh'] : '下拉查看更多消息',
				pullupLoadingMore = pullText && pullText['pullupLoadingMore'] ? pullText['pullupLoadingMore'] : '上拉加载更多...',
				releaseToRefresh  = pullText && pullText['releaseToRefresh'] ? pullText['releaseToRefresh'] : '松手开始加载...',
				releaseToLoading  = pullText && pullText['releaseToLoading'] ? pullText['releaseToLoading'] : '松手开始加载...',
				loading 		  = pullText && pullText['loading'] ? pullText['loading'] : '加载中...';
			if(pullupAction!=null){
				var $pullup   = $('<div class="pullUp" />').appendTo($wrapper.children('.pull-iscroll-box')),
					$pullUpIcon = $('<span class="pullUpIcon"><i></i></span>').appendTo($pullup),
					$pullUpLabel = $('<span class="pullUpLabel">Pull up to refresh...</span>').appendTo($pullup);
			}
			if(pulldownAction!=null){
				var $pulldown = $('<div class="pullDown" />').prependTo($wrapper.children('.pull-iscroll-box')),
					$pullDownIcon = $('<span class="pullDownIcon"><i></i></span>').appendTo($pulldown),
					$pullDownLabel = $('<span class="pullDownLabel">Pull down to refresh...</span>').appendTo($pulldown);
			}
			var pullupOffset   = 0,
				pulldownOffset = 0;
			
			if($pulldown){
				pulldownOffset = $pulldown.outerHeight();
				$pullDownLabel.html(pulldownRefresh);
			}
			
			if($pullup){
				pullupOffset = $pullup.outerHeight();
				$pullUpLabel.html(pullupLoadingMore);
			}
			
			//这个属性很重要,目前V5版本不支持,需修改源码
			
			var options = {
				topOffset : pulldownOffset,
				useTransition : false,
				probeType : 3
			};
			
			$.extend(true,options,opts);
			
			var scrollObj = this.newVerScroll($wrapper[0],options);
			
			//滚动刷新触发的事件			
			scrollObj.on('refresh',function(){			
				if ($pulldown && $pulldown.hasClass('loading')) {
					$pulldown.removeClass('loading');
					$pullDownLabel.html(pulldownRefresh);
				} else if ($pullup){
					$pullUpIcon.show();
					if($pullup.hasClass('loading')){
						$pullUpIcon.show();
						$pullup.removeClass('loading');
						$pullUpLabel.html(pullupLoadingMore);
					}
				}
			});
			
			//滚动的时候触发的事件			
			scrollObj.on('scroll',function(){
				if ($pulldown && this.y > 5 && !$pulldown.hasClass('flip')) {
					$pulldown.addClass('flip');
					$pullDownLabel.html(releaseToRefresh);
					this.minScrollY = 0;
					
				} else if ($pulldown && this.y < -10 && $pulldown.hasClass('flip')) {
					$pulldown.removeClass('flip');
					$pullDownLabel.html(pulldownRefresh);
					this.minScrollY = -pulldownOffset;
				//this.y < this.minScrollY代表是上拉,以防下拉的时候未拉到尽头时进入上拉的逻辑中
				} else if ($pullup && this.y < this.minScrollY && this.y < (this.maxScrollY - 5) && !$pullup.hasClass('flip')) {
					$pullup.addClass('flip');
					$pullUpLabel.html(releaseToLoading);
					this.maxScrollY = this.maxScrollY;
					
				} else if ($pullup && (this.y > (this.maxScrollY + 5)) && $pullup.hasClass('flip')) {
					$pullup.removeClass('flip');
					$pullUpLabel.html(pullupLoadingMore);
				}
			});
			
			//滚动结束之后触发的事件	
			scrollObj.on('scrollEnd',function(){
				if ($pulldown && $pulldown.hasClass('flip')) {
					$pulldown.removeClass('flip').addClass('loading');
					$pullDownLabel.html(loading);
					if(typeof pulldownAction === 'function'){
						pulldownAction.call(scrollObj);	
					}
				} else if ($pullup && $pullup.hasClass('flip')) {
					$pullup.removeClass('flip').addClass('loading');
					$pullUpLabel.html(loading);
					if(typeof pullupAction === 'function' && $pullup.parent().length>0){
						pullupAction.call(scrollObj);
					}				
				}
			});
			
			return scrollObj;
		},
		/**
		 * 创建一个竖直方向的滚动实例
		 * @param obj    dom对象或者选择字符串
		 * @param option 滚动其他属性
		 * @return IScroll实例对象
		 */
		newVerScroll : function(dom,option){
			var opt = {
				scrollbars : true, //是否有滚动条
				useTransition: true,
				fadeScrollbars : true,
				click: true
			};
			if(option){
				$.extend(opt,option);
			}
			var iSObj = new IScroll(dom,opt);
			
			return iSObj;
		}
	};
	
	window.iscrollAssist = exportsMethods;
	
})(jQuery,window);

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 5 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/js/jquery.js


+ 241 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/js/prescription_consulting_info.js

@ -0,0 +1,241 @@
var d = dialog({contentType:'load', skin:'bk-popup'});
var request = GetRequest(),
    consult = request.consult,
    dialroll,
    page = 1,
    prepend =  false; 
//var server = "http://192.168.131.24:8081/";//本地
//var server = "http://172.19.103.88:8011/wlyy_service";//测试
var server = "http://59.61.92.90:8072/wlyy_service";//正式
$(function(){
    dialroll = iscrollAssist.newVerScrollForPull($('.pull-iscroll-wrap'), pulldownAction, null);
    dialroll.refresh();
    dialroll.scrollTo(0, dialroll.maxScrollY);
    
    var totH = $(window).height();
    $("#talkwrap").height(totH);
    
    getLogList();
})
function getLogList(){
    var url = server+'third/prescription/getLoglist',
        params = {
            consult: consult,
            page: page,
            pagesize: 100
        };
    $.ajax({
        url: url,
        data: params,
        dataType: 'json',
        timeout: 20000, 
        type: 'get',
        error: function(res) {
            queryFailed(res);
        },
        success: function(res) {
            if(res.status == 200){
                page ++;
                querySuccess(res);
            }else{
                queryFailed(res);
            }
        }
    });
}
function querySuccess(res){
    var list = res.data.list,
        len = list.length,
        users = res.data.users;
    var members = {};
    for(var j = 0; j<users.length; j++){
        members[users[j].id] = users[j];
    }
    var showTypes = [1,2,3,6,7,12,15]; //设置显示的消息类型
    if(len > 0){
        for(var i=len-1; i>=0; i--){
            var item = list[i],
                contentType = item.content_type;
            //只显示一下类型的数据
            if(showTypes.indexOf(contentType) > -1){
                addReply(item, members[item.sender_id], prepend);
                prepend = false;
            }
        }
    }
    if(prepend){
        dialroll.refresh();
    }else{
        dialroll.refresh();
        dialroll.scrollTo(0, dialroll.maxScrollY);
    }
}
//下拉刷新加载数据方法
function pulldownAction(){
    var t = this;
    prepend = true;
    getLogList();
}
/**
 * 组装信息
 * @param {object} msgObj 消息内容object
 * @param {object} member 发送者信息
 */
function addReply(msgObj, member, prepend){
    //time = time.substr(10);
    var date = new Date();
    date.setTime(msgObj.timestamp);
    var time = date.Format('yyyy-MM-dd hh:mm:ss');
    var isSystem = (msgObj.sender_id == 'system'),
        p = isSystem ? '' : member.avatar,
        msgType = msgObj.content_type,
        content = msgObj.content;
    
    var $div = $("<dl></dl>");
    if(msgType == 7){
        if(msgType == 7 && isSystem){
            content = "患者24小时内未回复,系统自动结束咨询";
        }
        if(prepend){
            $(".talk-box").prepend('<div class="time-tips"><span class="xt-xiaoxi">' + content + '</span></div>');
        } else
            $(".talk-box").append('<div class="time-tips"><span class="xt-xiaoxi">' + content + '</span></div>');
        return;
    } 
        
    if (member.is_patient == 0) { //医生信息
        $div.addClass('chat-left');
    } else {
        $div.addClass('chat-right');
    }
    
    var temp = '<dt style="height: auto; text-align: center;">'+
        '<a><img src="' + p + '" class="c-images-cycle" /></a></dt>' +
        '<div class="c-content"><span class="c-f12 name">' + member.name + '</span>'
    
    switch(parseInt(msgType)) {
        case 1://信息
            temp += '<dd class="word-bread"><span>' + content + '</span></dd></dl>';
            break;
        case 6://咨询问题
            var rs = JSON.parse(content);
            var tzMsg = rs.tzMsg;
            temp += '<dd class="word-bread sys-msg">'+
                '<div class="c-f14 sys-header mb5"><img src="images/xitongtixing_im_icon.png" width="14">本消息为系统提示</div>'+
                '<p class="c-333 c-f14">' + rs.title + '</p>'+
                '<p class="c-333 c-f14">体征信息:'+rs.tzMsg+'</p>'+
//              '<p class="c-333 c-f14">上次续方时间:<span class="c-f12">'+rs.lastTime+'</span></p>'+
                '</dd></dl>';
            break;
        case 2://图片
            temp += '<dd class="word-bread wb-img"><img width="100" height="100" src="'+ content +'" /></dd></dl>';
            break;
        case 3://语音
            var rec = JSON.parse(content);
            temp += "<div class='c-msg'><dd class='word-bread audio' data-type='3' data-audio='" + content + "'>"+
                        "<div class='soundWav'>" +
                               "<span class='soundWavT'>"+(rec? rec.times: "") +"\'\'</span>"+
                        "</div>"+
                    "</dd></div>";
            break;
        case 12://视频
            var videoInfo = content.split(",");
            var shichang = formatSeconds(videoInfo[2]);//时长
            if(type == 1){
                temp += '<dd class="preview-video" data-video="'+videoInfo[1]+'">'+
                        '<img class="video-img-left" src="'+videoInfo[0]+'">'+
                        '<img class="bofang-icon-left" src="images/bofang_icon.png">'+
                        '<img class="jianjiao-icon-left" src="images/zuoshanjiao_bg.png">'+
                        '<span class="shichang-time-left">'+shichang+'</span>'+
                    '</dd>';
            }else{
                temp += '<dd class="preview-video" data-video="'+videoInfo[1]+'">'+
                        '<img class="video-img-right" src="'+videoInfo[0]+'">'+
                        '<img class="bofang-icon-right" src="images/bofang_icon.png">'+
                        '<img class="jianjiao-icon-right" src="images/youshanjiao_bg.png">'+
                        '<span class="shichang-time-right">'+shichang+'</span>'+
                    '</dd>';
            }
            break;
        case 15:
            var rs = JSON.parse(content);
            var reason = "";
            if(rs.reason){
                reason = '<p class="c-333 c-f14">原因:'+rs.reason+'</p>';
            }
            temp += '<dd class="word-bread sys-msg">'+
                '<div class="c-f14 sys-header mb5"><img src="images/xitongtixing_im_icon.png" width="14">本消息为系统提示</div>'+
                '<p class="c-333 c-f14">审核消息:</p>'+
                '<p class="c-333 c-f14">' + rs.title + '</p>'+
                '<p class="c-333 c-f14">审核结果:'+rs.result+'</p>'+reason+
                '<a href="javascript:void(0);" class="view-detail c-f14">点此查看详情</a>'+
                '</dd></dl>';
            break;
    }
    
    if(prepend){
        $(".talk-box").prepend($div.append(temp)).prepend('<div class="time-tips"><span>' + time + '</span></div>');
    } else
        $(".talk-box").append('<div class="time-tips"><span>' + time + '</span></div>').append($div.append(temp));
    
}
function queryFailed(res){
    d.close();
   
    if (res && res.msg) {
        dialog({contentType:'tipsbox', skin:'bk-popup' ,bottom:true, content:res.msg}).show();      
    } else {
        dialog({contentType:'tipsbox', skin:'bk-popup' , bottom:true,content:'加载失败'}).show();
    }
}
//获取链接上的参数
function GetRequest() {  
   var url = location.search; //获取url中"?"符后的字串
   var theRequest = new Object();
   if (url.indexOf("?") != -1) {
      var str = url.substr(1);
      strs = str.split("&");
      for(var i = 0; i < strs.length; i ++) {
         theRequest[strs[i].split("=")[0]]=(strs[i].split("=")[1]);
      }
   }
   //添加toName的信息
   if(theRequest.toName){
       localStorage.setItem("toName", theRequest.toName);
   }
   return theRequest;
}
Date.prototype.Format = function(formatStr)   
{   
    var str = formatStr;   
    var Week = ['日','一','二','三','四','五','六'];  
  
    str=str.replace(/yyyy|YYYY/,this.getFullYear());   
    str=str.replace(/yy|YY/,(this.getYear() % 100)>9?(this.getYear() % 100).toString():'0' + (this.getYear() % 100));   
  
    str=str.replace(/MM/,this.getMonth()>8?(this.getMonth()+1).toString():'0' + (this.getMonth()+1)); 
    str=str.replace(/M/g,this.getMonth()+1);
  
    str=str.replace(/w|W/g,Week[this.getDay()]);   
  
    str=str.replace(/dd|DD/,this.getDate()>9?this.getDate().toString():'0' + this.getDate());   
    str=str.replace(/d|D/g,this.getDate());   
  
    str=str.replace(/hh|HH/,this.getHours()>9?this.getHours().toString():'0' + this.getHours());   
    str=str.replace(/h|H/g,this.getHours());   
    str=str.replace(/mm/,this.getMinutes()>9?this.getMinutes().toString():'0' + this.getMinutes());   
    str=str.replace(/m/g,this.getMinutes());   
  
    str=str.replace(/ss|SS/,this.getSeconds()>9?this.getSeconds().toString():'0' + this.getSeconds());   
    str=str.replace(/s|S/g,this.getSeconds());   
  
    return str;   
}

+ 38 - 0
patient-co-service/wlyy_service/src/main/webapp/prescription_consulting/prescription_consulting_info.html

@ -0,0 +1,38 @@
<!doctype html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="author" content="yihu.com" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <title>续方咨询详情</title>
        <link rel="stylesheet" type="text/css" href="css/cross.css"/>
        <link rel="stylesheet" type="text/css" href="css/cross.ui.css"/>
        <link rel="stylesheet" type="text/css" href="css/chatRoom.css"/>
        <link rel="stylesheet" type="text/css" href="iscroll2/5.1.3/css/iscroll.css" />
        <link rel="stylesheet" type="text/css" href="artDialog/6.0.5/css/ui-dialog.min.css">
        <link rel="stylesheet" type="text/css" href="css/prescription-consulting.css"/>
    </head>
    <body>
        <div class="c-main" style="top: 0;">
            <div class="labcon">
                <div class="c-position-r" id="talkwrap">
                    <div class="pull-iscroll-wrap">
                        <div class="pull-iscroll-box">
                            <div class="talk-box ptb10 plr10">
                                
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" src="iscroll2/5.1.3/js/iscroll.js"></script>
        <script src="artDialog/6.0.5/js/dialog-plus.min.js"></script>
        <script src="js/prescription_consulting_info.js" type="text/javascript" charset="utf-8"></script>
    </body>
</html>

+ 1 - 3
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/third/jw/JwPrescriptionService.java

@ -172,10 +172,8 @@ public class JwPrescriptionService {
            JSONObject reobj =  JSON.parseObject(response);
            Integer status = reobj.getInteger("status");
            String errmsg = reobj.getString("msg");
            if(-1 == status){
            if(200 != status){
                throw new Exception("基卫接口(院内结算确认接口)请求失败,"+errmsg);
            }else{
                prescriptionDao.updatejwPayStatus(prescriptionCode);
            }
        }else{
            throw new Exception("基卫接口(院内结算确认接口)请求失败,无数据返回!");

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionDispensaryCodeDao.java

@ -42,4 +42,5 @@ public interface PrescriptionDispensaryCodeDao extends PagingAndSortingRepositor
    void updateToUse(String prescriptionCode, Integer type);
    PrescriptionDispensaryCode findByCodeAndIsUse(String code, Integer isUse);
    PrescriptionDispensaryCode findByPrescriptionCodeAndIsUseAndType(String prescriptionCode, Integer isUse,Integer type);
}

+ 12 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -59,14 +59,12 @@ import org.springside.modules.persistence.DynamicSpecifications;
import org.springside.modules.persistence.SearchFilter;
import org.springside.modules.persistence.SearchFilter.Operator;
import org.springside.modules.utils.Clock;
import com.yihu.wlyy.util.CommonUtil;
import javax.annotation.PostConstruct;
import java.text.SimpleDateFormat;
import java.util.*;
/**
 * 網絡諮詢类.
 * test
@ -2243,7 +2241,7 @@ public class ConsultTeamService extends ConsultService {
            Patient p = patientDao.findByCode(endOperator);
            endName = p.getName();
            endId = p.getCode();
            if (consultTeam.getType() == 2) {
            if (consultTeam.getType() == 2||consultTeam.getType()==8) {
                String openId = p.getOpenid();
                JSONObject json = new JSONObject();
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@ -2253,7 +2251,11 @@ public class ConsultTeamService extends ConsultService {
                json.put("represented",p.getCode());//被代理人
                json.put("remark", "");
                json.put("consult", consult);
                String first = endName + ",您好!您有1条咨询已结束,请及时对咨询医生进行评价。";
                String first = endName + ",您好!您有1条";;
                if(consultTeam.getType()==8){
                    first += "续方";
                }
                first += "咨询已结束,请及时对咨询医生进行评价。";
                json.put("first", first);
                if(StringUtils.isNotBlank(p.getOpenid())){
                    pushMsgTask.putWxMsg(accessTokenUtils.getAccessToken(), 17, openId, p.getName(), json);
@ -2283,7 +2285,7 @@ public class ConsultTeamService extends ConsultService {
                endId = d.getCode();
                endName = d.getName();
            }
            if (consultTeam.getType() == 2) {
            if (consultTeam.getType() == 2||consultTeam.getType()==8) {
                Patient p = patientDao.findByCode(consultTeam.getPatient());
                String name = p.getName();
                String openId = p.getOpenid();
@ -2295,7 +2297,11 @@ public class ConsultTeamService extends ConsultService {
                json.put("represented",p.getCode());//被代理人
                json.put("remark", "");
                json.put("consult", consult);
                String first = name + ",您好!您有1条咨询已结束,请及时对咨询医生进行评价。";
                String first = endName + ",您好!您有1条";;
                if(consultTeam.getType()==8){
                    first += "续方";
                }
                first += "咨询已结束,请及时对咨询医生进行评价。";
                json.put("first", first);
                if(StringUtils.isNotBlank(p.getOpenid())){
                    pushMsgTask.putWxMsg(accessTokenUtils.getAccessToken(), 17, openId, p.getName(), json);

+ 140 - 40
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PatientPrescriptionPayService.java

@ -71,7 +71,6 @@ public class PatientPrescriptionPayService extends BaseService {
    //公共配置文件
    Properties systemConf = SystemConf.getInstance().getSystemProperties();
    private static final Logger LOGGER = LoggerFactory.getLogger(OnePayController.class);
    //    各环境对应配置
    @Value("${server.server_url}")
    private String serverUrl;
@ -266,6 +265,7 @@ public class PatientPrescriptionPayService extends BaseService {
        String error = "";
        String responses = "";
        response.setContentType("text/html;charset=utf-8");
        JSONObject msbody = new JSONObject();
        try {
            //		如:查询显示订单信息
@ -297,6 +297,27 @@ public class PatientPrescriptionPayService extends BaseService {
            org.json.JSONObject param = new org.json.JSONObject(result);
            String requestParam = param.getString("responseContent");
            org.json.JSONObject responseContents = new org.json.JSONObject(requestParam);//医保结构体
//            构建请求结构体
            msbody.put("appId",appId);
            msbody.put("billNo",billNo);
            msbody.put("cardNo",cardNo);
            msbody.put("channel",channel);
            msbody.put("chargeNo",chargeNo);
            msbody.put("chargeTime",chargeTime);
            msbody.put("idNo",idNo);
            msbody.put("idType",idType);
            msbody.put("insuranceAmount",insuranceAmount);
            msbody.put("outChargeNo",outChargeNo);
            msbody.put("outChargeTime",outChargeTime);
            msbody.put("selfPayAmount",selfPayAmount);
            msbody.put("sign",sign);
            msbody.put("signType",signType);
            msbody.put("timestamp",timestamp);
            msbody.put("totalAmount",totalAmount);
            msbody.put("tradeStatus",tradeStatus);
            msbody.put("userId",userId);
            msbody.put("userName",userName);
            msbody.put("responseContent",responseContents);
            PrescriptionPay prescriptionPay = payDao.findByCode(outChargeNo);
            if (responseContents != null) {
@ -381,10 +402,10 @@ public class PatientPrescriptionPayService extends BaseService {
            response.getWriter().write(e.getMessage());
        }
        //                记录log日志到数据库
        LOGGER.info("api - "+config.getRecipeReturnUrl());
        LOGGER.info("request - "+request.toString());
        LOGGER.info("responses - "+responses);
        LOGGER.info("error - "+error);
        logger.info("api - "+config.getRecipeReturnUrl());
        logger.info("request - "+request.toString());
        logger.info("responses - "+responses);
        logger.info("error - "+error);
        ZyPushLog log = new ZyPushLog();
        log.setCreateTime(new Date());
@ -392,14 +413,14 @@ public class PatientPrescriptionPayService extends BaseService {
        log.setContent("长处方支付页面跳转");
        log.setError(error);
        log.setMethod("POST");
        log.setRequest(request.toString());
        log.setRequest(msbody.toJSONString());
        log.setResponse(responses);
        log.setRetryTimes(0);
        log.setStatus(Integer.toString(flag));
        log.setType("3");
        zyPushLogDao.save(log);
        //记录支付log日志到数据库  支付
        logService.saveHttpLog(isSuccess, config.getRecipeReturnUrl(), "长处方支付页面跳转", "POST", null, "", responses, error, logService.onepayType);
        logService.saveHttpLog(isSuccess, config.getRecipeReturnUrl(), "长处方支付页面跳转", "POST", null, msbody.toJSONString(), responses, error, logService.onepayType);
        payLogService.addLog(prescription, PrescriptionLog.PrescriptionLogType.pay.getValue(), flag, 1);
        return resultMap;
    }
@ -426,7 +447,7 @@ public class PatientPrescriptionPayService extends BaseService {
        HospitalMapping hospital = mappingDao.findByAppId(appId);
        String appSecret = hospital.getAppSecret();
        LOGGER.info("回调参数:{}", params);
        logger.info("回调参数:{}", params);
        if (StringUtil.isEmpty(params)) {
            response.getWriter().write("empty");
            return null;
@ -436,20 +457,20 @@ public class PatientPrescriptionPayService extends BaseService {
        OnepayDefaultClient client = new OnepayDefaultClient("", appId, appSecret, encryptRes.getSignType(), encryptRes.getEncryptType());
        try {
            LOGGER.info("解密前:{}", JSON.toJSONString(encryptRes));
            logger.info("解密前:{}", JSON.toJSONString(encryptRes));
            ResponseParams<?> decryptRes = client.decryptNotifyResponse(encryptRes);
            LOGGER.info("解密后:{}", JSON.toJSONString(decryptRes));
            logger.info("解密后:{}", JSON.toJSONString(decryptRes));
            boolean isDecrypt = ("-1".equals(decryptRes.getRespCode()) ? false : true); // 是否解密失败
            if (!isDecrypt) {
                response.getWriter().write("DECRYPT FAILURE");
            } else {
                boolean isVerify = client.verifyResponseSign(decryptRes);
                LOGGER.info("验签结果:{}", isVerify);
                logger.info("验签结果:{}", isVerify);
                if (!isVerify) {
                    response.getWriter().write("FAILURE");
                } else {
//					业务逻辑代码
                    LOGGER.debug(" ====================================>     verify is true");
                    logger.debug(" ====================================>     verify is true");
                    flag = 1;
                    isSuccess = true;
                    responses = JSON.toJSONString(decryptRes);
@ -482,7 +503,7 @@ public class PatientPrescriptionPayService extends BaseService {
                    String idNo = requestParam.getString("idNo");//证件号码
                    String tradeStatus = requestParam.getString("tradeStatus");//交易状态
                    LOGGER.debug(" ====================================>     responseContent");
                    logger.debug(" ====================================>     responseContent");
//                    org.json.JSONObject responseContents = requestParam.getJSONObject("responseContent");//医保结构体
                    String contents = requestParam.getString("responseContent");//医保结构体
                    JSONObject responseContents = JSONObject.parseObject(contents);
@ -543,12 +564,12 @@ public class PatientPrescriptionPayService extends BaseService {
                    prescriptionPay.setHealthBalance(Integer.parseInt(healthBalance));//健康账户余额
                    String prescriptionCode = prescriptionPay.getPrescriptionCode();
                    LOGGER.debug(" ====================================> prescriptionDao    findByCode");
                    logger.debug(" ====================================> prescriptionDao    findByCode");
                    prescription = prescriptionDao.findByCode(prescriptionCode);
                    int sendType = prescription.getDispensaryType();//1 自取 2快递配送 3健管师配送
                    PrescriptionExpressage expressage = expressageDao.findByPrescriptionPay(prescriptionCode);
                    if ("0".equals(tradeStatus) || "SUCCESS".equals(tradeStatus)) {
                        LOGGER.debug(" ====================================> tradeStatus    00");
                        logger.debug(" ====================================> tradeStatus    00");
                        prescriptionPay.setTradeStatus("1");//交易状态 成功1 失败0
                        prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.pay_success.getValue());//续费状态 30支付成功 21支付失败
                        expressage.setDel(1);//快递信息状态 1可用 0删除
@ -591,10 +612,10 @@ public class PatientPrescriptionPayService extends BaseService {
            response.getWriter().write(e.getMessage());
        }
        //                记录log日志到数据库
        LOGGER.info("api - "+config.getReceiveRecipeNotify());
        LOGGER.info("request - "+params);
        LOGGER.info("responses - "+responses);
        LOGGER.info("error - "+error);
        logger.info("api - "+config.getReceiveRecipeNotify());
        logger.info("request - "+params);
        logger.info("responses - "+responses);
        logger.info("error - "+error);
        ZyPushLog log = new ZyPushLog();
        log.setCreateTime(new Date());
@ -647,8 +668,8 @@ public class PatientPrescriptionPayService extends BaseService {
            String appId = hos.getAppId();
            String appSecret = hos.getAppSecret();
            String signAddress = hospital.getAddress();
            LOGGER.info("APPID============> " + appId);
            LOGGER.info("APPSECRET============> " + appSecret);
            logger.info("APPID============> " + appId);
            logger.info("APPSECRET============> " + appSecret);
            Patient patient = patientDao.findByCode(people);
            //微信登录患者信息
@ -789,7 +810,7 @@ public class PatientPrescriptionPayService extends BaseService {
                            " WHERE t.admin_team_code=a.id AND d.code=a.leader_code " +
                            " AND t.patient=? ";
                    Map<String, Object> team = jdbcTemplate.queryForMap(sql, people);
                    LOGGER.debug("================> get order amount!");
                    logger.debug("================> get order amount!");
                    String teamCode = team.get("teamCode").toString();
                    String leaderCode = team.get("leaderCode").toString();
                    String leaderName = team.get("leaderName").toString();
@ -841,13 +862,13 @@ public class PatientPrescriptionPayService extends BaseService {
//        try {
//             ***************************  测通流程 ***************************************
            LOGGER.info("================================>" + "Before get BindCard");
            logger.info("================================>" + "Before get BindCard");
            BindCard card = onePayService.ownerCard(openid);
            String name = card.getAttachName();
            String ssc = card.getAttachCardNo();
            String idType = card.getAttachIdType();
            String idNo = card.getAttachIdNo();
            LOGGER.info("================================>" + "after get BindCard");
            logger.info("================================>" + "after get BindCard");
//            验证续方人与绑卡人是否一致
            if (!(payName.equals(name) && paySsc.equals(ssc) && payIdcard.equals(idNo))) {
                resultMap.put("status", "-1");
@ -872,7 +893,7 @@ public class PatientPrescriptionPayService extends BaseService {
            requestParams.setSignType(signType);
            requestParams.setEncryptType(encryptType);
            requestParams.setTransType(config.getRecipeChargeType());
            LOGGER.info("================================>" + "Before params");
            logger.info("================================>" + "Before params");
            //业务参数
            JSONObject params = new JSONObject();
@ -889,7 +910,7 @@ public class PatientPrescriptionPayService extends BaseService {
            params.put("idType", idType);
            params.put("idNo", idNo);
            params.put("returnUrl", serverUrl + returnUrl);   //长处方页面跳转地址
            String notifyUrl = "patient/prescription/pay/receiveRecipeNotify";
            String notifyUrl = "/third/pay/prescription/receiveRecipeNotify";
            params.put("notifyUrl", serverUrl + notifyUrl);//易联众新增服务器异步回调地址
            params.put("channel", channel);  //微信医保支付
            params.put("merchName", orgName);  //收款单位名称
@ -900,7 +921,7 @@ public class PatientPrescriptionPayService extends BaseService {
//            JSONObject jsonParams = prescriptionService.getPayInfo("D21085562", "3277903");
            String visitNo = prescription.getVisitNo();//续方挂号号
            String recipeNo = prescription.getRecipeNo();//基位处方code(开方成功后返回)
            LOGGER.debug("======================> getPayInfo " + ssc + visitNo);
            logger.debug("======================> getPayInfo " + ssc + visitNo);
            if (visitNo == null || ssc == null || recipeNo==null) {
                resultMap.put("status", "-2");
                return resultMap;
@ -933,7 +954,7 @@ public class PatientPrescriptionPayService extends BaseService {
            map.put("feeType", "06");//长处方结算
            map.put("settleType", "01"); //诊间医保结算
            params.put("requestContent", objectMapper.writeValueAsString(map));// 请求结构体
            LOGGER.info("================================>" + "Before msBody");
            logger.info("================================>" + "Before msBody");
            requestParams.setParam(params);
            msgBody = JSON.toJSONString(requestParams);
@ -971,10 +992,10 @@ public class PatientPrescriptionPayService extends BaseService {
            error = sw.toString();
        }
        //保存http日志
        LOGGER.info("api - "+config.getRecipeChargeType());
        LOGGER.info("request - "+msgBody);
        LOGGER.info("responses - "+response);
        LOGGER.info("error - "+error);
        logger.info("api - "+config.getRecipeChargeType());
        logger.info("request - "+msgBody);
        logger.info("responses - "+response);
        logger.info("error - "+error);
        ZyPushLog log = new ZyPushLog();
        log.setCreateTime(new Date());
@ -1047,12 +1068,91 @@ public class PatientPrescriptionPayService extends BaseService {
            if (OnepayDefaultClient.isSuccessful(res)) {
                //业务处理*******************
//                只返回业务出参
//                result = JSON.toJavaObject(res.getParam(), Charge.class);
                flag = 1;
                result = JSON.toJSONString(res.getParam());
//                 返回医保机构体
                LOGGER.info("请求成功,返回参数: " + result);
//             新增保存数据
//                JSONObject request = JSON.parseObject(result);
//                String tradeStatus = request.getString("tradeStatus");//交易状态
//                String chargeNo = request.getString("chargeNo");//支付平台流水号
//                String chargeTime = request.getString("chargeTime");//支付平台交易成功时间
//                String outChargeNo = request.getString("outChargeNo");//接入应用业务流水号
//                String outChargeTime = request.getString("outChargeTime");//接入应用时间
////                String medOrgNo = request.getString("medOrgNo");//医疗机构编号
////                String medOrgName = request.getString("medOrgName");//医疗机构名称
//                String billNo = request.getString("billNo");//待结算费用单据号
//                String cardNo = request.getString("cardNo");//医保卡号
//                String totalAmount = request.getString("totalAmount");//交易总金额
//                String insuranceAmount = request.getString("insuranceAmount");//医保支付金额
//                String selfPayAmount = request.getString("selfPayAmount");//自付金额
//                String userId = request.getString("userId");//用户openID
//                String userName = request.getString("userName");//用户名字
//                String idNo = request.getString("idNo");//证件号码
//                String idType = request.getString("idType");//证件类型
//
////                String appId = request.getString("appId");
////                String channel = request.getString("channel");//支付方式
////                String sign = request.getString("sign");
////                String signType = request.getString("signType");
////                String timestamp = request.getString("timestamp");
//
//                JSONObject responseContents = request.getJSONObject("responseContent");//医保结构体
//                PrescriptionPay prescriptionPay = payDao.findByCode(outChargeNo);
//                if (responseContents != null) {
//                    String miSettleNo = responseContents.getString("miSettleNo");//医保收费单据号 (医保签约号)
//                    String miRegisterNo = responseContents.getString("miRegisterNo");//医保挂号
//                    String miCollectDate = responseContents.getString("miCollectDate");//收费日期
//                    String miCollectTime = responseContents.getString("miCollectTime");//收费时间
//                    String miCollectorName = responseContents.getString("miCollectorName");//收费人姓名
//                    String miTotalFee = responseContents.getString("miTotalFee");//本次报销总额
//                    String selfPay = responseContents.getString("selfPay");//个人现金支付
//                    String accountPay = responseContents.getString("accountPay");//个人账户支付
//                    String heathPay = responseContents.getString("heathPay");//健康账户支付
//                    String cadresPay = responseContents.getString("cadresPay");//公务员补助
//                    String fundPay = responseContents.getString("fundPay");//基金支付
//                    String healthCarePay = responseContents.getString("healthCarePay");//保健基金支付
//                    String commercePay = responseContents.getString("commercePay");//商业保险支付
//                    String familyPay = responseContents.getString("familyPay");//共济账户支付
//                    String civilPay = responseContents.getString("civilPay");//民政补助金额
//                    String civilZone = responseContents.getString("civilZone");//民政行政区号
//                    String bdrugPay = responseContents.getString("bdrugPay");//乙类支付金额
//                    String unlessAmount = responseContents.getString("unlessAmount");//非医保费用
//                    String exceedAmount = responseContents.getString("exceedAmount");//超封顶线金额
//                    String accountBalance = responseContents.getString("accountBalance");//个人账户余额
//                    String healthBalance = responseContents.getString("healthBalance");//健康账户余额
//
//                    prescriptionPay.setBillNo(billNo);//待结算费用单据号
//                    prescriptionPay.setChargeNo(chargeNo);//支付流水号
//                    prescriptionPay.setInsuranceAmount(Integer.parseInt(insuranceAmount));//医保支付金额
//                    prescriptionPay.setSelfPayAmount(Integer.parseInt(selfPayAmount));//自付金额
//                    prescriptionPay.setMiSettleNo(miSettleNo);//医保收费单据号
//                    prescriptionPay.setMiRegisterNo(miRegisterNo);//医保挂号
//                    SimpleDateFormat formatDate = new SimpleDateFormat("yyyyMMdd");
//                    prescriptionPay.setMiCollectDate(formatDate.parse(miCollectDate));//收费日期
//                    SimpleDateFormat formatTime = new SimpleDateFormat("HHmm");
//                    prescriptionPay.setMiCollectTime(formatTime.parse(miCollectTime));//收费时间
//                    prescriptionPay.setMiCollectorName(miCollectorName);//收费人姓名
//                    prescriptionPay.setMiTotalFee(Integer.parseInt(miTotalFee));//本次报销总额
//                    prescriptionPay.setSelfPay(Integer.parseInt(selfPay));//个人现金支付
//                    prescriptionPay.setAccountPay(Integer.parseInt(accountPay));//个人账户支付
//                    prescriptionPay.setHeathPay(Integer.parseInt(heathPay));//健康账户支付
//                    prescriptionPay.setCadresPay(Integer.parseInt(cadresPay));//公务员补助
//                    prescriptionPay.setFundPay(Integer.parseInt(fundPay));//基金支付
//                    prescriptionPay.setHealthCarePay(Integer.parseInt(healthCarePay));//保健基金支付
//                    prescriptionPay.setCommercePay(Integer.parseInt(commercePay));//商业保险支付
//                    prescriptionPay.setFamilyPay(Integer.parseInt(familyPay));//共济账户支付
//                    prescriptionPay.setCivilPay(Integer.parseInt(civilPay));//民政补助金额
//                    prescriptionPay.setCivilZone(civilZone);//民政行政区号
//                    prescriptionPay.setBdrugPay(Integer.parseInt(bdrugPay));//乙类支付金额
//                    prescriptionPay.setUnlessAmount(Integer.parseInt(unlessAmount));//非医保费用
//                    prescriptionPay.setExceedAmount(Integer.parseInt(exceedAmount));//超封顶线金额
//                    prescriptionPay.setAccountBalance(Integer.parseInt(accountBalance));//个人账户余额
//                    prescriptionPay.setHealthBalance(Integer.parseInt(healthBalance));//健康账户余额
//
//                    //        保存数据库更改记录
//                    payDao.save(prescriptionPay);
//                }
                logger.info("请求成功,返回参数: " + result);
            } else {
                isSuccess = false;
                error = "请求失败,返回结果:" + res.getRespCode() + "," + res.getRespMsg();
@ -1066,10 +1166,10 @@ public class PatientPrescriptionPayService extends BaseService {
        }
        //type = 3易联众接口保存http日志
        LOGGER.info("api - "+config.getChargeQueryType());
        LOGGER.info("request - "+msgBody);
        LOGGER.info("responses - "+response);
        LOGGER.info("error - "+error);
        logger.info("api - "+config.getChargeQueryType());
        logger.info("request - "+msgBody);
        logger.info("responses - "+response);
        logger.info("error - "+error);
        ZyPushLog log = new ZyPushLog();
        log.setCreateTime(new Date());

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionAdjustService.java

@ -149,7 +149,7 @@ public class PrescriptionAdjustService extends BaseService {
                            messageDao.updatePreScriptionMessage(prescription.getConsult(), "1", 6);
                            //修改系统的消息的待ca认证
                            messageDao.updatePreScriptionMessage(prescription.getCode(), 9);
//                            messageDao.updatePreScriptionMessage(prescription.getCode(), 9);
                            //获取智业待结算接口,更新药品金额
                            prescriptionService.getPerscriptionInfoCostFromPayInfo(prescription.getCode());

+ 29 - 16
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionDispensaryCodeService.java

@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.*;
/**
@ -65,7 +66,7 @@ public class PrescriptionDispensaryCodeService extends BaseService {
            }
        }
        List<Object> params = new ArrayList<>();//p2.*,p1.diagnosis as diagnosis ,p3.address as address
        String precriptionSql = "select p1.status , p1.diagnosis ,p3.address as address,p2.prescription_code as prescriptionCode,p2.code as dispensaryCode,p2.type  from wlyy_prescription_dispensary_code p2 " +
        String precriptionSql = "select p1.status , p1.diagnosis ,p3.address as address,p2.prescription_code as prescriptionCode,p2.code as dispensaryCode,p2.type,p1.create_time as createTime  from wlyy_prescription_dispensary_code p2 " +
                " left join  wlyy_prescription p1 on p2.prescription_code=p1.code LEFT JOIN wlyy_prescription_expressage p3 on p1.code=p3.prescription_code where p1.patient=? and p2.type=?  ";
        params.add(patientCode);
        params.add(type);
@ -89,9 +90,11 @@ public class PrescriptionDispensaryCodeService extends BaseService {
        precriptionSql += " limit "+(page-1)*pagesize+","+pagesize;
        List<Map<String, Object>> result = jdbcTemplate.queryForList(precriptionSql,params.toArray());
        List<Map<String, Object>> result2 = new ArrayList<>();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        for (Map<String, Object> m:result) {
            List<PrescriptionInfo> list = prescriptionInfoDao.findByPrescriptionCode(m.get("prescriptionCode").toString());
            m.put("prescriptionInfo",list);
            m.put("createTime",m.get("createTime")!=null?simpleDateFormat.format(m.get("createTime")):"");
            result2.add(m);
        }
        JSONArray array = new JSONArray(result2);
@ -114,28 +117,38 @@ public class PrescriptionDispensaryCodeService extends BaseService {
        return false;
    }
    public boolean saveQRCode(String token,String prescriptionCode) throws Exception {
    @Transactional
    public void saveQRCode(String token,String prescriptionCode) throws Exception {
        Prescription prescription = prescriptionDao.findByCode(prescriptionCode);
        //取药类型:1 自取 2快递配送 3健管师配送
        Integer type = prescription.getDispensaryType();
        PrescriptionDispensaryCode p1 = savePatientQRCode(token,prescriptionCode);
        PrescriptionDispensaryCode p1 = prescriptionDispensaryCodeDao.findByPrescriptionCodeAndIsUseAndType(prescriptionCode,0,1);
        if(p1==null){
            p1 = savePatientQRCode(token,prescriptionCode);
        }
        if(p1==null){
            throw new Exception("二维码生成失败!");
        }
        if(type==3){
            if(p1!=null){
            PrescriptionDispensaryCode p2 = prescriptionDispensaryCodeDao.findByPrescriptionCodeAndIsUseAndType(prescriptionCode,0,2);
            if(p2==null){
                PrescriptionDispensaryCode p2 = saveQRCode(p1.getCode(),token,prescriptionCode,2);
                if(p2!=null){
                    PrescriptionDispensaryCode p3 = saveQRCode(p1.getCode(),token,prescriptionCode,3);
                    if(p3==null){
                        return false;
                    }
                }else{
                    return false;
                }
            }else{
                return false;
                p2 = saveQRCode(p1.getCode(),token,prescriptionCode,2);
            }
            if(p2==null){
                throw new Exception("二维码生成失败!");
            }
            PrescriptionDispensaryCode p3 = prescriptionDispensaryCodeDao.findByPrescriptionCodeAndIsUseAndType(prescriptionCode,0,3);
            if(p3==null){
                p3 = saveQRCode(p1.getCode(),token,prescriptionCode,3);
            }
            if(p3==null){
                throw new Exception("二维码生成失败!");
            }
        }
        return true;
    }
    //生成居民端取药码

+ 0 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwPrescriptionService.java

@ -238,8 +238,6 @@ public class JwPrescriptionService {
            String errmsg = reobj.getString("msg");
            if(200 != status){
                throw new Exception("基卫接口(院内结算确认接口)请求失败,"+errmsg);
            }else{
                prescriptionDao.updatejwPayStatus(prescriptionCode);
            }
        }else{
            throw new Exception("基卫接口(院内结算确认接口)请求失败,无数据返回!");

+ 2 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionController.java

@ -53,12 +53,8 @@ public class PatientPrescriptionController extends WeixinBaseController {
            @ApiParam(required = true, name = "prescriptionCode", value = "处方code") @RequestParam(value = "prescriptionCode", required = true) String prescriptionCode) {
        try {
            boolean b = prescriptionDispensaryCodeService.saveQRCode(getAccessToken(), prescriptionCode);
            if (b) {
                return write(200, "生成二维码成功!");
            } else {
                return error(-1, "生成二维码失败!");
            }
            prescriptionDispensaryCodeService.saveQRCode(getAccessToken(), prescriptionCode);
            return write(200, "生成二维码成功!");
        } catch (Exception e) {
            error(e);
            return error(-1, "生成二维码失败!");

+ 1 - 24
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionPayController.java

@ -34,8 +34,7 @@ public class PatientPrescriptionPayController extends WeixinBaseController {
    private PrescriptionService prescriptionService;
    @Autowired
    private PrescriptionNoticesService noticesService;
    @Autowired
    private JwPrescriptionService jwPrescriptionService;
    /**
     * 患者长处方支付接口 可配送方式查询
@ -135,28 +134,6 @@ public class PatientPrescriptionPayController extends WeixinBaseController {
        }
    }
    /**
     * 长处方对接方异步回调接口
     *
     * @return
     */
    @RequestMapping(value = "/receiveRecipeNotify", method = RequestMethod.POST)
    @ApiOperation(value = "对接方异步回调接口")
    public void receiveRecipeNotify(HttpServletRequest request, HttpServletResponse response) throws Exception {
        try {
            String result = payService.receiveRecipeNotify(request, response);
            if (result!=null){
                try {
                    jwPrescriptionService.executeSickSettle(result);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {
            error(e);
        }
    }
    @RequestMapping(value = "/testJWgetPayInfo", method = RequestMethod.GET)
    @ApiOperation(value = "测试待结算接口返回信息")
    public String testJWgetPayInfo(

+ 54 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/ylzpay/ThirdPayController.java

@ -0,0 +1,54 @@
package com.yihu.wlyy.web.third.ylzpay;
import com.yihu.wlyy.service.app.prescription.PatientPrescriptionPayService;
import com.yihu.wlyy.service.third.jw.JwPrescriptionService;
import com.yihu.wlyy.web.WeixinBaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * Created by Reece on 2017/8/30/030.
 *
 * 供易联众支付类相关业务调用
 */
@RestController
@RequestMapping(value = "/third/pay")
@Api(description = "供易联众支付类相关业务调用")
public class ThirdPayController extends WeixinBaseController {
    @Autowired
    private PatientPrescriptionPayService payService;
    @Autowired
    private JwPrescriptionService jwPrescriptionService;
    /**
     * 长处方对接方异步回调接口
     *
     * @return
     */
    @RequestMapping(value = "/prescription/receiveRecipeNotify", method = RequestMethod.POST)
    @ApiOperation(value = "长处方异步回调接口")
    public void receiveRecipeNotify(HttpServletRequest request, HttpServletResponse response) throws Exception {
        try {
            String result = payService.receiveRecipeNotify(request, response);
            if (result!=null){
                try {
                    jwPrescriptionService.executeSickSettle(result);
                } catch (Exception e) {
                    error(e);
                }
            }
        } catch (Exception e) {
            error(e);
        }
    }
}