<%@ 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 TaskID = Request.QueryString["taskID"];
            string formNo = Request.QueryString["formNo"];
            this.XTextBox2.Text = formNo;// 15548 15068
            this.XTextBox3.Text = TaskID;
            string formstate = Request.QueryString["formstate"];
            this.XTextBox16.Text = formstate;
        }
    }

</script>
<html xmlns:xform="xmlns:xform">
<head runat="server">
    <link href="/Oimec/Styles/css/StyleSheet.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
    <title>BPM Form</title>
    <style>
        BODY {
            FONT-SIZE: 12px;
            FONT-FAMILY: verdana;
        }

        TABLE {
            border-collapse: collapse;
            FONT-SIZE: 12px;
            FONT-FAMILY: verdana;
        }

        P {
            PADDING-RIGHT: 0px;
            PADDING-LEFT: 0px;
            PADDING-BOTTOM: 0px;
            MARGIN: 0px;
            PADDING-TOP: 0px;
            FONT-SIZE: 12px;
            FONT-FAMILY: verdana;
        }

        TD {
            PADDING-RIGHT: 0px;
            PADDING-LEFT: 2px;
            PADDING-BOTTOM: 0px;
        }

            TD.NoPadding {
                PADDING-RIGHT: 0px;
                PADDING-LEFT: 0px;
                PADDING-BOTTOM: 0px;
                PADDING-TOP: 0px;
            }

        INPUT {
            HEIGHT: 20px;
        }

            INPUT.UL {
                BORDER-RIGHT: medium none;
                BORDER-TOP: medium none;
                BORDER-LEFT: medium none;
                BORDER-BOTTOM: #33ff33 1px solid;
            }

        TEXTAREA {
            FONT-SIZE: 12px;
        }

        .yz-inp-cnt {
            display: inline;
        }
    </style>

    <script type="text/javascript">

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

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

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

        }

        function AjaxParm(url, async, parm, successfun, failfun) {

            YZSoft.Ajax.request({
                method: 'POST',
                async: async,
                url: url,
                params: parm,
                success: successfun,
                failure: failfun
            });
        }

        Ext.onReady(function () {
            var state = getXValue("XTextBox16");    //操作类型
            if (state == "New") {
                GetSoInfo();
            }
        });

        function GetSoInfo() {
            //表单号
            var formNo = getXValue("XTextBox2");

            var parm = { method: 'GetSoInfoByFormNo', formNo: formNo };

            AjaxParm(YZSoft.$url('Oimec/ApiServices/SalesAPIHandler.ashx'), false, parm, function (action) {
                //alert("123");
                var result = action.result;
                if (result.Code == 0)
                {
                    var res = result.Value;

                    setXValue("XTextBox10", res.VoucherNo);     //SAP-SO赋值
                    setXValue("XTextBox7", res.ContractNo);     //销售合同编号
                    var data = res.Items;
                    //alert(data);
                    var rv = new Array();
                    if (data.length > 0) {
                        for (var i = 0; i < data.length; i++) {
                            var item = data[i];
                            rv.push({ Description: item.MaterialDes, Number: item.ReqQty, Price: item.Price, Amount: item.Amount, Manufacture: item.Manufacture });
                        }
                        //alert(rv.length);
                        var table = agent.findGridFromTableName(null, 'DF_FilesShare_Detail'); //获取table对象
                        if (table == undefined) return;
                        table.deleteBlocks(0, 1); //删除现有table行
                        table.appendBlock(data.length);//重新添加行

                        for (var i = 0; i < rv.length; i++) {
                            var info = rv[i];
                            //索引行对应控件赋值
                            var block = table.Blocks[i];

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

                                if (!el.DataBind)
                                    continue;
                                var cname = el.DataBind.DataColumn.ColumnName;
                                for (var obj in info) {
                                    if (cname == obj) {
                                        var value = info[obj];
                                        xel.setValue(value);
                                        XFormOnChange(xel);
                                    }
                                }
                            }
                        }
                }
                
                }
            }, function (response) {
            });

        }

        //生成单据
        function CreateFile(xelid, type) {
            var company = getXValue("XTextBox17");
            var t = "";
            if (company == "2000") {
                t = "颐合" + type;
            }
            if (company == "A300") {
                t = "HOSIC" + type;
            }
            //表单号
            var formNo = getXValue("XTextBox2");
            //唛头
            var marks = getXValue("XTextBox20");
            //合同号
            var conNo = getXValue("XTextBox7");
            //币种
            var currency = getXValue("XTextBox30");
            //总金额
            var amount = getXValue("XTextBox26");
            //英文公司
            var customer = getXValue("GoodsEnglishCompany");
            if (customer == '') {
                Ext.MessageBox.alert('提示', '请填写英文公司名称！');
                return ;
            }
            //英文地址
            var address = getXValue("GoodsEnglishAddress");
            //到货港
            var port = getXValue("GoodsPortArrival");
            //贸易条件
            var term = getXValue("TradeTerms");
            //原产国
            var source = getXValue("GoodsCountryOrigin");
            //联系方式
            var tel = getXValue("GoodsTel") == '' ? getXValue("GoodsPhone") : getXValue("GoodsTel");
            //木质包装
            var wooden = checkedValue("XRadioButtonList1");
            //总重
            var sweight = getXValue("XTextBox51");
            //行项目信息
            var tableObj = document.getElementById("packlist");
            var arr = [];
            //遍历Table的所有Row
            for (var i = 2; i < tableObj.rows.length - 1; i++) {
                var obj = {};
                obj["No"] = agent.Eles[tableObj.rows[i].cells[0].children[0].getAttribute("xform_xele_index")].getValue();
                obj["Description"] = agent.Eles[tableObj.rows[i].cells[1].children[0].getAttribute("xform_xele_index")].getValue();
                obj["Qt"] = agent.Eles[tableObj.rows[i].cells[2].children[0].getAttribute("xform_xele_index")].getValue();
                obj["Price"] = agent.Eles[tableObj.rows[i].cells[3].children[0].getAttribute("xform_xele_index")].getValue();
                obj["Amount"] = agent.Eles[tableObj.rows[i].cells[4].children[0].getAttribute("xform_xele_index")].getValue();
                obj["Manufacture"] = agent.Eles[tableObj.rows[i].cells[7].children[1].getAttribute("xform_xele_index")].getValue();
                if (type == "箱单") {
                    if (agent.Eles[tableObj.rows[i].cells[5].children[0].getAttribute("xform_xele_index")].getValue() != '') {
                        obj["GW"] = agent.Eles[tableObj.rows[i].cells[5].children[0].getAttribute("xform_xele_index")].getValue();
                    }
                    else {
                        Ext.MessageBox.alert('提示', '请填写产品GW(毛重)！');
                        return false;
                    }
                    if (agent.Eles[tableObj.rows[i].cells[6].children[0].getAttribute("xform_xele_index")].getValue() != '') {
                        obj["NW"] = agent.Eles[tableObj.rows[i].cells[6].children[0].getAttribute("xform_xele_index")].getValue();
                    }
                    else {
                        Ext.MessageBox.alert('提示', '请填写产品NW(净重)！');
                        return false;
                    }
                    obj["DIM"] = agent.Eles[tableObj.rows[i].cells[7].children[0].getAttribute("xform_xele_index")].getValue();
                   
                }
                arr.push(obj);
            }
            //总箱数
            var count = getXValue("XTextBox15");
            if (type == "箱单" && count == '') {
                Ext.MessageBox.alert('提示', '请填写产品总箱数！');
                return;
            }

            //行项目信息
            var list = JSON.stringify(arr);
            var parm = { method: 'CreateRelatedForm', formNo: formNo, mark: marks, type: t, wooden: wooden, count: count, weight: sweight, contract: conNo, amount: amount, currency: currency, customer: customer, address: address, port: port, term: term, tel: tel, source: source, items: list };
            AjaxParm(YZSoft.$url('Oimec/ApiServices/SalesAPIHandler.ashx'), true, parm, function (action) {
                var result = action.result;
                //alert(result.filePath)
                //记录文件名称/地址
                if (result.fileName != '') {
                    Ext.MessageBox.alert('提示', '生成成功，可点击按钮下载！');
                    setXValue(xelid, result.fileName);
                    XFormOnChange(agent.Eles[document.getElementById(xelid).getAttribute("xform_xele_index")]);
                }
                else {
                    Ext.MessageBox.alert('提示', '生成失败！');
                }

            }, function (response) { })
        }

       
        //查看附件
        function fileRead(txtid) {
            var obj = agent.Eles[document.getElementById(txtid).getAttribute("xform_xele_index")].getValue();
            alert(obj);
            if (obj != "") {

                var parm = {
                    method: 'GetOssUrl',
                    objName: obj
                };
                AjaxParm(YZSoft.$url('Oimec/ApiServices/SalesAPIHandler.ashx'), false, parm, function (action) {
                    var data = action.result;
                    window.open(data.fileUrl, null, "scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes")
                }, function (response) {
                });

            }
        }

        //下载附件
        function fileDownload(txtid, extension) {

            var objName = agent.Eles[document.getElementById(txtid).getAttribute("xform_xele_index")].getValue();
            if (objName == "") {
                Ext.MessageBox.alert('提示', '无附件可下载');
            }
            else {
                //alert(objName);
                var url = YZSoft.$url('Oimec/ApiServices/SalesAPIHandler.ashx');
                YZSoft.src.ux.File.download(url, {
                    method: 'DownloadAliOss',
                    objName: objName,
                    objExt: extension
                });
            }

        }

    </script>
