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

    void Page_Load(object sender, EventArgs e)
    {
        //固定费用类型
        string type = Request.QueryString["type"];
        if (!string.IsNullOrEmpty(type))
        {
            this.XTextBox4.Text = type;
            this.XDropDownList1.DisableExpress = "1";
        }
        string formstate=Request.QueryString["formstate"];
        if (!string.IsNullOrEmpty(formstate))
        {
            this.XTextBox11.Text = formstate;
        }
    
    }

</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">

       function CostCount(Account, YearMonth, Type)
       {
           if (Account != "" && YearMonth != "" && Type != "")
           {
               YZSoft.Ajax.request({
                   async: false,
                   url: YZSoft.$url('Oimec/ApiServices/HRSalaryAPIHandler.ashx'),
                   params: {
                       method: 'CostListCount',
                       Account: Account,
                       YearMonth: YearMonth,
                       Type: Type
                   },
                   success: function (action) {
                       var data = action.result;
                       agent.Eles[document.getElementById("XTextBox8").getAttribute("xform_xele_index")].setValue(data);
                   },
                   failure: function (response) {
                   }
               });

           }
       }
    </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" value valuetodisplaytext text="扣发管理"></asp:Label></td>
                    <td class="formno">
                    </td>
                </tr>
            </tbody>
        </table>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <table width="1200" align="center" class="table">
            <tbody>
                <tr>
                    <td height="15" class="title1" colspan="4">
                        <asp:Label id="XLabel1" runat="server" value valuetodisplaytext text="用户信息"></asp:Label></td>
                </tr>
                <tr>
                    <td width="68" class="td">
                        <asp:Label id="XLabel15" runat="server" value valuetodisplaytext text="操作人"></asp:Label></td>
                    <td class="td1">
                        <aspxform:XTextBox id="XTextBox15" runat="server" CssClass="text" XDataBind="SWMDB:DF_LM_AllOtherPay.CreateUser" ReadOnly="True" backColor="#e6f1f8" width="60%" BorderWidth="1" BorderColor="#DCDCDC" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td class="td">
                        &nbsp;<asp:Label id="XLabel8" runat="server" value valuetodisplaytext text="创建日期"></asp:Label> 
                    </td>
                    <td width="159" class="td1">
                        &nbsp;<aspxform:XDateTimePicker id="XDateTimePicker2" runat="server" XDataBind="SWMDB:DF_LM_AllOtherPay.CreateDate" backColor="#e6f1f8" BorderWidth="1" BorderColor="#DCDCDC" DisplayOnly="True"></aspxform:XDateTimePicker>
                    </td>
                </tr>
            </tbody>
        </table>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <table width="1200" align="center" class="table">
            <tbody>
                <tr>
                    <td height="15" class="title1" colspan="4">
                        <asp:Label id="XLabel6" runat="server" value valuetodisplaytext text="扣发明细"></asp:Label>
                        <aspxform:XTextBox id="XTextBox4" runat="server" CssClass="text" XDataBind="varInitType" width="50px" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True"></aspxform:XTextBox>
                        &nbsp;<aspxform:XTextBox id="XTextBox11" runat="server" XDataBind="formstate" width="50px" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td width="187" height="23" class="td">
                        <asp:Label id="XLabel4" runat="server" value valuetodisplaytext text="年月"></asp:Label>
                        <aspxform:XDropDownList id="XDropDownList2" runat="server" XDataBind="state1" HiddenExpress="1" ValueColumn="FormState" DisplayColumn="FormState" XDataSource="DataSource:SWMDB;TableName:V_DF_SWM_SalaryAccountApp;Filter:YearsMonth->SWMDB:DF_LM_AllOtherPay.YearMonth,state1->1"></aspxform:XDropDownList>
                    </td>
                    <td width="435" class="td1">
                        <aspxform:XTextBox id="XTextBox3" runat="server" CssClass="text" XDataBind="SWMDB:DF_LM_AllOtherPay.YearMonth" width="100px" BorderWidth="1" BorderColor="#DCDCDC" ValueToDisplayText></aspxform:XTextBox>
                        &nbsp;<asp:Label id="Label1" runat="server" text="(6位数字，例如：201801)" forecolor="Blue"></asp:Label>
                    </td>
                    <td width="57" class="td">
                    </td>
                    <td width="513" class="td1">
                    </td>
                </tr>
                <tr>
                    <td height="23" class="td">
                        <asp:Label id="XLabel3" runat="server" value valuetodisplaytext text="员工姓名"></asp:Label></td>
                    <td class="td1">
                        <aspxform:XTextBox id="XTextBox2" runat="server" CssClass="text" XDataBind="SWMDB:DF_LM_AllOtherPay.Name" ReadOnly="True" backColor="#e6f1f8" width="60%" BorderWidth="1" BorderColor="#DCDCDC" ValueToDisplayText></aspxform:XTextBox>
                        &nbsp;<aspxform:XSelectUserButton id="XSelectUserButton1" runat="server" Width="21px" DataMap="Account->SWMDB:DF_LM_AllOtherPay.Account;DisplayName->SWMDB:DF_LM_AllOtherPay.Name"></aspxform:XSelectUserButton>
                    </td>
                    <td class="td">
                        &nbsp; <asp:Label id="XLabel9" runat="server" value valuetodisplaytext text="员工ID"></asp:Label></td>
                    <td class="td1">
                        <aspxform:XTextBox id="XTextBox1" runat="server" CssClass="text" XDataBind="SWMDB:DF_LM_AllOtherPay.Account" ReadOnly="True" backColor="#e6f1f8" width="60%" BorderWidth="1" BorderColor="#DCDCDC" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
                <tr hiddenexpress="1">
                    <td height="23" class="td">
                        <asp:Label id="XLabel10" runat="server" value valuetodisplaytext text="地区" xdatabind="SWMDB:DF_LM_AllOtherPay.Area"></asp:Label></td>
                    <td class="td1">
                        <aspxform:XTextBox id="XTextBox10" runat="server" CssClass="text" XDataBind="SWMDB:DF_LM_AllOtherPay.Area" width="60%" BorderWidth="1" BorderColor="#DCDCDC" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td class="td">
                        &nbsp; <asp:Label id="XLabel12" runat="server" value valuetodisplaytext text="部门"></asp:Label></td>
                    <td class="td1">
                        <aspxform:XTextBox id="XTextBox6" runat="server" CssClass="text" XDataBind="SWMDB:DF_LM_AllOtherPay.Dept" width="60%" BorderWidth="1" BorderColor="#DCDCDC" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="30" class="td">
                        <asp:Label id="XLabel11" runat="server" value valuetodisplaytext text="费用类型"></asp:Label>
                        <aspxform:XTextBox id="XTextBox5" runat="server" width="50px" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Express="javascript('CostCount',SWMDB:DF_LM_AllOtherPay.Account,SWMDB:DF_LM_AllOtherPay.YearMonth,SWMDB:DF_LM_AllOtherPay.Type)"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox8" runat="server" width="50px" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True"></aspxform:XTextBox>
                    </td>
                    <td class="td1">
                        <aspxform:XDropDownList id="XDropDownList1" runat="server" XDataBind="SWMDB:DF_LM_AllOtherPay.Type" ValueColumn="Type" DisplayColumn="Type" XDataSource="DataSource:SWMDB;TableName:DF_LM_CostType;Filter:IsDisplay->isdisplay" Width="36%" Express="varInitType"></aspxform:XDropDownList>
                    </td>
                    <td class="td">
                        <asp:Label id="XLabel16" runat="server" value valuetodisplaytext text="金额"></asp:Label></td>
                    <td class="td1">
                        <aspxform:XTextBox id="XTextBox7" runat="server" CssClass="text" XDataBind="SWMDB:DF_LM_AllOtherPay.Amount" width="60%" BorderWidth="1" BorderColor="#DCDCDC" ValueToDisplayText Format="type:number;.2"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <p>
        </p>
        <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_LM_AllOtherPay.Remark" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" Width="100%" TextMode="MultiLine" Height="50px" PrintOut="False"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <table width="1200" align="center" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="800">
                        <p>
                            <aspxform:XLabel id="XLabel5" runat="server" text="否" XDataBind="isdisplay" ValueToDisplayText HiddenExpress="1" Value></aspxform:XLabel>
                            <aspxform:XLabel id="XLabel7" runat="server" text="扣发" XDataBind="varType" ValueToDisplayText HiddenExpress="1" Value></aspxform:XLabel>
                            <aspxform:XTextBox id="XTextBox9" runat="server" CssClass="text" XDataBind="SWMDB:DF_LM_AllOtherPay.TimeS" width="44px" BorderWidth="1px" BorderColor="Gainsboro" ValueToDisplayText Max="0" Min="0" HiddenInput="True" Value BorderStyle="Dotted"></aspxform:XTextBox>
                        </p>
                    </td>
                </tr>
            </tbody>
        </table>
        <aspxform:XRequiredFieldValidator id="xrfv2" runat="server" ControlToValidate="XTextBox3" ForeColor="Red" ErrorMessage="请输入年月！" Display="None">请输入年月！</aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRegularExpressionValidator id="XRegularExpressionValidator1" runat="server" ControlToValidate="XTextBox3" ErrorMessage="输入年月格式不正确" Display="None" ValidationExpression="\d{4}((0([1-9]))|(1(0|1|2)))">输入年月格式不正确</aspxform:XRegularExpressionValidator>
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator1" runat="server" ControlToValidate="XTextBox2" ForeColor="Red" ErrorMessage="请选择员工!" Display="None">请选择员工!</aspxform:XRequiredFieldValidator>
        <aspxform:XCompareValidator id="XCompareValidator3" runat="server" ControlToValidate="XTextBox8" ForeColor="Red" ErrorMessage="当前年月员工已有相关费用类型信息,不允许此操作！" Display="None" DisableExpress='SWMDB:DF_LM_AllOtherPay.Type=="其他扣款" || formstate!="New"' ValueToCompareExpress="0">当前年月员工已有相关费用类型信息,不允许此操作！</aspxform:XCompareValidator>
        &nbsp;<aspxform:XCompareValidator id="XCompareValidator2" runat="server" ControlToValidate="XTextBox7" ForeColor="Red" ErrorMessage="金额必须大于0" Display="None" ValueToCompareExpress="0" Operator="GreaterThan">金额必须大于0</aspxform:XCompareValidator>
        <aspxform:XCompareValidator id="XCompareValidator1" runat="server" ControlToValidate="XDropDownList2" ForeColor="Red" ErrorMessage="当前年月薪酬岗已完成数据检查,不允许此操作！" Display="None" ValueToCompareExpress="0">当前年月薪酬岗已完成工资计算,不允许此操作！</aspxform:XCompareValidator>
    </form>
</body>
</html>
