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

    // Insert page code here
    //
    
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)//首次加载
        {
            string itemid = Request.QueryString["itemid"];
            this.SalesOpportunitiesItemID.Text = itemid;
            string key = Request.QueryString["key"];
            if (key != "")
            {
    
            }
        }
    }

</script>
<html xmlns:xform="xmlns:xform">
<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <link href="/Oimec/Styles/CSS/StyleSheet.css" rel="Stylesheet" type="text/css" />
    <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>
    <%--折扣计算 参数：ZheKou-折扣，UnitPrice-单价，Number-数量--%>
<script type="text/javascript">


    function CountPurchasePrices(ZheKou, UnitPrice, Number) {
        var Sum = 0;
        if (ZheKou == 0) {
            Sum = UnitPrice * Number;
        }
        else {
            ZheKou = (100 - ZheKou) / 100;
            Sum = UnitPrice * Number * ZheKou;
        }
        return Sum;
    }
    //单选获取选中的值
    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 NewPurchaseAppDetailXck() {

        var aDivNewPurchaseAppDetailXck = document.getElementsByClassName("NewPurchaseAppDetailXck");
        var aDivPurchaseRequisitionStatus = document.getElementsByName("PurchaseRequisitionStatus");
        var aDivIsdelete = document.getElementsByClassName("IsDelete");

        for (var i = 0; i < aDivNewPurchaseAppDetailXck.length; i++) {
            var div = aDivNewPurchaseAppDetailXck[i];
            var id = div.getElementsByTagName('input')[0].id;
            var v = document.getElementById(id).checked;
            if (v) {
                var divdelete = aDivIsdelete[i];
                var iddelete = divdelete.getElementsByTagName('input')[0].id;
                document.getElementById(id).disabled = true;
                document.getElementById(iddelete).disabled = true; //如果已发起采购 取消采购就不可勾选
            }
        }
    }

    //页面首次加载时，设置行项目选中值
    function FirstLoadNewPurchaseAppDetailXck() {
        var aDivNewPurchaseAppDetailXck = document.getElementsByClassName("NewPurchaseAppDetailXck");
        var aDivPurchaseRequisitionStatus = document.getElementsByName("PurchaseRequisitionStatus");
        var aDivIsdelete = document.getElementsByClassName("IsDelete");

        for (var i = 0; i < aDivNewPurchaseAppDetailXck.length; i++) {
            var div = aDivNewPurchaseAppDetailXck[i];
            var id = div.getElementsByTagName('input')[0].id;
            var v = document.getElementById(id).checked;
            if (v) {
                var divdelete = aDivIsdelete[i];
                var iddelete = divdelete.getElementsByTagName('input')[0].id;
                document.getElementById(id).disabled = true;//1214 更改  确认之后  发起采购复选之后就置灰
                //document.getElementById(iddelete).disabled = true; //如果已发起采购 取消采购就不可勾选
            }
        }
    }


    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;

    }
    //页面首次进来更新采购申请状态更新到行项目上
    function update() {
        var url = YZSoft.$url('Oimec/WorkFlow/Services/PurchaseAPIHandler.ashx');
        //获取网址参数
        var ItemID = getQueryString("key");
        var parm = { method: "Update", PurchaseRequisitionStatus: "1", ItemID: ItemID }
        YZSoft.Ajax.request({
            async: false,
            url: url,
            params: parm,
            success: function (ac) {
                console.log(ac.responseText);
                //alert(ac.responseText);


            }
        });


    }
    //勾选赋值
    function GetXck(NewPurchaseAppDetailXck) {

        if (NewPurchaseAppDetailXck == "1") {
            return "1";
        } else {
            return "0";
        }
    }
    //是否易捷
    function IsEasyJet(IsEasyJet) {
        if (IsEasyJet == "否") {
            return 0;
        }
        else {
            return 1;
        }
    }

    //勾选发起采购 就不能取消采购勾选 否则相反
    function NewPurchaseAppDetailXcks(e) {

        var tableObj = document.getElementById("tablePrdt");
        var ids = e.getAttribute("id");
        var aDivNewPurchaseAppDetailXck = document.getElementsByClassName("NewPurchaseAppDetailXck"); //“发起采购处理”选项
        var isdelete = document.getElementsByClassName("IsDelete");//“取消采购”选项
        var PurchaseRequisitionStatus = document.getElementsByName("PurchaseRequisitionStatus"); //发起采购处理 选项值

        var rowIndex = 0;
        for (var i = 2; i < tableObj.rows.length - 1; i++) {    //遍历Table的所有Row
            var div = aDivNewPurchaseAppDetailXck[i - 2];
            var idd = div.getElementsByTagName('input')[0].id;
            if (ids == idd) {
                rowIndex = i;
                var divdelete = isdelete[i - 2];
                var iddelete = divdelete.getElementsByTagName('input')[0].id;

                var divPurchaseRequisitionStatus = PurchaseRequisitionStatus[i - 2];
                var idPurchaseRequisitionStatus = divPurchaseRequisitionStatus.getElementsByTagName('input')[0].id;
                var chk = document.getElementById(idPurchaseRequisitionStatus).value;

                if (chk == 0) {
                    // var v = document.getElementById(iddelete).checked=false;
                    document.getElementById(iddelete).disabled = true;
                    continue;
                } else {
                    document.getElementById(iddelete).disabled = false;
                    continue;
                }

            }

        }


    }

    function IsDeletes(e) {

        var tableObj = document.getElementById("tablePrdt");
        var ids = e.getAttribute("id");
        var aDivNewPurchaseAppDetailXck = document.getElementsByClassName("NewPurchaseAppDetailXck");
        var isdelete = document.getElementsByClassName("IsDelete");
        var IsDeleteChk = document.getElementsByName("IsDeleteChk");
        var rowIndex = 0;
        for (var i = 2; i < tableObj.rows.length - 1; i++) {    //遍历Table的所有Row
            var divdelete = isdelete[i - 2];
            var iddelete = divdelete.getElementsByTagName('input')[0].id;
            var div = aDivNewPurchaseAppDetailXck[i - 2];
            var idd = div.getElementsByTagName('input')[0].id;
            if (ids == iddelete) {

                var divdeletes = isdelete[i - 2];
                var iddeletes = divdeletes.getElementsByTagName('input')[0].id;

                var divIsDeleteChk = IsDeleteChk[i - 2];
                var iddeleteschk = divIsDeleteChk.getElementsByTagName('input')[0].id;
                var chk = document.getElementById(iddeleteschk).value;
                if (chk == "") {//取消采购选中 发起采购置灰
                    document.getElementById(idd).disabled = true;
                } else {
                    document.getElementById(idd).disabled = false;
                }

            }


        }

    }


    //遍历行项目
    function GetInfoFromTable(tableid) {
        var tableInfo = "";
        var tableObj = document.getElementById(tableid);
        var arr = [];
        var aDivNewPurchaseAppDetailXck = document.getElementsByClassName("NewPurchaseAppDetailXck");//是否选中
        var aDivLineNumber = document.getElementsByName("LineNumber");// 行号

        var aDivBusinessClass = document.getElementsByName("BusinessClass");// 业务分类
        var aDivTSType = document.getElementsByName("TSType");// 技术服务协议
        var aDivMaterialType = document.getElementsByName("MaterialType");// 物料类型
        var aDivIsdelete = document.getElementsByClassName("IsDelete");
        var total = 0;

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

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

            var chk = document.getElementById(id).getAttribute("type");
            var disabled = document.getElementById(id).getAttribute("disabled");


            //取消采购

            var divIsdelete = aDivIsdelete[i - 2];
            var idIsdelete = divIsdelete.getElementsByTagName('input')[0].id;
            var Isdeletev = document.getElementById(idIsdelete).checked;


            //行号
            var divLineNumber = aDivLineNumber[i - 2];
            var idlineNumber = divLineNumber.getElementsByTagName('span')[0].innerHTML;

            //业务分类

            var divBusinessClass = aDivBusinessClass[i - 2];
            var idBusinessClass = divBusinessClass.getElementsByTagName('select')[0].id;// 修改之前 var idBusinessClass = divBusinessClass.getElementsByTagName('input')[0].id
            var businessClassV = document.getElementById(idBusinessClass).value;

            //技术服务协议
            var divTSType = aDivTSType[i - 2];
            var idTSType = divTSType.getElementsByTagName('select')[0].id;//修改之前的var idTSType = divTSType.getElementsByTagName('input')[0].id;
            var tSTypeV = document.getElementById(idTSType).value;

            //物料类型
            var divMaterialType = aDivMaterialType[i - 2];
            var idMaterialType = divMaterialType.getElementsByTagName('input')[0].id;
            var MaterialTypeV = document.getElementById(idMaterialType).value;

            //产品型号
            var aDivProductModel = document.getElementsByName("ProductModel");// 产品型号

            var divProductModel = aDivProductModel[i - 2];
            var idProductModel = divProductModel.getElementsByTagName('input')[0].id;
            var ProductModelV = document.getElementById(idProductModel).value;

            //物料号
            var aDivProductSAPID = document.getElementsByName("ProductSAPID");// 物料号

            var divProductSAPID = aDivProductSAPID[i - 2];
            var idProductSAPID = divProductSAPID.getElementsByTagName('input')[0].id;
            var ProductSAPIDV = document.getElementById(idProductSAPID).value;

            //产品名称
            var aDivProductName = document.getElementsByName("ProductName");// 物料号

            var divProductName = aDivProductName[i - 2];
            var idProductName = divProductName.getElementsByTagName('input')[0].id;
            var ProductNameV = document.getElementById(idProductName).value;

            //厂商id
            var aDivManufacturerID = document.getElementsByName("ManufacturerID");// 物料号

            var divManufacturerID = aDivManufacturerID[i - 2];
            var idManufacturerID = divManufacturerID.getElementsByTagName('input')[0].id;
            var ManufacturerIDV = document.getElementById(idManufacturerID).value;

            //厂商名称
            var aDivManufacturer = document.getElementsByName("Manufacturer");// 物料号

            var divManufacturer = aDivManufacturer[i - 2];
            var idManufacturer = divManufacturer.getElementsByTagName('input')[0].id;
            var ManufacturerV = document.getElementById(idManufacturer).value;

            //采购模式
            var aDivPurchasingPattern = document.getElementsByName("PurchasingPattern");// 物料号

            var divPurchasingPattern = aDivPurchasingPattern[i - 2];
            var idPurchasingPattern = divPurchasingPattern.getElementsByTagName('select')[0].id;//修改之前的var idPurchasingPattern = divPurchasingPattern.getElementsByTagName('input')[0].id
            var PurchasingPatternV = document.getElementById(idPurchasingPattern).value;

            //指定供应商
            var aDivCustomerDesignatedSupplier = document.getElementsByName("CustomerDesignatedSupplier");// 指定供应商

            var divCustomerDesignatedSupplier = aDivCustomerDesignatedSupplier[i - 2];
            var idDivCustomerDesignatedSupplier = divCustomerDesignatedSupplier.getElementsByTagName('input')[0].id;
            var CustomerDesignatedSupplierV = document.getElementById(idDivCustomerDesignatedSupplier).value;

            //采购数量
            var aDivPruchaseNumber = document.getElementsByName("PruchaseNumber");// 物料号

            var divPruchaseNumber = aDivPruchaseNumber[i - 2];
            var idPruchaseNumber = divPruchaseNumber.getElementsByTagName('input')[0].id;
            var PruchaseNumberV = document.getElementById(idPruchaseNumber).value;

            //币种
            var aDivPurchaseCurrency = document.getElementsByName("PurchaseCurrency");// 物料号

            var divPurchaseCurrency = aDivPurchaseCurrency[i - 2];
            var idPurchaseCurrency = divPurchaseCurrency.getElementsByTagName('select')[0].id;
            var PurchaseCurrencyV = document.getElementById(idPurchaseCurrency).value;


            //含税采购单价
            var aDivPurchasePrice = document.getElementsByName("PurchasePrice");// 物料号

            var divPurchasePrice = aDivPurchasePrice[i - 2];
            var idPurchasePrice = divPurchasePrice.getElementsByTagName('input')[0].id;
            var PurchasePriceV = document.getElementById(idPurchasePrice).value;

            //采购折扣
            var aDivPurchaseDiscount = document.getElementsByName("PurchaseDiscount");// 物料号

            var divPurchaseDiscount = aDivPurchaseDiscount[i - 2];
            var idPurchaseDiscount = divPurchaseDiscount.getElementsByTagName('input')[0].id;
            var PurchaseDiscountV = document.getElementById(idPurchaseDiscount).value;


            //采购总价
            var aDivPurchaseTotalAmount = document.getElementsByName("PurchaseTotalAmount");// 物料号

            var divPurchaseTotalAmount = aDivPurchaseTotalAmount[i - 2];
            var idPurchaseTotalAmount = divPurchaseTotalAmount.getElementsByTagName('input')[0].id;
            var PurchaseTotalAmountV = document.getElementById(idPurchaseTotalAmount).value;


            //供应商
            var aDivSupplierDelivery = document.getElementsByName("SupplierDelivery");// 物料号

            var divSupplierDelivery = aDivSupplierDelivery[i - 2];
            var idSupplierDelivery = divSupplierDelivery.getElementsByTagName('input')[0].id;
            var SupplierDeliveryV = document.getElementById(idSupplierDelivery).value;

            //供应商货期单位
            var aDivSupplierDeliveryDateUnit = document.getElementsByName("SupplierDeliveryDateUnit");// 物料号

            var divSupplierDeliveryDateUnit = aDivSupplierDeliveryDateUnit[i - 2];
            var idSupplierDeliveryDateUnit = divSupplierDeliveryDateUnit.getElementsByTagName('select')[0].id;
            var SupplierDeliveryDateUnitV = document.getElementById(idSupplierDeliveryDateUnit).value;

            //发票税点
            var aDivPurchaseInvoiceTaxPoint = document.getElementsByName("PurchaseInvoiceTaxPoint");// 物料号

            var divPurchaseInvoiceTaxPoint = aDivPurchaseInvoiceTaxPoint[i - 2];
            var idPurchaseInvoiceTaxPoint = divPurchaseInvoiceTaxPoint.getElementsByTagName('select')[0].id;
            var PurchaseInvoiceTaxPointV = document.getElementById(idPurchaseInvoiceTaxPoint).value;

            //采购付款方式
            var aDivPurchasePayType = document.getElementsByName("PurchasePayType");// 物料号

            var divPurchasePayType = aDivPurchasePayType[i - 2];
            var idPurchasePayType = divPurchasePayType.getElementsByTagName('input')[0].id;
            var PurchasePayTypeV = document.getElementById(idPurchasePayType).value;


            //是否供应商预付款

            var aDivIsAdvancePay = document.getElementsByClassName("IsAdvancePay");

            var divIsAdvancePay = aDivIsAdvancePay[i-2];
            //var idIsAdvancePay = divIsAdvancePay.getElementsByTagName('input')[0].id;
            //var IsAdvancePayV = document.getElementById(idIsAdvancePay).value;

            var IsAdvancePayV = "";


            var idIsAdvancePayName = divIsAdvancePay.getElementsByTagName('input')[0].name;
            var chenckidIsAdvancePay = checkedVaule(idIsAdvancePayName);
            if (chenckidIsAdvancePay == "1") {
                var idIsAdvancePay = divIsAdvancePay.getElementsByTagName('input')[0].id;
                IsAdvancePayV = document.getElementById(idIsAdvancePay).value;

            } else if (chenckidIsAdvancePay == "0") {
                var idIsAdvancePay = divIsAdvancePay.getElementsByTagName('input')[1].id;
                IsAdvancePayV = document.getElementById(idIsAdvancePay).value;

            }

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

            var divInternationCIF = aDivInternationCIF[i - 2];
            var idInternationCIF = divInternationCIF.getElementsByTagName('input')[0].id;
            var InternationCIFV = document.getElementById(idInternationCIF).value;



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

            var divInternationCIFRate = aDivInternationCIFRate[i - 2];
            var idInternationCIFRate = divInternationCIFRate.getElementsByTagName('input')[0].id;
            var InternationCIFRateV = document.getElementById(idInternationCIFRate).value;
            //国际运保费(人民币)
            var aDivInternationCIFRMB = document.getElementsByName("InternationCIFRMB");// 物料号

            var divInternationCIFRMB = aDivInternationCIFRMB[i - 2];
            var idInternationCIFRMB = divInternationCIFRMB.getElementsByTagName('input')[0].id;
            var InternationCIFRMBV = document.getElementById(idInternationCIFRMB).value;

            //报关杂费（人民币）
            var aDivCustomsFees = document.getElementsByName("CustomsFees");// 物料号

            var divCustomsFees = aDivCustomsFees[i - 2];
            var idCustomsFees = divCustomsFees.getElementsByTagName('input')[0].id;
            var CustomsFeesV = document.getElementById(idCustomsFees).value;

            //关税税率
            var aDivTariffRate = document.getElementsByName("TariffRate");// 物料号

            var divTariffRate = aDivTariffRate[i - 2];
            var idTariffRate = divTariffRate.getElementsByTagName('input')[0].id;
            var TariffRateV = document.getElementById(idTariffRate).value;

            //供应商联系人
            var aDivSupplierContact = document.getElementsByName("SupplierContact");// 物料号

            var divSupplierContact = aDivSupplierContact[i - 2];
            var idSupplierContact = divSupplierContact.getElementsByTagName('input')[0].id;
            var SupplierContactV = document.getElementById(idSupplierContact).value;

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

            var divSupplierTel = aDivSupplierTel[i - 2];
            var idSupplierTel = divSupplierTel.getElementsByTagName('input')[0].id;
            var SupplierTelV = document.getElementById(idSupplierTel).value;

            //客户保修期
            var aDivWarrantyPeriod = document.getElementsByName("WarrantyPeriod");// 物料号

            var divWarrantyPeriod = aDivWarrantyPeriod[i - 2];
            var idWarrantyPeriod = divWarrantyPeriod.getElementsByTagName('input')[0].id;
            var WarrantyPeriodV = document.getElementById(idWarrantyPeriod).value;

            //报供应商最终客户名称
            var aDivCustomerName = document.getElementsByName("CustomerName");// 物料号

            var divCustomerName = aDivCustomerName[i - 2];
            var idCustomerName = divCustomerName.getElementsByTagName('input')[0].id;
            var CustomerNameV = document.getElementById(idCustomerName).value;

            //报供应商最终客户名称id 没有
            var aDivCustomerSAPID = document.getElementsByName("CustomerSAPID");// 物料号

            var divCustomerSAPID = aDivCustomerSAPID[i - 2];
            var idCustomerSAPID = divCustomerSAPID.getElementsByTagName('input')[0].id;
            var CustomerSAPIDV = document.getElementById(idCustomerSAPID).value;

            //报供应商最终客户名称id 没有
            var aDivIsFlag = document.getElementsByName("IsFlag");// 物料号

            var divIsFlag = aDivIsFlag[i - 2];
            var idIsFlag = divIsFlag.getElementsByTagName('input')[0].id;
            var IsFlagV = document.getElementById(idIsFlag).value;

            //加征关税
            var aDivIncreaseTariff = document.getElementsByName("IncreaseTariff");// 物料号

            var divIncreaseTariff = aDivIncreaseTariff[i - 2];
            var idIncreaseTariff = divIncreaseTariff.getElementsByTagName('input')[0].id;
            var IncreaseTariffV = document.getElementById(idIncreaseTariff).value;

            //业务员id
            var aDivSalesmanId = document.getElementsByName("SalesmanId");// 物料号

            var divSalesmanId = aDivSalesmanId[i - 2];
            var idSalesmanId = divSalesmanId.getElementsByTagName('input')[0].id;
            var SalesmanIdV = document.getElementById(idSalesmanId).value;

            //业务员
            var aDivSalesman = document.getElementsByName("Salesman");// 物料号

            var divSalesman = aDivSalesman[i - 2];
            var idSalesman = divSalesman.getElementsByTagName('input')[0].id;
            var SalesmanV = document.getElementById(idSalesman).value;
            //实际供应商
            var aDivSupplier = document.getElementsByName("Supplier");

            var divSupplier = aDivSupplier[i - 2];
            var idSupplier = divSupplier.getElementsByTagName('input')[0].id;
            var SupplierV = document.getElementById(idSupplier).value;

            //销售机会供应商


            var aDivInquirySupplier = document.getElementsByName("InquirySupplier");

            var divInquirySupplier = aDivInquirySupplier[i - 2];
            var idInquirySupplier = divInquirySupplier.getElementsByTagName('input')[0].id;
            var InquirySupplierV = document.getElementById(idInquirySupplier).value;

            //实际供应商名称


            var aDivSourcingPurchasing = document.getElementsByName("SourcingPurchasing");

            var divSourcingPurchasing = aDivSourcingPurchasing[i - 2];
            var idSourcingPurchasing = divSourcingPurchasing.getElementsByTagName('input')[0].id;
            var SourcingPurchasingV = document.getElementById(idSourcingPurchasing).value;

            //实际供应商名称sapid


            var aDivSupplierSAPID = document.getElementsByName("SupplierSAPID");

            var divSupplierSAPID = aDivSupplierSAPID[i - 2];
            var idSupplierSAPID = divSupplierSAPID.getElementsByTagName('input')[0].id;
            var SupplierSAPIDV = document.getElementById(idSupplierSAPID).value;



            //采购员


            var aDivHandlerAccount = document.getElementsByName("HandlerAccount");

            var divHandlerAccount = aDivHandlerAccount[i - 2];
            var idHandlerAccount = divHandlerAccount.getElementsByTagName('input')[0].id;
            var HandlerAccountV = document.getElementById(idHandlerAccount).value;

            //是否直发


            var aDivIsSupplierSend = document.getElementsByName("IsSupplierSend");

            var divIsSupplierSend = aDivIsSupplierSend[i - 2];
            //var idIsSupplierSend = divIsSupplierSend.getElementsByTagName('input')[0].id;
            //var IsSupplierSendV = document.getElementById(idIsSupplierSend).value;

			 var IsSupplierSendV = "";

            var idIsSupplierSendName = divIsSupplierSend.getElementsByTagName('input')[0].name;
            var chenckIsSupplierSend = checkedVaule(idIsSupplierSendName);
            if (chenckIsSupplierSend == "非直发") {
                var idIsSupplierSend = divIsSupplierSend.getElementsByTagName('input')[0].id;
                IsSupplierSendV = document.getElementById(idIsSupplierSend).value;

            } else if (chenckIsSupplierSend == "直发") {
                var idIsSupplierSend = divIsSupplierSend.getElementsByTagName('input')[1].id;
                IsSupplierSendV = document.getElementById(idIsSupplierSend).value;

            }

            //直发条件

            var aDivSupplierSendReason = document.getElementsByName("SupplierSendReason");

            var divSupplierSendReason = aDivSupplierSendReason[i - 2];
            var idSupplierSendReason = divSupplierSendReason.getElementsByTagName('select')[0].id;//修改之前var idSupplierSendReason = divSupplierSendReason.getElementsByTagName('input')[0].id
            var SupplierSendReasonV = document.getElementById(idSupplierSendReason).value;

            //采购申请单号
            //
            var aDivPurchaseRequisitionNo = document.getElementsByName("PurchaseRequisitionNo");

            var divPurchaseRequisitionNo = aDivPurchaseRequisitionNo[i - 2];
            var idPurchaseRequisitionNo = divPurchaseRequisitionNo.getElementsByTagName('input')[0].id;
            var PurchaseRequisitionNoV = document.getElementById(idPurchaseRequisitionNo).value;

            //工厂
            //
            var aDivPlant = document.getElementsByName("Plant");

            var divPlant = aDivPlant[i - 2];
            var idPlant = divPlant.getElementsByTagName('input')[0].id;
            var PlantV = document.getElementById(idPlant).value;

            //库存地
            var aDivStorage = document.getElementsByName("Storage");
            var divStorage = aDivStorage[i - 2];
            var idStorage = divStorage.getElementsByTagName('input')[0].id;
            var StorageV = document.getElementById(idStorage).value;

            //PR行

            var aDivPRRowNum = document.getElementsByName("PRRowNum");

            var divPRRowNum = aDivPRRowNum[i - 2];
            var idPRRowNum = divPRRowNum.getElementsByTagName('input')[0].id;
            var PRRowNumV = document.getElementById(idPRRowNum).value;

            //PR

            var aDivPR = document.getElementsByName("PR");

            var divPR = aDivPR[i - 2];
            var idPR = divPR.getElementsByTagName('input')[0].id;
            var PRV = document.getElementById(idPR).value;


            //采购员姓名
            var aDivHandlerAccountName = document.getElementsByName("HandlerAccountName");

            var divHandlerAccountName = aDivHandlerAccountName[i - 2];
            var idHandlerAccountName = divHandlerAccountName.getElementsByTagName('input')[0].id;
            var HandlerAccountNameV = document.getElementById(idHandlerAccountName).value;

            //VoucherNo
            //so 对应sap对应凭证号
            var aDivSO = document.getElementsByName("SO");
            var divSO = aDivSO[i - 2];
            var idSO = divSO.getElementsByTagName('input')[0].id;
            var SOV = document.getElementById(idSO).value;
            //SoRowNum 对应sap对应LineItemNo
            var aDivSoRowNum = document.getElementsByName("SoRowNum");
            var divSoRowNum = aDivSoRowNum[i - 2];
            var idSoRowNum = divSoRowNum.getElementsByTagName('input')[0].id;
            var SoRowNumV = document.getElementById(idSoRowNum).value;

            var aDivSalesOpportunitiesRowNum = document.getElementsByName("SalesOpportunitiesRowNum");
            var divSalesOpportunitiesRowNum = aDivSalesOpportunitiesRowNum[i - 2];
            var idSalesOpportunitiesRowNum = divSalesOpportunitiesRowNum.getElementsByTagName('input')[0].id;
            var SalesOpportunitiesRowNumV = document.getElementById(idSalesOpportunitiesRowNum).value;

            //给行赋值客户合同纸面交货期
            var aDivContractDeliveryDateTr = document.getElementsByName("ContractDeliveryDateTr");
            var divContractDeliveryDateTr = aDivContractDeliveryDateTr[i - 2];
            var idContractDeliveryDateTr = divContractDeliveryDateTr.getElementsByTagName('input')[0].id;
            var ContractDeliveryDateTrV = document.getElementById(idContractDeliveryDateTr).value;


            if (PurchasingPatternV == "备货") {
                //break;
            }

            //页面首次进来 看是否已发起采购申请  有一个值是存2代表已发起  并且是 首次加载的

            var aDivStatus = document.getElementsByName("status");
            var divStatus = aDivStatus[i - 2];
            var idStatus = divStatus.getElementsByTagName('input')[0].id;
            var StatusTrV = document.getElementById(idStatus).value;

             //厂商直/分销
            var aDivDirectDistribution = document.getElementsByName("DirectDistribution");
            var divDirectDistribution = aDivDirectDistribution[i - 2];
            var idDirectDistribution = divDirectDistribution.getElementsByTagName('select')[0].id;
            var DirectDistributionTrV = document.getElementById(idDirectDistribution).value;
			
			  //含标准服务
            var aDivIncludingStandardService = document.getElementsByName("IncludingStandardService");
            var divIncludingStandardService = aDivIncludingStandardService[i - 2];
            var idIncludingStandardService = divIncludingStandardService.getElementsByTagName('select')[0].id;
            var IncludingStandardServiceTrV = document.getElementById(idIncludingStandardService).value;

            //标准服务年限
            var aDivYearsService = document.getElementsByName("YearsService");
            var divYearsService = aDivYearsService[i - 2];
            var idYearsService = divYearsService.getElementsByTagName('select')[0].id;
            var YearsServiceTrV = document.getElementById(idYearsService).value;

            //标准服务比列
            var aDivProportion = document.getElementsByName("Proportion");
            var divProportion = aDivProportion[i - 2];
            var idProportion = divProportion.getElementsByTagName('input')[0].id;
            var ProportionTrV = document.getElementById(idProportion).value;


            var flag = false;
            if (chk == "checkbox") {

                if (StatusTrV == "2") {//disabled == "" ||
                    continue
                } else {
                    var chks = document.getElementById(id).checked;
                    if (chks) {

                        // tableInfo += tableObj.rows[i].cells[j].getElementsByTagName("input")[0].checked + "||";   //获取Table中单元格的内容
                        flag = true;
                    } else {

                        continue

                    }

                }


            }



            if (flag) {
                obj["NewPurchaseAppDetailXck"] = v;
                obj["LineNumber"] = idlineNumber;
                obj["BusinessClass"] = businessClassV;
                obj["TSType"] = tSTypeV;
                obj["MaterialType"] = MaterialTypeV;
                obj["ProductModel"] = ProductModelV;
                obj["ProductSAPID"] = ProductSAPIDV;
                obj["ProductName"] = ProductNameV;
                obj["ManufacturerID"] = ManufacturerIDV;
                obj["Manufacturer"] = ManufacturerV;
                obj["PurchasingPattern"] = PurchasingPatternV;
                obj["PruchaseNumber"] = PruchaseNumberV;
                obj["PurchaseCurrency"] = PurchaseCurrencyV;
                obj["PurchasePrice"] = PurchasePriceV;
                obj["PurchaseDiscount"] = PurchaseDiscountV;
                obj["PurchaseTotalAmount"] = PurchaseTotalAmountV;
                obj["SupplierDelivery"] = SupplierDeliveryV;
                obj["PurchaseInvoiceTaxPoint"] = PurchaseInvoiceTaxPointV;
                obj["PurchasePayType"] = PurchasePayTypeV;
                obj["InternationCIF"] = InternationCIFV;
                obj["InternationCIFRate"] = InternationCIFV;
                obj["InternationCIFRMB"] = InternationCIFRMBV;
                obj["CustomsFees"] = CustomsFeesV;
                obj["TariffRate"] = TariffRateV;
                obj["SupplierContact"] = SupplierContactV;
                obj["SupplierTel"] = SupplierTelV;
                obj["WarrantyPeriod"] = WarrantyPeriodV;
                obj["CustomerName"] = CustomerNameV;
                obj["CustomerSAPID"] = CustomerSAPIDV;
                obj["IsFlag"] = IsFlagV;
                obj["IncreaseTariff"] = IncreaseTariffV;
                obj["SalesmanId"] = SalesmanIdV;
                obj["Salesman"] = SalesmanV;
                obj["IsDelete"] = Isdeletev;
                obj["Supplier"] = SupplierV;
                obj["HandlerAccount"] = HandlerAccountV;
                obj["IsSupplierSend"] = IsSupplierSendV;
                obj["SupplierSendReason"] = SupplierSendReasonV;
                obj["PurchaseRequisitionNo"] = PurchaseRequisitionNoV;
                obj["InquirySupplier"] = InquirySupplierV;
                obj["Plant"] = PlantV;
                obj["PRRowNum"] = PRRowNumV;
                obj["PR"] = PRV;
                obj["Purchaser"] = HandlerAccountNameV;
                obj["Storage"] = StorageV;//库存地
                obj["SoRowNum"] = SoRowNumV;//so行号
                obj["SO"] = SOV;//so
                obj["SalesOpportunitiesRowNum"] = SalesOpportunitiesRowNumV;//销售机会行号
                obj["ContractDeliveryDateTr"] = ContractDeliveryDateTrV;//客户合同纸面交货期

                obj["IsAdvancePayForSupplier"] = IsAdvancePayV;//供应商预付
                obj["SourcingPurchasing"] = SourcingPurchasingV;//实际供应商名称
                obj["SupplierSAPID"] = SupplierSAPIDV;//实际供应商名称sapid
                obj["CustomerDesignatedSupplier"] = CustomerDesignatedSupplierV; //客户指定供应商
                obj["SupplierDeliveryDateUnit"] = SupplierDeliveryDateUnitV; //供应商货期单位
                obj["DirectDistribution"] = DirectDistributionTrV;//厂商直/分销
				
				 obj["IncludingStandardService"] = IncludingStandardServiceTrV; //含标准服务
                obj["YearsService"] = YearsServiceTrV;//标准服务年限
                obj["Proportion"] = ProportionTrV;//标准服务比列
                arr.push(obj);
            }


        }

        return arr;
    }

    function flag() {
        var flags = false;
        var aDivNewPurchaseAppDetailXck = document.getElementsByClassName("NewPurchaseAppDetailXck");
        for (var i = 0; i < aDivNewPurchaseAppDetailXck.length; i++) {
            var div = aDivNewPurchaseAppDetailXck[i];
            // console.log(s);
            var id = div.getElementsByTagName('input')[0].id;
            var v = document.getElementById(id).checked;
            if (v) {
                flags = true;
                continue;
            }

        }

        return flags;

    }

    //删除行项目
    function DeleteBlocks() {
        var table = agent.findGridFromTableName(null, 'DF_MM_NewPurchaseApp_Detail'); //获取table对象
        var tableObj = document.getElementById("tablePrdt");
        //获取选中的行数
        var count = 0;
        for (var i = 2; i < tableObj.rows.length - 1; i++) {//遍历Table的所有Row //遍历Row中的每一列
            var chk = agent.Eles[tableObj.rows[i].cells[0].children[0].getAttribute("xform_xele_index")].getValue();
            if (chk == "1") {
                count++;
            }
        }
        while (count > 0) {
            for (var i = 2, res = false; i < tableObj.rows.length - 1; i++) {//遍历Table的所有Row //遍历Row中的每一列
                var chk = agent.Eles[tableObj.rows[i].cells[0].children[0].getAttribute("xform_xele_index")].getValue();
                if (chk == "1" && res == false) {
                    //删除选中行
                    table.deleteBlocks(i - 2, 1);
                    count--;
                    res = true;
                }
            }
        }

    }

    //人民币采购 且 行项目选择直发时才显示
    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;

            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 = "";
                document.getElementById("PurchaseRMBbr").style.display = "";
            } else {
                document.getElementById("DeliverysTables").style.display = "none";
                document.getElementById("PurchaseRMBbr").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 = "";
                document.getElementById("PurchaseWBbr").style.display = "";
            } else {
                document.getElementById("DeliverysTable").style.display = "none";
                document.getElementById("PurchaseWBbr").style.display = "none";
            }


    }

    //控件是否选中 checkbox,radiobutton
    function XCheckeds(name) {
        var inputs = document.getElementsByTagName("input");
        for (var i = 0; i < inputs.length; i++) {
            var obj = inputs[i];
            //str.indexOf("3") != -1
            if (obj.id.indexOf("" + name + "") != -1) {//如果存在

                if (obj.checked) {
                    return 1;
                }

            }


        }
    }

    //单选获取选中的值
    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 GetPayAdvance() {
        //var IsPayAdvance_1 = agent.Eles[document.getElementById("IsPayAdvance_1").getAttribute("xform_xele_index")].getValue();//销售机会编号
        var IsPayAdvance = checkedVaule("IsPayAdvance");
        if (IsPayAdvance == "有预付") {

            Ext.MessageBox.alert("提示", "请确认预付款已到账方可下单");

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

    //根据工厂获取采购主体公司
    function getCodeByPlant(plants) {
        var url = YZSoft.$url('Oimec/WorkFlow/Services/SalesAPIHandler.ashx');
        var parm = { method: "GetCodeByFactory", plant: plants };

        var aDivPlantName = document.getElementsByName("PlantName");
        AjaxParm(url, true, parm, function (action) {
            var data = action.result;

            console.log(data);
            var code = "";
            var plantname = "";
            for (var i = 0; i < data.length; i++) {
                code = data[i].Value1;//采购主体公司
                plantname = data[i].Name;//采购主体公司

            }
            agent.Eles[document.getElementById("PurchaseCompanyCode").getAttribute("xform_xele_index")].setValue(code);
            //agent.Eles[document.getElementById("PlantName").getAttribute("xform_xele_index")].setValue(plantname);

            for (var i = 0; i < aDivPlantName.length; i++) {
                var div = aDivPlantName[i];
                var idPlantName = div.getElementsByTagName('input')[0].id;
                var PlantNameV = document.getElementById(idPlantName).value = plantname;

            }

        });
    }

    //根据销售机会获取对应的采购信息
    function GetPurchaseReqInfo() {

        var aDivTSType = document.getElementsByName("TSType");// 技术服务协议
        var aDivMaterialType = document.getElementsByName("MaterialType");// 物料类型
        var aDivBusinessClass = document.getElementsByName("BusinessClass");//业务分类

        var url = YZSoft.$url('Oimec/WorkFlow/Services/SalesAPIHandler.ashx');
        var urls = YZSoft.$url('Oimec/CRM/Services/CRHandler.ashx');

        //var objName = agent.Eles[document.getElementById("ObjName").getAttribute("xform_xele_index")].getValue();
        var FormNo = getQueryString("FormNo");

        //FormNo = "XSJH19110004";
        var itemid = getQueryString("itemid");
        var parm = { method: "GetPurchaseReqInfo", FormNo: FormNo };
        var total = 0;
        var InternationCIFTotal = 0;
        var InternationCIFRMBTotal = 0;
        var CustomsFeesTotal = 0;
        var flagcount = 0;
        // alert(objName);

        AjaxParm(url, true, parm, function (action) {
            var data = action.result;
            var tableObj = document.getElementById("tablePrdt");
            //var obj = eval("(" + data.Bean + ")");
            /// var urls = obj.Value;

            console.log(data.Bean);
            var bean = data.Bean;

            if (bean != null) {
                var count = bean.length;

                //添加行
                var table = agent.findGridFromTableName(null, 'DF_MM_NewPurchaseApp_Detail'); //获取table对象
                table.deleteBlocks(0, 1);
                table.appendBlock(count);
                for (var i = 0; i < bean.length; i++) {

                    //抬头信息：付款条件、合同实际付款条件
                    agent.Eles[document.getElementById("TermsPayment").getAttribute("xform_xele_index")].setValue(bean[0].PaymentClause);
                    agent.Eles[document.getElementById("ActTermsPayment").getAttribute("xform_xele_index")].setValue(bean[0].ActualPaymentClause);

                    //
                    // 摘要:
                    //     厂商名称
                    // public string Manufacturer { get; set; }
                    //厂商名称
                    var aDivManufacturer = document.getElementsByName("Manufacturer");//

                    var divManufacturer = aDivManufacturer[i];
                    var idManufacturer = divManufacturer.getElementsByTagName('input')[0].id;
                    var ManufacturerV = document.getElementById(idManufacturer).value = bean[i].Manufacturer;
                    //
                    // 摘要:
                    //     物料型号
                    // public string MaterialModel { get; set; }

                    //物料类型
                    var divMaterialType = aDivMaterialType[i];
                    var idMaterialType = divMaterialType.getElementsByTagName('input')[0].id;
                    document.getElementById(idMaterialType).value = bean[i].MaterialModel;


                    // public string ProductModel { get; set; }

                    //产品型号
                    var aDivProductModel = document.getElementsByName("ProductModel");// 产品型号

                    var divProductModel = aDivProductModel[i];
                    var idProductModel = divProductModel.getElementsByTagName('input')[0].id;
                    var ProductModelV = document.getElementById(idProductModel).value = bean[i].ProductModel;

                    //物料号
                    var idProductSAPID = getElementId("ProductSAPID", i, "input");
                    var ProductSAPIDV = document.getElementById(idProductSAPID).value = bean[i].MaterialNo;

                    //
                    // 摘要:
                    //     采购数量
                    //  public int PurchaseNum { get; set; }

                    //采购数量
                    var aDivPruchaseNumber = document.getElementsByName("PruchaseNumber");// 物料号

                    var divPruchaseNumber = aDivPruchaseNumber[i];
                    var idPruchaseNumber = divPruchaseNumber.getElementsByTagName('input')[0].id;
                    var PruchaseNumberV = document.getElementById(idPruchaseNumber).value = bean[i].PurchaseNum;

                    //
                    // 摘要:
                    // 销售机会行号

                    var SalesOpportLineNo = bean[i].SalesOpportLineNo;

                    //工厂
                    //

                    var aDivPlant = document.getElementsByName("Plant");

                    var divPlant = aDivPlant[i];
                    var idPlant = divPlant.getElementsByTagName('input')[0].id;
                    var PlantV = document.getElementById(idPlant).value = bean[i].Plant;

                    if (flagcount == 0) {

                        //根据工厂获取采购主体公司
                        var plant = PlantV;
                        getCodeByPlant(plant);


                    }
                    flagcount++;

                    //库存地
                    var aDivStorage = document.getElementsByName("Storage");

                    var divStorage = aDivStorage[i];
                    var idStorage = divStorage.getElementsByTagName('input')[0].id;
                    var StorageV = document.getElementById(idStorage).value = bean[i].Storage;

                    //
                    // 摘要:
                    //     采购申请行项目号
                    //public string PurchaseAppLineItemNo { get; set; }

                    //PR行

                    var aDivPRRowNum = document.getElementsByName("PRRowNum");

                    var divPRRowNum = aDivPRRowNum[i];
                    var idPRRowNum = divPRRowNum.getElementsByTagName('input')[0].id;
                    var PRRowNumV = document.getElementById(idPRRowNum).value = bean[i].PurchaseAppLineItemNo;
                    //
                    // 摘要:
                    //     采购申请编号
                    //  public string PurchaseAppNo { get; set; }

                    //PR

                    var aDivPR = document.getElementsByName("PR");
                    var divPR = aDivPR[i];
                    var idPR = divPR.getElementsByTagName('input')[0].id;
                    var PRV = document.getElementById(idPR).value = bean[i].PurchaseAppNo;


                    //VoucherNo
                    //so 对应sap对应凭证号
                    var aDivSO = document.getElementsByName("SO");
                    var divSO = aDivSO[i];
                    var idSO = divSO.getElementsByTagName('input')[0].id;
                    var SOV = document.getElementById(idSO).value = bean[i].VoucherNo;
                    //SoRowNum 对应sap对应LineItemNo
                    var aDivSoRowNum = document.getElementsByName("SoRowNum");
                    var divSoRowNum = aDivSoRowNum[i];
                    var idSoRowNum = divSoRowNum.getElementsByTagName('input')[0].id;
                    var SoRowNumV = document.getElementById(idSoRowNum).value = bean[i].LineItemNo;


                    var aDivSalesOpportunitiesRowNum = document.getElementsByName("SalesOpportunitiesRowNum");
                    var divSalesOpportunitiesRowNum = aDivSalesOpportunitiesRowNum[i];
                    var idSalesOpportunitiesRowNum = divSalesOpportunitiesRowNum.getElementsByTagName('input')[0].id;
                    var SalesOpportunitiesRowNumV = document.getElementById(idSalesOpportunitiesRowNum).value = bean[i].SalesOpportLineNo;

                    //客户合同纸面交货期

                    // ZZHTDT
                    var ZZHTDT = bean[i].ZZHTDT;
                    agent.Eles[document.getElementById("ContractDeliveryDate").getAttribute("xform_xele_index")].setValue(ZZHTDT);//合同变更

                    //给行赋值客户合同纸面交货期
                    var aDivContractDeliveryDateTr = document.getElementsByName("ContractDeliveryDateTr");
                    var divContractDeliveryDateTr = aDivContractDeliveryDateTr[i];
                    var idContractDeliveryDateTr = divContractDeliveryDateTr.getElementsByTagName('input')[0].id;
                    var ContractDeliveryDateTrV = document.getElementById(idContractDeliveryDateTr).value = bean[i].ZZHTDT;



                    //alert(SalesOpportLineNo)
                    //根据销售机会行号获取销售机会行项目信息
                    var parms = { method: "GetByFkidOrRowNumMarketInquiryApparatusList", OppID: itemid, RowNumber: SalesOpportLineNo };
                    AjaxParm(urls, false, parms, function (action) {
                         
                        console.log(action.result)
                        var data = action.result;

                        for (var j = 0; j < data.length; j++) {
                            //alert(data[j].BusinessClassification);

                            //业务分类
                            var div = aDivBusinessClass[i];
                            var id = div.getElementsByTagName('select')[0].id;//修改之前 var id = div.getElementsByTagName('input')[0].id
                            document.getElementById(id).value = data[j].BusinessClassification;  //是否选中

                            //技术服务协议
                            var divTSType = aDivTSType[i];
                            var idTSType = divTSType.getElementsByTagName('select')[0].id;//修改之前var idTSType = divTSType.getElementsByTagName('input')[0].id
                            document.getElementById(idTSType).value = data[j].TSType;

                            ////物料类型
                            //var divMaterialType = aDivMaterialType[i];
                            //var idMaterialType = divMaterialType.getElementsByTagName('input')[0].id;
                            //document.getElementById(idMaterialType).value = data[j].MaterialType;

                            ////产品型号
                            //var aDivProductModel = document.getElementsByName("ProductModel");// 产品型号

                            //var divProductModel = aDivProductModel[i];
                            //var idProductModel = divProductModel.getElementsByTagName('input')[0].id;
                            //var ProductModelV = document.getElementById(idProductModel).value = data[j].ProductModel;

                            //物料号
                            //var aDivProductSAPID = document.getElementsByName("ProductSAPID");// 物料号

                            //var divProductSAPID = aDivProductSAPID[i];
                            //var idProductSAPID = divProductSAPID.getElementsByTagName('input')[0].id;
                            //var ProductSAPIDV = document.getElementById(idProductSAPID).value = data[j].MaterialID;

                            //产品名称
                            var aDivProductName = document.getElementsByName("ProductName");//

                            var divProductName = aDivProductName[i];
                            var idProductName = divProductName.getElementsByTagName('input')[0].id;
                            var ProductNameV = document.getElementById(idProductName).value = data[j].ProductNmae;

                            //厂商id
                            var aDivManufacturerID = document.getElementsByName("ManufacturerID");// 物料号

                            var divManufacturerID = aDivManufacturerID[i];
                            var idManufacturerID = divManufacturerID.getElementsByTagName('input')[0].id;
                            var ManufacturerIDV = document.getElementById(idManufacturerID).value = data[j].ManufacturerID;

                            ////厂商名称
                            //var aDivManufacturer = document.getElementsByName("Manufacturer");// 物料号

                            //var divManufacturer = aDivManufacturer[i];
                            //var idManufacturer = divManufacturer.getElementsByTagName('input')[0].id;
                            //var ManufacturerV = document.getElementById(idManufacturer).value = data[j].Manufacturer;

                            //采购模式
                            var aDivPurchasingPattern = document.getElementsByName("PurchasingPattern");// 物料号

                            var divPurchasingPattern = aDivPurchasingPattern[i];
                            var idPurchasingPattern = divPurchasingPattern.getElementsByTagName('select')[0].id;//修改之前 var idPurchasingPattern = divPurchasingPattern.getElementsByTagName('input')[0].id
                            var PurchasingPatternV = document.getElementById(idPurchasingPattern).value = data[j].PurchasingPattern;

                            ////采购数量
                            //var aDivPruchaseNumber = document.getElementsByName("PruchaseNumber");// 物料号

                            //var divPruchaseNumber = aDivPruchaseNumber[i];
                            //var idPruchaseNumber = divPruchaseNumber.getElementsByTagName('input')[0].id;
                            //var PruchaseNumberV = document.getElementById(idPruchaseNumber).value = data[j].PurchaseNumber;

                            //币种
                            var aDivPurchaseCurrency = document.getElementsByName("PurchaseCurrency");// 物料号

                            var divPurchaseCurrency = aDivPurchaseCurrency[i];
                            var idPurchaseCurrency = divPurchaseCurrency.getElementsByTagName('select')[0].id;
                            var PurchaseCurrencyV = document.getElementById(idPurchaseCurrency).value = data[j].PrchaseCurrency;


                            //含税采购单价
                            var aDivPurchasePrice = document.getElementsByName("PurchasePrice");// 物料号

                            var divPurchasePrice = aDivPurchasePrice[i];
                            var idPurchasePrice = divPurchasePrice.getElementsByTagName('input')[0].id;
                            var PurchasePriceV = document.getElementById(idPurchasePrice).value = data[j].PDPurchasePriceRest;

                            //采购折扣
                            var aDivPurchaseDiscount = document.getElementsByName("PurchaseDiscount");// 物料号

                            var divPurchaseDiscount = aDivPurchaseDiscount[i];
                            var idPurchaseDiscount = divPurchaseDiscount.getElementsByTagName('input')[0].id;
                            var PurchaseDiscountV = document.getElementById(idPurchaseDiscount).value = data[j].Discount;


                            //采购总价
                            var aDivPurchaseTotalAmount = document.getElementsByName("PurchaseTotalAmount");// 物料号

                            var divPurchaseTotalAmount = aDivPurchaseTotalAmount[i];
                            var idPurchaseTotalAmount = divPurchaseTotalAmount.getElementsByTagName('input')[0].id;
                            var PurchaseTotalAmountV = document.getElementById(idPurchaseTotalAmount).value = data[j].PDPurchaseTotalvalueRest;


                            total += Number(PurchaseTotalAmountV);
                            // alert(total);

                            //供应商货期
                            var aDivSupplierDelivery = document.getElementsByName("SupplierDelivery");// 物料号

                            var divSupplierDelivery = aDivSupplierDelivery[i];
                            var idSupplierDelivery = divSupplierDelivery.getElementsByTagName('input')[0].id;
                            var SupplierDeliveryV = document.getElementById(idSupplierDelivery).value = data[j].SupplierDeliveryDate;

                            //供应商货期单位
                            var aDivSupplierDeliveryDateUnit = document.getElementsByName("SupplierDeliveryDateUnit");

                            var divSupplierDeliveryDateUnit = aDivSupplierDeliveryDateUnit[i];
                            var idSupplierDeliveryDateUnit = divSupplierDeliveryDateUnit.getElementsByTagName('select')[0].id;
                            var SupplierDeliveryDateUnitV = document.getElementById(idSupplierDeliveryDateUnit).value = data[j].SupplierDeliveryDateUnit;


                            //发票税点
                            var aDivPurchaseInvoiceTaxPoint = document.getElementsByName("PurchaseInvoiceTaxPoint");// 物料号

                            var divPurchaseInvoiceTaxPoint = aDivPurchaseInvoiceTaxPoint[i];
                            var idPurchaseInvoiceTaxPoint = divPurchaseInvoiceTaxPoint.getElementsByTagName('select')[0].id;
                            var PurchaseInvoiceTaxPointV = document.getElementById(idPurchaseInvoiceTaxPoint).value = data[j].PurchaseInvoiceTaxPoint;

                            //采购付款方式
                            var aDivPurchasePayType = document.getElementsByName("PurchasePayType");// 物料号

                            var divPurchasePayType = aDivPurchasePayType[i];
                            var idPurchasePayType = divPurchasePayType.getElementsByTagName('input')[0].id;
                            var PurchasePayTypeV = document.getElementById(idPurchasePayType).value = data[j].PurchasePaymentMethod;


                            //是否供应商预付款

                            var aDivIsAdvancePay = document.getElementsByClassName("IsAdvancePay");

                            var divIsAdvancePay = aDivIsAdvancePay[i];
                            var idIsAdvancePay = divIsAdvancePay.getElementsByTagName('input')[0].id;
                            var IsAdvancePayV = document.getElementById(idIsAdvancePay).value = data[j].IsAdvancePayForSupplier;

                            if (IsAdvancePayV == "1") {

                                var divIsAdvancePay = aDivIsAdvancePay[i];
                                var idIsAdvancePay = divIsAdvancePay.getElementsByTagName('input')[0].name;

                                 document.getElementsByName(idIsAdvancePay)[0].checked = true;

                            } else if (IsAdvancePayV == "0") {

                                var divIsAdvancePay = aDivIsAdvancePay[i];
                                var idIsAdvancePay = divIsAdvancePay.getElementsByTagName('input')[1].name;

                                document.getElementsByName(idIsAdvancePay)[1].checked = true;
                            }



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

                            var divInternationCIF = aDivInternationCIF[i];
                            var idInternationCIF = divInternationCIF.getElementsByTagName('input')[0].id;
                            var InternationCIFV = document.getElementById(idInternationCIF).value = data[j].InternationCIFRateForeign;
                            InternationCIFTotal += Number(InternationCIFV);
                            //国际运保费率
                            var aDivInternationCIFRate = document.getElementsByName("InternationCIFRate");// 物料号

                            var divInternationCIFRate = aDivInternationCIFRate[i];
                            var idInternationCIFRate = divInternationCIFRate.getElementsByTagName('input')[0].id;
                            var InternationCIFRateV = document.getElementById(idInternationCIFRate).value = data[j].InternationCIF;
                            //国际运保费(人民币)
                            var aDivInternationCIFRMB = document.getElementsByName("InternationCIFRMB");// 物料号

                            var divInternationCIFRMB = aDivInternationCIFRMB[i];
                            var idInternationCIFRMB = divInternationCIFRMB.getElementsByTagName('input')[0].id;
                            var InternationCIFRMBV = document.getElementById(idInternationCIFRMB).value = data[j].InternationCIFRate;

                            InternationCIFRMBTotal += Number(InternationCIFRMBV);
                            //报关杂费（人民币）
                            var aDivCustomsFees = document.getElementsByName("CustomsFees");// 物料号
                            var divCustomsFees = aDivCustomsFees[i];
                            var idCustomsFees = divCustomsFees.getElementsByTagName('input')[0].id;
                            var CustomsFeesV = document.getElementById(idCustomsFees).value = data[j].CustomsFees;

                            CustomsFeesTotal += Number(CustomsFeesV);

                            //关税税率
                            var aDivTariffRate = document.getElementsByName("TariffRate");// 物料号

                            var divTariffRate = aDivTariffRate[i];
                            var idTariffRate = divTariffRate.getElementsByTagName('input')[0].id;
                            var TariffRateV = document.getElementById(idTariffRate).value = data[j].TariffRate;

                            //供应商联系人
                            var aDivSupplierContact = document.getElementsByName("SupplierContact");// 物料号

                            var divSupplierContact = aDivSupplierContact[i];
                            var idSupplierContact = divSupplierContact.getElementsByTagName('input')[0].id;
                            var SupplierContactV = document.getElementById(idSupplierContact).value = data[j].Linkman;

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

                            var divSupplierTel = aDivSupplierTel[i];
                            var idSupplierTel = divSupplierTel.getElementsByTagName('input')[0].id;
                            var SupplierTelV = document.getElementById(idSupplierTel).value = data[j].Phone;

                            //客户保修期
                            var aDivWarrantyPeriod = document.getElementsByName("WarrantyPeriod");// 物料号

                            var divWarrantyPeriod = aDivWarrantyPeriod[i];
                            var idWarrantyPeriod = divWarrantyPeriod.getElementsByTagName('input')[0].id;
                            var WarrantyPeriodV = document.getElementById(idWarrantyPeriod).value = data[j].WarrantyPeriod;

                            //报供应商最终客户名称
                            var aDivCustomerName = document.getElementsByName("CustomerName");// 物料号

                            var divCustomerName = aDivCustomerName[i];
                            var idCustomerName = divCustomerName.getElementsByTagName('input')[0].id;
                            var CustomerNameV = document.getElementById(idCustomerName).value = data[j].SupplierCustomerName;

                            //报供应商最终客户名称id 没有
                            var aDivCustomerSAPID = document.getElementsByName("CustomerSAPID");// 物料号

                            var divCustomerSAPID = aDivCustomerSAPID[i];
                            var idCustomerSAPID = divCustomerSAPID.getElementsByTagName('input')[0].id;
                            var CustomerSAPIDV = document.getElementById(idCustomerSAPID).value = data[j].SupplierCustomerSAPID;

                            //报供应商最终客户名称id 没有
                            var aDivIsFlag = document.getElementsByName("IsFlag");// 物料号

                            var divIsFlag = aDivIsFlag[i];
                            var idIsFlag = divIsFlag.getElementsByTagName('input')[0].id;
                            var IsFlagV = document.getElementById(idIsFlag).value = data[j].IsFlag;

                            //加征关税
                            var aDivIncreaseTariff = document.getElementsByName("IncreaseTariff");// 物料号

                            var divIncreaseTariff = aDivIncreaseTariff[i];
                            var idIncreaseTariff = divIncreaseTariff.getElementsByTagName('input')[0].id;
                            var IncreaseTariffV = document.getElementById(idIncreaseTariff).value = data[j].IncreaseTariff;



                            //销售机会供应商
                            var aDivInquirySupplier = document.getElementsByName("InquirySupplier");

                            var divInquirySupplier = aDivInquirySupplier[i];
                            var idInquirySupplier = divInquirySupplier.getElementsByTagName('input')[0].id;
                            var InquirySupplierV = document.getElementById(idInquirySupplier).value = data[j].SourcingPurchasing;

                            //实际供应商名称
                            var aDivSourcingPurchasing = document.getElementsByName("SourcingPurchasing");

                            var divSourcingPurchasing = aDivSourcingPurchasing[i];
                            var idSourcingPurchasing = divSourcingPurchasing.getElementsByTagName('input')[0].id;
                            var SourcingPurchasingV = document.getElementById(idSourcingPurchasing).value = data[j].SourcingPurchasing;

                            //实际供应商SAPID
                            var aDivSupplierSAPID = document.getElementsByName("SupplierSAPID");

                            var divSupplierSAPID = aDivSupplierSAPID[i];
                            var idSupplierSAPID = divSupplierSAPID.getElementsByTagName('input')[0].id;
                            var SupplierSAPIDV = document.getElementById(idSupplierSAPID).value = data[j].SupplierSAPID;



                            //是否直发


                            var IsSupplierSend = data[j].IsSupplierSend;
                            var aDivIsSupplierSend = document.getElementsByName("IsSupplierSend");

                            if (IsSupplierSend == "直发") {

                                var divIsSupplierSend = aDivIsSupplierSend[i];
                                var idIsSupplierSend = divIsSupplierSend.getElementsByTagName('input')[1].name;

                                var IsSupplierSendV = document.getElementsByName(idIsSupplierSend)[1].checked = true;

                            } else if (IsSupplierSend == "非直发") {

                                var aDivIsSupplierSendF = document.getElementsByName("IsSupplierSend");
                                var divIsSupplierSendF = aDivIsSupplierSendF[i];
                                var idIsSupplierSendF = divIsSupplierSendF.getElementsByTagName('input')[0].name;
                                var IsSupplierSendVF = document.getElementsByName(idIsSupplierSendF)[0].checked = true;
                            }


                            //直发条件

                            var aDivSupplierSendReason = document.getElementsByName("SupplierSendReason");

                            var divSupplierSendReason = aDivSupplierSendReason[i];
                            var idSupplierSendReason = divSupplierSendReason.getElementsByTagName('select')[0].id;//修改之前var idSupplierSendReason = divSupplierSendReason.getElementsByTagName('input')[0].id
                            var SupplierSendReasonV = document.getElementById(idSupplierSendReason).value = data[j].SupplierSendReason;

                            //客户指定供应商


                            var aDivCustomerDesignatedSupplier = document.getElementsByName("CustomerDesignatedSupplier");

                            var divCustomerDesignatedSupplier = aDivCustomerDesignatedSupplier[i];
                            var idCustomerDesignatedSupplier = divCustomerDesignatedSupplier.getElementsByTagName('input')[0].id;//
                            var CustomerDesignatedSupplierV = document.getElementById(idCustomerDesignatedSupplier).value = data[j].CustomerDesignatedSupplier;
                            //厂商直销/分销


                            var aDivDirectDistribution = document.getElementsByName("DirectDistribution");

                            var divDirectDistribution = aDivDirectDistribution[i];
                            var idDirectDistribution = divDirectDistribution.getElementsByTagName('select')[0].id;//
                            var DirectDistributionV = document.getElementById(idDirectDistribution).value = data[j].DirectDistribution;
							
							//含标准服务


                            var aDivIncludingStandardService = document.getElementsByName("IncludingStandardService");

                            var divIncludingStandardService = aDivIncludingStandardService[i];
                            var idIncludingStandardService = divIncludingStandardService.getElementsByTagName('select')[0].id;//
                            var IncludingStandardServiceV = document.getElementById(idIncludingStandardService).value = data[j].IncludingStandardService;

                            //标准服务年限


                            var aDivYearsService = document.getElementsByName("YearsService");

                            var divYearsService = aDivYearsService[i];
                            var idYearsService = divYearsService.getElementsByTagName('select')[0].id;//
                            var YearsServiceV = document.getElementById(idYearsService).value = data[j].YearsService;

                            
                            
                            //标准服务比列


                            var aDivProportion = document.getElementsByName("Proportion");

                            var divProportion = aDivProportion[i];
                            var idProportion = divProportion.getElementsByTagName('input')[0].id;//
                            var ProportionV = document.getElementById(idProportion).value = data[j].Proportion;



                           OrderToManufactureShow("", "", "", "", "", "");
                           getWB();
						   getRMB();
						   
                        }

                        agent.Eles[document.getElementById("total").getAttribute("xform_xele_index")].setValue(total);
                        agent.Eles[document.getElementById("InternationCIFTotal").getAttribute("xform_xele_index")].setValue(InternationCIFTotal);
                        agent.Eles[document.getElementById("InternationCIFRMBTotal").getAttribute("xform_xele_index")].setValue(InternationCIFRMBTotal);
                        agent.Eles[document.getElementById("CustomsFeesTotal").getAttribute("xform_xele_index")].setValue(CustomsFeesTotal);

                    });

                }
            }



        });

    }

    //日期转换
    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) {

        return shijiantime(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 getOrderWithoutContractNo(formNo) {
        //formNo = "1";
        if (formNo == "") {

            return "否";

        }
        else {
            return "是";
        }
    }

    function getPurchaseRequisitionStatus() {
        //PurchaseRequisitionStatus
        var aDivPurchaseRequisitionStatus = document.getElementsByName("PurchaseRequisitionStatus");

        var aDivStatus = document.getElementsByName("status");

        for (var i = 0; i < aDivPurchaseRequisitionStatus.length; i++) {
            var div = aDivPurchaseRequisitionStatus[i];
            var id = div.getElementsByTagName('input')[0].id;
            var v = document.getElementById(id).value;
            if (v=="1") {
                var divstatus= aDivStatus[i];
                var idstatus = divstatus.getElementsByTagName('input')[0].id;

                document.getElementById(idstatus).value = "2";

            }
        }
    }

    //实时获取无合同下单信息
    function getOrderWithoutContractNos() {
        //实时无合同下单
        var OrderWithoutContractNos = agent.Eles[document.getElementById("OrderWithoutContractNos").getAttribute("xform_xele_index")].getValue();
        //无合同下单流程id
        var OrderWithoutContractNoTaskID = agent.Eles[document.getElementById("OrderWithoutContractNoTaskID").getAttribute("xform_xele_index")].getValue();

        //库里存的值无合同下单的值
        var OrderWithoutContractNo = agent.Eles[document.getElementById("OrderWithoutContractNo").getAttribute("xform_xele_index")].getValue();
        //库里存的值无合同下单的流程id
        var XTextBox4 = agent.Eles[document.getElementById("XTextBox4").getAttribute("xform_xele_index")].getValue();
        if (OrderWithoutContractNos == "") {

            document.getElementById("IsOrderWithoutContract_1").checked = "checked";

        } else {


            document.getElementById("IsOrderWithoutContract_0").checked = "checked";
        }
        agent.Eles[document.getElementById("OrderWithoutContractNo").getAttribute("xform_xele_index")].setValue(OrderWithoutContractNos);
        agent.Eles[document.getElementById("XTextBox4").getAttribute("xform_xele_index")].setValue(OrderWithoutContractNoTaskID);
    }

    Ext.onReady(function () {

        FirstLoadNewPurchaseAppDetailXck();

        getRMB();//人民币采购 且 行项目选择直发时才显示
        getWB();//外币销售 且 行项目选择直发时才显示
        var FormNo = getQueryString("FormNo");
        if (FormNo != "") {
            GetPurchaseReqInfo(); //根据销售机会获取对应的采购信息
        }
        getPurchaseRequisitionStatus();

        getOrderWithoutContractNos();//实时获取无合同号

        agent.on('beforeSubmit', function () {

            //报供应商最终客户为实体清单客户时提示
            var tableObj = document.getElementById("tablePrdt");
            for (var i = 2; i < tableObj.rows.length - 1; i++) {//遍历Table的所有Row //遍历Row中的每一列
                var isFlage = document.getElementById(getElementId("IsFlage", i - 2, "input")).value; // 实体清单客户信息
                if (isFlage == "是") {
                    var line = i - 1;
                    alert("产品明细第[ " + line + " ]行 报供应商最终客户 为实体清单客户,不能提交！");
                    return false;
                }
            }

            //检查采购处理单对应行是否删除
            var checkresMsg = CheckPurchaseHandleIsDelete();
            if (checkresMsg != "") {
                Ext.MessageBox.alert("提示", checkresMsg);
                return false;
            }

            var url = YZSoft.$url('Oimec/ApiServices/PurchaseAPIHandler.ashx');
            var BillingCompany = agent.Eles[document.getElementById("BillingCompany").getAttribute("xform_xele_index")].getValue();
            var BUID = agent.Eles[document.getElementById("BUID").getAttribute("xform_xele_index")].getValue();
            var Area = agent.Eles[document.getElementById("Area").getAttribute("xform_xele_index")].getValue();
            var IsEasyJet = agent.Eles[document.getElementById("IsEasyJet").getAttribute("xform_xele_index")].getValue();
            var ownerName = agent.Eles[document.getElementById("ownerName").getAttribute("xform_xele_index")].getValue();
            var aDivBusinessClass = document.getElementsByName("BusinessClass");//业务分类
            var aDivSupplier = document.getElementsByName("Supplier");//供应商
            var aDivPurchaseCurrency = document.getElementsByName("PurchaseCurrency");//采购币种
            var aDivNewPurchaseAppDetailXck = document.getElementsByName("NewPurchaseAppDetailXck");//采购币种
            // var AppAccount = document.getElementsByName("AppAccount");//发起人
            var AppAccount = agent.Eles[document.getElementById("AppAccount").getAttribute("xform_xele_index")].getValue();//发起人
            var SalesOpportunitiesItemID = agent.Eles[document.getElementById("SalesOpportunitiesItemID").getAttribute("xform_xele_index")].getValue();//销售机会Id
            var aDivNewPurchaseAppDetailXck = document.getElementsByClassName("NewPurchaseAppDetailXck");
            var DisplayName = agent.Eles[document.getElementById("DisplayName").getAttribute("xform_xele_index")].getValue();//申请人名称
            var STPName = agent.Eles[document.getElementById("STPName").getAttribute("xform_xele_index")].getValue();//售达方客户名称

            var CustomerDeliveryDate = agent.Eles[document.getElementById("CustomerDeliveryDate").getAttribute("xform_xele_index")].getValue();//客户交货期

            var SalesOpportunitiesFormNo = agent.Eles[document.getElementById("SalesOpportunitiesFormNo").getAttribute("xform_xele_index")].getValue();//销售机会编号
            var PurchaseCompanyCode = agent.Eles[document.getElementById("PurchaseCompanyCode").getAttribute("xform_xele_index")].getValue();//采购主体公司代码

            var Enclosure = agent.Eles[document.getElementById("Enclosure").getAttribute("xform_xele_index")].getValue();//上传其他附件

            var Remark = agent.Eles[document.getElementById("Remark").getAttribute("xform_xele_index")].getValue();//备注

            //var IsPayAdvance = agent.Eles[document.getElementById("IsPayAdvance").getAttribute("xform_xele_index")].getValue();//销售合同是否有预付
            var ElectronicChapterType = checkedVaule("IsOrderWithoutContract");
            if (ElectronicChapterType == "是") {
                var OrderWithoutContractNo = agent.Eles[document.getElementById("OrderWithoutContractNo").getAttribute("xform_xele_index")].getValue();//预付单号
                if (OrderWithoutContractNo == "") {
                    Ext.MessageBox.alert("提示", "请输入无合同下单单号");
                    return false;
                }
            }

            var IsPayAdvance = XCheckeds("IsPayAdvance");
            if (IsPayAdvance != "1") {
                Ext.MessageBox.alert("提示", "请选择此销售合同是否有预付");
                return false;
            }
            //客户期望交货日期
            var CustomerDeliveryDate = agent.Eles[document.getElementById("CustomerDeliveryDate").getAttribute("xform_xele_index")].getValue();//客户期望交货日期
		    if (CustomerDeliveryDate=="") {
                Ext.MessageBox.alert("提示", "请选择客户期望交货日期");
                return false;
            }
            var myDate = new Date();
            //var d = myDate.toLocaleDateString("yyyyMMdd");
            var CustomerDeliveryDates = new Date(CustomerDeliveryDate);
            if (CustomerDeliveryDates < myDate) {
                Ext.MessageBox.alert("提示", "客户期望交货日期必须大于当前日期");
                return false;
            }
            var flags = false;

            flags = flag();

            if (flags == false) {
                // Ext.MessageBox.alert("提示", "请选择行项目");
                // return false;
            }

            var aDivSupplier = document.getElementsByName("Supplier");
            var aDivIsdelete = document.getElementsByClassName("IsDelete");
            var aDivIsAdd = document.getElementsByName("IsAdd");//是否点击添加sap-so按钮
            var aDivPurchasingPattern = document.getElementsByName("PurchasingPattern");//采购模式
            //直发条件
            var aDivSupplierSendReason = document.getElementsByName("SupplierSendReason");
            //是否直发
            var aDivIsSupplierSend = document.getElementsByName("IsSupplierSend");
            //含税采购币种单价
            var aDivPurchasePrice = document.getElementsByName("PurchasePrice");
            //预计供应商货期
            var aDivSupplierDelivery = document.getElementsByName("SupplierDelivery");
            //预计供应商货期单位
            var aDivSupplierDeliveryDateUnit = document.getElementsByName("SupplierDeliveryDateUnit");
            //采购发票税点
            var aDivPurchaseInvoiceTaxPoint = document.getElementsByName("PurchaseInvoiceTaxPoint");

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

            //供应商电话
            var aDivSupplierTel = document.getElementsByName("SupplierTel");

            //客户保修期
            var aDivWarrantyPeriod = document.getElementsByName("WarrantyPeriod");

            //报供应商最终客户名称
            var aDivCustomerName = document.getElementsByName("CustomerName");
            //实际供应商名称
            var aDivSourcingPurchasing = document.getElementsByName("SourcingPurchasing");
			
			 //厂商编号

            var aDivManufacturerID = document.getElementsByName("ManufacturerID");
			
			  //厂商直销/分销

            var aDivDirectDistribution = document.getElementsByName("DirectDistribution");

            //供应商sapid

            var aDivSupplierSAPID = document.getElementsByName("SupplierSAPID");

            //是否已发起
            var aDivStatus = document.getElementsByName("status");


            for (var i = 0; i < aDivSupplier.length; i++) {
                var div = aDivSupplier[i];
                // console.log(s);
                var id = div.getElementsByTagName('input')[0].id;
                var v = document.getElementById(id).value;

                var divNewPurchaseAppDetailXck = aDivNewPurchaseAppDetailXck[i];
                var idNewPurchaseAppDetailXck = divNewPurchaseAppDetailXck.getElementsByTagName('input')[0].id;
                var vNewPurchaseAppDetailXck = document.getElementById(idNewPurchaseAppDetailXck).checked;

                //是否点击添加sap-so按钮
                var divIsAdd = aDivIsAdd[i];
                var idIsAdd = divIsAdd.getElementsByTagName('input')[0].id;
                var vIsAdd = document.getElementById(idIsAdd).value;
                //业务分类
                var divBusinessClass = aDivBusinessClass[i];
                var idBusinessClass = divBusinessClass.getElementsByTagName('select')[0].id;
                var vBusinessClass = document.getElementById(idBusinessClass).value;

                //采购模式
                var divPurchasingPattern = aDivPurchasingPattern[i];
                var idPurchasingPattern = divPurchasingPattern.getElementsByTagName('select')[0].id;
                var vPurchasingPattern = document.getElementById(idPurchasingPattern).value;

                //直发

                //是否直发


                var divIsSupplierSend = aDivIsSupplierSend[i];

                var IsSupplierSendV = "";
               var idIsSupplierSendName = divIsSupplierSend.getElementsByTagName('input')[0].name;
                var chenckIsSupplierSend = checkedVaule(idIsSupplierSendName);
                if (chenckIsSupplierSend == "非直发") {
                    var idIsSupplierSend = divIsSupplierSend.getElementsByTagName('input')[0].id;
                    IsSupplierSendV = document.getElementById(idIsSupplierSend).value;

                } else if (chenckIsSupplierSend == "直发") {
                    var idIsSupplierSend = divIsSupplierSend.getElementsByTagName('input')[1].id;
                    IsSupplierSendV = document.getElementById(idIsSupplierSend).value;

                }

                // 实际供应商名称
                var divSourcingPurchasing = aDivSourcingPurchasing[i];
                var idSourcingPurchasing = divSourcingPurchasing.getElementsByTagName('input')[0].id;
                var SourcingPurchasingV = document.getElementById(idSourcingPurchasing).value;
				
				 //厂商编号
                var divManufacturerID = aDivManufacturerID[i];
                var idManufacturerID = divManufacturerID.getElementsByTagName('input')[0].id;
                var vManufacturerID = document.getElementById(idManufacturerID).value;
				
				  //厂商直销/分销
                var divDirectDistribution = aDivDirectDistribution[i];
                var idDirectDistribution = divDirectDistribution.getElementsByTagName('select')[0].id;
                var vDirectDistribution = document.getElementById(idDirectDistribution).value;

                //供应商sapid
                var divSupplierSAPID = aDivSupplierSAPID[i];
                var idSupplierSAPID = divSupplierSAPID.getElementsByTagName('input')[0].id;
                var vSupplierSAPID = document.getElementById(idSupplierSAPID).value;

                if (vNewPurchaseAppDetailXck) {
				
				 if (vManufacturerID == "103") {//厂商编号103  是德
                        var MEUR = agent.Eles[document.getElementById("MEUR").getAttribute("xform_xele_index")].getValue();//MEU/MEUR客户分类
                        
                            if (MEUR == "") {

                                Ext.MessageBox.alert("提示", "MEU/MEUR客户分类下,请选择MEU/MEUR客户分类");
                                
                                return false;
                            }

                            if (MEUR == "C类" || MEUR == "D类") {

                                var MEURAttachments = agent.Eles[document.getElementById("MEURAttachments").getAttribute("xform_xele_index")].getValue();//MEU/MEUR附件
                                if (MEURAttachments == "") {
                                    Ext.MessageBox.alert("提示", "MEU/MEUR客户分类下,请上传MEU/MEUR的具有法律效力的书面证明");
                                   
                                    return false;
                                }

                            }
							
						if (MEUR == "A类" || MEUR == "B类" || MEUR == "C类") {

                            var MEURJudgingMaterials = agent.Eles[document.getElementById("MEURJudgingMaterials").getAttribute("xform_xele_index")].getValue();//MEU/MEUR附件
                            if (MEURJudgingMaterials == "") {
                                Ext.MessageBox.alert("提示", "MEU/MEUR客户分类下,请上传MEU/MEUR客户分类的判定材料");

                                return false;
                            }

                        }

                        
                       // KeysightFlag = true;
                    }

                    /*  勾选发起采购处理 验证必填*/
                    //实际供应商名称
                    if (SourcingPurchasingV == "") {
                        Ext.MessageBox.alert("提示", "请输入或选择实际供应商名称");
                        return false;
                    }
					
					  //厂商直分销

                    if (vSupplierSAPID == "1026806" || vSupplierSAPID == "1027639" || vSupplierSAPID == "1005975") {

                        if (vDirectDistribution == "") {
                            Ext.MessageBox.alert("提示", "请选择厂商直/分销");
                            return false;
                        }
                    }
                    //供应商联系人
                    var divSupplierContact = aDivSupplierContact[i];
                    var idSupplierContact = divSupplierContact.getElementsByTagName('input')[0].id;
                    var SupplierContactV = document.getElementById(idSupplierContact).value;
                    if (SupplierContactV == "") {
                        Ext.MessageBox.alert("提示", "请输入供应商联系人");
                        return false;
                    }
                    //供应商电话
                    var divSupplierTel = aDivSupplierTel[i];
                    var idSupplierTel = divSupplierTel.getElementsByTagName('input')[0].id;
                    var SupplierTelV = document.getElementById(idSupplierTel).value;
                    if (SupplierTelV == "") {
                        Ext.MessageBox.alert("提示", "请输入供应商电话");
                        return false;
                    }
                    //是否已发起状态
                    var divStatus = aDivStatus[i];
                    var idStatus = divStatus.getElementsByTagName('input')[0].id;
                    var StatusTrV = document.getElementById(idStatus).value;

                    if (StatusTrV != "2") {
                        //预计供应商货期
                        var divSupplierDelivery = aDivSupplierDelivery[i];
                        var idSupplierDelivery = divSupplierDelivery.getElementsByTagName('input')[0].id;
                        var SupplierDeliveryV = document.getElementById(idSupplierDelivery).value;
                        if (SupplierDeliveryV == "") {
                            Ext.MessageBox.alert("提示", "请输入预计供应商货期");
                            return false;
                        }
                        if (!(/(^[0-9]\d*$)/.test(SupplierDeliveryV))) {  //当输入不是数字的时候，Number后返回的值是NaN;然后用isNaN判断。
                            Ext.MessageBox.alert("提示", "供应商货期只能输入正整数或0");
                            return false;
                        }

                        //预计供应商货期单位
                        var divSupplierDeliveryDateUnit = aDivSupplierDeliveryDateUnit[i];
                        var idSupplierDeliveryDateUnit = divSupplierDeliveryDateUnit.getElementsByTagName('select')[0].id;
                        var SupplierDeliveryDateUnitV = document.getElementById(idSupplierDeliveryDateUnit).value;
                        if (SupplierDeliveryDateUnitV == "") {
                            Ext.MessageBox.alert("提示", "请选择预计供应商货期单位");
                            return false;
                        }
                    }//结束
					
					//直发信息验证
                    //参数：采购币种、供应商直发、销售币种
                    // IsSupplierSendV
                    var _idPurchaseCurrency = getElementId("PurchaseCurrency", i, "select");
                    var _PurchaseCurrencyV = document.getElementById(_idPurchaseCurrency).value;
                    var _ContractCurrency = agent.Eles[document.getElementById("ContractCurrency").getAttribute("xform_xele_index")].getValue();
                    if (_PurchaseCurrencyV == "CNY" && IsSupplierSendV == "直发") {
                        var r1 = checkRMB();
                        if (r1 == false)
                            return r1;
                    }
                    if (_ContractCurrency != "CNY" && IsSupplierSendV == "直发") {
                        var r2 = checkWB();
                        if (r2 == false)
                            return r2;
                    }


                    if (vIsAdd == "1") {
                        if (vBusinessClass == "") {
                            Ext.MessageBox.alert("提示", "请选择业务分类");
                            return false;
                        }
                        if (vPurchasingPattern == "") {
                            Ext.MessageBox.alert("提示", "请选择采购模式");
                            return false;
                        }

                        if (IsSupplierSendV == "") {
                            Ext.MessageBox.alert("提示", "请选择供应商直发");
                            return false;
                        }
						
						 var BTSupplierSendReason; //直发条件必填
                        if (BillingCompany == "2000上海颐合" && _PurchaseCurrencyV != "CNY") {
                            BTSupplierSendReason = false;
                        }
                        else if (BillingCompany == "A300 Hosic" && _PurchaseCurrencyV != "CNY") {
                            BTSupplierSendReason = false;
                        }
                        else
                            BTSupplierSendReason = true;

                        //直发条件
                        if (IsSupplierSendV == "直发" && BTSupplierSendReason == true) {
                            var divSupplierSendReason = aDivSupplierSendReason[i];
                            var idSupplierSendReason = divSupplierSendReason.getElementsByTagName('select')[0].id;
                            var SupplierSendReasonV = document.getElementById(idSupplierSendReason).value;
                            if (SupplierSendReasonV == "") {
                                Ext.MessageBox.alert("提示", "请选择直发条件");
                                return false;
                            }

                        }

                        //采购币种
                        var divPurchaseCurrency = aDivPurchaseCurrency[i];
                        var idPurchaseCurrency = divPurchaseCurrency.getElementsByTagName('select')[0].id;
                        var PurchaseCurrencyV = document.getElementById(idPurchaseCurrency).value;
                        if (PurchaseCurrencyV == "") {
                            Ext.MessageBox.alert("提示", "请选择采购币种");
                            return false;
                        }

                        //含税采购币种单价
                        var divPurchasePrice = aDivPurchasePrice[i];
                        var idPurchasePrice = divPurchasePrice.getElementsByTagName('input')[0].id;
                        var PurchasePriceV = document.getElementById(idPurchasePrice).value;
                        if (PurchasePriceV == "") {
                            Ext.MessageBox.alert("提示", "请输入含税采购单价（采购币种）");
                            return false;
                        }

                        //预计供应商货期
                        var divSupplierDelivery = aDivSupplierDelivery[i];
                        var idSupplierDelivery = divSupplierDelivery.getElementsByTagName('input')[0].id;
                        var SupplierDeliveryV = document.getElementById(idSupplierDelivery).value;
                        if (SupplierDeliveryV == "") {
                            Ext.MessageBox.alert("提示", "请输入预计供应商货期");
                            return false;
                        }
                        //采购发票税点
                        var divPurchaseInvoiceTaxPoint = aDivPurchaseInvoiceTaxPoint[i];
                        var idPurchaseInvoiceTaxPoint = divPurchaseInvoiceTaxPoint.getElementsByTagName('select')[0].id;
                        var PurchaseInvoiceTaxPointV = document.getElementById(idPurchaseInvoiceTaxPoint).value;
                        if (PurchaseCurrencyV == "CNY") {
                            if (PurchaseInvoiceTaxPointV == "") {
                                Ext.MessageBox.alert("提示", "请选择采购发票税点");
                                return false;
                            }
                        }
                        if (v == "") {
                            Ext.MessageBox.alert("提示", "请选择实际供应商");
                            return false;
                        }


                         //实际供应商名称

                        if (SourcingPurchasingV == "") {
                            Ext.MessageBox.alert("提示", "请输入或选择实际供应商名称");
                            return false;
                        }


                        //供应商预付
                        var aDivIsAdvancePay = document.getElementsByClassName("IsAdvancePay");
                        var divIsAdvancePay = aDivIsAdvancePay[i];
                        // console.log(s);
                        var idIsAdvancePay = divIsAdvancePay.getElementsByTagName('input')[0].name;
                        var vIsAdvancePay = checkedVaule(idIsAdvancePay);

                        if (vIsAdvancePay == "undefined" || vIsAdvancePay == undefined) {
                            Ext.MessageBox.alert("提示", "请选择有无供应商预付");
                            return false;
                        }

                        //供应商联系人
                        var divSupplierContact = aDivSupplierContact[i];
                        var idSupplierContact = divSupplierContact.getElementsByTagName('input')[0].id;
                        var SupplierContactV = document.getElementById(idSupplierContact).value;
                        if (SupplierContactV == "") {
                            Ext.MessageBox.alert("提示", "请输入供应商联系人");
                            return false;
                        }

                        //供应商电话
                        var divSupplierTel = aDivSupplierTel[i];
                        var idSupplierTel = divSupplierTel.getElementsByTagName('input')[0].id;
                        var SupplierTelV = document.getElementById(idSupplierTel).value;
                        if (SupplierTelV == "") {
                            Ext.MessageBox.alert("提示", "请输入供应商电话");
                            return false;
                        }

                        //客户保修期
                        var divWarrantyPeriod = aDivWarrantyPeriod[i];
                        var idWarrantyPeriod = divWarrantyPeriod.getElementsByTagName('input')[0].id;
                        var WarrantyPeriodV = document.getElementById(idWarrantyPeriod).value;
                        if (WarrantyPeriodV == "") {
                            Ext.MessageBox.alert("提示", "请输入客户保修期");
                            return false;
                        }

                        //最终客户名称
                        var divCustomerName = aDivCustomerName[i];
                        var idCustomerName = divCustomerName.getElementsByTagName('input')[0].id;
                        var CustomerNameV = document.getElementById(idCustomerName).value;
                        if (CustomerNameV == "") {
                            Ext.MessageBox.alert("提示", "请选择报供应商最终客户名称");
                            return false;
                        }


                    }//点击sap-so  结束

                    if (v == "") {
                        Ext.MessageBox.alert("提示", "请选择实际供应商");
                        return false;
                    }
                    if (SourcingPurchasingV=="") {
                        Ext.MessageBox.alert("提示", "请输入或选择实际供应商名称");
                        return false;
                    }
					
					   //厂商下单要求必填
                    var m = checkOrderToManufacture();
                    if (m == false)
                        return m;

                }
            }
           // return false;
            if (BillingCompany == "2000上海颐合") {
                var Marks = agent.Eles[document.getElementById("Marks").getAttribute("xform_xele_index")].getValue();//销售机会编号
                if (Marks == "") {
                    Ext.MessageBox.alert("提示", "请输入唛头");
                    return false;
                }
            }

            var arr = GetInfoFromTable('tablePrdt');

            //没有需发起申请的行不进行调用
            if (arr != "" && arr != null) {
                var ll = JSON.stringify(arr)
                var parm = {
                    method: "CreatePurchaseProc",
                    BillingCompany: BillingCompany,
                    BUID: BUID,
                    Area: Area,
                    IsEasyJet: IsEasyJet,
                    AppAccount: AppAccount,
                    ownerName: ownerName,
                    SalesOpportunitiesItemID: SalesOpportunitiesItemID,
                    DisplayName: DisplayName,
                    STPName: STPName,
                    CustomerDeliveryDate: CustomerDeliveryDate,
                    SalesOpportunitiesFormNo: SalesOpportunitiesFormNo,
                    PurchaseCompanyCode: PurchaseCompanyCode,
                    Enclosure: Enclosure,
                    Remark: Remark,
                    arrs: ll
                }
                YZSoft.Ajax.request({
                    async: false,
                    url: url,
                    method: 'POST',
                    params: parm,
                    dataType: "json",
                    contentType: "application/json",
                    success: function (ac) {
                        console.log(ac.responseText);
                        //alert(ac.responseText);
                        var TaskId = ac.responseText;
                    }
                });
            }
        });
		
		 //MEUR客户分类设置备注 placeholder
        var aDivMEURemarks = document.getElementsByClassName("MEURemarks");
        var aDivMEURemarksId = aDivMEURemarks[0].getElementsByTagName('textarea')[0].id;
        var v = document.getElementById(aDivMEURemarksId).setAttribute("placeholder", "若最终客户和报供应商最终客户名称不一致，需单独说明");
		
		 var k = getQueryString("key");
        if (k != "" && k != undefined) {
            
            ManufacturerOrderRequire();//如果下单值为空 就从销售机会取值  下单要求发布晚
        }
    });

    function CheckPurchaseHandleIsDelete() {
        //循环遍历行项目信息
        var tableObj = document.getElementById("tablePrdt");

        var isdelete = document.getElementsByClassName("IsDelete");//“取消采购”选项
        var lineNumber = document.getElementsByName("LineNumber");// 行号

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

            var div_isdelete = isdelete[i - 2];
            var id_isdelete = div_isdelete.getElementsByTagName('input')[0].id;
            var chk_isdelete = document.getElementById(id_isdelete).checked;

            var div_lineNumber = lineNumber[i - 2];
            var value_LineNumber = div_lineNumber.getElementsByTagName('span')[0].innerHTML;

            if (chk_isdelete == true)//选中
            {
                var LineItemNo = value_LineNumber;
                //判断 勾选“拒绝”时，已”发起采购处理“选项的行采购处理单对应的行项目是否删除
                YZSoft.Ajax.request({
                    async: false,
                    url: YZSoft.$url('Oimec/ApiServices/PurchaseAPIHandler.ashx'),
                    method: 'POST',
                    params: {
                        method: "GetPurchaseHandleIsDelete",
                        LineItemNo: LineItemNo,
                        SalesOpportunitiesFKID: agent.Eles[document.getElementById("SalesOpportunitiesItemID").getAttribute("xform_xele_index")].getValue()
                    },
                    success: function (action) {
                        var res = action.result.code;
                        //alert(res);
                        if (res == "0") { //采购处理未标识删除
                            resMsg = "序号" + LineItemNo + "行项目已发起采购处理流程，且采购处理单行项目未勾选取消采购";
                            //Ext.MessageBox.alert("提示", resMsg);
                            //return false;
                        }
                    }
                });
            }
        }

        return resMsg;
    }

    //预付款申请链接
    function getAdvanceChargeNoLink() {
        var AdvanceChargeTaskID = agent.Eles[document.getElementById("AdvanceChargeTaskID").getAttribute("xform_xele_index")].getValue();//预付款申请单号
        YZSoft.BPM.src.ux.FormManager.openTaskForRead(AdvanceChargeTaskID, {
            //sender: this,
            dlgModel: 'Window', //Tab,Window,Dialog
            width: 1200,
            height: 500,
             
        });

    }
	
	 //厂商下单要求
    /*
    采购模式；采购币种；采购供应商SAPID；厂商直分销    
    */
    // HiddenExpress="javascript('OrderToManufactureShow',DF_MM_NewPurchaseApp_Detail.PurchasingPattern,DF_MM_NewPurchaseApp_Detail.PurchaseCurrency,DF_MM_NewPurchaseApp_Detail.SupplierSAPID,DF_MM_NewPurchaseApp_Detail.DirectDistribution,DF_MM_NewPurchaseApp_Detail.CustomerName,DF_MM_NewPurchaseApp_Detail.BusinessClassification)"></aspxform:XTextB
    function OrderToManufactureShow(purchasingPattern, purCurrency, purSuppiler, SupplierMode, supplierCustomerName, BusinessClass) {

        //业务分类
        var businessClassificationFlag = false;
        //var aDiv = document.getElementsByClassName("BusinessClass");  //BusinessClass
        var aDiv = document.getElementsByName("BusinessClass");  //BusinessClass

        var kts = document.getElementsByName("kts");

        for (var i = 0; i < kts.length; i++) {
            kts[i].style.display = "none";
        }

        var kts_z = document.getElementsByName("kts_z");

        for (var i = 0; i < kts_z.length; i++) {
            kts_z[i].style.display = "none";
        }

        var kts_fx = document.getElementsByName("kts_fx");

        for (var i = 0; i < kts_fx.length; i++) {
            kts_fx[i].style.display = "none";
        }

        //泰克
        var TEKFLUKEtitle = document.getElementsByName("TEKFLUKETitle");

        for (var i = 0; i < TEKFLUKEtitle.length; i++) {
            TEKFLUKEtitle[i].style.display = "none";
        }

        var TEKFLUKE = document.getElementsByName("TEKFLUKE");

        for (var i = 0; i < TEKFLUKE.length; i++) {
            TEKFLUKE[i].style.display = "none";
        }

        var TEKFLUKEWB = document.getElementsByName("TEKFLUKEWB");

        for (var i = 0; i < TEKFLUKEWB.length; i++) {

            TEKFLUKEWB[i].style.display = "none";
        }

        var BK = document.getElementsByName("BK");

        for (var i = 0; i < BK.length; i++) {
            BK[i].style.display = "none";
        }

        //NF

        var NF = document.getElementsByName("NF");

        for (var i = 0; i < NF.length; i++) {

            NF[i].style.display = "none";
        }

        //AMTEK
        var AMTEK = document.getElementsByName("AMTEK");

        for (var i = 0; i < AMTEK.length; i++) {
            AMTEK[i].style.display = "none";
        }
        //HIOKI
        var HIOKI = document.getElementsByName("HIOKI");

        for (var i = 0; i < HIOKI.length; i++) {
            HIOKI[i].style.display = "none";
        }
        var HIOKI_fx = document.getElementsByName("HIOKI_fx");

        for (var i = 0; i < HIOKI_fx.length; i++) {
            HIOKI_fx[i].style.display = "none";
        }
        //name="JS"

        var JS = document.getElementsByName("JS");

        for (var i = 0; i < JS.length; i++) {
            JS[i].style.display = "none";
        }

        //DH

        var DH = document.getElementsByName("DH");

        for (var i = 0; i < DH.length; i++) {
            DH[i].style.display = "none";
        }
        //ADKS
        var ADKS = document.getElementsByName("ADKS");

        for (var i = 0; i < ADKS.length; i++) {
            ADKS[i].style.display = "none";
        }
		
		    //NI
        var NI = document.getElementsByName("NI");

        for (var i = 0; i < NI.length; i++) {
            NI[i].style.display = "none";
        }

        var flag = false;
        var flagfx = false;
        var TEKFLUKEFlag = false;
        var BKFlag = false;
        var AMTEKFlag = false;
        var HIOKIFlag = false;
        var HIOKIFlagfx = false;
        var jsFlage = false;
        var DHFlag = false;
        var ADKSFlag = false;
        var PurchasingPatternflag = false;
        var TEKFLUKETitleFlag = false;
        var PrchaseCurrencyFlag = false;
        var NFFlag = false;
		 var NIFlag = false;

        var aDivSupplierSAPID = document.getElementsByName("SupplierSAPID");//厂商sapid
        var aDivDirectDistribution = document.getElementsByName("DirectDistribution");//直销/分销
        var aDivPurchasingPattern = document.getElementsByName("PurchasingPattern");//采购模式

        var aDivPrchaseCurrency = document.getElementsByName("PurchaseCurrency");//采购币种
        //var aDivSupplierCustomerName = document.getElementsByName("SupplierCustomerName");  //报供应商最终用户
        var aDivSupplierCustomerName = document.getElementsByName("CustomerName");  //报供应商最终用户
        for (var i = 0; i < aDivSupplierSAPID.length; i++) {
            //厂商sapid
            var divSupplierSAPID = aDivSupplierSAPID[i];
            var idSupplierSAPID = divSupplierSAPID.getElementsByTagName('input')[0].id;
            var v = document.getElementById(idSupplierSAPID).value;

            //采购模式
            var divPurchasingPattern = aDivPurchasingPattern[i];
            var idPurchasingPattern = divPurchasingPattern.getElementsByTagName('select')[0].id;
            var vPurchasingPattern = document.getElementById(idPurchasingPattern).value;

            //采购币种 
            var divPrchaseCurrency = aDivPrchaseCurrency[i];
            var idPrchaseCurrency = divPrchaseCurrency.getElementsByTagName('select')[0].id;
            var vPrchaseCurrency = document.getElementById(idPrchaseCurrency).value;

            //直分销 
            var divDirectDistribution = aDivDirectDistribution[i];
            //var idDirectDistribution = divDirectDistribution.getElementsByTagName('input')[0].id;
            var idDirectDistribution = divDirectDistribution.getElementsByTagName('select')[0].id;
            var vDirectDistribution = document.getElementById(idDirectDistribution).value;

            //报供应商最终用户           
            var divSupplierCustomerName = aDivSupplierCustomerName[i];
            var idSupplierCustomerName = divSupplierCustomerName.getElementsByTagName('input')[0].id;
            var vSupplierCustomerName = document.getElementById(idSupplierCustomerName).value;

            //业务分类
            businessClassificationFlag = false;
            var divBusinessClassification = aDiv[i];
            // console.log(s);
            var idBusinessClassification = divBusinessClassification.getElementsByTagName('select')[0].id;
            var vBusinessClassification = document.getElementById(idBusinessClassification).value;
            if (vBusinessClassification == "新品销售" || vBusinessClassification == "集成销售") {

                businessClassificationFlag = true;

            }

            PurchasingPatternflag = false;
            if (vPurchasingPattern != "备货") {

                PurchasingPatternflag = true;
            }

            //是德
            if ((v == "1026806" || v == "1027639") && businessClassificationFlag == true && PurchasingPatternflag == true) {
                if (vDirectDistribution == "直销") {
                    flag = true;
                }
                if (vDirectDistribution == "分销") {
                    flagfx = true;
                }
            }

            //泰克
            if ((v == "1006334" || v == "1024995" || v == "1006206" || v == "1001464" || v == "1027221" || v == "1024847" || v == "1025013" || v == "1025144") && businessClassificationFlag == true && PurchasingPatternflag == true) {
                TEKFLUKETitleFlag = true;
                if (v == "1006334" && vPrchaseCurrency == "CNY") {
                    TEKFLUKEFlag = true;
                }

                if (vPrchaseCurrency != "CNY" && vPrchaseCurrency != "") {

                    PrchaseCurrencyFlag = true;
                }


            }
            //Bk

            if (v == "1024908" && businessClassificationFlag == true && PurchasingPatternflag == true) {

                BKFlag = true;

            }

            //NF
            if (v == "1024981" && businessClassificationFlag == true && PurchasingPatternflag == true) {

                NFFlag = true;

            }
            //AMTEK
            if ((v == "1028670" || v == "1029122") && businessClassificationFlag == true && PurchasingPatternflag == true) {

                AMTEKFlag = true;

            }
            //日置
            if (v == "1005975" && businessClassificationFlag == true && PurchasingPatternflag == true) {
                if (vDirectDistribution == "直销") {
                    HIOKIFlag = true;
                }
                if (vDirectDistribution == "分销") {
                    HIOKIFlagfx = true;
                }
            }
            //菊水
            if (v == "1008470" && businessClassificationFlag == true && PurchasingPatternflag == true) {

                jsFlage = true;

            }
            //大华
            if (v == "1000286" && businessClassificationFlag == true && PurchasingPatternflag == true) {

                DHFlag = true;

            }
            //艾德克斯
            if (v == "1005902" && businessClassificationFlag == true && PurchasingPatternflag == true) {

                ADKSFlag = true;

            }
			  //NI
            if (v == "1000974" && businessClassificationFlag == true && PurchasingPatternflag == true) {

                NIFlag = true;

            }
        }
        //没有备货
        // if (PurchasingPatternflag) {

        if (flag) {
            //divSupplierCustomerName
          //  agent.Eles[document.getElementById("KeysightTechnologiesChineseName").getAttribute("xform_xele_index")].setValue(vSupplierCustomerName);
            for (var i = 0; i < kts.length; i++) {
                kts[i].style.display = "";
            }
            for (var i = 0; i < kts_z.length; i++) {
                kts_z[i].style.display = "";
            }
        }
        if (flagfx) {
           // agent.Eles[document.getElementById("KeysightTechnologiesChineseName").getAttribute("xform_xele_index")].setValue(vSupplierCustomerName);
            for (var i = 0; i < kts.length; i++) {

                kts[i].style.display = "";
            }
            for (var i = 0; i < kts_fx.length; i++) {

                kts_fx[i].style.display = "";
            }
        }
        if (TEKFLUKETitleFlag) {
            //agent.Eles[document.getElementById("TEKChineseName").getAttribute("xform_xele_index")].setValue(vSupplierCustomerName);
            for (var i = 0; i < TEKFLUKEtitle.length; i++) {

                TEKFLUKEtitle[i].style.display = "";
            }
        }
        if (TEKFLUKEFlag) {
            for (var i = 0; i < TEKFLUKE.length; i++) {
                TEKFLUKE[i].style.display = "";
            }
        }
        //FLUKE外币显示
        if (PrchaseCurrencyFlag) {
            var date1 = agent.Eles[document.getElementById("XDateTimePicker3").getAttribute("xform_xele_index")].getValue(); //免表预计办好日期
            //var date2 = agent.Eles[document.getElementById("XDateTimePicker2").getAttribute("xform_xele_index")].getValue();  
            var date2 = agent.Eles[document.getElementById("CustomerDeliveryDate").getAttribute("xform_xele_index")].getValue(); //客户交货期

          //  agent.Eles[document.getElementById("TEKFlukeExpectedDateExemption").getAttribute("xform_xele_index")].setValue(date1);      //免表预计办好日期
          //  agent.Eles[document.getElementById("TEKFlukeDemandShipment").getAttribute("xform_xele_index")].setValue(date2);      //客户需求货期
            for (var i = 0; i < TEKFLUKEWB.length; i++) {
                TEKFLUKEWB[i].style.display = "";
            }
        }

        if (BKFlag) {
           // agent.Eles[document.getElementById("BKChineseName").getAttribute("xform_xele_index")].setValue(vSupplierCustomerName);
            for (var i = 0; i < BK.length; i++) {
                BK[i].style.display = "";
            }

        }
        if (AMTEKFlag) {
           // agent.Eles[document.getElementById("AMTEKChineseName").getAttribute("xform_xele_index")].setValue(vSupplierCustomerName);
            for (var i = 0; i < AMTEK.length; i++) {
                AMTEK[i].style.display = "";
            }

        }
        if (HIOKIFlag) {
           // agent.Eles[document.getElementById("HIOKIChineseName").getAttribute("xform_xele_index")].setValue(vSupplierCustomerName);
            for (var i = 0; i < HIOKI.length; i++) {
                HIOKI[i].style.display = "";
            }

        }
        //日置分销显示所有字段
        if (HIOKIFlagfx) {
           // agent.Eles[document.getElementById("HIOKIChineseName").getAttribute("xform_xele_index")].setValue(vSupplierCustomerName);
            for (var i = 0; i < HIOKI.length; i++) {
                HIOKI[i].style.display = "";
            }
            for (var i = 0; i < HIOKI_fx.length; i++) {
                HIOKI_fx[i].style.display = "";
            }
        }
        if (jsFlage) {
           // agent.Eles[document.getElementById("ChrysanthemumChineseName").getAttribute("xform_xele_index")].setValue(vSupplierCustomerName);
            for (var i = 0; i < JS.length; i++) {
                JS[i].style.display = "";
            }

        }
        if (NFFlag) {
            for (var i = 0; i < NF.length; i++) {
                NF[i].style.display = "";
            }

        }
        if (DHFlag) {
            for (var i = 0; i < DH.length; i++) {
                DH[i].style.display = "";
            }

        }
        if (ADKSFlag) {
           // agent.Eles[document.getElementById("EdKorsChineceName").getAttribute("xform_xele_index")].setValue(vSupplierCustomerName);
            for (var i = 0; i < ADKS.length; i++) {
                ADKS[i].style.display = "";
            }

        }
		if (NIFlag) {
            // agent.Eles[document.getElementById("EdKorsChineceName").getAttribute("xform_xele_index")].setValue(vSupplierCustomerName);
            for (var i = 0; i < NI.length; i++) {
                NI[i].style.display = "";
            }

        }
        //  }


        //if (flag || flagfx) {
        //    return "";
        //}
        //else
        return "";



    };

    //提交时 检查厂商下单要求必填控制
    function checkOrderToManufacture() {

        var KeysightTechnologiesChineseName = getXValue("KeysightTechnologiesChineseName");//是德中文名称
        var KeysightTechnologiesEnglishName = getXValue("KeysightTechnologiesEnglishName");//是德英文名称
        var KeysightTechnologiesEnglishAdress = getXValue("KeysightTechnologiesEnglishAdress");//是德英文地址
        var KeysightTechnologiesChineseAdress = getXValue("KeysightTechnologiesChineseAdress");//是德中文地址
        var KeysightTechnologiesVendorSalesperson = getXValue("KeysightTechnologiesVendorSalesperson");// 厂商销售人员
        var MEUR = getXValue("MEUR");//MEU/MEUR客户分类
        var MEURAttachments = getXValue("MEURAttachments");//MEU/MEUR的具有法律效力的书面证明

        var TEKFlukeSalesman = getXValue("TEKFlukeSalesman");//Fluke 福禄克" || v == "Tektronix 泰克销售人员
        var BKChineseName = getXValue("BKChineseName");//B&K中文名称
        var BKEnglishName = getXValue("BKEnglishName");//B&K英文名称
        var BKContacts = getXValue("BKContacts");//B&K联系人
        var AMTEKChineseName = getXValue("AMTEKChineseName");//AMTEK中文名称
        var AMTEKEnglishName = getXValue("AMTEKEnglishName");//AMTEK英文文名称
        var AMTEKContacts = getXValue("AMTEKContacts");//AMTEK联系人
        var AMTEKTel = getXValue("AMTEKTel");//AMTEK电话
        var AMTEKAdress = getXValue("AMTEKAdress");//AMTEK地址

        // var XAttachments3 = getXValue("AnnexFollowingOrder");//附件
        //  alert("ff")
        var HIOKIChineseName = getXValue("HIOKIChineseName");//HIOKI中文名称
        //var HIOKIContacts = getXValue("HIOKIChineseName");//HIOKI联系人  
        var HIOKIContacts = getXValue("HIOKIContacts");//HIOKI联系人
        var HIOKITel = getXValue("HIOKITel");//HIOKI电话

        var HIOKIAgentName = getXValue("HIOKIAgentName");//HIOKI代理商名称
        var HIOKIAgentContacts = getXValue("HIOKIAgentContacts");//HIOKI代理商联系人
        var HIOKIAgentTel = getXValue("HIOKIAgentTel");//HIOKI代理商电话

        var ChrysanthemumChineseName = getXValue("ChrysanthemumChineseName");//菊水中文
        //var ChrysanthemumSalesman = getXValue("ChrysanthemumChineseName");//菊水厂商销售人员名
        var ChrysanthemumSalesman = getXValue("ChrysanthemumSalesman");//菊水厂商销售人员名
        var DahuaNewspaperNumber = getXValue("DahuaNewspaperNumber");//大华报备单号
        var EdKorsChineceName = getXValue("EdKorsChineceName");//艾德科斯中文
		   var NICustomerName = agent.Eles[document.getElementById("NICustomerName").getAttribute("xform_xele_index")].getValue();//NI中文
        var NICustomerContact = agent.Eles[document.getElementById("NICustomerContact").getAttribute("xform_xele_index")].getValue();//NI联系人
        var NICustomerContactEmail = agent.Eles[document.getElementById("NICustomerContactEmail").getAttribute("xform_xele_index")].getValue();//NI联系人邮箱


        var aDivManufacturer = document.getElementsByName("Manufacturer");//厂商名称
        var aDivPrchaseCurrency = document.getElementsByName("PrchaseCurrency");//采购币种
        var aDivSupplierSAPID = document.getElementsByName("SupplierSAPID");//厂商sapid

        //厂商编号

        var aDivManufacturerID = document.getElementsByName("ManufacturerID");

        var aDivDirectDistribution = document.getElementsByName("DirectDistribution");//厂商直分销
        var aDiv = document.getElementsByName("BusinessClass");
        var flag = false;
        var aDivSupplierSAPID = document.getElementsByName("SupplierSAPID");//采购供应商sapid
        var KeysightFlag = false;

        for (var i = 0; i < aDivSupplierSAPID.length; i++) {
            //var div = aDivManufacturer[i];
            //var id = div.getElementsByTagName('input')[0].id;
            //var v = document.getElementById(id).value;

            //厂商编号
            var divManufacturerID = aDivManufacturerID[i];
            var idManufacturerID = divManufacturerID.getElementsByTagName('input')[0].id;
            var vManufacturerID = document.getElementById(idManufacturerID).value;

            //厂商sapid
            var divSupplierSAPID = aDivSupplierSAPID[i];
            var idSupplierSAPID = divSupplierSAPID.getElementsByTagName('input')[0].id;
            var v = document.getElementById(idSupplierSAPID).value;

            var divDirectDistribution = aDivDirectDistribution[i];
            var idDirectDistribution = divDirectDistribution.getElementsByTagName('select')[0].id;
            var vDirectDistribution = document.getElementById(idDirectDistribution).value;

            //采购模式
            var aDivPurchasingPattern = document.getElementsByName("PurchasingPattern");
            var divPurchasingPattern = aDivPurchasingPattern[i];
            var idPurchasingPattern = divPurchasingPattern.getElementsByTagName('select')[0].id;
            var vPurchasingPattern = document.getElementById(idPurchasingPattern).value;

            //采购币种
            var aDivPrchaseCurrency = document.getElementsByName("PurchaseCurrency");//采购币种
            var divPrchaseCurrency = aDivPrchaseCurrency[i];
            var idPrchaseCurrency = divPrchaseCurrency.getElementsByTagName('select')[0].id;
            var PrchaseCurrencyValue = document.getElementById(idPrchaseCurrency).value;

            //业务分类
            businessClassificationFlag = false;
            var divBusinessClassification = aDiv[i];
            // console.log(s);
            var idBusinessClassification = divBusinessClassification.getElementsByTagName('select')[0].id;
            var vBusinessClassification = document.getElementById(idBusinessClassification).value;
            if (vBusinessClassification == "新品销售" || vBusinessClassification == "集成销售") {

                businessClassificationFlag = true;
            }

            flag = false;
            if (vPurchasingPattern != "备货" && businessClassificationFlag == true) {
                flag = true;
            }

            if (vManufacturerID == "103") {//厂商编号103  是德
                var MEUR = agent.Eles[document.getElementById("MEUR").getAttribute("xform_xele_index")].getValue();//MEU/MEUR客户分类
                if (MEUR == "") {

                    Ext.MessageBox.alert("提示", "MEU/MEUR客户分类下,请选择MEU/MEUR客户分类");
                    return false;
                }

                if (MEUR == "C类" || MEUR == "D类") {

                    var MEURAttachments = agent.Eles[document.getElementById("MEURAttachments").getAttribute("xform_xele_index")].getValue();//MEU/MEUR附件
                    if (MEURAttachments == "") {
                        Ext.MessageBox.alert("提示", "MEU/MEUR客户分类下,请上传MEU/MEUR的具有法律效力的书面证明");

                        return false;
                    }

                }
                if (MEUR == "A类" || MEUR == "B类" || MEUR == "C类") {

                    var MEURJudgingMaterials = agent.Eles[document.getElementById("MEURJudgingMaterials").getAttribute("xform_xele_index")].getValue();//MEU/MEUR附件
                    if (MEURJudgingMaterials == "") {
                        Ext.MessageBox.alert("提示", "MEU/MEUR客户分类下,请上传MEU/MEUR客户分类的判定材料");

                        return false;
                    }

                }

                //  KeysightFlag = true;

            }

            if (flag) {

                if ((v == "1026806" || v == "1027639")) {

                    if (vDirectDistribution == "") {
                        Ext.MessageBox.alert("提示", "请选择厂商直/分销");
                        return false;
                    }

                    var MEUR = agent.Eles[document.getElementById("MEUR").getAttribute("xform_xele_index")].getValue();//MEU/MEUR客户分类
                    if (vDirectDistribution == "分销") {
                        if (MEUR == "") {

                            //Ext.MessageBox.alert("提示", "厂商订货下单要求,请选择MEU/MEUR客户分类");
                            //return false;
                        }
                    }



                    if (KeysightTechnologiesChineseName == "") {
                        getLocation("KeysightTechnologiesChineseName", "input");
                        Ext.MessageBox.alert("提示", "请输入是德最终客户中文公司名称");
                        return false;
                    }
                    if (KeysightTechnologiesEnglishName == "") {
                        getLocation("KeysightTechnologiesEnglishName", "input");
                        Ext.MessageBox.alert("提示", "请输入是德最终客户英文公司名称");
                        return false;
                    }

                    if (KeysightTechnologiesChineseAdress == "") {
                        getLocation("KeysightTechnologiesChineseAdress", "input");
                        Ext.MessageBox.alert("提示", "请输入是德最终客户中文地址");
                        return false;
                    }
                    if (KeysightTechnologiesEnglishAdress == "") {
                        getLocation("KeysightTechnologiesEnglishAdress", "input");
                        Ext.MessageBox.alert("提示", "请输入是德最终客户英文地址");
                        return false;
                    }
                    var XCheckBox6 = XChecked("KeysightTechnologiesConfirm");//是德确认按钮是否点击

                    if (!XCheckBox6) {
                       // Ext.MessageBox.alert("提示", "您选择厂商下单要求里,是德确认按钮");
                       // return false;
                    }

                    if (vDirectDistribution == "直销") {


                        if (KeysightTechnologiesVendorSalesperson == "") {
                            getLocation("KeysightTechnologiesVendorSalesperson", "input");
                            Ext.MessageBox.alert("提示", "请输入是德销售人员姓名");
                            return false;
                        }
                        //销售人员电话
                        var KeysightTechnologiesEnglishTel = agent.Eles[document.getElementById("KeysightTechnologiesEnglishTel").getAttribute("xform_xele_index")].getValue();
                        //销售人员邮箱
                        var KeysightTechnologiesEnglishEmail = agent.Eles[document.getElementById("KeysightTechnologiesEnglishEmail").getAttribute("xform_xele_index")].getValue();
                        if (KeysightTechnologiesEnglishTel == "" && KeysightTechnologiesEnglishEmail == "") {
                            getLocation("KeysightTechnologiesEnglishTel", "input");
                            Ext.MessageBox.alert("提示", "请输入销售人员电话或邮箱");
                            return false;

                        }
                    }
                    if (MEUR == "C类" || MEUR == "D类") {
                        if (vDirectDistribution == "分销") {
                            var MEURAttachments = agent.Eles[document.getElementById("MEURAttachments").getAttribute("xform_xele_index")].getValue();//MEU/MEUR附件
                            if (MEURAttachments == "") {
                                //Ext.MessageBox.alert("提示", "厂商订货下单要求,请上传MEU/MEUR的具有法律效力的书面证明");
                                //return false;
                            }
                        }
                    }



                }

                if ((v == "1006334" || v == "1024995" || v == "1006206" || v == "1001464" || v == "1027221" || v == "1024847" || v == "1025013" || v == "1025144")) {


                    if (TEKFlukeSalesman == "") {
                        getLocation("TEKFlukeSalesman", "input");
                        Ext.MessageBox.alert("提示", "请输入TEK&FLUKE销售人员姓名");
                        return false;
                    }
                    var TEKConfirm = XChecked("TEKConfirm");//TEK&FLUKE确认按钮是否点击

                    if (v == "1006334" && PrchaseCurrencyValue == "CNY") {
                        if (!TEKConfirm) {
                            //Ext.MessageBox.alert("提示", "您选择厂商下单要求里,TEK&FLUKE确认按钮");
                            //return false;
                        }
                    }
                    var TEKWBConfirm = XChecked("TEKWBConfirm");//TEK&FLUKE确认按钮是否点击

                    if (v == "1006334" && PrchaseCurrencyValue != "CNY" && PrchaseCurrencyValue != "") {
                        if (!TEKWBConfirm) {
                           // Ext.MessageBox.alert("提示", "您选择厂商下单要求里,TEK&FLUKE确认按钮");
                            //return false;
                        }
                    }

                }

                if (v == "1024908") {
                    //BK



                    if (BKChineseName == "") {
                        getLocation("BKChineseName", "input");
                        Ext.MessageBox.alert("提示", "请输入B&K最终客户中文公司名称");
                        return false;
                    }
                    if (BKEnglishName == "") {
                        getLocation("BKEnglishName", "input");
                        Ext.MessageBox.alert("提示", "请输入B&K最终客户英文公司名称");
                        return false;
                    }
                    if (BKContacts == "") {
                        getLocation("BKContacts", "input");
                        Ext.MessageBox.alert("提示", "请输入B&K最终客户联系人");
                        return false;
                    }


                }
                if (v == "1028670" || v == "1029122") {



                    if (AMTEKChineseName == "") {
                        getLocation("AMTEKChineseName", "input");
                        Ext.MessageBox.alert("提示", "请输入AMTEK最终客户中文公司名称");
                        return false;
                    }
                    if (AMTEKEnglishName == "") {
                        getLocation("AMTEKEnglishName", "input");
                        Ext.MessageBox.alert("提示", "请输入AMTEK最终客户英文公司名称");
                        return false;
                    }
                    if (AMTEKContacts == "") {
                        getLocation("AMTEKContacts", "input");
                        Ext.MessageBox.alert("提示", "请输入AMTEK最终客户联系人");
                        return false;
                    }
                    if (AMTEKTel == "") {
                        getLocation("AMTEKTel", "input");
                        Ext.MessageBox.alert("提示", "请输入AMTEK最终客户电话");
                        return false;
                    }
                    if (AMTEKAdress == "") {
                        getLocation("AMTEKAdress", "input");
                        Ext.MessageBox.alert("提示", "请输入AMTEK最终客户地址");
                        return false;
                    }
                }

                if (v == "1024981") {
                    var XAttachments5 = agent.Eles[document.getElementById("XAttachments5").getAttribute("xform_xele_index")].getValue();//附件
                    if (XAttachments5 == "") {

                        Ext.MessageBox.alert("提示", "请上传NF最终用户申明");
                        return false;
                    }
                }

                if (v == "1005975") {

                    if (vDirectDistribution == "直销" || vDirectDistribution == "分销") {
                        if (HIOKIChineseName == "") {
                            getLocation("HIOKIChineseName", "input");
                            Ext.MessageBox.alert("提示", "请输入HIOKI日置最终客户中文公司名称");
                            return false;
                        }
                        if (HIOKIContacts == "") {
                            getLocation("HIOKIContacts", "input");
                            Ext.MessageBox.alert("提示", "请输入HIOKI日置客户联系人");
                            return false;
                        }
                        if (HIOKITel == "") {
                            getLocation("HIOKITel", "input");
                            Ext.MessageBox.alert("提示", "请输入HIOKI日置客户电话");
                            return false;
                        }
                    }

                    //直分销
                    if (vDirectDistribution == "分销") {
                        if (HIOKIAgentName == "") {
                            getLocation("HIOKIAgentName", "input");
                            Ext.MessageBox.alert("提示", "请输入HIOKI日置代理商名称");
                            return false;
                        }
                        if (HIOKIAgentContacts == "") {
                            getLocation("HIOKIAgentContacts", "input");
                            Ext.MessageBox.alert("提示", "请输入HIOKI日置代理商联系人");
                            return false;
                        }
                        if (HIOKIAgentTel == "") {
                            getLocation("HIOKIAgentTel", "input");
                            Ext.MessageBox.alert("提示", "请输入HIOKI日置代理商电话");
                            return false;
                        }

                    }


                }

                //菊水
                if (v == "1008470") {
                    if (ChrysanthemumChineseName == "") {
                        getLocation("ChrysanthemumChineseName", "input");
                        Ext.MessageBox.alert("提示", "请输入菊水最终客户中文公司名称");
                        return false;
                    }
                    if (ChrysanthemumSalesman == "") {
                        getLocation("ChrysanthemumSalesman", "input");
                        Ext.MessageBox.alert("提示", "请输入菊水厂商销售人员");
                        return false;
                    }
                }

                //大华
                if (v == "1000286") {

                    if (DahuaNewspaperNumber == "") {
                        getLocation("DahuaNewspaperNumber", "input");
                        Ext.MessageBox.alert("提示", "请输入大华厂商报备单号");
                        return false;
                    }
                }
                if (v == "1005902") {

                    if (EdKorsChineceName == "") {
                        getLocation("EdKorsChineceName", "input");
                        Ext.MessageBox.alert("提示", "请输入艾德克斯最终客户中文名称");
                        return false;
                    }

                    var EdKorsConfirm = XChecked("EdKorsConfirm");//TEK&FLUKE确认按钮是否点击

                    if (!EdKorsConfirm) {
                       // Ext.MessageBox.alert("提示", "您选择厂商下单要求里,艾德克斯确认按钮");
                        //return false;
                    }
                }
				
				if (v == "1000974") {

                    if (NICustomerName == "") {
                        getLocation("NICustomerName", "input");
                        Ext.MessageBox.alert("提示", "请输入NI最终客户中文名称");
                        return false;
                    }
                    if (NICustomerContact == "") {
                        getLocation("NICustomerContact", "input");
                        Ext.MessageBox.alert("提示", "请输入NI最终客户联系人");
                        return false;
                    }
                    if (NICustomerContactEmail == "") {
                        getLocation("NICustomerContactEmail", "input");
                        Ext.MessageBox.alert("提示", "请输入NI最终客户联系人邮箱");
                        return false;
                    }

                    
                }

                //采购比种
                //for (var i = 0; i < aDivPrchaseCurrency.length; i++) {
                //    //var divPrchaseCurrency = aDivPrchaseCurrency[i];
                //    //var idPrchaseCurrency = divPrchaseCurrency.getElementsByTagName('input')[0].id;
                //    //var PrchaseCurrencyValue = document.getElementById(idPrchaseCurrency).value;
                //    //if ((v == "Fluke 福禄克" || v == "Tektronix 泰克") && PrchaseCurrencyValue != "CNY") {

                //    //}
                //}

            }



        }


    }
	
	 //人民币采购供应商直发客户信息验证
    function checkRMB() {
        var CustomerReceivingName = this.getXValue("CustomerReceivingName");
        if (CustomerReceivingName == "") {
            getLocation("CustomerReceivingName", "input");
            Ext.MessageBox.alert("提示", "请输入收货公司名称");
            return false;
        }
        var CustomerReceivingContacts = this.getXValue("CustomerReceivingContacts");
        if (CustomerReceivingContacts == "") {
            getLocation("CustomerReceivingContacts", "input");
            Ext.MessageBox.alert("提示", "请输入收货联系人");
            return false;
        }
        var XTextBox183 = this.getXValue("CustomerReceivingAdress");
        if (XTextBox183 == "") {
            getLocation("CustomerReceivingAdress", "input");
            Ext.MessageBox.alert("提示", "请输入收货发运详细地址");
            return false;
        }

        var GoodsTel = this.getXValue("CustomerReceivingLandline");
        var GoodsPhone = this.getXValue("CustomerReceivingPhone");
        if (GoodsTel == "" && GoodsPhone == "") {
            //getLocation("CustomerReceivingPhone", "input");
            getLocation("CustomerReceivingLandline", "input");
            Ext.MessageBox.alert("提示", "请输入联系人座机或手机");
            return false;
        }

        return true;



        //var CustomerReceivingContactsSex = checkedVaule("CustomerReceivingContactsSex");//信息暂时无法确认
        //if (CustomerReceivingContactsSex == undefined) {
        //    //getLocation("CustomerReceivingContactsSex", "input");
        //    getLocationRadioList("CustomerReceivingContactsSex");
        //    Ext.MessageBox.alert("提示", "请选择收货联系人称呼");
        //    return false;
        //}
    }

    //外币销售供应商直发客户信息验证
    function checkWB() {

        var GoodsEnglishCompany = this.getXValue("GoodsEnglishCompany");
        if (GoodsEnglishCompany == "") {
            getLocation("GoodsEnglishCompany", "input");
            Ext.MessageBox.alert("提示", "请输入国际运单收货英文公司名称");
            return false;
        }

        var GoodsEnglishAddress = this.getXValue("GoodsEnglishAddress");
        if (GoodsEnglishAddress == "") {
            getLocation("GoodsEnglishAddress", "input");
            Ext.MessageBox.alert("提示", "请输入收货公司英文地址");
            return false;
        }
        var GoodsNotifier = this.getXValue("GoodsNotifier");
        if (GoodsNotifier == "") {
            getLocation("GoodsNotifier", "input");
            Ext.MessageBox.alert("提示", "请输入到货通知人姓名");
            return false;
        }

        //var GoodsNotifierSex = checkedVaule("GoodsNotifierSex");//信息暂时无法确认
        //if (GoodsNotifierSex == undefined) {
        //    getLocationRadioList("GoodsNotifierSex");
        //    Ext.MessageBox.alert("提示", "请选择到货通知人称呼");
        //    return false;
        //}
        var GoodsTel = this.getXValue("GoodsTel");
        var GoodsPhone = this.getXValue("GoodsPhone");
        if (GoodsTel == "") {
            if (GoodsPhone == "") {
                getLocation("GoodsPhone", "input");
                Ext.MessageBox.alert("提示", "请输入到货通知人座机或手机");
                return false;
            }

        } else if (GoodsPhone == "") {
            if (GoodsTel == "") {
                getLocation("GoodsTel", "input");
                Ext.MessageBox.alert("提示", "请输入到货通知人座机或手机");
                return false;
            }
        }

        var GoodsEmail = this.getXValue("GoodsEmail");
        if (GoodsEmail == "") {
            getLocation("GoodsEmail", "input");
            Ext.MessageBox.alert("提示", "请输入收货人E-MAIL");
            return false;
        }
        var GoodsBusinessLicense = this.getXValue("GoodsBusinessLicense");
        if (GoodsBusinessLicense == "") {
            getLocation("GoodsBusinessLicense", "input");
            Ext.MessageBox.alert("提示", "请输入收货公司的营业执照五证合一号");
            return false;
        }
        if (!/^[a-zA-Z0-9]{18}$/.test(GoodsBusinessLicense)) {
            getLocation("GoodsBusinessLicense", "input");
            Ext.MessageBox.alert("提示", "收货公司的营业执照五证合一号必须为18位数字或字母");
            return false;
        }
       

        var GoodsPortArrival = this.getXValue("GoodsPortArrival");
        if (GoodsPortArrival == "") {
            getLocation("GoodsPortArrival", "input");
            Ext.MessageBox.alert("提示", "请输入到货港");
            return false;
        }

        //贸易条款 TradeTerms
        var id = getElementId("TradeTerms", 0, "select");
        var TradeTerms = document.getElementById(id).value;
        if (TradeTerms == "") {
            getLocation("TradeTerms", "select");
            Ext.MessageBox.alert("提示", "请选择贸易条款");
            return false;
        }

        var GoodsCountryOrigin = this.getXValue("GoodsCountryOrigin");
        if (GoodsCountryOrigin == "") {
            getLocation("GoodsCountryOrigin", "input");
            Ext.MessageBox.alert("提示", "请输入原产国");
            return false;
        }
        var GoodsPortDelivery = this.getXValue("GoodsPortDelivery");
        if (GoodsPortDelivery == "") {
            getLocation("GoodsPortDelivery", "input");
            Ext.MessageBox.alert("提示", "请输入发运港");
            return false;
        }
        var XDateTimePicker3 = this.getXValue("XDateTimePicker3");
        if (XDateTimePicker3 == "") {
            Ext.MessageBox.alert("提示", "请选择免表预计办好日期");
            getLocation("XDateTimePicker3", "input");
            return false;
        }

        //var XDateTimePicker6 = this.getXValue("XDateTimePicker6");
        //if (XDateTimePicker6 == "") {
        //    //getLocation("XDateTimePicker6", "input");
        //    Ext.MessageBox.alert("提示", "请选择信用证预计开出日期 或 发货前预付款预计付出日期");
        //    return false;
        //}

        //请选择信用证预计开出日期 或 发货前预付款预计付出日期 必填
        //var TermsPaymentCode = getXValue("TermsPaymentCode");
        //if (TermsPaymentCode in { '0001': '', '0002': '', '0014': '', '1001': '', '1002': '', '1003': '', '1004': '', '1005': '', '1021': '', '1022': '', '1023': '', '1024': '', '1025': '', '1026': '', '1027': '', '1028': '', '1029': '' }) {
        //    if (getXValue("ExpectedIssuingDate") == "") {
        //        Ext.MessageBox.alert("提示", "请选择信用证预计开出日期 或 发货前预付款预计付出日期");
        //        getLocation("ExpectedIssuingDate", "input");
        //        return false;
        //    }
        //}

        var Exemption = checkedVaule("Exemption");//是否免税
        if (Exemption == "是") {
            /*
            //客户免表办理人姓名、办理人电话、办理人邮箱
            if (getXValue("UserExemptionName") == "") {
                Ext.MessageBox.alert("提示", "请填写客户免表办理人姓名");
                getLocation("UserExemptionName", "input");
                return false;
            }

            if (getXValue("UserExemptionPhone") == "") {
                Ext.MessageBox.alert("提示", "请填写客户免表办理人电话");
                getLocation("UserExemptionPhone", "input");
                return false;
            }
            if (getXValue("UserExemptionEmail") == "") {
                Ext.MessageBox.alert("提示", "请填写客户免表办理人邮箱");
                getLocation("UserExemptionEmail", "input");
                return false;
            }
            */
        }

        /*
        if (TermsPaymentCode in { '0014': '', '1001': '', '1002': '', '1003': '', '1004': '', '1005': '' }) {
            if (getXValue("UserCardName") == "") {
                Ext.MessageBox.alert("提示", "请填写客户开证人姓名");
                getLocation("UserCardName", "input");
                return false;
            }
            if (getXValue("UserCardPhone") == "") {
                Ext.MessageBox.alert("提示", "请填写客户开证人电话");
                getLocation("UserCardPhone", "input");
                return false;
            }
            if (getXValue("UserCardEmail") == "") {
                Ext.MessageBox.alert("提示", "请填写客户开证人邮箱");
                getLocation("UserCardEmail", "input");
                return false;
            }
        }
        */


        return true;

    }
	
	 //厂商下单要求 如果为空 从销售机会取值
    function ManufacturerOrderRequire() {

        var str;
        var url = "";
        var parm;

        var SalesOpportunitiesFormNo = agent.Eles[document.getElementById("SalesOpportunitiesFormNo").getAttribute("xform_xele_index")].getValue();
        url = YZSoft.$url('Oimec/CRM/Services/CRHandler.ashx');
        parm = { method: "GetSalesOpportunityInfoByForm", FormNo: SalesOpportunitiesFormNo };

        AjaxParm(url, false, parm, function (action) {

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

    }

    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;

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

            //供应商SAPID
            var idPartnerSAPID = getElementId("SupplierSAPID", 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 (SD) {
            if (DirectDistributionV == "分销") {
                var KYSAttachment1 = agent.Eles[document.getElementById("XAttachments3").getAttribute("xform_xele_index")].getValue();

                if (KYSAttachment1 == "") {
                    agent.Eles[document.getElementById("XAttachments3").getAttribute("xform_xele_index")].setValue(data.KYSAttachment1);
                }

            }
            if (DirectDistributionV == "直销") {
                var KYSAttachment = agent.Eles[document.getElementById("KYSAttachment1").getAttribute("xform_xele_index")].getValue();
                if (KYSAttachment == "") {
                    agent.Eles[document.getElementById("KYSAttachment1").getAttribute("xform_xele_index")].setValue(data.KYSAttachment2);
                }

            }

        }
        if (TEKFLUKE) {
            if (PurchaseCurrencyV == "CNY" && PartnerSAPID == "1006334") {
                var XAttachments4 = agent.Eles[document.getElementById("XAttachments4").getAttribute("xform_xele_index")].getValue();
                if (XAttachments4 == "") {
                    agent.Eles[document.getElementById("XAttachments4").getAttribute("xform_xele_index")].setValue(data.TEKAttachment);
                }

            }
        }
        if (NF) {

            if (data.NFAttachment != null) {
                var XAttachments5 = agent.Eles[document.getElementById("XAttachments5").getAttribute("xform_xele_index")].getValue();
                if (XAttachments5 == "") {
                    agent.Eles[document.getElementById("XAttachments5").getAttribute("xform_xele_index")].setValue(data.NFAttachment);
                }
            }
        }


        if (SD) {
            //是德中文
            var KeysightTechnologiesChineseName = agent.Eles[document.getElementById("KeysightTechnologiesChineseName").getAttribute("xform_xele_index")].getValue();

            if (KeysightTechnologiesChineseName == "") {

                agent.Eles[document.getElementById("KeysightTechnologiesChineseName").getAttribute("xform_xele_index")].setValue(data.KeysightTechnologiesChineseName);
            }
            //是德英文
            var KeysightTechnologiesEnglishName = agent.Eles[document.getElementById("KeysightTechnologiesEnglishName").getAttribute("xform_xele_index")].getValue();
            if (KeysightTechnologiesEnglishName == "") {
                agent.Eles[document.getElementById("KeysightTechnologiesEnglishName").getAttribute("xform_xele_index")].setValue(data.KeysightTechnologiesEnglishName);
            }
            //是德中文地址
            var KeysightTechnologiesChineseAdress = agent.Eles[document.getElementById("KeysightTechnologiesChineseAdress").getAttribute("xform_xele_index")].getValue();
            if (KeysightTechnologiesChineseAdress == "") {
                agent.Eles[document.getElementById("KeysightTechnologiesChineseAdress").getAttribute("xform_xele_index")].setValue(data.KeysightTechnologiesChineseAdress);
            }
            //是德英文地址
            var KeysightTechnologiesEnglishAdress = agent.Eles[document.getElementById("KeysightTechnologiesEnglishAdress").getAttribute("xform_xele_index")].getValue();
            if (KeysightTechnologiesEnglishAdress == "") {
                agent.Eles[document.getElementById("KeysightTechnologiesEnglishAdress").getAttribute("xform_xele_index")].setValue(data.KeysightTechnologiesEnglishAdress);
            }
			
			 var KeysightTechnologiesConfirm = data.KeysightTechnologiesConfirm;
            if (KeysightTechnologiesConfirm=="1") {
                var xk = XChecked("KeysightTechnologiesConfirm");//TEKConfirm KeysightTechnologiesConfirm
               
                if(xk==false){
                    var aDivKeysightTechnologiesConfirm = document.getElementsByName("KeysightTechnologiesConfirm");
                    var idKeysightTechnologiesConfirm = aDivKeysightTechnologiesConfirm[0].id;
                    document.getElementById(idKeysightTechnologiesConfirm).checked=true;
                }
            }

            if (DirectDistributionV == "直销") {
                //是德厂商销售人员
                var KeysightTechnologiesVendorSalesperson = agent.Eles[document.getElementById("KeysightTechnologiesVendorSalesperson").getAttribute("xform_xele_index")].getValue();
                if (KeysightTechnologiesVendorSalesperson == "") {
                    agent.Eles[document.getElementById("KeysightTechnologiesVendorSalesperson").getAttribute("xform_xele_index")].setValue(data.KeysightTechnologiesVendorSalesperson);
                }
                //是德厂商销售人员电话
                var KeysightTechnologiesEnglishTel = agent.Eles[document.getElementById("KeysightTechnologiesEnglishTel").getAttribute("xform_xele_index")].getValue();
                if (KeysightTechnologiesEnglishTel == "") {
                    agent.Eles[document.getElementById("KeysightTechnologiesEnglishTel").getAttribute("xform_xele_index")].setValue(data.KeysightTechnologiesEnglishTel);
                }
                //是德厂商销售人员邮箱
                var KeysightTechnologiesEnglishEmail = agent.Eles[document.getElementById("KeysightTechnologiesEnglishEmail").getAttribute("xform_xele_index")].getValue();
                if (KeysightTechnologiesEnglishEmail == "") {
                    agent.Eles[document.getElementById("KeysightTechnologiesEnglishEmail").getAttribute("xform_xele_index")].setValue(data.KeysightTechnologiesEnglishEmail);
                }

            }

        }

        if (TEKFLUKE) {
            //TEK&FLUKE厂商销售人员

            var TEKFlukeSalesman = agent.Eles[document.getElementById("TEKFlukeSalesman").getAttribute("xform_xele_index")].getValue();
            if (TEKFlukeSalesman == "") {
                agent.Eles[document.getElementById("TEKFlukeSalesman").getAttribute("xform_xele_index")].setValue(data.TEKFlukeSalesman);
            }
            if (PurchaseCurrencyV == "CNY" && PartnerSAPID == "1006334") {

                //TEK&FLUKE中文全称

                var TEKChineseName = agent.Eles[document.getElementById("TEKChineseName").getAttribute("xform_xele_index")].getValue();
                if (TEKChineseName == "") {
                    agent.Eles[document.getElementById("TEKChineseName").getAttribute("xform_xele_index")].setValue(data.TEKChineseName);
                }

            }

            if (PurchaseCurrencyV != "CNY") {

                //TEK&FLUKE中文全称

                var TEKFlukeExpectedDateExemption = agent.Eles[document.getElementById("TEKFlukeExpectedDateExemption").getAttribute("xform_xele_index")].getValue();
                if (TEKFlukeExpectedDateExemption == "") {
                    agent.Eles[document.getElementById("TEKFlukeExpectedDateExemption").getAttribute("xform_xele_index")].setValue(data.TEKFlukeExpectedDateExemption);
                }

                //TEK&FLUKE中文全称

                var TEKFlukeDemandShipment = agent.Eles[document.getElementById("TEKFlukeDemandShipment").getAttribute("xform_xele_index")].getValue();
                if (TEKFlukeDemandShipment == "") {
                    agent.Eles[document.getElementById("TEKFlukeDemandShipment").getAttribute("xform_xele_index")].setValue(data.TEKFlukeDemandShipment);
                }
				
				 var TEKConfirm = data.TEKConfirm;
                    if (TEKConfirm == "1") {
                        var xk = XChecked("TEKConfirm");//TEKConfirm KeysightTechnologiesConfirm

                        if (xk == false) {
                            var aDivTEKConfirm = document.getElementsByName("TEKConfirm");
                            var idTEKConfirm = aDivTEKConfirm[0].id;
                            document.getElementById(idTEKConfirm).checked = true;
                        }
                    }


            }


        }

        //B&amp;K
        if (BK) {
            //BK中文全称

            var BKChineseName = agent.Eles[document.getElementById("BKChineseName").getAttribute("xform_xele_index")].getValue();
            if (BKChineseName == "") {
                agent.Eles[document.getElementById("BKChineseName").getAttribute("xform_xele_index")].setValue(data.BKChineseName);
            }
            //BK英文全称

            var BKEnglishName = agent.Eles[document.getElementById("BKEnglishName").getAttribute("xform_xele_index")].getValue();
            if (BKEnglishName == "") {
                agent.Eles[document.getElementById("BKEnglishName").getAttribute("xform_xele_index")].setValue(data.BKEnglishName);
            }
            //BK联系人

            var BKContacts = agent.Eles[document.getElementById("BKContacts").getAttribute("xform_xele_index")].getValue();
            if (BKContacts == "") {
                agent.Eles[document.getElementById("BKContacts").getAttribute("xform_xele_index")].setValue(data.BKContacts);
            }


        }

        //AMTEK
        if (AMTEK) {

            //AMTEK中文公司全称
            var AMTEKChineseName = agent.Eles[document.getElementById("AMTEKChineseName").getAttribute("xform_xele_index")].getValue();
            if (AMTEKChineseName == "") {
                agent.Eles[document.getElementById("AMTEKChineseName").getAttribute("xform_xele_index")].setValue(data.AMTEKChineseName);
            }
            //AMTEK英文公司全称
            var AMTEKEnglishName = agent.Eles[document.getElementById("AMTEKEnglishName").getAttribute("xform_xele_index")].getValue();
            if (AMTEKEnglishName == "") {
                agent.Eles[document.getElementById("AMTEKEnglishName").getAttribute("xform_xele_index")].setValue(data.AMTEKEnglishName);
            }
            //AMTEK联系人
            var AMTEKContacts = agent.Eles[document.getElementById("AMTEKContacts").getAttribute("xform_xele_index")].getValue();
            if (AMTEKContacts == "") {
                agent.Eles[document.getElementById("AMTEKContacts").getAttribute("xform_xele_index")].setValue(data.AMTEKContacts);
            }

            //AMTEK联系人电话
            var AMTEKTel = agent.Eles[document.getElementById("AMTEKTel").getAttribute("xform_xele_index")].getValue();
            if (AMTEKTel == "") {
                agent.Eles[document.getElementById("AMTEKTel").getAttribute("xform_xele_index")].setValue(data.AMTEKTel);
            }
            //AMTEK联系人地址
            var AMTEKAdress = agent.Eles[document.getElementById("AMTEKAdress").getAttribute("xform_xele_index")].getValue();
            if (AMTEKAdress == "") {
                agent.Eles[document.getElementById("AMTEKAdress").getAttribute("xform_xele_index")].setValue(data.AMTEKAdress);
            }


        }

        //HIOKI
        if (RZ) {
            //中文公司全称

            var HIOKIChineseName = agent.Eles[document.getElementById("HIOKIChineseName").getAttribute("xform_xele_index")].getValue();
            if (HIOKIChineseName == "") {
                agent.Eles[document.getElementById("HIOKIChineseName").getAttribute("xform_xele_index")].setValue(data.HIOKIChineseName);
            }

            //联系人

            var HIOKIContacts = agent.Eles[document.getElementById("HIOKIContacts").getAttribute("xform_xele_index")].getValue();
            if (HIOKIContacts == "") {
                agent.Eles[document.getElementById("HIOKIContacts").getAttribute("xform_xele_index")].setValue(data.HIOKIContacts);
            }

            //电话

            var HIOKITel = agent.Eles[document.getElementById("HIOKITel").getAttribute("xform_xele_index")].getValue();
            if (HIOKITel == "") {
                agent.Eles[document.getElementById("HIOKITel").getAttribute("xform_xele_index")].setValue(data.HIOKITel);
            }
            if (DirectDistributionV == "分销") {

                //二级代理商名称

                var HIOKIAgentName = agent.Eles[document.getElementById("HIOKIAgentName").getAttribute("xform_xele_index")].getValue();
                if (HIOKIAgentName == "") {
                    agent.Eles[document.getElementById("HIOKIAgentName").getAttribute("xform_xele_index")].setValue(data.HIOKIAgentName);
                }
                //代理商联系人

                var HIOKIAgentContacts = agent.Eles[document.getElementById("HIOKIAgentContacts").getAttribute("xform_xele_index")].getValue();
                if (HIOKIAgentContacts == "") {
                    agent.Eles[document.getElementById("HIOKIAgentContacts").getAttribute("xform_xele_index")].setValue(data.HIOKIAgentContacts);
                }
                //代理商电话

                var HIOKIAgentTel = agent.Eles[document.getElementById("HIOKIAgentTel").getAttribute("xform_xele_index")].getValue();
                if (HIOKIAgentTel == "") {
                    agent.Eles[document.getElementById("HIOKIAgentTel").getAttribute("xform_xele_index")].setValue(data.HIOKIAgentTel);
                }


            }

        }

        //JS
        if (JS) {


            //中文公司全称

            var ChrysanthemumChineseName = agent.Eles[document.getElementById("ChrysanthemumChineseName").getAttribute("xform_xele_index")].getValue();
            if (ChrysanthemumChineseName == "") {
                agent.Eles[document.getElementById("ChrysanthemumChineseName").getAttribute("xform_xele_index")].setValue(data.ChrysanthemumChineseName);
            }
            //厂商销售人员名

            var ChrysanthemumSalesman = agent.Eles[document.getElementById("ChrysanthemumSalesman").getAttribute("xform_xele_index")].getValue();
            if (ChrysanthemumSalesman == "") {
                agent.Eles[document.getElementById("ChrysanthemumSalesman").getAttribute("xform_xele_index")].setValue(data.ChrysanthemumSalesman);
            }

        }

        //大华
        if (DH) {

            //厂商报备单号

            var DahuaNewspaperNumber = agent.Eles[document.getElementById("DahuaNewspaperNumber").getAttribute("xform_xele_index")].getValue();
            if (DahuaNewspaperNumber == "") {
                agent.Eles[document.getElementById("DahuaNewspaperNumber").getAttribute("xform_xele_index")].setValue(data.DahuaNewspaperNumber);
            }

        }

        //艾德克斯
        if (ADKS) {
            //中文全称
            var EdKorsChineceName = agent.Eles[document.getElementById("EdKorsChineceName").getAttribute("xform_xele_index")].getValue();
            if (EdKorsChineceName == "") {
                agent.Eles[document.getElementById("EdKorsChineceName").getAttribute("xform_xele_index")].setValue(data.EdKorsChineceName);
            }

        }


    }
    /*   注**：这是一个公共的方法
    **  获取行项目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;
    }
	
	 function getXValue(id) {
        return agent.Eles[document.getElementById(id).getAttribute("xform_xele_index")].getValue();
    }

    function setXValue(id, value) {
        agent.Eles[document.getElementById(id).getAttribute("xform_xele_index")].setValue(value);
    }


    //功能：定位标签位置，同Oimec\ControlEvent\CrmCrSalesProgressChange.js
    //保存时如果为空 就定位到该位置并至红色
    function getLocation(xid, type) {
        var id = document.getElementById(xid).getElementsByTagName(type)[0].id;
        document.getElementById(xid).getElementsByTagName("div")[0].style.borderColor = "red";
        if (id != "")
            document.querySelector('#' + id + '').focus();

        document.getElementById(xid).getElementsByTagName(type)[0].onblur = function blur() {
            var value = agent.Eles[document.getElementById(xid).getAttribute("xform_xele_index")].getValue();
            if (value != "") {
                document.getElementById(xid).getElementsByTagName("div")[0].style.borderColor = "Gainsboro";
            }
            else {
                document.getElementById(xid).getElementsByTagName("div")[0].style.borderColor = "red";
            }
        }
        document.getElementById(xid).getElementsByTagName(type)[0].onfocus = function focus() {
            var value = agent.Eles[document.getElementById(xid).getAttribute("xform_xele_index")].getValue();
            if (value != "") {
                document.getElementById(xid).getElementsByTagName("div")[0].style.borderColor = "Gainsboro";
            } else {
                document.getElementById(xid).getElementsByTagName("div")[0].style.borderColor = "red";
            }

        }

    }

    //控件是否选中 checkbox,radiobutton
    function XCheckeds(name) {
        var inputs = document.getElementsByTagName("input");
        for (var i = 0; i < inputs.length; i++) {
            var obj = inputs[i];
            //str.indexOf("3") != -1
            if (obj.id.indexOf("" + name + "") != -1) {//如果存在

                if (obj.checked) {
                    return 1;
                }

            }


        }
    }

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

    }
    //控件是否选中 checkbox,radiobutton  不是List
    function XChecked(name) {
        var inputs = document.getElementsByTagName("input");
        for (var i = 0; i < inputs.length; i++) {
            var a = document.getElementsByName(name);
            if (inputs[i].name == name) {
                return inputs[i].checked;
            }
        }
    }
     

</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_NewPurchaseApp_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 height="17" class="title1" colspan="4">
                        <asp:Label id="Label3" runat="server" text="基本信息"></asp:Label>
                        <aspxform:XTextBox id="SalesOpportunitiesItemID" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.FKID" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="true" Max="0" Min="0" Width="20px"></aspxform:XTextBox>
                        <aspxform:XDropDownList id="XDropDownList1" runat="server" DisplayColumn="Name" ValueColumn="Name" HiddenExpress="1" DataMap="ownerId->ownerId;ownerName->ownerName;FormNo->SalesOpportunitiesFormNo;BU->BU;Area->DF_MM_NewPurchaseApp_Info.Area;BillingCompany->DF_MM_NewPurchaseApp_Info.BillingCompany;SalesOrganization->SalesOrganization;ProductLine->DF_MM_NewPurchaseApp_Info.BUID;SalesOffice->SalesOffice1;STPName->STPName;SAPOFContact->SAPOFContact;SAPOFPhone->STPPhone;SAPOFAddress->STPAdress;PTPName->PTPName;CustomerDeliveryWay->CustomerDeliveryWay;CustomerDeliveryDate->DF_MM_NewPurchaseApp_Info.CustomerDeliveryDate;NonstopAirport->NonstopAirport;Exemption->Exemption;TaxType->TaxType;InvoiceType->InvoiceType;ContractCurrency->ContractCurrency;ContractAmount->ContractAmount;GrossMargin->GrossMargin;GrossProfitRate->GrossProfitRate;Accessory1->DF_MM_NewPurchaseApp_Info.Enclosure;CustomerReceivingContacts->DF_MM_NewPurchaseApp_Info.CustomerReceivingContacts;CustomerReceivingLandline->DF_MM_NewPurchaseApp_Info.CustomerReceivingLandline;CustomerReceivingPhone->DF_MM_NewPurchaseApp_Info.CustomerReceivingPhone;CustomerReceivingAdress->DF_MM_NewPurchaseApp_Info.CustomerReceivingAdress;CustomerReceivingZipCode->DF_MM_NewPurchaseApp_Info.CustomerReceivingZipCode;GoodsEnglishCompany->DF_MM_NewPurchaseApp_Info.GoodsEnglishCompany;GoodsEnglishAddress->DF_MM_NewPurchaseApp_Info.GoodsEnglishAddress;GoodsNotifier->DF_MM_NewPurchaseApp_Info.GoodsNotifier;GoodsPhone->DF_MM_NewPurchaseApp_Info.GoodsPhone;GoodsTel->DF_MM_NewPurchaseApp_Info.GoodsTel;GoodsBusinessLicense->DF_MM_NewPurchaseApp_Info.GoodsBusinessLicense;GoodsEmail->DF_MM_NewPurchaseApp_Info.GoodsEmail;GoodsPortArrival->DF_MM_NewPurchaseApp_Info.GoodsPortArrival;GoodsCountryOrigin->DF_MM_NewPurchaseApp_Info.GoodsCountryOrigin;GoodsPortDelivery->DF_MM_NewPurchaseApp_Info.GoodsPortDelivery;SAPQuotation->SAPQuotation;ObjName->ObjName;KeysightTechnologiesChineseName->DF_MM_NewPurchaseApp_Info.KeysightTechnologiesChineseName;KeysightTechnologiesEnglishName->DF_MM_NewPurchaseApp_Info.KeysightTechnologiesEnglishName;KeysightTechnologiesEnglishAdress->DF_MM_NewPurchaseApp_Info.KeysightTechnologiesEnglishAdress;KeysightTechnologiesChineseAdress->DF_MM_NewPurchaseApp_Info.KeysightTechnologiesChineseAdress;KeysightTechnologiesVendorSalesperson->DF_MM_NewPurchaseApp_Info.KeysightTechnologiesVendorSalesperson;TEKChineseName->DF_MM_NewPurchaseApp_Info.TEKChineseName;TEKFlukeSalesman->DF_MM_NewPurchaseApp_Info.TEKFlukeSalesman;BKChineseName->DF_MM_NewPurchaseApp_Info.BKChineseName;BKEnglishName->DF_MM_NewPurchaseApp_Info.BKEnglishName;BKContacts->DF_MM_NewPurchaseApp_Info.BKContacts;AMTEKChineseName->DF_MM_NewPurchaseApp_Info.AMTEKChineseName;AMTEKEnglishName->DF_MM_NewPurchaseApp_Info.AMTEKEnglishName;AMTEKContacts->DF_MM_NewPurchaseApp_Info.AMTEKContacts;AMTEKTel->DF_MM_NewPurchaseApp_Info.AMTEKTel;AMTEKAdress->DF_MM_NewPurchaseApp_Info.AMTEKAdress;HIOKIChineseName->DF_MM_NewPurchaseApp_Info.HIOKIChineseName;HIOKIContacts->DF_MM_NewPurchaseApp_Info.HIOKIContacts;HIOKITel->DF_MM_NewPurchaseApp_Info.HIOKITel;HIOKIAgentName->DF_MM_NewPurchaseApp_Info.HIOKIAgentName;HIOKIAgentContacts->DF_MM_NewPurchaseApp_Info.HIOKIAgentContacts;HIOKIAgentTel->DF_MM_NewPurchaseApp_Info.HIOKIAgentTel;ChrysanthemumChineseName->DF_MM_NewPurchaseApp_Info.ChrysanthemumChineseName;ChrysanthemumSalesman->DF_MM_NewPurchaseApp_Info.ChrysanthemumSalesman;DahuaNewspaperNumber->DF_MM_NewPurchaseApp_Info.DahuaNewspaperNumber;EdKorsChineceName->DF_MM_NewPurchaseApp_Info.EdKorsChineceName;AddedDeliver->AddedDeliver;GoodsNotifierSex->DF_MM_NewPurchaseApp_Info.GoodsNotifierSex;UserExemptionName->DF_MM_NewPurchaseApp_Info.UserExemptionName;UserExemptionPhone->DF_MM_NewPurchaseApp_Info.UserExemptionPhone;UserExemptionEmail->DF_MM_NewPurchaseApp_Info.UserExemptionEmail;UserCardName->DF_MM_NewPurchaseApp_Info.UserCardName;UserCardPhone->DF_MM_NewPurchaseApp_Info.UserCardPhone;UserCardEmail->DF_MM_NewPurchaseApp_Info.UserCardEmail;DeliveryBatch->DeliveryBatch;BatchdeliveryRemarks->BatchdeliveryRemarks;FreeDate->DF_MM_NewPurchaseApp_Info.FreeDate;TradeTerms->DF_MM_NewPurchaseApp_Info.TradeTerms;KeysightTechnologiesEnglishTel->DF_MM_NewPurchaseApp_Info.KeysightTechnologiesEnglishTel;KeysightTechnologiesEnglishEmail->DF_MM_NewPurchaseApp_Info.KeysightTechnologiesEnglishEmail;KeysightTechnologiesConfirm->DF_MM_NewPurchaseApp_Info.KeysightTechnologiesConfirm;EdKorsConfirm->DF_MM_NewPurchaseApp_Info.EdKorsConfirm;KYSAttachment1->DF_MM_NewPurchaseApp_Info.KYSAttachment1;KYSAttachment2->DF_MM_NewPurchaseApp_Info.KYSAttachment2;TEKAttachment->DF_MM_NewPurchaseApp_Info.TEKAttachment;NFAttachment->DF_MM_NewPurchaseApp_Info.NFAttachment;ManufacturerRemarks->DF_MM_NewPurchaseApp_Info.ManufacturerRemarks;SalesOpportunitiesRemark->DF_MM_NewPurchaseApp_Info.Remark;MEUR->DF_MM_NewPurchaseApp_Info.MEUR;MEURAttachments->DF_MM_NewPurchaseApp_Info.MEURAttachments;MEURemarks->DF_MM_NewPurchaseApp_Info.MEURemarks;MEURJudgingMaterials->DF_MM_NewPurchaseApp_Info.MEURJudgingMaterials;IsAcceptanceClause->DF_MM_NewPurchaseApp_Info.IsAcceptanceClause;PayAppFormNo->AdvanceChargeNo;AdvanceChargeTaskID->AdvanceChargeTaskID;NICustomerName->DF_MM_NewPurchaseApp_Info.NICustomerName;NICustomerContact->DF_MM_NewPurchaseApp_Info.NICustomerContact;NICustomerContactEmail->DF_MM_NewPurchaseApp_Info.NICustomerContactEmail;" XDataSource="TableName:V_DF_CRM_SalesOpportunities_PayApp;Filter:ItemId->DF_MM_NewPurchaseApp_Info.FKID">
                            <asp:ListItem Selected="True"></asp:ListItem>
                        </aspxform:XDropDownList>
                        <aspxform:XTextBox id="PurchaseCompanyCode" runat="server" XDataBind="PurchaseCompanyCode" HiddenInput="true"></aspxform:XTextBox>
                        <aspxform:XTextBox id="formstate" runat="server" XDataBind="formstate" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" width="100px"></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_NewPurchaseApp_Info.AppAccount" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Max="0" Min="0" Width="20px" HiddenExpress="1"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="DisplayName" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Info.DisplayName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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_NewPurchaseApp_Info.CreateDate" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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="IsEasyJets" runat="server" BackColor="#E6F1F8" XDataBind="IsEasyJet" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                        <aspxform:XTextBox id="IsEasyJet" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Info.IsEasyJet" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText Express="javascript('IsEasyJet',IsEasyJet)"></aspxform:XTextBox>
                        <aspxform:XTextBox id="ownerId" runat="server" BackColor="#E6F1F8" XDataBind="ownerId" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                        <aspxform:XTextBox id="ownerName" runat="server" BackColor="#E6F1F8" XDataBind="ownerName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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_NewPurchaseApp_Info.BUID" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                        <aspxform:XTextBox id="BU" runat="server" BackColor="#E6F1F8" XDataBind="BU" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                        <aspxform:XTextBox id="SalesOffice" runat="server" BackColor="#E6F1F8" XDataBind="SalesOffice" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                        <aspxform:XDropDownList id="SalesOffices" runat="server" XDataBind="SalesOffices" Width="100%" HiddenExpress="1" DataMap="SalesOffice->SalesOffice" XDataSource="TableName:DF_SA_SS_SalesOffice;OrderBy:OrderID;Filter:SalesOfficeID->SalesOffice1;" displaycolumn="SalesOffice" valuecolumn="SalesOfficeID" 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="DF_MM_NewPurchaseApp_Info.BillingCompany" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="28" class="tsbottomlabel">
                        <asp:Label id="Label9" runat="server" text="所属地区"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="Area" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Info.Area" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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="AdvanceChargeTaskID" runat="server" XDataBind="AdvanceChargeTaskID" HiddenExpress="1"></aspxform:XTextBox>
                        <aspxform:XTextBox id="AdvanceChargeNo" runat="server" BackColor="#E6F1F8" XDataBind="AdvanceChargeNo" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                        <%--<aspxform:XDropDownList runat="server" DataMap="FormNo->AdvanceChargeNo" HiddenExpress="1" XDataSource="TableName:DF_Pruchase_AdvancePayApp_Info;Filter:InquiryFormNo->SalesOpportunitiesFormNo"></aspxform:XDropDownList>--%>
                        <aspxform:XHistoryFormLink id="XHistoryFormLink1" runat="server" BackColor="#D4E4FE" XDataBind="AdvanceChargeTaskIDs" HiddenExpress="1">【查看详情】</aspxform:XHistoryFormLink>
                        <input onclick="getAdvanceChargeNoLink()" type="button" value="查看详情" runat="server" hiddenexpress="AdvanceChargeNo==''" />
                    </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="DF_MM_NewPurchaseApp_Info.IsOrderWithoutContract" Express="javascript('getOrderWithoutContractNo',DF_MM_NewPurchaseApp_Info.OrderWithoutContractNo)" 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="DF_MM_NewPurchaseApp_Info.OrderWithoutContractNo" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" ValueToDisplayText DisableExpress="1"></aspxform:XTextBox>
                        <%--<aspxform:XDataBrowserButton id="XDataBrowserButton7" runat="server" Text="查询" Width="35px" DataMap="FormNo->DF_MM_NewPurchaseApp_Info.OrderWithoutContractNo;" XDataSource="TableName:DF_Purchase_OrderWithoutContract;Filter:InquiryFormNo->SalesOpportunitiesFormNo;" DisplayColumns="FormNo:无合同下单号,180;Customer:客户名称" Height="25px"></aspxform:XDataBrowserButton>--%>
                        <aspxform:XDropDownList id="InquiryFormNo" runat="server" HiddenExpress="1" DataMap="TaskID->OrderWithoutContractNoTaskID;FormNo->OrderWithoutContractNos" XDataSource="TableName:V_DF_Purchase_OrderWithoutContract;Filter:InquiryFormNo->SalesOpportunitiesFormNo;OrderBy:TaskID desc"></aspxform:XDropDownList>
                        <aspxform:XTextBox id="XTextBox4" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.OrderWithoutContractNoTaskID" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="20px"></aspxform:XTextBox>
                        <aspxform:XTextBox id="OrderWithoutContractNos" runat="server" XDataBind="OrderWithoutContractNos" Width="100" HiddenExpress="1"></aspxform:XTextBox>
                        <aspxform:XTextBox id="OrderWithoutContractNoTaskID" runat="server" XDataBind="OrderWithoutContractNoTaskID" Width="100" HiddenExpress="1"></aspxform:XTextBox>
                    </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" XDataBind="DF_MM_NewPurchaseApp_Info.Marks" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" ValueToDisplayText Height="50px" TextMode="MultiLine"></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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label75" runat="server" text="业务类型"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox5" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Info.Type" BorderWidth="1" BorderColor="#DCDCDC" width="20%" ReadOnly="True">直销</aspxform:XTextBox>
                    </td>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label79" runat="server" text="SAP-SO号"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox7" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Info.SO" BorderWidth="1" BorderColor="#DCDCDC" width="20%" ReadOnly="True"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0" hidden="hidden">
            <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" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Max="0" Min="0" Width="20px" HiddenExpress="1"></aspxform:XTextBox>
                    </td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="STPName" runat="server" BackColor="#E6F1F8" XDataBind="STPName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" style="WIDTH: 10%">
                        <asp:Label id="Label22" runat="server" text="付款方客户名称"></asp:Label></td>
                    <td class="tsbottomtext" style="WIDTH: 80%" colspan="3">
                        <aspxform:XTextBox id="PTPName" runat="server" BackColor="#E6F1F8" XDataBind="PTPName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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="DF_MM_NewPurchaseApp_Info.TermsPayment" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" DisableExpress="1" PromptText="--请选择--" xdatasource="TableName:V_DF_SA_SS_SalesCurrency;Filter:BufferType:RuntimeUpdate">
                            <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="DF_MM_NewPurchaseApp_Info.ActTermsPayment" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText DisableExpress="1"></aspxform:XTextBox>
                    </td>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label51" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label31" runat="server" text="此销售合同是否有预付"></asp:Label></td>
                    <td class="tsbottomtext" onchange="GetPayAdvance()">
                        <aspxform:XRadioButtonList id="IsPayAdvance" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.IsPayAdvance" name="IsPayAdvance" 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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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:XDateTimePicker id="CustomerDeliveryDate" style="WIDTH: 50%" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.CustomerDeliveryDate" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XDateTimePicker>
                    </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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label54" runat="server" text="客户纸面合同交货日期"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="ContractDeliveryDate" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Info.ContractDeliveryDate" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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="Exemption" 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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label55" runat="server" text="整单/分批交货"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="DeliveryBatch" runat="server" BackColor="#E6F1F8" XDataBind="DeliveryBatch" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText DisableExpress="1"></aspxform:XTextBox>
                        % 
                    </td>
                </tr>
                <tr>
                    <td height="21" class="tsbottomlabel">
                        <asp:Label id="Label56" runat="server" text="分批交货备注"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="BatchdeliveryRemarks" runat="server" BackColor="#E6F1F8" XDataBind="BatchdeliveryRemarks" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" 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>
                <tr>
                    <td class="tsbottomlabel">
                        销售合同中是否包含验收条款</td>
                    <td class="tsbottomtext">
                        <aspxform:XRadioButtonList id="XRadioButtonList2" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.IsAcceptanceClause" name="Exemption" DisableExpress="1" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True">是</asp:ListItem>
                            <asp:ListItem>否</asp:ListItem>
                        </aspxform:XRadioButtonList>
                    </td>
                    <td class="tsbottomlabel">
                    </td>
                    <td class="tsbottomtext">
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <div align="center" class="scrollDiv" style="HEIGHT: 600px; MARGIN: 0px auto" solid? 
1px #93a1ae BORDER-LEFT: both; CLEAR: center; TEXT-ALIGN: solid; BORDER-BOTTOM: 
scroll; OVERFLOW-X: 1200px; WIDTH: BORDER-RIGHT: auto; HEIGHT: ;BORDER-TOP:>
            <table width="4100" align="center" class="scrolltable" id="tablePrdt" border="0" cellspacing="0" cellpadding="3" runat="server" dynamicarea="2,1" menudock="Left">
                <tbody>
                    <tr>
                        <th height="29" align="left" class="title1" style="BORDER-TOP: medium none" colspan="38">
                            <asp:Label id="XLabel38" runat="server" text="产品明细" textalign="left" value valuetodisplaytext></asp:Label>
                            <aspxform:XCustomBrowserButton id="XCustomBrowserButton1" runat="server" Text="添加SAP-SO行项目" XClass="Oimec.Dialogs.AddLineItemToPurchaseAppButton" Width="129px" DataMap="Manufacturer->DF_MM_NewPurchaseApp_Detail.Manufacturer;MaterialType->DF_MM_NewPurchaseApp_Detail.MaterialType;ProductModel->DF_MM_NewPurchaseApp_Detail.ProductModel;PruchaseNumber->DF_MM_NewPurchaseApp_Detail.PruchaseNumber;SalesOpportunitiesRowNum->DF_MM_NewPurchaseApp_Detail.SalesOpportunitiesRowNum;Plant->DF_MM_NewPurchaseApp_Detail.Plant;Storage->DF_MM_NewPurchaseApp_Detail.Storage;PRRowNum->DF_MM_NewPurchaseApp_Detail.PRRowNum;PR->DF_MM_NewPurchaseApp_Detail.PR;SO->DF_MM_NewPurchaseApp_Detail.SO;SoRowNum->DF_MM_NewPurchaseApp_Detail.SoRowNum;ContractDeliveryDate->DF_MM_NewPurchaseApp_Detail.ContractDeliveryDateTr;IsAdd->DF_MM_NewPurchaseApp_Detail.IsAdd;PlantName->PlantName;MaterialNo->DF_MM_NewPurchaseApp_Detail.ProductSAPID;ManufacturerID->DF_MM_NewPurchaseApp_Detail.ManufacturerID;prdtName->DF_MM_NewPurchaseApp_Detail.ProductName" Height="25px" Filter="Path->SalesOpportunitiesFormNo" AppendMode="Append" UseSubmitBehavior="False"></aspxform:XCustomBrowserButton>
                            <%--<aspxform:XButton id="XButton1" runat="server" Text="批量删除" OnClientClick="DeleteBlocks();"></aspxform:XButton>--%>
                        </th>
                    </tr>
                    <tr>
                        <th width="100" align="center" class="tds">
                            <asp:Label id="Label29" runat="server" text="发起采购处理" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="80" align="center" class="tds">
                            <asp:Label id="Label28" runat="server" text="拒绝" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="50" height="60" class="tds">
                            <asp:Label id="XLabel39" runat="server" text="序号" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="103" class="tds">
                            <asp:Label id="XLabel40" runat="server" text="业务分类" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="116" class="tds">
                            <asp:Label id="XLabel41" runat="server" text="技术服务协议" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="101" class="tds">
                            <asp:Label id="XLabel42" runat="server" text="物料类型" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="111" class="tds">
                            <asp:Label id="XLabel43" runat="server" text="产品型号" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="112" class="tds">
                            <asp:Label id="XLabel44" runat="server" text="厂商名称" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="114" class="tds">
                            <asp:Label id="XLabel45" runat="server" text="采购模式" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="114" class="tds">
                            <asp:Label id="XLabel72" runat="server" text="供应商直发" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="114" class="tds">
                            <asp:Label id="XLabel73" runat="server" text="直发条件" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="114" class="tds">
                            <asp:Label id="XLabel46" runat="server" text="采购数量" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="118" class="tds">
                            <asp:Label id="Label34" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel47" runat="server" text="采购币种" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="110" class="tds">
                            <asp:Label id="Label49" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel48" runat="server" text="含税采购单价（采购币种）" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="127" class="tds">
                            <asp:Label id="XLabel49" runat="server" text="采购折扣%" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="96" class="tds">
                            <asp:Label id="XLabel50" runat="server" text="含税采购总价（采购币种）" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="112" class="tds">
                            <asp:Label id="Label52" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel51" runat="server" text="预计供应商货期" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="130" class="tds">
                            <asp:Label id="XLabel52" runat="server" text="采购发票税点" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="111" class="tds" hidden="hidden">
                            <asp:Label id="XLabel53" runat="server" text="销售机会供应商" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="100" class="tds">
                            <asp:Label id="Label53" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel54" runat="server" text="实际供应商" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th class="tds" style="WIDTH: 200px">
                            <asp:Label id="Label65" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label60" runat="server" text="实际供应商名称" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="100" class="tds">
                            <asp:Label id="Label105" runat="server" text="厂商直/分销" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="200" class="tds">
                            <asp:Label id="XLabel55" runat="server" text="采购付款方式" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="109" class="tds">
                            <asp:Label id="XLabel56" runat="server" text="国际运保费率" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="98" class="tds">
                            <asp:Label id="XLabel57" runat="server" text="国际运保费（采购币种）" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="99" class="tds">
                            <asp:Label id="XLabel58" runat="server" text="国际运保费（人民币）" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="105" class="tds">
                            <asp:Label id="XLabel59" runat="server" text="报关杂费（人民币）" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="122" class="tds">
                            <asp:Label id="XLabel60" runat="server" text="关税税率" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="82" class="tds">
                            <asp:Label id="Label27" runat="server" text="加征关税%" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="122" class="tds">
                            <asp:Label id="Label72" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel61" runat="server" text="供应商联系人" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="102" class="tds">
                            <asp:Label id="Label73" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="XLabel62" runat="server" text="供应商电话" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="131" class="tds">
                            <asp:Label id="XLabel63" runat="server" text="客户保修期" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="219" class="tds">
                            <asp:Label id="XLabel64" runat="server" text="报供应商最终客户名称" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="102" class="tds">
                            <asp:Label id="Label33" runat="server" text="工厂" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
                        <th width="102" class="tds">
                            <asp:Label id="Label57" runat="server" text="客户纸面合同交货日期" value valuetodisplaytext font-bold="False"></asp:Label>
                        </th>
						  <th width="100" class="tds">
                                <asp:Label id="Label199" runat="server" text="含标准服务" value valuetodisplaytext font-bold="False"></asp:Label></th>
                            <th width="100" class="tds">
                                <asp:Label id="Label200" runat="server" text="标准服务年限" value valuetodisplaytext font-bold="False"></asp:Label></th>
                             <th width="100" class="tds">
                                <asp:Label id="Label201" runat="server" text="标准服务%" value valuetodisplaytext font-bold="False"></asp:Label></th>
                    
                    </tr>
                    <tr>
                        <td class="tds1" style="TEXT-ALIGN: center">
                            <aspxform:XCheckBox id="NewPurchaseAppDetailXck" onclick="NewPurchaseAppDetailXcks(this)" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.NewPurchaseAppDetailXck" Width="30px" name="NewPurchaseAppDetailXck" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsDelete=='1'" CssClass="NewPurchaseAppDetailXck"></aspxform:XCheckBox>
                        </td>
                        <td class="tds1" style="TEXT-ALIGN: center">
                            <aspxform:XCheckBox id="IsDelete" onclick="IsDeletes(this)" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.IsDelete" Width="30px" name="IsDelete" CssClass="IsDelete"></aspxform:XCheckBox>
                            <aspxform:XTextBox id="IsDeleteChk" runat="server" XDataBind="IsDeleteChk" BorderWidth="1" BorderColor="Gainsboro" HiddenInput="true" Width="100%" Express="DF_MM_NewPurchaseApp_Detail.IsDelete" name="IsDeleteChk"></aspxform:XTextBox>
                        </td>
                        <td class="tds1" style="TEXT-ALIGN: center">
                            <aspxform:XGridLineNo id="XGridLineNo1" runat="server" BackColor="Transparent" XDataBind="DF_MM_NewPurchaseApp_Detail.LineNumber" BorderWidth="1" BorderColor="#DCDCDC" Width="20px" name="LineNumber" BorderStyle="None" TextAlign="Center">1</aspxform:XGridLineNo>
                            <aspxform:XTextBox id="SellingTotalvalueRMB" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.SellingTotalvalueRMB" BorderWidth="1" BorderColor="Gainsboro" HiddenInput="true" Width="100%"></aspxform:XTextBox>
                            <aspxform:XTextBox id="XTextBox3" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.IsAdd" BorderWidth="1" BorderColor="Gainsboro" HiddenInput="true" Width="100%" name="IsAdd"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <%--<aspxform:XTextBox id="BusinessClass" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.BusinessClass" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="BusinessClass" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=1"></aspxform:XTextBox>--%>
                            <aspxform:XDropDownList id="BusinessClass" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.BusinessClass" DisplayColumn="Name" ValueColumn="Name" XDataSource="TableName:V_DF_SA_SS_BusinessCategories;Filter:OrderBy:'OrderID';BufferType:RuntimeUpdate" name="BusinessClass" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=1" PromptText="--请选择--"></aspxform:XDropDownList>
                        </td>
                        <td class="tds1">
                            <%--<aspxform:XTextBox id="TSType" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.TSType" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="TSType" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=1"></aspxform:XTextBox>--%>
                            <aspxform:XDropDownList id="TSType" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.TSType" HiddenExpress="DF_MM_NewPurchaseApp_Detail.BusinessClass!='代理维修'&amp;&amp; DF_MM_NewPurchaseApp_Detail.BusinessClass!='代理延保'&amp;&amp; DF_MM_NewPurchaseApp_Detail.BusinessClass!='代理校准'" name="TSType" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=1" PromptText="--请选择--">
                                <asp:ListItem>泰克原厂服务</asp:ListItem>
                                <asp:ListItem>是德原厂服务</asp:ListItem>
                                <asp:ListItem>其他</asp:ListItem>
                            </aspxform:XDropDownList>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="MaterialType" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.MaterialType" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="MaterialType" DisableExpress="1"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="ProductModel" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.ProductModel" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Max="0" Min="0" Width="100%" name="ProductModel" DisableExpress="1" Value></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="Manufacturer" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.Manufacturer" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="Manufacturer" DisableExpress="1"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <%--<aspxform:XTextBox id="PurchasingPattern" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.PurchasingPattern" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="PurchasingPattern" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=1" TextAlign="Center"></aspxform:XTextBox>--%>
                            <aspxform:XDropDownList id="PurchasingPattern" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.PurchasingPattern" DisplayColumn="Name" ValueColumn="Name" XDataSource="TableName:V_DF_CRM_ProcurementModel;Filter:Name->'原厂采购'|like" name="PurchasingPattern" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=1" PromptText="--请选择--">
                                <asp:ListItem>未绑定</asp:ListItem>
                            </aspxform:XDropDownList>
                            <aspxform:XTextBox id="CustomerDesignatedSupplier" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.CustomerDesignatedSupplier" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="10px" name="CustomerDesignatedSupplier"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XRadioButtonList id="IsSupplierSend" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.IsSupplierSend" name="IsSupplierSend" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=1" RepeatDirection="Horizontal">
                                <asp:ListItem>非直发</asp:ListItem>
                                <asp:ListItem>直发</asp:ListItem>
                            </aspxform:XRadioButtonList>
                        </td>
                        <td class="tds1">
                            <%--<aspxform:XTextBox id="SupplierSendReason" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.SupplierSendReason" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="SupplierSendReason" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=1" TextAlign="Center"></aspxform:XTextBox>--%>
                            <aspxform:XDropDownList id="SupplierSendReason" style="WIDTH: 90%" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.SupplierSendReason" DisplayColumn="Name" ValueColumn="Name" HiddenExpress="DF_MM_NewPurchaseApp_Detail.IsSupplierSend!='直发'" Express="if(DF_MM_NewPurchaseApp_Detail.IsSupplierSend!='直发','',DF_MM_NewPurchaseApp_Detail.SupplierSendReason)" name="SupplierSendReason" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=1" PromptText="--请选择--" CssClass="SupplierSendReason">
                                <asp:ListItem>重量超过50KGS 体积超过1立方米</asp:ListItem>
                                <asp:ListItem>产品数量大于30件，且单个货物体积超过0.2立方米</asp:ListItem>
                                <asp:ListItem>特殊运输要求（易燃易爆产品、精密仪器、不适合转运产品）</asp:ListItem>
                                <asp:ListItem>无实物产品</asp:ListItem>
                                <asp:ListItem>客户货期紧急：要求3个工作日内交付</asp:ListItem>
                                <asp:ListItem>符合以上多种情况</asp:ListItem>
                            </aspxform:XDropDownList>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="PruchaseNumber" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.PruchaseNumber" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="PruchaseNumber" DisableExpress="1" TextAlign="Center" Format="type:number;.0"></aspxform:XTextBox>
                            <aspxform:XTextBox id="SalesNumber" runat="server" XDataBind="SalesNumber" BorderWidth="1" BorderColor="Gainsboro" HiddenInput="True" Width="100%" TextAlign="Center" Format="type:number;.0"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="varCurrency" runat="server" XDataBind="varCurrency" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="True" Width="10px" Express="if(DF_MM_NewPurchaseApp_Detail.PurchaseCurrency=='CNY','人民币','外币')" Height="20px"></aspxform:XTextBox>
                            <aspxform:XDropDownList id="PurchaseCurrency" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.PurchaseCurrency" DisplayColumn="Name" ValueColumn="Name" XDataSource="TableName:V_DF_SA_SS_PurchasingCurrency;Filter:BufferType:RuntimeUpdate" name="PurchaseCurrency" PromptText="--请选择--" onchange="getRMB()">
                                <asp:ListItem>未绑定</asp:ListItem>
                            </aspxform:XDropDownList>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="PurchasePrice" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.PurchasePrice" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="PurchasePrice" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="PurchaseDiscount" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.PurchaseDiscount" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Max="0" Min="0" Width="90px" name="PurchaseDiscount" TextAlign="Right" Value Format="type:number;.2"></aspxform:XTextBox>
                            %</td>
                        <td class="tds1">
                            <aspxform:XTextBox id="PurchaseTotalAmount" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.PurchaseTotalAmount" BorderWidth="1" BorderColor="Gainsboro" Width="100%" Express="javascript('CountPurchasePrices',DF_MM_NewPurchaseApp_Detail.PurchaseDiscount,DF_MM_NewPurchaseApp_Detail.PurchasePrice,DF_MM_NewPurchaseApp_Detail.PruchaseNumber)" name="PurchaseTotalAmount" DisableExpress="1" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="SupplierDelivery" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.SupplierDelivery" BorderWidth="1" BorderColor="Gainsboro" Width="40%" name="SupplierDelivery"></aspxform:XTextBox>
                            <aspxform:XDropDownList id="SupplierDeliveryDateUnit" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.SupplierDeliveryDateUnit" Width="50%" name="SupplierDeliveryDateUnit" PromptText="--请选择--">
                                <asp:ListItem>周</asp:ListItem>
                                <asp:ListItem>天</asp:ListItem>
                            </aspxform:XDropDownList>
                        </td>
                        <td class="tds1">
                            <aspxform:XDropDownList id="PurchaseInvoiceTaxPoint" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.PurchaseInvoiceTaxPoint" Width="100%" DisplayColumn="Name" ValueColumn="Name" XDataSource="TableName:V_DF_SA_SS_PurchaseInvoice" name="PurchaseInvoiceTaxPoint" PromptText="--请选择--">
                                <asp:ListItem Selected="True">未绑定</asp:ListItem>
                            </aspxform:XDropDownList>
                        </td>
                        <td class="tds1" hidden="hidden">
                            <%--销售机会供应商--%>
                            <aspxform:XTextBox id="InquirySupplier" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.InquirySupplier" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="InquirySupplier" DisableExpress="1"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="Supplier" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.Supplier" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Max="0" Min="0" Width="60px" name="Supplier" DisableExpress="1" Value></aspxform:XTextBox>
                            <aspxform:XDataBrowserButton id="XDataBrowserButton1" runat="server" Text="..." Width="25px" DataMap="Manufacturer->DF_MM_NewPurchaseApp_Detail.Supplier" XDataSource="TableName:DF_MM_Purchase_Manufacturer" UseSubmitBehavior="False" DisplayColumns="ItemID:序号,;Manufacturer:供应商名称," PopupWndHeight="-1" PopupWndWidth="-1"></aspxform:XDataBrowserButton>
                            &nbsp; 
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="SupplierSAPID" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.SupplierSAPID" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="100px" name="SupplierSAPID"></aspxform:XTextBox>
                            <aspxform:XTextBox id="SourcingPurchasing" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.SourcingPurchasing" BorderWidth="1px" BorderColor="Gainsboro" Width="170px" name="SourcingPurchasing"></aspxform:XTextBox>
                            <aspxform:XDataBrowserButton id="XDataBrowserButton2" runat="server" Text="..." XClass="YZSoft.Forms.Field.DataBrowserButton" Width="20px" DataMap="SupplierName->DF_MM_NewPurchaseApp_Detail.SourcingPurchasing;SupplierID->PartnerID;SupplierSAPID->DF_MM_NewPurchaseApp_Detail.SupplierSAPID" XDataSource="TableName:V_DF_Supplier_ZK;" UseSubmitBehavior="False" DisplayColumns="SupplierName:供应商名称;SupplierID:供应商ID;SupplierSAPID:供应商SAPID" PopupWndHeight="-1" PopupWndWidth="-1"></aspxform:XDataBrowserButton>
                            <aspxform:XTextBox id="XTextBox6" runat="server" XDataBind="varSupplierName" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="20px" DataMap="SupplierSAPID->DF_MM_NewPurchaseApp_Detail.SupplierSAPID" ValueToDisplayText="TableName:V_DF_Supplier_ZK;FilterColumn:SupplierName;DisplayColumn:SupplierName" Express="DF_MM_NewPurchaseApp_Detail.SourcingPurchasing" name="txtsupplier"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XDropDownList id="DirectDistribution" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.DirectDistribution" Width="100%" Express="if(DF_MM_NewPurchaseApp_Detail.SupplierSAPID!='1026806' &amp;&amp; DF_MM_NewPurchaseApp_Detail.SupplierSAPID!='1027639' &amp;&amp; DF_MM_NewPurchaseApp_Detail.SupplierSAPID!='1005975','',DF_MM_NewPurchaseApp_Detail.DirectDistribution)" name="DirectDistribution" DisableExpress="DF_MM_NewPurchaseApp_Detail.SupplierSAPID!='1026806' &amp;&amp; DF_MM_NewPurchaseApp_Detail.SupplierSAPID!='1027639' &amp;&amp; DF_MM_NewPurchaseApp_Detail.SupplierSAPID!='1005975'&amp;&amp; DF_MM_NewPurchaseApp_Detail.SupplierSAPID!=''" PromptText="--请选择--">
                                <asp:ListItem>直销</asp:ListItem>
                                <asp:ListItem>分销</asp:ListItem>
                            </aspxform:XDropDownList>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="PurchasePayType" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.PurchasePayType" BorderWidth="1" BorderColor="Gainsboro" Width="40%" name="PurchasePayType" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=1"></aspxform:XTextBox>
                            <asp:Label id="r" runat="server" text="供应商预付"></asp:Label>
                            <aspxform:XRadioButtonList id="IsAdvancePay" style="TEXT-ALIGN: right" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.IsAdvancePayForSupplier" Width="30px" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=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_NewPurchaseApp_Detail.InternationCIFRate" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Max="0" Min="0" Width="81px" name="InternationCIFRate" TextAlign="Right" Value Format="type:number;.2"></aspxform:XTextBox>
                            %</td>
                        <td class="tds1">
                            <aspxform:XTextBox id="InternationCIF" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.InternationCIF" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="InternationCIF" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="InternationCIFRMB" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.InternationCIFRMB" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="InternationCIFRMB" TextAlign="Right" Format="type:currency;pfx:￥;.2"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="CustomsFees" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.CustomsFees" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="CustomsFees" TextAlign="Right" Format="type:currency;pfx:￥;.2"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="TariffRate" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.TariffRate" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Max="0" Min="0" Width="60%" name="TariffRate" TextAlign="Right" Value Format="type:number;.2"></aspxform:XTextBox>
                            %</td>
                        <td class="tds1">
                            <aspxform:XTextBox id="IncreaseTariff" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.IncreaseTariff" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Max="0" Min="0" Width="60%" name="IncreaseTariff" TextAlign="Right" Value Format="type:number;.2"></aspxform:XTextBox>
                            %</td>
                        <td class="tds1">
                            <aspxform:XTextBox id="PartnerID" runat="server" XDataBind="PartnerID" BorderWidth="1" BorderColor="#DCDCDC" Width="80px" HiddenExpress="1"></aspxform:XTextBox>
                            <aspxform:XDropDownList id="XDropDownList27" runat="server" HiddenExpress="1" DataMap="ContactName->DF_MM_NewPurchaseApp_Detail.SupplierContact;ContactTel->DF_MM_NewPurchaseApp_Detail.SupplierTel" XDataSource="TableName:V_DF_MSupplier_Contact;Filter:CustomerID->PartnerID"></aspxform:XDropDownList>
                            <aspxform:XTextBox id="SupplierContact" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.SupplierContact" BorderWidth="1" BorderColor="Gainsboro" Width="80px" name="SupplierContact"></aspxform:XTextBox>
                            <aspxform:XDataBrowserButton id="browser" runat="server" Text="..." XClass="YZSoft.Forms.Field.DataBrowserButton" Width="20px" DataMap="ContactName->DF_MM_NewPurchaseApp_Detail.SupplierContact;ContactTel->DF_MM_NewPurchaseApp_Detail.SupplierTel" XDataSource="TableName:V_DF_MSupplier_Contact;Filter:CustomerID->PartnerID" DisplayColumns="ContactName:联系人;ContactTel:联系人电话;"></aspxform:XDataBrowserButton>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="SupplierTel" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.SupplierTel" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="SupplierTel"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="WarrantyPeriod" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.WarrantyPeriod" BorderWidth="1" BorderColor="Gainsboro" Width="100%" name="WarrantyPeriod" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=1"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <p>
                                <aspxform:XTextBox id="CustomerName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.CustomerName" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Max="0" Min="0" Width="182px" ReadOnly="True" name="CustomerName" DisableExpress="DF_MM_NewPurchaseApp_Detail.IsAdd!=1" Value></aspxform:XTextBox>
                                <aspxform:XTextBox id="IID" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.IID" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Max="0" Min="0" Width="20px" HiddenExpress="1" DisableExpress="1" Height="20px" Value></aspxform:XTextBox>
                                <aspxform:XTextBox id="ItemID" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.ItemID" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="False" Max="0" Min="0" Width="21px" HiddenExpress="1" DisableExpress="1" Height="22px" Value></aspxform:XTextBox>
                                <aspxform:XDataBrowserButton id="XDataBrowserButton3" runat="server" Width="21px" DataMap="CustomerNameCH->DF_MM_NewPurchaseApp_Detail.CustomerName;CustomerSAPID->DF_MM_NewPurchaseApp_Detail.CustomerSAPID;IsFlag->DF_MM_NewPurchaseApp_Detail.IsFlag" XDataSource="TableName:V_DF_MasterData_Customer" DisplayColumns="CustomerID:客户编号;CustomerNameCH:客户名称;CustomerSAPID:SAPID;IsFlag:红旗客户;CusLeavel:客户等级"></aspxform:XDataBrowserButton>
                                <aspxform:XDropDownList id="XDropDownList2" runat="server" XDataBind="varResult" Width="20px" DisplayColumn="HandlerAccount" ValueColumn="HandlerAccount" HiddenExpress="1" DataMap="HandlerAccount->DF_MM_NewPurchaseApp_Detail.HandlerAccount" XDataSource="ProcedureName:PROC_DF_MM_PurchaserConfirm;Filter:@Currency->varCurrency,@BusinessClass->DF_MM_NewPurchaseApp_Detail.BusinessClass,@VendorName->DF_MM_NewPurchaseApp_Detail.Supplier,@BU->DF_MM_NewPurchaseApp_Info.BUID,@District->DF_MM_NewPurchaseApp_Info.Area,@CompanyCode->DF_MM_NewPurchaseApp_Info.BillingCompany,@IsEasyJet->DF_MM_NewPurchaseApp_Info.IsEasyJet" PrintOut="False"></aspxform:XDropDownList>
                                <aspxform:XTextBox id="XTextBox8" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.SupplierCustomerID" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="true" Max="0" Min="0" Width="21px" HiddenExpress="1" DisableExpress="1" Height="22px" Value></aspxform:XTextBox>
                                <aspxform:XTextBox id="IsFlage" name="IsFlage" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.IsFlage" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="true" Max="0" Min="0" Width="21px" HiddenExpress="1" Express='if(SUPPLIERCID=="","否","是")' DisableExpress="1" Height="22px" Value></aspxform:XTextBox>
                                <aspxform:XDropDownList id="XDropDownList3" runat="server" XDataBind="SUPPLIERCID" HiddenExpress="1" DisplayColumn="ItemId" ValueColumn="ItemId" XDataSource="TableName:DF_MasterData_RedFlagCustomer;Filter:CustomerCode->DF_MM_NewPurchaseApp_Detail.SupplierCustomerID,ManufacturerCode->DF_MM_NewPurchaseApp_Detail.ManufacturerID"></aspxform:XDropDownList>
                            </p>
                        </td>
                        <td class="tds1" hidden="hidden">
                            <aspxform:XTextBox id="PR" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.PR" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" Width="100%" name="PR" Height="20px" Value></aspxform:XTextBox>
                        </td>
                        <td class="tds1" hidden="hidden">
                            <aspxform:XTextBox id="PRRowNum" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.PRRowNum" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" Width="100%" name="PRRowNum" DisableExpress="1" Height="20px" Value></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="Plant" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.Plant" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="true" Max="0" Min="0" Width="100%" name="Plant" DisableExpress="1" Height="20px" Value></aspxform:XTextBox>
                            <aspxform:XTextBox id="PlantName" runat="server" XDataBind="PlantName" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" Width="100%" name="PlantName" DisableExpress="1" Height="20px"></aspxform:XTextBox>
                            <aspxform:XDropDownList id="Plants" runat="server" XDataBind="Plants" Width="100%" DisplayColumn="Name" ValueColumn="Value" HiddenExpress="1" DataMap="Name->PlantName" XDataSource='TableName:V_DF_PurchaseCompany;Filter:Type->"工厂",Value->DF_MM_NewPurchaseApp_Detail.Plant'></aspxform:XDropDownList>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="ContractDeliveryDateTr" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.ContractDeliveryDateTr" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" Width="100%" name="ContractDeliveryDateTr" DisableExpress="1" Height="20px" Value></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="HandlerAccount" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.HandlerAccount" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="true" Max="0" Min="0" Width="50px" name="HandlerAccount" DisableExpress="1" Height="20px" Value></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="HandlerAccountName" runat="server" XDataBind="HandlerAccountName" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="true" Max="0" Min="0" Width="50px" name="HandlerAccountName" DisableExpress="1" Height="20px" Value></aspxform:XTextBox>
                            <aspxform:XDropDownList id="XDropDownListHandlerAccountName" runat="server" XDataBind="XDropDownListHandlerAccountName" Width="20px" DisplayColumn="HandlerAccount" ValueColumn="HandlerAccount" HiddenExpress="1" DataMap="Name->HandlerAccountName;" XDataSource="TableName:V_DF_HR_BasicInfo;Filter:AttendanceKakaNO->DF_MM_NewPurchaseApp_Detail.HandlerAccount" PrintOut="False"></aspxform:XDropDownList>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="PurchaseRequisitionStatus" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.PurchaseRequisitionStatus" BorderWidth="1" BorderColor="Gainsboro" Width="100%" Express="javascript('GetXck',DF_MM_NewPurchaseApp_Detail.NewPurchaseAppDetailXck)" name="PurchaseRequisitionStatus"></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="IsFlag" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.IsFlag" BorderWidth="1px" BorderColor="Gainsboro" HiddenInput="True" Max="0" Min="0" Width="20px" name="IsFlag" Height="20px" Value></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="CustomerSAPID" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.CustomerSAPID" BorderWidth="1px" BorderColor="Gainsboro" Max="0" Min="0" Width="20px" name="CustomerSAPID" DisableExpress="1" Height="20px" Value></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="ProductSAPID" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.ProductSAPID" BorderWidth="1" BorderColor="#DCDCDC" Width="10px" HiddenExpress="1" name="ProductSAPID"></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="ProductName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.ProductName" BorderWidth="1" BorderColor="#DCDCDC" Width="40px" name="ProductName"></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="ManufacturerID" runat="server" XDataBind="DF_MM_NewPurchaseApp_Detail.ManufacturerID" BorderWidth="1" BorderColor="#DCDCDC" Width="40px" name="ManufacturerID"></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="SalesmanId" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Detail.SalesmanId" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText Express="ownerId" name="SalesmanId"></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="Salesman" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Detail.Salesman" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText Express="ownerName" name="Salesman"></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="PurchaseRequisitionNo" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Detail.PurchaseRequisitionNo" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText name="PurchaseRequisitionNo"></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="Storage" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Detail.Storage" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText name="Storage"></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="SO" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Detail.SO" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText name="SO"></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="SoRowNum" runat="server" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Detail.SoRowNum" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText name="SoRowNum"></aspxform:XTextBox>
                        </td>
                        <td hidden="hidden">
                            <aspxform:XTextBox id="SalesOpportunitiesRowNum" runat="server" Text="0" BackColor="#E6F1F8" XDataBind="DF_MM_NewPurchaseApp_Detail.SalesOpportunitiesRowNum" BorderWidth="1" BorderColor="#DCDCDC" HiddenInput="true" Width="70%" DisableBehavior="ReadOnly" ReadOnly="True" ValueToDisplayText name="SalesOpportunitiesRowNum"></aspxform:XTextBox>
                        </td>
                        <td class="tds1" hidden="hidden">
                            <aspxform:XTextBox id="status" runat="server" XDataBind="status" Width="60px" name="status"></aspxform:XTextBox>
                        </td>
						 <td class="tds1">
                              <aspxform:XDropDownList id="XDropDownList35" runat="server" HiddenExpress="1" Width="10px" DataMap="IncludingStandardService->DF_MM_NewPurchaseApp_Detail.IncludingStandardService;" XDataSource="ProcedureName:PROC_DF_CRM_PriceSystem;Filter:@ProductModel->DF_MM_NewPurchaseApp_Detail.ProductModel,@Currency->DF_MM_NewPurchaseApp_Detail.PurchaseCurrency,@PurchasingPattern->DF_MM_NewPurchaseApp_Detail.PurchasingPattern" ValueColumn="PDPurchasePriceRest" DisplayColumn="PDPurchasePriceRest">
                                    <asp:ListItem>未绑定</asp:ListItem>
                                </aspxform:XDropDownList>
                                 <aspxform:XTextBox XDataBind="IncludingStandardService" runat="server" HiddenExpress="1"></aspxform:XTextBox>
                                      <aspxform:XDropDownList ID="IncludingStandardService" name="IncludingStandardService" DisableExpress="1" XDataBind="DF_MM_NewPurchaseApp_Detail.IncludingStandardService" runat="server" PromptText="--请选择--">
                                            <asp:ListItem>是</asp:ListItem>
                                        <asp:ListItem>否</asp:ListItem>
                                      </aspxform:XDropDownList>
                                </td>
                                 <td class="tds1">
                                    
                                      <aspxform:XDropDownList DisableExpress="if((DF_MM_NewPurchaseApp_Detail.IsAdd=='1'&&DF_MM_NewPurchaseApp_Detail.IncludingStandardService=='是'),'','1')" ID="YearsService" XDataSource="ProcedureName:PROC_DF_CRM_PriceSystem_distinct;Filter:@ProductModel->DF_MM_NewPurchaseApp_Detail.ProductModel,@Manufacturers->DF_MM_NewPurchaseApp_Detail.Manufacturer,@status->DF_MM_NewPurchaseApp_Detail.IsAdd"       DisplayColumn="YearsService" ValueColumn="YearsService"  name="YearsService" XDataBind="DF_MM_NewPurchaseApp_Detail.YearsService" runat="server" PromptText="--请选择--">
                                           
                                      </aspxform:XDropDownList>
                                       <aspxform:XDropDownList ID="XDropDownList50"   runat="server" PromptText="" HiddenExpress="1" DataMap="Proportion->DF_MM_NewPurchaseApp_Detail.Proportion;" XDataSource="ProcedureName:PROC_DF_CRM_PriceSystem_Proportion;Filter:@ProductModel->DF_MM_NewPurchaseApp_Detail.ProductModel,@Manufacturers->DF_MM_NewPurchaseApp_Detail.Manufacturer,@YearsService->DF_MM_NewPurchaseApp_Detail.YearsService;"       DisplayColumn="Proportion" ValueColumn="Proportion" >
                                          <%--  <asp:ListItem>三年NI标准服务</asp:ListItem>
                                        <asp:ListItem>五年NI标准服务</asp:ListItem>--%>
                                      </aspxform:XDropDownList>
                                </td>
                         <td class="tds1">
                                       <aspxform:XTextBox id="ysProportion" runat="server" Width="70%" BorderColor="#DCDCDC" BorderWidth="1" XDataBind="DF_MM_NewPurchaseApp_Detail.Proportion" BackColor="#E6F1F8"   DisableExpress="1"  CssClass="Proportion" name="Proportion"></aspxform:XTextBox>%
                                </td>
                        <%--SoRowNum--%>
                    </tr>
                    <tr>
                        <td height="25">
                        </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="tds">
                            <asp:Label id="XLabel36" runat="server" text="合计" width="100%" value valuetodisplaytext></asp:Label></td>
                        <td class="tds1q">
                            <aspxform:XTextBox id="total" runat="server" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" Express="sum(DF_MM_NewPurchaseApp_Detail.PurchaseTotalAmount)" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="InternationCIFTotal" runat="server" BorderWidth="1" BorderColor="Gainsboro" Width="100%" Express="sum(DF_MM_NewPurchaseApp_Detail.InternationCIF)" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                        </td>
                        <td class="tds1">
                            <aspxform:XTextBox id="InternationCIFRMBTotal" runat="server" BorderWidth="1" BorderColor="Gainsboro" Width="100%" Express="sum(DF_MM_NewPurchaseApp_Detail.InternationCIFRMB)" TextAlign="Right" Format="type:currency;pfx:￥;.2"></aspxform:XTextBox>
                        </td>
                        <td class="tds1q">
                            <aspxform:XTextBox id="CustomsFeesTotal" runat="server" BorderWidth="1" BorderColor="Gainsboro" Width="100%" Express="sum(DF_MM_NewPurchaseApp_Detail.CustomsFees)" TextAlign="Right" Format="type:currency;pfx:￥;.2"></aspxform:XTextBox>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <br />
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="title1" colspan="4">
                        <asp:Label id="Label45" runat="server" text="附件"></asp:Label></td>
                    <aspxform:XTextBox id="ObjName" style="WIDTH: 70%" runat="server" XDataBind="ObjName" BorderWidth="1" BorderColor="#DCDCDC" HiddenExpress="1"></aspxform:XTextBox>
                </tr>
                <%--   <tr>
                    <td class="tsbottomlabel" style="WIDTH: 10%">
                        <asp:Label id="Label50" 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">
                        <asp:Label id="Label48" runat="server" text="上传其他销售附件"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="Enclosure" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.Enclosure" 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 class="title1" colspan="4">
                        <asp:Label id="Label50" runat="server" text="备注"></asp:Label></td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <asp:Label id="Label59" runat="server" text="备注"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XTextBox id="Remark" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.Remark" BorderWidth="1" BorderColor="#DCDCDC" width="100%" TextMode="MultiLine" Rows="5"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" id="DeliverysTable" style="DISPLAY: none" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td height="18" class="title1" colspan="4">
                        <asp:Label id="Label166" 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" text="国际运单收货英文公司名称" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsEnglishCompany" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.GoodsEnglishCompany" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" Value></aspxform:XTextBox>
                        </td>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label62" runat="server" text="收货公司英文地址" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsEnglishAddress" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.GoodsEnglishAddress" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" Value></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label63" runat="server" text="到货通知人姓名" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsNotifier" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.GoodsNotifier" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" Value></aspxform:XTextBox>
                        </td>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label158" runat="server" text="称谓" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XRadioButtonList id="GoodsNotifierSex" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.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" text="到货通知人座机" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsTel" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.GoodsTel" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" Value></aspxform:XTextBox>
                        </td>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label64" runat="server" text="到货通知人手机" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsPhone" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.GoodsPhone" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" text="收货人E-MAIL" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsEmail" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.GoodsEmail" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" text="收货公司的营业执照五证合一号" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsBusinessLicense" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.GoodsBusinessLicense" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" Value></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label32" runat="server" text="贸易条款" value valuetodisplaytext></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XDropDownList id="TradeTerms" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.TradeTerms" Width="60%" name="TradeTerms" 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" text="到货港" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsPortArrival" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.GoodsPortArrival" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" Value></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label70" runat="server" text="原产国" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsCountryOrigin" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.GoodsCountryOrigin" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" Value></aspxform:XTextBox>
                        </td>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label71" runat="server" text="发运港" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="GoodsPortDelivery" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.GoodsPortDelivery" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" Value></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label118" runat="server" text="信用证预计开出日期 或 发货前预付款预计付出日期" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XDateTimePicker id="ExpectedIssuingDate" style="WIDTH: 70%" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.ExpectedIssuingDate" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XDateTimePicker>
                        </td>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label58" runat="server" text="免表预计办好日期" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XDateTimePicker id="XDateTimePicker3" style="WIDTH: 70%" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.FreeDate" BorderWidth="1" BorderColor="#DCDCDC"></aspxform:XDateTimePicker>
                        </td>
                    </tr>
                    <tr>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label160" runat="server" text="用户免表办理人姓名" value valuetodisplaytext></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XTextBox id="UserExemptionName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.UserExemptionName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label161" runat="server" text="用户免表办理人电话" value valuetodisplaytext></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XTextBox id="UserExemptionPhone" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.UserExemptionPhone" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label162" runat="server" text="用户免表办理人邮箱" value valuetodisplaytext></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XTextBox id="UserExemptionEmail" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.UserExemptionEmail" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label163" runat="server" text="用户开证人姓名" value valuetodisplaytext></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XTextBox id="UserCardName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.UserCardName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label164" runat="server" text="用户开证人电话" value valuetodisplaytext></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XTextBox id="UserCardPhone" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.UserCardPhone" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="tsbottomlabel" style="WIDTH: 4%">
                            <asp:Label id="Label165" runat="server" text="用户开证人邮箱" value valuetodisplaytext></asp:Label></td>
                        <td height="22" class="tsbottomtext">
                            <aspxform:XTextBox id="UserCardEmail" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.UserCardEmail" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                </tbody>
            </tbody>
        </table>
        <table width="1200" align="center" class="table" id="DeliverysTables" style="DISPLAY: none" border="0" cellspacing="0" cellpadding="0" runat="server">
            <tbody>
                <tr>
                    <td height="18" class="title1" colspan="4">
                        <asp:Label id="Label30" runat="server" text="人民币采购供应商直发客户信息" value valuetodisplaytext></asp:Label>&nbsp; 
                    </td>
                </tr>
                <tbody id="DeliverysTbodys">
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label74" runat="server" text="收货公司名称" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="CustomerReceivingId" runat="server" XDataBind="CustomerReceivingId" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" HiddenExpress="1" Value></aspxform:XTextBox>
                            <aspxform:XTextBox id="CustomerReceivingName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.CustomerReceivingName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" Express="STPName" Value></aspxform:XTextBox>
                            <aspxform:XCustomBrowserButton id="XCustomBrowserButton6" runat="server" Text="查询" XClass="Oimec.Dialogs.SelCustomerButton" Width="35px" DataMap="" Height="25px"></aspxform:XCustomBrowserButton>
                        </td>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label76" runat="server" text="联系人" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="CustomerReceivingContacts" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.CustomerReceivingContacts" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" Value></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label99" runat="server" text="收货详细地址" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="CustomerReceivingAdress" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.CustomerReceivingAdress" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" Value></aspxform:XTextBox>
                        </td>
                        <td class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label100" runat="server" text="邮编" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%" colspan="3">
                            <aspxform:XTextBox id="CustomerReceivingZipCode" onkeyup="" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.CustomerReceivingZipCode" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" 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" text="联系人座机" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="CustomerReceivingLandline" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.CustomerReceivingLandline" BorderWidth="1" BorderColor="#DCDCDC" Width="60%" CssClass="CustomerReceivingLandline" Value></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" text="联系人手机" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="CustomerReceivingPhone" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.CustomerReceivingPhone" BorderWidth="1" BorderColor="#DCDCDC" Width="60%" Value></aspxform:XTextBox>
                            <asp:Label id="CustomerReceivingPhoneLabel" style="DISPLAY: none" runat="server" text="手机">联系人手机格式不正确</asp:Label></td>
                    </tr>
                    <tr>
                        <td height="22" class="ts" style="WIDTH: 10%">
                            <asp:Label id="Label187" runat="server" text="Email" value valuetodisplaytext></asp:Label></td>
                        <td class="ts1" style="WIDTH: 35%">
                            <aspxform:XTextBox id="CustomerReceivingEmail" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.CustomerReceivingEmail" BorderWidth="1" BorderColor="#DCDCDC" Width="60%" Value></aspxform:XTextBox>
                        </td>
                        <td class="ts" style="WIDTH: 10%">
                        </td>
                        <td class="ts1" style="WIDTH: 35%">
                        </td>
                    </tr>
                </tbody>
            </tbody>
        </table>
        <br id="PurchaseRMBbr" style="DISPLAY: none" />
        <br id="PurchaseWBbr" style="DISPLAY: none" />
        <table width="1200" align="center" class="table" id="PurchaseTable" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="1200" class="title1" colspan="4">
                        <asp:Label id="Label186" runat="server" text="采购信息" value valuetodisplaytext></asp:Label></td>
                </tr>
                <tbody id="PurchaseTbody">
                    <tr>
                        <td class="title1" colspan="4">
                            <asp:Label id="Label104" runat="server" text="厂商订货下单要求信息" value valuetodisplaytext font-size="12px"></asp:Label></td>
                    </tr>
                    <tr>
                        <td class="ts" style="WIDTH: 1%">
                            <asp:Label id="Label103" runat="server" text="备注"></asp:Label></td>
                        <td class="tsbottomtext" colspan="3">
                            <aspxform:XTextBox id="ManufacturerRemarks" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.ManufacturerRemarks" BorderWidth="1" BorderColor="#DCDCDC" Width="100%" TextMode="MultiLine" Rows="5"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="kts">
                        <td height="18" class="title1" colspan="4">
                            <asp:Label id="Label80" runat="server" text="是德" value valuetodisplaytext font-size="12px"></asp:Label>&nbsp; 
                        </td>
                    </tr>
                    <tr name="kts">
                        <td class="ts">
                            <asp:Label id="Label120" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label81" runat="server" text="最终客户中文全称"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="KeysightTechnologiesChineseName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.KeysightTechnologiesChineseName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%" HiddenExpress="javascript('OrderToManufactureShow',DF_MM_NewPurchaseApp_Detail.PurchasingPattern,DF_MM_NewPurchaseApp_Detail.PurchaseCurrency,DF_MM_NewPurchaseApp_Detail.SupplierSAPID,DF_MM_NewPurchaseApp_Detail.DirectDistribution,DF_MM_NewPurchaseApp_Detail.CustomerName,DF_MM_NewPurchaseApp_Detail.BusinessClass)"></aspxform:XTextBox>
                            <%--<aspxform:XTextBox id="XTextBox6" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.KeysightTechnologiesChineseName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>--%></td>
                        <td class="ts">
                            <asp:Label id="Label121" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label82" runat="server" text="最终客户英文全称"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="KeysightTechnologiesEnglishName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.KeysightTechnologiesEnglishName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="kts">
                        <td class="ts">
                            <asp:Label id="Label122" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label83" runat="server" text="中文地址"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="KeysightTechnologiesChineseAdress" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.KeysightTechnologiesChineseAdress" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="ts">
                            <asp:Label id="Label124" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label119" runat="server" text="英文地址"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="KeysightTechnologiesEnglishAdress" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.KeysightTechnologiesEnglishAdress" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr hidden="hidden" name="kts">
                        <td class="ts">
                            <asp:Label id="Label125" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label84" runat="server" text="确认"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XCheckBox id="KeysightTechnologiesConfirm" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.KeysightTechnologiesConfirm"></aspxform:XCheckBox>
                        </td>
                        <td class="ts">
                        </td>
                        <td class="ts1">
                        </td>
                    </tr>
                    <tr name="kts_fx">
                        <td class="ts">
                            <asp:Label id="Label151" runat="server" text="上传附件"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XAttachments id="XAttachments3" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.KYSAttachment1" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XAttachments>
                        </td>
                        <td class="ts">
                            <asp:Label id="Label169" runat="server" text="上传附件说明"></asp:Label></td>
                        <td class="tsbottomtext">
                            <asp:Label id="Label85" runat="server" text="教育折扣订单：需要提供给客户的报价单、教育证明" forecolor="Blue"></asp:Label>
                            <br />
                            <asp:Label id="Label168" runat="server" text="特折订单：是德工程师审批邮件、特折申请表" forecolor="Blue"></asp:Label></td>
                    </tr>
                    <tr name="kts_z">
                        <td class="ts">
                            <aspxform:XLabel id="XLabel219" runat="server" Text="*" BackColor="#d5dade" HiddenExpress="DF_MM_NewPurchaseApp_Detail.DirectDistribution!='直销' " ForeColor="Red"></aspxform:XLabel>
                            <asp:Label id="Label86" runat="server" text="厂商销售人员"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="KeysightTechnologiesVendorSalesperson" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.KeysightTechnologiesVendorSalesperson" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="ts">
                            <asp:Label id="Label87" runat="server" text="厂商销售人员电话"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="KeysightTechnologiesEnglishTel" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.KeysightTechnologiesEnglishTel" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="kts_z">
                        <td class="ts">
                            <asp:Label id="Label88" runat="server" text="厂商销售人员邮箱"></asp:Label></td>
                        <td class="ts1" colspan="3">
                            <aspxform:XTextBox id="KeysightTechnologiesEnglishEmail" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.KeysightTechnologiesEnglishEmail" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="kts_z">
                        <td class="ts">
                            <asp:Label id="Label123" runat="server" text="上传附件"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XAttachments id="KYSAttachment1" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.KYSAttachment2" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XAttachments>
                        </td>
                        <td class="ts">
                            <asp:Label id="Label174" runat="server" text="上传附件说明"></asp:Label></td>
                        <td class="ts1">
                            <asp:Label id="Label175" runat="server" text="三方盖章表" forecolor="Blue"></asp:Label></td>
                    </tr>
                    <tr name="TEKFLUKETitle">
                        <td height="18" class="title1" colspan="4">
                            <asp:Label id="Label89" runat="server" text="TEK&amp;FLUKE" value valuetodisplaytext font-size="12px"></asp:Label>&nbsp; 
                        </td>
                    </tr>
                    <tr name="TEKFLUKETitle">
                        <td class="tsbottomlabel">
                            <asp:Label id="Label126" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label90" runat="server" text="厂商销售人员"></asp:Label></td>
                        <td class="tsbottomtext">
                            <aspxform:XTextBox id="TEKFlukeSalesman" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.TEKFlukeSalesman" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="tsbottomlabel">
                        </td>
                        <td class="tsbottomtext">
                        </td>
                    </tr>
                    <tr name="TEKFLUKE">
                        <td class="ts" name="TEKFLUKE">
                            <asp:Label id="Label91" runat="server" text="最终客户中文全称"></asp:Label></td>
                        <td class="ts1" colspan="3" name="TEKFLUKE">
                            <aspxform:XTextBox id="TEKChineseName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.TEKChineseName" BorderWidth="1" BorderColor="#DCDCDC" Width="50%"></aspxform:XTextBox>
                            <aspxform:XCheckBox id="TEKConfirm" runat="server" Text="确认" XDataBind="DF_MM_NewPurchaseApp_Info.TEKConfirm" Width="20%" HiddenExpress="1"></aspxform:XCheckBox>
                        </td>
                    </tr>
                    <tr name="TEKFLUKEWB">
                        <td class="ts">
                            <asp:Label id="Label92" runat="server" text="免表预计办好日期"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XDateTimePicker id="TEKFlukeExpectedDateExemption" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.TEKFlukeExpectedDateExemption" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XDateTimePicker>
                        </td>
                        <td class="ts">
                            <asp:Label id="Label93" runat="server" text="客户需求货期"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XDateTimePicker id="TEKFlukeDemandShipment" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.TEKFlukeDemandShipment" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XDateTimePicker>
                            <aspxform:XCheckBox id="TEKWBConfirm" runat="server" Text="确认" XDataBind="DF_MM_NewPurchaseApp_Info.TEKWBConfirm" Width="20%" HiddenExpress="1"></aspxform:XCheckBox>
                        </td>
                    </tr>
                    <tr name="TEKFLUKE">
                        <td class="ts">
                            <asp:Label id="Label176" runat="server" text="上传附件"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XAttachments id="XAttachments4" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.TEKAttachment" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XAttachments>
                        </td>
                        <td class="ts" name="TEKFLUKE">
                            <asp:Label id="Label177" runat="server" text="上传附件说明"></asp:Label></td>
                        <td class="ts1" name="TEKFLUKE">
                            <asp:Label id="Label178" runat="server" text="东方中科与学校合同（要与报备相同）" forecolor="Blue"></asp:Label></td>
                    </tr>
                    <tr hiddenexpress="1">
                        <td class="ts">
                            <asp:Label id="Label94" runat="server" text="说明"></asp:Label></td>
                        <td class="ts1" colspan="3">
                            <aspxform:XTextBox id="TEKFlukeExplain" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.TEKFlukeExplain" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="BK">
                        <td height="18" class="title1" colspan="4">
                            <asp:Label id="Label95" runat="server" text="B&amp;K" value valuetodisplaytext font-size="12px"></asp:Label>&nbsp; 
                        </td>
                    </tr>
                    <tr name="BK">
                        <td class="ts">
                            <asp:Label id="Label127" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label97" runat="server" text="最终客户中文全称"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="BKChineseName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.BKChineseName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="ts">
                            <asp:Label id="Label128" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label98" runat="server" text="最终客户英文全称"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="BKEnglishName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.BKEnglishName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="BK">
                        <td class="ts">
                            <asp:Label id="Label129" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label101" runat="server" text="客户联系人"></asp:Label></td>
                        <td class="ts1" colspan="3">
                            <aspxform:XTextBox id="BKContacts" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.BKContacts" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="AMTEK">
                        <td height="18" class="title1" colspan="4">
                            <asp:Label id="Label131" runat="server" text="AMTEK" value valuetodisplaytext font-size="12px"></asp:Label>&nbsp; 
                        </td>
                    </tr>
                    <tr name="AMTEK">
                        <td class="ts">
                            <asp:Label id="Label130" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label132" runat="server" text="最终客户中文全称"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="AMTEKChineseName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.AMTEKChineseName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="ts">
                            <asp:Label id="Label152" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label133" runat="server" text="最终客户英文全称"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="AMTEKEnglishName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.AMTEKEnglishName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="AMTEK">
                        <td class="ts">
                            <asp:Label id="Label153" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label135" runat="server" text="客户联系人"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="AMTEKContacts" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.AMTEKContacts" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="ts">
                            <asp:Label id="Label154" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label136" runat="server" text="客户电话"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="AMTEKTel" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.AMTEKTel" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="AMTEK">
                        <td class="ts">
                            <asp:Label id="Label155" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label134" runat="server" text="地址"></asp:Label></td>
                        <td class="ts1" colspan="3">
                            <aspxform:XTextBox id="AMTEKAdress" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.AMTEKAdress" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="NF">
                        <td height="18" class="title1" colspan="4">
                            <asp:Label id="Label182" runat="server" text="NF" value valuetodisplaytext font-size="12px"></asp:Label>&nbsp; 
                        </td>
                    </tr>
                    <tr name="NF">
                        <td class="ts">
                            <asp:Label id="Label156" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label179" runat="server" text="上传附件"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XAttachments id="XAttachments5" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.NFAttachment" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XAttachments>
                        </td>
                        <td class="ts">
                            <asp:Label id="Label180" runat="server" text="上传附件说明"></asp:Label></td>
                        <td class="ts1">
                            <asp:Label id="Label181" runat="server" text="需要提供最终客户信息表（NF最终用户申明）" forecolor="Blue"></asp:Label></td>
                    </tr>
                    <tr name="HIOKI">
                        <td height="18" class="title1" colspan="4">
                            <asp:Label id="Label137" runat="server" text="HIOKI 日置" value valuetodisplaytext font-size="12px"></asp:Label>&nbsp; 
                        </td>
                    </tr>
                    <tr name="HIOKI">
                        <td class="ts">
                            <asp:Label id="Label170" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label138" runat="server" text="最终客户中文全称"></asp:Label></td>
                        <td class="ts1" colspan="3">
                            <aspxform:XTextBox id="HIOKIChineseName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.HIOKIChineseName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="HIOKI">
                        <td class="ts">
                            <asp:Label id="Label171" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label140" runat="server" text="客户联系人"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="HIOKIContacts" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.HIOKIContacts" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="ts">
                            <asp:Label id="Label172" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label141" runat="server" text="客户电话"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="HIOKITel" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.HIOKITel" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="HIOKI_fx">
                        <td class="ts">
                            <aspxform:XLabel id="XLabel7" runat="server" Text="*" BackColor="#d5dade" HiddenExpress="DF_MM_NewPurchaseApp_Detail.DirectDistribution!='分销' " ForeColor="Red"></aspxform:XLabel>
                            <asp:Label id="Label142" runat="server" text="二级代理商名称"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="HIOKIAgentName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.HIOKIAgentName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="ts">
                            <aspxform:XLabel id="XLabel8" runat="server" Text="*" BackColor="#d5dade" HiddenExpress="DF_MM_NewPurchaseApp_Detail.DirectDistribution!='分销' " ForeColor="Red"></aspxform:XLabel>
                            <asp:Label id="Label139" runat="server" text="代理商联系人"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="HIOKIAgentContacts" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.HIOKIAgentContacts" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="HIOKI_fx">
                        <td class="ts">
                            <aspxform:XLabel id="XLabel9" runat="server" Text="*" BackColor="#d5dade" HiddenExpress="DF_MM_NewPurchaseApp_Detail.DirectDistribution!='分销' " ForeColor="Red"></aspxform:XLabel>
                            <asp:Label id="Label143" runat="server" text="代理商电话"></asp:Label></td>
                        <td class="ts1" colspan="3">
                            <aspxform:XTextBox id="HIOKIAgentTel" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.HIOKIAgentTel" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="JS">
                        <td height="18" class="title1" colspan="4">
                            <asp:Label id="Label144" runat="server" text="菊水" value valuetodisplaytext font-size="12px"></asp:Label>&nbsp; 
                        </td>
                    </tr>
                    <tr name="JS">
                        <td class="ts">
                            <asp:Label id="Label157" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label145" runat="server" text="最终客户中文全称"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="ChrysanthemumChineseName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.ChrysanthemumChineseName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="ts">
                            <asp:Label id="Label102" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label146" runat="server" text="厂商销售人员名"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="ChrysanthemumSalesman" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.ChrysanthemumSalesman" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="DH">
                        <td height="18" class="title1" colspan="4">
                            <asp:Label id="Label147" runat="server" text="大华" value valuetodisplaytext font-size="12px"></asp:Label>&nbsp; 
                        </td>
                    </tr>
                    <tr name="DH">
                        <td class="ts">
                            <asp:Label id="Label159" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label148" runat="server" text="厂商报备单号"></asp:Label></td>
                        <td class="ts1" colspan="3">
                            <aspxform:XTextBox id="DahuaNewspaperNumber" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.DahuaNewspaperNumber" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                    </tr>
                    <tr name="ADKS">
                        <td height="18" class="title1" colspan="4">
                            <asp:Label id="Label149" runat="server" text="艾德克斯" value valuetodisplaytext font-size="12px"></asp:Label>&nbsp; 
                        </td>
                    </tr>
                    <tr name="ADKS">
                        <td class="ts">
                            <asp:Label id="Label167" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label150" runat="server" text="最终客户中文全称"></asp:Label></td>
                        <td class="ts1" colspan="3">
                            <aspxform:XTextBox id="EdKorsChineceName" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.EdKorsChineceName" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XTextBox>
                        </td>
                        <td class="ts" hiddenexpress="1">
                            <asp:Label id="Label173" runat="server" text="*" forecolor="Red"></asp:Label><asp:Label id="Label183" runat="server" text="确认"></asp:Label></td>
                        <td class="ts1" style="TEXT-ALIGN: left" hiddenexpress="1">
                            <aspxform:XCheckBox id="EdKorsConfirm" style="MARGIN-RIGHT: 135px" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.EdKorsConfirm" name="EdKorsConfirm"></aspxform:XCheckBox>
                        </td>
                    </tr>
					 <tr name="NI">
                        <td height="18" class="title1" colspan="4">
                            <asp:Label id="Label195" runat="server" text="NI恩艾" value valuetodisplaytext font-size="12px"></asp:Label>&nbsp; 
                        </td>
                    </tr>
                    <tr name="NI">
                         <td class="ts">
                            <asp:Label id="Label196" runat="server" text="最终客户中文全称"></asp:Label></td>
                          <td class="ts1" colspan="3">
                               <aspxform:XTextBox  runat="server" ID="NICustomerSAPID"  XDataBind="NICustomerSAPID" HiddenExpress="1"></aspxform:XTextBox>
                              <aspxform:XTextBox  runat="server" ID="NICustomerSAPName" XDataBind="NICustomerSAPName"  HiddenExpress="1"></aspxform:XTextBox>
                               <aspxform:XTextBox  runat="server" ID="NICustomerName" XDataBind="DF_MM_NewPurchaseApp_Info.NICustomerName" Width="70%" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XTextBox>
                                
                               </td>
                     </tr>
                      <tr name="NI">
                        <td height="18" class="ts" >
                            <asp:Label id="Label197" runat="server" text="最终客户联系人" value valuetodisplaytext font-size="12px"></asp:Label>&nbsp; 
                        </td>
                           <td class="ts1">
                                <aspxform:XTextBox  runat="server" ID="NICustomerContact" XDataBind="DF_MM_NewPurchaseApp_Info.NICustomerContact" Width="70%" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XTextBox>
                           </td>
                            <td height="18" class="ts">
                            <asp:Label id="Label198" runat="server" text="联系人邮箱" value valuetodisplaytext font-size="12px"></asp:Label>&nbsp; 
                        </td>
                           <td class="ts1">
                                <aspxform:XTextBox  runat="server" ID="NICustomerContactEmail" XDataBind="DF_MM_NewPurchaseApp_Info.NICustomerContactEmail" Width="70%" BorderColor="#DCDCDC" BorderWidth="1"></aspxform:XTextBox>
                           </td>
                    </tr>
                </tbody>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" id="MEURTable" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td width="1200" class="title1" colspan="4">
                        <asp:Label id="Label1861" runat="server" text="MEU/MEUR客户分类" value valuetodisplaytext></asp:Label></td>
                </tr>
                <tbody id="PurchaseTbody">
                    <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="DF_MM_NewPurchaseApp_Info.MEUR" Width="70%" 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="ts" style="WIDTH: 35%">
                            <aspxform:XAttachments id="MEURAttachments" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.MEURAttachments" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XAttachments>
                        </td>
                    </tr>
                    <tr>
                        <td class="ts">
                            <asp:Label id="Label189" runat="server" text="备注"></asp:Label></td>
                        <td class="ts1">
                            <aspxform:XTextBox id="MEURemarks" style="BORDER-BOTTOM: #e4e5e7 1px solid" runat="server" XDataBind="DF_MM_NewPurchaseApp_Info.MEURemarks" Width="100%" name="MEURemarks" TextMode="MultiLine" CssClass="MEURemarks" Rows="2"></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="DF_MM_NewPurchaseApp_Info.MEURJudgingMaterials" BorderWidth="1" BorderColor="#DCDCDC" Width="70%"></aspxform:XAttachments>
                        </td>
                    </tr>
                </tbody>
            </tbody>
        </table>
    </form>
</body>
</html>
