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.
143 lines
5.6 KiB
143 lines
5.6 KiB
|
|
@{
|
|
ViewBag.Title = "Invmes";
|
|
Layout = "~/Views/Shared/_Index.cshtml";
|
|
}
|
|
<link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
|
|
<link href="~/Content/js/dialog/dialog.css" rel="stylesheet" />
|
|
<script src="~/Content/js/datepicker/WdatePicker.js"></script>
|
|
<script src="~/Content/js/select2/select2.min.js"></script>
|
|
<script>
|
|
var WorkPoint = $.request("workpoint");
|
|
var sfqcode = $.request("sfqcode");
|
|
$(function () {
|
|
Init();
|
|
})
|
|
function Init() {
|
|
debugger;
|
|
document.getElementById("gridPanel").innerHTML = '<table id="gridList"></table><div id="gridPager"></div> ';//重置grid
|
|
var invcode = $("#txt_Invcode").val();
|
|
var InvName = $("#txt_InvName").val();
|
|
$("#gridList").dataGrid({
|
|
url: "/SRM/PriceInquiry/GetPriceInquiryItem" + "?invcode=" + invcode + "&workpoint=" + WorkPoint + "&InvName=" + InvName + "&" + Math.random() + "&sfqcode=" + sfqcode,
|
|
height: $(window).height() - 150,
|
|
width: $(window).width() - 300,
|
|
colModel: [
|
|
{ label: '物料编码', name: '物料代码', width: 100, align: 'left' },
|
|
{ label: '物料名称', name: '物料名称', width: 100, align: 'left' },
|
|
{ label: '制造商', name: '制造商', width: 180, align: 'left' },
|
|
{ label: '制造商料号', name: '制造商料号', width: 180, align: 'left' },
|
|
{ label: '物料规格', name: '物料规格', width: 100, align: 'left' },
|
|
{ label: '单位', name: '单位', width: 100, align: 'left' },
|
|
{ label: '需求数量', name: '预计需求量', width: 100, align: 'left' },
|
|
{ label: '备注', name: '备注', width: 100, align: 'left' },
|
|
{ label: '技术要求文件', name: '文件路径', width: 100, align: 'left' },
|
|
],
|
|
pager: "#gridPager",
|
|
sortorder: "desc",
|
|
sortname: '物料代码',
|
|
viewrecords: true,
|
|
multiselect: true,
|
|
gridComplete: function () {
|
|
},
|
|
//beforeSelectRow: function (rowid, e) {
|
|
// $("#gridList").jqGrid('resetSelection');
|
|
// return (true);
|
|
//},
|
|
|
|
})
|
|
}
|
|
//function submitForm() {
|
|
// var rows = $("#gridList").jqGrid('getGridParam', 'selarrrow');
|
|
// if (rows.length != 1) {
|
|
// $.modalAlert("只能选择一条数据!");
|
|
// return;
|
|
// }
|
|
// var rowdata = $("#gridList").jqGrid("getRowData", rows[0]);
|
|
|
|
// var obj={ invcode:rowdata.invcode,
|
|
// invname : rowdata.invname,
|
|
// invuom : rowdata.invuom,
|
|
// invstd: rowdata.invstd,
|
|
// invclass:rowdata.invclass
|
|
//}
|
|
// return obj;
|
|
//}
|
|
function Close() {
|
|
$.modalClose();
|
|
}
|
|
function reloadData() {
|
|
|
|
}
|
|
//提交
|
|
function submitForm() {
|
|
debugger;
|
|
//提交
|
|
var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
|
|
var objs = [];
|
|
for (var i = 0; i < ids.length; i++) {
|
|
var obj = {
|
|
ID: GUID(),
|
|
物料代码: $("#gridList").jqGrid('getRowData', ids[i]).物料代码,
|
|
物料名称: $("#gridList").jqGrid('getRowData', ids[i]).物料名称,
|
|
物料规格: $("#gridList").jqGrid('getRowData', ids[i]).物料规格,
|
|
制造商: $("#gridList").jqGrid('getRowData', ids[i]).制造商,
|
|
制造商料号: $("#gridList").jqGrid('getRowData', ids[i]).制造商料号,
|
|
单位: $("#gridList").jqGrid('getRowData', ids[i]).单位,
|
|
备注: $("#gridList").jqGrid('getRowData', ids[i]).备注,
|
|
预计需求量: $("#gridList").jqGrid('getRowData', ids[i]).预计需求量,
|
|
文件路径: $("#gridList").jqGrid('getRowData', ids[i]).文件路径,
|
|
//技术要求: "",
|
|
//参考价格: null,
|
|
|
|
//成本明细: "0",
|
|
//是否含税: "",
|
|
//币种: ""
|
|
};
|
|
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>
|
|
<div class="topPanel" style="height:50px">
|
|
<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_InvName" type="text" class="form-control" placeholder="物料名称" style="width: 120px;">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<a id="Search" authorize="yes" style="margin-left:3px;" class="btn btn-info" 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>
|