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.
205 lines
6.5 KiB
205 lines
6.5 KiB
|
|
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Views/Shared/_Index.cshtml";
|
|
}
|
|
<link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
|
|
<script src="~/Content/js/datepicker/WdatePicker.js"></script>
|
|
<script src="~/Content/js/select2/select2.min.js"></script>
|
|
<style>
|
|
#Additem {
|
|
margin-left: 45%;
|
|
}
|
|
|
|
#AddTemitem {
|
|
margin-right: 45%;
|
|
}
|
|
</style>
|
|
<script>
|
|
|
|
var _Clos = new Array();
|
|
var InvName = decodeURI($.request("InvName"));
|
|
var RCVCode = $.request("RCVCode");
|
|
var Sequence = $.request("Sequence");
|
|
var ProductionCode = $.request("ProductionCode");
|
|
var Quantity = $.request("Quantity");
|
|
var InvCode = $.request("InvCode");
|
|
var WHCode = $.request("WHCode");
|
|
var BoundQuantity = $.request("BoundQuantity");
|
|
debugger;
|
|
$(function(){
|
|
|
|
SetCols();
|
|
$("#txtInvName").val(InvName);
|
|
$("#txtRCVCode").val(RCVCode);
|
|
$("#txtSequence").val(Sequence);
|
|
$("#txtProductionCode").val(ProductionCode);
|
|
$("#txtQuantity").val(Quantity);
|
|
$("#txtInvCode").val(InvCode);
|
|
reloadData();
|
|
})
|
|
function SetCols() {
|
|
var cols = new Array();
|
|
var collast = { label: '主键', name: 'ID', width: 150, align: 'left', hidden: true, key: true };
|
|
cols.push(collast);
|
|
var collast = { label: 'ID', name: 'ID', width: 150, align: 'left', hidden: true };
|
|
cols.push(collast);
|
|
var collast = { label: '生成订单号', name: 'ProductionCode', width: 150, 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: 'InvStd', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '入库条码', name: 'LotNo', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '操作人', name: 'MUSERName', width: 150, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '操作时间', name: 'MTIME', width: 150, align: 'left'};
|
|
cols.push(collast);
|
|
_Clos = cols;
|
|
}
|
|
|
|
function reloadData() {
|
|
var $gridList = $("#gridList");
|
|
$("#gridList").dataGrid({
|
|
url: "/KBSWMS/ICSManufactureReceive/GetManufactureReceiveLot?" + "ProductionCode=" + ProductionCode + "&WHCode=" + WHCode + "&InvCode=" + InvCode+ "&" + Math.random(),
|
|
//postData: { rfqno: $("#RFQNO").val() },
|
|
height: $(window).height() - 200,
|
|
width: $(window).width(),
|
|
cellEdit: true,
|
|
colModel: _Clos,
|
|
cellsubmit: "clientArray",
|
|
gridComplete: function () {
|
|
|
|
},
|
|
width: "100%",
|
|
autowidth: true,
|
|
rownumbers: true,
|
|
rowNum: 10000,
|
|
viewrecords: true,
|
|
multiselect: true
|
|
});
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 submitForm() {
|
|
debugger;
|
|
|
|
var rowIds_vendor = $("#gridList").jqGrid('getGridParam', 'selarrrow');
|
|
var ids = new Array();
|
|
var quantity = 0;
|
|
if (rowIds_vendor.length < 1)
|
|
{
|
|
$.modalAlertNew("WMS00003");
|
|
return;
|
|
}
|
|
for (var i = 0; i < rowIds_vendor.length; i++) {
|
|
var vendorRowData = $("#gridList").getRowData(rowIds_vendor[i]);
|
|
var LotQuantity = Number(vendorRowData.Quantity);
|
|
var ID = vendorRowData.ID
|
|
quantity += LotQuantity;
|
|
ids += "'" + ID + "',";
|
|
}
|
|
if (quantity > (Quantity - BoundQuantity))
|
|
{
|
|
$.modalAlertNew("WMS00124");
|
|
return;
|
|
}
|
|
var ICSASN = {
|
|
RCVCode: $("#txtRCVCode").val(),
|
|
RCVSequence: $("#txtSequence").val(),
|
|
IDs:ids
|
|
|
|
}
|
|
|
|
$.submitForm({
|
|
|
|
url: "/KBSWMS/ICSManufactureReceive/BindingLot?" + Math.random(),
|
|
param: { ICSASN: JSON.stringify(ICSASN) },
|
|
success: function (data) {
|
|
if (data.state == "error")
|
|
{
|
|
alert(data.message);
|
|
return;
|
|
}
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
<form id="form1">
|
|
<div class="topPanel" style="height:10px">
|
|
<div class="btn-group">
|
|
</div>
|
|
</div>
|
|
<div style="margin-right: 20px;">
|
|
<table class="form">
|
|
<tr>
|
|
<th class="formTitle">入库单号:</th>
|
|
<td class="formValue">
|
|
<input type="text" id="txtRCVCode" readonly="readonly" class="form-control" />
|
|
</td>
|
|
<th class="formTitle">生产订单号:</th>
|
|
<td class="formValue">
|
|
<input type="text" id="txtProductionCode" readonly="readonly" class="form-control" />
|
|
</td>
|
|
<th class="formTitle">入库数量:</th>
|
|
<td class="formValue">
|
|
<input id="txtQuantity" type="text" readonly="readonly" class="form-control" />
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th class="formTitle">入库单行号:</th>
|
|
<td class="formValue">
|
|
<input id="txtSequence" type="text" readonly="readonly" class="form-control" />
|
|
</td>
|
|
<th class="formTitle">物料编码:</th>
|
|
<td class="formValue">
|
|
<input id="txtInvCode" type="text" readonly="readonly" class="form-control" />
|
|
</td>
|
|
<th class="formTitle">物料名称:</th>
|
|
<td class="formValue">
|
|
<input id="txtInvName" type="text" readonly="readonly" class="form-control" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
</div>
|
|
<div class="gridPanel" style="margin-left:10px">
|
|
<table id="gridList"></table>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|