{layout:simple} {class:Shop.Admin.order.Express_Edit_window}
<lbbody>
<table class="table">
    <tr>
        <th style="width: 20%">
            <%=Tag("单据名称")%>：
        </th>
        <td>
            <input type="text" id="Name" name="Name" style="width: 200px" shop="true" min="notnull" class="input" value="<%=model.Name %>" />
        </td>
    </tr>
    <tr>
        <th>
            <%=Tag("关联配送方式")%>：
        </th>
        <td>
            <select name="Transport_id" id="Transport_id" shop="true">
                <%=GetOptionTransport(model.Transport_id)%>
            </select>
        </td>
    </tr>
    <tr>
        <th style="vertical-align:top">
            <%=Tag("背景图片")%>：
        </th>
        <td>
            <div id="image_Background">
                <%if (model.Background != "")
                    {%>
                <img height="30" src="<%=site.WebPath + model.Background%>" />
                <%} %>
            </div>
            <input type="text" shop="true" id="Background" name="Background" class="input" style="width: 200px;" value="<%=model.Background%>" />
            <input id="file_Background" name="file_Background" type="file" class="input" onchange="uploadImage('Background')" />
            <!--input type="button" value="上传" onclick="uploadImage('ImageUrl')" /-->
        </td>
    </tr>
    <tr>
        <th>
            <%=Tag("单据宽度")%>：
        </th>
        <td>
            <input type="text" id="Width" name="Width" style="width: 70px" shop="true" min="notnull" class="input" value="<%=model.Width %>" maxlength="4" /> <%=Tag("像素")%>
        </td>
    </tr>
    <tr>
        <th>
            <%=Tag("单据高度")%>：
        </th>
        <td>
            <input type="text" id="Height" name="Height" style="width: 70px" shop="true" min="notnull" class="input" value="<%=model.Height %>" maxlength="4" /> <%=Tag("像素")%>
        </td>
    </tr>
    <tr>
        <th>
            <%=Tag("是否启用")%>：
        </th>
        <td>
            <label><input type="radio" name="Status" shop="true" value="1" <%=model.Status==1?"checked":"" %> /><%=Tag("是")%></label>
            <label><input type="radio" name="Status" shop="true" value="0" <%=model.Status==0?"checked":"" %> /><%=Tag("否")%></label>
        </td>
    </tr>
    <tr>
        <th>
            <%=Tag("排序序号")%>：
        </th>
        <td>
            <input type="text" id="Sort" name="Sort" style="width: 70px" shop="true" class="input" value="<%=model.Sort %>" onkeyup="value=value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" maxlength="4" />
        </td>
    </tr>
    <tr>
        <td colspan="2" class="action">
            <div class="tools tools-m">
                <ul>
                    <li class="submit"><a href="javascript:void(0);" onclick="SaveObj();"><b></b><span><%=Tag("保存")%></span></a></li>
                </ul>
            </div>
        </td>
    </tr>
</table>
<script type="text/javascript">
    LanguageTab_EditPage('<%=CurrentLanguage.Code %>'); //加载默认语言
    function SaveObj() {
        var postData = GetFormJsonData("shop");
        if (!CheckForm("shop", "span"))
            return false;
        var url = "<%=site.AdminPath %>/ajax/ajax_order.aspx?__Action=Express_Edit_Window&id=<%=model.id %>";
        RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
    }
    function uploadImage(id) {
        $.ajaxFileUpload
        (
	        {
	            url: WebPath + '/ajax/imageuploadone.aspx?path=config',
	            secureuri: false,
	            fileElementId: 'file_' + id,
	            dataType: 'json',
	            success: function (data, status) {
	                if (data.msg != 'OK') {
	                    MsgBox(2, data.msg, "");
	                }
	                else {
	                    var imageUrl = data.ImageUrl;
	                    if (imageUrl.length > 0) {
	                        $("#image_" + id + "").html('<img height="30" src=' + imageUrl + '>');
	                        $("#" + id + "").val(imageUrl);
	                    }
	                }
	            },
	            error: function (data, status, e) {
	                MsgBox(2, data.error, "");
	            }
	        }
        )
    }
    addtrbg(".table");    
</script>
</lbbody>