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.
535 lines
20 KiB
Plaintext
535 lines
20 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CG_ChaseHWCList3.aspx.cs" Inherits="TradeManage.CaiGou.CG_ChaseHWCList3" %>
|
|
|
|
|
|
<!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="../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=11" rel="stylesheet" type="text/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/DateBox.js" type="text/javascript"></script>
|
|
<script src="../Scripts/FixTable.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>
|
|
<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 src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
|
|
<script type="text/javascript">
|
|
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
|
|
var WindowLoadModel = new WindowLoad();
|
|
var DHState = 0;
|
|
$(document).ready(function () {
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
WindowLoadModel.Isbgiframe = true;
|
|
WindowLoadModel.Load();
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
GetCompanyList();
|
|
CreateDataGrid();
|
|
|
|
$("#select_company").change(function(){
|
|
|
|
ReadData();
|
|
|
|
|
|
});
|
|
|
|
$("#" + datagrid1.TableID + " [CommandName='cmdLook']").live("click", function () {
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
|
// window.location.href = "CG_ChaseLook.aspx?ChaseId=" + model.ChaseId;
|
|
//if(model.State==3)
|
|
//window.parent.addTab("采购单", "CaiGou/CG_ChaseLookForTM.aspx?Check=Edit&Title=采购入库&ChaseId=" + model.ChaseId, true);
|
|
//else
|
|
//var kw = "0";
|
|
// if ($("#txt_kwcode").val() != "")
|
|
// kw = $("#txt_kwcode").val();
|
|
|
|
window.parent.addTab("", "海外仓入库", "CaiGou/CG_ChaseInHouseAddHWC.aspx?Title=海外仓入库&ChaseId=" + model.ChaseId, true);
|
|
|
|
});
|
|
$("#" + datagrid1.TableID + " [CommandName='cmdEdit']").live("click", function () {
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
|
// window.location.href = "CG_ChaseLook.aspx?ChaseId=" + model.ChaseId;
|
|
//if(model.State==3)
|
|
//window.parent.addTab("采购单", "CaiGou/CG_ChaseLookForTM.aspx?Check=Edit&Title=采购入库&ChaseId=" + model.ChaseId, true);
|
|
//else
|
|
//var kw = "0";
|
|
// if ($("#txt_kwcode").val() != "")
|
|
// kw = $("#txt_kwcode").val();
|
|
|
|
window.parent.addTab("海外仓出运", "CaiGou/CG_ChaseAddForHWC.aspx?Title=海外仓出运&ChaseId=" + model.ChaseId, true);
|
|
|
|
});
|
|
//$("#" + datagrid1.TableID + " a[cid]").live("click", function () {
|
|
|
|
//});
|
|
|
|
$("#btn_add").bind("click", function () {
|
|
window.location = "CG_ChaseAddForHWC.aspx";
|
|
});
|
|
$("#select_state").live("change", function () {
|
|
ReadData();
|
|
});
|
|
$("#btn_sch,#chk_mx,#chk_gc,#chk_bh,#chk_wr,#chk_dhyc").bind("click", function () {
|
|
|
|
ReadData();
|
|
});
|
|
|
|
ReadData();
|
|
|
|
|
|
|
|
});
|
|
|
|
function GetCompanyList() {
|
|
|
|
// $("#select_company").append("<option value='0'>选择</option>")
|
|
|
|
$.ajax({
|
|
url: "../SysManageServiceNew.asmx/GetListCompany3",
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
if (data.d != null) {
|
|
$(data.d).each(function () {
|
|
$("#select_company").append("<option value='" + this.ID + "'>" + this.Name + "</option>")
|
|
|
|
});
|
|
}
|
|
|
|
|
|
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
function ReadBuyUser() {
|
|
$("#select_gmzh").append("<option value='0'>全部</option>");
|
|
var param = new Object();
|
|
param.CompanyID = 0;
|
|
param.KeyName = "cgzh";
|
|
$.ajax({
|
|
url: "../UserService.asmx/GetListBaseCode",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
async: false,
|
|
success: function (data) {
|
|
if (data.d != null) {
|
|
$(data.d).each(function () {
|
|
$("#select_gmzh").append("<option value='" + this.Name + "'>" + this.Name + "</option>");
|
|
});
|
|
|
|
}
|
|
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
function Clearcss() {
|
|
|
|
$("#btn_tj1,#btn_tj2,#btn_tj3,#btn_tj4").attr("class", "btnUnSelected");
|
|
|
|
}
|
|
function AddTr() {
|
|
|
|
$("#" + datagrid1.TableID + " tr").each(function (i) {
|
|
if (i > 0) {
|
|
var shtmls = "<tr><td colspan='11'>";
|
|
|
|
var index = $(this).attr("index");
|
|
var md = datagrid1.Get_Model(index);
|
|
if (md.GoodsList != null) {
|
|
shtmls += "<table width='100%' class='trTable'><tr><td width='780px' style='font-weight:bolder;font-size:13pt;' align='left'>";
|
|
$(md.GoodsList).each(function () {
|
|
var imgs = "";
|
|
var Num = parseInt(this.GoodsNum) - parseInt(this.InGoodsNum);
|
|
if ($("#chk_wr").is(":checked") == false || Num > 0) {
|
|
if ($("#chk_image").is(":checked") == true && this.FirstImgUrl != null && this.FirstImgUrl != "")
|
|
imgs = "<img src='" + this.FirstImgUrl + "' alt='' width='50px' height='50px'/>";
|
|
shtmls += "" + imgs + "<span><a style='cursor: pointer; text-decoration: underline; color: Blue;font-weight:normal;' onclick='LinkGoods(" + this.GoodsId + ")'>" + this.GoodsCode + " " + this.GoodsOldCode + " " + this.GoodsName + " " + this.TypeCode + " </a> </span>[<span class='ms'>" + this.TypeDesc + "</span>] <span>" + Num + "</span><br/>";
|
|
}
|
|
});
|
|
|
|
}
|
|
shtmls += "</td></tr></table></td><tr>";
|
|
$(this).after(shtmls);
|
|
$(".ms").each(function () {
|
|
var cc = jQuery.trim($(this).html());
|
|
if ($(this).html() != "") {
|
|
var cl = cc.substr(cc.length - 1, 1);
|
|
if (cl == "一" || cl == "二" || cl == "三") {
|
|
$(this).css("color", "red");
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
function LinkGoods(GId) {
|
|
window.parent.addTab("货物编辑", "HuoWu/HW_GoodsAddForTM.aspx?Title=入库查询&GoodsId=" + GId, true);
|
|
}
|
|
|
|
function GetPostion() {
|
|
$("#select_postion").html("<option value='0'>选择</option>");
|
|
|
|
var param = new Object();
|
|
param.StoreId = 0;
|
|
param.IsLS = 1;
|
|
|
|
$.ajax({
|
|
url: "../CangKu/CangKuServer.asmx/GetStorePostionForTM",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
|
|
$(data.d).each(function () {
|
|
|
|
$("#select_postion").append("<option value='" + this.PostionId + "'>" + this.PostionCode + "</option>");
|
|
});
|
|
|
|
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
function fopen() {
|
|
|
|
$.fancybox({
|
|
'width': '40%',
|
|
'height': '40%',
|
|
'autoScale': false,
|
|
'transitionIn': 'elastic',
|
|
'transitionOut': 'elastic',
|
|
'href': '#test',
|
|
'onComplete': function () {
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
//#endregion
|
|
//#region 初始化DataGrid
|
|
function CreateDataGrid() {
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "批次号";
|
|
col.CellTemplate = "<a CommandName='cmdEdit' class='linka'>{Bind ChaseCode}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "出运单号";
|
|
col.CellTemplate = "<a CommandName='cmdEdit' class='linka'>{Bind BuyCode}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "建立日期";
|
|
col.CreateFieldSpan("InDate", "yyyy-MM-dd HH:mm");
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "出运日期";
|
|
col.CreateFieldSpan("BuyDate", "yyyy-MM-dd HH:mm");
|
|
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 TSoild}立方</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "头程费";
|
|
col.CellTemplate = "<span>{Bind TCFee5}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "出运状态";
|
|
col.CellTemplate = "<a no='revice'>{Bind ReveState}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "备注";
|
|
col.Align = "left";
|
|
col.Width = "150px";
|
|
col.CellTemplate = "<div style='width:150px;word-break:break-all;' title='{Bind ErrorInfo}'>{Bind SimpErrorInfo}</div>"; //<a class='linka' cid='{Bind ChaseId}' einfo='{Bind ErrorInfo}'>提醒</a>
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "操作";
|
|
col.Width = "100px";
|
|
col.CellTemplate = "<input CommandName='cmdLook' class='btnClass dgbtnEdit' type='button' value='入库'></input>";
|
|
Array.add(datagrid1.Columns, col);
|
|
datagrid1.SetPageSize(30);
|
|
datagrid1.SetPageIndex(1);
|
|
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(); });
|
|
|
|
}
|
|
//#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.ReveState == "部分入库" || model.ReveState == "全部入库") {
|
|
|
|
alert("货物有入库了,不能删除");
|
|
return;
|
|
}
|
|
param.ChaseId = model.ChaseId;
|
|
|
|
$.ajax({
|
|
url: "CaiGouService.asmx/DeleteHWCGoods",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
success: function (data) {
|
|
|
|
alert("已删除");
|
|
ReadData();
|
|
|
|
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
function InCol(obj) {
|
|
if ($("#txt_kwcode").val() == "") {
|
|
alert("请填写存放地点");
|
|
$("#txt_kwcode").focus();
|
|
return;
|
|
}
|
|
if (window.confirm('直接入库表示货物全部到齐且没有异常,确定要直接入库吗?') == false) return;
|
|
var rowindex = $(obj).parent().parent().attr("index");
|
|
var param = new Object();
|
|
var model = datagrid1.Get_Model(rowindex);
|
|
|
|
param.ChaseId = model.ChaseId;
|
|
param.PostionCode = $("#txt_kwcode").val();
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "CaiGouService.asmx/ChaseInStoreForTM",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
if (data.d == 0) {
|
|
alert("入库库位编码不正确");
|
|
}
|
|
else if (data.d == 1) {
|
|
alert("该采购单已经有入库记录,不能直接入库,可以点击到货");
|
|
}
|
|
else {
|
|
alert("入库成功");
|
|
ReadData();
|
|
}
|
|
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
//#endregion
|
|
//#region 读取数据
|
|
function ReadData() {
|
|
|
|
var param = new Object();
|
|
param.DHState = $("#select_wlzt").val();
|
|
param.ChaseCode = $("#txt_cgdh").val();
|
|
param.CompanyId = $("#select_company").val();
|
|
|
|
param.SDate = null;
|
|
if ($("#txt_SDate").val() != "")
|
|
param.SDate = $("#txt_SDate").val();
|
|
//param.State = $("#select_state").val();
|
|
|
|
|
|
param.EDate = null;
|
|
if ($("#txt_EDate").val() != "")
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
param.SRKDate = null;
|
|
if ($("#txt_SRKDate").val() != "")
|
|
param.SRKDate = $("#txt_SRKDate").val();
|
|
param.ERKDate = null;
|
|
if ($("#txt_ERKDate").val() != "")
|
|
param.ERKDate = $("#txt_ERKDate").val();
|
|
|
|
|
|
param.PageSize = datagrid1.Get_PageSize();
|
|
param.PageIndex = datagrid1.Get_PageIndex();
|
|
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "CaiGouService.asmx/GetListCG_InchaseForHWC2",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
datagrid1.Set_RowCount(data.d.RowCount);
|
|
datagrid1.DataBind(data.d.DataSource);
|
|
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
function EditCol(obj) {
|
|
|
|
var rowindex = $(obj).parent().parent().attr("index");
|
|
|
|
var model = datagrid1.Get_Model(rowindex);
|
|
|
|
var ChaseId = model.ChaseId;
|
|
//if ($(obj).val() == "查看")
|
|
// window.parent.addTab("采购单", "CaiGou/CG_ChaseLookForTM.aspx?IsCheck=Edit&Title=采购入库&ChaseId=" + model.ChaseId, true);
|
|
// //window.location.href = "CG_ChaseLook.aspx?ChaseId=" + model.ChaseId;
|
|
//else
|
|
// var kw = "0";
|
|
// if ($("#txt_kwcode").val() != "")
|
|
// kw = $("#txt_kwcode").val();
|
|
window.parent.addTab("海外仓入库", "CaiGou/CG_ChaseInHouseAdd2.aspx?Title=海外仓入库&ChaseId=" + model.ChaseId, true);
|
|
// window.location = "CG_ChaseInHouseAdd.aspx?ChaseId=" + ChaseId;
|
|
|
|
|
|
}
|
|
|
|
//#endregion
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</head>
|
|
<body class="headbody">
|
|
<form id="form1" runat="server">
|
|
<div class="title_ico">
|
|
海外仓批次
|
|
</div>
|
|
|
|
<table id="tb1" class="tableAll" style="width: 100%;">
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="f1" width="13%">客户单位</td>
|
|
<td> <select id="select_company" class="selectClass" name="D21" style="width: 200px" where="a.CompanyId=@value">
|
|
</select></td>
|
|
<td class="f1" style="width: 10%; height: 15px;"> </td>
|
|
<td width="16%">
|
|
</td>
|
|
<td class="f1"> </td>
|
|
<td>
|
|
</td>
|
|
<td> </td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="f1" width="13%">运输状态:</td>
|
|
<td><select id="select_wlzt" class="selectClass" style="width: 120px;" name="D5">
|
|
<option value="-1">全部</option>
|
|
<option value="0">未出运</option>
|
|
<option value="3">准备出运</option>
|
|
<option value="4">海上</option>
|
|
<option value="5">海外</option>
|
|
<option value="6">部分入库</option>
|
|
|
|
<option value="7">已入库</option>
|
|
|
|
</select>
|
|
</td>
|
|
<td class="f1" style="width: 10%; height: 15px;"> </td>
|
|
<td width="16%">
|
|
</td>
|
|
<td class="f1">批次信息:</td>
|
|
<td>
|
|
<input id="txt_cgdh" class="editTextbox" style="width: 120px;" type="text" /></td>
|
|
<td> <input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" /></td>
|
|
</tr>
|
|
|
|
|
|
<tr >
|
|
|
|
<td class="f1" width="13%">建立日期:</td>
|
|
<td colspan="3">
|
|
<input id="txt_SDate" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />-
|
|
<input id="txt_EDate" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" /></td>
|
|
<td class="f1" width="13%">入库日期:</td>
|
|
<td colspan="2">
|
|
<input id="txt_SRKDate" class="editTextbox" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" style="width: 130px;" type="text" />-
|
|
<input id="txt_ERKDate" class="editTextbox" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" style="width: 130px;" type="text" /></td>
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td colspan="7" 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>
|
|
</table>
|
|
</form>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|