|
|
@ -20,7 +20,7 @@ |
|
|
|
var mold = $.request("mold"); |
|
|
|
//var _MenuCaption = ""; |
|
|
|
var _MenuTag = ""; |
|
|
|
|
|
|
|
var Menu = $.request("Menu"); |
|
|
|
var _MenuID = "";//菜单ID |
|
|
|
var _SourceID = "";//数据源ID |
|
|
|
var _sqlTxt = "";//加上参数的sql |
|
|
@ -58,7 +58,7 @@ |
|
|
|
|
|
|
|
//1、获取当前页菜单名 |
|
|
|
function GetMenuID() { |
|
|
|
|
|
|
|
debugger |
|
|
|
var cc = self.frameElement.getAttribute('id'); |
|
|
|
_MenuID = cc.replace("iframe", ""); |
|
|
|
//_MenuTag = $.request("MenuTag"); |
|
|
@ -137,6 +137,70 @@ |
|
|
|
var LogStr = GetLogStringByNum(parseInt(formatcol.LogStr)); |
|
|
|
|
|
|
|
if (FormatDataType != "日期型") { |
|
|
|
//switch (LogStr) { |
|
|
|
// case "等于": if (val == formatcol.SValue) { |
|
|
|
// if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
// else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
// } |
|
|
|
// break; |
|
|
|
// case "不等于": if (val != formatcol.SValue) { |
|
|
|
// if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
// else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
// } |
|
|
|
// break; |
|
|
|
// case "小于": if (val < formatcol.SValue) { |
|
|
|
// if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
// else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
// } |
|
|
|
// break; |
|
|
|
// case "大于": if (val > formatcol.SValue) { |
|
|
|
// if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
// else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
// } |
|
|
|
// break; |
|
|
|
// case "小于等于": if (val <= formatcol.SValue) { |
|
|
|
// if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
// else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
// } |
|
|
|
// break; |
|
|
|
// case "大于等于": if (val >= formatcol.SValue) { |
|
|
|
// if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
// else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
// } |
|
|
|
// break; |
|
|
|
// case "范围内": if (val >= formatcol.SValue && val <= formatcol.DValue) { |
|
|
|
// if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
// else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
// } |
|
|
|
// break; |
|
|
|
// case "范围外": if (val < formatcol.SValue || val > formatcol.DValue) { |
|
|
|
// if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
// else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
// } |
|
|
|
// break; |
|
|
|
// case "包含": if (val.indexOf(formatcol.SValue) != -1) { |
|
|
|
// if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
// else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
// } |
|
|
|
// break; |
|
|
|
// case "头部包含": if (val.indexOf(formatcol.SValue) == 0) { |
|
|
|
// if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
// else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
// } |
|
|
|
// break; |
|
|
|
// case "尾部包含": if (val.indexOf(formatcol.SValue) == formatcol.length - val.length) { |
|
|
|
// if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
// else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
// } |
|
|
|
// break; |
|
|
|
// case "不包含": if (val.indexOf(formatcol.SValue) == -1) { |
|
|
|
// if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
// else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
// } |
|
|
|
// break; |
|
|
|
|
|
|
|
|
|
|
|
//} |
|
|
|
switch (LogStr) { |
|
|
|
case "等于": if (val == formatcol.SValue) { |
|
|
|
if (IsRow) { _formatcols_Row.push(rr); } |
|
|
@ -148,32 +212,32 @@ |
|
|
|
else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
} |
|
|
|
break; |
|
|
|
case "小于": if (val < formatcol.SValue) { |
|
|
|
case "小于": if (Number(val) < Number(formatcol.SValue)) { |
|
|
|
if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
} |
|
|
|
break; |
|
|
|
case "大于": if (val > formatcol.SValue) { |
|
|
|
case "大于": if (Number(val) > Number(formatcol.SValue)) { |
|
|
|
if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
} |
|
|
|
break; |
|
|
|
case "小于等于": if (val <= formatcol.SValue) { |
|
|
|
case "小于等于": if (Number(val) <= Number(formatcol.SValue)) { |
|
|
|
if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
} |
|
|
|
break; |
|
|
|
case "大于等于": if (val >= formatcol.SValue) { |
|
|
|
case "大于等于": if (Number(val) >= Number(formatcol.SValue)) { |
|
|
|
if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
} |
|
|
|
break; |
|
|
|
case "范围内": if (val >= formatcol.SValue && val <= formatcol.DValue) { |
|
|
|
case "范围内": if (Number(val) >= Number(formatcol.SValue) && Number(val) <= Number(formatcol.DValue)) { |
|
|
|
if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
} |
|
|
|
break; |
|
|
|
case "范围外": if (val < formatcol.SValue || val > formatcol.DValue) { |
|
|
|
case "范围外": if (Number(val) < Number(formatcol.SValue) || Number(val) > Number(formatcol.DValue)) { |
|
|
|
if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
} |
|
|
@ -208,9 +272,9 @@ |
|
|
|
{ |
|
|
|
var VV = val.substring(0, 10); |
|
|
|
switch (LogStr) { |
|
|
|
|
|
|
|
|
|
|
|
case "等于": |
|
|
|
|
|
|
|
|
|
|
|
case "等于": |
|
|
|
if (VV== formatcol.SValue) { |
|
|
|
if (IsRow) { _formatcols_Row.push(rr); } |
|
|
|
else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
@ -252,7 +316,7 @@ |
|
|
|
else { rr += "style='background-color:" + formatcol.Color + "'"; return rr; } |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -310,6 +374,34 @@ |
|
|
|
cellattr: addCellAttr, |
|
|
|
} |
|
|
|
} |
|
|
|
else if (ColCaption == '文件名' && Menu == '111') { |
|
|
|
var FilePath; |
|
|
|
debugger; |
|
|
|
$.ajax({ |
|
|
|
url: "/SystemManage/CommonReport/GetFilePath?" + Math.random(), |
|
|
|
dataType: "json", |
|
|
|
async: false, |
|
|
|
success: function (data) { |
|
|
|
debugger; |
|
|
|
FilePath = data.FilePath; |
|
|
|
} |
|
|
|
}); |
|
|
|
obj = { |
|
|
|
label: ColCaption, |
|
|
|
name: ColFiledName, |
|
|
|
width: ColWidth, |
|
|
|
align: "left", |
|
|
|
sortable: sortable, |
|
|
|
formatter: function (cellvalue, options, rowObject) { |
|
|
|
var html = ""; |
|
|
|
if (cellvalue != "" && cellvalue != null) { |
|
|
|
html = " <a href='../../../File/" +FilePath+ cellvalue + "' download='" + cellvalue + "' style='color:blue;'>" + cellvalue + "</a>"; |
|
|
|
} |
|
|
|
return html; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
obj = { |
|
|
|
label: ColCaption, |
|
|
@ -585,8 +677,8 @@ |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function btn_ExportAll() |
|
|
|
{ |
|
|
|
var condion = new Array(); |
|
|
@ -635,7 +727,87 @@ |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//新增类型 |
|
|
|
function btn_Create() { |
|
|
|
if (Menu == "111") { |
|
|
|
|
|
|
|
$.modalOpen({ |
|
|
|
id: "ICSConfigurationAdd", |
|
|
|
title: "新增", |
|
|
|
url: "/WMS/ICSDeliveryNotice/ICSDeliveryNoticeApplyNegAdd" + "?" + Math.random(), |
|
|
|
width: "1000px", |
|
|
|
height: "800px", |
|
|
|
callBack: function (iframeId) { |
|
|
|
top.frames[iframeId].submitForm(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
//删除库位 |
|
|
|
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.ID + "',"; |
|
|
|
if (objArr == "") { |
|
|
|
objArr = '\'' + rowData.ID + '\''; |
|
|
|
} else { |
|
|
|
objArr = objArr + ',' + '\'' + rowData.ID + '\''; |
|
|
|
} |
|
|
|
} |
|
|
|
if (objArr == '') { |
|
|
|
$.modalAlertNew("WMS00001"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (Menu == "111") { |
|
|
|
$.deleteForm({ |
|
|
|
url: "/WMS/ICSDeliveryNotice/DeleteICSDeliveryNotice" + "?" + Math.random(), |
|
|
|
param: { keyValue: JSON.stringify(objArr) }, |
|
|
|
success: function () { |
|
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid"); |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
//修改类型 |
|
|
|
function btn_Update() { |
|
|
|
if (Menu == "111") { |
|
|
|
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.ID + "',"; |
|
|
|
if (objArr == "") { |
|
|
|
objArr = '\'' + rowData.ID + '\''; |
|
|
|
} else { |
|
|
|
objArr = objArr + ',' + '\'' + rowData.ID + '\''; |
|
|
|
} |
|
|
|
} |
|
|
|
if (objArr == '') { |
|
|
|
$.modalAlertNew("WMS00001"); |
|
|
|
return; |
|
|
|
} |
|
|
|
$.modalOpen({ |
|
|
|
id: "Details", |
|
|
|
title: "修改", |
|
|
|
url: "/WMS/ICSDeliveryNotice/ICSDeliveryNoticeApplyNegUpdate?ID=" + objArr + "&" + Math.random(), |
|
|
|
width: "1000px", |
|
|
|
height: "1200px", |
|
|
|
callBack: function (iframeId) { |
|
|
|
top.frames[iframeId].submitForm(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
function btnPrint() { |
|
|
|
debugger; |
|
|
|
// var mold = 'FP0001'; //条码打印 |
|
|
@ -654,6 +826,43 @@ |
|
|
|
} |
|
|
|
objArr = "" + objArr + "|"; |
|
|
|
arr.push(objArr); |
|
|
|
Arguments = JSON.stringify(arr); |
|
|
|
sessionStorage.setItem("Arguments", Arguments); // 存储参数 |
|
|
|
|
|
|
|
|
|
|
|
$.modalOpen({ |
|
|
|
id: "PrintLot", |
|
|
|
title: "打印", |
|
|
|
url: "/WMS/Print/PrintViewBySession?mold=" + mold + "&" + Math.random(), |
|
|
|
width: "550px", |
|
|
|
height: "1000px", |
|
|
|
callBack: function (iframeId) { |
|
|
|
top.frames[iframeId].submitForm(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
//支持两个参数的打印功能 |
|
|
|
function btnPrint2() { |
|
|
|
debugger; |
|
|
|
// var mold = 'FP0001'; //条码打印 |
|
|
|
var objArr = ''; |
|
|
|
var objArr2 = ''; |
|
|
|
var arr = []; |
|
|
|
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.ID + "',"; |
|
|
|
objArr2 += "'" + rowData.Code + "',"; |
|
|
|
} |
|
|
|
objArr = objArr.slice(0, objArr.length - 1); |
|
|
|
objArr2 = objArr2; |
|
|
|
if (objArr == "") { |
|
|
|
$.modalAlertNew("WMS00003"); |
|
|
|
return; |
|
|
|
} |
|
|
|
objArr = "" + objArr + "|" + objArr2; |
|
|
|
arr.push(objArr); |
|
|
|
|
|
|
|
|
|
|
|
$.modalOpen({ |
|
|
@ -678,6 +887,9 @@ |
|
|
|
<div class="btn-group"> |
|
|
|
<a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a> |
|
|
|
<a class="btn btn-primary dropdown-text" onclick="btn_Filter()"><i class="fa fa-filter"></i>过滤</a> |
|
|
|
<a id="NF-Create" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_Create()"><i class="fa fa-pencil-square-o"></i>新增</a> |
|
|
|
<a id="NF-Delete" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_Delete()"><i class="fa fa-pencil-square-o"></i>删除</a> |
|
|
|
<a id="NF-Update" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_Update()"><i class="fa fa-pencil-square-o"></i>修改</a> |
|
|
|
</div> |
|
|
|
<div class="btn-group"> |
|
|
|
|
|
|
@ -685,10 +897,12 @@ |
|
|
|
<a id="NF-Cols" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_Cols()"><i class="fa fa-text-width"></i>列设置</a> |
|
|
|
<a id="NF-GridFormat" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_GridFormat()"><i class="fa fa-bars"></i>个性化设置</a> |
|
|
|
<a id="NF-Clear" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_Clear()"><i class="fa fa-times"></i>清空本菜单所有设置</a> |
|
|
|
<a id="NF-ExportAll" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_ExportAll()"><i class="fa fa-download"></i>全部导出</a> |
|
|
|
<a id="NF-WatchPanel" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_WatchPanel()"><i class="fa fa-download"></i>看板显示</a> |
|
|
|
<a id="NF-ColsVisible" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_ColsVisible()"><i class="fa fa-user"></i>角色显示栏位</a> |
|
|
|
<a id="NF-ExportAll" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_ExportAll()"><i class="fa fa-download"></i>全部导出</a> |
|
|
|
<a id="NF-WatchPanel" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_WatchPanel()"><i class="fa fa-download"></i>看板显示</a> |
|
|
|
<a id="NF-ColsVisible" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_ColsVisible()"><i class="fa fa-user"></i>角色显示栏位</a> |
|
|
|
<a id="NF-Print" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnPrint()"><i class="fa fa-pencil-square-o"></i>打印</a> |
|
|
|
<a id="NF-Print2" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnPrint2()"><i class="fa fa-pencil-square-o"></i>打印</a> |
|
|
|
|
|
|
|
@*<a id="NF-GridHeader" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_GridHeader()"><i class="fa fa-list-alt"></i>多表头设置</a>*@ |
|
|
|
</div> |
|
|
|
|
|
|
|
xxxxxxxxxx