<%
    //-----------------------------------------------------------
    // 文件名称: Order_Order_Printer_Operate.aspx
    // 页面名称: 快递单打印添加/编辑
    //
    // 描    述:
    //
    // 创建标识: Add By 吕鑫 2009-04-17
    //-----------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Order_Order_Printer_Operate, V5Shop.Shop.Order" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="V5" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>快递单打印添加/编辑</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar-system.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>
</head>
<body>
    <form id="form1" runat="server">
     <div>
        <div class="OperateTitle">
            <div>
                <asp:Label ID="lblAdd" runat="server" Text="快递单打印添加/编辑" />
                
                <a href="Order_Order_Printer_Manage.aspx" title="返回快递单打印列表">返回列表</a>
            </div>
        </div>
        
        <div id="content">
            <div style="padding-right: 25px; padding-left: 25px; padding-bottom: 3px; color: #4b6888; padding-top: 3px; border-bottom: #cccccc 1px solid">
                添加打印项：
                <select id="selectPrintObj">
                    <option>请选择要插入的打印项</option>
                    <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_name','收货人-姓名');">收货人-姓名</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_area_0','收货人-地区1级')">收货人-地区1级</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_area_1','收货人-地区2级')">收货人-地区2级</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_area_2','收货人-地区3级')">收货人-地区3级</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_addr','收货人-地址')">收货人-地址</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_tel','收货人-电话')">收货人-电话</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_mobile','收货人-手机')">收货人-手机</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_zip','收货人-邮编')">收货人-邮编</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_name','发货人-姓名')">发货人-姓名</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_area_0','发货人-地区1级')">发货人-地区1级</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_area_1','发货人-地区2级')">发货人-地区2级</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_area_2','发货人-地区3级')">发货人-地区3级</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_address','发货人-地址')">发货人-地址</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_tel','发货人-电话')">发货人-电话</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_mobile','发货人-手机')">发货人-手机</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('dly_zip','发货人-邮编')">发货人-邮编</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('date_y','当日日期-年')">当日日期-年</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('date_m','当日日期-月')">当日日期-月</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('date_d','当日日期-日')">当日日期-日</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('order_id','订单-订单号')">订单-订单号</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('order_price','订单总金额')">订单总金额</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('order_weight','订单物品总重量')">订单物品总重量</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('order_count','订单-物品数量')">订单-物品数量</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('order_memo','订单-备注')">订单-备注</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('ship_time','订单-送货时间')">订单-送货时间</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('shop_name','网店名称')">网店名称</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('tick','对号 - √')">对号 - √</option> <option value="javascript:document.getElementById('dly_printer_editor_flash').addElement('text','自定义内容')">自定义内容</option>
                </select>
		<input type="button" value="插入" class="button" onclick="window.location.href=document.getElementById('selectPrintObj').options[document.getElementById('selectPrintObj').options.selectedIndex].value" />
                <input type="button" value="删除项" class="button" onclick="dly_printer_editor_flash.delItem()" />
                &nbsp;&nbsp; 快递单名称：<asp:TextBox ID="txtName" runat="server" Width="100px"></asp:TextBox>
                <!--单据宽：
                <V5:NumberBox ID="txtWidth" runat="server" Width="40px" />
                单据高：
                <V5:NumberBox ID="txtHeight" runat="server" Width="40px" />-->
                是否启用：<asp:CheckBox ID="txtIsAct" runat="server" CssClass="checkbox" />
                
                <br />
                <asp:TextBox ID="txtBg" runat="server"></asp:TextBox>
                <input type="button" value="选择图片" onclick="OpenDialog('txtBg')" class="button" />
                <input type="button" value="设置背景" class="button" onclick="document.getElementById('dly_printer_editor_flash').setBg('../'+document.getElementById('txtBg').value)" />
                
                <SELECT id="jianju2" style="HEIGHT: 20px" onchange="if(this.value!='--')document.getElementById('dly_printer_editor_flash').setFontSize(this.value);" name="font"> <OPTION value="--">大小</OPTION> <OPTION value="10">10</OPTION> <OPTION value="12">12</OPTION> <OPTION value="14">14</OPTION> <OPTION value="18">18</OPTION> <OPTION value="20">20</OPTION> <OPTION value="24">24</OPTION> <OPTION value="27">27</OPTION> <OPTION value="30">30</OPTION> <OPTION value="36">36</OPTION></SELECT> 
                <SELECT onchange="if(this.value!='--')document.getElementById('dly_printer_editor_flash').setFont(this.value);"> <OPTION value="--">字体</OPTION> <OPTION value="宋体">宋体</OPTION> <OPTION value="黑体">黑体</OPTION> <OPTION value="Arial">Arial</OPTION> <OPTION value="Verdana">Verdana</OPTION> <OPTION value="Serif">Serif</OPTION> <OPTION value="Cursive">Cursive</OPTION> <OPTION value="Fantasy">Fantasy</OPTION> <OPTION value="Sans-Serif">Sans-Serif</OPTION></SELECT> 
                <SELECT id="jianju" style="HEIGHT: 20px" onchange="if(this.value!='--')document.getElementById('dly_printer_editor_flash').setFontSpace(this.value);" name="jianju"> <OPTION value="--">间距</OPTION> <OPTION value="-4">-4</OPTION> <OPTION value="-2">-2</OPTION> <OPTION value="0">0</OPTION> <OPTION value="2">2</OPTION> <OPTION value="4">4</OPTION> <OPTION value="6">6</OPTION> <OPTION value="8">8</OPTION> <OPTION value="10">10</OPTION> <OPTION value="12">12</OPTION> <OPTION value="14">14</OPTION> <OPTION value="16">16</OPTION> <OPTION value="18">18</OPTION> <OPTION value="20">20</OPTION> <OPTION value="22">22</OPTION> <OPTION value="24">24</OPTION> <OPTION value="26">26</OPTION> <OPTION value="28">28</OPTION> <OPTION value="30">30</OPTION></SELECT>
                
                <input type="button" value="B" onclick="document.getElementById('dly_printer_editor_flash').setBorder()" class="button" />
                <input type="button" value="I" onclick="document.getElementById('dly_printer_editor_flash').setItalic()" class="button" />
                <input type="button" value="居左" onclick="document.getElementById('dly_printer_editor_flash').setAlign('left')" class="button" />
                <input type="button" value="居中" onclick="document.getElementById('dly_printer_editor_flash').setAlign('center')" class="button" />
                <input type="button" value="居右" onclick="document.getElementById('dly_printer_editor_flash').setAlign('right')" class="button" />
                
                <!--<SPAN class="sysiconBtnNoIcon" onclick="printer_editor.setBorder(1)"><STRONG>B</STRONG></SPAN></TD><TD><SPAN class="sysiconBtnNoIcon" onclick="printer_editor.setItalic(1)"><EM><STRONG>I</STRONG></EM></SPAN></TD><TD style="PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"><IMG style="BACKGROUND-POSITION: 0px -608px; BACKGROUND-IMAGE: url(images/ImageBundle.gif); WIDTH: 16px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 16px" onclick="printer_editor.setAlign('left')" src="http://192.168.1.186/shopex/shopadmin/images/transparent.gif" border="0" /></TD><TD style="PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"><IMG style="BACKGROUND-POSITION: 0px -640px; BACKGROUND-IMAGE: url(images/ImageBundle.gif); WIDTH: 16px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 16px" onclick="printer_editor.setAlign('center')" src="http://192.168.1.186/shopex/shopadmin/images/transparent.gif" border="0" /></TD><TD style="PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"><IMG style="BACKGROUND-POSITION: 0px -656px; BACKGROUND-IMAGE: url(images/ImageBundle.gif); WIDTH: 16px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 16px" onclick="printer_editor.setAlign('right')" src="http://192.168.1.186/shopex/shopadmin/images/transparent.gif" border="0" />-->
                
                <asp:Button ID="Button1" runat="server" CssClass="button" Text="保存快递单" OnClientClick="saveData()"/>
                
                <input id="flashData" name="flashData" type="hidden" /></div>
            <div class="listborder">
                <TABLE bgColor="#dddddd">
                    <TBODY>
                        <TR>
                            <TD>
                                <DIV id="dly_printer_editor" style="BORDER-RIGHT: #999 1px solid; BORDER-TOP: #999 1px solid; BORDER-LEFT: #999 1px solid; WIDTH: 831px; BORDER-BOTTOM: #999 1px solid; HEIGHT: 615px; border-solid: 1px 1px 0 0">
                                    <OBJECT id='dly_printer_editor_flash' height="100%" width="100%" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
                                    <PARAM value="high" name="quality" />
                                    <PARAM value="always" name="allowScriptAccess" />
                                    <PARAM value="opaque" name="wMode" />
                                    <PARAM value="true" name="swLiveConnect" />
                                    <PARAM value="<%=ItemContent %>" name="flashVars" />
                                    <PARAM value="swf/printer.swf" name="movie" />
                                    </OBJECT>
                                </DIV>
                            </TD>
                        </TR>
                    </TBODY>
                </TABLE>
            </div>
        </div>
        <uc2:PageBottom ID="PageBottom" runat="server" />
        
        <script language="javascript" type="text/javascript">
            function OpenDialogEmail(){
                var url = "Email_EmailContent_Operate_Dialog.aspx?tabid=13";
                if (navigator.appVersion.indexOf("MSIE") == -1){
                    this.returnAction=function(strResult){
                        if(strResult!=null){
                            if(strResult!=""){
                                alert(strResult);
                            }
                        }
                    }
                    window.open(url + '&d=' + Date(),'newWin','modal=yes,width=600,height=400,top=200,left=300,resizable=no,scrollbars=no');
                    return;
                }else{
                    var GetValue = showModalDialog(url + '&d=' + Date(), null, 'dialogWidth:600px; dialogHeight:400px;')
                    if (GetValue != null) {
                        if(GetValue!=""){
                            alert(strResult);
                        }
                    } 
                }
            }
            
            function saveData(){
                var obj = document.getElementById('dly_printer_editor_flash');
                //alert(obj.getData());
                form1.flashData.value= 'data=' + escape(obj.getData()) + '&bg=../'+ document.getElementById('txtBg').value +'&copyright=shopex';
                this.form.submit();
            }
        </script>
    </div>
    </form>
</body>
</html>
