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.

476 lines
20 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DD_OrderListWLSS.aspx.cs" Inherits="TradeManageNew.DingDan.DD_OrderListWLSS" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache, must-revalidate" />
<meta http-equiv="expires" content="0" />
<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="../Scripts2/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>
<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/LodopFuncs.js" type="text/javascript"></script>
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
<script type="text/javascript">
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
var WindowLoadModel = new WindowLoad();
var Model = null;
$(document).ready(function () {
WindowLoadModel.ApplicationPath = "../";
WindowLoadModel.Load();
ajaxInit(WindowLoadModel);
//var CurrentDate = new Date();
//$("#txt_StartDate").val(CurrentDate.localeFormat("yyyy-MM-01"));
//$("#txt_StopDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
$("#txtint1,#txtint2,#txtint3").MaskedTextBox();
TableAveColWidth("MainTable");
CreateDataGrid();
CreateDataGrid2();
ReadData();
$("#cmdAdd").click(function () {
Model = new Object();
Model.Id = 0;
Model.ListModel = new Array();
ClearControlValue("MainTable"); //清空内容
datagrid2.DataBind(Model.ListModel);
//var CurrentDate = new Date();
//$("#txtInDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
$("#SelectHtml").hide();
$("#MainTable").show();
});
$("#cmdGet").click(function () {
ReadData();
});
$("#cmdSave").click(function () {
Save();
});
$("#cmdBack").click(function () {
$("#SelectHtml").show();
$("#MainTable").hide();
});
$("#cmdAdd2").click(function () {
datagrid2.Add_NewRow();
});
$("#DataGrid1 [CommandName]").live("click", function () {
var CommandName = $(this).attr("CommandName");
var index = $(this).parentsUntil("tr").parent().attr("index");
Model = datagrid1.Get_Model(index);
if (CommandName == "cmdEdit") {
//有审核时用
//if (Model.State == 1 || Model.State == 2) { $("#cmdSave").hide(); }
//else { $("#cmdSave").show(); }
//if (Model.State == 2) { $("#tr1").show(); }
//else { $("#tr1").hide(); }
GetModel(Model.Id);
}
if (CommandName == "cmdDel") {
Delete(Model.Id);
//datagrid1.Del_Row(index);
}
});
$("#DataGrid2 [CommandName]").live("click", function () {
var CommandName = $(this).attr("CommandName");
var index = $(this).parentsUntil("tr").parent().attr("index");
if (CommandName == "cmdDel") {
datagrid2.Del_Row(index);
}
});
});
//#region 初始化DataGrid
function CreateDataGrid() {
col = new nblf.ui.DataGridColumn();
col.HeaderText = "orderid";
col.CellTemplate = "<span>{Bind OrderCode}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "trackcode";
col.CellTemplate = "<span>{Bind trackcode}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "ActualWeightAmount";
col.CellTemplate = "<span>{Bind ActualWeightAmount}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "RatedWeightAmount";
col.CellTemplate = "<span>{Bind RatedWeightAmount}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "ZoneCode";
col.CellTemplate = "<span>{Bind ZoneCode}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "sku";
col.CellTemplate = "<span>{Bind sku}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "NetChargeAmount";
col.CellTemplate = "<span>{Bind NetChargeAmount}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "estimatefee";
col.CellTemplate = "<span>{Bind estimatefee}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "bigdifference";
col.CellTemplate = "<span>{Bind bigdifference}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "appeal status";
col.CellTemplate = "<span>{Bind int1}</span>";
col.CellFormatter = function (value) {
switch (value) {
case 0: return "No appeal";
case 1: return "Appealing";
case 2: return "Successful appeal";
case 3: return "Appeal failed";
}
};
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "result";
col.CellTemplate = "<span>{Bind result}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "";
col.Width = "160px";
col.CellTemplate = "<span CommandName='cmdEdit' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>Edit</span>";
Array.add(datagrid1.Columns, col);
//datagrid1.SetPageSize(20);
datagrid1.IsFixHeader = false;
datagrid1.ShowIndexColumn = false;
datagrid1.AllowPaging = true;
datagrid1.Width = "100%";
datagrid1.SelectMode = nblf.ui.SelectMode.None;
datagrid1.Init();
datagrid1.add_PageIndexChanged(function () { ReadData(); });
}
//#endregion
//#region 初始化DataGrid2
function CreateDataGrid2() {
col = new nblf.ui.DataGridColumn();
col.HeaderText = "TrackingIDChargDescription";
col.CellTemplate = "<span>{Bind TrackingIDChargDescription}</span>";
Array.add(datagrid2.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "TrackingIDChargeAmount";
col.CellTemplate = "<span>{Bind TrackingIDChargeAmount}</span>";
Array.add(datagrid2.Columns, col);
// col = new nblf.ui.DataGridColumn();
// col.HeaderText = "操作";
// col.Width = "80px";
// col.CellTemplate = "<span CommandName='cmdDel' style='color: #0000FF;cursor:pointer;text-decoration: underline;'>删除</span>";
// Array.add(datagrid2.Columns, col);
//datagrid2.SetPageSize(20);
datagrid2.IsFixHeader = false;
datagrid2.ShowIndexColumn = false;
datagrid2.AllowPaging = false;
datagrid2.Width = "100%";
datagrid2.SelectMode = nblf.ui.SelectMode.None;
datagrid2.Init();
datagrid2.add_PageIndexChanged(function () { ReadData(); });
}
//#endregion
//#region 读取数据
function ReadData() {
var param = new Object();
CreateWhere("SelectHtml", param); //读取查询条件
param.cs = Base64.encode(param.cs);
param.PageIndex = datagrid1.Get_PageIndex();
param.PageSize = datagrid1.Get_PageSize();
$.ajax({
url: "../DD_OrderServiceNew.asmx/GetListPostVote",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
datagrid1.Set_RowCount(data.d.RowCount);
datagrid1.DataBind(data.d.DataSource);
}
});
}
//#endregion
//#region 显示弹出窗体
function ShowFancybox(id) {
$.fancybox({
'scrolling': 'no',
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#' + id,
'onClosed': function () {
}
}, 0);
}
//#endregion
//#region 读取明细
function GetModel(Id) {
var param = new Object();
param.Id = Id;
$.ajax({
url: "../DD_OrderServiceNew.asmx/GetModel_PostVote2",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
if (data.d == null) return;
Model = data.d;
CreateGetModel("MainTable", Model);
datagrid2.DataBind(Model.list);
ShowFancybox("MainTable");
}
});
}
//#endregion
//#region 删除
function Delete(Id) {
if (window.confirm("确定要删除吗?") == false) return;
var param = new Object();
param.Id = Id;
WindowLoadModel.Show();
$.ajax({
url: "XXX.asmx/Delete_PostVote",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
if (data.d == false) { alert("已经使用过,无法删除"); return; }
ReadData(); //刷新DataGrid
}
});
}
//#endregion
//#region 保存
function Save() {
var error = CreateSaveModel("MainTable", Model);
if (error != "") { alert(error); return; }
error = datagrid2.UpdateDataSource();
if (error != "") { alert(error); return; }
var param = new Object();
param.Model = Model;
WindowLoadModel.Show();
$.ajax({
url: "../DD_OrderServiceNew.asmx/Save_PostVote2",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
ReadData();
alert("保存成功");
$.fancybox.close();
}
});
}
//#endregion
</script>
</head>
<body>
<table id="SelectHtml" border="1" cellpadding="0" cellspacing="0" align="center" style="width: 100%"
class="tableAll">
<colgroup>
<col style="width: 60px;" />
<col style="width: 240px;" />
<col style="width: 60px;" />
<col style="width: 120px;" />
<col style="width: 60px;" />
<col style="width: 120px;" />
<col style="width: 60px;" />
<col style="width: 120px;" />
<col />
</colgroup>
<tr>
<td class="f1" >orderid</td>
<td><input id='txt_OrderId' type='text' style='width: 99%' where="b.platordercode like '%@value%'"/></td>
<td class="f1" >trackcode</td>
<td><input id='txt_trackcode' type='text' style='width: 99%' where="a.trackcode like '%@value%'"/></td>
<td class="f1" >appeal status</td>
<td colspan="3"> <select id="select1" where="a.int1 like '%@value%'">
<option value="-1">all</option>
<option value="0">No appeal</option>
<option value="1">Appealing</option>
<option value="2">Successful appeal</option>
<option value="3">Appeal failed</option>
</select></td>
<td><input id="cmdGet" type="button" value = "Query" class="btnClass btnClassEdit" /></td>
</tr>
<tr style="display:none">
<td colspan="9">
<input id="cmdAdd" type="button" value="新增" />
</td>
</tr>
<tr>
<td valign="top" colspan="9">
<div id="DataGrid1" class="DataGridStyle"></div>
</td>
</tr>
</table>
<div style="display: none;">
<div id="MainTable" title="编辑" style="width: 950px; height: auto;">
<table class="tableAll" style="width: 100%;">
<colgroup>
<col style="width:80px;" />
<col />
<col style="width:80px;" />
<col />
<col style="width:80px;" />
<col />
<col style="width:80px;" />
<col />
</colgroup>
<tr>
<td class="f1" >OrderId</td>
<td><input id='Text1' type='text' style='width: 99%' columnname="OrderCode" columndesc="trackcode" columnrequired="false" validtype="" /></td>
<td class="f1" >ActualWeightAmount</td>
<td><input id='txtActualWeightAmount' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="ActualWeightAmount" columndesc="ActualWeightAmount" columnrequired="false" /></td>
<td class="f1" >ActualWeightUnits</td>
<td><input id='txtActualWeightUnits' type='text' style='width: 99%' columnname="ActualWeightUnits" columndesc="ActualWeightUnits" columnrequired="false" validtype="" /></td>
</tr>
<tr>
<td class="f1" >RatedWeightAmount</td>
<td><input id='txtRatedWeightAmount' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="RatedWeightAmount" columndesc="RatedWeightAmount" columnrequired="false" /></td>
<td class="f1" >RatedWeightUnits</td>
<td><input id='txtRatedWeightUnits' type='text' style='width: 99%' columnname="RatedWeightUnits" columndesc="RatedWeightUnits" columnrequired="false" validtype="" /></td>
<td class="f1" >DimLength</td>
<td><input id='txtDimLength' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="DimLength" columndesc="DimLength" columnrequired="false" /></td>
<td class="f1" >DimWidth</td>
<td><input id='Text2' type='text' style='width: 99%' columnname="DimWidth" columndesc="DimWidth" columnrequired="false" validtype="" /></td>
</tr>
<tr>
<td class="f1" >DimHeight</td>
<td><input id='txtDimHeight' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="DimHeight" columndesc="DimHeight" columnrequired="false" /></td>
<td class="f1" >DimDivisor</td>
<td><input id='txtDimDivisor' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="DimDivisor" columndesc="DimDivisor" columnrequired="false" /></td>
<td class="f1" >DimUnit</td>
<td><input id='txtDimUnit' type='text' style='width: 99%' columnname="DimUnit" columndesc="DimUnit" columnrequired="false" validtype="" /></td>
<td class="f1" >ZoneCode</td>
<td><input id='txtZoneCode' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="ZoneCode" columndesc="ZoneCode" columnrequired="false" /></td>
</tr>
<tr>
<td class="f1" >bigdifference</td>
<td><input id='txtbigdifference' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="bigdifference" columndesc="bigdifference" columnrequired="false" /></td>
<td class="f1" >sku</td>
<td><input id='txtsku' type='text' style='width: 99%' columnname="sku" columndesc="sku" columnrequired="false" validtype="" /></td>
<td class="f1" >indate</td>
<td><input id='txtindate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" columnname="indate" columndesc="indate" columnrequired="false" validtype="" columnformat="yyyy-MM-dd" /></td>
</tr>
<tr>
<td class="f1" >NetChargeAmount</td>
<td><input id='txtNetChargeAmount' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="NetChargeAmount" columndesc="NetChargeAmount" columnrequired="false" /></td>
<td class="f1" >estimatefee</td>
<td><input id='txtestimatefee' type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="estimatefee" columndesc="estimatefee" columnrequired="false" /></td>
<td class="f1" >Tracking ID</td>
<td colspan="3"><input id='txttrackcode' type='text' style='width: 99%' columnname="trackcode" columndesc="trackcode" columnrequired="false" validtype="" /></td>
</tr>
<%--<tr>
<td colspan="8">
<input id="cmdAdd2" type="button" value="新增" />
</td>
</tr>--%>
<tr>
<td valign="top" colspan="8">
<div id="DataGrid2" class="DataGridStyle"></div>
</td>
</tr>
<tr>
<td class="f1" ><font color="red">*</font>appeal status</td>
<td colspan="7"> <select id="select_int1" columnname="int1" columndesc="appeal status" columnrequired="false">
<option value="0">No appeal</option>
<option value="1">Appealing</option>
<option value="2">Successful appeal</option>
<option value="3">Appeal failed</option>
</select></td>
</tr>
<tr>
<td class="f1" ><font color="red">*</font>result(remarks)</td>
<td colspan="7"> <textarea id="txtresult" cols="20" rows="3" columnname="result" columndesc="result" columnrequired="false" validtype="" style="width: 100%"></textarea></td>
</tr>
<tr>
<td colspan="8" style="text-align: center;">
<input id="cmdSave" type="button" value="Save" class="btnClass btnClassEdit" />
</td>
</tr>
</table>
</div>
</div>
</body>
</html>