<%--
  Created by IntelliJ IDEA.
  User: llh
  Date: 2016/1/7
  Time: 14:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="utf-8"%>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>
<script >
  (function ($, win) {
      var publisher = {};
      var Util = $.Util;

      //应用标准处理
      publisher.attr = {
        _url: $("#hd_url").val(),
        $form: $("#div_publisher_info_form"),
        init: function () {
          var u = publisher.attr;
          var type = $.Util.getUrlQueryString('type');
          if(type=="modify"){//修改
            var publisherId = $.Util.getUrlQueryString('id').replace("publisher","");
            $("#publisher_id").val(publisherId);
            $.ajax({
                  url: u._url + "/standardCenter/getForPublisherId",
                  type: "get",
                  dataType: "json",
                  data: {publisherId: publisherId},
                  success: function (data) {
                    if(data.successFlg){
                        $("#lbl_name").text(data.name);
                        $("#lbl_code").text(data.code);
                        //$("#tea_description").text(data.description);
                    }else{
                      $.ligerDialog.error(data.message);
                    }

                  },
                error: function (jqXHR, textStatus, errorThrown) {
                    $.ligerDialog.error("获取发布机构信息失败！")
                }
            })
          }
          this.event();

        },
        event: function () {
          $("#btn_confirm").click(function () {
            parent.standard.list.dialog_standard_detail.close();
          });
        }
      };

      $(function(){
        publisher.attr.init();
      })

  })(jQuery, window);
</script>
