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

    // Insert page code here
    //

</script>
<html xmlns:xform="xmlns:xform">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />

    <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: 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>

        //复制首行  供应商纸面合同货期 ContractDeliveryDate、工厂 Plants、库存地 Stockpile
        function copyLine(column, index) {
            var table = document.getElementById("PrdtTable");

            //alert(agent.Eles[table.rows[2].cells[16].children[0].getAttribute("xform_xele_index")]);
            var obj = agent.Eles[table.rows[2].cells[column].children[index].getAttribute("xform_xele_index")].getValue();

            for (var i = 3; i < table.rows.length - 1; i++) {
                agent.Eles[table.rows[i].cells[column].children[index].getAttribute("xform_xele_index")].setValue(obj);
                XFormOnChange(agent.Eles[table.rows[i].cells[column].children[index].getAttribute("xform_xele_index")]);
            }
        }

        function setPO(id) {
            var po = agent.Eles[document.getElementById(id).getAttribute("xform_xele_index")].getValue();
            if (po != "" && po != null && po != undefined) {
                var src = po.toString();
                if (src.length > 10) {
                    agent.Eles[document.getElementById(id).getAttribute("xform_xele_index")].setValue(src.substring(0, 10));
                    //return src.substring(0, 10);
                }
            }
        }


        //打印采购处理单
        function clprint() {
            var temp = document.getElementById('XLabel1').innerText;
            var temp1 = agent.Eles[document.getElementById("SalesOpportunitiesFormNo").getAttribute("xform_xele_index")].getValue();
            window.open("采购处理单打印.aspx?serialNum=" + temp + "&InquiryFormNo=" + temp1);
        }

        //根据PO号和PO行号获取sap采购订单信息
        function SetPurchaseInfo(PO, PORowNum, row) {

            if (PO != '' && PORowNum != 0) {
                YZSoft.Ajax.request({
                    url: YZSoft.$url('Oimec/ApiServices/PurchaseAPIHandler.ashx'),
                    method: 'POST',
                    // async: true,
                    params: {
                        method: 'GetPurchaseInfo',
                        poId: PO,
                        poRowNum: PORowNum
                    },
                    success: function (action) {
                        var res = action.result;
                        var data = res.Value;
                        // 实际供应商
                        var aDivSupplier = document.getElementsByName("Supplier");

                        //供应商货期
                        var aDivSupplierDelivery = document.getElementsByName("SupplierDelivery");
                        //付款方式
                        var aDivPurchasePayType = document.getElementsByName("PurchasePayType");

                        //国际运保费率
                        var aDivInternationCIFRate = document.getElementsByName("InternationCIFRate");

                        //国际运保费
                        var aDivInternationCIF = document.getElementsByName("InternationCIF");

                        //国际运保费(人民币)
                        var aDivInternationCIFRMB = document.getElementsByName("InternationCIFRMB");

                        //报关杂费
                        var aDivCustomsFees = document.getElementsByName("CustomsFees");

                        //供应商联系人
                        var aDivSupplierContact = document.getElementsByName("SupplierContact");
                        //供应商联系人电话
                        var aDivSupplierTel = document.getElementsByName("SupplierTel");



                        //var count = action.result.count;
                        if (data != null) {
                            //  alert(data.length);
                            if (data.length > 0) {

                                var i = parseInt(row) - 1;

                                var table = document.getElementById("PrdtTable");
                                //实际供应商
                                if (data[0].Name1 != undefined && data[0].Name1 != '') {
                                    //设置实际供应商
                                    var divSupplier = aDivSupplier[i];
                                    var idSupplier = divSupplier.getElementsByTagName('input')[0].id;
                                    //document.getElementById(idSupplier).value = data[0].Name1;

                                }
                                ////采购税描述
                                //if (data[0].MWSKZT != undefined && data[0].MWSKZT != '') {
                                //    agent.Eles[table.rows[i].cells[27].children[0].getAttribute("xform_xele_index")].setValue(data[0].MWSKZT);
                                //}
                                //实际供应商货期
                                if (data[0].EINDT != undefined && data[0].EINDT != '') {
                                    //设置实际供应商
                                    var divSupplierDelivery = aDivSupplierDelivery[i];
                                    var idSupplierDelivery = divSupplierDelivery.getElementsByTagName('input')[0].value = data[0].EINDT;
                                    // document.getElementById(idSupplierDelivery).value = data[0].EINDT;

                                    // agent.Eles[table.rows[i].cells[25].children[0].getAttribute("xform_xele_index")].setValue(data[0].EINDT);
                                }

                                //采购付款条件
                                if (data[0].FKTJWB != undefined && data[0].FKTJWB != '') {
                                    //设置采购付款方式
                                    var divPurchasePayType = aDivPurchasePayType[i];
                                    var idPurchasePayType = divPurchasePayType.getElementsByTagName('input')[0].id;
                                    document.getElementById(idPurchasePayType).value = data[0].FKTJWB;

                                }
                                else if (data[0].VTEXT != undefined && data[0].VTEXT != '') {
                                    //设置采购付款方式
                                    var divPurchasePayType = aDivPurchasePayType[i];
                                    var idPurchasePayType = divPurchasePayType.getElementsByTagName('input')[0].id;
                                    document.getElementById(idPurchasePayType).value = data[0].VTEXT;

                                }
                                //国际运保费率
                                if (data[0].YFBFB != undefined && data[0].YFBFB != '') {


                                    var divInternationCIFRate = aDivInternationCIFRate[i];
                                    var idInternationCIFRate = divInternationCIFRate.getElementsByTagName('input')[0].id;
                                    document.getElementById(idInternationCIFRate).value = data[0].YFBFB;

                                }
                                //国际运保费（采购币种）
                                if (data[0].YFZ != undefined && data[0].ZLYF != undefined) {
                                    if (data[0].YFZ != '' && data[0].ZLYF != '') {

                                        var divInternationCIF = aDivInternationCIF[i];
                                        var idInternationCIF = divInternationCIF.getElementsByTagName('input')[0].id;
                                        document.getElementById(idInternationCIF).value = data[0].YFZ + data[0].ZLYF;

                                        // agent.Eles[table.rows[i].cells[33].children[0].getAttribute("xform_xele_index")].setValue(data[0].YFZ + data[0].ZLYF);
                                    }

                                }
                                //国际运保费（人民币）
                                if (data[0].CNY_YFZ != undefined && data[0].CNY_YFZ != '') {
                                    var divInternationCIFRMB = aDivInternationCIFRMB[i];
                                    var idInternationCIFRMB = divInternationCIFRMB.getElementsByTagName('input')[0].id;
                                    document.getElementById(idInternationCIFRMB).value = data[0].CNY_YFZ;

                                    // agent.Eles[table.rows[i].cells[34].children[0].getAttribute("xform_xele_index")].setValue(data[0].CNY_YFZ);
                                }
                                //报关杂费
                                if (data[0].TTZFZ != undefined && data[0].TTZFZ != '') {
                                    var divCustomsFees = aDivCustomsFees[i];
                                    var idCustomsFees = divCustomsFees.getElementsByTagName('input')[0].id;
                                    document.getElementById(idCustomsFees).value = data[0].TTZFZ;

                                }
                                //关税-关税税率
                                //供应商联系人
                                if (data[0].LNAME != undefined && data[0].LNAME != '') {
                                    var divSupplierContact = aDivSupplierContact[i];
                                    var idSupplierContact = divSupplierContact.getElementsByTagName('input')[0].id;
                                    document.getElementById(idSupplierContact).value = data[0].LNAME;

                                }
                                //供应商电话
                                if (data[0].TELF1 != undefined && data[0].TELF1 != '') {
                                    var divSupplierTel = aDivSupplierTel[i];
                                    var idSupplierTel = divSupplierTel.getElementsByTagName('input')[0].id;
                                    document.getElementById(idSupplierTel).value = data[0].TELF1;

                                }

                            }
                        }

                    }
                });
            }
        }

        //根据PO号、PO行号获取信息
        function GetInfoByPO(PO, PORowNum, row) {

            if (PO != '' && PORowNum != 0) {
                YZSoft.Ajax.request({
                    url: YZSoft.$url('Oimec/ApiServices/PurchaseAPIHandler.ashx'),
                    method: 'POST',
                    params: {
                        method: 'UpdatePOInfo',
                        strPO: PO,
                        strPORowNumber: PORowNum
                    },
                    success: function (action) {

                        var data = action.result;
                        var list = data.list;
                        var count = data.count;
                        if (data != null) {
                            if (count > 0) {
                                var tableObj = document.getElementById("PrdtTable");

                                var aDivPurchaseCompanyCodes = document.getElementsByName("PurchaseCompanyCodes");//公司代码
                                var aDivPurchaseContractNo = document.getElementsByName("PurchaseContractNo");//采购合同号

                                var i = row + 1;
                                for (var j = 0; j < count; j++) {
                                    if (PO == list[j].PO && PORowNum == list[j].POLineNum) {

                                        var divPurchaseCompanyCodes = aDivPurchaseCompanyCodes[i - 2];
                                        var idPurchaseCompanyCodes = divPurchaseCompanyCodes.getElementsByTagName('input')[0].id;
                                        document.getElementById(idPurchaseCompanyCodes).value = list[j].CompanyCode;

                                        //设置合同号
                                        var divPurchaseContractNo = aDivPurchaseContractNo[i - 2];
                                        var idPurchaseContractNo = divPurchaseContractNo.getElementsByTagName('input')[0].id;
                                        document.getElementById(idPurchaseContractNo).value = list[j].ContractNo;

                                        //agent.Eles[tableObj.rows[i].cells[46].children[0].getAttribute("xform_xele_index")].setValue(list[j].ContractNo);//合同号
                                        // agent.Eles[tableObj.rows[i].cells[47].children[0].getAttribute("xform_xele_index")].setValue(list[j].CompanyCode);//采购公司代码
                                    }

                                }
                            }
                        }
                    }
                });

            }
        }

        //更新合同号及公司代码
        function UpdatePOInfo() {
            var strPO;
            var strPORowNumber;

            //PO
            var aDivPO = document.getElementsByName("PO");
            // PORowNumber
            var aDivPORowNumber = document.getElementsByName("PORowNumber");

            //遍历table获取对应行PO和PO行号
            var tableObj = document.getElementById("PrdtTable");
            for (var i = 2; i < tableObj.rows.length - 1; i++) {//遍历Table的所有Row //遍历Row中的每一列
                //var po = agent.Eles[tableObj.rows[i].cells[7].children[0].getAttribute("xform_xele_index")].getValue();//PO号
                //  var poLineNum = agent.Eles[tableObj.rows[i].cells[8].children[0].getAttribute("xform_xele_index")].getValue();//PO行号

                var divPO = aDivPO[i];
                var idPO = divPO.getElementsByTagName('input')[0].id;
                var po = document.getElementById(idPO).value;
                var divRowNumber = aDivPORowNumber[i];
                var idRowNumber = divRowNumber.getElementsByTagName('input')[0].id;
                var poLineNum = document.getElementById(idRowNumber).value;


                if (i == 2) {
                    strPO = po;
                    strPORowNumber = poLineNum;
                }
                else {
                    strPO = strPO + "/" + po;
                    strPORowNumber = strPORowNumber + "/" + poLineNum;
                }
            }
            YZSoft.Ajax.request({
                url: YZSoft.$url('Oimec/ApiServices/PurchaseAPIHandler.ashx'),
                method: 'POST',
                params: {
                    method: 'UpdatePOInfo',
                    strPO: strPO,
                    strPORowNumber: strPORowNumber
                },
                success: function (action) {
                    var data = action.result;
                    var list = data.list;
                    var count = data.count;
                    if (data != null) {
                        if (count > 0) {
                            var tableObj = document.getElementById("PrdtTable");

                            var aDivPurchaseCompanyCodes = document.getElementsByName("PurchaseCompanyCodes");//公司代码
                            var aDivPurchaseContractNo = document.getElementsByName("PurchaseContractNo");//采购合同号

                            for (var i = 2; i < tableObj.rows.length - 1; i++) {//遍历Table的所有Row //遍历Row中的每一列
                                // var po = agent.Eles[tableObj.rows[i].cells[7].children[0].getAttribute("xform_xele_index")].getValue();//PO号
                                // var poLineNum = agent.Eles[tableObj.rows[i].cells[8].children[0].getAttribute("xform_xele_index")].getValue();//PO行号

                                var divPO = aDivPO[i];
                                var idPO = divPO.getElementsByTagName('input')[0].id;
                                var po = document.getElementById(idPO).value;
                                var divRowNumber = aDivPORowNumber[i];
                                var idRowNumber = divRowNumber.getElementsByTagName('input')[0].id;
                                var poLineNum = document.getElementById(idRowNumber).value;

                                for (var j = 0; j < count; j++) {

                                    if (po == list[j].PO && poLineNum == list[j].POLineNum) {
                                        var divPurchaseCompanyCodes = aDivPurchaseCompanyCodes[i];
                                        var idPurchaseCompanyCodes = divPurchaseCompanyCodes.getElementsByTagName('input')[0].id;
                                        document.getElementById(idPurchaseCompanyCodes).value = list[j].CompanyCode;

                                        //设置合同号
                                        var divPurchaseContractNo = aDivPurchaseContractNo[i];
                                        var idPurchaseContractNo = divPurchaseContractNo.getElementsByTagName('input')[0].id;
                                        document.getElementById(idPurchaseContractNo).value = list[j].ContractNo;

                                        // agent.Eles[tableObj.rows[i].cells[46].children[0].getAttribute("xform_xele_index")].setValue(list[j].ContractNo);//合同号
                                        // agent.Eles[tableObj.rows[i].cells[47].children[0].getAttribute("xform_xele_index")].setValue(list[j].CompanyCode);//采购公司代码
                                    }
                                }
                            }
                        }
                    }
                }
            });
        }

        //获取地址栏参数
        function getQueryString(name) {
            var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
            var r = window.location.search.substr(1).match(reg);
            if (r != null) {
                return unescape(r[2]);
            }
            return null;
        }

        //单选获取选中的值
        function checkedVaule(name) {
            var obj = document.getElementsByName(name);
            for (var i = 0; i < obj.length; i++) {
                if (obj[i].checked) {
                    return obj[i].value;
                }
            }

        }

        //申请单号赋值行项目上
        function Getformno(formno) {
            //alert(formno);
            if (formno != "") {
                return "1";
            }
            else {

                return "0"
            }

        }

        //根据采购发票税点 获取编码
        function GetPurchaseInvoiceTaxPoint(PurchaseInvoiceTaxPoint) {

            if (PurchaseInvoiceTaxPoint == "6%增值税发票") {

                return "J3";
            }
            else if (PurchaseInvoiceTaxPoint == "17%增值税发票") {

                return "J1";
            }
            else if (PurchaseInvoiceTaxPoint == "13%增值税发票") {

                return "J2";
            }
            else if (PurchaseInvoiceTaxPoint == "16%增值税发票") {

                return "J7";
            }
            else if (PurchaseInvoiceTaxPoint == "4%增值税发票") {

                return "J4";
            }
            else if (PurchaseInvoiceTaxPoint == "3%增值税发票") {

                return "J6";
            }
            else if (PurchaseInvoiceTaxPoint == "1%增值税发票") {

                return "JA";
            }
            else {
                return "J0";
            }


        }

        function GetPurchaseInvoiceTax(PurchaseInvoiceTaxPoint) {

            XFormOnChange(agent.Eles[document.getElementById('InvoiceTax').getAttribute("xform_xele_index")]);
            if (PurchaseInvoiceTaxPoint == "6%增值税发票") {

                return "0.06";
            }
            if (PurchaseInvoiceTaxPoint == "17%增值税发票") {

                return "0.17";
            }
            if (PurchaseInvoiceTaxPoint == "13%增值税发票") {

                return "0.13";
            }
            if (PurchaseInvoiceTaxPoint == "16%增值税发票") {

                return "0.16";
            }
            if (PurchaseInvoiceTaxPoint == "4%增值税发票") {

                return "0.04";
            }
            if (PurchaseInvoiceTaxPoint == "3%增值税发票") {

                return "0.03";
            }
            if (PurchaseInvoiceTaxPoint == "1%增值税发票") {

                return "0.01";
            }
        }


        //根据行判断 集成po复选框是否可点击
        function clickPOchk() {

            //判断所选行实际供应商名称 是否相同
            // 实际供应商名称
            var aDivSupplier = document.getElementsByName("ZSupplier");
            var aDivIsdelete = document.getElementsByClassName("IsDelete");
            var flag = false;
            var vi = 0;
            var supplier;
            for (var i = 0; i < aDivSupplier.length; i++) {

               // var IsDelete_id = document.getElementsByClassName("IsDelete")[i].getElementsByTagName('input')[0].id;
              //  var IsDelete = document.getElementById(IsDelete_id).checked;
                var divdelete = aDivIsdelete[i];
                var iddelete = divdelete.getElementsByTagName('input')[0].id;
                var IsDelete = document.getElementById(iddelete).checked;
                if (IsDelete == false) { //未取消采购

                    if (vi == 0) {
                        var div = aDivSupplier[i];//var div = aDivSupplier[0]
                        // console.log(s);
                        var id = div.getElementsByTagName('input')[0].id;  //第一行供应商// var id = div.getElementsByTagName('input')[i].id;
                        supplier = document.getElementById(id).value;
                    }
                    vi++;

                    if (i >= 1) {

                        var divs = aDivSupplier[i];
                        // console.log(s);
                        var ids = divs.getElementsByTagName('input')[0].id;
                        var vs = document.getElementById(ids).value;

                        if (supplier == vs) {
                            flag = true;
                        } else {
                            flag = false;  //不一致则不再进行循环
                            break;
                        }
                    }
                    else {
                        flag = true;
                    }

                }
            }

            //flag=false 供应商不一致
            if (flag) {
                var id = document.getElementsByName("IsSapPochk")[0].getElementsByTagName('input')[0].id;
                // document.getElementById(id).disabled = false;

            } else {

                var id = document.getElementsByName("IsSapPochk")[0].getElementsByTagName('input')[0].id;
                //document.getElementById(id).disabled = true;
                document.getElementById(id).checked = false;
                alert("行项目上的供应商必须是一个才能勾选！");
            }

        }

        function GetLink() {

            //var SalesOpportunitiesItemID = agent.Eles[document.getElementById('SalesOpportunitiesItemID').getAttribute("xform_xele_index")].getValue();
            //var me = this;
            //YZSoft.BPM.src.ux.FormManager.openFormApplication('91-CRM/CRM销售机会', SalesOpportunitiesItemID, 'Read', Ext.apply({
            //    sender: me,
            //    title: '销售机会查看',
            //    dlgModel: 'Window',//Tab,Window,Dialog
            //    listeners: {
            //        submit: function (action, data) {
            //            //me.store.reload({
            //            //    loadMask: {
            //            //        msg: '保存已成功',
            //            //        delay: 'x'
            //            //    }
            //            //});
            //        }
            //    }
            //}, this.dlgCfg));
        }

        //人民币采购 且 行项目选择直发时才显示
        function getRMB() {

            //采购币种
            var flag = false;
            var aDivPurchaseCurrency = document.getElementsByName("PurchaseCurrency");
            var aDivIsSupplierSend = document.getElementsByName("IsSupplierSend");

            for (var i = 0; i < aDivPurchaseCurrency.length; i++) {
                var divPurchaseCurrency = aDivPurchaseCurrency[i];
                var idPurchaseCurrency = divPurchaseCurrency.getElementsByTagName('select')[0].id;
                var v = document.getElementById(idPurchaseCurrency).value;
                // alert(v);
                var divIsSupplierSend = aDivIsSupplierSend[i];
               // var idIsSupplierSend = divIsSupplierSend.getElementsByTagName('input')[0].id;
               // var vIsSupplierSend = document.getElementById(idIsSupplierSend).checked;
			   
			    var idIsSupplierSendname = divIsSupplierSend.getElementsByTagName('input')[0].name;
                var vIsSupplierSend = checkedVaule(idIsSupplierSendname);

                if (v == "CNY") {

                    if (vIsSupplierSend == "直发") {
                        // alert(vIsSupplierSend);
                        flag = true;
                    }
                }

            }

            if (flag) {

                document.getElementById("DeliverysTables").style.display = "";
            } else {
                document.getElementById("DeliverysTables").style.display = "none";
            }

        }

        //外币销售 且 行项目选择直发时才显示
        function getWB() {

            //采购币种
            var flag = false;

            var aDivIsSupplierSend = document.getElementsByName("IsSupplierSend");
            var ContractCurrency = agent.Eles[document.getElementById("ContractCurrency").getAttribute("xform_xele_index")].getValue();
            for (var i = 0; i < aDivIsSupplierSend.length; i++) {
                if (ContractCurrency != "CNY") {

                    var divIsSupplierSend = aDivIsSupplierSend[i];
                    //var idIsSupplierSend = divIsSupplierSend.getElementsByTagName('input')[0].id;
                   // var vIsSupplierSend = document.getElementById(idIsSupplierSend).checked;
				   
				 var idIsSupplierSendname = divIsSupplierSend.getElementsByTagName('input')[0].name;
                var vIsSupplierSend = checkedVaule(idIsSupplierSendname);

                    if (vIsSupplierSend == "直发") {
                        // alert(vIsSupplierSend);
                        flag = true;
                    }
                }


            }

            if (flag) {

                document.getElementById("DeliverysTable").style.display = "";
            } else {
                document.getElementById("DeliverysTable").style.display = "none";
            }


        }

        function AjaxParm(url, async, parm, fun) {
            //YZSoft.$url('Oimec/WorkFlow/Services/SalesHandler.ashx')
            //{method: method, ItemID: ItemId, Increment: me.Increment.getValue() }
            YZSoft.Ajax.request({
                async: async,
                url: url,
                params: parm,
                success: fun
            });
        }
        //查看合同
        function GetButtonGenerationContract() {

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

            var objName = agent.Eles[document.getElementById("ObjName").getAttribute("xform_xele_index")].getValue();
            var parm = { method: "GetCreateContract", ObjName: objName };
            // alert(objName);
            AjaxParm(url, true, parm, function (action) {

                var obj = eval("(" + action.responseText + ")");
                var urls = obj.Value;
                window.open(urls, "_blank", "scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes");
                //alert(urls);
                //var a = document.createElement('a')
                //var event = new MouseEvent('click');
                //name = new Date().getTime();
                //a.download = name + ".pdf";
                //a.href = urls;
                //a.dispatchEvent(event);

            })
        }
        //下载合同
        function GetDownGenerationContract() {
            var objName = agent.Eles[document.getElementById("ObjName").getAttribute("xform_xele_index")].getValue();
            var url = YZSoft.$url('Oimec/ApiServices/CrmapiHandler.ashx');
            YZSoft.src.ux.File.download(url, {
                method: 'DownloadPDFBySalesTemplate',
                objName: objName
            });
        }

        //根据公司代码获取po类型
        function GetPOType(code) {

            if (code == "A300") {
                return "YNB";
            }
            else {
                return "ZNB";
            }


        }

        //日期转换
        function shijiantime(times) {
            var timearr = times.replace(" ", ":").replace(/\:/g, "-").split("-");
            var timestr = "" + timearr[0] + "-" + timearr[1] + "-" + timearr[2]
            //var timestr = "" + timearr[1].split("")[1] + "月" + timearr[2] + "日\t" + timearr[3] + ":" + timearr[4] + ""
            return timestr
        }
        function GetCustomerDeliveryDate(date) {
            if (date != null && date != "" && date != undefined)
                return shijiantime(date);
            else
                return date;
        }
        function getClickBySalesOpportunitiesItemID() {

            var me = this;
            var itemid = agent.Eles[document.getElementById("SalesOpportunitiesItemID").getAttribute("xform_xele_index")].getValue();
            if (itemid != "") {
                window.open("../../FormApplication.aspx?md=App&app=91-CRM%2FCRM销售机会&key=" + itemid + "&formstate=View", "_blank", "scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes");
            }
        }

        function getQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]); return null;

        }

        Ext.onReady(function () {

            //无合同下单为"是"，弹窗提示：此单为无合同下单!
            var radio1 = document.getElementById("IsOrderWithoutContract_0");//是
            var radio2 = document.getElementById("IsOrderWithoutContract_1");
            if (radio1.checked == true) {
                Ext.MessageBox.alert("提示：", "此单为无合同下单!");
            }

            //流程处理中 pid
            var pid = getQueryString("pid");
            if (pid != undefined && pid != "") {
                //实际采购单价
                var tableObj = document.getElementById('PrdtTable');
                for (var j = 2; j < tableObj.rows.length - 1; j++) {
                    //实际含税采购单价(采购币种)
                    XFormOnChange(agent.Eles[tableObj.rows[j].cells[10].children[0].getAttribute("xform_xele_index")]);
                }
            }

            var PurchaseRequisitionNo = agent.Eles[document.getElementById("PurchaseRequisitionNo").getAttribute("xform_xele_index")].getValue();
            var NewPurchaseAppInfoFormNo = agent.Eles[document.getElementById("NewPurchaseAppInfoFormNo").getAttribute("xform_xele_index")].getValue();
            if (PurchaseRequisitionNo == "") {

                agent.Eles[document.getElementById("PurchaseRequisitionNo").getAttribute("xform_xele_index")].setValue(NewPurchaseAppInfoFormNo);
            }

            //备注

            // var Remark = agent.Eles[document.getElementById("Remark").getAttribute("xform_xele_index")].getValue();//处理单备注
            // var rk = agent.Eles[document.getElementById("rk").getAttribute("xform_xele_index")].getValue();//销售机会备注
            //if (Remark == "") {
            //     agent.Eles[document.getElementById("Remark").getAttribute("xform_xele_index")].setValue(rk);//处理单备注
            // }

            getRMB(); //人民币采购 且 行项目选择直发时才显示
            getWB();//外币销售 且 行项目选择直发时才显示

            //var OrderID = agent.Eles[document.getElementById("OrderID").getAttribute("xform_xele_index")].getValue();
            //agent.Eles[document.getElementById("PurchaseCompanyCode").getAttribute("xform_xele_index")].setValue(OrderID);
            var CustomerDeliveryDate = agent.Eles[document.getElementById("CustomerDeliveryDate").getAttribute("xform_xele_index")].getValue();
            var AcceptableCustomerDeliveryDate = agent.Eles[document.getElementById("AcceptableCustomerDeliveryDate").getAttribute("xform_xele_index")].getValue();

            if (AcceptableCustomerDeliveryDate == "") {
                agent.Eles[document.getElementById("AcceptableCustomerDeliveryDate").getAttribute("xform_xele_index")].setValue(CustomerDeliveryDate);

            }

            //获取厂商下单要求信息
            var str = ManufacturerOrderRequire();
            //将厂商下单要求信息显示在DIV“div_OrderRequire” 内
            var div = document.getElementById("div_OrderRequire");
            div.innerHTML = str;

        });

        //厂商下单要求
        function ManufacturerOrderRequire() {
            //var str;
            //var url = YZSoft.$url('Oimec/CRM/Services/CRHandler.ashx');
            //var SalesOpportunitiesFormNo = agent.Eles[document.getElementById("SalesOpportunitiesFormNo").getAttribute("xform_xele_index")].getValue();
            ////SalesOpportunitiesFormNo = "XSJH19110079";
            //var parm = { method: "GetSalesOpportunityInfoByForm", FormNo: SalesOpportunitiesFormNo };
            //AjaxParm(url, false, parm, function (action) {

            //    res = action.result;
            //    //下单要求信息拼接
            //    str = ManufacturerOrderRequireInfo(res);
            //})
            //return str;
            var str;
            // 判断是预审还是机会
            var type = getXValue("tp");

            var url = "";
            var parm;
            
             var TaskID = agent.Eles[document.getElementById("SalesOpportunitiesItemID").getAttribute("xform_xele_index")].getValue();

            url = YZSoft.$url('Oimec/ApiServices/PurchaseAPIHandler.ashx');
            if (type == "易捷") {
               
                parm = { method: "GetPurChaseAppInfoByTypeForm", TaskID: TaskID, type: type };
            }
            else { //改成从申请单获取
                
                parm = { method: "GetPurChaseAppInfoByTypeForm", TaskID: TaskID, type: type };
            }
            AjaxParm(url, false, parm, function (action) {

                res = action.result;
                //下单要求信息拼接
                str = ManufacturerOrderRequireInfo(res);
            })
            return str;
        }

        //下单要求信息拼接
        function ManufacturerOrderRequireInfo(res) {

            if (res == null || res.length == 0)
                return null;

            if (res.length > 0)
                var data = res[0];

            //获取供应商信息
            var str = "",
                name = "",
                attachment = "";


            //判断供应商信息
            //DF_MM_NewPurchase_Detail.PartnerSAPID
            //循环产品明细信息获取对应供应商
            var SD, TEKFLUKE, BK, AMTEK, NF, RZ, JS, DH, ADKS,NI;

            var tableid = "PrdtTable";
            var tableObj = document.getElementById(tableid);
            for (var i = 2; i < tableObj.rows.length - 1; i++) {    //遍历Table的所有Row

                //供应商SAPID
                var idPartnerSAPID = getElementId("PartnerSAPID", i - 2, "input");
                var PartnerSAPID = document.getElementById(idPartnerSAPID).value;
				
				 //厂商直/分销
                var idDirectDistribution = getElementId("DirectDistribution", i - 2, "select");
                var DirectDistributionV = document.getElementById(idDirectDistribution).value;

                //采购币种
                var idPurchaseCurrency = getElementId("PurchaseCurrency", i - 2, "select");
                var PurchaseCurrencyV = document.getElementById(idPurchaseCurrency).value;

                if (PartnerSAPID == "1026806" || PartnerSAPID == "1027639") {
                    SD = true;
                }
                if (PartnerSAPID == "1006334"
                    || PartnerSAPID == "1024995"
                    || PartnerSAPID == "1006206"
                    || PartnerSAPID == "1001464"
                    || PartnerSAPID == "1027221"
                    || PartnerSAPID == "1024847"
                    || PartnerSAPID == "1025013"
                    || PartnerSAPID == "1025144") {

                    TEKFLUKE = true;
                }

                if (PartnerSAPID == "1024908") {
                    BK = true;
                }

                if (PartnerSAPID == "1028670" || PartnerSAPID == "1029122") {
                    AMTEK = true;
                }

                if (PartnerSAPID == "1024981") {
                    NF = true;
                }

                if (PartnerSAPID == "1005975") {
                    RZ = true;
                }
                if (PartnerSAPID == "1008470") {
                    JS = true;
                }
                if (PartnerSAPID == "1000286") {
                    DH = true;
                }
                if (PartnerSAPID == "1005902") {
                    ADKS = true;
                }
				if (PartnerSAPID == "1000974") {
                    NI = true;
                }
            }



            //附件取值，机会上厂商下单要求文档附件拼接一起显示
            if (data.AnnexFollowingOrder != null) {
                if (attachment == "") attachment = data.AnnexFollowingOrder;
                else attachment = attachment + "," + data.AnnexFollowingOrder;
            }
            if (SD) {
                if (DirectDistributionV == "分销") {
                    if (data.KYSAttachment1 != null) {
                        if (attachment == "") attachment = data.KYSAttachment1;
                        else attachment = attachment + "," + data.KYSAttachment1;
                    }
                }
                if (DirectDistributionV == "直销") {
                    if (data.KYSAttachment2 != null) {
                        if (attachment == "") attachment = data.KYSAttachment2;
                        else attachment = attachment + "," + data.KYSAttachment2;
                    }
                }
				  
            }
            if (TEKFLUKE) {
                if (PurchaseCurrencyV == "CNY" && PartnerSAPID == "1006334") {
                    if (data.TEKAttachment != null) {
                        if (attachment == "") attachment = data.TEKAttachment;
                        else attachment = attachment + "," + data.TEKAttachment;
                    }
                }
            }
            if (NF) {
                if (data.NFAttachment != null) {
                    if (attachment == "") attachment = data.NFAttachment;
                    else attachment = attachment + "," + data.NFAttachment;
                }
            }
            agent.Eles[document.getElementById("ManufacturerOrderAttachment").getAttribute("xform_xele_index")].setValue(attachment);

            if (SD) {
                //是德
                if (data.KeysightTechnologiesChineseName != null) {
                    name = "是德";
                    str += "<table><tr><td class='title1' font-size='12px' colspan='4'>" + name + "</td></tr>";
                    
                    str += "<tr>";
                  

                    if (data.KeysightTechnologiesChineseName == null) data.KeysightTechnologiesChineseName = "";
                    str += "<td class='tsbottomlabel'>" + "中文公司全称" + "</td><td class='tsbottomtext'>" + data.KeysightTechnologiesChineseName + "</td>";
                    if (data.KeysightTechnologiesEnglishName == null) data.KeysightTechnologiesEnglishName = "";
                    str += "<td class='tsbottomlabel'>" + "英文公司全称" + "</td><td class='tsbottomtext'>" + data.KeysightTechnologiesEnglishName + "</td>";
                    str += "</tr>";

                    str += "<tr>";
                    //str += "<td class='tsbottomlabel'>" + "英文地址" + "</td><td class='tsbottomtext' colspan='3'>" + data.KeysightTechnologiesEnglishAdress + "</td>";
                    if (data.KeysightTechnologiesChineseAdress == null) data.KeysightTechnologiesChineseAdress = "";
                    str += "<td class='tsbottomlabel'>" + "中文地址" + "</td><td class='tsbottomtext'>" + data.KeysightTechnologiesChineseAdress + "</td>";
                    if (data.KeysightTechnologiesEnglishAdress == null) data.KeysightTechnologiesEnglishAdress = "";
                    str += "<td class='tsbottomlabel'>" + "英文地址" + "</td><td class='tsbottomtext'>" + data.KeysightTechnologiesEnglishAdress + "</td>";
                    str += "</tr>";
					
					 //  str += "<tr>";
                    //str += "<td class='tsbottomlabel'>" + "确认" + "</td><td class='tsbottomtext' colspan='3'>  <input type='checkbox' name='favorite' value='1' disabled checked /></td>";
                   // str += "</tr>";

                    if (DirectDistributionV=="直销") {
                    str += "<tr>";
                    if (data.KeysightTechnologiesVendorSalesperson == null) data.KeysightTechnologiesVendorSalesperson = "";
                    str += "<td class='tsbottomlabel'>" + "厂商销售人员" + "</td><td class='tsbottomtext'>" + data.KeysightTechnologiesVendorSalesperson + "</td>";
                    if (data.KeysightTechnologiesEnglishTel == null) data.KeysightTechnologiesEnglishTel = "";
                    str += "<td class='tsbottomlabel'>" + "厂商销售人员电话" + "</td><td class='tsbottomtext'>" + data.KeysightTechnologiesEnglishTel + "</td>";
                    str += "</tr>";

                    str += "<tr>";
                    if (data.KeysightTechnologiesEnglishEmail == null) data.KeysightTechnologiesEnglishEmail = "";
                    str += "<td class='tsbottomlabel'>" + "厂商销售人员邮箱" + "</td><td class='tsbottomtext' colspan='3' >" + data.KeysightTechnologiesEnglishEmail + "</td>";
                    str += "</tr>";
					}

                    str += "</table>";
                }
            }

            if (TEKFLUKE) {
                //TEK&FLUKE
                if (data.TEKFlukeSalesman != null) {
                    name = "TEK&amp;FLUKE ";
                    str += "<table><tr><td class='title1' font-size='12px' colspan='4'>" + name + "</td></tr>";
                    str += "<tr>";
                    if (data.TEKFlukeSalesman == null) data.TEKFlukeSalesman = "";
                    str += "<td class='tsbottomlabel'>" + "厂商销售人员" + "</td><td class='tsbottomtext'colspan='3'>" + data.TEKFlukeSalesman + "</td>";
                    str += "</tr>";

                    if (PurchaseCurrencyV == "CNY" && PartnerSAPID == "1006334") {
                        str += "<tr>";
                        if (data.TEKChineseName == null) data.TEKChineseName = "";
                        str += "<td class='tsbottomlabel'>" + "中文全称" + "</td><td class='tsbottomtext'>" + data.TEKChineseName + "</td>";
                        str += "</tr>";
                    }

                    if (PurchaseCurrencyV != "CNY") {
                        
                        str += "<tr>";
                        if (data.TEKFlukeExpectedDateExemption == null) data.TEKFlukeExpectedDateExemption = "";
                        str += "<td class='tsbottomlabel'>" + "免表预计办好日期" + "</td><td class='tsbottomtext'>" + FormatToDate(data.TEKFlukeExpectedDateExemption) + "</td>";
                        if (data.TEKFlukeDemandShipment == null) data.TEKFlukeDemandShipment = "";
                        str += "<td class='tsbottomlabel'>" + "用户需求货期" + "</td><td class='tsbottomtext'>" + FormatToDate(data.TEKFlukeDemandShipment) + " </td>";
                        str += "</tr>";
                    }

                    //str += "<tr>";
                    //if (data.TEKFlukeExplain == null) data.TEKFlukeExplain = "";
                    //str += "<td class='tsbottomlabel'>" + "说明" + "</td><td colspan='3' class='tsbottomtext'>" + data.TEKFlukeExplain + "</td>";
                    //str += "</tr>";

                    //str += "<tr>";
                    //if (data.KeysightTechnologiesEnglishEmail == null) data.KeysightTechnologiesEnglishEmail = "";
                    //str += "<td class='tsbottomlabel'>" + "厂商销售人员邮箱" + "</td><td class='tsbottomtext' colspan='3'>" + data.KeysightTechnologiesEnglishEmail + "</td>";
                    //str += "</tr>";
                    str += "</table>";
                }
            }

            //B&amp;K
            if (BK) {
                if (data.BKChineseName != null) {
                    name = " B & amp; K";
                    str += "<table><tr><td class='title1' font-size='12px' colspan='4'>" + name + "</td></tr>";
                    str += "<tr>";
                    if (data.BKChineseName == null) data.BKChineseName = "";
                    str += "<td class='tsbottomlabel'>" + "中文公司全称" + "</td><td class='tsbottomtext'>" + data.BKChineseName + "</td>";
                    if (data.BKEnglishName == null) data.BKEnglishName = "";
                    str += "<td class='tsbottomlabel'>" + "英文公司全称" + "</td><td class='tsbottomtext'>" + data.BKEnglishName + "</td>";
                    str += "</tr>";

                    str += "<tr>";
                    if (data.BKContacts == null) data.BKContacts = "";
                    str += "<td class='tsbottomlabel'>" + "用户联系人" + "</td><td colspan='3' class='tsbottomtext'>" + data.BKContacts + "</td>";
                    str += "</tr>";

                    str += "</table>";
                }
            }

            //AMTEK
            if (AMTEK) {
                if (data.AMTEKChineseName != null) {
                    name = "AMTEK";
                    str += "<table><tr><td class='title1' font-size='12px' colspan='4'>" + name + "</td></tr>";
                    str += "<tr>";
                    if (data.AMTEKChineseName == null) data.AMTEKChineseName = "";
                    str += "<td class='tsbottomlabel'>" + "中文公司全称" + "</td><td class='tsbottomtext'>" + data.AMTEKChineseName + "</td>";
                    if (data.AMTEKEnglishName == null) data.AMTEKEnglishName = "";
                    str += "<td class='tsbottomlabel'>" + "英文公司全称" + "</td><td class='tsbottomtext'>" + data.AMTEKEnglishName + "</td>";
                    str += "</tr>";

                    str += "<tr>";
                    if (data.AMTEKContacts == null) data.AMTEKContacts = "";
                    str += "<td class='tsbottomlabel'>" + "联系人" + "</td><td class='tsbottomtext'>" + data.AMTEKContacts + "</td>";
                    if (data.AMTEKTel == null) data.AMTEKTel = "";
                    str += "<td class='tsbottomlabel'>" + "电话" + "</td><td class='tsbottomtext'>" + data.AMTEKTel + "</td>";
                    str += "</tr>";

                    str += "<tr>";
                    if (data.AMTEKAdress == null) data.AMTEKAdress = "";
                    str += "<td class='tsbottomlabel'>" + "地址" + "</td><td colspan='3' class='tsbottomtext'>" + data.AMTEKAdress + "</td>";
                    str += "</tr>";

                    str += "</table>";
                }
            }

            //HIOKI
            if (RZ) {
                if (data.HIOKIChineseName != null) {
                    name = "HIOKI 日置";
                    str += "<table><tr><td class='title1' font-size='12px' colspan='4'>" + name + "</td></tr>";
                    str += "<tr>";
                    if (data.HIOKIChineseName == null) data.HIOKIChineseName = "";
                    str += "<td class='tsbottomlabel'>" + "中文公司全称" + "</td><td colspan='3' class='tsbottomtext'>" + data.HIOKIChineseName + "</td>";
                    str += "</tr>";

                    str += "<tr>";
                    if (data.HIOKIContacts == null) data.HIOKIContacts = "";
                    str += "<td class='tsbottomlabel'>" + "联系人" + "</td><td class='tsbottomtext'>" + data.HIOKIContacts + "</td>";
                    if (data.HIOKITel == null) data.HIOKITel = "";
                    str += "<td class='tsbottomlabel'>" + "电话" + "</td><td class='tsbottomtext'>" + data.HIOKITel + "</td>";
                    str += "</tr>";

                    if (DirectDistributionV == "分销") {
                    str += "<tr>";
                    if (data.HIOKIAgentName == null) data.HIOKIAgentName = "";
                    str += "<td class='tsbottomlabel'>" + "二级代理商名称" + "</td><td class='tsbottomtext'>" + data.HIOKIAgentName + "</td>";
                    if (data.HIOKIAgentContacts == null) data.HIOKIAgentContacts = "";
                    str += "<td class='tsbottomlabel'>" + "代理商联系人" + "</td><td class='tsbottomtext'>" + data.HIOKIAgentContacts + "</td>";
                    str += "</tr>";

                    str += "<tr>";
                    if (data.HIOKIAgentTel == null) data.HIOKIAgentTel = "";
                    str += "<td class='tsbottomlabel'>" + "代理商电话" + "</td><td colspan='3' class='tsbottomtext'>" + data.HIOKIAgentTel + "</td>";
                    str += "</tr>";
					}

                    str += "</table>";
                }
            }

            //JS
            if (JS) {
                if (data.ChrysanthemumChineseName != null) {
                    name = "菊水";
                    str += "<table><tr><td class='title1' font-size='12px' colspan='4'>" + name + "</td></tr>";
                    str += "<tr>";
                    if (data.ChrysanthemumChineseName == null) data.ChrysanthemumChineseName = "";
                    str += "<td class='tsbottomlabel'>" + "中文公司全称" + "</td><td class='tsbottomtext'>" + data.ChrysanthemumChineseName + "</td>";
                    if (data.ChrysanthemumSalesman == null) data.ChrysanthemumSalesman = "";
                    str += "<td class='tsbottomlabel'>" + "厂商销售人员名" + "</td><td class='tsbottomtext'>" + data.ChrysanthemumSalesman + "</td>";
                    str += "</tr>";

                    str += "</table>";
                }
            }

            //大华
            if (DH) {
                if (data.DahuaNewspaperNumber != null) {
                    name = "大华";
                    str += "<table><tr><td class='title1' font-size='12px' colspan='4'>" + name + "</td></tr>";
                    
                    str += "<tr>";
                    if (data.DahuaNewspaperNumber == null) data.DahuaNewspaperNumber = "";
                    str += "<td class='tsbottomlabel'>" + "厂商报备单号" + "</td><td colspan='3' class='tsbottomtext'>" + data.DahuaNewspaperNumber + "</td>";
                    str += "</tr>";

                    str += "</table>";
                }
            }

            //艾德克斯
            if (ADKS) {
                if (data.EdKorsChineceName != null) {
                    name = "艾德克斯";
                    str += "<table><tr><td class='title1' font-size='12px' colspan='4'>" + name + "</td></tr>";
                    
                    str += "<tr>";
                    if (data.EdKorsChineceName == null) data.EdKorsChineceName = "";
                    str += "<td class='tsbottomlabel'>" + "中文全称" + "</td><td colspan='3' class='tsbottomtext'>" + data.EdKorsChineceName + "</td>";
                    str += "</tr>";

                    str += "</table>";
                }
            }
			 //NI
            if (NI) {
                if (data.NICustomerName != null) {
                    name = "NI";
                    str += "<table><tr><td class='title1' font-size='12px' colspan='4'>" + name + "</td></tr>";

                    str += "<tr>";
                    if (data.NICustomerName == null) data.NICustomerName = "";
                    str += "<td class='tsbottomlabel'>" + "中文全称" + "</td><td colspan='3' class='tsbottomtext'>" + data.EdKorsChineceName + " </td>";
                    str += "</tr>";
                    str += "<tr>";
                    if (data.NICustomerContact == null) data.NICustomerContact = "";
                    str += "<td class='tsbottomlabel'>" + "联系人" + "</td><td  class='tsbottomtext'>" + data.NICustomerContact + " </td>";
                    if (data.NICustomerContactEmail == null) data.NICustomerContactEmail = "";
                    str += "<td class='tsbottomlabel'>" + "联系人邮箱" + "</td><td  class='tsbottomtext'>" + data.NICustomerContactEmail + " </td>";
                    str += "</tr>";

                    str += "</table>";
                }
            }
            //alert(str);
            return str;

        }

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

        agent.on('beforeSubmit', function (actname1, actname) {
            if (actname == "完成采购") {

                var IsSapPochk = checkedVaule("IsSapPochk"); //集成SAP-PO

                if (IsSapPochk == "on") {

                    //付款条件

                    //var PurchasePaymentTerms = agent.Eles[document.getElementById("PurchasePaymentTerms").getAttribute("xform_xele_index")].getValue();
                    //if (PurchasePaymentTerms == "") {
                    //    Ext.MessageBox.alert('提示', '请选择采购付款条件');
                    //    return false;
                    //}
                    //采购主体公司代码

                    var PurchaseCompanyCode = agent.Eles[document.getElementById("PurchaseCompanyCode").getAttribute("xform_xele_index")].getValue();
                    if (PurchaseCompanyCode == "") {
                        Ext.MessageBox.alert('提示', '请选择采购主体公司代码');
                        return false;
                    }
                    //采购组织

                    var PurchasingOrganization = agent.Eles[document.getElementById("PurchasingOrganization").getAttribute("xform_xele_index")].getValue();
                    if (PurchasingOrganization == "") {
                        Ext.MessageBox.alert('提示', '请选择采购组织');
                        return false;
                    }

                    //采购组

                    var ProcurementSection = agent.Eles[document.getElementById("ProcurementSection").getAttribute("xform_xele_index")].getValue();
                    if (ProcurementSection == "") {
                        Ext.MessageBox.alert('提示', '请选择采购组');
                        return false;
                    }
                    // 实际付款条件
                    //var ActualPaymentTerms = agent.Eles[document.getElementById("ActualPaymentTerms").getAttribute("xform_xele_index")].getValue();
                    //if (ActualPaymentTerms == "") {
                    //    Ext.MessageBox.alert('提示', '请输入实际付款条件');
                    //    return false;
                    //}

                    //取消采购
                    var aDivIsdelete = document.getElementsByClassName("IsDelete");
                    var aDivCancelProcurement = document.getElementsByName("CancelProcurement");
                    for (var i = 0; i < aDivIsdelete.length; i++) {
                        var divIsdelete = aDivIsdelete[i];
                        var idIsdelete = divIsdelete.getElementsByTagName('input')[0].id;

                        var Isdeletev = document.getElementById(idIsdelete).checked;

                        var divCancelProcurement = aDivCancelProcurement[i];
                        var idCancelProcurement = divCancelProcurement.getElementsByTagName('input')[0].id;
                        var CancelProcurementv = document.getElementById(idCancelProcurement).value;

                        if (Isdeletev) {
                            if (CancelProcurementv == "") {
                                Ext.MessageBox.alert('提示', '请输入取消采购原因');
                                return false;
                            }

                        }

                    }


                    //采购发票税点
                    //var PurchaseInvoiceTaxPointCode = agent.Eles[document.getElementById("PurchaseInvoiceTaxPointCode").getAttribute("xform_xele_index")].getValue();
                    //if (PurchaseInvoiceTaxPointCode == "") {
                    //    Ext.MessageBox.alert('提示', '请选择采购发票税点');
                    //    return false;
                    //}
                    ////工厂
                    //var Plant = agent.Eles[document.getElementById("Plant").getAttribute("xform_xele_index")].getValue();
                    //if (Plant == "") {
                    //    Ext.MessageBox.alert('提示', '请选择工厂');
                    //    return false;
                    //}
                    ////库存地
                    //var Stockpile = agent.Eles[document.getElementById("Stockpile").getAttribute("xform_xele_index")].getValue();
                    //if (Plant == "") {
                    //    Ext.MessageBox.alert('提示', '请选择库存地');
                    //    return false;
                    //}
                    ////供应商
                    //var ZSupplier = agent.Eles[document.getElementById("ZSupplier").getAttribute("xform_xele_index")].getValue();
                    //if (ZSupplier == "") {
                    //    Ext.MessageBox.alert('提示', '请选择供应商');
                    //    return false;
                    //}
                    ////采购合同
                    //var PurchaseContractNo = agent.Eles[document.getElementById("PurchaseContractNo").getAttribute("xform_xele_index")].getValue();
                    //if (PurchaseContractNo == "") {
                    //    Ext.MessageBox.alert('提示', '请输入采购合同');
                    //    return false;
                    //}

                    ////供应商纸面合同交货日期
                    //var ContractDeliveryDate = agent.Eles[document.getElementById("ContractDeliveryDate").getAttribute("xform_xele_index")].getValue();
                    //if (ContractDeliveryDate == "") {
                    //    Ext.MessageBox.alert('提示', '请选择供应商纸面合同交货日期');
                    //    return false;
                    //}

                }//勾选是否集成控制END

                // return false;

            }



        });

          //获取日期
        function FormatToDate(val) {
            if (val != null) {
                var date = new Date(parseInt(val.replace("/Date(", "").replace(")/", ""), 10));
                //月份为0-11，所以+1，月份小于10时补个0
                var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
                var currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
                return date.getFullYear() + "-" + month + "-" + currentDate;
            }
            return "";
        }
        /*   注**：这是一个公共的方法
    **  获取行项目table对应标签控件元素id
    **  参数说明：name(控件name)，i(行索引)，htmltag(要获取控件div中对应的标签名)
    **  示例：获取第1行行项目文本框name="txtname",参数：txtname,0,input
    */
        function getElementId(name, i, htmltag) {
            var divs = document.getElementsByName(name);
            var div = divs[i];
            var id = div.getElementsByTagName(htmltag)[0].id;
            return id;

        }
    </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" Text="--系统自动生成--" BackColor="#8AB3DF" XDataBind="DF_MM_NewPurchase_Info.FormNo"></aspxform:XLabel>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td align="left" colspan="3">
                        <asp:Label id="Label85" runat="server" text="标*的是采购员必填项" forecolor="Red"></asp:Label></td>
                    <td align="right">
                        <aspxform:XButton id="XButton3" runat="server" Text="打印采购处理单" align="right" OnClientClick="clprint()" Height="25px" Width="120px"></aspxform:XButton>
                    </td>
                </tr>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="Label3" runat="server" text="基本信息"></asp:Label>
                        <aspxform:XTextBox id="SalesOpportunitiesItemID" runat="server" XDataBind="DF_MM_NewPurchase_Info.SalesOpportunitiesFKID" Width="40px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="true"></aspxform:XTextBox>
                        <aspxform:XDropDownList id="XDropDownList1" runat="server" DisplayColumn="Name" ValueColumn="Name" HiddenExpress="1" DataMap="FormNo->SalesOpportunitiesFormNo;BU->BU;Area->Area;BillingCompany->BillingCompany;SalesOrganization->SalesOrganization;ProductLine->DF_MM_NewPurchase_Info.BUID;SalesOffice->SalesOffice1;STPName->STPName;SAPOFContact->SAPOFContact;SAPOFPhone->STPPhone;SAPOFAddress->STPAdress;PTPName->PTPName;CustomerDeliveryWay->CustomerDeliveryWay;CustomerDeliveryDate->CustomerDeliveryDate1;NonstopAirport->NonstopAirport;Exemption->Exemption;TaxType->TaxType;InvoiceType->InvoiceType;ContractCurrency->ContractCurrency;ContractAmount->ContractAmount;GrossMargin->GrossMargin;GrossProfitRate->GrossProfitRate;SAPQuotation->SAPQuotation;ObjName->ObjName;AddedDeliver->AddedDeliver;DeliveryBatch->DeliveryBatch;BatchdeliveryRemarks->BatchdeliveryRemarks;PayAppFormNo->AdvanceChargeNo;type->PurHandleType;" XDataSource="TableName:V_DF_SalesInfo_PurHandle;Filter:FormNo->DF_MM_NewPurchase_Info.SalesOpportunitiesFormNo">
                            <asp:ListItem Selected="True"></asp:ListItem>
                        </aspxform:XDropDownList>
						 <aspxform:XTextBox id="XTextBox500" runat="server" XDataBind="PurHandleType" HiddenExpress="1"></aspxform:XTextBox>
                        <aspxform:XDropDownList id="XDropDownList2" runat="server" DisplayColumn="Name" ValueColumn="Name" HiddenExpress="1" DataMap="FormNo->FormNo;DisplayName->DisplayName;Marks->Marks;IsPayAdvance->IsPayAdvance;GoodsEnglishCompany->GoodsEnglishCompany;GoodsEnglishAddress->GoodsEnglishAddress;GoodsNotifier->GoodsNotifier;GoodsTel->GoodsTel;GoodsPhone->GoodsPhone;GoodsEmail->GoodsEmail;GoodsBusinessLicense->GoodsBusinessLicense;GoodsCountryOrigin->GoodsCountryOrigin;GoodsPortArrival->GoodsPortArrival;GoodsPortDelivery->GoodsPortDelivery;FreeDate->FreeDate;ExpectedIssuingDate->ExpectedIssuingDate;UserExemptionName->UserExemptionName;UserExemptionPhone->UserExemptionPhone;UserExemptionEmail->UserExemptionEmail;UserCardName->UserCardName;UserCardPhone->UserCardPhone;UserCardEmail->UserCardEmail;IsOrderWithoutContract->IsOrderWithoutContract;OrderWithoutContractNo->OrderWithoutContractNo;TradeTerms->TradeTerms;ContractDeliveryDate->CustomerContractDeliveryDate;TermsPayment->TermsPayment;ActTermsPayment->ActTermsPayment;Type->Type;SO->SO;MEUR->MEUR;MEURAttachments->MEURAttachments;GoodsNotifierSex->GoodsNotifierSex;CustomerReceivingContacts->CustomerReceivingContacts;CustomerReceivingLandline->CustomerReceivingLandline;CustomerReceivingPhone->CustomerReceivingPhone;CustomerReceivingAdress->CustomerReceivingAdress;CustomerReceivingZipCode->CustomerReceivingZipCode;CustomerReceivingName->CustomerReceivingName;MEURemarks->MEURemarks;MEURJudgingMaterials->MEURJudgingMaterials;ManufacturerRemarks->ManufacturerRemark;" XDataSource="TableName:DF_MM_NewPurchaseApp_Info;Filter:FKID->DF_MM_NewPurchase_Info.SalesOpportunitiesFKID,type->PurHandleType">
                            <asp:ListItem Selected="True"></asp:ListItem>
                        </aspxform:XDropDownList>
                        <aspxform:XTextBox id="NewPurchaseAppInfoFormNo" runat="server" XDataBind="FormNo" Width="20px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="true"></aspxform:XTextBox>
                        <aspxform:XTextBox id="rk" runat="server" XDataBind="Remark" HiddenInput="true"></aspxform:XTextBox>
                         <aspxform:XTextBox id="XTextBox6" runat="server" XDataBind="DF_MM_NewPurchase_Info.SalesOpportunitiesFormNo" Width="20px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="true"></aspxform:XTextBox>
                        <aspxform:XTextBox id="TaskID" runat="server" XDataBind="DF_MM_NewPurchase_Info.TaskID" Width="20px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="true"></aspxform:XTextBox>
                        <aspxform:XDropDownList id="XDropDownList8" style="HEIGHT: 20px; WIDTH: 19px" runat="server" HiddenExpress="1" DataMap="ID->NID" XDataSource="TableName:DF_MM_Negotiation_Info;Filter:HTaskID->DF_MM_NewPurchase_Info.TaskID"></aspxform:XDropDownList>
                        <aspxform:XTextBox id="NID" runat="server" XDataBind="NID" Width="20px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="true"></aspxform:XTextBox>
                        <aspxform:XTextBox id="StepName" runat="server" XDataBind="Global.StepName" Width="20px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="true"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label5" runat="server" text="申请人"></asp:Label>
                        <aspxform:XTextBox id="AppAccount" runat="server" XDataBind="DF_MM_NewPurchase_Info.AppAccount" Width="20px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="False" HiddenExpress="1"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="DisplayName" runat="server" BackColor="#E6F1F8" XDataBind="DisplayName" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                        <%--<aspxform:XTextBox id="PurchaseCurrency" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchase_Detail.PurchaseCurrency" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" HiddenInput="true" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></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="CreateDate" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchase_Info.CreateDate" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisplayOnly="True"></aspxform:XDateTimePicker>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label4" runat="server" text="业务员"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XDropDownList id="XDropDownList20" runat="server" HiddenExpress="1" DataMap="IsEasyJet->IsEasyJet" XDataSource="TableName:V_DF_SA_SS_SalesPersonnel;Filter:StaffID->ownerId"></aspxform:XDropDownList>
                        <aspxform:XTextBox id="IsEasyJet" runat="server" BackColor="#E6F1F8" XDataBind="IsEasyJet" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                        <aspxform:XTextBox id="ownerId" runat="server" BackColor="#E6F1F8" XDataBind="ownerId" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                        <aspxform:XTextBox id="ownerName" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchase_Info.Salesman" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td width="62" class="tsbottomlabel">
                        <asp:Label id="Label6" runat="server" text="销售机会编号"></asp:Label></td>
                    <td width="465" class="tsbottomtext">
                        <aspxform:XTextBox id="SalesOpportunitiesFormNo" runat="server" BackColor="#E6F1F8" XDataBind="SalesOpportunitiesFormNo" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisplayOnly="True"></aspxform:XTextBox>
                        <input onclick="getClickBySalesOpportunitiesItemID()" type="button" value="查看详情" runat="server" /></td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label46" runat="server" text="事业部"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="BUID" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchase_Info.BUID" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                        <aspxform:XTextBox id="BU" runat="server" BackColor="#E6F1F8" XDataBind="BU" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label47" runat="server" text="销售办公室"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="SalesOffice1" runat="server" BackColor="#E6F1F8" XDataBind="SalesOffice1" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                        <aspxform:XTextBox id="SalesOffice" runat="server" BackColor="#E6F1F8" XDataBind="SalesOffice" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                        <aspxform:XDropDownList id="SalesOffices" runat="server" XDataBind="SalesOffices" Width="100%" DisplayColumn="SalesOffice" ValueColumn="SalesOfficeID" HiddenExpress="1" DataMap="SalesOffice->SalesOffice" XDataSource="TableName:DF_SA_SS_SalesOffice;OrderBy:OrderID;Filter:SalesOfficeID->SalesOffice1;" name="">
                            <asp:ListItem>未绑定</asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label7" runat="server" text="开票公司"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="BillingCompany" runat="server" BackColor="#E6F1F8" XDataBind="BillingCompany" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label8" runat="server" text="销售组织"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="SalesOrganization" runat="server" BackColor="#E6F1F8" XDataBind="SalesOrganization" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label9" runat="server" text="所属地区"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="Area" runat="server" BackColor="#E6F1F8" XDataBind="Area" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label10" runat="server" text="采购预付款申请单号"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="AdvanceChargeNo" runat="server" BackColor="#E6F1F8" XDataBind="AdvanceChargeNo" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label12" runat="server" text="无合同下单"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XRadioButtonList id="IsOrderWithoutContract" runat="server" XDataBind="IsOrderWithoutContract" name="ElectronicChapterType" DisableExpress="1" RepeatDirection="Horizontal">
                            <asp:ListItem>是</asp:ListItem>
                            <asp:ListItem>否</asp:ListItem>
                        </aspxform:XRadioButtonList>
                    </td>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label13" runat="server" text="无合同下单单号"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="OrderWithoutContractNo" runat="server" BackColor="#E6F1F8" XDataBind="OrderWithoutContractNo" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DataMap="TaskID->OrderWithoutContractNoTaskID" ValueToDisplayText="TableName:DF_Purchase_OrderWithoutContract;FilterColumn:FormNo;DisplayColumn:FormNo"></aspxform:XTextBox>
                        <aspxform:XHistoryFormLink id="XHistoryFormLink1" runat="server" BackColor="#D4E4FE" XDataBind="OrderWithoutContractNoTaskID" HiddenExpress='OrderWithoutContractNo==""'>查看</aspxform:XHistoryFormLink>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label14" runat="server" text="唛头"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="Marks" runat="server" BackColor="#E6F1F8" XDataBind="Marks" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label15" runat="server" text="SAP报价单号"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="SAPQuotation" runat="server" BackColor="#E6F1F8" XDataBind="SAPQuotation" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
                 <tr>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label114" runat="server" text="业务类型"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox runat="server" ID="tp" BackColor="#E6F1F8" XDataBind="type" Express="PurHandleType" BorderWidth="1" BorderColor="#DCDCDC" ReadOnly="True" width="20%"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label115" runat="server" text="SAP-SO号"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox7" runat="server" BackColor="#E6F1F8" XDataBind="SO" BorderWidth="1" BorderColor="#DCDCDC" ReadOnly="True" width="20%"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="Label16" runat="server" text="售达方信息"></asp:Label></td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label17" runat="server" text="售达方客户名称"></asp:Label>
                        <aspxform:XTextBox id="XTextBox2" runat="server" Width="20px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="False" HiddenExpress="1"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="STPName" runat="server" BackColor="#E6F1F8" XDataBind="STPName" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td width="62" class="tsbottomlabel">
                        <asp:Label id="Label18" runat="server" text="售达方地址"></asp:Label></td>
                    <td width="465" class="tsbottomtext">
                        <aspxform:XTextBox id="STPAdress" runat="server" BackColor="#E6F1F8" XDataBind="STPAdress" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisplayOnly="True"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label19" runat="server" text="售达方电话"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="STPPhone" runat="server" BackColor="#E6F1F8" XDataBind="STPPhone" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td width="62" class="tsbottomlabel">
                        <asp:Label id="Label20" runat="server" text="联系人"></asp:Label></td>
                    <td width="465" class="tsbottomtext">
                        <aspxform:XTextBox id="SAPOFContact" runat="server" BackColor="#E6F1F8" XDataBind="SAPOFContact" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisplayOnly="True"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="Label21" runat="server" text="付款方信息"></asp:Label></td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label22" runat="server" text="付款方客户名称"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XTextBox id="PTPName" runat="server" BackColor="#E6F1F8" XDataBind="PTPName" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="Label23" runat="server" text="交易信息"></asp:Label></td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label24" runat="server" text="付款条件"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="TermsPayment" runat="server" BackColor="#E6F1F8" XDataBind="TermsPayment" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label25" runat="server" text="销售合同币种"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XDropDownList id="ContractCurrency" runat="server" XDataBind="ContractCurrency" DisplayColumn="Name" ValueColumn="Name" XDataSource="TableName:V_DF_SA_SS_SalesCurrency;Filter:BufferType:RuntimeUpdate" DisableExpress="1" PromptText="--请选择--">
                            <asp:ListItem></asp:ListItem>
                        </aspxform:XDropDownList>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label26" runat="server" text="合同实际付款条件"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="ActTermsPayment" runat="server" BackColor="#E6F1F8" XDataBind="ActTermsPayment" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ValueToDisplayText DisableExpress="1"></aspxform:XTextBox>
                    </td>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label31" runat="server" text="此销售合同是否有预付"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XRadioButtonList id="IsPayAdvance" runat="server" XDataBind="IsPayAdvance" name="IsPayAdvance" DisableExpress="1" RepeatDirection="Horizontal">
                            <asp:ListItem>无需预付</asp:ListItem>
                            <asp:ListItem>有预付</asp:ListItem>
                        </aspxform:XRadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label35" runat="server" text="税种"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="TaxType" runat="server" BackColor="#E6F1F8" XDataBind="TaxType" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label36" runat="server" text="销售合同总金额"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="ContractAmount" runat="server" BackColor="#E6F1F8" XDataBind="ContractAmount" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label37" runat="server" text="发票类型"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="InvoiceType" runat="server" BackColor="#E6F1F8" XDataBind="InvoiceType" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label38" runat="server" text="客户交货期"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox1" runat="server" XDataBind="CustomerDeliveryDate1" HiddenInput="true"></aspxform:XTextBox>
                        <aspxform:XTextBox id="CustomerDeliveryDate" runat="server" BackColor="#E6F1F8" XDataBind="CustomerDeliveryDate" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText Express="javascript('GetCustomerDeliveryDate',CustomerDeliveryDate1)"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label39" runat="server" text="直发机场"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="NonstopAirport" runat="server" BackColor="#E6F1F8" XDataBind="NonstopAirport" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label106" runat="server" text="客户纸面合同交货日期"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="CustomerContractDeliveryDate" runat="server" BackColor="#E6F1F8" XDataBind="CustomerContractDeliveryDate" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label40" runat="server" text="是否免税"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XRadioButtonList id="Exemption" runat="server" XDataBind="Exemption" name="ElectronicChapterType" DisableExpress="1" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True">是</asp:ListItem>
                            <asp:ListItem>否</asp:ListItem>
                        </aspxform:XRadioButtonList>
                    </td>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label41" runat="server" text="免税说明"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="DescriptionExemption" runat="server" BackColor="#E6F1F8" XDataBind="DescriptionExemption" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label43" runat="server" text="客户交货方式"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="CustomerDeliveryWay" runat="server" BackColor="#E6F1F8" XDataBind="CustomerDeliveryWay" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label42" runat="server" text="毛利(不含税)"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="GrossMargin" runat="server" BackColor="#E6F1F8" XDataBind="GrossMargin" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label107" runat="server" text="整单/分批交货"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="DeliveryBatch" runat="server" BackColor="#E6F1F8" XDataBind="DeliveryBatch" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label44" runat="server" text="毛利率"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="GrossProfitRate" runat="server" BackColor="#E6F1F8" XDataBind="GrossProfitRate" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText DisableExpress="1"></aspxform:XTextBox>
                        % 
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label108" runat="server" text="分批交货备注"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="BatchdeliveryRemarks" runat="server" BackColor="#E6F1F8" XDataBind="BatchdeliveryRemarks" Width="100%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText DisableExpress="1" TextMode="MultiLine"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label96" runat="server" text="发货增值"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XRadioButtonList id="XRadioButtonList1" runat="server" XDataBind="AddedDeliver" name="IsPayAdvance" DisableExpress="1" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Value="0">否</asp:ListItem>
                        </aspxform:XRadioButtonList>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <%--<asp:Label id="Label27" runat="server" text="集成SAP-PO"></asp:Label>--%>
                        <aspxform:XCheckBox id="IsSapPochk" onclick="clickPOchk()" runat="server" Text="集成SAP-PO" XDataBind="DF_MM_NewPurchase_Info.IsSapPo" name="IsSapPochk" TextAlign="Left"></aspxform:XCheckBox>
                    </td>
                </tr>
                <tr hiddenexpress="DF_MM_NewPurchase_Info.IsSapPo==''">
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label88" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label28" runat="server" text="采购付款条件"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XDropDownList id="PurchasePaymentTerms" runat="server" XDataBind="DF_MM_NewPurchase_Info.PurchasePaymentTerms" Width="50%" DisplayColumn="Name" ValueColumn="Value" XDataSource="TableName:V_DF_DataSource_PayItems" PromptText="----请选择----"></aspxform:XDropDownList>
                    </td>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label89" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label33" runat="server" text="采购主体公司代码"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XDropDownList id="PurchaseCompanyCode" runat="server" XDataBind="DF_MM_NewPurchase_Info.PurchaseCompanyCode" Width="50%" DisplayColumn="CompanyName" ValueColumn="CompanyCode" XDataSource="TableName:V_DF_SA_SS_Company;" PromptText="----请选择----"></aspxform:XDropDownList>
                        <aspxform:XTextBox id="POType" runat="server" XDataBind="DF_MM_NewPurchase_Info.POType" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" DisableBehavior="ReadOnly" ValueToDisplayText Express="javascript('GetPOType',DF_MM_NewPurchase_Info.PurchaseCompanyCode)"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr hiddenexpress="DF_MM_NewPurchase_Info.IsSapPo==''">
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label90" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label29" runat="server" text="采购组织"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XDropDownList id="PurchasingOrganization" runat="server" XDataBind="DF_MM_NewPurchase_Info.PurchasingOrganization" Width="50%" DisplayColumn="Name" ValueColumn="Value" XDataSource='TableName:DF_DataSourceList;Filter:Type->"采购组织",Value1->OrderID' PromptText="----请选择----"></aspxform:XDropDownList>
                    </td>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label91" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label32" runat="server" text="采购组"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XDropDownList id="ProcurementSection" runat="server" XDataBind="DF_MM_NewPurchase_Info.ProcurementSection" Width="50%" DisplayColumn="Name" ValueColumn="Value" XDataSource='TableName:DF_DataSourceList;Filter:Type->"采购组"' PromptText="----请选择----"></aspxform:XDropDownList>
                    </td>
                </tr>
                <tr hiddenexpress="DF_MM_NewPurchase_Info.IsSapPo==''">
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label30" runat="server" text="实际采购付款条件"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XTextBox id="ActualPaymentTerms" runat="server" XDataBind="DF_MM_NewPurchase_Info.ActualPaymentTerms" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" DisableBehavior="ReadOnly" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <%--表单行项目--%> 
        <div align="center" style="TEXT-ALIGN: center" runat="server">
            <br />
            <%--<div class="scrollDiv" style="HEIGHT: 600px; WIDTH: 1200px; MARGIN: 0px auto">--%> 
            <div class="scrollDiv" id="idscrollDiv" style="HEIGHT: auto; WIDTH: 1200px; MARGIN: 0px auto; MAX-HEIGHT: 600px">
                <table width="7143" align="center" class="scrolltable" id="PrdtTable" border="0" cellspacing="0" cellpadding="3" runat="server" dynamicarea="2,1" menudock="Left">
                    <tbody>
                        <tr class="scrollColThead">
                            <th height="26" class="scrollRowThead scrollCR" style="TEXT-ALIGN: left" colspan="11">
                                <asp:Label id="XLabel38" runat="server" textalign="left" value valuetodisplaytext text="产品明细"></asp:Label>
                                <aspxform:XExcelDataExportButton id="XExcelDataExportButton1" runat="server" Text="导出产品明细" Height="25px" ExportTableID="PrdtTable"></aspxform:XExcelDataExportButton>
                                <%--<aspxform:XButton id="XButton1" runat="server" Text="获取SAP-PO数据" XClass="YZSoft.Forms.Field.Button" Height="25px" UseSubmitBehavior="False" OnClientClick="UpdatePOInfo();"></aspxform:XButton>--%>
                            </th>
                            <td width="167" style="TEXT-ALIGN: center; BACKGROUND-COLOR: #26c826" colspan="4">
                                <asp:Label id="Label105" runat="server" text="采购折扣1-总价折扣" font-bold="True" font-size="Small"></asp:Label></td>
                            <td class="scrollRowThead scrollCR" colspan="53">
                            </td>
                        </tr>
                        <tr class="scrollColThead">
                            <th width="48" height="63" class="tds">
                                <asp:Label id="XLabel39" runat="server" value valuetodisplaytext text="序号" font-bold="False"></asp:Label>
                            </th><%-- <th width="80" class="tds">
                                <asp:Label id="XLabel69" runat="server" text="取消采购" value valuetodisplaytext font-bold="False" width="44px"></asp:Label>
                            </th>--%> 
                            <th width="74" class="tds">
                                <asp:Label id="XLabel40" runat="server" value valuetodisplaytext text="业务分类" font-bold="False"></asp:Label>
                            </th>
                            <th width="87" class="tds">
                                <asp:Label id="XLabel41" runat="server" value valuetodisplaytext text="技术服务协议" font-bold="False"></asp:Label>
                            </th>
                            <th width="74" class="tds">
                                <asp:Label id="XLabel42" runat="server" value valuetodisplaytext text="物料类型" font-bold="False"></asp:Label>
                            </th>
                            <th width="100" class="tds">
                                <asp:Label id="XLabel43" runat="server" value valuetodisplaytext text="销售机会产品型号" font-bold="False"></asp:Label>
                            </th>
                            <th width="94" class="tds">
                                <asp:Label id="Label92" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel143" runat="server" value valuetodisplaytext text="实际采购型号" font-bold="False" width="92px"></asp:Label>
                            </th>
                            <td class="tds" style="WIDTH: 1%">
                                <asp:Label id="Label86" runat="server" value valuetodisplaytext text="FORM E" font-bold="False" width="92px"></asp:Label></td>
                            <th width="92" class="tds">
                                <asp:Label id="XLabel46" runat="server" value valuetodisplaytext text="销售机会采购数量" font-bold="False"></asp:Label>
                            </th>
                            <th width="92" class="tds">
                                <asp:Label id="XLabel146" runat="server" value valuetodisplaytext text="实际采购数量" font-bold="False"></asp:Label>
                            </th>
                            <th width="110" class="tds">
                                <asp:Label id="XLabel48" runat="server" value valuetodisplaytext text="销售机会含税采购单价(采购币种)" font-bold="False"></asp:Label>
                            </th>
                            <th width="108" class="tds">
                                <asp:Label id="Label93" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel248" runat="server" value valuetodisplaytext text="实际含税采购单价(采购币种)" font-bold="False"></asp:Label>
                            </th>
                            <th width="108" class="tds">
                                <asp:Label id="Label75" runat="server" value valuetodisplaytext text="折扣1百分比%" font-bold="False"></asp:Label>
                            </th>
                            <th width="108" class="tds">
                                <asp:Label id="Label79" runat="server" value valuetodisplaytext text="折扣1不含税单价(采购币种)" font-bold="False"></asp:Label>
                            </th>
                            <th width="108" class="tds">
                                <asp:Label id="Label80" runat="server" value valuetodisplaytext text="折扣1含税单价(采购币种)" font-bold="False"></asp:Label>
                            </th>
                              <th width="108" class="tds">
                                <asp:Label id="Label127" runat="server" text="折扣1总价(采购币种)" valuetodisplaytext value font-bold="False"></asp:Label>
                            </th>
                            <th width="108" class="tds">
                                <asp:Label id="Label81" runat="server" value valuetodisplaytext text="折扣1后含税采购总价(采购币种)" font-bold="False"></asp:Label>
                            </th>
                            <th width="86" class="tds">
                                <asp:Label id="Label94" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel47" runat="server" value valuetodisplaytext text="采购币种" font-bold="False"></asp:Label>
                            </th>
                            <th width="96" class="tds">
                                <asp:Label id="Label95" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel52" runat="server" value valuetodisplaytext text="采购发票税点" font-bold="False"></asp:Label>
                            </th>
                            <th width="96" class="tds">
                                <asp:Label id="Label72" runat="server" value valuetodisplaytext text="采购发票税点编码" font-bold="False"></asp:Label>
                            </th>
                            <th width="96" class="tds">
                                <asp:Label id="XLabel53" runat="server" value valuetodisplaytext text="销售机会供应商" font-bold="False"></asp:Label>
                            </th>
                            <th width="74" class="tds">
                                <asp:Label id="XLabel254" runat="server" value valuetodisplaytext text="实际供应商" font-bold="False"></asp:Label>
                            </th>
                            <th width="200" class="tds">
                                <asp:Label id="Label27" runat="server" value valuetodisplaytext text="实际供应商名称" font-bold="False"></asp:Label>
                            </th>
							  <th width="70" class="tds">
                                <asp:Label id="Label981" runat="server" text="厂商直/分销" valuetodisplaytext value font-bold="False"></asp:Label>
                            </th>
                            <th width="104" class="tds">
                                <asp:Label id="Label57" runat="server" value valuetodisplaytext text="工厂" font-bold="False"></asp:Label>
                                 <input style="height: 25px" onclick="copyLine(23, 1);" type="button" value="复制首行"  />
                            </th>
                            <th width="104" class="tds">
                                <asp:Label id="Label59" runat="server" value valuetodisplaytext text="库存地" font-bold="False"></asp:Label>
                                 <input style="height: 25px" onclick="copyLine(24, 0);" type="button" value="复制首行"  />
                            </th>
                            <td width="115" class="tds">
                                <asp:Label id="Label112" runat="server" value valuetodisplaytext text="PR号" font-bold="False"></asp:Label></td>
                            <td width="122" class="tds">
                                <asp:Label id="Label113" runat="server" value valuetodisplaytext text="PR行号" font-bold="False"></asp:Label></td>
                            <td width="122" class="tds">
                                <asp:Label id="Label97" runat="server" value valuetodisplaytext text="PO创建日期" font-bold="False"></asp:Label></td>

                            <th width="80" class="tds">
                                <asp:Label id="XLabel158" runat="server" value valuetodisplaytext text="PO号" font-bold="False"></asp:Label>
                            </th>
                            <th width="88" class="tds">
                                <asp:Label id="XLabel159" runat="server" value valuetodisplaytext text="PO行号" font-bold="False"></asp:Label>
                            </th>
                            <td width="120" class="tds">
                                <asp:Label id="Label55" runat="server" value valuetodisplaytext text="采购合同号" font-bold="False"></asp:Label></td>
                            <th width="95" class="tds">
                                <asp:Label id="Label101" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel61" runat="server" value valuetodisplaytext text="供应商联系人" font-bold="False"></asp:Label>
                            </th>
                            <th width="71" class="tds">
                                <asp:Label id="Label102" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel62" runat="server" value valuetodisplaytext text="供应商电话" font-bold="False"></asp:Label>
                            </th>
                            <th width="71" class="tds">
                                <asp:Label id="Label82" runat="server" value valuetodisplaytext text="未完成采购原因" font-bold="False"></asp:Label>
                            </th>
                            <th width="120" class="tds">
                                <asp:Label id="XLabel144" runat="server" value valuetodisplaytext text="销售机会SAP物料号" font-bold="False"></asp:Label>
                            </th>
                            <th width="100" class="tds">
                                <asp:Label id="Label52" runat="server" value valuetodisplaytext text="采购币种/人民币汇率" font-bold="False"></asp:Label>
                            </th>
                            <th width="96" class="tds">
                                <asp:Label id="XLabel243" runat="server" value valuetodisplaytext text="销售机会产品名称" font-bold="False" width="94px"></asp:Label>
                            </th>
                            <th width="220" class="tds">
                                <asp:Label id="XLabel244" runat="server" value valuetodisplaytext text="销售机会厂商名称" font-bold="False"></asp:Label>
                            </th>
                            <th width="92" class="tds">
                                <asp:Label id="Label103" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel45" runat="server" value valuetodisplaytext text="采购模式" font-bold="False"></asp:Label>
                            </th>
                            <th width="120" class="tds">
                                <asp:Label id="XLabel70" runat="server" value valuetodisplaytext text="供应商直发" font-bold="False"></asp:Label>
                            </th>
                            <th width="152" class="tds">
                                <asp:Label id="XLabel72" runat="server" value valuetodisplaytext text="直发条件" font-bold="False"></asp:Label>
                            </th>
                            <th width="152" class="tds">
                                <asp:Label id="Label109" runat="server" value valuetodisplaytext text="客户纸面合同货期" font-bold="False"></asp:Label>
                            </th>
                            <th width="105" class="tds">
                                <asp:Label id="XLabel50" runat="server" value valuetodisplaytext text="预计供应商货期" font-bold="False"></asp:Label>
                            </th>
                            <th width="152" class="tds">
                                <asp:Label id="Label110" runat="server" value valuetodisplaytext text="客户可接受供应商发货日期" font-bold="False"></asp:Label>
                            </th>
                            <td width="100" class="tds">
                                <asp:Label id="Label104" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label60" runat="server" value valuetodisplaytext text="供应商纸面合同货期" font-bold="False"></asp:Label>
                                  <input style="height: 25px" onclick="copyLine(44, 0);" type="button" value="复制首行"  />
                            </td>
                            <th width="115" class="tds">
                                <asp:Label id="XLabel51" runat="server" value valuetodisplaytext text="实际供应商货期" font-bold="False"></asp:Label>
                            </th>
                            <th width="86" class="tds">
                                <asp:Label id="XLabel154" runat="server" value valuetodisplaytext text="采购员" font-bold="False"></asp:Label>
                            </th>
                            <th width="300" class="tds">
                                <asp:Label id="XLabel55" runat="server" value valuetodisplaytext text="采购付款方式" font-bold="False"></asp:Label>
                            </th>
                            <th width="96" class="tds">
                                <asp:Label id="XLabel56" runat="server" value valuetodisplaytext text="国际运保费率" font-bold="False" width="94px" height="10px"></asp:Label>
                            </th>
                            <th width="127" class="tds">
                                <asp:Label id="XLabel57" runat="server" value valuetodisplaytext text="国际运保费(采购币种)" font-bold="False"></asp:Label>
                            </th>
                            <th width="92" class="tds">
                                <asp:Label id="XLabel58" runat="server" value valuetodisplaytext text="国际运保费(人民币)" font-bold="False"></asp:Label>
                            </th>
                            <th width="99" class="tds">
                                <asp:Label id="XLabel59" runat="server" value valuetodisplaytext text="报关杂费(人民币)" font-bold="False"></asp:Label>
                            </th>
                            <th width="90" class="tds">
                                <asp:Label id="XLabel60" runat="server" value valuetodisplaytext text="关税税率" font-bold="False"></asp:Label>
                            </th>
                            <th width="90" class="tds">
                                <asp:Label id="Label54" runat="server" value valuetodisplaytext text="加征关税%" font-bold="False"></asp:Label>
                            </th>
                            <th width="85" class="tds">
                                <asp:Label id="XLabel63" runat="server" value valuetodisplaytext text="客户保修期" font-bold="False"></asp:Label>
                            </th>
                            <th width="160" class="tds">
                                <asp:Label id="XLabel64" runat="server" value valuetodisplaytext text="报供应商最终客户名称" font-bold="False"></asp:Label>
                            </th>
                            <th width="92" class="tds">
                                <asp:Label id="Label53" runat="server" value valuetodisplaytext text="取消采购" font-bold="False"></asp:Label>
                            </th>
                            <th width="88" class="tds">
                                <asp:Label id="Label83" runat="server" value valuetodisplaytext text="取消采购原因" font-bold="False"></asp:Label>
                            </th>
                            <th width="88" class="tds">
                                <asp:Label id="XLabel49" runat="server" value valuetodisplaytext text="采购折扣%" font-bold="False"></asp:Label>
                            </th>
                            <th width="100" class="tds">
                                <asp:Label id="XLabel250" runat="server" value valuetodisplaytext text="实际含税采购总价(采购币种)" font-bold="False"></asp:Label>
                            </th>
                            <th width="69" class="tds">
                                <asp:Label id="XLabel161" runat="server" value valuetodisplaytext text="付款当前处理人" font-bold="False"></asp:Label>
                            </th>
                            <th width="80" class="tds">
                                <asp:Label id="XLabel162" runat="server" value valuetodisplaytext text="付款当前处理时间" font-bold="False"></asp:Label>
                            </th>
                            <th width="78" class="tds">
                                <asp:Label id="XLabel163" runat="server" value valuetodisplaytext text="当前状态" font-bold="False"></asp:Label>
                            </th>
                            <td width="100" class="tds">
                                <asp:Label id="Label56" runat="server" value valuetodisplaytext text="采购公司代码" font-bold="False"></asp:Label></td>
                            <td width="100" class="tds">
                                <asp:Label id="Label65" runat="server" value valuetodisplaytext text="业务员" font-bold="False"></asp:Label></td>
								 <td width="100" class="tds">
                                <asp:Label id="Label199" runat="server" text="含标准服务" value valuetodisplaytext font-bold="False"></asp:Label></td>
                            <td width="100" class="tds">
                                <asp:Label id="Label200" runat="server" text="标准服务年限" value valuetodisplaytext font-bold="False"></asp:Label></td>
                   <td width="100" class="tds">
                                <asp:Label id="Label201" runat="server" text="标准服务%" value valuetodisplaytext></asp:Label></td>
                           
                            <%--  <td width="100" class="tds" hidden="hidden">
                                <asp:Label id="Label85" runat="server" text="PR" value valuetodisplaytext font-bold="False"></asp:Label></td>
                            <td width="100" class="tds" hidden="hidden">
                                <asp:Label id="Label86" runat="server" text=" PR行" value valuetodisplaytext font-bold="False"></asp:Label></td>--%>
                        </tr>
                        <tbody>
                            <tr>
                                <td height="47" class="tds1" style="TEXT-ALIGN: center">
                                    <aspxform:XGridLineNo id="XGridLineNo1" runat="server" BackColor="Transparent" XDataBind="DF_MM_NewPurchase_Detail.LineNumber" Width="100%" BorderWidth="1" BorderColor="#DCDCDC" TextAlign="Center" BorderStyle="None">1</aspxform:XGridLineNo>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox21" runat="server" XDataBind="DF_MM_NewPurchase_Detail.BusinessClass" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox22" runat="server" XDataBind="DF_MM_NewPurchase_Detail.TSType" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox20" runat="server" XDataBind="DF_MM_NewPurchase_Detail.MaterialType" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="InitProductModel" runat="server" XDataBind="DF_MM_NewPurchase_Detail.InitProductModel" Width="100%" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="False" ValueToDisplayText DisableExpress="1" Value></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="ProductModel" runat="server" XDataBind="DF_MM_NewPurchase_Detail.ProductModel" Width="70%" BorderWidth="1" BorderColor="Gainsboro"></aspxform:XTextBox>
                                    <aspxform:XCustomBrowserButton id="XCustomBrowserButton8" runat="server" Text="..." XClass="Oimec.Dialogs.ProductInfoButton" Width="20%" DataMap="PrdtID->prdtid;PrdtName->DF_MM_NewPurchase_Detail.ProductName;PrdtModelNo->DF_MM_NewPurchase_Detail.ProductModel" BrowserWindowType="AjaxPanel" UseSubmitBehavior="False" PopupWndHeight="-1" PopupWndWidth="-1" MultiSelect="false"></aspxform:XCustomBrowserButton>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox3" runat="server" XDataBind="DF_MM_NewPurchase_Detail.FORME" Width="100%" BorderWidth="1" BorderColor="Gainsboro" ReadOnly="True" DisableExpress="1" TextAlign="Center"></aspxform:XTextBox>
                                    <aspxform:XDropDownList id="XDropDownList5" runat="server" Width="100px" HiddenExpress="1" DataMap="FORME->DF_MM_NewPurchase_Detail.FORME" XDataSource="TableName:DF_SA_SS_PurchaseTariffRates;Filter:ProductBPMID->prdtid"></aspxform:XDropDownList>
                                    <aspxform:XTextBox id="XTextBox4" runat="server" XDataBind="prdtid" Width="100%" BorderWidth="1" BorderColor="Gainsboro" HiddenExpress="1" ReadOnly="True" DisableExpress="1" TextAlign="Center"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox30" runat="server" XDataBind="DF_MM_NewPurchase_Detail.InitPruchaseNumber" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1" TextAlign="Center"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox31" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PruchaseNumber" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1" TextAlign="Center"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox33" runat="server" XDataBind="DF_MM_NewPurchase_Detail.InitPurchasePrice" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="PurchasePrice" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchasePrice" Width="100%" BorderWidth="1" BorderColor="Gainsboro" name="PurchasePrice" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="PurchaseDiscount" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchaseDiscount" Width="100%" BorderWidth="1" BorderColor="Gainsboro" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="UnitPriceExcludingTax" runat="server" XDataBind="DF_MM_NewPurchase_Detail.UnitPriceExcludingTax" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1" Express="DF_MM_NewPurchase_Detail.UnitPriceContainingTax/(1+InvoiceTax)" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="UnitPriceContainingTax" runat="server" XDataBind="DF_MM_NewPurchase_Detail.UnitPriceContainingTax" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1" Express="DF_MM_NewPurchase_Detail.PurchasePrice*DF_MM_NewPurchase_Detail.PurchaseDiscount/100" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="DiscountUnitPrice" runat="server" XDataBind="DF_MM_NewPurchase_Detail.DiscountUnitPrice" Width="100%" BorderColor="Gainsboro" BorderWidth="1" name="DiscountUnitPrice" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="TotalDiscountIncludingTax" runat="server" XDataBind="DF_MM_NewPurchase_Detail.TotalDiscountIncludingTax" Width="100%" BorderColor="Gainsboro" BorderWidth="1" Express="DF_MM_NewPurchase_Detail.PurchasePrice*DF_MM_NewPurchase_Detail.PruchaseNumber-DF_MM_NewPurchase_Detail.UnitPriceContainingTax*DF_MM_NewPurchase_Detail.PruchaseNumber-DF_MM_NewPurchase_Detail.DiscountUnitPrice" name="TotalDiscountIncludingTax" DisableExpress="1" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XDropDownList id="PurchaseCurrency" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchaseCurrency" DisplayColumn="Name" ValueColumn="Name" XDataSource="TableName:V_DF_SA_SS_PurchasingCurrency;Filter:BufferType:RuntimeUpdate" name="PurchaseCurrency" DisableExpress='DF_MM_NewPurchase_Detail.PurchasingPattern=="备货"' PromptText="--请选择--">
                                        <asp:ListItem>未绑定</asp:ListItem>
                                    </aspxform:XDropDownList>
                                    <%--<aspxform:XTextBox id="XTextBox32" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchaseCurrency" BorderWidth="1" BorderColor="Gainsboro" Width="100%" TextAlign="Center"></aspxform:XTextBox>--%>
                                    <aspxform:XTextBox id="XTextBox70" runat="server" XDataBind="varCurrency" Width="10" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" DataMap="ComputeRate->DF_MM_NewPurchase_Detail.ExchageRate" ValueToDisplayText="TableName:DF_SA_SS_ExchangeRate;FilterColumn:ForeignCurrency;DisplayColumn:ForeignCurrency" Express="DF_MM_NewPurchase_Detail.PurchaseCurrency"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                     <%--<aspxform:XDropDownList ID="PurchaseInvoiceTaxPointCode" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchaseInvoiceTaxPointCode" DisplayColumn="Name" ValueColumn="Name" XDataSource="TableName:V_DF_SA_SS_PurchaseInvoice;Filter:BufferType:RuntimeUpdate;OrderBy:OrderID" DisableExpress='DF_MM_NewPurchase_Detail.PurchaseCurrency!="CNY"' PromptText="--请选择--" Express='if(DF_MM_NewPurchase_Detail.PurchaseCurrency!="CNY","普票",DF_MM_NewPurchase_Detail.PurchaseInvoiceTaxPointCode)'>
                                        <asp:ListItem>未绑定</asp:ListItem>
                                    </aspxform:XDropDownList>--%>
                                    <aspxform:XDropDownList ID="PurchaseInvoiceTaxPointCode" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchaseInvoiceTaxPointCode" DisplayColumn="Name" ValueColumn="Name" XDataSource="TableName:V_DF_SA_SS_PurchaseInvoice;Filter:BufferType:RuntimeUpdate;OrderBy:OrderID" DisableExpress='DF_MM_NewPurchase_Detail.PurchaseCurrency!="CNY"' PromptText="--请选择--" >
                                        <asp:ListItem>未绑定</asp:ListItem>
                                    </aspxform:XDropDownList>
                                    <aspxform:XTextBox id="InvoiceTax" runat="server" XDataBind="InvoiceTax" Width="100%" BorderWidth="1" BorderColor="Gainsboro" HiddenInput="true" Express="javascript('GetPurchaseInvoiceTax',DF_MM_NewPurchase_Detail.PurchaseInvoiceTaxPointCode)" TextAlign="Right"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="PurchaseInvoiceTaxPoint" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchaseInvoiceTaxPoint" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1" Express="javascript('GetPurchaseInvoiceTaxPoint',DF_MM_NewPurchase_Detail.PurchaseInvoiceTaxPointCode)" TextAlign="Right"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox41" runat="server" XDataBind="DF_MM_NewPurchase_Detail.InquirySupplier" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableBehavior="ReadOnly" DisableExpress="1"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="Supplier" runat="server" XDataBind="DF_MM_NewPurchase_Detail.Supplier" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableBehavior="ReadOnly" name="Supplier" DisableExpress="1"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="ZSupplier" name="ZSupplier" runat="server" XDataBind="DF_MM_NewPurchase_Detail.ZSupplier" Width="170px" BorderWidth="1" BorderColor="Gainsboro" DisableBehavior="ReadOnly" DisableExpress="1"></aspxform:XTextBox>
                                    <aspxform:XTextBox id="PartnerSAPID" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PartnerSAPID" Width="10px" BorderWidth="1" BorderColor="Gainsboro" HiddenInput="true" DisableBehavior="ReadOnly" DisableExpress="1"  name="PartnerSAPID"></aspxform:XTextBox>
                                    <aspxform:XDataBrowserButton id="XDataBrowserButton2" runat="server" Text="..." XClass="YZSoft.Forms.Field.DataBrowserButton" Width="20px" DataMap="SupplierName->DF_MM_NewPurchase_Detail.ZSupplier;PartnerSAPID->DF_MM_NewPurchase_Detail.PartnerSAPID" XDataSource="TableName:V_DF_MSupplier_ZK;" UseSubmitBehavior="False" PopupWndHeight="-1" PopupWndWidth="-1"></aspxform:XDataBrowserButton>
                                </td>
								   <td class="tds1">
                            <aspxform:XDropDownList id="DirectDistribution" runat="server" XDataBind="DF_MM_NewPurchase_Detail.DirectDistribution" Width="100%"    name="DirectDistribution" PromptText="--请选择--">
                                <asp:ListItem>直销</asp:ListItem>
                                <asp:ListItem>分销</asp:ListItem>
                            </aspxform:XDropDownList>
                        </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="Plant" runat="server" Width="100%" BorderWidth="1" BorderColor="Gainsboro" HiddenInput="true" name="Plant"></aspxform:XTextBox>
                                    <aspxform:XDropDownList id="Plants" runat="server" XDataBind="DF_MM_NewPurchase_Detail.Plant" Width="100%" DisplayColumn="Name" ValueColumn="Value" XDataSource='TableName:V_DF_PurchaseCompany;Filter:Type->"工厂",Value1->DF_MM_NewPurchase_Info.PurchaseCompanyCode' PromptText="----请选择----"></aspxform:XDropDownList>
                                    <aspxform:XDropDownList id="XDropDownList3" runat="server" XDataBind="plant" HiddenExpress="1" DataMap="Value1->OrderID;" XDataSource='TableName:DF_DataSourceList;Filter:Type->"工厂",Value->DF_MM_NewPurchase_Detail.Plant'></aspxform:XDropDownList>
                                    <aspxform:XTextBox id="OrderID" runat="server" XDataBind="OrderID" Width="100%" BorderWidth="1" BorderColor="Gainsboro" HiddenInput="true" name="OrderID" Express="DF_MM_NewPurchase_Info.PurchaseCompanyCode"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XDropDownList id="Stockpile" runat="server" XDataBind="DF_MM_NewPurchase_Detail.Stockpile" Width="100%" DisplayColumn="StorageName" ValueColumn="SAPStoreID" XDataSource='TableName:DF_MM_SAPStorage;Filter:SAPPlant->DF_MM_NewPurchase_Detail.Plant,DeleteMark->"0"' PromptText="----请选择----"></aspxform:XDropDownList>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="PR" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PR" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableBehavior="ReadOnly" ReadOnly="True" name="PO"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="PRRowNum" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PRRowNum" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableBehavior="ReadOnly" ReadOnly="True" name="PO"></aspxform:XTextBox>
                                </td>
                                 <td class="tds1">
                                    <aspxform:XDateTimePicker id="XDateTimePicker1" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PODate" Width="100%" BorderColor="#DCDCDC" BorderWidth="1" DisableExpress='DF_MM_NewPurchase_Info.IsSapPo=="1"' ></aspxform:XDateTimePicker>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="PO" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PO" Width="100%" BorderWidth="1" BorderColor="Gainsboro" MaxLength="10" DisableBehavior="ReadOnly" name="PO"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="PORowNumber" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PORowNumber" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableBehavior="ReadOnly" name="PORowNumber"></aspxform:XTextBox>
                                    <aspxform:XTextBox id="XTextBox63" runat="server" Width="10px" BorderWidth="1" BorderColor="#DCDCDC" HiddenExpress="1" Express='javascript("SetPurchaseInfo",DF_MM_NewPurchase_Detail.PO,DF_MM_NewPurchase_Detail.PORowNumber,DF_MM_NewPurchase_Detail.LineNumber)'></aspxform:XTextBox>
                                    <aspxform:XTextBox id="XTextBox76" runat="server" Width="10px" BorderWidth="1" BorderColor="#DCDCDC" HiddenExpress="1" Express='javascript("GetInfoByPO",DF_MM_NewPurchase_Detail.PO,DF_MM_NewPurchase_Detail.PORowNumber,DF_MM_NewPurchase_Detail.LineNumber)'></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="PurchaseContractNo" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchaseContractNo" Width="100%" BorderWidth="1" BorderColor="Gainsboro" name="PurchaseContractNo"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="SupplierContact" runat="server" XDataBind="DF_MM_NewPurchase_Detail.SupplierContact" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableBehavior="ReadOnly" name="SupplierContact"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="SupplierTel" runat="server" XDataBind="DF_MM_NewPurchase_Detail.SupplierTel" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableBehavior="ReadOnly" name="SupplierTel"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="UnfinishedReason" runat="server" XDataBind="DF_MM_NewPurchase_Detail.UnfinishedReason" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableBehavior="ReadOnly"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox26" runat="server" XDataBind="DF_MM_NewPurchase_Detail.ProductSAPID" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox68" runat="server" XDataBind="DF_MM_NewPurchase_Detail.ExchageRate" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1" TextAlign="Center"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox27" runat="server" XDataBind="DF_MM_NewPurchase_Detail.ProductName" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableBehavior="ReadOnly" DisableExpress="1"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox64" runat="server" XDataBind="DF_MM_NewPurchase_Detail.ManufacturerID" Width="10px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="False" HiddenExpress="1" ValueToDisplayText name="ManufacturerID" Value></aspxform:XTextBox>
                                    <aspxform:XTextBox id="XTextBox28" runat="server" XDataBind="DF_MM_NewPurchase_Detail.Manufacturer" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XDropDownList id="PurchasingPattern" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchasingPattern" DisplayColumn="Name" ValueColumn="Name" XDataSource="TableName:V_DF_CRM_ProcurementModel;" PromptText="--请选择--" CssClass="PurchasingPattern">
                                        <asp:ListItem>未绑定</asp:ListItem>
                                    </aspxform:XDropDownList>
                                    <%--<aspxform:XTextBox id="XTextBox29" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchasingPattern" BorderWidth="1" BorderColor="Gainsboro" Width="100%" TextAlign="Center"></aspxform:XTextBox>--%></td>
                                <td class="tds1">
                                    <aspxform:XRadioButtonList id="IsSupplierSend" runat="server" XDataBind="DF_MM_NewPurchase_Detail.IsSupplierSend" name="IsSupplierSend" DisableExpress="1" RepeatDirection="Horizontal">
                                        <asp:ListItem Selected="True">非直发</asp:ListItem>
                                        <asp:ListItem>直发</asp:ListItem>
                                    </aspxform:XRadioButtonList>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox67" runat="server" XDataBind="DF_MM_NewPurchase_Detail.SupplierSendReason" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1" TextAlign="Center"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="ContractDeliveryDateTr" runat="server" XDataBind="DF_MM_NewPurchase_Detail.ContractDeliveryDateTr" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox37" runat="server" XDataBind="DF_MM_NewPurchase_Detail.InitSupplierDelivery" Width="40%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1"></aspxform:XTextBox>
                                <aspxform:XDropDownList runat="server" name="SupplierDeliveryDateUnit" ID="SupplierDeliveryDateUnit" XDataBind="DF_MM_NewPurchase_Detail.SupplierDeliveryDateUnit" Width="50%" PromptText="--请选择--">
                                      <asp:ListItem>周</asp:ListItem>
                                      <asp:ListItem>天</asp:ListItem>
                                 </aspxform:XDropDownList>
                                     </td>
                                <td class="tds1">
                                    <aspxform:XDateTimePicker id="AcceptableCustomerDeliveryDate" runat="server" XDataBind="DF_MM_NewPurchase_Detail.AcceptableCustomerDeliveryDate" Width="100%" BorderWidth="1" BorderColor="Gainsboro"></aspxform:XDateTimePicker>
                                </td>
                                <td class="tds1">
                                    <aspxform:XDateTimePicker id="ContractDeliveryDate" runat="server" XDataBind="DF_MM_NewPurchase_Detail.ContractDeliveryDate" Width="100%" BorderWidth="1" BorderColor="Gainsboro"></aspxform:XDateTimePicker>
                                </td>
                                <td class="tds1">
                                    <aspxform:XDateTimePicker id="SupplierDelivery" runat="server" XDataBind="DF_MM_NewPurchase_Detail.SupplierDelivery" Width="100%" BorderWidth="1" BorderColor="Gainsboro" name="SupplierDelivery" Express="DF_MM_NewPurchase_Detail.ContractDeliveryDate"></aspxform:XDateTimePicker>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox43" runat="server" XDataBind="DF_MM_NewPurchase_Detail.Purchaser" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="PurchasePayType" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchasePayType" Width="42%" BorderWidth="1" BorderColor="Gainsboro" DisableBehavior="ReadOnly" name="PurchasePayType" DisableExpress="1"></aspxform:XTextBox>
                                    <asp:Label id="r" style="TEXT-ALIGN: right" runat="server" text="供应商预付"></asp:Label>
                                    <aspxform:XRadioButtonList id="IsAdvancePay" style="FLOAT: right" runat="server" XDataBind="DF_MM_NewPurchase_Detail.IsAdvancePayForSupplier" Width="100px" DisableExpress="1" RepeatDirection="Horizontal" CssClass="IsAdvancePay">
                                        <asp:ListItem Value="1">有</asp:ListItem>
                                        <asp:ListItem Value="0">无</asp:ListItem>
                                    </aspxform:XRadioButtonList>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="InternationCIFRate" runat="server" XDataBind="DF_MM_NewPurchase_Detail.InternationCIFRate" Width="71px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="False" ValueToDisplayText name="InternationCIFRate" DisableExpress="1" TextAlign="Right" Value Format="type:number;.2"></aspxform:XTextBox>
                                    %</td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="InternationCIF" runat="server" XDataBind="DF_MM_NewPurchase_Detail.InternationCIF" Width="100%" BorderWidth="1" BorderColor="Gainsboro" name="InternationCIF" DisableExpress="1" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="InternationCIFRMB" runat="server" XDataBind="DF_MM_NewPurchase_Detail.InternationCIFRMB" Width="100%" BorderWidth="1" BorderColor="Gainsboro" name="InternationCIFRMB" DisableExpress="1" TextAlign="Right" Format="type:currency;pfx:￥;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="CustomsFees" runat="server" XDataBind="DF_MM_NewPurchase_Detail.CustomsFees" Width="100%" BorderWidth="1" BorderColor="Gainsboro" name="CustomsFees" DisableExpress="1" TextAlign="Right" Format="type:currency;pfx:￥;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox135" runat="server" XDataBind="DF_MM_NewPurchase_Detail.TariffRate" Width="60%" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="False" ValueToDisplayText DisableExpress="1" TextAlign="Right" Value Format="type:number;.2"></aspxform:XTextBox>
                                    %</td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox79" runat="server" XDataBind="DF_MM_NewPurchase_Detail.IncreaseTariff" Width="61px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="False" ValueToDisplayText DisableExpress="1" TextAlign="Right" Value Format="type:number;.2"></aspxform:XTextBox>
                                    %</td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox138" runat="server" XDataBind="DF_MM_NewPurchase_Detail.WarrantyPeriod" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox139" runat="server" XDataBind="DF_MM_NewPurchase_Detail.CustomerName" Width="70%" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" ReadOnly="True"></aspxform:XTextBox>
                                    <aspxform:XTextBox id="XTextBox72" runat="server" XDataBind="DF_MM_NewPurchase_Detail.IsFlag" Width="20px" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True"></aspxform:XTextBox>
                                    <aspxform:XTextBox id="XTextBox73" runat="server" XDataBind="DF_MM_NewPurchase_Detail.CustomerSAPID" Width="20px" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True"></aspxform:XTextBox>
                                    <aspxform:XDataBrowserButton id="XDataBrowserButton3" runat="server" HiddenExpress="1" Width="21px" DataMap="CustomerNameCH->DF_MM_NewPurchase_Detail.CustomerName;CustomerSAPID->DF_MM_NewPurchase_Detail.CustomerSAPID;IsFlag->DF_MM_NewPurchase_Detail.IsFlag" XDataSource="TableName:V_DF_MasterData_Customer" DisplayColumns="CustomerID:客户编号;CustomerNameCH:客户名称;CustomerSAPID:SAPID;IsFlag:红旗客户;CusLeavel:客户等级"></aspxform:XDataBrowserButton>
                                </td>
                                <td class="tds1">
                                    <aspxform:XCheckBox id="IsDelete" runat="server" XDataBind="DF_MM_NewPurchase_Detail.IsDelete" Width="30px" name="IsDelete"  CssClass="IsDelete"></aspxform:XCheckBox>
                                    <%--<aspxform:XTextBox id="IsDelete" runat="server" XDataBind="DF_MM_NewPurchase_Detail.IsDelete" BorderWidth="1" BorderColor="Gainsboro" Width="100%"     TextAlign="Right" ForeColor="Gray" Format="type:number;.2"></aspxform:XTextBox>--%></td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="CancelProcurement" runat="server" XDataBind="DF_MM_NewPurchase_Detail.CancelProcurement" ForeColor="Gray" Width="100%" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="False" ValueToDisplayText name="CancelProcurement" DisableExpress="DF_MM_NewPurchase_Detail.IsDelete!='1'" Font-Bold="True"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox35" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchaseDiscount" Width="58px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="False" ValueToDisplayText DisableExpress="1" TextAlign="Right" Value Format="type:number;.2"></aspxform:XTextBox>
                                    %</td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox36" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchaseTotalAmount" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1" Express="DF_MM_NewPurchase_Detail.PurchasePrice*(1-DF_MM_NewPurchase_Detail.PurchaseDiscount/100)*DF_MM_NewPurchase_Detail.PruchaseNumber" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                                    <aspxform:XTextBox id="XTextBox69" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchaseTotalAmountRMB" Width="70" BorderWidth="1" BorderColor="Gainsboro" HiddenInput="true" DisableExpress="1" Express="DF_MM_NewPurchase_Detail.PurchaseTotalAmount*DF_MM_NewPurchase_Detail.ExchageRate" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox143" runat="server" XDataBind="DF_MM_NewPurchase_Detail.CurrentHandler" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1"></aspxform:XTextBox>
                                    <aspxform:XDropDownList id="XDropDownList4" runat="server" Width="20px" DisplayColumn="HandlerName" ValueColumn="HandlerName" HiddenExpress="1" DataMap="ReceiveAt->DF_MM_NewPurchase_Detail.PaymentDate;HandlerName->DF_MM_NewPurchase_Detail.CurrentHandler;StateValue->DF_MM_NewPurchase_Detail.PaymentState" XDataSource="ProcedureName:PROC_DF_Purchase_PaymentSate;Filter:@PO -> DF_MM_NewPurchase_Detail.PO,@PORowNum -> DF_MM_NewPurchase_Detail.PORowNumber,@Currency -> DF_MM_NewPurchase_Detail.PurchaseCurrency;BufferType:RuntimeUpdate">
                                        <asp:ListItem>未绑定</asp:ListItem>
                                    </aspxform:XDropDownList>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox144" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PaymentDate" Width="100%" BorderWidth="1" BorderColor="Gainsboro" DisableExpress="1"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox145" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PaymentState" Width="100%" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="False" ValueToDisplayText DisableExpress="1"></aspxform:XTextBox>
                                    <%--隐藏字段--%>
                                    <aspxform:XTextBox id="XTextBox57" runat="server" XDataBind="DF_MM_NewPurchase_Detail.ManufacturerID" Width="19px" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" HiddenInput="False" HiddenExpress="1" ValueToDisplayText Value></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="PurchaseCompanyCodes" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchaseCompanyCode" Width="100%" BorderWidth="1" BorderColor="Gainsboro" name="PurchaseCompanyCodes" DisableExpress="1" Express="DF_MM_NewPurchase_Info.PurchaseCompanyCode"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="Salesman" runat="server" XDataBind="DF_MM_NewPurchase_Detail.Salesman" Width="100%" BorderWidth="1" BorderColor="Gainsboro"></aspxform:XTextBox>
                                </td>
                                <%--  <td class="tds1" hidden="hidden">
                                    <aspxform:XTextBox id="PR" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PR" Height="20px" Width="60%" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" name="PR" DisableExpress="1" Value></aspxform:XTextBox>
                                </td>
                                <td class="tds1" hidden="hidden">
                                    <aspxform:XTextBox id="PRRowNum" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PRRowNum" Height="20px" Width="60%" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" name="PRRowNum" DisableExpress="1" Value></aspxform:XTextBox>
                                </td>--%> 
                                <td hidden="hidden">
                                    <aspxform:XTextBox id="PurchaseRequisitionNo" runat="server" XDataBind="DF_MM_NewPurchase_Detail.PurchaseRequisitionNo" Width="100%" BorderWidth="1" BorderColor="Gainsboro"></aspxform:XTextBox>
                                </td>
								 <td class="tds1">
                                 <aspxform:XTextBox XDataBind="IncludingStandardService" runat="server" HiddenExpress="1"></aspxform:XTextBox>
                                      <aspxform:XDropDownList ID="IncludingStandardService" name="IncludingStandardService" DisableExpress="1" XDataBind="DF_MM_NewPurchase_Detail.IncludingStandardService" runat="server" PromptText="--请选择--">
                                            <asp:ListItem>是</asp:ListItem>
                                        <asp:ListItem>否</asp:ListItem>
                                      </aspxform:XDropDownList>
                                </td>
                                 <td class="tds1">
                                      <aspxform:XDropDownList ID="YearsService" XDataSource="ProcedureName:PROC_DF_CRM_PriceSystem_distinct;Filter:@ProductModel->DF_MM_NewPurchase_Detail.ProductModel,@Manufacturers->DF_MM_NewPurchase_Detail.Manufacturer,@status->'1'"       DisplayColumn="YearsService" ValueColumn="YearsService"  DisableExpress="1" name="YearsService" XDataBind="DF_MM_NewPurchase_Detail.YearsService" runat="server" PromptText="">
                                           
                                      </aspxform:XDropDownList>
                                </td>
                                  <td class="tds1">
                                       <aspxform:XTextBox id="ysProportion" runat="server" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" XDataBind="DF_MM_NewPurchase_Detail.Proportion" BackColor="#E6F1F8"   DisableExpress="1"  CssClass="Proportion" name="Proportion"></aspxform:XTextBox>%
                                </td>
                            </tr>
                            <tr>
                                <td height="25">
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td width="104">
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td class="tds">
                                    <asp:Label id="XLabel54" runat="server" value valuetodisplaytext text="合计" width="100%"></asp:Label></td>
                                <td class="tds1q">
                                    <aspxform:XTextBox id="XTextBox51" runat="server" Width="100%" BorderWidth="1" BorderColor="#DCDCDC" Express="sum(DF_MM_NewPurchase_Detail.TotalDiscountIncludingTax)" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td width="115">
                                </td>
                                <td width="122">
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
								 <td>
                                </td>
                                <td>
                                </td>
								 <td>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox52" runat="server" Width="100%" BorderWidth="1" BorderColor="Gainsboro" Express="sum(DF_MM_NewPurchase_Detail.InternationCIF)" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1">
                                    <aspxform:XTextBox id="XTextBox53" runat="server" Width="100%" BorderWidth="1" BorderColor="Gainsboro" Express="sum(DF_MM_NewPurchase_Detail.InternationCIFRMB)" TextAlign="Right" Format="type:currency;pfx:￥;.2"></aspxform:XTextBox>
                                </td>
                                <td class="tds1q">
                                    <aspxform:XTextBox id="XTextBox54" runat="server" Width="100%" BorderWidth="1" BorderColor="Gainsboro" Express="sum(DF_MM_NewPurchase_Detail.CustomsFees)" TextAlign="Right" Format="type:currency;pfx:￥;.2"></aspxform:XTextBox>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <%-- <td>
                                </td>
                                <td width="79">
                                </td>--%> 
                                <td width="93">
                                </td>
                            </tr>
                        </tbody>
                    </tbody>
                </table>
            </div>
        </div>
        &nbsp;&nbsp;&nbsp;<br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="Label45" runat="server" text="附件"></asp:Label></td>
                </tr>
                       <%-- <tr>
                    <td height="21" class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label87" runat="server" text="销售合同"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 80%" colspan="3">
                        <aspxform:XButton id="ButtonGenerationContract" runat="server" Text="查看合同" OnClientClick="GetButtonGenerationContract();"></aspxform:XButton>
                        <aspxform:XButton id="DownGenerationContract" runat="server" Text="下载合同" OnClientClick="GetDownGenerationContract();"></aspxform:XButton>
                    </td>
                </tr>--%>
                <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                         <aspxform:XTextBox id="ObjName" style="WIDTH: 70%" runat="server" XDataBind="ObjName" BorderColor="#DCDCDC" BorderWidth="1" HiddenExpress="1"></aspxform:XTextBox>
                        <asp:Label id="Label98" runat="server" text="销售合同"></asp:Label>
                        <aspxform:XDropDownList id="XDropDownList6" runat="server" HiddenExpress="1" XDataSource="TableName:DF_FilesShare_YH;Filter:InquiryFormNo->SalesOpportunitiesFormNo" DataMap="CustomerContract->scontract"></aspxform:XDropDownList>
                    </td>
                    <td class="tsbottomtext" style="WIDTH: 80%" colspan="3">
                        <aspxform:XAttachments id="XAttachments1" runat="server"  XDataBind="scontract" Width="100%" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.jpg;*.GIF;*.PNG;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label48" runat="server" text="上传其他销售附件"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="OtherSalesAccessories" runat="server" XDataBind="DF_MM_NewPurchase_Info.OtherSalesAccessories" Width="100%" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.jpg;*.GIF;*.PNG;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label34" runat="server" text="上传采购合同"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="ProcurementContract" runat="server" XDataBind="DF_MM_NewPurchase_Info.ProcurementContract" Width="100%" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.jpg;*.GIF;*.PNG;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label49" runat="server" text="上传其他采购附件"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="OtherProcurement" runat="server" XDataBind="DF_MM_NewPurchase_Info.OtherProcurement" Width="100%" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.jpg;*.GIF;*.PNG;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="Label50" runat="server" text="备注"></asp:Label></td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label51" runat="server" text="备注"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 80%" colspan="3">
                        <aspxform:XTextBox id="Remark" runat="server" Rows="5" XDataBind="DF_MM_NewPurchase_Info.Remark" Width="100%" BorderWidth="1" BorderColor="#DCDCDC" TextMode="MultiLine" Value></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" id="DeliverysTable" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="18" class="title1" colspan="4">
                        <asp:Label id="Label73" runat="server" value valuetodisplaytext text="外币销售供应商直发客户信息"></asp:Label>&nbsp; <%--<asp:Label id="Label166" hiddenexpress="ContractCurrency!='CNY'" runat="server" text="人民币采购供应商直发客户信息" value valuetodisplaytext></asp:Label>--%>&nbsp; <%--<input class="inputbtn" id="btn_DeliverysTbody" onclick="param.ShowHidden('btn_DeliverysTbody', 'DeliverysTbody');" type="button" size="46" value=▽展开 />--%></td>
                </tr>
                <tbody id="DeliverysTbody">
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label61" runat="server" value valuetodisplaytext text="国际运单收货英文公司名称"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsEnglishCompany" runat="server" XDataBind="GoodsEnglishCompany" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                        </td>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label62" runat="server" value valuetodisplaytext text="收货公司英文地址"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsEnglishAddress" runat="server" XDataBind="GoodsEnglishAddress" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label63" runat="server" value valuetodisplaytext text="到货通知人姓名"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsNotifier" runat="server" XDataBind="GoodsNotifier" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                        </td>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label158" runat="server" value valuetodisplaytext text="称谓"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XRadioButtonList id="GoodsNotifierSex" runat="server" XDataBind="GoodsNotifierSex" RepeatDirection="Horizontal">
                                <asp:ListItem>先生</asp:ListItem>
                                <asp:ListItem>女士</asp:ListItem>
                            </aspxform:XRadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label66" runat="server" value valuetodisplaytext text="到货通知人座机"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsTel" runat="server" XDataBind="GoodsTel" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                        </td>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label64" runat="server" value valuetodisplaytext text="到货通知人手机"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsPhone" runat="server" XDataBind="GoodsPhone" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value placeholder="多个手机号以/分割"></aspxform:XTextBox>
                            <asp:Label id="GoodsPhoneLabel" style="DISPLAY: none" runat="server" text="手机">手机格式不正确</asp:Label></td>
                    </tr>
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label68" runat="server" value valuetodisplaytext text="收货人E-MAIL"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsEmail" runat="server" XDataBind="GoodsEmail" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                            <asp:Label id="GoodsEmailLabel" style="DISPLAY: none" runat="server" text="收货人E-MAIL">邮箱格式不正确</asp:Label></td>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label67" runat="server" value valuetodisplaytext text="收货公司的营业执照五证合一号"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsBusinessLicense" runat="server" XDataBind="GoodsBusinessLicense" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                        </td>
                    </tr>
					 <tr>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label84" runat="server" value valuetodisplaytext text="贸易条款"></asp:Label></td>
                        <td height="22" class="tsbottomtext" >
                            <aspxform:XDropDownList id="TradeTerms" runat="server" XDataBind="TradeTerms" Width="60%" DisableExpress="1" PromptText="--请选择--">
                                <asp:ListItem>CIP</asp:ListItem>
                                <asp:ListItem>CIF</asp:ListItem>
                                <asp:ListItem>EXW</asp:ListItem>
                                <asp:ListItem>FOB</asp:ListItem>
                                <asp:ListItem>CPT</asp:ListItem>
                            </aspxform:XDropDownList>
                        </td>
						 <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label69" runat="server" value valuetodisplaytext text="到货港"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsPortArrival" runat="server" XDataBind="GoodsPortArrival" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label70" runat="server" value valuetodisplaytext text="原产国"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsCountryOrigin" runat="server" XDataBind="GoodsCountryOrigin" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                        </td>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label71" runat="server" value valuetodisplaytext text="发运港"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsPortDelivery" runat="server" XDataBind="GoodsPortDelivery" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label131" runat="server" text="信用证预计开出日期 或 发货前预付款预计付出日期" valuetodisplaytext value></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XDateTimePicker id="ExpectedIssuingDate" style="WIDTH: 50%" runat="server" XDataBind="ExpectedIssuingDate" DisableExpress="1" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XDateTimePicker>
                        </td>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label58" runat="server" value valuetodisplaytext text="免表预计办好日期"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XDateTimePicker id="XDateTimePicker3" style="WIDTH: 50%" runat="server" XDataBind="FreeDate" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XDateTimePicker>
                        </td>
                    </tr>
                    <tr>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label160" runat="server" value valuetodisplaytext text="用户免表办理人姓名"></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XTextBox id="UserExemptionName" runat="server" XDataBind="UserExemptionName" Width="70%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                        </td>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label161" runat="server" value valuetodisplaytext text="用户免表办理人电话"></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XTextBox id="UserExemptionPhone" runat="server" XDataBind="UserExemptionPhone" Width="70%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label162" runat="server" value valuetodisplaytext text="用户免表办理人邮箱"></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XTextBox id="UserExemptionEmail" runat="server" XDataBind="UserExemptionEmail" Width="70%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                        </td>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label163" runat="server" value valuetodisplaytext text="用户开证人姓名"></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XTextBox id="UserCardName" runat="server" XDataBind="UserCardName" Width="70%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label164" runat="server" value valuetodisplaytext text="用户开证人电话"></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XTextBox id="UserCardPhone" runat="server" XDataBind="UserCardPhone" Width="70%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                        </td>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label165" runat="server" value valuetodisplaytext text="用户开证人邮箱"></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XTextBox id="UserCardEmail" runat="server" XDataBind="UserCardEmail" Width="70%" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XTextBox>
                        </td>
                    </tr>
                   
                </tbody>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" id="DeliverysTables" style="DISPLAY: none" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="18" class="title1" colspan="4">
                        <asp:Label id="Label166" runat="server" value valuetodisplaytext text="人民币采购供应商直发客户信息"></asp:Label>&nbsp; 
                    </td>
                </tr>
                <tbody id="DeliverysTbodys">
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label74" runat="server" value valuetodisplaytext text="收货公司名称"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="CustomerReceivingId" runat="server" XDataBind="CustomerReceivingId" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" HiddenExpress="1" Value></aspxform:XTextBox>
                            <aspxform:XTextBox id="CustomerReceivingName" runat="server" XDataBind="CustomerReceivingName" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                            <aspxform:XCustomBrowserButton id="XCustomBrowserButton6" runat="server" Text="查询" XClass="Oimec.Dialogs.SelCustomerButton" Height="25px" Width="35px" DataMap=""></aspxform:XCustomBrowserButton>
                        </td>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label76" runat="server" value valuetodisplaytext text="联系人"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="CustomerReceivingContacts" runat="server" XDataBind="CustomerReceivingContacts" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label99" runat="server" value valuetodisplaytext text="收货详细地址"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="XTextBox183" runat="server" XDataBind="CustomerReceivingAdress" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                        </td>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label100" runat="server" value valuetodisplaytext text="邮编"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%" colspan="3">
                            <aspxform:XTextBox id="XTextBox202" runat="server" XDataBind="CustomerReceivingZipCode" Width="70%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                            <asp:Label id="LabzipCode" style="DISPLAY: none" runat="server" text="手机">邮编格式不正确</asp:Label></td>
                    </tr>
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label77" runat="server" value valuetodisplaytext text="联系人座机"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="CustomerReceivingLandline" runat="server" XDataBind="CustomerReceivingLandline" Width="60%" BorderWidth="1" BorderColor="#DCDCDC" Value CssClass="CustomerReceivingLandline"></aspxform:XTextBox>
                            <asp:Label id="CustomerReceivingLandlineLabel" style="DISPLAY: none" runat="server" text="联系人座机">联系人座机格式不正确</asp:Label></td>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label78" runat="server" value valuetodisplaytext text="联系人手机"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="CustomerReceivingPhone" runat="server" XDataBind="CustomerReceivingPhone" Width="60%" BorderWidth="1" BorderColor="#DCDCDC" Value></aspxform:XTextBox>
                            <asp:Label id="CustomerReceivingPhoneLabel" style="DISPLAY: none" runat="server" text="手机">联系人手机格式不正确</asp:Label></td>
                    </tr>
                </tbody>
            </tbody>
        </table>
        <table width="1200" align="center" class="table" id="OrderRequire">
		  <tbody>
                <tr>
                    <td width="1200" class="title1" colspan="4">
                        <asp:Label id="Label186" runat="server" text="采购信息" valuetodisplaytext value></asp:Label>
                         
                    </td>
                </tr>
            <tbody>
			  
                <tr>
                    <td class="title1" colspan="4">
                        <asp:Label id="Label111" runat="server" value valuetodisplaytext text="厂商订货下单要求信息"></asp:Label></td>
                </tr>
                <tr>
                    <td class="ts" style="WIDTH: 10%">
                        <asp:Label id="XLabel2" runat="server" text="厂商订货下单要求文档上传"></asp:Label></td>
                    <td class="ts1" style="WIDTH: 80%" colspan="3">
                        <aspxform:XAttachments id="ManufacturerOrderAttachment" runat="server" XDataBind="AnnexFollowingOrder" Width="100%" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif" FileTypesDescription="Word,Excel,Pdf"></aspxform:XAttachments>
                    </td>
                </tr>
				 <tr>
                     <td class="ts" style="WIDTH: 10%">
                        <asp:Label id="Label87" runat="server" text="备注"></asp:Label></td>
                     <td class="ts1" style="WIDTH: 80%" colspan="3">
                         <aspxform:XTextBox id="ManufacturerRemark" runat="server" Rows="5" XDataBind="ManufacturerRemark" Width="100%" DisableExpress="1" BorderColor="#DCDCDC" BorderWidth="1" TextMode="MultiLine" Value></aspxform:XTextBox>
                         </td>
                </tr>
            </tbody>
			 </tbody>
        </table>
        <div class="table" id="div_OrderRequire" style="WIDTH: 1200px; align-content: center">
        </div>
		  <br />
         <table width="1200" align="center" class="table" id="MEURTable" border="0" cellspacing="0" cellpadding="0" >
            <tbody>
                <tr>
                    <td height="22" class="title1" colspan="4">
                        <asp:Label id="Label188" runat="server" text="MEU/MEUR客户分类" valuetodisplaytext value></asp:Label>&nbsp; 
                        
                    </td>
                </tr>
                <tbody id="MEURTbody">
                     <tr>
                        <td class="ts" style="WIDTH: 15%">
                            <asp:Label id="Label184" runat="server" text="MEU/MEUR客户分类"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XDropDownList id="MEUR" runat="server" XDataBind="MEUR" Width="70%" DisableExpress="1" PromptText="--请选择--">
                                <asp:ListItem>A类</asp:ListItem>
                                <asp:ListItem>B类</asp:ListItem>
                                <asp:ListItem>C类</asp:ListItem>
                                <asp:ListItem>D类</asp:ListItem>
                                <asp:ListItem>E类</asp:ListItem>
                            </aspxform:XDropDownList>
                        </td>
                        <td class="ts" style="WIDTH: 21%">
                            <asp:Label id="Label185" runat="server" text="MEU/MEUR的具有法律效力的书面证明"></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XAttachments id="MEURAttachments" runat="server" XDataBind="MEURAttachments" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" DisableExpress="1"></aspxform:XAttachments>
                        </td>
                    </tr>
                    <tr>
                         <td class="ts">
                           <asp:Label id="Label189" runat="server" text="备注"></asp:Label></td>
                           <td class="ts1" >
                                <aspxform:XTextBox runat="server" Rows="2" style="border-bottom: #e4e5e7  1px solid" DisableExpress="1" CssClass="MEURemarks" name="MEURemarks" ID="MEURemarks" XDataBind="MEURemarks" Width="100%" TextMode="MultiLine"></aspxform:XTextBox>
                           
                               </td>
                          <td class="ts">
                           <asp:Label id="Label190" runat="server" text="MEU/MEUR客户分类的判定材料"></asp:Label></td>
                           <td class="ts1" >
                                <aspxform:XAttachments id="MEURJudgingMaterials" runat="server" XDataBind="MEURJudgingMaterials" DisableExpress="1" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XAttachments>
                               </td>
                      </tr>
   </tbody>
             </tbody>
                    </table>
        <br />
        <table width="1200" align="center" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="1200">
                        <aspxform:XSignTrace id="XSignTrace1" runat="server" Width="1200px" BorderWidth="1" BorderColor="#dcdcdc"></aspxform:XSignTrace>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator1" runat="server" ForeColor="Red" DisableExpress="DF_MM_NewPurchase_Detail.IsDelete=='1'" ValidationGroup="submit" ControlToValidate="ProductModel" ErrorMessage="请选择采购型号" Display="None">请选择采购型号</aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator2" runat="server" ForeColor="Red" DisableExpress="DF_MM_NewPurchase_Detail.IsDelete=='1'" ValidationGroup="submit11" ControlToValidate="PurchasePrice" ErrorMessage="请输入实际含税采购单价(采购币种)" Display="None">请输入实际含税采购单价(采购币种)</aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator3" runat="server" ForeColor="Red" DisableExpress="DF_MM_NewPurchase_Detail.IsDelete=='1'" ValidationGroup="submit" ControlToValidate="PurchaseCurrency" ErrorMessage="请选择采购币种" Display="None">请选择采购币种</aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator4" runat="server" ForeColor="Red" DisableExpress="DF_MM_NewPurchase_Detail.IsDelete=='1'||DF_MM_NewPurchase_Detail.PurchaseCurrency!='CNY'" ValidationGroup="submit" ControlToValidate="PurchaseInvoiceTaxPointCode" ErrorMessage="请选择采购发票税点" Display="None">请选择采购发票税点</aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator5" runat="server" ForeColor="Red" DisableExpress="DF_MM_NewPurchase_Info.IsSapPo!=1 || DF_MM_NewPurchase_Detail.IsDelete==1" ValidationGroup="submit" ControlToValidate="ZSupplier" ErrorMessage="请选择供应商名称" Display="None">请选择供应商名称</aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator6" runat="server" ForeColor="Red" DisableExpress="DF_MM_NewPurchase_Info.IsSapPo!=1 || DF_MM_NewPurchase_Detail.IsDelete==1" ValidationGroup="submit" ControlToValidate="Plants" ErrorMessage="请选择工厂" Display="None">请选择工厂</aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator7" runat="server" ForeColor="Red" DisableExpress="DF_MM_NewPurchase_Info.IsSapPo!=1 || DF_MM_NewPurchase_Detail.IsDelete==1" ValidationGroup="submit" ControlToValidate="Stockpile" ErrorMessage="请选择库存地" Display="None">请选择库存地</aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator8" runat="server" ForeColor="Red" DisableExpress="DF_MM_NewPurchase_Detail.IsDelete=='1'" ValidationGroup="submit" ControlToValidate="SupplierContact" ErrorMessage="请输入供应商联系人" Display="None">请输入供应商联系人</aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator9" runat="server" ForeColor="Red" DisableExpress="DF_MM_NewPurchase_Detail.IsDelete=='1'" ValidationGroup="submit" ControlToValidate="SupplierTel" ErrorMessage="请输入供应商电话" Display="None">请输入供应商电话</aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator10" runat="server" ForeColor="Red" DisableExpress="DF_MM_NewPurchase_Detail.IsDelete=='1'" ValidationGroup="submit" ControlToValidate="PurchasingPattern" ErrorMessage="请选择采购模式" Display="None">请选择采购模式</aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator11" runat="server" ForeColor="Red" DisableExpress="DF_MM_NewPurchase_Info.IsSapPo!=1 || DF_MM_NewPurchase_Detail.IsDelete==1" ValidationGroup="submit" ControlToValidate="ContractDeliveryDate" ErrorMessage="请选择供应商纸面合同货期" Display="None">请选择供应商纸面合同货期</aspxform:XRequiredFieldValidator>
        &nbsp; 
        <aspxform:XRequiredFieldValidator id="XRequiredFieldValidator12" runat="server" ForeColor="Red" DisableExpress="DF_MM_NewPurchase_Detail.IsDelete!='1'" ValidationGroup="submit" ControlToValidate="CancelProcurement" ErrorMessage="请填写取消采购原因" Display="None">请填写取消采购原因</aspxform:XRequiredFieldValidator>
    </form>
	<script>
        Ext.onReady(function () {

            //厂商编号
            var aDivManufacturerID = document.getElementsByName("ManufacturerID");
            var MEURFlag = false;
            for (var i = 0; i < aDivManufacturerID.length; i++) {

                //厂商编号
                var divManufacturerID = aDivManufacturerID[i];
                var idManufacturerID = divManufacturerID.getElementsByTagName('input')[0].id;
                var vManufacturerID = document.getElementById(idManufacturerID).value;
               
                if (vManufacturerID == "103") {//厂商编号103  是德
                    MEURFlag = true;
                    break;

                }
            }

            if (MEURFlag == false) {
                agent.Eles[document.getElementById("MEUR").getAttribute("xform_xele_index")].setValue("");//MEU/MEUR客户分类

                agent.Eles[document.getElementById("MEURAttachments").getAttribute("xform_xele_index")].setValue("");//MEU/MEUR附件
               agent.Eles[document.getElementById("MEURJudgingMaterials").getAttribute("xform_xele_index")].setValue("");//MEU/MEUR附件
			    agent.Eles[document.getElementById("MEURemarks").getAttribute("xform_xele_index")].setValue("");//备注
            }
        })
    </script>
</body>
</html>
