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

    // Insert page code here
    //
    
    protected void Page_Load(object sender, EventArgs e)
    {
        string formstate = Convert.ToString(Request.Params["formstate"]);
        this.XTextBox33.Text = formstate;
    }

</script>
<html xmlns:xform="xmlns:xform">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <link href="/Oimec/Styles/CSS/StyleSheet.css" rel="Stylesheet" type="text/css" />
    <script src="../../../../Oimec/Script/jquery-3.2.1.js"></script>
    <script src="../../../../Oimec/Script/jquery-3.2.1.min.js"></script>
    <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: 1px;
        }

            TD.NoPadding {
                PADDING-RIGHT: 0px;
                PADDING-LEFT: 0px;
                PADDING-BOTTOM: 0px;
                PADDING-TOP: 0px;
            }
        /*INPUT {height: 15px}*/
        INPUT.UL {
            BORDER-RIGHT: medium none;
            BORDER-TOP: medium none;
            BORDER-LEFT: medium none;
            BORDER-BOTTOM: #33ff33 1px solid;
        }

        TEXTAREA {
            FONT-SIZE: 12px;
        }

        input {
            vertical-align: middle; /*margin-right:-3px*/
        }
    </style>
    <script type="text/javascript">

        //打印快递单
        function Print_Waybill() {
            //参数：收方公司名称、收方联系人、电话、手机、地址、邮编
            var obj_param = {};
            obj_param["d_company"] = agent.Eles[document.getElementById("XTextBox8").getAttribute("xform_xele_index")].getValue();
            obj_param["d_contact"] = agent.Eles[document.getElementById("XTextBox9").getAttribute("xform_xele_index")].getValue();
            obj_param["d_address"] = agent.Eles[document.getElementById("XTextBox10").getAttribute("xform_xele_index")].getValue();
            obj_param["d_tel"] = agent.Eles[document.getElementById("XTextBox11").getAttribute("xform_xele_index")].getValue();
            obj_param["d_mobile"] = agent.Eles[document.getElementById("XTextBox37").getAttribute("xform_xele_index")].getValue();
            //obj_param["logistics"] = "2";//1顺丰 2跨越
            obj_param["printType"] = "03";//2 两联单；3三联单
            obj_param["d_province"] = agent.Eles[document.getElementById("XTextBox19").getAttribute("xform_xele_index")].getValue();
            obj_param["d_city"] = agent.Eles[document.getElementById("XTextBox34").getAttribute("xform_xele_index")].getValue();

            //判断物流公司 logistics 1顺丰 2跨越
            var company = agent.Eles[document.getElementById("XDropDownList3").getAttribute("xform_xele_index")].getValue();
            if (company == "顺丰速运") {
                obj_param["logistics"] = "1";
            }
            else if (company == "跨越物流") {
                obj_param["logistics"] = "2";
            }
            else { Ext.Msg.alert("提示", "只能打印顺丰或者跨越运单！"); return false; }

            //签回单:1要求 其它为不要求
            var radio1 = document.getElementById("XRadioButtonList2_0");
            var radio2 = document.getElementById("XRadioButtonList2_1");
            if (radio1.checked == true) { //是
                obj_param["need_return_tracking_no"] = "1";
            }
            if (radio2.checked == true) { //否
                obj_param["need_return_tracking_no"] = "";
            }

            //获取产品型号、数量
            var str = "";
            var tableObj = document.getElementById('tablenew');
            var arr = new Array();
            for (var j = 1; j < tableObj.rows.length; j++) {

                var model = agent.Eles[tableObj.rows[j].cells[5].children[0].getAttribute("xform_xele_index")].getValue();   //型号
                if (arr.indexOf(model) > -1) { }
                else
                    arr.push(model);
            }
            //alert(arr.length);
            for (var k = 0; k < arr.length; k++) {

                var number = 0;
                for (var i = 1; i < tableObj.rows.length; i++) {    //遍历Table的所有Row //遍历Row中的每一列
                    var model = agent.Eles[tableObj.rows[i].cells[5].children[0].getAttribute("xform_xele_index")].getValue();   //型号
                    var num = parseInt(agent.Eles[tableObj.rows[i].cells[7].children[0].getAttribute("xform_xele_index")].getValue());     //数量
                    if (model == arr[k])
                    {
                        number = parseInt(number) + num;
                    }
                }
                //alert(number);
                str += arr[k] + ";" + number + "/";
            }

            //备注信息
            obj_param["remark"] = str;
            obj_param["jtw"] = "测试仪器";//寄托物

            //包裹数
            obj_param["PackNumber"] = agent.Eles[document.getElementById("XTextBox24").getAttribute("xform_xele_index")].getValue();
            if (obj_param["PackNumber"] == "") { Ext.Msg.alert("提示", "包装件数不能为空！"); return false; }

            //发运时效
            var radio1_0 = document.getElementById("XRadioButtonList1_0");
            var radio1_1 = document.getElementById("XRadioButtonList1_1");
            var radio1_2 = document.getElementById("XRadioButtonList1_2");

            if (radio1_0.checked == true) {
                obj_param["DeliveryWay"] = "次日达";
            }
            if (radio1_1.checked == true) {
                obj_param["DeliveryWay"] = "隔日达";
            }
            if (radio1_2.checked == true) {
                obj_param["DeliveryWay"] = "普货";
            }


            if (obj_param["DeliveryWay"] == "" || obj_param["DeliveryWay"] == "undefined" || obj_param["DeliveryWay"] == null) {
                Ext.Msg.alert("提示", "请选择发运时效！");
                return false;
            }
            obj_param["YJType"] = "物资";
            //运单打印
            WaybillOrder(obj_param);
        }


        function PrintTD() {
            var temp = document.getElementById('XLabel1').innerText;
            window.open("增值销售出库单(套打).aspx?serialNum=" + temp);
        }

        function PrintNTD() {
            var temp = document.getElementById('XLabel1').innerText;
            window.open("增值销售出库单(非套打).aspx?serialNum=" + temp);
        }

        //签收单 XTextBox20
        function signRead() {
            var sign = agent.Eles[document.getElementById("txt_SignPath").getAttribute("xform_xele_index")].getValue();
            if (sign != "") {
                YZSoft.Ajax.request({
                    async: false,
                    url: YZSoft.$url('Oimec/ApiServices/LogisticsAPIHandler.ashx'),
                    params: {
                        method: 'GetOssImgUrl',
                        SignPath: sign
                    },
                    success: function (action) {
                        var data = action.result;
                        window.open(data.imgurl, null, 'width=600,height=400,top=100px,left=0px')
                    },
                    failure: function (response) {
                    }
                });
            }
        }

        //下载签收单
        function signDownload() {
            var deliveryNum = agent.Eles[document.getElementById("XTextBox5").getAttribute("xform_xele_index")].getValue();
            var sign = agent.Eles[document.getElementById("txt_SignPath").getAttribute("xform_xele_index")].getValue();
            var url = YZSoft.$url('Oimec/ApiServices/LogisticsAPIHandler.ashx');
            YZSoft.src.ux.File.download(url, {
                method: 'DownloadToAliOss',
                SignPath: sign,
                deliveryNum: deliveryNum
            });

        }

        //序列号自动换行
        function Serial_OnChange(e) {
            var name = $(e).attr("name");
            var nextRowName = $(e).parent().parent().next().find("div[name=" + name + "]").find("input")[0];
            if (nextRowName != undefined) {
                nextRowName.focus();
            }
        }

    </script>
