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.
264 lines
11 KiB
264 lines
11 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 _Clos = new Array();
|
|
var ID = $.request("ID");
|
|
var Type = $.request("Type");
|
|
var TLZID = $.request("TLZID");
|
|
var MenuID = $.request("MenuID");
|
|
$(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: 'ID', name: 'ZJID', hidden: true };
|
|
cols.push(collast);
|
|
var collast = { label: '材料出库单号', name: 'IssueCode', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '材料出库单行号', name: 'MuHang', width: 60, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '来源单据号', name: 'SourceCode', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '来源单据行号', name: 'SourceSequence', width: 60, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '部门编码', name: 'DepCode', width: 60, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '客户料号', name: 'EATTRIBUTE10', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '批号', name: 'BatchCode', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '规格型号', name: 'InvStd', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '数量', name: 'IssueNegQuantity', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '数量2', name: 'Quantity', hidden: true };
|
|
cols.push(collast);
|
|
var collast = { label: '辅计量数量', name: 'Amount', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '单据时间', name: 'MTIME', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '自由项ID', name: 'ExtensionID', hidden: true };
|
|
cols.push(collast);
|
|
|
|
if (data != null && data.length > 0) {
|
|
DateList = data;
|
|
for (var i = 0; i < data.length; i++) {
|
|
var ColName = data[i].ColName;
|
|
var ColCode = data[i].ColCode;
|
|
var obj = new Array();
|
|
obj = {
|
|
label: ColName,
|
|
name: ColCode,
|
|
width: 80,
|
|
align: "left"
|
|
}
|
|
cols.push(obj);
|
|
}
|
|
}
|
|
_Clos = cols;
|
|
}
|
|
});
|
|
}
|
|
function Init() {
|
|
document.getElementById("gridPanel").innerHTML = ' <span><strong>详细信息</strong></span> <table id="gridList"></table> ';//重置grid
|
|
var invcode = $("#txt_Invcode").val();
|
|
var SourceCode = $("#txt_SourceCode").val();
|
|
var SourceSequence = $("#txt_SourceSequence").val();
|
|
var EATTRIBUTE10 = $("#txt_EATTRIBUTE10").val();
|
|
var BatchCode = $("#txt_BatchCode").val();
|
|
var INVStd = $("#txt_INVStd").val();
|
|
$("#gridList").dataGrid({
|
|
url: "/JHWMS/MaterialsDeliveredRTM/GetINV?invcode=" + invcode + "&SourceCode=" + SourceCode + "&SourceSequence=" + SourceSequence + "&EATTRIBUTE10=" + EATTRIBUTE10 + "&BatchCode=" + BatchCode + "&INVSTD=" + INVStd+"&MenuID=" + MenuID +"&" + 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: 'IssueCode', 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: 'IssueNegQuantity', width: 100, align: 'left' },
|
|
// { label: '数量2', name: 'Quantity', hidden: true },
|
|
// { label: '辅计量数量', name: 'Amount', width: 100, align: 'left' },
|
|
// { label: '自由项ID', name: 'ExtensionID', width: 100, align: 'left' },
|
|
//],
|
|
pager: "#gridPager",
|
|
sortorder: "desc",
|
|
sortname: 'MTIME',
|
|
rowNum: 10000,
|
|
viewrecords: true,
|
|
multiselect: true,
|
|
gridComplete: function () {
|
|
}
|
|
})
|
|
};
|
|
|
|
|
|
|
|
function submitForm() {
|
|
var rows = $("#gridList").jqGrid('getGridParam', 'selarrrow');
|
|
if (rows.length < 1) {
|
|
$.modalAlertNew("WMS00079");
|
|
return;
|
|
}
|
|
var objs = [];
|
|
for (var i = 0; i < rows.length; i++) {
|
|
|
|
|
|
var obj = {
|
|
ID: guid(),
|
|
TLZID: TLZID,
|
|
ZJID: $("#gridList").jqGrid('getRowData', rows[i]).ZJID,
|
|
InvCode: $("#gridList").jqGrid('getRowData', rows[i]).InvCode,
|
|
InvName: $("#gridList").jqGrid('getRowData', rows[i]).InvName,
|
|
InvStd: $("#gridList").jqGrid('getRowData', rows[i]).InvStd,
|
|
InvUnit: $("#gridList").jqGrid('getRowData', rows[i]).InvUnit,
|
|
Quantity: $("#gridList").jqGrid('getRowData', rows[i]).Quantity,
|
|
Quantitys: $("#gridList").jqGrid('getRowData', rows[i]).Quantity,
|
|
IssueNegQuantity: $("#gridList").jqGrid('getRowData', rows[i]).IssueNegQuantity,
|
|
Amount: $("#gridList").jqGrid('getRowData', rows[i]).Amount,
|
|
Amounts: $("#gridList").jqGrid('getRowData', rows[i]).Amount,
|
|
ExtensionID: $("#gridList").jqGrid('getRowData', rows[i]).ExtensionID,
|
|
ProjectCode: $("#gridList").jqGrid('getRowData', rows[i]).ProjectCode,
|
|
BatchCode: $("#gridList").jqGrid('getRowData', rows[i]).BatchCode,
|
|
Version: $("#gridList").jqGrid('getRowData', rows[i]).Version,
|
|
Brand: $("#gridList").jqGrid('getRowData', rows[i]).Brand,
|
|
cFree1: $("#gridList").jqGrid('getRowData', rows[i]).cFree1,
|
|
cFree2: $("#gridList").jqGrid('getRowData', rows[i]).cFree2,
|
|
cFree3: $("#gridList").jqGrid('getRowData', rows[i]).cFree3,
|
|
cFree4: $("#gridList").jqGrid('getRowData', rows[i]).cFree4,
|
|
cFree5: $("#gridList").jqGrid('getRowData', rows[i]).cFree5,
|
|
cFree6: $("#gridList").jqGrid('getRowData', rows[i]).cFree6,
|
|
cFree7: $("#gridList").jqGrid('getRowData', rows[i]).cFree7,
|
|
cFree8: $("#gridList").jqGrid('getRowData', rows[i]).cFree8,
|
|
cFree9: $("#gridList").jqGrid('getRowData', rows[i]).cFree9,
|
|
cFree10: $("#gridList").jqGrid('getRowData', rows[i]).cFree10
|
|
}
|
|
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:120px">
|
|
<div class="search">
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<label>料品编码:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_Invcode" type="text" class="form-control" placeholder="料品编码" style="width: 120px;">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<label>来源单据号:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_SourceCode" type="text" class="form-control" placeholder="来源单据号" style="width: 120px;">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<label>来源单据行号:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_SourceSequence" type="text" class="form-control" placeholder="来源单据行号" style="width: 120px;">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label>客户料号:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_EATTRIBUTE10" type="text" class="form-control" placeholder="客户料号" style="width: 120px;">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<label>批号:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_BatchCode" type="text" class="form-control" placeholder="批号" style="width: 120px;">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<label>规格型号:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_INVStd" type="text" class="form-control" placeholder="规格型号" style="width: 120px;">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<a id="Search" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="Init()"><i class="fa fa-pencil-square-o"></i>查询</a>
|
|
</td>
|
|
</tr>
|
|
<tr></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="gridPanel" id="gridPanel">
|
|
<table id="gridList"></table>
|
|
<div id="gridPager"></div>
|
|
</div>
|
|
|
|
|