<%@ 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">
    <link href="/Oimec/Styles/css/StyleSheet.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
    <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>
    // 数字转换成大写金额函数
function atoc(numberValue){
var numberValue=new String(Math.round(numberValue*100)); // 数字金额
var chineseValue=""; // 转换后的汉字金额
var String1 = "零壹贰叁肆伍陆柒捌玖"; // 汉字数字
var String2 = "万仟佰拾亿仟佰拾万仟佰拾元角分"; // 对应单位
var len=numberValue.length; // numberValue 的字符串长度
var Ch1; // 数字的汉语读法
var Ch2; // 数字位的汉字读法
var nZero=0; // 用来计算连续的零值的个数
var String3; // 指定位置的数值
if(len>15){
alert("超出计算范围");
return "";
}
if (numberValue==0){
chineseValue = "零元整";
return chineseValue;
}

String2 = String2.substr(String2.length-len, len); // 取出对应位数的STRING2的值
for(var i=0; i<len; i++){
String3 = parseInt(numberValue.substr(i, 1),10); // 取出需转换的某一位的值
if ( i != (len - 3) && i != (len - 7) && i != (len - 11) && i !=(len - 15) ){
if ( String3 == 0 ){
Ch1 = "";
Ch2 = "";
nZero = nZero + 1;
}
else if ( String3 != 0 && nZero != 0 ){
Ch1 = "零" + String1.substr(String3, 1);
Ch2 = String2.substr(i, 1);
nZero = 0;
}
else{
Ch1 = String1.substr(String3, 1);
Ch2 = String2.substr(i, 1);
nZero = 0;
}
}
else{ // 该位是万亿，亿，万，元位等关键位
if( String3 != 0 && nZero != 0 ){
Ch1 = "零" + String1.substr(String3, 1);
Ch2 = String2.substr(i, 1);
nZero = 0;
}
else if ( String3 != 0 && nZero == 0 ){
Ch1 = String1.substr(String3, 1);
Ch2 = String2.substr(i, 1);
nZero = 0;
}
else if( String3 == 0 && nZero >= 3 ){
Ch1 = "";
Ch2 = "";
nZero = nZero + 1;
}
else{
Ch1 = "";
Ch2 = String2.substr(i, 1);
nZero = nZero + 1;
}
if( i == (len - 11) || i == (len - 3)){ // 如果该位是亿位或元位，则必须写上
Ch2 = String2.substr(i, 1);
}
}
chineseValue = chineseValue + Ch1 + Ch2;
}

if ( String3 == 0 ){ // 最后一位（分）为0时，加上“整”
chineseValue = chineseValue + "整";
}

return chineseValue;
}
    </script>
