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.
608 lines
21 KiB
Plaintext
608 lines
21 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DD_OrderLeaveword.aspx.cs" Inherits="TradeManage.DingDan.DD_OrderLeaveword" %>
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<title>订单留言</title>
|
|
<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="../themes/New.css" />
|
|
<link rel="stylesheet" type="text/css" href="../themes/DataGrid.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" type="text/javascript"></script>
|
|
<script src="../Scripts/DataPager.js" type="text/javascript"></script>
|
|
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/Global.js" type="text/javascript"></script>
|
|
<script src="../Scripts/jquery.url.js" type="text/javascript"></script>
|
|
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
|
|
<script src="../Scripts/jquery.cookies.min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
|
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox/jquery.fancybox-1.3.4.css"
|
|
media="screen" />
|
|
<script type="text/javascript" src="../Scripts/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
|
|
<script type="text/javascript" src="../Scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
|
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
|
<script src="../Scripts/kindeditor/kindeditor-min.js" type="text/javascript"></script>
|
|
<script src="../Scripts/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
|
|
<script type="text/javascript">
|
|
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
var WindowLoadModel = new WindowLoad();
|
|
var ReadState = 0;
|
|
$(document).ready(function () {
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
WindowLoadModel.Isbgiframe = true;
|
|
WindowLoadModel.Load();
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
|
|
CreateDataGrid();
|
|
$("#btn_Cancel").click($.fancybox.close);
|
|
// GetBasePlat();
|
|
GetShopList();
|
|
$("#select_plat").bind("change", function () {
|
|
GetShopList();
|
|
});
|
|
$("#" + datagrid1.TableID + " [CommandName='cmdLook']").live("click", function () {
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
|
window.parent.addTab("订单查看", "DingDan/DD_OrderLookNew.aspx?Title=未读留言&OrderId=" + model.Oid, true);
|
|
|
|
});
|
|
ReadData();
|
|
$("#btn_tj1").bind("click", function () {
|
|
Clearcss();
|
|
ReadState = 0;
|
|
$(this).attr("class", "btnSelected");
|
|
|
|
ReadData();
|
|
});
|
|
$("#btn_tj2").bind("click", function () {
|
|
ReadState = 1;
|
|
Clearcss();
|
|
$(this).attr("class", "btnSelected");
|
|
ReadData();
|
|
});
|
|
$("#btn_tj3").bind("click", function () {
|
|
Clearcss();
|
|
ReadState = -1;
|
|
$(this).attr("class", "btnSelected");
|
|
|
|
ReadData();
|
|
});
|
|
$("#btn_sch").bind("click", function () {
|
|
ReadData();
|
|
|
|
});
|
|
|
|
$("#btn_Add").bind("click", function () {
|
|
var selectlist = datagrid1.GetSelectListModel();
|
|
if (selectlist == null || selectlist.length == 0) {
|
|
alert("请选择要回复的留言");
|
|
return;
|
|
}
|
|
fopen();
|
|
});
|
|
GetTempList();
|
|
$("#select_temp").bind("change", function () {
|
|
GetTempModel();
|
|
});
|
|
});
|
|
var KE;
|
|
|
|
//#region 创建富文本框
|
|
function CreateRichTextBox() {
|
|
|
|
|
|
KE = KindEditor.create('#txtContent', {
|
|
fileManagerJson: '../GlobalAshx/file_manager_json.ashx',
|
|
uploadJson: '../GlobalAshx/KindeditorUpload.ashx',
|
|
items: '[]',
|
|
allowFileManager: false
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
function fopen() {
|
|
|
|
$.fancybox({
|
|
'width': '40%',
|
|
'height': '40%',
|
|
'autoScale': false,
|
|
'transitionIn': 'elastic',
|
|
'transitionOut': 'elastic',
|
|
'href': '#test',
|
|
'onComplete': function () {
|
|
CreateRichTextBox();
|
|
},
|
|
'onCleanup': function () {
|
|
if (KE) {
|
|
KE.remove();
|
|
KE = null;
|
|
}
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
function GetTempModel() {
|
|
if ($("#select_temp").val() == "0") {
|
|
$("#btn_DelTemp").hide();
|
|
$("#txt_TempName").val("");
|
|
KE.html("");
|
|
return;
|
|
|
|
}
|
|
$("#btn_DelTemp").show();
|
|
var param = new Object();
|
|
|
|
|
|
param.Id = $("#select_temp").val();
|
|
|
|
|
|
$.ajax({
|
|
url: "../BaseData.asmx/GetLY_Templete",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
success: function (data) {
|
|
if (data.d != null) {
|
|
$("#txt_TempName").val(data.d.TempName);
|
|
//$("#txtContent").val(data.d.TempContent);
|
|
KE.html(data.d.TempContent);
|
|
}
|
|
|
|
}
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
function DelTemp() {
|
|
if ($("#select_temp").val() == "0") {
|
|
return;
|
|
|
|
}
|
|
|
|
var param = new Object();
|
|
|
|
|
|
param.Id = $("#select_temp").val();
|
|
|
|
|
|
$.ajax({
|
|
url: "../BaseData.asmx/DeleteLY_Templete",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
success: function (data) {
|
|
alert("删除成功");
|
|
GetTempList();
|
|
$("#btn_DelTemp").hide();
|
|
}
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
function SaveTemp() {
|
|
|
|
|
|
if ($("#txt_TempName").val() == "") {
|
|
alert("请输入模板名称");
|
|
return;
|
|
}
|
|
if (KE.text() == "") {
|
|
alert("请输入模板内容");
|
|
return;
|
|
}
|
|
var param = new Object();
|
|
|
|
var md = new Object();
|
|
md.TempName = $("#txt_TempName").val();
|
|
md.TempContent = KE.html();// $("#txtContent").val();
|
|
param.model = md;
|
|
|
|
|
|
$.ajax({
|
|
url: "../BaseData.asmx/SaveLY_Templete",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
success: function (data) {
|
|
|
|
alert("保存成功");
|
|
GetTempList();
|
|
$("#btn_DelTemp").hide();
|
|
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
function GetTempList() {
|
|
|
|
$("#select_temp").empty();
|
|
$("#select_temp").append("<option value='0'>-选择-</option>");
|
|
|
|
$.ajax({
|
|
url: "../BaseData.asmx/GetTempleteList",
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
success: function (data) {
|
|
if (data.d != null) {
|
|
$(data.d).each(function () {
|
|
|
|
$("#select_temp").append("<option value='" + this.Id + "'>" + this.TempName + "</option>");
|
|
});
|
|
}
|
|
|
|
}
|
|
});
|
|
|
|
|
|
|
|
}
|
|
function BackWord() {
|
|
var selectlist = datagrid1.GetSelectListModel();
|
|
if (selectlist == null || selectlist.length == 0) {
|
|
alert("请选择要回复留言的订单");
|
|
return;
|
|
}
|
|
if (KE.text() == "") {
|
|
alert("请输入要回复的内容");
|
|
return;
|
|
}
|
|
var param = new Object();
|
|
var list = new Array();
|
|
$(selectlist).each(function () {
|
|
if (this.PlatId == 1) {
|
|
var md = new Object();
|
|
md.OrderCode = this.OrderId;
|
|
md.OrderId = this.Oid;
|
|
md.ShopId = this.ShopId;
|
|
md.BackContent = KE.html();
|
|
Array.add(list, md);
|
|
}
|
|
|
|
});
|
|
|
|
|
|
param.list = list;
|
|
|
|
|
|
$.ajax({
|
|
url: "../BaseData.asmx/SaveLY_Content",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
success: function (data) {
|
|
|
|
alert("回复完成");
|
|
|
|
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
function Clearcss() {
|
|
|
|
|
|
$("#btn_tj1,#btn_tj2,#btn_tj3").attr("class", "btnUnSelected");
|
|
|
|
}
|
|
function ReadData() {
|
|
var param = new Object();
|
|
|
|
param.ReadState = ReadState;
|
|
if ($("#select_shop").find("option").length > 0)
|
|
param.ShopId = $("#select_shop").val();
|
|
else
|
|
param.ShopId = 0;
|
|
|
|
param.Content = $("#txt_Content").val();
|
|
param.SDate = null;
|
|
if ($("#txt_SDate").val() != "")
|
|
param.SDate = $("#txt_SDate").val();
|
|
param.EDate = null;
|
|
if ($("#txt_EDate").val() != "")
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
param.OrderCode = $("#txt_OrderCode").val();
|
|
|
|
param.State = $("#select_state").val();
|
|
|
|
|
|
param.PageSize = datagrid1.Get_PageSize();
|
|
param.PageIndex = datagrid1.Get_PageIndex();
|
|
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "DD_OrderService.asmx/GetListDT_Leaveword",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
datagrid1.Set_RowCount(data.d.RowCount);
|
|
datagrid1.DataBind(data.d.DataSource);
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
function GetBasePlat() {
|
|
|
|
$("#select_plat").append("<option value='0'>全部</option>");
|
|
var param = new Object();
|
|
param.CompanyID = 0;
|
|
param.KeyName = "ptlx";
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "../UserService.asmx/GetPlatBaseCode",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
|
|
if (data.d != null) {
|
|
$(data.d).each(function () {
|
|
$("#select_plat").append("<option value='" + this.SortNo + "'>" + this.Name + "</option>");
|
|
});
|
|
GetShopList();
|
|
}
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
function GetShopList() {
|
|
$("#select_shop").empty();
|
|
$("#select_shop").append("<option value='0'>全部</option>");
|
|
var param = new Object();
|
|
|
|
param.PlatType = 1;
|
|
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "../BaseData.asmx/GetShopList",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
|
|
if (data.d != null) {
|
|
$(data.d).each(function (i) {
|
|
$("#select_shop").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
|
|
});
|
|
|
|
}
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
function CreateDataGrid() {
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "读取状态";
|
|
col.CellTemplate = "<img src='{Bind readimg}' alt='{Bind readstate}' title='{Bind readstate}' style='cursor:pointer;' width='20px' height='20px'/>";
|
|
col.Width = "30px";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "留言内容";
|
|
col.CellTemplate = "<span>{Bind wordContent}</span>";
|
|
col.Width = "350px";
|
|
col.Align = "left";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "订单号";
|
|
col.CellTemplate = "<a CommandName='cmdLook' class='linka'>{Bind orderId}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "平台店铺";
|
|
col.CellTemplate = "<span>{Bind ShopName}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "留言日期(GMT+8)";
|
|
col.CellTemplate = "<span>{Bind wordCreateCN,yyyy-MM-dd HH:mm}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "订单状态";
|
|
col.CellTemplate = "<span>{Bind StateName}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "国家";
|
|
col.CellTemplate = "<span>{Bind CountryName}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "回复留言";
|
|
col.CellTemplate = "<a>{Bind backstate}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "操作";
|
|
col.Width = "100px";
|
|
col.CellTemplate = "<input CommandName='cmdLook' class='btnClass dgbtnView' type='button' value='详情'></input>";
|
|
Array.add(datagrid1.Columns, col);
|
|
datagrid1.SetPageSize(50);
|
|
datagrid1.SetPageIndex(1);
|
|
datagrid1.IsFixHeader = false;
|
|
datagrid1.ShowIndexColumn = false;
|
|
datagrid1.AllowPaging = true;
|
|
datagrid1.Width = "100%";
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.CheckBox;
|
|
datagrid1.Init();
|
|
datagrid1.add_PageIndexChanged(function () { ReadData(); });
|
|
|
|
}
|
|
function UpdateReadState()
|
|
{
|
|
var list = datagrid1.GetSelectListModel();
|
|
if (list == null || list.length == 0) {
|
|
alert("请选择要标记的留言");
|
|
return;
|
|
}
|
|
var param = new Object();
|
|
|
|
param.list = list;
|
|
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "DD_OrderService.asmx/UpdateLeavewordState",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
alert("标记成功");
|
|
ReadData();
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
</head>
|
|
<body class="headbody">
|
|
<div class="title_ico">
|
|
订单留言
|
|
</div>
|
|
<div style="display: none">
|
|
<div id="test" title="回复留言" style="width: 700px; height: 350px;">
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
<tr>
|
|
<td align="center" colspan="2">回复留言</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="f1" width="80px">
|
|
留言模板:
|
|
</td>
|
|
<td>
|
|
<select id="select_temp" class="selectClass" style="width:120px" name="D1">
|
|
|
|
</select> <input id="btn_DelTemp" type="button" class="btnClass btnClassDel" value="删除模板" onclick="DelTemp()" style="display:none"/>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="f1" width="80px">
|
|
模板名称:
|
|
</td>
|
|
<td>
|
|
<input id="txt_TempName" class="editTextbox" style="width:120px;" type="text" /><input id="btn_SaveTemp" type="button" class="btnClass btnClassSave" value="保存成新模板" onclick="SaveTemp();" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="left" colspan="2">
|
|
<textarea id="txtContent" style="width: 95%; height: 200px;"></textarea>
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td align="center" colspan="5">
|
|
<input id="btn_Save" type="button" class="btnClass btnClassSave" value="回 复" onclick="BackWord()"/> <input
|
|
id="btn_Cancel" type="button" class="btnClass btnClassClose" value="关 闭" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
<table id="tb1" class="tableAll" style="width: 100%;">
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td colspan="7">
|
|
<input id="btn_tj1" type="button" value="未读留言" class="btnSelected"/><input id="btn_tj2" class="btnUnSelected" type="button" value="已读留言" /><input id="btn_tj3" class="btnUnSelected" type="button" value="全部留言" /></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="f1" width="10%">店铺:</td>
|
|
<td width="18%">
|
|
<select id="select_shop" class="selectClass" name="D1" style="width:120px">
|
|
</select></td>
|
|
<td style="width: 12%;" class="f1">
|
|
留言时间:</td>
|
|
<td colspan="3">
|
|
<input id="txt_SDate" class="editTextbox" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" style="width: 150px;" type="text" />-<input id="txt_EDate" class="editTextbox" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" style="width: 150px;" type="text" /> </td>
|
|
|
|
|
|
|
|
<td>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="f1" width="10%">留言信息:</td>
|
|
<td width="25%">
|
|
<input id="txt_Content" class="editTextbox" style="width: 120px;" type="text" /></td>
|
|
<td style="width: 12%;" class="f1">
|
|
订单号:</td>
|
|
<td width="15%">
|
|
<input id="txt_OrderCode" class="editTextbox" style="width: 120px;" type="text" />
|
|
</td>
|
|
<td class="f1" style="width: 10%;">
|
|
订单状态:</td>
|
|
<td width="22%">
|
|
<select id="select_state" class="selectClass" style="width: 120px" name="D3">
|
|
<option value="-1">全部</option>
|
|
<option value="0">未发货</option>
|
|
<option value="1">已发货</option>
|
|
<option value="2">不能发货</option>
|
|
<option value="3">已结束订单</option>
|
|
<option value="4">取消订单</option>
|
|
</select></td>
|
|
|
|
<td>
|
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" /></td>
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td colspan="7">
|
|
<input id="btn_Add" class="btnClass btnClassAdd" type="button" value="批量回复" />
|
|
<input id="btn_Send" class="btnClass btnClassAdd" type="button" value="标记成已读" onclick="UpdateReadState()" /></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top" colspan="7">
|
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|