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.

494 lines
19 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShopClaimCaseData.aspx.cs" Inherits="TradeManageNew.TongJi.ShopClaimCaseData" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">
<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/jquery.min.js" type="text/javascript"></script>
<script src="../Scripts/MicrosoftAjax.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/WindowLoad.js" type="text/javascript"></script>
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox/jquery.fancybox-1.3.4.css"
media="screen" />
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
<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 type="text/javascript" src="../Scripts/highcharts.js"></script>
<script type="text/javascript" src="../Scripts/exporting.js"></script>
<script type="text/javascript">
var UserId = "<%=Session["UserId"]%>";
var WindowLoadModel = new WindowLoad();
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
$(document).ready(function () {
WindowLoadModel.ApplicationPath = "../";
WindowLoadModel.ControlID = "WindowLoad";
WindowLoadModel.Isbgiframe = true;
WindowLoadModel.Load();
ajaxInit(WindowLoadModel);
GetSelectShopList();
//ReadUser();
$("#txt_goodsPrice,#txt_refundPrice").MaskedTextBox();
$("#" + datagrid1.TableID + " [CommandName='cmdEdit']").live("click", function () {
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
var model = datagrid1.Get_Model(RowIndex);
Id = model.ID;
Clear();
$("#txt_InDate").val(model.SPDate);
$("#txt_orderCode").val(model.OrderCode);
$("#txt_goodscode").val(model.GoodsCodes);
if (model.IsAffectODR == "是") {
$('#r_yes').prop('checked', true);
}
else {
$('#r_no').prop('checked', true);
}
$("#txt_goodsPrice").val(model.GoodPrice);
$("#txt_refundPrice").val(model.RefundCustomerPrice);
$("#txt_spdetail").val(model.SPDetail);
$("#txt_contactAmazon").val(model.ContactAmazon);
$("#txt_contactCustomer").val(model.ContactCustomer);
$("#txt_remark").val(model.Remark);
fopen();
});
CreateDataGrid();
ReadData();
$("#btn_sch").bind("click", function () {
ReadData();
});
$("#btn_add").bind("click", function () {
Clear();
Id = 0;
fopen();
});
});
function Clear() {
$("#txt_InDate").val("");
$("#txt_orderCode").val("");
$("#txt_goodscode").val("");
$('#r_no').prop('checked', true);
$("#txt_goodsPrice").val("");
$("#txt_refundPrice").val("");
$("#txt_spdetail").val("");
$("#txt_contactAmazon").val("");
$("#txt_contactCustomer").val("");
$("#txt_remark").val("");
}
function fopen() {
$.fancybox({
'width': '40%',
'height': '40%',
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#test',
'onComplete': function () {
}
});
}
function CreateDataGrid() {
var col = new nblf.ui.DataGridColumn();
col = new nblf.ui.DataGridColumn();
col.HeaderText = "店铺";
col.CellTemplate = "<a>{Bind ShopName}</a>";
col.Width = "50px";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "负责人";
col.CellTemplate = "<a>{Bind UserName}</a>";
col.Width = "50px";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "订单号";
col.CellTemplate = "<a>{Bind OrderCode}</a>";
col.Width = "100px";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "索赔日期";
col.CellTemplate = "<a>{Bind SPDate}</a>";
col.Width = "100px";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "是否影响ODR";
col.CellTemplate = "<a>{Bind IsAffectODR}</a>";
col.Width = "20px";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "货号";
col.CellTemplate = "<a>{Bind GoodsCodes}</a>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "图片";
col.CellTemplate = "<a>{Bind Image}</a>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "金额($)";
col.CellTemplate = "<a>{Bind GoodPrice}</a>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "索赔详情";
col.CellTemplate = "<a class='truncated-text'>{Bind SPDetail}</a>";
col.Width="200px"
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "联系亚马逊";
col.CellTemplate = "<a class='truncated-text'>{Bind ContactAmazon}</a>";
col.Width = "200px"
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "退款卖家金额($)";
col.CellTemplate = "<a>{Bind RefundCustomerPrice}</a>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "联系买家";
col.CellTemplate = "<a class='truncated-text'>{Bind ContactCustomer}</a>";
col.Width = "200px"
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "备注";
col.CellTemplate = "<a class='truncated-text'>{Bind Remark}</a>";
col.Width = "200px"
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
col.Width = "180px";
col.CellTemplate = "<input CommandName='cmdEdit' class='btnClass dgbtnEdit' type='button' value='编辑'></input>&nbsp;<input onclick='DelCol(this)' class='btnClass dgbtnDel' type='button' value='删除'></input>";
Array.add(datagrid1.Columns, col);
datagrid1.SetPageSize(30);
datagrid1.SetPageIndex(1);
datagrid1.IsFixHeader = false;
datagrid1.ShowIndexColumn = true;
datagrid1.AllowPaging = true;
datagrid1.Width = "100%";
datagrid1.SelectMode = nblf.ui.SelectMode.None;
datagrid1.Init();
datagrid1.add_PageIndexChanged(function () { ReadData(); });
}
function ReadData() {
var param = new Object();
param.sDate = $("#stxtDate").val();
param.eDate = $("#etxtDate").val();
param.shopid = $("#select_shop").val();
//param.userid = $("#select_user").val();
param.searchType = $("#select-search").val();
param.searchTxt = $("#search_txt").val();
param.PageSize = datagrid1.Get_PageSize();
param.PageIndex = datagrid1.Get_PageIndex();
WindowLoadModel.Show();
$.ajax({
url: "../SysManageServiceNew.asmx/GetShopClaimCaseDatas",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
datagrid1.Set_RowCount(data.d.RowCount);
datagrid1.DataBind(data.d.DataSource);
$('.truncated-text').each(function () {
var text = $(this).text();
if (text.length > 100) {
var truncatedText = text.substring(0, 100) + '...';
$(this).text(truncatedText).attr('title', text);
}
})
}
});
}
function GetSelectShopList() {
$("#select_shop").empty();
$("#select_shop").append("<option value='0'>全部</option>");
var param = new Object();
param.DeptId = 0;
param.PlatType = 0;
WindowLoadModel.Show();
$.ajax({
url: "../BaseDataNew.asmx/GetShopListForTM",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false,
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 ReadUser() {
$("#select_user").append("<option value='0'>全部</option>");
$.ajax({
url: "../HuoWuServiceNew.asmx/GetListUserSelect",
success: function (data) {
$(data.d).each(function () {
$("#select_user").append("<option value='" + this.UserId + "'>" + this.Name + "</option>");
});
}
});
}
function save() {
if ($("#txt_InDate").val() == "") {
alert("请填写索赔日期");
return;
}
var md = new Object();
var param = new Object();
md.Id = Id;
md.SPDate = $("#txt_InDate").val();
if ($("#txt_orderCode").val() == "") {
alert("订单号不能为空");
return;
}
md.OrderCode = $("#txt_orderCode").val();
if ($('[name="odrRadio"]:checked').val() == "") {
alert("请选择是否影响ODR");
return;
}
md.IsAffectODR = $('[name="odrRadio"]:checked').val();
if ($("#txt_goodscode").val() == "") {
alert("货号不能为空");
return;
}
md.GoodsCodes = $("#txt_goodscode").val();
md.GoodPrice = $("#txt_goodsPrice").val();
md.RefundCustomerPrice = $('#txt_refundPrice').val();
md.SPDetail = $("#txt_spdetail").val();
md.ContactAmazon = $("#txt_contactAmazon").val();
md.ContactCustomer = $("#txt_contactCustomer").val();
md.Remark = $("#txt_remark").val();
param.Model = md;
WindowLoadModel.Show();
$.ajax({
url: "../SysManageServiceNew.asmx/SaveShopClaimCaseData",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
success: function (data) {
WindowLoadModel.Hide();
alert("保存成功");
ReadData();
$.fancybox.close();
}
});
}
//#region 删除
function DelCol(obj) {
if (window.confirm('确定要删除吗?') == false) return;
var rowindex = $(obj).parent().parent().attr("index");
var param = new Object();
var model = datagrid1.Get_Model(rowindex);
param.id = model.ID;
$.ajax({
url: "../SysManageServiceNew.asmx/DeleteShopClaimCaseData",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
success: function (data) {
alert("删除成功");
ReadData();
}
});
}
</script>
</head>
<style type="text/css">
.top-filter {
margin-left:100px;
}
.truncated-text {
overflow: hidden;
text-overflow: ellipsis;
max-width: 200px;
}
</style>
<body class="headbody">
<div style="display: none">
<div id="test" title="索赔信息" style="width: 1000px; height: 600px;">
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
<tr>
<td style="width: 110px;" class="f1">
<font color="red" style="font-weight: bolder">*</font>索赔日期:
</td>
<td>
<input id="txt_InDate" class="editTextbox" style="width: 120px;" type="text" onfocus="WdatePicker()" />
</td>
<td style="width: 110px;" class="f1">
<font color="red" style="font-weight: bolder">*</font>订单号:
</td>
<td>
<input id="txt_orderCode" class="editTextbox" style="width:75%;" type="text" />
</td>
</tr>
<tr>
<td style="width: 110px;" class="f1">
<font color="red" style="font-weight: bolder">*</font>是否影响ODR
</td>
<td>
<input type="radio" id="r_no" name="odrRadio" value="0" checked /><label for="r_no">否</label>
<input type="radio" id="r_yes" name="odrRadio" value="1" /><label for="r_yes">是</label>
</td>
<td style="width: 110px;" class="f1">
<font color="red" style="font-weight: bolder">*</font>货号:
</td>
<td>
<input id="txt_goodscode" class="editTextbox" style="width:75%;" type="text" placeholder="注意:多个货号用,隔开" />
</td>
</tr>
<tr>
<td style="width: 110px;" class="f1">
金额($)
</td>
<td>
<input id="txt_goodsPrice" min='0' max='1000000000' precision='2' class="editTextbox" style="width:75%;" type="text" />
</td>
<td style="width: 110px;" class="f1">
卖家退款($)
</td>
<td>
<input id="txt_refundPrice" min='0' max='1000000000' precision='2' class="editTextbox" style="width:75%;" type="text" />
</td>
</tr>
<tr>
<td style="width: 110px;" class="f1">
索赔详情:
</td>
<td>
<textarea name="textarea" id="txt_spdetail" cols="30" rows="10" style="width:75%;"></textarea>
</td>
<td style="width: 110px;" class="f1">
联系亚马逊:
</td>
<td>
<textarea name="textarea" id="txt_contactAmazon" cols="30" rows="10" style="width:75%;"></textarea>
</td>
</tr>
<tr>
<td style="width: 110px;" class="f1">
联系买家:
</td>
<td>
<textarea name="textarea" id="txt_contactCustomer" cols="30" rows="10" style="width:75%;"></textarea>
</td>
<td style="width: 110px;" class="f1">
备注:
</td>
<td>
<textarea name="textarea" id="txt_remark" cols="30" rows="10" style="width:75%;"></textarea>
</td>
</tr>
<tr>
<td align="center" colspan="4">
<input id="btn_Save" type="button" class="btnClass btnClassSave" value="保 存" onclick="save();" />
</td>
</tr>
</table>
</div>
</div>
<div class="title_ico">
广告分析
</div>
<table border="1" cellpadding="0" cellspacing="0" style="width: 99%;" align="center" class="tableAll">
<tr>
<td><span class="top-filter"> 索赔日期:<input id="stxtDate" class="editTextbox" style="width: 120px;" type="text" onfocus="WdatePicker()" autocomplete="off" />--<input id="etxtDate" class="editTextbox" style="width: 120px;" type="text" onfocus="WdatePicker()" autocomplete="off" /></span> <span class="top-filter">店铺:<select id="select_shop"></select></span>
<%-- <span class="top-filter">负责人:<select id="select_user"></select></span>--%>
<span class="top-filter">
<select id="select-search"><option value="0" selected>订单号</option><option value="1">货号</option><option value="2">索赔详情</option><option value="3">联系亚马逊</option><option value="4">联系买家</option><option value="5">备注</option></select><input type="text" id="search_txt" class="editTextbox"/>
</span>
</td>
<td><input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" /></td>
</tr>
<tr>
<td colspan="5" class="auto-style1">
<input id="btn_add" class="btnClass btnClassAdd" type="button" value="新增" />
</td>
</tr>
<tr>
<td valign="top" colspan="7">
<div id="DataGrid1" class="DataGridStyle">
</div>
</td>
</tr>
<tr>
<td valign="top" colspan="7">
</td>
</tr>
</table>
</body>
</html>