<%@ Page Language="C#" %>

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

    //userToken.Account
    private readonly string account = YZAuthHelper.LoginUserAccount;
    protected void Page_Load(object sender, EventArgs e)
    {
        string clientMethod = Request.Params["Param"];
        this.XTextBox30.Text = clientMethod;
        this.XTextBox87.Text = account;
        this.XTextBox63.Text = Request.Params["tid"];

        if (!string.IsNullOrEmpty(Request.Params["Delivery"]))
        {
            this.XTextBox30.Text = Request.Params["Delivery"];
        }
        this.XTextBox31.Text = Request.Params["VoucherNo"];
        this.XTextBox94.Text = Request.Params["FormNo"];
    }

</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;
        }

        .yz-inp-cnt {
            display: inline;
        }

        .yz-textbox {
            display: inline;
        }

        #td1 {
            border-right: #b2bcc6 1px solid;
        }
    </style>
    <script src="../../../../Oimec/Script/jquery-3.2.1.js"></script>
    <script src="../../../../Oimec/Script/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="../../../../Oimec/Script/JsBarcode.all.js"></script>
    <script type="text/javascript" src="../../../../Oimec/Script/jquery.qrcode.min.js"></script>
    <script src="../../../../Oimec/Script/html2canvas.js"></script>
    <script type="text/javascript">
        //获取开票信息
        function GetInfo() {
            var basis;
            var formType;
            var formNum;
            var taskID = agent.Eles[document.getElementById("XTextBox98").getAttribute("xform_xele_index")].getValue();
            var DeliveryNo = agent.Eles[document.getElementById("XTextBox30").getAttribute("xform_xele_index")].getValue();
            var SO = agent.Eles[document.getElementById("XTextBox31").getAttribute("xform_xele_index")].getValue();
            //判断SO号和交货单号是否都为空，为空则返回提示消息
            if ((DeliveryNo == "undefined" || DeliveryNo == null || DeliveryNo == "") && (SO == "undefined" || SO == null || SO == "")) {
                alert("请输入交货单号或者SO号！");
                return false;
            }

            YZSoft.Ajax.request({
                async: false,
                url: YZSoft.$url('Oimec/ApiServices/FICOAPIHandler.ashx'),
                params: {
                    method: 'GetInvoiceInfo',
                    DeliveryNo: DeliveryNo,
                    SO: SO,
                    outFormat: '',
                    TaskID: taskID
                },
                success: function (action) {
                    //alert("123");
                    var result = action.result;
                    var data = action.result.Value;
                    if (data != null) {
                        var count = data.TotalRows;
                        if (count > 0) {

                            var info = data.headInfo;
                            agent.Eles[document.getElementById("XTextBox26").getAttribute("xform_xele_index")].setValue(info.payerCompanyName + "/" + info.payerSAPID); //付款方名称+客户号
                            agent.Eles[document.getElementById("XTextBox27").getAttribute("xform_xele_index")].setValue(info.payerTaxNum);
                            agent.Eles[document.getElementById("XTextBox28").getAttribute("xform_xele_index")].setValue(info.payerAddr);
                            agent.Eles[document.getElementById("XTextBox29").getAttribute("xform_xele_index")].setValue(info.payerBank);
                            agent.Eles[document.getElementById("XTextBox95").getAttribute("xform_xele_index")].setValue(info.payerCompanyName);//付款方客户名称
                            agent.Eles[document.getElementById("PayerSAPID").getAttribute("xform_xele_index")].setValue(info.payerSAPID);//付款方sapid
                            XFormOnChange(agent.Eles[document.getElementById("PayerSAPID").getAttribute("xform_xele_index")]); 

                        }
                    }

                },
                failure: function (response) {

                }
            })
        }

        //冲暂估 去掉勾选则清空冲暂估类型及含税金额
        //function DelZanGuInfo(IsZANGU)
        // {
        //if(IsZANGU=='')
        // {
        //  agent.Eles[document.getElementById("XTextBox7").getAttribute("xform_xele_index")].setValue(""); //清空含税金额
        //  agent.Eles[document.getElementById("XDropDownList3").getAttribute("xform_xele_index")].setValue(""); //清空冲暂估选项
        //   }
        //}


        //根据数量计算
        function GetTotalAmount(Number, LineNumber) {
            var table = document.getElementById("changetbl");//获取table对象
            var i = LineNumber + 1;

            var UnitPrice = agent.Eles[table.rows[i].cells[11].children[0].getAttribute("xform_xele_index")].getValue(); //单价(含税)
            //var NTUnitPrice = agent.Eles[table.rows[i].cells[7].children[0].getAttribute("xform_xele_index")].getValue();//单价(不含税)
            var TaxRate = agent.Eles[table.rows[i].cells[9].children[0].getAttribute("xform_xele_index")].getValue();//税率
            var UpTotalSalesPrice = Number * UnitPrice; //含税金额
            var Tax = UpTotalSalesPrice / (1 + TaxRate / 100) * TaxRate / 100;  //税额
            //var NTUnitPrice = UpTotalSalesPrice / Number / (1 + TaxRate / 100);
            var NTUnitPrice = (Number == "0.00") ? "0.00" : UpTotalSalesPrice / Number / (1 + TaxRate / 100);
            var NTTotalSalesPrice = NTUnitPrice * Number;

            agent.Eles[table.rows[i].cells[8].children[0].getAttribute("xform_xele_index")].setValue(NTTotalSalesPrice); //金额(不含税)
            agent.Eles[table.rows[i].cells[10].children[0].getAttribute("xform_xele_index")].setValue(Tax); //税额
            agent.Eles[table.rows[i].cells[12].children[0].getAttribute("xform_xele_index")].setValue(UpTotalSalesPrice); //金额(含税)

            XFormOnChange(agent.Eles[table.rows[i].cells[8].children[0].getAttribute("xform_xele_index")]);
            XFormOnChange(agent.Eles[table.rows[i].cells[10].children[0].getAttribute("xform_xele_index")]);
            XFormOnChange(agent.Eles[document.getElementById("XTextBox43").getAttribute("xform_xele_index")]); //总金额(含税)
            XFormOnChange(agent.Eles[table.rows[i].cells[12].children[0].getAttribute("xform_xele_index")]);
        }

        //根据含税单价计算
        function GetTotalAmount1(UnitPrice, LineNumber) {
            var table = document.getElementById("changetbl");//获取table对象
            var i = LineNumber + 1;

            var Number = agent.Eles[table.rows[i].cells[6].children[0].getAttribute("xform_xele_index")].getValue(); //数量
            var TaxRate = agent.Eles[table.rows[i].cells[9].children[0].getAttribute("xform_xele_index")].getValue();
            var UpTotalSalesPrice = Number * UnitPrice; //含税金额
            var Tax = UpTotalSalesPrice / (1 + TaxRate / 100) * TaxRate / 100;
            var NTUnitPrice = UnitPrice / (1 + TaxRate / 100); //不含税单价 (公式：含税单价=不含税单价*适用税率(1+17%或13%))
            var NTTotalSalesPrice = NTUnitPrice * Number;

            agent.Eles[table.rows[i].cells[7].children[0].getAttribute("xform_xele_index")].setValue(NTUnitPrice);  //单价(不含税)
            agent.Eles[table.rows[i].cells[8].children[0].getAttribute("xform_xele_index")].setValue(NTTotalSalesPrice); //金额(不含税)
            agent.Eles[table.rows[i].cells[10].children[0].getAttribute("xform_xele_index")].setValue(Tax); //税额
            agent.Eles[table.rows[i].cells[12].children[0].getAttribute("xform_xele_index")].setValue(UpTotalSalesPrice); //金额(含税)

            XFormOnChange(agent.Eles[table.rows[i].cells[10].children[0].getAttribute("xform_xele_index")]);
            XFormOnChange(agent.Eles[table.rows[i].cells[8].children[0].getAttribute("xform_xele_index")]);
            XFormOnChange(agent.Eles[table.rows[i].cells[12].children[0].getAttribute("xform_xele_index")]);
            XFormOnChange(agent.Eles[document.getElementById("XTextBox43").getAttribute("xform_xele_index")]); //总金额(含税)
        }

        function getSendType(IsSpecial) {
            if (IsSpecial == "是") {
                $("#ext-element-101 option[value='邮寄客户']").remove();  //删除Select中Value='3'的Option
            }
            else if (IsSpecial == "否") { $("#ext-element-101").append("<option value='邮寄客户'>邮寄客户</option>"); }
        }

        Ext.onReady(function () {

            var r = $("input[name='XRadioButtonList3']:checked").val();
            if (r == "03形式发票" || r == "05客户不需纸质发票") {
                $('input[name="XButton3"]').hide();
            } else {

            }

            //当流程状态
            var ZhuangTai = agent.Eles[document.getElementById("XTextBox86").getAttribute("xform_xele_index")].getValue();

            if (ZhuangTai == "北京税务发票岗打印并邮寄发票" || ZhuangTai == "上海税务发票岗打印并邮寄发票" || ZhuangTai == "深圳税务发票岗打印并邮寄发票" || ZhuangTai == "博德税务发票岗打印并邮寄发票") {
                var chk = document.getElementsByName("XCheckBox3");
                if (chk.checked == false) //需更改发票明细未选中 检查发票明细是否含有 质保金 字样
                {
                    var table = document.getElementById("ytable");//获取原发票明细table对象
                    for (var i = 2; i < table.rows.length - 1; i++) {    //遍历Table的所有Row
                        var GoodsName = agent.Eles[table.rows[i].cells[3].children[0].getAttribute("xform_xele_index")].getValue();
                        var GoodsModel = agent.Eles[table.rows[i].cells[4].children[0].getAttribute("xform_xele_index")].getValue();
                        var GoodsPrice = agent.Eles[table.rows[i].cells[8].children[0].getAttribute("xform_xele_index")].getValue();
                        //货物名称 货物型号
                        if (GoodsName != "") {
                            if (GoodsName.indexOf("质保金") != -1) {
                                Ext.Msg.alert("提示", "注意有“质保金”字样！");
                            }
                        }
                        if (GoodsModel != "") {
                            if (GoodsName.indexOf("质保金") != -1) {
                                Ext.Msg.alert("提示", "注意有“质保金”字样！");
                            }
                        }
                        if (GoodsPrice < 0) {
                            Ext.Msg.alert("提示", "注意发票明细有折扣！");
                        }
                    }
                }
                else {
                    var table = document.getElementById("changetbl");//获取更改后发票明细table对象
                    for (var i = 2; i < table.rows.length - 1; i++) {    //遍历Table的所有Row
                        var GoodsName = agent.Eles[table.rows[i].cells[3].children[0].getAttribute("xform_xele_index")].getValue();
                        var GoodsModel = agent.Eles[table.rows[i].cells[4].children[0].getAttribute("xform_xele_index")].getValue();
                        var GoodsPrice = agent.Eles[table.rows[i].cells[8].children[0].getAttribute("xform_xele_index")].getValue();
                        //货物名称 货物型号
                        if (GoodsName != "") {
                            if (GoodsName.indexOf("质保金") != -1) {
                                Ext.Msg.alert("提示", "注意有“质保金”字样！");
                            }
                        }
                        if (GoodsModel != "") {
                            if (GoodsName.indexOf("质保金") != -1) {
                                Ext.Msg.alert("提示", "注意有“质保金”字样！");
                            }
                        }
                        if (GoodsPrice < 0) {
                            Ext.Msg.alert("提示", "注意发票明细有折扣！");
                        }
                    }
                }
            }



        });

        //检查发票推送信息
        function checkInvoicePushInfo() {
            var pushEmail = agent.Eles[document.getElementById("pushEmail").getAttribute("xform_xele_index")].getValue();
            var pushPhone = agent.Eles[document.getElementById("pushPhone").getAttribute("xform_xele_index")].getValue();
            if (pushEmail.length == 0 && pushPhone.length == 0) {
                Ext.Msg.alert("提示", "请填写电子发票推送邮箱或手机号！");
                return false;
            }

            if (pushEmail.length > 0) {
                //检查邮箱格式
                reg = /^([a-zA-Z0-9]+[_|\-|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\-|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/gi;
                if (!reg.test(pushEmail)) {
                    Ext.Msg.alert("提示", "电子发票推送邮箱格式不正确！");
                    return false;
                }
            }

            if (pushPhone.length > 0) {
                //检查电话号格式
                pushPhone = pushPhone.trim();
                if (pushPhone.length > 0 && pushPhone.length != 11) {
                    Ext.Msg.alert("提示", "电子发票推送手机号必须是11位！");
                    return false;
                }
            }
            return true;
        }

        //获取付款信息
        function getFKInfo(InvoiceType, payerSAPID, value) {
            var ZhuangTai = agent.Eles[document.getElementById("XTextBox86").getAttribute("xform_xele_index")].getValue();

            if (ZhuangTai == "申请人发起发票申请") {
                if (payerSAPID.indexOf("1036401") != -1) //一次性客户
                {
                    if (InvoiceType == "02增值税普通发票") {
                        return null;
                    }
                }
            }
            return value;
        }


        //付款信息失效表达式
        function FKInfoDisable(InvoiceType, payerSAPID) {

            var ZhuangTai = agent.Eles[document.getElementById("XTextBox86").getAttribute("xform_xele_index")].getValue();
            if (ZhuangTai == "申请人发起发票申请") {
                if (payerSAPID.indexOf("1036401") != -1) //一次性客户
                {
                    if (InvoiceType == "02增值税普通发票") {
                        return false;
                    }
                }
            }
            return true;
        }

        //表单提交时
        agent.on('beforeSubmit', function (actname1, actname) {
            //当流程状态
            var ZhuangTai = agent.Eles[document.getElementById("XTextBox86").getAttribute("xform_xele_index")].getValue();

            if (ZhuangTai == "北京税务发票岗打印并邮寄发票" && actname == "完成") {

                //开具发票并推送
                var r = $("input[name='XRadioButtonList3']:checked").val();
                if (r == "02增值税普通发票") {
                    var vres = InvoiceOpenAndGenerate();
                    if (!vres)
                        return false;
                }

            }

            var rb = $("input[name='XRadioButtonList3']:checked").val();

            //"申请人发起发票申请"节点
            if (ZhuangTai == "申请人发起发票申请" && actname == "提交") {


                //一次性客户控制
                var payerSAPID = agent.Eles[document.getElementById("PayerSAPID").getAttribute("xform_xele_index")].getValue(); //付款方SAPID
                if (payerSAPID.indexOf("1036401") != -1) //一次性客户
                {
                    if (rb == "01增值税专用发票") {
                        Ext.Msg.alert("提示", "公司财务规定：一次性客户不能开具增值税专用发票，请申请SAP客户主数据。");
                        return false;
                    }
                }

                var appaccount = agent.Eles[document.getElementById("XTextBox154").getAttribute("xform_xele_index")].getValue();
                var salesid = agent.Eles[document.getElementById("XTextBox35").getAttribute("xform_xele_index")].getValue();
                //申请人是业务员且发票类型为增值税普通发票时推送信息必填验证
                if (rb == "02增值税普通发票" && appaccount == salesid) {

                    //整单金额为0或整单冲暂估 不验证
                    if ((XChecked("XCheckBox2") == true && XChecked("XCheckBox3") == false && agent.Eles[document.getElementById("XTextBox44").getAttribute("xform_xele_index")].getValue() == agent.Eles[document.getElementById("XTextBox74").getAttribute("xform_xele_index")].getValue())
                        || XChecked("XCheckBox2") == false && agent.Eles[document.getElementById("XTextBox44").getAttribute("xform_xele_index")].getValue() == 0
                        || XChecked("XCheckBox3") == true && agent.Eles[document.getElementById("XTextBox43").getAttribute("xform_xele_index")].getValue() == 0) { }
                    else
                    {
                        var res_push = checkInvoicePushInfo();
                        if (!res_push) return false;
                    }
                }

                //若未勾选更改发票明细，判断金额是否大于冲暂估金额
                var chk3 = XChecked("XCheckBox3"); //勾选更改发票明细
                var chk2 = XChecked("XCheckBox2"); //冲暂估
                if (chk2 == true && chk3 == false) //冲暂估且未勾选更改发票明细
                {
                    var total = agent.Eles[document.getElementById("XTextBox44").getAttribute("xform_xele_index")].getValue();
                    var CZGtotal = agent.Eles[document.getElementById("XTextBox74").getAttribute("xform_xele_index")].getValue();
                    if (CZGtotal > 0) {
                        if (total > CZGtotal) {
                            Ext.Msg.alert("提示", "本次冲暂估金额不等于含税总金额，请勾选需更改发票明细！");
                            return false;
                        }
                    }

                }

                //发票类型为"增值税专用发票"时，判断付款方税号是否是18位
                if (rb == "01增值税专用发票") {
                    var SH = agent.Eles[document.getElementById("XTextBox27").getAttribute("xform_xele_index")].getValue();
                    if (SH.length > 0 && SH.length != 18) {
                        Ext.Msg.alert("提示", "付款方税号必须为18位！");
                        return false;
                    }
                }


                //检查原发票明细信息里的税率，必须一样才能提交，若不一样则提示：同一申请单所有行项目的税率必须相同！
                var table = document.getElementById("ytable");//获取原发票明细table对象
                var TaxRate;
                for (var i = 2; i < table.rows.length - 1; i++) {    //遍历Table的所有Row
                    var rate = agent.Eles[table.rows[i].cells[9].children[0].getAttribute("xform_xele_index")].getValue();
                    if (i == 2) { TaxRate = rate; }
                    if (TaxRate != rate) {
                        Ext.Msg.alert("提示", "同一申请单所有行项目的税率必须相同！");
                        return false;
                    }

                }

                var DeliveryNo = agent.Eles[document.getElementById("XTextBox30").getAttribute("xform_xele_index")].getValue();
                var SO = agent.Eles[document.getElementById("XTextBox31").getAttribute("xform_xele_index")].getValue();
                //判断SO号和交货单号是否都为空，为空则返回提示消息
                if ((DeliveryNo == "undefined" || DeliveryNo == null || DeliveryNo == "") && (SO == "undefined" || SO == null || SO == "")) {
                    Ext.Msg.alert("提示", "请输入交货单号或者SO号！");
                    return false;
                }
                //判断SAP交货单号是否有重复
                if (DeliveryNo != "") {
                    var str = DeliveryNo;
                    var arr = new Array(); //定义一数组
                    arr = str.split("/"); //字符分割
                    var hash = {};
                    for (var i in arr) {
                        if (hash[arr[i]]) //hash 哈希
                        {
                            Ext.Msg.alert("提示", "SAP交货单号有重复,请检查数据！");
                            return false;
                        }
                        hash[arr[i]] = true;
                    }
                }
                //判断合开SAP-SO号是否有重复
                if (SO != "") {
                    var str = SO;
                    var arr = new Array(); //定义一数组
                    arr = str.split("/"); //字符分割
                    var hash = {};
                    for (var i in arr) {
                        if (hash[arr[i]]) //hash 哈希
                        {
                            Ext.Msg.alert("提示", "合开SAP-SO号有重复,请检查数据！");
                            return false;
                        }
                        hash[arr[i]] = true;
                    }
                }


            }


            //“业务员确认开票信息”节点
            if (ZhuangTai == "业务员确认开票信息" && actname == "确认开票信息") {

                //"有发票邮寄特殊要求" 选择是，则 寄票方式不能选择 "邮寄客户"
                var res = $("input[name='XRadioButtonList1']:checked").val();
                var InvoiceSendType = agent.Eles[document.getElementById("XDropDownList4").getAttribute("xform_xele_index")].getValue();
                if (res == "是" && InvoiceSendType == "邮寄客户") {
                    Ext.Msg.alert("提示", "有发票邮寄特殊要求选择是，寄票方式不能选择邮寄客户");
                    return false;
                }

                //手机号和电话是二选一必填，若手机号不为空，则判断是否是11位
                var InvoiceSendType = agent.Eles[document.getElementById("XDropDownList4").getAttribute("xform_xele_index")].getValue();
                var mobile = agent.Eles[document.getElementById("XTextBox57").getAttribute("xform_xele_index")].getValue();//手机
                if (InvoiceSendType == "邮寄客户" || InvoiceSendType == "邮寄分支机构") {
                    mobile = mobile.trim();
                    if (mobile.length > 0 && mobile.length != 11) {
                        Ext.Msg.alert("提示", "手机号必须是11位！");
                        return false;
                    }
                }

                //【业务员确认开票信息时】且发票类型为"增值税普通发票"时填写
                if (rb == "02增值税普通发票") {
                    //整单金额为0或整单冲暂估 不验证
                    if ((XChecked("XCheckBox2") == true && XChecked("XCheckBox3") == false && agent.Eles[document.getElementById("XTextBox44").getAttribute("xform_xele_index")].getValue() == agent.Eles[document.getElementById("XTextBox74").getAttribute("xform_xele_index")].getValue())
                        || XChecked("XCheckBox2") == false && agent.Eles[document.getElementById("XTextBox44").getAttribute("xform_xele_index")].getValue() == 0
                        || XChecked("XCheckBox3") == true && agent.Eles[document.getElementById("XTextBox43").getAttribute("xform_xele_index")].getValue() == 0) { }
                    else
                    {
                        var res_push = checkInvoicePushInfo();
                        if (!res_push) return false;
                    }
                }


            }

        });


        //生成金税文本
        function GenerateTXT() {

            //tid
            var tid = agent.Eles[document.getElementById("XTextBox63").getAttribute("xform_xele_index")].getValue();// 需更改发票明细

            var url = YZSoft.$url('Oimec/ApiServices/FICOAPIHandler.ashx');
            YZSoft.src.ux.File.download(url, {
                method: 'GenerateTXT',
                tid: tid
            });

        }

        //发票开具&生成
        function InvoiceOpenAndGenerate() {

            var res = true;
            var tid = agent.Eles[document.getElementById("XTextBox63").getAttribute("xform_xele_index")].getValue();// 需更改发票明细

            var url = YZSoft.$url('Oimec/ApiServices/FICOAPIHandler.ashx');


            //1000公司 增值税发票打印过则提示
            var companyCode = agent.Eles[document.getElementById("XTextBox9").getAttribute("xform_xele_index")].getValue();
            var r = $("input[name='XRadioButtonList3']:checked").val();
            var FormNo = agent.Eles[document.getElementById("FormNo").getAttribute("xform_xele_index")].getValue();

            if (companyCode == "1000" && r == "01增值税专用发票") {
                YZSoft.Ajax.request({
                    async: false,
                    url: url,
                    params: {
                        method: 'CheckIsInvouceOpen',
                        formNo: FormNo
                    },
                    success: function (action) {
                        var result = action.result;
                        if (result > 0)
                        { alert("已经打印过发票！"); res = false; }
                    },
                    failure: function (response) {

                    }
                });
            }

            if (res != false) {

                YZSoft.Ajax.request({
                    async: false,
                    url: url,
                    params: {
                        method: 'InvoiceOpenAndGenerate',
                        tid: tid
                    },
                    success: function (action) {
                        var result = action.result;
                        if (result != null) {
                            if (result.Code == 1) {
                                alert(result.Message);
                                res = false;
                            }
                            else { alert("开具发票成功"); res = true; }
                        }
                        //alert(result);
                    },
                    failure: function (response) {
                    }

                });
            }
            return res;
        }


        //开具并打印发票 隐藏表达式
        function InvocieOpen_HiddenExpress(laccount, StepName, InvoiceType) {

            if (InvoiceType != "01增值税专用发票") {
                return true;
            }
            else {
                if (laccount != "admin" && laccount != "bpmadmin") {
                    if (StepName == "北京税务发票岗打印并邮寄发票")
                    { return false; }
                    else
                        return true;
                }
                return false;
            }

        }


        //快递打印按钮 隐藏表达式
        function PrintWaybill_HiddenExpress(laccount, StepName, InvoiceType, InvoiceSendType) {

            if (StepName == "北京税务发票岗打印并邮寄发票" && InvoiceType == "02增值税普通发票")
                return true;

            if ((laccount != "bpmadmin" && laccount != "admin" && StepName != "北京税务发票岗打印并邮寄发票"
                && StepName != "上海税务发票岗打印并邮寄发票" && StepName != "深圳税务发票岗打印并邮寄发票"
                && StepName != "博德税务发票岗打印并邮寄发票") || InvoiceSendType == "自取")
                return true;

            return false;
        }

        //遍历行项目
        function GetInfoFromTable(tableid) {
            var tableInfo = "";
            var tableObj = document.getElementById(tableid);
            var arr = [];
            for (var i = 2; i < tableObj.rows.length - 1; i++) {    //遍历Table的所有Row
                tableInfo = "";
                var obj = {};
                for (var j = 0; j < tableObj.rows[i].cells.length - 1; j++) {   //遍历Row中的每一列

                    if (tableObj.rows[i].cells[j + 1].getElementsByTagName("input").length) {
                        tableInfo += tableObj.rows[i].cells[j + 1].getElementsByTagName("input")[0].value + "||";   //获取Table中单元格的内容

                    }

                }
                var productNo;
                var radio1 = XChecked("XCheckBox3");
                if (radio1) {
                    productNo = agent.Eles[tableObj.rows[i].cells[3].children[1].getAttribute("xform_xele_index")].getValue() + "||";
                    productNo += agent.Eles[tableObj.rows[i].cells[13].children[0].getAttribute("xform_xele_index")].getValue() + "||";
                } else {
                    productNo = agent.Eles[tableObj.rows[i].cells[3].children[1].getAttribute("xform_xele_index")].getValue() + "||";
                }


                tableInfo += productNo;
                //var str = tableInfo.substring(0, tableInfo.length - 2)
                arr.push(tableInfo);
            }
            // console.log(arr);
            return arr;
        }

        //判断是否选中
        function XChecked(name) {
            var inputs = document.getElementsByTagName("input");
            for (var i = 0; i < inputs.length; i++) {
                var a = document.getElementsByName(name);
                if (inputs[i].name == name) {
                    return inputs[i].checked;
                }
            }
        }

        function s(radio) {

            for (var i = 0; i < radio.length; i++) {
                if (radio[i].checked == true) {

                    var r = radio[i].value;


                }
            }

        }
    </script>
    <script type="text/javascript">
        //打印快递单
        function Print_Waybill() {
            //参数：收方公司名称、收方联系人、电话、手机、地址、邮编
            var obj_param = {};
            obj_param["d_company"] = agent.Eles[document.getElementById("XTextBox1").getAttribute("xform_xele_index")].getValue();
            obj_param["d_contact"] = agent.Eles[document.getElementById("XTextBox3").getAttribute("xform_xele_index")].getValue();
            obj_param["d_address"] = agent.Eles[document.getElementById("XTextBox5").getAttribute("xform_xele_index")].getValue();
            obj_param["d_tel"] = agent.Eles[document.getElementById("XTextBox4").getAttribute("xform_xele_index")].getValue();
            if (checkPhone(agent.Eles[document.getElementById("XTextBox57").getAttribute("xform_xele_index")].getValue().trim())) {
                obj_param["d_mobile"] = agent.Eles[document.getElementById("XTextBox57").getAttribute("xform_xele_index")].getValue().trim();
            }
            else
                obj_param["d_mobile"] = "";
            obj_param["logistics"] = "1";//1顺丰 2跨越
            obj_param["printType"] = "02";//2 两联单；3三联单
            obj_param["j_province"] = "";
            obj_param["j_city"] = "";
            obj_param["d_province"] = "";
            obj_param["d_city"] = "";

            //签回单:1要求 其它为不要求
            obj_param["need_return_tracking_no"] = "";

            //备注信息

            //发票备注
            obj_param["remark"] = "发票;" + agent.Eles[document.getElementById("InvoiceRemarks").getAttribute("xform_xele_index")].getValue();

            //包裹数
            obj_param["PackNumber"] = "1";

            //月结类型：财务，物流
            obj_param["YJType"] = "财务";
            //运单打印
            WaybillOrder(obj_param);
        }
        function checkPhone(phone) {
            //if (!(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/.test(phone))) {
            if (!(/^1[3456789]\d{9}$/.test(phone))) {
                //alert("手机号码有误，请重填");
                return false;
            }
            else
                return true;
        }

    </script>
</head>
<body>
    <form runat="server" id="form1">
        <div id="div_print" style="display: none">
        </div>
        <table width="1200" align="center" class="head" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="logo"></td>
                    <td class="biaoti">
                        <aspxform:XTextBox ID="XTextBox63" runat="server" XDataBind="laccount" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="100px"></aspxform:XTextBox>
                        <asp:Label ID="XLabel1" runat="server" Text="销售发票申请单"></asp:Label></td>
                    <td class="formno">
                        <aspxform:XPrintButton ID="XPrintButton1" Style="cursor: pointer" runat="server" Height="25px" Orientation="Horizontal"></aspxform:XPrintButton>
                        <asp:Label ID="XLabel2" runat="server" Text="表单号:"></asp:Label>
                        <aspxform:XLabel ID="FormNo" runat="server" XDataBind="DF_FI_InvoiceApp_Info.FormNo" Text="----系统自动生成----" BackColor="#8AB3DF"></aspxform:XLabel>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1199" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="30" colspan="2">
                        <asp:Label ID="XLabel68" runat="server" Text="标记 * 的为申请人必填项" ForeColor="Red" Font-Bold="true"></asp:Label>&nbsp;<asp:Label ID="XLabel81" runat="server" Text="标记 * 的为业务员必填项" ForeColor="Blue" Font-Bold="true"></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<aspxform:XTextBox ID="XTextBox86" runat="server" XDataBind="Global.StepName" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100px"></aspxform:XTextBox>
                        <aspxform:XTextBox ID="XTextBox87" runat="server" XDataBind="laccount" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100px"></aspxform:XTextBox>
                        <aspxform:XTextBox ID="XTextBox98" runat="server" XDataBind="DF_FI_InvoiceApp_Info.TaskID" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100px"></aspxform:XTextBox>
                        &nbsp;<aspxform:XTextBox ID="XTextBox96" runat="server" XDataBind="DF_FI_InvoiceApp_Info.YJGSdate" BorderWidth="1" BorderColor="#DCDCDC" Width="50px" HiddenExpress="1"></aspxform:XTextBox>
                        <aspxform:XTextBox ID="DistributionChannels" runat="server" XDataBind="DF_FI_InvoiceApp_Info.DistributionChannels" BorderWidth="1" BorderColor="#DCDCDC" Width="50px" HiddenExpress="1"></aspxform:XTextBox>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                    </td>
                    <td align="right" colspan="2">
                        <aspxform:XButton ID="XButton3" runat="server" Text=" 导出金税文本" HiddenExpress=' laccount!="bpmadmin" &amp;&amp;  laccount!="admin"  &amp;&amp;  Global.StepName!="上海税务发票岗打印并邮寄发票" &amp;&amp; Global.StepName!="深圳税务发票岗打印并邮寄发票" &amp;&amp; Global.StepName!="博德税务发票岗打印并邮寄发票"' OnClientClick="GenerateTXT()"></aspxform:XButton>
                        <aspxform:XButton ID="XButton2" runat="server" Height="25px" Text=" 开具并打印发票" HiddenExpress="javascript('InvocieOpen_HiddenExpress',laccount,Global.StepName,DF_FI_InvoiceApp_Info.InvoiceType)" OnClientClick="InvoiceOpenAndGenerate()"></aspxform:XButton>
                        <%--<aspxform:XButton id="XButton1" runat="server" Text=" 打印快递单" Height="25px" HiddenExpress='(laccount!="bpmadmin"  || DF_FI_InvoiceApp_Info.InvoiceSendType=="自取") &amp;&amp; ( laccount!="admin"  || DF_FI_InvoiceApp_Info.InvoiceSendType=="自取")  &amp;&amp; (Global.StepName!="北京税务发票岗打印并邮寄发票" || DF_FI_InvoiceApp_Info.InvoiceSendType=="自取")&amp;&amp; (Global.StepName!="上海税务发票岗打印并邮寄发票" || DF_FI_InvoiceApp_Info.InvoiceSendType=="自取") &amp;&amp; (Global.StepName!="深圳税务发票岗打印并邮寄发票" || DF_FI_InvoiceApp_Info.InvoiceSendType=="自取") &amp;&amp; (Global.StepName!="博德税务发票岗打印并邮寄发票" || DF_FI_InvoiceApp_Info.InvoiceSendType=="自取")' OnClientClick="Print_Waybill()"></aspxform:XButton>--%>
                        <aspxform:XButton ID="XButton1" runat="server" Height="25px" Text=" 打印快递单" HiddenExpress="javascript('PrintWaybill_HiddenExpress',laccount,Global.StepName,DF_FI_InvoiceApp_Info.InvoiceType,DF_FI_InvoiceApp_Info.InvoiceSendType)" OnClientClick="Print_Waybill()"></aspxform:XButton>
                    </td>
                </tr>
                <tr>
                    <td height="14" class="title1" colspan="4">
                        <asp:Label ID="XLabel19" runat="server" Text="基本信息"></asp:Label>
                        <aspxform:XTextBox ID="XTextBox47" runat="server" XDataBind="DF_FI_InvoiceApp_Info.ProductLine" BorderWidth="1" BorderColor="#DCDCDC" Width="50px" HiddenExpress="1"></aspxform:XTextBox>
                        <aspxform:XTextBox ID="XTextBox48" runat="server" XDataBind="DF_FI_InvoiceApp_Info.SalesOrg" BorderWidth="1" BorderColor="#DCDCDC" Width="50px" HiddenExpress="1"></aspxform:XTextBox>
                        <aspxform:XTextBox ID="XTextBox49" runat="server" XDataBind="DF_FI_InvoiceApp_Info.SalesOffice" BorderWidth="1" BorderColor="#DCDCDC" Width="50px" HiddenExpress="1"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="22" class="ts" style="width: 10%">
                        <asp:Label ID="XLabel24" runat="server" Text="创建用户"></asp:Label>
                        <aspxform:XTextBox ID="XTextBox154" runat="server" XDataBind="DF_FI_InvoiceApp_Info.AppAccount" BorderWidth="1" BorderColor="#DCDCDC" Width="10px" HiddenExpress="1"></aspxform:XTextBox>
                    </td>
                    <td class="ts1" style="width: 35%">
                        <aspxform:XTextBox ID="XTextBox38" Style="width: 70%" runat="server" XDataBind="DF_FI_InvoiceApp_Info.AppName" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                    </td>
                    <td class="ts" style="width: 10%">
                        <asp:Label ID="XLabel25" runat="server" Text="创建日期"></asp:Label></td>
                    <td class="ts1" style="width: 35%">
                        <aspxform:XDateTimePicker ID="XDateTimePicker2" Style="width: 50%" runat="server" XDataBind="DF_FI_InvoiceApp_Info.CreateDate" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XDateTimePicker>
                    </td>
                </tr>
                <tr>
                    <td height="22" class="ts">
                        <asp:Label ID="XLabel42" runat="server" Text="业务员"></asp:Label>
                        <aspxform:XTextBox ID="XTextBox35" runat="server" XDataBind="DF_FI_InvoiceApp_Info.SalesManID" BorderWidth="1" BorderColor="#DCDCDC" Width="20%" HiddenExpress="1"></aspxform:XTextBox>
                        <aspxform:XTextBox ID="XTextBox56" runat="server" XDataBind="varSapId" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="20%" DataMap="StaffID->DF_FI_InvoiceApp_Info.SalesManID;StaffName->DF_FI_InvoiceApp_Info.SalesManName;ProductLine->BU;Region->DF_FI_InvoiceApp_Info.District" ValueToDisplayText="TableName:DF_SA_SS_SalesPersonnel;FilterColumn:StaffSAPNumber;DisplayColumn:StaffSAPNumber"></aspxform:XTextBox>
                    </td>
                    <td class="ts1">
                        <aspxform:XTextBox ID="XTextBox40" Style="width: 70%" runat="server" XDataBind="DF_FI_InvoiceApp_Info.SalesManName" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td class="ts"></td>
                    <td class="ts1"></td>
                </tr>
                <tr>
                    <td height="23" class="tsbottomlabel">
                        <asp:Label ID="XLabel44" runat="server" Text="事业部"></asp:Label>
                        <aspxform:XDropDownList ID="XDropDownList34" runat="server" HiddenExpress="1" DataMap="Name->DF_FI_InvoiceApp_Info.BU" XDataSource="TableName:V_DF_SA_SS_ProductLine;Filter:Value->BU" DisplayColumn="Value" ValueColumn="Name">
                            <asp:ListItem>未绑定</asp:ListItem>
                        </aspxform:XDropDownList>
                        <aspxform:XTextBox ID="XTextBox128" runat="server" XDataBind="BU" BorderWidth="1" BorderColor="#DCDCDC" Width="20px" HiddenExpress="1"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox ID="XTextBox42" Style="width: 70%" runat="server" XDataBind="DF_FI_InvoiceApp_Info.BU" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel">
                        <asp:Label ID="XLabel45" runat="server" Text="所属地区"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox ID="XTextBox41" Style="width: 70%" runat="server" XDataBind="DF_FI_InvoiceApp_Info.District" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="23" class="tsbottomlabel">
                        <asp:Label ID="XLabel43" runat="server" Text="公司代码"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox ID="XTextBox9" Style="width: 70%" runat="server" XDataBind="DF_FI_InvoiceApp_Info.CompanyCode" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td height="23" class="tsbottomlabel">
                        <asp:Label ID="XLabel46" runat="server" Text="SO币种"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox ID="XTextBox17" Style="width: 70%" runat="server" XDataBind="DF_FI_InvoiceApp_Info.Currency" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" DataMap="ExchangeRate->DF_FI_InvoiceApp_Info.ExchangeRate" ValueToDisplayText="TableName:DF_SA_SS_ExchangeRate;FilterColumn:ForeignCurrency;DisplayColumn:ForeignCurrency"></aspxform:XTextBox>
                        <aspxform:XTextBox ID="XTextBox46" runat="server" XDataBind="DF_FI_InvoiceApp_Info.ExchangeRate" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="30px" Format="type:number;.4"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label ID="XLabel4" runat="server" Text="出具发票依据："></asp:Label></td>
                    <td align="left" class="ts"></td>
                    <td class="tsbottomtext" colspan="2">&nbsp;<aspxform:XCustomBrowserButton ID="XCustomBrowserButton1" runat="server" Width="166px" XClass="Oimec.Dialogs.GetInvoiceInfoButton" Height="23px" Text="获取SAP-SO&amp;交货单信息" DisableExpress="Global.StepName!='申请人发起发票申请'" DataMap="GoodsName->DF_FI_InvoiceApp_Detail1.GoodsName;GoodsModel->DF_FI_InvoiceApp_Detail1.GoodsModel;Unit->DF_FI_InvoiceApp_Detail1.GoodsUnit;Number->DF_FI_InvoiceApp_Detail1.GoodsNumber;NTUnitPrice->DF_FI_InvoiceApp_Detail1.NTUnitPrice;NTTotalPrice->DF_FI_InvoiceApp_Detail1.NTTotalSalesPrice;TaxRate->DF_FI_InvoiceApp_Detail1.TaxRate;Tax->DF_FI_InvoiceApp_Detail1.TaxAmout;UnitPrice->DF_FI_InvoiceApp_Detail1.UnitPrice;TotalPrice->DF_FI_InvoiceApp_Detail1.TotalSalesPrice;LineItemNumber->DF_FI_InvoiceApp_Detail1.LineItemNumber;VoucherNum->DF_FI_InvoiceApp_Detail1.OrderNum;SO->DF_FI_InvoiceApp_Detail1.SO;VoucherType->DF_FI_InvoiceApp_Detail1.VoucherType;SOLineItemNumber->DF_FI_InvoiceApp_Detail1.SOLineItemNumber;MaterialNo->DF_FI_InvoiceApp_Detail1.NoDeliveredMaterialNo;MaterialGroup->DF_FI_InvoiceApp_Detail1.MaterialGroup" Filter="State->'old'" UseSubmitBehavior="False" PrintOut="False" AppendMode="ClearAndAppend"></aspxform:XCustomBrowserButton>
                        &nbsp;<asp:Label ID="Label25" runat="server" Text="提示：所有SO的付款方客户必须相同" ForeColor="#0000C0"></asp:Label>
                        <aspxform:XTextBox ID="XTextBox94" runat="server" XDataBind="DF_FI_InvoiceApp_Info.SourceNo" BorderWidth="1" BorderColor="#DCDCDC" HiddenExpress="1" DataMap="TicketingAddress->DF_FI_InvoiceApp_Info.CompanyAddress;TicketingTel->DF_FI_InvoiceApp_Info.Telphone;TicketingPhone->DF_FI_InvoiceApp_Info.ContactMobile;TicketingContacts->DF_FI_InvoiceApp_Info.Contact;TicketingCompany->DF_FI_InvoiceApp_Info.CompanyName;MailTicket->DF_FI_InvoiceApp_Info.InvoiceSendType;BranchID->DF_FI_InvoiceApp_Info.BranchID;SAPZipCode->DF_FI_InvoiceApp_Info.ZipCode;MailTicketCustomID->DF_FI_InvoiceApp_Info.CompanyID;CustomerContract->DF_FI_InvoiceApp_Info.ContractAttach;SAContractNo->DF_FI_InvoiceApp_Info.InvoiceRemarks;" ValueToDisplayText="TableName:V_DF_SD_SalesInfo;FilterColumn:FormNo;DisplayColumn:FormNo,IsContractBusiness:'是'"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="22" class="tsbottomlabel">
                        <asp:Label ID="XLabel47" runat="server" Text="SAP交货单号"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XTextBox ID="XTextBox30" Style="width: 650px" runat="server" XDataBind="DF_FI_InvoiceApp_Info.DeliveryNo" BorderWidth="1" BorderColor="#DCDCDC" Width="500px" DisableExpress="Global.StepName!='申请人发起发票申请'" ValueToDisplayText></aspxform:XTextBox>
                        <asp:Label ID="XLabel70" runat="server" Text="多个交货单号以“/”分隔，例如：80012345/80012346" ForeColor="#0000C0"></asp:Label></td>
                </tr>
                <tr>
                    <td height="20" class="tsbottomlabel">
                        <asp:Label ID="XLabel48" runat="server" Text="合开SAP-SO号"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XTextBox ID="XTextBox31" Style="width: 650px" runat="server" XDataBind="DF_FI_InvoiceApp_Info.OrderNum" BorderWidth="1" BorderColor="#DCDCDC" Width="500px" DisableExpress="Global.StepName!='申请人发起发票申请'" ValueToDisplayText></aspxform:XTextBox>
                        <asp:Label ID="XLabel69" runat="server" Text="多个SO号以“/”分隔，例如：1234/1235" ForeColor="#0000C0"></asp:Label></td>
                </tr>
                <tr>
                    <td height="22" class="tsbottomlabel">
                        <asp:Label ID="XLabel75" runat="server" Text="SAP系统发票号"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XTextBox ID="XTextBox52" Style="width: 650px" runat="server" XDataBind="DF_FI_InvoiceApp_Info.InvoiceNum" BorderWidth="1" BorderColor="#DCDCDC" Width="500px" DisableBehavior="ReadOnly" BackColor="#E6F1F8"></aspxform:XTextBox>
                        <asp:Label ID="Label5" runat="server" Text="多个SAP系统发票号，以“/”分隔，例如：90001234/90001235" ForeColor="#0000C0"></asp:Label></td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label ID="Label14" runat="server" Text="冲暂估"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XCheckBox ID="XCheckBox2" runat="server" XDataBind="DF_FI_InvoiceApp_Info.IsZANGU" Width="105px" DisableExpress="Global.StepName!='申请人发起发票申请'"></aspxform:XCheckBox>
                    </td>
                    <td class="tsbottomlabel" hiddenexpress='DF_FI_InvoiceApp_Info.IsZANGU!="1"'>
                        <asp:Label ID="Label16" runat="server" Text="*" ForeColor="Red"></asp:Label>&nbsp;<asp:Label ID="Label15" runat="server" Text="暂估申请单号"></asp:Label>
                    </td>
                    <td class="tsbottomtext" hiddenexpress='DF_FI_InvoiceApp_Info.IsZANGU!="1"'>
                        <aspxform:XTextBox ID="XTextBox65" runat="server" XDataBind="DF_FI_InvoiceApp_Info.ZGFormNo" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="False" Width="120px" BackColor="#E6F1F8" ReadOnly="True"></aspxform:XTextBox>
                        &nbsp;<aspxform:XCustomBrowserButton ID="XCustomBrowserButton3" runat="server" Width="40px" XClass="Oimec.Dialogs.ZANGUInfoButton" Height="23px" Text="查询" HiddenExpress="Global.StepName!='申请人发起发票申请'" Filter="DeliveryNo->DF_FI_InvoiceApp_Info.DeliveryNo,SO->DF_FI_InvoiceApp_Info.OrderNum" UseSubmitBehavior="False" PrintOut="False" AppendMode="ClearAndAppend"></aspxform:XCustomBrowserButton>
                        <span style="color: #0000c0">系统只能支持一个发票申请冲销一个暂估，若需同时冲销的多个暂估，请直接联系税务发票岗走线下处理。</span>
                    </td>
                </tr>
                <tr hiddenexpress='DF_FI_InvoiceApp_Info.IsZANGU!="1"'>
                    <td height="18" class="tsbottomlabel">
                        <asp:Label ID="Label23" runat="server" Text="冲暂估凭证号"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox ID="XTextBox90" runat="server" XDataBind="DF_FI_InvoiceApp_Info.CZGVoucher" BorderWidth="1" BorderColor="#DCDCDC" BackColor="#E6F1F8" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel">
                        <asp:Label ID="Label24" runat="server" Text="部分冲新凭证号"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox ID="XTextBox91" runat="server" XDataBind="DF_FI_InvoiceApp_Info.NZGVoucher" BorderWidth="1" BorderColor="#DCDCDC" BackColor="#E6F1F8" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="26" class="ts">
                        <asp:Label ID="XLabel62" runat="server" Text="*" ForeColor="Red"></asp:Label>&nbsp;<asp:Label ID="XLabel5" runat="server" Text="发票类型"></asp:Label></td>
                    <td align="left" class="ts1" colspan="3">
                        <aspxform:XRadioButtonList ID="XRadioButtonList3" runat="server" XDataBind="DF_FI_InvoiceApp_Info.InvoiceType" DisableExpress="Global.StepName!='申请人发起发票申请'" CellSpacing="0" CellPadding="0" RepeatDirection="Horizontal">
                            <asp:ListItem Value="01增值税专用发票">增值税专用发票</asp:ListItem>
                            <asp:ListItem Value="02增值税普通发票">增值税普通发票</asp:ListItem>
                            <asp:ListItem Value="03形式发票">形式发票</asp:ListItem>
                            <asp:ListItem Value="05客户不需纸质发票">客户不需纸质发票</asp:ListItem>
                        </aspxform:XRadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td height="27" class="tsbottomlabel">
                        <asp:Label ID="Label6" runat="server" Text="*" ForeColor="Red"></asp:Label><asp:Label ID="Label9" runat="server" Text="*" ForeColor="Blue"></asp:Label>&nbsp;<asp:Label ID="Label7" runat="server" Text="需要付款方税号"></asp:Label>
                    </td>
                    <td class="tsbottomtext">
                        <aspxform:XRadioButtonList ID="XRadioButtonList2" runat="server" XDataBind="DF_FI_InvoiceApp_Info.IsNeedTaxNumber" DisableExpress="(Global.StepName!='申请人发起发票申请'&amp;&amp;Global.StepName!='业务员确认开票信息')||DF_FI_InvoiceApp_Info.InvoiceType=='01增值税专用发票'" CellSpacing="0" CellPadding="0" RepeatDirection="Horizontal" Express="if(DF_FI_InvoiceApp_Info.InvoiceType=='01增值税专用发票',1,DF_FI_InvoiceApp_Info.IsNeedTaxNumber)">
                            <asp:ListItem Selected="True" Value="1">是</asp:ListItem>
                            <asp:ListItem Value="0">否</asp:ListItem>
                        </aspxform:XRadioButtonList>
                    </td>
                    <td class="tsbottomlabel">
                        <asp:Label ID="Label10" runat="server" Text="*" ForeColor="Red" hiddenexpress="DF_FI_InvoiceApp_Info.IsNeedTaxNumber==1"></asp:Label><asp:Label ID="Label11" runat="server" Text="*" ForeColor="Blue" hiddenexpress="DF_FI_InvoiceApp_Info.IsNeedTaxNumber==1"></asp:Label>&nbsp;<asp:Label ID="Label8" runat="server" Text="无需税号原因" hiddenexpress="DF_FI_InvoiceApp_Info.IsNeedTaxNumber==1"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox class="text" ID="XTextBox59" runat="server" XDataBind="DF_FI_InvoiceApp_Info.Reason" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableBehavior="ReadOnly" HiddenExpress="DF_FI_InvoiceApp_Info.IsNeedTaxNumber==1" DisableExpress="Global.StepName!='申请人发起发票申请'&amp;&amp;Global.StepName!='业务员确认开票信息'"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label ID="XLabel21" runat="server" Text="发票备注"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XDropDownList runat="server" HiddenExpress="1" DataMap="InvoiceRemarks->InvoiceRemark" XDataSource="TableName:V_DF_SD_ContractedDistributor;Filter:CustomerName->DF_FI_InvoiceApp_Info.CompanyName;OrderBy:ByValidityContract desc"></aspxform:XDropDownList>
                        <aspxform:XTextBox runat="server" XDataBind="InvoiceRemark" HiddenExpress="1"></aspxform:XTextBox>
                        <aspxform:XTextBox class="text" ID="InvoiceRemarks" runat="server" XDataBind="DF_FI_InvoiceApp_Info.InvoiceRemarks"  BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Width="100%" Max="0" Min="0" DisableBehavior="ReadOnly" DisableExpress="Global.StepName!='申请人发起发票申请'" Rows="3" TextMode="MultiLine"></aspxform:XTextBox>
                   <%--Express="if(InvoiceRemark=='合同号',DF_FI_InvoiceApp_Info.InvoiceRemarks,'')"--%>
                         </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label ID="Label17" runat="server" Text="需更改发票明细"></asp:Label>
                        <aspxform:XTextBox ID="XTextBox82" runat="server" XDataBind="ZBJ" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="True" Width="50px" Max="0" Min="0" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomtext" appendmode="ClearAndAppend" usesubmitbehavior="False" datamap="MaterialNo->DF_FI_InvoiceApp_Detail2.MaterialNo;SOLineItemNumber->DF_FI_InvoiceApp_Detail2.SOLineItemNumber;VoucherType->DF_FI_InvoiceApp_Detail2.VoucherType;SO->DF_FI_InvoiceApp_Detail2.SO;VoucherNum->DF_FI_InvoiceApp_Detail2.OrderNum;LineItemNumber->DF_FI_InvoiceApp_Detail2.LineItemNumber;Tax->DF_FI_InvoiceApp_Detail2.TaxAmout;Number->DF_FI_InvoiceApp_Detail2.GoodsNumber;TotalPrice->DF_FI_InvoiceApp_Detail2.TotalSalesPrice;NTUnitPrice->DF_FI_InvoiceApp_Detail2.NTUnitPrice;GoodsName->DF_FI_InvoiceApp_Detail2.GoodsName;GoodsModel->DF_FI_InvoiceApp_Detail2.GoodsModel;NTTotalPrice->DF_FI_InvoiceApp_Detail2.NTTotalSalesPrice;UnitPrice->DF_FI_InvoiceApp_Detail2.UnitPrice;TaxRate->DF_FI_InvoiceApp_Detail2.TaxRate;Unit->DF_FI_InvoiceApp_Detail2.GoodsUnit;MaterialGroup->DF_FI_InvoiceApp_Detail2.MaterialGroup" xclass="Oimec.Dialogs.GetInvoiceInfoButton">
                        <aspxform:XCheckBox ID="XCheckBox3" runat="server" XDataBind="DF_FI_InvoiceApp_Info.IsChange" Width="125px" XClass="Oimec.Dialogs.GetInvoiceInfoButton" DisableExpress="Global.StepName!='申请人发起发票申请' " DataMap="MaterialNo->DF_FI_InvoiceApp_Detail2.MaterialNo;Tax->DF_FI_InvoiceApp_Detail2.TaxAmout;Number->DF_FI_InvoiceApp_Detail2.GoodsNumber;TotalPrice->DF_FI_InvoiceApp_Detail2.TotalSalesPrice;NTUnitPrice->DF_FI_InvoiceApp_Detail2.NTUnitPrice;GoodsName->DF_FI_InvoiceApp_Detail2.GoodsName;GoodsModel->DF_FI_InvoiceApp_Detail2.GoodsModel;NTTotalPrice->DF_FI_InvoiceApp_Detail2.NTTotalSalesPrice;UnitPrice->DF_FI_InvoiceApp_Detail2.UnitPrice;TaxRate->DF_FI_InvoiceApp_Detail2.TaxRate;Unit->DF_FI_InvoiceApp_Detail2.GoodsUnit" AppendMode="ClearAndAppend" Font-Bold="False"></aspxform:XCheckBox>
                    </td>
                    <td class="tsbottomlabel"></td>
                    <td class="tsbottomtext"></td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label ID="XLabel22" runat="server" Text="SO备注"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XTextBox ID="XTextBox8" runat="server" XDataBind="DF_FI_InvoiceApp_Info.SORemarks" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator11" runat="server" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XRadioButtonList3" ErrorMessage="请选择发票类型"></aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator20" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.IsNeedTaxNumber==1" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XTextBox59" ErrorMessage="请填写不需要付款方税号原因"></aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator3" runat="server" DisableExpress='DF_FI_InvoiceApp_Info.IsZANGU!="1"' ForeColor="Red" ValidationGroup="submit" ControlToValidate="XTextBox65" ErrorMessage="请选择暂估申请单"></aspxform:XRequiredFieldValidator>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="16" class="title1" colspan="4">
                        <asp:Label ID="XLabel7" runat="server" Text="开票信息"></asp:Label>
                        <aspxform:XTextBox ID="XTextBox55" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="50px" HiddenExpress="1">/</aspxform:XTextBox>
                        &nbsp;<input style="height: 22px" onclick="GetInfo()" type="button" value="获取SAP开票信息" />
                        <aspxform:XTextBox class="text" ID="XTextBox95" runat="server" XDataBind="DF_FI_InvoiceApp_Info.PayerCompanyName" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100px" ReadOnly="True"></aspxform:XTextBox>
                        <aspxform:XTextBox ID="PayerSAPID" runat="server" XDataBind="DF_FI_InvoiceApp_Info.PayerSAPID" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100px" ReadOnly="True"></aspxform:XTextBox>
                        &nbsp;<aspxform:XTextBox ID="XTextBox92" runat="server" XDataBind="DF_FI_InvoiceApp_Info.KZANGUAmount" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="ts" style="width: 10%">
                        <asp:Label ID="XLabel26" runat="server" Text="付款方名称" BorderStyle="None"></asp:Label></td>
                    <td class="ts1" style="width: 35%">
                        <aspxform:XTextBox class="text" ID="XTextBox26" runat="server" XDataBind="DF_FI_InvoiceApp_Info.PayerName" BorderWidth="1" BorderColor="#DCDCDC" Width="90%"  BackColor="#E6F1F8"  Express="javascript('getFKInfo',DF_FI_InvoiceApp_Info.InvoiceType,DF_FI_InvoiceApp_Info.PayerSAPID,DF_FI_InvoiceApp_Info.PayerName)" DisableExpress="javascript('FKInfoDisable',DF_FI_InvoiceApp_Info.InvoiceType,DF_FI_InvoiceApp_Info.PayerSAPID)"></aspxform:XTextBox>
                    </td>
                    <td class="ts" style="width: 10%">
                        <asp:Label ID="XLabel27" runat="server" Text="付款方税号"></asp:Label></td>
                    <td class="ts1" style="width: 35%">
                        <aspxform:XTextBox class="text" ID="XTextBox27" runat="server" XDataBind="DF_FI_InvoiceApp_Info.PayerTaxNum" BorderWidth="1" BorderColor="#DCDCDC" Width="90%"  BackColor="#E6F1F8" Express="javascript('getFKInfo',DF_FI_InvoiceApp_Info.InvoiceType,DF_FI_InvoiceApp_Info.PayerSAPID,DF_FI_InvoiceApp_Info.PayerTaxNum)" DisableExpress="javascript('FKInfoDisable',DF_FI_InvoiceApp_Info.InvoiceType,DF_FI_InvoiceApp_Info.PayerSAPID)"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="width: 10%">
                        <asp:Label ID="XLabel28" runat="server" Text="付款方地址/电话"></asp:Label></td>
                    <td class="tsbottomtext" style="width: 35%">
                        <aspxform:XTextBox class="text" ID="XTextBox28" runat="server" XDataBind="DF_FI_InvoiceApp_Info.PayerAddrTel" BorderWidth="1" BorderColor="#DCDCDC" Width="90%"  BackColor="#E6F1F8" Express="javascript('getFKInfo',DF_FI_InvoiceApp_Info.InvoiceType,DF_FI_InvoiceApp_Info.PayerSAPID,DF_FI_InvoiceApp_Info.PayerAddrTel)" DisableExpress="javascript('FKInfoDisable',DF_FI_InvoiceApp_Info.InvoiceType,DF_FI_InvoiceApp_Info.PayerSAPID)"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="width: 10%">
                        <asp:Label ID="XLabel29" runat="server" Text="付款方开户行/账号"></asp:Label></td>
                    <td class="tsbottomtext" style="width: 35%">
                        <aspxform:XTextBox class="text" ID="XTextBox29" runat="server" XDataBind="DF_FI_InvoiceApp_Info.PayerBankInfo" BorderWidth="1" BorderColor="#DCDCDC" Width="90%" BackColor="#E6F1F8" Express="javascript('getFKInfo',DF_FI_InvoiceApp_Info.InvoiceType,DF_FI_InvoiceApp_Info.PayerSAPID,DF_FI_InvoiceApp_Info.PayerBankInfo)" DisableExpress="javascript('FKInfoDisable',DF_FI_InvoiceApp_Info.InvoiceType,DF_FI_InvoiceApp_Info.PayerSAPID)"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <%--<div id="dnew" style="text-align: center" runat="server">--%>
        <div class="scrollDiv" id="scrollDiv" style="height: auto; text-align: center; margin: 0px auto; max-height: 400px">
            <table align="center" class="table" id="ytable" style="width: 1800px" border="0" cellspacing="0" cellpadding="0" dynamicarea="2,1" menudock="Left">
                <tbody>
                    <tr>
                        <td height="14" class="title1" style="text-align: center" colspan="13">
                            <asp:Label ID="XLabel9" runat="server" Text="原发票明细信息"></asp:Label></td>
                        <td width="8%" class="tds" rowspan="2">
                            <asp:Label ID="Label27" runat="server" Text="可冲销暂估金额(含税)"></asp:Label></td>
                        <td width="8%" class="tds" rowspan="2">
                            <asp:Label ID="Label28" runat="server" Text="本次冲销暂估金额(含税)"></asp:Label></td>
                    </tr>
                    <tr>
                        <td width="3%" height="24" class="tds">
                            <asp:Label ID="XLabel10" runat="server" Text="序号"></asp:Label></td>
                        <td width="8%" align="center" class="tds">
                            <asp:Label ID="Label18" runat="server" Text="SAP-SO号"></asp:Label></td>
                        <td width="5%" class="tds">
                            <asp:Label ID="Label19" runat="server" Text="SAP-SO行号"></asp:Label></td>
                        <td width="12%" class="tds">
                            <asp:Label ID="XLabel31" runat="server" Text="货物名称"></asp:Label></td>
                        <td width="12%" class="tds">
                            <asp:Label ID="XLabel32" runat="server" Text="规格型号"></asp:Label></td>
                        <td width="4%" align="center" class="tds">
                            <asp:Label ID="XLabel33" runat="server" Text="单位"></asp:Label></td>
                        <td width="3%" align="center" class="tds">
                            <asp:Label ID="XLabel34" runat="server" Text="数量"></asp:Label></td>
                        <td width="6%" class="tds">
                            <asp:Label ID="XLabel35" runat="server" Text="单价(不含税)"></asp:Label></td>
                        <td width="6%" class="tds">
                            <asp:Label ID="XLabel36" runat="server" Text="金额(不含税)"></asp:Label></td>
                        <td width="5%" class="tds">
                            <asp:Label ID="XLabel37" runat="server" Text="税率%"></asp:Label></td>
                        <td width="6%" class="tds">
                            <asp:Label ID="XLabel38" runat="server" Text="税额"></asp:Label></td>
                        <td width="6%" class="tds">
                            <asp:Label ID="XLabel39" runat="server" Text="单价(含税)"></asp:Label></td>
                        <td width="6%" class="tds">
                            <asp:Label ID="XLabel40" runat="server" Text="金额(含税)"></asp:Label></td>
                    </tr>
                    <tr>
                        <td class="tds1">
                            <aspxform:XGridLineNo ID="XGridLineNo1" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.LineNumber" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" BackColor="Transparent" BorderStyle="None" TextAlign="Center">1</aspxform:XGridLineNo>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox64" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.SO" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                            <aspxform:XTextBox ID="XTextBox68" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.OrderNum" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                            <aspxform:XTextBox ID="XTextBox53" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.VoucherType" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox7" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.LineItemNumber" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                            <aspxform:XTextBox ID="XTextBox78" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.SOLineItemNumber" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="False" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                            <aspxform:XTextBox ID="XTextBox88" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.MaterialGroup" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" BackColor="#E6F1F8" ReadOnly="True" TextAlign="Center"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox10" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.GoodsName" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                            <aspxform:XTextBox ID="XTextBox83" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.NoDeliveredMaterialNo" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox11" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.GoodsModel" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox12" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.GoodsUnit" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" TextAlign="Center"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox13" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.GoodsNumber" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" TextAlign="Center"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox14" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.NTUnitPrice" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" TextAlign="Right"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox15" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.NTTotalSalesPrice" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" TextAlign="Right"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox16" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.TaxRate" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:number;.2" TextAlign="Right"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox21" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.TaxAmout" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" TextAlign="Right"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox22" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.UnitPrice" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" TextAlign="Right"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox23" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.TotalSalesPrice" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" TextAlign="Right"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox71" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.ZANGUAmount" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" TextAlign="Right"></aspxform:XTextBox>
                        </td>
                        <td class="tds1" style="border-left-width: 1px; border-right-width: 1px; border-top-color: #b2bcc6; border-bottom-width: 1px; border-left-color: #b2bcc6; border-bottom-color: #b2bcc6; border-right-color: #b2bcc6; border-top-width: 1px">
                            <aspxform:XTextBox ID="XTextBox72" runat="server" XDataBind="DF_FI_InvoiceApp_Detail1.NowZANGUAmount" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableExpress="DF_FI_InvoiceApp_Info.IsZANGU!=&quot;1&quot; || Global.StepName!='申请人发起发票申请'" Format="type:currency;.2" TextAlign="Right"></aspxform:XTextBox>
                            <aspxform:XTextBox ID="XTextBox80" runat="server" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" Express="DF_FI_InvoiceApp_Detail1.ZANGUAmount-DF_FI_InvoiceApp_Detail1.NowZANGUAmount"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tds1"></td>
                        <td class="tds1"></td>
                        <td class="tds1"></td>
                        <td class="tds1"></td>
                        <td class="tds1"></td>
                        <td class="tds1" style="text-align: right" colspan="3">
                            <asp:Label ID="XLabel41" runat="server" Text="总金额（不含税）："></asp:Label></td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox24" runat="server" XDataBind="varNTAmount1" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" BackColor="#E6F1F8" Format="type:currency;.2" ReadOnly="True" Express="sum(DF_FI_InvoiceApp_Detail1.NTTotalSalesPrice)" TextAlign="Right"></aspxform:XTextBox>
                        </td>
                        <td class="tds1"></td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox50" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" Express="sum(DF_FI_InvoiceApp_Detail1.TaxAmout)" TextAlign="Right"></aspxform:XTextBox>
                        </td>
                        <td class="tds1" style="text-align: right">
                            <asp:Label ID="XLabel57" runat="server" Text="总金额（含税）："></asp:Label></td>
                        <td class="tds1" style="border-left-width: 1px; border-right-width: 1px; border-top-color: #b2bcc6; border-bottom-width: 1px; border-left-color: #b2bcc6; border-bottom-color: #b2bcc6; border-right-color: #b2bcc6; border-top-width: 1px">
                            <aspxform:XTextBox ID="XTextBox44" runat="server" XDataBind="varAmount1" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" Express="sum(DF_FI_InvoiceApp_Detail1.TotalSalesPrice)" TextAlign="Right"></aspxform:XTextBox>
                            <aspxform:XTextBox ID="XTextBox76" runat="server" XDataBind="DF_FI_InvoiceApp_Info.YTotalSalsPrice" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" Express="varAmount1" TextAlign="Right"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox73" runat="server" XDataBind="DF_FI_InvoiceApp_Info.ZANGUAmount" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" Express="sum(DF_FI_InvoiceApp_Detail1.ZANGUAmount)" TextAlign="Right"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox ID="XTextBox74" runat="server" XDataBind="DF_FI_InvoiceApp_Info.NowZANGUAmount" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" Express="sum(DF_FI_InvoiceApp_Detail1.NowZANGUAmount)" TextAlign="Right"></aspxform:XTextBox>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <%--</div>--%>
        <aspxform:XCompareValidator ID="XCompareValidator1" runat="server" ForeColor="Red" ValidationGroup="submit1" ControlToValidate="XTextBox72" ErrorMessage='"本次冲销暂估金额(含税)"不能大于"可冲销暂估金额(含税)"' Operator="LessThanEqual" ControlToCompare="XTextBox71" Display="None">"本次冲销暂估金额(含税)"不能大于"可冲销暂估金额(含税)"</aspxform:XCompareValidator>
        <aspxform:XCompareValidator ID="XCompareValidator4" runat="server" Type="Double" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XTextBox80" ErrorMessage='"本次冲销暂估金额(含税)"不能大于"可冲销暂估金额(含税)"' Operator="GreaterThanEqual" ControlToCompare="XTextBox81" Display="None">"本次冲销暂估金额(含税)"不能大于"可冲销暂估金额(含税)"</aspxform:XCompareValidator>
        <aspxform:XTextBox ID="XTextBox45" runat="server" XDataBind="ZJAmount" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Height="20px" Format="type:currency;.2" Express="DF_FI_InvoiceApp_Info.YTotalSalsPrice-DF_FI_InvoiceApp_Info.NowZANGUAmount"></aspxform:XTextBox>
        <aspxform:XTextBox ID="XTextBox81" runat="server" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Height="20px" Format="type:currency;.2">0</aspxform:XTextBox>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0" hiddenexpress="DF_FI_InvoiceApp_Info.IsChange!='1'">
            <tbody>
                <tr>
                    <td class="tsbottomlabel" style="width: 70px">
                        <asp:Label ID="Label29" runat="server" Text="*" ForeColor="Red"></asp:Label>&nbsp;<asp:Label ID="XLabel18" runat="server" Text="输出格式"></asp:Label></td>
                    <td class="tsbottomtext" style="width: 35%" appendmode="ClearAndAppend" usesubmitbehavior="False" datamap="MaterialNo->DF_FI_InvoiceApp_Detail2.MaterialNo;SOLineItemNumber->DF_FI_InvoiceApp_Detail2.SOLineItemNumber;VoucherType->DF_FI_InvoiceApp_Detail2.VoucherType;SO->DF_FI_InvoiceApp_Detail2.SO;VoucherNum->DF_FI_InvoiceApp_Detail2.OrderNum;LineItemNumber->DF_FI_InvoiceApp_Detail2.LineItemNumber;NTTotalPrice->DF_FI_InvoiceApp_Detail2.NTTotalSalesPrice;Number->DF_FI_InvoiceApp_Detail2.GoodsNumber;TotalPrice->DF_FI_InvoiceApp_Detail2.TotalSalesPrice;NTUnitPrice->DF_FI_InvoiceApp_Detail2.NTUnitPrice;GoodsName->DF_FI_InvoiceApp_Detail2.GoodsName;GoodsModel->DF_FI_InvoiceApp_Detail2.GoodsModel;Tax->DF_FI_InvoiceApp_Detail2.TaxAmout;UnitPrice->DF_FI_InvoiceApp_Detail2.UnitPrice;TaxRate->DF_FI_InvoiceApp_Detail2.TaxRate;Unit->DF_FI_InvoiceApp_Detail2.GoodsUnit;MaterialGroup->DF_FI_InvoiceApp_Detail2.MaterialGroup" xclass="Oimec.Dialogs.GetUpdateInvoiceInfoButton" filter="Format->DF_FI_InvoiceApp_Info.PrintFormat">
                        <aspxform:XDropDownList ID="XDropDownList2" runat="server" XDataBind="DF_FI_InvoiceApp_Info.PrintFormat" Width="250px" DisableExpress="Global.StepName!='申请人发起发票申请'" CssClass="text">
                            <asp:ListItem Selected="True" Value="5">标准格式(SO物料名称|SO物料型号)</asp:ListItem>
                            <asp:ListItem Value="7">维修费</asp:ListItem>
                            <asp:ListItem Value="8">服务费</asp:ListItem>
                            <asp:ListItem Value="9">维修费|SO物料型号</asp:ListItem>
                            <asp:ListItem Value="A">服务费|SO物料型号</asp:ListItem>
                            <asp:ListItem>自定义格式</asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                    <%--<td class="tsbottomlabel" style="WIDTH: 70px">
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 200px">
                        <aspxform:XLabel id="XLabel72" runat="server" text="开票要求见备注" BackColor="#d4e4fe" HiddenExpress="1" Font-Bold="True" ForeColor="#0000C0"></aspxform:XLabel>
                    </td>--%>
                    <td class="tsbottomlabel" style="width: 80px">&nbsp; 
                        <aspxform:XLabel ID="XLabel58" runat="server" Text="更改项目" BackColor="#d4e4fe" HiddenExpress='DF_FI_InvoiceApp_Info.PrintFormat!="自定义格式"'></aspxform:XLabel>
                    </td>
                    <td class="tsbottomtext" style="width: 280px">
                        <aspxform:XCheckBoxList ID="XCheckBoxList1" runat="server" XDataBind="DF_FI_InvoiceApp_Info.ChangeItems" HiddenExpress='DF_FI_InvoiceApp_Info.PrintFormat!="自定义格式"' RepeatDirection="Horizontal">
                            <asp:ListItem>货物名称</asp:ListItem>
                            <asp:ListItem>规格型号</asp:ListItem>
                            <asp:ListItem>单位</asp:ListItem>
                            <asp:ListItem>数量</asp:ListItem>
                            <asp:ListItem>(单价)含税</asp:ListItem>
                            <asp:ListItem>其他</asp:ListItem>
                        </aspxform:XCheckBoxList>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator4" runat="server" DisableExpress='DF_FI_InvoiceApp_Info.IsChange!="1"' ForeColor="Red" ValidationGroup="submit" ControlToValidate="XDropDownList2" ErrorMessage="请选择输出格式"></aspxform:XRequiredFieldValidator>
        <br />
        <div id="dnew1" style="height: auto; text-align: center; margin: 0px auto; max-height: 400px" runat="server" hiddenexpress="DF_FI_InvoiceApp_Info.IsChange!='1'">
            <div class="scrollDiv" id="scrollDiv1" style="height: auto; text-align: center; margin: 0px auto; max-height: 400px">
                <table align="center" class="table" id="changetbl" style="width: 1800px" border="0" cellspacing="0" cellpadding="0" dynamicarea="2,1" menudock="Left" emptygrid="KeepEmpty">
                    <tbody>
                        <tr>
                            <td height="15" class="title1" style="text-align: center" colspan="14">
                                <asp:Label ID="XLabel11" runat="server" Text="更改后发票明细信息"></asp:Label></td>
                        </tr>
                        <tr>
                            <td width="3%" height="29" class="tds">
                                <asp:Label ID="XLabel12" runat="server" Text="序号"></asp:Label></td>
                            <td width="8%" class="tds">
                                <asp:Label ID="Label22" runat="server" Text="SAP-SO号"></asp:Label></td>
                            <td width="5%" align="center" class="tds">
                                <asp:Label ID="Label20" runat="server" Text="SAP-SO行号"></asp:Label></td>
                            <td width="12%" class="tds">
                                <asp:Label ID="Label32" runat="server" Text="*" ForeColor="Red"></asp:Label><%--<aspxform:XLabel id="Label32" runat="server" Text="*" ForeColor="Red" BackColor="#d5dade" HiddenExpress="DF_FI_InvoiceApp_Info.PrintFormat!='自定义格式'"></aspxform:XLabel>--%>&nbsp;<asp:Label ID="XLabel13" runat="server" Text="货物名称"></asp:Label></td>
                            <td width="12%" class="tds">&nbsp;<asp:Label ID="XLabel20" runat="server" Text="规格型号"></asp:Label></td>
                            <td width="4%" align="center" class="tds">
                                <asp:Label ID="Label33" runat="server" Text="*" ForeColor="Red"></asp:Label>&nbsp;<asp:Label ID="XLabel23" runat="server" Text="单位"></asp:Label></td>
                            <td width="3%" align="center" class="tds">
                                <asp:Label ID="Label35" runat="server" Text="*" ForeColor="Red"></asp:Label><asp:Label ID="XLabel30" runat="server" Text="数量"></asp:Label></td>
                            <td width="6%" class="tds">
                                <asp:Label ID="XLabel49" runat="server" Text="单价(不含税)"></asp:Label></td>
                            <td width="6%" class="tds">
                                <asp:Label ID="XLabel50" runat="server" Text="金额(不含税)"></asp:Label></td>
                            <td width="5%" class="tds">
                                <asp:Label ID="XLabel51" runat="server" Text="税率%"></asp:Label></td>
                            <td width="6%" class="tds">
                                <asp:Label ID="XLabel52" runat="server" Text="税额"></asp:Label></td>
                            <td width="6%" class="tds">
                                <asp:Label ID="Label26" runat="server" Text="*" ForeColor="Red"></asp:Label><asp:Label ID="XLabel53" runat="server" Text="单价(含税)"></asp:Label></td>
                            <td width="6%" class="tds">&nbsp;<asp:Label ID="XLabel54" runat="server" Text="金额(含税)"></asp:Label></td>
                            <td width="6%" class="tds">
                                <asp:Label ID="Label21" runat="server" Text="*" ForeColor="Red"></asp:Label>&nbsp;<asp:Label ID="Label30" runat="server" Text="发票分拆标识"></asp:Label></td>
                        </tr>
                        <tr>
                            <td height="25" class="tds1">
                                <aspxform:XGridLineNo ID="XGridLineNo2" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.LineNumber" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" BackColor="Transparent" BorderStyle="None" TextAlign="Center">1</aspxform:XGridLineNo>
                            </td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox66" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.SO" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" BackColor="#E6F1F8" ReadOnly="True"></aspxform:XTextBox>
                                <aspxform:XTextBox ID="XTextBox69" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.OrderNum" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" BackColor="#E6F1F8" ReadOnly="True"></aspxform:XTextBox>
                                <aspxform:XTextBox ID="XTextBox75" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.VoucherType" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" BackColor="#E6F1F8" ReadOnly="True"></aspxform:XTextBox>
                            </td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox70" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.LineItemNumber" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" BackColor="#E6F1F8" ReadOnly="True"></aspxform:XTextBox>
                                <aspxform:XTextBox ID="XTextBox79" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.SOLineItemNumber" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="False" Width="100%" BackColor="#E6F1F8" ReadOnly="True"></aspxform:XTextBox>
                                <aspxform:XTextBox ID="XTextBox89" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.MaterialGroup" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" BackColor="#E6F1F8" ReadOnly="True"></aspxform:XTextBox>
                            </td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox2" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.GoodsName" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableExpress="Global.StepName!='申请人发起发票申请'  ||DF_FI_InvoiceApp_Info.PrintFormat!=&quot;自定义格式&quot;"></aspxform:XTextBox>
                                <aspxform:XTextBox ID="XTextBox84" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.MaterialNo" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%"></aspxform:XTextBox>
                            </td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox18" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.GoodsModel" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableExpress="Global.StepName!='申请人发起发票申请'  ||DF_FI_InvoiceApp_Info.PrintFormat!=&quot;自定义格式&quot;"></aspxform:XTextBox>
                            </td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox19" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.GoodsUnit" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableExpress="Global.StepName!='申请人发起发票申请'  ||DF_FI_InvoiceApp_Info.PrintFormat!=&quot;自定义格式&quot;" TextAlign="Center"></aspxform:XTextBox>
                            </td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox20" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.GoodsNumber" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableExpress="Global.StepName!='申请人发起发票申请'" Format="type:number;.2" TextAlign="Center"></aspxform:XTextBox>
                                <aspxform:XTextBox ID="XTextBox93" runat="server" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" Express='javascript("GetTotalAmount",DF_FI_InvoiceApp_Detail2.GoodsNumber,DF_FI_InvoiceApp_Detail2.LineNumber)'></aspxform:XTextBox>
                            </td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox25" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.NTUnitPrice" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" Format="type:currency;.2" ReadOnly="true" TextAlign="Right"></aspxform:XTextBox>
                            </td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox32" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.NTTotalSalesPrice" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" TextAlign="Right"></aspxform:XTextBox>
                            </td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox33" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.TaxRate" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:number;.2" TextAlign="Right"></aspxform:XTextBox>
                            </td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox34" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.TaxAmout" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" TextAlign="Right"></aspxform:XTextBox>
                            </td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox36" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.UnitPrice" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableExpress="Global.StepName!='申请人发起发票申请'" Format="type:currency;.2" TextAlign="Right"></aspxform:XTextBox>
                                <aspxform:XTextBox ID="XTextBox97" runat="server" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100%" Express='javascript("GetTotalAmount1",DF_FI_InvoiceApp_Detail2.UnitPrice,DF_FI_InvoiceApp_Detail2.LineNumber)'></aspxform:XTextBox>
                            </td>
                            <td class="tds1" style="border-left-width: 1px; border-right-width: 1px; border-top-color: #b2bcc6; border-bottom-width: 1px; border-left-color: #b2bcc6; border-bottom-color: #b2bcc6; border-right-color: #b2bcc6; border-top-width: 1px">
                                <aspxform:XTextBox ID="XTextBox37" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.TotalSalesPrice" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" BackColor="#E6F1F8" Format="type:currency;.2" ReadOnly="true" TextAlign="Right"></aspxform:XTextBox>
                            </td>
                            <td class="tds1">
                                <aspxform:XDropDownList ID="XDropDownList1" runat="server" XDataBind="DF_FI_InvoiceApp_Detail2.Split" Width="100%" DisableExpress="Global.StepName!='申请人发起发票申请'  " XDataSource="TableName:DF_FI_InvoiceSplit" DisplayColumn="Split" ValueColumn="Split"></aspxform:XDropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td height="19" class="tds1"></td>
                            <td class="tds1"></td>
                            <td class="tds1"></td>
                            <td class="tds1"></td>
                            <td class="tds1"></td>
                            <td class="tds1" style="text-align: right" colspan="3">
                                <asp:Label ID="XLabel55" runat="server" Text="总金额（不含税）："></asp:Label></td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox39" runat="server" XDataBind="varNTAmount2" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" Express="sum(DF_FI_InvoiceApp_Detail2.NTTotalSalesPrice)" TextAlign="Right"></aspxform:XTextBox>
                            </td>
                            <td class="tds1"></td>
                            <td class="tds1">
                                <aspxform:XTextBox ID="XTextBox51" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" Express="sum(DF_FI_InvoiceApp_Detail2.TaxAmout)" TextAlign="Right"></aspxform:XTextBox>
                            </td>
                            <td class="tds1" style="text-align: right">
                                <asp:Label ID="XLabel56" runat="server" Text="总金额（含税）："></asp:Label></td>
                            <td class="tds1" style="border-left-width: 1px; border-right-width: 1px; border-top-color: #b2bcc6; border-bottom-width: 1px; border-left-color: #b2bcc6; border-bottom-color: #b2bcc6; border-right-color: #b2bcc6; border-top-width: 1px">
                                <aspxform:XTextBox ID="XTextBox43" runat="server" XDataBind="varAmount2" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Format="type:currency;.2" Express="sum(DF_FI_InvoiceApp_Detail2.TotalSalesPrice)" TextAlign="Right"></aspxform:XTextBox>
                            </td>
                            <td width="139" class="tds1"></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <%--<aspxform:XTextBox id="XTextBox53" runat="server" XDataBind="varTotalAmount" BorderWidth="1px" BorderColor="Gainsboro" Width="99px" Max="0" Min="0" HiddenInput="True" Express="varAmount2+DF_FI_InvoiceApp_Info.ZANGUAmount" BorderStyle="Dotted"></aspxform:XTextBox>--%>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator5" runat="server" DisableExpress="Global.StepName!='申请人发起发票申请'  ||DF_FI_InvoiceApp_Info.PrintFormat!=&quot;自定义格式&quot;" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XTextBox2" ErrorMessage="请输入货物名称"></aspxform:XRequiredFieldValidator>
        <%--&nbsp;<aspxform:XRequiredFieldValidator id="XRequiredFieldValidator10" runat="server" ForeColor="Red" DisableExpress="Global.StepName!='申请人发起发票申请'  ||DF_FI_InvoiceApp_Info.PrintFormat!=&quot;自定义格式&quot;" ErrorMessage="请输入规格型号" ControlToValidate="XTextBox18" ValidationGroup="submit"></aspxform:XRequiredFieldValidator>--%>&nbsp;<aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator23" runat="server" DisableExpress="Global.StepName!='申请人发起发票申请'  ||DF_FI_InvoiceApp_Info.PrintFormat!=&quot;自定义格式&quot;" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XTextBox19" ErrorMessage="请输入单位"></aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator24" runat="server" DisableExpress="Global.StepName!='申请人发起发票申请'  ||DF_FI_InvoiceApp_Info.PrintFormat!=&quot;自定义格式&quot;" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XTextBox37" ErrorMessage='"金额(含税)"不能为空'></aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator2" runat="server" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XDropDownList1" ErrorMessage="请选择发票分拆标识">请选择发票分拆标识</aspxform:XRequiredFieldValidator>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="1200" class="title1">
                        <asp:Label ID="XLabel150" runat="server" Text="销售合同"></asp:Label></td>
                </tr>
                <tr>
                    <td class="tsbottomtext">
                        <aspxform:XAttachments ID="XAttachments1" runat="server" XDataBind="DF_FI_InvoiceApp_Info.ContractAttach" Width="100%" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.jpg;*.GIF;*.PNG"></aspxform:XAttachments>
                    </td>
                </tr>
            </tbody>
        </table>
        <div hiddenexpress='DF_FI_InvoiceApp_Info.CompanyCode=="2000"'>
            <br />
            <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                        <td width="1200" class="title1">
                            <asp:Label ID="XLabel59" runat="server" Text="上传其他附件"></asp:Label>
                            <aspxform:XTextBox ID="XTextBox77" runat="server" XDataBind="yhbj" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="100px"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tsbottomtext">
                            <aspxform:XAttachments ID="XAttachments2" runat="server" XDataBind="DF_FI_InvoiceApp_Info.OtherAttach" Width="100%" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.jpg;*.GIF;*.PNG"></aspxform:XAttachments>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator1" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.IsChange!='1'" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XAttachments1" ErrorMessage="对应的业务单据表里没有客户原始合同，请先上传后再申请发票。">请上传销售合同</aspxform:XRequiredFieldValidator>
        <%-- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<aspxform:XCompareValidator id="XCompareValidator2" runat="server" DisableExpress="(DF_FI_InvoiceApp_Info.ZANGUType=='冲部分'&amp;&amp;DF_FI_InvoiceApp_Info.IsChange!='1')||(DF_FI_InvoiceApp_Info.IsZANGU!='1'&amp;&amp;DF_FI_InvoiceApp_Info.IsChange!='1')||(DF_FI_InvoiceApp_Info.ZANGUType=='冲部分'&amp;&amp;DF_FI_InvoiceApp_Info.IsChange=='1')||(DF_FI_InvoiceApp_Info.ZANGUType=='冲全部'&amp;&amp;DF_FI_InvoiceApp_Info.IsChange!='1')" Type="Double" ValidationGroup="submit" ControlToValidate="XTextBox43" ErrorMessage="原发票含税总金额与更改后发票含税总金额不同,请核对！" ControlToCompare="XTextBox44"></aspxform:XCompareValidator>--%><%--<aspxform:XCompareValidator id="XCompareValidator1" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.ZANGUType!='冲部分'||DF_FI_InvoiceApp_Info.IsChange=='0'" Type="Double" ValidationGroup="submit" ControlToValidate="XTextBox53" ErrorMessage="冲暂估金额+更改后发票含税总金额不等于原发票含税总金额，请核对！" ControlToCompare="XTextBox44"></aspxform:XCompareValidator>--%>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator12" runat="server" DisableExpress="1" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XAttachments2" ErrorMessage="请上传其他附件"></aspxform:XRequiredFieldValidator>
        &nbsp;<br />
        <div hiddenexpress='(DF_FI_InvoiceApp_Info.InvoiceType!="01增值税专用发票" &amp;&amp; DF_FI_InvoiceApp_Info.CompanyCode=="1000") || (DF_FI_InvoiceApp_Info.InvoiceType!="01增值税专用发票" &amp;&amp; DF_FI_InvoiceApp_Info.InvoiceType!="02增值税普通发票" &amp;&amp; DF_FI_InvoiceApp_Info.CompanyCode!="1000")'>
            <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                        <td height="14" class="title1" colspan="6">
                            <asp:Label ID="XLabel6" runat="server" Text="发票邮寄信息"></asp:Label><asp:Label ID="XLabel8" runat="server" Text="（重要信息，请注意复核）" ForeColor="Red" Font-Bold="True"></asp:Label></td>
                    </tr>
                    <tr>
                        <td class="ts" style="width: 10%">
                            <asp:Label ID="Label31" runat="server" Text="*" ForeColor="Blue"></asp:Label>&nbsp;有发票邮寄特殊要求</td>
                        <td class="ts1" colspan="5">
                            <aspxform:XRadioButtonList ID="XRadioButtonList1" runat="server" XDataBind="DF_FI_InvoiceApp_Info.IsSpecial" DisableExpress="Global.StepName!='业务员确认开票信息'&amp;&amp;(Global.StepName!='申请人发起发票申请'||DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID)" RepeatDirection="Horizontal">
                                <asp:ListItem>是</asp:ListItem>
                                <asp:ListItem>否</asp:ListItem>
                            </aspxform:XRadioButtonList>
                            <%--<aspxform:XDropDownList runat="server" HiddenExpress="1" DataMap="BillingAddress->DF_FI_InvoiceApp_Info.CompanyAddress;BillingPostcode->DF_FI_InvoiceApp_Info.ZipCode;BillingPhone->DF_FI_InvoiceApp_Info.ContactMobile;BillingLandline->DF_FI_InvoiceApp_Info.Telphone;BillingContact->DF_FI_InvoiceApp_Info.Contact;MailTicket->DF_FI_InvoiceApp_Info.InvoiceSendType;MailTicketBranchID->DF_FI_InvoiceApp_Info.BranchID;Branch->DF_FI_InvoiceApp_Info.Branch;TicketingCompany->DF_FI_InvoiceApp_Info.CompanyName;MailTicketCustomID->DF_FI_InvoiceApp_Info.CompanyID;"  XDataBind="fpyj" XDataSource="TableName:V_DF_SA_MarketInquiry_MailTicket;Filter:IsContractBusiness->'是',FormNo->DF_FI_InvoiceApp_Info.SourceNo"></aspxform:XDropDownList>--%>
                        </td>
                    </tr>
                    <tr>
                        <td class="ts" style="width: 10%">
                            <asp:Label ID="Label1" runat="server" Text="*" ForeColor="Blue"></asp:Label>&nbsp;<asp:Label ID="Label3" runat="server" Text="寄票方式"></asp:Label>
                        </td>
                        <td class="ts1" style="width: 60%" colspan="2">
                            <aspxform:XDropDownList ID="XDropDownList4" runat="server" XDataBind="DF_FI_InvoiceApp_Info.InvoiceSendType" Width="170px" DisableExpress="Global.StepName!='业务员确认开票信息'&amp;&amp;(Global.StepName!='申请人发起发票申请'||DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID)" XDataSource='TableName:DF_DataSourceList;Filter:Type->"邮寄方式",Value1->DF_FI_InvoiceApp_Info.IsSpecial' DisplayColumn="Name" ValueColumn="Name" Font-Bold="True" PromptText="--请选择--"></aspxform:XDropDownList>
                        </td>
                        <td class="tsbottomlabel" style="width: 80px">&nbsp;<asp:Label ID="Label12" runat="server" Text="分支机构" hiddenexpress="(Global.StepName!='业务员确认开票信息'&amp;&amp;Global.StepName!='申请人发起发票申请'&amp;&amp;DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID)||DF_FI_InvoiceApp_Info.InvoiceSendType!='邮寄分支机构'"></asp:Label>
                            <aspxform:XTextBox ID="XTextBox61" runat="server" XDataBind="DF_FI_InvoiceApp_Info.BranchID" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="20px"></aspxform:XTextBox>
                        </td>
                        <td class="tsbottomtext" style="width: 300px" colspan="2">
                            <aspxform:XTextBox class="text" ID="XTextBox60" runat="server" XDataBind="DF_FI_InvoiceApp_Info.Branch" BorderWidth="1" BorderColor="#DCDCDC" Width="100px" DisableBehavior="ReadOnly" BackColor="#E6F1F8" HiddenExpress="(Global.StepName!='业务员确认开票信息'&amp;&amp;Global.StepName!='申请人发起发票申请')||DF_FI_InvoiceApp_Info.InvoiceSendType!='邮寄分支机构'" DisableExpress="1"></aspxform:XTextBox>
                            &nbsp; 
                            <aspxform:XDataBrowserButton ID="XDataBrowserButton3" runat="server" Width="40px" Height="25px" Text="查询" HiddenExpress="(Global.StepName!='业务员确认开票信息'&amp;&amp;Global.StepName!='申请人发起发票申请')||DF_FI_InvoiceApp_Info.InvoiceSendType!='邮寄分支机构'" DataMap="BranchID->DF_FI_InvoiceApp_Info.BranchID;Branch->DF_FI_InvoiceApp_Info.Branch" XDataSource="TableName:DF_FI_Branches" PrintOut="False" DisplayColumns="BranchID:编号,50;Branch:分支机构,80"></aspxform:XDataBrowserButton>
                        </td>
                    </tr>
                    <tr>
                        <td class="ts" style="width: 10%">&nbsp;<asp:Label ID="XLabel14" runat="server" Text="公司名称"></asp:Label>
                            <aspxform:XTextBox ID="XTextBox54" runat="server" XDataBind="DF_FI_InvoiceApp_Info.CompanyID" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="20px"></aspxform:XTextBox>
                        </td>
                        <td class="ts1" style="width: 80%" colspan="5">
                            <%--if(DF_FI_InvoiceApp_Info.InvoiceSendType=='邮寄分支机构','',DF_FI_InvoiceApp_Info.CompanyName)--%>
                            <aspxform:XTextBox class="text" ID="XTextBox1" runat="server" XDataBind="DF_FI_InvoiceApp_Info.CompanyName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1" Express="if(DF_FI_InvoiceApp_Info.InvoiceSendType=='邮寄分支机构','',DF_FI_InvoiceApp_Info.CompanyName)"></aspxform:XTextBox>
                            &nbsp; 
                            <aspxform:XDataBrowserButton ID="XDataBrowserButton1" runat="server" Width="40px" Height="25px" Text="查询" HiddenExpress="(Global.StepName!='业务员确认开票信息'&amp;&amp;Global.StepName!='申请人发起发票申请')||DF_FI_InvoiceApp_Info.InvoiceSendType!='邮寄客户'" DataMap="CustomerID->DF_FI_InvoiceApp_Info.CompanyID;CustomerNameCH->DF_FI_InvoiceApp_Info.CompanyName" XDataSource="TableName:V_DF_MasterData_Customer" PrintOut="False" DisplayColumns="CustomerID:客户编号,100;CustomerNameCH:客户名称,250"></aspxform:XDataBrowserButton>
                            <aspxform:XDataBrowserButton ID="XDataBrowserButton4" runat="server" Width="40px" Height="25px" Text="查询" HiddenExpress="(Global.StepName!='业务员确认开票信息'&amp;&amp;Global.StepName!='申请人发起发票申请')||DF_FI_InvoiceApp_Info.InvoiceSendType!='邮寄分支机构'" DataMap="ID->DF_FI_InvoiceApp_Info.CompanyID;CompanyName->DF_FI_InvoiceApp_Info.CompanyName;CompanyAddress->DF_FI_InvoiceApp_Info.CompanyAddress;CompanyZipCode->DF_FI_InvoiceApp_Info.ZipCode" XDataSource="TableName:DF_FI_BranchCompany;Filter:BranchID->DF_FI_InvoiceApp_Info.BranchID" DisplayColumns="CompanyName:公司名称,260;CompanyAddress:公司地址,300;CompanyZipCode:邮编,60"></aspxform:XDataBrowserButton>
                            <aspxform:XTextBox ID="XTextBox62" runat="server" XDataBind="DF_FI_InvoiceApp_Info.CompanySAPID" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" DataMap="CustomerID->DF_FI_InvoiceApp_Info.CompanyID" ValueToDisplayText="TableName:V_DF_MasterData_Customer;FilterColumn:CustomerSAPID;DisplayColumn:CustomerSAPID"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="34" class="tsbottomlabel" style="width: 80px">&nbsp;<asp:Label ID="XLabel15" runat="server" Text="联系人"></asp:Label>
                        </td>
                        <td class="tsbottomtext" style="width: 200px">
                            <aspxform:XTextBox class="text" ID="XTextBox3" runat="server" XDataBind="DF_FI_InvoiceApp_Info.Contact" BorderWidth="1" BorderColor="#DCDCDC" Width="150px" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                            &nbsp;<aspxform:XDataBrowserButton ID="XDataBrowserButton2" runat="server" Width="41px" Height="25px" Text="查询" HiddenExpress="(Global.StepName!='业务员确认开票信息'&amp;&amp;Global.StepName!='业务员确认开票信息1'&amp;&amp;Global.StepName!='申请人发起发票申请')||DF_FI_InvoiceApp_Info.InvoiceSendType!='邮寄客户'" DataMap="ContactName->DF_FI_InvoiceApp_Info.Contact;ContactTel->DF_FI_InvoiceApp_Info.Telphone;ContactMobile->DF_FI_InvoiceApp_Info.ContactMobile;ContactAddr->DF_FI_InvoiceApp_Info.CompanyAddress;ZipCode->DF_FI_InvoiceApp_Info.ZipCode" XDataSource="TableName:DF_Partner_ContactZK;Filter:PartnerID->DF_FI_InvoiceApp_Info.CompanyID,ContactType->'客户',OwnerAccount->DF_FI_InvoiceApp_Info.SalesManID" PrintOut="False" DisplayColumns="ContactName:联系人;ContactTel:电话;ContactMobile:手机;ContactAddr:地址,250;ZipCode:邮编"></aspxform:XDataBrowserButton>
                            <aspxform:XCustomBrowserButton ID="XCustomBrowserButton2" runat="server" Width="35px" XClass="Oimec.Dialogs.ContactAddButton" Height="25px" Text="新建" HiddenExpress="(Global.StepName!='业务员确认开票信息'&amp;&amp;Global.StepName!='业务员确认开票信息1'&amp;&amp;Global.StepName!='申请人发起发票申请')|| DF_FI_InvoiceApp_Info.InvoiceSendType!='邮寄客户'" DisableExpress='DF_FI_InvoiceApp_Info.CompanyID ==  ""' Filter="OwnerAccount->DF_FI_InvoiceApp_Info.SalesManID,CustomerID->DF_FI_InvoiceApp_Info.CompanyID" PrintOut="False" BrowserWindowType="AjaxPanel"></aspxform:XCustomBrowserButton>
                            <aspxform:XDataBrowserButton ID="XDataBrowserButton5" runat="server" Width="41px" Height="25px" Text="查询" HiddenExpress="(Global.StepName!='业务员确认开票信息'&amp;&amp;Global.StepName!='业务员确认开票信息1'&amp;&amp;Global.StepName!='申请人发起发票申请')||DF_FI_InvoiceApp_Info.InvoiceSendType!='邮寄分支机构'" DataMap="ContactName->DF_FI_InvoiceApp_Info.Contact;Telphone->DF_FI_InvoiceApp_Info.Telphone;Mobile->DF_FI_InvoiceApp_Info.ContactMobile" XDataSource="TableName:DF_FI_BranchContact;Filter:BranchID->DF_FI_InvoiceApp_Info.BranchID" PrintOut="False" DisplayColumns="ContactName:联系人,100;Telphone:电话,200;Mobile:手机,100"></aspxform:XDataBrowserButton>
                        </td>
                        <td align="right" class="tsbottomlabel" style="width: 60px">
                            <asp:Label ID="XLabel63" runat="server" Text="电话"></asp:Label></td>
                        <td class="tsbottomtext" style="width: 150px">
                            <aspxform:XTextBox class="text" ID="XTextBox4" runat="server" XDataBind="DF_FI_InvoiceApp_Info.Telphone" BorderWidth="1" BorderColor="#DCDCDC" Width="150" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                        </td>
                        <td class="tsbottomlabel" style="width: 80px">
                            <asp:Label ID="Label2" runat="server" Text="手机"></asp:Label></td>
                        <td class="tsbottomtext" style="width: 150px">
                            <aspxform:XTextBox class="text" ID="XTextBox57" runat="server" XDataBind="DF_FI_InvoiceApp_Info.ContactMobile" BorderWidth="1" BorderColor="#DCDCDC" Width="150px" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tsbottomlabel" style="width: 80px">&nbsp;<asp:Label ID="XLabel16" runat="server" Text="地址"></asp:Label>
                        </td>
                        <td class="tsbottomtext" style="width: 80%" colspan="2">
                            <aspxform:XTextBox class="text" ID="XTextBox5" runat="server" XDataBind="DF_FI_InvoiceApp_Info.CompanyAddress" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                        </td>
                        <td class="tsbottomlabel" style="width: 80px; text-align: right">
                            <asp:Label ID="Label4" runat="server" Text="邮编"></asp:Label></td>
                        <td class="tsbottomtext" colspan="2">
                            <aspxform:XTextBox class="text" ID="XTextBox58" runat="server" XDataBind="DF_FI_InvoiceApp_Info.ZipCode" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" BackColor="#E6F1F8" DisableExpress="1"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tsbottomlabel" style="width: 80px">
                            <asp:Label ID="Label13" runat="server" Text="快递单号"></asp:Label></td>
                        <td class="tsbottomtext" style="width: 80%" colspan="2">
                            <aspxform:XTextBox ID="txt_mailno" runat="server" XDataBind="DF_FI_InvoiceApp_Info.CourierNumber" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableExpress='Global.StepName!="发票邮寄岗寄发票"  &amp;&amp;   (Global.StepName!="北京税务发票岗打印并邮寄发票" || DF_FI_InvoiceApp_Info.InvoiceSendType=="自取")&amp;&amp; (Global.StepName!="上海税务发票岗打印并邮寄发票" || DF_FI_InvoiceApp_Info.InvoiceSendType=="自取") &amp;&amp; (Global.StepName!="深圳税务发票岗打印并邮寄发票" || DF_FI_InvoiceApp_Info.InvoiceSendType=="自取") &amp;&amp; (Global.StepName!="博德税务发票岗打印并邮寄发票" || DF_FI_InvoiceApp_Info.InvoiceSendType=="自取")'></aspxform:XTextBox>
                        </td>
                        <td class="tsbottomlabel" style="text-align: right">备注 
                        </td>
                        <td class="tsbottomtext" colspan="2">
                            <aspxform:XTextBox ID="InvoiceRemark" runat="server" XDataBind="DF_FI_InvoiceApp_Info.InvoiceRemark" BorderWidth="1" BorderColor="#DCDCDC" Width="100%"></aspxform:XTextBox>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0" hiddenexpress='DF_FI_InvoiceApp_Info.InvoiceType!="02增值税普通发票" || DF_FI_InvoiceApp_Info.CompanyCode!="1000"'>
            <tbody>
                <tr>
                    <td class="title1" colspan="4">电子发票推送信息</td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="width: 10%">推送邮箱 
                    </td>
                    <td class="tsbottomtext" style="width: 35%">
                        <aspxform:XTextBox ID="pushEmail" runat="server" XDataBind="DF_FI_InvoiceApp_Info.pushEmail" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="false" Width="70%" Height="25px" DisableExpress='Global.StepName!="业务员确认开票信息" &amp;&amp; Global.StepName!="申请人发起发票申请"'></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="width: 10%">推送手机号 
                    </td>
                    <td class="tsbottomtext" style="width: 35%">
                        <aspxform:XTextBox ID="pushPhone" runat="server" XDataBind="DF_FI_InvoiceApp_Info.pushPhone" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="false" Width="70%" Height="25px" DisableExpress='Global.StepName!="业务员确认开票信息" &amp;&amp; Global.StepName!="申请人发起发票申请"'></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator26" runat="server" DisableExpress='(DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID)     || (DF_FI_InvoiceApp_Info.CompanyCode=="1000"  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=="02增值税普通发票")||DF_FI_InvoiceApp_Info.InvoiceType=="03形式发票"||DF_FI_InvoiceApp_Info.InvoiceType=="05客户不需纸质发票"' ForeColor="Red" ValidationGroup="submit" ControlToValidate="XRadioButtonList1" ErrorMessage="请选择有发票邮寄特殊要求">请选择有发票邮寄特殊要求</aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator27" runat="server" DisableExpress='(DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID)     || (DF_FI_InvoiceApp_Info.CompanyCode=="1000"  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=="02增值税普通发票")||DF_FI_InvoiceApp_Info.InvoiceType=="03形式发票"||DF_FI_InvoiceApp_Info.InvoiceType=="05客户不需纸质发票"' ForeColor="Red" ValidationGroup="submit" ControlToValidate="XDropDownList4" ErrorMessage="请选择发票邮寄方式"></aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator28" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceSendType!='邮寄分支机构'|| DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID || (DF_FI_InvoiceApp_Info.CompanyCode=='1000'  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=='02增值税普通发票')" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XTextBox60" ErrorMessage="请选择分支机构"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator29" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceSendType=='自取'||DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID   || (DF_FI_InvoiceApp_Info.CompanyCode=='1000'  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=='02增值税普通发票')" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XTextBox1" ErrorMessage="请输入发票邮寄公司名称"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator30" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceSendType=='自取'||DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID  || (DF_FI_InvoiceApp_Info.CompanyCode=='1000'  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=='02增值税普通发票')||DF_FI_InvoiceApp_Info.InvoiceType=='03形式发票'||DF_FI_InvoiceApp_Info.InvoiceType=='05客户不需纸质发票'" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XTextBox5" ErrorMessage="请输入发票邮寄地址"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator31" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceSendType=='自取'||DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID  || (DF_FI_InvoiceApp_Info.CompanyCode=='1000'  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=='02增值税普通发票')||DF_FI_InvoiceApp_Info.InvoiceType=='03形式发票'||DF_FI_InvoiceApp_Info.InvoiceType=='05客户不需纸质发票'" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XTextBox3" ErrorMessage="请输入发票邮寄联系人"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator32" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceSendType=='自取'||DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID  || (DF_FI_InvoiceApp_Info.CompanyCode=='1000'  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=='02增值税普通发票')||DF_FI_InvoiceApp_Info.InvoiceType=='03形式发票'||DF_FI_InvoiceApp_Info.InvoiceType=='05客户不需纸质发票' || DF_FI_InvoiceApp_Info.ContactMobile!=''" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XTextBox4" ErrorMessage="请输入发票邮寄电话/手机"></aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator33" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceSendType=='自取'||DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID  || (DF_FI_InvoiceApp_Info.CompanyCode=='1000'  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=='02增值税普通发票')||DF_FI_InvoiceApp_Info.InvoiceType=='03形式发票'||DF_FI_InvoiceApp_Info.InvoiceType=='05客户不需纸质发票' || DF_FI_InvoiceApp_Info.Telphone!=''" ForeColor="Red" ValidationGroup="submit" ControlToValidate="XTextBox57" ErrorMessage="请输入发票邮寄电话/手机"></aspxform:XRequiredFieldValidator>
        <br />
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator19" runat="server" DisableExpress='(DF_FI_InvoiceApp_Info.CompanyCode=="1000"  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=="02增值税普通发票")||DF_FI_InvoiceApp_Info.InvoiceType=="03形式发票"' ForeColor="Blue" ValidationGroup="yewuyuan" ControlToValidate="XRadioButtonList1" ErrorMessage="请选择有发票邮寄特殊要求">请选择有发票邮寄特殊要求</aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator25" runat="server" DisableExpress='(DF_FI_InvoiceApp_Info.CompanyCode=="1000"  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=="02增值税普通发票")||DF_FI_InvoiceApp_Info.InvoiceType=="03形式发票"' ForeColor="Blue" ValidationGroup="yewuyuan" ControlToValidate="XDropDownList4" ErrorMessage="请选择发票邮寄方式"></aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator21" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceSendType!='邮寄分支机构'|| (DF_FI_InvoiceApp_Info.CompanyCode=='1000'  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=='02增值税普通发票')" ForeColor="Blue" ValidationGroup="yewuyuan" ControlToValidate="XTextBox60" ErrorMessage="请选择分支机构"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator6" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceSendType=='自取'||DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID  || (DF_FI_InvoiceApp_Info.CompanyCode=='1000'  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=='02增值税普通发票')||DF_FI_InvoiceApp_Info.InvoiceType=='03形式发票'||DF_FI_InvoiceApp_Info.InvoiceType=='05客户不需纸质发票'" ForeColor="Blue" ValidationGroup="yewuyuan" ControlToValidate="XTextBox1" ErrorMessage="请输入发票邮寄公司名称"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator7" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceSendType=='自取'||DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID  || (DF_FI_InvoiceApp_Info.CompanyCode=='1000'  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=='02增值税普通发票')||DF_FI_InvoiceApp_Info.InvoiceType=='03形式发票'||DF_FI_InvoiceApp_Info.InvoiceType=='05客户不需纸质发票'" ForeColor="Blue" ValidationGroup="yewuyuan" ControlToValidate="XTextBox5" ErrorMessage="请输入发票邮寄地址"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator8" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceSendType=='自取'||(DF_FI_InvoiceApp_Info.CompanyCode=='2000'||DF_FI_InvoiceApp_Info.CompanyCode=='A300'&amp;&amp;DF_FI_InvoiceApp_Info.InvoiceSendType=='邮寄客户')   || (DF_FI_InvoiceApp_Info.CompanyCode==&quot;1000&quot;  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType==&quot;02增值税普通发票&quot;)" ForeColor="Blue" ValidationGroup="yewuyuan" ControlToValidate="XTextBox3" ErrorMessage="请输入发票邮寄联系人"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator9" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceSendType=='自取'||DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID  || (DF_FI_InvoiceApp_Info.CompanyCode=='1000'  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=='02增值税普通发票')||DF_FI_InvoiceApp_Info.InvoiceType=='03形式发票'||DF_FI_InvoiceApp_Info.InvoiceType=='05客户不需纸质发票' || DF_FI_InvoiceApp_Info.ContactMobile!=''" ForeColor="Blue" ValidationGroup="yewuyuan" ControlToValidate="XTextBox4" ErrorMessage="请输入发票邮寄电话/手机"></aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator13" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceSendType=='自取' ||DF_FI_InvoiceApp_Info.AppAccount!=DF_FI_InvoiceApp_Info.SalesManID || (DF_FI_InvoiceApp_Info.CompanyCode=='1000'  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=='02增值税普通发票')||DF_FI_InvoiceApp_Info.InvoiceType=='03形式发票'||DF_FI_InvoiceApp_Info.InvoiceType=='05客户不需纸质发票' || DF_FI_InvoiceApp_Info.Telphone!=''" ForeColor="Blue" ValidationGroup="yewuyuan" ControlToValidate="XTextBox57" ErrorMessage="请输入发票邮寄电话/手机"></aspxform:XRequiredFieldValidator>
        <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator22" runat="server" DisableExpress='DF_FI_InvoiceApp_Info.InvoiceSendType=="自取" || (DF_FI_InvoiceApp_Info.CompanyCode=="1000"  &amp;&amp;  DF_FI_InvoiceApp_Info.InvoiceType=="02增值税普通发票")' ForeColor="Blue" ValidationGroup="fpg" ControlToValidate="txt_mailno" ErrorMessage="请输入快递单号">请输入快递单号</aspxform:XRequiredFieldValidator>
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="1200" class="title1">
                        <asp:Label ID="Label34" runat="server" Text="备注"></asp:Label></td>
                </tr>
                <tr>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox ID="XTextBox85" runat="server" XDataBind="DF_FI_InvoiceApp_Info.Remarks" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" Height="50px" DisableExpress='DF_FI_InvoiceApp_Info.IsChange!="1"' TextMode="MultiLine"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        &nbsp;&nbsp;&nbsp; 
        <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="DF_FI_InvoiceApp_Info.ResultMessage" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" DisableBehavior="ReadOnly" Height="50px" DisableExpress="1" TextMode="MultiLine"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td>
                        <aspxform:XSignTrace ID="XSignTrace1" runat="server" BorderWidth="1" BorderColor="#dcdcdc" Width="1200px"></aspxform:XSignTrace>
                    </td>
                </tr>
            </tbody>
        </table>
        <p>
            <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator14" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceType!='02增值税普通发票'||DF_FI_InvoiceApp_Info.IsNeedTaxNumber==0" ValidationGroup="submit" ControlToValidate="XTextBox27" ErrorMessage="开具增值税普通发票时必须提供税号！" Display="None">开具增值税普通发票时必须提供税号！</aspxform:XRequiredFieldValidator>
            <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator15" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceType!='01增值税专用发票'||DF_FI_InvoiceApp_Info.IsNeedTaxNumber==0" ValidationGroup="submit" ControlToValidate="XTextBox26" ErrorMessage="开具增值税专用发票时，开票信息（付款方名称、地址、电话、税号、开户行及账号）必须齐全！" Display="None">开具增值税专用发票时，开票信息（付款方名称、地址、电话、税号、开户行及账号）必须齐全！</aspxform:XRequiredFieldValidator>
        </p>
        <p>
            <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator16" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceType!='01增值税专用发票'||DF_FI_InvoiceApp_Info.IsNeedTaxNumber==0" ValidationGroup="submit" ControlToValidate="XTextBox27" ErrorMessage="开具增值税专用发票时，开票信息（付款方名称、地址、电话、税号、开户行及账号）必须齐全！" Display="None">开具增值税专用发票时，开票信息（付款方名称、地址、电话、税号、开户行及账号）必须齐全！</aspxform:XRequiredFieldValidator>
        </p>
        <p>
            <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator17" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceType!='01增值税专用发票'||DF_FI_InvoiceApp_Info.IsNeedTaxNumber==0" ValidationGroup="submit" ControlToValidate="XTextBox28" ErrorMessage="开具增值税专用发票时，开票信息（付款方名称、地址、电话、税号、开户行及账号）必须齐全！" Display="None">开具增值税专用发票时，开票信息（付款方名称、地址、电话、税号、开户行及账号）必须齐全！</aspxform:XRequiredFieldValidator>
        </p>
        <p>
            <aspxform:XRequiredFieldValidator ID="XRequiredFieldValidator18" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceType!='01增值税专用发票' ||DF_FI_InvoiceApp_Info.IsNeedTaxNumber==0" ValidationGroup="submit" ControlToValidate="XTextBox29" ErrorMessage="开具增值税专用发票时，开票信息（付款方名称、地址、电话、税号、开户行及账号）必须齐全！" Display="None">开具增值税专用发票时，开票信息（付款方名称、地址、电话、税号、开户行及账号）必须齐全！</aspxform:XRequiredFieldValidator>
            <br />
            <aspxform:XCompareValidator ID="XCompareValidator3" runat="server" DisableExpress="DF_FI_InvoiceApp_Info.InvoiceType!='01增值税专用发票' " ValidationGroup="submit" ControlToValidate="XTextBox29" ErrorMessage="开具增值税专用发票时，开票信息（付款方名称、地址、电话、税号、开户行及账号）必须齐全！" Operator="NotEqual" ControlToCompare="XTextBox55" Display="None">开具增值税专用发票时，开票信息（付款方名称、地址、电话、税号、开户行及账号）必须齐全！</aspxform:XCompareValidator>
        </p>
        <div id="div_text2">
        </div>
        <script src="../../../../Oimec/Dialogs/Waybill.js"></script>
    </form>
</body>
</html>