</head>
<body>
    <form runat="server">
        <!-- Insert content here -->
        <table width="1200" align="center" class="head" border="0" cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td class="logo">
                    </td>
                    <td width="1000" class="biaoti" style="TEXT-ALIGN: center; PADDING-LEFT: 0px">
                        <asp:Label id="XLabel1" runat="server" text="业务单据表" valuetodisplaytext value></asp:Label></td>
                    <td width="400" class="formno">
                        <asp:Label id="Label3" runat="server" text="表单号：" valuetodisplaytext value></asp:Label>
                        <aspxform:XLabel id="XLabel5" runat="server" ValueToDisplayText Value XDataBind="DF_FilesShare_YH.SerialNum" BackColor="#8AB3DF" ForeColor="White" Font-Bold="true" Text="-系统自动生成-"></aspxform:XLabel>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" id="tabqutdetail" border="0" cellspacing="0" cellpadding="3" menudock="Left">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="Label22" runat="server" text="基本信息" valuetodisplaytext value></asp:Label>&nbsp; 
                        <aspxform:XTextBox id="XTextBox16" runat="server" XDataBind="formstate" BackColor="#E6F1F8" ReadOnly="True" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="150px" HiddenInput="true"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td width="120" class="tsbottomlabel">
                        <asp:Label id="Label14" runat="server" text="创建用户" valuetodisplaytext value></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox4" runat="server" XDataBind="DF_FilesShare_YH.CreateName" BackColor="#E6F1F8" ReadOnly="True" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="150px"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox5" runat="server" XDataBind="DF_FilesShare_YH.CreateAccount" BackColor="#E6F1F8" BorderColor="#DCDCDC" BorderWidth="1" Width="50px" HiddenExpress="1"></aspxform:XTextBox>
                    </td>
                    <td width="120" class="tsbottomlabel">
                        <asp:Label id="Label15" runat="server" text="创建日期" valuetodisplaytext value></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox6" runat="server" XDataBind="DF_FilesShare_YH.CreateDate" BackColor="#E6F1F8" ReadOnly="True" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="150px"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td width="120" class="tsbottomlabel">
                        <asp:Label id="Label13" runat="server" text="来源单据号" valuetodisplaytext value></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox2" runat="server" ValueToDisplayText="TableName:V_DF_SD_InquiryInfo;FilterColumn:FormNo;DisplayColumn:FormNo" XDataBind="DF_FilesShare_YH.InquiryFormNo" BackColor="#E6F1F8" ReadOnly="True" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="150px" DataMap="SalesmanID->DF_FilesShare_YH.SalesManID;Salesman->DF_FilesShare_YH.SalesMan;Accessory->DF_FilesShare_YH.CustomerContract;ContractCurrency->DF_FilesShare_YH.Currency;BillingCompany->DF_FilesShare_YH.Company;ShippingMark->DF_FilesShare_YH.ShippingMark;GoodsEnglishCompany->DF_FilesShare_YH.GoodsEnglishCompany;GoodsEnglishAddress->DF_FilesShare_YH.GoodsEnglishAddress;GoodsPortArrival->DF_FilesShare_YH.GoodsPortArrival;GoodsCountryOrigin->DF_FilesShare_YH.GoodsCountryOrigin;TradeTerms->DF_FilesShare_YH.TradeTerms"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox3" runat="server" XDataBind="DF_FilesShare_YH.InquiryTaskID" BackColor="#E6F1F8" BorderColor="#DCDCDC" BorderWidth="1" Width="50px" HiddenExpress="1"></aspxform:XTextBox>
                    &nbsp;<input id="btnItems" onclick="GetSoInfo()" type="button" value="获取行项目信息" hidden="hidden" />
                    </td>
                    <td width="120" class="tsbottomlabel">
                        <asp:Label id="Label16" runat="server" text="销售合同编号" valuetodisplaytext value></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox7" runat="server" XDataBind="DF_FilesShare_YH.SalesContractNo" BackColor="#E6F1F8" ReadOnly="True" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="150px"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td width="120" class="tsbottomlabel">
                        <asp:Label id="Label18" runat="server" text="SAP-SO号" valuetodisplaytext value></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox10" runat="server" XDataBind="DF_FilesShare_YH.SAPSO" BorderColor="#DCDCDC" BorderWidth="1" Width="350px"></aspxform:XTextBox>
                        &nbsp;<asp:Label id="Label20" runat="server" text="(多个SO用/分隔)" valuetodisplaytext value></asp:Label></td>
                    <td width="120" class="tsbottomlabel">
                        <asp:Label id="Label17" runat="server" text="业务员"></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox8" runat="server" XDataBind="DF_FilesShare_YH.SalesMan" BackColor="#E6F1F8" ReadOnly="True" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="150px"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox9" runat="server" XDataBind="DF_FilesShare_YH.SalesManID" BackColor="#E6F1F8" BorderColor="#DCDCDC" BorderWidth="1" Width="50px" HiddenExpress="1"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td width="120" class="tsbottomlabel">
                        <asp:Label id="Label19" runat="server" text="SAP-PO号" valuetodisplaytext value></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XTextBox id="XTextBox11" runat="server" XDataBind="DF_FilesShare_YH.SAPPO" BorderColor="#DCDCDC" BorderWidth="1" Width="650px"></aspxform:XTextBox>
                        &nbsp;<asp:Label id="Label21" runat="server" text="(多个PO用/分隔)" valuetodisplaytext value></asp:Label></td>
                </tr>
            </tbody>
        </table>
        <table width="1200" align="center" class="table" id="tbInfo" border="0" cellspacing="0" cellpadding="3" menudock="Left" hiddenexpress="(DF_FilesShare_YH.Company!='A300'&amp;&amp;DF_FilesShare_YH.Company!='2000')||DF_FilesShare_YH.Company==''||(formstate!='New'&amp;&amp;formstate!='Edit-SW'&amp;&amp;formstate!='Edit-CG')">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="Label40" runat="server" text="外币交货信息" valuetodisplaytext value></asp:Label>&nbsp; 
                        <aspxform:XTextBox id="XTextBox27" runat="server" XDataBind="formstate" BackColor="#E6F1F8" ReadOnly="True" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="150px" HiddenInput="true"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="22" class="ts" style="WIDTH: 10%">
                        <asp:Label id="XLabel46" runat="server" text="*" forecolor="Red" font-bold="true"></asp:Label><asp:Label id="Label61" runat="server" text="国际运单收货英文公司名称" valuetodisplaytext value></asp:Label></td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="GoodsEnglishCompany" runat="server" Value XDataBind="DF_FilesShare_YH.GoodsEnglishCompany" BorderColor="#DCDCDC" BorderWidth="1" Width="70%"></aspxform:XTextBox>
                    </td>
                    <td class="ts" style="WIDTH: 10%">
                        <asp:Label id="Label62" runat="server" text="收货公司英文地址" valuetodisplaytext value></asp:Label></td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="GoodsEnglishAddress" runat="server" Value XDataBind="DF_FilesShare_YH.GoodsEnglishAddress" BorderColor="#DCDCDC" BorderWidth="1" Width="70%"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="ts" style="HEIGHT: 20px; WIDTH: 10%">
                        <asp:Label id="Label167" runat="server" text="贸易条款" valuetodisplaytext value></asp:Label></td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XDropDownList id="TradeTerms" runat="server" XDataBind="DF_FilesShare_YH.TradeTerms" Width="60%" Height="22px" 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="到货港" valuetodisplaytext value></asp:Label></td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="GoodsPortArrival" runat="server" Value XDataBind="DF_FilesShare_YH.GoodsPortArrival" BorderColor="#DCDCDC" BorderWidth="1" Width="70%"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td height="22" class="ts" style="WIDTH: 10%">
                        <asp:Label id="Label70" runat="server" text="原产国" valuetodisplaytext value></asp:Label></td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="GoodsCountryOrigin" runat="server" Value XDataBind="DF_FilesShare_YH.GoodsCountryOrigin" BorderColor="#DCDCDC" BorderWidth="1" Width="70%"></aspxform:XTextBox>
                    </td>
                    <td class="ts" style="WIDTH: 10%">
                    </td>
                    <td class="ts1" style="WIDTH: 35%">
                    </td>
                </tr>
                <tr>
                    <td height="22" class="ts" style="WIDTH: 10%">
                        <asp:Label id="Label66" runat="server" text="到货通知人座机" valuetodisplaytext value></asp:Label></td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="GoodsTel" runat="server" Value XDataBind="DF_FilesShare_YH.GoodsTel" BorderColor="#DCDCDC" BorderWidth="1" Width="70%"></aspxform:XTextBox>
                    </td>
                    <td class="ts" style="WIDTH: 10%">
                        <asp:Label id="Label64" runat="server" text="到货通知人手机" valuetodisplaytext value></asp:Label></td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="GoodsPhone" runat="server" Value XDataBind="DF_FilesShare_YH.GoodsPhone" BorderColor="#DCDCDC" BorderWidth="1" Width="70%" placeholder="多个手机号以/分割"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                     <td height="22" class="ts" style="WIDTH: 10%">
                        <asp:Label id="Label45" runat="server" text="唛头" valuetodisplaytext value></asp:Label></td>
                    <td class="ts1" style="WIDTH: 35%">
                        <aspxform:XTextBox id="XTextBox20" runat="server" Value XDataBind="DF_FilesShare_YH.ShippingMark" BorderColor="#DCDCDC" BorderWidth="1" Width="70%" TextMode="MultiLine"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
        <table width="1200" align="center" class="table" id="packlist" border="0" cellspacing="0" cellpadding="3" menudock="Left" hiddenexpress="(DF_FilesShare_YH.Company!='A300'&amp;&amp;DF_FilesShare_YH.Company!='2000')||DF_FilesShare_YH.Company==''||(formstate!='New'&amp;&amp;formstate!='Edit-SW'&amp;&amp;formstate!='Edit-CG')" dynamicarea="2,1">
            <tbody>
                <tr>
                    <td width="1200" class="title1" style="TEXT-ALIGN: center" colspan="8">
                        <asp:Label id="Label33" runat="server" text="PACKING LIST/WEIGHT MEMO"></asp:Label></td>
                </tr>
                <tr>
                    <td width="50" height="17" class="tds">
                        <asp:Label id="Label34" runat="server" text="C/No."></asp:Label></td>
                    <td width="200" class="tds">
                        <asp:Label id="Label35" runat="server" text="Description"></asp:Label></td>
                    <td width="60" class="tds">
                        <asp:Label id="Label36" runat="server" text="Qt’y"></asp:Label></td>
                    <td width="100" class="tds">
                        <asp:Label id="Label43" runat="server" text="Unit Price"></asp:Label></td>
                    <td width="120" class="tds">
                        <asp:Label id="Label44" runat="server" text="Total Amount"></asp:Label></td>
                    <td width="80" class="tds">
                        <asp:Label id="Label37" runat="server" text="G.W(KGS)"></asp:Label></td>
                    <td width="80" class="tds">
                        <asp:Label id="Label38" runat="server" text="N.W(KGS)"></asp:Label></td>
                    <td width="100" class="tds">
                        <asp:Label id="Label39" runat="server" text="DIM(CM)"></asp:Label></td>
                </tr>
                <tr>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox21" runat="server" XDataBind="DF_FilesShare_Detail.No" BorderColor="#DCDCDC" BorderWidth="1" Width="100%" TextAlign="Center"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox12" runat="server" XDataBind="DF_FilesShare_Detail.Description" BackColor="#D4E4FE" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="100%"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox28" runat="server" XDataBind="DF_FilesShare_Detail.Number" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="100%" TextAlign="Center"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox23" runat="server" XDataBind="DF_FilesShare_Detail.Price" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="100%" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox24" runat="server" XDataBind="DF_FilesShare_Detail.Amount" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="100%" TextAlign="Right" Format="type:number;.2"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox29" runat="server" XDataBind="DF_FilesShare_Detail.GWeight" BorderColor="#DCDCDC" BorderWidth="1" Width="100%" TextAlign="Right"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox13" runat="server" XDataBind="DF_FilesShare_Detail.NWeight" BorderColor="#DCDCDC" BorderWidth="1" Width="100%" TextAlign="Right"></aspxform:XTextBox>
                    </td>
                    <td class="tds1">
                        <aspxform:XTextBox id="XTextBox14" runat="server" XDataBind="DF_FilesShare_Detail.DIM" BorderColor="#DCDCDC" BorderWidth="1" Width="100%" TextAlign="Center"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox22" runat="server" XDataBind="DF_FilesShare_Detail.Manufacture" ReadOnly="true" BorderColor="#DCDCDC" BorderWidth="1" Width="10px" HiddenInput="true" TextAlign="Center"></aspxform:XTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td></td>
                    <td>
                        <aspxform:XTextBox id="XTextBox26" runat="server" XDataBind="varAmount" BorderColor="#DCDCDC" BorderWidth="1" Width="50px" HiddenInput="True" Express="sum(DF_FilesShare_Detail.Amount)"></aspxform:XTextBox>
                        <aspxform:XTextBox id="XTextBox17" runat="server" XDataBind="DF_FilesShare_YH.Company" BorderColor="#DCDCDC" BorderWidth="1" Width="50px" HiddenInput="True"></aspxform:XTextBox>
                    </td>
                    <td class="tds" style="TEXT-ALIGN: right">
                        <asp:Label id="XLabel36" runat="server" text="总重" valuetodisplaytext value width="100%"></asp:Label></td>
                    <td class="tds1q">
                        <aspxform:XTextBox id="XTextBox51" runat="server" XDataBind="DF_FilesShare_YH.Weight" BackColor="#D4E4FE" DisableBehavior="ReadOnly" BorderColor="#DCDCDC" BorderWidth="1" Width="100%" TextAlign="Right" Format="type:number;.1" Express="sum(DF_FilesShare_Detail.GWeight)"></aspxform:XTextBox>
                    </td>
                    <td>
                        <aspxform:XTextBox id="XTextBox30" runat="server" XDataBind="DF_FilesShare_YH.Currency" BorderColor="#DCDCDC" BorderWidth="1" Width="50px" HiddenInput="True"></aspxform:XTextBox>
                    </td>
                    <td>
                    </td>
                </tr>
            </tbody>
        </table>
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="3" hiddenexpress="(DF_FilesShare_YH.Company!='A300'&amp;&amp;DF_FilesShare_YH.Company!='2000')||DF_FilesShare_YH.Company==''||(formstate!='New'&amp;&amp;formstate!='Edit-SW'&amp;&amp;formstate!='Edit-CG')">
            <tbody>
                <tr>
                    <td style="HEIGHT: 17px" colspan="4">
                    </td>
                </tr>
                <tr>
                    <td width="120" class="tsbottomlabel">
                        <asp:Label id="Label42" runat="server" text="总箱数" valuetodisplaytext value></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XTextBox id="XTextBox15" runat="server" XDataBind="DF_FilesShare_YH.ListCount" BorderColor="#DCDCDC" BorderWidth="1" Width="100px" HiddenExpress="(DF_FilesShare_YH.Company!='A300'&amp;&amp;DF_FilesShare_YH.Company!='2000')||DF_FilesShare_YH.Company==''||(formstate!='New'&amp;&amp;formstate!='Edit-SW'&amp;&amp;formstate!='Edit-CG')"></aspxform:XTextBox>
                    </td>
                    <td width="120" class="tsbottomlabel">
                        <asp:Label id="Label41" runat="server" text="木质包装" valuetodisplaytext value></asp:Label></td>
                    <td class="tsbottomtext">
                        <aspxform:XRadioButtonList id="XRadioButtonList1" runat="server" XDataBind="DF_FilesShare_YH.IsWooden" RepeatDirection="Horizontal">
                            <asp:ListItem>是</asp:ListItem>
                            <asp:ListItem Selected="True">否</asp:ListItem>
                        </aspxform:XRadioButtonList>
                    </td>
                </tr>
            </tbody>
        </table>
        <table width="1200" align="center" class="table" border="0" cellspacing="0" cellpadding="3" hiddenexpress="(DF_FilesShare_YH.Company!='A300'&amp;&amp;DF_FilesShare_YH.Company!='2000')||DF_FilesShare_YH.Company=='' ">
            <tbody>
                <tr>
                    <td height="25" colspan="3">
                        <input style="CURSOR: pointer" onclick="CreateFile( 'XTextBox19','发票')" type="button" value="生成形式发票" hiddenexpress="DF_FilesShare_YH.DFInvoiceObj!=''" />
                        &nbsp; 
                        <input style="CURSOR: pointer" onclick="CreateFile('XTextBox18','箱单')" type="button" value="生成箱单" hiddenexpress="DF_FilesShare_YH.PackingListObj!=''" /></td>
                    <td align="right" colspan="1">
                        &nbsp;</td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" id="tb2" border="0" cellspacing="0" cellpadding="3">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="Label1" runat="server" text="商务相关单据" valuetodisplaytext value></asp:Label>&nbsp;
                        <asp:Label ID="Label47" runat="server" Font-Size="14px" Text='("客户原始合同"仅能上传pdf/jpg/png格式文件)' Font-Bold="True" ForeColor="Blue"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td height="26" class="tsbottomlabel" style="WIDTH: 150px">
                        <asp:Label id="Label2" runat="server" text="客户原始合同"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XTextBox id="XTextBox25" runat="server" XDataBind="DF_FilesShare_YH.CustomerContractObj" BorderColor="#DCDCDC" BorderWidth="1" Width="100px" HiddenInput="true"></aspxform:XTextBox>
                        <aspxform:XAttachments id="XAttachments1" runat="server" XDataBind="DF_FilesShare_YH.CustomerContract" Width="600px" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.pdf;*.png;*.jpg;*.jpeg;"></aspxform:XAttachments>
                        <%--<input id="btn_download3" style="CURSOR: pointer" onclick="fileDownload('XTextBox25', '.pdf')" type="button" value="下载客户合同" hiddenexpress="DF_FilesShare_YH.CustomerContractObj==''" />--%></td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label4" runat="server" text="客户清关形式发票"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XTextBox id="XTextBox19" runat="server" XDataBind="DF_FilesShare_YH.DFInvoiceObj" BorderColor="#DCDCDC" BorderWidth="1" Width="100px" HiddenInput="true"></aspxform:XTextBox>
                        <aspxform:XAttachments id="XAttachments2" runat="server" XDataBind="DF_FilesShare_YH.DFInvoice" Width="600px" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                        <input id="btn_download2" style="CURSOR: pointer" onclick="fileDownload('XTextBox19', '.docx')" type="button" value="下载形式发票" hiddenexpress="DF_FilesShare_YH.DFInvoiceObj==''" />
                    </td>
                </tr>
                <tr>
                   <td height="26" class="tsbottomlabel" style="WIDTH: 150px">
                        <asp:Label id="Label46" runat="server" text="其他审批附件"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                         <aspxform:XAttachments id="XAttachments19" runat="server" XDataBind="DF_FilesShare_YH.OtherAttachments" Width="600px" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                     </td>   
               </tr>
            </tbody>
        </table>
        <table width="1200" align="center" class="table" id="tb" border="0" cellspacing="0" cellpadding="3">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="Label23" runat="server" text="采购相关单据" valuetodisplaytext value></asp:Label>&nbsp;</td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label5" runat="server" text="客户清关装箱单"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XTextBox id="XTextBox18" runat="server" XDataBind="DF_FilesShare_YH.PackingListObj" BorderColor="#DCDCDC" BorderWidth="1" Width="100px" HiddenInput="true"></aspxform:XTextBox>
                        <aspxform:XAttachments id="XAttachments3" runat="server" XDataBind="DF_FilesShare_YH.PackingList" Width="600px" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                        &nbsp; 
                        <input id="btn_download1" style="CURSOR: pointer" onclick="fileDownload('XTextBox18', '.docx')" type="button" value="下载箱单" hiddenexpress="DF_FilesShare_YH.PackingListObj==''" />
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label11" runat="server" text="供应商运单"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments9" runat="server" XDataBind="DF_FilesShare_YH.Waybill" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label7" runat="server" text="供应商合同"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments5" runat="server" XDataBind="DF_FilesShare_YH.SupplierContract" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label10" runat="server" text="供应商发票"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments8" runat="server" XDataBind="DF_FilesShare_YH.SupplierInvoice" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label8" runat="server" text="供应商装箱单"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments6" runat="server" XDataBind="DF_FilesShare_YH.SupplierPackingList" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label9" runat="server" text="SAP供应商直发单"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments7" runat="server" XDataBind="DF_FilesShare_YH.SupplierSend" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label29" runat="server" text="付款用的客户合同"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments16" runat="server" XDataBind="DF_FilesShare_YH.ContractForPay" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label32" runat="server" text="付款用的客户发票"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments18" runat="server" XDataBind="DF_FilesShare_YH.InvoiceForPay" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label24" runat="server" text="客户信用证发票"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments11" runat="server" XDataBind="DF_FilesShare_YH.LCInvoice" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label6" runat="server" text="客户信用证箱单"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments4" runat="server" XDataBind="DF_FilesShare_YH.LCPacklingList" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label25" runat="server" text="客户信用证非木/木质包装"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments12" runat="server" XDataBind="DF_FilesShare_YH.LCWooden" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label28" runat="server" text="客户信用证原产地证明"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments15" runat="server" XDataBind="DF_FilesShare_YH.LCOriginCertificate" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label26" runat="server" text="客户信用证质量证明"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments13" runat="server" XDataBind="DF_FilesShare_YH.LCQualityCertificate" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label27" runat="server" text="客户信用证重量、数量证明" width="170px"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments14" runat="server" XDataBind="DF_FilesShare_YH.LCWNCertificate" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
                <tr>
                    <td width="150" height="14" class="tsbottomlabel">
                        <asp:Label id="Label30" runat="server" text="客户信用证发货证明"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments17" runat="server" XDataBind="DF_FilesShare_YH.LCDeliverCertificate" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
            </tbody>
        </table>
        <table width="1200" align="center" class="table" id="tb3" border="0" cellspacing="0" cellpadding="3">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="Label31" runat="server" text="物流相关单据" valuetodisplaytext value></asp:Label>&nbsp;</td>
                </tr>
                <tr>
                    <td width="120" height="14" class="tsbottomlabel">
                        <asp:Label id="Label12" runat="server" text="SAP销售出库单"></asp:Label></td>
                    <td class="tsbottomtext" colspan="3">
                        <aspxform:XAttachments id="XAttachments10" runat="server" XDataBind="DF_FilesShare_YH.SAPOutbound" Width="100%" RepeatDirection="Horizontal" FileTypes="*.doc;*.docx;*.xls;*.xlsx;*.pdf;*.png;*.jpg;*.jpeg;*.gif;*.msg;*.eml"></aspxform:XAttachments>
                    </td>
                </tr>
            </tbody>
        </table>
        <br />
        <table width="1200" align="center" class="table" id="tbE" border="0" cellspacing="0" cellpadding="3" menudock="Left">
            <tbody>
                <tr>
                    <td height="17" class="title1" colspan="4">
                        <asp:Label id="XLabel32" runat="server" text="备注" valuetodisplaytext value></asp:Label></td>
                </tr>
                <tr>
                    <td class="tsbottomlabel">
                        <aspxform:XTextBox id="XTextBox1" runat="server" XDataBind="DF_FilesShare_YH.Remark" BorderColor="#DCDCDC" BorderWidth="1" Width="100%" Height="60px" TextMode="MultiLine"></aspxform:XTextBox>
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</body>
</html>
