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.
415 lines
17 KiB
Plaintext
415 lines
17 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HW_GoodsUserList.aspx.cs" Inherits="TradeManageNew.CangKu.HW_GoodsUserList" %>
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head id="Head1" runat="server">
|
|
<link rel="stylesheet" type="text/css" href="../css2/icon.css">
|
|
<link rel="stylesheet" type="text/css" href="../css2/DataGrid.css" />
|
|
<link href="../css2/gray/easyui.css" rel="stylesheet" type="text/css" />
|
|
<link rel="stylesheet" href="../font-awesome/css/font-awesome.min.css" />
|
|
<link href="../css2/New.css?a=1" rel="stylesheet" type="text/css" />
|
|
<link rel="stylesheet" type="text/css" href="../themes/uploadify.css" />
|
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox/jquery.fancybox-1.3.4.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/Global2.js?t=1" type="text/javascript"></script>
|
|
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
|
|
<script src="../Scripts/My97DatePicker/WdatePicker.js?t=1"></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?t=1" type="text/javascript"></script>
|
|
<script type="text/javascript">
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
var WindowLoadModel = new WindowLoad();
|
|
var Model = null;
|
|
$(document).ready(function () {
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
WindowLoadModel.Load();
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
|
|
TableAveColWidth("MainTable");
|
|
|
|
CreateDataGrid();
|
|
GetStore();
|
|
GetShop();
|
|
ReadData();
|
|
GetSum();
|
|
|
|
|
|
$("#cmdGet").bind("click", function () {
|
|
|
|
ReadData();
|
|
GetSum();
|
|
});
|
|
|
|
|
|
|
|
$("#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(); }
|
|
CreateGetModel("MainTable", Model);
|
|
ShowFancybox("MainTable");
|
|
}
|
|
if (CommandName == "cmdDel") {
|
|
Delete(Model.Id);
|
|
}
|
|
});
|
|
|
|
});
|
|
//#endregion
|
|
function GetStore() {
|
|
|
|
|
|
//var param = new Object();
|
|
//param.StoreId = StoreId;
|
|
|
|
$.ajax({
|
|
url: "CK_Service.asmx/GetUseStoreHouse",
|
|
async: false,
|
|
//data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
// WindowLoadModel.Hide();
|
|
if (data.d != null) {
|
|
$(data.d).each(function () {
|
|
// $("#select_ck1").append("<option value='" + this.StoreId + "'>" + this.StoreName + "</option>");
|
|
$("#select_store").append("<option value='" + this.StoreId + "'>" + this.StoreName + "</option>");
|
|
});
|
|
|
|
}
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
//var slist;
|
|
function GetShop() {
|
|
|
|
$("#select_shop").append("<option value='0'>-全部-</option>");
|
|
var param = new Object();
|
|
param.CompanyId = 1;
|
|
param.PlatType = 0;
|
|
$.ajax({
|
|
url: "../SysManageServiceNew.asmx/GetShopList",
|
|
async: false,
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
|
|
if (data.d != null) {
|
|
$(data.d).each(function () {
|
|
// $("#select_ck1").append("<option value='" + this.StoreId + "'>" + this.StoreName + "</option>");
|
|
$("#select_shop").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
//#region 读取分类
|
|
//#region 初始化DataGrid
|
|
function CreateDataGrid() {
|
|
var col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "缩略图";
|
|
col.CellTemplate = "<a CommandName='cmdImg' class='linka'><img src='{Bind FirstImgUrl}' alt='' width='80px' height='80px'/></a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "编号";
|
|
col.CellTemplate = "<span>{Bind GoodsCode}</span><br/><span>{Bind SKU}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "仓库";
|
|
col.CellTemplate = "<span>{Bind StoreName}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "运营人员";
|
|
col.CellTemplate = "<span>{Bind ShopUser}</span>";
|
|
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 = "仓库库存数量";
|
|
col.CellTemplate = "<span>{Bind GoodsNum}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
// col = new nblf.ui.DataGridColumn();
|
|
// col.HeaderText = "认购数量";
|
|
// col.CellTemplate = "<span>{Bind InNum}</span>";
|
|
// Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "认购数量(未匹配)";
|
|
col.CellTemplate = "<span>{Bind NowNum}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "剩余立方";
|
|
col.CellTemplate = "<span>{Bind Solid}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
// col = new nblf.ui.DataGridColumn();
|
|
// col.HeaderText = "进价$";
|
|
// col.CellTemplate = "<span>{Bind InPrice}</span>";
|
|
// Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "总价值$";
|
|
col.CellTemplate = "<span>{Bind TotalPrice}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
// col = new nblf.ui.DataGridColumn();
|
|
// col.HeaderText = "销售单价$";
|
|
// col.CellTemplate = "<span>{Bind JYPrice}</span>";
|
|
// Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "未出单天数";
|
|
col.CellTemplate = "<span>{Bind OrderDays}</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 读取数据
|
|
function ReadData() {
|
|
var param = new Object();
|
|
//ShopId, int StoreId, int Num, string GoodsName
|
|
param.ShopId = $("#select_shop").val();
|
|
param.Num = 0;
|
|
if ($("#chk_left").is(":checked") == true)
|
|
param.Num = 1;
|
|
param.GoodsName = $("#txt_GoodsCode").val();
|
|
param.StoreId = $("#select_store").val();
|
|
param.PageIndex = datagrid1.Get_PageIndex();
|
|
param.PageSize = datagrid1.Get_PageSize();
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "CK_Service.asmx/GetAllShopGoods",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
datagrid1.Set_RowCount(data.d.RowCount);
|
|
datagrid1.DataBind(data.d.DataSource);
|
|
}
|
|
});
|
|
}
|
|
//#endregion
|
|
|
|
//#region 读取数据
|
|
function GetSum() {
|
|
var param = new Object();
|
|
//ShopId, int StoreId, int Num, string GoodsName
|
|
param.ShopId = $("#select_shop").val();
|
|
param.Num = 0;
|
|
if ($("#chk_left").is(":checked") == true)
|
|
param.Num = 1;
|
|
param.GoodsName = $("#txt_GoodsCode").val();
|
|
param.StoreId = $("#select_store").val();
|
|
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "CK_Service.asmx/GetAllShopGoodsSum",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
if (data.d != null) {
|
|
$("#a_hjkc").html(data.d.GoodsNum);
|
|
$("#a_hjrg").html(data.d.NowNum);
|
|
$("#a_hjlf").html(data.d.TSolid);
|
|
$("#a_hjje").html(data.d.JYPrice+"$");
|
|
|
|
}
|
|
}
|
|
});
|
|
}
|
|
//#endregion
|
|
//#region 删除
|
|
function Delete(Id) {
|
|
if (window.confirm("确定要删除吗?") == false) return;
|
|
var param = new Object();
|
|
param.Id = Id;
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "CK_Service.asmx/Delete_DayData",
|
|
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; }
|
|
var param = new Object();
|
|
param.Model = Model;
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "CK_Service.asmx/Save_DayData",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
ReadData();
|
|
alert("保存成功");
|
|
$.fancybox.close();
|
|
}
|
|
});
|
|
}
|
|
//#endregion
|
|
//#region 显示弹出窗体
|
|
function ShowFancybox(id) {
|
|
$.fancybox({
|
|
'scrolling': 'no',
|
|
'autoScale': false,
|
|
'transitionIn': 'elastic',
|
|
'transitionOut': 'elastic',
|
|
'href': '#' + id,
|
|
'onClosed': function () {
|
|
|
|
}
|
|
}, 0);
|
|
}
|
|
//#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 />
|
|
</colgroup>
|
|
<tr>
|
|
<td class="f1" >仓库</td>
|
|
<td><select id="select_store" class="selectClass" name="D21" style="width: 200px">
|
|
</select></td> <td class="f1" >店铺</td>
|
|
<td><select id="select_shop" class="selectClass" name="D21" style="width: 200px">
|
|
</select></td>
|
|
<td class="f1" >货物编号</td>
|
|
<td colspan=2><input id="txt_GoodsCode" type="text" style="width: 100px; " /><input id="chk_left"
|
|
type="checkbox" />只显示有剩余的<input id="cmdGet" type="button" value = "查询" /></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="7" align="right">
|
|
<input id="cmdAdd" type="button" value="导出数据" style="display:none"/> <font color="red">库存合计:<a id='a_hjkc'></a> 已认购(未匹配):<a id='a_hjrg'></a> 认购立方:<a id='a_hjlf'></a> 总价值:<a id='a_hjje'></a></font>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" colspan="7">
|
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div style="display: none;">
|
|
<div id="MainTable" title="编辑" style="width: 500px; height: auto;">
|
|
<table class="tableAll" style="width: 100%;">
|
|
<colgroup>
|
|
<col style="width: 80px;" />
|
|
<col style="width: 150px;" />
|
|
<col style="width: 80px;" />
|
|
<col style="width: 150px;" />
|
|
</colgroup>
|
|
|
|
<tr>
|
|
<td class="f1" >数据时间</td>
|
|
<td><input id='txtDataDate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" columnname="DataDate" columndesc="数据时间" columnrequired="true" validtype="" columnformat="yyyy-MM-dd" /></td>
|
|
|
|
<td class="f1" >面单数量</td>
|
|
<td><input id='txtLabelNum' type='text' style='width: 99%' precision="0" min="0" max="99999" columnname="LabelNum" columndesc="面单数量" columnrequired="false" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="f1" >扫单数量</td>
|
|
<td><input id='txtScanNum' type='text' style='width: 99%' precision="0" min="0" max="99999" columnname="ScanNum" columndesc="扫单数量" columnrequired="false" /></td>
|
|
|
|
<td class="f1" >未发货单数</td>
|
|
<td><input id='txtNoPostNum' type='text' style='width: 99%' precision="0" min="0" max="99999" columnname="NoPostNum" columndesc="未发货单数" columnrequired="false" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="f1" >退货单数</td>
|
|
<td><input id='txtBackNum' type='text' style='width: 99%' precision="0" min="0" max="99999" columnname="BackNum" columndesc="退货单数" columnrequired="false" /></td>
|
|
|
|
<td class="f1" >上班人数</td>
|
|
<td><input id='txtWorkNum' type='text' style='width: 99%' precision="0" min="0" max="99999" columnname="WorkNum" columndesc="上班人数" columnrequired="false" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="f1" >请假人员</td>
|
|
<td><input id='txtNote5' type='text' style='width: 99%' columnname="Note5" columndesc="请假人员" columnrequired="false" validtype="" /></td>
|
|
|
|
<td class="f1" >收现金</td>
|
|
<td>
|
|
<input id="txtCrash" type='text' style='width: 99%' precision="2" min="0" max="99999" columnname="Crash" columndesc="收现金" columnrequired="false" ></input></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="f1" >事项建议1</td>
|
|
<td colspan="3"><textarea id='txtNote1' style='width: 99%' columnname="Note1" columndesc="事项建议1" columnrequired="false" validtype="" cols="20" rows="3"></textarea></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="f1" >事项建议2</td>
|
|
<td colspan="3"><textarea id='txtNote2' style='width: 99%' columnname="Note2" columndesc="事项建议2" columnrequired="false" validtype="" cols="20" rows="3"></textarea></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="f1" >事项建议3</td>
|
|
<td colspan="3"><textarea id='txtNote3' style='width: 99%' columnname="Note3" columndesc="事项建议3" columnrequired="false" validtype="" cols="20" rows="3"></textarea></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="f1" >事项建议4</td>
|
|
<td colspan="3"><textarea id='txtNote4' style='width: 99%' columnname="Note4" columndesc="事项建议4" columnrequired="false" validtype="" cols="20" rows="3"></textarea></td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="4" align="center">
|
|
<input id="cmdSave" type="button" value="保存" />
|
|
<input id="cmdBack" type="button" value="返回" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|