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

    // Insert page code here
    //
    
    
    // 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  type="text/javascript">

        //获取会计凭证号
        Ext.onReady(function () {
            //BPM表单号
            var bpmFormNo = document.getElementById("XLabel3").innerText;
            var voucherCode = agent.Eles[document.getElementById("XTextBox6").getAttribute("xform_xele_index")].getValue();
           // var PaySerialNum = agent.Eles[document.getElementById("XTextBox29").getAttribute("xform_xele_index")].getValue(); //批次序列号
            if (bpmFormNo != "" && voucherCode == "") {
                YZSoft.Ajax.request({
                    url: YZSoft.$url('Oimec/ApiServices/FICOAPIHandler.ashx'),
                    method: 'POST',
                    async: false,
                    disableCaching: true,
                    params: {
                        method: 'GetPaymentVoucherInfo',
                        ZBPM: bpmFormNo,
                        PaySerialNum: "001"
                    },
                    success: function (action) {
                        var data = action.result.Bean;
                        //alert(action.result.Code);
                        if (action.result.Code == 0) {
                            //alert(data[0].BELNR);
                            agent.Eles[document.getElementById("XTextBox6").getAttribute("xform_xele_index")].setValue(data[0].BELNR);
                        }
                    },
                    failure: function (action) {
                        alert(action.result.Message);
                    }
                });
            }

        });

    </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">
                        <asp:Label id="XLabel1" runat="server" text="凭证" value valuetodisplaytext></asp:Label></td>
                    <td width="400" class="formno">
                        <asp:Label id="XLabel2" runat="server" text="表单号：" value valuetodisplaytext></asp:Label>
                        <aspxform:XLabel id="XLabel3" runat="server" BackColor="#8AB3DF" XDataBind="DF_ER_Voucher.SerialNum" Text="--系统自动生成--" Value ValueToDisplayText></aspxform:XLabel>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <p>
        </p>
        <table width="1200" align="center" class="table" id="tabqutdetail" border="0" cellspacing="0" cellpadding="3" dynamicarea="2,1" menudock="Left">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="8">
                        <asp:Label id="XLabel32" runat="server" text="员工列表" value valuetodisplaytext></asp:Label></td>
                </tr>
                <tr>
                    <td width="50" class="tds">
                        <p align="center">
                            <asp:Label id="XLabel28" runat="server" text="序号"></asp:Label>
                        </p>
                    </td>
                    <td width="57" style="DISPLAY: none">
                    </td>
                    <td width="150" class="tds">
                        <div align="center"><asp:Label id="XLabel31" runat="server" text="姓名" value valuetodisplaytext></asp:Label>
                        </div>
                    </td>
                    <td width="150" class="tds">
                        <asp:Label id="Label1" runat="server" text="部门"></asp:Label></td>
                    <td width="150" class="tds">
                        <div align="center"><asp:Label id="XLabel69" runat="server" text="交通费" value valuetodisplaytext></asp:Label>
                        </div>
                    </td>
                    <td width="150" class="tds">
                        <p align="center">
                            <asp:Label id="XLabel68" runat="server" text="差旅费" value valuetodisplaytext></asp:Label>
                        </p>
                    </td>
                    <td width="150" class="tds">
                        <p align="center">
                            <asp:Label id="XLabel11" runat="server" text="宴请费 " value valuetodisplaytext></asp:Label>
                        </p>
                    </td>
                    <td width="150" class="tds">
                        <p align="center">
                            <asp:Label id="XLabel8" runat="server" text="通讯费 " value valuetodisplaytext></asp:Label>
                        </p>
                    </td>
                    <td width="250" class="tds">
                        <p align="center">
                            <asp:Label id="XLabel7" runat="server" text="合计" value valuetodisplaytext></asp:Label>
                        </p>
                    </td>
                </tr>
                <tr>
                    <td class="xjtds1">
                        <aspxform:XGridLineNo id="XGridLineNo1" runat="server" BackColor="Transparent" XDataBind="DF_QUTATION_DETAIL.LineNumber" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" BorderStyle="None" TextAlign="Center">1</aspxform:XGridLineNo>
                    </td>
                    <td width="57" style="DISPLAY: none">
                        <aspxform:XTextBox id="XTextBox7" runat="server" XDataBind="DF_ER_VoucherItem.emplyer" Value ValueToDisplayText BorderWidth="1px" BorderColor="Gainsboro" Width="80%" HiddenInput="False" Min="0" Max="0" DisableBehavior="ReadOnly" Enabled="False" HiddenExpress="1"></aspxform:XTextBox>
                        <aspxform:XDropDownList id="XDropDownList1" runat="server" HiddenExpress="1" DataMap="DisplayName->var1" XDataSource="TableName:V_BPMSysUsers;Filter:Account->DF_ER_VoucherItem.emplyer" DisplayColumn="DisplayName" ValueColumn="DisplayName">
                            <asp:ListItem>未绑定</asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                    <td class="xjtds1">
                        <aspxform:XTextBox id="XTextBox22" runat="server" XDataBind="var1" Value ValueToDisplayText BorderWidth="1px" BorderColor="Gainsboro" Width="118px" HiddenInput="False" Min="0" Max="0" DisableBehavior="ReadOnly" Enabled="False" Height="22px"></aspxform:XTextBox>
                    </td>
                    <td class="xjtds1">
                        <aspxform:XTextBox id="XTextBox9" runat="server" XDataBind="DF_ER_VoucherItem.Department" Value ValueToDisplayText BorderWidth="1px" BorderColor="Gainsboro" Width="100%" HiddenInput="False" Min="0" Max="0" DisableBehavior="ReadOnly" Enabled="False" Height="22px"></aspxform:XTextBox>
                    </td>
                    <td class="xjtds1">
                        <aspxform:XTextBox id="XTextBox1" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_VoucherItem.traffic" BorderWidth="1" BorderColor="#DCDCDC" TextAlign="Right" DisableBehavior="ReadOnly" Enabled="False" Format="type:currency;.2"></aspxform:XTextBox>
                    </td>
                    <td class="xjtds1">
                        <aspxform:XTextBox id="XTextBox2" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_VoucherItem.travel" BorderWidth="1" BorderColor="#DCDCDC" TextAlign="Right" DisableBehavior="ReadOnly" Enabled="False" Format="type:currency;.2"></aspxform:XTextBox>
                    </td>
                    <td class="xjtds1">
                        <aspxform:XTextBox id="XTextBox3" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_VoucherItem.dinner" BorderWidth="1" BorderColor="#DCDCDC" TextAlign="Right" DisableBehavior="ReadOnly" Enabled="False" Format="type:currency;.2"></aspxform:XTextBox>
                    </td>
                    <td class="xjtds1">
                        <aspxform:XTextBox id="XTextBox4" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_VoucherItem.communication" BorderWidth="1" BorderColor="#DCDCDC" TextAlign="Right" DisableBehavior="ReadOnly" Enabled="False" Format="type:currency;.2"></aspxform:XTextBox>
                    </td>
                    <td class="xjtds1">
                        <aspxform:XTextBox id="XTextBox8" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_VoucherItem.total" BorderWidth="1" BorderColor="#DCDCDC" TextAlign="Right" DisableBehavior="ReadOnly" Enabled="False" Format="type:currency;.2" Express="DF_ER_VoucherItem.communication+DF_ER_VoucherItem.dinner+DF_ER_VoucherItem.travel+DF_ER_VoucherItem.traffic"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td width="57" style="DISPLAY: none">
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td width="150" align="center" class="tds">
                        <asp:Label id="XLabel4" runat="server" text="银行费用合计" value valuetodisplaytext></asp:Label></td>
                    <td class="xjtds1">
                        <aspxform:XTextBox id="XTextBox5" style="WIDTH: 70%" runat="server" BorderWidth="1" BorderColor="#DCDCDC" TextAlign="Right" Format="type:currency;.2" Express="sum(DF_ER_VoucherItem.total)" DisableExpress="1"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td width="57" style="DISPLAY: none">
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td width="150" align="center" class="tds">
                        <asp:Label id="XLabel5" runat="server" text="会计凭证号" value valuetodisplaytext></asp:Label></td>
                    <td class="xjtds1">
                        <aspxform:XTextBox id="XTextBox6" style="WIDTH: 70%" runat="server" XDataBind="DF_ER_Voucher.ProofNum" BorderWidth="1" BorderColor="#DCDCDC" DisableExpress="1" width="100%"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <p>
        </p>
        <table width="1200" align="center" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="1200">
                        <aspxform:XExcelDataExportButton id="XExcelDataExportButton1" runat="server" Text="导出Excel" ExportTableID="tabqutdetail"></aspxform:XExcelDataExportButton>
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</body>
</html>
