123 lines
5.8 KiB
Plaintext
123 lines
5.8 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StaffPage.aspx.cs"
|
|
MasterPageFile="~/SuperMap_Client/MasterPage/v4_0/SizeBox.Master"
|
|
Inherits="SuperMap.RealEstate.Personnel.Modules.Staff.StaffPage" %>
|
|
|
|
<%@ Register Assembly="RealEstate.Web" Namespace="SuperMap.RealEstate.Web.UI.WebControls" TagPrefix="smwc" %>
|
|
<%@ Register Src="Staff.ascx" TagName="Staff" TagPrefix="uc1" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="HTMLHead" runat="server">
|
|
<style type="text/css">
|
|
.ui-widget-content {
|
|
border: 0px;
|
|
}
|
|
|
|
.ui-widget-header {
|
|
border: 0px;
|
|
border-bottom: 1px solid #d0d0d0;
|
|
background: #fff;
|
|
}
|
|
|
|
.ui-corner-bottom, .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br {
|
|
-moz-border-radius-bottomright: 0px;
|
|
-webkit-border-bottom-right-radius: 0px;
|
|
-khtml-border-bottom-right-radius: 0px;
|
|
border-bottom-right-radius: 0px;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
jQuery(document).ready(function () {
|
|
jQuery('#tabs').tabs();
|
|
});
|
|
function BindImg() {
|
|
jQuery("#imghead").attr("src", jQuery("#M_Staff1_AVATAR_ADDRESS").val() == "" ?
|
|
"img/photo_icon.png" : jQuery("#M_Staff1_AVATAR_ADDRESS").val());
|
|
}
|
|
//图片上传预览 IE是用了滤镜。
|
|
function previewImage(file) {
|
|
var MAXWIDTH = 170;
|
|
var MAXHEIGHT = 210;
|
|
var div = document.getElementById('preview');
|
|
if (file.files && file.files[0]) {
|
|
div.innerHTML = '<img id=imghead onclick=$("#previewImg").click()>';
|
|
var img = document.getElementById('imghead');
|
|
img.onload = function () {
|
|
var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);
|
|
img.width = rect.width;
|
|
img.height = rect.height;
|
|
// img.style.marginLeft = rect.left+'px';
|
|
img.style.marginTop = rect.top + 'px';
|
|
}
|
|
var reader = new FileReader();
|
|
reader.onload = function (evt) { img.src = evt.target.result; }
|
|
reader.readAsDataURL(file.files[0]);
|
|
}
|
|
else //兼容IE
|
|
{
|
|
var sFilter = 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="';
|
|
file.select();
|
|
var src = document.selection.createRange().text;
|
|
div.innerHTML = '<img id=imghead>';
|
|
var img = document.getElementById('imghead');
|
|
img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src;
|
|
var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight);
|
|
status = ('rect:' + rect.top + ',' + rect.left + ',' + rect.width + ',' + rect.height);
|
|
div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>";
|
|
}
|
|
}
|
|
function clacImgZoomParam(maxWidth, maxHeight, width, height) {
|
|
var param = { top: 0, left: 0, width: width, height: height };
|
|
if (width > maxWidth || height > maxHeight) {
|
|
rateWidth = width / maxWidth;
|
|
rateHeight = height / maxHeight;
|
|
|
|
if (rateWidth > rateHeight) {
|
|
param.width = maxWidth;
|
|
param.height = Math.round(height / rateWidth);
|
|
} else {
|
|
param.width = Math.round(width / rateHeight);
|
|
param.height = maxHeight;
|
|
}
|
|
}
|
|
param.left = Math.round((maxWidth - param.width) / 2);
|
|
param.top = Math.round((maxHeight - param.height) / 2);
|
|
return param;
|
|
}
|
|
</script>
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="B" runat="server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="B_L" runat="server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="B_R" runat="server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="T" runat="server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="T_L" runat="server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="T_R" runat="server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content8" ContentPlaceHolderID="S_T" runat="server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content9" ContentPlaceHolderID="S" runat="server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content10" ContentPlaceHolderID="S_B" runat="server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content11" ContentPlaceHolderID="M_T" runat="server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content12" ContentPlaceHolderID="M" runat="server">
|
|
<uc1:Staff ID="Staff1" runat="server" />
|
|
</asp:Content>
|
|
<asp:Content ID="Content13" ContentPlaceHolderID="M_B" runat="server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content14" ContentPlaceHolderID="F" runat="server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content15" ContentPlaceHolderID="F_L" runat="server">
|
|
<asp:Button ID="BtnAdd" runat="server" Text="添加兼职" CssClass="ButtonNew" CausesValidation="false" />
|
|
</asp:Content>
|
|
<asp:Content ID="Content16" ContentPlaceHolderID="F_R" runat="server">
|
|
<asp:Button ID="Button_Print" runat="server" Text="员工信息打印" CssClass="ButtonSave" CausesValidation="false" />
|
|
<asp:Button ID="ButtonSave" runat="server" OnClick="ButtonSave_Click" Text="保存" CssClass="ButtonSave" />
|
|
<asp:Button ID="ButtonDelete" runat="server" OnClick="ButtonDelete_Click" CausesValidation="false" Text="删除" CssClass="ButtonDelete" />
|
|
<asp:Button ID="ButtonClose" runat="server" CausesValidation="false" Text="关闭" CssClass="ButtonClose" />
|
|
</asp:Content>
|