383 lines
13 KiB
Plaintext
383 lines
13 KiB
Plaintext
<%@ Page Title="" Language="C#" MasterPageFile="~/Telesa.Master" AutoEventWireup="true" CodeBehind="Member_Product_add.aspx.cs" Inherits="Mtxfw.shop.Member_Product_add" %>
|
||
<%@ Register src="Controls/Left.ascx" tagname="Left" tagprefix="uc1" %>
|
||
<asp:Content ID="Content1" ContentPlaceHolderID="MyHead" runat="server">
|
||
<link href="css/member.css" rel="stylesheet" type="text/css" />
|
||
<style type="text/css">
|
||
#membertab table th{ text-align:right;}
|
||
</style>
|
||
<script type="text/javascript" charset="utf-8" src="/artDialog/ueditor.config2.js"></script>
|
||
<script type="text/javascript" charset="utf-8" src="/artDialog/ueditor.all.min.js"> </script>
|
||
<!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败-->
|
||
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文-->
|
||
<script type="text/javascript" charset="utf-8" src="/artDialog/lang/zh-cn/zh-cn.js"></script>
|
||
<script type="text/javascript">
|
||
var ifshow = 1;
|
||
</script>
|
||
<script type="text/javascript">
|
||
|
||
var checkForm = function () {
|
||
if ($('#select_p1').val() == "") {
|
||
|
||
$('#select_p1').focus();
|
||
return false;
|
||
}
|
||
if ($('#select_p2').val() == "") {
|
||
alert('请选择分类二');
|
||
$('#select_p2').focus();
|
||
return false;
|
||
}
|
||
if ($("#<%=Text_P_NAME.ClientID %>").val() == "") {
|
||
confirm("商品名称不能为空!");
|
||
$("#<%=Text_P_NAME.ClientID %>").focus();
|
||
return false;
|
||
}
|
||
|
||
if ($("#<%=P_Market_P.ClientID %>").val() == "") {
|
||
confirm("市场价不能为空!");
|
||
$("#<%=P_Market_P.ClientID %>").focus();
|
||
return false;
|
||
}
|
||
if ($("#<%=P_VIP_P.ClientID %>").val() == "") {
|
||
confirm("会员价不能为空!");
|
||
$("#<%=P_VIP_P.ClientID %>").focus();
|
||
return false;
|
||
}
|
||
if ($("#<%=P_YH_P.ClientID %>").val() == "") {
|
||
confirm("运费不能为空!");
|
||
$("#<%=P_YH_P.ClientID %>").focus();
|
||
return false;
|
||
}
|
||
if ($("#<%=P_Inventory.ClientID %>").val() == "") {
|
||
confirm("库存不能为空!");
|
||
$("#<%=P_Inventory.ClientID %>").focus();
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
</script>
|
||
<script type="text/javascript">
|
||
var ProductLB1 = '<%=ProductLB1 %>';
|
||
var ProductLB2 = '<%=ProductLB2 %>';
|
||
var ProductLB3 = '<%=ProductLB3 %>';
|
||
$(document).ready(function () {
|
||
$('#select_p1').change(function () {//获取城市
|
||
GetProductLB();
|
||
});
|
||
|
||
$('#select_p2').change(function () {//获取县区
|
||
GetProductLB2();
|
||
});
|
||
|
||
$('#select_p1').val(ProductLB1);
|
||
GetProductLB();
|
||
|
||
})
|
||
|
||
function GetProductLB() {
|
||
if ($('#select_p1').val() != '') {
|
||
$.post("/Ajax.ashx", { action: 'GetProductLB', ProductLB1: $('#select_p1').val(), ProductLB2: ProductLB2 }, function (data) {
|
||
if (data != 'false') {
|
||
$('#select_p2').html(data);
|
||
GetProductLB2();
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
function GetProductLB2() {
|
||
if ($('#select_p2').val() != '') {
|
||
|
||
$.post("/Ajax.ashx", { action: 'GetProductLB2', ProductLB2: $('#select_p2').val(), ProductLB3: ProductLB3 }, function (data) {
|
||
|
||
if (data != 'false')
|
||
$('#select_p3').html(data);
|
||
|
||
});
|
||
}
|
||
}
|
||
</script>
|
||
<style type="text/css">
|
||
#pic{width:40px; background:#fff; border:1px solid #ccc; padding:2px;}
|
||
#p_table #yanselist td span{display:inline-block; display:-moz-inline-stack; zoom:1; *display:inline; width:20px; height:10px;border:1px solid #ccc; padding:2px;}
|
||
#inputTips2
|
||
{
|
||
float:left;
|
||
width:600px;
|
||
}
|
||
|
||
|
||
#inputTips2 li
|
||
{
|
||
float:left;
|
||
width:100px;
|
||
margin-left:5px;
|
||
list-style-type:none;
|
||
text-align:center;
|
||
border: 1px solid #ccc;
|
||
line-height:25px;
|
||
font-size:12px;
|
||
}
|
||
#inputTips2 li img
|
||
{
|
||
width:100px;
|
||
}
|
||
#inputTips2 li a
|
||
{
|
||
width:100px;
|
||
text-align:center;
|
||
line-height:25px;
|
||
font-size:12px;
|
||
}
|
||
</style>
|
||
<script type="text/javascript">
|
||
var DeletePic = function (pic, i) {
|
||
$.post("/Ajax.ashx", { action: 'DeletePic', pic: escape(pic) }, function (data) {
|
||
if (data == "删除成功") {
|
||
$("#inputTips2 #picli" + i).hide(300);
|
||
} else {
|
||
alert(data);
|
||
}
|
||
});
|
||
};
|
||
var SetPic = function (pic, i) {
|
||
$.post("/Ajax.ashx", { action: 'SetPic', pic: escape(pic), yanse: escape("<%=stryanse %>") }, function (data) {
|
||
if (data.indexOf("错误") == -1) {
|
||
$("#inputTips2").html(data);
|
||
} else {
|
||
alert(data);
|
||
}
|
||
});
|
||
};
|
||
</script>
|
||
</asp:Content>
|
||
<asp:Content ID="Content2" ContentPlaceHolderID="MyContent" runat="server">
|
||
<form id="form1" runat="server">
|
||
<div id="main">
|
||
<div id="Location">当前位置: <a href="/" class="red">首页</a> > <a href="/Member_Index.aspx">会员中心</a> > 发布商品</div>
|
||
<div id="member" class="f_clear">
|
||
<uc1:Left ID="Left1" runat="server" />
|
||
<div class="right">
|
||
<div id="membertab">
|
||
<h2>发布商品</h2>
|
||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||
<tr>
|
||
<th>商品分类:</th>
|
||
<td>
|
||
<select name="select_p1" id="select_p1" class="k1">
|
||
<option value="">请选择分类一</option>
|
||
<%=getProductLB()%>
|
||
</select>
|
||
<select name="select_p2" id="select_p2">
|
||
<option value="">请选择分类二</option>
|
||
</select>
|
||
<select name="select_p3" id="select_p3">
|
||
<option value="">请选择分类三</option>
|
||
</select> <span style="color:#FF0000">*</span>
|
||
</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<th width="12%">商品名称:</th>
|
||
<td>
|
||
<asp:TextBox ID="Text_P_NAME" runat="server" Columns="60"></asp:TextBox> <span style="color:#FF0000">*</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>一句话说明:</th>
|
||
<td>
|
||
<asp:TextBox ID="Text_P_NAME2" runat="server" Columns="60"></asp:TextBox>
|
||
</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<th>市场价:</th>
|
||
<td>
|
||
<asp:TextBox ID="P_Market_P" runat="server" Columns="5">0</asp:TextBox> <span style="color:#FF0000">*</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>会员价:</th>
|
||
<td>
|
||
<asp:TextBox ID="P_VIP_P" runat="server" Columns="5">0</asp:TextBox> <span style="color:#FF0000">*</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>运费:</th>
|
||
<td>
|
||
<asp:TextBox ID="P_YH_P" runat="server" Columns="5">0</asp:TextBox>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>库存:</th>
|
||
<td>
|
||
<asp:TextBox ID="P_Inventory" runat="server" Columns="5">0</asp:TextBox> <span style="color:#FF0000">*</span>
|
||
</td>
|
||
</tr>
|
||
<asp:Panel ID="PanelCB" runat="server">
|
||
<tr>
|
||
<th>成本:</th>
|
||
<td>
|
||
<asp:TextBox ID="P_CB_P" runat="server" Columns="5">0</asp:TextBox>
|
||
</td>
|
||
</tr>
|
||
</asp:Panel>
|
||
<tr>
|
||
<th>上传图片:</th>
|
||
<td>
|
||
<input ID="Y_Certificate" name="Y_Certificate" type="hidden" runat="server"/>
|
||
|
||
<input name="IFUpload2" id="IFUpload2" type="hidden" value="0" />
|
||
<div id="inputTips2"><%=strimg %></div>
|
||
<div id="uploadImgIframes2" style="border:1px solid #fff; border-top:none;">
|
||
<iframe marginwidth="0" framespacing="0" marginheight="0" frameborder="0" name="uploadframe2" id="uploadframe2"
|
||
src='/Member_Photo_upload.aspx?yanse=<%=stryanse.Replace("#",",")%>' scrolling="no" width="600" height="40" ></iframe>
|
||
</div><span>图片像素比例为640*640</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>规格参数:</th>
|
||
<td>
|
||
<asp:TextBox ID="Text_P_EDESCRIPTION" TextMode="MultiLine" runat="server" Columns="80" Rows="6"></asp:TextBox>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<th>详细内容:</th>
|
||
<td>
|
||
<script id="editor" type="text/plain" style="width:90%;height:400px;"><%=strBody %></script>
|
||
<asp:HiddenField ID="Hidd_myEditor" runat="server" />
|
||
</td>
|
||
</tr>
|
||
|
||
|
||
</table>
|
||
</div>
|
||
<div id="tj">
|
||
<asp:Button ID="Btn_Insert" runat="server" Text="添加" OnClientClick="getContent();return checkForm();" CssClass="btn3" />
|
||
<asp:Button ID="Btn_Update" runat="server" Text="修改" OnClientClick="getContent();return checkForm();" CssClass="btn3" />
|
||
<input id="btn_back" type="button" value="返回" class="btn3" onclick="history.go(-1)" />
|
||
<asp:HiddenField ID="Hidd_Url" runat="server" />
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<script type="text/javascript">
|
||
|
||
//实例化编辑器
|
||
//建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
|
||
UE.getEditor('editor');
|
||
|
||
|
||
function isFocus(e) {
|
||
alert(UE.getEditor('editor').isFocus());
|
||
UE.dom.domUtils.preventDefault(e)
|
||
}
|
||
function setblur(e) {
|
||
UE.getEditor('editor').blur();
|
||
UE.dom.domUtils.preventDefault(e)
|
||
}
|
||
function insertHtml() {
|
||
var value = prompt('插入html代码', '');
|
||
UE.getEditor('editor').execCommand('insertHtml', value)
|
||
}
|
||
function createEditor() {
|
||
enableBtn();
|
||
UE.getEditor('editor');
|
||
};
|
||
function getAllHtml() {
|
||
document.getElementById("ctl00_MyContent_Hidd_myEditor").value = UE.getEditor('editor').getAllHtml();
|
||
alert(UE.getEditor('editor').getAllHtml());
|
||
}
|
||
function getContent() {
|
||
document.getElementById("ctl00_MyContent_Hidd_myEditor").value = UE.getEditor('editor').getContent();
|
||
}
|
||
function getPlainTxt() {
|
||
var arr = [];
|
||
arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
|
||
arr.push("内容为:");
|
||
arr.push(UE.getEditor('editor').getPlainTxt());
|
||
alert(arr.join('\n'))
|
||
}
|
||
function setContent(isAppendTo) {
|
||
//var arr = [];
|
||
//arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容");
|
||
UE.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo);
|
||
//alert(arr.join("\n"));
|
||
}
|
||
function setDisabled() {
|
||
UE.getEditor('editor').setDisabled('fullscreen');
|
||
disableBtn("enable");
|
||
}
|
||
|
||
function setEnabled() {
|
||
UE.getEditor('editor').setEnabled();
|
||
enableBtn();
|
||
}
|
||
|
||
function getText() {
|
||
//当你点击按钮时编辑区域已经失去了焦点,如果直接用getText将不会得到内容,所以要在选回来,然后取得内容
|
||
var range = UE.getEditor('editor').selection.getRange();
|
||
range.select();
|
||
var txt = UE.getEditor('editor').selection.getText();
|
||
alert(txt)
|
||
}
|
||
|
||
function getContentTxt() {
|
||
var arr = [];
|
||
arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
|
||
arr.push("编辑器的纯文本内容为:");
|
||
arr.push(UE.getEditor('editor').getContentTxt());
|
||
alert(arr.join("\n"));
|
||
}
|
||
function hasContent() {
|
||
var arr = [];
|
||
arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
|
||
arr.push("判断结果为:");
|
||
arr.push(UE.getEditor('editor').hasContents());
|
||
alert(arr.join("\n"));
|
||
}
|
||
function setFocus() {
|
||
UE.getEditor('editor').focus();
|
||
}
|
||
function deleteEditor() {
|
||
disableBtn();
|
||
UE.getEditor('editor').destroy();
|
||
}
|
||
function disableBtn(str) {
|
||
var div = document.getElementById('btns');
|
||
var btns = domUtils.getElementsByTagName(div, "button");
|
||
for (var i = 0, btn; btn = btns[i++]; ) {
|
||
if (btn.id == str) {
|
||
domUtils.removeAttributes(btn, ["disabled"]);
|
||
} else {
|
||
btn.setAttribute("disabled", "true");
|
||
}
|
||
}
|
||
}
|
||
function enableBtn() {
|
||
var div = document.getElementById('btns');
|
||
var btns = domUtils.getElementsByTagName(div, "button");
|
||
for (var i = 0, btn; btn = btns[i++]; ) {
|
||
domUtils.removeAttributes(btn, ["disabled"]);
|
||
}
|
||
}
|
||
|
||
function getLocalData() {
|
||
alert(UE.getEditor('editor').execCommand("getlocaldata"));
|
||
}
|
||
|
||
function clearLocalData() {
|
||
UE.getEditor('editor').execCommand("clearlocaldata");
|
||
alert("已清空草稿箱")
|
||
}
|
||
</script>
|
||
<script type="text/javascript">
|
||
|
||
|
||
$("#ap_category").hide();
|
||
|
||
</script>
|
||
</asp:Content>
|