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.
185 lines
5.8 KiB
185 lines
5.8 KiB
|
|
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Views/Shared/_Index.cshtml";
|
|
}
|
|
<style>
|
|
/*.btn-primary {
|
|
margin-right: 2px;
|
|
}
|
|
|
|
.topPanel .toolbar {
|
|
float: left;
|
|
}*/
|
|
</style>
|
|
<script src="~/Content/js/datepicker/WdatePicker.js"></script>
|
|
<script>
|
|
var mold = $.request("mold");
|
|
$(document).ready(function () {
|
|
$("input.cell").keyup(function (e) {
|
|
switch (e.keyCode) {
|
|
// up arrow
|
|
case 40:
|
|
$(this).parent()
|
|
.parent()
|
|
.next()
|
|
.children("td")
|
|
.children("input.cell[name="
|
|
+ $(this).attr("name") + "]")
|
|
.focus();
|
|
break;
|
|
|
|
// down arrow
|
|
case 38:
|
|
$(this).parent()
|
|
.parent()
|
|
.prev()
|
|
.children("td")
|
|
.children("input.cell[name="
|
|
+ $(this).attr("name") + "]")
|
|
.focus();
|
|
break;
|
|
}
|
|
});
|
|
});</script>
|
|
<script>
|
|
|
|
$(function () {
|
|
gridList();
|
|
})
|
|
|
|
function gridList() {
|
|
document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid
|
|
var $gridList = $("#gridList");
|
|
var queryJson = {
|
|
Code: $("#txt_Code").val(),
|
|
}
|
|
$gridList.dataGrid({
|
|
url: "/KBSWMS/ICSUpdateMoPick/GetICSMOPickInfo" + "?" + Math.random(),
|
|
postData: { queryJson: JSON.stringify(queryJson) },
|
|
height: $(window).height() - 200,
|
|
width: $(window).width() - 300,
|
|
colModel: [
|
|
{ label: "主键", name: "ID", hidden: true, key: true },
|
|
{ label: '工单号', name: 'MOCode', width: 120, align: 'left' },
|
|
{ label: '子件行号', name: 'Sequence', width: 150, align: 'left' },
|
|
{ label: '子件料品', name: 'InvCode', width: 150, align: 'left' },
|
|
{ label: '料品名称', name: 'InvName', width: 200, align: 'left' },
|
|
{ label: '子件数量', name: 'Quantity', width: 150, align: 'left' },
|
|
{ label: '已发数量', name: 'IssueQuantity', width: 150, align: 'left' },
|
|
|
|
],
|
|
shrinkToFit: false,//宽度自适应
|
|
autoWidth:true,
|
|
gridComplete: function () {
|
|
},
|
|
pager: "#gridPager",
|
|
sortorder: "asc",
|
|
sortname: 'Sequence',
|
|
viewrecords: true,
|
|
multiselect: true,
|
|
});
|
|
$("#btn_search").click(function () {
|
|
var queryJson = {
|
|
Code: $("#txt_Code").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
postData: { queryJson: JSON.stringify(queryJson) },
|
|
}).trigger('reloadGrid');
|
|
});
|
|
}
|
|
|
|
|
|
|
|
//工单更新
|
|
function btnUpdateMo() {
|
|
var Code = $("#txt_Code").val();
|
|
$.submitForm({
|
|
url: "/KBSWMS/ICSUpdateMoPick/UpdateMoInfoByCode?Code=" + Code + "&" + Math.random(),
|
|
param: {
|
|
// keyValue: JSON.stringify(ARR)
|
|
},
|
|
success: function () {
|
|
gridList();
|
|
// $.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
|
|
|
|
//子件更新
|
|
function btnUpdate() {
|
|
var Code = $("#txt_Code").val();
|
|
$.submitForm({
|
|
url: "/KBSWMS/ICSUpdateMoPick/UpdateMopickInfoByCode?Code=" + Code+ "&" + Math.random(),
|
|
param: {
|
|
// keyValue: JSON.stringify(ARR)
|
|
},
|
|
success: function () {
|
|
gridList();
|
|
// $.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
|
|
|
|
function CodeTrigger() {
|
|
$("#txt_Code").keydown(function (e) {
|
|
var curKey = e.which;
|
|
debugger;
|
|
if (curKey == 13) {
|
|
var queryJson = {
|
|
Code: $("#txt_Code").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
postData: { queryJson: JSON.stringify(queryJson) },
|
|
}).trigger('reloadGrid');
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<div class="topPanel" style="height:45px">
|
|
<div class="toolbar">
|
|
<div class="btn-group">
|
|
<a id="NF-UpdateMo" authorize="yes" class="btn btn-primary" onclick="btnUpdateMo()"><i class="fa fa-pencil-square-o"></i>工单更新</a>
|
|
<a id="NF-Update" authorize="yes" class="btn btn-primary" onclick="btnUpdate()"><i class="fa fa-pencil-square-o"></i>子件更新</a>
|
|
<a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
|
|
</div>
|
|
<script>$('.toolbar').authorizeButton()</script>
|
|
</div>
|
|
<div class="search">
|
|
<table>
|
|
<tr>
|
|
|
|
<td style="text-align:right;"><label class="lglabel" for="txt_Code"> 工单号</label>:</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_Code" type="text" class="form-control" style="width: 150px;" οnkeydοwn="CodeTrigger()" >
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<span class="input-group-btn">
|
|
<button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="gridPanel" id="gridPanel">
|
|
<table id="gridList"></table>
|
|
<div id="gridPager"></div>
|
|
</div>
|