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.
484 lines
16 KiB
Plaintext
484 lines
16 KiB
Plaintext
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DD_PriceEdit.aspx.cs" Inherits="TradeManageNew.DingDan.DD_PriceEdit" %>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<!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?a=1" />
|
||
|
<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?a=3445" 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/fancybox2.1/source/jquery.fancybox.css?v=2.1.5"
|
||
|
media="screen" />
|
||
|
<script type="text/javascript" src="../Scripts/fancybox2.1/lib/jquery.mousewheel-3.0.6.pack.js"></script>
|
||
|
<script type="text/javascript" src="../Scripts/fancybox2.1/source/jquery.fancybox.js?v=2.1.5"></script>
|
||
|
|
||
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript" src="../Scripts/highcharts.js"></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 Target = "";
|
||
|
var Id = 0;
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
$(document).ready(function () {
|
||
|
WindowLoadModel.ApplicationPath = "../";
|
||
|
WindowLoadModel.ControlID = "WindowLoad";
|
||
|
WindowLoadModel.Isbgiframe = true;
|
||
|
WindowLoadModel.Load();
|
||
|
ajaxInit(WindowLoadModel);
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
function fopen() {
|
||
|
|
||
|
$.fancybox({
|
||
|
'width': '40%',
|
||
|
'height': '40%',
|
||
|
'autoScale': false,
|
||
|
'transitionIn': 'elastic',
|
||
|
'transitionOut': 'elastic',
|
||
|
'href': '#test',
|
||
|
'onComplete': function () {
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
//#region 初始化DataGrid
|
||
|
function CreateDataGrid() {
|
||
|
|
||
|
var col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "收件人";
|
||
|
col.CellTemplate = "<span>{Bind name}</span>";
|
||
|
col.SortExpression = "name";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "国家";
|
||
|
col.CellTemplate = "<span>{Bind country}</span>";
|
||
|
col.SortExpression = "country";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "省,州";
|
||
|
//CommandName='cmdLook'
|
||
|
col.CellTemplate = "<a>{Bind provice}</a>";
|
||
|
col.SortExpression = "provice";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "城市";
|
||
|
col.CellTemplate = "<div>{Bind city}</div>";
|
||
|
col.Width = "200px";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "地址详情";
|
||
|
col.CellTemplate = "<div>{Bind addr}</div>";
|
||
|
col.Width = "200px";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "邮编";
|
||
|
col.CellTemplate = "<div>{Bind postcode}</div>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "电话/手机";
|
||
|
col.CellTemplate = "<div>{Bind phone}/{Bind mobile}</div>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "购买订单数";
|
||
|
col.SortExpression = "CountryName";
|
||
|
col.CellTemplate = "<span>{Bind ordernum}</span>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "购买总金额";
|
||
|
col.CellTemplate = "<span>{Bind orderprice}</span>";
|
||
|
col.SortExpression = "orderprice";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "地址加入时间";
|
||
|
col.CellTemplate = "<a>{Bind indate,yyyy-MM-dd}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "最近一次下单时间";
|
||
|
col.CellTemplate = "<a>{Bind lastdate,yyyy-MM-dd}</a>";
|
||
|
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "寄信次数";
|
||
|
col.CellTemplate = "<a>{Bind mailcount}</a>";
|
||
|
col.Width = "200px";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "最近一次寄信时间";
|
||
|
col.CellTemplate = "<a >{Bind maildate,yyyy-MM-dd}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
|
||
|
|
||
|
|
||
|
//col = new nblf.ui.DataGridColumn();
|
||
|
//col.HeaderText = "操作";
|
||
|
//col.Width = "100px";
|
||
|
//col.CellTemplate = "<input CommandName='cmdCF' class='btnClass dgbtnEdit' type='button' value='订单重发'></input> ";
|
||
|
//Array.add(datagrid1.Columns, col);
|
||
|
datagrid1.SetPageSize(50);
|
||
|
datagrid1.SetPageIndex(1);
|
||
|
|
||
|
datagrid1.SortExpression = "provice,city,addr";
|
||
|
datagrid1.ViewSortDirection = "desc";
|
||
|
datagrid1.IsFixHeader = false;
|
||
|
datagrid1.ShowIndexColumn = false;
|
||
|
datagrid1.AllowPaging = true;
|
||
|
// datagrid1.AllowPaging2 = true;
|
||
|
datagrid1.ShowIndexColumn = true;
|
||
|
datagrid1.Width = "100%";
|
||
|
datagrid1.SelectMode = nblf.ui.SelectMode.CheckBox;
|
||
|
datagrid1.Init();
|
||
|
datagrid1.Sorting(function () {
|
||
|
|
||
|
ReadData();
|
||
|
});
|
||
|
datagrid1.add_PageIndexChanged(function () { ReadData(); });
|
||
|
|
||
|
}
|
||
|
var PState = 0;
|
||
|
//#endregion
|
||
|
//#region 读取数据
|
||
|
function ReadData() {
|
||
|
|
||
|
var param = new Object();
|
||
|
param.name = $("#txt_name").val();
|
||
|
|
||
|
param.addr = $("#txt_addr").val();
|
||
|
param.jxcs = $("#select_mailcount").val();
|
||
|
|
||
|
param.snum = null;
|
||
|
param.endnum = null;
|
||
|
|
||
|
if ($("#txt_snum").val() != "")
|
||
|
param.snum = $("#txt_snum").val();
|
||
|
if ($("#txt_enum").val() != "")
|
||
|
param.endnum = $("#txt_enum").val();
|
||
|
param.sprice = null;
|
||
|
param.eprice = null;
|
||
|
|
||
|
if ($("#txt_sprice").val() != "")
|
||
|
param.sprice = $("#txt_sprice").val();
|
||
|
if ($("#txt_eprice").val() != "")
|
||
|
param.eprice = $("#txt_eprice").val();
|
||
|
|
||
|
param.StartDate = null;
|
||
|
if ($("#txt_StartDate").val() != "")
|
||
|
param.StartDate = $("#txt_StartDate").val();
|
||
|
param.StopDate = null;
|
||
|
if ($("#txtStopDate").val() != "")
|
||
|
param.StopDate = $("#txt_StopDate").val();
|
||
|
|
||
|
param.StartDate2 = null;
|
||
|
if ($("#txt_StartDate2").val() != "")
|
||
|
param.StartDate2 = $("#txt_StartDate2").val();
|
||
|
param.StopDate2 = null;
|
||
|
if ($("#txtStopDate2").val() != "")
|
||
|
param.StopDate2 = $("#txt_StopDate2").val();
|
||
|
|
||
|
|
||
|
param.StartDate3 = null;
|
||
|
if ($("#txt_StartDate3").val() != "")
|
||
|
param.StartDate = $("#txt_StartDate3").val();
|
||
|
param.StopDate3 = null;
|
||
|
if ($("#txtStopDate3").val() != "")
|
||
|
param.StopDate3 = $("#txt_StopDate3").val();
|
||
|
|
||
|
|
||
|
|
||
|
//string name, string addr, int jxcs, int? snum, int? endnum, decimal? sprice, decimal? eprice, DateTime? StartDate, DateTime? StopDate, DateTime? StartDate2, DateTime? StopDate2, DateTime? StartDate3, DateTime? StopDate3,string sort
|
||
|
param.PageSize = datagrid1.Get_PageSize();
|
||
|
param.PageIndex = datagrid1.Get_PageIndex();
|
||
|
param.Sort = datagrid1.SortExpression + " " + datagrid1.ViewSortDirection;
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../DD_OrderServiceNew.asmx/GetListAddr",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
datagrid1.Set_RowCount(data.d.RowCount);
|
||
|
datagrid1.DataBind(data.d.DataSource);
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
function GetTimediff(date1) {
|
||
|
// var date1= '2015/05/01 00:00:00'; //开始时间
|
||
|
var date2 = new Date(); //结束时间
|
||
|
var date3 = new Date(date1).getTime() - date2.getTime(); //时间差的毫秒数
|
||
|
//计算出相差天数
|
||
|
if (date3 <= 0)
|
||
|
return "0";
|
||
|
var days = Math.floor(date3 / (24 * 3600 * 1000))
|
||
|
|
||
|
//计算出小时数
|
||
|
var leave1 = date3 % (24 * 3600 * 1000) //计算天数后剩余的毫秒数
|
||
|
var hours = Math.floor(leave1 / (3600 * 1000))
|
||
|
|
||
|
return days + "天 " + hours + "小时";
|
||
|
|
||
|
|
||
|
}
|
||
|
function GetExcelData() {
|
||
|
var param = new Object();
|
||
|
|
||
|
param.IsDetail = 0;
|
||
|
if ($("#chk_pp").is(':checked') == true)
|
||
|
param.IsDetail = 1;
|
||
|
if ($("#select_plat").find("option").length > 0)
|
||
|
param.PlatType = $("#select_plat").val();
|
||
|
else
|
||
|
param.PlatType = 0;
|
||
|
if ($("#select_shop").find("option").length > 0)
|
||
|
param.ShopId = $("#select_shop").val();
|
||
|
else
|
||
|
param.ShopId = 0;
|
||
|
if ($("#txt_days").val() != "")
|
||
|
param.OutDays = $("#txt_days").val();
|
||
|
else
|
||
|
param.OutDays = 0;
|
||
|
param.DateType = $("#select_rqlx").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.TjType = $("#select_tj").val();
|
||
|
param.Name = $("#txt_Name").val();
|
||
|
param.MateState = $("#select_ppstate").val();
|
||
|
param.State = $("#select_fhstate").val();
|
||
|
param.PrintState = $("#select_printstate").val();
|
||
|
param.IsSku = 0;
|
||
|
param.MoneyState = $("#select_moneystate").val();
|
||
|
if ($("#chk_sku").is(':checked') == true)
|
||
|
param.IsSku = 1;
|
||
|
param.IsError = 0;
|
||
|
if ($("#chk_yc").is(':checked') == true)
|
||
|
param.IsError = 1;
|
||
|
param.HBOrder = 0;
|
||
|
if ($("#chk_hb").is(':checked') == true)
|
||
|
param.HBOrder = 1;
|
||
|
|
||
|
var fname = "订单导出.xls";
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "DD_OrderService.asmx/ExcelOrderData",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
params = { FilePath: data.d, FileName: fname };
|
||
|
|
||
|
window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
//#endregion
|
||
|
//#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);
|
||
|
if (model.State == 2) {
|
||
|
alert("该订单已经结束,无法删除");
|
||
|
return;
|
||
|
|
||
|
}
|
||
|
param.OrderId = model.OrderId;
|
||
|
|
||
|
$.ajax({
|
||
|
url: "DD_OrderService.asmx/DeleteOrder",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
alert("删除成功");
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
datagrid1.Del_Row(rowindex);
|
||
|
}
|
||
|
|
||
|
|
||
|
function Save() {
|
||
|
|
||
|
if ($("#txt_code").val()=="") {
|
||
|
alert("请输入货号");
|
||
|
return;
|
||
|
}
|
||
|
if ($("#txt_price").val() == "" && $("#txt_rate").val() == "") {
|
||
|
alert("请输入采购成本或者税率");
|
||
|
return;
|
||
|
}
|
||
|
var param = new Object();
|
||
|
|
||
|
//code,decimal? price,decimal? rate,DateTime? sdate,DateTime? edate
|
||
|
|
||
|
param.code = $("#txt_code").val();
|
||
|
param.price=-1;
|
||
|
if($("#txt_price").val()!="")
|
||
|
param.price = $("#txt_price").val();
|
||
|
|
||
|
param.rate=-1;
|
||
|
if($("#txt_rate").val()!="")
|
||
|
param.rate = $("#txt_rate").val();
|
||
|
param.sdate=null;
|
||
|
if($("#txt_StartDate").val()!="")
|
||
|
param.sdate = $("#txt_StartDate").val();
|
||
|
param.edate=null;
|
||
|
if($("#txt_StopDate").val()!="")
|
||
|
param.edate = $("#txt_StopDate").val();
|
||
|
|
||
|
$.ajax({
|
||
|
url: "../DD_OrderServiceNew.asmx/Save_GoodsPrice",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
if(data.d>0)
|
||
|
alert("修改完成");
|
||
|
else
|
||
|
alert("货号不存在");
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
</script>
|
||
|
|
||
|
</head>
|
||
|
<body class="headbody">
|
||
|
<div class="title_ico">
|
||
|
价格修正
|
||
|
</div>
|
||
|
|
||
|
<table id="tb1" class="tableAll" style="width: 100%;">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td class="f1" width="20%">货号:</td>
|
||
|
<td>
|
||
|
<input id="txt_code" class="editTextbox" style="width: 120px;" type="text" /></td>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
<tr>
|
||
|
|
||
|
<td class="f1">采购成本价格:</td>
|
||
|
<td>
|
||
|
<input id="txt_price" class="editTextbox" style="width: 120px;" type="text" />不填不修正采购成本价格</td>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td class="f1" >税率:</td>
|
||
|
<td>
|
||
|
<input id="txt_rate" class="editTextbox" style="width: 120px;" type="text" />% 不填不修正税率</td>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td class="f1">修正数据日期(入库日期):</td>
|
||
|
|
||
|
<td>
|
||
|
<input id="txt_StartDate" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />-<input id="txt_StopDate" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />不填表示修改这个货号所有库存的数据</td>
|
||
|
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" colspan=2>
|
||
|
|
||
|
<input id="btn_add" class="btnClass btnClassEdit" type="button" value="修正" onclick="Save()" /></td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</table>
|
||
|
|
||
|
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|