You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
130 lines
5.0 KiB
130 lines
5.0 KiB
|
|
@{
|
|
ViewBag.Title = "SeachInventory";
|
|
Layout = "~/Views/Shared/_Index.cshtml";
|
|
}
|
|
<link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
|
|
<link href="~/Content/js/dialog/dialog.css?v=20120420" rel="stylesheet" />
|
|
<script src="~/Content/js/datepicker/WdatePicker.js"></script>
|
|
<script src="~/Content/js/select2/select2.min.js"></script>
|
|
<script>
|
|
debugger;
|
|
var WHCode = $.request("WHCode");
|
|
var _Clos = new Array();
|
|
$(function () {
|
|
SetCols();
|
|
Init();
|
|
})
|
|
function SetCols() {
|
|
$.ajax({
|
|
url: "/Print/SelectColumnName?" + Math.random(),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
var cols = new Array();
|
|
|
|
var collast = { label: '主键', name: 'ID', hidden: true, key: true };
|
|
cols.push(collast);
|
|
//var collast = { label: '来源单据号', name: 'PoCode', width: 100, align: 'left' };
|
|
//cols.push(collast);
|
|
//var collast = { label: '来源单据行号', name: 'Sequence', width: 100, align: 'left' };
|
|
//cols.push(collast);
|
|
var collast = { label: '仓库编码', name: 'WarehouseCode', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '仓库名称', name: 'WarehouseName', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '库位编码', name: 'LocationCode', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '库位名称', name: 'LocationName', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
_Clos = cols;
|
|
}
|
|
});
|
|
}
|
|
function Init() {
|
|
document.getElementById("gridPanel").innerHTML = ' <span><strong>详细信息</strong></span> <table id="gridList"></table> ';//重置grid
|
|
$("#gridList").dataGrid({
|
|
url: "/PNWMS/Blitem/GetLocation" + "?WHCode=" + WHCode + "&" + Math.random(),
|
|
height: $(window).height() - 20,
|
|
width: $(window).width() - 300,
|
|
colModel: _Clos,
|
|
//colModel: [
|
|
// { label: '主键', name: 'ID', hidden: true, key: true },
|
|
// { label: '工单子件ID', name: 'ZJID', hidden: true },
|
|
// { label: '来源单据号', name: 'MOCode', width: 100, align: 'left' },
|
|
// { label: '来源单据行号', name: 'MuHang', width: 100, align: 'left' },
|
|
// { label: '料品编码', name: 'InvCode', width: 100, align: 'left' },
|
|
// { label: '料品名称', name: 'INVNAME', width: 100, align: 'left' },
|
|
// { label: '规格型号', name: 'InvStd', width: 100, align: 'left' },
|
|
// { label: '单位', name: 'InvUnit', width: 100, align: 'left' },
|
|
// { label: '数量', name: 'IssueQuantity', width: 100, align: 'left' },
|
|
// { label: '数量2', name: 'Quantity', hidden: true },
|
|
// { label: '辅计量数量', name: 'Amount', width: 100, align: 'left' },
|
|
// ],
|
|
pager: "#gridPager",
|
|
sortorder: "desc",
|
|
sortname: 'LocationCode',
|
|
rowNum: 10000,
|
|
viewrecords: true,
|
|
multiselect: true,
|
|
gridComplete: function () {
|
|
}
|
|
})
|
|
};
|
|
|
|
|
|
|
|
function submitForm() {
|
|
debugger;
|
|
var objs = [];
|
|
var rows = $("#gridList").jqGrid('getGridParam', 'selarrrow');
|
|
if (rows.length > 1) {
|
|
$.modalAlert("只能选择一个库位!");
|
|
return;
|
|
}
|
|
if (rows.length == 0) {
|
|
$.modalAlert("请选择库位!");
|
|
return;
|
|
}
|
|
// var rowdata = $("#gridList").jqGrid("getRowData", rows[0]);
|
|
for (var i = 0; i < rows.length; i++) {
|
|
var obj = {
|
|
ID: $("#gridList").jqGrid('getRowData', rows[i]).ID,
|
|
//PoCode: $("#gridList").jqGrid('getRowData', rows[i]).PoCode,
|
|
WarehouseCode: $("#gridList").jqGrid('getRowData', rows[i]).WarehouseCode,
|
|
WarehouseName: $("#gridList").jqGrid('getRowData', rows[i]).WarehouseName,
|
|
LocationCode: $("#gridList").jqGrid('getRowData', rows[i]).LocationCode,
|
|
LocationName: $("#gridList").jqGrid('getRowData', rows[i]).LocationName,
|
|
}
|
|
objs.push(obj);
|
|
}
|
|
|
|
|
|
return objs;
|
|
|
|
};
|
|
|
|
function guid() {
|
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
|
|
return v.toString(16);
|
|
});
|
|
}
|
|
|
|
function Close() {
|
|
$.modalClose();
|
|
}
|
|
function reloadData() {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
<div class="topPanel" style="height:50px">
|
|
</div>
|
|
<div class="gridPanel" id="gridPanel">
|
|
<table id="gridList"></table>
|
|
<div id="gridPager"></div>
|
|
</div>
|