From 24efc0b0d99502afdebb6ef678b0cf4e91dcb084 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 16 五月 2025 15:49:51 +0800
Subject: [PATCH] 组织物料启动检查项目防错装置优化
---
WebTM/views/计划管理/工艺路线/Gy_RoutingBillList.html | 1225 +++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 1,000 insertions(+), 225 deletions(-)
diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
index 6b7f46d..9f5b8c6 100644
--- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
+++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
@@ -1,4 +1,4 @@
-锘�<!DOCTYPE html>
+锘� <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@@ -13,7 +13,8 @@
<script src="../../../layuiadmin/scripts/jquery-1.4.1.min.js"></script>
<script src="../../../layuiadmin/pubcustom.js"></script>
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
- <script src="../../../layuiadmin/HideButton.js"></script>
+ <script src="../../../layuiadmin/HideButton_New.js"></script>
+ <script src="../../../layuiadmin/SetColumn.js"></script>
<script src="../../../layuiadmin/soulTable.slim.js"></script>
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
</head>
@@ -52,31 +53,37 @@
<div class="layui-inline">
<label class="layui-form-label">鍗曟嵁鍙�</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" name="WorkCenter" id="WorkCenter">
+ <input type="text" class="layui-input ForFilteringSchemes" name="WorkCenter" id="WorkCenter">
</div>
</div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐗╂枡浠g爜</label>
- <div class="layui-input-block">
- <input type="hidden" class="layui-input" lay-verify="HMaterID" name="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
- <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="padding: 0 10px;float: right;margin-right: 3px;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
- </button>
+ <div class="layui-row" style="margin-top:10px;margin-left:4%;">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐗╂枡浠g爜</label>
+ <div class="layui-input-block">
+ <input type="hidden" class="layui-input " lay-verify="HMaterID" name="HMaterID" id="HMaterID" value="0" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="text" class="layui-input ForFilteringSchemes" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" value="" style="background-color:#efefef4d;width: 60%;display: inline-block;">
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="padding: 0 10px;float: right;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ </div>
</div>
- </div>
- <div class="layui-row" style="margin-top:10px;margin-left:5%;">
<!--鍏朵粬鏉′欢-->
<div class="layui-inline">
<label class="layui-form-label" style="width: 76px;">鐗╂枡鍚嶇О</label>
<div class="layui-input-block" style="margin-left: 107px;">
- <input type="text" class="layui-input" name="HMaterName" id="HMaterName">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HMaterName" id="HMaterName">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">瑙勬牸鍨嬪彿</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HModel" id="HModel">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HModel" id="HModel">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鍩哄噯鍊�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HBenchmarkValue" id="HBenchmarkValue">
</div>
</div>
</div>
@@ -97,24 +104,27 @@
</select>
</div>
</div>
- <button class="layui-btn layuiadmin-btn-order" style="display:none;" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+ <button class="layui-btn layuiadmin-btn-order" style="" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
- <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding: 0 5px; display: none;">閲嶇疆</button>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding: 0 5px;">閲嶇疆</button>
</div>
-
+ <!--鏄剧ず褰撳墠杩囨护鏂规-->
+ <div class="layui-inline" style="margin-left:5px;">
+ <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div>
+ </div>
<div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
<div class="layui-row" style="margin-top: 10px; margin-bottom: 10px ">
<div class="layui-inline">
<label class="layui-form-label">杩囨护</label>
<div class="layui-input-block">
- <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+ <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;" class="ForFilteringSchemes">
</select>
</div>
</div>
<div class="layui-inline">
- <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+ <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;" class="ForFilteringSchemes">
<option value="0" selected="selected"></option>
<option value="=">=</option>
<option value=">=">>=</option>
@@ -129,7 +139,7 @@
</select>
</div>
<div class="layui-inline">
- <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent">
</div>
</div>
<div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
@@ -193,14 +203,14 @@
<table class="" id="mainTable" lay-filter="mainTable"></table>
<div id="page" style="position:relative;bottom:0;"></div>
<script type="text/html" id="toolbarDemo">
- <div class="layui-btn-container">
+ <div class="layui-btn-container" id="toolbarDemo_ButtonSet">
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Excel"><i class="layui-icon layui-icon-delete"></i>Excel瀵煎叆</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Copy" id="set_Copy"><i class="layui-icon layui-icon-form"></i>澶嶅埗</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew" id="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNewSub" id="set_AddNewSub"><i class="layui-icon layui-icon-file-b"></i>鏂板瀛愯矾绾�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill" id="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Copy" id="set_Copy"><i class="layui-icon layui-icon-form"></i>澶嶅埗</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill" id="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>鍙嶅鏍�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_defaultRoute" id="set_defaultRoute"><i class="layui-icon layui-icon-form"></i>鍚敤榛樿</button>
@@ -210,16 +220,20 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill_Flow" id="CheckBill_Flow"><i class="layui-icon layui-icon-form"></i>澶氱骇瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck_Flow" id="AbandonCheck_Flow"><i class="layui-icon layui-icon-form"></i>澶氱骇鍙嶅鏍�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_RejectCheck_Flow" id="RejectCheck_Flow"><i class="layui-icon layui-icon-form"></i>椹冲洖</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_WithdrawCheck_Flow" id="WithdrawCheck_Flow"><i class="layui-icon layui-icon-form"></i>鎾ゅ洖</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>鍏抽棴</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>鍙嶅叧闂�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Drop" id="btn-Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeDrop" id="btn-DeDrop"><i class="layui-icon layui-icon-radio"></i>鍙嶄綔搴�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-ProcPriceRequestBills" id="btn-ProcPriceRequestBills"><i class="layui-icon layui-icon-delete"></i>澶氳涓嬫帹(瀹氶鐢宠鍗�)</button>
- <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit"><i class="layui-icon layui-icon-repeat"></i>瀹℃牳</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit"><i class="layui-icon layui-icon-refresh"></i>鍙嶅鏍�</button>-->
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="set_HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_SaveScheme" id="btn_SaveScheme"><i class="layui-icon layui-icon-template"></i>淇濆瓨鏂规</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_ReadScheme" id="btn_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_BulkEditWorkTime" id="btn_BulkEditWorkTime"><i class="layui-icon layui-icon-set"></i>鎵规敼灏忔椂浜ц兘</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_SourceWorkQty" id="btn_SourceWorkQty"><i class="layui-icon layui-icon-set"></i>浜х嚎浜ц兘</button>
</div>
</script>
</form>
@@ -249,11 +263,27 @@
var sWhere = "";
var option = [];
var page = 1;//鍒嗛〉鏁版嵁
- var size = 50;
- var HBillType = 3301;
+ var size = 50;
var ins; //鐢ㄤ簬瀵煎嚭excel
var HModName = "Gy_RoutingBillList";
- var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ var HBillType = 3301;
+ var set_HideButton_ID = "toolbarDemo_ButtonSet";//闇�瑕佽缃殑鎸夐挳鐨勭埗绾ц妭鐐圭殑id
+ //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ var titleData = ["hmainid", "HMaterID", "HUnitID", "HOrgID", "hsubid", "HProcID", "HSupID", "HCenterID", "HMainCenterID", "HMainProcID", "HCenterID_S", "HProcID_S", "HItemID", "HPRDORGID", "HDayWorkQty", "HGroupID", "HWorkerID", "HSourceID", "HNextProcFlag", "HBadWHID", "HBadWHName", "HWasterWHID", "HWasterWHName", "HWhID", "HWHName", "HBillSubType", "HQCSchemeID_Fst", "HQCSchemeID_Proc","HQCSchemeID_Patrol"];
+
+ //#region 銆愯繃婊ゆ柟妗堛��
+
+ //杩囨护鏉′欢鐨刢lass绫�
+ var HClassTag = "ForFilteringSchemes";
+ //妯″潡鍚嶇О锛堜腑鏂囩増锛� 姣忎釜妯″潡椤甸潰閮介渶瑕佷慨鏀�
+ window.HModuleName = "宸ヨ壓璺嚎鍒楄〃";
+ //鏄惁宸茬粡閫夋嫨浜嗚繃婊ゆ柟妗堬紙鍏ㄥ眬鍙橀噺锛�
+ window.HDefaultFilter = "";
+ //閫夋嫨鐨勮繃婊ゆ柟妗堝唴鐮侊紙鍏ㄥ眬鍙橀噺锛�
+ window.HInterID_Choose = 0;
+
+ //#endregion
+
//鑾峰彇鍙傛暟
function getUrlVars() {
var vars = [], hash;
@@ -324,6 +354,9 @@
//椹冲洖
case 'set_RejectCheck_Flow': set_RejectCheck_Flow();
break;
+ //鎾ゅ洖
+ case 'set_WithdrawCheck_Flow': set_WithdrawCheck_Flow();
+ break;
//澶嶅埗
case 'set_Copy': set_Copy();
break;
@@ -345,20 +378,40 @@
//鍙嶅叧闂�
case 'set_CancelCloseBill': set_CloseBill(2);
break;
+ //浣滃簾鎸夐挳 锛�1:浣滃簾銆�2:鍙嶄綔搴燂級
+ case 'btn-Drop':set_DropBill(1);
+ break;
+ //鍙嶄綔搴熸寜閽�
+ case 'btn-DeDrop':set_DropBill(2);
+ break;
//閫�鍑烘寜閽�
case 'get_Exit': Pub_Close(2);
- break;
- //鍒楄缃�
- case 'set_HideColumn': get_HideColumn();
- break;
+ break;
//瀵煎嚭excel
case 'get_export':
get_Export();
break;
+ //瀵煎叆
+ case 'set_Excel': set_Excel();
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn': get_HideColumnNoPage(HModName, sessionStorage["HUserName"], option, get_FastQuery);
+ break;
//鎸夐挳璁剧疆
case 'set_HideButton':
- var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
- get_HideButton(btns, "3301", HModName, sessionStorage["HUserName"]);
+ get_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]);
+ break;
+ //淇濆瓨鏂规
+ case 'btn_SaveScheme': set_SaveScheme();
+ break;
+ //璇诲彇鏂规
+ case 'btn_ReadScheme': set_ReadScheme();
+ break;
+ //鎵规敼灏忔椂浜ц兘
+ case 'btn_BulkEditWorkTime': set_BulkEditWorkTime();
+ break;
+ //浜х嚎浜ц兘
+ case 'btn_SourceWorkQty': set_SourceWorkQty();
break;
};
});
@@ -455,9 +508,12 @@
set_InitGrid();
Organ();
//鏌ヨ
- get_FastQuery(1);
+ //get_FastQuery(1);
//鑾峰彇椤圭洰鍙�
Get_HProject();
+ //鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规
+ get_DefaultModule();
+ $("#HBenchmarkValue").val(localStorage["HBenchmarkValue"])
}
//#endregion
@@ -583,6 +639,85 @@
}
});
})
+ //#endregion
+
+ //#region 鍙屽嚮琛屽脊鍑哄脊妗嗭紝缁存姢涓嶅悓鐢熶骇璧勬簮鐨勫皬鏃朵骇鑳�
+ table.on('rowDouble(mainTable)', function (obj) {
+ var HMaterNumber = obj.data.鐗╂枡浠g爜;
+ var HMaterName = obj.data.鐗╂枡鍚嶇О;
+ var HMaterModel = obj.data.瑙勬牸鍨嬪彿;
+ var HProcName = obj.data.宸ュ簭;
+ var HBillInterID = obj.data.hmainid;
+ var HBillEntryID = obj.data.hsubid;
+ var HSortProcFlag = obj.data.鎺掍骇宸ュ簭鏍囪;
+
+ if (HSortProcFlag == "true" || HSortProcFlag == "1" || HSortProcFlag == "鏄�" || HSortProcFlag == true) {
+ layer.open({
+ type: 2
+ , area: ['80%', '80%']
+ , title: '鐢熶骇璧勬簮浜ц兘璁剧疆'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../璁″垝绠$悊/宸ヨ壓璺嚎/Gy_RoutingBillWorkQty.html?HMaterNumber=' + HMaterNumber + '&HMaterName=' + HMaterName + '&HMaterModel=' + HMaterModel + '&HProcName=' + HProcName + '&HBillInterID=' + HBillInterID + '&HBillEntryID=' + HBillEntryID, 'yes']
+ })
+ } else {
+ layer.msg('鎵�閫夊伐搴忥細' + HProcName + '锛屼笉涓烘帓浜у伐搴忥紒');
+ }
+ })
+ //#endregion
+
+ //#region 鍥炶溅鏌ヨ
+
+ //鍗曟嵁鍙峰洖杞︽柟娉�
+ $('#WorkCenter').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
+ //鐗╂枡浠g爜鍥炶溅鏂规硶
+ $('#HMaterNumber').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
+ //鐗╂枡鍚嶇О鍥炶溅鏂规硶
+ $('#HMaterName').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
+ //瑙勬牸鍨嬪彿鍥炶溅鏂规硶
+ $('#HModel').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
+ //鑷畾涔夎繃婊ゅ洖杞︽柟娉�
+ $('#ColContent').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
+ //鑷畾涔夎繃婊ゅ洖杞︽柟娉�
+ $('#ColContent1').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
+ //鑷畾涔夎繃婊ゅ洖杞︽柟娉�
+ $('#ColContent2').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
+ });
+
//#endregion
//#region 閲嶇疆杩囨护鏉′欢鏂规硶
@@ -753,8 +888,15 @@
option.data = result;
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option, titleData)
+ table.render(option);
+
+ //鍒锋柊鎸夐挳鏄剧ず
+ Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]);
+
layer.close(ajaxLoad);
- DisPlay_HideColumn();
+
if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
ColFilter();
}
@@ -773,7 +915,7 @@
//#region 蹇�熻繃婊�
function get_FastQuery(number) {
-
+
var HDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
var HDate1 = $("#HEndDate").val();//缁撴潫鏃ユ湡
var HOrgID = "";
@@ -853,7 +995,7 @@
com2 = "not like''%" + ColContent2 + "%''";
break;
default:
- com2 = "" + Comparator + "''" + ColContent + "''";
+ com2 = "" + Comparator2 + "''" + ColContent2 + "''";
break;
}
sWhere += " and " + ColName2 + " " + com2;
@@ -866,7 +1008,7 @@
}
if (HMaterID != "" && HMaterID != "undefined" && HMaterID != null) {
//浠庡埆鐨勯〉闈㈡墦寮�浼犲叆Hmaterid鍊硷紝璁剧疆鐗╂枡杩囨护,鏈叧闂�
- sWhere += " and HMaterID = " + HMaterID + " and 鍏抽棴浜�=''''";
+ sWhere += " and HMaterID = " + HMaterID + " and 鐘舵��=''瀹℃牳'' and 澶辨晥鏃堕棿>GETDATE()";
} else {
//涓嶆槸浠庡埆鐨勯〉闈㈡墦寮�
var HMaterID2 = $("#HMaterID").val();
@@ -886,7 +1028,8 @@
sWhere += " and 鍗曟嵁绫诲瀷 like ''%" + HOrderProcNO + "%''";
}
if (HMaterName) {
- sWhere += "and 鐗╂枡鍚嶇О like ''%" + HMaterName + "%''";
+ //sWhere += "and 鐗╂枡鍚嶇О like ''%" + HMaterName + "%''";
+ sWhere += "and REPLACE(鐗╂枡鍚嶇О, CHAR(10), '''') like ''%" + HMaterName + "%''";
}
if (HMaterNumber) {
sWhere += "and 鐗╂枡浠g爜 like ''%" + HMaterNumber + "%''";
@@ -900,14 +1043,17 @@
if (HOrgID) {
sWhere += " and HOrgID = ''" + HOrgID + "''";
}
- if (number==2) {
- if (HProject!='0') {
+ if (number == 2) {
+ if (HProject != '0') {
sWhere += " and 椤圭洰鍙� like ''%" + HProject + "%''";
}
}
-
+
sWhere += " and 宸ュ簭浠g爜 != ''9999'' and HBillSubType<>''SUB''"
- get_DisplayPage(sWhere);
+ //鍒ゆ柇鏉冮檺
+ if (PermissionJudge() == true) {
+ get_DisplayPage(sWhere);
+ }
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
}
//#endregion
@@ -975,16 +1121,22 @@
}
}
option.data = result;
- laypage.render(optionPage);
//鍒锋柊琛ㄦ牸鏁版嵁
- DisPlay_HideColumn();
+ DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option, titleData)
+ laypage.render(optionPage);
+ table.render(option);
+ //鍒锋柊鎸夐挳鏄剧ず
+ Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]);
+
+ layer.close(ajaxLoad);
+
layer.close(ajaxLoad);
if ($("#ColName option").length < 1) {
ColFilter();
}
- //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+
} else {
//option.data = [[]]
//table.render(option);
@@ -1010,7 +1162,7 @@
, content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=1&linterid=&HSouceBillType=3301&linteridSub=-1'
, end: function () {
//鍒锋柊椤甸潰,
- location.reload();
+ get_FastQuery(2);
}
})
}
@@ -1027,7 +1179,7 @@
, content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=1&linterid=&HSouceBillType=SUB&linteridSub=-1'
, end: function () {
//鍒锋柊椤甸潰,
- location.reload();
+ get_FastQuery(2);
}
})
}
@@ -1039,8 +1191,6 @@
if (checkStatus.data.length === 1) {
var linterid = data[0].HItemID;
//var linteridSub = data[0].hsubid;
-
- //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
layer.open({
type: 2
, area: ['100%', '100%']
@@ -1049,7 +1199,7 @@
, content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=3301'
, end: function () {
//鍒锋柊椤甸潰,
- location.reload();
+ get_FastQuery(2);
}
})
} else {
@@ -1066,31 +1216,36 @@
var hmainid = data[0].hmainid;
layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
var wait = layer.load();
- //閫昏緫鍒犻櫎鏂规硶
- $.ajax({
- url: GetWEBURL() + '/LEMS/DeltetGy_RoutingBillSub',
- type: "GET",
- data: { "lngBillKey": hmainid, "user": sessionStorage["HUserName"], "HBillSubType": "3301" },
- success: function (result) {
- console.log('gouba' + result);
- if (result.count == 1) {
- layer.msg(result.Message, { icon: 1 }, function () {
- // 寰楀埌frame绱㈠紩
- var index = layer.getFrameIndex(window.name);
- //鍏抽棴褰撳墠frame
+ if (data[0].鐘舵�� == "鍒涘缓" || data[0].鐘舵�� == "瀹℃牳閫�鍥�" ) {
+ //閫昏緫鍒犻櫎鏂规硶
+ $.ajax({
+ url: GetWEBURL() + '/LEMS/DeltetGy_RoutingBillSub',
+ type: "GET",
+ data: { "lngBillKey": hmainid, "user": sessionStorage["HUserName"], "HBillSubType": "3301" },
+ success: function (result) {
+ console.log('gouba' + result);
+ if (result.count == 1) {
+ layer.msg(result.Message, { icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(wait);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ get_FastQuery(2);
+ });
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
layer.close(wait);
- //淇敼涓哄姛鍚庡埛鏂扮晫闈�
- window.location.reload();
- });
- } else {
- layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
layer.close(wait);
}
- }, error: function () {
- layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
- layer.close(wait);
- }
- });
+ });
+ } else {
+ layer.msg('鍗曟嵁鐘舵�佹湭鍦ㄥ垱寤�');
+ layer.close(wait);
+ }
})
}
@@ -1187,7 +1342,7 @@
, content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=2&linterid=' + linterid + '&HSouceBillType=3301'
, end: function () {
//鍒锋柊椤甸潰,
- location.reload();
+ get_FastQuery(2);
}
})
} else {
@@ -1197,8 +1352,8 @@
//#region 鍒锋柊
function get_Refresh() {
- set_ClearQuery();
- get_DisplayPage(sWhere);
+
+ get_FastQuery(2);
}
//鍚敤榛樿
@@ -1206,7 +1361,7 @@
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
- if (data.length == 1) {
+ if (data.length == 1 && data[0].鐘舵��!="鍏抽棴") {
layer.confirm("纭瑕佸惎鐢ㄨ宸ヨ壓璺嚎涓虹墿鏂欓粯璁ゅ伐鑹鸿矾绾垮悧?", function (index) {
var wait = layer.load();
var HInterID = data[0].hmainid;
@@ -1230,7 +1385,7 @@
});
})
} else {
- layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�!");
+ layer.msg("璇烽�夋嫨涓�鏉℃湭鍏抽棴鐨勬暟鎹�!");
}
}
@@ -1238,7 +1393,7 @@
function set_closeOtherRoute() {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
- if (checkStatus.data.length === 1 && checkStatus.data[0]["瀹℃牳浜�"]=="") {
+ if (checkStatus.data.length === 1 && data[0].鐘舵�� != "鍏抽棴") {
var hmainid = data[0].hmainid.toString();
var HName = data[0]["宸ヨ壓鍚嶇О"].toString();
var HMaterID = data[0]["HMaterID"].toString();
@@ -1268,7 +1423,7 @@
}
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
-
+
}
});
//鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
@@ -1354,7 +1509,7 @@
layer.close(index);
}
//layer.closeAll('dialog');
-
+
} else {
layer.alert(result.code + result.Message, { icon: 5 });
layer.close(wait);
@@ -1396,6 +1551,14 @@
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
layer.close(wait);
}
+ , end: function () {
+ ////淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ //if (get_needClose_Bar == 0) {
+ $("#btnSearch").trigger('click');
+ //} else if (get_needClose_Bar == 1) {
+ // $("#get_needClose").trigger('click');
+ //}
+ }
});
})
}
@@ -1404,19 +1567,55 @@
}
}
+ //#region 鍙嶄綔搴�/浣滃簾鏁版嵁 [1 浣滃簾銆�2 鍙嶄綔搴焆
+ function set_DropBill(num) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "Gy_RoutingBill/DeleteGy_RoutingBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ });
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ }
+ }
+ //#endregion
//#region 瀵煎嚭Execel
function get_Export() {
var ModRightNameCheck = "Gy_RoutingBillList_ExportExcel";
-
+ var wait = layer.load();
//閫昏緫瀹℃牳鏂规硶
$.ajax({
type: "GET",
url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ async: true,
data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
success: function (result) {
- var data = option.data
+
+ var data = getExportData();
data.forEach((item) => {
for (let itemobj in item) {
if (item[itemobj] == null) {
@@ -1428,14 +1627,189 @@
}
});
if (result.count == 1) {
- table.exportFile(ins.config.id, option.data, "xls");
+ table.exportFile(ins.config.id, data, "xls");
+ layer.close(wait);
} else {
layer.alert("褰撳墠妯″潡娌℃湁瀵煎嚭鏉冮檺!", { icon: 5 });
+ layer.close(wait);
}
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ layer.close(wait);
}
});
+ }
+ //#endregion
+
+ //瀵煎叆
+ function set_Excel() {
+ layer.open({
+ type: 2
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['100%', '100%']
+ , title: '宸ヨ壓璺嚎鍒楄〃-瀵煎叆'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../宸ヨ壓璺嚎/Gy_RoutingBillimport.html'
+ , end: function () {
+ //鍒锋柊椤甸潰,
+ get_FastQuery();
+ }
+ })
+ }
+
+ //#region 鑾峰彇瀵煎嚭鏁版嵁
+ function getExportData() {
+ var data;//瀵煎嚭鐨勬暟鎹�
+ var ajaxLoad = layer.load();
+ var HDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
+ var HDate1 = $("#HEndDate").val();//缁撴潫鏃ユ湡
+ var HOrgID = "";
+ var HOrderProcNO = $("#HOrderProcNO").val();//鍗曟嵁绫诲瀷
+ //var HMaterID = $("#HMaterID").val();
+ var HMaterName = $("#HMaterName").val();
+ var HMaterNumber = $("#HMaterNumber").val();
+ var HModel = $("#HModel").val();
+ var WorkCenter = $("#WorkCenter").val();//鍗曟嵁鍙�
+ var HProject = $("#HProject").val();
+ var ColName = $("#ColName").val();//澶嶉�夋
+ var Comparator = $("#Comparator").val()
+ var ColContent = $("#ColContent").val();
+ var ColName1 = $("#ColName1").val();//澶嶉�夋
+ var Comparator1 = $("#Comparator1").val()
+ var ColContent1 = $("#ColContent1").val();
+ var ColName2 = $("#ColName2").val();//澶嶉�夋
+ var Comparator2 = $("#Comparator2").val()
+ var ColContent2 = $("#ColContent2").val();
+
+ if (ColName != 0 && Comparator != 0) {
+ var com = "";
+ switch (Comparator) {
+ case "7":
+ com = "like'%" + ColContent + "%'";
+ break;
+ case "8":
+ com = "like'%" + ColContent + "'";
+ break;
+ case "9":
+ com = "like'" + ColContent + "%'";
+ break;
+ case "10":
+ com = "not like'%" + ColContent + "%'";
+ break;
+ default:
+ com = "" + Comparator + "'" + ColContent + "'";
+ break;
+ }
+ sWhere += " and " + ColName + " " + com;
+ }
+
+ if (ColName1 != 0 && Comparator1 != 0) {
+ var com1 = "";
+ switch (Comparator1) {
+ case "7":
+ com1 = "like'%" + ColContent1 + "%'";
+ break;
+ case "8":
+ com1 = "like'%" + ColContent1 + "'";
+ break;
+ case "9":
+ com1 = "like'" + ColContent1 + "%'";
+ break;
+ case "10":
+ com1 = "not like'%" + ColContent1 + "%'";
+ break;
+ default:
+ com1 = "" + Comparator1 + "'" + ColContent1 + "'";
+ break;
+ }
+ sWhere += " and " + ColName1 + " " + com1;
+ }
+ if (ColName2 != 0 && Comparator2 != 0) {
+ var com2 = "";
+ switch (Comparator2) {
+ case "7":
+ com2 = "like'%" + ColContent2 + "%'";
+ break;
+ case "8":
+ com2 = "like'%" + ColContent2 + "'";
+ break;
+ case "9":
+ com2 = "like'" + ColContent2 + "%'";
+ break;
+ case "10":
+ com2 = "not like'%" + ColContent2 + "%'";
+ break;
+ default:
+ com2 = "" + Comparator2 + "'" + ColContent2 + "'";
+ break;
+ }
+ sWhere += " and " + ColName2 + " " + com2;
+ }
+ if (HDate) {
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HDate + "'";
+ }
+ if (HDate1) {
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + HDate1 + "'";
+ }
+ if (HMaterID != "" && HMaterID != "undefined" && HMaterID != null) {
+ //浠庡埆鐨勯〉闈㈡墦寮�浼犲叆Hmaterid鍊硷紝璁剧疆鐗╂枡杩囨护,鏈叧闂�
+ sWhere += " and HMaterID = " + HMaterID + " and 鐘舵��='瀹℃牳' and 澶辨晥鏃堕棿>GETDATE()";
+ } else {
+ //涓嶆槸浠庡埆鐨勯〉闈㈡墦寮�
+ var HMaterID2 = $("#HMaterID").val();
+ sWhere += (HMaterID2 == 0 ? "" : (" and HMaterID = " + HMaterID2));
+ }
+ if (HProID != 0 && HProID != "undefined" && HProID != null) {
+ sWhere += " and HMainProcID = " + HProID;
+ }
+ var HOrgID = $("#HOrgID").val();//缁勭粐
+ if (HOrderProcNO) {
+ sWhere += " and 鍗曟嵁绫诲瀷 like '%" + HOrderProcNO + "%'";
+ }
+ if (HMaterName) {
+ sWhere += "and 鐗╂枡鍚嶇О like '%" + HMaterName + "%'";
+ }
+ if (HMaterNumber) {
+ sWhere += "and 鐗╂枡浠g爜 like '%" + HMaterNumber + "%'";
+ }
+ if (HModel) {
+ sWhere += "and 瑙勬牸鍨嬪彿 like '%" + HModel + "%'";
+ }
+ if (WorkCenter) {
+ sWhere += " and 鍗曟嵁鍙� like '%" + WorkCenter + "%'";
+ }
+ if (HOrgID) {
+ sWhere += " and HOrgID = '" + HOrgID + "'";
+ }
+ if (HProject != '0') {
+ sWhere += " and 椤圭洰鍙� like '%" + HProject + "%'";
+ }
+
+ sWhere += " and 宸ュ簭浠g爜 != '9999' and HBillSubType<>'SUB'"
+ //鏌ヨ璇彞
+ $.ajax({
+ //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
+ url: GetWEBURL() + '/LEMS/MES_Gy_RoutingBillList_Json',
+ type: "GET",
+ async:false,
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "HBillSubType": "3301" },
+ success: function (data1) {
+ if (data1.count == 1) {
+ data = data1.data;//鍒楀瓧娈垫暟鎹�
+ layer.close(ajaxLoad);
+ //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ sWhere = "";
+ return data;
+
}
//#endregion
@@ -1512,16 +1886,53 @@
//#endregion
//#region 澶氱骇 鍙嶅鏍�/瀹℃牳鏁版嵁
+ //function set_CheckBill_Flow(num) {
+ // var checkStatus = table.checkStatus('mainTable')
+ // , data = checkStatus.data;
+ // if (checkStatus.data.length === 1) {
+ // var InterID = data[0].hmainid.toString();
+ // //閫昏緫瀹℃牳鏂规硶
+ // $.ajax({
+ // type: "GET",
+ // url: GetWEBURL() + "/Gy_Routing/AuditFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ // data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"], "CurUserID": sessionStorage["Czybm"] },
+ // success: function (result) {
+ // if (result.count == 1) {
+ // layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // // 寰楀埌frame绱㈠紩
+ // var index = layer.getFrameIndex(window.name);
+ // //鍏抽棴褰撳墠frame
+ // layer.close(index);
+ // //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ // $("#btnSearch").trigger('click');
+ // });
+
+ // } else {
+ // layer.alert(result.code + result.Message, { icon: 5 });
+ // }
+ // }, error: function () {
+ // layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ // }
+ // });
+ // }
+ // else {
+ // layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ // }
+ //}
+ //#endregion
+
+ //#region 澶氱骇 鍙嶅鏍�/瀹℃牳鏁版嵁
function set_CheckBill_Flow(num) {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
- if (checkStatus.data.length === 1) {
- var InterID = data[0].hmainid.toString();
+ if (checkStatus.data.length != 0) {
+ var uniqueIds = [...new Set(data.map(obj => obj.hmainid))];//灏嗗璞℃暟缁刬d鎻愬彇鍘婚噸
+ var queryString = uniqueIds.join(",");//灏唅ds鍙樻垚鏁扮粍
//閫昏緫瀹℃牳鏂规硶
$.ajax({
type: "GET",
- url: GetWEBURL() + "/Gy_Routing/AuditFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"], "CurUserID": sessionStorage["Czybm"] },
+ url: GetWEBURL() + "/Gy_Routing/CheckAllFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterIDS": queryString, "IsAudit": num, "CurUserName": sessionStorage["HUserName"], "CurUserID": sessionStorage["Czybm"] },
success: function (result) {
if (result.count == 1) {
layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -1531,6 +1942,7 @@
layer.close(index);
//淇敼涓哄姛鍚庡埛鏂扮晫闈�
$("#btnSearch").trigger('click');
+
});
} else {
@@ -1542,7 +1954,7 @@
});
}
else {
- layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ layer.msg('璇烽�夋嫨鑷冲皯涓�琛屾暟鎹鏍革紒');
}
}
//#endregion
@@ -1582,41 +1994,111 @@
}
//#endregion
- //#endregion
- //闅愯棌鍒楄缃�
- function get_HideColumn() {
- var colName = "";
- var contentUrl = "";
- for (var i = 1; i < option.cols[0].length; i++) {
- colName += option.cols[0][i]["field"] + ",";
+ //#region 鎾ゅ洖
+ function set_WithdrawCheck_Flow() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Gy_Routing/WithdrawCheckFlow", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ });
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
}
- var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
- var urlLen = urlStr.split('/');
- for (var i = 0; i < urlLen.length - 4; i++) {
- contentUrl += "../";
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
}
- colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
-
- contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName;
-
- layer.open({
- type: 2
- , skin: "layui-layer-rim" //鍔犱笂杈规
- , title: "闅愯棌鍒楄缃�" //鏍囬
- , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
- , shift: 2 //寮瑰嚭鍔ㄧ敾
- , area: ["50%", "90%"] //绐椾綋澶у皬
- , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
- , content: [contentUrl, "yes"]
- , btn: ["纭畾", "鍙栨秷"]
- , btn1: function (index, laero) {
- //鍒锋柊琛ㄦ牸鏁版嵁
- DisPlay_HideColumn();
- //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
- layer.close(index);//鍏抽棴寮圭獥
- }
- })
}
+ //#endregion
+
+ //#region 鍒ゆ柇鏉冮檺
+ function PermissionJudge() {
+ var ModRightNameCheck = "";
+ if (HMaterID != "" && HMaterID != "undefined" && HMaterID != null) {
+ //浠庡埆鐨勯〉闈㈡墦寮�浼犲叆Hmaterid鍊�
+ ModRightNameCheck = "Gy_RoutingBill_BasicSelect"
+ } else {
+ //涓嶆槸浠庡埆鐨勯〉闈㈡墦寮�
+ ModRightNameCheck = "Gy_RoutingBill_Query"
+ }
+ var Permission = false;
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ async:false,
+ data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ Permission = true;
+ } else {
+ layer.alert("褰撳墠妯″潡娌℃湁鏌ヨ鏉冮檺!", { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ return Permission;
+ }
+ //#endregion
+
+ $("#HBenchmarkValue").on("input", function (e) {
+ localStorage["HBenchmarkValue"] = e.delegateTarget.value;//鍩哄噯鍊硷紝鐢ㄤ簬娣诲悍璁$畻绾﹀綋绯绘暟锛氬熀鍑嗗��/灏忔椂浜ц兘
+ });
+
+ //#endregion
+ ////闅愯棌鍒楄缃�
+ //function get_HideColumn() {
+ // var colName = "";
+ // var contentUrl = "";
+ // for (var i = 1; i < option.cols[0].length; i++) {
+ // colName += option.cols[0][i]["field"] + ",";
+ // }
+ // var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+ // var urlLen = urlStr.split('/');
+ // for (var i = 0; i < urlLen.length - 4; i++) {
+ // contentUrl += "../";
+ // }
+ // colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+ // contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName;
+
+ // layer.open({
+ // type: 2
+ // , skin: "layui-layer-rim" //鍔犱笂杈规
+ // , title: "闅愯棌鍒楄缃�" //鏍囬
+ // , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ // , shift: 2 //寮瑰嚭鍔ㄧ敾
+ // , area: ["50%", "90%"] //绐椾綋澶у皬
+ // , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ // , content: [contentUrl, "yes"]
+ // , btn: ["纭畾", "鍙栨秷"]
+ // , btn1: function (index, laero) {
+ // //鍒锋柊琛ㄦ牸鏁版嵁
+ // DisPlay_HideColumn();
+ // //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ // layer.close(index);//鍏抽棴寮圭獥
+ // }
+ // })
+ //}
//鏄剧ず鍒楁暟鎹�
//function DisPlay_HideColumn() {
@@ -1638,7 +2120,7 @@
// if (dataCol[i]) {
// var dataCols = dataCol[i].split('|');
// }
-
+
// //闅愯棌鍒�
// if (dataCols[1] == 1) {
// option.cols[0][i + 1]["hide"] = true;
@@ -1716,104 +2198,104 @@
//}
//#region 鏄剧ず鍒楁暟鎹�
- function DisPlay_HideColumn() {
- $.ajax({
- url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
- type: "GET",
- async: false,
- data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
- success: function (data1) {
- if (data1.data.length != 0) {
+ //function DisPlay_HideColumn() {
+ // $.ajax({
+ // url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ // type: "GET",
+ // async: false,
+ // data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ // success: function (data1) {
+ // if (data1.data.length != 0) {
- var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
- var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
- var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
- newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
- dataCol = data1.data[0].HGridString.split(',');
- //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
- if (dataCol.length == option.cols[0].length - 1) {
- //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
- for (var j = 0; j < option.cols[0].length - 1; j++) {
- for (var i = 0; i < option.cols[0].length - 1; i++) {
- var dataCols = dataCol[j].split('|');
- //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
- if (option.cols[0][i + 1]["field"] == dataCols[5]) {
- //闅愯棌鍒�
- if (dataCols[1] == 1) {
- option.cols[0][i + 1]["hide"] = true;
- }
- //璁剧疆鍒楀
- if (dataCols[3] > 0) {
- option.cols[0][i + 1]["width"] = dataCols[3];
- }
- //璁剧疆鍐呭瀛椾綋澶у皬
- if (data1.data[0].HFontSize != 0) {
- option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
- } else {
- option.cols[0][i + 1]["style"] = "font-size:100%";
- }
- //鏄剧ず鍒�
- if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
- option.cols[0][i + 1]["hide"] = false;
- }
- //缁熻鍒�
- if (dataCols[6] == 1) {
- option.cols[0][i + 1]["totalRow"] = true;
- }
- //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
- switch (dataCols[2]) {
- case "L":
- option.cols[0][i + 1]["align"] = "left";
- break;
- case "M":
- option.cols[0][i + 1]["align"] = "center";
- break;
- case "R":
- option.cols[0][i + 1]["align"] = "right";
- break;
- }
- //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
- if (dataCols[4] != null && dataCols[4] != "") {
- option.cols[0][i + 1]["title"] = dataCols[4];
- }
- newCols[0].push(option.cols[0][i + 1]);
- }
- }
- }
- //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
- if (dataCol.length == newCols[0].length - 1) {
- option.cols = newCols;
- //鍙栨秷鍐荤粨鍒�
- for (var i = 1; i < option.cols[0].length - 1; i++) {
- if (option.cols[0][i]["fixed"] != null) {
- option.cols[0][i]["fixed"] = null;
- }
- else {
- break;
- }
- }
- //鍐荤粨鍒�
- if (data1.data[0].HFixCols != 0) {
- for (var i = 0; i < data1.data[0].HFixCols; i++) {
- if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
- data1.data[0].HFixCols += 1;
- }
- option.cols[0][i + 1]["fixed"] = "left";
- }
- }
- }
- }
- ins=table.render(option);
- } else {
- ins=table.render(option);
- }
- var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
- Display_HideButton(btns, "3301", HModName, sessionStorage["HUserName"]);
- }, error: function () {
- layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
- }
- })
- }
+ // var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ // var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ // var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ // newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
+ // dataCol = data1.data[0].HGridString.split(',');
+ // //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ // if (dataCol.length == option.cols[0].length - 1) {
+ // //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ // for (var j = 0; j < option.cols[0].length - 1; j++) {
+ // for (var i = 0; i < option.cols[0].length - 1; i++) {
+ // var dataCols = dataCol[j].split('|');
+ // //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ // if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ // //闅愯棌鍒�
+ // if (dataCols[1] == 1) {
+ // option.cols[0][i + 1]["hide"] = true;
+ // }
+ // //璁剧疆鍒楀
+ // if (dataCols[3] > 0) {
+ // option.cols[0][i + 1]["width"] = dataCols[3];
+ // }
+ // //璁剧疆鍐呭瀛椾綋澶у皬
+ // if (data1.data[0].HFontSize != 0) {
+ // option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ // } else {
+ // option.cols[0][i + 1]["style"] = "font-size:100%";
+ // }
+ // //鏄剧ず鍒�
+ // if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ // option.cols[0][i + 1]["hide"] = false;
+ // }
+ // //缁熻鍒�
+ // if (dataCols[6] == 1) {
+ // option.cols[0][i + 1]["totalRow"] = true;
+ // }
+ // //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ // switch (dataCols[2]) {
+ // case "L":
+ // option.cols[0][i + 1]["align"] = "left";
+ // break;
+ // case "M":
+ // option.cols[0][i + 1]["align"] = "center";
+ // break;
+ // case "R":
+ // option.cols[0][i + 1]["align"] = "right";
+ // break;
+ // }
+ // //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ // if (dataCols[4] != null && dataCols[4] != "") {
+ // option.cols[0][i + 1]["title"] = dataCols[4];
+ // }
+ // newCols[0].push(option.cols[0][i + 1]);
+ // }
+ // }
+ // }
+ // //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ // if (dataCol.length == newCols[0].length - 1) {
+ // option.cols = newCols;
+ // //鍙栨秷鍐荤粨鍒�
+ // for (var i = 1; i < option.cols[0].length - 1; i++) {
+ // if (option.cols[0][i]["fixed"] != null) {
+ // option.cols[0][i]["fixed"] = null;
+ // }
+ // else {
+ // break;
+ // }
+ // }
+ // //鍐荤粨鍒�
+ // if (data1.data[0].HFixCols != 0) {
+ // for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ // if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ // data1.data[0].HFixCols += 1;
+ // }
+ // option.cols[0][i + 1]["fixed"] = "left";
+ // }
+ // }
+ // }
+ // }
+ // ins=table.render(option);
+ // } else {
+ // ins=table.render(option);
+ // }
+ // var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ // Display_HideButton(btns, "3301", HModName, sessionStorage["HUserName"]);
+ // }, error: function () {
+ // layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ // }
+ // })
+ //}
//#endregion
@@ -1849,11 +2331,304 @@
form.render('select');
}
//#endregion
+
+ //#region 銆愯繃婊ゆ柟妗堛��
+
+ //鑾峰彇褰撳墠鐢ㄦ埛鐨勯粯璁よ繃婊ゆ柟妗�
+ function get_DefaultModule() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
+ type: "GET",
+ data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" },
+ success: function (data1) {
+ if (data1.count == 1) {
+ //褰撳墠鐢ㄦ埛璁剧疆鏈夐粯璁ょ殑杩囨护鏂规
+ var data = data1.data;
+ //褰撳墠閫夋嫨鐨勮繃婊ゆ柟妗�
+ HInterID_Choose = data[0].hmainid;
+ //杩囨护鏂规鍐呯爜
+ HInterID = data[0].hmainid
+ //杩囨护鏂规鍚嶇О
+ HDefaultFilter = data[0].鏂规鍚嶇О
+ //杩囨护鏂规鐨勫娉紙鏂规淇℃伅鎻忚堪锛�
+ var HRemark = data[0].澶囨敞
+ //鏄剧ず鍑哄綋鍓嶇殑榛樿杩囨护鏂规
+ document.getElementById("HFilterScheme_Now").style.display = "block";
+ document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>';
+ //鎶婅繃婊ゆ潯浠跺�煎洖鍐欏埌椤甸潰涓�
+ for (let i = 0; i < data.length; i++) {
+ $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�);
+ if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') {
+ $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true);
+ }
+ }
+ //鎵ц鏌ヨ鏂规硶
+ get_FastQuery()
+ form.render("select");
+ } else {
+ //褰撳墠鐢ㄦ埛娌℃湁璁剧疆榛樿鐨勮繃婊ゆ柟妗�
+ //闅愯棌鏄剧ず杩囨护鏂规鐨勬爣绛句俊鎭�
+ document.getElementById("HFilterScheme_Now").style.display = "none";
+ //鎵ц鏌ヨ鏂规硶
+ get_FastQuery()
+ form.render("select");
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ //淇濆瓨鏂规
+ function set_SaveScheme() {
+ var index = layer.open()
+ //鍒ゆ柇鐢ㄦ埛鏄惁鐐瑰嚮浜嗗彸涓婅鐨勨�滃弶鍙封�濆叧闂脊绐楅〉闈�
+ var HIsClose_Manual = false;
+ //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+ var Filter = document.getElementsByClassName(HClassTag);
+
+ var HFilterIdList = "";//杩囨护鏉′欢
+ var HFilterIdLists = "";//鎷兼帴澶氫釜杩囨护鏉′欢
+ var HValue = "";//杩囨护鍊�
+ var HElement_type = "";//杩囨护鏍囩绫诲瀷
+
+ for (var i = 0; i < Filter.length; i++) {
+ HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID
+ HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+ HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+ HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+ }
+
+ //鍘婚櫎鏈熬閫楀彿
+ HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+ HValue = HValue.substring(0, HValue.length - 1);
+ HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+ //褰撳墠椤甸潰涓婃病鏈夐�夋嫨杩囨护鏂规锛岃繘鍏ユ柊澧炴柟娉�
+ if (HDefaultFilter == "") {
+ layer.open({
+ type: 2
+ , area: ['40%', '80%']
+ , title: '杩囨护鏂规'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
+ , cancel: function () {
+ // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫
+ HIsClose_Manual = true;
+ }
+ , end: function () {
+ if (HIsClose_Manual != true) {
+ get_FastQuery();
+ //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+ document.getElementById("HFilterScheme_Now").style.display = "block";
+ document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
+ }
+ }
+ })
+ layer.close(index)
+ } else {
+ //褰撳墠椤甸潰宸叉湁杩囨护鏂规锛岀敤鎴烽�夋嫨 鏂板鎴栬�呯紪杈�
+ layer.confirm('褰撳墠宸查�夋嫨杩囨护鏂规锛屾槸鍚︿慨鏀癸紵璇烽�夋嫨瀵瑰簲鎿嶄綔', {
+ title: "鎿嶄綔鎻愮ず",
+ icon: 0,
+ btn: ['鏂板鏂规', '淇濆瓨淇敼褰撳墠鏂规', '鍙栨秷']
+ }, function (index, layero) {
+ //鏂板
+ layer.open({
+ type: 2
+ , area: ['40%', '80%']
+ , title: '杩囨护鏂规'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
+ , end: function () {
+ get_FastQuery()
+ //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+ document.getElementById("HFilterScheme_Now").style.display = "block";
+ document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
+ }
+ })
+ layer.close(index)
+ }, function (index) {
+ //缂栬緫
+ var Filter_Edit = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+ HFilterIdList = "";
+ HFilterIdLists = "";
+ HValue = "";
+ HElement_type = "";
+ for (var i = 0; i < Filter_Edit.length; i++) {
+ HFilterIdList = Filter_Edit[i].id; //杩囨护鏉′欢ID
+ HFilterIdLists += Filter_Edit[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+ HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+ HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+ }
+ //鍘婚櫎鏈熬閫楀彿
+ HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+ HValue = HValue.substring(0, HValue.length - 1);
+ HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+ var sMainSub = HInterID_Choose + ';' + HFilterIdLists + ';' + HValue + ';' + HElement_type + ';' + sessionStorage["Czybm"] + ';' + 3;
+
+ //淇敼
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Xt_FastICScheme/save", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ async: true,
+ data: { "oMain": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ layer.msg(data.Message, { time: 1 * 1000, icon: 1 });
+ }
+ else {
+
+ }
+ layer.closeAll("loading");
+ },
+ error: function (err) {
+
+
+ }
+ });
+ layer.close(index)
+ }, function (index) {
+ //鍙栨秷
+ layer.alert('鍙栨秷')
+ layer.close(index)
+ });
+ }
+
+ }
+
+ //璇诲彇鏂规
+ function set_ReadScheme() {
+ var HIsClose_Manual = false;
+ var Filter = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+
+ var HFilterIdList = "";
+ var HFilterIdLists = "";
+ var HValue = "";
+ var HElement_type = "";
+ for (var i = 0; i < Filter.length; i++) {
+ HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID
+ HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+ HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+ HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+ }
+ //鍘婚櫎鏈熬閫楀彿
+ HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+ HValue = HValue.substring(0, HValue.length - 1);
+ HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+ layer.open({
+ type: 2
+ , area: ['80%', '80%']
+ , title: '杩囨护鏂规鍒楄〃'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName
+ , cancel: function () {
+ // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫
+ HIsClose_Manual = true;
+ }
+ , end: function () {
+ if (HIsClose_Manual != true) {
+ get_FastQuery()
+ form.render("select");
+ }
+ }
+ })
+ }
+
+ //#endregion
+
+ //#region 鎵规敼灏忔椂浜ц兘
+ function set_BulkEditWorkTime() {
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "鎵规敼灏忔椂浜ц兘" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "80%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['./Gy_BulkEditWorkQty.html', "yes"]
+ })
+ }
+ //#endregion
+
+ //#region 浜х嚎浜ц兘
+ function set_SourceWorkQty() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var HMaterNumber = data[0].鐗╂枡浠g爜;
+ var HMaterName = data[0].鐗╂枡鍚嶇О;
+ var HMaterModel = data[0].瑙勬牸鍨嬪彿;
+ var HProcName = data[0].宸ュ簭;
+ var HBillInterID = data[0].hmainid;
+ var HBillEntryID = data[0].hsubid;
+ var HSortProcFlag = data[0].鎺掍骇宸ュ簭鏍囪;
+
+ if (HSortProcFlag == "true" || HSortProcFlag == "1" || HSortProcFlag == "鏄�" || HSortProcFlag == true) {
+ layer.open({
+ type: 2
+ , area: ['80%', '80%']
+ , title: '鐢熶骇璧勬簮浜ц兘璁剧疆'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../璁″垝绠$悊/宸ヨ壓璺嚎/Gy_RoutingBillWorkQty.html?HMaterNumber=' + HMaterNumber + '&HMaterName=' + HMaterName + '&HMaterModel=' + HMaterModel + '&HProcName=' + HProcName + '&HBillInterID=' + HBillInterID + '&HBillEntryID=' + HBillEntryID, 'yes']
+ })
+ } else {
+ layer.msg('鎵�閫夊伐搴忥細' + HProcName + '锛屼笉涓烘帓浜у伐搴忥紒');
+ }
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+ }
+ }
+ //#endregion
+
//#endregion
//浠ヤ笂鏄痩ayui妯″潡
});
+ //#region 銆愯繃婊ゆ柟妗堣繑鍥炴暟鎹��
+ function HFilterScheme(obj) //杩斿洖杩囨护鏂规
+ {
+ var HInterID = obj[0].hmainid;
+ HInterID_Choose = obj[0].hmainid;
+ $.ajax({
+ url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
+ type: "GET",
+ data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": HInterID, "Type": "Select" },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var data = data1.data;
+ //璧嬪�艰繃婊ゆ柟妗堝悕绉�
+ HDefaultFilter = data[0].鏂规鍚嶇О
+ var HRemark = data[0].澶囨敞
+ //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+ document.getElementById("HFilterScheme_Now").style.display = "block";
+ document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>';
+ HInterID = data[0].hmainid
+ //鏍规嵁閫夋嫨鐨勮繃婊ゆ柟妗堝洖濉暟鎹埌鍒楄〃杩囨护鏉′欢
+ for (let i = 0; i < data.length; i++) {
+ $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�);
+ if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') {
+ $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true);
+ }
+ }
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ //#endregion
//鐗╂枡
function GetMaterValue(obj) {
$("#HMaterID").val(obj[0].HItemID);
--
Gitblit v1.9.1