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.
522 lines
24 KiB
522 lines
24 KiB
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Views/Shared/_Index.cshtml";
|
|
}
|
|
|
|
|
|
<script src="~/Content/js/datepicker/WdatePicker.js"></script>
|
|
<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>
|
|
var _Clos = new Array();
|
|
$("#F_Type").val("2");
|
|
$(function () {
|
|
SetCols();
|
|
gridList();
|
|
})
|
|
|
|
function SetCols() {
|
|
$.ajax({
|
|
url: "/Print/SelectColumnName?" + Math.random(),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
var cols = new Array();
|
|
|
|
var collast = { label: "主键", name: "ID", hidden: true, key: true };
|
|
cols.push(collast);
|
|
var collast = { label: '工单ID', name: 'RCVCode', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
|
|
if (data != null && data.length > 0) {
|
|
DateList = data;
|
|
for (var i = 0; i < data.length; i++) {
|
|
var ColName = data[i].ColName;
|
|
var ColCode = data[i].ColCode;
|
|
var obj = new Array();
|
|
obj = {
|
|
label: ColName,
|
|
name: ColCode,
|
|
width: 80,
|
|
align: "left"
|
|
}
|
|
cols.push(obj);
|
|
}
|
|
}
|
|
$.ajax({
|
|
url: "/Print/SelectTableColumnName?" + Math.random(),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
if (data != null && data.length > 0) {
|
|
DateList = data;
|
|
for (var i = 0; i < data.length; i++) {
|
|
var TableCode = data[i].TableCode;
|
|
if (TableCode == "ICSMOIssue") {
|
|
var Code = data[i].Code;
|
|
var Name = data[i].Name;
|
|
var obj = new Array();
|
|
obj = {
|
|
label: Name,
|
|
name: Code,
|
|
width: 80,
|
|
align: "left"
|
|
}
|
|
cols.push(obj);
|
|
}
|
|
if (TableCode == "ICSInventory") {
|
|
var Code = data[i].Code;
|
|
var Name = data[i].Name;
|
|
var obj = new Array();
|
|
obj = {
|
|
label: Name,
|
|
name: Code,
|
|
width: 80,
|
|
align: "left"
|
|
}
|
|
cols.push(obj);
|
|
//cols1.push(obj);
|
|
}
|
|
}
|
|
}
|
|
_Clos = cols;
|
|
//_Clos1 = cols1;
|
|
}
|
|
|
|
});
|
|
_Clos = cols;
|
|
}
|
|
});
|
|
}
|
|
|
|
function gridList() {
|
|
var $gridList = $("#gridList");
|
|
|
|
var queryJson = {
|
|
POCode: $("#txt_POCode").val(),
|
|
InvCode: $("#txt_InvCode").val(),
|
|
InvName: $("#txt_InvName").val(),
|
|
WHCode: $("#txt_WHCode").val(),
|
|
WHName: $("#txt_WHName").val(),
|
|
//BatchCode: $("#txt_BatchCode").val(),
|
|
FromTime: $("#FromTime").val(),
|
|
ToTime: $("#ToTime").val(),
|
|
F_Type: $("#F_Type").val(),
|
|
//POStatus: $("#selShow").val()
|
|
}
|
|
$gridList.dataGrid({
|
|
url: "/MFWMS/ICSMOIssueSendBack/GetMOIssueSendBackApplyNeg" + "?" + Math.random(),
|
|
postData: { queryJson: JSON.stringify(queryJson) },
|
|
height: $(window).height() - 200,
|
|
width: $(window).width() - 300,
|
|
colModel: [
|
|
{ label: '出库单号', name: 'RCVCode', width: 120, align: 'left' },
|
|
//{ label: '仓库代码', name: 'WHCode', width: 150, align: 'left' },
|
|
//{ label: '仓库名称', name: 'WarehouseName', width: 150, align: 'left' },
|
|
{
|
|
label: "状态", name: "Status", width: 80, align: "left",
|
|
formatter: function (cellvalue) {
|
|
if (cellvalue == "1") {
|
|
return "开立";
|
|
} else if (cellvalue == "2") {
|
|
return "审核";
|
|
} else if (cellvalue == "3") {
|
|
return "关闭";
|
|
}
|
|
else { return ""; }
|
|
}
|
|
},
|
|
{
|
|
label: "类型", name: "Type", width: 80, align: "left",
|
|
formatter: function (cellvalue) {
|
|
if (cellvalue == "1") {
|
|
return "蓝字出库单";
|
|
}
|
|
else { return "红字出库单"; }
|
|
}
|
|
},
|
|
{ label: '操作人', name: 'MUSERName', width: 150, align: 'left' },
|
|
{ label: '操作时间', name: 'MTIME', width: 150, align: 'left' },
|
|
|
|
],
|
|
shrinkToFit: true,//宽度自适应
|
|
autoWidth: true,
|
|
gridComplete: function () {
|
|
},
|
|
pager: "#gridPager",
|
|
sortorder: "desc",
|
|
sortname: 'MTIME',
|
|
viewrecords: true,
|
|
multiselect: true,
|
|
//beforeSelectRow: function (rowid, e) {
|
|
// $("#gridList").jqGrid('resetSelection');
|
|
// return (true);
|
|
//},
|
|
subGrid: true, // (1)开启子表格支持
|
|
subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数
|
|
$("#gridList").jqGrid("setSelection", rowid, false);
|
|
bindSubGrid(subgrid_id, rowid)
|
|
}
|
|
});
|
|
$("#warehouse a.btn-default").click(function () {
|
|
$("#warehouse a.btn-default").removeClass("active");
|
|
$(this).addClass("active");
|
|
$('#btn_search').trigger("click");
|
|
});
|
|
$("#btn_search").click(function () {
|
|
var warehouse = $("#warehouse a.active").attr('data-value');
|
|
var queryJson = {
|
|
POCode: $("#txt_POCode").val(),
|
|
InvCode: $("#txt_InvCode").val(),
|
|
InvName: $("#txt_InvName").val(),
|
|
WHCode: $("#txt_WHCode").val(),
|
|
WHName: $("#txt_WHName").val(),
|
|
//BatchCode: $("#txt_BatchCode").val(),
|
|
FromTime: $("#FromTime").val(),
|
|
ToTime: $("#ToTime").val(),
|
|
F_Type: $("#F_Type").val(),
|
|
//POStatus: $("#selShow").val()
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
postData: { queryJson: JSON.stringify(queryJson) },
|
|
}).trigger('reloadGrid');
|
|
});
|
|
}
|
|
function bindSubGrid(subgrid_id, rowid) {
|
|
|
|
$("#gridList").jqGrid("setSelection", rowid, false);
|
|
var subgrid_table_id;
|
|
subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
|
|
|
|
var subgrid_pager_id;
|
|
subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
|
|
|
|
// (5)动态添加子报表的table和pager
|
|
$("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>");
|
|
var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode;
|
|
// (6)创建jqGrid对象
|
|
$("#" + subgrid_table_id).dataGrid({
|
|
cellEdit: true,
|
|
url: "/MFWMS/ICSMOIssueSendBack/GetMOIssueApplyNegDetail?RCVCode=" + RCVCode + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
|
|
colModel: [
|
|
{ label: "主键", name: "ID", hidden: true, key: true },
|
|
{ label: '行号', name: 'Sequence', width: 120, align: 'left' },
|
|
{ label: '来源工单号', name: 'SourceCode', width: 180, align: 'left' },
|
|
{ label: '来源工单行号', name: 'SourceSequence', width: 180, align: 'left' },
|
|
{ label: '物料代码', name: 'InvCode', width: 120, align: 'left' },
|
|
{ label: '物料名称', name: 'InvName', width: 120, align: 'left', },
|
|
{ label: '数量', name: 'Quantity', width: 120, align: 'left' },
|
|
{ label: '已发数量', name: 'RCVQuantity', width: 120, align: 'left' },
|
|
{ label: '仓库代码', name: 'WHCode', width: 120, align: 'left' },
|
|
{ label: '仓库名称', name: 'WHName', width: 120, align: 'left' },
|
|
{ label: '辅计量', name: 'Amount', width: 120, align: 'left' },
|
|
{ label: '创建人', name: 'CreatePerson', width: 120, align: 'left' },
|
|
{ label: '创建时间', name: 'CreateDateTime', width: 120, align: 'left' },
|
|
{ label: '操作人', name: 'MUSER', width: 150, align: 'left' },
|
|
{ label: '操作人名称', name: 'MUSERName', width: 150, align: 'left' },
|
|
{ label: '操作时间', name: 'MTIME', width: 150, align: 'left' },
|
|
],
|
|
sortname: 'Sequence',
|
|
shrinkToFit: true,//宽度自适应
|
|
//multiselect: true,
|
|
prmNames: { search: "search" },
|
|
viewrecords: true,
|
|
height: "100%",
|
|
rowNum: 20,
|
|
pager: subgrid_pager_id,
|
|
});
|
|
}
|
|
|
|
//function btn_Delete() {
|
|
// var objArr = '';
|
|
// var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
|
|
// for (var i = 0; i < objList.length; i++) {
|
|
// var rowId = objList[i];
|
|
// var rowData = $("#gridList").jqGrid('getRowData', rowId);
|
|
// objArr += "'" + rowData.RCVCode + "',";
|
|
// }
|
|
// if (objArr == '') {
|
|
// $.modalAlertNew("WMS00001");
|
|
// return;
|
|
// }
|
|
// $.deleteForm({
|
|
// url: "/WMS/ICSMOIssue/DeleteMOIssueApplyNeg" + "?" + Math.random(),
|
|
// param: { keyValue: JSON.stringify(objArr) },
|
|
// success: function () {
|
|
// $.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
// }
|
|
// })
|
|
//}
|
|
|
|
////修改类型
|
|
//function btn_update() {
|
|
// var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
|
|
// if (ids.length != 1) {
|
|
// $.modalAlertNew("WMS00006");
|
|
// return;
|
|
// }
|
|
// for (var i in ids) {
|
|
// var rowData = jQuery("#gridList").jqGrid("getRowData", ids[i]);
|
|
// //ID
|
|
// var ID = "";
|
|
// ID = rowData.ID;
|
|
// var RCVCode = "";
|
|
// RCVCode = rowData.RCVCode;
|
|
// Type = rowData.Type == "蓝字出库单" ? 1 : 2;
|
|
// $.modalOpen({
|
|
// id: "Details",
|
|
// title: "修改",
|
|
// url: "/WMS/ICSMOIssue/ICSMOIssueEdit?ID=" + ID + "&RCVCode=" + RCVCode + "&Type=" + Type + "&At=" + '1' + "&" + Math.random(),
|
|
// width: "1000px",
|
|
// height: "1200px",
|
|
// callBack: function (iframeId) {
|
|
// top.frames[iframeId].submitForm();
|
|
// }
|
|
// });
|
|
// }
|
|
//}
|
|
|
|
|
|
//function btnCreate() {
|
|
// $.modalOpen({
|
|
// id: "BRGCodeAdd",
|
|
// title: "新增",
|
|
// url: "/WMS/ICSMOIssue/ICSMOIssueEdit?" + "At=" + '0' + "&" + Math.random(),
|
|
// width: "1000px",
|
|
// height: "1200px",
|
|
// callBack: function (iframeId) {
|
|
// top.frames[iframeId].submitForm();
|
|
// }
|
|
// });
|
|
//}
|
|
|
|
function btn_Audit() {
|
|
var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
|
|
var RCVCodeArr = '';
|
|
if (ids.length != 1) {
|
|
$.modalAlertNew("WMS00087");
|
|
return;
|
|
}
|
|
var RoleEnCode = '@NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode'
|
|
var WorkPoint = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
|
|
var date = new Date();
|
|
for (var i in ids) {
|
|
RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
|
|
Status = $("#gridList").jqGrid('getRowData', ids[i]).Status;
|
|
if (Status != '开立') {
|
|
$.modalAlertNew("WMS00088");
|
|
return;
|
|
}
|
|
RCVCodeArr = RCVCodeArr == '' ? "'" + RCVCode + "'" : RCVCodeArr + ",'" + RCVCode + "'";
|
|
}
|
|
|
|
$.submitForm({
|
|
url: "/MFWMS/ICSMOIssueSendBack/ICSMOIssueSendBackAndReduceStocks?" + Math.random(),
|
|
param: { keyValue: RCVCodeArr },
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
function btn_AbstentionOfAudit() {
|
|
var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
|
|
var RCVCodeArr = '';
|
|
if (ids.length != 1) {
|
|
$.modalAlertNew("WMS00087");
|
|
return;
|
|
}
|
|
var RoleEnCode = '@NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode'
|
|
var WorkPoint = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
|
|
var date = new Date();
|
|
for (var i in ids) {
|
|
RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode;
|
|
Status = $("#gridList").jqGrid('getRowData', ids[i]).Status;
|
|
if (Status != '审核') {
|
|
$.modalAlertNew("WMSOur0008");
|
|
return;
|
|
}
|
|
RCVCodeArr = RCVCodeArr == '' ? "'" + RCVCode + "'" : RCVCodeArr + ",'" + RCVCode + "'";
|
|
}
|
|
|
|
$.submitForm({
|
|
url: "/MFWMS/ICSMOIssueSendBack/ICSMOIssueSendBackAuditRollback?" + Math.random(),
|
|
param: { keyValue: RCVCodeArr },
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
|
|
</script>
|
|
<iframe id="ifrm" src="" width="0" height="0"></iframe>
|
|
<script>
|
|
|
|
</script>
|
|
<div class="topPanel" style="height: 100px">
|
|
<div class="toolbar">
|
|
<div class="btn-group">
|
|
<a id="NF-Audit" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_Audit()"><i class="fa fa-pencil-square-o"></i>审核</a>
|
|
<a id="NF-RollbackAudit" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_AbstentionOfAudit()"><i class="fa fa-pencil-square-o"></i>弃审</a>
|
|
@*<a id="NF-Delete" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_Delete()"><i class="fa fa-trash-o"></i>删除</a>*@
|
|
<a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
|
|
</div>
|
|
@*<div class="btn-group" style="display:block;padding-left:2px;">
|
|
<a class="btn btn-primary" id="downPrintControl" href="~/PrintActivex.exe" style="display:none">点击下载打印组件</a>
|
|
<a id="NF-Import" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_Import()"><i class="fa fa-pencil-square-o"></i>导入</a>
|
|
<a id="NF-Rebind" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_Rebind()"><i class="fa fa-pencil-square-o"></i>重新绑定</a>
|
|
<a id="NF-Looks" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreateLook()"><i class="fa fa-pencil-square-o"></i>查看子件信息</a>
|
|
</div>*@
|
|
<script>$('.toolbar').authorizeButton()</script>
|
|
</div>
|
|
<div class="search">
|
|
<table>
|
|
<tr>
|
|
<td class="POCodeShow" style="text-align:right;"><label class="lglabel HideItems" id="POCodeShowLable" for="txt_POCode"> 生产退库单号</label>:</td>
|
|
<td class="POCodeShow">
|
|
<div class="input-group HideItems">
|
|
<input id="txt_POCode" type="text" class="form-control" style="width: 130px;">
|
|
</div>
|
|
</td>
|
|
@*<td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenCode"> 供应商代码</label>:</td>
|
|
<td class="HideItems">
|
|
<div class="input-group HideItems">
|
|
<input id="txt_VenCode" type="text" class="form-control HideItems" style="width: 130px;">
|
|
</div>
|
|
</td>
|
|
|
|
<td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenName"> 供应商名称</label>:</td>
|
|
<td class="HideItems">
|
|
<div class="input-group HideItems">
|
|
<input id="txt_VenName" type="text" class="form-control HideItems" style="width: 130px;">
|
|
</div>
|
|
</td>*@
|
|
|
|
<td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_WHCode"> 仓库编码</label>:</td>
|
|
<td>
|
|
<div class="input-group HideItems">
|
|
<input id="txt_WHCode" type="text" class="form-control HideItems" style="width: 130px;">
|
|
</div>
|
|
</td>
|
|
|
|
<td style="text-align:right;"><label class="lglabel" for="txt_WHName"> 仓库名称</label>:</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_WHName" type="text" class="form-control" style="width: 130px;">
|
|
</div>
|
|
</td>
|
|
@*<td class="HideItems2" style="text-align:right;"><label class="lglabel HideItems2" for="txt_VenName"> 源头单据号</label>:</td>
|
|
<td class="HideItems2">
|
|
<div class="input-group HideItems2">
|
|
<input id="txt_SCode" type="text" class="form-control HideItems2" style="width: 130px;">
|
|
</div>
|
|
</td>*@
|
|
<td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName"> 日期(从)</label>:</td>
|
|
<td class="HideItemsTime">
|
|
<div class="input-group HideItemsTime">
|
|
<input id="FromTime" name="FromTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(从)" />
|
|
</div>
|
|
</td>
|
|
<td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName"> 日期(到)</label>:</td>
|
|
<td class="HideItemsTime">
|
|
<div class="input-group HideItemsTime">
|
|
<input id="ToTime" name="ToTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(到)" />
|
|
</div>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_InvCode"> 物料编码</label>:</td>
|
|
<td>
|
|
<div class="input-group HideItems">
|
|
<input id="txt_InvCode" type="text" class="form-control HideItems" style="width: 130px;">
|
|
</div>
|
|
</td>
|
|
|
|
<td style="text-align:right;"><label class="lglabel" for="txt_InvName"> 物料名称</label>:</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_InvName" type="text" class="form-control" style="width: 130px;">
|
|
</div>
|
|
</td>
|
|
@*<td style="text-align:right;"><label class="lglabel" for="txt_BatchCode"> 批次号</label>:</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_BatchCode" type="text" class="form-control" style="width: 130px;">
|
|
</div>
|
|
</td>*@
|
|
<td>
|
|
<label> 是否审核: </label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<select id="F_Type" name="F_Type" class="form-control" style="width: 130px;">
|
|
<option value="0">显示全部</option>
|
|
<option value="1">已审核</option>
|
|
<option value="2" selected="selected">未审核</option>
|
|
</select>
|
|
</div>
|
|
</td>
|
|
@*<td id="GDLX">
|
|
<label> 工单类型: </label>
|
|
</td>
|
|
<td id="GDLX2">
|
|
<div class="input-group">
|
|
<select id="SelGDLX" name="SelShow" class="form-control" style="width: 130px;">
|
|
</select>
|
|
</div>
|
|
</td>
|
|
<td class="GDLX" style="display:none">
|
|
<label> 工单类型: </label>
|
|
</td>
|
|
<td class="GDLX" style="display:none">
|
|
<div class="input-group">
|
|
<select id="selShow" name="F_Target" class="form-control" style="width: 100px;">
|
|
<option value="0">显示全部</option>
|
|
<option value="1">已全部生成</option>
|
|
<option value="2" selected="selected">未全部生成</option>
|
|
</select>
|
|
</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">
|
|
<table id="gridList"></table>
|
|
<div id="gridPager"></div>
|
|
</div>
|