<%@ Page Language="C#" %>
<%@ Register TagPrefix="aspxform" Namespace="XFormDesigner.Framework.Web.UI" Assembly="XFormDesigner.Framework" %>
<script runat="server">

    // Insert page code here
    //

</script>
<html xmlns:xform="xmlns:xform">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
    <link href="/Oimec/Styles/css/StyleSheet.css" rel="stylesheet" type="text/css" />
    <title>BPM Form</title> <style>
    BODY {FONT-SIZE: 12px; FONT-FAMILY: verdana}
    TABLE {border-collapse: collapse; FONT-SIZE: 12px; FONT-FAMILY: verdana}
    P {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-SIZE: 12px; FONT-FAMILY: verdana}
    TD {PADDING-RIGHT: 0px; PADDING-LEFT: 2px; PADDING-BOTTOM: 0px}
    TD.NoPadding {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px}
    INPUT {HEIGHT: 20px}
    INPUT.UL {BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: #33ff33 1px solid}
    TEXTAREA {FONT-SIZE:12px}
    </style>

    <script type="text/javascript">        
        
        agent.on('beforeSubmit', function () {
            var ym = agent.Eles[document.getElementById("XTextBox7").getAttribute("xform_xele_index")].getValue();
            //XTextBox2
            var account = agent.Eles[document.getElementById("XTextBox2").getAttribute("xform_xele_index")].getValue();
            var flag = 0;

            YZSoft.Ajax.request({
                url: YZSoft.$url('Oimec/ApiServices/HRSalaryAPIHandler.ashx'),
                method: 'POST',
                async: false,
                disableCaching: true,
                params: {
                    method: 'SalaryFileRecord',
                    account: account,
                    ym: ym

                },
                success: function (response, opts) {
                    if (response.responseText) {
                        var rv = Ext.decode(response.responseText);
                        //alert(rv.Msg);                        
                        if (rv.success) {
                            if (rv.Msg == '1') {
                                flag = 1;
                            }
                            
                        }
                    }
                },
                failure: function (action) {
                    alert(action.result.Msg);
                    return false;
                }
            });
            if (flag == 1) {
                //Ext.Msg.confirm("提示", "系统里存在晚于起始年月的薪酬记录，是否继续？", function (btn) {
                //    if (btn == "yes") {
                //        return true;
                //    }
                //    else {
                //        return false;
                //    }
                //})
                if (confirm("系统里存在晚于起始年月的薪酬记录，是否继续？"))
                    return true;
                else {
                    return false;
                }
            }
        })
        

    </script>

</head>
<body>
    <form runat="server">
        <p>
        </p>
        <table width="1200" align="center" class="head" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="logo">
                    </td>
                    <td class="biaoti">
                        <asp:Label id="XLabel2" runat="server" text="单个员工调薪" valuetodisplaytext value></asp:Label></td>
                    <td class="formno">
                        <asp:Label id="XLabel93" runat="server" text="表单号：" valuetodisplaytext value></asp:Label>
                        <aspxform:XLabel id="XLabel94" runat="server" text="--系统自动生成--" XDataBind="SWMDB:DF_F_PersonalSF.FormNo" BackColor="#8AB3DF" ForeColor="White" ValueToDisplayText Value></aspxform:XLabel>
                    </td>
                </tr>
            </tbody>
        </table>
        <p>
        </p>
        <p>
        </p>
        <table width="1200" align="center" class="table">
            <tbody>
                <tr>
                    <td height="15" class="title1" colspan="4">
                        <p>
                            <asp:Label id="XLabel1" runat="server" text="用户信息" valuetodisplaytext value></asp:Label>
                        </p>
                    </td>
                </tr>
                <tr>
                    <td width="68" class="td">
                        <asp:Label id="XLabel15" runat="server" text="发起人" valuetodisplaytext value></asp:Label></td>
                    <td class="td1">
                        <aspxform:XTextBox id="XTextBox15" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.CreateUser" ValueToDisplayText width="70%" CssClass="text" backColor="#e6f1f8" ReadOnly="True" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XTextBox>
                    </td>
                    <td class="td">
                        &nbsp;<asp:Label id="XLabel8" runat="server" text="发起日期" valuetodisplaytext value></asp:Label> 
                    </td>
                    <td width="159" class="td1">
                        &nbsp;<aspxform:XDateTimePicker id="XDateTimePicker2" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.CreateDate" BorderColor="#DCDCDC" BorderWidth="1" DisplayOnly="True"></aspxform:XDateTimePicker>
                    </td>
                </tr>
            </tbody>
        </table>
        <p>
        </p>
        <p>
        </p>
        <table width="1200" align="center" class="table">
            <tbody>
                <tr>
                    <td height="15" class="title1" colspan="4">
                        <p>
                            <asp:Label id="XLabel6" runat="server" text="薪酬档案" valuetodisplaytext value></asp:Label>
                        </p>
                    </td>
                </tr>
                <tr>
                    <td width="69" height="23" class="td">
                        <p>
                            <asp:Label id="XLabel9" runat="server" text="员工" valuetodisplaytext value></asp:Label>
                            <aspxform:XDataBrowserButton id="XDataBrowserButton1" runat="server" DisplayColumns="Name:姓名,;Department:部门," XDataSource="TableName:V_SWM_PersonalSF;Filter:SupervisorUserAccount->SWMDB:DF_F_PersonalSF.CreateAccount" DataMap="UserAccount->SWMDB:DF_F_PersonalSF.Account;Name->SWMDB:DF_F_PersonalSF.Name;DepartmentID->SWMDB:DF_F_PersonalSF.Depart;BUID->SWMDB:DF_F_PersonalSF.BU;MonthlyPay->SWMDB:DF_F_PersonalSF.MonthlyPay;Type->SWMDB:DF_F_PersonalSF.Type;StarYM->SWMDB:DF_F_PersonalSF.StarYM" Width="21px"></aspxform:XDataBrowserButton>
                        </p>
                    </td>
                    <td width="272" class="td1">
                        <aspxform:XTextBox id="XTextBox1" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.Name" ValueToDisplayText width="70%" CssClass="text" backColor="#e6f1f8" ReadOnly="True" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XTextBox>
                    </td>
                    <td width="57" class="td">
                        &nbsp;<asp:Label id="XLabel10" runat="server" text="BU" valuetodisplaytext value></asp:Label> 
                    </td>
                    <td width="513" class="td1">
                        <aspxform:XTextBox id="XTextBox10" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.BU" ValueToDisplayText="TableName:DF_HR_OrgBU;FilterColumn:BUID;DisplayColumn:BUName" width="70%" CssClass="text" backColor="#e6f1f8" ReadOnly="True" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="23" class="td">
                        <asp:Label id="XLabel12" runat="server" text="部门" valuetodisplaytext value></asp:Label></td>
                    <td class="td1">
                        <aspxform:XTextBox id="XTextBox6" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.Depart" ValueToDisplayText="TableName:DF_HR_DEPARTMENTAREA;FilterColumn:DepartmentNO;DisplayColumn:DepartmentName" width="70%" CssClass="text" backColor="#e6f1f8" ReadOnly="True" BorderColor="#DCDCDC" BorderWidth="1" DataMap="DepartmentName->SWMDB:DF_F_PersonalSF.DepartName"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox9" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.DepartName" ValueToDisplayText width="70%" CssClass="text" backColor="#e6f1f8" ReadOnly="True" BorderColor="#DCDCDC" BorderWidth="1" HiddenInput="True"></aspxform:XTextBox>
                    </td>
                    <td class="td">
                        &nbsp; 
                    </td>
                    <td class="td1">
                        &nbsp; 
                    </td>
                </tr>
                <tr>
                    <td class="td">
                        <asp:Label id="XLabel11" runat="server" text="当前月薪" valuetodisplaytext value></asp:Label></td>
                    <td class="td1">
                        <aspxform:XTextBox id="XTextBox4" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.MonthlyPay" ValueToDisplayText width="70%" backColor="#E6F1F8" ReadOnly="True" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XTextBox>
                    </td>
                    <td class="td">
                        <asp:Label id="XLabel3" runat="server" text="调整后月薪总额" valuetodisplaytext value></asp:Label></td>
                    <td class="td1">
                        <aspxform:XTextBox id="XTextBox8" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.MonthlyPay_Modify" width="70%" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="23" class="td">
                        <asp:Label id="XLabel16" runat="server" text="佣金计算方式" valuetodisplaytext value></asp:Label></td>
                    <td class="td1">
                        <aspxform:XDropDownList id="XDropDownList1" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.Type" XDataSource="DataSource:SWMDB;TableName:DF_SWM_YJ_Type" Width="49%" DisplayColumn="Type" ValueColumn="Type" PromptText="- 请选择 -">
                            <asp:ListItem>未绑定</asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                    <td class="td">
                        <asp:Label id="XLabel14" runat="server" text="起始年月" valuetodisplaytext value></asp:Label></td>
                    <td class="td1">
                        <aspxform:XTextBox id="XTextBox7" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.StarYM" width="70%" BorderColor="#DCDCDC" BorderWidth="1" MaxLength="6" Format="type:number;.0"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="1200" class="title1">
                        <asp:Label id="XLabel76" runat="server" text="备注"></asp:Label></td>
                </tr>
                <tr>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox67" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.Remrak" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" Width="100%" Height="50px" TextMode="MultiLine"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <p align="center">
            <aspxform:XSignTrace id="XSignTrace1" runat="server" BorderColor="#dcdcdc" BorderWidth="1" Width="1200px"></aspxform:XSignTrace>
        </p>
        <aspxform:XTextBox id="XTextBox2" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.Account" BorderColor="#DCDCDC" BorderWidth="1" HiddenInput="True" Height="20px"></aspxform:XTextBox>
        <aspxform:XTextBox id="XTextBox3" runat="server" XDataBind="SWMDB:DF_F_PersonalSF.CreateAccount" BorderColor="#DCDCDC" BorderWidth="1" HiddenInput="True" Height="20px"></aspxform:XTextBox>
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator4" runat="server" ForeColor="Red" Display="None" ErrorMessage="请选择员工" ControlToValidate="XTextBox1">请选择员工</aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator1" runat="server" ErrorMessage="请选择佣金计算方式" ControlToValidate="XDropDownList1"></aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator id="XRequiredFieldValidator2" runat="server" ForeColor="Red" Display="None" ErrorMessage="请输入调整后月薪" ControlToValidate="XTextBox8">请输入调整后月薪</aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator id="XRequiredFieldValidator3" runat="server" ForeColor="Red" Display="None" ErrorMessage="请输入起始年月" ControlToValidate="XTextBox7">请输入起始年月</aspxform:XRequiredFieldValidator>
    </form>
</body>
</html>
