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.
276 lines
12 KiB
276 lines
12 KiB
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Views/Shared/_Index.cshtml";
|
|
}
|
|
<script src="~/Content/js/datepicker/WdatePicker.js"></script>
|
|
<link href="~/Content/js/select2/select2.min.css" rel="stylesheet" />
|
|
<script src="~/Content/js/select2/select2.min.js"></script>
|
|
<style>
|
|
element.style {
|
|
z-index: 10003;
|
|
width: px;
|
|
height: 900px;
|
|
position: absolute;
|
|
top: 177px;
|
|
left: 403px;
|
|
}
|
|
</style>
|
|
<script>
|
|
$(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();
|
|
InitControl();
|
|
})
|
|
function InitControl() {
|
|
debugger;
|
|
var $VenCode = $("#sel_PURCHUG");
|
|
$VenCode.select2({
|
|
allowClear: true,
|
|
escapeMarkup: function (m) {
|
|
return m;
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "/SRM/TakeEffectPrice/GetWorkPint" + "?" + Math.random(),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
$.each(data, function (index, item) {
|
|
$VenCode.append("<option value='" + item.PURCHUGCODE + "'> " + item.PURCHUGNAME + "</option>");
|
|
});
|
|
}
|
|
});
|
|
}
|
|
function gridList() {
|
|
debugger;
|
|
var $gridList = $("#gridList");
|
|
var queryJson = {
|
|
PURCHUG: '',//采购组织
|
|
//PURCHUGCODE: $("#txt_PURCHUGCODE").val(),//组织代码
|
|
//PURCHUGNAME: $("#txt_PURCHUGNAME").val(),//组织名称
|
|
ITEMCODE: $("#txt_INVCode").val(),//物料编码
|
|
ITEMName: $("#txt_INVName").val(),//物料名称
|
|
INVSTD: $("#txt_INVSTD").val(),//规格型号
|
|
RFQCODE: $("#txt_RFQCODE").val(),
|
|
//TimeFrom: $("#txt_BeginDate").val(),
|
|
//TimeTo: $("#txt_EndDate").val(),
|
|
Vencode: $("#txt_VenCode").val(),
|
|
VenName: $("#txt_VenName").val(),
|
|
PURTEAM: $("#txt_PURTEAM").val(),
|
|
}
|
|
$gridList.dataGrid({
|
|
cellEdit: true,
|
|
url: "/SRM/PriceInquiry/GetGridPriceByPN" + "?" + Math.random(),
|
|
postData: { queryJson: JSON.stringify(queryJson) },
|
|
height: $(window).height() - 200,
|
|
width: $(window).width() - 300,
|
|
colModel: [
|
|
{ label: "主键", name: "ASNID", hidden: true, key: true },
|
|
{
|
|
label: '操作', width: 52, align: 'center',
|
|
formatter: btnLook
|
|
},
|
|
{ label: '物料编码', name: 'ITEMCODE', width: 80, align: 'left' },
|
|
{ label: '物料名称', name: 'ITEMNAME', width: 160, align: 'left' },
|
|
{ label: '规格型号', name: 'invSTD', width: 150, align: 'left' },
|
|
{ label: '单位', name: 'UNIT', width: 30, align: 'left' },//PoArrive
|
|
{ label: '最终价格', name: 'QUOPRICE', width: 50, align: 'left' },
|
|
{ label: '供应商名称', name: 'cVenName', width: 260, align: 'left' },
|
|
{ label: '供应商编码', name: 'cVenCode', width: 70, align: 'left' },
|
|
{ label: '询价单单号', name: 'RFQCODE', width: 120, align: 'left' },
|
|
{ label: '分配单号', name: 'FPRFQCODE', width: 120, align: 'left' },
|
|
{ label: '采购组织', name: 'PURCHUGNAME', width: 80, align: 'left', hidden: true },
|
|
{ label: '币种', name: 'CURRENCY', width: 100, align: 'left', hidden: true },
|
|
{ label: '采购负责人', name: 'PURTEAM', width: 60, align: 'left', hidden: true },
|
|
{ label: '站点', name: 'WorkPoint', width: 30, align: 'left', },
|
|
],
|
|
gridComplete: function () {
|
|
},
|
|
pager: "#gridPager",
|
|
sortorder: "desc",
|
|
sortname: 'ITEMCODE ',
|
|
viewrecords: true,
|
|
//multiselect: true,
|
|
//subGrid: true, // (1)开启子表格支持
|
|
//subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
|
|
// $("#gridList").jqGrid("setSelection", rowid, false);
|
|
// bindSubGrid(subgrid_id, rowid)
|
|
//},
|
|
gridComplete: function () {
|
|
var strIds = $("#gridList").jqGrid("getDataIDs");
|
|
for (var i = 0; i < strIds.length; i++) {
|
|
var strValue = $("#gridList").jqGrid("getCell", strIds[i], "STATUS");//得到单元格数据
|
|
if (strValue == "3")
|
|
$("#" + strIds[i]).find("td").css("background-color", "pink");
|
|
}
|
|
},
|
|
});
|
|
|
|
$("#warehouse a.btn-default").click(function () {
|
|
$("#warehouse a.btn-default").removeClass("active");
|
|
$(this).addClass("active");
|
|
$('#btn_search').trigger("click");
|
|
});
|
|
$("#btn_search").click(function () {
|
|
debugger;
|
|
var warehouse = $("#warehouse a.active").attr('data-value');
|
|
var queryJson = {
|
|
PURCHUG: $("#sel_PURCHUG").children('option:selected').val(),//采购组织
|
|
//PURCHUGCODE: $("#txt_PURCHUGCODE").val(),//组织代码
|
|
//PURCHUGNAME: $("#txt_PURCHUGNAME").val(),//组织名称
|
|
ITEMCODE: $("#txt_INVCode").val(),//物料编码
|
|
ITEMName: $("#txt_INVName").val(),//物料名称
|
|
INVSTD: $("#txt_INVSTD").val(),//规格型号
|
|
RFQCODE: $("#txt_RFQCODE").val(),
|
|
//TimeFrom: $("#txt_BeginDate").val(),
|
|
//TimeTo: $("#txt_EndDate").val(),
|
|
Vencode: $("#txt_VenCode").val(),
|
|
VenName: $("#txt_VenName").val(),
|
|
PURTEAM: $("#txt_PURTEAM").val(),
|
|
|
|
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
postData: { queryJson: JSON.stringify(queryJson) },
|
|
}).trigger('reloadGrid');
|
|
});
|
|
}
|
|
function btnLook(cellvalue, options, rowObject) {
|
|
return cellvalue = "<a class=\"btn btn-info dropdown-text\" onclick=\"UpLoadClick('" + rowObject.PURCHUGNAME + "','" + rowObject.ITEMCODE + "','" + rowObject.ITEMNAME + "','" + rowObject.invSTD + "','" + rowObject.cVenCode + "','" + rowObject.cVenName + "','" + rowObject.FPRFQCODE + "','" + rowObject.PURTEAM + "','" + rowObject.WorkPoint + "')\">查看</a>";
|
|
}
|
|
function UpLoadClick(PURCHUGNAME, ITEMCODE, ITEMNAME, invSTD, cVenCode, cVenName, FPRFQCODE, PURTEAM, WorkPoint) {
|
|
//var CartonNo = $("#CartonNo").text();
|
|
$.modalOpen2({
|
|
id: "ComPricelistByPN",
|
|
title: "详细信息",
|
|
url: "/SRM/PriceInquiry/ComPricelistByPN?PURCHUGNAME=" + encodeURI(encodeURI(PURCHUGNAME)) + "&ITEMCODE=" + ITEMCODE + "&" + Math.random() + "&ITEMNAME=" + encodeURI(encodeURI(ITEMNAME)) + "&invSTD=" + encodeURI(encodeURI(invSTD)) + "&VenCode=" + cVenCode + "&VenName=" + encodeURI(encodeURI(cVenName)) + "&FPRFQCODE=" + FPRFQCODE + "&PURTEAM=" + encodeURI(encodeURI(PURTEAM)) + "&WorkPoint=" + WorkPoint,
|
|
width: "95%",
|
|
height: "95%",
|
|
btn: null
|
|
});
|
|
}
|
|
</script>
|
|
<iframe id="ifrm" src="" width="0" height="0"></iframe>
|
|
<div class="topPanel" style="height:100px">
|
|
<div class="toolbar">
|
|
<div class="btn-group">
|
|
@*<a id="btn_search" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_search()"><i class="fa fa-pencil-square-o"></i>查询</a>*@
|
|
@*<a id="NF-Search" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_delete()"><i class="fa fa-pencil-square-o"></i>删除</a>
|
|
<a class="btn btn-primary" style="margin-left:3px;" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>*@
|
|
|
|
</div>
|
|
</div>
|
|
<div class="search">
|
|
<table>
|
|
<tr>
|
|
@*<td>
|
|
<label>采购组织:</label>
|
|
</td>
|
|
<td class="formValue">
|
|
<select id="sel_PURCHUG" name="sel_VenCode" class="form-control select2" style="width: 100px;height:20px" placeholder="请选择采购组织..."></select>
|
|
<input type="hidden" id="hidetext" />
|
|
</td>*@
|
|
<td>
|
|
<label>采购负责人:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_PURTEAM" type="text" class="form-control" placeholder="采购负责人" style="width: 120px;">
|
|
</div>
|
|
</td>
|
|
<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>
|
|
<label> 规格型号:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_INVSTD" type="text" class="form-control" placeholder="规格型号" style="width: 120px;">
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label>询价单单号:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_RFQCODE" type="text" class="form-control" placeholder="询价单编号" style="width: 120px;">
|
|
</div>
|
|
</td>
|
|
|
|
<td>
|
|
<label> 供应商编码:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_VenCode" type="text" class="form-control" placeholder="供应商编码" style="width: 120px;">
|
|
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<label> 供应商名称:</label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_VenName" type="text" class="form-control" placeholder="供应商名称" style="width: 120px;">
|
|
|
|
</div>
|
|
</td>
|
|
<td> </td>
|
|
<td>
|
|
<span class="input-group-btn">
|
|
<button id="btn_search" type="button" class="btn btn-info"><i class="fa fa-search"></i></button>
|
|
</span>
|
|
</td>
|
|
<td style="padding-left: 10px;"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="gridPanel">
|
|
<table id="gridList"></table>
|
|
<div id="gridPager"></div>
|
|
</div>
|