You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

391 lines
13 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="cp_imagemanage.aspx.cs" Inherits="WinWooWeb.ProductManage.cp_imagemanage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="referrer" content="no-referrer">
<title>产品图片库</title>
<link href="../Scripts/autoselect/jquery.searchableSelect.css?a=2563" rel="stylesheet" type="text/css">
<script src="../Scripts/autoselect/jquery-1.11.1.min.js"></script>
<script src="../Scripts/autoselect/jquery.searchableSelect.js"></script>
<script src="../Scripts/datepicker/WdatePicker.js?t=1"></script>
<script type="text/javascript">
var jQuery_124 = $.noConflict(true);
</script>
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
<link rel="stylesheet" type="text/css" href="../css/New2.css?a=162344" />
<link rel="stylesheet" type="text/css" href="../themes/DataGrid.css?a=167" />
<link href="../css/ListNew2.css?a=133" rel="stylesheet" type="text/css" />
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="../Scripts/jquery.min.js" type="text/javascript"></script>
<script src="../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
<script src="../Scripts/DataGrid.js?a1=4538" type="text/javascript"></script>
<script src="../Scripts/DataPager.js" type="text/javascript"></script>
<script src="../Scripts/FixTable.js?a=1342" type="text/javascript"></script>
<script src="../Scripts/Global.js" type="text/javascript"></script>
<script src="../Scripts/WindowLoad.js?t=1" type="text/javascript"></script>
<link href="../Scripts/fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet" />
<script src="../Scripts/fancybox/jquery.fancybox-1.3.4.js" type="text/javascript"></script>
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
<script src="../Scripts/jquery.url.js" type="text/javascript"></script>
<script src="../Scripts/ComboCheckBox.js?t=15" type="text/javascript"></script>
<link rel="stylesheet" href="../Scripts/ztree/css/bootstrapStyle/bootstrapStyle.css" type="text/css">
<script type="text/javascript" src="../Scripts/ztree/js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="../Scripts/ztree/js/jquery.ztree.excheck.js"></script>
<script type="text/javascript" src="../Scripts/ztree/js/jquery.ztree.exedit.js"></script>
<script type="text/javascript">
function GetSort() {
$.ajax({
url: "cp_productservice.asmx/GetCPArea",
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
async: false,
success: function (data) {
if (data.d != null) {
$.fn.zTree.init($("#treeDemo"), setting, data.d);
}
}
});
}
function ReadData() {
var param = new Object();
param.PageSize = datagrid1.Get_PageSize();
param.PageIndex = datagrid1.Get_PageIndex();
param.sort = datagrid1.SortExpression + " " + datagrid1.ViewSortDirection;
WindowLoadModel.Show();
$.ajax({
url: "cp_productservice.asmx/GetListGoodsPlatInfo",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
datagrid1.Set_RowCount(data.d.RowCount);
datagrid1.DataBind(data.d.DataSource);
$("tr[index]").hover(function () {
$(this).find("td").css('background', '#FAF9D2');
}, function () {
$(this).find("td").css('background', '#fff');
});
}
});
}
var WindowLoadModel = new WindowLoad();
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
$(document).ready(function () {
WindowLoadModel.ApplicationPath = "../";
WindowLoadModel.Load();
ajaxInit(WindowLoadModel);
ajaxInit(null);
CreateDataGrid();
// ReadData();
$("#btn_sch").bind("click", function () {
ReadData();
});
$("#btn_add").bind("click", function () {
window.open("cp_imagelist.aspx");
});
$("#" + datagrid1.TableID + " input[CommandName='cmdLook']").live("click", function () {
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
var model = datagrid1.Get_Model(RowIndex);
window.open("cp_imagelist.aspx?code=" + model.Item_bh);
//window.location.href = "DD_OrderLook.aspx?OrderId=" + model.OrderId;
});
});
function ReadData() {
var param = new Object();
param.code = $("#txt_Name").val();
param.Img_from = $("#select_from").val();
param.PageSize = datagrid1.Get_PageSize();
param.PageIndex = datagrid1.Get_PageIndex();
param.sort = datagrid1.SortExpression + " " + datagrid1.ViewSortDirection;
WindowLoadModel.Show();
$.ajax({
url: "cp_productservice.asmx/GetListGoodsImg_List",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
datagrid1.Set_RowCount(data.d.RowCount);
datagrid1.DataBind(data.d.DataSource);
$("tr[index]").hover(function () {
$(this).find("td").css('background', '#FAF9D2');
}, function () {
$(this).find("td").css('background', '#fff');
});
}
});
}
var good_id = 0;
function fopen() {
$("#_fixTableHeader").hide();
$.fancybox({
'scrolling': 'no',
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#test',
'onClosed': function () {
}
}, 0);
}
//#region 初始化DataGrid
function CreateDataGrid() {
var col = new nblf.ui.DataGridColumn();
col.HeaderText = "图片";
col.CellTemplate = "<img src='{Bind Img_url}' width='150px' height='150px'/>";
col.SortExpression = "a.good_code";
col.Width = "160px";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "货号";
//CommandName='cmdLook'
col.CellTemplate = "<span>{Bind Item_bh}</span>";
col.SortExpression = "";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "对应平台";
//CommandName='cmdLook'
col.CellTemplate = "<span>{Bind pt_name}</span>";
col.SortExpression = "";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "图片来源";
//CommandName='cmdLook'
col.CellTemplate = "<span>{Bind Imgfromname}</span>";
col.SortExpression = "";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "图片类型";
//CommandName='cmdLook'
col.CellTemplate = "<span>{Bind mastername}</span>";
col.SortExpression = "";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "80px";
col.CellTemplate = "<input CommandName='cmdLook' class='layui-btn' type='button' value='查看详情'>";
Array.add(datagrid1.Columns, col);
datagrid1.SetPageSize(30);
datagrid1.SetPageIndex(1);
datagrid1.SortExpression = "";
datagrid1.ViewSortDirection = "";
datagrid1.IsFixHeader = false;
// datagrid1.Height = $(document).height() - 330;
datagrid1.ShowIndexColumn = true;
datagrid1.AllowPaging = true;
datagrid1.Width = "100%";
datagrid1.IsFixHeader = true;
datagrid1.Height = $(document).height() - 300;
datagrid1.SelectMode = nblf.ui.SelectMode.CheckBox;
datagrid1.Init();
datagrid1.Sorting(function () {
ReadData();
});
datagrid1.add_PageIndexChanged(function () { ReadData(); });
}
var newCount = 1;
function addHoverDom(treeId, treeNode) {
var sObj = $("#" + treeNode.tId + "_span");
if (treeNode.editNameFlag || $("#addBtn_" + treeNode.tId).length > 0) return;
var addStr = "<span class='button add' id='addBtn_" + treeNode.tId
+ "' title='add node' onfocus='this.blur();'></span>";
sObj.after(addStr);
var btn = $("#addBtn_" + treeNode.tId);
if (btn) btn.bind("click", function () {
var zTree = $.fn.zTree.getZTreeObj("treeDemo");
zTree.addNodes(treeNode, { id: (100 + newCount), pId: treeNode.id, name: "new node" + (newCount++) });
return false;
});
};
function removeHoverDom(treeId, treeNode) {
$("#addBtn_" + treeNode.tId).unbind().remove();
};
//-->
</script>
<style>
.td_f1 {
font-size: 11pt;
text-align: center;
}
</style>
</head>
<body class="headbody">
<div style="display: none">
<div id="test" title="货物图片" style="width: 400px; height: 300px;">
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
<tr>
<td align="center" class="td_f1" width="40%">
平台
</td> <td>
<select id="select_plat2" class="selectClass" style="width: 99%;" name="D8">
</select>
</td>
</tr>
<tr>
<td align="center" class="td_f1">
店铺
</td> <td>
<select id="select_shop2" class="selectClass" style="width: 99%;" name="D8">
</select>
</td>
</tr>
<tr>
<td align="center" class="td_f1">
引用刊登包模板
</td> <td>
<select id="select_shop3" class="selectClass" style="width: 99%;" name="D8">
</select>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="button" value="刊登发布" class="layui-btn" onclick="SaveOrderLJ();" />
</td>
</tr>
</table>
</div>
</div>
<table class="tableAll" style="width: 100%;">
<tr>
<td width="100%" valign="top">
<table id="tb1" class="tableAll" style="width: 100%;">
<%-- <tr>
<td colspan="7">
<input id="btn_goods" class="layui-btngray" type="button" value="产品库列表" />
<input statetype="2" class="layui-btn" type="button" value="我的刊登记录" />
</td>
</tr>--%>
<tr>
<td class="td_f1" width="10%">
货号</td>
<td>
<input id="txt_Name" class="editTextbox" style="width: 220px;" type="text" /></td>
<td class="td_f1" style="width: 10%;">图片来源</td>
<td width="15%">
<select id="select_from" class="selectClass" style="width: 120px" name="D22">
<option value="0">全部</option>
<option value="1">本地上传</option>
<option value="2">其他平台抓取</option>
</select></td>
<td></td>
<td colspan="2"><input id="btn_sch" class="layui-btnblue" type="button" value="搜索" />
&nbsp; &nbsp; &nbsp; &nbsp;
<input id="btn_bz23" class="layui-btn" type="button" value="导出excel" onclick="ExportExcel();" style="display:none"/>
</td>
</tr>
<tr>
<td colspan="7"><input id="btn_add" class="layui-btnblue" type="button" value="新增图片" />&nbsp;&nbsp;&nbsp; <input id="btn_excel0" class="layui-btnblue" type="button" value="打包图片" style="display:none" /></td>
</tr>
<tr>
<td valign="top" colspan="7">
<div id="DataGrid1" class="DataGridStyle" style="overflow: auto;"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>