</head>
<body>
    <form runat="server">
        <div id="div_print" style="DISPLAY: none">
        </div>
        <!-- Insert content here -->
        <table width="1200" align="center" class="head" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="logo">
                    </td>
                    <td class="biaoti">
                        <asp:Label id="Label1" runat="server" text="增值销售出库处理单"></asp:Label></td>
                    <td class="formno">
                        <asp:Label id="Label2" runat="server" text="表单号："></asp:Label>
                        <aspxform:XLabel id="XLabel1" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.FormNo" BackColor="#8AB3DF" Text="--系统自动生成--"></aspxform:XLabel>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="25" colspan="3">
                        <asp:Label id="Label10" runat="server" text="标记*的为申请人必填项" forecolor="Red" font-bold="True"></asp:Label>&nbsp; <asp:Label id="Label26" runat="server" text="标记为*的为出货地的仓库主管人员上传" forecolor="Blue" font-bold="True"></asp:Label>&nbsp;&nbsp;</td>
                    <td align="right" colspan="1">
                        <aspxform:XButton id="XButton4" runat="server" Text=" 打印快递单" OnClientClick="Print_Waybill()"></aspxform:XButton>
                        &nbsp; 
                        <aspxform:XButton id="XButton1" runat="server" Text="打印【套打】" XClass="YZSoft.Forms.Field.Button" OnClientClick="PrintTD()" UseSubmitBehavior="False" Height="23px"></aspxform:XButton>
                        &nbsp;<aspxform:XButton id="XButton2" runat="server" Text="打印【非套打】" OnClientClick="PrintNTD()" Height="23px"></aspxform:XButton>
                    </td>
                </tr>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="Label3" runat="server" text="基本信息"></asp:Label>
                        <aspxform:XTextBox id="XTextBox43" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.TaskID" Width="64px" Min="0" Max="0" HiddenInput="True" BorderColor="Gainsboro" BorderWidth="1px"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox33" runat="server" XDataBind="varState" Width="64px" Min="0" Max="0" HiddenInput="True" BorderColor="Gainsboro" BorderWidth="1px"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td width="131" height="24" class="tsbottomlabel">
                        <asp:Label id="Label4" runat="server" text="创建用户"></asp:Label>
                        <aspxform:XTextBox id="XTextBox22" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.CreateAccount" Width="20px" HiddenInput="True" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XTextBox>
                    </td>
                    <td width="534" class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox1" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.CreateName" BackColor="#E6F1F8" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                    <td width="62" class="tsbottomlabel">
                        <asp:Label id="Label11" runat="server" text="创建日期"></asp:Label></td>
                    <td width="465" class="tsbottomtext">
                        <aspxform:XDateTimePicker id="XDateTimePicker1" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.CreateDate" BackColor="#E6F1F8" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" DisplayOnly="True"></aspxform:XDateTimePicker>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label5" runat="server" text="业务员"></asp:Label>
                        <aspxform:XTextBox id="XTextBox25" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.SalesManID" Width="20px" Min="0" Max="0" HiddenInput="False" BorderColor="Gainsboro" BorderWidth="1px" HiddenExpress="1"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox2" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.SalesMan" BackColor="#E6F1F8" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel">
                    </td>
                    <td class="tsbottomtext">
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label46" runat="server" text="事业部"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox18" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.BU" BackColor="#E6F1F8" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label47" runat="server" text="所属地区"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox26" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.Area" BackColor="#E6F1F8" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                </tr>
                <tr>
                    <td height="22" class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label8" runat="server" text="SAP-SO号"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox6" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.SO" BackColor="#E6F1F8" Width="150px" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                    <td height="22" class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label6" runat="server" text="客户合同号"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox20" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.CustomerContractNo" BackColor="#E6F1F8" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="22" class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label15" runat="server" text="SAP交货单号"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox5" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.DeliveryFormNo" BackColor="#E6F1F8" Width="150px" Min="0" Max="0" HiddenInput="False" BorderColor="Gainsboro" BorderWidth="1px" DisableBehavior="ReadOnly" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label49" runat="server" text="SAP物料凭证号"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox27" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.MBLNR" BackColor="#E6F1F8" Width="200px" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True"></aspxform:XTextBox>
                        <%--<aspxform:XButton id="XButton3" runat="server" Text="更新数据" OnClientClick="UpdateData()" Height="22px" Width="70px" HiddenExpress="Global.StepName=='物资出库审核员审核'"></aspxform:XButton>--%>
                        <aspxform:XCustomBrowserButton id="XCustomBrowserButton1" runat="server" Text="更新数据" XClass="Oimec.Dialogs.DeliveryInfoButton" Height="22px" Width="70px" Filter="DeliveryFormNo->DF_SD_IncrementDelivery_Info.DeliveryFormNo,Plant->DF_SD_IncrementDelivery_Detail.Plant" AppendMode="ClearAndAppend" DataMap="DeliveryLineNum->DF_SD_IncrementDelivery_Detail.DeliveryLineNum;Plant->DF_SD_IncrementDelivery_Detail.Plant;Storage->DF_SD_IncrementDelivery_Detail.Storage;PrdtSAPID->DF_SD_IncrementDelivery_Detail.PrdtSAPID;ProductModel->DF_SD_IncrementDelivery_Detail.ProductModel;ProductName->DF_SD_IncrementDelivery_Detail.ProductName;Number->DF_SD_IncrementDelivery_Detail.Number;BatchCode->DF_SD_IncrementDelivery_Detail.BatchCode;IsBatch->DF_SD_IncrementDelivery_Detail.IsBatch;SerialNo->DF_SD_IncrementDelivery_Detail.SerialNo;SerialCode->DF_SD_IncrementDelivery_Detail.SerialCode;LineItemCategory->DF_SD_IncrementDelivery_Detail.LineItemCategory"></aspxform:XCustomBrowserButton>
                    </td>
                </tr>
                <tr>
                    <td height="22" class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label36" runat="server" text="发货日期"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XDateTimePicker id="XDateTimePicker2" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.SendGoodsDate" BackColor="#E6F1F8" Width="150px" BorderColor="#DCDCDC" BorderWidth="1" DisplayOnly="True"></aspxform:XDateTimePicker>
                    </td>
                    <td height="22" class="tsbottomlabel" style="WIDTH: 10%">
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                    </td>
                </tr>
                <tr>
                </tr>
                <tr>
                    <td height="24" class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label19" runat="server" text="收货公司名称"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox8" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.UserCompanyName" BackColor="#E6F1F8" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label23" runat="server" text="联系人"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox9" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.Contact" BackColor="#E6F1F8" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label21" runat="server" text="发运详细地址"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox19" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.Province" BackColor="#E6F1F8" Width="100px" BorderColor="#DCDCDC" BorderWidth="1" ReadOnly="True"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox34" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.City" BackColor="#E6F1F8" Width="100px" BorderColor="#DCDCDC" BorderWidth="1" ReadOnly="True"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox10" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.SendGoodsAddr" BackColor="#E6F1F8" Width="250px" BorderColor="#DCDCDC" BorderWidth="1" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label25" runat="server" text="电话"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox11" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.Phone" BackColor="#E6F1F8" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label50" runat="server" text="邮编"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox28" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.Code" BackColor="#E6F1F8" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        &nbsp;<asp:Label id="Label13" runat="server" text="手机"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox37" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.MobilePhone" BackColor="#E6F1F8" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table align="center" class="table" id="tablenew" style="WIDTH: 1200px" border="0" cellspacing="0" cellpadding="0" menudock="Left" dynamicarea="1,1" xdatasource="Filter:DF_SD_IncrementDelivery_Detail.DeliveryLineNum">
            <tbody>
                <tr align="center">
                    <td class="tds" style="HEIGHT: 16px; WIDTH: 50px">
                        <asp:Label id="Label27" runat="server" text="序号"></asp:Label></td>
                    <td class="tds" style="HEIGHT: 16px; WIDTH: 80px">
                        <asp:Label id="Label9" runat="server" text="交货单行号"></asp:Label></td>
                    <td class="tds" style="WIDTH: 60px">
                        <asp:Label id="Label28" runat="server" text="工厂"></asp:Label></td>
                    <td class="tds" style="WIDTH: 80px">
                        <asp:Label id="Label29" runat="server" text="SAP库存地"></asp:Label></td>
                    <td class="tds" style="WIDTH: 150px">
                        <asp:Label id="Label30" runat="server" text="销售产品SAPID"></asp:Label></td>
                    <td class="tds" style="WIDTH: 150px">
                        <asp:Label id="Label31" runat="server" text="产品型号"></asp:Label></td>
                    <td class="tds" style="WIDTH: 150px">
                        <asp:Label id="Label32" runat="server" text="产品名称"></asp:Label></td>
                    <td class="tds" style="WIDTH: 40px">
                        <asp:Label id="Label33" runat="server" text="数量"></asp:Label></td>
                    <td class="tds" style="WIDTH: 140px">
                        <asp:Label id="Label7" runat="server" text="批次"></asp:Label></td>
                    <td class="tds" style="WIDTH: 140px">
                        <asp:Label id="Label12" runat="server" text="序列号"></asp:Label></td>
                    <td class="tds" style="WIDTH: 100px">
                        <asp:Label id="Label34" runat="server" text="行项目类别"></asp:Label></td>
                </tr>
                <tr align="center">
                    <td class="tds1">
                        <aspxform:XGridLineNo id="XGridLineNo1" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.LineItemNo" Width="100%" BorderWidth="1" TextAlign="Center" BorderStyle="None">1</aspxform:XGridLineNo>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox4" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.DeliveryLineNum" BackColor="#E6F1F8" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True" TextAlign="Center"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox3" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.Plant" BackColor="#E6F1F8" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True" TextAlign="Center"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox7" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.Storage" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" TextAlign="Center" DisableExpress="DF_SD_IncrementDelivery_Detail.LineItemCategory=='单独采购订单'||DF_SD_IncrementDelivery_Detail.LineItemCategory=='单独采购订单(免费）'"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox12" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.PrdtSAPID" BackColor="#E6F1F8" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True" TextAlign="Center"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox13" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.ProductModel" BackColor="#E6F1F8" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox14" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.ProductName" BackColor="#E6F1F8" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox15" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.Number" BackColor="#E6F1F8" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True" TextAlign="Center"></aspxform:XTextBox>
                    </td>
                    <td class="tds1" style="HEIGHT: auto; BORDER-RIGHT-WIDTH: 1px">
                        <aspxform:XTextBox id="XTextBox29" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.BatchCode" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" DisableExpress="DF_SD_IncrementDelivery_Detail.LineItemCategory=='单独采购订单'||DF_SD_IncrementDelivery_Detail.LineItemCategory=='单独采购订单(免费）'||(DF_SD_IncrementDelivery_Detail.LineItemCategory!='单独采购订单' &amp;&amp; DF_SD_IncrementDelivery_Detail.LineItemCategory!='单独采购订单(免费）' &amp;&amp; DF_SD_IncrementDelivery_Detail.IsBatch!='X')||varState=='Edit'"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox31" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.IsBatch" HiddenInput="True" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XTextBox>
                    </td>
                    <td class="tds1" style="HEIGHT: auto; BORDER-RIGHT-WIDTH: 1px">
                        <aspxform:XTextBox id="XTextBox21" name="SerialNo" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.SerialNo" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" DisableExpress="(DF_SD_IncrementDelivery_Detail.LineItemCategory=='单独采购订单' &amp;&amp; DF_SD_IncrementDelivery_Detail.SerialCode!='Y')||(DF_SD_IncrementDelivery_Detail.LineItemCategory=='单独采购订单(免费）' &amp;&amp; DF_SD_IncrementDelivery_Detail.SerialCode!='Y')||&#13;&#10;(DF_SD_IncrementDelivery_Detail.LineItemCategory!='单独采购订单' &amp;&amp; DF_SD_IncrementDelivery_Detail.LineItemCategory!='单独采购订单(免费）' &amp;&amp; DF_SD_IncrementDelivery_Detail.SerialCode=='')||varState=='Edit'" OnChange="Serial_OnChange(this)"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox30" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.SerialCode" HiddenInput="True" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox16" runat="server" XDataBind="DF_SD_IncrementDelivery_Detail.LineItemCategory" BackColor="#E6F1F8" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" DisableBehavior="ReadOnly" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator7" runat="server" DisableExpress="DF_SD_IncrementDelivery_Detail.SerialCode==''" ForeColor="Red" ErrorMessage="请填写序列号" ControlToValidate="XTextBox21" ValidationGroup="sb"></aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator id="XRequiredFieldValidator8" runat="server" DisableExpress="DF_SD_IncrementDelivery_Detail.IsBatch!='X'" ForeColor="Red" ErrorMessage="请填写批次编号" ControlToValidate="XTextBox29" ValidationGroup="sb"></aspxform:XRequiredFieldValidator>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="1200" class="title1">
                        <asp:Label id="Label35" runat="server" text="拒绝原因"></asp:Label></td>
                </tr>
                <tr>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox17" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.RejectReason" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" TextMode="MultiLine" Rows="3"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator1" runat="server" ForeColor="Red" ErrorMessage="请填写拒绝原因" ControlToValidate="XTextBox17" ValidationGroup="reject"></aspxform:XRequiredFieldValidator>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label37" runat="server" text="发运要求"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 80%" colspan="3">
                        <aspxform:XCheckBoxList id="XCheckBoxList1" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.ShippingRequirements" DisableExpress="1" RepeatDirection="Horizontal">
                            <asp:ListItem>次日达</asp:ListItem>
                            <asp:ListItem>签收单、运单备注客户PO号</asp:ListItem>
                            <asp:ListItem>用户指定文件需要随货发运</asp:ListItem>
                            <asp:ListItem>周末可正常送货</asp:ListItem>
                        </aspxform:XCheckBoxList>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label17" runat="server" text="*" forecolor="Red" font-bold="True"></asp:Label>&nbsp; <asp:Label id="Label14" runat="server" text="物流公司"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XDropDownList id="XDropDownList3" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.LogisticsCompany" Width="50%" DisableExpress="Global.StepName!='销售出库管理员执行发货'" PromptText="---请选择---" XDataSource="TableName:V_LogisCompany" ValueColumn="Name" DisplayColumn="Name"></aspxform:XDropDownList>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label16" runat="server" text="*" forecolor="Red" font-bold="True"></asp:Label>&nbsp; <asp:Label id="Label39" runat="server" text="发运时效"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XRadioButtonList id="XRadioButtonList1" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.SendGoodsWay" DisableExpress="Global.StepName!='销售出库管理员执行发货'" RepeatDirection="Horizontal">
                            <asp:ListItem>次日达</asp:ListItem>
                            <asp:ListItem>隔日达</asp:ListItem>
                            <asp:ListItem>普货</asp:ListItem>
                        </aspxform:XRadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td height="16" class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label18" runat="server" text="*" forecolor="Red" font-bold="True"></asp:Label>&nbsp; <asp:Label id="Label41" runat="server" text="运单号"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="txt_mailno" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.WaybillNo" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" DisableExpress="Global.StepName!='销售出库管理员执行发货'" TextMode="MultiLine"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label22" runat="server" text="*" forecolor="Red" font-bold="True"></asp:Label>&nbsp; <asp:Label id="Label43" runat="server" text="包装件数"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox24" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.PackNumber" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" DisableExpress="Global.StepName!='销售出库管理员执行发货'"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="16" class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label52" runat="server" text="签回单"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        <aspxform:XRadioButtonList id="XRadioButtonList2" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.SignReceipt" DisableExpress="Global.StepName!='销售出库管理员执行发货'" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True">是</asp:ListItem>
                            <asp:ListItem>否</asp:ListItem>
                        </aspxform:XRadioButtonList>
                    </td>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        &nbsp;</td>
                    <td class="tsbottomtext" style="WIDTH: 35%">
                        &nbsp;</td>
                </tr>
            </tbody>
        </table>
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator2" runat="server" ForeColor="Red" ErrorMessage="请选择物流公司" ControlToValidate="XDropDownList3" ValidationGroup="sb"></aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator id="XRequiredFieldValidator3" runat="server" ForeColor="Red" ErrorMessage="请选择发运时效" ControlToValidate="XRadioButtonList1" ValidationGroup="sb"></aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator id="XRequiredFieldValidator4" runat="server" ForeColor="Red" ErrorMessage="请填写运单号" ControlToValidate="txt_mailno" ValidationGroup="sb"></aspxform:XRequiredFieldValidator>
        &nbsp;<aspxform:XRequiredFieldValidator id="XRequiredFieldValidator5" runat="server" ForeColor="Red" ErrorMessage="请填写包装件数" ControlToValidate="XTextBox24" ValidationGroup="sb"></aspxform:XRequiredFieldValidator>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        &nbsp;<asp:Label id="Label45" runat="server" text="签收单上传"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 80%" colspan="3">
                        <aspxform:XAttachments id="XAttachments1" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.Attachment" Width="100%" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.jpg;*.gif;*.png"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label20" runat="server" text="其他附件"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 80%" colspan="3">
                        <aspxform:XAttachments id="XAttachments2" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.OtherAttachment" Width="100%" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.jpg;*.gif;*.png"></aspxform:XAttachments>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="145" class="tsbottomlabel" style="WIDTH: 22%">
                        阿里云签收单(东方签收单/客户签收单)&nbsp;<aspxform:XTextBox id="txt_SignPath" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.SignPath" Width="50px" HiddenInput="True" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XTextBox>
                    </td>
                    <td width="1051" class="tsbottomtext" style="WIDTH: 77%">
                        <div id="div_sign" hiddenexpress='DF_SD_IncrementDelivery_Info.SignPath==""'>
                            <input id="btn_read" onclick="signRead()" type="button" value="查看" />&nbsp; 
                            <input id="btn_download" onclick="signDownload()" type="button" value="下载" />
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="1200" class="title1">
                        <asp:Label id="Label24" runat="server" text="备注"></asp:Label></td>
                </tr>
                <tr>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox32" runat="server" XDataBind="DF_SD_IncrementDelivery_Info.Remark" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" TextMode="MultiLine" Rows="5"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="1200">
                        <aspxform:XSignTrace id="XSignTrace1" runat="server" Width="1200px" BorderColor="#dcdcdc" BorderWidth="1"></aspxform:XSignTrace>
                    </td>
                </tr>
            </tbody>
        </table>
        <script src="../../../../Oimec/Dialogs/Waybill.js"></script>
    </form>
</body>
</html>
