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.
155 lines
6.7 KiB
155 lines
6.7 KiB
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Views/Shared/_Index.cshtml";
|
|
}
|
|
<style>
|
|
.td {
|
|
padding: 0 5px 0 5px;
|
|
}
|
|
</style>
|
|
<script>
|
|
var WorkPoints = $.request("WorkPoint");
|
|
$(function () {
|
|
gridList();
|
|
})
|
|
|
|
function gridList() {
|
|
var $gridList = $("#gridList");
|
|
var queryJson = {
|
|
cCode: $("#txt_cCode").val(),
|
|
BegiondDate: $("#txt_BegiondDate").val(),
|
|
EnddDate: $("#txt_EnddDate").val(),
|
|
InvCode: $("#txt_InvCode").val(),
|
|
InvName: $("#txt_InvName").val(),
|
|
}
|
|
$gridList.dataGrid({
|
|
url: "/SRM/BicDoc_Publish/GetBicDocByPU" + "?" + Math.random(),
|
|
postData: { queryJson: JSON.stringify(queryJson), WorkPoint: JSON.stringify(WorkPoints) },
|
|
height: $(window).height() - 120,
|
|
width: $(window).width() - 180,
|
|
colModel: [
|
|
{ label: "主键", name: "ID", hidden: true, key: true },
|
|
{ label: '单据号', name: 'cCode', width: 240, align: 'left' },
|
|
{ label: '单据行', name: 'ivouchrowno', width: 240, align: 'left' },
|
|
{ label: '单据日期', name: 'dDate', width: 150, align: 'left' },
|
|
{ label: "物料编码", name: "cInvCode", width: 150, align: 'left' },
|
|
{ label: '物料名称', name: 'cInvName', width: 220, align: 'left' },
|
|
{ label: '规格型号', name: 'cInvStd', width: 240, align: 'left' },
|
|
{ label: '单位', name: 'INVUOM', width: 240, align: 'left' },
|
|
{ label: '需求日期', name: 'dRequirDate', width: 150, align: 'left' },
|
|
{ label: "计划到货日期", name: "dArriveDate", width: 150, align: 'left' },
|
|
{ label: '请购数量', name: 'fQuantity', width: 220, align: 'left' },
|
|
{ label: '来源', name: 'Source', width: 220, align: 'left',hidden:true},
|
|
],
|
|
sortname: 'cCode',
|
|
shrinkToFit: true,//宽度自适应
|
|
pager: "#gridPager",
|
|
//sortname: 'ID',
|
|
viewrecords: true,
|
|
multiselect: true,
|
|
rowNum: 200
|
|
});
|
|
$("#btn_search").click(function () {
|
|
var queryJson = {
|
|
cCode: $("#txt_cCode").val(),
|
|
BegiondDate: $("#txt_BegiondDate").val(),
|
|
EnddDate: $("#txt_EnddDate").val(),
|
|
InvCode: $("#txt_InvCode").val(),
|
|
InvName: $("#txt_InvName").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
postData: { queryJson: JSON.stringify(queryJson) },
|
|
page: 1
|
|
}).trigger('reloadGrid');
|
|
});
|
|
}
|
|
//提交
|
|
function submitForm() {
|
|
|
|
//提交
|
|
var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
|
|
var objs = [];
|
|
for (var i = 0; i < ids.length; i++) {
|
|
var obj = {
|
|
ID: GUID(),
|
|
INVCODE: $("#gridList").jqGrid('getRowData', ids[i]).cInvCode,
|
|
INVNAME: $("#gridList").jqGrid('getRowData', ids[i]).cInvName,
|
|
Quantity: $("#gridList").jqGrid('getRowData', ids[i]).fQuantity,
|
|
INVUOM: $("#gridList").jqGrid('getRowData', ids[i]).INVUOM,
|
|
DeliveryTime: $("#gridList").jqGrid('getRowData', ids[i]).dArriveDate,
|
|
Source: $("#gridList").jqGrid('getRowData', ids[i]).Source,
|
|
InvStd: $("#gridList").jqGrid('getRowData', ids[i]).cInvStd,
|
|
cCode: $("#gridList").jqGrid('getRowData', ids[i]).cCode
|
|
};
|
|
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);
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<form id="form1">
|
|
<div class="topPanel" style="height:50px">
|
|
<div class="search">
|
|
<table>
|
|
<tr>
|
|
<td style="text-align:right;padding: 0 5px 0 5px;">
|
|
<label>请购单号:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_cCode" type="text" class="form-control" placeholder="请购单号" style="width: 100px;">
|
|
</div>
|
|
</td>
|
|
<td style="text-align:right;padding: 0 5px 0 5px;">
|
|
<label>请购单日期(起):</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_BegiondDate" type="text" class="form-control" placeholder="请购单日期(起)" style="width: 100px;" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })">
|
|
</div>
|
|
</td>
|
|
<td style="text-align:right;padding: 0 5px 0 5px;">
|
|
<label>请购单日期(止):</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_EnddDate" type="text" class="form-control" placeholder="请购单日期(止)" style="width: 100px;" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd', minDate: txt_BegiondDate.value })">
|
|
</div>
|
|
</td>
|
|
<td style="text-align:right;padding: 0 5px 0 5px;">
|
|
<label>物料编码:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_InvCode" type="text" class="form-control" placeholder="物料编码" style="width: 100px;">
|
|
</div>
|
|
</td>
|
|
<td style="text-align:right;padding: 0 5px 0 5px;">
|
|
<label>物料名称:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_InvName" type="text" class="form-control" placeholder="物料名称" style="width: 100px;">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<span class="input-group-btn" style="padding-left:10px;">
|
|
<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">
|
|
<table id="gridList"></table>
|
|
<div id="gridPager"></div>
|
|
</div>
|
|
</form>
|