<%@ 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)
    {
        if (!IsPostBack)
        { //首次加载
            string formart = Request.QueryString["formstate"];
            this.txtState.Text = formart;
            string PO = Request.QueryString["PO"];
            string ContractNo = Request.QueryString["ContractNo"];
            string VContractDate = Request.QueryString["VContractDate"];
            string CustomerDate = Request.QueryString["CustomerDate"];
            string SupplierName = Request.QueryString["SupplierName"];
            string SupplierSAPID = Request.QueryString["supplierSAPID"];
            this.XTextBox6.Text = Request.QueryString["companyCode"];
            this.XTextBox1.Text = ContractNo;
            this.XTextBox3.Text = PO;
            this.XTextBox8.Text = VContractDate;
            this.XTextBox11.Text = CustomerDate;
            this.XTextBox10.Text = SupplierName;
            this.XTextBox2.Text = SupplierSAPID.TrimStart('0');
            
        }
    
    }

</script>
<html xmlns:xform="xmlns:xform">
<head runat="server">
    <link href="/Oimec/Styles/css/StyleSheet.css" rel="Stylesheet" type="text/css" />
    <title>BPM Form</title> <style>
    BODY {FONT-SIZE: 12px; FONT-FAMILY: verdana}
    TABLE {border-collapse: collapse; FONT-SIZE: 12px; FONT-FAMILY: verdana}
    P {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-SIZE: 12px; FONT-FAMILY: verdana}
    TD {PADDING-RIGHT: 0px; PADDING-LEFT: 2px; PADDING-BOTTOM: 0px}
    TD.NoPadding {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px}
    INPUT {HEIGHT: 20px}
    INPUT.UL {BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: #33ff33 1px solid}
    TEXTAREA {FONT-SIZE:12px}
    </style>
  
    <script>

        // 发起到货通知 全选
        function selectAll(text)
        {
            if (text == "全选")
            {
                var aDivNewPurchaseDetailXck = document.getElementsByClassName("NewPurchaseArrivalXck");//是否选中  
                for (var i = 0; i < aDivNewPurchaseDetailXck.length; i++) {
                    var div = aDivNewPurchaseDetailXck[i];
                    var id = div.getElementsByTagName('input')[0].id;
                    document.getElementById(id).checked = true;
                    document.getElementById("btnSelect").value = "取消全选";
                }
            }
            else {
                var aDivNewPurchaseDetailXck = document.getElementsByClassName("NewPurchaseArrivalXck");//是否选中  
                for (var i = 0; i < aDivNewPurchaseDetailXck.length; i++) {
                    var div = aDivNewPurchaseDetailXck[i];
                    var id = div.getElementsByTagName('input')[0].id;
                    document.getElementById(id).checked = false;
                    document.getElementById("btnSelect").value = "全选";
                }
            }
            
        }


        function getXValue(id) {
            return agent.Eles[document.getElementById(id).getAttribute("xform_xele_index")].getValue();
        }

        function setXValue(id, value) {
            agent.Eles[document.getElementById(id).getAttribute("xform_xele_index")].setValue(value);
        }
        function getElementId(name, i, htmltag) {
            var divs = document.getElementsByName(name);
            var div = divs[i];
            var id = div.getElementsByTagName(htmltag)[0].id;
            return id;

        }

        Ext.onReady(function () {
            var formstate = getXValue("txtState");
            if (formstate == "New") {
                GetProductDetailsInfo();
            }

            //提交事件
            agent.on('beforeSubmit', function (name, name1) {

                //保存数据到SAP-HANA
                var objArr = GetTrackInfo();
                if (objArr != "" && objArr != null) {

                    var list = JSON.stringify(objArr);
                    var url = YZSoft.$url('Oimec/ApiServices/SRMAPIHandler.ashx');
                    //跟单记录
                    YZSoft.Ajax.request({
                        async: true,
                        url: url,
                        method: 'POST',
                        params: { method: "InsertTrackInfo", arrs: list },
                        dataType: "json",
                        contentType: "application/json",
                        success: function (ac) {
                            console.log(ac.responseText);
                            //alert(ac.responseText);
                            var res = ac.responseText;
                        }
                    });
                    //SAP-PO行更新交货日期
                    YZSoft.Ajax.request({
                        async: true,
                        url: url,
                        method: 'POST',
                        params: { method: "UpdateSAPDeliveryDate", arrs: list },
                        dataType: "json",
                        contentType: "application/json",
                        success: function (ac) {
                            console.log(ac.responseText);
                            //alert(ac.responseText);
                            var res = ac.responseText;
                        }
                    });

                    //查找勾选的行项目 需要发起到货通知
                    var arr = GetPrdtInfo('tablenew');
                    if (arr != "" && arr != null) {
                        var ll = JSON.stringify(arr);
                        //获取抬头信息    公司代码、采购币种
                        var name = getXValue("txtName");
                        var account = getXValue("txtAccount");
                        var contractNo = getXValue("XTextBox1");
                        var vendor = getXValue("XTextBox10");
                        var companyCode = getXValue("XTextBox6");
                        //XRadioButtonList1_0  XRadioButtonList1_1
                        var IsConfirmReceivePlace = '';
                        var radio1 = document.getElementById("XRadioButtonList1_0");//是
                        var radio2 = document.getElementById("XRadioButtonList1_1");
                        if (radio1 == true) {
                            IsConfirmReceivePlace = "是";
                        }
                        else {
                            IsConfirmReceivePlace = "否";
                        }

                        if (IsConfirmReceivePlace == "") {
                            Ext.MessageBox.alert("提示", "请选择是否需要物资确认收货地");
                            return false;
                        }
                        var waybillNo = getXValue("XTextBox9");
                        var url = YZSoft.$url('Oimec/ApiServices/SRMAPIHandler.ashx');
                        var parm = {
                            method: "CreateArrivalProc",
                            companyCode: companyCode,
                            currency: 'CNY',
                            createName: name,
                            createAccount: account,
                            contractNo: contractNo,
                            vendor: vendor,
                            IsConfirmReceivePlace: IsConfirmReceivePlace,
                            wayBillNo: waybillNo,
                            arrs: ll
                        }

                        YZSoft.Ajax.request({
                            async: false,
                            url: url,
                            method: 'POST',
                            params: parm,
                            dataType: "json",
                            contentType: "application/json",
                            success: function (ac) {
                                console.log(ac.responseText);
                                //alert(ac.responseText);
                                var res = ac.responseText;


                                //更新存储PO行号的实际发货日期
                                YZSoft.Ajax.request({
                                    async: true,
                                    url: url,
                                    method: 'POST',
                                    params: { method: "UpdateDeliveryDate", arrs: ll },
                                    dataType: "json",
                                    contentType: "application/json",
                                    success: function (ac) {
                                        console.log(ac.responseText);
                                        //alert(ac.responseText);
                                        var res = ac.responseText;
                                    }
                                });

                            }
                        });
                    }
                }
            });
         
        });

        //跟单明细记录
        function GetTrackInfo() {
            var tableObj = document.getElementById("detail");
            var arr = [];

            var createName = getXValue("txtName"); //创建人
            var createID = getXValue("txtAccount"); //创建账号

            var divsExpectSendDate = document.getElementsByName("ExpectSendDate");
            var divsExceptDate = document.getElementsByName("ExpectedArrivalDate");
            var divsNextTrackDate = document.getElementsByName("NextTrackDate");
            var aDivOverseasDelivery = document.getElementsByClassName("OverseasDelivery");//是否境外发货  
            for (var i = 2; i < tableObj.rows.length ; i++) {    //遍历Table的所有Row
                var obj = {};

                //PO号
                var idPurchaseOrder = getElementId("PurchaseOrder", i - 2, "input");
                var PurchaseOrderV = document.getElementById(idPurchaseOrder).value;
                obj["PurchaseOrder"] = PurchaseOrderV;
                
                //PO行项目号
                var idPOROW = getElementId("POROW", i - 2, "input");
                var POROWV = document.getElementById(idPOROW).value;
                obj["POROW"] = POROWV;

                // 产品SAPID
                var idPrdtSAPID = getElementId("ProductSAPID", i - 2, "input");
                var PrdtSAPIDV = document.getElementById(idPrdtSAPID).value;
                obj["ProductSAPID"] = PrdtSAPIDV;

                //产品型号
                var idProductModel = getElementId("PrdtModel", i - 2, "input");
                var ProductModelV = document.getElementById(idProductModel).value;
                obj["PrdtModel"] = ProductModelV;

                //产品名称
                var idProductName = getElementId("PrdtName", i - 2, "input");
                var ProductNameV = document.getElementById(idProductName).value;
                obj["PrdtName"] = ProductNameV;

                //预计发货日期

                var divExpectSendDate = divsExpectSendDate[i - 2];
                var idvExpectSendDate = divExpectSendDate.getElementsByTagName('input')[0].value;

                obj["ExpectSendDate"] = idvExpectSendDate;
                if (idvExpectSendDate == "") {
                    Ext.MessageBox.alert('提示', '请填写预计发货日期');
                    return false;
                }
              
                //预计到货日期                
                var divExpectedArrivalDate = divsExceptDate[i - 2];
                var idvExpectedArrivalDate = divExpectedArrivalDate.getElementsByTagName('input')[0].value;

                obj["ExpectedArrivalDate"] = idvExpectedArrivalDate;
                if (idvExpectedArrivalDate == "") {
                    Ext.MessageBox.alert('提示', '请填写预计到货日期');
                    return false;
                }

                //下次跟单日期               
                var divNextTrackDate = divsNextTrackDate[i - 2];
                var idvNextTrackDate = divNextTrackDate.getElementsByTagName('input')[0].value;

                obj["NextTrackDate"] = idvNextTrackDate;
                if (idvNextTrackDate == "") {
                    Ext.MessageBox.alert('提示', '请填写下次跟单日期');
                    return false;
                }
                //到货状态
                var idRemark = getElementId("ArrvialState", i - 2, "select");
                var RemarkV = document.getElementById(idRemark).value;
                obj["ArrvialState"] = RemarkV;

                //未按时交货原因
                var idRemark = getElementId("NoArrvialReasonOnTime", i - 2, "input");
                var RemarkV = document.getElementById(idRemark).value;
                obj["NoArrvialReasonOnTime"] = RemarkV;

                //未按数量交货原因
                var idUnitPrice = getElementId("NoArrvialReasonOnNum", i - 2, "input");
                var UnitPriceV = document.getElementById(idUnitPrice).value;
                obj["NoArrvialReasonOnNum"] = UnitPriceV;

                //延迟或提前原因
                var idTotalPrice = getElementId("ArrivalGoodsAdvanceOrDelay", i - 2, "input");
                var TotalPriceV = document.getElementById(idTotalPrice).value;
                obj["ArrivalGoodsAdvanceOrDelay"] = TotalPriceV;

                //境外发货
               
                var div = aDivOverseasDelivery[i - 2];
                var id = div.getElementsByTagName('input')[0].id;
                var v = document.getElementById(id).checked;

                //var div = aDivOverseasDelivery[i - 2];//获取到input
                //var v = div.checked;
                if (v) {
                    obj["OverseasDelivery"] = "1";
                }
                else {
                    obj["OverseasDelivery"] = "0";
                }

                obj["CreateName"] = createName;
                obj["CreateID"] = createID;

                arr.push(obj);
            }

            return arr;
        }

        // 获取待跟单信息
        function GetProductDetailsInfo() {

            //根据PO号获取产品信息
            var strPO = getXValue("XTextBox3");
           
            var url = YZSoft.$url('Oimec/ApiServices/SRMAPIHandler.ashx');
            YZSoft.Ajax.request({
                async: false,
                url: url,
                method: 'POST',
                params: {
                    method: 'GetTrackDetail',
                    po: strPO
                },
                success: function (action) {
                    var res = action.result; //返回的信息数据
                    //alert(res);
                    //alert(res.count);
                    var data = res.list;

                    var rv = new Array();
                    if (res.count > 0) {

                        //数据dataMap
                        for (var i = 0; i < data.length; i++) {
                            var item = data[i];
                            rv.push({
                                PO: item.EBELN,
                                POROW: item.EBELP,
                                PrdtSAPID: item.MATNR,
                                PrdtModel: item.ZCPXH,
                                PrdtName: item.MAKTX,
                                ExpectSendDate: item.ExpectedDeliveryDate,
                                Remark: item.Remark,
                                OverseasDelivery: item.OVERSEASDELIVERY,
                                LastTrackDate: item.NEXTTRACKDATE,
                                SO: item.VBELN,
                                SellCustomer: item.SDF,
                                Salsman: item.AFNAM,
                                PurchaseNumber: item.MENGE,
                                ToBeArrivalNumber: item.NRecieveNumber
                            });
                        }

                        var table = agent.findGridFromTableName(null, 'DF_MM_TrackPurchaseOrders_Detail'); //获取table对象
                        if (table == undefined) return;
                        table.deleteBlocks(0, 1); //删除现有table行
                        table.appendBlock(data.length);//重新添加行


                        //对行进行赋值
                        for (var i = 0; i < rv.length; i++) {
                            var item = rv[i];

                            //索引行对应控件赋值
                            var block = table.Blocks[i];

                            for (var e = 0; e < block.Eles.length; e++) {
                                var xel = block.Eles[e];
                                var et = xel.getEleType();

                                if (!et.DataBind)
                                    continue;

                                var cname = et.DataBind.DataColumn.ColumnName;//对应字段名
                                for (var obj in item) {
                                    if (cname == obj) {
                                        var value = item[obj];
                                        xel.setValue(value);
                                        XFormOnChange(xel);
                                    }
                                }
                            }

                        }

                    }
                },
                failure: function (action) {
                }
            });

        }

        function copyLine(tableid,column) {
            var table = document.getElementById(tableid);
            //alert(agent.Eles[table.rows[2].cells[16].children[0].getAttribute("xform_xele_index")]);
            var obj = agent.Eles[table.rows[2].cells[column].children[0].getAttribute("xform_xele_index")].getValue();
            for (var i = 3; i < table.rows.length ; i++) {
                agent.Eles[table.rows[i].cells[column].children[0].getAttribute("xform_xele_index")].setValue(obj);
                XFormOnChange(agent.Eles[table.rows[i].cells[column].children[0].getAttribute("xform_xele_index")]);
            }
        }

        //获取产品信息明细
        function GetPrdtInfo(tableid)
        {
            var tableObj = document.getElementById(tableid);
            var arr = [];
            var aDivNewPurchaseDetailXck = document.getElementsByClassName("NewPurchaseArrivalXck");//是否选中  

            for (var i = 2; i < tableObj.rows.length ; i++) {    //遍历Table的所有Row
                var obj = {};

                //是否选中
                var div = aDivNewPurchaseDetailXck[i - 2];
                var id = div.getElementsByTagName('input')[0].id;
                var v = document.getElementById(id).checked;

                if (v)//勾选"发起到货"
                {
                    //PO号
                    var idPO = getElementId("PO", i - 2, "input");
                    var POV = document.getElementById(idPO).value;
                    obj["PO"] = POV;
                    //PO行项目号
                    var idPOLineNum = getElementId("POLineNum", i - 2, "input");
                    var POLineNumV = document.getElementById(idPOLineNum).value;
                    obj["POLineNum"] = POLineNumV;

                    // 产品SAPID
                    var idPrdtSAPID = getElementId("PrdtSAPID", i - 2, "input");
                    var PrdtSAPIDV = document.getElementById(idPrdtSAPID).value;
                    obj["PrdtSAPID"] = PrdtSAPIDV;

                    //产品型号
                    var idProductModel = getElementId("ProductModel", i - 2, "input");
                    var ProductModelV = document.getElementById(idProductModel).value;
                    obj["ProductModel"] = ProductModelV;

                    //产品名称
                    var idProductName = getElementId("ProductName", i - 2, "input");
                    var ProductNameV = document.getElementById(idProductName).value;
                    obj["ProductName"] = ProductNameV;

                    //厂商名称
                    var idManufacturerName = getElementId("ManufacturerName", i - 2, "input");
                    var ManufacturerNameV = document.getElementById(idManufacturerName).value;
                    obj["ManufacturerName"] = ManufacturerNameV;

                    //厂商id
                    var idManufactureID = getElementId("ManufactureID", i - 2, "input");
                    var ManufactureIDV = document.getElementById(idManufactureID).value;
                    obj["ManufactureID"] = ManufactureIDV;

                    //计划到货数量
                    var idUpPlanAOGNumber = getElementId("UpPlanAOGNumber", i - 2, "input");
                    var UpPlanAOGNumberV = document.getElementById(idUpPlanAOGNumber).value;

                    if (UpPlanAOGNumberV <= 0) {
                        Ext.MessageBox.alert('提示', '计划到货数量必须大于0');
                        return false;
                    }

                    obj["UpPlanAOGNumber"] = UpPlanAOGNumberV;

                    //计划到货数量
                    var idPlanAOGNumber = getElementId("PlanAOGNumber", i - 2, "input");
                    var PlanAOGNumberV = document.getElementById(idPlanAOGNumber).value;
                    obj["PlanAOGNumber"] = PlanAOGNumberV;

                    if (PlanAOGNumberV < UpPlanAOGNumberV) {
                        Ext.MessageBox.alert('提示', '计划到货数量不能大于默认值');
                        return false;
                    }

                    //工厂
                    var idPlant = getElementId("Plant", i - 2, "input");
                    var PlantV = document.getElementById(idPlant).value;
                    obj["Plant"] = PlantV;

                    //工厂名称
                    var idPlantName = getElementId("PlantName", i - 2, "input");
                    var PlantNameV = document.getElementById(idPlantName).value;
                    obj["PlantName"] = PlantNameV;

                    //计划收货地
                    var idPlanReceivePlance = getElementId("PlanReceivePlance", i - 2, "input");
                    var PlanReceivePlanceV = document.getElementById(idPlanReceivePlance).value;
                    obj["PlanReceivePlance"] = PlanReceivePlanceV;

                    //实际收货地
                    var idRealReceivePlance = getElementId("RealReceivePlance", i - 2, "select");
                    var PurchaseCurrencyV = document.getElementById(idRealReceivePlance).value;
                    obj["RealReceivePlance"] = PurchaseCurrencyV;

                    //实际收货地
                    var idRealReceivePlanceOld = getElementId("RealReceivePlanceOld", i - 2, "input");
                    var RealReceivePlanceOldV = document.getElementById(idRealReceivePlanceOld).value;
                    obj["RealReceivePlanceOld"] = RealReceivePlanceOldV;

                    //实际收货地id
                    var idRealReceivePlanceID = getElementId("RealReceivePlanceID", i - 2, "input");
                    var RealReceivePlanceIDV = document.getElementById(idRealReceivePlanceID).value;
                    obj["RealReceivePlanceID"] = RealReceivePlanceIDV;
                   

                    //预计到货日期
                    var idPlanAOGDate = getElementId("PlanAOGDate", i - 2, "input");
                    var PlanAOGDateV = document.getElementById(idPlanAOGDate).value;
                    obj["PlanAOGDate"] = PlanAOGDateV;

                    //采购币种
                    var idCurrency = getElementId("Currency", i - 2, "input");
                    var CurrencyV = document.getElementById(idCurrency).value;
                    obj["Currency"] = CurrencyV;

                    //业务员/备货
                    var idSalesMan = getElementId("SalesMan", i - 2, "input");
                    var SalesManV = document.getElementById(idSalesMan).value;
                    obj["SalesMan"] = SalesManV;

                    //业务员账号
                    var idSalesManID = getElementId("SalesManID", i - 2, "input");
                    var SalesManIDV = document.getElementById(idSalesManID).value;
                    obj["SalesManID"] = SalesManIDV;

                    //SO号
                    var idSO = getElementId("SO", i - 2, "input");
                    var SOV = document.getElementById(idSO).value;
                    obj["SO"] = SOV;

                    //SO行号
                    var idSOLineNumber = getElementId("SOLineNumber", i - 2, "input");
                    var SOLineNumberV = document.getElementById(idSOLineNumber).value;
                    obj["SOLineNumber"] = SOLineNumberV;

                    //付款方客户名称
                    var idSoldCustomerName = getElementId("SoldCustomerName", i - 2, "input");
                    var SoldCustomerNameV = document.getElementById(idSoldCustomerName).value;
                    obj["SoldCustomerName"] = SoldCustomerNameV;

                    //供应商交货日期
                    var idSupplierDeliveryDate = getElementId("SupplierDeliveryDate", i - 2, "input");
                    var SupplierDeliveryDateV = document.getElementById(idSupplierDeliveryDate).value;
                    obj["SupplierDeliveryDate"] = SupplierDeliveryDateV;

                    //备注
                    var idRemark = getElementId("Remark", i - 2, "input");
                    var RemarkV = document.getElementById(idRemark).value;
                    obj["Remark"] = RemarkV;

                    //单价
                    var idUnitPrice = getElementId("UnitPrice", i - 2, "input");
                    var UnitPriceV = document.getElementById(idUnitPrice).value;
                    obj["UnitPrice"] = UnitPriceV;

                    //总价
                    var idTotalPrice = getElementId("TotalPrice", i - 2, "input");
                    var TotalPriceV = document.getElementById(idTotalPrice).value;
                    obj["TotalPrice"] = TotalPriceV;

                    //实际发货日期                   
                    var divsActualDeliveryDate = document.getElementsByName("ActualDeliveryDate");
                    var idActualDeliveryDate = divsActualDeliveryDate[i - 2];
                    var ActualDeliveryDateV = idActualDeliveryDate.getElementsByTagName('input')[0].value;
                    if (ActualDeliveryDateV == "") {
                        Ext.MessageBox.alert('提示', '请填写实际发货日期');
                        return false;
                    }
                    obj["ActualDeliveryDate"] = ActualDeliveryDateV;    

                    arr.push(obj);

                }
            }

            return arr;
        }


        //修改后计划数量
        function UpPlanAOGNumber(PlanAOGNumber, IsAddLineItem, UpPlanAOGNumber) {
            if (UpPlanAOGNumber == 0) {
                if (IsAddLineItem == "1") {
                    return 0;
                }
                else {
                    return PlanAOGNumber;
                }
            }
            else { return UpPlanAOGNumber; }

        }




    </script>
</head>
<body>
    <form runat="server">
        <table width="1200" align="center" class="head" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="logo">
                    </td>
                    <td class="biaoti">
                        <asp:Label id="XLabel2" runat="server" value valuetodisplaytext text="跟单信息表"></asp:Label></td>
                    <td class="formno">
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table">
            <tbody>
                <tr>
                    <td height="24" class="title1" colspan="4">
                        <asp:Label id="XLabel1" runat="server" value valuetodisplaytext text="基本信息"></asp:Label>
                        <aspxform:XTextBox id="XTextBox4" runat="server" BackColor="#E6F1F8" HiddenInput="True" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100px" XDataBind="DF_MM_TrackPurchaseOrders.AcceptableCustomerDeliveryDate" CssClass="text"></aspxform:XTextBox>
                        <aspxform:XTextBox id="txtState" runat="server" BackColor="#E6F1F8" HiddenInput="True" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100px" XDataBind="varstate" CssClass="text"></aspxform:XTextBox>
                        <aspxform:XTextBox id="txtAccount" runat="server" BackColor="#E6F1F8" HiddenInput="True" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100px" XDataBind="DF_MM_TrackPurchaseOrders.CreateAccount" CssClass="text"></aspxform:XTextBox>
                        <aspxform:XTextBox id="txtName" runat="server" BackColor="#E6F1F8" HiddenInput="True" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100px" XDataBind="DF_MM_TrackPurchaseOrders.CreateName" CssClass="text"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox6" runat="server" BackColor="#E6F1F8" HiddenInput="True" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100px" XDataBind="varCompanyCode" CssClass="text"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel12" runat="server" value valuetodisplaytext text="采购合同号"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox1" runat="server" BackColor="#E6F1F8" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="150px" XDataBind="DF_MM_TrackPurchaseOrders.ContractNo" CssClass="text" DisableBehavior="ReadOnly" DisableExpress="1"></aspxform:XTextBox>
                    </td>
                    <td height="20" class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="Label1" runat="server" value valuetodisplaytext text="PO"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox3" runat="server" BackColor="#E6F1F8" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="150px" XDataBind="DF_MM_TrackPurchaseOrders.PO" CssClass="text" DisableBehavior="ReadOnly" DisableExpress="1"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="Label3" runat="server" value valuetodisplaytext text="供应商纸面合同日期"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox8" runat="server" BackColor="#E6F1F8" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="150px" XDataBind="DF_MM_TrackPurchaseOrders.SupplierContractDate" CssClass="text" DisableBehavior="ReadOnly" DisableExpress="1"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="Label4" runat="server" value valuetodisplaytext text="客户调整日期" forecolor="Black"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox11" runat="server" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="200px" XDataBind="DF_MM_TrackPurchaseOrders.CusDate" CssClass="text" DisableBehavior="ReadOnly" DisableExpress="1" backColor="#e6f1f8"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="XLabel5" runat="server" value valuetodisplaytext text="供应商名称" forecolor="Black"></asp:Label>
                        <aspxform:XTextBox id="XTextBox2" runat="server" HiddenInput="True" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="50px" XDataBind="DF_MM_TrackPurchaseOrders.SupplierSAPID" CssClass="text" backColor="#e6f1f8"></aspxform:XTextBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 35%" colspan="3">
                        <aspxform:XTextBox id="XTextBox10" runat="server" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="350px" XDataBind="DF_MM_TrackPurchaseOrders.SupplierName" CssClass="text" DisableBehavior="ReadOnly" DisableExpress="1" backColor="#e6f1f8"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <div align="center" id="scrollDiv2" style="OVERFLOW: scroll; BORDER-TOP: #93a1ae 1px solid; HEIGHT: auto; BORDER-RIGHT: #93a1ae 1px solid; WIDTH: 1200px; BORDER-BOTTOM: #93a1ae 1px solid; TEXT-ALIGN: center; CLEAR: both; BORDER-LEFT: #93a1ae 1px solid" >
        <table width="2460" align="center" class="scrolltable" id="detail" menudock="Left" dynamicarea="2,1">
            <tbody>
                 <tr class="scrollColThead">
                    <td class="title1" colspan="20">
                        <asp:Label id="XLabel28" runat="server" text="跟单明细"></asp:Label></td>
                </tr>
                <tr class="scrollColThead">
                    <td width="46" height="19" class="tds" style="TEXT-ALIGN: center">
                        <asp:Label id="Label40" runat="server" text="行号"></asp:Label></td>
                    <td width="60" class="tds">
                        <asp:Label id="XLabel34" runat="server" text="PO行号"></asp:Label></td>
                    <td width="120" class="tds">
                        <asp:Label id="XLabel35" runat="server" text="产品SAPID"></asp:Label></td>
                    <td width="120" class="tds">
                        <asp:Label id="XLabel36" runat="server" text="产品型号"></asp:Label></td>
                    <td width="130" class="tds">
                        <asp:Label id="Label41" runat="server" text="产品名称"></asp:Label></td>
                    <td width="130" class="tds">
                        <asp:Label id="Label27" runat="server" text="采购数量"></asp:Label></td>
                    <td width="130" class="tds">
                        <asp:Label id="Label39" runat="server" text="未收货数量"></asp:Label></td>
                   
                    <td width="110" class="tds">
                        <asp:Label id="Label11" runat="server" text="* " forecolor="Red"></asp:Label>&nbsp;<asp:Label id="XLabel30" runat="server" text="预计发货日期"></asp:Label>
                         <input style="HEIGHT: 25px" onclick="copyLine('detail', 7);" type="button" value="复制首行" />
                    </td>
                    <td width="80" class="tds">
                        <asp:Label id="Label6" runat="server" text="境外发货"></asp:Label></td>
                    <td width="110" class="tds">
                        <asp:Label id="Label2" runat="server" text="* " forecolor="Red"></asp:Label>&nbsp;<asp:Label id="Label42" runat="server" text="预计到货日期"></asp:Label> 
                        <input style="HEIGHT: 25px" onclick="copyLine('detail', 9);" type="button" value="复制首行" />
                    </td>
                    <td width="110" class="tds">
                        <asp:Label id="Label5" runat="server" text="* " forecolor="Red"></asp:Label>&nbsp;<asp:Label id="Label44" runat="server" text="下次跟单日期"></asp:Label> 
                        <input style="HEIGHT: 25px" onclick="copyLine('detail', 10);" type="button" value="复制首行" />
                    </td>
                    <td width="100" class="tds" >
                        &nbsp;<asp:Label id="Label43" runat="server" text="上次跟单日期"></asp:Label> 
                      </td>
                    <td width="130" class="tds">
                        <asp:Label id="Label45" runat="server" text="供应商到货状态"></asp:Label><br />
                         <input style="HEIGHT: 25px" onclick="copyLine('detail', 12);" type="button" value="复制首行" />
                    </td>
                    <td width="100" class="tds">
                        <asp:Label id="Label48" runat="server" text="SAP-SO号"></asp:Label></td>
                    <td width="100" class="tds">
                        <asp:Label id="Label51" runat="server" text="业务员"></asp:Label></td>
                    <td width="180" class="tds">
                        <asp:Label id="Label52" runat="server" text="售达方客户名称"></asp:Label></td>
                    <td width="180" class="tds">
                        <asp:Label id="Label46" runat="server" text="未按时到货原因"></asp:Label><br />
                         <input style="HEIGHT: 25px" onclick="copyLine('detail', 16);" type="button" value="复制首行" />
                    </td>
                    <td width="180" class="tds">
                        <asp:Label id="Label47" runat="server" text="未按数量到货原因"></asp:Label><br />
                         <input style="HEIGHT: 25px" onclick="copyLine('detail', 17);" type="button" value="复制首行" />
                    </td>
                    <td width="180" class="tds" >
                        <asp:Label id="XLabel37" runat="server" text="供应商提前/延期到货原因"></asp:Label><br />
                         <input style="HEIGHT: 25px" onclick="copyLine('detail', 18);" type="button" value="复制首行" />
                    </td>
                    <td width="180" class="tds" >
                        <asp:Label id="Label16" runat="server" text="备注"></asp:Label></td>
                    
                </tr>
                <tr>
                    <td class="tds1">
                        <aspxform:XGridLineNo id="XGridLineNo2" runat="server" BorderWidth="1" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.LineNum" TextAlign="Center" BorderStyle="None" name="XGridLineNo1">1</aspxform:XGridLineNo>
                        <aspxform:XTextBox id="PurchaseOrder" runat="server" BackColor="#D4E4FE" HiddenInput="true" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="10px" XDataBind="DF_MM_TrackPurchaseOrders_Detail.PO" TextAlign="Center" name="PurchaseOrder"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="POROW" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.POROW" TextAlign="Center" name="POROW"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="ProductSAPID" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.PrdtSAPID" TextAlign="Center" name="ProductSAPID"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="PrdtModel" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.PrdtModel" name="PrdtModel"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="PrdtName" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.PrdtName" name="PrdtName"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox13" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" TextAlign="Center" XDataBind="DF_MM_TrackPurchaseOrders_Detail.PurchaseNumber" name="PrdtName"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox14" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" TextAlign="Center" XDataBind="DF_MM_TrackPurchaseOrders_Detail.ToBeArrivalNumber" name="PrdtName"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XDateTimePicker id="ExpectSendDate" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.ExpectSendDate" name="ExpectSendDate"></aspxform:XDateTimePicker>
                    </td>
                    <td class="tds1" style="TEXT-ALIGN: center">
                        <aspxform:XCheckBox id="OverseasDelivery"  runat="server" Width="30px" XDataBind="DF_MM_TrackPurchaseOrders_Detail.OverseasDelivery" CssClass="OverseasDelivery" name="OverseasDelivery" ></aspxform:XCheckBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XDateTimePicker id="ExpectedArrivalDate" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.ExpectedArrivalDate" name="ExpectedArrivalDate"></aspxform:XDateTimePicker>
                        <aspxform:XDropDownList id="XDropDownList1" runat="server" XDataBind="DF_MM_TrackPurchaseOrders_Detail.InitExpectedArrivalDate" DataMap="ExcepArrivalDate->DF_MM_TrackPurchaseOrders_Detail.ExpectedArrivalDate" XDataSource="ProcedureName:proc_DF_MM_CalExcepArrivalDate;Filter:@SupplierSAPID->DF_MM_TrackPurchaseOrders.SupplierSAPID,@ExceptSendDate->DF_MM_TrackPurchaseOrders_Detail.ExpectSendDate,@OverseasDelivery->DF_MM_TrackPurchaseOrders_Detail.OverseasDelivery" ValueColumn="ExcepArrivalDate" DisplayColumn="ExcepArrivalDate" HiddenExpress="1"></aspxform:XDropDownList>
                    </td>
                    <td class="tds1">
                        <aspxform:XDateTimePicker id="NextTrackDate" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.NextTrackDate" name="NextTrackDate"></aspxform:XDateTimePicker>
                    </td>
                     <td class="tds1" style="BORDER-RIGHT: #93a1ae 1px solid">
                        <aspxform:XTextBox id="XTextBox12" runat="server" BorderWidth="1" BackColor="#D4E4FE" ReadOnly="True"  BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.LastTrackDate" name="LastTrackDate"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XDropDownList id="ArrvialState" runat="server" XDataBind="DF_MM_TrackPurchaseOrders_Detail.ArrvialState" name="ArrvialState" PromptText="--请选择--" Width="100%">
                            <asp:ListItem>正常到货</asp:ListItem>
                            <asp:ListItem>提前到货</asp:ListItem>
                            <asp:ListItem>延迟到货</asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox15" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.SO" name="PrdtName"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox16" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.Salsman" name="PrdtName"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox17" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.SellCustomer" name="PrdtName"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="NoArrvialReasonOnTime" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.NoArrvialReasonOnTime" name="NoArrvialReasonOnTime"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="NoArrvialReasonOnNum" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.NoArrvialReasonOnNum" name="NoArrvialReasonOnNum"></aspxform:XTextBox>
                    </td>
                    <td class="tds1" >
                        <aspxform:XTextBox id="ArrivalGoodsAdvanceOrDelay" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.ArrivalGoodsAdvanceOrDelay" name="ArrivalGoodsAdvanceOrDelay"></aspxform:XTextBox>
                    </td>
                    <td class="tds1" style="BORDER-RIGHT: #93a1ae 1px solid">
                        <aspxform:XTextBox id="XTextBox7" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_Detail.Remark" name="ArrivalGoodsAdvanceOrDelay"></aspxform:XTextBox>
                    </td>
                   
                </tr>
            </tbody>
        </table>
      </div>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="17" class="title1" >
                        <asp:Label id="Label50" runat="server" text="备注"></asp:Label></td>
                </tr>
                <tr>
                    <td class="tsbottomtext" style="WIDTH: 100%">
                        <aspxform:XTextBox id="XTextBox5" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders.Remark" Height="45px" TextMode="MultiLine" Value></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator2" runat="server" ForeColor="Red" ErrorMessage="请输入预计到货日期" ControlToValidate="ExpectedArrivalDate" ValidationGroup="sb"></aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator1" runat="server" ForeColor="Red" ErrorMessage="请输入下次跟单日期" ControlToValidate="NextTrackDate" ValidationGroup="sb"></aspxform:XRequiredFieldValidator>
        <br />
        <table width="1200" align="center" class="table">
            <tbody>
                <tr>
                    <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="Label49" runat="server" value valuetodisplaytext text="发起预计到货" forecolor="Black"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 35%" xclass="Oimec.Dialogs.GetTrackPOInfo" appendmode="ClearAndAppend" usesubmitbehavior="False" datamap="UnitPrice->DF_MM_TrackPurchaseOrders_ArrivalDetail.UnitPrice;CurrencyCode->DF_MM_TrackPurchaseOrders_ArrivalDetail.Currency;SO->DF_MM_TrackPurchaseOrders_ArrivalDetail.SO;SOLineNum->DF_MM_TrackPurchaseOrders_ArrivalDetail.SOLineNumber;Plant->DF_MM_TrackPurchaseOrders_ArrivalDetail.Plant;PantPlanceCode->DF_MM_TrackPurchaseOrders_ArrivalDetail.PlanReceivePlanceID;PrdtName->DF_MM_TrackPurchaseOrders_ArrivalDetail.ProductName;SupplierDeliveryDate->DF_MM_TrackPurchaseOrders_ArrivalDetail.SupplierDeliveryDate;PantArrivalDate->DF_MM_TrackPurchaseOrders_ArrivalDetail.PlanAOGDate;PO->DF_MM_TrackPurchaseOrders_ArrivalDetail.PO;SalesMan->DF_MM_TrackPurchaseOrders_ArrivalDetail.SalesMan;SalesManID->DF_MM_TrackPurchaseOrders_ArrivalDetail.SalesManID;POLineNum->DF_MM_TrackPurchaseOrders_ArrivalDetail.POLineNum;PlantName->DF_MM_TrackPurchaseOrders_ArrivalDetail.PlantName;PantPlanceName->DF_MM_TrackPurchaseOrders_ArrivalDetail.PlanReceivePlance;PrdtMondel->DF_MM_TrackPurchaseOrders_ArrivalDetail.ProductModel;STPCustomerName->DF_MM_TrackPurchaseOrders_ArrivalDetail.SoldCustomerName;BU->DF_MM_TrackPurchaseOrders_ArrivalDetail.BU;ManufacturerName->DF_MM_TrackPurchaseOrders_ArrivalDetail.ManufacturerName;ManufacturerID->DF_MM_TrackPurchaseOrders_ArrivalDetail.ManufactureID;PrdtSAPID->DF_MM_TrackPurchaseOrders_ArrivalDetail.PrdtSAPID;PantNum->DF_MM_TrackPurchaseOrders_ArrivalDetail.PlanAOGNumber;">
                        <aspxform:XCheckBox id="XCheckBox3" runat="server" XDataBind="DF_MM_TrackPurchaseOrders.IsArrivalGoods" name="XCheckBox3"></aspxform:XCheckBox>
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 10%" hiddenexpress="DF_MM_TrackPurchaseOrders.IsArrivalGoods!='1'">
                        <asp:Label id="Label8" runat="server" text="*" forecolor="Red"></asp:Label>&nbsp;<asp:Label id="Label9" runat="server" text="需物资确认收货地"></asp:Label> 
                    </td>
                    <td class="basiclblfirst" style="WIDTH: 35%" hiddenexpress="DF_MM_TrackPurchaseOrders.IsArrivalGoods!='1'">
                        <aspxform:XRadioButtonList id="XRadioButtonList1" runat="server" XDataBind="DF_MM_TrackPurchaseOrders.IsConfirmReceivePlace" RepeatDirection="Horizontal">
                            <asp:ListItem>是</asp:ListItem>
                            <asp:ListItem Selected="True">否</asp:ListItem>
                        </aspxform:XRadioButtonList>
                    </td>
                </tr>
            </tbody>
        </table>
        <div align="center" id="scrollDiv" style="OVERFLOW: scroll; BORDER-TOP: #93a1ae 1px solid; HEIGHT: auto; BORDER-RIGHT: #93a1ae 1px solid; WIDTH: 1200px; BORDER-BOTTOM: #93a1ae 1px solid; TEXT-ALIGN: center; CLEAR: both; BORDER-LEFT: #93a1ae 1px solid" hiddenexpress="DF_MM_TrackPurchaseOrders.IsArrivalGoods!='1'">
            <table width="2870" align="center" class="scrolltable" id="tablenew" border="0" cellspacing="0" cellpadding="0" runat="server" menudock="Left" dynamicarea="2,1">
                <tbody>
                    <tr class="scrollColThead">
                        <td height="21" class="title1" style="BORDER-TOP: medium none" colspan="24">
                            <asp:Label id="Label12" runat="server" text="产品明细"></asp:Label>&nbsp; 
                        </td>
                    </tr>
                    <tr class="scrollColThead">
                        <td width="60" height="43" class="tds">
                            <asp:Label id="Label13" runat="server" text="行号"></asp:Label></td>
                        <td width="80" height="40" class="tds">
                            <asp:Label id="Label118" runat="server" value valuetodisplaytext text="发起到货" font-bold="False"></asp:Label>
                             <input id="btnSelect" style="HEIGHT: 25px" onclick="selectAll(this.value)" type="button" value="全选" />
                        </td>
                        <td width="95" class="tds">
                            &nbsp;<asp:Label id="Label14" runat="server" text="PO号"></asp:Label></td>
                        <td width="60" class="tds">
                            &nbsp;<asp:Label id="Label15" runat="server" text="PO行号"></asp:Label></td>
                        <td width="100" class="tds">
                            <asp:Label id="Label22" runat="server" text="产品SAPID"></asp:Label></td>
                        <td width="120" class="tds">
                            <asp:Label id="Label23" runat="server" text="产品型号"></asp:Label></td>
                        <td width="120" class="tds">
                            <asp:Label id="Label24" runat="server" text="产品名称"></asp:Label></td>
                        <td width="150" class="tds">
                            <asp:Label id="Label28" runat="server" text="厂商名称"></asp:Label></td>
                        <td width="100" class="tds">
                            <asp:Label id="Label25" runat="server" text="* " forecolor="Red"></asp:Label>&nbsp;<asp:Label id="Label26" runat="server" text="计划到货数量"></asp:Label></td>
                        <td width="120" class="tds">
                            <asp:Label id="Label10" runat="server" text="* " forecolor="Red"></asp:Label>&nbsp;<asp:Label id="Label7" runat="server" text="实际发货日期"></asp:Label>
                             <input style="HEIGHT: 25px" onclick="copyLine('tablenew', 9);" type="button" value="复制首行" />
                        </td>
                        <td width="120" class="tds">
                            &nbsp;<asp:Label id="Label38" runat="server" text="预计到货日期"></asp:Label></td>
                        <td width="100" class="tds">
                            <asp:Label id="Label17" runat="server" text="工厂名称"></asp:Label></td>
                        <td width="119" class="tds">
                            &nbsp;<asp:Label id="Label18" runat="server" text="计划收货地"></asp:Label></td>
                        <td width="110" class="tds" hidden="hidden">
                            &nbsp; <asp:Label id="Label21" runat="server" text="实际收货地"></asp:Label></td>
                        <td width="40" class="tds" hidden="hidden">
                            <asp:Label id="Label20" runat="server" text="转发"></asp:Label></td>
                        <td width="94" class="tds">
                            <asp:Label id="Label31" runat="server" text="采购币种"></asp:Label></td>
                        <td width="100" class="tds">
                            <asp:Label id="Label32" runat="server" text="业务员/备货"></asp:Label></td>
                        <td width="80" class="tds">
                            <asp:Label id="Label33" runat="server" text="SO号"></asp:Label></td>
                        <td width="60" class="tds">
                            <asp:Label id="Label34" runat="server" text="SO行号"></asp:Label></td>
                        <td width="150" class="tds">
                            <asp:Label id="Label35" runat="server" text="付款方客户名称"></asp:Label></td>
                        <td width="139" class="tds">
                            &nbsp;<asp:Label id="Label37" runat="server" text="供应商发货日期"></asp:Label></td>
                        <td width="120" class="tds">
                            <asp:Label id="Label29" runat="server" text="含税采购单价(采购币种)"></asp:Label></td>
                        <td width="120" class="tds">
                            <asp:Label id="Label30" runat="server" text="计划到货总价(采购币种)"></asp:Label></td>
                        <td width="121" class="tds">
                            <asp:Label id="Label36" runat="server" text="备注"></asp:Label></td>
                    </tr>
                    <tr>
                        <td class="tds1">
                            <aspxform:XGridLineNo id="XGridLineNo1" runat="server" BorderWidth="1" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.LineNum" TextAlign="Center" BorderStyle="None" name="XGridLineNo1">1</aspxform:XGridLineNo>
                        </td>
                        <td class="tds1" style="TEXT-ALIGN: center">
                            <aspxform:XCheckBox id="NewPurchaseArrivalXck" runat="server" Width="30px" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.NewPurchaseArrivalXck" CssClass="NewPurchaseArrivalXck" name="NewPurchaseArrivalXck"></aspxform:XCheckBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="PO" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.PO" name="PO"></aspxform:XTextBox>
                            <br />
                            <aspxform:XTextBox id="IsAddLineItem" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="10px" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.IsAddLineItem" TextAlign="Center" name="IsAddLineItem" HiddenExpress="1"></aspxform:XTextBox>
                            <aspxform:XTextBox id="BU" runat="server" HiddenInput="True" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="10px" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.BU" name="BU"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="POLineNum" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.POLineNum" TextAlign="Center" name="POLineNum"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="PrdtSAPID" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.PrdtSAPID" name="PrdtSAPID"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="ProductModel" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.ProductModel" name="ProductModel"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="ProductName" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.ProductName" name="ProductName"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="ManufacturerName" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.ManufacturerName" name="ManufacturerName"></aspxform:XTextBox>
                            <aspxform:XTextBox id="ManufactureID" runat="server" BackColor="#D4E4FE" HiddenInput="True" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="10px" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.ManufactureID" name="ManufactureID"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="UpPlanAOGNumber" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.UpPlanAOGNumber" TextAlign="Center" name="UpPlanAOGNumber" Format="type:number;.0" Express='javascript("UpPlanAOGNumber",DF_MM_TrackPurchaseOrders_ArrivalDetail.PlanAOGNumber,DF_MM_TrackPurchaseOrders_ArrivalDetail.IsAddLineItem,DF_MM_TrackPurchaseOrders_ArrivalDetail.UpPlanAOGNumber)'></aspxform:XTextBox>
                            <aspxform:XTextBox id="PlanAOGNumber" runat="server" HiddenInput="True" BorderWidth="1px" BorderColor="Gainsboro" Width="42px" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.PlanAOGNumber" Max="0" Min="0" TextAlign="Center" name="PlanAOGNumber" Format="type:number;.0"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XDateTimePicker id="ActualDeliveryDate" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.ActualDeliveryDate" name="ActualDeliveryDate"></aspxform:XDateTimePicker>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="PlanAOGDate" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.PlanAOGDate" name="PlanAOGDate"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="Plant" runat="server" BackColor="#D4E4FE" HiddenInput="True" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.Plant" TextAlign="Center" name="Plant"></aspxform:XTextBox>
                            <aspxform:XTextBox id="PlantName" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.PlantName" TextAlign="Center" name="PlantName" PrintOut="False"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="PlanReceivePlance" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.PlanReceivePlance" name="PlanReceivePlance"></aspxform:XTextBox>
                            <aspxform:XTextBox id="PlanReceivePlanceID" runat="server" HiddenInput="True" BorderWidth="1" BorderColor="#DCDCDC" Width="20px" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.PlanReceivePlanceID" name="PlanReceivePlanceID" PrintOut="False"></aspxform:XTextBox>
                            <aspxform:XDropDownList id="XDropDownList3" runat="server" Width="50px" name="XDropDownList3" HiddenExpress="1" DataMap="StorageName->DF_MM_TrackPurchaseOrders_ArrivalDetail.RealReceivePlance" XDataSource="TableName:V_DF_Logistics_StorageInfo;Filter:SAPStorageID->DF_MM_TrackPurchaseOrders_ArrivalDetail.PlanReceivePlanceID,SAPPlant->DF_MM_TrackPurchaseOrders_ArrivalDetail.Plant"></aspxform:XDropDownList>
                        </td>
                        <td class="tds1" hidden="hidden">
                            <aspxform:XDropDownList id="RealReceivePlance" runat="server" BackColor="#D4E4FE" Width="90%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.RealReceivePlance" DisableExpress="1" name="RealReceivePlance" PromptText="--请选择--" DataMap="StorageID->DF_MM_TrackPurchaseOrders_ArrivalDetail.RealReceivePlanceID" XDataSource="TableName:V_DF_Logistics_Storage;Filter:--请选择--" ValueColumn="Storage" DisplayColumn="Storage"></aspxform:XDropDownList>
                            <aspxform:XTextBox id="RealReceivePlanceOld" runat="server" HiddenInput="True" BorderWidth="1" BorderColor="#DCDCDC" Width="10px" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.RealReceivePlanceOld" name="RealReceivePlanceOld" Express="DF_MM_TrackPurchaseOrders_ArrivalDetail.RealReceivePlance"></aspxform:XTextBox>
                            <aspxform:XTextBox id="RealReceivePlanceID" runat="server" HiddenInput="True" BorderWidth="1" BorderColor="#DCDCDC" Width="10px" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.RealReceivePlanceID" name="RealReceivePlanceID"></aspxform:XTextBox>
                        </td>
                        <td align="center" class="tds1" hidden="hidden">
                            <aspxform:XCheckBox id="IsDeliver" runat="server" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.IsDeliver" name="IsDeliver"></aspxform:XCheckBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="Currency" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.Currency" TextAlign="Center" name="Currency"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="SalesMan" runat="server" BackColor="#D4E4FE" HiddenInput="False" ReadOnly="True" BorderWidth="1px" BorderColor="Gainsboro" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.SalesMan" Max="0" Min="0" TextAlign="Center" name="SalesMan" Height="21px" ValueToDisplayText></aspxform:XTextBox>
                            <aspxform:XTextBox id="SalesManID" runat="server" HiddenInput="True" BorderWidth="1" BorderColor="#DCDCDC" Width="10px" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.SalesManID" name="SalesManID"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="SO" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.SO" TextAlign="Center" name="SO"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="SOLineNumber" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.SOLineNumber" TextAlign="Center" name="SOLineNumber"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="SoldCustomerName" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.SoldCustomerName" name="SoldCustomerName"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="SupplierDeliveryDate" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.SupplierDeliveryDate" name="SupplierDeliveryDate"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="UnitPrice" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.UnitPrice" TextAlign="Right" name="UnitPrice" Format="type:currency;.2"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="TotalPrice" runat="server" BackColor="#D4E4FE" ReadOnly="True" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.TotalPrice" TextAlign="Right" name="TotalPrice" Format="type:currency;.2" Express="DF_MM_TrackPurchaseOrders_ArrivalDetail.UpPlanAOGNumber*DF_MM_TrackPurchaseOrders_ArrivalDetail.UnitPrice"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="Remark" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders_ArrivalDetail.Remark" TextAlign="Left" name="Remark" ValueToDisplayText></aspxform:XTextBox>
                            <aspxform:XDropDownList id="XDropDownList4" runat="server" Width="10px" HiddenExpress="1" DataMap="Remark->DF_MM_TrackPurchaseOrders_ArrivalDetail.Remark" XDataSource="TableName:V_DF_MM_PurchaseHandleAndStockApp;Filter:PO->DF_MM_TrackPurchaseOrders_ArrivalDetail.PO,PORowNumber->DF_MM_TrackPurchaseOrders_ArrivalDetail.POLineNum"></aspxform:XDropDownList>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <br />
        <table width="1200" align="center" class="table" hiddenexpress="DF_MM_TrackPurchaseOrders.IsArrivalGoods!='1'">
             <tbody>
                  <tr>
                      <td class="basiclblfirst" style="WIDTH: 10%">
                        <asp:Label id="Label19" runat="server" value valuetodisplaytext text="快递单号" forecolor="Black"></asp:Label></td>
                    <td class="basiclblfirst" style="WIDTH: 90%" >
                        <aspxform:XTextBox id="XTextBox9" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" XDataBind="DF_MM_TrackPurchaseOrders.WaybillNo" Height="45px" TextMode="MultiLine" Value></aspxform:XTextBox>
                    
                    </td>
                  </tr>
             </tbody>
        </table>
    </form>
</body>
</html>