</head>
<body>
    <form runat="server">
        <!-- Insert content here -->
        <table width="1200" align="center" class="head" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="logo">
                    </td>
                    <td width="1000" class="biaoti">
                        <aspxform:XLabel id="XLabel1" runat="server" Value ValueToDisplayText text="个人借款申请单"></aspxform:XLabel>
                    </td>
                    <td width="400" class="formno">
                        <aspxform:XLabel id="XLabel2" runat="server" Value ValueToDisplayText text="表单号："></aspxform:XLabel>
                        <aspxform:XLabel id="XLabel3" runat="server" Value ValueToDisplayText Text="--系统自动生成--" XDataBind="DF_ER_HeadTable.SerialNum"></aspxform:XLabel>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="title1" colspan="4">
                        <aspxform:XLabel id="XLabel4" runat="server" Value ValueToDisplayText text="个人信息"></aspxform:XLabel>
                    </td>
                </tr>
                <tr>
                    <td class="ts" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel5" runat="server" Value ValueToDisplayText text="姓名"></aspxform:XLabel>
                        <aspxform:XTextBox id="XTextBox12" style="DISPLAY: none" runat="server" ValueToDisplayText="TableName:V_DF_HR_BasicInfo;FilterColumn:AttendanceKakaNO;DisplayColumn:AttendanceKakaNO" XDataBind="DF_ER_HeadTable.EstablishUserAccount" BorderWidth="1" BorderColor="#DCDCDC" DataMap="Name->DF_ER_HeadTable.EstablishUser;Department->DF_ER_HeadTable.EstablishDpt;Region->DF_ER_HeadTable.Region;MobilePhone->DF_ER_HeadTable.Mobile;AttendanceKakaNO->DF_ER_HeadTable.BPMAccount;BUName->DF_ER_HeadTable.BU" Width="10px"></aspxform:XTextBox>
                    </td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox2" style="WIDTH: 70%" runat="server" ValueToDisplayText XDataBind="DF_ER_HeadTable.EstablishUser" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" Enabled="False"></aspxform:XTextBox>
                    </td>
                    <td class="ts" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel6" runat="server" Value ValueToDisplayText text="部门"></aspxform:XLabel>
                    </td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox1" style="WIDTH: 70%" runat="server" ValueToDisplayText XDataBind="DF_ER_HeadTable.EstablishDpt" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" Enabled="False"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel24" runat="server" Value ValueToDisplayText text="BU"></aspxform:XLabel>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox18" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_HeadTable.BU" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" Enabled="False"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel25" runat="server" Value ValueToDisplayText text="地区"></aspxform:XLabel>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox11" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_HeadTable.Region" BorderWidth="1" BorderColor="#DCDCDC" Enabled="False"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel29" runat="server" Value ValueToDisplayText Text="BPM账号"></aspxform:XLabel>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox19" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_HeadTable.BPMAccount" BorderWidth="1" BorderColor="#DCDCDC" Enabled="False"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel30" runat="server" Value ValueToDisplayText Text="联系电话"></aspxform:XLabel>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox20" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_HeadTable.Mobile" BorderWidth="1" BorderColor="#DCDCDC" DisableExpress="1"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="24" class="title1" colspan="4">
                        <aspxform:XLabel id="XLabel11" runat="server" Value ValueToDisplayText text="借款信息"></aspxform:XLabel>
                        <aspxform:XDataBrowserButton id="XDataBrowserButton1" runat="server" Text="选择成本中心" DataMap="CostCenter->DF_ER_HeadTable.CostCenterAccount;CostCenterName->DF_ER_HeadTable.CostCenter;CostCenterCharge->DF_ER_HeadTable.CostCenterCharge;ChargeID->DF_ER_HeadTable.ChargeID;CostCenterDisName->DF_ER_HeadTable.Company;erArea->DF_ER_HeadTable.erArea;cpyCode->DF_ER_HeadTable.cpyCode" Width="133px" HiddenExpress="Global.StepName!='开始'" DisplayColumns="CostCenter:成本中心编号;CostCenterName:成本中心名称" PopupWndWidth="-1" PopupWndHeight="-1" XDataSource="TableName:DF_ER_CostCenter" UseSubmitBehavior="False"></aspxform:XDataBrowserButton>
                    </td>
                </tr>
                <tr>
                    <td width="130" height="26" class="ts">
                        <aspxform:XLabel id="XLabel7" runat="server" Value ValueToDisplayText text="*" ForeColor="Red"></aspxform:XLabel>
                        <aspxform:XLabel id="XLabel28" runat="server" Value ValueToDisplayText text="成本中心"></aspxform:XLabel>
                    </td>
                    <td width="466" class="ts1">
                        <aspxform:XTextBox id="XTextBox4" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_HeadTable.CostCenterAccount" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" Enabled="False"></aspxform:XTextBox>
                    </td>
                    <td width="130" class="ts">
                        <aspxform:XLabel id="XLabel12" runat="server" Value ValueToDisplayText text="成本中心名称"></aspxform:XLabel>
                    </td>
                    <td width="466" class="ts1">
                        <aspxform:XTextBox id="XTextBox6" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_HeadTable.CostCenter" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" Enabled="False"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="ts">
                        <aspxform:XLabel id="XLabel17" runat="server" Value ValueToDisplayText text="成本中心负责人"></aspxform:XLabel>
                        <aspxform:XTextBox id="XTextBox17" runat="server" Value ValueToDisplayText XDataBind="DF_ER_HeadTable.ChargeID" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenExpress="1" HiddenInput="False" width="23px"></aspxform:XTextBox>
                    </td>
                    <td class="ts1">
                        <aspxform:XTextBox id="XTextBox7" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_HeadTable.CostCenterCharge" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" Enabled="False"></aspxform:XTextBox>
                    </td>
                    <td class="ts">
                        <aspxform:XLabel id="XLabel18" runat="server" Value ValueToDisplayText text="成本中心公司"></aspxform:XLabel>
                    </td>
                    <td class="ts1">
                        <aspxform:XTextBox id="XTextBox13" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_HeadTable.Company" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" Enabled="False"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="ts" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel20" runat="server" Value ValueToDisplayText text="会计凭证号"></aspxform:XLabel>
                    </td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox14" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_HeadTable.voucherCode" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" Enabled="False"></aspxform:XTextBox>
                    </td>
                    <td class="ts" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel19" runat="server" Value ValueToDisplayText text="业务范围"></aspxform:XLabel>
                    </td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox15" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_HeadTable.erArea" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" Enabled="False"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox33" runat="server" Value ValueToDisplayText XDataBind="DF_ER_HeadTable.cpyCode" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenExpress="1" HiddenInput="False" width="51px"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="ts" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel8" runat="server" Value ValueToDisplayText text="BPM系统借款总额"></aspxform:XLabel>
                        <aspxform:XDropDownList id="XDropDownList2" runat="server" DataMap="Arrears->DF_ER_BorrowMoney.LoadTotal" Width="23px" HiddenExpress="1" XDataSource="ProcedureName:DF_PROC_LoanAmt;Filter:@bpmAccount->DF_ER_HeadTable.EstablishUserAccount" DisplayColumn="Arrears" ValueColumn="Arrears">
                            <asp:ListItem>未绑定</asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox3" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_BorrowMoney.LoadTotal" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" Enabled="False" Format="type:currency;.2" TextAlign="Right"></aspxform:XTextBox>
                    </td>
                    <td class="ts" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel9" runat="server" Value ValueToDisplayText text="借款类型"></aspxform:XLabel>
                    </td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XDropDownList id="XDropDownList1" style="WIDTH: 22.5%" runat="server" XDataBind="DF_ER_BorrowMoney.LoadType">
                            <asp:ListItem>差旅</asp:ListItem>
                            <asp:ListItem>业务招待</asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel10" runat="server" Value ValueToDisplayText text="借款目的"></aspxform:XLabel>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox5" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_BorrowMoney.LoadObjective" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel13" runat="server" Value ValueToDisplayText text="币种"></aspxform:XLabel>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox8" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_BorrowMoney.Currency" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" Enabled="False">人民币</aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel14" runat="server" Value ValueToDisplayText text="*" ForeColor="Red"></aspxform:XLabel>
                        <aspxform:XLabel id="XLabel15" runat="server" Value ValueToDisplayText text="借款金额"></aspxform:XLabel>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox9" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_HeadTable.ReimbursementTotal" BorderWidth="1" BorderColor="#DCDCDC" Format="type:currency;.2" TextAlign="Right"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <aspxform:XLabel id="XLabel16" runat="server" Value ValueToDisplayText text="大写"></aspxform:XLabel>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox10" runat="server" XDataBind="DF_ER_HeadTable.ReimbursementTotalCapital" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" Enabled="False" Express="javascript('atoc',DF_ER_HeadTable.ReimbursementTotal)"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <aspxform:XRequiredFieldValidator id="成本中心非空" runat="server" Display="None" ErrorMessage="请选择成本中心" ControlToValidate="XTextBox4" ValidationGroup="a"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator id="成本中心负责人帐号不完整" runat="server" Display="None" ErrorMessage="成本中心负责人帐号不完整" ControlToValidate="XTextBox17" ValidationGroup="a"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator id="成本中心负责人信息不完整" runat="server" Display="None" ErrorMessage="成本中心负责人信息不完整" ControlToValidate="XTextBox5" ValidationGroup="a"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator id="成本中心公司信息不完整" runat="server" Display="None" ErrorMessage="成本中心公司信息不完整" ControlToValidate="XTextBox6" ValidationGroup="a"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator id="借款金额为零时不能提交" runat="server" Display="None" ErrorMessage="借款金额为零时不能提交" ControlToValidate="XTextBox9" ValidationGroup="a"></aspxform:XRequiredFieldValidator>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr class="title1">
                    <td height="14" class="ts">
                        <aspxform:XLabel id="XLabel26" runat="server" Value ValueToDisplayText text="附件"></aspxform:XLabel>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomtext">
                        <aspxform:XAttachments id="XAttachments1" runat="server" XDataBind="DF_ER_HeadTable.Attachment" width="100%" FileTypes="*.doc;*.docx;*.xls;*.xlsx" FileTypesDescription="Word,Excel"></aspxform:XAttachments>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr class="title1">
                    <td class="ts">
                        <aspxform:XLabel id="XLabel38" runat="server" Value ValueToDisplayText text="意见"></aspxform:XLabel>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomtext">
                        <aspxform:XCommentsTextBox id="XCommentsTextBox1" style="WIDTH: 100%" runat="server" BorderWidth="1" BorderColor="#DCDCDC" TextMode="MultiLine" Rows="3"></aspxform:XCommentsTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center">
            <tbody>
                <tr>
                    <td>
                        <aspxform:XProcessButtonList id="XProcessButtonList1" runat="server" PositionSelectVisible="False" SaveAsTemplateButtonVisible="False" SaveButtonVisible="False"></aspxform:XProcessButtonList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <aspxform:XSignTrace id="XSignTrace1" runat="server" BorderWidth="1" BorderColor="#dcdcdc" Width="100%"></aspxform:XSignTrace>
                    </td>
                </tr>
            </tbody>
        </table>
        <p>
        </p>
    </form>
</body>
</html>
